forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
....@@ -1,17 +1,6 @@
1
+// SPDX-License-Identifier: ISC
12 /*
23 * Copyright (c) 2010 Broadcom Corporation
3
- *
4
- * Permission to use, copy, modify, and/or distribute this software for any
5
- * purpose with or without fee is hereby granted, provided that the above
6
- * copyright notice and this permission notice appear in all copies.
7
- *
8
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
154 */
165
176 #ifndef BRCMFMAC_CFG80211_H
....@@ -33,6 +22,23 @@
3322 #define WL_EXTRA_BUF_MAX 2048
3423 #define WL_ROAM_TRIGGER_LEVEL -75
3524 #define WL_ROAM_DELTA 20
25
+
26
+/* WME Access Category Indices (ACIs) */
27
+#define AC_BE 0 /* Best Effort */
28
+#define AC_BK 1 /* Background */
29
+#define AC_VI 2 /* Video */
30
+#define AC_VO 3 /* Voice */
31
+#define EDCF_AC_COUNT 4
32
+#define MAX_8021D_PRIO 8
33
+
34
+#define EDCF_ACI_MASK 0x60
35
+#define EDCF_ACI_SHIFT 5
36
+#define EDCF_ACM_MASK 0x10
37
+#define EDCF_ECWMIN_MASK 0x0f
38
+#define EDCF_ECWMAX_SHIFT 4
39
+#define EDCF_AIFSN_MASK 0x0f
40
+#define EDCF_AIFSN_MAX 15
41
+#define EDCF_ECWMAX_MASK 0xf0
3642
3743 /* Keep BRCMF_ESCAN_BUF_SIZE below 64K (65536). Allocing over 64K can be
3844 * problematic on some systems and should be avoided.
....@@ -118,7 +124,21 @@
118124 enum brcmf_profile_fwsup {
119125 BRCMF_PROFILE_FWSUP_NONE,
120126 BRCMF_PROFILE_FWSUP_PSK,
121
- BRCMF_PROFILE_FWSUP_1X
127
+ BRCMF_PROFILE_FWSUP_1X,
128
+ BRCMF_PROFILE_FWSUP_SAE
129
+};
130
+
131
+/**
132
+ * enum brcmf_profile_fwauth - firmware authenticator profile
133
+ *
134
+ * @BRCMF_PROFILE_FWAUTH_NONE: no firmware authenticator
135
+ * @BRCMF_PROFILE_FWAUTH_PSK: authenticator for WPA/WPA2-PSK
136
+ * @BRCMF_PROFILE_FWAUTH_SAE: authenticator for SAE
137
+ */
138
+enum brcmf_profile_fwauth {
139
+ BRCMF_PROFILE_FWAUTH_NONE,
140
+ BRCMF_PROFILE_FWAUTH_PSK,
141
+ BRCMF_PROFILE_FWAUTH_SAE
122142 };
123143
124144 /**
....@@ -133,6 +153,8 @@
133153 struct brcmf_cfg80211_security sec;
134154 struct brcmf_wsec_key key[BRCMF_MAX_DEFAULT_KEYS];
135155 enum brcmf_profile_fwsup use_fwsup;
156
+ u16 use_fwauth;
157
+ bool is_ft;
136158 };
137159
138160 /**
....@@ -162,19 +184,23 @@
162184 * @probe_req_ie: IE info for probe request.
163185 * @probe_res_ie: IE info for probe response.
164186 * @beacon_ie: IE info for beacon frame.
187
+ * @assoc_res_ie: IE info for association response frame.
165188 * @probe_req_ie_len: IE info length for probe request.
166189 * @probe_res_ie_len: IE info length for probe response.
167190 * @beacon_ie_len: IE info length for beacon frame.
191
+ * @assoc_res_ie_len: IE info length for association response frame.
168192 */
169193 struct vif_saved_ie {
170194 u8 probe_req_ie[IE_MAX_LEN];
171195 u8 probe_res_ie[IE_MAX_LEN];
172196 u8 beacon_ie[IE_MAX_LEN];
173197 u8 assoc_req_ie[IE_MAX_LEN];
198
+ u8 assoc_res_ie[IE_MAX_LEN];
174199 u32 probe_req_ie_len;
175200 u32 probe_res_ie_len;
176201 u32 beacon_ie_len;
177202 u32 assoc_req_ie_len;
203
+ u32 assoc_res_ie_len;
178204 };
179205
180206 /**
....@@ -212,6 +238,12 @@
212238 struct brcmf_cfg80211_assoc_ielen_le {
213239 __le32 req_len;
214240 __le32 resp_len;
241
+};
242
+
243
+struct brcmf_cfg80211_edcf_acparam {
244
+ u8 ACI;
245
+ u8 ECW;
246
+ u16 TXOP; /* stored in network order (ls octet first) */
215247 };
216248
217249 /* dongle escan state */
....@@ -303,7 +335,6 @@
303335 */
304336 struct brcmf_cfg80211_info {
305337 struct wiphy *wiphy;
306
- struct cfg80211_ops *ops;
307338 struct brcmf_cfg80211_conf *conf;
308339 struct brcmf_p2p_info p2p;
309340 struct brcmf_btcoex_info *btcoex;
....@@ -333,6 +364,7 @@
333364 struct brcmf_assoclist_le assoclist;
334365 struct brcmf_cfg80211_wowl wowl;
335366 struct brcmf_pno_info *pno;
367
+ u8 ac_priority[MAX_8021D_PRIO];
336368 };
337369
338370 /**