wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Enumerations | Functions | Variables
driver.h File Reference

Driver interface definition. More...

#include "common/defs.h"
#include "common/ieee802_11_defs.h"
#include "utils/list.h"

Go to the source code of this file.

Data Structures

struct  hostapd_channel_data
 Channel information. More...
 
struct  hostapd_hw_modes
 Supported hardware mode information. More...
 
struct  wpa_scan_res
 Scan result for an BSS/IBSS. More...
 
struct  wpa_scan_results
 Scan results. More...
 
struct  wpa_interface_info
 Network interface information. More...
 
struct  wpa_driver_scan_params
 Scan parameters Data for struct wpa_driver_ops::scan2(). More...
 
struct  wpa_driver_scan_params::wpa_driver_scan_ssid
 SSIDs to scan for. More...
 
struct  wpa_driver_scan_params::wpa_driver_scan_filter
 Filter for reporting SSIDs. More...
 
struct  wpa_driver_auth_params
 Authentication parameters Data for struct wpa_driver_ops::authenticate(). More...
 
struct  hostapd_freq_params
 Channel parameters. More...
 
struct  wpa_driver_associate_params
 Association parameters Data for struct wpa_driver_ops::associate(). More...
 
struct  wowlan_triggers
 
struct  wpa_driver_ap_params
 
struct  wpa_driver_mesh_bss_params
 
struct  wpa_driver_mesh_join_params
 
struct  wpa_driver_capa
 Driver capability information. More...
 
struct  hostap_sta_driver_data
 
struct  hostapd_sta_add_params
 
struct  mac_address
 
struct  hostapd_acl_params
 
struct  wpa_init_params
 
struct  wpa_bss_params
 
struct  wpa_signal_info
 Information about channel signal quality. More...
 
struct  beacon_data
 Beacon data. More...
 
struct  csa_settings
 Settings for channel switch command. More...
 
struct  wmm_params
 WMM parameterss configured for this association. More...
 
struct  drv_acs_params
 
struct  wpa_driver_ops
 Driver interface API definition. More...
 
struct  freq_survey
 Channel survey info. More...
 
union  wpa_event_data
 union wpa_event_data - Additional data for wpa_supplicant_event() calls More...
 
struct  wpa_event_data::assoc_info
 Data for EVENT_ASSOC and EVENT_ASSOCINFO events. More...
 
struct  wpa_event_data::disassoc_info
 Data for EVENT_DISASSOC events. More...
 
struct  wpa_event_data::deauth_info
 Data for EVENT_DEAUTH events. More...
 
struct  wpa_event_data::michael_mic_failure
 Data for EVENT_MICHAEL_MIC_FAILURE. More...
 
struct  wpa_event_data::interface_status
 Data for EVENT_INTERFACE_STATUS. More...
 
struct  wpa_event_data::pmkid_candidate
 Data for EVENT_PMKID_CANDIDATE. More...
 
struct  wpa_event_data::stkstart
 Data for EVENT_STKSTART. More...
 
struct  wpa_event_data::tdls
 Data for EVENT_TDLS. More...
 
struct  wpa_event_data::wnm
 Data for EVENT_WNM. More...
 
struct  wpa_event_data::ft_ies
 FT information elements (EVENT_FT_RESPONSE) More...
 
struct  wpa_event_data::ibss_rsn_start
 Data for EVENT_IBSS_RSN_START. More...
 
struct  wpa_event_data::auth_info
 Data for EVENT_AUTH events. More...
 
struct  wpa_event_data::assoc_reject
 Data for EVENT_ASSOC_REJECT events. More...
 
struct  wpa_event_data::timeout_event
 
struct  wpa_event_data::tx_status
 Data for EVENT_TX_STATUS events. More...
 
struct  wpa_event_data::rx_from_unknown
 Data for EVENT_RX_FROM_UNKNOWN events. More...
 
struct  wpa_event_data::rx_mgmt
 Data for EVENT_RX_MGMT events. More...
 
struct  wpa_event_data::remain_on_channel
 Data for EVENT_REMAIN_ON_CHANNEL events. More...
 
struct  wpa_event_data::scan_info
 Optional data for EVENT_SCAN_RESULTS events. More...
 
struct  wpa_event_data::rx_probe_req
 Data for EVENT_RX_PROBE_REQ events. More...
 
struct  wpa_event_data::new_sta
 Data for EVENT_NEW_STA events. More...
 
struct  wpa_event_data::eapol_rx
 Data for EVENT_EAPOL_RX events. More...
 
struct  wpa_event_data::best_channel
 Data for EVENT_BEST_CHANNEL events. More...
 
struct  wpa_event_data::unprot_deauth
 
struct  wpa_event_data::unprot_disassoc
 
struct  wpa_event_data::low_ack
 Data for EVENT_STATION_LOW_ACK events. More...
 
struct  wpa_event_data::ibss_peer_lost
 Data for EVENT_IBSS_PEER_LOST. More...
 
