aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Remove unused last_scan_fullJouni Malinen2013-12-262-21/+2
| | | | | | | | | | This parameter was not really used for anything else apart from a debug message in the same function that set it. In addition, cfg80211 returns the set of scanned frequencies even for the full scan, so the code that was setting this conditionally on frequency list not being there was not really ever entered either. Signed-hostap: Jouni Malinen <j@w1.fi>
* Interworking: Allow EAP-FAST to be usedJouni Malinen2013-12-261-2/+10
| | | | | | | This behaves like PEAP as far as Interworking network selection is concerned. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add GAS-QUERY-START and GAS-QUERY-DONE event messagesJouni Malinen2013-12-261-2/+31
| | | | | | | External programs can use these new control interface events to better track progress of GAS operations. Signed-hostap: Jouni Malinen <j@w1.fi>
* Allow channel list to be specified for SCAN commandJouni Malinen2013-12-264-30/+108
| | | | | | | | | | | The new freq=<frequency ranges> parameter to the SCAN command can be used to request a scan to be performed on the specified set of channels instead of on all channels. For example, "wpa_cli scan freq=2400-2500,5180" would scan channels 1-14 and 36. Only the channels that the driver indicates as enabled and that are within the specified ranges are included in the request. Signed-hostap: Jouni Malinen <j@w1.fi>
* Move int_array helpfer functions to utils/common.cJouni Malinen2013-12-261-68/+0
| | | | | | These can be useful outside scan.c, so make them available. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add make lcov-html to generate code coverage reportJouni Malinen2013-12-261-2/+14
| | | | | | | | In addition, update build rules to compile object files in the same directory as the source code file if CONFIG_CODE_COVERAGE=y is set to make lcov find the source code files. Signed-hostap: Jouni Malinen <j@w1.fi>
* Clean up cipher capability printsJouni Malinen2013-12-251-105/+38
| | | | | | | Use an array of ciphers and a loop instead of copy-pasted copies of the same printing functionality for each cipher. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add definitions for new cipher suites from IEEE Std 802.11ac-2013Jouni Malinen2013-12-243-2/+74
| | | | | | | This adds initial parts for supporting the new GCMP-256, CCMP-256, BIP-GMAC-128, BIP-GMAC-256, and BIP-CMAC-256 cipher suites. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_supplicant: Fix crash when terminating all interfacesMoshe Benji2013-12-241-1/+2
| | | | | | | | | | | | In wpa_supplicant_terminate_proc(), while iterating and terminating interfaces, after an interface is terminated, we can no longer access its memory as it is no longer valid and causes a crash. Fix this by saving the pointer to the next interface before freeing the current one to avoid accessing an invalid memory location. Signed-hostap: Moshe Benji <moshe.benji@intel.com>
* wpa_supplicant: Use monotonic time for last_scan checkJohannes Berg2013-12-243-5/+5
| | | | | | | | This just serves to check if there was a scan within the last 5 seconds, hence it should use monotonic time. While at it, also use os_reltime_expired(). Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* WPS: Use monotonic time for AP connection attemptJohannes Berg2013-12-242-4/+4
| | | | | | | | This is only used for a debug message, but that message prints the time since the last attempt, so it should use monotonic time instead of wall clock. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* wpa_supplicant: Use relative time for TKIP Michael MIC failuresJohannes Berg2013-12-242-6/+6
| | | | | | | | | The MMIC failure code should use monotonic time to check whether 60 seconds have elapsed or not. For type-safety, use struct os_reltime for the timestamp variable, and also convert to using os_reltime_expired(). Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* wpa_supplicant: Use monotonic time for temp-disabled networksJohannes Berg2013-12-243-5/+5
| | | | | | | Temporarily disabled networks are disabled for a certain duration, so the code should use monotonic time. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* P2P: Use monotonic time for GO client waitingJohannes Berg2013-12-242-7/+7
| | | | | | | | | | GO activation can fail if the first client doesn't connect within a certain time, but this should not be dependent on wall time -- use monotonic time instead. While at it, use os_reltime_expired(). Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* IBSS RSN: Use monotonic time for reinit detectionJohannes Berg2013-12-242-5/+5
| | | | | | | | The reinit detection skips reinit when the time since the own authentication frame TX is less than half a second, so it shouldn't be affected by wall time and use monotonic time instead. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* wpa_supplicant: Use monotonic time for EAPOL RX workaroundJohannes Berg2013-12-243-5/+5
| | | | | | | The EAPOL RX workaround checks that the events are less than 100 ms apart, so only uses relative times and should use monotonic time. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* bgscan: Use monotonic timeJohannes Berg2013-12-242-12/+12
| | | | | | | The bgscan simple and learn algorithms should run regardless of wall clock time jumps, so make them use monotonic time. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* wpa_supplicant: Use monotonic time for RX/BSS timesJohannes Berg2013-12-246-29/+31
| | | | | | | | | | The BSS table, scan timeout, and related functionality should use monotonic time since they care about relative values (age) only. Unfortunately, these are all connected, so the patch can't be split further. Another problem with this is that it changes the driver wrapper API. Though, it seems only the test driver is using this. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* wpa_supplicant: Use monotonic time for SA query timeoutJohannes Berg2013-12-242-5/+5
| | | | | | | The SA query timeout is just a regular timeout (currently hard-coded to 1000 TU), so use monotonic time for it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* bgscan_learn: Start scanning from the first freqEliad Peller2013-12-241-9/+8
| | | | | | | | bgscan_learn_get_probe_freq() starts from returning the second entry in the supp_freqs arrays. Change its logic a bit to make it start from the first entry. Signed-hostap: Eliad Peller <eliad@wizery.com>
* bgscan_learn: Fix initial intervalEyal Shapira2013-12-241-0/+8
| | | | | | | | | | | In case the initial signal level of the associated BSS was above the given threshold, bgscan_learn module would begin using the short_interval but never switch to the long_interval as there would be no signal change event. Make the init code poll for the current signal level and set scan_interval accordingly. This logic exists in bgscan_simple but was missing in bgscan_learn. Signed-hostap: Eyal Shapira <eyal@wizery.com>
* bgscan_learn: Avoid redundant frequenciesEliad Peller2013-12-241-0/+3
| | | | | | | | | Some hw modes (e.g., 11b and 11g) contain the same frequencies, causing the supp_freqs array to be populated with redundant entries. Check for the existence of the freq before adding it. Signed-hostap: Eliad Peller <eliad@wizery.com>
* bgscan: Stop bgscan only on disassociationEliad Peller2013-12-241-1/+1
| | | | | | | Stopping bgscan on any state other than COMPLETED results in bgscan reset (stop + start) on every rekeying operation. Signed-hostap: Eliad Peller <eliad@wizery.com>
* Update IBSS documentation to include RSN optionJouni Malinen2013-12-232-10/+24
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>