Commit graph

63 commits

Author SHA1 Message Date
Jouni Malinen 54ddd74369 Add disable_scan_offload parameter to disable automatic scan offloading
This new configuration parameter can be used to disable automatic
offloading of scan requests to the driver which was previously used
by default if the driver supported sched_scan.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-04-17 16:30:15 +03:00
Anirban Sirkhell 71dd3b78f9 WPS: Allow vendor specific attribute to be added into M1
wps_vendor_ext_m1 configuration parameter can now be used to add a
vendor specific attribute into the WPS M1 message, e.g., for
Windows Vertical Pairing.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-04-04 00:08:57 +03:00
Bala Shanmugam 1f6c0ab872 Allow background scan period to be configured
A network block specific background scan period can now be configured
for drivers that implement internal background scan mechanism for
roaming and BSS selection.

Signed-hostap: Bala Shanmugam <bkamatch@qca.qualcomm.com>
2012-03-30 15:20:35 +03:00
Jouni Malinen 21d996f775 P2P: Add support for preferred channel list
p2p_pref_chan configuration parameter can now be used to set the
list of preferred channel for P2P GO Negotiation. This will be used
in the priority order if the peer does not support the channel we
are trying to use as the GO (configured operating channel or the
best 2.4 GHz/5 GHz channel) for the case where a forced channel is
not used.

p2p_pref_chan=<op class:channel>,...

For example:
p2p_pref_chan=81:1,81:2,81:3,81:4,81:5,81:6

This would configure 2.4 GHz channels 1-6 as the preferred ones with
channel 1 the most preferred option.

These configuration parameters can be set in wpa_supplicant.conf and
dynamically updated with "wpa_cli set <param> <value>".

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-03-29 21:28:34 +03:00
Vasanthakumar Thiagarajan 07f53b8cc7 wpa_supplicant: Add provision to configure inactivity period in AP mode
This patch adds a configuration in network block, ap_max_inactivity, for
station's inactivity period when in AP mode. The time period is
configured in seconds, by default 300 seconds.

Signed-hostap: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
2012-03-27 20:49:44 +03:00
Jouni Malinen bb8b1bb0fc Fix memory leak on parsing multiple network block eap entries
Signed-hostap: Jouni Malinen <j@w1.fi>
intended-for: hostap-1
2012-03-04 16:13:00 +02:00
Jouni Malinen d7b01abd5e Interworking: Support real SIM/USIM card for network selection
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-03-04 16:02:56 +02:00
Jouni Malinen 11e4f46a10 Interworking: Add support for certificate credentials (EAP-TLS)
This allows Interworking network selection to be used with EAP-TLS
(client certificate/private key based credential).

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-03-03 10:38:10 +02:00
Vivek Natarajan e62f4ed0df Add support for hidden SSID in wpa_supplicant AP mode
This also disables WPS support if hidden SSID is enabled in AP mode.

Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-27 16:28:45 +02:00
Jouni Malinen f64adcd71e Allow PC/SC reader to be selected and initialized at start
New global configuration parameters pcsc_reader and pcsc_pin can now be
used to initialize PC/SC reader context at start of wpa_supplicant.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-26 13:09:30 +02:00
Jouni Malinen 2c60ca7391 Clean up array insertion to skip unnecessary memmove
The previous elements need to be moved only if we are inserting the new
network in the middle of the list. While the memmove of zero bytes at
the end of the array does not cause real problems, some static analyzers
complain about this, so in addition to slightly optimized
implementation, this removes some analyzer warnings, too.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-19 16:44:30 +02:00
Jouni Malinen f4b2d69b07 Fix memory leak on set_cred error path
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-19 14:29:38 +02:00
Jouni Malinen 7d86e53747 Interworking: Add verbose error message on cred block parsing errors
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-16 16:38:10 +02:00
Jouni Malinen 1a712d2fc1 Interworking: Add support for credential priorities
This allows credentials to be set with a specific priority to allow
the automatic network selection behavior to be controlled with user
preferences. The priority values are configured to the network block
and BSS selection will select the network based on priorities from
both pre-configured network blocks and credentials.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-16 16:37:21 +02:00
Jouni Malinen d94c9ee6ad Interworking: Add ctrl_iface commands for managing credentials
New wpa_cli commands list_creds, add_cred, remove_cred, and set_cred
can now be used to manage credentials similarly to the commands used
with network blocks.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-16 16:36:00 +02:00
Jouni Malinen 1bb7b8e84c Interworking: Add support for multiple credentials
This replaces the global home_* parameters with a list of credentials
that can be configured similarly to network blocks. For example:

cred={
	realm="example.com"
	username="user@example.com"
	password="password"
	ca_cert="/etc/wpa_supplicant/ca.pem"
	domain="example.com"
}