struct  wpa_event_data::driver_gtk_rekey
 Data for EVENT_DRIVER_GTK_REKEY. More...
 
struct  wpa_event_data::client_poll
 Data for EVENT_DRIVER_CLIENT_POLL_OK events. More...
 
struct  wpa_event_data::eapol_tx_status
 struct eapol_tx_status More...
 
struct  wpa_event_data::ch_switch
 struct ch_switch More...
 
struct  wpa_event_data::connect_failed_reason
 Data for EVENT_CONNECT_FAILED_REASON. More...
 
struct  wpa_event_data::dfs_event
 Data for radar detected events. More...
 
struct  wpa_event_data::survey_results
 Survey result data for EVENT_SURVEY. More...
 
struct  wpa_event_data::channel_list_changed
 Data for EVENT_CHANNEL_LIST_CHANGED. More...
 
struct  wpa_event_data::mesh_peer
 struct mesh_peer More...
 
struct  wpa_event_data::acs_selected_channels
 Data for EVENT_ACS_CHANNEL_SELECTED. More...
 

Macros

#define WPA_SUPPLICANT_DRIVER_VERSION   4
 
#define HOSTAPD_CHAN_DISABLED   0x00000001
 
#define HOSTAPD_CHAN_NO_IR   0x00000002
 
#define HOSTAPD_CHAN_RADAR   0x00000008
 
#define HOSTAPD_CHAN_HT40PLUS   0x00000010
 
#define HOSTAPD_CHAN_HT40MINUS   0x00000020
 
#define HOSTAPD_CHAN_HT40   0x00000040
 
#define HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED   0x00000080
 
#define HOSTAPD_CHAN_DFS_UNKNOWN   0x00000000
 
#define HOSTAPD_CHAN_DFS_USABLE   0x00000100
 
#define HOSTAPD_CHAN_DFS_UNAVAILABLE   0x00000200
 
#define HOSTAPD_CHAN_DFS_AVAILABLE   0x00000300
 
#define HOSTAPD_CHAN_DFS_MASK   0x00000300
 
#define HOSTAPD_CHAN_VHT_10_70   0x00000800
 
#define HOSTAPD_CHAN_VHT_30_50   0x00001000
 
#define HOSTAPD_CHAN_VHT_50_30   0x00002000
 
#define HOSTAPD_CHAN_VHT_70_10   0x00004000
 
#define HOSTAPD_CHAN_INDOOR_ONLY   0x00010000
 
#define HOSTAPD_CHAN_GO_CONCURRENT   0x00020000
 
#define HOSTAPD_MODE_FLAG_HT_INFO_KNOWN   BIT(0)
 
#define HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN   BIT(1)
 
#define IEEE80211_MODE_INFRA   0
 
#define IEEE80211_MODE_IBSS   1
 
#define IEEE80211_MODE_AP   2
 
#define IEEE80211_MODE_MESH   5
 
#define IEEE80211_CAP_ESS   0x0001
 
#define IEEE80211_CAP_IBSS   0x0002
 
#define IEEE80211_CAP_PRIVACY   0x0010
 
#define IEEE80211_CAP_RRM   0x1000
 
#define IEEE80211_CAP_DMG_MASK   0x0003
 
#define IEEE80211_CAP_DMG_IBSS   0x0001 /* Tx by: STA */
 
#define IEEE80211_CAP_DMG_PBSS   0x0002 /* Tx by: PCP */
 
#define IEEE80211_CAP_DMG_AP   0x0003 /* Tx by: AP */
 
#define WPA_SCAN_QUAL_INVALID   BIT(0)
 
#define WPA_SCAN_NOISE_INVALID   BIT(1)
 
#define WPA_SCAN_LEVEL_INVALID   BIT(2)
 
#define WPA_SCAN_LEVEL_DBM   BIT(3)
 
#define WPA_SCAN_ASSOCIATED   BIT(5)
 
#define WPAS_MAX_SCAN_SSIDS   16
 
#define WPA_DRIVER_MESH_CONF_FLAG_AUTO_PLINKS   0x00000001
 
#define WPA_DRIVER_MESH_FLAG_USER_MPM   0x00000001
 
#define WPA_DRIVER_MESH_FLAG_DRIVER_MPM   0x00000002
 
#define WPA_DRIVER_MESH_FLAG_SAE_AUTH   0x00000004
 
#define WPA_DRIVER_MESH_FLAG_AMPE   0x00000008
 
#define WPA_DRIVER_CAPA_KEY_MGMT_WPA   0x00000001
 
#define WPA_DRIVER_CAPA_KEY_MGMT_WPA2   0x00000002
 
#define WPA_DRIVER_CAPA_KEY_MGMT_WPA_PSK   0x00000004
 
#define WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK   0x00000008
 
#define WPA_DRIVER_CAPA_KEY_MGMT_WPA_NONE   0x00000010
 
#define WPA_DRIVER_CAPA_KEY_MGMT_FT   0x00000020
 
