path: root/src/ap/ap_drv_ops.c
Commit message (Collapse)AuthorAgeFilesLines
* HE: Process HE 6 GHz band capab from associating HE STARajkumar Manoharan2020-05-171-0/+2
| | | | | | | Process HE 6 GHz band capabilities in (Re)Association Request frames and pass the information to the driver. Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
* Remove unnecessary key clearing at AP start with nl80211Jouni Malinen2020-05-161-0/+6
| | | | | | | cfg80211 takes care of key removal when link/association is lost, so there is no need to explicitly clear old keys when starting AP. Signed-off-by: Jouni Malinen <j@w1.fi>
* Update STA flags to the driver immediately on disconnectionJouni Malinen2020-03-261-1/+1
| | | | | | | | | | | | hostapd (and wpa_supplicant in AP mode) was internally updating the STA flags on disconnection cases to remove authorization and association. However, some cases did not result in immediate update of the driver STA entry. Update all such cases to send out the update to the driver as well to reduce risk of race conditions where new frames might be accepted for TX or RX after the port authorization or association has been lost and configured keys are removed. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Add ACS support for 60 GHz channel bondingNoam Shaked2020-03-241-0/+1
| | | | | | | | | hostapd will trigger EDMG auto channel selection by setting QCA_WLAN_VENDOR_ATTR_ACS_EDMG_ENABLED. The 60 GHz driver will be called to start an auto channel selection and will return the primary channel and the EDMG channel. Signed-off-by: Noam Shaked <nshaked@codeaurora.org>
* driver: Extend send_mlme() with wait optionIlan Peer2020-02-291-1/+1
| | | | | | | | | | | | PASN authentication can be performed while a station interface is connected to an AP. To allow sending PASN frames while connected, extend the send_mlme() driver callback to also allow a wait option. Update the relevant drivers and wpa_supplicant accordingly. hostapd calls for send_mlme() are left unchanged, since the wait option is not required there. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* Introduce and add key_flagAlexander Wetzel2020-01-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the new set_key() parameter "key_flag" to provide more specific description of what type of a key is being configured. This is needed to be able to add support for "Extended Key ID for Individually Addressed Frames" from IEEE Std 802.11-2016. In addition, this may be used to replace the set_tx boolean eventually once all the driver wrappers have moved to using the new key_flag. The following flag are defined: KEY_FLAG_MODIFY Set when an already installed key must be updated. So far the only use-case is changing RX/TX status of installed keys. Must not be set when deleting a key. KEY_FLAG_DEFAULT Set when the key is also a default key. Must not be set when deleting a key. (This is the replacement for set_tx.) KEY_FLAG_RX The key is valid for RX. Must not be set when deleting a key. KEY_FLAG_TX The key is valid for TX. Must not be set when deleting a key. KEY_FLAG_GROUP The key is a broadcast or group key. KEY_FLAG_PAIRWISE The key is a pairwise key. KEY_FLAG_PMK The key is a Pairwise Master Key (PMK). Predefined and needed flag combinations so far are: KEY_FLAG_GROUP_RX_TX WEP key not used as default key (yet). KEY_FLAG_GROUP_RX_TX_DEFAULT Default WEP or WPA-NONE key. KEY_FLAG_GROUP_RX GTK key valid for RX only. KEY_FLAG_GROUP_TX_DEFAULT GTK key valid for TX only, immediately taking over TX. KEY_FLAG_PAIRWISE_RX_TX Pairwise key immediately becoming the active pairwise key. KEY_FLAG_PAIRWISE_RX Pairwise key not yet valid for TX. (Only usable with Extended Key ID support.) KEY_FLAG_PAIRWISE_RX_TX_MODIFY Enable TX for a pairwise key installed with KEY_FLAG_PAIRWISE_RX. KEY_FLAG_RX_TX Not a valid standalone key type and can only used in combination with other flags to mark a key for RX/TX. This commit is not changing any functionality. It just adds the new key_flag to all hostapd/wpa_supplicant set_key() functions without using it, yet. Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
* Add vlan_id to driver set_key() operationGurumoorthi Gnanasambandhan2020-01-081-1/+2
| | | | | | | | This is in preparation for adding support to use a single WLAN netdev with VLAN operations offloaded to the driver. No functional changes are included in this commit. Signed-off-by: Gurumoorthi Gnanasambandhan <gguru@codeaurora.org>
* driver: Move set_key() parameters into a structJouni Malinen2020-01-081-3/+15
| | | | | | | | This makes it more convenient to add, remove, and modify the parameters without always having to update every single driver_*.c implementation of this callback function. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* driver: Add no_encrypt argument to send_mlme()Jouni Malinen2020-01-031-1/+1
| | | | | | | This is in preparation of being able to remove the separate send_frame() callback. Signed-off-by: Jouni Malinen <j@w1.fi>
* Make hostapd_drv_send_mlme() more genericJouni Malinen2020-01-031-12/+3
| | | | | | | | | | Merge hostapd_drv_send_mlme_csa() functionality into hostapd_drv_send_mlme() to get a single driver ops handler function for hostapd. In addition, add a new no_encrypt parameter in preparation for functionality that is needed to get rid of the separate send_frame() driver op. Signed-off-by: Jouni Malinen <j@w1.fi>
* 6 GHz: Select channel width using configured op_classVamsi Krishna2019-12-201-0/+3
| | | | | | | | | Use op_class to derive channel width for the operating channel when op_class is configured by the user in both fixed channel and ACS cases. We can avoid using ht_capab field to derive channel width especially in the 6 GHz band in which only HE is supported. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Allow non-PCS 6 GHz channels to be excluded from ACSAnkita Bajaj2019-12-201-0/+4
| | | | | | | | Add support to exclude non-PSC 6 GHz channels from the input frequency list to ACS. The new acs_exclude_6ghz_non_psc=1 parameter can be used by 6 GHz only APs. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Allow ACS channel list to be configured as frequencies (in MHz)Ankita Bajaj2019-12-201-6/+19
| | | | | | | | | | | The channel numbers are duplicated between 2.4 GHz / 5 GHz bands and 6 GHz band. Hence, add support to configure a list of frequencies to ACS (freqlist) instead of a list of channel numbers (chanlist). Also, both 5 GHz and 6 GHz channels are referred by HOSTAPD_MODE_IEEE80211A. The 6 GHz channels alone can be configured by using both mode and frequency list. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* ACS: Add channels from all modes matching with configured hw modeAnkita Bajaj2019-12-201-23/+13
| | | | | | | | | | | | | | The 5 GHz channels are stored in one hw_features set with mode HOSTAPD_MODE_IEEE80211A while the 6 GHz channels will need to stored in a separate hw_features set (but with same mode HOSTAPD_MODE_IEEE80211A) due to possibility of different HE capabilities being available between the 5 GHz and 6 GHz bands. Iterate through all hw_features sets and populate channels from all hw_features sets whose hardware mode is matching the configured hardware mode while preparing the channel list for ACS. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Fix memory leak in ACS offload operationAnkita Bajaj2019-12-051-0/+1
| | | | | | | freq_list is built in allocated heap memory and it needs to be freed before returning from this function. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* ACS: Remove redundant ch_list parameters from do_acs interfaceAnkita Bajaj2019-12-051-10/+0
| | | | | | | | | | | | Clean up do_acs interface to not pass ch_list to drivers as the same information is available in freq_list. The channel numbers are duplicated between 2.4 GHz and 5 GHz bands and the 6 GHz band. So, use the QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST to populate only 2.4 GHz and 5 GHz channels to ensure backwards compatibility with old drivers which do not have support to decode the newer QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST attribute. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* nl80211: Add STA node details in AP through QCA vendor subcommandShiva Sankar Gajula2019-10-251-1/+1
| | | | | | | | Addi STA node details in AP through QCA vendor subcommand QCA_NL80211_VENDOR_SUBCMD_ADD_STA_NODE vendor when processing FT protocol roaming. Signed-off-by: Shiva Sankar Gajula <sgajula@codeaurora.org>
* Add RSNXE into (Re)Association Response framesJouni Malinen2019-10-181-0/+4
| | | | | | | Add the new RSNXE into (Re)Association Response frames if any of the capability bits is nonzero. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Add EDMG parameters to set_freq functionsAlexei Avshalom Lazar2019-10-071-3/+6
| | | | | | | This updates the frequency parameter setting functions to include argument for EDMG. Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
* Remove CONFIG_IEEE80211W build parameterJouni Malinen2019-09-081-2/+0
| | | | | | | | | Hardcode this to be defined and remove the separate build options for PMF since this functionality is needed with large number of newer protocol extensions and is also something that should be enabled in all WPA2/WPA3 networks. Signed-off-by: Jouni Malinen <j@w1.fi>
* nl80211: Add driver multi iftype HE capability parsingSven Eckelmann2019-06-231-6/+8
| | | | | | | | | | | | | | The HE capabilities are no longer per PHY but per iftype on this specific PHY. It is therefore no longer enough to just parse the AP capabilities. The he_capabilities are now duplicated to store all information for IEEE80211_MODE_* which hostap cares about. The nl80211 driver fills in this information when the iftype supports HE. The rest of the code still only uses the IEEE80211_HE_AP portion but can be extended later to also use other HE capabilities. Signed-off-by: Sven Eckelmann <seckelmann@datto.com>
* hostapd: Process OWE IE and update DH IE to the driver if neededLiangwei Dong2019-06-141-0/+10
| | | | | | | | | | | | | | | | This implements the required functionality in hostapd to facilitate OWE connection with the AP SME-in-driver cases. Stations can either send DH IE or PMKID (in RSNE) (or both) in Association Request frame during the OWE handshake. The drivers that use this offload mechanism do not interpret this information and instead, pass the same to hostapd for further processing. hostapd will either validate the PMKID obtained from the STA or generate DH IE and further indicate the same to the driver. The driver further sends this information in the Association Response frame. Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org> Signed-off-by: Liangwei Dong <liangwei@codeaurora.org> Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* HE: Enable ACS similarly to VHTJohn Crispin2019-05-271-1/+3
| | | | | Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com> Signed-off-by: John Crispin <john@phrozen.org>
* HE: Pass in HE information into hostapd_set_freq_params()John Crispin2019-05-271-4/+8
| | | | | Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com> Signed-off-by: John Crispin <john@phrozen.org>
* HE: Add AP mode MLME/SME handling for HE stationsJohn Crispin2019-05-271-0/+4
| | | | | | | | | Process HE information in (Re)Association Request frames and add HE elements into (Re)Association Response frames when HE is enabled in the BSS. Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com> Signed-off-by: John Crispin <john@phrozen.org>
* HE: Add helpers for getting the channel width parametersJohn Crispin2019-05-271-6/+6
| | | | | Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com> Signed-off-by: John Crispin <john@phrozen.org>
* HE: Remove vht_ prefix from shared set_freq argumentJohn Crispin2019-05-271-4/+4
| | | | | | | oper_chwidth is used for both VHT and HE here. Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com> Signed-off-by: John Crispin <john@phrozen.org>
* HE: Remove VHT_ prefix from CHANWITDH_* defineJohn Crispin2019-05-271-3/+3
| | | | | | | | The bandwidth values are shared between VHT and HE mode so remove the VHT specific prefix. Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com> Signed-off-by: John Crispin <john@phrozen.org>
* nl80211: Station airtime weight configurationToke Høiland-Jørgensen2019-05-021-0/+10
| | | | | | | This provides a mechanism for configuring per-STA airtime weight for airtime policy configuration. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
* OCE: Move OCE checks to IE formation from hostapd initializationAnkita Bajaj2018-10-301-1/+2
| | | | | | | | | | Earlier, the OCE flags were checked during hostapd initialization. This doesn't address few cases like for example when the interface is added from control interface. Move the OCE flag checks to the functions that are forming the MBO/OCE IEs to cover all the different paths for enabling a BSS. Also use macros as appropriate for readability. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* OWE: Transition mode with non-AP-MLMEAshok Ponnaiah2018-01-291-0/+7
| | | | | | | Add OWE Transition IE in build_ap_extra() ies to support drivers that do not use hostapd MLME. Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
* hostapd: Send broadcast Public Action frame with wildcard BSSID addressAshok Ponnaiah2018-01-291-0/+9
| | | | | | | | | Send Public Action frames with wildcard BSSID when destination was broadcast address. This is required for DPP PKEX where the recipients may drop the frames received with different BSSID than the wildcard address or the current BSSID. Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
* OCE: Add hostapd mode OCE capability indication if enabledAshwini Patil2017-07-141-1/+1
| | | | | | | Add OCE IE in Beacon, Probe Response, and (Re)Association Response frames if OCE is enabled in the configuration. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Add a config parameter to exclude DFS channels from ACSSunil Dutt2017-05-271-1/+6
| | | | | | | | | | | | The new acs_exclude_dfs=1 parameter can be used to request hostapd to exclude all DFS channels from ACS consideration. This is mainly of use for cases where the driver supports DFS channels, but for some reason a non-DFS channel is desired when using automatic channel selection. Previously, the chanlist parameter could have been used for this, but that required listing all the acceptable channels. The new parameter allows this to be done without such a list. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* driver: Make DFS domain information available to coreVasanthakumar Thiagarajan2017-05-131-2/+2
| | | | | | | | Current DFS domain information of the driver can be used in ap/dfs to comply with DFS domain specific requirements like uniform spreading for ETSI domain. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
* FILS: Add FILS AEAD parameters for sta_auth() callsJeffin Mammen2017-04-231-0/+24
| | | | | | | This is used with partial AP SME in driver cases to enable FILS association (AES-SIV) processing. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* driver: Move sta_auth() arguments to a structJeffin Mammen2017-04-231-2/+13
| | | | | | | This makes it easier to add more parameters without having to change the callback function prototype. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* FILS: Add FILS Indication element into Beacon/Probe Response templateJeffin Mammen2017-04-211-0/+7
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Check for driver initialization before doing driver operationsJouni Malinen2016-08-191-5/+5
| | | | | | | | | Number of hostapd control interface commands (e.g., STATUS-DRIVER) could result in NULL pointer dereference when issued on not yet enabled BSS. Fix this by checking that the driver interface has been initialized before calling the driver_ops function. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* hostapd: Fix Public Action frame addressing (BSSID field)Jouni Malinen2016-06-101-0/+30
| | | | | | | | | | | | | | | | | | | | | | IEEE Std 802.11-2012, 10.19 (Public Action frame addressing) specifies that the wildcard BSSID value is used in Public Action frames that are transmitted to a STA that is not a member of the same BSS. hostapd used to use the actual BSSID value for all such frames regardless of whether the destination STA is a member of the BSS. Fix this by using the wildcard BSSID in cases the destination STA is not a member of the BSS. Leave group addressed case as-is (i.e., the actual BSSID), since both values are accepted. No such frames are currently used, though. This version is still using the AP BSSID value in the Address 3 field for GAS response frames when replying to a GAS request with AP BSSID instead of Wildcard BSSID. This is left as a workaround to avoid interoperability issues with deployed STA implementations that are still using the non-compliant address and that might be unable to process the standard compliant case. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* nl80211: Use extended capabilities per interface typeKanchanapally, Vidyullatha2016-05-311-0/+14
| | | | | | | | | | This adds the necessary changes to support extraction and use of the extended capabilities specified per interface type (a recent cfg80211/nl80211 extension). If that information is available, per-interface values will be used to override the global per-radio value. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Add assocresp_elements parameter for hostapdBala Krishna Bhamidipati2016-04-201-0/+1
| | | | | | | | This new parameter allows hostapd to add Vendor Specific elements into (Re)Association Response frames similarly to the way vendor_elements parameter can be used for Beacon and Probe Response frames. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* AP: Pass station P2P PS capabilities info during station add/setAyala Beker2016-04-081-1/+3
| | | | | | | | | | | | If a legacy client with no P2P PS support is trying to connect to a P2P GO, the driver should know that, and change its PS behavior accordingly. Add a parameter to hostapd_sta_add_params() indicating if P2P PS is supported by the station and pass this parameter to kernel with nl80211 driver when the station is added/set. Signed-off-by: Ayala Beker <ayala.beker@intel.com>
* Simplify hostapd_build_ap_extra_ies() with helper functionsJouni Malinen2016-02-221-107/+56
| | | | | | | This removes multiple copies of wpabuf_resize() following by wpabuf_put_{buf,data}() with the help of two simple helper functions. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* hostapd: Add MBO IE to Beacon, Probe Response, Association ResponseAvraham Stern2016-02-221-0/+19
| | | | | | | | | | | | | | | | | | Add MBO IE with AP capability attribute to Beacon, Probe Response, and (Re)Association Response frames to indicate the AP supports MBO. Add option to add Association Disallowed attribute to Beacon, Probe Response, and (Re)Association Response frames. Usage: SET mbo_assoc_disallow <reason code> Valid reason code values are between 1-5. Setting the reason code to 0 will remove the Association Disallowed attribute from the MBO IE and will allow new associations. MBO functionality is enabled by setting "mbo=1" in the config file. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* AP: Add support for full station stateAyala Beker2016-02-201-1/+6
| | | | | | | | | | | | | Add support for drivers that support full AP client state, i.e., can handle adding stations that are not associated yet. For such drivers, add a station after processing the authentication request, instead of adding it in the association response callback. Doing so is beneficial in cases where the driver cannot handle the add station request, in which case it is useless to perform the complete connection establishment. Signed-off-by: Ayala Beker <ayala.beker@intel.com>
* driver: Make setting up AP optional when creating AP interfaceAvraham Stern2015-11-221-1/+1
| | | | | | | | | | | | | | | | | | When an AP interface it created, it is also setup and subscribes for management frames etc. However, when the interface is added by wpa_supplicant, setting up for AP operations is redundant because it will be done by wpa_supplicant on wpa_drv_init() when setting the interface mode to AP. In addition, it may cause wpa_supplicant to fail initializing the interface as it will try to subscribe for management frames on this interface but the interface is already registered. Change this, so when adding an AP interface, make setting up the AP optional, and use it only when the interface is added by hostapd but not when it is added by wpa_supplicant. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* nl80211: Specify CSA offsets in send_mlme() driver opAndrei Otcheretianski2015-10-031-1/+13
| | | | | | | | | | Some management frames contain CSA counters which should be updated by kernel. Change driver op send_mlme() allowing to send a frame, specifying an array of offsets to the CSA counters which should be updated. For example, CSA offsets parameters should be specified when sending Probe Response frames during CSA period. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
* Fix generating offloaded ACS channel list when hw_mode is set to anyPeng Xu2015-07-281-14/+45
| | | | | | | | | When ACS is offloaded to device driver and the hw_mode parameter is set to any, the current_mode structure is NULL which fails the ACS command. Fix this by populating the ACS channel list with channels from all bands when current_mode is NULL. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* FST: Add FST IEs into AP mode management framesAnton Nayshtut2015-07-161-0/+16
| | | | | | | This adds the FST IEs received from the FST module into Beacon, Probe Response, and (Re)Association Response frames. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>