Commit graph

186 commits

Author SHA1 Message Date
Dmitry Shmidt 39ee845f92 wpa_supplicant: Add bss_flush command to invalidate scan results
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-08-25 10:23:22 +03:00
Jouni Malinen 05a77b3b46 P2P: Use 500 ms search delay by default during concurrent operations
If the p2p_find command is used without the delay parameter, a 500 ms
default search delay will now be used when any interface using the same
radio is in an concurrent operation. "p2p_find delay=0" can be used to
enforce the old behavior in such a case if needed.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-08-23 18:34:57 +03:00
Jouni Malinen 37448ede31 P2P: Add option for adding extra delay to p2p_find
A new optional delay=<search delay in milliseconds> parameter can now be
used with p2p_find command to request an extra delay between search
iterations. This can be used, e.g., to make p2p_find friendlier to
concurrent operations by avoiding it from taking 100% of the radio
resources.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-08-23 18:20:58 +03:00
Jouni Malinen 4ed34f5acd HS 2.0: Do not indicate HS 2.0 status without WPA2-Enterprise
Hotspot 2.0 allows only WPA2-Enterprise to be used, so other types of
networks must not be indicated as Hotspot 2.0 networks even if they
(incorrectly) advertise HS 2.0 support.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-08-19 12:54:48 +03:00
Rajkumar Manoharan e2308e4b45 P2P: Add optional "ht40" argument for p2p_connect
This can be used to start negotiated GO in 40 MHz channel width
in 5GHz band.

Signed-hostap: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
2012-08-15 23:07:44 +03:00
Rajkumar Manoharan 7aeac98509 P2P: Enable 40 MHz support for autonomous P2P group addition
Add optional "ht40" argument for p2p_group_add command to enable 40 MHz
in 5GHz band. This configures the secondary channel, when HT support is
enabled and if the HW supports 40 MHz channel width.

Signed-hostap: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
2012-08-15 22:53:01 +03:00
Jouni Malinen 067ffa2696 Convert os_realloc() for an array to use os_realloc_array()
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-08-13 21:21:23 +03:00
Janusz Dziedzic 0eed2a8d11 wpa_cli: Add IFNAME command
This command will return wpa_s->ifname that can be used for a nice
prompt in wpa_cli.

Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2012-08-05 20:12:16 +03:00
Dmitry Shmidt 35aa088a32 Add 'get_capability channels' command for ctrl_iface
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-08-04 21:17:04 +03:00
Thomas Pedersen bf8d6d2430 nl80211: Support setting sched scan RSSI threshold
Allow the user to configure an RSSI threshold in dBm below which the
nl80211 driver won't report scan results. Currently only supported
during scheduled (PNO) scans.

Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-07-25 16:56:43 +03:00
Jouni Malinen dcc3305701 Move p2p_connect PIN format validation into a separate function
This functionality could be shared for other commands, too, so move
it to a common function. In addition, implement the validation in a
bit more strict way to avoid accepting values like '-123' as a valid
PIN.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-06-30 21:27:32 +03:00
Masashi Honma 36ebf7a1b2 P2P: Add error message for invalid PIN
Reject invalid PIN value in p2p_connect command. Before this, typos
like "pbd" as the third parameter could have resulted in OK return
value since this parameter was interpreted as the PIN.

Signed-hostap: Masashi Honma <masashi.honma@gmail.com>
2012-06-30 21:19:12 +03:00
Jouni Malinen 1cea09a9e2 WPS ER: Add support for building NFC configuration token
WPS_ER_NFC_CONFIG_TOKEN command can now be used to build a NFC
configuration token based on AP Settings learnt with WPS_ER_LEARN
or set with WPS_ER_CONFIG.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-06-28 16:35:51 +03:00
Jouni Malinen 71892384da WPS: Fix ifdef use for the new NFC mechanism in wpa_supplicant
Use CONFIG_WPS_NFC instead of CONFIG_WPS_OOB for the NFC specific
new ctrl_iface commands.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-06-28 14:07:22 +03:00
Jouni Malinen d7645d239d WPS: Add support for NFC configuration token from external program
The new wpa_supplicant ctrl_iface command WPS_NFC_TAG_READ can now be
used to process NFC tags read by external programs to initiate
wpa_supplicant to use NFC Configuration Token to create a new network.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-06-28 13:59:29 +03:00
Jouni Malinen 3f2c8ba6d3 WPS: Add new mechanism for NFC config method using password token
Instead of requiring low-level access to an NFC device and synchronous
operations, the new WPS_NFC_TOKEN and WPS_NFC ctrl_iface commands can be
used to build a NFC password token and initiate WPS protocol run using
that token (or pre-configured values) as separate commands. The
WPS_NFC_TOKEN output can be written to a NFC tag using an external
program, i.e., wpa_supplicant does not need to have low-level code for
NFC operations for this.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-06-27 21:22:12 +03:00
Jouni Malinen 99f0032409 Allow autoscan parameters to be changed in SCANNING state
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-06-26 20:11:25 +03:00
Jouni Malinen c3d1223848 Reinitialize autoscan on explicit reassocciate/reconnect command
This clears the exponential scan interval back to the base value
when a reconnection is requested explicitly.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-06-26 20:05:51 +03:00
Jouni Malinen d7ded75832 Cancel pending scan request on DISCONNECT command
Previously, a pending scan request could be left running when processing
DISCONNECT command from control interface. This can result in unexpected
scan, so cancel the request to avoid this.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-06-26 19:57:03 +03:00
Jouni Malinen 992189991c Start autoscan for first connection attempt
Use wpa_supplicant_set_state() to initialize state to DISCONNECT so that
autoscan gets initialized properly. This needs a change in
autoscan_init() to avoid extra scan request that would postpone the
first scan request when an interface is added.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-06-26 19:52:46 +03:00
Tomasz Bursztyka bc5d330ae0 Add ctrl iface command for autoscan
Signed-hostap: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2012-06-26 19:09:47 +03:00
Jithu Jance b9cfc09a81 P2P: Add preference setting for concurrent use cases
Add an additional parameter to prioritize either sta or p2p connection
to resolve conflicts arising during single channel concurrency.