#define WPA_DRIVER_CAPA_KEY_MGMT_FT_PSK   0x00000040
 
#define WPA_DRIVER_CAPA_KEY_MGMT_WAPI_PSK   0x00000080
 
#define WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B   0x00000100
 
#define WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B_192   0x00000200
 
#define WPA_DRIVER_CAPA_ENC_WEP40   0x00000001
 
#define WPA_DRIVER_CAPA_ENC_WEP104   0x00000002
 
#define WPA_DRIVER_CAPA_ENC_TKIP   0x00000004
 
#define WPA_DRIVER_CAPA_ENC_CCMP   0x00000008
 
#define WPA_DRIVER_CAPA_ENC_WEP128   0x00000010
 
#define WPA_DRIVER_CAPA_ENC_GCMP   0x00000020
 
#define WPA_DRIVER_CAPA_ENC_GCMP_256   0x00000040
 
#define WPA_DRIVER_CAPA_ENC_CCMP_256   0x00000080
 
#define WPA_DRIVER_CAPA_ENC_BIP   0x00000100
 
#define WPA_DRIVER_CAPA_ENC_BIP_GMAC_128   0x00000200
 
#define WPA_DRIVER_CAPA_ENC_BIP_GMAC_256   0x00000400
 
#define WPA_DRIVER_CAPA_ENC_BIP_CMAC_256   0x00000800
 
#define WPA_DRIVER_CAPA_ENC_GTK_NOT_USED   0x00001000
 
#define WPA_DRIVER_AUTH_OPEN   0x00000001
 
#define WPA_DRIVER_AUTH_SHARED   0x00000002
 
#define WPA_DRIVER_AUTH_LEAP   0x00000004
 
#define WPA_DRIVER_FLAGS_DRIVER_IE   0x00000001
 Driver generated WPA/RSN IE.
 
#define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC   0x00000002
 Driver needs static WEP key setup after association command.
 
#define WPA_DRIVER_FLAGS_DFS_OFFLOAD   0x00000004
 Driver takes care of all DFS operations.
 
#define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE   0x00000008
 
#define WPA_DRIVER_FLAGS_WIRED   0x00000010
 Driver is for a wired Ethernet interface.
 
#define WPA_DRIVER_FLAGS_SME   0x00000020
 
#define WPA_DRIVER_FLAGS_AP   0x00000040
 Driver supports AP mode.
 
#define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE   0x00000080
 Driver needs static WEP key setup after association has been completed.
 
#define WPA_DRIVER_FLAGS_HT_2040_COEX   0x00000100
 Driver supports dynamic HT 20/40 MHz channel changes during BSS lifetime.
 
#define WPA_DRIVER_FLAGS_P2P_CONCURRENT   0x00000200
 Driver supports concurrent P2P operations.
 
#define WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE   0x00000400
 Driver uses the initial interface as a dedicated management interface, i.e., it cannot be used for P2P group operations or non-P2P purposes.
 
#define WPA_DRIVER_FLAGS_P2P_CAPABLE   0x00000800
 This interface is P2P capable (P2P GO or P2P Client)
 
#define WPA_DRIVER_FLAGS_AP_TEARDOWN_SUPPORT   0x00001000
 Driver supports station and key removal when stopping an AP.
 
#define WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P   0x00002000
 Driver uses the initial interface for P2P management interface and non-P2P purposes (e.g., connect to infra AP), but this interface cannot be used for P2P group operations.
 
#define WPA_DRIVER_FLAGS_SANE_ERROR_CODES   0x00004000
 Driver is known to use sane error codes, i.e., when it indicates that something (e.g., association) fails, there was indeed a failure and the operation does not end up getting completed successfully later.
 
#define WPA_DRIVER_FLAGS_OFFCHANNEL_TX   0x00008000
 Driver supports off-channel TX.
 
#define WPA_DRIVER_FLAGS_EAPOL_TX_STATUS   0x00010000
 Driver indicates TX status events for EAPOL Data frames.
 
#define WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS   0x00020000
 Driver indicates TX status events for Deauth/Disassoc frames.
 
#define WPA_DRIVER_FLAGS_BSS_SELECTION   0x00040000
 Driver supports roaming (BSS selection) in firmware.
 
#define WPA_DRIVER_FLAGS_TDLS_SUPPORT   0x00080000
 Driver supports operating as a TDLS peer.
 
#define WPA_DRIVER_FLAGS_TDLS_EXTERNAL_SETUP   0x00100000
 Driver requires external TDLS setup/teardown/discovery.
 
#define WPA_DRIVER_FLAGS_PROBE_RESP_OFFLOAD   0x00200000
 Driver indicates support for Probe Response offloading in AP mode.
 
#define WPA_DRIVER_FLAGS_AP_UAPSD   0x00400000
 Driver supports U-APSD in AP mode.
 
#define WPA_DRIVER_FLAGS_INACTIVITY_TIMER   0x00800000
 Driver supports inactivity timer in AP mode.
 
