forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
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 {
....@@ -807,6 +824,7 @@
807824 IEEE80211_TXQ_STOP,
808825 IEEE80211_TXQ_AMPDU,
809826 IEEE80211_TXQ_NO_AMSDU,
827
+ IEEE80211_TXQ_STOP_NETIF_TX,
810828 };
811829
812830 /**
....@@ -817,6 +835,8 @@
817835 * a fq_flow which is already owned by a different tin
818836 * @def_cvars: codel vars for @def_flow
819837 * @frags: used to keep fragments created after dequeue
838
+ * @schedule_order: used with ieee80211_local->active_txqs
839
+ * @schedule_round: counter to prevent infinite loops on TXQ scheduling
820840 */
821841 struct txq_info {
822842 struct fq_tin tin;
....@@ -824,6 +844,8 @@
824844 struct codel_vars def_cvars;
825845 struct codel_stats cstats;
826846 struct sk_buff_head frags;
847
+ struct list_head schedule_order;
848
+ u16 schedule_round;
827849 unsigned long flags;
828850
829851 /* keep last! */
....@@ -881,14 +903,18 @@
881903 /* bit field of ACM bits (BIT(802.1D tag)) */
882904 u8 wmm_acm;
883905
884
- struct ieee80211_key __rcu *keys[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS];
906
+ struct ieee80211_key __rcu *keys[NUM_DEFAULT_KEYS +
907
+ NUM_DEFAULT_MGMT_KEYS +
908
+ NUM_DEFAULT_BEACON_KEYS];
885909 struct ieee80211_key __rcu *default_unicast_key;
886910 struct ieee80211_key __rcu *default_multicast_key;
887911 struct ieee80211_key __rcu *default_mgmt_key;
912
+ struct ieee80211_key __rcu *default_beacon_key;
888913
889914 u16 sequence_number;
890915 __be16 control_port_protocol;
891916 bool control_port_no_encrypt;
917
+ bool control_port_no_preauth;
892918 bool control_port_over_nl80211;
893919 int encrypt_headroom;
894920
....@@ -940,6 +966,10 @@
940966 bool rc_has_vht_mcs_mask[NUM_NL80211_BANDS];
941967 u16 rc_rateidx_vht_mcs_mask[NUM_NL80211_BANDS][NL80211_VHT_NSS_MAX];
942968
969
+ /* Beacon frame (non-MCS) rate (as a bitmap) */
970
+ u32 beacon_rateidx_mask[NUM_NL80211_BANDS];
971
+ bool beacon_rate_set;
972
+
943973 union {
944974 struct ieee80211_if_ap ap;
945975 struct ieee80211_if_wds wds;
....@@ -958,6 +988,7 @@
958988 struct dentry *default_unicast_key;
959989 struct dentry *default_multicast_key;
960990 struct dentry *default_mgmt_key;
991
+ struct dentry *default_beacon_key;
961992 } debugfs;
962993 #endif
963994
....@@ -1072,6 +1103,9 @@
10721103 * a scan complete for an aborted scan.
10731104 * @SCAN_HW_CANCELLED: Set for our scan work function when the scan is being
10741105 * cancelled.
1106
+ * @SCAN_BEACON_WAIT: Set whenever we're passive scanning because of radar/no-IR
1107
+ * and could send a probe request after receiving a beacon.
1108
+ * @SCAN_BEACON_DONE: Beacon received, we can now send a probe request
10751109 */
10761110 enum {
10771111 SCAN_SW_SCANNING,
....@@ -1080,6 +1114,8 @@
10801114 SCAN_COMPLETED,
10811115 SCAN_ABORTED,
10821116 SCAN_HW_CANCELLED,
1117
+ SCAN_BEACON_WAIT,
1118
+ SCAN_BEACON_DONE,
10831119 };
10841120
10851121 /**
....@@ -1114,6 +1150,17 @@
11141150 struct codel_vars *cvars;
11151151 struct codel_params cparams;
11161152
1153
+ /* protects active_txqs and txqi->schedule_order */
1154
+ spinlock_t active_txq_lock[IEEE80211_NUM_ACS];
1155
+ struct list_head active_txqs[IEEE80211_NUM_ACS];
1156
+ u16 schedule_round[IEEE80211_NUM_ACS];
1157
+
1158
+ u16 airtime_flags;
1159
+ u32 aql_txq_limit_low[IEEE80211_NUM_ACS];
1160
+ u32 aql_txq_limit_high[IEEE80211_NUM_ACS];
1161
+ u32 aql_threshold;
1162
+ atomic_t aql_total_pending_airtime;
1163
+
11171164 const struct ieee80211_ops *ops;
11181165
11191166 /*
....@@ -1132,7 +1179,8 @@
11321179 /* number of interfaces with corresponding FIF_ flags */
11331180 int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll,
11341181 fif_probe_req;
1135
- int probe_req_reg;
1182
+ bool probe_req_reg;
1183
+ bool rx_mcast_action_reg;
11361184 unsigned int filter_flags; /* FIF_* */
11371185
11381186 bool wiphy_ciphers_allocated;
....@@ -1186,6 +1234,9 @@
11861234 /* number of RX chains the hardware has */
11871235 u8 rx_chains;
11881236
1237
+ /* bitmap of which sbands were copied */
1238
+ u8 sband_allocated;
1239
+
11891240 int tx_headroom; /* required headroom for hardware/radiotap */
11901241
11911242 /* Tasklet and skb queue to process calls from IRQ mode. All frames
....@@ -1214,6 +1265,7 @@
12141265
12151266 struct sk_buff_head pending[IEEE80211_MAX_QUEUES];
12161267 struct tasklet_struct tx_pending_tasklet;
1268
+ struct tasklet_struct wake_txqs_tasklet;
12171269
12181270 atomic_t agg_queue_stop[IEEE80211_MAX_QUEUES];
12191271
....@@ -1222,8 +1274,8 @@
12221274
12231275 struct rate_control_ref *rate_ctrl;
12241276
1225
- struct crypto_cipher *wep_tx_tfm;
1226
- struct crypto_cipher *wep_rx_tfm;
1277
+ struct arc4_ctx wep_tx_ctx;
1278
+ struct arc4_ctx wep_rx_ctx;
12271279 u32 wep_iv;
12281280
12291281 /* see iface.c */
....@@ -1233,7 +1285,7 @@
12331285
12341286 /*
12351287 * Key mutex, protects sdata's key_list and sta_info's
1236
- * key pointers (write access, they're RCU.)
1288
+ * key pointers and ptk_idx (write access, they're RCU.)
12371289 */
12381290 struct mutex key_mtx;
12391291
....@@ -1319,7 +1371,6 @@
13191371 */
13201372
13211373 bool pspolling;
1322
- bool offchannel_ps_enabled;
13231374 /*
13241375 * PS can only be enabled when we have exactly one managed
13251376 * interface (and monitors) in PS, this then points there.
....@@ -1348,6 +1399,7 @@
13481399 struct dentry *rcdir;
13491400 struct dentry *keys;
13501401 } debugfs;
1402
+ bool force_tx_status;
13511403 #endif
13521404
13531405 /*
....@@ -1417,6 +1469,7 @@
14171469 u8 ttl;
14181470 u16 pre_value;
14191471 u16 reason_code;
1472
+ u32 max_switch_time;
14201473 };
14211474
14221475 /* Parsed Information Elements */
....@@ -1432,8 +1485,8 @@
14321485 const u8 *supp_rates;
14331486 const u8 *ds_params;
14341487 const struct ieee80211_tim_ie *tim;
1435
- const u8 *challenge;
14361488 const u8 *rsn;
1489
+ const u8 *rsnx;
14371490 const u8 *erp_info;
14381491 const u8 *ext_supp_rates;
14391492 const u8 *wmm_info;
....@@ -1445,7 +1498,9 @@
14451498 const struct ieee80211_meshconf_ie *mesh_config;
14461499 const u8 *he_cap;
14471500 const struct ieee80211_he_operation *he_operation;
1501
+ const struct ieee80211_he_spr *he_spr;
14481502 const struct ieee80211_mu_edca_param_set *mu_edca_param_set;
1503
+ const struct ieee80211_he_6ghz_capa *he_6ghz_capa;
14491504 const u8 *uora_element;
14501505 const u8 *mesh_id;
14511506 const u8 *peering;
....@@ -1457,6 +1512,7 @@
14571512 const struct ieee80211_channel_sw_ie *ch_switch_ie;
14581513 const struct ieee80211_ext_chansw_ie *ext_chansw_ie;
14591514 const struct ieee80211_wide_bw_chansw_ie *wide_bw_chansw_ie;
1515
+ const u8 *max_channel_switch_time;
14601516 const u8 *country_elem;
14611517 const u8 *pwr_constr_elem;
14621518 const u8 *cisco_dtpc_elem;
....@@ -1465,14 +1521,24 @@
14651521 const struct ieee80211_sec_chan_offs_ie *sec_chan_offs;
14661522 struct ieee80211_mesh_chansw_params_ie *mesh_chansw_params_ie;
14671523 const struct ieee80211_bss_max_idle_period_ie *max_idle_period_ie;
1524
+ const struct ieee80211_multiple_bssid_configuration *mbssid_config_ie;
1525
+ const struct ieee80211_bssid_index *bssid_index;
1526
+ u8 max_bssid_indicator;
1527
+ u8 dtim_count;
1528
+ u8 dtim_period;
1529
+ const struct ieee80211_addba_ext_ie *addba_ext_ie;
1530
+ const struct ieee80211_s1g_cap *s1g_capab;
1531
+ const struct ieee80211_s1g_oper_ie *s1g_oper;
1532
+ const struct ieee80211_s1g_bcn_compat_ie *s1g_bcn_compat;
1533
+ const struct ieee80211_aid_response_ie *aid_resp;
14681534
14691535 /* length of them, respectively */
14701536 u8 ext_capab_len;
14711537 u8 ssid_len;
14721538 u8 supp_rates_len;
14731539 u8 tim_len;
1474
- u8 challenge_len;
14751540 u8 rsn_len;
1541
+ u8 rsnx_len;
14761542 u8 ext_supp_rates_len;
14771543 u8 wmm_info_len;
14781544 u8 wmm_param_len;
....@@ -1483,6 +1549,9 @@
14831549 u8 prep_len;
14841550 u8 perr_len;
14851551 u8 country_elem_len;
1552
+ u8 bssid_index_len;
1553
+
1554
+ void *nontx_profile;
14861555
14871556 /* whether a parse error occurred while retrieving these elements */
14881557 bool parse_error;
....@@ -1581,6 +1650,8 @@
15811650 void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata);
15821651 void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
15831652 struct sk_buff *skb);
1653
+void ieee80211_sta_rx_queued_ext(struct ieee80211_sub_if_data *sdata,
1654
+ struct sk_buff *skb);
15841655 void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata);
15851656 void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata);
15861657 void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata);
....@@ -1642,7 +1713,6 @@
16421713 struct ieee80211_rx_status *rx_status,
16431714 struct ieee80211_mgmt *mgmt,
16441715 size_t len,
1645
- struct ieee802_11_elems *elems,
16461716 struct ieee80211_channel *channel);
16471717 void ieee80211_rx_bss_put(struct ieee80211_local *local,
16481718 struct ieee80211_bss *bss);
....@@ -1680,6 +1750,13 @@
16801750 struct cfg80211_csa_settings *params);
16811751
16821752 /* interface handling */
1753
+#define MAC80211_SUPPORTED_FEATURES_TX (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \
1754
+ NETIF_F_HW_CSUM | NETIF_F_SG | \
1755
+ NETIF_F_HIGHDMA | NETIF_F_GSO_SOFTWARE)
1756
+#define MAC80211_SUPPORTED_FEATURES_RX (NETIF_F_RXCSUM)
1757
+#define MAC80211_SUPPORTED_FEATURES (MAC80211_SUPPORTED_FEATURES_TX | \
1758
+ MAC80211_SUPPORTED_FEATURES_RX)
1759
+
16831760 int ieee80211_iface_init(void);
16841761 void ieee80211_iface_exit(void);
16851762 int ieee80211_if_add(struct ieee80211_local *local, const char *name,
....@@ -1702,6 +1779,7 @@
17021779 bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata);
17031780 void ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata,
17041781 bool update_bss);
1782
+void ieee80211_recalc_offload(struct ieee80211_local *local);
17051783
17061784 static inline bool ieee80211_sdata_running(struct ieee80211_sub_if_data *sdata)
17071785 {
....@@ -1715,10 +1793,13 @@
17151793 struct net_device *dev);
17161794 netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
17171795 struct net_device *dev);
1796
+netdev_tx_t ieee80211_subif_start_xmit_8023(struct sk_buff *skb,
1797
+ struct net_device *dev);
17181798 void __ieee80211_subif_start_xmit(struct sk_buff *skb,
17191799 struct net_device *dev,
17201800 u32 info_flags,
1721
- u32 ctrl_flags);
1801
+ u32 ctrl_flags,
1802
+ u64 *cookie);
17221803 void ieee80211_purge_tx_queue(struct ieee80211_hw *hw,
17231804 struct sk_buff_head *skbs);
17241805 struct sk_buff *
....@@ -1726,7 +1807,8 @@
17261807 struct sk_buff *skb, u32 info_flags);
17271808 void ieee80211_tx_monitor(struct ieee80211_local *local, struct sk_buff *skb,
17281809 struct ieee80211_supported_band *sband,
1729
- int retry_count, int shift, bool send_to_cooked);
1810
+ int retry_count, int shift, bool send_to_cooked,
1811
+ struct ieee80211_tx_status *status);
17301812
17311813 void ieee80211_check_fast_xmit(struct sta_info *sta);
17321814 void ieee80211_check_fast_xmit_all(struct ieee80211_local *local);
....@@ -1734,7 +1816,10 @@
17341816 void ieee80211_clear_fast_xmit(struct sta_info *sta);
17351817 int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
17361818 const u8 *buf, size_t len,
1737
- const u8 *dest, __be16 proto, bool unencrypted);
1819
+ const u8 *dest, __be16 proto, bool unencrypted,
1820
+ u64 *cookie);
1821
+int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,
1822
+ const u8 *buf, size_t len);
17381823
17391824 /* HT */
17401825 void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
....@@ -1761,7 +1846,8 @@
17611846 void ___ieee80211_start_rx_ba_session(struct sta_info *sta,
17621847 u8 dialog_token, u16 timeout,
17631848 u16 start_seq_num, u16 ba_policy, u16 tid,
1764
- u16 buf_size, bool tx, bool auto_seq);
1849
+ u16 buf_size, bool tx, bool auto_seq,
1850
+ const struct ieee80211_addba_ext_ie *addbaext);
17651851 void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta,
17661852 enum ieee80211_agg_stop_reason reason);
17671853 void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
....@@ -1825,7 +1911,18 @@
18251911 ieee80211_he_cap_ie_to_sta_he_cap(struct ieee80211_sub_if_data *sdata,
18261912 struct ieee80211_supported_band *sband,
18271913 const u8 *he_cap_ie, u8 he_cap_len,
1914
+ const struct ieee80211_he_6ghz_capa *he_6ghz_capa,
18281915 struct sta_info *sta);
1916
+void
1917
+ieee80211_he_spr_ie_to_bss_conf(struct ieee80211_vif *vif,
1918
+ const struct ieee80211_he_spr *he_spr_ie_elem);
1919
+
1920
+void
1921
+ieee80211_he_op_ie_to_bss_conf(struct ieee80211_vif *vif,
1922
+ const struct ieee80211_he_operation *he_op_ie_elem);
1923
+
1924
+/* S1G */
1925
+void ieee80211_s1g_sta_rate_init(struct sta_info *sta);
18291926
18301927 /* Spectrum management */
18311928 void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
....@@ -1836,6 +1933,7 @@
18361933 * @sdata: the sdata of the interface which has received the frame
18371934 * @elems: parsed 802.11 elements received with the frame
18381935 * @current_band: indicates the current band
1936
+ * @vht_cap_info: VHT capabilities of the transmitter
18391937 * @sta_flags: contains information about own capabilities and restrictions
18401938 * to decide which channel switch announcements can be accepted. Only the
18411939 * following subset of &enum ieee80211_sta_flags are evaluated:
....@@ -1850,6 +1948,7 @@
18501948 int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
18511949 struct ieee802_11_elems *elems,
18521950 enum nl80211_band current_band,
1951
+ u32 vht_cap_info,
18531952 u32 sta_flags, u8 *bssid,
18541953 struct ieee80211_csa_ie *csa_ie);
18551954
....@@ -1883,20 +1982,24 @@
18831982 void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata,
18841983 bool bss_notify, bool enable_qos);
18851984 void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
1886
- struct sta_info *sta, struct sk_buff *skb,
1887
- u32 txdata_flags);
1985
+ struct sta_info *sta, struct sk_buff *skb);
18881986
18891987 void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
18901988 struct sk_buff *skb, int tid,
1891
- enum nl80211_band band, u32 txdata_flags);
1989
+ enum nl80211_band band);
1990
+
1991
+/* sta_out needs to be checked for ERR_PTR() before using */
1992
+int ieee80211_lookup_ra_sta(struct ieee80211_sub_if_data *sdata,
1993
+ struct sk_buff *skb,
1994
+ struct sta_info **sta_out);
18921995
18931996 static inline void
18941997 ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
18951998 struct sk_buff *skb, int tid,
1896
- enum nl80211_band band, u32 txdata_flags)
1999
+ enum nl80211_band band)
18972000 {
18982001 rcu_read_lock();
1899
- __ieee80211_tx_skb_tid_band(sdata, skb, tid, band, txdata_flags);
2002
+ __ieee80211_tx_skb_tid_band(sdata, skb, tid, band);
19002003 rcu_read_unlock();
19012004 }
19022005
....@@ -1914,7 +2017,7 @@
19142017 }
19152018
19162019 __ieee80211_tx_skb_tid_band(sdata, skb, tid,
1917
- chanctx_conf->def.chan->band, 0);
2020
+ chanctx_conf->def.chan->band);
19182021 rcu_read_unlock();
19192022 }
19202023
....@@ -1927,12 +2030,16 @@
19272030
19282031 u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
19292032 struct ieee802_11_elems *elems,
1930
- u64 filter, u32 crc);
2033
+ u64 filter, u32 crc, u8 *transmitter_bssid,
2034
+ u8 *bss_bssid);
19312035 static inline void ieee802_11_parse_elems(const u8 *start, size_t len,
19322036 bool action,
1933
- struct ieee802_11_elems *elems)
2037
+ struct ieee802_11_elems *elems,
2038
+ u8 *transmitter_bssid,
2039
+ u8 *bss_bssid)
19342040 {
1935
- ieee802_11_parse_elems_crc(start, len, action, elems, 0, 0);
2041
+ ieee802_11_parse_elems_crc(start, len, action, elems, 0, 0,
2042
+ transmitter_bssid, bss_bssid);
19362043 }
19372044
19382045
....@@ -1949,8 +2056,8 @@
19492056 void ieee80211_send_nullfunc(struct ieee80211_local *local,
19502057 struct ieee80211_sub_if_data *sdata,
19512058 bool powersave);
1952
-void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,
1953
- struct ieee80211_hdr *hdr);
2059
+void ieee80211_send_4addr_nullfunc(struct ieee80211_local *local,
2060
+ struct ieee80211_sub_if_data *sdata);
19542061 void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
19552062 struct ieee80211_hdr *hdr, bool ack, u16 tx_time);
19562063
....@@ -2034,13 +2141,15 @@
20342141 struct ieee80211_sub_if_data *sdata);
20352142 void ieee80211_fill_txq_stats(struct cfg80211_txq_stats *txqstats,
20362143 struct txq_info *txqi);
2144
+void ieee80211_wake_txqs(unsigned long data);
20372145 void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
20382146 u16 transaction, u16 auth_alg, u16 status,
20392147 const u8 *extra, size_t extra_len, const u8 *bssid,
20402148 const u8 *da, const u8 *key, u8 key_len, u8 key_idx,
20412149 u32 tx_flags);
20422150 void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
2043
- const u8 *bssid, u16 stype, u16 reason,
2151
+ const u8 *da, const u8 *bssid,
2152
+ u16 stype, u16 reason,
20442153 bool send_frame, u8 *frame_buf);
20452154
20462155 enum {
....@@ -2049,7 +2158,7 @@
20492158 IEEE80211_PROBE_FLAG_RANDOM_SN = BIT(2),
20502159 };
20512160
2052
-int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
2161
+int ieee80211_build_preq_ies(struct ieee80211_sub_if_data *sdata, u8 *buffer,
20532162 size_t buffer_len,
20542163 struct ieee80211_scan_ies *ie_desc,
20552164 const u8 *ie, size_t ie_len,
....@@ -2068,8 +2177,6 @@
20682177 enum nl80211_band band, u32 *basic_rates);
20692178 int __ieee80211_request_smps_mgd(struct ieee80211_sub_if_data *sdata,
20702179 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);
20732180 void ieee80211_recalc_smps(struct ieee80211_sub_if_data *sdata);
20742181 void ieee80211_recalc_min_chandef(struct ieee80211_sub_if_data *sdata);
20752182
....@@ -2085,9 +2192,13 @@
20852192 u32 cap);
20862193 u8 *ieee80211_ie_build_vht_oper(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap,
20872194 const struct cfg80211_chan_def *chandef);
2195
+u8 ieee80211_ie_len_he_cap(struct ieee80211_sub_if_data *sdata, u8 iftype);
20882196 u8 *ieee80211_ie_build_he_cap(u8 *pos,
20892197 const struct ieee80211_sta_he_cap *he_cap,
20902198 u8 *end);
2199
+void ieee80211_ie_build_he_6ghz_cap(struct ieee80211_sub_if_data *sdata,
2200
+ struct sk_buff *skb);
2201
+u8 *ieee80211_ie_build_he_oper(u8 *pos, struct cfg80211_chan_def *chandef);
20912202 int ieee80211_parse_bitrates(struct cfg80211_chan_def *chandef,
20922203 const struct ieee80211_supported_band *sband,
20932204 const u8 *srates, int srates_len, u32 *rates);
....@@ -2098,11 +2209,23 @@
20982209 struct sk_buff *skb, bool need_basic,
20992210 enum nl80211_band band);
21002211 u8 *ieee80211_add_wmm_info_ie(u8 *buf, u8 qosinfo);
2212
+void ieee80211_add_s1g_capab_ie(struct ieee80211_sub_if_data *sdata,
2213
+ struct ieee80211_sta_s1g_cap *caps,
2214
+ struct sk_buff *skb);
2215
+void ieee80211_add_aid_request_ie(struct ieee80211_sub_if_data *sdata,
2216
+ struct sk_buff *skb);
21012217
21022218 /* channel management */
21032219 bool ieee80211_chandef_ht_oper(const struct ieee80211_ht_operation *ht_oper,
21042220 struct cfg80211_chan_def *chandef);
2105
-bool ieee80211_chandef_vht_oper(const struct ieee80211_vht_operation *oper,
2221
+bool ieee80211_chandef_vht_oper(struct ieee80211_hw *hw, u32 vht_cap_info,
2222
+ const struct ieee80211_vht_operation *oper,
2223
+ const struct ieee80211_ht_operation *htop,
2224
+ struct cfg80211_chan_def *chandef);
2225
+bool ieee80211_chandef_he_6ghz_oper(struct ieee80211_sub_if_data *sdata,
2226
+ const struct ieee80211_he_operation *he_oper,
2227
+ struct cfg80211_chan_def *chandef);
2228
+bool ieee80211_chandef_s1g_oper(const struct ieee80211_s1g_oper_ie *oper,
21062229 struct cfg80211_chan_def *chandef);
21072230 u32 ieee80211_chandef_downgrade(struct cfg80211_chan_def *c);
21082231
....@@ -2182,9 +2305,16 @@
21822305 void ieee80211_tdls_handle_disconnect(struct ieee80211_sub_if_data *sdata,
21832306 const u8 *peer, u16 reason);
21842307 const char *ieee80211_get_reason_code_string(u16 reason_code);
2308
+u16 ieee80211_encode_usf(int val);
2309
+u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
2310
+ enum nl80211_iftype type);
21852311
21862312 extern const struct ethtool_ops ieee80211_ethtool_ops;
21872313
2314
+u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw,
2315
+ struct ieee80211_vif *vif,
2316
+ struct ieee80211_sta *pubsta,
2317
+ int len, bool ampdu);
21882318 #ifdef CONFIG_MAC80211_NOINLINE
21892319 #define debug_noinline noinline
21902320 #else