Signed-hostap: Jithu Jance <jithu@broadcom.com>
2012-06-10 20:53:09 +03:00
Jouni Malinen 3bc462cb88 P2P: Add option for Provision Discovery before GO Negotiation
This is a workaround for interoperability issues with some deployed P2P
implementations that require a Provision Discovery exchange to be used
before GO Negotiation. The new provdisc parameter for the p2p_connect
command can be used to request this behavior without having to run a
separate p2p_prov_disc command.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-11 16:25:47 +03:00
Jouni Malinen 349493bd0c Validate WEP key lengths based on driver capabilities
The nl80211 driver interface does not allow 128-bit WEP to be used
without a vendor specific cipher suite and no such suite is defined for
this purpose. Do not accept WEP key length 16 for nl80211 driver
interface forn ow. wext-interface can still try to use these for
backwards compatibility.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-10 14:34:46 +03:00
Jouni Malinen 64855b9682 HS 2.0: Indicate Hotspot 2.0 in BSS table and status
If the AP indicates support for Hotspot 2.0, show this in the
ctrl_iface commands for BSS table and status.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-08 23:30:23 +03:00
Jay Katabathuni a8918e86b6 HS 2.0: Add Hotspot 2.0 station ctrl_iface
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-08 23:29:52 +03:00
Jay Katabathuni 25471fe3b9 HS 2.0: Add Hotspot 2.0 ANQP routines
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-08 23:29:40 +03:00
Jouni Malinen fea7c3a055 Ignore network blocks that have invalid WEP key length
Do not try to associate with a network that has an invalid or incomplete
configuration because the association or at least data connection would
fail anyway. This commits adds a common function for checking whether a
network block is disabled to make it easier to check network blocks
without having to reject them during configuration file parsing (which
would prevent wpa_supplicant from starting). The only additional check
added in this commit is to verify the WEP key length. Similar checks for
other parameters can be added in future commits.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-07 13:39:33 +03:00
Jouni Malinen d211881474 Fix D-Bus build without ctrl_iface
Commit 7de5688d68 started using
wpa_supplicant_ctrl_iface_ctrl_rsp_handle() from the D-Bus code, but
left this function in ctrl_iface.c that is included conditionally. Fix
this by moving the common function into wpa_supplicant.c so that it can
be included for builds that include only either ctrl_iface or D-Bus.