#define WPA_DRIVER_FLAGS_AP_MLME   0x01000000
 Driver expects user space implementation of MLME in AP mode.
 
#define WPA_DRIVER_FLAGS_SAE   0x02000000
 Driver supports SAE with user space SME.
 
#define WPA_DRIVER_FLAGS_OBSS_SCAN   0x04000000
 Driver makes use of OBSS scan mechanism in wpa_supplicant.
 
#define WPA_DRIVER_FLAGS_IBSS   0x08000000
 Driver supports IBSS (Ad-hoc) mode.
 
#define WPA_DRIVER_FLAGS_RADAR   0x10000000
 Driver supports radar detection.
 
#define WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE   0x20000000
 Driver supports a dedicated interface for P2P Device.
 
#define WPA_DRIVER_FLAGS_QOS_MAPPING   0x40000000
 Driver supports QoS Mapping.
 
#define WPA_DRIVER_FLAGS_AP_CSA   0x80000000
 Driver supports CSA in AP mode.
 
#define WPA_DRIVER_FLAGS_MESH   0x0000000100000000ULL
 Driver supports mesh.
 
#define WPA_DRIVER_FLAGS_ACS_OFFLOAD   0x0000000200000000ULL
 Driver support ACS offload.
 
#define WPA_DRIVER_FLAGS_KEY_MGMT_OFFLOAD   0x0000000400000000ULL
 Driver supports key management offload.
 
#define WPA_DRIVER_FLAGS_TDLS_CHANNEL_SWITCH   0x0000000800000000ULL
 Driver supports TDLS channel switching.
 
#define WPA_DRIVER_FLAGS_HT_IBSS   0x0000001000000000ULL
 Driver supports IBSS with HT datarates.
 
#define WPA_DRIVER_FLAGS_VHT_IBSS   0x0000002000000000ULL
 Driver supports IBSS with VHT datarates.
 
#define WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY   0x0000004000000000ULL
 Driver supports automatic band selection.
 
#define WPA_DRIVER_SMPS_MODE_STATIC   0x00000001
 
#define WPA_DRIVER_SMPS_MODE_DYNAMIC   0x00000002
 
#define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS   0x00000001
 Bitmap of supported protocols by the driver for Probe Response offloading. More...
 
#define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS2   0x00000002
 Driver Probe Response offloading support for WPS ver. 2.
 
#define WPA_DRIVER_PROBE_RESP_OFFLOAD_P2P   0x00000004
 Driver Probe Response offloading support for P2P.
 
#define WPA_DRIVER_PROBE_RESP_OFFLOAD_INTERWORKING   0x00000008
 Driver Probe Response offloading support for IEEE 802.11u (Interworking)
 
#define WPA_DRIVER_FLAGS_DS_PARAM_SET_IE_IN_PROBES   0x00000001
 Driver adds the DS Params Set IE in Probe Request frames.
 
#define WPA_DRIVER_FLAGS_WFA_TPC_IE_IN_PROBES   0x00000002
 Driver adds the WFA TPC IE in Probe Request frames.
 
#define WPA_DRIVER_FLAGS_QUIET   0x00000004
 Driver handles quiet period requests.
 
#define WPA_DRIVER_FLAGS_TX_POWER_INSERTION   0x00000008
 Driver is capable of inserting the current TX power value into the body of transmitted frames. Background: Some Action frames include a TPC Report IE. This IE contains a TX power field, which has to be updated by lower layers. One such Action frame is Link Measurement Report (part of RRM). Another is TPC Report (part of spectrum management). Note that this insertion takes place at a fixed offset, namely the 6th byte in the Action frame body.
 
#define WPA_STA_AUTHORIZED   BIT(0)
 
#define WPA_STA_WMM   BIT(1)
 
#define WPA_STA_SHORT_PREAMBLE   BIT(2)
 
#define WPA_STA_MFP   BIT(3)
 
#define WPA_STA_TDLS_PEER   BIT(4)
 
#define WPA_STA_AUTHENTICATED   BIT(5)
 
#define SURVEY_HAS_NF   BIT(0)
 
#define SURVEY_HAS_CHAN_TIME   BIT(1)
 
#define SURVEY_HAS_CHAN_TIME_BUSY   BIT(2)
 
#define SURVEY_HAS_CHAN_TIME_RX   BIT(3)
 
#define SURVEY_HAS_CHAN_TIME_TX   BIT(4)
 

Enumerations

enum  reg_change_initiator {
  REGDOM_SET_BY_CORE, REGDOM_SET_BY_USER, REGDOM_SET_BY_DRIVER, REGDOM_SET_BY_COUNTRY_IE,
  REGDOM_BEACON_HINT
}
 Regulatory change initiator.
 
enum  reg_type {
  REGDOM_TYPE_UNKNOWN, REGDOM_TYPE_COUNTRY, REGDOM_TYPE_WORLD, REGDOM_TYPE_CUSTOM_WORLD,
  REGDOM_TYPE_INTERSECTION
}
 Regulatory change types.
 
