aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
Commit message (Collapse)AuthorAgeFilesLines
* Assign QCA vendor command/attributes for set/get wifi configurationSunil Dutt2016-04-181-1/+59
| | | | | | | | This adds QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION and QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_CONFIGURATION and the attributes used with these commands. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Trigger event when invitation is acceptedLior David2016-04-181-0/+1
| | | | | | | | | | Trigger an event when wpa_supplicant accepts an invitation to re-invoke a persistent group. Previously wpa_supplicant entered group formation without triggering any specific events and it could confuse clients, especially when operating with a driver that does not support concurrency between P2P and infrastructure connection. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
* hostapd: Add FTM range requestDavid Spinadel2016-04-171-0/+8
| | | | | | | | | | | | | | | | | | | | Add FTM range request via RRM. The AP sends Radio measurement request with FTM range request as a request for the receiving STA to send FTM requests to the given list of APs. The neighbor report part of the request is taken from the neighbor database. The control interface command is: REQ_RANGE <dst addr> <rand_int> <min_ap> <responder> [<responder>..] dst addr: MAC address of an associated STA rand_int: Randomization Interval (0..65535) in TUs min_ap: Minimum AP Count (1..15); minimum number of requested FTM ranges between the associated STA and the listed APs responder: List of BSSIDs for neighboring APs for which a measurement is requested Signed-off-by: David Spinadel <david.spinadel@intel.com>
* hostapd: Add LCI requestDavid Spinadel2016-04-171-0/+2
| | | | | | | Add a hostapd control interface command REQ_LCI to request LCI from an associated station using radio measurement. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* hostapd: Save RM enabled capability of stationDavid Spinadel2016-04-172-0/+6
| | | | | | | Save RM enabled capability element of an associating station if radio measurement is supported in its capability field. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* hostapd: Handle Neighbor Report Request frameDavid Spinadel2016-04-171-0/+7
| | | | | | | Process Neighbor Report Request frame and send Neighbor Report Response frame based on the configured neighbor report data. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* hostapd: Extend the configuration of RRM capabilitiesDavid Spinadel2016-04-161-0/+2
| | | | | | | | | | | | | Extend the radio_measurements parameter to save all the supported RRM capabilities as it's used in RM enabled capabilities element. Make this parameter not directly configurable via config file (though, keep the radio_measurements parameter for some time for backwards compatibility). Instead, add a configuration option to enable neighbor report via radio measurements. Other features can be added later as well. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* utils: Add ssid_parse() functionDavid Spinadel2016-04-161-2/+0
| | | | | | | | | | Add a function that parses SSID in text or hex format. In case of the text format, the SSID is enclosed in double quotes. In case of the hex format, the SSID must include only hex digits and not be enclosed in double quotes. The input string may include other arguments after the SSID. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* Add measurement and neighbor report definitionsDavid Spinadel2016-04-091-1/+69
| | | | | | | | | | | | | | | | | | | | | | Add measurement report definitions from Table 9-81 in IEEE P802.11-REVmc/D5.0 "Measurement type definition for measurement requests". Add measurement report definitions from IEEE Std 802.11-2012 Table 8-71 "Location subject definition". Add neighbor report bandwidth subelement definition from IEEE P802.11-REVmc/D5.0 MC Table 9-150 - "Optional subelement IDs neighbor report" Add neighbor report channel width definition from IEEE P802.11-REVmc/D5.0, Table 9-152 - "HT/VHT Operation Information subfields". Add definitions for neighbor report BSSID info from IEEE P802.11-REVmc/D5.0, 9.4.2.37 Neighbor Report element. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* Add POLL_STA command to check connectivity in AP modeJouni Malinen2016-04-081-0/+1
| | | | | | | | | The hostapd "POLL_STA <addr>" control interface command can be used to check whether an associated station ACKs a QoS Data frame. The received ACK for such a frame is reported as an event message ("AP-STA-POLL-OK <addr>"). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Extend VENDOR_ELEM parameters to cover non-P2P Probe Request frameJouni Malinen2016-04-081-0/+1
| | | | | | | | | | | | The new VENDOR_ELEM value 14 can now be used to add a vendor element into Probe Request frames used by non-P2P active scans. For example: VENDOR_ELEM_ADD 14 dd05001122330a and to clear that: VENDOR_ELEM_REMOVE 14 * Signed-off-by: Jouni Malinen <j@w1.fi>
* Add QCA nl80211 vendor commands for TSF and WISA FeatureManikandan Mohan2016-04-051-0/+44
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Remove struct ieee80211_mgmt::u.probe_reqJouni Malinen2016-04-021-4/+1
| | | | | | | | | | | This struct in the union is empty, but the design of using a zero-length u8 array here is not fully compatible with C++ and can result in undesired compiler warnings. This struct is not used anymore, so it can be removed from the struct ieee80211_mgmt definition to complete the changes started in commit d447cd596f0a9f73850229e7fa2bdd35755dc750 ('Updates for stricter automatic memcpy bounds checking'). Signed-off-by: Jouni Malinen <j@w1.fi>
* Revert "Assign QCA vendor command and attribute for Tx/Rx aggregation"Sunil Dutt2016-03-311-19/+0
| | | | | | | | | | | This reverts commit 4ca16b5fd71833d7d200167ba10b471cab7d049f. Configuration for this will be done using a previously assigned more generic command. This new command QCA_NL80211_VENDOR_SUBCMD_SET_TXRX_AGGREGATION has not been used in any driver version and won't be used, so the assigned command id can be freed for future use. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Comment out UDP/UNIX socket code from common ctrl_iface based on buildJouni Malinen2016-03-271-8/+29
| | | | | | | These were unreachable cases in the switch statements based on how the build was configured. Signed-off-by: Jouni Malinen <j@w1.fi>
* SAE: Check SHA256-PRF operation resultJouni Malinen2016-03-271-8/+11
| | | | | | | While this is mostly theoretical, check explicitly that SHA256 operations in sha256_prf*() succeed. Signed-off-by: Jouni Malinen <j@w1.fi>
* SAE: Remove dead code in FFC pwd-value derivationJouni Malinen2016-03-271-2/+0
| | | | | | | The local bits variable is set to prime_len * 8 and consequently bits % 8 cannot be anything else than 0. Signed-off-by: Jouni Malinen <j@w1.fi>
* Use a separate header file for Linux bridge interface definitionsJouni Malinen2016-03-261-0/+24
| | | | | | | This moves the BRCTL_* defines from vlan_full.c to linux_bridge.h to clean up header inclusion. Signed-off-by: Jouni Malinen <j@w1.fi>
* Use own header file for defining Linux VLAN kernel interfaceJouni Malinen2016-03-261-0/+52
| | | | | | | | This gets rid of need to include linux/if_vlan.h and additional defines in vlan_ioctl.c to avoid issues with missing definitions in libc headers. Signed-off-by: Jouni Malinen <j@w1.fi>
* Assign QCA vendor command and attribute for Tx/Rx aggregationSunil Dutt2016-03-171-0/+19
| | | | | | | | Assign nl80211 vendor command QCA_NL80211_VENDOR_SUBCMD_SET_TXRX_AGGREGATION and corresponding attributes. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Reserve QCA vendor specific nl80211 commands 116..118Jouni Malinen2016-03-081-0/+1
| | | | | | These are reserved for QCA use. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* ctrl_iface_common: Use sockaddr_storage instead of sockaddr_unJanusz Dziedzic2016-03-052-21/+14
| | | | | | | This is a step towards allowing UDP sockets to be used with the common implementation. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* Add common ctrl_iface filesJanusz Dziedzic2016-03-052-0/+197
| | | | | | | This is preparation for sharing a single implementation for ctrl_iface functionality in wpa_supplicant and hostapd. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* wpa_supplicant: Expose wpas_get_bands() and related APILior David2016-03-031-0/+6
| | | | | | | | Expose the functions wpas_get_bands() and wpas_freq_to_band() and the enum wpa_radio_work_band, since they will be needed outside wpa_supplicant.c. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
* AP: Store STA supported operating classes informationJouni Malinen2016-02-242-0/+7
| | | | | | | | | | | This makes hostapd track Supported Operating Classes information from the associated STAs. The stored information is available through the STA control interface command (supp_op_classes row) as a hexdump of the Supported Operating Classes element starting from the Length field. This information can be used as input to BSS transition management and channel switching decisions. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* MBO: Update STA cellular data capability based on WNM NotificationJouni Malinen2016-02-221-0/+6
| | | | | | | | This makes hostapd parse a received WNM Notification Request frame subelements and if a WFA MBO cellular data capability subelement is seen, update the cellular data capability for the STA. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* MBO: Parse MBO IE in ieee802_11_parse_elems()Jouni Malinen2016-02-222-0/+7
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* WNM: Add candidate list to BSS transition responseAvraham Stern2016-02-221-0/+21
| | | | | | | | | Add the transition candidate list to BSS Transition Management Response frame. The candidates preference is set using the regular wpa_supplicant BSS selection logic. If the BSS transition request is rejected and updated scan results are not available, the list is not added. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* utils: Derive phy type by frequency and bandwidthDavid Spinadel2016-02-223-0/+50
| | | | | | | Add a function to derive phy type from frequency and bandwidth as defined in IEEE Std 802.11ac-2013 Annex C (dot11PHYType). Signed-off-by: David Spinadel <david.spinadel@intel.com>
* MBO: Parse MBO IE in BSS Transition Management Request framesAvraham Stern2016-02-221-0/+6
| | | | | | | | | | | | | Add parsing of MBO IE in BSS Transition Management Request frames. If the MBO IE includes the association retry delay attribute, do not try to reconnect to the current BSS until the delay time is over. If the MBO IE includes the cellular data connection preference attribute or the transition rejection reason attribute, send a message to upper layers with the data. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* MBO: Add global operating class definitionsAvraham Stern2016-02-222-0/+55
| | | | | | | | | | Add definitions for global operating classes. These definitions will be used to construct supported operating classes information element. The operating classes definitions used locally for P2P module will be removed and included in the general operating classes definitions. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* MBO: Implement MBO non-preferred channel report in Association RequestDavid Spinadel2016-02-222-0/+26
| | | | | | | Add MBO IE with non-preferred channels to (Re)Association Request frames. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* MBO: Add Multi Band Operation definitionsDavid Spinadel2016-02-211-0/+81
| | | | | | These are based on the specification draft WFA_MBO_TechSpec_v0.0_r19. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* utils: Share a single helper function to get IE by IDAvraham Stern2016-02-212-0/+36
| | | | | | | | Add a helper function to find a certain IE inside IEs buffer by ID and use this function in several places that implemented similar functionality locally. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* wpa_ctrl: Retry select() on EINTRJörg Krause2016-02-071-0/+2
| | | | | | Retry select() if it was interrupted by a signal. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
* Add the selector suite into wpa_parse_wpa_ie_rsn() "invalid group cipher"Jouni Malinen2016-02-031-2/+4
| | | | | | | | This makes it easier to debug AP selection issues in case of a invalid RSN element or use of customer cipher suites that are not supported by wpa_supplicant. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* mesh: Fix PMKID to match the standardBob Copeland2015-12-282-0/+2
| | | | | | | | | | | | | | | IEEE Std 802.11-2012 11.3.5.4 specifies the PMKID for SAE-derived keys as: L((commit-scalar + peer-commit-scalar) mod r, 0, 128) This is already calculated in the SAE code when the PMK is derived, but not saved anywhere. Later, when generating the PMKID for plink action frames, the definition for PMKID from 11.6.1.3 is incorrectly used. Correct this by saving the PMKID when the key is generated and use it subsequently. Signed-off-by: Bob Copeland <me@bobcopeland.com>
* EAP peer: External server certificate chain validationJouni Malinen2015-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for optional functionality to validate server certificate chain in TLS-based EAP methods in an external program. wpa_supplicant control interface is used to indicate when such validation is needed and what the result of the external validation is. This external validation can extend or replace the internal validation. When ca_cert or ca_path parameter is set, the internal validation is used. If these parameters are omitted, only the external validation is used. It needs to be understood that leaving those parameters out will disable most of the validation steps done with the TLS library and that configuration is not really recommend. By default, the external validation is not used. It can be enabled by addingtls_ext_cert_check=1 into the network profile phase1 parameter. When enabled, external validation is required through the CTRL-REQ/RSP mechanism similarly to other EAP authentication parameters through the control interface. The request to perform external validation is indicated by the following event: CTRL-REQ-EXT_CERT_CHECK-<id>:External server certificate validation needed for SSID <ssid> Before that event, the server certificate chain is provided with the CTRL-EVENT-EAP-PEER-CERT events that include the cert=<hexdump> parameter. depth=# indicates which certificate is in question (0 for the server certificate, 1 for its issues, and so on). The result of the external validation is provided with the following command: CTRL-RSP-EXT_CERT_CHECK-<id>:<good|bad> It should be noted that this is currently enabled only for OpenSSL (and BoringSSL/LibreSSL). Due to the constraints in the library API, the validation result from external processing cannot be reported cleanly with TLS alert. In other words, if the external validation reject the server certificate chain, the pending TLS handshake is terminated without sending more messages to the server. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Fix FTIE generation for 4-way handshake after FT protocol runJouni Malinen2015-12-092-8/+28
| | | | | | | | | | | | | wpa_insert_pmkid() did not support cases where the original RSN IE included any PMKIDs. That case can happen when PTK rekeying through 4-way handshake is used after FT protocol run. Such a 4-way handshake used to fail with wpa_supplicant being unable to build the EAPOL-Key msg 2/4. Fix this by extending wpa_insert_pmkid() to support removal of the old PMKIDs, if needed. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* AP: Use more readable version of management group cipher in error casesJouni Malinen2015-12-061-3/+4
| | | | | | | This makes it easier to interpret AP side debug log for a case where a station specifies in unsupported management group cipher. Signed-off-by: Jouni Malinen <j@w1.fi>
* Add QCA vendor attribute and event to indicate subnet change statusRavi Joshi2015-11-201-0/+13
| | | | | | | | | | | | | | | | | | This allows offloaded roaming to inform user space of the change in IP subnet post roaming. The device may have roamed to a network which is in a different subnet which will result in IP connectivity loss. Indicating the change in subnet enables the user space to refresh the IP address or to perform IP subnet validation if unknown status is indicated. The driver indication is reported with a new event from wpa_supplicant in the following format: CTRL-EVENT-SUBNET-STATUS-UPDATE status=<0/1/2> where 0 = unknown 1 = IP subnet unchanged (can continue to use the old IP address) 2 = IP subnet changed (need to get a new IP address) Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Assign QCA vendor command and attribute for Tx power reduction in dBPeng Xu2015-11-191-0/+17
| | | | | | | | Assign nl80211 vendor command QCA_NL80211_VENDOR_SUBCMD_SET_TXPOWER_DECR_DB and corresponding attributes. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Extend QCA roam event with subnet change indicationRavi Joshi2015-11-161-0/+1
| | | | | | | | | The new attribute can be used with QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH to indicate whether the IP subnet was detected to have changed when processing offloaded roam/key management. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Use "STATUS-NO_EVENTS" instead of "STATUS" in get_wpa_status functionSomdas Bandyopadhyay2015-11-011-1/+2
| | | | | | | | | | Using "STATUS" command triggers CTRL-EVENT-STATE-CHANGE and CTRL-EVENT-CONNECTED (if connected to some AP) events. These events cause problems in Android WifiStateMachine in Marshmallow. Due to these events WifiStateMachine sometimes disconnects the OSU SSID connection, while hs20-osu-client waits for IP address. Signed-off-by: Somdas Bandyopadhyay <somdas.bandyopadhyay@intel.com>
* Add frequency to operating class determination for 5 GHz 100..140Jouni Malinen2015-10-301-0/+19
| | | | | | | This extends ieee80211_freq_to_channel_ext() with knowledge of the operating classes for the 5 GHz channels 100..140. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Reserve QCA vendor specific nl80211 commands 110..114Jouni Malinen2015-10-261-0/+1
| | | | | | These are reserved for QCA use. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Assign QCA commands and attributes for Tx power scaling and OTA testingPeng Xu2015-10-261-0/+32
| | | | | | | | Assign nl80211vendor commands QCA_NL80211_VENDOR_SUBCMD_OTA_TEST and QCA_NL80211_VENDOR_SUBCMD_SET_TXPOWER_SCALE as well as corresponding attributes. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* SAE: Avoid undefined behavior in pointer arithmeticJouni Malinen2015-10-251-5/+5
| | | | | | | | | Reorder terms in a way that no invalid pointers are generated with pos+len operations. end-pos is always defined (with a valid pos pointer) while pos+len could end up pointing beyond the end pointer which would be undefined behavior. Signed-off-by: Jouni Malinen <j@w1.fi>
* Avoid undefined behavior in pointer arithmetic in IE parsingJouni Malinen2015-10-241-6/+6
| | | | | | | | | Reorder terms in a way that no invalid pointers are generated with pos+len operations. end-pos is always defined (with a valid pos pointer) while pos+len could end up pointing beyond the end pointer which would be undefined behavior. Signed-off-by: Jouni Malinen <j@w1.fi>
* FT: Avoid undefined behavior in pointer arithmeticJouni Malinen2015-10-241-37/+55
| | | | | | | | | Reorder terms in a way that no invalid pointers are generated with pos+len operations. end-pos is always defined (with a valid pos pointer) while pos+len could end up pointing beyond the end pointer which would be undefined behavior. Signed-off-by: Jouni Malinen <j@w1.fi>