cred={
	imsi="310026-000000000"
	milenage="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:000000000123"
}

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-16 16:34:22 +02:00
Jouni Malinen 00bf219ddb Interworking: Add support for home vs. visited SP determination
Use Domain Name List (ANQP) and the new home_domain configuration
parameter to figure out whether a network is operated by the home
service provider and if so, prefer it over networks that would
require roaming.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-16 16:32:00 +02:00
Jouni Malinen 0f3d578efc Remove the GPL notification from files contributed by Jouni Malinen
Remove the GPL notification text from the files that were
initially contributed by myself.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-11 19:39:36 +02:00
Ben Greear 80e8a5eef1 Support HT capability overrides
This allows HT capabilities overrides on kernels that
support these features.

MCS Rates can be disabled to force to slower speeds when using HT.
Rates cannot be forced higher.

HT can be disabled, forcing an 802.11a/b/g/n station to act like
an 802.11a/b/g station.

HT40 can be disabled.

MAX A-MSDU can be disabled.
A-MPDU Factor and A-MPDU Density can be modified.

Please note that these are suggestions to the kernel. Only mac80211
drivers will work at all. The A-MPDU Factor can only be decreased and
the A-MPDU Density can only be increased currently.

Signed-hostap: Ben Greear <greearb@candelatech.com>
2012-01-29 21:01:31 +02:00
Jouni Malinen fbdcfd577a P2P: Maintain a list of P2P Clients for persistent group on GO
Add a new persistent group network block field, p2p_client_list, to
maintain a list of P2P Clients that have connected to a persistent
group. This allows GO of a persistent group to figure out more easily
whether re-invocation of a persistent group can be used with a specific
peer device.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-12-22 22:47:41 +02:00
Jouni Malinen 11540c0b21 Interworking: Allow ANT to be configured for Probe Request frames
Access Network Type can now be configured (default: 15 = wildcard) to
limit which APs reply to the scan.
2011-10-21 12:44:29 +03:00
Jouni Malinen 3b840b6748 Interworking: Support for using EAP-SIM credentials in network selection
New configuration parameters home_imsi and home_milenage can be used
to configure SIM/USIM simulator parameters for network selection based
on SIM/USIM credentials.

home_imsi=(MCC | MNC | '-' | rest of IMSI)
home_milenage=(Ki):(OPc):(SQN)

For example:
home_imsi=310026-000000000
home_milenage=90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:000000000123
2011-10-16 23:55:34 +03:00
Jouni Malinen 67e1b98463 Interworking: Support username/password based network selection
Add support for network selection for username/password credentials with
EAP-TTLS and EAP-PEAP. The new global configuration parameters
home_username, home_password, and home_ca_cert can be used to specify
credentials for network selection.
2011-10-16 23:55:34 +03:00
Jouni Malinen 73c41a8fab Interworking: Parse NAI Realms and match against home realm 2011-10-16 23:55:34 +03:00
Jouni Malinen 46ee0427b1 IEEE 802.11u: Allow Interworking and HESSID to be configured
The new wpa_supplicant.conf file global parameters interworking and
hessid can be used to configure wpa_supplicant to include
Interworking element in Probe Request frames.
2011-10-16 23:55:34 +03:00
Sam Leffler 78633c3709 wpa_supplicant: Parameterize BSS table expiration age + count
Replace compile-time BSS cache expiration age and scan count by config
parameters that can be set via wpa_cli and the new D-Bus API. The latter
is done with interface properties BSSExpireAge and BSSExpireCount.
2011-03-20 12:40:59 +02:00
Sam Leffler 7c49fdd0bd dbus: Add RemoveAllNetworks to the new D-Bus API
This adds a new command to the interface to remove all configured
netblocks. Without this it's necessary to query properties on the
interface and explicitly remove each netblock.
2011-03-20 12:12:12 +02:00
Johannes Berg 2f646b6e83 WPS: Store (secondary) device type as binary
Instead of converting back and forth from the string representation,
always use the binary representation internally.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2011-03-17 18:50:22 +02:00
Johannes Berg d1c8ac88b9 DBus: Publish provisioned keys in network properties
When the network was provisioned, we need to get the keys to be able to
reconnect without new provisioning. To be able to publish those keys but
not normally configured ones, add a new attribute to struct wpa_ssid
indicating whether or not keys may be exported.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2011-02-02 17:00:12 +02:00
Johannes Berg 0d7e5a3a29 Allow AP mode to disconnect STAs based on low ACK condition
The nl80211 driver can report low ACK condition (in fact it reports
complete loss right now only). Use that, along with a config option, to
disconnect stations when the data connection is not working properly,
e.g., due to the STA having went outside the range of the AP. This is
disabled by default and can be enabled with disassoc_low_ack=1 in
hostapd or wpa_supplicant configuration file.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2010-12-28 17:15:01 +02:00
Jouni Malinen 3071e18109 P2P: Add mechanism for timing out idle groups
A new configuration parameter, p2p_group_idle, can now be used to set
idle timeout value for P2P groups in seconds (0 = no timeout). If set,
this values is used to remove P2P group (both GO and P2P client)
interfaces after the group has been idle (no clients/GO seen) for the
configuration duration.