enum  wps_mode { WPS_MODE_NONE, WPS_MODE_OPEN, WPS_MODE_PRIVACY }
 WPS mode. More...
 
enum  hide_ssid { NO_SSID_HIDING, HIDDEN_SSID_ZERO_LEN, HIDDEN_SSID_ZERO_CONTENTS }
 
enum  wpa_driver_if_type {
  WPA_IF_STATION, WPA_IF_AP_VLAN, WPA_IF_AP_BSS, WPA_IF_P2P_GO,
  WPA_IF_P2P_CLIENT, WPA_IF_P2P_GROUP, WPA_IF_P2P_DEVICE, WPA_IF_MESH,
  WPA_IF_TDLS, WPA_IF_IBSS
}
 
enum  tdls_oper {
  TDLS_DISCOVERY_REQ, TDLS_SETUP, TDLS_TEARDOWN, TDLS_ENABLE_LINK,
  TDLS_DISABLE_LINK, TDLS_ENABLE, TDLS_DISABLE
}
 
enum  wnm_oper {
  WNM_SLEEP_ENTER_CONFIRM, WNM_SLEEP_ENTER_FAIL, WNM_SLEEP_EXIT_CONFIRM, WNM_SLEEP_EXIT_FAIL,
  WNM_SLEEP_TFS_REQ_IE_ADD, WNM_SLEEP_TFS_REQ_IE_NONE, WNM_SLEEP_TFS_REQ_IE_SET, WNM_SLEEP_TFS_RESP_IE_ADD,
  WNM_SLEEP_TFS_RESP_IE_NONE, WNM_SLEEP_TFS_RESP_IE_SET, WNM_SLEEP_TFS_IE_DEL
}
 
enum  chan_width {
  CHAN_WIDTH_20_NOHT, CHAN_WIDTH_20, CHAN_WIDTH_40, CHAN_WIDTH_80,
  CHAN_WIDTH_80P80, CHAN_WIDTH_160, CHAN_WIDTH_UNKNOWN
}
 
enum  tdls_peer_capability { TDLS_PEER_HT = BIT(0), TDLS_PEER_VHT = BIT(1), TDLS_PEER_WMM = BIT(2) }
 
enum  wmm_params_valid_info { WMM_PARAMS_UAPSD_QUEUES_INFO = BIT(0) }
 
enum  drv_br_port_attr { DRV_BR_PORT_ATTR_PROXYARP, DRV_BR_PORT_ATTR_HAIRPIN_MODE }
 
enum  drv_br_net_param { DRV_BR_NET_PARAM_GARP_ACCEPT, DRV_BR_MULTICAST_SNOOPING }
 
enum  wpa_event_type {
  EVENT_ASSOC, EVENT_DISASSOC, EVENT_MICHAEL_MIC_FAILURE, EVENT_SCAN_RESULTS,
  EVENT_ASSOCINFO, EVENT_INTERFACE_STATUS, EVENT_PMKID_CANDIDATE, EVENT_STKSTART,
  EVENT_TDLS, EVENT_FT_RESPONSE, EVENT_IBSS_RSN_START, EVENT_AUTH,
  EVENT_DEAUTH, EVENT_ASSOC_REJECT, EVENT_AUTH_TIMED_OUT, EVENT_ASSOC_TIMED_OUT,
  EVENT_WPS_BUTTON_PUSHED, EVENT_TX_STATUS, EVENT_RX_FROM_UNKNOWN, EVENT_RX_MGMT,
  EVENT_REMAIN_ON_CHANNEL, EVENT_CANCEL_REMAIN_ON_CHANNEL, EVENT_RX_PROBE_REQ, EVENT_NEW_STA,
  EVENT_EAPOL_RX, EVENT_SIGNAL_CHANGE, EVENT_INTERFACE_ENABLED, EVENT_INTERFACE_DISABLED,
  EVENT_CHANNEL_LIST_CHANGED, EVENT_INTERFACE_UNAVAILABLE, EVENT_BEST_CHANNEL, EVENT_UNPROT_DEAUTH,
  EVENT_UNPROT_DISASSOC, EVENT_STATION_LOW_ACK, EVENT_IBSS_PEER_LOST, EVENT_DRIVER_GTK_REKEY,
  EVENT_SCHED_SCAN_STOPPED, EVENT_DRIVER_CLIENT_POLL_OK, EVENT_EAPOL_TX_STATUS, EVENT_CH_SWITCH,
  EVENT_WNM, EVENT_CONNECT_FAILED_REASON, EVENT_DFS_RADAR_DETECTED, EVENT_DFS_CAC_FINISHED,
  EVENT_DFS_CAC_ABORTED, EVENT_DFS_NOP_FINISHED, EVENT_SURVEY, EVENT_SCAN_STARTED,
  EVENT_AVOID_FREQUENCIES, EVENT_NEW_PEER_CANDIDATE, EVENT_ACS_CHANNEL_SELECTED, EVENT_DFS_CAC_STARTED
}
 Event type for wpa_supplicant_event() calls. More...
 

