driver.h revision e0e48dc666fb14a7bb60264ca87463ba7bc1fe0b
18d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* 28d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Driver interface definition 3c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * Copyright (c) 2003-2012, Jouni Malinen <j@w1.fi> 48d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 5c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * This software may be distributed under the terms of the BSD license. 6c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * See README for more details. 78d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 88d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This file defines a driver interface used by both %wpa_supplicant and 98d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * hostapd. The first part of the file defines data structures used in various 108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * driver operations. This is followed by the struct wpa_driver_ops that each 118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * driver wrapper will beed to define with callback functions for requesting 128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * driver operations. After this, there are definitions for driver event 138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * reporting with wpa_supplicant_event() and some convenience helper functions 148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * that can be used to report events. 158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#ifndef DRIVER_H 188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define DRIVER_H 198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_SUPPLICANT_DRIVER_VERSION 4 218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#include "common/defs.h" 23b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt#include "utils/list.h" 248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define HOSTAPD_CHAN_DISABLED 0x00000001 268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define HOSTAPD_CHAN_PASSIVE_SCAN 0x00000002 278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define HOSTAPD_CHAN_NO_IBSS 0x00000004 288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define HOSTAPD_CHAN_RADAR 0x00000008 298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define HOSTAPD_CHAN_HT40PLUS 0x00000010 308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define HOSTAPD_CHAN_HT40MINUS 0x00000020 318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define HOSTAPD_CHAN_HT40 0x00000040 32391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt#define HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED 0x00000080 338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 34ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt#define HOSTAPD_CHAN_DFS_UNKNOWN 0x00000000 35ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt#define HOSTAPD_CHAN_DFS_USABLE 0x00000100 36ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt#define HOSTAPD_CHAN_DFS_UNAVAILABLE 0x00000200 37ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt#define HOSTAPD_CHAN_DFS_AVAILABLE 0x00000300 38ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt#define HOSTAPD_CHAN_DFS_MASK 0x00000300 39ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt 4068d0e3ed07847339aedfac8e02f50db68c702e52Dmitry Shmidt#define HOSTAPD_CHAN_VHT_10_70 0x00000800 4168d0e3ed07847339aedfac8e02f50db68c702e52Dmitry Shmidt#define HOSTAPD_CHAN_VHT_30_50 0x00001000 4268d0e3ed07847339aedfac8e02f50db68c702e52Dmitry Shmidt#define HOSTAPD_CHAN_VHT_50_30 0x00002000 4368d0e3ed07847339aedfac8e02f50db68c702e52Dmitry Shmidt#define HOSTAPD_CHAN_VHT_70_10 0x00004000 4468d0e3ed07847339aedfac8e02f50db68c702e52Dmitry Shmidt 45e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidtenum reg_change_initiator { 46e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt REGDOM_SET_BY_CORE, 47e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt REGDOM_SET_BY_USER, 48e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt REGDOM_SET_BY_DRIVER, 49e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt REGDOM_SET_BY_COUNTRY_IE, 50e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt}; 51e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt 528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct hostapd_channel_data - Channel information 548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct hostapd_channel_data { 568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * chan - Channel number (IEEE 802.11) 588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt short chan; 608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * freq - Frequency in MHz 638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 64d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt int freq; 658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * flag - Channel flags (HOSTAPD_CHAN_*) 688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int flag; 708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 7268d0e3ed07847339aedfac8e02f50db68c702e52Dmitry Shmidt * max_tx_power - Regulatory transmit power limit in dBm 738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 max_tx_power; 75b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt 76b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt /* 77b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * survey_list - Linked list of surveys 78b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt */ 79b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt struct dl_list survey_list; 80b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt 81b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt /** 82b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * min_nf - Minimum observed noise floor, in dBm, based on all 83b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * surveyed channel data 84b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt */ 85b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt s8 min_nf; 86391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt 87391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt#ifdef CONFIG_ACS 88391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt /** 89391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt * interference_factor - Computed interference factor on this 90391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt * channel (used internally in src/ap/acs.c; driver wrappers do not 91391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt * need to set this) 92391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt */ 93391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt long double interference_factor; 94391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt#endif /* CONFIG_ACS */ 958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 971f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define HOSTAPD_MODE_FLAG_HT_INFO_KNOWN BIT(0) 98c2ebb4b85d69b65f552fee71ac68f44e8d87b39eDmitry Shmidt#define HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN BIT(1) 991f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 1008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 1018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct hostapd_hw_modes - Supported hardware mode information 1028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 1038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct hostapd_hw_modes { 1048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 1058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * mode - Hardware mode 1068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 1078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt enum hostapd_hw_mode mode; 1088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 1108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * num_channels - Number of entries in the channels array 1118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 1128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int num_channels; 1138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 1158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * channels - Array of supported channels 1168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 1178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct hostapd_channel_data *channels; 1188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 1208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * num_rates - Number of entries in the rates array 1218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 1228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int num_rates; 1238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 1258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * rates - Array of supported rates in 100 kbps units 1268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 1278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int *rates; 1288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 1308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ht_capab - HT (IEEE 802.11n) capabilities 1318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 1328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 ht_capab; 1338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 1358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * mcs_set - MCS (IEEE 802.11n) rate parameters 1368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 1378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 mcs_set[16]; 1388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 1408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * a_mpdu_params - A-MPDU (IEEE 802.11n) parameters 1418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 1428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 a_mpdu_params; 1431f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 14404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt /** 14504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * vht_capab - VHT (IEEE 802.11ac) capabilities 14604949598a23f501be6eec21697465fd46a28840aDmitry Shmidt */ 14704949598a23f501be6eec21697465fd46a28840aDmitry Shmidt u32 vht_capab; 14804949598a23f501be6eec21697465fd46a28840aDmitry Shmidt 14904949598a23f501be6eec21697465fd46a28840aDmitry Shmidt /** 15004949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * vht_mcs_set - VHT MCS (IEEE 802.11ac) rate parameters 15104949598a23f501be6eec21697465fd46a28840aDmitry Shmidt */ 15204949598a23f501be6eec21697465fd46a28840aDmitry Shmidt u8 vht_mcs_set[8]; 15304949598a23f501be6eec21697465fd46a28840aDmitry Shmidt 1541f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt unsigned int flags; /* HOSTAPD_MODE_FLAG_* */ 1558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 1568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define IEEE80211_MODE_INFRA 0 1598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define IEEE80211_MODE_IBSS 1 1608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define IEEE80211_MODE_AP 2 1618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define IEEE80211_CAP_ESS 0x0001 1638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define IEEE80211_CAP_IBSS 0x0002 1648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define IEEE80211_CAP_PRIVACY 0x0010 1658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 166f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt/* DMG (60 GHz) IEEE 802.11ad */ 167f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt/* type - bits 0..1 */ 168f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt#define IEEE80211_CAP_DMG_MASK 0x0003 169f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt#define IEEE80211_CAP_DMG_IBSS 0x0001 /* Tx by: STA */ 170f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt#define IEEE80211_CAP_DMG_PBSS 0x0002 /* Tx by: PCP */ 171f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt#define IEEE80211_CAP_DMG_AP 0x0003 /* Tx by: AP */ 172f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt 1738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_SCAN_QUAL_INVALID BIT(0) 1748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_SCAN_NOISE_INVALID BIT(1) 1758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_SCAN_LEVEL_INVALID BIT(2) 1768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_SCAN_LEVEL_DBM BIT(3) 1778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_SCAN_AUTHENTICATED BIT(4) 1788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_SCAN_ASSOCIATED BIT(5) 1798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 1818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_scan_res - Scan result for an BSS/IBSS 1828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @flags: information flags about the BSS/IBSS (WPA_SCAN_*) 1838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @bssid: BSSID 1848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @freq: frequency of the channel in MHz (e.g., 2412 = channel 1) 1858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @beacon_int: beacon interval in TUs (host byte order) 1868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @caps: capability information field in host byte order 1878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @qual: signal quality 1888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @noise: noise level 1898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @level: signal level 1908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @tsf: Timestamp 1918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @age: Age of the information in milliseconds (i.e., how many milliseconds 1928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ago the last Beacon or Probe Response frame was received) 1938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ie_len: length of the following IE field in octets 1948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @beacon_ie_len: length of the following Beacon IE field in octets 1958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 1968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This structure is used as a generic format for scan results from the 1978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * driver. Each driver interface implementation is responsible for converting 1988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the driver or OS specific scan results into this format. 1998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 2008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * If the driver does not support reporting all IEs, the IE data structure is 2018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * constructed of the IEs that are available. This field will also need to 2028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * include SSID in IE format. All drivers are encouraged to be extended to 2038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * report all IEs to make it easier to support future additions. 2048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wpa_scan_res { 2068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int flags; 2078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 bssid[ETH_ALEN]; 2088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int freq; 2098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 beacon_int; 2108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 caps; 2118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int qual; 2128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int noise; 2138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int level; 2148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u64 tsf; 2158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int age; 2168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ie_len; 2178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t beacon_ie_len; 2188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /* 2198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Followed by ie_len octets of IEs from Probe Response frame (or if 2208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the driver does not indicate source of IEs, these may also be from 2218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Beacon frame). After the first set of IEs, another set of IEs may 2228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * follow (with beacon_ie_len octets of data) if the driver provides 2238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * both IE sets. 2248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 2268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 2288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_scan_results - Scan results 2298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @res: Array of pointers to allocated variable length scan result entries 2308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @num: Number of entries in the scan result array 231f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt * @fetch_time: Time when the results were fetched from the driver 2328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wpa_scan_results { 2348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_scan_res **res; 2358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t num; 236f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt struct os_time fetch_time; 2378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 2388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 2408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_interface_info - Network interface information 2418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @next: Pointer to the next interface or NULL if this is the last one 2428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ifname: Interface name that can be used with init() or init2() 2438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @desc: Human readable adapter description (e.g., vendor/model) or NULL if 2448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * not available 2458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @drv_name: struct wpa_driver_ops::name (note: unlike other strings, this one 2468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * is not an allocated copy, i.e., get_interfaces() caller will not free 2478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * this) 2488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wpa_interface_info { 2508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_interface_info *next; 2518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt char *ifname; 2528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt char *desc; 2538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *drv_name; 2548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 2558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2561f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WPAS_MAX_SCAN_SSIDS 16 2578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 2598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_scan_params - Scan parameters 2608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Data for struct wpa_driver_ops::scan2(). 2618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wpa_driver_scan_params { 2638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 2648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ssids - SSIDs to scan for 2658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_driver_scan_ssid { 2678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 2688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ssid - specific SSID to scan for (ProbeReq) 2698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * %NULL or zero-length SSID is used to indicate active scan 2708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * with wildcard SSID. 2718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ssid; 2738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 2748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ssid_len: Length of the SSID in octets 2758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ssid_len; 2778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } ssids[WPAS_MAX_SCAN_SSIDS]; 2788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 2808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * num_ssids - Number of entries in ssids array 2818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Zero indicates a request for a passive scan. 2828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t num_ssids; 2848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 2868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * extra_ies - Extra IE(s) to add into Probe Request or %NULL 2878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *extra_ies; 2898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 2918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * extra_ies_len - Length of extra_ies in octets 2928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t extra_ies_len; 2948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 2968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * freqs - Array of frequencies to scan or %NULL for all frequencies 2978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 2988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * The frequency is set in MHz. The array is zero-terminated. 2998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 3008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int *freqs; 3018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 3038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * filter_ssids - Filter for reporting SSIDs 3048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 3058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This optional parameter can be used to request the driver wrapper to 3068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * filter scan results to include only the specified SSIDs. %NULL 3078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * indicates that no filtering is to be done. This can be used to 3088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * reduce memory needs for scan results in environments that have large 3098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * number of APs with different SSIDs. 3108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 3118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * The driver wrapper is allowed to take this allocated buffer into its 3128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * own use by setting the pointer to %NULL. In that case, the driver 3138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wrapper is responsible for freeing the buffer with os_free() once it 3148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * is not needed anymore. 3158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 3168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_driver_scan_filter { 3178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 ssid[32]; 3188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ssid_len; 3198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } *filter_ssids; 3208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 3228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * num_filter_ssids - Number of entries in filter_ssids array 3238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 3248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t num_filter_ssids; 3251f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 3261f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 32761d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * filter_rssi - Filter by RSSI 32861d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * 32961d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * The driver may filter scan results in firmware to reduce host 33061d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * wakeups and thereby save power. Specify the RSSI threshold in s32 33161d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * dBm. 33261d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt */ 33361d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt s32 filter_rssi; 33461d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt 33561d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt /** 3361f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * p2p_probe - Used to disable CCK (802.11b) rates for P2P probes 3371f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 3381f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * When set, the driver is expected to remove rates 1, 2, 5.5, and 11 3391f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Mbps from the support rates element(s) in the Probe Request frames 3401f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * and not to transmit the frames at any of those rates. 3411f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 3421f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt u8 p2p_probe; 3438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 3448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 3468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_auth_params - Authentication parameters 3478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Data for struct wpa_driver_ops::authenticate(). 3488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 3498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wpa_driver_auth_params { 3508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int freq; 3518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *bssid; 3528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ssid; 3538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ssid_len; 3548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int auth_alg; 3558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ie; 3568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ie_len; 3578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *wep_key[4]; 3588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t wep_key_len[4]; 3598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int wep_tx_keyidx; 3608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int local_state_change; 3611f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 3621f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 3631f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * p2p - Whether this connection is a P2P group 3641f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 3651f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int p2p; 3661f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 367d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt const u8 *sae_data; 368d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt size_t sae_data_len; 369d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt 3708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 3718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtenum wps_mode { 3738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt WPS_MODE_NONE /* no WPS provisioning being used */, 3748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt WPS_MODE_OPEN /* WPS provisioning with AP that is in open mode */, 3758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt WPS_MODE_PRIVACY /* WPS provisioning with AP that is using protection 3768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 3778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 3788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 3808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_associate_params - Association parameters 3818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Data for struct wpa_driver_ops::associate(). 3828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 3838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wpa_driver_associate_params { 3848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 3858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * bssid - BSSID of the selected AP 3868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This can be %NULL, if ap_scan=2 mode is used and the driver is 3878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * responsible for selecting with which BSS to associate. */ 3888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *bssid; 3898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 3918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ssid - The selected SSID 3928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 3938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ssid; 3948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 3968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ssid_len - Length of the SSID (1..32) 3978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 3988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ssid_len; 3998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 4008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 4018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * freq - Frequency of the channel the selected AP is using 4028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Frequency that the selected AP is using (in MHz as 4038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * reported in the scan results) 4048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 4058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int freq; 4068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 4078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 40804949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * bg_scan_period - Background scan period in seconds, 0 to disable 40904949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * background scan, or -1 to indicate no change to default driver 41004949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * configuration 41104949598a23f501be6eec21697465fd46a28840aDmitry Shmidt */ 41204949598a23f501be6eec21697465fd46a28840aDmitry Shmidt int bg_scan_period; 41304949598a23f501be6eec21697465fd46a28840aDmitry Shmidt 41404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt /** 4158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_ie - WPA information element for (Re)Association Request 4168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * WPA information element to be included in (Re)Association 4178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Request (including information element id and length). Use 4188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * of this WPA IE is optional. If the driver generates the WPA 4198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * IE, it can use pairwise_suite, group_suite, and 4208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * key_mgmt_suite to select proper algorithms. In this case, 4218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the driver has to notify wpa_supplicant about the used WPA 4228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * IE by generating an event that the interface code will 4238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * convert into EVENT_ASSOCINFO data (see below). 4248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 4258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * When using WPA2/IEEE 802.11i, wpa_ie is used for RSN IE 4268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * instead. The driver can determine which version is used by 4278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * looking at the first byte of the IE (0xdd for WPA, 0x30 for 4288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * WPA2/RSN). 4298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 4308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * When using WPS, wpa_ie is used for WPS IE instead of WPA/RSN IE. 4318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 4328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *wpa_ie; 4338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 4348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 4358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_ie_len - length of the wpa_ie 4368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 4378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t wpa_ie_len; 4388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 4398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 4401f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * wpa_proto - Bitfield of WPA_PROTO_* values to indicate WPA/WPA2 4411f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 4421f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt unsigned int wpa_proto; 4431f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 4441f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 4458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * pairwise_suite - Selected pairwise cipher suite 4468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 4478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This is usually ignored if @wpa_ie is used. 4488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 4498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt enum wpa_cipher pairwise_suite; 4508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 4518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 4528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * group_suite - Selected group cipher suite 4538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 4548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This is usually ignored if @wpa_ie is used. 4558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 4568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt enum wpa_cipher group_suite; 4578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 4588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 4598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * key_mgmt_suite - Selected key management suite 4608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 4618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This is usually ignored if @wpa_ie is used. 4628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 4638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt enum wpa_key_mgmt key_mgmt_suite; 4648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 4658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 4668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * auth_alg - Allowed authentication algorithms 4678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Bit field of WPA_AUTH_ALG_* 4688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 4698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int auth_alg; 4708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 4718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 4728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * mode - Operation mode (infra/ibss) IEEE80211_MODE_* 4738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 4748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int mode; 4758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 4768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 4778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wep_key - WEP keys for static WEP configuration 4788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 4798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *wep_key[4]; 4808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 4818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 4828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wep_key_len - WEP key length for static WEP configuration 4838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 4848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t wep_key_len[4]; 4858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 4868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 4878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wep_tx_keyidx - WEP TX key index for static WEP configuration 4888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 4898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int wep_tx_keyidx; 4908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 4918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 4928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * mgmt_frame_protection - IEEE 802.11w management frame protection 4938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 4948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt enum mfp_options mgmt_frame_protection; 4958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 4968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 4978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ft_ies - IEEE 802.11r / FT information elements 4988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * If the supplicant is using IEEE 802.11r (FT) and has the needed keys 4998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * for fast transition, this parameter is set to include the IEs that 5008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * are to be sent in the next FT Authentication Request message. 5018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * update_ft_ies() handler is called to update the IEs for further 5028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * FT messages in the sequence. 5038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 5048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * The driver should use these IEs only if the target AP is advertising 5058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the same mobility domain as the one included in the MDIE here. 5068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 5078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * In ap_scan=2 mode, the driver can use these IEs when moving to a new 5088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * AP after the initial association. These IEs can only be used if the 5098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * target AP is advertising support for FT and is using the same MDIE 5108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * and SSID as the current AP. 5118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 5128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * The driver is responsible for reporting the FT IEs received from the 5138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * AP's response using wpa_supplicant_event() with EVENT_FT_RESPONSE 5148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * type. update_ft_ies() handler will then be called with the FT IEs to 5158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * include in the next frame in the authentication sequence. 5168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 5178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ft_ies; 5188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 5198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 5208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ft_ies_len - Length of ft_ies in bytes 5218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 5228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ft_ies_len; 5238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 5248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 5258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ft_md - FT Mobility domain (6 octets) (also included inside ft_ies) 5268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 5278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This value is provided to allow the driver interface easier access 5288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * to the current mobility domain. This value is set to %NULL if no 5298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * mobility domain is currently active. 5308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 5318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ft_md; 5328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 5338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 5348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * passphrase - RSN passphrase for PSK 5358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 5368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This value is made available only for WPA/WPA2-Personal (PSK) and 5378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * only for drivers that set WPA_DRIVER_FLAGS_4WAY_HANDSHAKE. This is 5388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the 8..63 character ASCII passphrase, if available. Please note that 5398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * this can be %NULL if passphrase was not used to generate the PSK. In 5408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * that case, the psk field must be used to fetch the PSK. 5418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 5428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *passphrase; 5438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 5448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 5458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * psk - RSN PSK (alternative for passphrase for PSK) 5468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 5478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This value is made available only for WPA/WPA2-Personal (PSK) and 5488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * only for drivers that set WPA_DRIVER_FLAGS_4WAY_HANDSHAKE. This is 5498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the 32-octet (256-bit) PSK, if available. The driver wrapper should 5508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * be prepared to handle %NULL value as an error. 5518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 5528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *psk; 5538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 5548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 5558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * drop_unencrypted - Enable/disable unencrypted frame filtering 5568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 5578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Configure the driver to drop all non-EAPOL frames (both receive and 5588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * transmit paths). Unencrypted EAPOL frames (ethertype 0x888e) must 5598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * still be allowed for key negotiation. 5608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 5618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int drop_unencrypted; 5628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 5638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 5648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * prev_bssid - Previously used BSSID in this ESS 5658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 5668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * When not %NULL, this is a request to use reassociation instead of 5678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * association. 5688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 5698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *prev_bssid; 5708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 5718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 5728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wps - WPS mode 5738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 5748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * If the driver needs to do special configuration for WPS association, 5758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * this variable provides more information on what type of association 5768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * is being requested. Most drivers should not need ot use this. 5778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 5788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt enum wps_mode wps; 5798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 5808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 5818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p - Whether this connection is a P2P group 5828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 5838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int p2p; 5848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 5858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 5868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * uapsd - UAPSD parameters for the network 5878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * -1 = do not change defaults 5888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * AP mode: 1 = enabled, 0 = disabled 5898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * STA mode: bits 0..3 UAPSD enabled for VO,VI,BK,BE 5908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 5918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int uapsd; 592c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt 593c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt /** 594c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * fixed_bssid - Whether to force this BSSID in IBSS mode 595c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * 1 = Fix this BSSID and prevent merges. 596c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * 0 = Do not fix BSSID. 597c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt */ 598c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt int fixed_bssid; 599c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt 600c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt /** 601c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * disable_ht - Disable HT (IEEE 802.11n) for this connection 602c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt */ 603c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt int disable_ht; 604c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt 605c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt /** 606c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * HT Capabilities over-rides. Only bits set in the mask will be used, 607c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * and not all values are used by the kernel anyway. Currently, MCS, 608c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * MPDU and MSDU fields are used. 609c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt */ 610c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt const u8 *htcaps; /* struct ieee80211_ht_capabilities * */ 611c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt const u8 *htcaps_mask; /* struct ieee80211_ht_capabilities * */ 6122f023193a0fd630eb82ce6381b80911ad5a3462fDmitry Shmidt 6132f023193a0fd630eb82ce6381b80911ad5a3462fDmitry Shmidt#ifdef CONFIG_VHT_OVERRIDES 6142f023193a0fd630eb82ce6381b80911ad5a3462fDmitry Shmidt /** 6152f023193a0fd630eb82ce6381b80911ad5a3462fDmitry Shmidt * disable_vht - Disable VHT for this connection 6162f023193a0fd630eb82ce6381b80911ad5a3462fDmitry Shmidt */ 6172f023193a0fd630eb82ce6381b80911ad5a3462fDmitry Shmidt int disable_vht; 6182f023193a0fd630eb82ce6381b80911ad5a3462fDmitry Shmidt 6192f023193a0fd630eb82ce6381b80911ad5a3462fDmitry Shmidt /** 6202f023193a0fd630eb82ce6381b80911ad5a3462fDmitry Shmidt * VHT capability overrides. 6212f023193a0fd630eb82ce6381b80911ad5a3462fDmitry Shmidt */ 6222f023193a0fd630eb82ce6381b80911ad5a3462fDmitry Shmidt const struct ieee80211_vht_capabilities *vhtcaps; 6232f023193a0fd630eb82ce6381b80911ad5a3462fDmitry Shmidt const struct ieee80211_vht_capabilities *vhtcaps_mask; 6242f023193a0fd630eb82ce6381b80911ad5a3462fDmitry Shmidt#endif /* CONFIG_VHT_OVERRIDES */ 6258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 6268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 6271f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtenum hide_ssid { 6281f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt NO_SSID_HIDING, 6291f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt HIDDEN_SSID_ZERO_LEN, 6301f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt HIDDEN_SSID_ZERO_CONTENTS 6311f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt}; 6321f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 6331f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtstruct wpa_driver_ap_params { 6341f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 6351f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * head - Beacon head from IEEE 802.11 header to IEs before TIM IE 6361f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 637e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt u8 *head; 6381f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 6391f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 6401f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * head_len - Length of the head buffer in octets 6411f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 6421f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt size_t head_len; 6431f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 6441f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 6451f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * tail - Beacon tail following TIM IE 6461f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 647e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt u8 *tail; 6481f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 6491f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 6501f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * tail_len - Length of the tail buffer in octets 6511f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 6521f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt size_t tail_len; 6531f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 6541f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 6551f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * dtim_period - DTIM period 6561f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 6571f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int dtim_period; 6581f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 6591f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 6601f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * beacon_int - Beacon interval 6611f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 6621f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int beacon_int; 6631f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 6641f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 6651f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * basic_rates: -1 terminated array of basic rates in 100 kbps 6661f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 6671f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This parameter can be used to set a specific basic rate set for the 6681f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * BSS. If %NULL, default basic rate set is used. 6691f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 6701f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int *basic_rates; 6711f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 6721f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 6731f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * proberesp - Probe Response template 6741f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 6751f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This is used by drivers that reply to Probe Requests internally in 6761f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * AP mode and require the full Probe Response template. 6771f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 678e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt u8 *proberesp; 6791f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 6801f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 6811f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * proberesp_len - Length of the proberesp buffer in octets 6821f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 6831f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt size_t proberesp_len; 6841f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 6851f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 6861f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * ssid - The SSID to use in Beacon/Probe Response frames 6871f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 6881f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *ssid; 6891f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 6901f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 6911f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * ssid_len - Length of the SSID (1..32) 6921f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 6931f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt size_t ssid_len; 6941f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 6951f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 6961f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * hide_ssid - Whether to hide the SSID 6971f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 6981f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt enum hide_ssid hide_ssid; 6991f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7001f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7011f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * pairwise_ciphers - WPA_CIPHER_* bitfield 7021f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7031f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt unsigned int pairwise_ciphers; 7041f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7051f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7061f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * group_cipher - WPA_CIPHER_* 7071f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7081f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt unsigned int group_cipher; 7091f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7101f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7111f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * key_mgmt_suites - WPA_KEY_MGMT_* bitfield 7121f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7131f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt unsigned int key_mgmt_suites; 7141f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7151f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7161f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * auth_algs - WPA_AUTH_ALG_* bitfield 7171f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7181f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt unsigned int auth_algs; 7191f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7201f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7211f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * wpa_version - WPA_PROTO_* bitfield 7221f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7231f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt unsigned int wpa_version; 7241f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7251f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7261f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * privacy - Whether privacy is used in the BSS 7271f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7281f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int privacy; 7291f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7301f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7311f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * beacon_ies - WPS/P2P IE(s) for Beacon frames 7321f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 7331f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This is used to add IEs like WPS IE and P2P IE by drivers that do 7341f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * not use the full Beacon template. 7351f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7361f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const struct wpabuf *beacon_ies; 7371f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7381f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7391f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * proberesp_ies - P2P/WPS IE(s) for Probe Response frames 7401f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 7411f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This is used to add IEs like WPS IE and P2P IE by drivers that 7421f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * reply to Probe Request frames internally. 7431f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7441f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const struct wpabuf *proberesp_ies; 7451f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7461f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7471f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * assocresp_ies - WPS IE(s) for (Re)Association Response frames 7481f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 7491f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This is used to add IEs like WPS IE by drivers that reply to 7501f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * (Re)Association Request frames internally. 7511f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7521f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const struct wpabuf *assocresp_ies; 7531f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7541f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7551f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * isolate - Whether to isolate frames between associated stations 7561f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 7571f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * If this is non-zero, the AP is requested to disable forwarding of 7581f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * frames between associated stations. 7591f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7601f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int isolate; 7611f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7621f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7631f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * cts_protect - Whether CTS protection is enabled 7641f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7651f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int cts_protect; 7661f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7671f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7681f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * preamble - Whether short preamble is enabled 7691f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7701f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int preamble; 7711f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7721f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7731f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * short_slot_time - Whether short slot time is enabled 7741f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 7751f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 0 = short slot time disable, 1 = short slot time enabled, -1 = do 7761f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * not set (e.g., when 802.11g mode is not in use) 7771f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7781f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int short_slot_time; 7791f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7801f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7811f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * ht_opmode - HT operation mode or -1 if HT not in use 7821f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7831f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int ht_opmode; 7841f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7851f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7861f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * interworking - Whether Interworking is enabled 7871f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7881f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int interworking; 7891f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7901f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7911f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * hessid - Homogeneous ESS identifier or %NULL if not set 7921f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 7931f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *hessid; 7941f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 7951f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 7961f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * access_network_type - Access Network Type (0..15) 7971f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 7981f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This is used for filtering Probe Request frames when Interworking is 7991f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * enabled. 8001f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 8011f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt u8 access_network_type; 80204949598a23f501be6eec21697465fd46a28840aDmitry Shmidt 80304949598a23f501be6eec21697465fd46a28840aDmitry Shmidt /** 80404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * ap_max_inactivity - Timeout in seconds to detect STA's inactivity 80504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * 80604949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * This is used by driver which advertises this capability. 80704949598a23f501be6eec21697465fd46a28840aDmitry Shmidt */ 80804949598a23f501be6eec21697465fd46a28840aDmitry Shmidt int ap_max_inactivity; 80961d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt 81061d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt /** 81161d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * disable_dgaf - Whether group-addressed frames are disabled 81261d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt */ 81361d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt int disable_dgaf; 8141f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt}; 8151f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 8168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 8178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_capa - Driver capability information 8188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 8198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wpa_driver_capa { 8208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_CAPA_KEY_MGMT_WPA 0x00000001 8218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_CAPA_KEY_MGMT_WPA2 0x00000002 8228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_CAPA_KEY_MGMT_WPA_PSK 0x00000004 8238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK 0x00000008 8248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_CAPA_KEY_MGMT_WPA_NONE 0x00000010 8258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_CAPA_KEY_MGMT_FT 0x00000020 8268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_CAPA_KEY_MGMT_FT_PSK 0x00000040 827d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt#define WPA_DRIVER_CAPA_KEY_MGMT_WAPI_PSK 0x00000080 8288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int key_mgmt; 8298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 8308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_CAPA_ENC_WEP40 0x00000001 8318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_CAPA_ENC_WEP104 0x00000002 8328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_CAPA_ENC_TKIP 0x00000004 8338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_CAPA_ENC_CCMP 0x00000008 83404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_DRIVER_CAPA_ENC_WEP128 0x00000010 83561d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt#define WPA_DRIVER_CAPA_ENC_GCMP 0x00000020 8368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int enc; 8378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 8388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_AUTH_OPEN 0x00000001 8398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_AUTH_SHARED 0x00000002 8408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_AUTH_LEAP 0x00000004 8418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int auth; 8428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 8438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Driver generated WPA/RSN IE */ 8448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_DRIVER_IE 0x00000001 8458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Driver needs static WEP key setup after association command */ 8468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC 0x00000002 8471f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* unused: 0x00000004 */ 8488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Driver takes care of RSN 4-way handshake internally; PMK is configured with 8498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_ops::set_key using alg = WPA_ALG_PMK */ 8508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE 0x00000008 8518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_WIRED 0x00000010 8528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Driver provides separate commands for authentication and association (SME in 8538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_supplicant). */ 8548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_SME 0x00000020 8558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Driver supports AP mode */ 8568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_AP 0x00000040 8578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Driver needs static WEP key setup after association has been completed */ 8588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE 0x00000080 8598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Driver takes care of P2P management operations */ 8608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_P2P_MGMT 0x00000100 8618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Driver supports concurrent P2P operations */ 8628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_P2P_CONCURRENT 0x00000200 8638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* 8648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Driver uses the initial interface as a dedicated management interface, i.e., 8658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * it cannot be used for P2P group operations or non-P2P purposes. 8668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 8678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE 0x00000400 86834af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt/* This interface is P2P capable (P2P GO or P2P Client) */ 8698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_P2P_CAPABLE 0x00000800 870c2ebb4b85d69b65f552fee71ac68f44e8d87b39eDmitry Shmidt/* unused: 0x00001000 */ 8718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* 8728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Driver uses the initial interface for P2P management interface and non-P2P 8738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * purposes (e.g., connect to infra AP), but this interface cannot be used for 8748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * P2P group operations. 8758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 8768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P 0x00002000 8778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* 8788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Driver is known to use sane error codes, i.e., when it indicates that 8798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * something (e.g., association) fails, there was indeed a failure and the 8808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * operation does not end up getting completed successfully later. 8818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 8828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_SANE_ERROR_CODES 0x00004000 8838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Driver supports off-channel TX */ 8848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_OFFCHANNEL_TX 0x00008000 8858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Driver indicates TX status events for EAPOL Data frames */ 8868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_DRIVER_FLAGS_EAPOL_TX_STATUS 0x00010000 8871f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Driver indicates TX status events for Deauth/Disassoc frames */ 8881f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS 0x00020000 8891f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Driver supports roaming (BSS selection) in firmware */ 8901f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WPA_DRIVER_FLAGS_BSS_SELECTION 0x00040000 8911f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Driver supports operating as a TDLS peer */ 8921f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WPA_DRIVER_FLAGS_TDLS_SUPPORT 0x00080000 8931f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Driver requires external TDLS setup/teardown/discovery */ 8941f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WPA_DRIVER_FLAGS_TDLS_EXTERNAL_SETUP 0x00100000 8951f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Driver indicates support for Probe Response offloading in AP mode */ 8961f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WPA_DRIVER_FLAGS_PROBE_RESP_OFFLOAD 0x00200000 8971f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Driver supports U-APSD in AP mode */ 8981f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WPA_DRIVER_FLAGS_AP_UAPSD 0x00400000 89904949598a23f501be6eec21697465fd46a28840aDmitry Shmidt/* Driver supports inactivity timer in AP mode */ 90004949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_DRIVER_FLAGS_INACTIVITY_TIMER 0x00800000 90161d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt/* Driver expects user space implementation of MLME in AP mode */ 90261d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt#define WPA_DRIVER_FLAGS_AP_MLME 0x01000000 903d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt/* Driver supports SAE with user space SME */ 904d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt#define WPA_DRIVER_FLAGS_SAE 0x02000000 905d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt/* Driver makes use of OBSS scan mechanism in wpa_supplicant */ 906d5e4923d04122f81300fa68fb07d64ede28fd44dDmitry Shmidt#define WPA_DRIVER_FLAGS_OBSS_SCAN 0x04000000 907700a137ab366edc72e371da68ba187b4717ee660Dmitry Shmidt/* Driver supports IBSS (Ad-hoc) mode */ 908700a137ab366edc72e371da68ba187b4717ee660Dmitry Shmidt#define WPA_DRIVER_FLAGS_IBSS 0x08000000 909ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt/* Driver supports radar detection */ 910ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt#define WPA_DRIVER_FLAGS_RADAR 0x10000000 91134af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt/* Driver supports a dedicated interface for P2P Device */ 91234af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt#define WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE 0x20000000 9138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int flags; 9148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 9158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int max_scan_ssids; 9161f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int max_sched_scan_ssids; 9171f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int sched_scan_supported; 9181f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int max_match_sets; 9198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 9208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 9218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * max_remain_on_chan - Maximum remain-on-channel duration in msec 9228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 9238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int max_remain_on_chan; 9248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 9258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 9268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * max_stations - Maximum number of associated stations the driver 9278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * supports in AP mode 9288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 9298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int max_stations; 9301f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 9311f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 9321f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * probe_resp_offloads - Bitmap of supported protocols by the driver 9331f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * for Probe Response offloading. 9341f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 9351f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Driver Probe Response offloading support for WPS ver. 1 */ 9361f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS 0x00000001 9371f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Driver Probe Response offloading support for WPS ver. 2 */ 9381f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS2 0x00000002 9391f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Driver Probe Response offloading support for P2P */ 9401f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WPA_DRIVER_PROBE_RESP_OFFLOAD_P2P 0x00000004 9411f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Driver Probe Response offloading support for IEEE 802.11u (Interworking) */ 9421f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WPA_DRIVER_PROBE_RESP_OFFLOAD_INTERWORKING 0x00000008 9431f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt unsigned int probe_resp_offloads; 944444d567b27731d8572ef37697dd12fd1c37c2f24Dmitry Shmidt 9458bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt unsigned int max_acl_mac_addrs; 9468bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt 947444d567b27731d8572ef37697dd12fd1c37c2f24Dmitry Shmidt /** 948c2ebb4b85d69b65f552fee71ac68f44e8d87b39eDmitry Shmidt * Number of supported concurrent channels 949c2ebb4b85d69b65f552fee71ac68f44e8d87b39eDmitry Shmidt */ 950c2ebb4b85d69b65f552fee71ac68f44e8d87b39eDmitry Shmidt unsigned int num_multichan_concurrent; 951c2ebb4b85d69b65f552fee71ac68f44e8d87b39eDmitry Shmidt 952c2ebb4b85d69b65f552fee71ac68f44e8d87b39eDmitry Shmidt /** 953444d567b27731d8572ef37697dd12fd1c37c2f24Dmitry Shmidt * extended_capa - extended capabilities in driver/device 954444d567b27731d8572ef37697dd12fd1c37c2f24Dmitry Shmidt * 955444d567b27731d8572ef37697dd12fd1c37c2f24Dmitry Shmidt * Must be allocated and freed by driver and the pointers must be 956444d567b27731d8572ef37697dd12fd1c37c2f24Dmitry Shmidt * valid for the lifetime of the driver, i.e., freed in deinit() 957444d567b27731d8572ef37697dd12fd1c37c2f24Dmitry Shmidt */ 958444d567b27731d8572ef37697dd12fd1c37c2f24Dmitry Shmidt const u8 *extended_capa, *extended_capa_mask; 959444d567b27731d8572ef37697dd12fd1c37c2f24Dmitry Shmidt unsigned int extended_capa_len; 9608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 9618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 9628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 9638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct hostapd_data; 9648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 9658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct hostap_sta_driver_data { 9668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned long rx_packets, tx_packets, rx_bytes, tx_bytes; 9678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned long current_tx_rate; 9688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned long inactive_msec; 9698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned long flags; 9708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned long num_ps_buf_frames; 9718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned long tx_retry_failed; 9728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned long tx_retry_count; 9738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int last_rssi; 9748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int last_ack_rssi; 9758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 9768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 9778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct hostapd_sta_add_params { 9788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *addr; 9798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 aid; 9808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 capability; 9818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *supp_rates; 9828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t supp_rates_len; 9838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 listen_interval; 9848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const struct ieee80211_ht_capabilities *ht_capabilities; 985a54fa5fb807eaeff45464139b5a7759f060cec68Dmitry Shmidt const struct ieee80211_vht_capabilities *vht_capabilities; 9861f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt u32 flags; /* bitmask of WPA_STA_* flags */ 9871f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int set; /* Set STA parameters instead of add */ 9881f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt u8 qosinfo; 989f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt const u8 *ext_capab; 990f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt size_t ext_capab_len; 9918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 9928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 9938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct hostapd_freq_params { 9948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int mode; 9958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int freq; 9968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int channel; 997a54fa5fb807eaeff45464139b5a7759f060cec68Dmitry Shmidt /* for HT */ 9988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int ht_enabled; 9998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int sec_channel_offset; /* 0 = HT40 disabled, -1 = HT40 enabled, 10008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * secondary channel below primary, 1 = HT40 10018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * enabled, secondary channel above primary */ 1002a54fa5fb807eaeff45464139b5a7759f060cec68Dmitry Shmidt 1003a54fa5fb807eaeff45464139b5a7759f060cec68Dmitry Shmidt /* for VHT */ 1004a54fa5fb807eaeff45464139b5a7759f060cec68Dmitry Shmidt int vht_enabled; 1005a54fa5fb807eaeff45464139b5a7759f060cec68Dmitry Shmidt 1006a54fa5fb807eaeff45464139b5a7759f060cec68Dmitry Shmidt /* valid for both HT and VHT, center_freq2 is non-zero 1007a54fa5fb807eaeff45464139b5a7759f060cec68Dmitry Shmidt * only for bandwidth 80 and an 80+80 channel */ 1008a54fa5fb807eaeff45464139b5a7759f060cec68Dmitry Shmidt int center_freq1, center_freq2; 1009a54fa5fb807eaeff45464139b5a7759f060cec68Dmitry Shmidt int bandwidth; 10108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 10118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 10128bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidtstruct mac_address { 10138bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt u8 addr[ETH_ALEN]; 10148bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt}; 10158bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt 10168bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidtstruct hostapd_acl_params { 10178bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt u8 acl_policy; 10188bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt unsigned int num_mac_acl; 10198bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt struct mac_address mac_acl[0]; 10208bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt}; 10218bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt 10228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtenum wpa_driver_if_type { 10238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 10248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * WPA_IF_STATION - Station mode interface 10258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 10268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt WPA_IF_STATION, 10278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 10288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 10298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * WPA_IF_AP_VLAN - AP mode VLAN interface 10308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 10318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This interface shares its address and Beacon frame with the main 10328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * BSS. 10338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 10348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt WPA_IF_AP_VLAN, 10358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 10368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 10378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * WPA_IF_AP_BSS - AP mode BSS interface 10388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 10398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This interface has its own address and Beacon frame. 10408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 10418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt WPA_IF_AP_BSS, 10428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 10438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 10448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * WPA_IF_P2P_GO - P2P Group Owner 10458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 10468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt WPA_IF_P2P_GO, 10478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 10488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 10498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * WPA_IF_P2P_CLIENT - P2P Client 10508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 10518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt WPA_IF_P2P_CLIENT, 10528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 10538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 10548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * WPA_IF_P2P_GROUP - P2P Group interface (will become either 10558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * WPA_IF_P2P_GO or WPA_IF_P2P_CLIENT, but the role is not yet known) 10568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 105734af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt WPA_IF_P2P_GROUP, 105834af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt 105934af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt /** 106034af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt * WPA_IF_P2P_DEVICE - P2P Device interface is used to indentify the 106134af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt * abstracted P2P Device function in the driver 106234af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt */ 106334af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt WPA_IF_P2P_DEVICE 10648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 10658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 10668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wpa_init_params { 10671f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt void *global_priv; 10688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *bssid; 10698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *ifname; 10708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ssid; 10718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ssid_len; 10728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *test_socket; 10738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int use_pae_group_addr; 10748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt char **bridge; 10758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t num_bridge; 10768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 10778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 *own_addr; /* buffer for writing own MAC address */ 10788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 10798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 10808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 10818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wpa_bss_params { 10828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** Interface name (for multi-SSID/VLAN support) */ 10838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *ifname; 10848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** Whether IEEE 802.1X or WPA/WPA2 is enabled */ 10858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int enabled; 10868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 10878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int wpa; 10888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int ieee802_1x; 10898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int wpa_group; 10908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int wpa_pairwise; 10918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int wpa_key_mgmt; 10928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int rsn_preauth; 10938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt enum mfp_options ieee80211w; 10948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 10958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 10968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_STA_AUTHORIZED BIT(0) 10978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_STA_WMM BIT(1) 10988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_STA_SHORT_PREAMBLE BIT(2) 10998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_STA_MFP BIT(3) 11001f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WPA_STA_TDLS_PEER BIT(4) 11018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 11028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 11038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct p2p_params - P2P parameters for driver-based P2P management 11048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 11058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct p2p_params { 11068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *dev_name; 11078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 pri_dev_type[8]; 11088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define DRV_MAX_SEC_DEV_TYPES 5 11098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 sec_dev_type[DRV_MAX_SEC_DEV_TYPES][8]; 11108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t num_sec_dev_types; 11118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 11128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 11138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtenum tdls_oper { 11148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt TDLS_DISCOVERY_REQ, 11158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt TDLS_SETUP, 11168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt TDLS_TEARDOWN, 11178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt TDLS_ENABLE_LINK, 11188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt TDLS_DISABLE_LINK, 11198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt TDLS_ENABLE, 11208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt TDLS_DISABLE 11218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 11228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 112361d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidtenum wnm_oper { 112461d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_SLEEP_ENTER_CONFIRM, 112561d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_SLEEP_ENTER_FAIL, 112661d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_SLEEP_EXIT_CONFIRM, 112761d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_SLEEP_EXIT_FAIL, 112861d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_SLEEP_TFS_REQ_IE_ADD, /* STA requests driver to add TFS req IE */ 112961d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_SLEEP_TFS_REQ_IE_NONE, /* STA requests empty TFS req IE */ 113061d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_SLEEP_TFS_REQ_IE_SET, /* AP requests driver to set TFS req IE for 113161d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * a STA */ 113261d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_SLEEP_TFS_RESP_IE_ADD, /* AP requests driver to add TFS resp IE 113361d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * for a STA */ 113461d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_SLEEP_TFS_RESP_IE_NONE, /* AP requests empty TFS resp IE */ 113561d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_SLEEP_TFS_RESP_IE_SET, /* AP requests driver to set TFS resp IE 113661d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * for a STA */ 113761d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_SLEEP_TFS_IE_DEL /* AP delete the TFS IE */ 113861d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt}; 113961d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt 114034af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt/* enum chan_width - Channel width definitions */ 114134af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidtenum chan_width { 114234af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt CHAN_WIDTH_20_NOHT, 114334af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt CHAN_WIDTH_20, 114434af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt CHAN_WIDTH_40, 114534af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt CHAN_WIDTH_80, 114634af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt CHAN_WIDTH_80P80, 114734af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt CHAN_WIDTH_160, 114834af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt CHAN_WIDTH_UNKNOWN 114934af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt}; 115034af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt 11518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 11528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_signal_info - Information about channel signal quality 11538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 11548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wpa_signal_info { 11558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u32 frequency; 11568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int above_threshold; 11578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int current_signal; 115834af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt int avg_signal; 11598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int current_noise; 11608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int current_txrate; 116134af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt enum chan_width chanwidth; 116234af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt int center_frq1; 116334af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidt int center_frq2; 11648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 11658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 11668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 1167e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * struct beacon_data - Beacon data 1168e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @head: Head portion of Beacon frame (before TIM IE) 1169e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @tail: Tail portion of Beacon frame (after TIM IE) 1170e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @beacon_ies: Extra information element(s) to add into Beacon frames or %NULL 1171e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @proberesp_ies: Extra information element(s) to add into Probe Response 1172e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * frames or %NULL 1173e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @assocresp_ies: Extra information element(s) to add into (Re)Association 1174e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * Response frames or %NULL 1175e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @probe_resp: Probe Response frame template 1176e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @head_len: Length of @head 1177e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @tail_len: Length of @tail 1178e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @beacon_ies_len: Length of beacon_ies in octets 1179e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @proberesp_ies_len: Length of proberesp_ies in octets 1180e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @proberesp_ies_len: Length of proberesp_ies in octets 1181e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @probe_resp_len: Length of probe response template (@probe_resp) 1182e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt */ 1183e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidtstruct beacon_data { 1184e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt u8 *head, *tail; 1185e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt u8 *beacon_ies; 1186e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt u8 *proberesp_ies; 1187e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt u8 *assocresp_ies; 1188e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt u8 *probe_resp; 1189e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt 1190e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt size_t head_len, tail_len; 1191e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt size_t beacon_ies_len; 1192e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt size_t proberesp_ies_len; 1193e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt size_t assocresp_ies_len; 1194e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt size_t probe_resp_len; 1195e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt}; 1196e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt 1197e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt/** 1198e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * struct csa_settings - Settings for channel switch command 1199e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @cs_count: Count in Beacon frames (TBTT) to perform the switch 1200e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @block_tx: 1 - block transmission for CSA period 1201e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @freq_params: Next channel frequency parameter 1202e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @beacon_csa: Beacon/probe resp/asooc resp info for CSA period 1203e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @beacon_after: Next beacon/probe resp/asooc resp info 1204e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @counter_offset_beacon: Offset to the count field in beacon's tail 1205e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @counter_offset_presp: Offset to the count field in probe resp. 1206e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt */ 1207e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidtstruct csa_settings { 1208e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt u8 cs_count; 1209e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt u8 block_tx; 1210e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt 1211e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt struct hostapd_freq_params freq_params; 1212e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt struct beacon_data beacon_csa; 1213e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt struct beacon_data beacon_after; 1214e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt 1215e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt u16 counter_offset_beacon; 1216e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt u16 counter_offset_presp; 1217e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt}; 1218e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt 1219e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt/** 12208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_ops - Driver interface API definition 12218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 12228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This structure defines the API that each driver interface needs to implement 12238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * for core wpa_supplicant code. All driver specific functionality is captured 12248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * in this wrapper. 12258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 12268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wpa_driver_ops { 12278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** Name of the driver interface */ 12288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *name; 12298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** One line description of the driver interface */ 12308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *desc; 12318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 12328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 12338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * get_bssid - Get the current BSSID 12348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 12358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @bssid: buffer for BSSID (ETH_ALEN = 6 bytes) 12368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 12378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 12388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 12398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Query kernel driver for the current BSSID and copy it to bssid. 12408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Setting bssid to 00:00:00:00:00:00 is recommended if the STA is not 12418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * associated. 12428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 12438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*get_bssid)(void *priv, u8 *bssid); 12448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 12458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 12468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * get_ssid - Get the current SSID 12478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 12488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ssid: buffer for SSID (at least 32 bytes) 12498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 12508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Length of the SSID on success, -1 on failure 12518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 12528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Query kernel driver for the current SSID and copy it to ssid. 12538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returning zero is recommended if the STA is not associated. 12548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 12558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Note: SSID is an array of octets, i.e., it is not nul terminated and 12568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * can, at least in theory, contain control characters (including nul) 12578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * and as such, should be processed as binary data, not a printable 12588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * string. 12598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 12608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*get_ssid)(void *priv, u8 *ssid); 12618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 12628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 12638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_key - Configure encryption key 12648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ifname: Interface name (for multi-SSID/VLAN support) 12658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 12668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @alg: encryption algorithm (%WPA_ALG_NONE, %WPA_ALG_WEP, 126761d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * %WPA_ALG_TKIP, %WPA_ALG_CCMP, %WPA_ALG_IGTK, %WPA_ALG_PMK, 126861d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * %WPA_ALG_GCMP); 12698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * %WPA_ALG_NONE clears the key. 12708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: Address of the peer STA (BSSID of the current AP when setting 12718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * pairwise key in station mode), ff:ff:ff:ff:ff:ff for 12728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * broadcast keys, %NULL for default keys that are used both for 12738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * broadcast and unicast; when clearing keys, %NULL is used to 12748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * indicate that both the broadcast-only and default key of the 12758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * specified key index is to be cleared 12768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @key_idx: key index (0..3), usually 0 for unicast keys; 0..4095 for 12778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * IGTK 12788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @set_tx: configure this key as the default Tx key (only used when 12798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * driver does not support separate unicast/individual key 12808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @seq: sequence number/packet number, seq_len octets, the next 12818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * packet number to be used for in replay protection; configured 12828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * for Rx keys (in most cases, this is only used with broadcast 12838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * keys and set to zero for unicast keys); %NULL if not set 12848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @seq_len: length of the seq, depends on the algorithm: 128561d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * TKIP: 6 octets, CCMP/GCMP: 6 octets, IGTK: 6 octets 12868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @key: key buffer; TKIP: 16-byte temporal key, 8-byte Tx Mic key, 12878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 8-byte Rx Mic Key 12888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @key_len: length of the key buffer in octets (WEP: 5 or 13, 128961d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * TKIP: 32, CCMP/GCMP: 16, IGTK: 16) 12908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 12918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 12928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 12938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Configure the given key for the kernel driver. If the driver 12948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * supports separate individual keys (4 default keys + 1 individual), 12958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * addr can be used to determine whether the key is default or 12968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * individual. If only 4 keys are supported, the default key with key 12978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * index 0 is used as the individual key. STA must be configured to use 12988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * it as the default Tx key (set_tx is set) and accept Rx for all the 12998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * key indexes. In most cases, WPA uses only key indexes 1 and 2 for 13008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * broadcast keys, so key index 0 is available for this kind of 13018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * configuration. 13028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 13038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Please note that TKIP keys include separate TX and RX MIC keys and 13048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * some drivers may expect them in different order than wpa_supplicant 13058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * is using. If the TX/RX keys are swapped, all TKIP encrypted packets 13068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * will trigger Michael MIC errors. This can be fixed by changing the 13078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * order of MIC keys by swapping te bytes 16..23 and 24..31 of the key 13088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * in driver_*.c set_key() implementation, see driver_ndis.c for an 13098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * example on how this can be done. 13108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 13118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_key)(const char *ifname, void *priv, enum wpa_alg alg, 13128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *addr, int key_idx, int set_tx, 13138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *seq, size_t seq_len, 13148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *key, size_t key_len); 13158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 13168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 13178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * init - Initialize driver interface 13188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ctx: context to be used when calling wpa_supplicant functions, 13198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * e.g., wpa_supplicant_event() 13208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ifname: interface name, e.g., wlan0 13218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 13228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Pointer to private data, %NULL on failure 13238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 13248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Initialize driver interface, including event processing for kernel 13258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * driver events (e.g., associated, scan results, Michael MIC failure). 13268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function can allocate a private configuration data area for 13278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ctx, file descriptor, interface name, etc. information that may be 13288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * needed in future driver operations. If this is not used, non-NULL 13298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * value will need to be returned because %NULL is used to indicate 13308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * failure. The returned value will be used as 'void *priv' data for 13318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * all other driver_ops functions. 13328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 13338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * The main event loop (eloop.c) of wpa_supplicant can be used to 13348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * register callback for read sockets (eloop_register_read_sock()). 13358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 13368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * See below for more information about events and 13378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_supplicant_event() function. 13388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 13398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt void * (*init)(void *ctx, const char *ifname); 13408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 13418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 13428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * deinit - Deinitialize driver interface 13438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data from init() 13448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 13458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Shut down driver interface and processing of driver events. Free 13468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * private data buffer if one was allocated in init() handler. 13478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 13488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt void (*deinit)(void *priv); 13498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 13508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 13518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_param - Set driver configuration parameters 13528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data from init() 13538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @param: driver specific configuration parameters 13548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 13558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 13568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 13578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Optional handler for notifying driver interface about configuration 13588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * parameters (driver_param). 13598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 13608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_param)(void *priv, const char *param); 13618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 13628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 13638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_countermeasures - Enable/disable TKIP countermeasures 13648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 13658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @enabled: 1 = countermeasures enabled, 0 = disabled 13668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 13678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 13688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 13698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Configure TKIP countermeasures. When these are enabled, the driver 13708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * should drop all received and queued frames that are using TKIP. 13718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 13728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_countermeasures)(void *priv, int enabled); 13738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 13748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 13758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * deauthenticate - Request driver to deauthenticate 13768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 13778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: peer address (BSSID of the AP) 13788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @reason_code: 16-bit reason code to be sent in the deauthentication 13798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * frame 13808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 13818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 13828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 13838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*deauthenticate)(void *priv, const u8 *addr, int reason_code); 13848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 13858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 13868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * associate - Request driver to associate 13878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 13888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @params: association parameters 13898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 13908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 13918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 13928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*associate)(void *priv, 13938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_driver_associate_params *params); 13948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 13958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 13968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * add_pmkid - Add PMKSA cache entry to the driver 13978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 13988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @bssid: BSSID for the PMKSA cache entry 13998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @pmkid: PMKID for the PMKSA cache entry 14008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 14028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is called when a new PMK is received, as a result of 14048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * either normal authentication or RSN pre-authentication. 14058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * If the driver generates RSN IE, i.e., it does not use wpa_ie in 14078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * associate(), add_pmkid() can be used to add new PMKSA cache entries 14088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * in the driver. If the driver uses wpa_ie from wpa_supplicant, this 14098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * driver_ops function does not need to be implemented. Likewise, if 14108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the driver does not support WPA, this function is not needed. 14118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 14128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*add_pmkid)(void *priv, const u8 *bssid, const u8 *pmkid); 14138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 14148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 14158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * remove_pmkid - Remove PMKSA cache entry to the driver 14168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 14178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @bssid: BSSID for the PMKSA cache entry 14188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @pmkid: PMKID for the PMKSA cache entry 14198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 14218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is called when the supplicant drops a PMKSA cache 14238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * entry for any reason. 14248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * If the driver generates RSN IE, i.e., it does not use wpa_ie in 14268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * associate(), remove_pmkid() can be used to synchronize PMKSA caches 14278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * between the driver and wpa_supplicant. If the driver uses wpa_ie 14288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * from wpa_supplicant, this driver_ops function does not need to be 14298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * implemented. Likewise, if the driver does not support WPA, this 14308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * function is not needed. 14318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 14328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*remove_pmkid)(void *priv, const u8 *bssid, const u8 *pmkid); 14338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 14348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 14358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * flush_pmkid - Flush PMKSA cache 14368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 14378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 14398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is called when the supplicant drops all PMKSA cache 14418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * entries for any reason. 14428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * If the driver generates RSN IE, i.e., it does not use wpa_ie in 14448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * associate(), remove_pmkid() can be used to synchronize PMKSA caches 14458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * between the driver and wpa_supplicant. If the driver uses wpa_ie 14468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * from wpa_supplicant, this driver_ops function does not need to be 14478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * implemented. Likewise, if the driver does not support WPA, this 14488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * function is not needed. 14498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 14508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*flush_pmkid)(void *priv); 14518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 14528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 14538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * get_capa - Get driver capabilities 14548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 14558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 14578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Get driver/firmware/hardware capabilities. 14598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 14608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*get_capa)(void *priv, struct wpa_driver_capa *capa); 14618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 14628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 14638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * poll - Poll driver for association information 14648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 14658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This is an option callback that can be used when the driver does not 14678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * provide event mechanism for association events. This is called when 14688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * receiving WPA EAPOL-Key messages that require association 14698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * information. The driver interface is supposed to generate associnfo 14708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * event before returning from this callback function. In addition, the 14718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * driver interface should generate an association event after having 14728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * sent out associnfo. 14738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 14748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt void (*poll)(void *priv); 14758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 14768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 14778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * get_ifname - Get interface name 14788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 14798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Pointer to the interface name. This can differ from the 14818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * interface name used in init() call. Init() is called first. 14828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This optional function can be used to allow the driver interface to 14848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * replace the interface name with something else, e.g., based on an 14858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * interface mapping from a more descriptive name. 14868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 14878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char * (*get_ifname)(void *priv); 14888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 14898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 14908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * get_mac_addr - Get own MAC address 14918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 14928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Pointer to own MAC address or %NULL on failure 14948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 14958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This optional function can be used to get the own MAC address of the 14968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * device from the driver interface code. This is only needed if the 14978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * l2_packet implementation for the OS does not provide easy access to 14988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * a MAC address. */ 14998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 * (*get_mac_addr)(void *priv); 15008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 15018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 15028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * send_eapol - Optional function for sending EAPOL packets 15038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 15048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @dest: Destination MAC address 15058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @proto: Ethertype 15068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data: EAPOL packet starting with IEEE 802.1X header 15078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data_len: Size of the EAPOL packet 15088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 15098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 15108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 15118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This optional function can be used to override l2_packet operations 15128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * with driver specific functionality. If this function pointer is set, 15138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * l2_packet module is not used at all and the driver interface code is 15148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * responsible for receiving and sending all EAPOL packets. The 15158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * received EAPOL packets are sent to core code with EVENT_EAPOL_RX 15168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * event. The driver interface is required to implement get_mac_addr() 15178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * handler if send_eapol() is used. 15188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 15198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*send_eapol)(void *priv, const u8 *dest, u16 proto, 15208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *data, size_t data_len); 15218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 15228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 15238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_operstate - Sets device operating state to DORMANT or UP 15248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 15258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @state: 0 = dormant, 1 = up 15268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 15278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 15288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This is an optional function that can be used on operating systems 15298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * that support a concept of controlling network device state from user 15308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * space applications. This function, if set, gets called with 15318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * state = 1 when authentication has been completed and with state = 0 15328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * when connection is lost. 15338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 15348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_operstate)(void *priv, int state); 15358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 15368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 15378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * mlme_setprotection - MLME-SETPROTECTION.request primitive 15388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 15398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: Address of the station for which to set protection (may be 15408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * %NULL for group keys) 15418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @protect_type: MLME_SETPROTECTION_PROTECT_TYPE_* 15428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @key_type: MLME_SETPROTECTION_KEY_TYPE_* 15438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 15448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 15458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This is an optional function that can be used to set the driver to 15468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * require protection for Tx and/or Rx frames. This uses the layer 15478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * interface defined in IEEE 802.11i-2004 clause 10.3.22.1 15488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * (MLME-SETPROTECTION.request). Many drivers do not use explicit 15498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set protection operation; instead, they set protection implicitly 15508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * based on configured keys. 15518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 15528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*mlme_setprotection)(void *priv, const u8 *addr, int protect_type, 15538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int key_type); 15548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 15558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 15568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * get_hw_feature_data - Get hardware support data (channels and rates) 15578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 15588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @num_modes: Variable for returning the number of returned modes 15598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * flags: Variable for returning hardware feature flags 15608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Pointer to allocated hardware data on success or %NULL on 15618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * failure. Caller is responsible for freeing this. 15628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 15638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct hostapd_hw_modes * (*get_hw_feature_data)(void *priv, 15648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 *num_modes, 15658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 *flags); 15668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 15678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 15688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * send_mlme - Send management frame from MLME 15698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 15708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data: IEEE 802.11 management frame with IEEE 802.11 header 15718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data_len: Size of the management frame 15721f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @noack: Do not wait for this frame to be acked (disable retries) 15738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 15748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 15751f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int (*send_mlme)(void *priv, const u8 *data, size_t data_len, 15761f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int noack); 15778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 15788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 15798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * update_ft_ies - Update FT (IEEE 802.11r) IEs 15808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 15818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @md: Mobility domain (2 octets) (also included inside ies) 15828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ies: FT IEs (MDIE, FTIE, ...) or %NULL to remove IEs 15838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ies_len: Length of FT IEs in bytes 15848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 15858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 15868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * The supplicant uses this callback to let the driver know that keying 15878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * material for FT is available and that the driver can use the 15888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * provided IEs in the next message in FT authentication sequence. 15898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 15908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only needed for driver that support IEEE 802.11r 15918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * (Fast BSS Transition). 15928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 15938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*update_ft_ies)(void *priv, const u8 *md, const u8 *ies, 15948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ies_len); 15958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 15968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 15978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * send_ft_action - Send FT Action frame (IEEE 802.11r) 15988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 15998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @action: Action field value 16008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @target_ap: Target AP address 16018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ies: FT IEs (MDIE, FTIE, ...) (FT Request action frame body) 16028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ies_len: Length of FT IEs in bytes 16038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 16048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 16058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * The supplicant uses this callback to request the driver to transmit 16068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * an FT Action frame (action category 6) for over-the-DS fast BSS 16078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * transition. 16088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 16098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*send_ft_action)(void *priv, u8 action, const u8 *target_ap, 16108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ies, size_t ies_len); 16118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 16128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 16138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * get_scan_results2 - Fetch the latest scan results 16148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 16158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 16168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Allocated buffer of scan results (caller is responsible for 16178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * freeing the data structure) on success, NULL on failure 16188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 16198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_scan_results * (*get_scan_results2)(void *priv); 16208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 16218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 16228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_country - Set country 16238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 16248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @alpha2: country to which to switch to 16258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 16268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 16278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is for drivers which support some form 16288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * of setting a regulatory domain. 16298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 16308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_country)(void *priv, const char *alpha2); 16318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 16328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 1633cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt * get_country - Get country 1634cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt * @priv: Private driver interface data 1635cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt * @alpha2: Buffer for returning country code (at least 3 octets) 1636cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt * Returns: 0 on success, -1 on failure 1637cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt */ 1638cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt int (*get_country)(void *priv, char *alpha2); 1639cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt 1640cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt /** 16418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * global_init - Global driver initialization 16428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Pointer to private data (global), %NULL on failure 16438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 16448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This optional function is called to initialize the driver wrapper 16458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * for global data, i.e., data that applies to all interfaces. If this 16468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * function is implemented, global_deinit() will also need to be 16478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * implemented to free the private data. The driver will also likely 16488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * use init2() function instead of init() to get the pointer to global 16498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * data available to per-interface initializer. 16508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 16518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt void * (*global_init)(void); 16528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 16538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 16548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * global_deinit - Global driver deinitialization 16558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver global data from global_init() 16568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 16578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Terminate any global driver related functionality and free the 16588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * global data structure. 16598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 16608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt void (*global_deinit)(void *priv); 16618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 16628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 16638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * init2 - Initialize driver interface (with global data) 16648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ctx: context to be used when calling wpa_supplicant functions, 16658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * e.g., wpa_supplicant_event() 16668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ifname: interface name, e.g., wlan0 16678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @global_priv: private driver global data from global_init() 16688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Pointer to private data, %NULL on failure 16698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 16708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function can be used instead of init() if the driver wrapper 16718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * uses global data. 16728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 16738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt void * (*init2)(void *ctx, const char *ifname, void *global_priv); 16748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 16758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 16768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * get_interfaces - Get information about available interfaces 16778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @global_priv: private driver global data from global_init() 16788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Allocated buffer of interface information (caller is 16798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * responsible for freeing the data structure) on success, NULL on 16808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * failure 16818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 16828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_interface_info * (*get_interfaces)(void *global_priv); 16838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 16848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 16858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * scan2 - Request the driver to initiate scan 16868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 16878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @params: Scan parameters 16888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 16898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 16908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 16918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Once the scan results are ready, the driver should report scan 16928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * results event for wpa_supplicant which will eventually request the 16938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * results with wpa_driver_get_scan_results2(). 16948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 16958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*scan2)(void *priv, struct wpa_driver_scan_params *params); 16968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 16978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 16988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * authenticate - Request driver to authenticate 16998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 17008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @params: authentication parameters 17018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 17028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 17038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This is an optional function that can be used with drivers that 17048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * support separate authentication and association steps, i.e., when 17058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_supplicant can act as the SME. If not implemented, associate() 17068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * function is expected to take care of IEEE 802.11 authentication, 17078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * too. 17088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 17098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*authenticate)(void *priv, 17108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_driver_auth_params *params); 17118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 17128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 17131f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * set_ap - Set Beacon and Probe Response information for AP mode 17148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 17151f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @params: Parameters to use in AP mode 17168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 17171f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This function is used to configure Beacon template and/or extra IEs 17181f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * to add for Beacon and Probe Response frames for the driver in 17198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * AP mode. The driver is responsible for building the full Beacon 17208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * frame by concatenating the head part with TIM IE generated by the 17211f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * driver/firmware and finishing with the tail part. Depending on the 17221f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * driver architectue, this can be done either by using the full 17231f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * template or the set of additional IEs (e.g., WPS and P2P IE). 17241f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Similarly, Probe Response processing depends on the driver design. 17251f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * If the driver (or firmware) takes care of replying to Probe Request 17261f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * frames, the extra IEs provided here needs to be added to the Probe 17271f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Response frames. 17281f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 17291f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Returns: 0 on success, -1 on failure 17308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 17311f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int (*set_ap)(void *priv, struct wpa_driver_ap_params *params); 17328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 17338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 17348bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt * set_acl - Set ACL in AP mode 17358bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt * @priv: Private driver interface data 17368bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt * @params: Parameters to configure ACL 17378bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt * Returns: 0 on success, -1 on failure 17388bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt * 17398bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt * This is used only for the drivers which support MAC address ACL. 17408bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt */ 17418bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt int (*set_acl)(void *priv, struct hostapd_acl_params *params); 17428bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt 17438bae4138a0356709720a96f3e50b4d734e532c12Dmitry Shmidt /** 17448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * hapd_init - Initialize driver interface (hostapd only) 17458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @hapd: Pointer to hostapd context 17468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @params: Configuration for the driver wrapper 17478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Pointer to private data, %NULL on failure 17488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 17498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is used instead of init() or init2() when the driver 17501f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * wrapper is used with hostapd. 17518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 17528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt void * (*hapd_init)(struct hostapd_data *hapd, 17538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_init_params *params); 17548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 17558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 17568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * hapd_deinit - Deinitialize driver interface (hostapd only) 17578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data from hapd_init() 17588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 17598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt void (*hapd_deinit)(void *priv); 17608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 17618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 17628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_ieee8021x - Enable/disable IEEE 802.1X support (AP only) 17638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 17648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @params: BSS parameters 17658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 17668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 17678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This is an optional function to configure the kernel driver to 17688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * enable/disable IEEE 802.1X support and set WPA/WPA2 parameters. This 17698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * can be left undefined (set to %NULL) if IEEE 802.1X support is 17701f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * always enabled and the driver uses set_ap() to set WPA/RSN IE 17718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * for Beacon frames. 17721f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 17731f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * DEPRECATED - use set_ap() instead 17748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 17758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_ieee8021x)(void *priv, struct wpa_bss_params *params); 17768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 17778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 17788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_privacy - Enable/disable privacy (AP only) 17798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 17808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @enabled: 1 = privacy enabled, 0 = disabled 17818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 17828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 17838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This is an optional function to configure privacy field in the 17848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * kernel driver for Beacon frames. This can be left undefined (set to 17851f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * %NULL) if the driver uses the Beacon template from set_ap(). 17861f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 17871f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * DEPRECATED - use set_ap() instead 17888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 17898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_privacy)(void *priv, int enabled); 17908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 17918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 17928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * get_seqnum - Fetch the current TSC/packet number (AP only) 17938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ifname: The interface name (main or virtual) 17948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 17958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: MAC address of the station or %NULL for group keys 17968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @idx: Key index 17978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @seq: Buffer for returning the latest used TSC/packet number 17988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 17998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 18008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is used to fetch the last used TSC/packet number for 180161d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * a TKIP, CCMP, GCMP, or BIP/IGTK key. It is mainly used with group 180261d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * keys, so there is no strict requirement on implementing support for 180361d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * unicast keys (i.e., addr != %NULL). 18048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 18058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*get_seqnum)(const char *ifname, void *priv, const u8 *addr, 18068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int idx, u8 *seq); 18078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 18088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 18098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * flush - Flush all association stations (AP only) 18108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 18118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 18128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 18138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function requests the driver to disassociate all associated 18148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * stations. This function does not need to be implemented if the 18158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * driver does not process association frames internally. 18168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 18178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*flush)(void *priv); 18188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 18198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 18208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_generic_elem - Add IEs into Beacon/Probe Response frames (AP) 18218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 18228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @elem: Information elements 18238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @elem_len: Length of the elem buffer in octets 18248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 18258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 18268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This is an optional function to add information elements in the 18278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * kernel driver for Beacon and Probe Response frames. This can be left 18288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * undefined (set to %NULL) if the driver uses the Beacon template from 18291f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * set_ap(). 18301f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 18311f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * DEPRECATED - use set_ap() instead 18328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 18338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_generic_elem)(void *priv, const u8 *elem, size_t elem_len); 18348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 18358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 18361e6c57fee4a56b421cc20f6dc0785c9138b21337Jouni Malinen * read_sta_data - Fetch station data 18378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 18388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data: Buffer for returning station information 18398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: MAC address of the station 18408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 18418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 18428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*read_sta_data)(void *priv, struct hostap_sta_driver_data *data, 18438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *addr); 18448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 18458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 18468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * hapd_send_eapol - Send an EAPOL packet (AP only) 18478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 18488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: Destination MAC address 18498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data: EAPOL packet starting with IEEE 802.1X header 18508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data_len: Length of the EAPOL packet in octets 18518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @encrypt: Whether the frame should be encrypted 18528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @own_addr: Source MAC address 18538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @flags: WPA_STA_* flags for the destination station 18548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 18558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 18568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 18578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*hapd_send_eapol)(void *priv, const u8 *addr, const u8 *data, 18588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t data_len, int encrypt, 18598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *own_addr, u32 flags); 18608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 18618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 18628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * sta_deauth - Deauthenticate a station (AP only) 18638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 18648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @own_addr: Source address and BSSID for the Deauthentication frame 18658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: MAC address of the station to deauthenticate 18668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @reason: Reason code for the Deauthentiation frame 18678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 18688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 18698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function requests a specific station to be deauthenticated and 18708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * a Deauthentication frame to be sent to it. 18718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 18728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*sta_deauth)(void *priv, const u8 *own_addr, const u8 *addr, 18738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int reason); 18748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 18758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 18768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * sta_disassoc - Disassociate a station (AP only) 18778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 18788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @own_addr: Source address and BSSID for the Disassociation frame 18798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: MAC address of the station to disassociate 18808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @reason: Reason code for the Disassociation frame 18818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 18828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 18838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function requests a specific station to be disassociated and 18848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * a Disassociation frame to be sent to it. 18858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 18868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*sta_disassoc)(void *priv, const u8 *own_addr, const u8 *addr, 18878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int reason); 18888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 18898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 18908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * sta_remove - Remove a station entry (AP only) 18918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 18928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: MAC address of the station to be removed 18938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 18948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 18958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*sta_remove)(void *priv, const u8 *addr); 18968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 18978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 18988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * hapd_get_ssid - Get the current SSID (AP only) 18998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 19008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @buf: Buffer for returning the SSID 19018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @len: Maximum length of the buffer 19028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Length of the SSID on success, -1 on failure 19038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 19048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function need not be implemented if the driver uses Beacon 19051f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * template from set_ap() and does not reply to Probe Request frames. 19068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 19078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*hapd_get_ssid)(void *priv, u8 *buf, int len); 19088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 19098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 19108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * hapd_set_ssid - Set SSID (AP only) 19118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 19128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @buf: SSID 19138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @len: Length of the SSID in octets 19148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 19151f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 19161f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * DEPRECATED - use set_ap() instead 19178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 19188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*hapd_set_ssid)(void *priv, const u8 *buf, int len); 19198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 19208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 19218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * hapd_set_countermeasures - Enable/disable TKIP countermeasures (AP) 19228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 19238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @enabled: 1 = countermeasures enabled, 0 = disabled 19248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 19258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 19268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This need not be implemented if the driver does not take care of 19278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * association processing. 19288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 19298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*hapd_set_countermeasures)(void *priv, int enabled); 19308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 19318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 19328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * sta_add - Add a station entry 19338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 19348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @params: Station parameters 19358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 19368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 19378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is used to add a station entry to the driver once the 19388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * station has completed association. This is only used if the driver 19398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * does not take care of association processing. 19401f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 19411f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * With TDLS, this function is also used to add or set (params->set 1) 19421f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * TDLS peer entries. 19438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 19448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*sta_add)(void *priv, struct hostapd_sta_add_params *params); 19458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 19468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 19478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * get_inact_sec - Get station inactivity duration (AP only) 19488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 19498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: Station address 19508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Number of seconds station has been inactive, -1 on failure 19518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 19528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*get_inact_sec)(void *priv, const u8 *addr); 19538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 19548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 19558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * sta_clear_stats - Clear station statistics (AP only) 19568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 19578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: Station address 19588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 19598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 19608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*sta_clear_stats)(void *priv, const u8 *addr); 19618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 19628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 19638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_freq - Set channel/frequency (AP only) 19648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 19658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @freq: Channel parameters 19668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 19678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 19688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_freq)(void *priv, struct hostapd_freq_params *freq); 19698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 19708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 19718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_rts - Set RTS threshold 19728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 19738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @rts: RTS threshold in octets 19748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 19758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 19768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_rts)(void *priv, int rts); 19778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 19788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 19798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_frag - Set fragmentation threshold 19808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 19818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @frag: Fragmentation threshold in octets 19828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 19838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 19848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_frag)(void *priv, int frag); 19858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 19868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 19878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * sta_set_flags - Set station flags (AP only) 19888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 19898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: Station address 19908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @total_flags: Bitmap of all WPA_STA_* flags currently set 19918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @flags_or: Bitmap of WPA_STA_* flags to add 19928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @flags_and: Bitmap of WPA_STA_* flags to us as a mask 19938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 19948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 19958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*sta_set_flags)(void *priv, const u8 *addr, 19968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int total_flags, int flags_or, int flags_and); 19978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 19988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 19998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_tx_queue_params - Set TX queue parameters 20008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 20018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @queue: Queue number (0 = VO, 1 = VI, 2 = BE, 3 = BK) 20028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @aifs: AIFS 20038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @cw_min: cwMin 20048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @cw_max: cwMax 20058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @burst_time: Maximum length for bursting in 0.1 msec units 20068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 20078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_tx_queue_params)(void *priv, int queue, int aifs, int cw_min, 20088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int cw_max, int burst_time); 20098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 20108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 20118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * if_add - Add a virtual interface 20128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 20138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @type: Interface type 20148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ifname: Interface name for the new virtual interface 20158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: Local address to use for the interface or %NULL to use the 20168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * parent interface address 20178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @bss_ctx: BSS context for %WPA_IF_AP_BSS interfaces 20188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @drv_priv: Pointer for overwriting the driver context or %NULL if 20198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * not allowed (applies only to %WPA_IF_AP_BSS type) 20208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @force_ifname: Buffer for returning an interface name that the 20218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * driver ended up using if it differs from the requested ifname 20228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @if_addr: Buffer for returning the allocated interface address 20238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * (this may differ from the requested addr if the driver cannot 20248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * change interface address) 20258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @bridge: Bridge interface to use or %NULL if no bridge configured 2026cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt * @use_existing: Whether to allow existing interface to be used 20278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 20288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 20298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*if_add)(void *priv, enum wpa_driver_if_type type, 20308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *ifname, const u8 *addr, void *bss_ctx, 20318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt void **drv_priv, char *force_ifname, u8 *if_addr, 2032cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt const char *bridge, int use_existing); 20338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 20348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 20358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * if_remove - Remove a virtual interface 20368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 20378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @type: Interface type 20388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ifname: Interface name of the virtual interface to be removed 20398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 20408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 20418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*if_remove)(void *priv, enum wpa_driver_if_type type, 20428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *ifname); 20438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 20448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 20458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_sta_vlan - Bind a station into a specific interface (AP only) 20468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 20478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ifname: Interface (main or virtual BSS or VLAN) 20488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: MAC address of the associated station 20498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @vlan_id: VLAN ID 20508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 20518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 20528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is used to bind a station to a specific virtual 20538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * interface. It is only used if when virtual interfaces are supported, 20548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * e.g., to assign stations to different VLAN interfaces based on 20558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * information from a RADIUS server. This allows separate broadcast 20568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * domains to be used with a single BSS. 20578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 20588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_sta_vlan)(void *priv, const u8 *addr, const char *ifname, 20598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int vlan_id); 20608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 20618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 20628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * commit - Optional commit changes handler (AP only) 20638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: driver private data 20648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 20658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 20668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This optional handler function can be registered if the driver 20678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * interface implementation needs to commit changes (e.g., by setting 20688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * network interface up) at the end of initial configuration. If set, 20698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * this handler will be called after initial setup has been completed. 20708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 20718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*commit)(void *priv); 20728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 20738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 20748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * send_ether - Send an ethernet packet (AP only) 20758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 20768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @dst: Destination MAC address 20778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @src: Source MAC address 20788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @proto: Ethertype 20798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data: EAPOL packet starting with IEEE 802.1X header 20808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data_len: Length of the EAPOL packet in octets 20818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 20828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 20838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*send_ether)(void *priv, const u8 *dst, const u8 *src, u16 proto, 20848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *data, size_t data_len); 20858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 20868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 20878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_radius_acl_auth - Notification of RADIUS ACL change 20888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 20898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @mac: MAC address of the station 20908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @accepted: Whether the station was accepted 20918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @session_timeout: Session timeout for the station 20928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 20938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 20948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_radius_acl_auth)(void *priv, const u8 *mac, int accepted, 20958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u32 session_timeout); 20968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 20978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 20988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_radius_acl_expire - Notification of RADIUS ACL expiration 20998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 21008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @mac: MAC address of the station 21018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 21028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 21038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_radius_acl_expire)(void *priv, const u8 *mac); 21048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 21058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 21068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_ap_wps_ie - Add WPS IE(s) into Beacon/Probe Response frames (AP) 21078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 21088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @beacon: WPS IE(s) for Beacon frames or %NULL to remove extra IE(s) 21098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @proberesp: WPS IE(s) for Probe Response frames or %NULL to remove 21108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * extra IE(s) 21118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @assocresp: WPS IE(s) for (Re)Association Response frames or %NULL 21128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * to remove extra IE(s) 21138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 21148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 21158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This is an optional function to add WPS IE in the kernel driver for 21168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Beacon and Probe Response frames. This can be left undefined (set 21171f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * to %NULL) if the driver uses the Beacon template from set_ap() 21188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * and does not process Probe Request frames. If the driver takes care 21198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * of (Re)Association frame processing, the assocresp buffer includes 21208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * WPS IE(s) that need to be added to (Re)Association Response frames 21218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * whenever a (Re)Association Request frame indicated use of WPS. 21228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 21238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This will also be used to add P2P IE(s) into Beacon/Probe Response 21248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * frames when operating as a GO. The driver is responsible for adding 21258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * timing related attributes (e.g., NoA) in addition to the IEs 21268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * included here by appending them after these buffers. This call is 21278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * also used to provide Probe Response IEs for P2P Listen state 21288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * operations for drivers that generate the Probe Response frames 21298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * internally. 21301f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 21311f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * DEPRECATED - use set_ap() instead 21328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 21338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_ap_wps_ie)(void *priv, const struct wpabuf *beacon, 21348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const struct wpabuf *proberesp, 21358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const struct wpabuf *assocresp); 21368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 21378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 21388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_supp_port - Set IEEE 802.1X Supplicant Port status 21398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 21408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @authorized: Whether the port is authorized 21418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 21428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 21438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_supp_port)(void *priv, int authorized); 21448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 21458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 21468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_wds_sta - Bind a station into a 4-address WDS (AP only) 21478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 21488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: MAC address of the associated station 21498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @aid: Association ID 21508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @val: 1 = bind to 4-address WDS; 0 = unbind 21518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @bridge_ifname: Bridge interface to use for the WDS station or %NULL 21528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * to indicate that bridge is not to be used 2153c2ebb4b85d69b65f552fee71ac68f44e8d87b39eDmitry Shmidt * @ifname_wds: Buffer to return the interface name for the new WDS 2154c2ebb4b85d69b65f552fee71ac68f44e8d87b39eDmitry Shmidt * station or %NULL to indicate name is not returned. 21558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 21568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 21578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val, 2158c2ebb4b85d69b65f552fee71ac68f44e8d87b39eDmitry Shmidt const char *bridge_ifname, char *ifname_wds); 21598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 21608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 21618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * send_action - Transmit an Action frame 21628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 21638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @freq: Frequency (in MHz) of the channel 21648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @wait: Time to wait off-channel for a response (in ms), or zero 21658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @dst: Destination MAC address (Address 1) 21668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @src: Source MAC address (Address 2) 21678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @bssid: BSSID (Address 3) 21688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data: Frame body 21698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data_len: data length in octets 21701f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt @ @no_cck: Whether CCK rates must not be used to transmit this frame 21718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 21728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 21738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This command can be used to request the driver to transmit an action 21748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * frame to the specified destination. 21758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 21768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * If the %WPA_DRIVER_FLAGS_OFFCHANNEL_TX flag is set, the frame will 21778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * be transmitted on the given channel and the device will wait for a 21788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * response on that channel for the given wait time. 21798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 21808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * If the flag is not set, the wait time will be ignored. In this case, 21818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * if a remain-on-channel duration is in progress, the frame must be 21828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * transmitted on that channel; alternatively the frame may be sent on 21838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the current operational channel (if in associated state in station 21848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * mode or while operating as an AP.) 21858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 21868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*send_action)(void *priv, unsigned int freq, unsigned int wait, 21878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *dst, const u8 *src, const u8 *bssid, 21881f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *data, size_t data_len, int no_cck); 21898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 21908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 21918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * send_action_cancel_wait - Cancel action frame TX wait 21928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 21938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 21948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This command cancels the wait time associated with sending an action 21958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * frame. It is only available when %WPA_DRIVER_FLAGS_OFFCHANNEL_TX is 21968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set in the driver flags. 21978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 21988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt void (*send_action_cancel_wait)(void *priv); 21998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 22008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 22018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * remain_on_channel - Remain awake on a channel 22028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 22038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @freq: Frequency (in MHz) of the channel 22048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @duration: Duration in milliseconds 22058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 22068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 22078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This command is used to request the driver to remain awake on the 22088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * specified channel for the specified duration and report received 22098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Action frames with EVENT_RX_ACTION events. Optionally, received 22108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Probe Request frames may also be requested to be reported by calling 22118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * probe_req_report(). These will be reported with EVENT_RX_PROBE_REQ. 22128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 22138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * The driver may not be at the requested channel when this function 22148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * returns, i.e., the return code is only indicating whether the 22158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * request was accepted. The caller will need to wait until the 22168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_REMAIN_ON_CHANNEL event indicates that the driver has 22178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * completed the channel change. This may take some time due to other 22188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * need for the radio and the caller should be prepared to timing out 22198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * its wait since there are no guarantees on when this request can be 22208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * executed. 22218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 22228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*remain_on_channel)(void *priv, unsigned int freq, 22238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int duration); 22248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 22258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 22268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * cancel_remain_on_channel - Cancel remain-on-channel operation 22278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 22288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 22298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This command can be used to cancel a remain-on-channel operation 22308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * before its originally requested duration has passed. This could be 22318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * used, e.g., when remain_on_channel() is used to request extra time 22328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * to receive a response to an Action frame and the response is 22338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * received when there is still unneeded time remaining on the 22348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * remain-on-channel operation. 22358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 22368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*cancel_remain_on_channel)(void *priv); 22378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 22388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 22398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * probe_req_report - Request Probe Request frames to be indicated 22408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 22418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @report: Whether to report received Probe Request frames 22428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure (or if not supported) 22438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 22448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This command can be used to request the driver to indicate when 22458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Probe Request frames are received with EVENT_RX_PROBE_REQ events. 22468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Since this operation may require extra resources, e.g., due to less 22478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * optimal hardware/firmware RX filtering, many drivers may disable 22488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Probe Request reporting at least in station mode. This command is 22498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * used to notify the driver when the Probe Request frames need to be 22508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * reported, e.g., during remain-on-channel operations. 22518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 22528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*probe_req_report)(void *priv, int report); 22538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 22548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 22558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * deinit_ap - Deinitialize AP mode 22568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 22578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure (or if not supported) 22588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 22598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This optional function can be used to disable AP mode related 2260b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * configuration. If the interface was not dynamically added, 2261b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * change the driver mode to station mode to allow normal station 2262b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * operations like scanning to be completed. 22638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 22648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*deinit_ap)(void *priv); 22658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 22668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 226704949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * deinit_p2p_cli - Deinitialize P2P client mode 226804949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * @priv: Private driver interface data 226904949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * Returns: 0 on success, -1 on failure (or if not supported) 227004949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * 2271b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * This optional function can be used to disable P2P client mode. If the 2272b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * interface was not dynamically added, change the interface type back 2273b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * to station mode. 227404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt */ 227504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt int (*deinit_p2p_cli)(void *priv); 227604949598a23f501be6eec21697465fd46a28840aDmitry Shmidt 227704949598a23f501be6eec21697465fd46a28840aDmitry Shmidt /** 22788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * suspend - Notification on system suspend/hibernate event 22798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 22808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 22818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt void (*suspend)(void *priv); 22828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 22838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 22848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * resume - Notification on system resume/thaw event 22858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 22868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 22878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt void (*resume)(void *priv); 22888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 22898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 22908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * signal_monitor - Set signal monitoring parameters 22918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 22928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @threshold: Threshold value for signal change events; 0 = disabled 22938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @hysteresis: Minimum change in signal strength before indicating a 22948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * new event 22958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure (or if not supported) 22968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 22978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function can be used to configure monitoring of signal strength 22988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * with the current AP. Whenever signal strength drops below the 22998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * %threshold value or increases above it, EVENT_SIGNAL_CHANGE event 23008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * should be generated assuming the signal strength has changed at 23018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * least %hysteresis from the previously indicated signal change event. 23028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 23038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*signal_monitor)(void *priv, int threshold, int hysteresis); 23048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 23058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 23068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * send_frame - Send IEEE 802.11 frame (testing use only) 23078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 23088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data: IEEE 802.11 frame with IEEE 802.11 header 23098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data_len: Size of the frame 23108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @encrypt: Whether to encrypt the frame (if keys are set) 23118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 23128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 23138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only used for debugging purposes and is not 23148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * required to be implemented for normal operations. 23158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 23168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*send_frame)(void *priv, const u8 *data, size_t data_len, 23178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int encrypt); 23188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 23198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 23208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * shared_freq - Get operating frequency of shared interface(s) 23218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 23228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Operating frequency in MHz, 0 if no shared operation in 23238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * use, or -1 on failure 23248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 23258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This command can be used to request the current operating frequency 23268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * of any virtual interface that shares the same radio to provide 23278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * information for channel selection for other virtual interfaces. 23288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 23298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*shared_freq)(void *priv); 23308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 23318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 23328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * get_noa - Get current Notice of Absence attribute payload 23338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 23348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @buf: Buffer for returning NoA 23358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @buf_len: Buffer length in octets 23368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Number of octets used in buf, 0 to indicate no NoA is being 23378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * advertized, or -1 on failure 23388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 23398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is used to fetch the current Notice of Absence 23408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * attribute value from GO. 23418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 23428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*get_noa)(void *priv, u8 *buf, size_t buf_len); 23438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 23448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 23458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_noa - Set Notice of Absence parameters for GO (testing) 23468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 23478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @count: Count 23488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @start: Start time in ms from next TBTT 23498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @duration: Duration in ms 23508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success or -1 on failure 23518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 23528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is used to set Notice of Absence parameters for GO. It 23538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * is used only for testing. To disable NoA, all parameters are set to 23548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 0. 23558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 23568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_noa)(void *priv, u8 count, int start, int duration); 23578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 23588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 23598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set_p2p_powersave - Set P2P power save options 23608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 23618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @legacy_ps: 0 = disable, 1 = enable, 2 = maximum PS, -1 = no change 23628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @opp_ps: 0 = disable, 1 = enable, -1 = no change 23638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ctwindow: 0.. = change (msec), -1 = no change 23648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success or -1 on failure 23658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 23668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*set_p2p_powersave)(void *priv, int legacy_ps, int opp_ps, 23678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int ctwindow); 23688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 23698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 23708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ampdu - Enable/disable aggregation 23718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 23728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ampdu: 1/0 = enable/disable A-MPDU aggregation 23738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success or -1 on failure 23748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 23758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*ampdu)(void *priv, int ampdu); 23768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 23778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 23788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * get_radio_name - Get physical radio name for the device 23798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 23808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Radio name or %NULL if not known 23818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 23828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * The returned data must not be modified by the caller. It is assumed 23838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * that any interface that has the same radio name as another is 23848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * sharing the same physical radio. This information can be used to 23858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * share scan results etc. information between the virtual interfaces 23868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * to speed up various operations. 23878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 23888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char * (*get_radio_name)(void *priv); 23898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 23908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 23918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p_find - Start P2P Device Discovery 23928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 23938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @timeout: Timeout for find operation in seconds or 0 for no timeout 23948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @type: Device Discovery type (enum p2p_discovery_type) 23958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 23968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 23978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only used if the driver implements P2P management, 23988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * i.e., if it sets WPA_DRIVER_FLAGS_P2P_MGMT in 23998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_capa. 24008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 24018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*p2p_find)(void *priv, unsigned int timeout, int type); 24028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 24038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 24048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p_stop_find - Stop P2P Device Discovery 24058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 24068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 24078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 24088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only used if the driver implements P2P management, 24098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * i.e., if it sets WPA_DRIVER_FLAGS_P2P_MGMT in 24108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_capa. 24118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 24128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*p2p_stop_find)(void *priv); 24138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 24148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 24158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p_listen - Start P2P Listen state for specified duration 24168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 24178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @timeout: Listen state duration in milliseconds 24188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 24198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 24208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function can be used to request the P2P module to keep the 24218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * device discoverable on the listen channel for an extended set of 24228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * time. At least in its current form, this is mainly used for testing 24238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * purposes and may not be of much use for normal P2P operations. 24248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 24258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only used if the driver implements P2P management, 24268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * i.e., if it sets WPA_DRIVER_FLAGS_P2P_MGMT in 24278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_capa. 24288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 24298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*p2p_listen)(void *priv, unsigned int timeout); 24308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 24318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 24328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p_connect - Start P2P group formation (GO negotiation) 24338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 24348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @peer_addr: MAC address of the peer P2P client 24358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @wps_method: enum p2p_wps_method value indicating config method 24368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @go_intent: Local GO intent value (1..15) 24378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @own_interface_addr: Intended interface address to use with the 24388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * group 24398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @force_freq: The only allowed channel frequency in MHz or 0 24408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @persistent_group: Whether to create persistent group 24418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 24428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 24438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only used if the driver implements P2P management, 24448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * i.e., if it sets WPA_DRIVER_FLAGS_P2P_MGMT in 24458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_capa. 24468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 24478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*p2p_connect)(void *priv, const u8 *peer_addr, int wps_method, 24488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int go_intent, const u8 *own_interface_addr, 24498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int force_freq, int persistent_group); 24508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 24518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 24528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wps_success_cb - Report successfully completed WPS provisioning 24538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 24548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @peer_addr: Peer address 24558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 24568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 24578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is used to report successfully completed WPS 24588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * provisioning during group formation in both GO/Registrar and 24598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * client/Enrollee roles. 24608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 24618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only used if the driver implements P2P management, 24628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * i.e., if it sets WPA_DRIVER_FLAGS_P2P_MGMT in 24638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_capa. 24648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 24658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*wps_success_cb)(void *priv, const u8 *peer_addr); 24668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 24678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 24688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p_group_formation_failed - Report failed WPS provisioning 24698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 24708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 24718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 24728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is used to report failed group formation. This can 24738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * happen either due to failed WPS provisioning or due to 15 second 24748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * timeout during the provisioning phase. 24758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 24768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only used if the driver implements P2P management, 24778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * i.e., if it sets WPA_DRIVER_FLAGS_P2P_MGMT in 24788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_capa. 24798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 24808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*p2p_group_formation_failed)(void *priv); 24818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 24828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 24838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p_set_params - Set P2P parameters 24848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 24858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @params: P2P parameters 24868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 24878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 24888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only used if the driver implements P2P management, 24898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * i.e., if it sets WPA_DRIVER_FLAGS_P2P_MGMT in 24908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_capa. 24918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 24928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*p2p_set_params)(void *priv, const struct p2p_params *params); 24938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 24948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 24958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p_prov_disc_req - Send Provision Discovery Request 24968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 24978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @peer_addr: MAC address of the peer P2P client 24988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @config_methods: WPS Config Methods value (only one bit set) 24998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 25008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 25018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function can be used to request a discovered P2P peer to 25028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * display a PIN (config_methods = WPS_CONFIG_DISPLAY) or be prepared 25038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * to enter a PIN from us (config_methods = WPS_CONFIG_KEYPAD). The 25048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Provision Discovery Request frame is transmitted once immediately 25058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * and if no response is received, the frame will be sent again 25068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * whenever the target device is discovered during device dsicovery 25078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * (start with a p2p_find() call). Response from the peer is indicated 25088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * with the EVENT_P2P_PROV_DISC_RESPONSE event. 25098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 25108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only used if the driver implements P2P management, 25118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * i.e., if it sets WPA_DRIVER_FLAGS_P2P_MGMT in 25128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_capa. 25138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 25148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*p2p_prov_disc_req)(void *priv, const u8 *peer_addr, 25151f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt u16 config_methods, int join); 25168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 25178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 25188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p_sd_request - Schedule a service discovery query 25198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 25208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @dst: Destination peer or %NULL to apply for all peers 25218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @tlvs: P2P Service Query TLV(s) 25228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Reference to the query or 0 on failure 25238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 25248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Response to the query is indicated with the 25258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_P2P_SD_RESPONSE driver event. 25268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 25278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only used if the driver implements P2P management, 25288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * i.e., if it sets WPA_DRIVER_FLAGS_P2P_MGMT in 25298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_capa. 25308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 25318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u64 (*p2p_sd_request)(void *priv, const u8 *dst, 25328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const struct wpabuf *tlvs); 25338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 25348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 25358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p_sd_cancel_request - Cancel a pending service discovery query 25368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 25378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @req: Query reference from p2p_sd_request() 25388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 25398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 25408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only used if the driver implements P2P management, 25418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * i.e., if it sets WPA_DRIVER_FLAGS_P2P_MGMT in 25428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_capa. 25438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 25448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*p2p_sd_cancel_request)(void *priv, u64 req); 25458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 25468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 25478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p_sd_response - Send response to a service discovery query 25488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 25498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @freq: Frequency from EVENT_P2P_SD_REQUEST event 25508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @dst: Destination address from EVENT_P2P_SD_REQUEST event 25518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @dialog_token: Dialog token from EVENT_P2P_SD_REQUEST event 25528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @resp_tlvs: P2P Service Response TLV(s) 25538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 25548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 25558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is called as a response to the request indicated with 25568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the EVENT_P2P_SD_REQUEST driver event. 25578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 25588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only used if the driver implements P2P management, 25598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * i.e., if it sets WPA_DRIVER_FLAGS_P2P_MGMT in 25608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_capa. 25618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 25628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*p2p_sd_response)(void *priv, int freq, const u8 *dst, 25638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 dialog_token, 25648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const struct wpabuf *resp_tlvs); 25658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 25668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 25678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p_service_update - Indicate a change in local services 25688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 25698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 25708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 25718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function needs to be called whenever there is a change in 25728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * availability of the local services. This will increment the 25738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Service Update Indicator value which will be used in SD Request and 25748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Response frames. 25758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 25768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is only used if the driver implements P2P management, 25778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * i.e., if it sets WPA_DRIVER_FLAGS_P2P_MGMT in 25788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_capa. 25798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 25808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*p2p_service_update)(void *priv); 25818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 25828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 25838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p_reject - Reject peer device (explicitly block connections) 25848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 25858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: MAC address of the peer 25868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 25878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 25888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*p2p_reject)(void *priv, const u8 *addr); 25898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 25908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 25918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * p2p_invite - Invite a P2P Device into a group 25928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 25938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @peer: Device Address of the peer P2P Device 25948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @role: Local role in the group 25958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @bssid: Group BSSID or %NULL if not known 25968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ssid: Group SSID 25978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ssid_len: Length of ssid in octets 25988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @go_dev_addr: Forced GO Device Address or %NULL if none 25998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @persistent_group: Whether this is to reinvoke a persistent group 26008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 26018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 26028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*p2p_invite)(void *priv, const u8 *peer, int role, 26038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *bssid, const u8 *ssid, size_t ssid_len, 26048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *go_dev_addr, int persistent_group); 26058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 26068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 26078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * send_tdls_mgmt - for sending TDLS management packets 26088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: private driver interface data 26098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @dst: Destination (peer) MAC address 26108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @action_code: TDLS action code for the mssage 26118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @dialog_token: Dialog Token to use in the message (if needed) 26128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @status_code: Status Code or Reason Code to use (if needed) 26138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @buf: TDLS IEs to add to the message 26148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @len: Length of buf in octets 26151f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Returns: 0 on success, negative (<0) on failure 26168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 26178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This optional function can be used to send packet to driver which is 26188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * responsible for receiving and sending all TDLS packets. 26198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 26208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*send_tdls_mgmt)(void *priv, const u8 *dst, u8 action_code, 26218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 dialog_token, u16 status_code, 26228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *buf, size_t len); 26238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 26241f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 26251f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * tdls_oper - Ask the driver to perform high-level TDLS operations 26261f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @priv: Private driver interface data 26271f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @oper: TDLS high-level operation. See %enum tdls_oper 26281f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @peer: Destination (peer) MAC address 26291f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Returns: 0 on success, negative (<0) on failure 26301f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 26311f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This optional function can be used to send high-level TDLS commands 26321f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * to the driver. 26331f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 26348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*tdls_oper)(void *priv, enum tdls_oper oper, const u8 *peer); 26358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 26368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 263761d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * wnm_oper - Notify driver of the WNM frame reception 263861d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * @priv: Private driver interface data 263961d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * @oper: WNM operation. See %enum wnm_oper 264061d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * @peer: Destination (peer) MAC address 264161d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * @buf: Buffer for the driver to fill in (for getting IE) 264261d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * @buf_len: Return the len of buf 264361d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * Returns: 0 on success, negative (<0) on failure 264461d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt */ 264561d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt int (*wnm_oper)(void *priv, enum wnm_oper oper, const u8 *peer, 264661d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt u8 *buf, u16 *buf_len); 264761d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt 264861d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt /** 2649051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt * set_qos_map - Set QoS Map 2650051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt * @priv: Private driver interface data 2651051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt * @qos_map_set: QoS Map 2652051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt * @qos_map_set_len: Length of QoS Map 2653051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt */ 2654051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt int (*set_qos_map)(void *priv, const u8 *qos_map_set, 2655051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt u8 qos_map_set_len); 2656051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt 2657051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt /** 26588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * signal_poll - Get current connection information 26598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @priv: Private driver interface data 26608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @signal_info: Connection info structure 26618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 26628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int (*signal_poll)(void *priv, struct wpa_signal_info *signal_info); 2663bd567ad93e03f285fdad93464100148cd5ae7941Dmitry Shmidt 2664bd567ad93e03f285fdad93464100148cd5ae7941Dmitry Shmidt /** 266575ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen * set_authmode - Set authentication algorithm(s) for static WEP 266675ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen * @priv: Private driver interface data 266775ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen * @authmode: 1=Open System, 2=Shared Key, 3=both 266875ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen * Returns: 0 on success, -1 on failure 266975ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen * 267075ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen * This function can be used to set authentication algorithms for AP 267175ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen * mode when static WEP is used. If the driver uses user space MLME/SME 267275ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen * implementation, there is no need to implement this function. 26731f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 26741f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * DEPRECATED - use set_ap() instead 267575ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen */ 267675ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen int (*set_authmode)(void *priv, int authmode); 26771f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#ifdef ANDROID 267875ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen /** 2679bd567ad93e03f285fdad93464100148cd5ae7941Dmitry Shmidt * driver_cmd - execute driver-specific command 2680bd567ad93e03f285fdad93464100148cd5ae7941Dmitry Shmidt * @priv: private driver interface data 2681bd567ad93e03f285fdad93464100148cd5ae7941Dmitry Shmidt * @cmd: command to execute 2682bd567ad93e03f285fdad93464100148cd5ae7941Dmitry Shmidt * @buf: return buffer 2683bd567ad93e03f285fdad93464100148cd5ae7941Dmitry Shmidt * @buf_len: buffer length 2684bd567ad93e03f285fdad93464100148cd5ae7941Dmitry Shmidt * 2685bd567ad93e03f285fdad93464100148cd5ae7941Dmitry Shmidt * Returns: 0 on success, -1 on failure 2686bd567ad93e03f285fdad93464100148cd5ae7941Dmitry Shmidt */ 2687bd567ad93e03f285fdad93464100148cd5ae7941Dmitry Shmidt int (*driver_cmd)(void *priv, char *cmd, char *buf, size_t buf_len); 26881f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#endif 26891f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 26901f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * set_rekey_info - Set rekey information 26911f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @priv: Private driver interface data 26921f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @kek: Current KEK 26931f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @kck: Current KCK 26941f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @replay_ctr: Current EAPOL-Key Replay Counter 26951f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 26961f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This optional function can be used to provide information for the 26971f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * driver/firmware to process EAPOL-Key frames in Group Key Handshake 26981f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * while the host (including wpa_supplicant) is sleeping. 26991f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 27001f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt void (*set_rekey_info)(void *priv, const u8 *kek, const u8 *kck, 27011f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *replay_ctr); 27021f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 27031f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 27041f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * sta_assoc - Station association indication 27051f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @priv: Private driver interface data 27061f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @own_addr: Source address and BSSID for association frame 27071f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @addr: MAC address of the station to associate 27081f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @reassoc: flag to indicate re-association 27091f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @status: association response status code 27101f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @ie: assoc response ie buffer 27111f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @len: ie buffer length 27121f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Returns: 0 on success, -1 on failure 27131f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 27141f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This function indicates the driver to send (Re)Association 27151f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Response frame to the station. 27161f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 27171f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int (*sta_assoc)(void *priv, const u8 *own_addr, const u8 *addr, 27181f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int reassoc, u16 status, const u8 *ie, size_t len); 27191f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 27201f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 27211f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * sta_auth - Station authentication indication 27221f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @priv: Private driver interface data 27231f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @own_addr: Source address and BSSID for authentication frame 27241f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @addr: MAC address of the station to associate 27251f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @seq: authentication sequence number 27261f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @status: authentication response status code 27271f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @ie: authentication frame ie buffer 27281f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @len: ie buffer length 27291f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 27301f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This function indicates the driver to send Authentication frame 27311f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * to the station. 27321f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 27331f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int (*sta_auth)(void *priv, const u8 *own_addr, const u8 *addr, 27341f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt u16 seq, u16 status, const u8 *ie, size_t len); 27351f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 27361f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 27371f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * add_tspec - Add traffic stream 27381f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @priv: Private driver interface data 27391f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @addr: MAC address of the station to associate 27401f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @tspec_ie: tspec ie buffer 27411f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @tspec_ielen: tspec ie length 27421f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Returns: 0 on success, -1 on failure 27431f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 27441f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This function adds the traffic steam for the station 27451f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * and fills the medium_time in tspec_ie. 27461f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 27471f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int (*add_tspec)(void *priv, const u8 *addr, u8 *tspec_ie, 27481f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt size_t tspec_ielen); 27491f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 27501f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 27511f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * add_sta_node - Add a station node in the driver 27521f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @priv: Private driver interface data 27531f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @addr: MAC address of the station to add 27541f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @auth_alg: authentication algorithm used by the station 27551f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Returns: 0 on success, -1 on failure 27561f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 27571f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This function adds the station node in the driver, when 27581f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * the station gets added by FT-over-DS. 27591f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 27601f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int (*add_sta_node)(void *priv, const u8 *addr, u16 auth_alg); 27611f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 27621f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 27631f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * sched_scan - Request the driver to initiate scheduled scan 27641f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @priv: Private driver interface data 27651f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @params: Scan parameters 27661f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @interval: Interval between scan cycles in milliseconds 27671f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Returns: 0 on success, -1 on failure 27681f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 27691f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This operation should be used for scheduled scan offload to 27701f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * the hardware. Every time scan results are available, the 27711f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * driver should report scan results event for wpa_supplicant 27721f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * which will eventually request the results with 27731f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * wpa_driver_get_scan_results2(). This operation is optional 27741f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * and if not provided or if it returns -1, we fall back to 27751f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * normal host-scheduled scans. 27761f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 27771f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int (*sched_scan)(void *priv, struct wpa_driver_scan_params *params, 27781f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt u32 interval); 27791f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 27801f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 27811f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * stop_sched_scan - Request the driver to stop a scheduled scan 27821f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @priv: Private driver interface data 27831f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Returns: 0 on success, -1 on failure 27841f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 27851f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This should cause the scheduled scan to be stopped and 27861f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * results should stop being sent. Must be supported if 27871f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * sched_scan is supported. 27881f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 27891f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int (*stop_sched_scan)(void *priv); 27901f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 27911f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 27921f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * poll_client - Probe (null data or such) the given station 27931f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @priv: Private driver interface data 27941f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @own_addr: MAC address of sending interface 27951f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @addr: MAC address of the station to probe 27961f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @qos: Indicates whether station is QoS station 27971f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 27981f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This function is used to verify whether an associated station is 27991f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * still present. This function does not need to be implemented if the 28001f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * driver provides such inactivity polling mechanism. 28011f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 28021f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt void (*poll_client)(void *priv, const u8 *own_addr, 28031f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *addr, int qos); 280404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt 28051f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 280604949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * radio_disable - Disable/enable radio 28071f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @priv: Private driver interface data 280804949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * @disabled: 1=disable 0=enable radio 28091f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Returns: 0 on success, -1 on failure 28101f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 281104949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * This optional command is for testing purposes. It can be used to 281204949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * disable the radio on a testbed device to simulate out-of-radio-range 281304949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * conditions. 281404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt */ 281504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt int (*radio_disable)(void *priv, int disabled); 281604949598a23f501be6eec21697465fd46a28840aDmitry Shmidt 281704949598a23f501be6eec21697465fd46a28840aDmitry Shmidt /** 281804949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * switch_channel - Announce channel switch and migrate the GO to the 281904949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * given frequency 282004949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * @priv: Private driver interface data 2821e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @settings: Settings for CSA period and new channel 282204949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * Returns: 0 on success, -1 on failure 282304949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * 282404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * This function is used to move the GO to the legacy STA channel to 282504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * avoid frequency conflict in single channel concurrency. 28261f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 2827e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt int (*switch_channel)(void *priv, struct csa_settings *settings); 2828ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt 2829ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt /** 2830ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * start_dfs_cac - Listen for radar interference on the channel 2831ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * @priv: Private driver interface data 2832051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt * @freq: Channel parameters 2833ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * Returns: 0 on success, -1 on failure 2834ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt */ 2835051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt int (*start_dfs_cac)(void *priv, struct hostapd_freq_params *freq); 2836ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt 2837ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt /** 2838ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * stop_ap - Removes beacon from AP 2839ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * @priv: Private driver interface data 2840ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * Returns: 0 on success, -1 on failure (or if not supported) 2841ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * 2842ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * This optional function can be used to disable AP mode related 2843ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * configuration. Unlike deinit_ap, it does not change to station 2844ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * mode. 2845ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt */ 2846ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt int (*stop_ap)(void *priv); 2847b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt 2848b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt /** 2849b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * get_survey - Retrieve survey data 2850b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * @priv: Private driver interface data 2851b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * @freq: If set, survey data for the specified frequency is only 2852b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * being requested. If not set, all survey data is requested. 2853b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * Returns: 0 on success, -1 on failure 2854b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * 2855b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * Use this to retrieve: 2856b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * 2857b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * - the observed channel noise floor 2858b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * - the amount of time we have spent on the channel 2859b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * - the amount of time during which we have spent on the channel that 2860b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * the radio has determined the medium is busy and we cannot 2861b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * transmit 2862b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * - the amount of time we have spent receiving data 2863b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * - the amount of time we have spent transmitting data 2864b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * 2865b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * This data can be used for spectrum heuristics. One example is 2866b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * Automatic Channel Selection (ACS). The channel survey data is 2867b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * kept on a linked list on the channel data, one entry is added 2868b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * for each survey. The min_nf of the channel is updated for each 2869b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * survey. 2870b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt */ 2871b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt int (*get_survey)(void *priv, unsigned int freq); 28725605286c30e1701491bd3af974ae423727750eddDmitry Shmidt 28735605286c30e1701491bd3af974ae423727750eddDmitry Shmidt /** 28745605286c30e1701491bd3af974ae423727750eddDmitry Shmidt * status - Get driver interface status information 28755605286c30e1701491bd3af974ae423727750eddDmitry Shmidt * @priv: Private driver interface data 28765605286c30e1701491bd3af974ae423727750eddDmitry Shmidt * @buf: Buffer for printing tou the status information 28775605286c30e1701491bd3af974ae423727750eddDmitry Shmidt * @buflen: Maximum length of the buffer 28785605286c30e1701491bd3af974ae423727750eddDmitry Shmidt * Returns: Length of written status information or -1 on failure 28795605286c30e1701491bd3af974ae423727750eddDmitry Shmidt */ 28805605286c30e1701491bd3af974ae423727750eddDmitry Shmidt int (*status)(void *priv, char *buf, size_t buflen); 28818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 28828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 28838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 28848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 28858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * enum wpa_event_type - Event type for wpa_supplicant_event() calls 28868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 28878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtenum wpa_event_type { 28888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 28898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_ASSOC - Association completed 28908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 28918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event needs to be delivered when the driver completes IEEE 28928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 802.11 association or reassociation successfully. 28938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_driver_ops::get_bssid() is expected to provide the current BSSID 28948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * after this event has been generated. In addition, optional 28958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_ASSOCINFO may be generated just before EVENT_ASSOC to provide 28968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * more information about the association. If the driver interface gets 28978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * both of these events at the same time, it can also include the 28988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * assoc_info data in EVENT_ASSOC call. 28998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 29008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_ASSOC, 29018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 29028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 29038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_DISASSOC - Association lost 29048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 29058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event should be called when association is lost either due to 29068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * receiving deauthenticate or disassociate frame from the AP or when 29078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * sending either of these frames to the current AP. If the driver 29088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * supports separate deauthentication event, EVENT_DISASSOC should only 29098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * be used for disassociation and EVENT_DEAUTH for deauthentication. 29108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * In AP mode, union wpa_event_data::disassoc_info is required. 29118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 29128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_DISASSOC, 29138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 29148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 29158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_MICHAEL_MIC_FAILURE - Michael MIC (TKIP) detected 29168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 29178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event must be delivered when a Michael MIC error is detected by 29188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the local driver. Additional data for event processing is 29198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * provided with union wpa_event_data::michael_mic_failure. This 29208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * information is used to request new encyption key and to initiate 29218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * TKIP countermeasures if needed. 29228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 29238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_MICHAEL_MIC_FAILURE, 29248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 29258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 29268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_SCAN_RESULTS - Scan results available 29278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 29288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event must be called whenever scan results are available to be 29298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * fetched with struct wpa_driver_ops::get_scan_results(). This event 29308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * is expected to be used some time after struct wpa_driver_ops::scan() 29318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * is called. If the driver provides an unsolicited event when the scan 29328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * has been completed, this event can be used to trigger 29338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_SCAN_RESULTS call. If such event is not available from the 29348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * driver, the driver wrapper code is expected to use a registered 29358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * timeout to generate EVENT_SCAN_RESULTS call after the time that the 29368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * scan is expected to be completed. Optional information about 29378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * completed scan can be provided with union wpa_event_data::scan_info. 29388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 29398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_SCAN_RESULTS, 29408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 29418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 29428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_ASSOCINFO - Report optional extra information for association 29438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 29448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event can be used to report extra association information for 29458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_ASSOC processing. This extra information includes IEs from 29468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * association frames and Beacon/Probe Response frames in union 29478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_event_data::assoc_info. EVENT_ASSOCINFO must be send just before 29488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_ASSOC. Alternatively, the driver interface can include 29498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * assoc_info data in the EVENT_ASSOC call if it has all the 29508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * information available at the same point. 29518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 29528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_ASSOCINFO, 29538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 29548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 29558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_INTERFACE_STATUS - Report interface status changes 29568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 29578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This optional event can be used to report changes in interface 29588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * status (interface added/removed) using union 29598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_event_data::interface_status. This can be used to trigger 29608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_supplicant to stop and re-start processing for the interface, 29618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * e.g., when a cardbus card is ejected/inserted. 29628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 29638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_INTERFACE_STATUS, 29648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 29658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 29668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_PMKID_CANDIDATE - Report a candidate AP for pre-authentication 29678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 29688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event can be used to inform wpa_supplicant about candidates for 29698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * RSN (WPA2) pre-authentication. If wpa_supplicant is not responsible 29708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * for scan request (ap_scan=2 mode), this event is required for 29718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * pre-authentication. If wpa_supplicant is performing scan request 29728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * (ap_scan=1), this event is optional since scan results can be used 29738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * to add pre-authentication candidates. union 29748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_event_data::pmkid_candidate is used to report the BSSID of the 29758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * candidate and priority of the candidate, e.g., based on the signal 29768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * strength, in order to try to pre-authenticate first with candidates 29778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * that are most likely targets for re-association. 29788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 29798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_PMKID_CANDIDATE can be called whenever the driver has updates 29808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * on the candidate list. In addition, it can be called for the current 29818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * AP and APs that have existing PMKSA cache entries. wpa_supplicant 29828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * will automatically skip pre-authentication in cases where a valid 29838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * PMKSA exists. When more than one candidate exists, this event should 29848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * be generated once for each candidate. 29858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 29868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Driver will be notified about successful pre-authentication with 29878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_ops::add_pmkid() calls. 29888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 29898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_PMKID_CANDIDATE, 29908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 29918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 29928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_STKSTART - Request STK handshake (MLME-STKSTART.request) 29938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 29948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event can be used to inform wpa_supplicant about desire to set 29958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * up secure direct link connection between two stations as defined in 29968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * IEEE 802.11e with a new PeerKey mechanism that replaced the original 29978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * STAKey negotiation. The caller will need to set peer address for the 29988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * event. 29998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_STKSTART, 30018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_TDLS - Request TDLS operation 30048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 30058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event can be used to request a TDLS operation to be performed. 30068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_TDLS, 30088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_FT_RESPONSE - Report FT (IEEE 802.11r) response IEs 30118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 30128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * The driver is expected to report the received FT IEs from 30138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * FT authentication sequence from the AP. The FT IEs are included in 30148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the extra information in union wpa_event_data::ft_ies. 30158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_FT_RESPONSE, 30178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_IBSS_RSN_START - Request RSN authentication in IBSS 30208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 30218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * The driver can use this event to inform wpa_supplicant about a STA 30228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * in an IBSS with which protected frames could be exchanged. This 30238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * event starts RSN authentication with the other STA to authenticate 30248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the STA and set up encryption keys with it. 30258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_IBSS_RSN_START, 30278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_AUTH - Authentication result 30308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 30318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event should be called when authentication attempt has been 30328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * completed. This is only used if the driver supports separate 30338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * authentication step (struct wpa_driver_ops::authenticate). 30348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Information about authentication result is included in 30358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * union wpa_event_data::auth. 30368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_AUTH, 30388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_DEAUTH - Authentication lost 30418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 30428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event should be called when authentication is lost either due 30438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * to receiving deauthenticate frame from the AP or when sending that 30448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * frame to the current AP. 30458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * In AP mode, union wpa_event_data::deauth_info is required. 30468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_DEAUTH, 30488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_ASSOC_REJECT - Association rejected 30518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 30528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event should be called when (re)association attempt has been 30538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * rejected by the AP. Information about the association response is 30548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * included in union wpa_event_data::assoc_reject. 30558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_ASSOC_REJECT, 30578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_AUTH_TIMED_OUT - Authentication timed out 30608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_AUTH_TIMED_OUT, 30628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_ASSOC_TIMED_OUT - Association timed out 30658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_ASSOC_TIMED_OUT, 30678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_FT_RRB_RX - FT (IEEE 802.11r) RRB frame received 30708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_FT_RRB_RX, 30728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_WPS_BUTTON_PUSHED - Report hardware push button press for WPS 30758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_WPS_BUTTON_PUSHED, 30778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_TX_STATUS - Report TX status 30808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_TX_STATUS, 30828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_RX_FROM_UNKNOWN - Report RX from unknown STA 30858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_RX_FROM_UNKNOWN, 30878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_RX_MGMT - Report RX of a management frame 30908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 30918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_RX_MGMT, 30928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 30938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 30948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_RX_ACTION - Action frame received 30958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 30968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used to indicate when an Action frame has been 30978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * received. Information about the received frame is included in 30988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * union wpa_event_data::rx_action. 30998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 31008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_RX_ACTION, 31018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 31028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 31038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_REMAIN_ON_CHANNEL - Remain-on-channel duration started 31048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 31058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used to indicate when the driver has started the 31068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * requested remain-on-channel duration. Information about the 31078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * operation is included in union wpa_event_data::remain_on_channel. 31088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 31098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_REMAIN_ON_CHANNEL, 31108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 31118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 31128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_CANCEL_REMAIN_ON_CHANNEL - Remain-on-channel timed out 31138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 31148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used to indicate when the driver has completed 31158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * remain-on-channel duration, i.e., may noot be available on the 31168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * requested channel anymore. Information about the 31178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * operation is included in union wpa_event_data::remain_on_channel. 31188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 31198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_CANCEL_REMAIN_ON_CHANNEL, 31208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 31218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 31228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_MLME_RX - Report reception of frame for MLME (test use only) 31238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 31248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used only by driver_test.c and userspace MLME. 31258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 31268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_MLME_RX, 31278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 31288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 31298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_RX_PROBE_REQ - Indicate received Probe Request frame 31308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 31318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used to indicate when a Probe Request frame has been 31328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * received. Information about the received frame is included in 31338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * union wpa_event_data::rx_probe_req. The driver is required to report 31348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * these events only after successfully completed probe_req_report() 31358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * commands to request the events (i.e., report parameter is non-zero) 31368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * in station mode. In AP mode, Probe Request frames should always be 31378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * reported. 31388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 31398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_RX_PROBE_REQ, 31408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 31418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 31428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_NEW_STA - New wired device noticed 31438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 31448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used to indicate that a new device has been detected 31458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * in a network that does not use association-like functionality (i.e., 31468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * mainly wired Ethernet). This can be used to start EAPOL 31478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * authenticator when receiving a frame from a device. The address of 31488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the device is included in union wpa_event_data::new_sta. 31498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 31508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_NEW_STA, 31518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 31528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 31538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_EAPOL_RX - Report received EAPOL frame 31548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 31558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * When in AP mode with hostapd, this event is required to be used to 31568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * deliver the receive EAPOL frames from the driver. With 31578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * %wpa_supplicant, this event is used only if the send_eapol() handler 31588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * is used to override the use of l2_packet for EAPOL frame TX. 31598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 31608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_EAPOL_RX, 31618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 31628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 31638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_SIGNAL_CHANGE - Indicate change in signal strength 31648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 31658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used to indicate changes in the signal strength 31668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * observed in frames received from the current AP if signal strength 31678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * monitoring has been enabled with signal_monitor(). 31688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 31698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_SIGNAL_CHANGE, 31708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 31718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 31728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_INTERFACE_ENABLED - Notify that interface was enabled 31738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 31748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used to indicate that the interface was enabled after 31758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * having been previously disabled, e.g., due to rfkill. 31768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 31778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_INTERFACE_ENABLED, 31788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 31798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 31808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_INTERFACE_DISABLED - Notify that interface was disabled 31818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 31828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used to indicate that the interface was disabled, 31838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * e.g., due to rfkill. 31848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 31858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_INTERFACE_DISABLED, 31868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 31878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 31888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_CHANNEL_LIST_CHANGED - Channel list changed 31898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 31908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used to indicate that the channel list has changed, 31918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * e.g., because of a regulatory domain change triggered by scan 31928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * results including an AP advertising a country code. 31938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 31948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_CHANNEL_LIST_CHANGED, 31958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 31968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 31978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_INTERFACE_UNAVAILABLE - Notify that interface is unavailable 31988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 31998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used to indicate that the driver cannot maintain this 32008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * interface in its operation mode anymore. The most likely use for 32018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * this is to indicate that AP mode operation is not available due to 32028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * operating channel would need to be changed to a DFS channel when 32038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the driver does not support radar detection and another virtual 32048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * interfaces caused the operating channel to change. Other similar 32058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * resource conflicts could also trigger this for station mode 32068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * interfaces. 32078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 32088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_INTERFACE_UNAVAILABLE, 32098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 32108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 32118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_BEST_CHANNEL 32128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 32138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Driver generates this event whenever it detects a better channel 32148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * (e.g., based on RSSI or channel use). This information can be used 32158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * to improve channel selection for a new AP/P2P group. 32168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 32178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_BEST_CHANNEL, 32188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 32198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 32208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_UNPROT_DEAUTH - Unprotected Deauthentication frame received 32218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 32228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event should be called when a Deauthentication frame is dropped 32238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * due to it not being protected (MFP/IEEE 802.11w). 32248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * union wpa_event_data::unprot_deauth is required to provide more 32258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * details of the frame. 32268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 32278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_UNPROT_DEAUTH, 32288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 32298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 32308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_UNPROT_DISASSOC - Unprotected Disassociation frame received 32318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 32328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event should be called when a Disassociation frame is dropped 32338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * due to it not being protected (MFP/IEEE 802.11w). 32348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * union wpa_event_data::unprot_disassoc is required to provide more 32358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * details of the frame. 32368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 32378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_UNPROT_DISASSOC, 32388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 32398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 32408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_STATION_LOW_ACK 32418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 32428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Driver generates this event whenever it detected that a particular 32438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * station was lost. Detection can be through massive transmission 32448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * failures for example. 32458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 32468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_STATION_LOW_ACK, 32478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 32488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 32498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_P2P_DEV_FOUND - Report a discovered P2P device 32508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 32518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used only if the driver implements P2P management 32528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * internally. Event data is stored in 32538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * union wpa_event_data::p2p_dev_found. 32548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 32558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_P2P_DEV_FOUND, 32568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 32578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 32588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_P2P_GO_NEG_REQ_RX - Report reception of GO Negotiation Request 32598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 32608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used only if the driver implements P2P management 32618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * internally. Event data is stored in 32628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * union wpa_event_data::p2p_go_neg_req_rx. 32638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 32648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_P2P_GO_NEG_REQ_RX, 32658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 32668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 32678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_P2P_GO_NEG_COMPLETED - Report completion of GO Negotiation 32688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 32698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This event is used only if the driver implements P2P management 32708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * internally. Event data is stored in 32718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * union wpa_event_data::p2p_go_neg_completed. 32728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 32738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_P2P_GO_NEG_COMPLETED, 32748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 32758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_P2P_PROV_DISC_REQUEST, 32768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_P2P_PROV_DISC_RESPONSE, 32778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_P2P_SD_REQUEST, 32788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_P2P_SD_RESPONSE, 32798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 32808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 32818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_IBSS_PEER_LOST - IBSS peer not reachable anymore 32828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 32831f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt EVENT_IBSS_PEER_LOST, 32841f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 32851f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 32861f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * EVENT_DRIVER_GTK_REKEY - Device/driver did GTK rekey 32871f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 32881f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This event carries the new replay counter to notify wpa_supplicant 32891f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * of the current EAPOL-Key Replay Counter in case the driver/firmware 32901f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * completed Group Key Handshake while the host (including 32911f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * wpa_supplicant was sleeping). 32921f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 32931f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt EVENT_DRIVER_GTK_REKEY, 32941f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 32951f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 32961f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * EVENT_SCHED_SCAN_STOPPED - Scheduled scan was stopped 32971f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 32981f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt EVENT_SCHED_SCAN_STOPPED, 32991f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 33001f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 33011f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * EVENT_DRIVER_CLIENT_POLL_OK - Station responded to poll 33021f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 33031f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This event indicates that the station responded to the poll 33041f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * initiated with @poll_client. 33051f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 33061f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt EVENT_DRIVER_CLIENT_POLL_OK, 33071f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 33081f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 33091f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * EVENT_EAPOL_TX_STATUS - notify of EAPOL TX status 33101f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 331104949598a23f501be6eec21697465fd46a28840aDmitry Shmidt EVENT_EAPOL_TX_STATUS, 331204949598a23f501be6eec21697465fd46a28840aDmitry Shmidt 331304949598a23f501be6eec21697465fd46a28840aDmitry Shmidt /** 331404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * EVENT_CH_SWITCH - AP or GO decided to switch channels 331504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * 331604949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * Described in wpa_event_data.ch_switch 331704949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * */ 331861d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt EVENT_CH_SWITCH, 331961d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt 332061d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt /** 332161d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * EVENT_WNM - Request WNM operation 332261d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * 332361d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * This event can be used to request a WNM operation to be performed. 332461d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt */ 3325f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt EVENT_WNM, 3326f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt 3327f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt /** 3328f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt * EVENT_CONNECT_FAILED_REASON - Connection failure reason in AP mode 3329f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt * 3330f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt * This event indicates that the driver reported a connection failure 3331f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt * with the specified client (for example, max client reached, etc.) in 3332f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt * AP mode. 3333f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt */ 3334ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt EVENT_CONNECT_FAILED_REASON, 3335ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt 3336ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt /** 3337ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * EVENT_RADAR_DETECTED - Notify of radar detection 3338ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * 3339ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * A radar has been detected on the supplied frequency, hostapd should 3340ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * react accordingly (e.g., change channel). 3341ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt */ 3342ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt EVENT_DFS_RADAR_DETECTED, 3343ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt 3344ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt /** 3345ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * EVENT_CAC_FINISHED - Notify that channel availability check has been completed 3346ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * 3347ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * After a successful CAC, the channel can be marked clear and used. 3348ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt */ 3349ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt EVENT_DFS_CAC_FINISHED, 3350ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt 3351ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt /** 3352ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * EVENT_CAC_ABORTED - Notify that channel availability check has been aborted 3353ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * 3354ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * The CAC was not successful, and the channel remains in the previous 3355ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * state. This may happen due to a radar beeing detected or other 3356ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * external influences. 3357ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt */ 3358ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt EVENT_DFS_CAC_ABORTED, 3359ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt 3360ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt /** 3361ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * EVENT_DFS_CAC_NOP_FINISHED - Notify that non-occupancy period is over 3362ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * 3363ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * The channel which was previously unavailable is now available again. 3364ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt */ 3365b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt EVENT_DFS_NOP_FINISHED, 3366b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt 3367b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt /* 3368b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * EVENT_SURVEY - Received survey data 3369b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * 3370b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * This event gets triggered when a driver query is issued for survey 3371b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * data and the requested data becomes available. The returned data is 3372b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * stored in struct survey_results. The results provide at most one 3373b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * survey entry for each frequency and at minimum will provide one survey 3374b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * entry for one frequency. The survey data can be os_malloc()'d and 3375b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * then os_free()'d, so the event callback must only copy data. 3376b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt */ 3377b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt EVENT_SURVEY 33788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 33798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 33808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 33818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 3382b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * struct freq_survey - Channel survey info 3383b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * 3384b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * @ifidx: Interface index in which this survey was observed 3385b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * @freq: Center of frequency of the surveyed channel 3386b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * @nf: Channel noise floor in dBm 3387b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * @channel_time: Amount of time in ms the radio spent on the channel 3388b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * @channel_time_busy: Amount of time in ms the radio detected some signal 3389b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * that indicated to the radio the channel was not clear 3390b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * @channel_time_rx: Amount of time the radio spent receiving data 3391b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * @channel_time_tx: Amount of time the radio spent transmitting data 3392b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * @filled: bitmask indicating which fields have been reported, see 3393b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * SURVEY_HAS_* defines. 3394b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * @list: Internal list pointers 3395b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt */ 3396b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidtstruct freq_survey { 3397b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt u32 ifidx; 3398b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt unsigned int freq; 3399b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt s8 nf; 3400b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt u64 channel_time; 3401b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt u64 channel_time_busy; 3402b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt u64 channel_time_rx; 3403b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt u64 channel_time_tx; 3404b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt unsigned int filled; 3405b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt struct dl_list list; 3406b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt}; 3407b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt 3408b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt#define SURVEY_HAS_NF BIT(0) 3409b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt#define SURVEY_HAS_CHAN_TIME BIT(1) 3410b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt#define SURVEY_HAS_CHAN_TIME_BUSY BIT(2) 3411b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt#define SURVEY_HAS_CHAN_TIME_RX BIT(3) 3412b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt#define SURVEY_HAS_CHAN_TIME_TX BIT(4) 3413b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt 3414b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt 3415b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt/** 34168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * union wpa_event_data - Additional data for wpa_supplicant_event() calls 34178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 34188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtunion wpa_event_data { 34198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 34208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct assoc_info - Data for EVENT_ASSOC and EVENT_ASSOCINFO events 34218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 34228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This structure is optional for EVENT_ASSOC calls and required for 34238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * EVENT_ASSOCINFO calls. By using EVENT_ASSOC with this data, the 34248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * driver interface does not need to generate separate EVENT_ASSOCINFO 34258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * calls. 34268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 34278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct assoc_info { 34288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 34298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * reassoc - Flag to indicate association or reassociation 34308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 34318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int reassoc; 34328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 34338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 34348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * req_ies - (Re)Association Request IEs 34358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 34368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * If the driver generates WPA/RSN IE, this event data must be 34378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * returned for WPA handshake to have needed information. If 34388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_supplicant-generated WPA/RSN IE is used, this 34398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * information event is optional. 34408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 34418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This should start with the first IE (fixed fields before IEs 34428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * are not included). 34438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 34448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *req_ies; 34458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 34468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 34478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * req_ies_len - Length of req_ies in bytes 34488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 34498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t req_ies_len; 34508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 34518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 34528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * resp_ies - (Re)Association Response IEs 34538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 34548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Optional association data from the driver. This data is not 34558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * required WPA, but may be useful for some protocols and as 34568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * such, should be reported if this is available to the driver 34578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * interface. 34588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 34598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This should start with the first IE (fixed fields before IEs 34608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * are not included). 34618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 34628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *resp_ies; 34638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 34648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 34658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * resp_ies_len - Length of resp_ies in bytes 34668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 34678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t resp_ies_len; 34688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 34698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 34708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * beacon_ies - Beacon or Probe Response IEs 34718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 34728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Optional Beacon/ProbeResp data: IEs included in Beacon or 34738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Probe Response frames from the current AP (i.e., the one 34748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * that the client just associated with). This information is 34758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * used to update WPA/RSN IE for the AP. If this field is not 34768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * set, the results from previous scan will be used. If no 34778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * data for the new AP is found, scan results will be requested 34788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * again (without scan request). At this point, the driver is 34798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * expected to provide WPA/RSN IE for the AP (if WPA/WPA2 is 34808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * used). 34818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 34828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This should start with the first IE (fixed fields before IEs 34838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * are not included). 34848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 34858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *beacon_ies; 34868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 34878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 34888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * beacon_ies_len - Length of beacon_ies */ 34898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t beacon_ies_len; 34908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 34918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 34928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * freq - Frequency of the operational channel in MHz 34938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 34948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int freq; 34958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 34968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 34978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * addr - Station address (for AP mode) 34988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 34998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *addr; 35008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } assoc_info; 35018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 35028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct disassoc_info - Data for EVENT_DISASSOC events 35048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct disassoc_info { 35068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * addr - Station address (for AP mode) 35088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *addr; 35108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 35118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * reason_code - Reason Code (host byte order) used in 35138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Deauthentication frame 35148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 reason_code; 35168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 35178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ie - Optional IE(s) in Disassociation frame 35198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ie; 35218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 35228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ie_len - Length of ie buffer in octets 35248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ie_len; 3526c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt 3527c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt /** 3528c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * locally_generated - Whether the frame was locally generated 3529c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt */ 3530c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt int locally_generated; 35318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } disassoc_info; 35328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 35338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct deauth_info - Data for EVENT_DEAUTH events 35358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct deauth_info { 35378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * addr - Station address (for AP mode) 35398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *addr; 35418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 35428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * reason_code - Reason Code (host byte order) used in 35448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Deauthentication frame 35458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 reason_code; 35478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 35488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ie - Optional IE(s) in Deauthentication frame 35508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ie; 35528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 35538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ie_len - Length of ie buffer in octets 35558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ie_len; 3557c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt 3558c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt /** 3559c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * locally_generated - Whether the frame was locally generated 3560c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt */ 3561c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt int locally_generated; 35628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } deauth_info; 35638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 35648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct michael_mic_failure - Data for EVENT_MICHAEL_MIC_FAILURE 35668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct michael_mic_failure { 35688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int unicast; 35698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *src; 35708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } michael_mic_failure; 35718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 35728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct interface_status - Data for EVENT_INTERFACE_STATUS 35748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct interface_status { 35768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt char ifname[100]; 35778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt enum { 35788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt EVENT_INTERFACE_ADDED, EVENT_INTERFACE_REMOVED 35798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } ievent; 35808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } interface_status; 35818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 35828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct pmkid_candidate - Data for EVENT_PMKID_CANDIDATE 35848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct pmkid_candidate { 35868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** BSSID of the PMKID candidate */ 35878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 bssid[ETH_ALEN]; 35888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** Smaller the index, higher the priority */ 35898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int index; 35908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** Whether RSN IE includes pre-authenticate flag */ 35918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int preauth; 35928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } pmkid_candidate; 35938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 35948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 35958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct stkstart - Data for EVENT_STKSTART 35968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 35978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct stkstart { 35988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 peer[ETH_ALEN]; 35998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } stkstart; 36008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 36018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 36028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct tdls - Data for EVENT_TDLS 36038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 36048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct tdls { 36058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 peer[ETH_ALEN]; 36068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt enum { 36078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt TDLS_REQUEST_SETUP, 36088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt TDLS_REQUEST_TEARDOWN 36098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } oper; 36108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 reason_code; /* for teardown */ 36118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } tdls; 36128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 36138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 361461d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt * struct wnm - Data for EVENT_WNM 361561d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt */ 361661d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt struct wnm { 361761d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt u8 addr[ETH_ALEN]; 361861d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt enum { 361961d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_OPER_SLEEP, 362061d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt } oper; 362161d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt enum { 362261d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_SLEEP_ENTER, 362361d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt WNM_SLEEP_EXIT 362461d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt } sleep_action; 362561d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt int sleep_intval; 362661d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt u16 reason_code; 362761d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt u8 *buf; 362861d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt u16 buf_len; 362961d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt } wnm; 363061d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt 363161d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt /** 36328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct ft_ies - FT information elements (EVENT_FT_RESPONSE) 36338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 36348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * During FT (IEEE 802.11r) authentication sequence, the driver is 36358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * expected to use this event to report received FT IEs (MDIE, FTIE, 36368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * RSN IE, TIE, possible resource request) to the supplicant. The FT 36378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * IEs for the next message will be delivered through the 36388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct wpa_driver_ops::update_ft_ies() callback. 36398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 36408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct ft_ies { 36418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ies; 36428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ies_len; 36438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int ft_action; 36448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 target_ap[ETH_ALEN]; 36458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** Optional IE(s), e.g., WMM TSPEC(s), for RIC-Request */ 36468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ric_ies; 36478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** Length of ric_ies buffer in octets */ 36488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ric_ies_len; 36498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } ft_ies; 36508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 36518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 36528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct ibss_rsn_start - Data for EVENT_IBSS_RSN_START 36538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 36548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct ibss_rsn_start { 36558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 peer[ETH_ALEN]; 36568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } ibss_rsn_start; 36578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 36588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 36598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct auth_info - Data for EVENT_AUTH events 36608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 36618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct auth_info { 36628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 peer[ETH_ALEN]; 36631f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt u8 bssid[ETH_ALEN]; 36648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 auth_type; 36651f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt u16 auth_transaction; 36668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 status_code; 36678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ies; 36688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ies_len; 36698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } auth; 36708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 36718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 36728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct assoc_reject - Data for EVENT_ASSOC_REJECT events 36738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 36748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct assoc_reject { 36758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 36768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * bssid - BSSID of the AP that rejected association 36778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 36788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *bssid; 36798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 36808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 36818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * resp_ies - (Re)Association Response IEs 36828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 36838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Optional association data from the driver. This data is not 36848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * required WPA, but may be useful for some protocols and as 36858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * such, should be reported if this is available to the driver 36868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * interface. 36878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 36888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This should start with the first IE (fixed fields before IEs 36898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * are not included). 36908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 36918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *resp_ies; 36928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 36938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 36948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * resp_ies_len - Length of resp_ies in bytes 36958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 36968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t resp_ies_len; 36978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 36988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 36998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * status_code - Status Code from (Re)association Response 37008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 status_code; 37028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } assoc_reject; 37038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct timeout_event { 37058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 addr[ETH_ALEN]; 37068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } timeout_event; 37078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct ft_rrb_rx - Data for EVENT_FT_RRB_RX events 37108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct ft_rrb_rx { 37128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *src; 37138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *data; 37148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t data_len; 37158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } ft_rrb_rx; 37168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct tx_status - Data for EVENT_TX_STATUS events 37198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct tx_status { 37218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 type; 37228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 stype; 37238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *dst; 37248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *data; 37258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t data_len; 37268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int ack; 37278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } tx_status; 37288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct rx_from_unknown - Data for EVENT_RX_FROM_UNKNOWN events 37318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct rx_from_unknown { 37331f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *bssid; 37341f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *addr; 37351f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int wds; 37368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } rx_from_unknown; 37378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct rx_mgmt - Data for EVENT_RX_MGMT events 37408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct rx_mgmt { 37428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *frame; 37438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t frame_len; 37448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u32 datarate; 374504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt int ssi_signal; /* dBm */ 37468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } rx_mgmt; 37478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct rx_action - Data for EVENT_RX_ACTION events 37508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct rx_action { 37528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * da - Destination address of the received Action frame 37548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *da; 37568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * sa - Source address of the received Action frame 37598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *sa; 37618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * bssid - Address 3 of the received Action frame 37648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *bssid; 37668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * category - Action frame category 37698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 category; 37718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * data - Action frame body after category field 37748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *data; 37768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * len - Length of data in octets 37798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t len; 37818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * freq - Frequency (in MHz) on which the frame was received 37848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int freq; 37868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } rx_action; 37878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct remain_on_channel - Data for EVENT_REMAIN_ON_CHANNEL events 37908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 37918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This is also used with EVENT_CANCEL_REMAIN_ON_CHANNEL events. 37928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct remain_on_channel { 37948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 37958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * freq - Channel frequency in MHz 37968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 37978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int freq; 37988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 37998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 38008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * duration - Duration to remain on the channel in milliseconds 38018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 38028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int duration; 38038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } remain_on_channel; 38048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 38058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 38068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct scan_info - Optional data for EVENT_SCAN_RESULTS events 38078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @aborted: Whether the scan was aborted 38088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @freqs: Scanned frequencies in MHz (%NULL = all channels scanned) 38098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @num_freqs: Number of entries in freqs array 38108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ssids: Scanned SSIDs (%NULL or zero-length SSID indicates wildcard 38118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * SSID) 38128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @num_ssids: Number of entries in ssids array 38138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 38148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct scan_info { 38158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int aborted; 38168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const int *freqs; 38178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t num_freqs; 38188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_driver_scan_ssid ssids[WPAS_MAX_SCAN_SSIDS]; 38198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t num_ssids; 38208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } scan_info; 38218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 38228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 38238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct mlme_rx - Data for EVENT_MLME_RX events 38248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 38258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct mlme_rx { 38268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *buf; 38278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t len; 38288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int freq; 38298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int channel; 38308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int ssi; 38318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } mlme_rx; 38328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 38338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 38348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct rx_probe_req - Data for EVENT_RX_PROBE_REQ events 38358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 38368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct rx_probe_req { 38378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 38388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * sa - Source address of the received Probe Request frame 38398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 38408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *sa; 38418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 38428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 38431f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * da - Destination address of the received Probe Request frame 38441f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * or %NULL if not available 38451f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 38461f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *da; 38471f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 38481f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 38491f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * bssid - BSSID of the received Probe Request frame or %NULL 38501f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * if not available 38511f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 38521f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *bssid; 38531f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 38541f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 38558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ie - IEs from the Probe Request body 38568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 38578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *ie; 38588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 38598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 38608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ie_len - Length of ie buffer in octets 38618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 38628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ie_len; 386304949598a23f501be6eec21697465fd46a28840aDmitry Shmidt 386404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt /** 386504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * signal - signal strength in dBm (or 0 if not available) 386604949598a23f501be6eec21697465fd46a28840aDmitry Shmidt */ 386704949598a23f501be6eec21697465fd46a28840aDmitry Shmidt int ssi_signal; 38688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } rx_probe_req; 38698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 38708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 38718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct new_sta - Data for EVENT_NEW_STA events 38728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 38738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct new_sta { 38748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *addr; 38758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } new_sta; 38768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 38778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 38788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct eapol_rx - Data for EVENT_EAPOL_RX events 38798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 38808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct eapol_rx { 38818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *src; 38828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *data; 38838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t data_len; 38848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } eapol_rx; 38858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 38868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 38878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * signal_change - Data for EVENT_SIGNAL_CHANGE events 38888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 38898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_signal_info signal_change; 38908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 38918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 38928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct best_channel - Data for EVENT_BEST_CHANNEL events 38938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @freq_24: Best 2.4 GHz band channel frequency in MHz 38948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @freq_5: Best 5 GHz band channel frequency in MHz 38958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @freq_overall: Best channel frequency in MHz 38968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 38978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 0 can be used to indicate no preference in either band. 38988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 38998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct best_channel { 39008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int freq_24; 39018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int freq_5; 39028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int freq_overall; 39038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } best_chan; 39048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 39058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct unprot_deauth { 39068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *sa; 39078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *da; 39088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 reason_code; 39098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } unprot_deauth; 39108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 39118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct unprot_disassoc { 39128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *sa; 39138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *da; 39148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 reason_code; 39158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } unprot_disassoc; 39168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 39178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 39188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct low_ack - Data for EVENT_STATION_LOW_ACK events 39198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @addr: station address 39208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 39218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct low_ack { 39228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 addr[ETH_ALEN]; 39238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } low_ack; 39248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 39258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 39268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct p2p_dev_found - Data for EVENT_P2P_DEV_FOUND 39278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 39288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct p2p_dev_found { 39298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *addr; 39308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *dev_addr; 39318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *pri_dev_type; 39328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *dev_name; 39338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 config_methods; 39348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 dev_capab; 39358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 group_capab; 39368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } p2p_dev_found; 39378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 39388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 39398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct p2p_go_neg_req_rx - Data for EVENT_P2P_GO_NEG_REQ_RX 39408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 39418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct p2p_go_neg_req_rx { 39428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *src; 39438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 dev_passwd_id; 39448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } p2p_go_neg_req_rx; 39458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 39468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 39478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct p2p_go_neg_completed - Data for EVENT_P2P_GO_NEG_COMPLETED 39488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 39498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct p2p_go_neg_completed { 39508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct p2p_go_neg_results *res; 39518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } p2p_go_neg_completed; 39528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 39538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct p2p_prov_disc_req { 39548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *peer; 39558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 config_methods; 39568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *dev_addr; 39578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *pri_dev_type; 39588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *dev_name; 39598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 supp_config_methods; 39608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 dev_capab; 39618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 group_capab; 39628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } p2p_prov_disc_req; 39638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 39648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct p2p_prov_disc_resp { 39658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *peer; 39668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 config_methods; 39678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } p2p_prov_disc_resp; 39688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 39698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct p2p_sd_req { 39708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int freq; 39718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *sa; 39728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 dialog_token; 39738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 update_indic; 39748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *tlvs; 39758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t tlvs_len; 39768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } p2p_sd_req; 39778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 39788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct p2p_sd_resp { 39798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *sa; 39808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 update_indic; 39818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *tlvs; 39828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t tlvs_len; 39838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } p2p_sd_resp; 39848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 39858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt /** 39868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * struct ibss_peer_lost - Data for EVENT_IBSS_PEER_LOST 39878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 39888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct ibss_peer_lost { 39898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u8 peer[ETH_ALEN]; 39908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt } ibss_peer_lost; 39911f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 39921f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 39931f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * struct driver_gtk_rekey - Data for EVENT_DRIVER_GTK_REKEY 39941f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 39951f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt struct driver_gtk_rekey { 39961f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *bssid; 39971f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *replay_ctr; 39981f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt } driver_gtk_rekey; 39991f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 40001f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 40011f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * struct client_poll - Data for EVENT_DRIVER_CLIENT_POLL_OK events 40021f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @addr: station address 40031f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 40041f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt struct client_poll { 40051f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt u8 addr[ETH_ALEN]; 40061f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt } client_poll; 40071f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 40081f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt /** 40091f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * struct eapol_tx_status 40101f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @dst: Original destination 40111f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @data: Data starting with IEEE 802.1X header (!) 40121f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @data_len: Length of data 40131f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * @ack: Indicates ack or lost frame 40141f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 40151f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This corresponds to hapd_send_eapol if the frame sent 40161f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * there isn't just reported as EVENT_TX_STATUS. 40171f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 40181f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt struct eapol_tx_status { 40191f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *dst; 40201f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *data; 40211f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int data_len; 40221f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt int ack; 40231f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt } eapol_tx_status; 402404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt 402504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt /** 402604949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * struct ch_switch 402704949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * @freq: Frequency of new channel in MHz 402804949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * @ht_enabled: Whether this is an HT channel 402904949598a23f501be6eec21697465fd46a28840aDmitry Shmidt * @ch_offset: Secondary channel offset 403004949598a23f501be6eec21697465fd46a28840aDmitry Shmidt */ 403104949598a23f501be6eec21697465fd46a28840aDmitry Shmidt struct ch_switch { 403204949598a23f501be6eec21697465fd46a28840aDmitry Shmidt int freq; 403304949598a23f501be6eec21697465fd46a28840aDmitry Shmidt int ht_enabled; 403404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt int ch_offset; 403504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt } ch_switch; 4036f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt 4037f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt /** 4038f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt * struct connect_failed - Data for EVENT_CONNECT_FAILED_REASON 4039f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt * @addr: Remote client address 4040f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt * @code: Reason code for connection failure 4041f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt */ 4042f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt struct connect_failed_reason { 4043f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt u8 addr[ETH_ALEN]; 4044f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt enum { 4045f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt MAX_CLIENT_REACHED, 4046f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt BLOCKED_CLIENT 4047f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt } code; 4048f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt } connect_failed_reason; 4049ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt 4050ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt /** 4051ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * struct dfs_event - Data for radar detected events 4052ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt * @freq: Frequency of the channel in MHz 4053ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt */ 4054ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt struct dfs_event { 4055ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt int freq; 4056051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt int ht_enabled; 4057051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt int chan_offset; 4058051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt enum chan_width chan_width; 4059051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt int cf1; 4060051af73b8f8014eff33330aead0f36944b3403e6Dmitry Shmidt int cf2; 4061ea69e84a6f4455c59348485895d3d5e3af77a65bDmitry Shmidt } dfs_event; 4062b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt 4063b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt /** 4064b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * survey_results - Survey result data for EVENT_SURVEY 4065b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * @freq_filter: Requested frequency survey filter, 0 if request 4066b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * was for all survey data 4067b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt * @survey_list: Linked list of survey data 4068b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt */ 4069b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt struct survey_results { 4070b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt unsigned int freq_filter; 4071b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt struct dl_list survey_list; /* struct freq_survey */ 4072b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt } survey_results; 4073e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt 4074e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt /** 4075e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * channel_list_changed - Data for EVENT_CHANNEL_LIST_CHANGED 4076e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt * @initiator: Initiator of the regulatory change 4077e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt */ 4078e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt struct channel_list_changed { 4079e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt enum reg_change_initiator initiator; 4080e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt } channel_list_changed; 40818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt}; 40828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 40838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 40848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_supplicant_event - Report a driver event for wpa_supplicant 40858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ctx: Context pointer (wpa_s); this is the ctx variable registered 40868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * with struct wpa_driver_ops::init() 40878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @event: event type (defined above) 40888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @data: possible extra data for the event 40898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 40908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Driver wrapper code should call this function whenever an event is received 40918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * from the driver. 40928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 40938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpa_supplicant_event(void *ctx, enum wpa_event_type event, 40948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt union wpa_event_data *data); 40958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 40968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 40978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* 40988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * The following inline functions are provided for convenience to simplify 40998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * event indication for some of the common events. 41008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 41018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 41028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstatic inline void drv_event_assoc(void *ctx, const u8 *addr, const u8 *ie, 41038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t ielen, int reassoc) 41048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt{ 41058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt union wpa_event_data event; 41068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt os_memset(&event, 0, sizeof(event)); 41078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt event.assoc_info.reassoc = reassoc; 41088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt event.assoc_info.req_ies = ie; 41098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt event.assoc_info.req_ies_len = ielen; 41108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt event.assoc_info.addr = addr; 41118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt wpa_supplicant_event(ctx, EVENT_ASSOC, &event); 41128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt} 41138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 41148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstatic inline void drv_event_disassoc(void *ctx, const u8 *addr) 41158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt{ 41168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt union wpa_event_data event; 41178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt os_memset(&event, 0, sizeof(event)); 41188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt event.disassoc_info.addr = addr; 41198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt wpa_supplicant_event(ctx, EVENT_DISASSOC, &event); 41208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt} 41218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 41228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstatic inline void drv_event_eapol_rx(void *ctx, const u8 *src, const u8 *data, 41238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t data_len) 41248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt{ 41258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt union wpa_event_data event; 41268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt os_memset(&event, 0, sizeof(event)); 41278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt event.eapol_rx.src = src; 41288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt event.eapol_rx.data = data; 41298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt event.eapol_rx.data_len = data_len; 41308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt wpa_supplicant_event(ctx, EVENT_EAPOL_RX, &event); 41318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt} 41328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 41331f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* driver_common.c */ 41341f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtvoid wpa_scan_results_free(struct wpa_scan_results *res); 41351f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 41361f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Convert wpa_event_type to a string for logging */ 41371f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtconst char * event_to_string(enum wpa_event_type event); 41381f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 41398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#endif /* DRIVER_H */ 4140