Signed-hostap: Jouni Malinen <j@w1.fi>
intended-for: hostap-1
2012-04-27 21:21:31 +03:00
Jouni Malinen 23c84252a4 P2P: Add option to force SSID/passphrase for GO Negotiation
An existing persistent group information can now be used to force GO
Negotiation to use the previously used SSID/passphrase from a persistent
group if we become a GO. This can be used as an alternative to inviting
a new P2P peer to join the group (i.e., use GO Negotiation with GO
intent 15 instead of starting an autonomous GO and using invitation),
e.g., in case a GO Negotiation Request is received from a peer while we
are not running as a GO. The persistent group to use for parameters is
indicated with persistent=<network id> parameter to p2p_connect.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-04-27 18:25:30 +03:00
Jouni Malinen 0918c4bf3b P2P: Add p2p_prov_disc auto mechanism
wpa_supplicant can now be requested to automatically figure out whether
the indicated peer is operating as a GO and if so, use join-a-group
style PD instead of pre-GO Negotiation PD.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-04-26 17:13:03 +03:00
Dmitry Shmidt 51a0c3d417 wpa_supplicant: Use bss_id list for 'bss FIRST' command
Command 'bss FISRT' should use bss_id list, because 'bss NEXT-N' is using
bss_id list as well.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-04-14 20:39:10 +03:00
Jouni Malinen b31be3a0fd P2P: Add automatic GO Negotiation vs. join-a-group selection
p2p_connect command can now be used with an optional "auto" parameter
to request wpa_supplicant to determine automatically whether to use
join-a-group operation (if the peer is operating as a GO) or group
formation. This makes it easier for external programs to handle
connection type selection by offloading this to wpa_supplicant. The
previously used p2p_connect join commands can be replaced with
p2p_connect auto to use this new mechanism.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-04-13 16:04:36 +03:00
Dmitry Shmidt eff1a95b97 Add RANGE=ALL|N1-N2 selection for ctrl_iface BSS command
Add ability to get information about several BSS's in one call.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-04-07 12:50:25 +03:00
Dmitry Shmidt 5f97dd1c57 Add MASK=0xH option for the ctrl_iface BSS command
This optional parameter to the BSS command can be used to select which
fields are included in the output to avoid having to parse through
unneeded information and to reduce the buffer size.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-04-07 12:50:25 +03:00
Dmitry Shmidt 61ce90857e Move ctrl_iface BSS command response generation into a separate function
This is in preparation for allowing multiple BSS entries to be fetched
with a single command.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-04-07 12:06:35 +03:00
Mukesh Agrawal c6e86b63d2 Create DBus getter/setter for ScanInterval
Enable control of wpa_s->scan_interval via D-Bus. This parameter
controls the delay between successive scans for a suitable AP.

Also, update dbus.doxygen with ScanInterval, and some other
parameters that were undocumented.

Signed-hostap: Mukesh Agrawal <quiche@chromium.org>
2012-04-01 18:05:22 +03:00
Jouni Malinen 83df814946 Clear previous BSSID on explicit disconnection request
There is no need to use reassociation instead of association in a case
the previous connection was explicitly disconnected.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-03-30 11:13:00 +03:00
Jouni Malinen 564865e1d4 Stop sched_scan if requested to run full scan
This allows the ctrl_iface SCAN command to be used to run through a scan
to collect full scan results when sched_scan is in progress. sched_scan
will be re-started automatically after the full scan.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-03-29 21:05:56 +03:00
Grzegorz Bajorski 28ef705d2d P2P: Filter input parameters in p2p_serv_disc_external
p2p_ctrl_serv_disc_external() can take only one parameters "0" or "1".

Signed-hostap: Grzegorz Bajorski <grzegorz.bajorski@tieto.com>
2012-03-05 16:26:19 +02:00
Jithu Jance e60b295186 Add wpa_supplicant AP mode STA deauthenticate/disassociate commands
Move disassociate and deauthenticate commands to ctrl_iface_ap.c, so
that they ares accessible for wpa_supplicant AP mode and wpa_cli (with
CONFIG_AP option enabled).

Signed-hostap: Jithu Jance <jithu@broadcom.com>
2012-02-25 17:22:48 +02:00
Jouni Malinen 1485ec076b Fix memory leak on error path in bssid_filter setting
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-19 14:28:02 +02:00
Jouni Malinen 6f3bc72be0 P2P: Allow channels to be removed from P2P use
A list of disallowed frequencies for P2P channel list can now be
configured with P2P_SET disallow_freq. The frequencies (or frequency
pairs) are comma separated. For example:
wpa_cli p2p_set disallow_freq 2462,5000-6000

The allowed P2P channel list is constructed by removing explicitly
disallowed channels from the channel list received from the driver.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-17 22:57:13 +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 d445a5cd8e Add BSSID filter for testing purposes
wpa_supplicant can now be configured to filter out scan results based
on a BSSID filter. Space-separated set of allowed BSSIDs can be set
with wpa_cli set bssid_filter command. Filtering mechanism can be
disabled by setting this variable to an empty list. When set, only
the BSSes that have a matching entry in this list will be accepted
from scan results.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-16 16:30:13 +02:00
Jouni Malinen b2ff168128 Allow legacy PS param to be set with SET in addition to P2P_SET
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-16 16:29:19 +02:00
Jouni Malinen aa074a6485 Allow U-APSD parameters to be configured with SET command
This can be used in non-P2P case to set U-APSD parameters for a
station mode association.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-16 16:28:31 +02:00
Jouni Malinen 84c78f9570 Allow ENABLE_NETWORK to avoid automatic connection
Extra parameter "no-connect" can now be added to the ENABLE_NETWORK
ctrl_iface command to avoid automatic connection to the enabled
network.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-16 16:27:41 +02:00
Jouni Malinen 8b9d0bfa00 Add mechanism for disabling radio for testing purposes
"wpa_cli set radio_disabled 1/0" can be used to disable/enable
radio to simulate out-of-radio-range condition in a testbed
device.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-16 16:26:44 +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