aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ap_drv_ops.c
Commit message (Collapse)AuthorAgeFilesLines
* Add EDMG parameters to set_freq functionsAlexei Avshalom Lazar8 days1-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>
* drivers: Add freq parameter to send_mlme() functionAndrei Otcheretianski2015-06-141-1/+1
| | | | | | | | Change send_mlme() API to allow sending management frames on a specific channel, overriding the internal driver decision. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com>
* Fix pairwise cipher suite bitfields to the driver in mixed modeJouni Malinen2015-06-101-2/+8
| | | | | | | | | | | | | Commit 95b6bca66de9dc0a2ddd9164ec052a7d5f58804b ('Add rsn_pairwise bits to set_ieee8021x() driver_ops') modified cipher configuration to use unconditionally wpa_pairwise | rsn_pairwise. While that works for many cases, it does not handle the case of dynamic configuration changes over the control interface where wpa_pairwise or rsn_pairwise values may not get cleared when the wpa parameter is modified. Fix this inconsistency by configuring the driver with only the bits that are valid for the currently enabled WPA/WPA2 version(s). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* atheros: Clear WPS appie during deinitAshok Kumar Ponnaiah2015-03-241-0/+9
| | | | | | The WPS IE(s) need to be cleared from the driver explicitly. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Extend offloaded ACS QCA vendor command to support VHTManikandan Mohan2015-03-231-1/+54
| | | | | | | | Update ACS driver offload feature for VHT configuration. In addition, this allows the chanlist parameter to be used to specify which channels are included as options for the offloaded ACS case. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Make hostapd_set_freq_params() commonJanusz Dziedzic2015-02-211-86/+1
| | | | | | Now this function can also be used from wpa_supplicant. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* doc: Extend driver.h documentationJouni Malinen2015-01-031-4/+6
| | | | | | This documents some more parts of the driver wrapper interface. Signed-off-by: Jouni Malinen <j@w1.fi>
* hostapd: Fix HT40 determination for ACS offloadJouni Malinen2014-12-041-1/+1
| | | | | | | | | Commit 16689c7cfc99c66aecbf16eb2f4a8bc941cb5d0f ('hostapd: Allow ACS to be offloaded to the driver') used incorrect operator to determine whether HT40 was configured. Fix that to mask the ht_capab bit correctly. (CID 77286) Signed-off-by: Jouni Malinen <j@w1.fi>
* hostapd: Allow ACS to be offloaded to the driverPeng Xu2014-12-031-0/+15
| | | | | | | | Using QCA vendor command, allow ACS function to be offloaded to the driver. Once channels are selected, hostapd is notified to perform OBSS operation. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Fix hostapd operation without hw_mode driver dataJouni Malinen2014-11-161-1/+2
| | | | | | | | | | | | Commit 7f0303d5b0bb425f3e7318a7016b55ba9e67f9de ('hostapd: Verify VHT 160/80+80 MHz driver support') added couple of hapd->iface->current_mode dereferences of which the one in hostapd_set_freq() can be hit with some configuration files when using driver wrappers that do not have hw_mode data, i.e., when current_mode is NULL. This could result in segmentation fault when trying to use driver=wired. Fix this by checking that current_mode is not NULL before dereferencing it to get vht_capab. Signed-off-by: Jouni Malinen <j@w1.fi>
* Add rsn_pairwise bits to set_ieee8021x() driver_opsDarshan Paranji Sri2014-06-031-1/+2
| | | | | | | | | | | | | | | | | This fixes an issue where a driver using the deprecated set_ieee8021x() callback did not include rsn_pairwise bits in the driver configuration even if mixed WPA+WPA2 configuration was used. This could result, e.g., in CCMP not being enabled properly when wpa_pairwise=TKIP and rsn_pairwise=CCMP was used in the configuration. Fix this by using bitwise OR of the wpa_pairwise and rsn_pairwise values to allow the driver to enable all pairwise ciphers. In addition, make the newer set_ap() driver_ops use the same bitwise OR design instead of picking between rsn_pairwise and wpa_pairwise. This makes the code paths consistent and can also fix issues with mixed mode configuration with set_ap(). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* DFS: Print CAC info in ctrl_iface STATUS commandJanusz Dziedzic2014-03-281-1/+3
| | | | | | Print CAC time and CAC left time in control interface STATUS command. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* WPS: Enable WSC 2.0 support unconditionallyJouni Malinen2014-03-251-2/+2
| | | | | | | | | There is not much point in building devices with WPS 1.0 only supported nowadays. As such, there is not sufficient justification for maintaining extra complexity for the CONFIG_WPS2 build option either. Remove this by enabling WSC 2.0 support unconditionally. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* hostapd: For VHT 20/40, allow center segment 0 to be zeroJohannes Berg2014-03-141-1/+2
| | | | | | | | | | The 802.11ac amendment specifies that that the center segment 0 field is reserved, so it should be zero. Hostapd previously required it to be set, which is likely a good idea for interoperability, but allow it to be unset. However, don't allow it to be set to a random value, only allow zero and the correct channel. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* DFS: Print error in case CAC failsJanusz Dziedzic2014-03-051-1/+3
| | | | | | | | | | Previously, we printed this message as a debug one, which was confusing in case verbose debug messages were disabled. User could think CAC started but never ended. Add more parameterss to DFS_EVENT_CAC_START, so external programs can more easily check what was wrong in case of errors. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* HS 2.0R2 AP: Add OSEN implementationJouni Malinen2014-02-251-0/+11
| | | | Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* hostapd: Add Operating Mode Notification supportMarek Kwaczynski2014-02-141-1/+3
| | | | | | | Handle Operating Mode Notification received in (Re)Association Request frames. Signed-hostap: Marek Kwaczynski <marek.kwaczynski@tieto.com>
* WNM: Fix AP processing without wnm_oper driver callbackJouni Malinen2013-12-271-1/+1
| | | | | | | | hostapd_drv_wnm_oper() needs to indicate an error if the driver callback function is not implemented. Without this, the buf_len argument could have been left uninitialized which could result in crashing the process. Signed-hostap: Jouni Malinen <j@w1.fi>
* Include driver.h in hostapd.hAndrei Otcheretianski2013-12-241-1/+0
| | | | | | | This allows use of structs (and not only pointers) defined in drivers.h. Remove also some not needed forward declarations and redundant includes. Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>