diff options
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index bb61f7718c4c..8c804550465b 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -68,6 +68,8 @@ struct ieee80211_local; | |||
68 | #define IEEE80211_DEFAULT_MAX_SP_LEN \ | 68 | #define IEEE80211_DEFAULT_MAX_SP_LEN \ |
69 | IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL | 69 | IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL |
70 | 70 | ||
71 | #define IEEE80211_DEAUTH_FRAME_LEN (24 /* hdr */ + 2 /* reason */) | ||
72 | |||
71 | struct ieee80211_fragment_entry { | 73 | struct ieee80211_fragment_entry { |
72 | unsigned long first_frag_time; | 74 | unsigned long first_frag_time; |
73 | unsigned int seq; | 75 | unsigned int seq; |
@@ -193,8 +195,6 @@ struct ieee80211_tx_data { | |||
193 | struct sta_info *sta; | 195 | struct sta_info *sta; |
194 | struct ieee80211_key *key; | 196 | struct ieee80211_key *key; |
195 | 197 | ||
196 | struct ieee80211_channel *channel; | ||
197 | |||
198 | unsigned int flags; | 198 | unsigned int flags; |
199 | }; | 199 | }; |
200 | 200 | ||
@@ -274,9 +274,15 @@ struct beacon_data { | |||
274 | struct rcu_head rcu_head; | 274 | struct rcu_head rcu_head; |
275 | }; | 275 | }; |
276 | 276 | ||
277 | struct probe_resp { | ||
278 | struct rcu_head rcu_head; | ||
279 | int len; | ||
280 | u8 data[0]; | ||
281 | }; | ||
282 | |||
277 | struct ieee80211_if_ap { | 283 | struct ieee80211_if_ap { |
278 | struct beacon_data __rcu *beacon; | 284 | struct beacon_data __rcu *beacon; |
279 | struct sk_buff __rcu *probe_resp; | 285 | struct probe_resp __rcu *probe_resp; |
280 | 286 | ||
281 | struct list_head vlans; | 287 | struct list_head vlans; |
282 | 288 | ||
@@ -359,6 +365,7 @@ enum ieee80211_sta_flags { | |||
359 | IEEE80211_STA_NULLFUNC_ACKED = BIT(8), | 365 | IEEE80211_STA_NULLFUNC_ACKED = BIT(8), |
360 | IEEE80211_STA_RESET_SIGNAL_AVE = BIT(9), | 366 | IEEE80211_STA_RESET_SIGNAL_AVE = BIT(9), |
361 | IEEE80211_STA_DISABLE_40MHZ = BIT(10), | 367 | IEEE80211_STA_DISABLE_40MHZ = BIT(10), |
368 | IEEE80211_STA_DISABLE_VHT = BIT(11), | ||
362 | }; | 369 | }; |
363 | 370 | ||
364 | struct ieee80211_mgd_auth_data { | 371 | struct ieee80211_mgd_auth_data { |
@@ -406,6 +413,7 @@ struct ieee80211_if_managed { | |||
406 | struct work_struct monitor_work; | 413 | struct work_struct monitor_work; |
407 | struct work_struct chswitch_work; | 414 | struct work_struct chswitch_work; |
408 | struct work_struct beacon_connection_loss_work; | 415 | struct work_struct beacon_connection_loss_work; |
416 | struct work_struct csa_connection_drop_work; | ||
409 | 417 | ||
410 | unsigned long beacon_timeout; | 418 | unsigned long beacon_timeout; |
411 | unsigned long probe_timeout; | 419 | unsigned long probe_timeout; |
@@ -965,7 +973,6 @@ struct ieee80211_local { | |||
965 | int scan_channel_idx; | 973 | int scan_channel_idx; |
966 | int scan_ies_len; | 974 | int scan_ies_len; |
967 | 975 | ||
968 | struct ieee80211_sched_scan_ies sched_scan_ies; | ||
969 | struct work_struct sched_scan_stopped_work; | 976 | struct work_struct sched_scan_stopped_work; |
970 | struct ieee80211_sub_if_data __rcu *sched_scan_sdata; | 977 | struct ieee80211_sub_if_data __rcu *sched_scan_sdata; |
971 | 978 | ||
@@ -1052,7 +1059,7 @@ struct ieee80211_local { | |||
1052 | bool disable_dynamic_ps; | 1059 | bool disable_dynamic_ps; |
1053 | 1060 | ||
1054 | int user_power_level; /* in dBm */ | 1061 | int user_power_level; /* in dBm */ |
1055 | int power_constr_level; /* in dBm */ | 1062 | int ap_power_level; /* in dBm */ |
1056 | 1063 | ||
1057 | enum ieee80211_smps_mode smps_mode; | 1064 | enum ieee80211_smps_mode smps_mode; |
1058 | 1065 | ||
@@ -1075,6 +1082,8 @@ struct ieee80211_local { | |||
1075 | struct idr ack_status_frames; | 1082 | struct idr ack_status_frames; |
1076 | spinlock_t ack_status_lock; | 1083 | spinlock_t ack_status_lock; |
1077 | 1084 | ||
1085 | struct ieee80211_sub_if_data __rcu *p2p_sdata; | ||
1086 | |||
1078 | /* dummy netdev for use w/ NAPI */ | 1087 | /* dummy netdev for use w/ NAPI */ |
1079 | struct net_device napi_dev; | 1088 | struct net_device napi_dev; |
1080 | 1089 | ||
@@ -1131,7 +1140,7 @@ struct ieee802_11_elems { | |||
1131 | u8 *prep; | 1140 | u8 *prep; |
1132 | u8 *perr; | 1141 | u8 *perr; |
1133 | struct ieee80211_rann_ie *rann; | 1142 | struct ieee80211_rann_ie *rann; |
1134 | u8 *ch_switch_elem; | 1143 | struct ieee80211_channel_sw_ie *ch_switch_ie; |
1135 | u8 *country_elem; | 1144 | u8 *country_elem; |
1136 | u8 *pwr_constr_elem; | 1145 | u8 *pwr_constr_elem; |
1137 | u8 *quiet_elem; /* first quite element */ | 1146 | u8 *quiet_elem; /* first quite element */ |
@@ -1157,9 +1166,7 @@ struct ieee802_11_elems { | |||
1157 | u8 preq_len; | 1166 | u8 preq_len; |
1158 | u8 prep_len; | 1167 | u8 prep_len; |
1159 | u8 perr_len; | 1168 | u8 perr_len; |
1160 | u8 ch_switch_elem_len; | ||
1161 | u8 country_elem_len; | 1169 | u8 country_elem_len; |
1162 | u8 pwr_constr_elem_len; | ||
1163 | u8 quiet_elem_len; | 1170 | u8 quiet_elem_len; |
1164 | u8 num_of_quiet_elem; /* can be more the one */ | 1171 | u8 num_of_quiet_elem; /* can be more the one */ |
1165 | u8 timeout_int_len; | 1172 | u8 timeout_int_len; |
@@ -1202,6 +1209,7 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1202 | void ieee80211_send_pspoll(struct ieee80211_local *local, | 1209 | void ieee80211_send_pspoll(struct ieee80211_local *local, |
1203 | struct ieee80211_sub_if_data *sdata); | 1210 | struct ieee80211_sub_if_data *sdata); |
1204 | void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency); | 1211 | void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency); |
1212 | void ieee80211_recalc_ps_vif(struct ieee80211_sub_if_data *sdata); | ||
1205 | int ieee80211_max_network_latency(struct notifier_block *nb, | 1213 | int ieee80211_max_network_latency(struct notifier_block *nb, |
1206 | unsigned long data, void *dummy); | 1214 | unsigned long data, void *dummy); |
1207 | int ieee80211_set_arp_filter(struct ieee80211_sub_if_data *sdata); | 1215 | int ieee80211_set_arp_filter(struct ieee80211_sub_if_data *sdata); |
@@ -1291,6 +1299,8 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local); | |||
1291 | void ieee80211_recalc_idle(struct ieee80211_local *local); | 1299 | void ieee80211_recalc_idle(struct ieee80211_local *local); |
1292 | void ieee80211_adjust_monitor_flags(struct ieee80211_sub_if_data *sdata, | 1300 | void ieee80211_adjust_monitor_flags(struct ieee80211_sub_if_data *sdata, |
1293 | const int offset); | 1301 | const int offset); |
1302 | int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up); | ||
1303 | void ieee80211_sdata_stop(struct ieee80211_sub_if_data *sdata); | ||
1294 | 1304 | ||
1295 | static inline bool ieee80211_sdata_running(struct ieee80211_sub_if_data *sdata) | 1305 | static inline bool ieee80211_sdata_running(struct ieee80211_sub_if_data *sdata) |
1296 | { | 1306 | { |
@@ -1358,7 +1368,6 @@ void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, | |||
1358 | int ieee80211_reconfig(struct ieee80211_local *local); | 1368 | int ieee80211_reconfig(struct ieee80211_local *local); |
1359 | void ieee80211_stop_device(struct ieee80211_local *local); | 1369 | void ieee80211_stop_device(struct ieee80211_local *local); |
1360 | 1370 | ||
1361 | #ifdef CONFIG_PM | ||
1362 | int __ieee80211_suspend(struct ieee80211_hw *hw, | 1371 | int __ieee80211_suspend(struct ieee80211_hw *hw, |
1363 | struct cfg80211_wowlan *wowlan); | 1372 | struct cfg80211_wowlan *wowlan); |
1364 | 1373 | ||
@@ -1372,18 +1381,6 @@ static inline int __ieee80211_resume(struct ieee80211_hw *hw) | |||
1372 | 1381 | ||
1373 | return ieee80211_reconfig(hw_to_local(hw)); | 1382 | return ieee80211_reconfig(hw_to_local(hw)); |
1374 | } | 1383 | } |
1375 | #else | ||
1376 | static inline int __ieee80211_suspend(struct ieee80211_hw *hw, | ||
1377 | struct cfg80211_wowlan *wowlan) | ||
1378 | { | ||
1379 | return 0; | ||
1380 | } | ||
1381 | |||
1382 | static inline int __ieee80211_resume(struct ieee80211_hw *hw) | ||
1383 | { | ||
1384 | return 0; | ||
1385 | } | ||
1386 | #endif | ||
1387 | 1384 | ||
1388 | /* utility functions/constants */ | 1385 | /* utility functions/constants */ |
1389 | extern void *mac80211_wiphy_privid; /* for wiphy privid */ | 1386 | extern void *mac80211_wiphy_privid; /* for wiphy privid */ |
@@ -1425,7 +1422,6 @@ void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, | |||
1425 | struct ieee80211_hdr *hdr); | 1422 | struct ieee80211_hdr *hdr); |
1426 | void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata, | 1423 | void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata, |
1427 | struct ieee80211_hdr *hdr, bool ack); | 1424 | struct ieee80211_hdr *hdr, bool ack); |
1428 | void ieee80211_beacon_connection_loss_work(struct work_struct *work); | ||
1429 | 1425 | ||
1430 | void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, | 1426 | void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, |
1431 | enum queue_stop_reason reason); | 1427 | enum queue_stop_reason reason); |
@@ -1451,19 +1447,24 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, | |||
1451 | u16 transaction, u16 auth_alg, | 1447 | u16 transaction, u16 auth_alg, |
1452 | u8 *extra, size_t extra_len, const u8 *bssid, | 1448 | u8 *extra, size_t extra_len, const u8 *bssid, |
1453 | const u8 *da, const u8 *key, u8 key_len, u8 key_idx); | 1449 | const u8 *da, const u8 *key, u8 key_len, u8 key_idx); |
1450 | void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, | ||
1451 | const u8 *bssid, u16 stype, u16 reason, | ||
1452 | bool send_frame, u8 *frame_buf); | ||
1454 | int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, | 1453 | int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, |
1455 | const u8 *ie, size_t ie_len, | 1454 | const u8 *ie, size_t ie_len, |
1456 | enum ieee80211_band band, u32 rate_mask, | 1455 | enum ieee80211_band band, u32 rate_mask, |
1457 | u8 channel); | 1456 | u8 channel); |
1458 | struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, | 1457 | struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, |
1459 | u8 *dst, u32 ratemask, | 1458 | u8 *dst, u32 ratemask, |
1459 | struct ieee80211_channel *chan, | ||
1460 | const u8 *ssid, size_t ssid_len, | 1460 | const u8 *ssid, size_t ssid_len, |
1461 | const u8 *ie, size_t ie_len, | 1461 | const u8 *ie, size_t ie_len, |
1462 | bool directed); | 1462 | bool directed); |
1463 | void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, | 1463 | void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, |
1464 | const u8 *ssid, size_t ssid_len, | 1464 | const u8 *ssid, size_t ssid_len, |
1465 | const u8 *ie, size_t ie_len, | 1465 | const u8 *ie, size_t ie_len, |
1466 | u32 ratemask, bool directed, bool no_cck); | 1466 | u32 ratemask, bool directed, bool no_cck, |
1467 | struct ieee80211_channel *channel); | ||
1467 | 1468 | ||
1468 | void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata, | 1469 | void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata, |
1469 | const size_t supp_rates_len, | 1470 | const size_t supp_rates_len, |
@@ -1487,9 +1488,11 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, | |||
1487 | u8 *ieee80211_ie_build_vht_cap(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap, | 1488 | u8 *ieee80211_ie_build_vht_cap(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap, |
1488 | u32 cap); | 1489 | u32 cap); |
1489 | int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, | 1490 | int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, |
1490 | struct sk_buff *skb, bool need_basic); | 1491 | struct sk_buff *skb, bool need_basic, |
1492 | enum ieee80211_band band); | ||
1491 | int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, | 1493 | int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, |
1492 | struct sk_buff *skb, bool need_basic); | 1494 | struct sk_buff *skb, bool need_basic, |
1495 | enum ieee80211_band band); | ||
1493 | 1496 | ||
1494 | /* channel management */ | 1497 | /* channel management */ |
1495 | enum ieee80211_chan_mode { | 1498 | enum ieee80211_chan_mode { |