aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
Commit message (Collapse)AuthorAgeFilesLines
* FST: Send FST Action frame for processing (wpa_supplicant)Anton Nayshtut2015-07-161-0/+8
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* FST: Integration into wpa_supplicantAnton Nayshtut2015-07-161-0/+13
| | | | | | This commit integrates the FST into the wpa_supplicant. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Send CTRL-EVENT-NETWORK-NOT-FOUND if no suitable network was foundDmitry Shmidt2015-06-271-0/+3
| | | | | | | | This provides more information to upper layer programs on what happens with connection attempts in cases where the enabled networks are not found in scan results. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* Do not check unsigned size is less than zeroJouni Malinen2015-06-231-1/+1
| | | | | | | The variables here are unsigned and as such, cannot have a negative value. Use == 0 instead of <= 0 to make this cleaner. Signed-off-by: Jouni Malinen <j@w1.fi>
* P2P: Handle P2P Device dedicated interface parent removalIlan Peer2015-06-191-0/+30
| | | | | | | | | | | | | | | | | In case of a network interface removal, check if the interface was also the parent interface of the P2P Device dedicated interface. If this is the case, then stop the P2P Device functionality, and remove the P2P Device dedicated interface. In case that the interface is added again and P2P Device functionality can be enabled again, add a new P2P Device dedicated interface and allow further P2P Device functionality. In case that the P2P Device dedicated interface is re-created, the original P2P Device configuration file is needed, so store it in the global params (instead in the wpa_interface configuration). Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* P2P: Add rx_freq parameter to Probe Request frame handlerMax Stepanov2015-06-141-0/+2
| | | | | | | | | | | In some cases, Probe Request frames can be received by a peer not only on a listen channel. In this case an additional rx_freq parameter explitly contains a Probe Request frame RX frequency. In case rx_freq is set to 0, a Probe Request frame RX channel is assumed to be our own listen channel (p2p->cfg->channel). Signed-off-by: Max Stepanov <Max.Stepanov@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com>
* D-Bus: Add WPS pbc-overlap EventAvichal Agarwal2015-06-101-0/+1
| | | | | | | This sends an Event D-Bus signal with name "pbc-overlap" for WPS-EVENT-OVERLAP. Signed-off-by: Avichal Agarwal <avichal.a@samsung.com>
* Replace MAX_SSID_LEN with SSID_MAX_LENJouni Malinen2015-04-221-1/+1
| | | | | | | | This makes source code more consistent. The use within Android driver interface is left as-is to avoid changes in the old PNO interface definition. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Reschedule scan from wpas_stop_pno if it was postponedDmitry Shmidt2015-04-011-0/+4
| | | | | | | | This reschedules the postponed scan request (if such a request is pending) from EVENT_SCHED_SCAN_STOPPED event handler to speed up scanning after PNO/sched_scan stop has been requested. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* Add support for CONFIG_NO_ROAMING to MakefileLauri Hintsala2015-03-291-0/+2
| | | | | | | | | | Commit e9af53ad39a19264bf5307a1b5923afc2b2f9b06 introduced new CONFIG_NO_ROAMING configuration parameter but unfortunately it was added only to Android.mk. Enabling this parameter didn't have any effect when Makefile was used to build wpa_supplicant. This commit fixes that problem and cleans "unused variable" compiler warning. Signed-off-by: Lauri Hintsala <lauri.hintsala@silabs.com>
* Allow PSK/passphrase to be set only when neededJouni Malinen2015-03-281-2/+22
| | | | | | | | | | | | | | | | | | | | | The new network profile parameter mem_only_psk=1 can be used to specify that the PSK/passphrase for that network is requested over the control interface (ctrl_iface or D-Bus) similarly to the EAP network parameter requests. The PSK/passphrase can then be configured temporarily in a way that prevents it from getting stored to the configuration file. For example: Event: CTRL-REQ-PSK_PASSPHRASE-0:PSK or passphrase needed for SSID test-wpa2-psk Response: CTRL-RSP-PSK_PASSPHRASE-0:"qwertyuiop" Note: The response value uses the same encoding as the psk network profile parameter, i.e., passphrase is within double quotation marks. Signed-off-by: Jouni Malinen <j@w1.fi>
* nl80211: Allow driver-based roam to change ESSKrishna Vamsi2015-03-241-1/+22
| | | | | | | This extends NL80211_CMD_ROAM event processing to allow the driver to roam to another ESS (different SSID) when using offloaded BSS selection. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Delay AP selection if all networks are temporarily disabledAvraham Stern2015-03-221-0/+66
| | | | | | | | | | If all networks are temporarily disabled, delay AP selection until at least one network is enabled. Running AP selection when all networks are disabled is useless as wpa_supplicant will not try to connect. In addition, it will result in needless scan iterations that may delay the connection when it is needed. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* Restart sched_scan on channel list changeVictor Goldenshtein2015-03-201-0/+8
| | | | | | | | | | | | | The channel list can be changed as a result of arriving beacon hints during normal scan or as a result of local Reg-Domain change. Some passive channels can become active and needs to be reconfigured accordingly for the scheduled scan. This fixes the connection to hidden SSIDs on 5 GHz band during default Reg-Domain 00 (world roaming). Signed-off-by: Victor Goldenshtein <victorg@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com>
* Make rate-not-supported debug print more usefulJouni Malinen2015-03-071-3/+4
| | | | | | | | | It looks like "hardware does not support required rate 1.0 Mbps" has started showing up in some hwsim test cases as a reason for failure. This should not really occur with mac80211_hwsim, so add more details to the debug print to make it easier to figure out what exactly happened. Signed-off-by: Jouni Malinen <j@w1.fi>
* TDLS: Allow driver to request TDLS Discovery Request initiationSunil Dutt2015-03-061-0/+4
| | | | | | | | This extends the TDLS operation request mechanism to allow TDLS Discovery Request to be initiated by the driver similarly to the existing Setup and Teardown requests. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DFS: wpa_supplicant event processingAhmad Kholaif2015-03-051-0/+23
| | | | | | | | Add radar event processing logic for AP/P2P GO. The DFS processing functions from hostapd are now used for these wpa_supplicant cases as well for both offloaded and non-offloaded DFS. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Do not add blacklist entries based on normal disconnect request casesJouni Malinen2015-03-011-0/+3
| | | | | | | | | | There are number of cases where wpa_supplicant requests the current connection to be disconnected before starting a new operation. Such cases do not really indicate that there was an error in connecting or a disconnection initiated by the AP, so do not add a temporary blacklist entry in such sequences. Signed-off-by: Jouni Malinen <j@w1.fi>
* P2P: Do not allow scan or normal association on cfg80211 P2P DeviceJouni Malinen2015-03-011-0/+3
| | | | | | | | | | The dedicated P2P management instance (wpas->p2p_mgmt == 1) using cfg80211 P2P Device cannot be used for non-P2P uses or connection (there is no netdev). Reject or ignore such operations to avoid unexpected operations if enabled network blocks are configured in the wpa_supplicant instance used to control this interface. Signed-off-by: Jouni Malinen <j@w1.fi>
* Use estimated throughput to improve roaming selectionJouni Malinen2015-02-221-4/+14
| | | | | | | | | | | | | | Previously, within-ESS roaming was skipped if the selected BSS did not have a higher signal strength than the current BSS regardless of AP capabilities. This could result in not moving to a BSS that would provide higher throughput, e.g., due to larger channel bandwidth or higher rates (HT/VHT MCS). Use estimated throughput information from scan result processing to allow within-ESS roaming if the selected BSS is likely to provide better throughput even if the current BSS has larger RSSI. Signed-off-by: Jouni Malinen <j@w1.fi>
* Update current BSS level when signal change event occursMatthieu Mauger2015-02-211-0/+2
| | | | | | | | | | | | | | | When an EVENT_SIGNAL_CHANGE occurs the bgscan is informed about this change but the new RSSI value is not stored. In consequence, when roaming candidates are evaluated, the RSSI value of the current BSS used to compare is an old one obtained during the last scan rather than the new one given by the signal change event. This leads sometimes to bad decision when selecting a new BSS for roaming. This patch solves the issue by updating the current BSS level when receiving a signal change event in order to have a very up-to-date current signal value when choosing an new BSS. Signed-off-by: Matthieu Mauger <matthieux.mauger@intel.com>
* wpa_supplicant: Cancel sched_scan when stopping countermeasuresIlan Peer2015-02-211-0/+9
| | | | | | | | | | When stopping the TKIP countermeasures, it would be preferable to connect immediately. However if scheduled scan is in progress, a connection attempt will be done only when scan results are received, so cancel the scheduled scan to allow immediate scan and connection attempt. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* P2P: Fix P2P_CONNECT-auto fallback to GO Neg with group interfaceJouni Malinen2015-02-081-6/+23
| | | | | | | | | | | | | | | | | | | If a separate P2P group interface was used, P2P_CONNECT-auto fallback to GO Negotiation could result in use of freed memory and segmentation fault. This happened in cases where the peer GO was found in some old scans, but not in the first scan triggered by the P2P_CONNECT-auto command ("P2P: Peer was found running GO in older scan -> try to join the group" shows up in the debug log). In addition, the GO would still need to reply to PD Request to allow this code path to be triggered. When five scans for the GO were completed in this sequence, the P2P group interface was removed as part of falling back to GO Negotiation. However, that ended up dereferencing the freed wpa_s instance at the end of scan event processing. Fix this by reordering code a bit and breaking out from EVENT_SCAN_RESULTS processing if the interface could have been removed. Signed-off-by: Jouni Malinen <j@w1.fi>
* Simplify eapol_sm_notify_pmkid_attempt()Jouni Malinen2015-01-281-1/+1
| | | | | | | | Drop the unneeded 'attempt' argument. This was originally used for indicating an aborted PMKID caching attempt, but a fix in 2006 removed the only such user and since that time, only attempt == 1 has been used. Signed-off-by: Jouni Malinen <j@w1.fi>
* Ignore pmf=1 default if driver does not support PMFJouni Malinen2015-01-271-2/+1
| | | | | | | | | | | Connection with a PMF enabled AP will fail if we try to negotiate PMF while the local driver does not support this. Since pmf=1 does not require PMF for a successful connection, it can be ignored in such a case to avoid connectivity issues with invalid configuration. This makes it somewhat easier to allow upper layer programs to use pmf=1 default regardless of driver capabilities. Signed-off-by: Jouni Malinen <j@w1.fi>
* Preparations for variable length KCK and KEKJouni Malinen2015-01-261-2/+4
| | | | | | | | This modifies struct wpa_ptk to allow the length of KCK and KEK to be stored. This is needed to allow longer keys to be used, e.g., with Suite B 192-bit level. Signed-off-by: Jouni Malinen <j@w1.fi>
* Move external_scan_running to wpa_radioBen Rosenfeld2015-01-191-5/+5
| | | | | | | | external_scan_running should be common to all interfaces that share a radio. This fixes a case where external_scan_running was set on a single interface, but did not block scan on other interfaces. Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
* Add address masks to BSSID listsStefan Tomanek2015-01-101-2/+15
| | | | | | | | | | | | In many applications it is useful not just to enumerate a group of well known access points, but to use a address/mask notation to match an entire set of addresses (ca:ff:ee:00:00:00/ff:ff:ff:00:00:00). This change expands the data structures used by MAC lists to include a mask indicating the significant (non-masked) portions of an address and extends the list parser to recognize mask suffixes. Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
* Add network specific BSSID black and white listsStefan Tomanek2015-01-101-0/+32
| | | | | | | | | | | | This change adds the configuration options "bssid_whitelist" and "bssid_blacklist" used to limit the AP selection of a network to a specified (finite) set or discard certain APs. This can be useful for environments where multiple networks operate using the same SSID and roaming between those is not desired. It is also useful to ignore a faulty or otherwise unwanted AP. Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
* Handle interface disabled/enabled more consistentlyJouni Malinen2015-01-081-0/+10
| | | | | | | | | | | | | It was possible for the interface not to be marked in INTERFACE_DISABLED state in case the event was processed for P2P GO because the wpa_s instance could have been removed in case of a separate group interface. Change the state first to avoid leaving different state for the case where separate group interface is not used. Mark scan to be a normal scan on INTERFACE_ENABLED so that scanning rules (e.g., skip scan if no networks enabled) get used consistently. Signed-off-by: Jouni Malinen <j@w1.fi>
* P2P: Indicate reason=UNAVAILABLE for group netdev going downJouni Malinen2015-01-081-1/+5
| | | | | | | | | | There is a race condition between receiving an AP stopped event and netdev down event. These resulted in different group removal reasons on a GO device (UNAVAILABLE for stop AP event coming first and REQUESTED for netdev event first). Make this more consistent by reporting UNAVAILABLE for both possible cases. Signed-off-by: Jouni Malinen <j@w1.fi>
* WMM AC: Reconfigure tspecs on reassociation to the same BSSEliad Peller2015-01-041-0/+3
| | | | | | | | | | | The specification requires the tspecs to be kept upon reassociation to the same BSS. Save the last tspecs before such reassociation, and reconfigure on the association notification. Note that the current flow is not transparent to the user (it is notified about deauth/reassoc and tspec removal/addition). Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
* WMM AC: Delete tspecs on roamingEliad Peller2015-01-041-2/+0
| | | | | | | | | | In case of roaming, we don't get disassoc notification, but still want to remove the existing tspecs. Move the wmm_ac_notify_disassoc() call to the state change function, which get called also on roaming. Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
* SAE: Clear keys from memory on disassociationJouni Malinen2014-12-291-9/+1
| | | | | | | | There is no need to keep temporary keys in memory beyond the end of the association, so explicitly clear any SAE buffers that can contain keys as soon as such keys are not needed. Signed-off-by: Jouni Malinen <j@w1.fi>
* Ignore auth/assoc timeout events in mesh configurationJouni Malinen2014-11-301-0/+14
| | | | | | | | | | | | | It was possible for auth/assoc timeout/failure event from the driver to result in unexpected processing during mesh group setup if that operation was started before the previously started driver operation to association/connect had completed. Since those events cannot happen in mesh cases, ignore them to avoid issues due to this corner case. For example, monitor_iface_unknown_sta followed by wpas_mesh_secure test case resulted in failure without this change. Signed-off-by: Jouni Malinen <j@w1.fi>
* wpa_supplicant: Handle link measurement requestsAndrei Otcheretianski2014-11-221-2/+12
| | | | | | | | Send link measurement response when a request is received. Advertise only RCPI, computing it from the RSSI of the request. The TX power field is left to be filled by the driver. All other fields are not published. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
* wpa_supplicant: Add support for Neighbor ReportAssaf Krauss2014-11-221-0/+6
| | | | | | | Add the ability to send a Neighbor Report Request (part of RRM). Requester is then notified once the report arrives. Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
* SME: Add RRM support to association requestAssaf Krauss2014-11-221-0/+2
| | | | | | | | | | | In case the AP we are associating with advertises support for RRM, advertise our own RRM support in the (Re)Association Request frame. This is done by adding an RRM Capabilities IE. The underlying driver is expected to further add a Power Capabilities IE to the request, and set the Radio Measurement flag in the Capability Info field. At this point the RRM Capabilities IE advertises no measurement support. Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
* WNM: Use recent scan results on BSS transition requestJouni Malinen2014-11-221-1/+1
| | | | | | | | | If the last scans are recent (for now, less than ten seconds old), use them instead of triggering a new scan when a BSS Transition Management Request frame is received. As a fallback, allow a new scan to be triggered if no matches were found. Signed-off-by: Jouni Malinen <j@w1.fi>
* WNM: Move transition candidate list processing to normal scanJouni Malinen2014-11-221-0/+3
| | | | | | This makes it easier to optimize transition request processing. Signed-off-by: Jouni Malinen <j@w1.fi>
* WMM AC: Handle TSPEC action framesMoshe Benji2014-11-161-0/+5
| | | | | | | | Add the TSPEC to the driver on successful TSPEC ADDTS response. Delete the TSPEC when receiving DELTS action. Signed-off-by: Moshe Benji <moshe.benji@intel.com> Signed-off-by: Eliad Peller <eliad@wizery.com>
* WMM AC: Parse WMM IE on associationMoshe Benji2014-11-161-0/+9
| | | | | | | | | Initialize WMM AC data structures upon successful association with an AP that publishes WMM support, and deinitialize the data structure when the association is no longer valid. Signed-off-by: Moshe Benji <moshe.benji@intel.com> Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
* mesh: Fix segmentation fault by repeating MESH_GROUP_ADD/REMOVEMasashi Honma2014-11-161-0/+4
| | | | | Signed-off-by: Natsuki Itaya <Natsuki.Itaya@jp.sony.com> Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* mesh: Add mesh mode config optionThomas Pedersen2014-10-251-1/+2
| | | | | | | | | Modify network mode to support mode number 5 when CONFIG_MESH is enabled. Signed-off-by: Javier Lopez <jlopex@gmail.com> Signed-off-by: Jason Mobarak <x@jason.mobarak.name> Signed-off-by: Thomas Pedersen <thomas@noack.us>
* mesh: Avoid join if already joined a mesh groupThomas Pedersen2014-10-251-0/+7
| | | | | Signed-off-by: Javier Lopez <jlopex@gmail.com> Signed-off-by: Thomas Pedersen <thomas@noack.us>
* mesh: Add mesh peering managerBob Copeland2014-10-251-1/+11
| | | | | | | | | | | | | | | The mesh peering manager establishes and maintains links among mesh peers, tracking each peer link via a finite state machine. This implementation supports open mesh peerings. [assorted fixes from Yu Niiro <yu.niiro@gmail.com>] [more fixes from Masashi Honma <masashi.honma@gmail.com>] Signed-off-by: Javier Lopez <jlopex@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: Ashok Nagarajan <ashok.dragon@gmail.com> Signed-off-by: Jason Mobarak <x@jason.mobarak.name> Signed-hostap: Bob Copeland <me@bobcopeland.com>
* mesh: Add mesh mode routinesThomas Pedersen2014-10-251-0/+6
| | | | | | | | | | Add routines to (de)initialize mesh interface data structures and join and leave mesh networks. Signed-off-by: Javier Lopez <jlopex@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: Jason Mobarak <x@jason.mobarak.name> Signed-off-by: Thomas Pedersen <thomas@noack.us>
* Add support for offloading key management operations to the driverChet Lanctot2014-10-231-0/+20
| | | | | | | | | This commit introduces a QCA vendor command and event to provide an option to use extended versions of the nl80211 connect/roam operations in a way that allows drivers to offload key management operations to the driver/firmware. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Fix CONFIG_NO_SCAN_PROCESSING=y buildJouni Malinen2014-10-121-36/+0
| | | | | | ht_supported() was used but not defined in such a case. Signed-off-by: Jouni Malinen <j@w1.fi>
* wpa_supplicant: Enable HT for IBSSJanusz Dziedzic2014-10-041-2/+2
| | | | | | Enable HT20 for IBSS when HT is supported by the driver. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>