hostapd
driver.h
1 /*
2  * Driver interface definition
3  * Copyright (c) 2003-2015, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  *
8  * This file defines a driver interface used by both %wpa_supplicant and
9  * hostapd. The first part of the file defines data structures used in various
10  * driver operations. This is followed by the struct wpa_driver_ops that each
11  * driver wrapper will beed to define with callback functions for requesting
12  * driver operations. After this, there are definitions for driver event
13  * reporting with wpa_supplicant_event() and some convenience helper functions
14  * that can be used to report events.
15  */
16 
17 #ifndef DRIVER_H
18 #define DRIVER_H
19 
20 #define WPA_SUPPLICANT_DRIVER_VERSION 4
21 
22 #include "common/defs.h"
23 #include "common/ieee802_11_defs.h"
24 #ifdef CONFIG_MACSEC
25 #include "pae/ieee802_1x_kay.h"
26 #endif /* CONFIG_MACSEC */
27 #include "utils/list.h"
28 
29 #define HOSTAPD_CHAN_DISABLED 0x00000001
30 #define HOSTAPD_CHAN_NO_IR 0x00000002
31 #define HOSTAPD_CHAN_RADAR 0x00000008
32 #define HOSTAPD_CHAN_HT40PLUS 0x00000010
33 #define HOSTAPD_CHAN_HT40MINUS 0x00000020
34 #define HOSTAPD_CHAN_HT40 0x00000040
35 #define HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED 0x00000080
36 
37 #define HOSTAPD_CHAN_DFS_UNKNOWN 0x00000000
38 #define HOSTAPD_CHAN_DFS_USABLE 0x00000100
39 #define HOSTAPD_CHAN_DFS_UNAVAILABLE 0x00000200
40 #define HOSTAPD_CHAN_DFS_AVAILABLE 0x00000300
41 #define HOSTAPD_CHAN_DFS_MASK 0x00000300
42 
43 #define HOSTAPD_CHAN_VHT_10_70 0x00000800
44 #define HOSTAPD_CHAN_VHT_30_50 0x00001000
45 #define HOSTAPD_CHAN_VHT_50_30 0x00002000
46 #define HOSTAPD_CHAN_VHT_70_10 0x00004000
47 
48 #define HOSTAPD_CHAN_INDOOR_ONLY 0x00010000
49 #define HOSTAPD_CHAN_GO_CONCURRENT 0x00020000
50 
51 #define HOSTAPD_CHAN_VHT_10_150 0x00100000
52 #define HOSTAPD_CHAN_VHT_30_130 0x00200000
53 #define HOSTAPD_CHAN_VHT_50_110 0x00400000
54 #define HOSTAPD_CHAN_VHT_70_90 0x00800000
55 #define HOSTAPD_CHAN_VHT_90_70 0x01000000
56 #define HOSTAPD_CHAN_VHT_110_50 0x02000000
57 #define HOSTAPD_CHAN_VHT_130_30 0x04000000
58 #define HOSTAPD_CHAN_VHT_150_10 0x08000000
59 
60 /* Filter gratuitous ARP */
61 #define WPA_DATA_FRAME_FILTER_FLAG_ARP BIT(0)
62 /* Filter unsolicited Neighbor Advertisement */
63 #define WPA_DATA_FRAME_FILTER_FLAG_NA BIT(1)
64 /* Filter unicast IP packets encrypted using the GTK */
65 #define WPA_DATA_FRAME_FILTER_FLAG_GTK BIT(2)
66 
70 enum reg_change_initiator {
71  REGDOM_SET_BY_CORE,
72  REGDOM_SET_BY_USER,
73  REGDOM_SET_BY_DRIVER,
74  REGDOM_SET_BY_COUNTRY_IE,
75  REGDOM_BEACON_HINT,
76 };
77 
81 enum reg_type {
82  REGDOM_TYPE_UNKNOWN,
83  REGDOM_TYPE_COUNTRY,
84  REGDOM_TYPE_WORLD,
85  REGDOM_TYPE_CUSTOM_WORLD,
86  REGDOM_TYPE_INTERSECTION,
87 };
88 
96  short chan;
97 
101  int freq;
102 
106  int flag;
107 
112 
117 
122  s8 min_nf;
123 
124 #ifdef CONFIG_ACS
125 
130  long double interference_factor;
131 #endif /* CONFIG_ACS */
132 
136  unsigned int dfs_cac_ms;
137 };
138 
139 #define HOSTAPD_MODE_FLAG_HT_INFO_KNOWN BIT(0)
140 #define HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN BIT(1)
141 
149  enum hostapd_hw_mode mode;
150 
155 
160 
165 
169  int *rates;
170 
174  u16 ht_capab;
175 
179  u8 mcs_set[16];
180 
185 
190 
194  u8 vht_mcs_set[8];
195 
196  unsigned int flags; /* HOSTAPD_MODE_FLAG_* */
197 };
198 
199 
200 #define IEEE80211_MODE_INFRA 0
201 #define IEEE80211_MODE_IBSS 1
202 #define IEEE80211_MODE_AP 2
203 #define IEEE80211_MODE_MESH 5
204 
205 #define IEEE80211_CAP_ESS 0x0001
206 #define IEEE80211_CAP_IBSS 0x0002
207 #define IEEE80211_CAP_PRIVACY 0x0010
208 #define IEEE80211_CAP_RRM 0x1000
209 
210 /* DMG (60 GHz) IEEE 802.11ad */
211 /* type - bits 0..1 */
212 #define IEEE80211_CAP_DMG_MASK 0x0003
213 #define IEEE80211_CAP_DMG_IBSS 0x0001 /* Tx by: STA */
214 #define IEEE80211_CAP_DMG_PBSS 0x0002 /* Tx by: PCP */
215 #define IEEE80211_CAP_DMG_AP 0x0003 /* Tx by: AP */
216 
217 #define WPA_SCAN_QUAL_INVALID BIT(0)
218 #define WPA_SCAN_NOISE_INVALID BIT(1)
219 #define WPA_SCAN_LEVEL_INVALID BIT(2)
220 #define WPA_SCAN_LEVEL_DBM BIT(3)
221 #define WPA_SCAN_ASSOCIATED BIT(5)
222 
259 struct wpa_scan_res {
260  unsigned int flags;
261  u8 bssid[ETH_ALEN];
262  int freq;
263  u16 beacon_int;
264  u16 caps;
265  int qual;
266  int noise;
267  int level;
268  u64 tsf;
269  unsigned int age;
270  unsigned int est_throughput;
271  int snr;
272  u64 parent_tsf;
273  u8 tsf_bssid[ETH_ALEN];
274  size_t ie_len;
275  size_t beacon_ie_len;
276  /* Followed by ie_len + beacon_ie_len octets of IE data */
277 };
278 
286  struct wpa_scan_res **res;
287  size_t num;
288  struct os_reltime fetch_time;
289 };
290 
302  struct wpa_interface_info *next;
303  char *ifname;
304  char *desc;
305  const char *drv_name;
306 };
307 
308 #define WPAS_MAX_SCAN_SSIDS 16
309 
318  const u8 *ssid;
319  size_t ssid_len;
320 };
321 
330  struct wpa_driver_scan_ssid ssids[WPAS_MAX_SCAN_SSIDS];
331 
336  size_t num_ssids;
337 
341  const u8 *extra_ies;
342 
347 
353  int *freqs;
354 
370  u8 ssid[SSID_MAX_LEN];
371  size_t ssid_len;
372  } *filter_ssids;
373 
378 
387 
395  unsigned int p2p_probe:1;
396 
404  unsigned int only_new_results:1;
405 
412  unsigned int low_priority:1;
413 
417  unsigned int mac_addr_rand:1;
418 
423  const u8 *mac_addr;
424 
433  const u8 *mac_addr_mask;
434 
448  u32 interval; /* In seconds */
449  u32 iterations; /* Zero to run infinitely */
450  } *sched_scan_plans;
451 
455  unsigned int sched_scan_plans_num;
456 
464  const u8 *bssid;
465 
479 
486  u16 duration;
487 
496  unsigned int duration_mandatory:1;
497 
498  /*
499  * NOTE: Whenever adding new parameters here, please make sure
500  * wpa_scan_clone_params() and wpa_scan_free_params() get updated with
501  * matching changes.
502  */
503 };
504 
510  int freq;
511  const u8 *bssid;
512  const u8 *ssid;
513  size_t ssid_len;
514  int auth_alg;
515  const u8 *ie;
516  size_t ie_len;
517  const u8 *wep_key[4];
518  size_t wep_key_len[4];
519  int wep_tx_keyidx;
520  int local_state_change;
521 
525  int p2p;
526 
534  const u8 *auth_data;
535 
540 };
541 
545 enum wps_mode {
549  WPS_MODE_NONE,
550 
554  WPS_MODE_OPEN,
555 
559  WPS_MODE_PRIVACY
560 };
561 
569  enum hostapd_hw_mode mode;
570 
574  int freq;
575 
579  int channel;
580 
585 
594 
599 
606 
613 
618 };
619 
629  const u8 *bssid;
630 
639  const u8 *bssid_hint;
640 
644  const u8 *ssid;
645 
649  size_t ssid_len;
650 
655 
665 
672 
677 
696  const u8 *wpa_ie;
697 
701  size_t wpa_ie_len;
702 
706  unsigned int wpa_proto;
707 
713  unsigned int pairwise_suite;
714 
720  unsigned int group_suite;
721 
727  unsigned int key_mgmt_suite;
728 
733  int auth_alg;
734 
738  int mode;
739 
743  const u8 *wep_key[4];
744 
748  size_t wep_key_len[4];
749 
754 
758  enum mfp_options mgmt_frame_protection;
759 
781  const u8 *ft_ies;
782 
786  size_t ft_ies_len;
787 
795  const u8 *ft_md;
796 
806  const char *passphrase;
807 
816  const u8 *psk;
817 
826 
833  const u8 *prev_bssid;
834 
842  enum wps_mode wps;
843 
847  int p2p;
848 
855  int uapsd;
856 
863 
871 
876 
885  const u8 *htcaps;
886 
892  const u8 *htcaps_mask;
893 
894 #ifdef CONFIG_VHT_OVERRIDES
895 
898  int disable_vht;
899 
903  const struct ieee80211_vht_capabilities *vhtcaps;
904  const struct ieee80211_vht_capabilities *vhtcaps_mask;
905 #endif /* CONFIG_VHT_OVERRIDES */
906 
914 
919  int rrm_used;
920 
925  int pbss;
926 
930  const u8 *fils_kek;
931 
935  size_t fils_kek_len;
936 
941  const u8 *fils_nonces;
942 
947 };
948 
949 enum hide_ssid {
950  NO_SSID_HIDING,
951  HIDDEN_SSID_ZERO_LEN,
952  HIDDEN_SSID_ZERO_CONTENTS
953 };
954 
956  u8 any;
957  u8 disconnect;
958  u8 magic_pkt;
959  u8 gtk_rekey_failure;
960  u8 eap_identity_req;
961  u8 four_way_handshake;
962  u8 rfkill_release;
963 };
964 
969  u8 *head;
970 
974  size_t head_len;
975 
979  u8 *tail;
980 
984  size_t tail_len;
985 
990 
995 
1003 
1013  unsigned int beacon_rate;
1014 
1018  enum beacon_rate_type rate_type;
1019 
1027 
1032 
1036  const u8 *ssid;
1037 
1041  size_t ssid_len;
1042 
1046  enum hide_ssid hide_ssid;
1047 
1051  unsigned int pairwise_ciphers;
1052 
1056  unsigned int group_cipher;
1057 
1061  unsigned int key_mgmt_suites;
1062 
1066  unsigned int auth_algs;
1067 
1071  unsigned int wpa_version;
1072 
1076  int privacy;
1077 
1084  const struct wpabuf *beacon_ies;
1085 
1092  const struct wpabuf *proberesp_ies;
1093 
1100  const struct wpabuf *assocresp_ies;
1101 
1108  int isolate;
1109 
1114 
1119 
1127 
1132 
1137 
1141  const u8 *hessid;
1142 
1150 
1157 
1162 
1169  unsigned int smps_mode;
1170 
1175 
1179  int osen;
1180 
1185 
1190 
1195  int pbss;
1196 
1217 };
1218 
1220 #define WPA_DRIVER_MESH_CONF_FLAG_AUTO_PLINKS 0x00000001
1221 #define WPA_DRIVER_MESH_CONF_FLAG_PEER_LINK_TIMEOUT 0x00000002
1222 #define WPA_DRIVER_MESH_CONF_FLAG_MAX_PEER_LINKS 0x00000004
1223 #define WPA_DRIVER_MESH_CONF_FLAG_HT_OP_MODE 0x00000008
1224  /*
1225  * TODO: Other mesh configuration parameters would go here.
1226  * See NL80211_MESHCONF_* for all the mesh config parameters.
1227  */
1228  unsigned int flags;
1229  int auto_plinks;
1230  int peer_link_timeout;
1231  int max_peer_links;
1232  u16 ht_opmode;
1233 };
1234 
1236  const u8 *meshid;
1237  int meshid_len;
1238  const int *basic_rates;
1239  const u8 *ies;
1240  int ie_len;
1241  struct hostapd_freq_params freq;
1242  int beacon_int;
1243  int dtim_period;
1244  struct wpa_driver_mesh_bss_params conf;
1245 #define WPA_DRIVER_MESH_FLAG_USER_MPM 0x00000001
1246 #define WPA_DRIVER_MESH_FLAG_DRIVER_MPM 0x00000002
1247 #define WPA_DRIVER_MESH_FLAG_SAE_AUTH 0x00000004
1248 #define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008
1249  unsigned int flags;
1250 };
1251 
1256 #define WPA_DRIVER_CAPA_KEY_MGMT_WPA 0x00000001
1257 #define WPA_DRIVER_CAPA_KEY_MGMT_WPA2 0x00000002
1258 #define WPA_DRIVER_CAPA_KEY_MGMT_WPA_PSK 0x00000004
1259 #define WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK 0x00000008
1260 #define WPA_DRIVER_CAPA_KEY_MGMT_WPA_NONE 0x00000010
1261 #define WPA_DRIVER_CAPA_KEY_MGMT_FT 0x00000020
1262 #define WPA_DRIVER_CAPA_KEY_MGMT_FT_PSK 0x00000040
1263 #define WPA_DRIVER_CAPA_KEY_MGMT_WAPI_PSK 0x00000080
1264 #define WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B 0x00000100
1265 #define WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B_192 0x00000200
1266 
1267  unsigned int key_mgmt;
1268 
1269 #define WPA_DRIVER_CAPA_ENC_WEP40 0x00000001
1270 #define WPA_DRIVER_CAPA_ENC_WEP104 0x00000002
1271 #define WPA_DRIVER_CAPA_ENC_TKIP 0x00000004
1272 #define WPA_DRIVER_CAPA_ENC_CCMP 0x00000008
1273 #define WPA_DRIVER_CAPA_ENC_WEP128 0x00000010
1274 #define WPA_DRIVER_CAPA_ENC_GCMP 0x00000020
1275 #define WPA_DRIVER_CAPA_ENC_GCMP_256 0x00000040
1276 #define WPA_DRIVER_CAPA_ENC_CCMP_256 0x00000080
1277 #define WPA_DRIVER_CAPA_ENC_BIP 0x00000100
1278 #define WPA_DRIVER_CAPA_ENC_BIP_GMAC_128 0x00000200
1279 #define WPA_DRIVER_CAPA_ENC_BIP_GMAC_256 0x00000400
1280 #define WPA_DRIVER_CAPA_ENC_BIP_CMAC_256 0x00000800
1281 #define WPA_DRIVER_CAPA_ENC_GTK_NOT_USED 0x00001000
1282 
1283  unsigned int enc;
1284 
1285 #define WPA_DRIVER_AUTH_OPEN 0x00000001
1286 #define WPA_DRIVER_AUTH_SHARED 0x00000002
1287 #define WPA_DRIVER_AUTH_LEAP 0x00000004
1288 
1289  unsigned int auth;
1290 
1292 #define WPA_DRIVER_FLAGS_DRIVER_IE 0x00000001
1293 
1294 #define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC 0x00000002
1295 
1296 #define WPA_DRIVER_FLAGS_DFS_OFFLOAD 0x00000004
1297 
1299 #define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE 0x00000008
1300 
1301 #define WPA_DRIVER_FLAGS_WIRED 0x00000010
1302 
1304 #define WPA_DRIVER_FLAGS_SME 0x00000020
1305 
1306 #define WPA_DRIVER_FLAGS_AP 0x00000040
1307 
1308 #define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE 0x00000080
1309 
1310 #define WPA_DRIVER_FLAGS_HT_2040_COEX 0x00000100
1311 
1312 #define WPA_DRIVER_FLAGS_P2P_CONCURRENT 0x00000200
1313 
1317 #define WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE 0x00000400
1318 
1319 #define WPA_DRIVER_FLAGS_P2P_CAPABLE 0x00000800
1320 
1321 #define WPA_DRIVER_FLAGS_AP_TEARDOWN_SUPPORT 0x00001000
1322 
1327 #define WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P 0x00002000
1328 
1333 #define WPA_DRIVER_FLAGS_SANE_ERROR_CODES 0x00004000
1334 
1335 #define WPA_DRIVER_FLAGS_OFFCHANNEL_TX 0x00008000
1336 
1337 #define WPA_DRIVER_FLAGS_EAPOL_TX_STATUS 0x00010000
1338 
1339 #define WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS 0x00020000
1340 
1341 #define WPA_DRIVER_FLAGS_BSS_SELECTION 0x00040000
1342 
1343 #define WPA_DRIVER_FLAGS_TDLS_SUPPORT 0x00080000
1344 
1345 #define WPA_DRIVER_FLAGS_TDLS_EXTERNAL_SETUP 0x00100000
1346 
1347 #define WPA_DRIVER_FLAGS_PROBE_RESP_OFFLOAD 0x00200000
1348 
1349 #define WPA_DRIVER_FLAGS_AP_UAPSD 0x00400000
1350 
1351 #define WPA_DRIVER_FLAGS_INACTIVITY_TIMER 0x00800000
1352 
1353 #define WPA_DRIVER_FLAGS_AP_MLME 0x01000000
1354 
1355 #define WPA_DRIVER_FLAGS_SAE 0x02000000
1356 
1357 #define WPA_DRIVER_FLAGS_OBSS_SCAN 0x04000000
1358 
1359 #define WPA_DRIVER_FLAGS_IBSS 0x08000000
1360 
1361 #define WPA_DRIVER_FLAGS_RADAR 0x10000000
1362 
1363 #define WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE 0x20000000
1364 
1365 #define WPA_DRIVER_FLAGS_QOS_MAPPING 0x40000000
1366 
1367 #define WPA_DRIVER_FLAGS_AP_CSA 0x80000000
1368 
1369 #define WPA_DRIVER_FLAGS_MESH 0x0000000100000000ULL
1370 
1371 #define WPA_DRIVER_FLAGS_ACS_OFFLOAD 0x0000000200000000ULL
1372 
1373 #define WPA_DRIVER_FLAGS_KEY_MGMT_OFFLOAD 0x0000000400000000ULL
1374 
1375 #define WPA_DRIVER_FLAGS_TDLS_CHANNEL_SWITCH 0x0000000800000000ULL
1376 
1377 #define WPA_DRIVER_FLAGS_HT_IBSS 0x0000001000000000ULL
1378 
1379 #define WPA_DRIVER_FLAGS_VHT_IBSS 0x0000002000000000ULL
1380 
1381 #define WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY 0x0000004000000000ULL
1382 
1383 #define WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS 0x0000008000000000ULL
1384 
1385 #define WPA_DRIVER_FLAGS_FULL_AP_CLIENT_STATE 0x0000010000000000ULL
1386 
1387 #define WPA_DRIVER_FLAGS_P2P_LISTEN_OFFLOAD 0x0000020000000000ULL
1388 
1389 #define WPA_DRIVER_FLAGS_SUPPORT_FILS 0x0000040000000000ULL
1390 
1391 #define WPA_DRIVER_FLAGS_BEACON_RATE_LEGACY 0x0000080000000000ULL
1392 
1393 #define WPA_DRIVER_FLAGS_BEACON_RATE_HT 0x0000100000000000ULL
1394 
1395 #define WPA_DRIVER_FLAGS_BEACON_RATE_VHT 0x0000200000000000ULL
1396  u64 flags;
1397 
1398 #define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \
1399  (drv_flags & WPA_DRIVER_FLAGS_FULL_AP_CLIENT_STATE)
1400 
1401 #define WPA_DRIVER_SMPS_MODE_STATIC 0x00000001
1402 #define WPA_DRIVER_SMPS_MODE_DYNAMIC 0x00000002
1403  unsigned int smps_modes;
1404 
1405  unsigned int wmm_ac_supported:1;
1406 
1407  unsigned int mac_addr_rand_scan_supported:1;
1408  unsigned int mac_addr_rand_sched_scan_supported:1;
1409 
1412 
1415 
1417  unsigned int max_sched_scan_plans;
1418 
1421 
1424 
1427 
1430 
1434  unsigned int max_remain_on_chan;
1435 
1440  unsigned int max_stations;
1441 
1447 #define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS 0x00000001
1448 
1449 #define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS2 0x00000002
1450 
1451 #define WPA_DRIVER_PROBE_RESP_OFFLOAD_P2P 0x00000004
1452 
1453 #define WPA_DRIVER_PROBE_RESP_OFFLOAD_INTERWORKING 0x00000008
1454  unsigned int probe_resp_offloads;
1455 
1456  unsigned int max_acl_mac_addrs;
1457 
1462 
1469  const u8 *extended_capa, *extended_capa_mask;
1470  unsigned int extended_capa_len;
1471 
1473 
1475 #define WPA_DRIVER_FLAGS_DS_PARAM_SET_IE_IN_PROBES 0x00000001
1476 
1477 #define WPA_DRIVER_FLAGS_WFA_TPC_IE_IN_PROBES 0x00000002
1478 
1479 #define WPA_DRIVER_FLAGS_QUIET 0x00000004
1480 
1489 #define WPA_DRIVER_FLAGS_TX_POWER_INSERTION 0x00000008
1490 
1494 #define WPA_DRIVER_FLAGS_SUPPORT_RRM 0x00000010
1495 
1497 #define WPA_DRIVER_FLAGS_SUPPORT_SET_SCAN_DWELL 0x00000020
1498 
1499 #define WPA_DRIVER_FLAGS_SUPPORT_BEACON_REPORT 0x00000040
1500 
1501  u32 rrm_flags;
1502 
1503  /* Driver concurrency capabilities */
1504  unsigned int conc_capab;
1505  /* Maximum number of concurrent channels on 2.4 GHz */
1506  unsigned int max_conc_chan_2_4;
1507  /* Maximum number of concurrent channels on 5 GHz */
1508  unsigned int max_conc_chan_5_0;
1509 
1510  /* Maximum number of supported CSA counters */
1511  u16 max_csa_counters;
1512 };
1513 
1514 
1515 struct hostapd_data;
1516 
1518  unsigned long rx_packets, tx_packets;
1519  unsigned long long rx_bytes, tx_bytes;
1520  int bytes_64bit; /* whether 64-bit byte counters are supported */
1521  unsigned long current_tx_rate;
1522  unsigned long inactive_msec;
1523  unsigned long flags;
1524  unsigned long num_ps_buf_frames;
1525  unsigned long tx_retry_failed;
1526  unsigned long tx_retry_count;
1527  int last_rssi;
1528  int last_ack_rssi;
1529 };
1530 
1532  const u8 *addr;
1533  u16 aid;
1534  u16 capability;
1535  const u8 *supp_rates;
1536  size_t supp_rates_len;
1537  u16 listen_interval;
1538  const struct ieee80211_ht_capabilities *ht_capabilities;
1539  const struct ieee80211_vht_capabilities *vht_capabilities;
1540  int vht_opmode_enabled;
1541  u8 vht_opmode;
1542  u32 flags; /* bitmask of WPA_STA_* flags */
1543  u32 flags_mask; /* unset bits in flags */
1544 #ifdef CONFIG_MESH
1545  enum mesh_plink_state plink_state;
1546  u16 peer_aid;
1547 #endif /* CONFIG_MESH */
1548  int set; /* Set STA parameters instead of add */
1549  u8 qosinfo;
1550  const u8 *ext_capab;
1551  size_t ext_capab_len;
1552  const u8 *supp_channels;
1553  size_t supp_channels_len;
1554  const u8 *supp_oper_classes;
1555  size_t supp_oper_classes_len;
1556  int support_p2p_ps;
1557 };
1558 
1559 struct mac_address {
1560  u8 addr[ETH_ALEN];
1561 };
1562 
1564  u8 acl_policy;
1565  unsigned int num_mac_acl;
1566  struct mac_address mac_acl[0];
1567 };
1568 
1569 enum wpa_driver_if_type {
1573  WPA_IF_STATION,
1574 
1581  WPA_IF_AP_VLAN,
1582 
1588  WPA_IF_AP_BSS,
1589 
1593  WPA_IF_P2P_GO,
1594 
1598  WPA_IF_P2P_CLIENT,
1599 
1604  WPA_IF_P2P_GROUP,
1605 
1610  WPA_IF_P2P_DEVICE,
1611 
1612  /*
1613  * WPA_IF_MESH - Mesh interface
1614  */
1615  WPA_IF_MESH,
1616 
1617  /*
1618  * WPA_IF_TDLS - TDLS offchannel interface (used for pref freq only)
1619  */
1620  WPA_IF_TDLS,
1621 
1622  /*
1623  * WPA_IF_IBSS - IBSS interface (used for pref freq only)
1624  */
1625  WPA_IF_IBSS,
1626 };
1627 
1629  void *global_priv;
1630  const u8 *bssid;
1631  const char *ifname;
1632  const char *driver_params;
1633  int use_pae_group_addr;
1634  char **bridge;
1635  size_t num_bridge;
1636 
1637  u8 *own_addr; /* buffer for writing own MAC address */
1638 };
1639 
1640 
1643  const char *ifname;
1645  int enabled;
1646 
1647  int wpa;
1648  int ieee802_1x;
1649  int wpa_group;
1650  int wpa_pairwise;
1651  int wpa_key_mgmt;
1652  int rsn_preauth;
1653  enum mfp_options ieee80211w;
1654 };
1655 
1656 #define WPA_STA_AUTHORIZED BIT(0)
1657 #define WPA_STA_WMM BIT(1)
1658 #define WPA_STA_SHORT_PREAMBLE BIT(2)
1659 #define WPA_STA_MFP BIT(3)
1660 #define WPA_STA_TDLS_PEER BIT(4)
1661 #define WPA_STA_AUTHENTICATED BIT(5)
1662 #define WPA_STA_ASSOCIATED BIT(6)
1663 
1664 enum tdls_oper {
1665  TDLS_DISCOVERY_REQ,
1666  TDLS_SETUP,
1667  TDLS_TEARDOWN,
1668  TDLS_ENABLE_LINK,
1669  TDLS_DISABLE_LINK,
1670  TDLS_ENABLE,
1671  TDLS_DISABLE
1672 };
1673 
1674 enum wnm_oper {
1675  WNM_SLEEP_ENTER_CONFIRM,
1676  WNM_SLEEP_ENTER_FAIL,
1677  WNM_SLEEP_EXIT_CONFIRM,
1678  WNM_SLEEP_EXIT_FAIL,
1679  WNM_SLEEP_TFS_REQ_IE_ADD, /* STA requests driver to add TFS req IE */
1680  WNM_SLEEP_TFS_REQ_IE_NONE, /* STA requests empty TFS req IE */
1681  WNM_SLEEP_TFS_REQ_IE_SET, /* AP requests driver to set TFS req IE for
1682  * a STA */
1683  WNM_SLEEP_TFS_RESP_IE_ADD, /* AP requests driver to add TFS resp IE
1684  * for a STA */
1685  WNM_SLEEP_TFS_RESP_IE_NONE, /* AP requests empty TFS resp IE */
1686  WNM_SLEEP_TFS_RESP_IE_SET, /* AP requests driver to set TFS resp IE
1687  * for a STA */
1688  WNM_SLEEP_TFS_IE_DEL /* AP delete the TFS IE */
1689 };
1690 
1691 /* enum chan_width - Channel width definitions */
1692 enum chan_width {
1693  CHAN_WIDTH_20_NOHT,
1694  CHAN_WIDTH_20,
1695  CHAN_WIDTH_40,
1696  CHAN_WIDTH_80,
1697  CHAN_WIDTH_80P80,
1698  CHAN_WIDTH_160,
1699  CHAN_WIDTH_UNKNOWN
1700 };
1701 
1706  u32 frequency;
1707  int above_threshold;
1708  int current_signal;
1709  int avg_signal;
1710  int avg_beacon_signal;
1711  int current_noise;
1712  int current_txrate;
1713  enum chan_width chanwidth;
1714  int center_frq1;
1715  int center_frq2;
1716 };
1717 
1735 struct beacon_data {
1736  u8 *head, *tail;
1737  u8 *beacon_ies;
1738  u8 *proberesp_ies;
1739  u8 *assocresp_ies;
1740  u8 *probe_resp;
1741 
1742  size_t head_len, tail_len;
1743  size_t beacon_ies_len;
1744  size_t proberesp_ies_len;
1745  size_t assocresp_ies_len;
1746  size_t probe_resp_len;
1747 };
1748 
1760  u8 cs_count;
1761  u8 block_tx;
1762 
1763  struct hostapd_freq_params freq_params;
1764  struct beacon_data beacon_csa;
1765  struct beacon_data beacon_after;
1766 
1767  u16 counter_offset_beacon[2];
1768  u16 counter_offset_presp[2];
1769 };
1770 
1771 /* TDLS peer capabilities for send_tdls_mgmt() */
1772 enum tdls_peer_capability {
1773  TDLS_PEER_HT = BIT(0),
1774  TDLS_PEER_VHT = BIT(1),
1775  TDLS_PEER_WMM = BIT(2),
1776 };
1777 
1778 /* valid info in the wmm_params struct */
1779 enum wmm_params_valid_info {
1780  WMM_PARAMS_UAPSD_QUEUES_INFO = BIT(0),
1781 };
1782 
1790 struct wmm_params {
1791  u8 info_bitmap;
1792  u8 uapsd_queues;
1793 };
1794 
1795 #ifdef CONFIG_MACSEC
1796 struct macsec_init_params {
1797  Boolean always_include_sci;
1798  Boolean use_es;
1799  Boolean use_scb;
1800 };
1801 #endif /* CONFIG_MACSEC */
1802 
1803 enum drv_br_port_attr {
1804  DRV_BR_PORT_ATTR_PROXYARP,
1805  DRV_BR_PORT_ATTR_HAIRPIN_MODE,
1806 };
1807 
1808 enum drv_br_net_param {
1809  DRV_BR_NET_PARAM_GARP_ACCEPT,
1810  DRV_BR_MULTICAST_SNOOPING,
1811 };
1812 
1814  /* Selected mode (HOSTAPD_MODE_*) */
1815  enum hostapd_hw_mode hw_mode;
1816 
1817  /* Indicates whether HT is enabled */
1818  int ht_enabled;
1819 
1820  /* Indicates whether HT40 is enabled */
1821  int ht40_enabled;
1822 
1823  /* Indicates whether VHT is enabled */
1824  int vht_enabled;
1825 
1826  /* Configured ACS channel width */
1827  u16 ch_width;
1828 
1829  /* ACS channel list info */
1830  unsigned int ch_list_len;
1831  const u8 *ch_list;
1832  const int *freq_list;
1833 };
1834 
1835 
1845  const char *name;
1847  const char *desc;
1848 
1860  int (*get_bssid)(void *priv, u8 *bssid);
1861 
1877  int (*get_ssid)(void *priv, u8 *ssid);
1878 
1930  int (*set_key)(const char *ifname, void *priv, enum wpa_alg alg,
1931  const u8 *addr, int key_idx, int set_tx,
1932  const u8 *seq, size_t seq_len,
1933  const u8 *key, size_t key_len);
1934 
1958  void * (*init)(void *ctx, const char *ifname);
1959 
1967  void (*deinit)(void *priv);
1968 
1979  int (*set_param)(void *priv, const char *param);
1980 
1991  int (*set_countermeasures)(void *priv, int enabled);
1992 
2002  int (*deauthenticate)(void *priv, const u8 *addr, int reason_code);
2003 
2011  int (*associate)(void *priv,
2012  struct wpa_driver_associate_params *params);
2013 
2031  int (*add_pmkid)(void *priv, const u8 *bssid, const u8 *pmkid);
2032 
2051  int (*remove_pmkid)(void *priv, const u8 *bssid, const u8 *pmkid);
2052 
2069  int (*flush_pmkid)(void *priv);
2070 
2079  int (*get_capa)(void *priv, struct wpa_driver_capa *capa);
2080 
2093  void (*poll)(void *priv);
2094 
2101  unsigned int (*get_ifindex)(void *priv);
2102 
2114  const char * (*get_ifname)(void *priv);
2115 
2126  const u8 * (*get_mac_addr)(void *priv);
2127 
2140  int (*set_operstate)(void *priv, int state);
2141 
2158  int (*mlme_setprotection)(void *priv, const u8 *addr, int protect_type,
2159  int key_type);
2160 
2169  struct hostapd_hw_modes * (*get_hw_feature_data)(void *priv,
2170  u16 *num_modes,
2171  u16 *flags);
2172 
2185  int (*send_mlme)(void *priv, const u8 *data, size_t data_len,
2186  int noack, unsigned int freq, const u16 *csa_offs,
2187  size_t csa_offs_len);
2188 
2204  int (*update_ft_ies)(void *priv, const u8 *md, const u8 *ies,
2205  size_t ies_len);
2206 
2214  struct wpa_scan_results * (*get_scan_results2)(void *priv);
2215 
2225  int (*set_country)(void *priv, const char *alpha2);
2226 
2233  int (*get_country)(void *priv, char *alpha2);
2234 
2247  void * (*global_init)(void *ctx);
2248 
2256  void (*global_deinit)(void *priv);
2257 
2269  void * (*init2)(void *ctx, const char *ifname, void *global_priv);
2270 
2278  struct wpa_interface_info * (*get_interfaces)(void *global_priv);
2279 
2291  int (*scan2)(void *priv, struct wpa_driver_scan_params *params);
2292 
2305  int (*authenticate)(void *priv,
2306  struct wpa_driver_auth_params *params);
2307 
2327  int (*set_ap)(void *priv, struct wpa_driver_ap_params *params);
2328 
2337  int (*set_acl)(void *priv, struct hostapd_acl_params *params);
2338 
2348  void * (*hapd_init)(struct hostapd_data *hapd,
2349  struct wpa_init_params *params);
2350 
2355  void (*hapd_deinit)(void *priv);
2356 
2371  int (*set_ieee8021x)(void *priv, struct wpa_bss_params *params);
2372 
2385  int (*set_privacy)(void *priv, int enabled);
2386 
2401  int (*get_seqnum)(const char *ifname, void *priv, const u8 *addr,
2402  int idx, u8 *seq);
2403 
2413  int (*flush)(void *priv);
2414 
2429  int (*set_generic_elem)(void *priv, const u8 *elem, size_t elem_len);
2430 
2438  int (*read_sta_data)(void *priv, struct hostap_sta_driver_data *data,
2439  const u8 *addr);
2440 
2453  int (*hapd_send_eapol)(void *priv, const u8 *addr, const u8 *data,
2454  size_t data_len, int encrypt,
2455  const u8 *own_addr, u32 flags);
2456 
2468  int (*sta_deauth)(void *priv, const u8 *own_addr, const u8 *addr,
2469  int reason);
2470 
2482  int (*sta_disassoc)(void *priv, const u8 *own_addr, const u8 *addr,
2483  int reason);
2484 
2491  int (*sta_remove)(void *priv, const u8 *addr);
2492 
2503  int (*hapd_get_ssid)(void *priv, u8 *buf, int len);
2504 
2514  int (*hapd_set_ssid)(void *priv, const u8 *buf, int len);
2515 
2525  int (*hapd_set_countermeasures)(void *priv, int enabled);
2526 
2545  int (*sta_add)(void *priv, struct hostapd_sta_add_params *params);
2546 
2553  int (*get_inact_sec)(void *priv, const u8 *addr);
2554 
2561  int (*sta_clear_stats)(void *priv, const u8 *addr);
2562 
2569  int (*set_freq)(void *priv, struct hostapd_freq_params *freq);
2570 
2577  int (*set_rts)(void *priv, int rts);
2578 
2585  int (*set_frag)(void *priv, int frag);
2586 
2596  int (*sta_set_flags)(void *priv, const u8 *addr,
2597  unsigned int total_flags, unsigned int flags_or,
2598  unsigned int flags_and);
2599 
2609  int (*set_tx_queue_params)(void *priv, int queue, int aifs, int cw_min,
2610  int cw_max, int burst_time);
2611 
2632  int (*if_add)(void *priv, enum wpa_driver_if_type type,
2633  const char *ifname, const u8 *addr, void *bss_ctx,
2634  void **drv_priv, char *force_ifname, u8 *if_addr,
2635  const char *bridge, int use_existing, int setup_ap);
2636 
2644  int (*if_remove)(void *priv, enum wpa_driver_if_type type,
2645  const char *ifname);
2646 
2661  int (*set_sta_vlan)(void *priv, const u8 *addr, const char *ifname,
2662  int vlan_id);
2663 
2674  int (*commit)(void *priv);
2675 
2686  int (*send_ether)(void *priv, const u8 *dst, const u8 *src, u16 proto,
2687  const u8 *data, size_t data_len);
2688 
2697  int (*set_radius_acl_auth)(void *priv, const u8 *mac, int accepted,
2698  u32 session_timeout);
2699 
2706  int (*set_radius_acl_expire)(void *priv, const u8 *mac);
2707 
2736  int (*set_ap_wps_ie)(void *priv, const struct wpabuf *beacon,
2737  const struct wpabuf *proberesp,
2738  const struct wpabuf *assocresp);
2739 
2746  int (*set_supp_port)(void *priv, int authorized);
2747 
2760  int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val,
2761  const char *bridge_ifname, char *ifname_wds);
2762 
2789  int (*send_action)(void *priv, unsigned int freq, unsigned int wait,
2790  const u8 *dst, const u8 *src, const u8 *bssid,
2791  const u8 *data, size_t data_len, int no_cck);
2792 
2801  void (*send_action_cancel_wait)(void *priv);
2802 
2825  int (*remain_on_channel)(void *priv, unsigned int freq,
2826  unsigned int duration);
2827 
2839  int (*cancel_remain_on_channel)(void *priv);
2840 
2855  int (*probe_req_report)(void *priv, int report);
2856 
2867  int (*deinit_ap)(void *priv);
2868 
2878  int (*deinit_p2p_cli)(void *priv);
2879 
2884  void (*suspend)(void *priv);
2885 
2890  void (*resume)(void *priv);
2891 
2906  int (*signal_monitor)(void *priv, int threshold, int hysteresis);
2907 
2919  int (*send_frame)(void *priv, const u8 *data, size_t data_len,
2920  int encrypt);
2921 
2933  int (*get_noa)(void *priv, u8 *buf, size_t buf_len);
2934 
2947  int (*set_noa)(void *priv, u8 count, int start, int duration);
2948 
2957  int (*set_p2p_powersave)(void *priv, int legacy_ps, int opp_ps,
2958  int ctwindow);
2959 
2966  int (*ampdu)(void *priv, int ampdu);
2967 
2979  const char * (*get_radio_name)(void *priv);
2980 
2997  int (*send_tdls_mgmt)(void *priv, const u8 *dst, u8 action_code,
2998  u8 dialog_token, u16 status_code, u32 peer_capab,
2999  int initiator, const u8 *buf, size_t len);
3000 
3011  int (*tdls_oper)(void *priv, enum tdls_oper oper, const u8 *peer);
3012 
3022  int (*wnm_oper)(void *priv, enum wnm_oper oper, const u8 *peer,
3023  u8 *buf, u16 *buf_len);
3024 
3031  int (*set_qos_map)(void *priv, const u8 *qos_map_set,
3032  u8 qos_map_set_len);
3033 
3043  int (*br_add_ip_neigh)(void *priv, u8 version, const u8 *ipaddr,
3044  int prefixlen, const u8 *addr);
3045 
3053  int (*br_delete_ip_neigh)(void *priv, u8 version, const u8 *ipaddr);
3054 
3061  int (*br_port_set_attr)(void *priv, enum drv_br_port_attr attr,
3062  unsigned int val);
3063 
3070  int (*br_set_net_param)(void *priv, enum drv_br_net_param param,
3071  unsigned int val);
3072 
3078  int (*set_wowlan)(void *priv, const struct wowlan_triggers *triggers);
3079 
3085  int (*signal_poll)(void *priv, struct wpa_signal_info *signal_info);
3086 
3099  int (*set_authmode)(void *priv, int authmode);
3100 
3101 #ifdef ANDROID
3102 
3110  int (*driver_cmd)(void *priv, char *cmd, char *buf, size_t buf_len);
3111 #endif /* ANDROID */
3112 
3133  int (*vendor_cmd)(void *priv, unsigned int vendor_id,
3134  unsigned int subcmd, const u8 *data, size_t data_len,
3135  struct wpabuf *buf);
3136 
3150  void (*set_rekey_info)(void *priv, const u8 *kek, size_t kek_len,
3151  const u8 *kck, size_t kck_len,
3152  const u8 *replay_ctr);
3153 
3168  int (*sta_assoc)(void *priv, const u8 *own_addr, const u8 *addr,
3169  int reassoc, u16 status, const u8 *ie, size_t len);
3170 
3184  int (*sta_auth)(void *priv, const u8 *own_addr, const u8 *addr,
3185  u16 seq, u16 status, const u8 *ie, size_t len);
3186 
3198  int (*add_tspec)(void *priv, const u8 *addr, u8 *tspec_ie,
3199  size_t tspec_ielen);
3200 
3211  int (*add_sta_node)(void *priv, const u8 *addr, u16 auth_alg);
3212 
3227  int (*sched_scan)(void *priv, struct wpa_driver_scan_params *params);
3228 
3238  int (*stop_sched_scan)(void *priv);
3239 
3251  void (*poll_client)(void *priv, const u8 *own_addr,
3252  const u8 *addr, int qos);
3253 
3264  int (*radio_disable)(void *priv, int disabled);
3265 
3276  int (*switch_channel)(void *priv, struct csa_settings *settings);
3277 
3288  int (*add_tx_ts)(void *priv, u8 tsid, const u8 *addr, u8 user_prio,
3289  u16 admitted_time);
3290 
3298  int (*del_tx_ts)(void *priv, u8 tsid, const u8 *addr);
3299 
3312  int (*tdls_enable_channel_switch)(
3313  void *priv, const u8 *addr, u8 oper_class,
3314  const struct hostapd_freq_params *params);
3315 
3325  int (*tdls_disable_channel_switch)(void *priv, const u8 *addr);
3326 
3333  int (*start_dfs_cac)(void *priv, struct hostapd_freq_params *freq);
3334 
3344  int (*stop_ap)(void *priv);
3345 
3369  int (*get_survey)(void *priv, unsigned int freq);
3370 
3378  int (*status)(void *priv, char *buf, size_t buflen);
3379 
3394  int (*roaming)(void *priv, int allowed, const u8 *bssid);
3395 
3402  int (*set_mac_addr)(void *priv, const u8 *addr);
3403 
3404 #ifdef CONFIG_MACSEC
3405  int (*macsec_init)(void *priv, struct macsec_init_params *params);
3406 
3407  int (*macsec_deinit)(void *priv);
3408 
3415  int (*macsec_get_capability)(void *priv, enum macsec_cap *cap);
3416 
3424  int (*enable_protect_frames)(void *priv, Boolean enabled);
3425 
3433  int (*enable_encrypt)(void *priv, Boolean enabled);
3434 
3443  int (*set_replay_protect)(void *priv, Boolean enabled, u32 window);
3444 
3451  int (*set_current_cipher_suite)(void *priv, u64 cs);
3452 
3460  int (*enable_controlled_port)(void *priv, Boolean enabled);
3461 
3468  int (*get_receive_lowest_pn)(void *priv, struct receive_sa *sa);
3469 
3476  int (*get_transmit_next_pn)(void *priv, struct transmit_sa *sa);
3477 
3484  int (*set_transmit_next_pn)(void *priv, struct transmit_sa *sa);
3485 
3495  int (*create_receive_sc)(void *priv, struct receive_sc *sc,
3496  unsigned int conf_offset,
3497  int validation);
3498 
3505  int (*delete_receive_sc)(void *priv, struct receive_sc *sc);
3506 
3513  int (*create_receive_sa)(void *priv, struct receive_sa *sa);
3514 
3521  int (*delete_receive_sa)(void *priv, struct receive_sa *sa);
3522 
3529  int (*enable_receive_sa)(void *priv, struct receive_sa *sa);
3530 
3537  int (*disable_receive_sa)(void *priv, struct receive_sa *sa);
3538 
3546  int (*create_transmit_sc)(void *priv, struct transmit_sc *sc,
3547  unsigned int conf_offset);
3548 
3555  int (*delete_transmit_sc)(void *priv, struct transmit_sc *sc);
3556 
3563  int (*create_transmit_sa)(void *priv, struct transmit_sa *sa);
3564 
3571  int (*delete_transmit_sa)(void *priv, struct transmit_sa *sa);
3572 
3579  int (*enable_transmit_sa)(void *priv, struct transmit_sa *sa);
3580 
3587  int (*disable_transmit_sa)(void *priv, struct transmit_sa *sa);
3588 #endif /* CONFIG_MACSEC */
3589 
3595  int (*init_mesh)(void *priv);
3596 
3603  int (*join_mesh)(void *priv,
3604  struct wpa_driver_mesh_join_params *params);
3605 
3611  int (*leave_mesh)(void *priv);
3612 
3622  int (*do_acs)(void *priv, struct drv_acs_params *params);
3623 
3630  int (*set_band)(void *priv, enum set_band band);
3631 
3643  int (*get_pref_freq_list)(void *priv, enum wpa_driver_if_type if_type,
3644  unsigned int *num, unsigned int *freq_list);
3645 
3656  int (*set_prob_oper_freq)(void *priv, unsigned int freq);
3657 
3666  int (*abort_scan)(void *priv, u64 scan_cookie);
3667 
3675  int (*configure_data_frame_filters)(void *priv, u32 filter_flags);
3676 
3686  int (*get_ext_capab)(void *priv, enum wpa_driver_if_type type,
3687  const u8 **ext_capab, const u8 **ext_capab_mask,
3688  unsigned int *ext_capab_len);
3689 
3703  int (*p2p_lo_start)(void *priv, unsigned int freq,
3704  unsigned int period, unsigned int interval,
3705  unsigned int count,
3706  const u8 *device_types, size_t dev_types_len,
3707  const u8 *ies, size_t ies_len);
3708 
3714  int (*p2p_lo_stop)(void *priv);
3715 
3730  int (*set_default_scan_ies)(void *priv, const u8 *ies, size_t ies_len);
3731 
3741  int (*set_tdls_mode)(void *priv, int tdls_external_control);
3742 };
3743 
3744 
3748 enum wpa_event_type {
3761  EVENT_ASSOC,
3762 
3773  EVENT_DISASSOC,
3774 
3784  EVENT_MICHAEL_MIC_FAILURE,
3785 
3800  EVENT_SCAN_RESULTS,
3801 
3813  EVENT_ASSOCINFO,
3814 
3824  EVENT_INTERFACE_STATUS,
3825 
3850  EVENT_PMKID_CANDIDATE,
3851 
3861  EVENT_STKSTART,
3862 
3868  EVENT_TDLS,
3869 
3877  EVENT_FT_RESPONSE,
3878 
3887  EVENT_IBSS_RSN_START,
3888 
3898  EVENT_AUTH,
3899 
3908  EVENT_DEAUTH,
3909 
3917  EVENT_ASSOC_REJECT,
3918 
3922  EVENT_AUTH_TIMED_OUT,
3923 
3927  EVENT_ASSOC_TIMED_OUT,
3928 
3932  EVENT_WPS_BUTTON_PUSHED,
3933 
3937  EVENT_TX_STATUS,
3938 
3942  EVENT_RX_FROM_UNKNOWN,
3943 
3947  EVENT_RX_MGMT,
3948 
3956  EVENT_REMAIN_ON_CHANNEL,
3957 
3966  EVENT_CANCEL_REMAIN_ON_CHANNEL,
3967 
3979  EVENT_RX_PROBE_REQ,
3980 
3990  EVENT_NEW_STA,
3991 
3998  EVENT_EAPOL_RX,
3999 
4007  EVENT_SIGNAL_CHANGE,
4008 
4015  EVENT_INTERFACE_ENABLED,
4016 
4023  EVENT_INTERFACE_DISABLED,
4024 
4032  EVENT_CHANNEL_LIST_CHANGED,
4033 
4047  EVENT_INTERFACE_UNAVAILABLE,
4048 
4056  EVENT_BEST_CHANNEL,
4057 
4066  EVENT_UNPROT_DEAUTH,
4067 
4076  EVENT_UNPROT_DISASSOC,
4077 
4085  EVENT_STATION_LOW_ACK,
4086 
4090  EVENT_IBSS_PEER_LOST,
4091 
4100  EVENT_DRIVER_GTK_REKEY,
4101 
4105  EVENT_SCHED_SCAN_STOPPED,
4106 
4113  EVENT_DRIVER_CLIENT_POLL_OK,
4114 
4118  EVENT_EAPOL_TX_STATUS,
4119 
4125  EVENT_CH_SWITCH,
4126 
4132  EVENT_WNM,
4133 
4141  EVENT_CONNECT_FAILED_REASON,
4142 
4149  EVENT_DFS_RADAR_DETECTED,
4150 
4156  EVENT_DFS_CAC_FINISHED,
4157 
4165  EVENT_DFS_CAC_ABORTED,
4166 
4172  EVENT_DFS_NOP_FINISHED,
4173 
4184  EVENT_SURVEY,
4185 
4194  EVENT_SCAN_STARTED,
4195 
4203  EVENT_AVOID_FREQUENCIES,
4204 
4208  EVENT_NEW_PEER_CANDIDATE,
4209 
4216  EVENT_ACS_CHANNEL_SELECTED,
4217 
4225  EVENT_DFS_CAC_STARTED,
4226 
4230  EVENT_P2P_LO_STOP,
4231 };
4232 
4233 
4249 struct freq_survey {
4250  u32 ifidx;
4251  unsigned int freq;
4252  s8 nf;
4253  u64 channel_time;
4254  u64 channel_time_busy;
4255  u64 channel_time_rx;
4256  u64 channel_time_tx;
4257  unsigned int filled;
4258  struct dl_list list;
4259 };
4260 
4261 #define SURVEY_HAS_NF BIT(0)
4262 #define SURVEY_HAS_CHAN_TIME BIT(1)
4263 #define SURVEY_HAS_CHAN_TIME_BUSY BIT(2)
4264 #define SURVEY_HAS_CHAN_TIME_RX BIT(3)
4265 #define SURVEY_HAS_CHAN_TIME_TX BIT(4)
4266 
4267 
4280  struct assoc_info {
4284  int reassoc;
4285 
4297  const u8 *req_ies;
4298 
4302  size_t req_ies_len;
4303 
4315  const u8 *resp_ies;
4316 
4321 
4325  const u8 *resp_frame;
4326 
4331 
4348  const u8 *beacon_ies;
4349 
4353 
4357  unsigned int freq;
4358 
4363 
4367  const u8 *addr;
4368 
4385 
4390  const u8 *key_replay_ctr;
4391 
4396 
4400  const u8 *ptk_kck;
4401 
4405  size_t ptk_kck_len;
4406 
4410  const u8 *ptk_kek;
4411 
4415  size_t ptk_kek_len;
4416 
4422  } assoc_info;
4423 
4427  struct disassoc_info {
4431  const u8 *addr;
4432 
4438 
4442  const u8 *ie;
4443 
4447  size_t ie_len;
4448 
4453  } disassoc_info;
4454 
4458  struct deauth_info {
4462  const u8 *addr;
4463 
4469 
4473  const u8 *ie;
4474 
4478  size_t ie_len;
4479 
4484  } deauth_info;
4485 
4490  int unicast;
4491  const u8 *src;
4493 
4498  unsigned int ifindex;
4499  char ifname[100];
4500  enum {
4501  EVENT_INTERFACE_ADDED, EVENT_INTERFACE_REMOVED
4502  } ievent;
4503  } interface_status;
4504 
4510  u8 bssid[ETH_ALEN];
4512  int index;
4514  int preauth;
4515  } pmkid_candidate;
4516 
4520  struct stkstart {
4521  u8 peer[ETH_ALEN];
4522  } stkstart;
4523 
4527  struct tdls {
4528  u8 peer[ETH_ALEN];
4529  enum {
4530  TDLS_REQUEST_SETUP,
4531  TDLS_REQUEST_TEARDOWN,
4532  TDLS_REQUEST_DISCOVER,
4533  } oper;
4534  u16 reason_code; /* for teardown */
4535  } tdls;
4536 
4540  struct wnm {
4541  u8 addr[ETH_ALEN];
4542  enum {
4543  WNM_OPER_SLEEP,
4544  } oper;
4545  enum {
4546  WNM_SLEEP_ENTER,
4547  WNM_SLEEP_EXIT
4548  } sleep_action;
4549  int sleep_intval;
4550  u16 reason_code;
4551  u8 *buf;
4552  u16 buf_len;
4553  } wnm;
4554 
4564  struct ft_ies {
4565  const u8 *ies;
4566  size_t ies_len;
4567  int ft_action;
4568  u8 target_ap[ETH_ALEN];
4570  const u8 *ric_ies;
4572  size_t ric_ies_len;
4573  } ft_ies;
4574 
4579  u8 peer[ETH_ALEN];
4580  } ibss_rsn_start;
4581 
4585  struct auth_info {
4586  u8 peer[ETH_ALEN];
4587  u8 bssid[ETH_ALEN];
4588  u16 auth_type;
4589  u16 auth_transaction;
4590  u16 status_code;
4591  const u8 *ies;
4592  size_t ies_len;
4593  } auth;
4594 
4598  struct assoc_reject {
4602  const u8 *bssid;
4603 
4615  const u8 *resp_ies;
4616 
4621 
4626 
4632  } assoc_reject;
4633 
4634  struct timeout_event {
4635  u8 addr[ETH_ALEN];
4636  } timeout_event;
4637 
4641  struct tx_status {
4642  u16 type;
4643  u16 stype;
4644  const u8 *dst;
4645  const u8 *data;
4646  size_t data_len;
4647  int ack;
4648  } tx_status;
4649 
4654  const u8 *bssid;
4655  const u8 *addr;
4656  int wds;
4657  } rx_from_unknown;
4658 
4662  struct rx_mgmt {
4663  const u8 *frame;
4664  size_t frame_len;
4665  u32 datarate;
4666 
4674  void *drv_priv;
4675 
4679  int freq;
4680 
4685  } rx_mgmt;
4686 
4696  unsigned int freq;
4697 
4701  unsigned int duration;
4703 
4721  struct scan_info {
4722  int aborted;
4723  const int *freqs;
4724  size_t num_freqs;
4725  struct wpa_driver_scan_ssid ssids[WPAS_MAX_SCAN_SSIDS];
4726  size_t num_ssids;
4727  int external_scan;
4728  int nl_scan_event;
4729  u64 scan_start_tsf;
4730  u8 scan_start_tsf_bssid[ETH_ALEN];
4731  } scan_info;
4732 
4736  struct rx_probe_req {
4740  const u8 *sa;
4741 
4746  const u8 *da;
4747 
4752  const u8 *bssid;
4753 
4757  const u8 *ie;
4758 
4762  size_t ie_len;
4763 
4768  } rx_probe_req;
4769 
4773  struct new_sta {
4774  const u8 *addr;
4775  } new_sta;
4776 
4780  struct eapol_rx {
4781  const u8 *src;
4782  const u8 *data;
4783  size_t data_len;
4784  } eapol_rx;
4785 
4789  struct wpa_signal_info signal_change;
4790 
4799  struct best_channel {
4800  int freq_24;
4801  int freq_5;
4802  int freq_overall;
4803  } best_chan;
4804 
4805  struct unprot_deauth {
4806  const u8 *sa;
4807  const u8 *da;
4808  u16 reason_code;
4809  } unprot_deauth;
4810 
4812  const u8 *sa;
4813  const u8 *da;
4814  u16 reason_code;
4815  } unprot_disassoc;
4816 
4821  struct low_ack {
4822  u8 addr[ETH_ALEN];
4823  } low_ack;
4824 
4829  u8 peer[ETH_ALEN];
4830  } ibss_peer_lost;
4831 
4836  const u8 *bssid;
4837  const u8 *replay_ctr;
4838  } driver_gtk_rekey;
4839 
4844  struct client_poll {
4845  u8 addr[ETH_ALEN];
4846  } client_poll;
4847 
4859  const u8 *dst;
4860  const u8 *data;
4861  int data_len;
4862  int ack;
4863  } eapol_tx_status;
4864 
4874  struct ch_switch {
4875  int freq;
4876  int ht_enabled;
4877  int ch_offset;
4878  enum chan_width ch_width;
4879  int cf1;
4880  int cf2;
4881  } ch_switch;
4882 
4888  struct connect_failed_reason {
4889  u8 addr[ETH_ALEN];
4890  enum {
4891  MAX_CLIENT_REACHED,
4892  BLOCKED_CLIENT
4893  } code;
4894  } connect_failed_reason;
4895 
4900  struct dfs_event {
4901  int freq;
4902  int ht_enabled;
4903  int chan_offset;
4904  enum chan_width chan_width;
4905  int cf1;
4906  int cf2;
4907  } dfs_event;
4908 
4915  struct survey_results {
4916  unsigned int freq_filter;
4917  struct dl_list survey_list; /* struct freq_survey */
4918  } survey_results;
4919 
4926  struct channel_list_changed {
4927  enum reg_change_initiator initiator;
4928  enum reg_type type;
4929  char alpha2[3];
4930  } channel_list_changed;
4931 
4937  struct wpa_freq_range_list freq_range;
4938 
4948  struct mesh_peer {
4949  const u8 *peer;
4950  const u8 *ies;
4951  size_t ie_len;
4952  } mesh_peer;
4953 
4965  struct acs_selected_channels {
4966  u8 pri_channel;
4967  u8 sec_channel;
4968  u8 vht_seg0_center_ch;
4969  u8 vht_seg1_center_ch;
4970  u16 ch_width;
4971  enum hostapd_hw_mode hw_mode;
4972  } acs_selected_channels;
4973 
4986  struct p2p_lo_stop {
4987  enum {
4988  P2P_LO_STOPPED_REASON_COMPLETE = 0,
4989  P2P_LO_STOPPED_REASON_RECV_STOP_CMD,
4990  P2P_LO_STOPPED_REASON_INVALID_PARAM,
4991  P2P_LO_STOPPED_REASON_NOT_SUPPORTED,
4992  } reason_code;
4993  } p2p_lo_stop;
4994 };
4995 
5006 void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
5007  union wpa_event_data *data);
5008 
5019 void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
5020  union wpa_event_data *data);
5021 
5022 /*
5023  * The following inline functions are provided for convenience to simplify
5024  * event indication for some of the common events.
5025  */
5026 
5027 static inline void drv_event_assoc(void *ctx, const u8 *addr, const u8 *ie,
5028  size_t ielen, int reassoc)
5029 {
5030  union wpa_event_data event;
5031  os_memset(&event, 0, sizeof(event));
5032  event.assoc_info.reassoc = reassoc;
5033  event.assoc_info.req_ies = ie;
5034  event.assoc_info.req_ies_len = ielen;
5035  event.assoc_info.addr = addr;
5036  wpa_supplicant_event(ctx, EVENT_ASSOC, &event);
5037 }
5038 
5039 static inline void drv_event_disassoc(void *ctx, const u8 *addr)
5040 {
5041  union wpa_event_data event;
5042  os_memset(&event, 0, sizeof(event));
5043  event.disassoc_info.addr = addr;
5044  wpa_supplicant_event(ctx, EVENT_DISASSOC, &event);
5045 }
5046 
5047 static inline void drv_event_eapol_rx(void *ctx, const u8 *src, const u8 *data,
5048  size_t data_len)
5049 {
5050  union wpa_event_data event;
5051  os_memset(&event, 0, sizeof(event));
5052  event.eapol_rx.src = src;
5053  event.eapol_rx.data = data;
5054  event.eapol_rx.data_len = data_len;
5055  wpa_supplicant_event(ctx, EVENT_EAPOL_RX, &event);
5056 }
5057 
5058 /* driver_common.c */
5059 void wpa_scan_results_free(struct wpa_scan_results *res);
5060 
5061 /* Convert wpa_event_type to a string for logging */
5062 const char * event_to_string(enum wpa_event_type event);
5063 
5064 /* Convert chan_width to a string for logging and control interfaces */
5065 const char * channel_width_to_string(enum chan_width width);
5066 
5067 int ht_supported(const struct hostapd_hw_modes *mode);
5068 int vht_supported(const struct hostapd_hw_modes *mode);
5069 
5070 struct wowlan_triggers *
5071 wpa_get_wowlan_triggers(const char *wowlan_triggers,
5072  const struct wpa_driver_capa *capa);
5073 /* Convert driver flag to string */
5074 const char * driver_flag_to_string(u64 flag);
5075 
5076 /* NULL terminated array of linked in driver wrappers */
5077 extern const struct wpa_driver_ops *const wpa_drivers[];
5078 
5079 
5080 /* Available drivers */
5081 
5082 #ifdef CONFIG_DRIVER_WEXT
5083 extern const struct wpa_driver_ops wpa_driver_wext_ops; /* driver_wext.c */
5084 #endif /* CONFIG_DRIVER_WEXT */
5085 #ifdef CONFIG_DRIVER_NL80211
5086 /* driver_nl80211.c */
5087 extern const struct wpa_driver_ops wpa_driver_nl80211_ops;
5088 #endif /* CONFIG_DRIVER_NL80211 */
5089 #ifdef CONFIG_DRIVER_HOSTAP
5090 extern const struct wpa_driver_ops wpa_driver_hostap_ops; /* driver_hostap.c */
5091 #endif /* CONFIG_DRIVER_HOSTAP */
5092 #ifdef CONFIG_DRIVER_BSD
5093 extern const struct wpa_driver_ops wpa_driver_bsd_ops; /* driver_bsd.c */
5094 #endif /* CONFIG_DRIVER_BSD */
5095 #ifdef CONFIG_DRIVER_OPENBSD
5096 /* driver_openbsd.c */
5097 extern const struct wpa_driver_ops wpa_driver_openbsd_ops;
5098 #endif /* CONFIG_DRIVER_OPENBSD */
5099 #ifdef CONFIG_DRIVER_NDIS
5100 extern struct wpa_driver_ops wpa_driver_ndis_ops; /* driver_ndis.c */
5101 #endif /* CONFIG_DRIVER_NDIS */
5102 #ifdef CONFIG_DRIVER_WIRED
5103 extern const struct wpa_driver_ops wpa_driver_wired_ops; /* driver_wired.c */
5104 #endif /* CONFIG_DRIVER_WIRED */
5105 #ifdef CONFIG_DRIVER_MACSEC_QCA
5106 /* driver_macsec_qca.c */
5107 extern const struct wpa_driver_ops wpa_driver_macsec_qca_ops;
5108 #endif /* CONFIG_DRIVER_MACSEC_QCA */
5109 #ifdef CONFIG_DRIVER_MACSEC_LINUX
5110 /* driver_macsec_linux.c */
5111 extern const struct wpa_driver_ops wpa_driver_macsec_linux_ops;
5112 #endif /* CONFIG_DRIVER_MACSEC_LINUX */
5113 #ifdef CONFIG_DRIVER_ROBOSWITCH
5114 /* driver_roboswitch.c */
5115 extern const struct wpa_driver_ops wpa_driver_roboswitch_ops;
5116 #endif /* CONFIG_DRIVER_ROBOSWITCH */
5117 #ifdef CONFIG_DRIVER_ATHEROS
5118 /* driver_atheros.c */
5119 extern const struct wpa_driver_ops wpa_driver_atheros_ops;
5120 #endif /* CONFIG_DRIVER_ATHEROS */
5121 #ifdef CONFIG_DRIVER_NONE
5122 extern const struct wpa_driver_ops wpa_driver_none_ops; /* driver_none.c */
5123 #endif /* CONFIG_DRIVER_NONE */
5124 
5125 #endif /* DRIVER_H */
const u8 * bssid
bssid - BSSID of the received Probe Request frame or NULL if not available
Definition: driver.h:4752
const u8 * da
da - Destination address of the received Probe Request frame or NULL if not available ...
Definition: driver.h:4746
s32 filter_rssi
filter_rssi - Filter by RSSI
Definition: driver.h:386
size_t num_ssids
num_ssids - Number of entries in ssids array Zero indicates a request for a passive scan...
Definition: driver.h:336
size_t ssid_len
ssid_len - Length of the SSID (1..32)
Definition: driver.h:649
int center_freq2
center_freq2 - Segment 1 center frequency in MHz
Definition: driver.h:612
const u8 * fils_nonces
fils_nonces - Nonces for FILS association frame protection (AES-SIV AAD)
Definition: driver.h:941
const char * ifname
Interface name (for multi-SSID/VLAN support)
Definition: driver.h:1643
struct rx_from_unknown - Data for EVENT_RX_FROM_UNKNOWN events
Definition: driver.h:4653
unsigned int freq
freq - Frequency of the operational channel in MHz
Definition: driver.h:4357
unsigned int smps_mode
smps_mode - SMPS mode
Definition: driver.h:1169
struct scan_info - Optional data for EVENT_SCAN_RESULTS events : Whether the scan was aborted : Scann...
Definition: driver.h:4721
u16 ht_capab
ht_capab - HT (IEEE 802.11n) capabilities
Definition: driver.h:174
int uapsd
uapsd - UAPSD parameters for the network -1 = do not change defaults AP mode: 1 = enabled...
Definition: driver.h:855
struct csa_settings - Settings for channel switch command : Count in Beacon frames (TBTT) to perform ...
Definition: driver.h:1759
unsigned int max_remain_on_chan
max_remain_on_chan - Maximum remain-on-channel duration in msec
Definition: driver.h:1434
u8 a_mpdu_params
a_mpdu_params - A-MPDU (IEEE 802.11n) parameters
Definition: driver.h:184
int num_rates
num_rates - Number of entries in the rates array
Definition: driver.h:164
int ssi_signal
signal - signal strength in dBm (or 0 if not available)
Definition: driver.h:4767
struct stkstart - Data for EVENT_STKSTART
Definition: driver.h:4520
Definition: ieee802_1x_kay.h:94
size_t fils_kek_len
fils_kek_len: Length of fils_kek in bytes
Definition: driver.h:935
const struct wpabuf * proberesp_ies
proberesp_ies - P2P/WPS IE(s) for Probe Response frames
Definition: driver.h:1092
int freq
freq - Frequency (in MHz) on which the frame was received
Definition: driver.h:4679
struct ft_ies - FT information elements (EVENT_FT_RESPONSE)
Definition: driver.h:4564
size_t resp_frame_len
resp_frame_len - (Re)Association Response frame length
Definition: driver.h:4330
int enabled
Whether IEEE 802.1X or WPA/WPA2 is enabled.
Definition: driver.h:1645
s8 min_nf
min_nf - Minimum observed noise floor, in dBm, based on all surveyed channel data ...
Definition: driver.h:122
int preamble
preamble - Whether short preamble is enabled
Definition: driver.h:1118
struct hostapd_channel_data - Channel information
Definition: driver.h:92
const u8 * wpa_ie
wpa_ie - WPA information element for (Re)Association Request WPA information element to be included i...
Definition: driver.h:696
int max_sched_scan_ssids
Maximum number of supported active probe SSIDs for sched_scan.
Definition: driver.h:1414
struct tx_status - Data for EVENT_TX_STATUS events
Definition: driver.h:4641
struct tdls - Data for EVENT_TDLS
Definition: driver.h:4527
int(* ampdu)(void *priv, int ampdu)
ampdu - Enable/disable aggregation : Private driver interface data : 1/0 = enable/disable A-MPDU aggr...
Definition: driver.h:2966
Definition: driver.h:1563
const u8 * htcaps
htcaps - HT Capabilities over-rides
Definition: driver.h:885
int sec_channel_offset
sec_channel_offset - Secondary channel offset for HT40
Definition: driver.h:593
unsigned int key_mgmt_suite
key_mgmt_suite - Selected key management suite (WPA_KEY_MGMT_*)
Definition: driver.h:727
const u8 * key_replay_ctr
key_replay_ctr - Key replay counter value last used in a valid EAPOL-Key frame
Definition: driver.h:4390
int * basic_rates
basic_rates: -1 terminated array of basic rates in 100 kbps
Definition: driver.h:1002
struct michael_mic_failure - Data for EVENT_MICHAEL_MIC_FAILURE
Definition: driver.h:4489
struct best_channel - Data for EVENT_BEST_CHANNEL events : Best 2.4 GHz band channel frequency in MHz...
Definition: driver.h:4799
size_t ric_ies_len
Length of ric_ies buffer in octets.
Definition: driver.h:4572
Definition: ieee802_1x_kay.h:121
const u8 * hessid
hessid - Homogeneous ESS identifier or NULL if not set
Definition: driver.h:1141
size_t key_replay_ctr_len
key_replay_ctr_len - The length of key_replay_ctr
Definition: driver.h:4395
int authorized
The following is the key management offload information .
Definition: driver.h:4384
int ap_max_inactivity
ap_max_inactivity - Timeout in seconds to detect STA&#39;s inactivity
Definition: driver.h:1156
size_t resp_ies_len
resp_ies_len - Length of resp_ies in bytes
Definition: driver.h:4320
unsigned int dfs_cac_ms
dfs_cac_ms - DFS CAC time in milliseconds
Definition: driver.h:136
const u8 * prev_bssid
prev_bssid - Previously used BSSID in this ESS
Definition: driver.h:833
struct wpa_driver_scan_ssid - SSIDs to scan for - specific SSID to scan for (ProbeReq) NULL or zero-...
Definition: driver.h:317
Definition: driver.h:1517
const u8 * fils_kek
fils_kek - KEK for FILS association frame protection (AES-SIV)
Definition: driver.h:930
const u8 * ie
ie - Optional IE(s) in Deauthentication frame
Definition: driver.h:4473
u32 vht_capab
vht_capab - VHT (IEEE 802.11ac) capabilities
Definition: driver.h:189
int freq_hint
freq_hint - Frequency of the channel the proposed AP is using
Definition: driver.h:664
size_t fils_nonces_len
fils_nonces_len: Length of fils_nonce in bytes
Definition: driver.h:946
unsigned int sched_scan_plans_num
sched_scan_plans_num - Number of scan plans in sched_scan_plans array
Definition: driver.h:455
const u8 * ft_md
ft_md - FT Mobility domain (6 octets) (also included inside ft_ies)
Definition: driver.h:795
const u8 * beacon_ies
beacon_ies - Beacon or Probe Response IEs
Definition: driver.h:4348
unsigned int wpa_version
wpa_version - WPA_PROTO_* bitfield
Definition: driver.h:1071
struct driver_gtk_rekey - Data for EVENT_DRIVER_GTK_REKEY
Definition: driver.h:4835
Definition: driver.h:4811
void * drv_priv
drv_priv - Pointer to store driver private BSS information
Definition: driver.h:4674
const u8 * ssid
ssid - The SSID to use in Beacon/Probe Response frames
Definition: driver.h:1036
struct wpa_driver_scan_params - Scan parameters Data for struct wpa_driver_ops::scan2().
Definition: driver.h:326
unsigned int key_mgmt_suites
key_mgmt_suites - WPA_KEY_MGMT_* bitfield
Definition: driver.h:1061
struct ibss_peer_lost - Data for EVENT_IBSS_PEER_LOST
Definition: driver.h:4828
const u8 * auth_data
auth_data - Additional elements for Authentication frame
Definition: driver.h:534
unsigned int wpa_proto
wpa_proto - Bitfield of WPA_PROTO_* values to indicate WPA/WPA2
Definition: driver.h:706
int p2p
p2p - Whether this connection is a P2P group
Definition: driver.h:847
const u8 * extended_capa
extended_capa - extended capabilities in driver/device
Definition: driver.h:1469
int fixed_freq
fixed_freq - Fix control channel in IBSS mode 0 = don&#39;t fix control channel (default) 1 = fix control...
Definition: driver.h:870
int locally_generated
locally_generated - Whether the frame was locally generated
Definition: driver.h:4452
struct ibss_rsn_start - Data for EVENT_IBSS_RSN_START
Definition: driver.h:4578
const u8 * resp_frame
resp_frame - (Re)Association Response frame
Definition: driver.h:4325
size_t ie_len
ie_len - Length of ie buffer in octets
Definition: driver.h:4447
unsigned int enc
Bitfield of supported cipher suites.
Definition: driver.h:1283
size_t ssid_len
ssid_len - Length of the SSID (1..32)
Definition: driver.h:1041
Definition: wpabuf.h:20
int ssi_signal
ssi_signal - Signal strength in dBm (or 0 if not available)
Definition: driver.h:4684
size_t ie_len
ie_len - Length of ie buffer in octets
Definition: driver.h:4762
int ht_opmode
ht_opmode - HT operation mode or -1 if HT not in use
Definition: driver.h:1131
const u8 * ptk_kck
ptk_kck - The derived PTK KCK
Definition: driver.h:4400
const u8 * ssid
ssid - The selected SSID
Definition: driver.h:644
Definition: ieee802_11_defs.h:944
int freq
freq - Primary channel center frequency in MHz
Definition: driver.h:574
struct assoc_reject - Data for EVENT_ASSOC_REJECT events
Definition: driver.h:4598
struct wpa_scan_res - Scan result for an BSS/IBSS : information flags about the BSS/IBSS (WPA_SCAN_*)...
Definition: driver.h:259
size_t head_len
head_len - Length of the head buffer in octets
Definition: driver.h:974
struct ch_switch : Frequency of new channel in MHz : Whether this is an HT channel : Secondary channe...
Definition: driver.h:4874
size_t extra_ies_len
extra_ies_len - Length of extra_ies in octets
Definition: driver.h:346
struct hostapd_freq_params * freq
freq - Channel parameters for dynamic bandwidth changes
Definition: driver.h:1184
int pbss
pbss - If set, connect to a PCP in a PBSS.
Definition: driver.h:925
Definition: ieee802_1x_kay.h:110
int bg_scan_period
bg_scan_period - Background scan period in seconds, 0 to disable background scan, or -1 to indicate n...
Definition: driver.h:671
int bandwidth
bandwidth - Channel bandwidth in MHz (20, 40, 80, 160)
Definition: driver.h:617
unsigned int duration
duration - Duration to remain on the channel in milliseconds
Definition: driver.h:4701
int reenable
reenable - Whether this is to re-enable beaconing
Definition: driver.h:1189
unsigned int max_sched_scan_plans
Maximum number of supported scan plans for scheduled scan.
Definition: driver.h:1417
short chan
chan - Channel number (IEEE 802.11)
Definition: driver.h:96
int disable_dgaf
disable_dgaf - Whether group-addressed frames are disabled
Definition: driver.h:1174
int beacon_int
beacon_int - Beacon interval
Definition: driver.h:994
u8 * tail
tail - Beacon tail following TIM IE
Definition: driver.h:979
size_t proberesp_len
proberesp_len - Length of the proberesp buffer in octets
Definition: driver.h:1031
Definition: ieee802_11_defs.h:978
struct wpa_interface_info - Network interface information : Pointer to the next interface or NULL if ...
Definition: driver.h:301
struct client_poll - Data for EVENT_DRIVER_CLIENT_POLL_OK events : station address ...
Definition: driver.h:4844
u8 subnet_status
subnet_status - The subnet status: 0 = unknown, 1 = unchanged, 2 = changed
Definition: driver.h:4421
Definition: common.h:519
int reassoc
reassoc - Flag to indicate association or reassociation
Definition: driver.h:4284
size_t num_filter_ssids
num_filter_ssids - Number of entries in filter_ssids array
Definition: driver.h:377
int isolate
isolate - Whether to isolate frames between associated stations
Definition: driver.h:1108
sched_scan_plans - Scan plans for scheduled scan
Definition: driver.h:447
int rrm_used
Flag for indicating whether this association includes support for RRM (Radio Resource Measurements) ...
Definition: driver.h:919
const u8 * ie
ie - Optional IE(s) in Disassociation frame
Definition: driver.h:4442
int req_key_mgmt_offload
req_key_mgmt_offload - Request key management offload for connection
Definition: driver.h:913
unsigned int group_suite
group_suite - Selected group cipher suite (WPA_CIPHER_*)
Definition: driver.h:720
size_t req_ies_len
req_ies_len - Length of req_ies in bytes
Definition: driver.h:4302
u16 reason_code
reason_code - Reason Code (host byte order) used in Deauthentication frame
Definition: driver.h:4468
struct dl_list survey_list
survey_list - Linked list of surveys (struct freq_survey)
Definition: driver.h:116
int vht_enabled
vht_enabled - Whether VHT is enabled
Definition: driver.h:598
const u8 * htcaps_mask
htcaps_mask - HT Capabilities over-rides mask
Definition: driver.h:892
const char * name
Name of the driver interface.
Definition: driver.h:1845
unsigned int pairwise_suite
pairwise_suite - Selected pairwise cipher suite (WPA_CIPHER_*)
Definition: driver.h:713
int cts_protect
cts_protect - Whether CTS protection is enabled
Definition: driver.h:1113
const char * passphrase
passphrase - RSN passphrase for PSK
Definition: driver.h:806
Definition: os.h:26
const u8 * bssid
bssid - BSSID of the selected AP This can be NULL, if ap_scan=2 mode is used and the driver is respon...
Definition: driver.h:629
int max_scan_ssids
Maximum number of supported active probe SSIDs.
Definition: driver.h:1411
u16 reason_code
reason_code - Reason Code (host byte order) used in Deauthentication frame
Definition: driver.h:4437
unsigned int beacon_rate
beacon_rate: Beacon frame data rate
Definition: driver.h:1013
const u8 * addr
addr - Station address (for AP mode)
Definition: driver.h:4367
Definition: driver.h:965
const u8 * bssid
bssid - Specific BSSID to scan for
Definition: driver.h:464
Definition: driver.h:955
int p2p
p2p - Whether this connection is a P2P group
Definition: driver.h:525
struct hostapd_hw_modes - Supported hardware mode information
Definition: driver.h:145
Definition: driver.h:4634
const u8 * sa
sa - Source address of the received Probe Request frame
Definition: driver.h:4740
struct dl_list - Doubly-linked list
Definition: list.h:15
const u8 * resp_ies
resp_ies - (Re)Association Response IEs
Definition: driver.h:4315
struct wpa_driver_auth_params - Authentication parameters Data for struct wpa_driver_ops::authenticat...
Definition: driver.h:509
struct deauth_info - Data for EVENT_DEAUTH events
Definition: driver.h:4458
size_t auth_data_len
auth_data_len - Length of auth_data buffer in octets
Definition: driver.h:539
struct wpa_driver_associate_params - Association parameters Data for struct wpa_driver_ops::associate...
Definition: driver.h:624
Definition: driver.h:1219
struct eapol_tx_status : Original destination : Data starting with IEEE 802.1X header (!) : Length of...
Definition: driver.h:4858
int sched_scan_supported
Whether sched_scan (offloaded scanning) is supported.
Definition: driver.h:1426
size_t wpa_ie_len
wpa_ie_len - length of the wpa_ie
Definition: driver.h:701
Definition: driver.h:1641
int wep_tx_keyidx
wep_tx_keyidx - WEP TX key index for static WEP configuration
Definition: driver.h:753
int channel
channel - Channel number
Definition: driver.h:579
struct low_ack - Data for EVENT_STATION_LOW_ACK events : station address
Definition: driver.h:4821
struct wpa_driver_ops - Driver interface API definition
Definition: driver.h:1843
int interworking
interworking - Whether Interworking is enabled
Definition: driver.h:1136
int preauth
Whether RSN IE includes pre-authenticate flag.
Definition: driver.h:4514
size_t ft_ies_len
ft_ies_len - Length of ft_ies in bytes
Definition: driver.h:786
struct new_sta - Data for EVENT_NEW_STA events
Definition: driver.h:4773
struct interface_status - Data for EVENT_INTERFACE_STATUS
Definition: driver.h:4497
const u8 * ft_ies
ft_ies - IEEE 802.11r / FT information elements If the supplicant is using IEEE 802.11r (FT) and has the needed keys for fast transition, this parameter is set to include the IEs that are to be sent in the next FT Authentication Request message.
Definition: driver.h:781
struct rx_probe_req - Data for EVENT_RX_PROBE_REQ events
Definition: driver.h:4736
unsigned int auth
Bitfield of supported IEEE 802.11 authentication algorithms.
Definition: driver.h:1289
u16 duration
duration - Dwell time on each channel
Definition: driver.h:486
Definition: ieee802_1x_kay.h:79
u32 max_sched_scan_plan_interval
Maximum interval in a scan plan.
Definition: driver.h:1420
int mode
mode - Operation mode (infra/ibss) IEEE80211_MODE_*
Definition: driver.h:738
int freq
freq - Frequency in MHz
Definition: driver.h:101
const struct wpabuf * assocresp_ies
assocresp_ies - WPS IE(s) for (Re)Association Response frames
Definition: driver.h:1100
struct pmkid_candidate - Data for EVENT_PMKID_CANDIDATE
Definition: driver.h:4508
u64 scan_cookie
scan_cookie - Unique identification representing the scan request
Definition: driver.h:478
u8 max_tx_power
max_tx_power - Regulatory transmit power limit in dBm
Definition: driver.h:111
Definition: driver.h:1813
int short_slot_time
short_slot_time - Whether short slot time is enabled
Definition: driver.h:1126
struct wpa_scan_results - Scan results : Array of pointers to allocated variable length scan result e...
Definition: driver.h:285
struct wnm - Data for EVENT_WNM
Definition: driver.h:4540
const u8 * bssid
bssid - BSSID of the AP that rejected association
Definition: driver.h:4602
unsigned int auth_algs
auth_algs - WPA_AUTH_ALG_* bitfield
Definition: driver.h:1066
int drop_unencrypted
drop_unencrypted - Enable/disable unencrypted frame filtering
Definition: driver.h:825
const u8 * addr
addr - Station address (for AP mode)
Definition: driver.h:4431
unsigned int num_multichan_concurrent
Number of supported concurrent channels.
Definition: driver.h:1461
const u8 * addr
addr - Station address (for AP mode)
Definition: driver.h:4462
struct assoc_info - Data for EVENT_ASSOC and EVENT_ASSOCINFO events
Definition: driver.h:4280
u8 * proberesp
proberesp - Probe Response template
Definition: driver.h:1026
const u8 * ptk_kek
ptk_kek - The derived PTK KEK
Definition: driver.h:4410
int index
Smaller the index, higher the priority.
Definition: driver.h:4512
size_t beacon_ies_len
beacon_ies_len - Length of beacon_ies
Definition: driver.h:4352
int locally_generated
locally_generated - Whether the frame was locally generated
Definition: driver.h:4483
Definition: driver.h:1628
unsigned int key_mgmt
Bitfield of supported key management suites.
Definition: driver.h:1267
int num_channels
num_channels - Number of entries in the channels array
Definition: driver.h:154
int disable_ht
disable_ht - Disable HT (IEEE 802.11n) for this connection
Definition: driver.h:875
struct eapol_rx - Data for EVENT_EAPOL_RX events
Definition: driver.h:4780
unsigned int group_cipher
group_cipher - WPA_CIPHER_*
Definition: driver.h:1056
unsigned int pairwise_ciphers
pairwise_ciphers - WPA_CIPHER_* bitfield
Definition: driver.h:1051
unsigned int max_stations
max_stations - Maximum number of associated stations the driver supports in AP mode ...
Definition: driver.h:1440
const char * desc
One line description of the driver interface.
Definition: driver.h:1847
struct wpa_signal_info - Information about channel signal quality
Definition: driver.h:1705
int dtim_period
dtim_period - DTIM period
Definition: driver.h:989
struct wmm_params - WMM parameterss configured for this association : Bitmap of valid wmm_params info...
Definition: driver.h:1790
struct wpa_driver_capa - Driver capability information
Definition: driver.h:1255
size_t resp_ies_len
resp_ies_len - Length of resp_ies in bytes
Definition: driver.h:4620
int osen
osen - Whether OSEN security is enabled
Definition: driver.h:1179
struct hostapd_freq_params - Channel parameters
Definition: driver.h:565
struct disassoc_info - Data for EVENT_DISASSOC events
Definition: driver.h:4427
size_t ptk_kck_len
ptk_kek_len - The length of ptk_kck
Definition: driver.h:4405
u8 * head
head - Beacon head from IEEE 802.11 header to IEs before TIM IE
Definition: driver.h:969
int max_match_sets
Maximum number of supported match sets for sched_scan.
Definition: driver.h:1429
int * rates
rates - Array of supported rates in 100 kbps units
Definition: driver.h:169
int beacon_int
beacon_int - Beacon interval for IBSS or 0 to use driver default
Definition: driver.h:676
const u8 * mac_addr_mask
mac_addr_mask - MAC address mask used with randomization.
Definition: driver.h:433
const struct wpabuf * beacon_ies
beacon_ies - WPS/P2P IE(s) for Beacon frames
Definition: driver.h:1084
Definition: driver.h:1235
Definition: wpa_auth_i.h:152
int fixed_bssid
fixed_bssid - Whether to force this BSSID in IBSS mode 1 = Fix this BSSID and prevent merges...
Definition: driver.h:862
Definition: driver.h:4805
u8 access_network_type
access_network_type - Access Network Type (0..15)
Definition: driver.h:1149
size_t ie_len
ie_len - Length of ie buffer in octets
Definition: driver.h:4478
Definition: driver.h:1531
size_t ptk_kek_len
ptk_kek_len - The length of ptk_kek
Definition: driver.h:4415
int center_freq1
center_freq1 - Segment 0 center frequency in MHz
Definition: driver.h:605
int ht_enabled
ht_enabled - Whether HT is enabled
Definition: driver.h:584
int flag
flag - Channel flags (HOSTAPD_CHAN_*)
Definition: driver.h:106
int auth_alg
auth_alg - Allowed authentication algorithms Bit field of WPA_AUTH_ALG_*
Definition: driver.h:733
const u8 * bssid_hint
bssid_hint - BSSID of a proposed AP
Definition: driver.h:639
struct beacon_data - Beacon data : Head portion of Beacon frame (before TIM IE) : Tail portion of Bea...
Definition: driver.h:1735
struct freq_survey - Channel survey info
Definition: driver.h:4249
const u8 * ric_ies
Optional IE(s), e.g., WMM TSPEC(s), for RIC-Request.
Definition: driver.h:4570
filter_ssids - Filter for reporting SSIDs
Definition: driver.h:369
size_t tail_len
tail_len - Length of the tail buffer in octets
Definition: driver.h:984
const u8 * req_ies
req_ies - (Re)Association Request IEs
Definition: driver.h:4297
const u8 * resp_ies
resp_ies - (Re)Association Response IEs
Definition: driver.h:4615
int timed_out
timed_out - Whether failure is due to timeout (etc.) rather than explicit rejection response from the...
Definition: driver.h:4631
unsigned int freq
freq - Channel frequency in MHz
Definition: driver.h:4696
struct remain_on_channel - Data for EVENT_REMAIN_ON_CHANNEL events
Definition: driver.h:4692
struct hostapd_data - hostapd per-BSS data structure
Definition: hostapd.h:118
const u8 * ie
ie - IEs from the Probe Request body
Definition: driver.h:4757
Definition: driver.h:1559
int pbss
pbss - Whether to start a PCP (in PBSS) instead of an AP in infrastructure BSS.
Definition: driver.h:1195
u8 p2p_go_ctwindow
ctwindow - Client Traffic Window (in TUs)
Definition: driver.h:1161
const u8 * mac_addr
mac_addr - MAC address used with randomization.
Definition: driver.h:423
struct auth_info - Data for EVENT_AUTH events
Definition: driver.h:4585
const u8 * extra_ies
extra_ies - Extra IE(s) to add into Probe Request or NULL
Definition: driver.h:341
union wpa_event_data - Additional data for wpa_supplicant_event() calls
Definition: driver.h:4271
struct hostapd_channel_data * channels
channels - Array of supported channels
Definition: driver.h:159
int multicast_to_unicast
multicast_to_unicast - Whether to use multicast_to_unicast
Definition: driver.h:1216
const u8 * psk
psk - RSN PSK (alternative for passphrase for PSK)
Definition: driver.h:816
u32 max_sched_scan_plan_iterations
Maximum number of iterations in a single scan plan.
Definition: driver.h:1423
u16 status_code
status_code - Status Code from (Re)association Response
Definition: driver.h:4625
int privacy
privacy - Whether privacy is used in the BSS
Definition: driver.h:1076
struct rx_mgmt - Data for EVENT_RX_MGMT events
Definition: driver.h:4662
int * freqs
freqs - Array of frequencies to scan or NULL for all frequencies
Definition: driver.h:353