The P2P-GROUP-REMOVED event is now indicating the reason for group
removal when known. For example:
P2P-GROUP-REMOVED wlan0 GO reason=REQUESTED
P2P-GROUP-REMOVED wlan1 client reason=IDLE
2010-10-25 18:24:15 +03:00
Jouni Malinen dae608d5d3 Add max_num_sta config option for wpa_supplicant AP mode
This can be used to limit the number of stations allowed to be
connected to the AP.
2010-10-19 17:08:20 +03:00
Sudhakar Swaminathan 0f66abd25b P2P: Add option for disabling intra BSS distribution
p2p_intra_bss configuration parameter can now be used to
disable/enable intra BSS distribution (bridging of frames between
the clients in a group).
2010-09-10 10:30:26 -07:00
Wei-Jen Lin c0a321c519 Allow bssid parameter to be cleared through ctrl_interface
Setting bssid to an empty string, "", or any can now be used to
clear the bssid_set flag in a network block, i.e., to remove bssid
filtering.
2010-09-10 10:30:25 -07:00
Jouni Malinen 1c9cb49fe9 Trigger WPS configuration update on string changes
Previously, only Device Name string was handled, but similar trigger
is needed on Manufacturer, Model Name, Model Number, and Serial Number
changes.
2010-09-09 07:17:21 -07:00
Jouni Malinen 4dac02455a P2P: Use config block with disabled==2 to store persistent groups 2010-09-09 07:17:17 -07:00
Jouni Malinen e3768e7c94 P2P: Add global configuration parameters for P2P 2010-09-09 07:17:16 -07:00
Jouni Malinen 2c5d725c65 P2P: Add dynamic network config block parameters for P2P 2010-09-09 07:17:16 -07:00
Jouni Malinen 1d47214aa9 Add flag indicating which global configuration parameters have changed 2010-09-09 07:17:16 -07:00
Jouni Malinen 121adf9c2e Move global configuration parser into config.c
This makes it easier to provide support for dynamic updates of the
global configuration parameters while wpa_supplicant is running.
2010-09-09 07:17:16 -07:00
Jouni Malinen b766a9a293 Add freq_list network configuration parameter
This can be used to limit which frequencies are considered when
selecting a BSS. This is somewhat similar to scan_freq, but will
also affect any scan results regardless of which program triggered
the scan.
2010-03-26 22:45:50 -07:00
Dmitry Shmidt aa53509ffe Update priority list after priority change
Despite comments in the wpa_config_update_prio_list(struct wpa_config
*config) telling that it is called "if priority for a network is
changed", it is apparently not.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-03-06 11:13:50 +02:00
Jouni Malinen c9c38b0996 Make maximum BSS table size configurable
New global configuration parameter bss_max_count can now be used to
change the maximum BSS table size. The old fixed size limit (200) is
used as the default value for this parameter.
2010-03-05 20:20:09 +02:00
Jouni Malinen 0474686514 Fix couple of memory leaks in wpa_config_get_all() 2009-12-30 22:37:23 +02:00
Jouni Malinen c0e4dd9eeb WPS: Make Config Methods configurable for wpa_supplicant
This adds config_methods configuration option for wpa_supplicant
following the design used in hostapd. In addition, the string is
now parsed in common code from src/wps/wps_common.c and the list
of configurable methods include all the defined methods from
WPS 1.0h spec.
2009-12-21 15:59:25 +02:00
Jouni Malinen 2d106f21aa Remove unnecessary defines
The following defines are not really needed in most places, so
remove them to clean up source code and build scripts:
EAP_TLS_FUNCS
EAP_TLS_OPENSSL
EAP_TLS_GNUTLS
CONFIG_TLS_INTERNAL
2009-12-05 22:51:08 +02:00
Jouni Malinen 03da66bd59 Remove src/crypto from default include path
In addition, start ordering header file includes to be in more
consistent order: system header files, src/utils, src/*, same
directory as the *.c file.
2009-11-29 23:04:43 +02:00
Jouni Malinen 3acb50056c Remove src/rsn_supp from default header path 2009-11-29 18:28:08 +02:00
Witold Sowa 3d3d305645 Add dbus mechanism for fetching all network configuration parameters 2009-11-11 17:17:00 +02:00
Jouni Malinen 60b94c9819 Add preliminary background scan and roaming module design
This allows background scanning and roaming decisions to be contained in
a single place based on a defined set of notification events which will
hopefully make it easier to experiment with roaming improvements. In
addition, this allows multiple intra-ESS roaming policies to be used
(each network configuration block can configure its own bgscan module).

The beacon loss and signal strength notifications are implemented for
the bgscan API, but the actual events are not yet available from the
driver.

The included sample bgscan module ("simple") is an example of what can
be done with the new bgscan mechanism. It requests periodic background
scans when the device remains associated with an ESS and has couple of
notes on what a more advanced bgscan module could do to optimize
background scanning and roaming. The periodic scans will cause the scan
result handler to pick a better AP if one becomes available. This bgscan
module can be taken into use by adding bgscan="simple" (or
bgscan="simple:<bgscan interval in seconds>") into the network
configuration block.
2009-09-15 00:08:24 +03:00