Functions

void wpa_supplicant_event (void *ctx, enum wpa_event_type event, union wpa_event_data *data)
 Report a driver event for wpa_supplicant. More...
 
void wpa_scan_results_free (struct wpa_scan_results *res)
 
const char * event_to_string (enum wpa_event_type event)
 
const char * channel_width_to_string (enum chan_width width)
 
int ht_supported (const struct hostapd_hw_modes *mode)
 
int vht_supported (const struct hostapd_hw_modes *mode)
 
struct wowlan_triggerswpa_get_wowlan_triggers (const char *wowlan_triggers, const struct wpa_driver_capa *capa)
 

Variables

const struct wpa_driver_ops *const wpa_drivers []
 

Detailed Description

Driver interface definition.

This file defines a driver interface used by both wpa_supplicant and hostapd. The first part of the file defines data structures used in various driver operations. This is followed by the struct wpa_driver_ops that each driver wrapper will beed to define with callback functions for requesting driver operations. After this, there are definitions for driver event reporting with wpa_supplicant_event() and some convenience helper functions that can be used to report events.

Macro Definition Documentation

#define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE   0x00000008

Driver takes care of RSN 4-way handshake internally; PMK is configured with struct wpa_driver_ops::set_key using alg = WPA_ALG_PMK

#define WPA_DRIVER_FLAGS_SME   0x00000020

Driver provides separate commands for authentication and association (SME in wpa_supplicant).

#define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS   0x00000001

Bitmap of supported protocols by the driver for Probe Response offloading.

Driver Probe Response offloading support for WPS ver. 1

Enumeration Type Documentation

Enumerator
WPA_IF_STATION 

Station mode interface.

WPA_IF_AP_VLAN 

AP mode VLAN interface.

This interface shares its address and Beacon frame with the main BSS.

WPA_IF_AP_BSS 

AP mode BSS interface.

This interface has its own address and Beacon frame.

WPA_IF_P2P_GO 

P2P Group Owner.

WPA_IF_P2P_CLIENT 

P2P Client.

WPA_IF_P2P_GROUP 

P2P Group interface (will become either WPA_IF_P2P_GO or WPA_IF_P2P_CLIENT, but the role is not yet known)

WPA_IF_P2P_DEVICE 

P2P Device interface is used to indentify the abstracted P2P Device function in the driver.

Event type for wpa_supplicant_event() calls.

Enumerator
EVENT_ASSOC 

Association completed.

This event needs to be delivered when the driver completes IEEE 802.11 association or reassociation successfully. wpa_driver_ops::get_bssid() is expected to provide the current BSSID after this event has been generated. In addition, optional EVENT_ASSOCINFO may be generated just before EVENT_ASSOC to provide more information about the association. If the driver interface gets both of these events at the same time, it can also include the assoc_info data in EVENT_ASSOC call.

EVENT_DISASSOC 

Association lost.

This event should be called when association is lost either due to receiving deauthenticate or disassociate frame from the AP or when sending either of these frames to the current AP. If the driver supports separate deauthentication event, EVENT_DISASSOC should only be used for disassociation and EVENT_DEAUTH for deauthentication. In AP mode, union wpa_event_data::disassoc_info is required.

EVENT_MICHAEL_MIC_FAILURE 

Michael MIC (TKIP) detected.

This event must be delivered when a Michael MIC error is detected by the local driver. Additional data for event processing is provided with union wpa_event_data::michael_mic_failure. This information is used to request new encyption key and to initiate TKIP countermeasures if needed.

EVENT_SCAN_RESULTS 

Scan results available.

This event must be called whenever scan results are available to be fetched with struct wpa_driver_ops::get_scan_results(). This event is expected to be used some time after struct wpa_driver_ops::scan() is called. If the driver provides an unsolicited event when the scan has been completed, this event can be used to trigger EVENT_SCAN_RESULTS call. If such event is not available from the driver, the driver wrapper code is expected to use a registered timeout to generate EVENT_SCAN_RESULTS call after the time that the scan is expected to be completed. Optional information about completed scan can be provided with union wpa_event_data::scan_info.

EVENT_ASSOCINFO 

Report optional extra information for association.

This event can be used to report extra association information for EVENT_ASSOC processing. This extra information includes IEs from association frames and Beacon/Probe Response frames in union wpa_event_data::assoc_info. EVENT_ASSOCINFO must be send just before EVENT_ASSOC. Alternatively, the driver interface can include assoc_info data in the EVENT_ASSOC call if it has all the information available at the same point.

EVENT_INTERFACE_STATUS 

Report interface status changes.

This optional event can be used to report changes in interface status (interface added/removed) using union wpa_event_data::interface_status. This can be used to trigger wpa_supplicant to stop and re-start processing for the interface, e.g., when a cardbus card is ejected/inserted.

EVENT_PMKID_CANDIDATE 

Report a candidate AP for pre-authentication.

