aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
Commit message (Collapse)AuthorAgeFilesLines
* Allow external programs to request wpa_radio work itemsJouni Malinen2014-01-076-3/+280
| | | | | | | | | | | | The new control interface command RADIO_WORK can be used by external programs to request radio allocation slots from wpa_supplicant if exclusive radio control is needed, e.g., for offchannel operations. If such operations are done directly to the driver, wpa_supplicant may not have enough information to avoid conflicting operations. This new command can be used to provide enough information and radio scheduling to avoid issues with such cases. Signed-hostap: Jouni Malinen <j@w1.fi>
* Do not start wpa_radio work during externally triggered scanJouni Malinen2014-01-074-12/+11
| | | | | | | | | | If an external program triggers a scan, wpa_supplicant does not have a wpa_radio work item for this operation to protect against other offchannel operations. This can result in operations failing, so try to avoid damage by not starting any new wpa_radio work items during a scan that was started by another process. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove unneeded scan delay on connection-in-progressJouni Malinen2014-01-073-38/+1
| | | | | | | | This type of protection against concurrent connection and scan operations is now enforced through the wpa_radio work mechanism, so this separate protection mechanism is not needed anymore. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove unneeded GAS query delay on connection-in-progressJouni Malinen2014-01-071-38/+16
| | | | | | | | This type of protection against concurrent connection and offchannel GAS operations is now enforced through the wpa_radio work mechanism, so this separate protection mechanism is not needed anymore. Signed-hostap: Jouni Malinen <j@w1.fi>
* Use wpa_radio work for connectionJouni Malinen2014-01-073-16/+184
| | | | | | | | This protects against conflicting offchannel operations during connection (authentication, association, EAP exchanges, 4-way handshake). Signed-hostap: Jouni Malinen <j@w1.fi>
* Use radio work for GAS requestsJouni Malinen2014-01-073-29/+46
| | | | | | | | | Avoid concurrent GAS operations with any other exclusive use of the radio by using the radio work queuing mechanism. This replaces some of the earlier constraints on concurrent operations with the more generic wpa_radio work concept. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Use radio work to protect offchannel Action frame exchangesJouni Malinen2014-01-072-0/+135
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Use radio work for P2P Listen requestsJouni Malinen2014-01-072-12/+88
| | | | | | | | | Avoid concurrent P2P Listen operations with any other exclusive use of the radio by using the radio work queuing mechanism. This removes some of the earlier workarounds that postponed scans depending on other operations. Signed-hostap: Jouni Malinen <j@w1.fi>
* Use radio work for P2P scan requestsJouni Malinen2014-01-056-128/+97
| | | | | | | | | Avoid concurrent P2P scan requests with any other exclusive use of the radio by using the radio work queuing mechanism. This removes some of the earlier workarounds that postponed scans depending on other operations. Signed-hostap: Jouni Malinen <j@w1.fi>
* Use radio work for scan requestsJouni Malinen2014-01-054-42/+95
| | | | | | | Avoid concurrent scan requests by using the radio work queuing mechanism. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add framework for exclusive radio operationsJouni Malinen2014-01-053-6/+177
| | | | | | | | | | | | | | The new radio work item concept can be used to request time for an operation that requires exclusive radio control, e.g., a scan. Once the radio is available, the registered callback function will be called. radio_work_done() must be called once the exclusive radio operation has been completed, so that the radio is freed for other operations. The special case of deinit=1 is used to free the context data during interface removal. That does not allow the callback function to start the radio operation, i.e., it needs to free the allocated resources and return. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add helper functions for cloning and freeing scan parametersJouni Malinen2014-01-052-2/+84
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Ignore externally triggered scan results with scan_res_handlerJouni Malinen2014-01-051-1/+2
| | | | | | | | | wpa_s->scan_res_handler is set only for cases where a scan operation is requested for a specific purpose. As such, this callback should only be called when a scan result from a scan that was triggered by wpa_supplicant is processed. Signed-hostap: Jouni Malinen <j@w1.fi>
* Clean up ctrl_iface debug prints for monitor eventsJouni Malinen2014-01-051-21/+29
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Use cleaner debug print for ctrl_iface commands with private infoJouni Malinen2014-01-051-5/+14
| | | | | | | Convert this to a text string instead of ASCII hexdump to make the debug log more convenient to use. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove duplicated RX ctrl_iface hexdumpJouni Malinen2014-01-051-2/+0
| | | | | | | | | The newer wpa_dbg() print includes the same information in a more convenient form, so remove the duplicate RX ctrl_iface hexdump in the cases where there is no key material in the control interface commands (the possible-key-material case is still using wpa_hexdump_ascii_key). Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix scan-cache-clearing operation to avoid unnecessary casesJouni Malinen2014-01-031-1/+1
| | | | | | | | wpa_drv_scan() success case was supposed to clear wpa_s->clear_driver_scan_cache, not params->only_new_results (which would do nothing here). Signed-hostap: Jouni Malinen <j@w1.fi>
* Avoid unnecessary key clearing operationsJouni Malinen2014-01-024-27/+26
| | | | | | | | Track set_key operations per-key index and clear keys on disconnection only if the key was set (or may have been set which is the case for the first operation after wpa_supplicant start). Signed-hostap: Jouni Malinen <j@w1.fi>
* Ask driver to report only new scan results if requestedJouni Malinen2014-01-024-0/+16
| | | | | | | | | | | | | | | | | If the BSS table within wpa_supplicant is flushed, request the driver to flush its own scan result table during the next scan. This can avoid unexpected old BSS entries showing up after BSS_FLUSH or FLUSH command in cases where the driver may maintain its internal cache of scan results (e.g., cfg80211 BSS table persists at least for 15 seconds). In addition to doing this automatically on BSS_FLUSH/FLUSH, a new SCAN command argument, only_new=1, can be used to request a manual scan request to do same. Though, it should be noted that this maintains the BSS table within wpa_supplicant. BSS_FLUSH followed by SCAN command can be used to clear all BSS entries from both the driver and wpa_supplicant. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove forgotten notes about already removed driver wrappersJouni Malinen2014-01-022-114/+0
| | | | | | | | These old driver wrappers have been removed quite some time ago, but some of the build configuration notes were still describing how they are configured. Signed-hostap: Jouni Malinen <j@w1.fi>
* Update EAP-FAST note regarding OpenSSL supportJouni Malinen2014-01-021-4/+3
| | | | | | This is now supported in the current OpenSSL version. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Fix clear-from-timeout handling to avoid race conditionJouni Malinen2014-01-011-0/+4
| | | | | | | | | | The 100 ms timeout to clear WPS state after EAP-Failure has been received worked otherwise fine, but it opened a race condition on another WPS operation starting within that wait. If that happens, the timeout will cancel that new operation unexpectedly. Fix this by cancelling the timeout from wpas_clear_wps(). Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Send received Presence Response information to ctrl_iface monitorsJouni Malinen2014-01-013-5/+39
| | | | | | | | | The P2P_PRESENCE_REQ command did not give any easily available indication of the response received from the GO. Make this more useful by providing such response (if received) as a ctrl_iface monitor event (P2P-PRESENCE-RESPONSE). Signed-hostap: Jouni Malinen <j@w1.fi>
* Mark wpas_wps_er_nfc_handover_sel() staticJouni Malinen2013-12-311-2/+3
| | | | | | This is not used outside wps_supplicant.c. Signed-hostap: Jouni Malinen <j@w1.fi>
* Declare wpa_debug_* variables in src/utils/wpa_debug.hJouni Malinen2013-12-319-29/+0
| | | | | | | | | These were somewhat more hidden to avoid direct use, but there are now numerous places where these are needed and more justification to make the extern int declarations available from wpa_debug.h. In addition, this avoids some warnings from sparse. Signed-hostap: Jouni Malinen <j@w1.fi>
* Declare wpa_drivers in src/drivers/driver.hJouni Malinen2013-12-314-7/+0
| | | | | | This avoids some warnings from sparse. Signed-hostap: Jouni Malinen <j@w1.fi>
* Clear EAPOL Logoff state on FLUSH commandJouni Malinen2013-12-311-0/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Get rid of duplicated cipher suite and AKM definitionsJouni Malinen2013-12-314-42/+11
| | | | | | | | | | | | | WPA_CIPHER_* and CIPHER_* are used for the exact same set of cipher suites with the main difference being that the WPA_CIPHER_* version is suitable to be used as a bitfield. Similarly, WPA_KEY_MGMT_* and KEY_MGMT_* have similar design for AKMs. There is no need to maintain two separate copies of the definitions since the bitfield compatible version can be used for both needs. Get rid of the CIPHER_* and KEY_MGMT_* versions to clean up the implementation by getting rid of unnecessary mapping functions. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Clean up UUID debug printJouni Malinen2013-12-301-7/+9
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Interworking: Allow cred blocks not to be saved to a fileJouni Malinen2013-12-305-0/+18
| | | | | | | | | | | The new cred block parameter 'temporary' can be used to indicate that a cred block is not to be saved to wpa_supplicant configuration file (e.g., "SET_CRED 0 temporary 1"). This is similar to the concept of temporary network blocks and allows cred blocks to be managed outside the wpa_supplicant config file when other parameters are still saved to the file written by wpa_supplicant. Signed-hostap: Jouni Malinen <j@w1.fi>
* Reset WPA parameters to default values on FLUSH commandJouni Malinen2013-12-291-0/+4
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Remove WPA_DRIVER_FLAGS_P2P_MGMT optionJouni Malinen2013-12-294-317/+17
| | | | | | | | | | | | | The option of handling upper layer P2P management operations within the driver/firmware was originally planned to be used with wpa_supplicant, but this has not really happened and there is no clear sign of this being needed in the near term either. This functionality has not been completed and it is certainly not being kept up-to-date or tested. As such, it is best to remove it for now and if this or something similar is needed in the future, it can be brought back once a clear need for it has been demonstrated first. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Use shorter scan interval during pre-provisioning searchJouni Malinen2013-12-291-1/+1
| | | | | | | | Previously, the shorter scan interval was already in use for the connection following the provisioning step, but same optimization can also be used for the pre-provisioning scan. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Replace wpas_wps_in_progress with identical wpas_wps_searchingJouni Malinen2013-12-293-15/+1
| | | | | | | There is no point in maintaining two different functions that do practically the same check of WPS state. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove unnecessary EVENT_RX_ACTIONJouni Malinen2013-12-293-91/+104
| | | | | | | | | | | | This driver event was used separately for some Action frames, but all the driver wrappers converted to this from information that would have been enough to indicate an EVENT_RX_MGMT event. In addition, the received event was then converted back to a full IEEE 802.11 management frame for processing in most cases. This is unnecessary complexity, so get rid of the extra path and use EVENT_RX_MGMT for Action frames as well as other management frame subtypes. Signed-hostap: Jouni Malinen <j@w1.fi>
* Make local UUID available through ctrl_iface STATUS commandJouni Malinen2013-12-291-0/+12
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Clear wps_fragment_size on FLUSH commandJouni Malinen2013-12-291-0/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix PeerKey 4-way handshakeJouni Malinen2013-12-281-0/+10
| | | | | | | | | | | The earlier changes to buffer EAPOL frames when not associated to avoid race conditions (especially commit 3ab35a660364dc68eaebfc0df6130071bbee6be5 but maybe something even before that) broke PeerKey 4-way handshake. Fix this by using a separate check before the race condition workaround to process PeerKey 4-way handshake EAPOL-Key messages differently. Signed-hostap: Jouni Malinen <j@w1.fi>
* WNM: Add Target BSSID into BSS Transition Management ResponseJouni Malinen2013-12-271-1/+9
| | | | | | | P802.11-REVmc clarifies that the Target BSSID field is always present hen status code is zero, so match that requirement. Signed-hostap: Jouni Malinen <j@w1.fi>
* WNM: Use nonzero dialog token in BSS Transition Management QueryJouni Malinen2013-12-271-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* WNM: Add debug logs to get the RSSI from the scan resultsSudha Daram2013-12-261-0/+12
| | | | | | | | This commit adds few more debug prints to log the RSSI information from the scanned BSSIDs and the current connected BSSID when comparing neighbor results during WNM Transition Management Request processing. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Remove old duplicate network even if key is differentJouni Malinen2013-12-261-25/+0
| | | | | | | | | | | | Previously, WPS credential provisioning removed duplicated network entries only if they had identicical SSID, security parameters, and the keys. However, it is possible that the AP has changes its keys and leaving the old entry behind can result in connectibity issues (e.g., with 4-way handshake failing due to use of the old PSK). Fix this by allowing the old network entry to be removed even if the keys (passphrase, PSK, WEP keys) are different. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Make CONFIG_TESTING_OPTIONS=y enable all testing optionsJouni Malinen2013-12-262-2/+8
| | | | | | | This makes it easier to enable various testing parameters and functionality in build configuration. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Reduce scan wait time during WPS processingJouni Malinen2013-12-262-1/+12
| | | | | | | | Since the AP is expected to be available, there is no need to wait for the full five second wait between scans during WPS connection. This speeds up cases where the first scan misses the AP for some reason. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Do not use results from externally requested scan for network selectionJouni Malinen2013-12-261-0/+6
| | | | | | | | | | | It may not always be desirable to trigger reassociation or network change based on scan results from externally to wpa_supplicant trigger scan operations. Skip network selection and roaming determination if the received scan result is known to be triggered by something external to wpa_supplicant. The control interface SCAN command can be used to request wpa_supplicant to determine the best network. Signed-hostap: Jouni Malinen <j@w1.fi>
* Reschedule own scan request if an externally started one is in progressJouni Malinen2013-12-261-0/+11
| | | | | | | | This avoids some unnecessary attempts to request the driver to start a scan while it is still busy with the scan operation that was started by an external program. Signed-hostap: Jouni Malinen <j@w1.fi>
* Show timing information about scan requests in debug logJouni Malinen2013-12-262-2/+17
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Optional scan id for ctrl_iface SCAN requestsJouni Malinen2013-12-264-3/+44
| | | | | | | | | | | | | | This allows users of wpa_supplicant control interface to figure out when their specific scan command has been started and completed. For example: CTRL-EVENT-SCAN-STARTED > scan freq=2412,2417 passive=1 use_id=1 3 CTRL-EVENT-SCAN-RESULTS CTRL-EVENT-SCAN-STARTED id=3 CTRL-EVENT-SCAN-RESULTS id=3 Signed-hostap: Jouni Malinen <j@w1.fi>
* Track whether scan was started by us or an external programJouni Malinen2013-12-264-1/+22
| | | | | | | This can be used to improve scan behavior in cases external programs request scans directly from the driver. Signed-hostap: Jouni Malinen <j@w1.fi>
* Allow passive scan to be requested with SCAN passive=1Jouni Malinen2013-12-263-0/+10
| | | | | | | This allows external programs to request wpa_supplicant to execute a passive scan (i.e., do not send any Probe Request frames). Signed-hostap: Jouni Malinen <j@w1.fi>