path: root/wpa_supplicant
Commit message (Collapse)AuthorAgeFilesLines
* Sync manpages and command-line optionsDan Winship2014-01-212-4/+78
| | | | Signed-hostap: Dan Williams <dcbw@redhat.com>
* Add manpage for eapol_testDan Williams2014-01-212-1/+207
| | | | Signed-hostap: Dan Williams <dcbw@redhat.com>
* wpa_supplicant: Fix usage text based on build optionsDan Williams2014-01-211-3/+14
| | | | Signed-hostap: Dan Williams <dcbw@redhat.com>
* Skip normal scan when PNO is already in progressRaja Mani2014-01-212-0/+6
| | | | | | | | | | | | | | | | | | | Scan request failures are observed in wpa_supplicant debug log when Android framework starts PNO scan in driver via ctrl interface command 'set pno 1' and wpa_supplicant also tries to issue a scan request after PNO has started in the driver. Some drivers may reject a normal scan request when PNO is already in progress. wpa_supplicant should consider PNO status before issuing start scan request to the driver. Otherwise, wpa_supplicant will get failures from driver for the scan request and it will end up rescheduling scan request in periodic interval and get a start scan request failure for each attempt. In order to avoid unnecessary scan attempt when PNO scan is already running, PNO status is checked before issuing scan request to driver. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Extend the listen time based on the active concurrent sessionRashmi Ramanna2014-01-201-0/+16
| | | | | | | | | | A P2P Device while in the Listen state waiting to respond for the obtained group negotiation request shall give a fair chance for other concurrent sessions to use the shared radio by inducing an idle time between the successive listen states. However, if there are no concurrent operations, this idle time can be reduced. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Add missing direct global ctrl_iface commands for P2PDmitry Shmidt2014-01-171-0/+8
| | | | | | | | | | | It should be noted that these commands are not exclusively used for P2P or in the global context, so use of these commands through the global control interface for operations that are specific to a single interface have undefined behavior and that behavior may change in the future. As such, these are recommend only for operations that are in the global context (e.g., for P2P management). Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* P2P: Use GO's operating channel to optimize scan during joinJithu Jance2014-01-171-0/+12
| | | | | | | Use P2P GO's operating channel information, if known, to do a single channel scan during the join operation. Signed-hostap: Jithu Jance <jithu@broadcom.com>
* Use minimal scan delay upon EVENT_INTERFACE_ADDEDArend van Spriel2014-01-172-1/+4
| | | | | | | | | | | | | | This patch resets the static interface_count to zero in case of wpa_supplicant_driver_init() call for wpa_s which is in INTERFACE_DISABLED state. This interface_count is used for the delay of the scan which is now minimal for dynamically added interfaces. This may collide with a scan for another interface, but the same is true for any chosen delay in this scenario. Also the state change to DISCONNECTED is moved to wpa_supplicant_driver_init() so it will move from INTERFACE_DISABLED to INACTIVE when there are no enabled networks. Tested-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com>
* Reset normal_scans counter upon entering INTERFACE_DISABLED stateArend van Spriel2014-01-171-0/+5
| | | | | | | | | | | | | Depending on the implementation, the scheduled scan may not give results quickly when in DISCONNECTED state. This patch resets wpa_s::normal_scans upon entering to the INTERFACE_DISABLED state so a normal scan is assured upon going to DISCONNECTED state after the interface has been re-enabled. This mainly solves a long reconnect time observed upon repeated kernel driver reloads, i.e., third reload resulted in a scheduled scan. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-hostap: Arend van Spriel <arend@broadcom.com>
* TDLS: Pass peer's Supported channel and oper class info during sta_addSunil Dutt2014-01-141-1/+7
| | | | | | | | | The information of the peer's supported channel and operating class is required for the driver to do TDLS off channel operations with a compatible peer. Pass this information to the driver when the peer station is getting added. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Limit join-a-group scans based on SSID from invitationJouni Malinen2014-01-132-16/+49
| | | | | | | | | | If we already know the SSID of the P2P group we are trying to join, use that SSID to limit scan responses and BSS selection since we do not really look for any other network in this case. In addition, this can fix cases where the peer has just changed its SSID (e.g., started a new group) and there may be multiple BSS entries for the same BSSID. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Flush secondary device types on FLUSH commandJouni Malinen2014-01-081-0/+1
| | | | | | | This makes it possible to clear previously configured secondary device types. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Allow requested device type to be specified with p2p_findJouni Malinen2014-01-082-3/+17
| | | | | | | This allows filtering of P2P peers that reply to the device discovery Probe Request frames. Signed-hostap: Jouni Malinen <j@w1.fi>
* Clear configuration blobs on FLUSH commandJouni Malinen2014-01-083-12/+19
| | | | | | | | All te network blocks and credentials were already cleared, but configurations blobs should also be cleared here, e.g., to get more consistent behavior test cases using EAP-FAST PACs. Signed-hostap: Jouni Malinen <j@w1.fi>
* Skip network disabling on expected EAP failureJouni Malinen2014-01-085-11/+34
| | | | | | | | | | Some EAP methods can go through a step that is expected to fail and as such, should not trigger temporary network disabling when processing EAP-Failure or deauthentication. EAP-WSC for WPS was already handled as a special case, but similar behavior is needed for EAP-FAST with unauthenticated provisioning. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Document how to configure for libnl 2.0 and 3.2Ben Greear2014-01-071-0/+13
| | | | | | Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Signed-hostap: Ben Greear <greearb@candelatech.com>
* P2P: Reject group formation on WPS provisioning failureJouni Malinen2014-01-074-3/+53
| | | | | | | | | There is no need to wait for the 15 second group formation timeout to clear the state if WPS failure is detected during P2P group formation. Allow the WPS exchange steps (WSC_NACK and EAP-Failure) to be completed and remove the group to get rid of the extra wait. Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix TX status processing during AP mode shutdown in wpa_supplicantJouni Malinen2014-01-071-0/+2
| | | | | | | | A TX status event could be received after the AP interface has already been deinitialized. This needs to check for NULL pointer before trying to indicate the event to AP functions. Signed-hostap: Jouni Malinen <j@w1.fi>
* Interworking: Keep up to two pending GAS_REQUEST responsesJouni Malinen2014-01-074-15/+45
| | | | | | | | | Previously, only the last response data was kept in memory. This increases that to hold up to two last responses to allow some more parallel operations to be requested. In addition, the response data is now freed as soon as the external program has fetched it. Signed-hostap: Jouni Malinen <j@w1.fi>
* Update copyright notices for the new year 2014Jouni Malinen2014-01-072-2/+2
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Interworking: Add optional freq argument to INTERWORKING_SELECTJouni Malinen2014-01-073-32/+74
| | | | | | | This can be used to limit which channels are scanned using the specified list of frequency ranges in the same format that the SCAN command uses. Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix req_scan-deplete-timeout and update eloop API for thisJouni Malinen2014-01-071-9/+11
| | | | | | | | | | | | | | | | | | | | Commit e2f5a9889a3a2bb8f1eed0cf274c7fbbabe3e9de was supposed to prevent new scan request from pushing out the old one. However, it did not really do that since eloop_deplete_timeout() returned 0 both for the case where the old timeout existed (and was sooner) and if the old timeout did not exist. It returned 1 only for the case where an old timeout did exist and was larger than the new requested value. That case used to result in wpa_supplicant_req_scan() rescheduling the timeout, but hew code in eloop_deplete_timeout() did the exact same thing and as such, did not really change anything apart from the debug log message. Extend the eloop_deplete_timeout() (and eloop_replenish_timeout() for that matter since it is very similar) to return three different values based on whether the timeout existed or not and if yes, whether it was modified. This allows wpa_supplicant_req_scan() to schedule a new timeout only in the case there was no old timeout. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Clear p2p_disabled and p2p_per_sta_psk on FLUSH commandJouni Malinen2014-01-071-0/+2
| | | | | | | The control interface FLUSH command now includes clearing of "P2P_SET disabled 1" and "P2P_SET per_sta_psk 1". Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Clear services on FLUSH commandJouni Malinen2014-01-071-0/+1
| | | | | | | The control interface FLUSH command now includes the step executed by the P2P_SERVICE_FLUSH command. Signed-hostap: Jouni Malinen <j@w1.fi>
* 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>