This event can be used to inform wpa_supplicant about candidates for RSN (WPA2) pre-authentication. If wpa_supplicant is not responsible for scan request (ap_scan=2 mode), this event is required for pre-authentication. If wpa_supplicant is performing scan request (ap_scan=1), this event is optional since scan results can be used to add pre-authentication candidates. union wpa_event_data::pmkid_candidate is used to report the BSSID of the candidate and priority of the candidate, e.g., based on the signal strength, in order to try to pre-authenticate first with candidates that are most likely targets for re-association.

EVENT_PMKID_CANDIDATE can be called whenever the driver has updates on the candidate list. In addition, it can be called for the current AP and APs that have existing PMKSA cache entries. wpa_supplicant will automatically skip pre-authentication in cases where a valid PMKSA exists. When more than one candidate exists, this event should be generated once for each candidate.

Driver will be notified about successful pre-authentication with struct wpa_driver_ops::add_pmkid() calls.

EVENT_STKSTART 

Request STK handshake (MLME-STKSTART.request)

This event can be used to inform wpa_supplicant about desire to set up secure direct link connection between two stations as defined in IEEE 802.11e with a new PeerKey mechanism that replaced the original STAKey negotiation. The caller will need to set peer address for the event.

EVENT_TDLS 

Request TDLS operation.

This event can be used to request a TDLS operation to be performed.

EVENT_FT_RESPONSE 

Report FT (IEEE 802.11r) response IEs.

The driver is expected to report the received FT IEs from FT authentication sequence from the AP. The FT IEs are included in the extra information in union wpa_event_data::ft_ies.

EVENT_IBSS_RSN_START 

Request RSN authentication in IBSS.

The driver can use this event to inform wpa_supplicant about a STA in an IBSS with which protected frames could be exchanged. This event starts RSN authentication with the other STA to authenticate the STA and set up encryption keys with it.

EVENT_AUTH 

Authentication result.

This event should be called when authentication attempt has been completed. This is only used if the driver supports separate authentication step (struct wpa_driver_ops::authenticate). Information about authentication result is included in union wpa_event_data::auth.

EVENT_DEAUTH 

Authentication lost.

This event should be called when authentication is lost either due to receiving deauthenticate frame from the AP or when sending that frame to the current AP. In AP mode, union wpa_event_data::deauth_info is required.

EVENT_ASSOC_REJECT 

Association rejected.

This event should be called when (re)association attempt has been rejected by the AP. Information about the association response is included in union wpa_event_data::assoc_reject.

EVENT_AUTH_TIMED_OUT 

Authentication timed out.

EVENT_ASSOC_TIMED_OUT 

Association timed out.

EVENT_WPS_BUTTON_PUSHED 

Report hardware push button press for WPS.

EVENT_TX_STATUS 

Report TX status.

EVENT_RX_FROM_UNKNOWN 

Report RX from unknown STA.

EVENT_RX_MGMT 

Report RX of a management frame.

EVENT_REMAIN_ON_CHANNEL 

Remain-on-channel duration started.

This event is used to indicate when the driver has started the requested remain-on-channel duration. Information about the operation is included in union wpa_event_data::remain_on_channel.

EVENT_CANCEL_REMAIN_ON_CHANNEL 

Remain-on-channel timed out.

This event is used to indicate when the driver has completed remain-on-channel duration, i.e., may noot be available on the requested channel anymore. Information about the operation is included in union wpa_event_data::remain_on_channel.

EVENT_RX_PROBE_REQ 

Indicate received Probe Request frame.

This event is used to indicate when a Probe Request frame has been received. Information about the received frame is included in union wpa_event_data::rx_probe_req. The driver is required to report these events only after successfully completed probe_req_report() commands to request the events (i.e., report parameter is non-zero) in station mode. In AP mode, Probe Request frames should always be reported.

EVENT_NEW_STA 

New wired device noticed.

This event is used to indicate that a new device has been detected in a network that does not use association-like functionality (i.e., mainly wired Ethernet). This can be used to start EAPOL authenticator when receiving a frame from a device. The address of the device is included in union wpa_event_data::new_sta.

EVENT_EAPOL_RX 

Report received EAPOL frame.

When in AP mode with hostapd, this event is required to be used to deliver the receive EAPOL frames from the driver.

EVENT_SIGNAL_CHANGE 

Indicate change in signal strength.

This event is used to indicate changes in the signal strength observed in frames received from the current AP if signal strength monitoring has been enabled with signal_monitor().

EVENT_INTERFACE_ENABLED 

Notify that interface was enabled.

This event is used to indicate that the interface was enabled after having been previously disabled, e.g., due to rfkill.

EVENT_INTERFACE_DISABLED 

Notify that interface was disabled.

This event is used to indicate that the interface was disabled, e.g., due to rfkill.

EVENT_CHANNEL_LIST_CHANGED 

Channel list changed.

This event is used to indicate that the channel list has changed, e.g., because of a regulatory domain change triggered by scan results including an AP advertising a country code.

EVENT_INTERFACE_UNAVAILABLE 

