hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/mac80211/ieee80211_i.h
....@@ -1,14 +1,11 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright 2002-2005, Instant802 Networks, Inc.
34 * Copyright 2005, Devicescape Software, Inc.
45 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
56 * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net>
67 * Copyright 2013-2015 Intel Mobile Communications GmbH
7
- * Copyright (C) 2018 Intel Corporation
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License version 2 as
11
- * published by the Free Software Foundation.
8
+ * Copyright (C) 2018-2020 Intel Corporation
129 */
1310
1411 #ifndef IEEE80211_I_H
....@@ -96,6 +93,8 @@
9693 size_t supp_rates_len;
9794 struct ieee80211_rate *beacon_rate;
9895
96
+ u32 vht_cap_info;
97
+
9998 /*
10099 * During association, we save an ERP value from a probe response so
101100 * that we can feed ERP info to the driver when handling the
....@@ -147,7 +146,6 @@
147146 #define TX_DROP ((__force ieee80211_tx_result) 1u)
148147 #define TX_QUEUED ((__force ieee80211_tx_result) 2u)
149148
150
-#define IEEE80211_TX_NO_SEQNO BIT(0)
151149 #define IEEE80211_TX_UNICAST BIT(1)
152150 #define IEEE80211_TX_PS_BUFFERED BIT(2)
153151
....@@ -201,7 +199,7 @@
201199 };
202200
203201 struct ieee80211_rx_data {
204
- struct napi_struct *napi;
202
+ struct list_head *list;
205203 struct sk_buff *skb;
206204 struct ieee80211_local *local;
207205 struct ieee80211_sub_if_data *sdata;
....@@ -250,16 +248,28 @@
250248 u8 *head, *tail;
251249 int head_len, tail_len;
252250 struct ieee80211_meshconf_ie *meshconf;
253
- u16 csa_counter_offsets[IEEE80211_MAX_CSA_COUNTERS_NUM];
254
- u8 csa_current_counter;
251
+ u16 cntdwn_counter_offsets[IEEE80211_MAX_CNTDWN_COUNTERS_NUM];
252
+ u8 cntdwn_current_counter;
255253 struct rcu_head rcu_head;
256254 };
257255
258256 struct probe_resp {
259257 struct rcu_head rcu_head;
260258 int len;
261
- u16 csa_counter_offsets[IEEE80211_MAX_CSA_COUNTERS_NUM];
262
- u8 data[0];
259
+ u16 cntdwn_counter_offsets[IEEE80211_MAX_CNTDWN_COUNTERS_NUM];
260
+ u8 data[];
261
+};
262
+
263
+struct fils_discovery_data {
264
+ struct rcu_head rcu_head;
265
+ int len;
266
+ u8 data[];
267
+};
268
+
269
+struct unsol_bcast_probe_resp_data {
270
+ struct rcu_head rcu_head;
271
+ int len;
272
+ u8 data[];
263273 };
264274
265275 struct ps_data {
....@@ -277,6 +287,8 @@
277287 struct ieee80211_if_ap {
278288 struct beacon_data __rcu *beacon;
279289 struct probe_resp __rcu *probe_resp;
290
+ struct fils_discovery_data __rcu *fils_discovery;
291
+ struct unsol_bcast_probe_resp_data __rcu *unsol_bcast_probe_resp;
280292
281293 /* to be used after channel switch. */
282294 struct cfg80211_beacon_data *next_beacon;
....@@ -284,10 +296,7 @@
284296
285297 struct ps_data ps;
286298 atomic_t num_mcast_sta; /* number of stations receiving multicast */
287
- enum ieee80211_smps_mode req_smps, /* requested smps mode */
288
- driver_smps_mode; /* smps mode request */
289299
290
- struct work_struct request_smps_work;
291300 bool multicast_to_unicast;
292301 };
293302
....@@ -365,7 +374,8 @@
365374
366375 u8 key[WLAN_KEY_LEN_WEP104];
367376 u8 key_len, key_idx;
368
- bool done;
377
+ bool done, waiting;
378
+ bool peer_confirmed;
369379 bool timeout_started;
370380
371381 u16 sae_trans, sae_status;
....@@ -444,8 +454,6 @@
444454
445455 u8 bssid[ETH_ALEN] __aligned(2);
446456
447
- u16 aid;
448
-
449457 bool powersave; /* powersave requested for this iface */
450458 bool broken_ap; /* AP is broken -- turn off powersave */
451459 bool have_beacon;
....@@ -488,6 +496,7 @@
488496 unsigned int uapsd_max_sp_len;
489497
490498 int wmm_last_param_set;
499
+ int mu_edca_last_param_set;
491500
492501 u8 use_4addr;
493502
....@@ -524,6 +533,8 @@
524533 struct ieee80211_ht_cap ht_capa_mask; /* Valid parts of ht_capa */
525534 struct ieee80211_vht_cap vht_capa; /* configured VHT overrides */
526535 struct ieee80211_vht_cap vht_capa_mask; /* Valid parts of vht_capa */
536
+ struct ieee80211_s1g_cap s1g_capa; /* configured S1G overrides */
537
+ struct ieee80211_s1g_cap s1g_capa_mask; /* valid s1g_capa bits */
527538
528539 /* TDLS support */
529540 u8 tdls_peer[ETH_ALEN] __aligned(2);
....@@ -543,6 +554,12 @@
543554 * get stuck in a downgraded situation and flush takes forever.
544555 */
545556 struct delayed_work tx_tspec_wk;
557
+
558
+ /* Information elements from the last transmitted (Re)Association
559
+ * Request frame.
560
+ */
561
+ u8 *assoc_req_ies;
562
+ size_t assoc_req_ies_len;
546563 };
547564
548565 struct ieee80211_if_ibss {
....@@ -627,6 +644,26 @@
627644 struct cfg80211_csa_settings settings;
628645 };
629646
647
+/**
648
+ * struct mesh_table
649
+ *
650
+ * @known_gates: list of known mesh gates and their mpaths by the station. The
651
+ * gate's mpath may or may not be resolved and active.
652
+ * @gates_lock: protects updates to known_gates
653
+ * @rhead: the rhashtable containing struct mesh_paths, keyed by dest addr
654
+ * @walk_head: linked list containing all mesh_path objects
655
+ * @walk_lock: lock protecting walk_head
656
+ * @entries: number of entries in the table
657
+ */
658
+struct mesh_table {
659
+ struct hlist_head known_gates;
660
+ spinlock_t gates_lock;
661
+ struct rhashtable rhead;
662
+ struct hlist_head walk_head;
663
+ spinlock_t walk_lock;
664
+ atomic_t entries; /* Up to MAX_MESH_NEIGHBOURS */
665
+};
666
+
630667 struct ieee80211_if_mesh {
631668 struct timer_list housekeeping_timer;
632669 struct timer_list mesh_path_timer;
....@@ -701,8 +738,8 @@
701738 /* offset from skb->data while building IE */
702739 int meshconf_offset;
703740
704
- struct mesh_table *mesh_paths;
705
- struct mesh_table *mpp_paths; /* Store paths for MPP&MAP */
741
+ struct mesh_table mesh_paths;
742
+ struct mesh_table mpp_paths; /* Store paths for MPP&MAP */
706743 int mesh_paths_generation;
707744 int mpp_paths_generation;
708745 };
....@@ -807,6 +844,7 @@
807844 IEEE80211_TXQ_STOP,
808845 IEEE80211_TXQ_AMPDU,
809846 IEEE80211_TXQ_NO_AMSDU,
847
+ IEEE80211_TXQ_STOP_NETIF_TX,
810848 };
811849
812850 /**
....@@ -817,6 +855,8 @@
817855 * a fq_flow which is already owned by a different tin
818856 * @def_cvars: codel vars for @def_flow
819857 * @frags: used to keep fragments created after dequeue
858
+ * @schedule_order: used with ieee80211_local->active_txqs
859
+ * @schedule_round: counter to prevent infinite loops on TXQ scheduling
820860 */
821861 struct txq_info {
822862 struct fq_tin tin;
....@@ -824,6 +864,8 @@
824864 struct codel_vars def_cvars;
825865 struct codel_stats cstats;
826866 struct sk_buff_head frags;
867
+ struct list_head schedule_order;
868
+ u16 schedule_round;
827869 unsigned long flags;
828870
829871 /* keep last! */
....@@ -881,14 +923,18 @@
881923 /* bit field of ACM bits (BIT(802.1D tag)) */
882924 u8 wmm_acm;
883925
884
- struct ieee80211_key __rcu *keys[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS];
926
+ struct ieee80211_key __rcu *keys[NUM_DEFAULT_KEYS +
927
+ NUM_DEFAULT_MGMT_KEYS +
928
+ NUM_DEFAULT_BEACON_KEYS];
885929 struct ieee80211_key __rcu *default_unicast_key;
886930 struct ieee80211_key __rcu *default_multicast_key;
887931 struct ieee80211_key __rcu *default_mgmt_key;
932
+ struct ieee80211_key __rcu *default_beacon_key;
888933
889934 u16 sequence_number;
890935 __be16 control_port_protocol;
891936 bool control_port_no_encrypt;
937
+ bool control_port_no_preauth;
892938 bool control_port_over_nl80211;
893939 int encrypt_headroom;
894940
....@@ -940,6 +986,10 @@
940986 bool rc_has_vht_mcs_mask[NUM_NL80211_BANDS];
941987 u16 rc_rateidx_vht_mcs_mask[NUM_NL80211_BANDS][NL80211_VHT_NSS_MAX];
942988
989
+ /* Beacon frame (non-MCS) rate (as a bitmap) */
990
+ u32 beacon_rateidx_mask[NUM_NL80211_BANDS];
991
+ bool beacon_rate_set;
992
+
943993 union {
944994 struct ieee80211_if_ap ap;
945995 struct ieee80211_if_wds wds;
....@@ -958,6 +1008,7 @@
9581008 struct dentry *default_unicast_key;
9591009 struct dentry *default_multicast_key;
9601010 struct dentry *default_mgmt_key;
1011
+ struct dentry *default_beacon_key;
9611012 } debugfs;
9621013 #endif
9631014
....@@ -1072,6 +1123,9 @@
10721123 * a scan complete for an aborted scan.
10731124 * @SCAN_HW_CANCELLED: Set for our scan work function when the scan is being
10741125 * cancelled.
1126
+ * @SCAN_BEACON_WAIT: Set whenever we're passive scanning because of radar/no-IR
1127
+ * and could send a probe request after receiving a beacon.
1128
+ * @SCAN_BEACON_DONE: Beacon received, we can now send a probe request
10751129 */
10761130 enum {
10771131 SCAN_SW_SCANNING,
....@@ -1080,6 +1134,8 @@
10801134 SCAN_COMPLETED,
10811135 SCAN_ABORTED,
10821136 SCAN_HW_CANCELLED,
1137
+ SCAN_BEACON_WAIT,
1138
+ SCAN_BEACON_DONE,
10831139 };
10841140
10851141 /**
....@@ -1114,6 +1170,17 @@
11141170 struct codel_vars *cvars;
11151171 struct codel_params cparams;
11161172
1173
+ /* protects active_txqs and txqi->schedule_order */
1174
+ spinlock_t active_txq_lock[IEEE80211_NUM_ACS];
1175
+ struct list_head active_txqs[IEEE80211_NUM_ACS];
1176
+ u16 schedule_round[IEEE80211_NUM_ACS];
1177
+
1178
+ u16 airtime_flags;
1179
+ u32 aql_txq_limit_low[IEEE80211_NUM_ACS];
1180
+ u32 aql_txq_limit_high[IEEE80211_NUM_ACS];
1181
+ u32 aql_threshold;
1182
+ atomic_t aql_total_pending_airtime;
1183
+
11171184 const struct ieee80211_ops *ops;
11181185
11191186 /*
....@@ -1132,7 +1199,8 @@
11321199 /* number of interfaces with corresponding FIF_ flags */
11331200 int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll,
11341201 fif_probe_req;
1135
- int probe_req_reg;
1202
+ bool probe_req_reg;
1203
+ bool rx_mcast_action_reg;
11361204 unsigned int filter_flags; /* FIF_* */
11371205
11381206 bool wiphy_ciphers_allocated;
....@@ -1186,6 +1254,9 @@
11861254 /* number of RX chains the hardware has */
11871255 u8 rx_chains;
11881256
1257
+ /* bitmap of which sbands were copied */
1258
+ u8 sband_allocated;
1259
+
11891260 int tx_headroom; /* required headroom for hardware/radiotap */
11901261
11911262 /* Tasklet and skb queue to process calls from IRQ mode. All frames
....@@ -1214,6 +1285,7 @@
12141285
12151286 struct sk_buff_head pending[IEEE80211_MAX_QUEUES];
12161287 struct tasklet_struct tx_pending_tasklet;
1288
+ struct tasklet_struct wake_txqs_tasklet;
12171289
12181290 atomic_t agg_queue_stop[IEEE80211_MAX_QUEUES];
12191291
....@@ -1222,8 +1294,8 @@
12221294
12231295 struct rate_control_ref *rate_ctrl;
12241296
1225
- struct crypto_cipher *wep_tx_tfm;
1226
- struct crypto_cipher *wep_rx_tfm;
1297
+ struct arc4_ctx wep_tx_ctx;
1298
+ struct arc4_ctx wep_rx_ctx;
12271299 u32 wep_iv;
12281300
12291301 /* see iface.c */
....@@ -1233,7 +1305,7 @@
12331305
12341306 /*
12351307 * Key mutex, protects sdata's key_list and sta_info's
1236
- * key pointers (write access, they're RCU.)
1308
+ * key pointers and ptk_idx (write access, they're RCU.)
12371309 */
12381310 struct mutex key_mtx;
12391311
....@@ -1319,7 +1391,6 @@
13191391 */
13201392
13211393 bool pspolling;
1322
- bool offchannel_ps_enabled;
13231394 /*
13241395 * PS can only be enabled when we have exactly one managed
13251396 * interface (and monitors) in PS, this then points there.
....@@ -1348,6 +1419,7 @@
13481419 struct dentry *rcdir;
13491420 struct dentry *keys;
13501421 } debugfs;
1422
+ bool force_tx_status;
13511423 #endif
13521424
13531425 /*
....@@ -1417,6 +1489,7 @@
14171489 u8 ttl;
14181490 u16 pre_value;
14191491 u16 reason_code;
1492
+ u32 max_switch_time;
14201493 };
14211494
14221495 /* Parsed Information Elements */
....@@ -1432,8 +1505,8 @@
14321505 const u8 *supp_rates;
14331506 const u8 *ds_params;
14341507 const struct ieee80211_tim_ie *tim;
1435
- const u8 *challenge;
14361508 const u8 *rsn;
1509
+ const u8 *rsnx;
14371510 const u8 *erp_info;
14381511 const u8 *ext_supp_rates;
14391512 const u8 *wmm_info;
....@@ -1445,7 +1518,9 @@
14451518 const struct ieee80211_meshconf_ie *mesh_config;
14461519 const u8 *he_cap;
14471520 const struct ieee80211_he_operation *he_operation;
1521
+ const struct ieee80211_he_spr *he_spr;
14481522 const struct ieee80211_mu_edca_param_set *mu_edca_param_set;
1523
+ const struct ieee80211_he_6ghz_capa *he_6ghz_capa;
14491524 const u8 *uora_element;
14501525 const u8 *mesh_id;
14511526 const u8 *peering;
....@@ -1457,6 +1532,7 @@
14571532 const struct ieee80211_channel_sw_ie *ch_switch_ie;
14581533 const struct ieee80211_ext_chansw_ie *ext_chansw_ie;
14591534 const struct ieee80211_wide_bw_chansw_ie *wide_bw_chansw_ie;
1535
+ const u8 *max_channel_switch_time;
14601536 const u8 *country_elem;
14611537 const u8 *pwr_constr_elem;
14621538 const u8 *cisco_dtpc_elem;
....@@ -1465,14 +1541,24 @@
14651541 const struct ieee80211_sec_chan_offs_ie *sec_chan_offs;
14661542 struct ieee80211_mesh_chansw_params_ie *mesh_chansw_params_ie;
14671543 const struct ieee80211_bss_max_idle_period_ie *max_idle_period_ie;
1544
+ const struct ieee80211_multiple_bssid_configuration *mbssid_config_ie;
1545
+ const struct ieee80211_bssid_index *bssid_index;
1546
+ u8 max_bssid_indicator;
1547
+ u8 dtim_count;
1548
+ u8 dtim_period;
1549
+ const struct ieee80211_addba_ext_ie *addba_ext_ie;
1550
+ const struct ieee80211_s1g_cap *s1g_capab;
1551
+ const struct ieee80211_s1g_oper_ie *s1g_oper;
1552
+ const struct ieee80211_s1g_bcn_compat_ie *s1g_bcn_compat;
1553
+ const struct ieee80211_aid_response_ie *aid_resp;
14681554
14691555 /* length of them, respectively */
14701556 u8 ext_capab_len;
14711557 u8 ssid_len;
14721558 u8 supp_rates_len;
14731559 u8 tim_len;
1474
- u8 challenge_len;
14751560 u8 rsn_len;
1561
+ u8 rsnx_len;
14761562 u8 ext_supp_rates_len;
14771563 u8 wmm_info_len;
14781564 u8 wmm_param_len;
....@@ -1483,6 +1569,9 @@
14831569 u8 prep_len;
14841570 u8 perr_len;
14851571 u8 country_elem_len;
1572
+ u8 bssid_index_len;
1573
+
1574
+ void *nontx_profile;
14861575
14871576 /* whether a parse error occurred while retrieving these elements */
14881577 bool parse_error;
....@@ -1581,6 +1670,8 @@
15811670 void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata);
15821671 void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
15831672 struct sk_buff *skb);
1673
+void ieee80211_sta_rx_queued_ext(struct ieee80211_sub_if_data *sdata,
1674
+ struct sk_buff *skb);
15841675 void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata);
15851676 void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata);
15861677 void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata);
....@@ -1642,7 +1733,6 @@
16421733 struct ieee80211_rx_status *rx_status,
16431734 struct ieee80211_mgmt *mgmt,
16441735 size_t len,
1645
- struct ieee802_11_elems *elems,
16461736 struct ieee80211_channel *channel);
16471737 void ieee80211_rx_bss_put(struct ieee80211_local *local,
16481738 struct ieee80211_bss *bss);
....@@ -1680,6 +1770,13 @@
16801770 struct cfg80211_csa_settings *params);
16811771
16821772 /* interface handling */
1773
+#define MAC80211_SUPPORTED_FEATURES_TX (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \
1774
+ NETIF_F_HW_CSUM | NETIF_F_SG | \
1775
+ NETIF_F_HIGHDMA | NETIF_F_GSO_SOFTWARE)
1776
+#define MAC80211_SUPPORTED_FEATURES_RX (NETIF_F_RXCSUM)
1777
+#define MAC80211_SUPPORTED_FEATURES (MAC80211_SUPPORTED_FEATURES_TX | \
1778
+ MAC80211_SUPPORTED_FEATURES_RX)
1779
+
16831780 int ieee80211_iface_init(void);
16841781 void ieee80211_iface_exit(void);
16851782 int ieee80211_if_add(struct ieee80211_local *local, const char *name,
....@@ -1702,6 +1799,7 @@
17021799 bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata);
17031800 void ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata,
17041801 bool update_bss);
1802
+void ieee80211_recalc_offload(struct ieee80211_local *local);
17051803
17061804 static inline bool ieee80211_sdata_running(struct ieee80211_sub_if_data *sdata)
17071805 {
....@@ -1715,10 +1813,13 @@
17151813 struct net_device *dev);
17161814 netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
17171815 struct net_device *dev);
1816
+netdev_tx_t ieee80211_subif_start_xmit_8023(struct sk_buff *skb,
1817
+ struct net_device *dev);
17181818 void __ieee80211_subif_start_xmit(struct sk_buff *skb,
17191819 struct net_device *dev,
17201820 u32 info_flags,
1721
- u32 ctrl_flags);
1821
+ u32 ctrl_flags,
1822
+ u64 *cookie);
17221823 void ieee80211_purge_tx_queue(struct ieee80211_hw *hw,
17231824 struct sk_buff_head *skbs);
17241825 struct sk_buff *
....@@ -1726,7 +1827,8 @@
17261827 struct sk_buff *skb, u32 info_flags);
17271828 void ieee80211_tx_monitor(struct ieee80211_local *local, struct sk_buff *skb,
17281829 struct ieee80211_supported_band *sband,
1729
- int retry_count, int shift, bool send_to_cooked);
1830
+ int retry_count, int shift, bool send_to_cooked,
1831
+ struct ieee80211_tx_status *status);
17301832
17311833 void ieee80211_check_fast_xmit(struct sta_info *sta);
17321834 void ieee80211_check_fast_xmit_all(struct ieee80211_local *local);
....@@ -1734,7 +1836,10 @@
17341836 void ieee80211_clear_fast_xmit(struct sta_info *sta);
17351837 int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
17361838 const u8 *buf, size_t len,
1737
- const u8 *dest, __be16 proto, bool unencrypted);
1839
+ const u8 *dest, __be16 proto, bool unencrypted,
1840
+ u64 *cookie);
1841
+int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,
1842
+ const u8 *buf, size_t len);
17381843
17391844 /* HT */
17401845 void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
....@@ -1761,7 +1866,8 @@
17611866 void ___ieee80211_start_rx_ba_session(struct sta_info *sta,
17621867 u8 dialog_token, u16 timeout,
17631868 u16 start_seq_num, u16 ba_policy, u16 tid,
1764
- u16 buf_size, bool tx, bool auto_seq);
1869
+ u16 buf_size, bool tx, bool auto_seq,
1870
+ const struct ieee80211_addba_ext_ie *addbaext);
17651871 void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta,
17661872 enum ieee80211_agg_stop_reason reason);
17671873 void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
....@@ -1825,7 +1931,18 @@
18251931 ieee80211_he_cap_ie_to_sta_he_cap(struct ieee80211_sub_if_data *sdata,
18261932 struct ieee80211_supported_band *sband,
18271933 const u8 *he_cap_ie, u8 he_cap_len,
1934
+ const struct ieee80211_he_6ghz_capa *he_6ghz_capa,
18281935 struct sta_info *sta);
1936
+void
1937
+ieee80211_he_spr_ie_to_bss_conf(struct ieee80211_vif *vif,
1938
+ const struct ieee80211_he_spr *he_spr_ie_elem);
1939
+
1940
+void
1941
+ieee80211_he_op_ie_to_bss_conf(struct ieee80211_vif *vif,
1942
+ const struct ieee80211_he_operation *he_op_ie_elem);
1943
+
1944
+/* S1G */
1945
+void ieee80211_s1g_sta_rate_init(struct sta_info *sta);
18291946
18301947 /* Spectrum management */
18311948 void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
....@@ -1836,6 +1953,7 @@
18361953 * @sdata: the sdata of the interface which has received the frame
18371954 * @elems: parsed 802.11 elements received with the frame
18381955 * @current_band: indicates the current band
1956
+ * @vht_cap_info: VHT capabilities of the transmitter
18391957 * @sta_flags: contains information about own capabilities and restrictions
18401958 * to decide which channel switch announcements can be accepted. Only the
18411959 * following subset of &enum ieee80211_sta_flags are evaluated:
....@@ -1850,6 +1968,7 @@
18501968 int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
18511969 struct ieee802_11_elems *elems,
18521970 enum nl80211_band current_band,
1971
+ u32 vht_cap_info,
18531972 u32 sta_flags, u8 *bssid,
18541973 struct ieee80211_csa_ie *csa_ie);
18551974
....@@ -1883,20 +2002,24 @@
18832002 void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata,
18842003 bool bss_notify, bool enable_qos);
18852004 void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
1886
- struct sta_info *sta, struct sk_buff *skb,
1887
- u32 txdata_flags);
2005
+ struct sta_info *sta, struct sk_buff *skb);
18882006
18892007 void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
18902008 struct sk_buff *skb, int tid,
1891
- enum nl80211_band band, u32 txdata_flags);
2009
+ enum nl80211_band band);
2010
+
2011
+/* sta_out needs to be checked for ERR_PTR() before using */
2012
+int ieee80211_lookup_ra_sta(struct ieee80211_sub_if_data *sdata,
2013
+ struct sk_buff *skb,
2014
+ struct sta_info **sta_out);
18922015
18932016 static inline void
18942017 ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
18952018 struct sk_buff *skb, int tid,
1896
- enum nl80211_band band, u32 txdata_flags)
2019
+ enum nl80211_band band)
18972020 {
18982021 rcu_read_lock();
1899
- __ieee80211_tx_skb_tid_band(sdata, skb, tid, band, txdata_flags);
2022
+ __ieee80211_tx_skb_tid_band(sdata, skb, tid, band);
19002023 rcu_read_unlock();
19012024 }
19022025
....@@ -1914,7 +2037,7 @@
19142037 }
19152038
19162039 __ieee80211_tx_skb_tid_band(sdata, skb, tid,
1917
- chanctx_conf->def.chan->band, 0);
2040
+ chanctx_conf->def.chan->band);
19182041 rcu_read_unlock();
19192042 }
19202043
....@@ -1927,12 +2050,16 @@
19272050
19282051 u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
19292052 struct ieee802_11_elems *elems,
1930
- u64 filter, u32 crc);
2053
+ u64 filter, u32 crc, u8 *transmitter_bssid,
2054
+ u8 *bss_bssid);
19312055 static inline void ieee802_11_parse_elems(const u8 *start, size_t len,
19322056 bool action,
1933
- struct ieee802_11_elems *elems)
2057
+ struct ieee802_11_elems *elems,
2058
+ u8 *transmitter_bssid,
2059
+ u8 *bss_bssid)
19342060 {
1935
- ieee802_11_parse_elems_crc(start, len, action, elems, 0, 0);
2061
+ ieee802_11_parse_elems_crc(start, len, action, elems, 0, 0,
2062
+ transmitter_bssid, bss_bssid);
19362063 }
19372064
19382065
....@@ -1949,8 +2076,8 @@
19492076 void ieee80211_send_nullfunc(struct ieee80211_local *local,
19502077 struct ieee80211_sub_if_data *sdata,
19512078 bool powersave);
1952
-void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,
1953
- struct ieee80211_hdr *hdr);
2079
+void ieee80211_send_4addr_nullfunc(struct ieee80211_local *local,
2080
+ struct ieee80211_sub_if_data *sdata);
19542081 void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
19552082 struct ieee80211_hdr *hdr, bool ack, u16 tx_time);
19562083
....@@ -2034,13 +2161,15 @@
20342161 struct ieee80211_sub_if_data *sdata);
20352162 void ieee80211_fill_txq_stats(struct cfg80211_txq_stats *txqstats,
20362163 struct txq_info *txqi);
2164
+void ieee80211_wake_txqs(unsigned long data);
20372165 void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
20382166 u16 transaction, u16 auth_alg, u16 status,
20392167 const u8 *extra, size_t extra_len, const u8 *bssid,
20402168 const u8 *da, const u8 *key, u8 key_len, u8 key_idx,
20412169 u32 tx_flags);
20422170 void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
2043
- const u8 *bssid, u16 stype, u16 reason,
2171
+ const u8 *da, const u8 *bssid,
2172
+ u16 stype, u16 reason,
20442173 bool send_frame, u8 *frame_buf);
20452174
20462175 enum {
....@@ -2049,7 +2178,7 @@
20492178 IEEE80211_PROBE_FLAG_RANDOM_SN = BIT(2),
20502179 };
20512180
2052
-int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
2181
+int ieee80211_build_preq_ies(struct ieee80211_sub_if_data *sdata, u8 *buffer,
20532182 size_t buffer_len,
20542183 struct ieee80211_scan_ies *ie_desc,
20552184 const u8 *ie, size_t ie_len,
....@@ -2068,8 +2197,6 @@
20682197 enum nl80211_band band, u32 *basic_rates);
20692198 int __ieee80211_request_smps_mgd(struct ieee80211_sub_if_data *sdata,
20702199 enum ieee80211_smps_mode smps_mode);
2071
-int __ieee80211_request_smps_ap(struct ieee80211_sub_if_data *sdata,
2072
- enum ieee80211_smps_mode smps_mode);
20732200 void ieee80211_recalc_smps(struct ieee80211_sub_if_data *sdata);
20742201 void ieee80211_recalc_min_chandef(struct ieee80211_sub_if_data *sdata);
20752202
....@@ -2085,9 +2212,13 @@
20852212 u32 cap);
20862213 u8 *ieee80211_ie_build_vht_oper(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap,
20872214 const struct cfg80211_chan_def *chandef);
2215
+u8 ieee80211_ie_len_he_cap(struct ieee80211_sub_if_data *sdata, u8 iftype);
20882216 u8 *ieee80211_ie_build_he_cap(u8 *pos,
20892217 const struct ieee80211_sta_he_cap *he_cap,
20902218 u8 *end);
2219
+void ieee80211_ie_build_he_6ghz_cap(struct ieee80211_sub_if_data *sdata,
2220
+ struct sk_buff *skb);
2221
+u8 *ieee80211_ie_build_he_oper(u8 *pos, struct cfg80211_chan_def *chandef);
20912222 int ieee80211_parse_bitrates(struct cfg80211_chan_def *chandef,
20922223 const struct ieee80211_supported_band *sband,
20932224 const u8 *srates, int srates_len, u32 *rates);
....@@ -2098,11 +2229,23 @@
20982229 struct sk_buff *skb, bool need_basic,
20992230 enum nl80211_band band);
21002231 u8 *ieee80211_add_wmm_info_ie(u8 *buf, u8 qosinfo);
2232
+void ieee80211_add_s1g_capab_ie(struct ieee80211_sub_if_data *sdata,
2233
+ struct ieee80211_sta_s1g_cap *caps,
2234
+ struct sk_buff *skb);
2235
+void ieee80211_add_aid_request_ie(struct ieee80211_sub_if_data *sdata,
2236
+ struct sk_buff *skb);
21012237
21022238 /* channel management */
21032239 bool ieee80211_chandef_ht_oper(const struct ieee80211_ht_operation *ht_oper,
21042240 struct cfg80211_chan_def *chandef);
2105
-bool ieee80211_chandef_vht_oper(const struct ieee80211_vht_operation *oper,
2241
+bool ieee80211_chandef_vht_oper(struct ieee80211_hw *hw, u32 vht_cap_info,
2242
+ const struct ieee80211_vht_operation *oper,
2243
+ const struct ieee80211_ht_operation *htop,
2244
+ struct cfg80211_chan_def *chandef);
2245
+bool ieee80211_chandef_he_6ghz_oper(struct ieee80211_sub_if_data *sdata,
2246
+ const struct ieee80211_he_operation *he_oper,
2247
+ struct cfg80211_chan_def *chandef);
2248
+bool ieee80211_chandef_s1g_oper(const struct ieee80211_s1g_oper_ie *oper,
21062249 struct cfg80211_chan_def *chandef);
21072250 u32 ieee80211_chandef_downgrade(struct cfg80211_chan_def *c);
21082251
....@@ -2182,9 +2325,16 @@
21822325 void ieee80211_tdls_handle_disconnect(struct ieee80211_sub_if_data *sdata,
21832326 const u8 *peer, u16 reason);
21842327 const char *ieee80211_get_reason_code_string(u16 reason_code);
2328
+u16 ieee80211_encode_usf(int val);
2329
+u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
2330
+ enum nl80211_iftype type);
21852331
21862332 extern const struct ethtool_ops ieee80211_ethtool_ops;
21872333
2334
+u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw,
2335
+ struct ieee80211_vif *vif,
2336
+ struct ieee80211_sta *pubsta,
2337
+ int len, bool ampdu);
21882338 #ifdef CONFIG_MAC80211_NOINLINE
21892339 #define debug_noinline noinline
21902340 #else