wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
driver.h
Go to the documentation of this file.
1 
13 #ifndef DRIVER_H
14 #define DRIVER_H
15 
16 #define WPA_SUPPLICANT_DRIVER_VERSION 4
17 
18 #include "common/defs.h"
19 #include "common/ieee802_11_defs.h"
20 #include "utils/list.h"
21 
22 #define HOSTAPD_CHAN_DISABLED 0x00000001
23 #define HOSTAPD_CHAN_NO_IR 0x00000002
24 #define HOSTAPD_CHAN_RADAR 0x00000008
25 #define HOSTAPD_CHAN_HT40PLUS 0x00000010
26 #define HOSTAPD_CHAN_HT40MINUS 0x00000020
27 #define HOSTAPD_CHAN_HT40 0x00000040
28 #define HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED 0x00000080
29 
30 #define HOSTAPD_CHAN_DFS_UNKNOWN 0x00000000
31 #define HOSTAPD_CHAN_DFS_USABLE 0x00000100
32 #define HOSTAPD_CHAN_DFS_UNAVAILABLE 0x00000200
33 #define HOSTAPD_CHAN_DFS_AVAILABLE 0x00000300
34 #define HOSTAPD_CHAN_DFS_MASK 0x00000300
35 
36 #define HOSTAPD_CHAN_VHT_10_70 0x00000800
37 #define HOSTAPD_CHAN_VHT_30_50 0x00001000
38 #define HOSTAPD_CHAN_VHT_50_30 0x00002000
39 #define HOSTAPD_CHAN_VHT_70_10 0x00004000
40 
41 #define HOSTAPD_CHAN_INDOOR_ONLY 0x00010000
42 #define HOSTAPD_CHAN_GO_CONCURRENT 0x00020000
43 
49  REGDOM_SET_BY_CORE,
50  REGDOM_SET_BY_USER,
51  REGDOM_SET_BY_DRIVER,
52  REGDOM_SET_BY_COUNTRY_IE,
53  REGDOM_BEACON_HINT,
54 };
55 
60 enum reg_type {
61  REGDOM_TYPE_UNKNOWN,
62  REGDOM_TYPE_COUNTRY,
63  REGDOM_TYPE_WORLD,
64  REGDOM_TYPE_CUSTOM_WORLD,
65  REGDOM_TYPE_INTERSECTION,
66 };
67 
77  short chan;
78 
83  int freq;
84 
89  int flag;
90 
96 
102 
107  s8 min_nf;
108 
109 #ifdef CONFIG_ACS
110 
115  long double interference_factor;
116 #endif /* CONFIG_ACS */
117 
122  unsigned int dfs_cac_ms;
123 };
124 
125 #define HOSTAPD_MODE_FLAG_HT_INFO_KNOWN BIT(0)
126 #define HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN BIT(1)
127 
138 
144 
150 
156 
161  int *rates;
162 
167  u16 ht_capab;
168 
173  u8 mcs_set[16];
174 
180 
186 
191  u8 vht_mcs_set[8];
192 
193  unsigned int flags; /* HOSTAPD_MODE_FLAG_* */
194 };
195 
196 
197 #define IEEE80211_MODE_INFRA 0
198 #define IEEE80211_MODE_IBSS 1
199 #define IEEE80211_MODE_AP 2
200 #define IEEE80211_MODE_MESH 5
201 
202 #define IEEE80211_CAP_ESS 0x0001
203 #define IEEE80211_CAP_IBSS 0x0002
204 #define IEEE80211_CAP_PRIVACY 0x0010
205 #define IEEE80211_CAP_RRM 0x1000
206 
207 /* DMG (60 GHz) IEEE 802.11ad */
208 /* type - bits 0..1 */
209 #define IEEE80211_CAP_DMG_MASK 0x0003
210 #define IEEE80211_CAP_DMG_IBSS 0x0001 /* Tx by: STA */
211 #define IEEE80211_CAP_DMG_PBSS 0x0002 /* Tx by: PCP */
212 #define IEEE80211_CAP_DMG_AP 0x0003 /* Tx by: AP */
213 
214 #define WPA_SCAN_QUAL_INVALID BIT(0)
215 #define WPA_SCAN_NOISE_INVALID BIT(1)
216 #define WPA_SCAN_LEVEL_INVALID BIT(2)
217 #define WPA_SCAN_LEVEL_DBM BIT(3)
218 #define WPA_SCAN_ASSOCIATED BIT(5)
219 
253 struct wpa_scan_res {
254  unsigned int flags;
255  u8 bssid[ETH_ALEN];
256  int freq;
257  u16 beacon_int;
258  u16 caps;
259  int qual;
260  int noise;
261  int level;
262  u64 tsf;
263  unsigned int age;
264  unsigned int est_throughput;
265  int snr;
266  size_t ie_len;
267  size_t beacon_ie_len;
268  /* Followed by ie_len + beacon_ie_len octets of IE data */
269 };
270 
278  struct wpa_scan_res **res;
279  size_t num;
280  struct os_reltime fetch_time;
281 };
282 
294  struct wpa_interface_info *next;
295  char *ifname;
296  char *desc;
297  const char *drv_name;
298 };
299 
300 #define WPAS_MAX_SCAN_SSIDS 16
301 
317  const u8 *ssid;
319  size_t ssid_len;
320  } ssids[WPAS_MAX_SCAN_SSIDS];
321 
326  size_t num_ssids;
327 
332  const u8 *extra_ies;
333 
339 
346  int *freqs;
347 
364  u8 ssid[SSID_MAX_LEN];
365  size_t ssid_len;
366  } *filter_ssids;
367 
373 
383 
392  unsigned int p2p_probe:1;
393 
402  unsigned int only_new_results:1;
403 
411  unsigned int low_priority:1;
412 
417  unsigned int mac_addr_rand:1;
418 
423  const u8 *mac_addr;
424 
434  const u8 *mac_addr_mask;
435 
436  /*
437  * NOTE: Whenever adding new parameters here, please make sure
438  * wpa_scan_clone_params() and wpa_scan_free_params() get updated with
439  * matching changes.
440  */
441 };
442 
448  int freq;
449  const u8 *bssid;
450  const u8 *ssid;
451  size_t ssid_len;
452  int auth_alg;
453  const u8 *ie;
454  size_t ie_len;
455  const u8 *wep_key[4];
456  size_t wep_key_len[4];
457  int wep_tx_keyidx;
458  int local_state_change;
459 
464  int p2p;
465 
473  const u8 *sae_data;
474 
479  size_t sae_data_len;
480 };
481 
486 enum wps_mode {
492 
498 
504 };
505 
516 
521  int freq;
522 
527  int channel;
528 
534 
544 
550 
558 
566 
572 };
573 
583  const u8 *bssid;
584 
594  const u8 *bssid_hint;
595 
600  const u8 *ssid;
601 
606  size_t ssid_len;
607 
613 
624 
631 
637 
656  const u8 *wpa_ie;
657 
662  size_t wpa_ie_len;
663 
668  unsigned int wpa_proto;
669 
676  unsigned int pairwise_suite;
677 
684  unsigned int group_suite;
685 
692  unsigned int key_mgmt_suite;
693 
698  int auth_alg;
699 
704  int mode;
705 
710  const u8 *wep_key[4];
711 
716  size_t wep_key_len[4];
717 
723 
729 
751  const u8 *ft_ies;
752 
757  size_t ft_ies_len;
758 
767  const u8 *ft_md;
768 
779  const char *passphrase;
780 
790  const u8 *psk;
791 
801 
809  const u8 *prev_bssid;
810 
819  enum wps_mode wps;
820 
825  int p2p;
826 
833  int uapsd;
834 
841 
849 
855 
865  const u8 *htcaps;
866 
873  const u8 *htcaps_mask;
874 
875 #ifdef CONFIG_VHT_OVERRIDES
876 
880  int disable_vht;
881 
883  const struct ieee80211_vht_capabilities *vhtcaps;
884  const struct ieee80211_vht_capabilities *vhtcaps_mask;
885 #endif /* CONFIG_VHT_OVERRIDES */
886 
895 
900  int rrm_used;
901 };
902 
903 enum hide_ssid {
904  NO_SSID_HIDING,
905  HIDDEN_SSID_ZERO_LEN,
906  HIDDEN_SSID_ZERO_CONTENTS
907 };
908 
910  u8 any;
911  u8 disconnect;
912  u8 magic_pkt;
913  u8 gtk_rekey_failure;
914  u8 eap_identity_req;
915  u8 four_way_handshake;
916  u8 rfkill_release;
917 };
918 
924  u8 *head;
925 
930  size_t head_len;
931 
936  u8 *tail;
937 
942  size_t tail_len;
943 
949 
955 
963 
972 
978 
983  const u8 *ssid;
984 
989  size_t ssid_len;
990 
995  enum hide_ssid hide_ssid;
996 
1001  unsigned int pairwise_ciphers;
1002 
1007  unsigned int group_cipher;
1008 
1013  unsigned int key_mgmt_suites;
1014 
1019  unsigned int auth_algs;
1020 
1025  unsigned int wpa_version;
1026 
1031  int privacy;
1032 
1040  const struct wpabuf *beacon_ies;
1041 
1049  const struct wpabuf *proberesp_ies;
1050 
1058  const struct wpabuf *assocresp_ies;
1059 
1067  int isolate;
1068 
1074 
1080 
1089 
1095 
1101 
1106  const u8 *hessid;
1107 
1116 
1124 
1130 
1138  unsigned int smps_mode;
1139 
1145 
1150  int osen;
1151 
1157 
1163 };
1164 
1166 #define WPA_DRIVER_MESH_CONF_FLAG_AUTO_PLINKS 0x00000001
1167  /*
1168  * TODO: Other mesh configuration parameters would go here.
1169  * See NL80211_MESHCONF_* for all the mesh config parameters.
1170  */
1171  unsigned int flags;
1172  int peer_link_timeout;
1173 };
1174 
1176  const u8 *meshid;
1177  int meshid_len;
1178  const int *basic_rates;
1179  const u8 *ies;
1180  int ie_len;
1181  struct hostapd_freq_params freq;
1182  int beacon_int;
1183  int max_peer_links;
1184  struct wpa_driver_mesh_bss_params conf;
1185 #define WPA_DRIVER_MESH_FLAG_USER_MPM 0x00000001
1186 #define WPA_DRIVER_MESH_FLAG_DRIVER_MPM 0x00000002
1187 #define WPA_DRIVER_MESH_FLAG_SAE_AUTH 0x00000004
1188 #define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008
1189  unsigned int flags;
1190 };
1191 
1197 #define WPA_DRIVER_CAPA_KEY_MGMT_WPA 0x00000001
1198 #define WPA_DRIVER_CAPA_KEY_MGMT_WPA2 0x00000002
1199 #define WPA_DRIVER_CAPA_KEY_MGMT_WPA_PSK 0x00000004
1200 #define WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK 0x00000008
1201 #define WPA_DRIVER_CAPA_KEY_MGMT_WPA_NONE 0x00000010
1202 #define WPA_DRIVER_CAPA_KEY_MGMT_FT 0x00000020
1203 #define WPA_DRIVER_CAPA_KEY_MGMT_FT_PSK 0x00000040
1204 #define WPA_DRIVER_CAPA_KEY_MGMT_WAPI_PSK 0x00000080
1205 #define WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B 0x00000100
1206 #define WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B_192 0x00000200
1207 
1208  unsigned int key_mgmt;
1209 
1210 #define WPA_DRIVER_CAPA_ENC_WEP40 0x00000001
1211 #define WPA_DRIVER_CAPA_ENC_WEP104 0x00000002
1212 #define WPA_DRIVER_CAPA_ENC_TKIP 0x00000004
1213 #define WPA_DRIVER_CAPA_ENC_CCMP 0x00000008
1214 #define WPA_DRIVER_CAPA_ENC_WEP128 0x00000010
1215 #define WPA_DRIVER_CAPA_ENC_GCMP 0x00000020
1216 #define WPA_DRIVER_CAPA_ENC_GCMP_256 0x00000040
1217 #define WPA_DRIVER_CAPA_ENC_CCMP_256 0x00000080
1218 #define WPA_DRIVER_CAPA_ENC_BIP 0x00000100
1219 #define WPA_DRIVER_CAPA_ENC_BIP_GMAC_128 0x00000200
1220 #define WPA_DRIVER_CAPA_ENC_BIP_GMAC_256 0x00000400
1221 #define WPA_DRIVER_CAPA_ENC_BIP_CMAC_256 0x00000800
1222 #define WPA_DRIVER_CAPA_ENC_GTK_NOT_USED 0x00001000
1223 
1224  unsigned int enc;
1225 
1226 #define WPA_DRIVER_AUTH_OPEN 0x00000001
1227 #define WPA_DRIVER_AUTH_SHARED 0x00000002
1228 #define WPA_DRIVER_AUTH_LEAP 0x00000004
1229 
1230  unsigned int auth;
1231 
1233 #define WPA_DRIVER_FLAGS_DRIVER_IE 0x00000001
1234 
1235 #define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC 0x00000002
1236 
1237 #define WPA_DRIVER_FLAGS_DFS_OFFLOAD 0x00000004
1238 
1240 #define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE 0x00000008
1241 
1242 #define WPA_DRIVER_FLAGS_WIRED 0x00000010
1243 
1245 #define WPA_DRIVER_FLAGS_SME 0x00000020
1246 
1247 #define WPA_DRIVER_FLAGS_AP 0x00000040
1248 
1249 #define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE 0x00000080
1250 
1251 #define WPA_DRIVER_FLAGS_HT_2040_COEX 0x00000100
1252 
1253 #define WPA_DRIVER_FLAGS_P2P_CONCURRENT 0x00000200
1254 
1258 #define WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE 0x00000400
1259 
1260 #define WPA_DRIVER_FLAGS_P2P_CAPABLE 0x00000800
1261 
1262 #define WPA_DRIVER_FLAGS_AP_TEARDOWN_SUPPORT 0x00001000
1263 
1268 #define WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P 0x00002000
1269 
1274 #define WPA_DRIVER_FLAGS_SANE_ERROR_CODES 0x00004000
1275 
1276 #define WPA_DRIVER_FLAGS_OFFCHANNEL_TX 0x00008000
1277 
1278 #define WPA_DRIVER_FLAGS_EAPOL_TX_STATUS 0x00010000
1279 
1280 #define WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS 0x00020000
1281 
1282 #define WPA_DRIVER_FLAGS_BSS_SELECTION 0x00040000
1283 
1284 #define WPA_DRIVER_FLAGS_TDLS_SUPPORT 0x00080000
1285 
1286 #define WPA_DRIVER_FLAGS_TDLS_EXTERNAL_SETUP 0x00100000
1287 
1288 #define WPA_DRIVER_FLAGS_PROBE_RESP_OFFLOAD 0x00200000
1289 
1290 #define WPA_DRIVER_FLAGS_AP_UAPSD 0x00400000
1291 
1292 #define WPA_DRIVER_FLAGS_INACTIVITY_TIMER 0x00800000
1293 
1294 #define WPA_DRIVER_FLAGS_AP_MLME 0x01000000
1295 
1296 #define WPA_DRIVER_FLAGS_SAE 0x02000000
1297 
1298 #define WPA_DRIVER_FLAGS_OBSS_SCAN 0x04000000
1299 
1300 #define WPA_DRIVER_FLAGS_IBSS 0x08000000
1301 
1302 #define WPA_DRIVER_FLAGS_RADAR 0x10000000
1303 
1304 #define WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE 0x20000000
1305 
1306 #define WPA_DRIVER_FLAGS_QOS_MAPPING 0x40000000
1307 
1308 #define WPA_DRIVER_FLAGS_AP_CSA 0x80000000
1309 
1310 #define WPA_DRIVER_FLAGS_MESH 0x0000000100000000ULL
1311 
1312 #define WPA_DRIVER_FLAGS_ACS_OFFLOAD 0x0000000200000000ULL
1313 
1314 #define WPA_DRIVER_FLAGS_KEY_MGMT_OFFLOAD 0x0000000400000000ULL
1315 
1316 #define WPA_DRIVER_FLAGS_TDLS_CHANNEL_SWITCH 0x0000000800000000ULL
1317 
1318 #define WPA_DRIVER_FLAGS_HT_IBSS 0x0000001000000000ULL
1319 
1320 #define WPA_DRIVER_FLAGS_VHT_IBSS 0x0000002000000000ULL
1321 
1322 #define WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY 0x0000004000000000ULL
1323  u64 flags;
1324 
1325 #define WPA_DRIVER_SMPS_MODE_STATIC 0x00000001
1326 #define WPA_DRIVER_SMPS_MODE_DYNAMIC 0x00000002
1327  unsigned int smps_modes;
1328 
1329  unsigned int wmm_ac_supported:1;
1330 
1331  unsigned int mac_addr_rand_scan_supported:1;
1332  unsigned int mac_addr_rand_sched_scan_supported:1;
1333 
1336 
1339 
1342 
1345 
1350  unsigned int max_remain_on_chan;
1351 
1356  unsigned int max_stations;
1357 
1363 #define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS 0x00000001
1364 
1365 #define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS2 0x00000002
1366 
1367 #define WPA_DRIVER_PROBE_RESP_OFFLOAD_P2P 0x00000004
1368 
1369 #define WPA_DRIVER_PROBE_RESP_OFFLOAD_INTERWORKING 0x00000008
1370  unsigned int probe_resp_offloads;
1371 
1372  unsigned int max_acl_mac_addrs;
1373 
1376 
1384  const u8 *extended_capa, *extended_capa_mask;
1385  unsigned int extended_capa_len;
1386 
1388 
1390 #define WPA_DRIVER_FLAGS_DS_PARAM_SET_IE_IN_PROBES 0x00000001
1391 
1392 #define WPA_DRIVER_FLAGS_WFA_TPC_IE_IN_PROBES 0x00000002
1393 
1394 #define WPA_DRIVER_FLAGS_QUIET 0x00000004
1395 
1404 #define WPA_DRIVER_FLAGS_TX_POWER_INSERTION 0x00000008
1405  u32 rrm_flags;
1406 
1407  /* Driver concurrency capabilities */
1408  unsigned int conc_capab;
1409  /* Maximum number of concurrent channels on 2.4 GHz */
1410  unsigned int max_conc_chan_2_4;
1411  /* Maximum number of concurrent channels on 5 GHz */
1412  unsigned int max_conc_chan_5_0;
1413 };
1414 
1415 
1416 struct hostapd_data;
1417 
1419  unsigned long rx_packets, tx_packets, rx_bytes, tx_bytes;
1420  unsigned long current_tx_rate;
1421  unsigned long inactive_msec;
1422  unsigned long flags;
1423  unsigned long num_ps_buf_frames;
1424  unsigned long tx_retry_failed;
1425  unsigned long tx_retry_count;
1426  int last_rssi;
1427  int last_ack_rssi;
1428 };
1429 
1431  const u8 *addr;
1432  u16 aid;
1433  u16 capability;
1434  const u8 *supp_rates;
1435  size_t supp_rates_len;
1436  u16 listen_interval;
1437  const struct ieee80211_ht_capabilities *ht_capabilities;
1438  const struct ieee80211_vht_capabilities *vht_capabilities;
1439  int vht_opmode_enabled;
1440  u8 vht_opmode;
1441  u32 flags; /* bitmask of WPA_STA_* flags */
1442  u32 flags_mask; /* unset bits in flags */
1443 #ifdef CONFIG_MESH
1444  enum mesh_plink_state plink_state;
1445 #endif /* CONFIG_MESH */
1446  int set; /* Set STA parameters instead of add */
1447  u8 qosinfo;
1448  const u8 *ext_capab;
1449  size_t ext_capab_len;
1450  const u8 *supp_channels;
1451  size_t supp_channels_len;
1452  const u8 *supp_oper_classes;
1453  size_t supp_oper_classes_len;
1454 };
1455 
1456 struct mac_address {
1457  u8 addr[ETH_ALEN];
1458 };
1459 
1461  u8 acl_policy;
1462  unsigned int num_mac_acl;
1463  struct mac_address mac_acl[0];
1464 };
1465 
1472 
1481 
1489 
1495 
1501 
1507 
1513 
1514  /*
1515  * WPA_IF_MESH - Mesh interface
1516  */
1517  WPA_IF_MESH,
1518 
1519  /*
1520  * WPA_IF_TDLS - TDLS offchannel interface (used for pref freq only)
1521  */
1522  WPA_IF_TDLS,
1523 
1524  /*
1525  * WPA_IF_IBSS - IBSS interface (used for pref freq only)
1526  */
1527  WPA_IF_IBSS,
1528 };
1529 
1531  void *global_priv;
1532  const u8 *bssid;
1533  const char *ifname;
1534  const char *driver_params;
1535  int use_pae_group_addr;
1536  char **bridge;
1537  size_t num_bridge;
1538 
1539  u8 *own_addr; /* buffer for writing own MAC address */
1540 };
1541 
1542 
1545  const char *ifname;
1547  int enabled;
1548 
1549  int wpa;
1550  int ieee802_1x;
1551  int wpa_group;
1552  int wpa_pairwise;
1553  int wpa_key_mgmt;
1554  int rsn_preauth;
1555  enum mfp_options ieee80211w;
1556 };
1557 
1558 #define WPA_STA_AUTHORIZED BIT(0)
1559 #define WPA_STA_WMM BIT(1)
1560 #define WPA_STA_SHORT_PREAMBLE BIT(2)
1561 #define WPA_STA_MFP BIT(3)
1562 #define WPA_STA_TDLS_PEER BIT(4)
1563 #define WPA_STA_AUTHENTICATED BIT(5)
1564 
1565 enum tdls_oper {
1566  TDLS_DISCOVERY_REQ,
1567  TDLS_SETUP,
1568  TDLS_TEARDOWN,
1569  TDLS_ENABLE_LINK,
1570  TDLS_DISABLE_LINK,
1571  TDLS_ENABLE,
1572  TDLS_DISABLE
1573 };
1574 
1575 enum wnm_oper {
1576  WNM_SLEEP_ENTER_CONFIRM,
1577  WNM_SLEEP_ENTER_FAIL,
1578  WNM_SLEEP_EXIT_CONFIRM,
1579  WNM_SLEEP_EXIT_FAIL,
1580  WNM_SLEEP_TFS_REQ_IE_ADD, /* STA requests driver to add TFS req IE */
1581  WNM_SLEEP_TFS_REQ_IE_NONE, /* STA requests empty TFS req IE */
1582  WNM_SLEEP_TFS_REQ_IE_SET, /* AP requests driver to set TFS req IE for
1583  * a STA */
1584  WNM_SLEEP_TFS_RESP_IE_ADD, /* AP requests driver to add TFS resp IE
1585  * for a STA */
1586  WNM_SLEEP_TFS_RESP_IE_NONE, /* AP requests empty TFS resp IE */
1587  WNM_SLEEP_TFS_RESP_IE_SET, /* AP requests driver to set TFS resp IE
1588  * for a STA */
1589  WNM_SLEEP_TFS_IE_DEL /* AP delete the TFS IE */
1590 };
1591 
1592 /* enum chan_width - Channel width definitions */
1593 enum chan_width {
1594  CHAN_WIDTH_20_NOHT,
1595  CHAN_WIDTH_20,
1596  CHAN_WIDTH_40,
1597  CHAN_WIDTH_80,
1598  CHAN_WIDTH_80P80,
1599  CHAN_WIDTH_160,
1600  CHAN_WIDTH_UNKNOWN
1601 };
1602 
1608  u32 frequency;
1609  int above_threshold;
1610  int current_signal;
1611  int avg_signal;
1612  int avg_beacon_signal;
1613  int current_noise;
1614  int current_txrate;
1615  enum chan_width chanwidth;
1616  int center_frq1;
1617  int center_frq2;
1618 };
1619 
1637 struct beacon_data {
1638  u8 *head, *tail;
1639  u8 *beacon_ies;
1640  u8 *proberesp_ies;
1641  u8 *assocresp_ies;
1642  u8 *probe_resp;
1643 
1644  size_t head_len, tail_len;
1645  size_t beacon_ies_len;
1646  size_t proberesp_ies_len;
1647  size_t assocresp_ies_len;
1648  size_t probe_resp_len;
1649 };
1650 
1662  u8 cs_count;
1663  u8 block_tx;
1664 
1665  struct hostapd_freq_params freq_params;
1666  struct beacon_data beacon_csa;
1667  struct beacon_data beacon_after;
1668 
1669  u16 counter_offset_beacon;
1670  u16 counter_offset_presp;
1671 };
1672 
1673 /* TDLS peer capabilities for send_tdls_mgmt() */
1674 enum tdls_peer_capability {
1675  TDLS_PEER_HT = BIT(0),
1676  TDLS_PEER_VHT = BIT(1),
1677  TDLS_PEER_WMM = BIT(2),
1678 };
1679 
1680 /* valid info in the wmm_params struct */
1681 enum wmm_params_valid_info {
1682  WMM_PARAMS_UAPSD_QUEUES_INFO = BIT(0),
1683 };
1684 
1692 struct wmm_params {
1693  u8 info_bitmap;
1694  u8 uapsd_queues;
1695 };
1696 
1697 #ifdef CONFIG_MACSEC
1698 struct macsec_init_params {
1699  Boolean always_include_sci;
1700  Boolean use_es;
1701  Boolean use_scb;
1702 };
1703 #endif /* CONFIG_MACSEC */
1704 
1705 enum drv_br_port_attr {
1706  DRV_BR_PORT_ATTR_PROXYARP,
1707  DRV_BR_PORT_ATTR_HAIRPIN_MODE,
1708 };
1709 
1710 enum drv_br_net_param {
1711  DRV_BR_NET_PARAM_GARP_ACCEPT,
1712  DRV_BR_MULTICAST_SNOOPING,
1713 };
1714 
1716  /* Selected mode (HOSTAPD_MODE_*) */
1717  enum hostapd_hw_mode hw_mode;
1718 
1719  /* Indicates whether HT is enabled */
1720  int ht_enabled;
1721 
1722  /* Indicates whether HT40 is enabled */
1723  int ht40_enabled;
1724 
1725  /* Indicates whether VHT is enabled */
1726  int vht_enabled;
1727 
1728  /* Configured ACS channel width */
1729  u16 ch_width;
1730 
1731  /* ACS channel list info */
1732  unsigned int ch_list_len;
1733  const u8 *ch_list;
1734  const int *freq_list;
1735 };
1736 
1737 
1748  const char *name;
1750  const char *desc;
1751 
1763  int (*get_bssid)(void *priv, u8 *bssid);
1764 
1780  int (*get_ssid)(void *priv, u8 *ssid);
1781 
1833  int (*set_key)(const char *ifname, void *priv, enum wpa_alg alg,
1834  const u8 *addr, int key_idx, int set_tx,
1835  const u8 *seq, size_t seq_len,
1836  const u8 *key, size_t key_len);
1837 
1861  void * (*init)(void *ctx, const char *ifname);
1862 
1870  void (*deinit)(void *priv);
1871 
1882  int (*set_param)(void *priv, const char *param);
1883 
1894  int (*set_countermeasures)(void *priv, int enabled);
1895 
1905  int (*deauthenticate)(void *priv, const u8 *addr, int reason_code);
1906 
1914  int (*associate)(void *priv,
1915  struct wpa_driver_associate_params *params);
1916 
1934  int (*add_pmkid)(void *priv, const u8 *bssid, const u8 *pmkid);
1935 
1954  int (*remove_pmkid)(void *priv, const u8 *bssid, const u8 *pmkid);
1955 
1972  int (*flush_pmkid)(void *priv);
1973 
1982  int (*get_capa)(void *priv, struct wpa_driver_capa *capa);
1983 
1996  void (*poll)(void *priv);
1997 
2009  const char * (*get_ifname)(void *priv);
2010 
2021  const u8 * (*get_mac_addr)(void *priv);
2022 
2035  int (*set_operstate)(void *priv, int state);
2036 
2053  int (*mlme_setprotection)(void *priv, const u8 *addr, int protect_type,
2054  int key_type);
2055 
2064  struct hostapd_hw_modes * (*get_hw_feature_data)(void *priv,
2065  u16 *num_modes,
2066  u16 *flags);
2067 
2078  int (*send_mlme)(void *priv, const u8 *data, size_t data_len,
2079  int noack, unsigned int freq);
2080 
2096  int (*update_ft_ies)(void *priv, const u8 *md, const u8 *ies,
2097  size_t ies_len);
2098 
2106  struct wpa_scan_results * (*get_scan_results2)(void *priv);
2107 
2117  int (*set_country)(void *priv, const char *alpha2);
2118 
2125  int (*get_country)(void *priv, char *alpha2);
2126 
2138  void * (*global_init)(void);
2139 
2147  void (*global_deinit)(void *priv);
2148 
2160  void * (*init2)(void *ctx, const char *ifname, void *global_priv);
2161 
2169  struct wpa_interface_info * (*get_interfaces)(void *global_priv);
2170 
2182  int (*scan2)(void *priv, struct wpa_driver_scan_params *params);
2183 
2196  int (*authenticate)(void *priv,
2197  struct wpa_driver_auth_params *params);
2198 
2218  int (*set_ap)(void *priv, struct wpa_driver_ap_params *params);
2219 
2228  int (*set_acl)(void *priv, struct hostapd_acl_params *params);
2229 
2239  void * (*hapd_init)(struct hostapd_data *hapd,
2240  struct wpa_init_params *params);
2241 
2246  void (*hapd_deinit)(void *priv);
2247 
2262  int (*set_ieee8021x)(void *priv, struct wpa_bss_params *params);
2263 
2276  int (*set_privacy)(void *priv, int enabled);
2277 
2292  int (*get_seqnum)(const char *ifname, void *priv, const u8 *addr,
2293  int idx, u8 *seq);
2294 
2304  int (*flush)(void *priv);
2305 
2320  int (*set_generic_elem)(void *priv, const u8 *elem, size_t elem_len);
2321 
2329  int (*read_sta_data)(void *priv, struct hostap_sta_driver_data *data,
2330  const u8 *addr);
2331 
2344  int (*hapd_send_eapol)(void *priv, const u8 *addr, const u8 *data,
2345  size_t data_len, int encrypt,
2346  const u8 *own_addr, u32 flags);
2347 
2359  int (*sta_deauth)(void *priv, const u8 *own_addr, const u8 *addr,
2360  int reason);
2361 
2373  int (*sta_disassoc)(void *priv, const u8 *own_addr, const u8 *addr,
2374  int reason);
2375 
2382  int (*sta_remove)(void *priv, const u8 *addr);
2383 
2394  int (*hapd_get_ssid)(void *priv, u8 *buf, int len);
2395 
2405  int (*hapd_set_ssid)(void *priv, const u8 *buf, int len);
2406 
2416  int (*hapd_set_countermeasures)(void *priv, int enabled);
2417 
2431  int (*sta_add)(void *priv, struct hostapd_sta_add_params *params);
2432 
2439  int (*get_inact_sec)(void *priv, const u8 *addr);
2440 
2447  int (*sta_clear_stats)(void *priv, const u8 *addr);
2448 
2455  int (*set_freq)(void *priv, struct hostapd_freq_params *freq);
2456 
2463  int (*set_rts)(void *priv, int rts);
2464 
2471  int (*set_frag)(void *priv, int frag);
2472 
2482  int (*sta_set_flags)(void *priv, const u8 *addr,
2483  unsigned int total_flags, unsigned int flags_or,
2484  unsigned int flags_and);
2485 
2495  int (*set_tx_queue_params)(void *priv, int queue, int aifs, int cw_min,
2496  int cw_max, int burst_time);
2497 
2517  int (*if_add)(void *priv, enum wpa_driver_if_type type,
2518  const char *ifname, const u8 *addr, void *bss_ctx,
2519  void **drv_priv, char *force_ifname, u8 *if_addr,
2520  const char *bridge, int use_existing);
2521 
2529  int (*if_remove)(void *priv, enum wpa_driver_if_type type,
2530  const char *ifname);
2531 
2546  int (*set_sta_vlan)(void *priv, const u8 *addr, const char *ifname,
2547  int vlan_id);
2548 
2559  int (*commit)(void *priv);
2560 
2571  int (*send_ether)(void *priv, const u8 *dst, const u8 *src, u16 proto,
2572  const u8 *data, size_t data_len);
2573 
2582  int (*set_radius_acl_auth)(void *priv, const u8 *mac, int accepted,
2583  u32 session_timeout);
2584 
2591  int (*set_radius_acl_expire)(void *priv, const u8 *mac);
2592 
2621  int (*set_ap_wps_ie)(void *priv, const struct wpabuf *beacon,
2622  const struct wpabuf *proberesp,
2623  const struct wpabuf *assocresp);
2624 
2631  int (*set_supp_port)(void *priv, int authorized);
2632 
2645  int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val,
2646  const char *bridge_ifname, char *ifname_wds);
2647 
2674  int (*send_action)(void *priv, unsigned int freq, unsigned int wait,
2675  const u8 *dst, const u8 *src, const u8 *bssid,
2676  const u8 *data, size_t data_len, int no_cck);
2677 
2686  void (*send_action_cancel_wait)(void *priv);
2687 
2710  int (*remain_on_channel)(void *priv, unsigned int freq,
2711  unsigned int duration);
2712 
2724  int (*cancel_remain_on_channel)(void *priv);
2725 
2740  int (*probe_req_report)(void *priv, int report);
2741 
2752  int (*deinit_ap)(void *priv);
2753 
2763  int (*deinit_p2p_cli)(void *priv);
2764 
2769  void (*suspend)(void *priv);
2770 
2775  void (*resume)(void *priv);
2776 
2791  int (*signal_monitor)(void *priv, int threshold, int hysteresis);
2792 
2804  int (*send_frame)(void *priv, const u8 *data, size_t data_len,
2805  int encrypt);
2806 
2818  int (*get_noa)(void *priv, u8 *buf, size_t buf_len);
2819 
2832  int (*set_noa)(void *priv, u8 count, int start, int duration);
2833 
2842  int (*set_p2p_powersave)(void *priv, int legacy_ps, int opp_ps,
2843  int ctwindow);
2844 
2851  int (*ampdu)(void *priv, int ampdu);
2852 
2864  const char * (*get_radio_name)(void *priv);
2865 
2882  int (*send_tdls_mgmt)(void *priv, const u8 *dst, u8 action_code,
2883  u8 dialog_token, u16 status_code, u32 peer_capab,
2884  int initiator, const u8 *buf, size_t len);
2885 
2896  int (*tdls_oper)(void *priv, enum tdls_oper oper, const u8 *peer);
2897 
2907  int (*wnm_oper)(void *priv, enum wnm_oper oper, const u8 *peer,
2908  u8 *buf, u16 *buf_len);
2909 
2916  int (*set_qos_map)(void *priv, const u8 *qos_map_set,
2917  u8 qos_map_set_len);
2918 
2928  int (*br_add_ip_neigh)(void *priv, u8 version, const u8 *ipaddr,
2929  int prefixlen, const u8 *addr);
2930 
2938  int (*br_delete_ip_neigh)(void *priv, u8 version, const u8 *ipaddr);
2939 
2946  int (*br_port_set_attr)(void *priv, enum drv_br_port_attr attr,
2947  unsigned int val);
2948 
2955  int (*br_set_net_param)(void *priv, enum drv_br_net_param param,
2956  unsigned int val);
2957 
2963  int (*set_wowlan)(void *priv, const struct wowlan_triggers *triggers);
2964 
2970  int (*signal_poll)(void *priv, struct wpa_signal_info *signal_info);
2971 
2984  int (*set_authmode)(void *priv, int authmode);
2985 
2986 #ifdef ANDROID
2987 
2995  int (*driver_cmd)(void *priv, char *cmd, char *buf, size_t buf_len);
2996 #endif /* ANDROID */
2997 
3018  int (*vendor_cmd)(void *priv, unsigned int vendor_id,
3019  unsigned int subcmd, const u8 *data, size_t data_len,
3020  struct wpabuf *buf);
3021 
3035  void (*set_rekey_info)(void *priv, const u8 *kek, size_t kek_len,
3036  const u8 *kck, size_t kck_len,
3037  const u8 *replay_ctr);
3038 
3053  int (*sta_assoc)(void *priv, const u8 *own_addr, const u8 *addr,
3054  int reassoc, u16 status, const u8 *ie, size_t len);
3055 
3069  int (*sta_auth)(void *priv, const u8 *own_addr, const u8 *addr,
3070  u16 seq, u16 status, const u8 *ie, size_t len);
3071 
3083  int (*add_tspec)(void *priv, const u8 *addr, u8 *tspec_ie,
3084  size_t tspec_ielen);
3085 
3096  int (*add_sta_node)(void *priv, const u8 *addr, u16 auth_alg);
3097 
3113  int (*sched_scan)(void *priv, struct wpa_driver_scan_params *params,
3114  u32 interval);
3115 
3125  int (*stop_sched_scan)(void *priv);
3126 
3138  void (*poll_client)(void *priv, const u8 *own_addr,
3139  const u8 *addr, int qos);
3140 
3151  int (*radio_disable)(void *priv, int disabled);
3152 
3163  int (*switch_channel)(void *priv, struct csa_settings *settings);
3164 
3175  int (*add_tx_ts)(void *priv, u8 tsid, const u8 *addr, u8 user_prio,
3176  u16 admitted_time);
3177 
3185  int (*del_tx_ts)(void *priv, u8 tsid, const u8 *addr);
3186 
3200  void *priv, const u8 *addr, u8 oper_class,
3201  const struct hostapd_freq_params *params);
3202 
3212  int (*tdls_disable_channel_switch)(void *priv, const u8 *addr);
3213 
3220  int (*start_dfs_cac)(void *priv, struct hostapd_freq_params *freq);
3221 
3231  int (*stop_ap)(void *priv);
3232 
3256  int (*get_survey)(void *priv, unsigned int freq);
3257 
3265  int (*status)(void *priv, char *buf, size_t buflen);
3266 
3281  int (*roaming)(void *priv, int allowed, const u8 *bssid);
3282 
3289  int (*set_mac_addr)(void *priv, const u8 *addr);
3290 
3291 #ifdef CONFIG_MACSEC
3292  int (*macsec_init)(void *priv, struct macsec_init_params *params);
3293 
3294  int (*macsec_deinit)(void *priv);
3295 
3303  int (*enable_protect_frames)(void *priv, Boolean enabled);
3304 
3313  int (*set_replay_protect)(void *priv, Boolean enabled, u32 window);
3314 
3322  int (*set_current_cipher_suite)(void *priv, const u8 *cs,
3323  size_t cs_len);
3324 
3332  int (*enable_controlled_port)(void *priv, Boolean enabled);
3333 
3342  int (*get_receive_lowest_pn)(void *priv, u32 channel, u8 an,
3343  u32 *lowest_pn);
3344 
3353  int (*get_transmit_next_pn)(void *priv, u32 channel, u8 an,
3354  u32 *next_pn);
3355 
3364  int (*set_transmit_next_pn)(void *priv, u32 channel, u8 an,
3365  u32 next_pn);
3366 
3373  int (*get_available_receive_sc)(void *priv, u32 *channel);
3374 
3386  int (*create_receive_sc)(void *priv, u32 channel, const u8 *sci_addr,
3387  u16 sci_port, unsigned int conf_offset,
3388  int validation);
3389 
3396  int (*delete_receive_sc)(void *priv, u32 channel);
3397 
3407  int (*create_receive_sa)(void *priv, u32 channel, u8 an,
3408  u32 lowest_pn, const u8 *sak);
3409 
3417  int (*enable_receive_sa)(void *priv, u32 channel, u8 an);
3418 
3426  int (*disable_receive_sa)(void *priv, u32 channel, u8 an);
3427 
3434  int (*get_available_transmit_sc)(void *priv, u32 *channel);
3435 
3444  int (*create_transmit_sc)(void *priv, u32 channel, const u8 *sci_addr,
3445  u16 sci_port, unsigned int conf_offset);
3446 
3453  int (*delete_transmit_sc)(void *priv, u32 channel);
3454 
3466  int (*create_transmit_sa)(void *priv, u32 channel, u8 an, u32 next_pn,
3467  Boolean confidentiality, const u8 *sak);
3468 
3476  int (*enable_transmit_sa)(void *priv, u32 channel, u8 an);
3477 
3485  int (*disable_transmit_sa)(void *priv, u32 channel, u8 an);
3486 #endif /* CONFIG_MACSEC */
3487 
3493  int (*init_mesh)(void *priv);
3494 
3501  int (*join_mesh)(void *priv,
3502  struct wpa_driver_mesh_join_params *params);
3503 
3509  int (*leave_mesh)(void *priv);
3510 
3520  int (*do_acs)(void *priv, struct drv_acs_params *params);
3521 
3528  int (*set_band)(void *priv, enum set_band band);
3529 
3541  int (*get_pref_freq_list)(void *priv, enum wpa_driver_if_type if_type,
3542  unsigned int *num, unsigned int *freq_list);
3543 
3554  int (*set_prob_oper_freq)(void *priv, unsigned int freq);
3555 };
3556 
3557 
3577 
3590 
3602 
3619 
3633 
3645 
3672 
3684 
3692 
3702 
3713 
3725 
3736 
3746 
3752 
3758 
3764 
3770 
3776 
3782 
3792 
3803 
3817 
3829 
3838 
3848 
3857 
3866 
3876 
3892 
3901 
3912 
3923 
3932 
3938 
3949 
3955 
3964 
3970 
3978 
3986 
3996 
4005 
4013 
4023 
4031 
4044 
4055 
4065 
4071 
4080 
4089 };
4090 
4091 
4108 struct freq_survey {
4109  u32 ifidx;
4110  unsigned int freq;
4111  s8 nf;
4112  u64 channel_time;
4113  u64 channel_time_busy;
4114  u64 channel_time_rx;
4115  u64 channel_time_tx;
4116  unsigned int filled;
4117  struct dl_list list;
4118 };
4119 
4120 #define SURVEY_HAS_NF BIT(0)
4121 #define SURVEY_HAS_CHAN_TIME BIT(1)
4122 #define SURVEY_HAS_CHAN_TIME_BUSY BIT(2)
4123 #define SURVEY_HAS_CHAN_TIME_RX BIT(3)
4124 #define SURVEY_HAS_CHAN_TIME_TX BIT(4)
4125 
4126 
4140  struct assoc_info {
4145  int reassoc;
4146 
4159  const u8 *req_ies;
4160 
4165  size_t req_ies_len;
4166 
4179  const u8 *resp_ies;
4180 
4186 
4204  const u8 *beacon_ies;
4205 
4210 
4215  unsigned int freq;
4216 
4222 
4227  const u8 *addr;
4228 
4245 
4250  const u8 *key_replay_ctr;
4251 
4257 
4262  const u8 *ptk_kck;
4263 
4268  size_t ptk_kck_len;
4269 
4274  const u8 *ptk_kek;
4275 
4280  size_t ptk_kek_len;
4281  } assoc_info;
4282 
4287  struct disassoc_info {
4292  const u8 *addr;
4293 
4300 
4305  const u8 *ie;
4306 
4311  size_t ie_len;
4312 
4318  } disassoc_info;
4319 
4324  struct deauth_info {
4329  const u8 *addr;
4330 
4337 
4342  const u8 *ie;
4343 
4348  size_t ie_len;
4349 
4355  } deauth_info;
4356 
4362  int unicast;
4363  const u8 *src;
4365 
4371  char ifname[100];
4372  enum {
4373  EVENT_INTERFACE_ADDED, EVENT_INTERFACE_REMOVED
4374  } ievent;
4375  } interface_status;
4376 
4383  u8 bssid[ETH_ALEN];
4385  int index;
4387  int preauth;
4388  } pmkid_candidate;
4389 
4394  struct stkstart {
4395  u8 peer[ETH_ALEN];
4396  } stkstart;
4397 
4402  struct tdls {
4403  u8 peer[ETH_ALEN];
4404  enum {
4405  TDLS_REQUEST_SETUP,
4406  TDLS_REQUEST_TEARDOWN,
4407  TDLS_REQUEST_DISCOVER,
4408  } oper;
4409  u16 reason_code; /* for teardown */
4410  } tdls;
4411 
4416  struct wnm {
4417  u8 addr[ETH_ALEN];
4418  enum {
4419  WNM_OPER_SLEEP,
4420  } oper;
4421  enum {
4422  WNM_SLEEP_ENTER,
4423  WNM_SLEEP_EXIT
4424  } sleep_action;
4425  int sleep_intval;
4426  u16 reason_code;
4427  u8 *buf;
4428  u16 buf_len;
4429  } wnm;
4430 
4441  struct ft_ies {
4442  const u8 *ies;
4443  size_t ies_len;
4444  int ft_action;
4445  u8 target_ap[ETH_ALEN];
4447  const u8 *ric_ies;
4449  size_t ric_ies_len;
4450  } ft_ies;
4451 
4457  u8 peer[ETH_ALEN];
4458  } ibss_rsn_start;
4459 
4464  struct auth_info {
4465  u8 peer[ETH_ALEN];
4466  u8 bssid[ETH_ALEN];
4467  u16 auth_type;
4468  u16 auth_transaction;
4469  u16 status_code;
4470  const u8 *ies;
4471  size_t ies_len;
4472  } auth;
4473 
4478  struct assoc_reject {
4483  const u8 *bssid;
4484 
4497  const u8 *resp_ies;
4498 
4504 
4510  } assoc_reject;
4511 
4512  struct timeout_event {
4513  u8 addr[ETH_ALEN];
4514  } timeout_event;
4515 
4520  struct tx_status {
4521  u16 type;
4522  u16 stype;
4523  const u8 *dst;
4524  const u8 *data;
4525  size_t data_len;
4526  int ack;
4527  } tx_status;
4528 
4534  const u8 *bssid;
4535  const u8 *addr;
4536  int wds;
4537  } rx_from_unknown;
4538 
4543  struct rx_mgmt {
4544  const u8 *frame;
4545  size_t frame_len;
4546  u32 datarate;
4547 
4556  void *drv_priv;
4557 
4562  int freq;
4563 
4569  } rx_mgmt;
4570 
4582  unsigned int freq;
4583 
4588  unsigned int duration;
4590 
4600  struct scan_info {
4601  int aborted;
4602  const int *freqs;
4603  size_t num_freqs;
4604  struct wpa_driver_scan_ssid ssids[WPAS_MAX_SCAN_SSIDS];
4605  size_t num_ssids;
4606  } scan_info;
4607 
4612  struct rx_probe_req {
4617  const u8 *sa;
4618 
4624  const u8 *da;
4625 
4631  const u8 *bssid;
4632 
4637  const u8 *ie;
4638 
4643  size_t ie_len;
4644 
4650  } rx_probe_req;
4651 
4656  struct new_sta {
4657  const u8 *addr;
4658  } new_sta;
4659 
4664  struct eapol_rx {
4665  const u8 *src;
4666  const u8 *data;
4667  size_t data_len;
4668  } eapol_rx;
4669 
4675 
4684  struct best_channel {
4685  int freq_24;
4686  int freq_5;
4687  int freq_overall;
4688  } best_chan;
4689 
4690  struct unprot_deauth {
4691  const u8 *sa;
4692  const u8 *da;
4693  u16 reason_code;
4694  } unprot_deauth;
4695 
4697  const u8 *sa;
4698  const u8 *da;
4699  u16 reason_code;
4700  } unprot_disassoc;
4701 
4706  struct low_ack {
4707  u8 addr[ETH_ALEN];
4708  } low_ack;
4709 
4715  u8 peer[ETH_ALEN];
4716  } ibss_peer_lost;
4717 
4723  const u8 *bssid;
4724  const u8 *replay_ctr;
4725  } driver_gtk_rekey;
4726 
4731  struct client_poll {
4732  u8 addr[ETH_ALEN];
4733  } client_poll;
4734 
4746  const u8 *dst;
4747  const u8 *data;
4748  int data_len;
4749  int ack;
4750  } eapol_tx_status;
4751 
4761  struct ch_switch {
4762  int freq;
4763  int ht_enabled;
4764  int ch_offset;
4765  enum chan_width ch_width;
4766  int cf1;
4767  int cf2;
4768  } ch_switch;
4769 
4776  u8 addr[ETH_ALEN];
4777  enum {
4778  MAX_CLIENT_REACHED,
4779  BLOCKED_CLIENT
4780  } code;
4782 
4787  struct dfs_event {
4788  int freq;
4789  int ht_enabled;
4790  int chan_offset;
4791  enum chan_width chan_width;
4792  int cf1;
4793  int cf2;
4794  } dfs_event;
4795 
4803  unsigned int freq_filter;
4804  struct dl_list survey_list; /* struct freq_survey */
4805  } survey_results;
4806 
4814  enum reg_change_initiator initiator;
4815  enum reg_type type;
4816  char alpha2[3];
4818 
4826 
4836  struct mesh_peer {
4837  const u8 *peer;
4838  const u8 *ies;
4839  size_t ie_len;
4840  } mesh_peer;
4841 
4854  u8 pri_channel;
4855  u8 sec_channel;
4856  u8 vht_seg0_center_ch;
4857  u8 vht_seg1_center_ch;
4858  u16 ch_width;
4859  enum hostapd_hw_mode hw_mode;
4861 };
4862 
4873 void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
4874  union wpa_event_data *data);
4875 
4876 
4877 /*
4878  * The following inline functions are provided for convenience to simplify
4879  * event indication for some of the common events.
4880  */
4881 
4882 static inline void drv_event_assoc(void *ctx, const u8 *addr, const u8 *ie,
4883  size_t ielen, int reassoc)
4884 {
4885  union wpa_event_data event;
4886  os_memset(&event, 0, sizeof(event));
4887  event.assoc_info.reassoc = reassoc;
4888  event.assoc_info.req_ies = ie;
4889  event.assoc_info.req_ies_len = ielen;
4890  event.assoc_info.addr = addr;
4891  wpa_supplicant_event(ctx, EVENT_ASSOC, &event);
4892 }
4893 
4894 static inline void drv_event_disassoc(void *ctx, const u8 *addr)
4895 {
4896  union wpa_event_data event;
4897  os_memset(&event, 0, sizeof(event));
4898  event.disassoc_info.addr = addr;
4899  wpa_supplicant_event(ctx, EVENT_DISASSOC, &event);
4900 }
4901 
4902 static inline void drv_event_eapol_rx(void *ctx, const u8 *src, const u8 *data,
4903  size_t data_len)
4904 {
4905  union wpa_event_data event;
4906  os_memset(&event, 0, sizeof(event));
4907  event.eapol_rx.src = src;
4908  event.eapol_rx.data = data;
4909  event.eapol_rx.data_len = data_len;
4910  wpa_supplicant_event(ctx, EVENT_EAPOL_RX, &event);
4911 }
4912 
4913 /* driver_common.c */
4914 void wpa_scan_results_free(struct wpa_scan_results *res);
4915 
4916 /* Convert wpa_event_type to a string for logging */
4917 const char * event_to_string(enum wpa_event_type event);
4918 
4919 /* Convert chan_width to a string for logging and control interfaces */
4920 const char * channel_width_to_string(enum chan_width width);
4921 
4922 int ht_supported(const struct hostapd_hw_modes *mode);
4923 int vht_supported(const struct hostapd_hw_modes *mode);
4924 
4925 struct wowlan_triggers *
4926 wpa_get_wowlan_triggers(const char *wowlan_triggers,
4927  const struct wpa_driver_capa *capa);
4928 
4929 /* NULL terminated array of linked in driver wrappers */
4930 extern const struct wpa_driver_ops *const wpa_drivers[];
4931 
4932 #endif /* DRIVER_H */
int(* sta_add)(void *priv, struct hostapd_sta_add_params *params)
Add a station entry.
Definition: driver.h:2431
int(* get_bssid)(void *priv, u8 *bssid)
Get the current BSSID.
Definition: driver.h:1763
int(* signal_monitor)(void *priv, int threshold, int hysteresis)
Set signal monitoring parameters.
Definition: driver.h:2791
const u8 * bssid
BSSID of the received Probe Request frame or NULL.
Definition: driver.h:4631
const u8 * sae_data
SAE elements for Authentication frame.
Definition: driver.h:473
void(* hapd_deinit)(void *priv)
Deinitialize driver interface (hostapd only)
Definition: driver.h:2246
const u8 * da
Destination address of the received Probe Request frame.
Definition: driver.h:4624
size_t ssid_len
ssid_len: Length of the SSID in octets
Definition: driver.h:319
s32 filter_rssi
Filter by RSSI.
Definition: driver.h:382
int(* set_p2p_powersave)(void *priv, int legacy_ps, int opp_ps, int ctwindow)
Set P2P power save options.
Definition: driver.h:2842
int(* hapd_set_countermeasures)(void *priv, int enabled)
Enable/disable TKIP countermeasures (AP)
Definition: driver.h:2416
size_t num_ssids
Number of entries in ssids array Zero indicates a request for a passive scan.
Definition: driver.h:326
size_t ssid_len
Length of the SSID (1..32)
Definition: driver.h:606
int center_freq2
Segment 1 center frequency in MHz.
Definition: driver.h:565
const char * ifname
Interface name (for multi-SSID/VLAN support)
Definition: driver.h:1545
Data for EVENT_RX_FROM_UNKNOWN events.
Definition: driver.h:4533
Unprotected Disassociation frame received.
Definition: driver.h:3922
int(* set_ieee8021x)(void *priv, struct wpa_bss_params *params)
Enable/disable IEEE 802.1X support (AP only)
Definition: driver.h:2262
unsigned int freq
Frequency of the operational channel in MHz.
Definition: driver.h:4215
Authentication timed out.
Definition: driver.h:3751
unsigned int smps_mode
SMPS mode.
Definition: driver.h:1138
enum hostapd_hw_mode mode
Mode/band (HOSTAPD_MODE_IEEE80211A, ..)
Definition: driver.h:515
Optional data for EVENT_SCAN_RESULTS events.
Definition: driver.h:4600
Request WNM operation.
Definition: driver.h:3985
int(* br_set_net_param)(void *priv, enum drv_br_net_param param, unsigned int val)
Set a bridge network parameter.
Definition: driver.h:2955
u16 ht_capab
HT (IEEE 802.11n) capabilities.
Definition: driver.h:167
int uapsd
UAPSD parameters for the network -1 = do not change defaults AP mode: 1 = enabled, 0 = disabled STA mode: bits 0..3 UAPSD enabled for VO,VI,BK,BE.
Definition: driver.h:833
void(* suspend)(void *priv)
Notification on system suspend/hibernate event.
Definition: driver.h:2769
int(* set_ap)(void *priv, struct wpa_driver_ap_params *params)
Set Beacon and Probe Response information for AP mode.
Definition: driver.h:2218
Settings for channel switch command.
Definition: driver.h:1661
unsigned int max_remain_on_chan
Maximum remain-on-channel duration in msec.
Definition: driver.h:1350
u8 a_mpdu_params
A-MPDU (IEEE 802.11n) parameters.
Definition: driver.h:179
size_t wep_key_len[4]
WEP key length for static WEP configuration.
Definition: driver.h:716
int(* probe_req_report)(void *priv, int report)
Request Probe Request frames to be indicated.
Definition: driver.h:2740
Report hardware push button press for WPS.
Definition: driver.h:3763
const u8 * wep_key[4]
WEP keys for static WEP configuration.
Definition: driver.h:710
int num_rates
Number of entries in the rates array.
Definition: driver.h:155
Notify that channel availability check has been aborted.
Definition: driver.h:4022
int(* add_pmkid)(void *priv, const u8 *bssid, const u8 *pmkid)
Add PMKSA cache entry to the driver.
Definition: driver.h:1934
int ssi_signal
signal strength in dBm (or 0 if not available)
Definition: driver.h:4649
Data for EVENT_STKSTART.
Definition: driver.h:4394
int(* set_freq)(void *priv, struct hostapd_freq_params *freq)
Set channel/frequency (AP only)
Definition: driver.h:2455
int(* set_noa)(void *priv, u8 count, int start, int duration)
Set Notice of Absence parameters for GO (testing)
Definition: driver.h:2832
enum mfp_options mgmt_frame_protection
IEEE 802.11w management frame protection.
Definition: driver.h:728
int(* br_port_set_attr)(void *priv, enum drv_br_port_attr attr, unsigned int val)
Set a bridge port attribute.
Definition: driver.h:2946
int(* leave_mesh)(void *priv)
Leave a mesh network.
Definition: driver.h:3509
int(* stop_ap)(void *priv)
Removes beacon from AP.
Definition: driver.h:3231
const struct wpabuf * proberesp_ies
P2P/WPS IE(s) for Probe Response frames.
Definition: driver.h:1049
int freq
Frequency (in MHz) on which the frame was received.
Definition: driver.h:4562
FT information elements (EVENT_FT_RESPONSE)
Definition: driver.h:4441
int enabled
Whether IEEE 802.1X or WPA/WPA2 is enabled.
Definition: driver.h:1547
s8 min_nf
Minimum observed noise floor, in dBm, based on all surveyed channel data.
Definition: driver.h:107
EVENT_STATION_LOW_ACK.
Definition: driver.h:3931
int(* set_prob_oper_freq)(void *priv, unsigned int freq)
Indicate probable P2P operating channel.
Definition: driver.h:3554
int preamble
Whether short preamble is enabled.
Definition: driver.h:1079
Channel information.
Definition: driver.h:72
AP or GO decided to switch channels.
Definition: driver.h:3977
P2P Group interface (will become either WPA_IF_P2P_GO or WPA_IF_P2P_CLIENT, but the role is not yet k...
Definition: driver.h:1506
const u8 * wpa_ie
WPA information element for (Re)Association Request WPA information element to be included in (Re)Ass...
Definition: driver.h:656
int(* deauthenticate)(void *priv, const u8 *addr, int reason_code)
Request driver to deauthenticate.
Definition: driver.h:1905
int max_sched_scan_ssids
Maximum number of supported active probe SSIDs for sched_scan.
Definition: driver.h:1338
Data for EVENT_TX_STATUS events.
Definition: driver.h:4520
Data for EVENT_TDLS.
Definition: driver.h:4402
int(* join_mesh)(void *priv, struct wpa_driver_mesh_join_params *params)
Join a mesh network.
Definition: driver.h:3501
int(* get_pref_freq_list)(void *priv, enum wpa_driver_if_type if_type, unsigned int *num, unsigned int *freq_list)
Get preferred frequency list for an interface.
Definition: driver.h:3541
Definition: driver.h:1460
const u8 * htcaps
HT Capabilities over-rides.
Definition: driver.h:865
int sec_channel_offset
Secondary channel offset for HT40.
Definition: driver.h:543
unsigned int key_mgmt_suite
Selected key management suite (WPA_KEY_MGMT_*)
Definition: driver.h:692
Request STK handshake (MLME-STKSTART.request)
Definition: driver.h:3683
const u8 * key_replay_ctr
Key replay counter value last used in a valid EAPOL-Key frame.
Definition: driver.h:4250
int(* get_ssid)(void *priv, u8 *ssid)
Get the current SSID.
Definition: driver.h:1780
int * basic_rates
basic_rates: -1 terminated array of basic rates in 100 kbps
Definition: driver.h:962
Data for EVENT_MICHAEL_MIC_FAILURE.
Definition: driver.h:4361
u8 mcs_set[16]
MCS (IEEE 802.11n) rate parameters.
Definition: driver.h:173
Notify that channel availability check has been completed.
Definition: driver.h:4012
int(* get_country)(void *priv, char *alpha2)
Get country.
Definition: driver.h:2125
Data for EVENT_BEST_CHANNEL events.
Definition: driver.h:4684
unsigned int mac_addr_rand
Requests driver to randomize MAC address.
Definition: driver.h:417
size_t ric_ies_len
Length of ric_ies buffer in octets.
Definition: driver.h:4449
const u8 * hessid
Homogeneous ESS identifier or NULL if not set.
Definition: driver.h:1106
size_t key_replay_ctr_len
The length of key_replay_ctr.
Definition: driver.h:4256
int authorized
The following is the key management offload information.
Definition: driver.h:4244
int ap_max_inactivity
Timeout in seconds to detect STA's inactivity.
Definition: driver.h:1123
Station responded to poll.
Definition: driver.h:3963
size_t resp_ies_len
Length of resp_ies in bytes.
Definition: driver.h:4185
unsigned int p2p_probe
Used to disable CCK (802.11b) rates for P2P probes.
Definition: driver.h:392
int(* vendor_cmd)(void *priv, unsigned int vendor_id, unsigned int subcmd, const u8 *data, size_t data_len, struct wpabuf *buf)
Execute vendor specific command.
Definition: driver.h:3018
int(* flush_pmkid)(void *priv)
Flush PMKSA cache.
Definition: driver.h:1972
unsigned int dfs_cac_ms
DFS CAC time in milliseconds.
Definition: driver.h:122
int(* set_wowlan)(void *priv, const struct wowlan_triggers *triggers)
Set wake-on-wireless triggers.
Definition: driver.h:2963
void(* poll_client)(void *priv, const u8 *own_addr, const u8 *addr, int qos)
Probe (null data or such) the given station.
Definition: driver.h:3138
int(* set_wds_sta)(void *priv, const u8 *addr, int aid, int val, const char *bridge_ifname, char *ifname_wds)
Bind a station into a 4-address WDS (AP only)
Definition: driver.h:2645
AP mode BSS interface.
Definition: driver.h:1488
const u8 * prev_bssid
Previously used BSSID in this ESS.
Definition: driver.h:809
reg_type
Regulatory change types.
Definition: driver.h:60
Definition: driver.h:1418
const u8 * ie
Optional IE(s) in Deauthentication frame.
Definition: driver.h:4342
u32 vht_capab
VHT (IEEE 802.11ac) capabilities.
Definition: driver.h:185
int freq_hint
Frequency of the channel the proposed AP is using.
Definition: driver.h:623
Received avoid frequency range.
Definition: driver.h:4064
EVENT_BEST_CHANNEL.
Definition: driver.h:3900
notify of EAPOL TX status
Definition: driver.h:3969
const u8 * ft_md
FT Mobility domain (6 octets) (also included inside ft_ies)
Definition: driver.h:767
const u8 * beacon_ies
Beacon or Probe Response IEs.
Definition: driver.h:4204
unsigned int wpa_version
WPA_PROTO_* bitfield.
Definition: driver.h:1025
WPA Supplicant - Common definitions.
Data for EVENT_DRIVER_GTK_REKEY.
Definition: driver.h:4722
Definition: driver.h:4696
void * drv_priv
Pointer to store driver private BSS information.
Definition: driver.h:4556
const u8 * ssid
The SSID to use in Beacon/Probe Response frames.
Definition: driver.h:983
Scan parameters Data for struct wpa_driver_ops::scan2().
Definition: driver.h:306
unsigned int key_mgmt_suites
WPA_KEY_MGMT_* bitfield.
Definition: driver.h:1013
Data for EVENT_IBSS_PEER_LOST.
Definition: driver.h:4714
void(* deinit)(void *priv)
Deinitialize driver interface.
Definition: driver.h:1870
int(* associate)(void *priv, struct wpa_driver_associate_params *params)
Request driver to associate.
Definition: driver.h:1914
unsigned int wpa_proto
Bitfield of WPA_PROTO_* values to indicate WPA/WPA2.
Definition: driver.h:668
int p2p
Whether this connection is a P2P group.
Definition: driver.h:825
const u8 * extended_capa
extended capabilities in driver/device
Definition: driver.h:1384
wpa_driver_if_type
Definition: driver.h:1466
int(* set_mac_addr)(void *priv, const u8 *addr)
Set MAC address.
Definition: driver.h:3289
int(* tdls_disable_channel_switch)(void *priv, const u8 *addr)
Disable channel switching with TDLS peer.
Definition: driver.h:3212
struct mesh_peer
Definition: driver.h:4836
int fixed_freq
Fix control channel in IBSS mode 0 = don't fix control channel (default) 1 = fix control channel; thi...
Definition: driver.h:848
void wpa_supplicant_event(void *ctx, enum wpa_event_type event, union wpa_event_data *data)
Report a driver event for wpa_supplicant.
Definition: events.c:3199
new (unknown) mesh peer notification
Definition: driver.h:4070
enum hostapd_hw_mode mode
Hardware mode.
Definition: driver.h:137
int locally_generated
Whether the frame was locally generated.
Definition: driver.h:4317
Data for EVENT_IBSS_RSN_START.
Definition: driver.h:4456
size_t ie_len
Length of ie buffer in octets.
Definition: driver.h:4311
unsigned int enc
Bitfield of supported cipher suites.
Definition: driver.h:1224
size_t ssid_len
Length of the SSID (1..32)
Definition: driver.h:989
Definition: wpabuf.h:16
void(* send_action_cancel_wait)(void *priv)
Cancel action frame TX wait.
Definition: driver.h:2686
int ssi_signal
Signal strength in dBm (or 0 if not available)
Definition: driver.h:4568
size_t ie_len
Length of ie buffer in octets.
Definition: driver.h:4643
int ht_opmode
HT operation mode or -1 if HT not in use.
Definition: driver.h:1094
P2P Group Owner.
Definition: driver.h:1494
const u8 * ptk_kck
The derived PTK KCK.
Definition: driver.h:4262
const u8 * ssid
The selected SSID.
Definition: driver.h:600
Definition: ieee802_11_defs.h:634
int freq
Primary channel center frequency in MHz.
Definition: driver.h:521
Scheduled scan was stopped.
Definition: driver.h:3954
unsigned int only_new_results
Request driver to report only new results.
Definition: driver.h:402
int(* set_country)(void *priv, const char *alpha2)
Set country.
Definition: driver.h:2117
Data for EVENT_ASSOC_REJECT events.
Definition: driver.h:4478
Scan result for an BSS/IBSS.
Definition: driver.h:253
int(* get_inact_sec)(void *priv, const u8 *addr)
Get station inactivity duration (AP only)
Definition: driver.h:2439
int(* send_action)(void *priv, unsigned int freq, unsigned int wait, const u8 *dst, const u8 *src, const u8 *bssid, const u8 *data, size_t data_len, int no_cck)
Transmit an Action frame.
Definition: driver.h:2674
Authentication lost.
Definition: driver.h:3735
Survey result data for EVENT_SURVEY.
Definition: driver.h:4802
int(* set_supp_port)(void *priv, int authorized)
Set IEEE 802.1X Supplicant Port status.
Definition: driver.h:2631
size_t head_len
Length of the head buffer in octets.
Definition: driver.h:930
struct ch_switch
Definition: driver.h:4761
size_t extra_ies_len
Length of extra_ies in octets.
Definition: driver.h:338
int(* if_remove)(void *priv, enum wpa_driver_if_type type, const char *ifname)
Remove a virtual interface.
Definition: driver.h:2529
Data for radar detected events.
Definition: driver.h:4787
struct hostapd_freq_params * freq
Channel parameters for dynamic bandwidth changes.
Definition: driver.h:1156
int(* set_frag)(void *priv, int frag)
Set fragmentation threshold.
Definition: driver.h:2471
int bg_scan_period
Background scan period in seconds, 0 to disable background scan, or -1 to indicate no change to defau...
Definition: driver.h:630
int bandwidth
Channel bandwidth in MHz (20, 40, 80, 160)
Definition: driver.h:571
int(* status)(void *priv, char *buf, size_t buflen)
Get driver interface status information.
Definition: driver.h:3265
unsigned int duration
Duration to remain on the channel in milliseconds.
Definition: driver.h:4588
WPS provisioning with AP that is in open mode.
Definition: driver.h:497
int(* sta_remove)(void *priv, const u8 *addr)
Remove a station entry (AP only)
Definition: driver.h:2382
int reenable
Whether this is to re-enable beaconing.
Definition: driver.h:1162
int(* deinit_p2p_cli)(void *priv)
Deinitialize P2P client mode.
Definition: driver.h:2763
Request TDLS operation.
Definition: driver.h:3691
short chan
Channel number (IEEE 802.11)
Definition: driver.h:77
int disable_dgaf
Whether group-addressed frames are disabled.
Definition: driver.h:1144
Remain-on-channel duration started.
Definition: driver.h:3791
Device/driver did GTK rekey.
Definition: driver.h:3948
int beacon_int
Beacon interval.
Definition: driver.h:954
Scan results available.
Definition: driver.h:3618
int(* ampdu)(void *priv, int ampdu)
Enable/disable aggregation.
Definition: driver.h:2851
u8 * tail
Beacon tail following TIM IE.
Definition: driver.h:936
Received survey data.
Definition: driver.h:4043
size_t proberesp_len
Length of the proberesp buffer in octets.
Definition: driver.h:977
Definition: ieee802_11_defs.h:668
Notify that non-occupancy period is over.
Definition: driver.h:4030
int(* br_delete_ip_neigh)(void *priv, u8 version, const u8 *ipaddr)
Remove a neigh from the bridge ip neigh table.
Definition: driver.h:2938
Network interface information.
Definition: driver.h:293
int(* set_sta_vlan)(void *priv, const u8 *addr, const char *ifname, int vlan_id)
Bind a station into a specific interface (AP only)
Definition: driver.h:2546
Indicate change in signal strength.
Definition: driver.h:3847
int(* br_add_ip_neigh)(void *priv, u8 version, const u8 *ipaddr, int prefixlen, const u8 *addr)
Add a neigh to the bridge ip neigh table.
Definition: driver.h:2928
Data for EVENT_DRIVER_CLIENT_POLL_OK events.
Definition: driver.h:4731
int(* del_tx_ts)(void *priv, u8 tsid, const u8 *addr)
Delete traffic stream.
Definition: driver.h:3185
WPS provisioning with AP that is using protection.
Definition: driver.h:503
int(* set_generic_elem)(void *priv, const u8 *elem, size_t elem_len)
Add IEs into Beacon/Probe Response frames (AP)
Definition: driver.h:2320
Definition: common.h:501
int reassoc
Flag to indicate association or reassociation.
Definition: driver.h:4145
Association lost.
Definition: driver.h:3589
size_t num_filter_ssids
Number of entries in filter_ssids array.
Definition: driver.h:372
int(* set_param)(void *priv, const char *param)
Set driver configuration parameters.
Definition: driver.h:1882
wpa_event_type
Event type for wpa_supplicant_event() calls.
Definition: driver.h:3562
int isolate
Whether to isolate frames between associated stations.
Definition: driver.h:1067
int rrm_used
Flag for indicating whether this association includes support for RRM (Radio Resource Measurements) ...
Definition: driver.h:900
const u8 * ie
Optional IE(s) in Disassociation frame.
Definition: driver.h:4305
int req_key_mgmt_offload
Request key management offload for connection.
Definition: driver.h:894
void(* resume)(void *priv)
Notification on system resume/thaw event.
Definition: driver.h:2775
size_t sae_data_len
Length of sae_data buffer in octets.
Definition: driver.h:479
unsigned int group_suite
Selected group cipher suite (WPA_CIPHER_*)
Definition: driver.h:684
size_t req_ies_len
Length of req_ies in bytes.
Definition: driver.h:4165
u16 reason_code
Reason Code (host byte order) used in.
Definition: driver.h:4336
int(* scan2)(void *priv, struct wpa_driver_scan_params *params)
Request the driver to initiate scan.
Definition: driver.h:2182
void(* set_rekey_info)(void *priv, const u8 *kek, size_t kek_len, const u8 *kck, size_t kck_len, const u8 *replay_ctr)
Set rekey information.
Definition: driver.h:3035
struct dl_list survey_list
Linked list of surveys (struct freq_survey)
Definition: driver.h:101
int vht_enabled
Whether VHT is enabled.
Definition: driver.h:549
const u8 * htcaps_mask
HT Capabilities over-rides mask.
Definition: driver.h:873
const char * name
Name of the driver interface.
Definition: driver.h:1748
int(* stop_sched_scan)(void *priv)
Request the driver to stop a scheduled scan.
Definition: driver.h:3125
unsigned int pairwise_suite
Selected pairwise cipher suite (WPA_CIPHER_*)
Definition: driver.h:676
Notify that interface was disabled.
Definition: driver.h:3865
int cts_protect
Whether CTS protection is enabled.
Definition: driver.h:1073
const char * passphrase
RSN passphrase for PSK.
Definition: driver.h:779
int(* authenticate)(void *priv, struct wpa_driver_auth_params *params)
Request driver to authenticate.
Definition: driver.h:2196
Scan started.
Definition: driver.h:4054
Definition: os.h:22
const u8 * bssid
BSSID of the selected AP This can be NULL, if ap_scan=2 mode is used and the driver is responsible fo...
Definition: driver.h:583
void(* poll)(void *priv)
Poll driver for association information.
Definition: driver.h:1996
AP mode VLAN interface.
Definition: driver.h:1480
int max_scan_ssids
Maximum number of supported active probe SSIDs.
Definition: driver.h:1335
u16 reason_code
Reason Code (host byte order) used in.
Definition: driver.h:4299
int(* commit)(void *priv)
Optional commit changes handler (AP only)
Definition: driver.h:2559
Doubly-linked list.
int(* send_ether)(void *priv, const u8 *dst, const u8 *src, u16 proto, const u8 *data, size_t data_len)
Send an ethernet packet (AP only)
Definition: driver.h:2571
IBSS peer not reachable anymore.
Definition: driver.h:3937
int(* if_add)(void *priv, enum wpa_driver_if_type type, const char *ifname, const u8 *addr, void *bss_ctx, void **drv_priv, char *force_ifname, u8 *if_addr, const char *bridge, int use_existing)
Add a virtual interface.
Definition: driver.h:2517
struct wpa_freq_range_list freq_range
List of frequency ranges.
Definition: driver.h:4825
const u8 * addr
Station address (for AP mode)
Definition: driver.h:4227
Definition: driver.h:919
Definition: driver.h:909
Michael MIC (TKIP) detected.
Definition: driver.h:3601
int(* set_acl)(void *priv, struct hostapd_acl_params *params)
Set ACL in AP mode.
Definition: driver.h:2228
int p2p
Whether this connection is a P2P group.
Definition: driver.h:464
Supported hardware mode information.
Definition: driver.h:132
Definition: driver.h:4512
Authentication result.
Definition: driver.h:3724
const u8 * sa
Source address of the received Probe Request frame.
Definition: driver.h:4617
Doubly-linked list.
Definition: list.h:12
u8 bssid[ETH_ALEN]
BSSID of the PMKID candidate.
Definition: driver.h:4383
Received selected channels by ACS.
Definition: driver.h:4079
int(* get_capa)(void *priv, struct wpa_driver_capa *capa)
Get driver capabilities.
Definition: driver.h:1982
const u8 * resp_ies
(Re)Association Response IEs
Definition: driver.h:4179
enum wps_mode wps
WPS mode.
Definition: driver.h:819
int(* send_mlme)(void *priv, const u8 *data, size_t data_len, int noack, unsigned int freq)
Send management frame from MLME.
Definition: driver.h:2078
Authentication parameters Data for struct wpa_driver_ops::authenticate().
Definition: driver.h:447
int(* get_noa)(void *priv, u8 *buf, size_t buf_len)
Get current Notice of Absence attribute payload.
Definition: driver.h:2818
Data for EVENT_DEAUTH events.
Definition: driver.h:4324
Association parameters Data for struct wpa_driver_ops::associate().
Definition: driver.h:578
int(* hapd_get_ssid)(void *priv, u8 *buf, int len)
Get the current SSID (AP only)
Definition: driver.h:2394
Indicate received Probe Request frame.
Definition: driver.h:3816
int(* do_acs)(void *priv, struct drv_acs_params *params)
Automatically select channel.
Definition: driver.h:3520
Definition: driver.h:1165
int(* set_operstate)(void *priv, int state)
Sets device operating state to DORMANT or UP.
Definition: driver.h:2035
struct eapol_tx_status
Definition: driver.h:4745
int(* set_ap_wps_ie)(void *priv, const struct wpabuf *beacon, const struct wpabuf *proberesp, const struct wpabuf *assocresp)
Add WPS IE(s) into Beacon/Probe Response frames (AP)
Definition: driver.h:2621
hostapd_hw_mode
Hardware mode.
Definition: defs.h:302
int(* sta_deauth)(void *priv, const u8 *own_addr, const u8 *addr, int reason)
Deauthenticate a station (AP only)
Definition: driver.h:2359
int sched_scan_supported
Whether sched_scan (offloaded scanning) is supported.
Definition: driver.h:1341
Report RX from unknown STA.
Definition: driver.h:3775
int(* remove_pmkid)(void *priv, const u8 *bssid, const u8 *pmkid)
Remove PMKSA cache entry to the driver.
Definition: driver.h:1954
New wired device noticed.
Definition: driver.h:3828
size_t wpa_ie_len
length of the wpa_ie
Definition: driver.h:662
int(* get_survey)(void *priv, unsigned int freq)
Retrieve survey data.
Definition: driver.h:3256
unsigned int low_priority
Requests driver to use a lower scan priority.
Definition: driver.h:411
Definition: driver.h:1543
int wep_tx_keyidx
WEP TX key index for static WEP configuration.
Definition: driver.h:722
int(* sta_disassoc)(void *priv, const u8 *own_addr, const u8 *addr, int reason)
Disassociate a station (AP only)
Definition: driver.h:2373
int channel
Channel number.
Definition: driver.h:527
Data for EVENT_STATION_LOW_ACK events.
Definition: driver.h:4706
Report optional extra information for association.
Definition: driver.h:3632
Driver interface API definition.
Definition: driver.h:1746
int(* deinit_ap)(void *priv)
Deinitialize AP mode.
Definition: driver.h:2752
int(* tdls_enable_channel_switch)(void *priv, const u8 *addr, u8 oper_class, const struct hostapd_freq_params *params)
Enable channel-switching with TDLS peer.
Definition: driver.h:3199
int interworking
Whether Interworking is enabled.
Definition: driver.h:1100
int preauth
Whether RSN IE includes pre-authenticate flag.
Definition: driver.h:4387
Remain-on-channel timed out.
Definition: driver.h:3802
int(* send_frame)(void *priv, const u8 *data, size_t data_len, int encrypt)
Send IEEE 802.11 frame (testing use only)
Definition: driver.h:2804
int(* mlme_setprotection)(void *priv, const u8 *addr, int protect_type, int key_type)
MLME-SETPROTECTION.request primitive.
Definition: driver.h:2053
size_t ft_ies_len
Length of ft_ies in bytes.
Definition: driver.h:757
u8 vht_mcs_set[8]
VHT MCS (IEEE 802.11ac) rate parameters.
Definition: driver.h:191
Association completed.
Definition: driver.h:3576
Unprotected Deauthentication frame received.
Definition: driver.h:3911
int(* signal_poll)(void *priv, struct wpa_signal_info *signal_info)
Get current connection information.
Definition: driver.h:2970
Data for EVENT_NEW_STA events.
Definition: driver.h:4656
Data for EVENT_INTERFACE_STATUS.
Definition: driver.h:4370
const u8 * ft_ies
IEEE 802.11r / FT information elements If the supplicant is using IEEE 802.11r (FT) and has the neede...
Definition: driver.h:751
Data for EVENT_RX_PROBE_REQ events.
Definition: driver.h:4612
unsigned int auth
Bitfield of supported IEEE 802.11 authentication algorithms.
Definition: driver.h:1230
int mode
Operation mode (infra/ibss) IEEE80211_MODE_*.
Definition: driver.h:704
int freq
Frequency in MHz.
Definition: driver.h:83
Station mode interface.
Definition: driver.h:1471
const struct wpabuf * assocresp_ies
WPS IE(s) for (Re)Association Response frames.
Definition: driver.h:1058
Data for EVENT_PMKID_CANDIDATE.
Definition: driver.h:4381
int(* set_rts)(void *priv, int rts)
Set RTS threshold.
Definition: driver.h:2463
u8 max_tx_power
Regulatory transmit power limit in dBm.
Definition: driver.h:95
int(* add_tx_ts)(void *priv, u8 tsid, const u8 *addr, u8 user_prio, u16 admitted_time)
Add traffic stream.
Definition: driver.h:3175
Data for EVENT_ACS_CHANNEL_SELECTED.
Definition: driver.h:4853
Channel list changed.
Definition: driver.h:3875
Notify that channel availability check has been started.
Definition: driver.h:4088
Definition: driver.h:1715
int(* sta_clear_stats)(void *priv, const u8 *addr)
Clear station statistics (AP only)
Definition: driver.h:2447
int(* set_privacy)(void *priv, int enabled)
Enable/disable privacy (AP only)
Definition: driver.h:2276
int(* switch_channel)(void *priv, struct csa_settings *settings)
Announce channel switch and migrate the GO to the given frequency.
Definition: driver.h:3163
int short_slot_time
Whether short slot time is enabled.
Definition: driver.h:1088
Scan results.
Definition: driver.h:277
Association timed out.
Definition: driver.h:3757
Data for EVENT_WNM.
Definition: driver.h:4416
const u8 * bssid
BSSID of the AP that rejected association.
Definition: driver.h:4483
unsigned int auth_algs
WPA_AUTH_ALG_* bitfield.
Definition: driver.h:1019
struct wpa_signal_info signal_change
Data for EVENT_SIGNAL_CHANGE events.
Definition: driver.h:4674
int drop_unencrypted
Enable/disable unencrypted frame filtering.
Definition: driver.h:800
const u8 * ssid
specific SSID to scan for (ProbeReq) NULL or zero-length SSID is used to indicate active scan with wi...
Definition: driver.h:317
struct hostapd_freq_params freq
channel parameters
Definition: driver.h:612
const u8 * addr
Station address (for AP mode)
Definition: driver.h:4292
unsigned int num_multichan_concurrent
Number of supported concurrent channels.
Definition: driver.h:1375
const u8 * addr
Station address (for AP mode)
Definition: driver.h:4329
SSIDs to scan for.
Definition: driver.h:311
Data for EVENT_ASSOC and EVENT_ASSOCINFO events.
Definition: driver.h:4140
int(* remain_on_channel)(void *priv, unsigned int freq, unsigned int duration)
Remain awake on a channel.
Definition: driver.h:2710
int(* add_tspec)(void *priv, const u8 *addr, u8 *tspec_ie, size_t tspec_ielen)
Add traffic stream.
Definition: driver.h:3083
u8 * proberesp
Probe Response template.
Definition: driver.h:971
const u8 * ptk_kek
The derived PTK KEK.
Definition: driver.h:4274
Notify that interface was enabled.
Definition: driver.h:3856
int index
Smaller the index, higher the priority.
Definition: driver.h:4385
size_t beacon_ies_len
Length of beacon_ies.
Definition: driver.h:4209
int locally_generated
Whether the frame was locally generated.
Definition: driver.h:4354
IEEE 802.11 Frame type definitions Copyright (c) 2007-2008 Intel Corporation.
int(* radio_disable)(void *priv, int disabled)
Disable/enable radio.
Definition: driver.h:3151
int(* update_ft_ies)(void *priv, const u8 *md, const u8 *ies, size_t ies_len)
Update FT (IEEE 802.11r) IEs.
Definition: driver.h:2096
Definition: driver.h:1530
unsigned int key_mgmt
Bitfield of supported key management suites.
Definition: driver.h:1208
int(* set_key)(const char *ifname, void *priv, enum wpa_alg alg, const u8 *addr, int key_idx, int set_tx, const u8 *seq, size_t seq_len, const u8 *key, size_t key_len)
Configure encryption key.
Definition: driver.h:1833
int num_channels
Number of entries in the channels array.
Definition: driver.h:143
No WPS provisioning being used.
Definition: driver.h:491
int(* set_tx_queue_params)(void *priv, int queue, int aifs, int cw_min, int cw_max, int burst_time)
Set TX queue parameters.
Definition: driver.h:2495
int(* set_radius_acl_expire)(void *priv, const u8 *mac)
Notification of RADIUS ACL expiration.
Definition: driver.h:2591
int(* cancel_remain_on_channel)(void *priv)
Cancel remain-on-channel operation.
Definition: driver.h:2724
Request RSN authentication in IBSS.
Definition: driver.h:3712
int(* hapd_set_ssid)(void *priv, const u8 *buf, int len)
Set SSID (AP only)
Definition: driver.h:2405
int(* set_countermeasures)(void *priv, int enabled)
Enable/disable TKIP countermeasures.
Definition: driver.h:1894
int(* add_sta_node)(void *priv, const u8 *addr, u16 auth_alg)
Add a station node in the driver.
Definition: driver.h:3096
int disable_ht
Disable HT (IEEE 802.11n) for this connection.
Definition: driver.h:854
Data for EVENT_EAPOL_RX events.
Definition: driver.h:4664
Report a candidate AP for pre-authentication.
Definition: driver.h:3671
enum hide_ssid hide_ssid
Whether to hide the SSID.
Definition: driver.h:995
unsigned int group_cipher
WPA_CIPHER_*.
Definition: driver.h:1007
mfp_options
Management frame protection (IEEE 802.11w) options.
Definition: defs.h:291
Report TX status.
Definition: driver.h:3769
unsigned int pairwise_ciphers
WPA_CIPHER_* bitfield.
Definition: driver.h:1001
int(* sta_set_flags)(void *priv, const u8 *addr, unsigned int total_flags, unsigned int flags_or, unsigned int flags_and)
Set station flags (AP only)
Definition: driver.h:2482
unsigned int max_stations
Maximum number of associated stations the driver supports in AP mode.
Definition: driver.h:1356
const char * desc
One line description of the driver interface.
Definition: driver.h:1750
Information about channel signal quality.
Definition: driver.h:1607
int dtim_period
DTIM period.
Definition: driver.h:948
WMM parameterss configured for this association.
Definition: driver.h:1692
Driver capability information.
Definition: driver.h:1196
Data for EVENT_CONNECT_FAILED_REASON.
Definition: driver.h:4775
size_t resp_ies_len
Length of resp_ies in bytes.
Definition: driver.h:4503
int osen
Whether OSEN security is enabled.
Definition: driver.h:1150
Channel parameters.
Definition: driver.h:510
int(* sta_auth)(void *priv, const u8 *own_addr, const u8 *addr, u16 seq, u16 status, const u8 *ie, size_t len)
Station authentication indication.
Definition: driver.h:3069
Data for EVENT_DISASSOC events.
Definition: driver.h:4287
size_t ptk_kck_len
The length of ptk_kck.
Definition: driver.h:4268
u8 * head
Beacon head from IEEE 802.11 header to IEs before TIM IE.
Definition: driver.h:924
int max_match_sets
Maximum number of supported match sets for sched_scan.
Definition: driver.h:1344
int * rates
Array of supported rates in 100 kbps units.
Definition: driver.h:161
int beacon_int
Beacon interval for IBSS or 0 to use driver default.
Definition: driver.h:636
int(* set_radius_acl_auth)(void *priv, const u8 *mac, int accepted, u32 session_timeout)
Notification of RADIUS ACL change.
Definition: driver.h:2582
int(* init_mesh)(void *priv)
Driver specific initialization for mesh.
Definition: driver.h:3493
wps_mode
WPS mode.
Definition: driver.h:486
const u8 * mac_addr_mask
MAC address mask used with randomization.
Definition: driver.h:434
const struct wpabuf * beacon_ies
WPS/P2P IE(s) for Beacon frames.
Definition: driver.h:1040
Definition: driver.h:1175
Definition: wpa_auth_i.h:140
int fixed_bssid
Whether to force this BSSID in IBSS mode 1 = Fix this BSSID and prevent merges. 0 = Do not fix BSSID...
Definition: driver.h:840
Report interface status changes.
Definition: driver.h:3644
Definition: driver.h:4690
int(* send_tdls_mgmt)(void *priv, const u8 *dst, u8 action_code, u8 dialog_token, u16 status_code, u32 peer_capab, int initiator, const u8 *buf, size_t len)
for sending TDLS management packets
Definition: driver.h:2882
u8 access_network_type
Access Network Type (0..15)
Definition: driver.h:1115
Data for EVENT_CHANNEL_LIST_CHANGED.
Definition: driver.h:4813
size_t ie_len
Length of ie buffer in octets.
Definition: driver.h:4348
P2P Device interface is used to indentify the abstracted P2P Device function in the driver...
Definition: driver.h:1512
Definition: driver.h:1430
size_t ptk_kek_len
The length of ptk_kek.
Definition: driver.h:4280
Connection failure reason in AP mode.
Definition: driver.h:3995
int center_freq1
Segment 0 center frequency in MHz.
Definition: driver.h:557
int ht_enabled
Whether HT is enabled.
Definition: driver.h:533
int flag
Channel flags (HOSTAPD_CHAN_*)
Definition: driver.h:89
reg_change_initiator
Regulatory change initiator.
Definition: driver.h:48
int(* set_authmode)(void *priv, int authmode)
Set authentication algorithm(s) for static WEP.
Definition: driver.h:2984
int auth_alg
Allowed authentication algorithms Bit field of WPA_AUTH_ALG_*.
Definition: driver.h:698
Association rejected.
Definition: driver.h:3745
P2P Client.
Definition: driver.h:1500
Report received EAPOL frame.
Definition: driver.h:3837
const u8 * bssid_hint
BSSID of a proposed AP.
Definition: driver.h:594
Beacon data.
Definition: driver.h:1637
Channel survey info.
Definition: driver.h:4108
const u8 * ric_ies
Optional IE(s), e.g., WMM TSPEC(s), for RIC-Request.
Definition: driver.h:4447
Filter for reporting SSIDs.
Definition: driver.h:363
size_t tail_len
Length of the tail buffer in octets.
Definition: driver.h:942
Report RX of a management frame.
Definition: driver.h:3781
int(* start_dfs_cac)(void *priv, struct hostapd_freq_params *freq)
Listen for radar interference on the channel.
Definition: driver.h:3220
const u8 * req_ies
(Re)Association Request IEs
Definition: driver.h:4159
const u8 * resp_ies
(Re)Association Response IEs
Definition: driver.h:4497
unsigned int freq
Channel frequency in MHz.
Definition: driver.h:4582
Data for EVENT_REMAIN_ON_CHANNEL events.
Definition: driver.h:4577
hostapd per-BSS data structure
Definition: hostapd.h:103
const u8 * ie
IEs from the Probe Request body.
Definition: driver.h:4637
void(* global_deinit)(void *priv)
Global driver deinitialization.
Definition: driver.h:2147
Definition: driver.h:1456
int(* roaming)(void *priv, int allowed, const u8 *bssid)
Set roaming policy for driver-based BSS selection.
Definition: driver.h:3281
int(* sta_assoc)(void *priv, const u8 *own_addr, const u8 *addr, int reassoc, u16 status, const u8 *ie, size_t len)
Station association indication.
Definition: driver.h:3053
int(* hapd_send_eapol)(void *priv, const u8 *addr, const u8 *data, size_t data_len, int encrypt, const u8 *own_addr, u32 flags)
Send an EAPOL packet (AP only)
Definition: driver.h:2344
u8 p2p_go_ctwindow
Client Traffic Window (in TUs)
Definition: driver.h:1129
const u8 * mac_addr
MAC address used with randomization. The address cannot be a multicast one, i.e., bit 0 of byte 0 sho...
Definition: driver.h:423
Data for EVENT_AUTH events.
Definition: driver.h:4464
const u8 * extra_ies
Extra IE(s) to add into Probe Request or NULL.
Definition: driver.h:332
int(* flush)(void *priv)
Flush all association stations (AP only)
Definition: driver.h:2304
Notify of radar detection.
Definition: driver.h:4004
int(* read_sta_data)(void *priv, struct hostap_sta_driver_data *data, const u8 *addr)
Fetch station data.
Definition: driver.h:2329
union wpa_event_data - Additional data for wpa_supplicant_event() calls
Definition: driver.h:4130
Notify that interface is unavailable.
Definition: driver.h:3891
struct hostapd_channel_data * channels
Array of supported channels.
Definition: driver.h:149
const u8 * psk
RSN PSK (alternative for passphrase for PSK)
Definition: driver.h:790
Report FT (IEEE 802.11r) response IEs.
Definition: driver.h:3701
u16 status_code
Status Code from (Re)association Response.
Definition: driver.h:4509
int(* sched_scan)(void *priv, struct wpa_driver_scan_params *params, u32 interval)
Request the driver to initiate scheduled scan.
Definition: driver.h:3113
int privacy
Whether privacy is used in the BSS.
Definition: driver.h:1031
int(* set_qos_map)(void *priv, const u8 *qos_map_set, u8 qos_map_set_len)
Set QoS Map.
Definition: driver.h:2916
Data for EVENT_RX_MGMT events.
Definition: driver.h:4543
int(* get_seqnum)(const char *ifname, void *priv, const u8 *addr, int idx, u8 *seq)
Fetch the current TSC/packet number (AP only)
Definition: driver.h:2292
int * freqs
Array of frequencies to scan or NULL for all frequencies.
Definition: driver.h:346