Notify that interface is unavailable.

This event is used to indicate that the driver cannot maintain this interface in its operation mode anymore. The most likely use for this is to indicate that AP mode operation is not available due to operating channel would need to be changed to a DFS channel when the driver does not support radar detection and another virtual interfaces caused the operating channel to change. Other similar resource conflicts could also trigger this for station mode interfaces. This event can be propagated when channel switching fails.

EVENT_BEST_CHANNEL 

EVENT_BEST_CHANNEL.

Driver generates this event whenever it detects a better channel (e.g., based on RSSI or channel use). This information can be used to improve channel selection for a new AP/P2P group.

EVENT_UNPROT_DEAUTH 

Unprotected Deauthentication frame received.

This event should be called when a Deauthentication frame is dropped due to it not being protected (MFP/IEEE 802.11w). union wpa_event_data::unprot_deauth is required to provide more details of the frame.

EVENT_UNPROT_DISASSOC 

Unprotected Disassociation frame received.

This event should be called when a Disassociation frame is dropped due to it not being protected (MFP/IEEE 802.11w). union wpa_event_data::unprot_disassoc is required to provide more details of the frame.

EVENT_STATION_LOW_ACK 

EVENT_STATION_LOW_ACK.

Driver generates this event whenever it detected that a particular station was lost. Detection can be through massive transmission failures for example.

EVENT_IBSS_PEER_LOST 

IBSS peer not reachable anymore.

EVENT_DRIVER_GTK_REKEY 

Device/driver did GTK rekey.

This event carries the new replay counter to notify wpa_supplicant of the current EAPOL-Key Replay Counter in case the driver/firmware completed Group Key Handshake while the host (including wpa_supplicant was sleeping).

EVENT_SCHED_SCAN_STOPPED 

Scheduled scan was stopped.

EVENT_DRIVER_CLIENT_POLL_OK 

Station responded to poll.

This event indicates that the station responded to the poll initiated with poll_client.

EVENT_EAPOL_TX_STATUS 

notify of EAPOL TX status

EVENT_CH_SWITCH 

AP or GO decided to switch channels.

Described in wpa_event_data.ch_switch

EVENT_WNM 

Request WNM operation.

This event can be used to request a WNM operation to be performed.

EVENT_CONNECT_FAILED_REASON 

Connection failure reason in AP mode.

This event indicates that the driver reported a connection failure with the specified client (for example, max client reached, etc.) in AP mode.

EVENT_DFS_RADAR_DETECTED 

Notify of radar detection.

A radar has been detected on the supplied frequency, hostapd should react accordingly (e.g., change channel).

EVENT_DFS_CAC_FINISHED 

Notify that channel availability check has been completed.

After a successful CAC, the channel can be marked clear and used.

EVENT_DFS_CAC_ABORTED 

Notify that channel availability check has been aborted.

The CAC was not successful, and the channel remains in the previous state. This may happen due to a radar beeing detected or other external influences.

EVENT_DFS_NOP_FINISHED 

Notify that non-occupancy period is over.

The channel which was previously unavailable is now available again.

EVENT_SURVEY 

Received survey data.

This event gets triggered when a driver query is issued for survey data and the requested data becomes available. The returned data is stored in struct survey_results. The results provide at most one survey entry for each frequency and at minimum will provide one survey entry for one frequency. The survey data can be os_malloc()'d and then os_free()'d, so the event callback must only copy data.

EVENT_SCAN_STARTED 

Scan started.

This indicates that driver has started a scan operation either based on a request from wpa_supplicant/hostapd or from another application. EVENT_SCAN_RESULTS is used to indicate when the scan has been completed (either successfully or by getting cancelled).

EVENT_AVOID_FREQUENCIES 

Received avoid frequency range.

This event indicates a set of frequency ranges that should be avoided to reduce issues due to interference or internal co-existence information in the driver.

EVENT_NEW_PEER_CANDIDATE 

new (unknown) mesh peer notification

EVENT_ACS_CHANNEL_SELECTED 

Received selected channels by ACS.

Indicates a pair of primary and secondary channels chosen by ACS in device.

EVENT_DFS_CAC_STARTED 

Notify that channel availability check has been started.

This event indicates that channel availability check has been started on a DFS frequency by a driver that supports DFS Offload.

enum wps_mode

WPS mode.

Enumerator
WPS_MODE_NONE 

No WPS provisioning being used.

WPS_MODE_OPEN 

WPS provisioning with AP that is in open mode.

WPS_MODE_PRIVACY 

WPS provisioning with AP that is using protection.

Function Documentation

void wpa_supplicant_event ( void *  ctx,
enum wpa_event_type  event,
union wpa_event_data data 
)

Report a driver event for wpa_supplicant.

Parameters
ctxContext pointer (wpa_s); this is the ctx variable registered with struct wpa_driver_ops::init()
eventevent type (defined above)
datapossible extra data for the event

Driver wrapper code should call this function whenever an event is received from the driver.