| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: ISC |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 15 | 4 | */ |
|---|
| 16 | 5 | |
|---|
| 17 | 6 | #ifndef BRCMFMAC_CFG80211_H |
|---|
| .. | .. |
|---|
| 33 | 22 | #define WL_EXTRA_BUF_MAX 2048 |
|---|
| 34 | 23 | #define WL_ROAM_TRIGGER_LEVEL -75 |
|---|
| 35 | 24 | #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 |
|---|
| 36 | 42 | |
|---|
| 37 | 43 | /* Keep BRCMF_ESCAN_BUF_SIZE below 64K (65536). Allocing over 64K can be |
|---|
| 38 | 44 | * problematic on some systems and should be avoided. |
|---|
| .. | .. |
|---|
| 118 | 124 | enum brcmf_profile_fwsup { |
|---|
| 119 | 125 | BRCMF_PROFILE_FWSUP_NONE, |
|---|
| 120 | 126 | 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 |
|---|
| 122 | 142 | }; |
|---|
| 123 | 143 | |
|---|
| 124 | 144 | /** |
|---|
| .. | .. |
|---|
| 133 | 153 | struct brcmf_cfg80211_security sec; |
|---|
| 134 | 154 | struct brcmf_wsec_key key[BRCMF_MAX_DEFAULT_KEYS]; |
|---|
| 135 | 155 | enum brcmf_profile_fwsup use_fwsup; |
|---|
| 156 | + u16 use_fwauth; |
|---|
| 157 | + bool is_ft; |
|---|
| 136 | 158 | }; |
|---|
| 137 | 159 | |
|---|
| 138 | 160 | /** |
|---|
| .. | .. |
|---|
| 162 | 184 | * @probe_req_ie: IE info for probe request. |
|---|
| 163 | 185 | * @probe_res_ie: IE info for probe response. |
|---|
| 164 | 186 | * @beacon_ie: IE info for beacon frame. |
|---|
| 187 | + * @assoc_res_ie: IE info for association response frame. |
|---|
| 165 | 188 | * @probe_req_ie_len: IE info length for probe request. |
|---|
| 166 | 189 | * @probe_res_ie_len: IE info length for probe response. |
|---|
| 167 | 190 | * @beacon_ie_len: IE info length for beacon frame. |
|---|
| 191 | + * @assoc_res_ie_len: IE info length for association response frame. |
|---|
| 168 | 192 | */ |
|---|
| 169 | 193 | struct vif_saved_ie { |
|---|
| 170 | 194 | u8 probe_req_ie[IE_MAX_LEN]; |
|---|
| 171 | 195 | u8 probe_res_ie[IE_MAX_LEN]; |
|---|
| 172 | 196 | u8 beacon_ie[IE_MAX_LEN]; |
|---|
| 173 | 197 | u8 assoc_req_ie[IE_MAX_LEN]; |
|---|
| 198 | + u8 assoc_res_ie[IE_MAX_LEN]; |
|---|
| 174 | 199 | u32 probe_req_ie_len; |
|---|
| 175 | 200 | u32 probe_res_ie_len; |
|---|
| 176 | 201 | u32 beacon_ie_len; |
|---|
| 177 | 202 | u32 assoc_req_ie_len; |
|---|
| 203 | + u32 assoc_res_ie_len; |
|---|
| 178 | 204 | }; |
|---|
| 179 | 205 | |
|---|
| 180 | 206 | /** |
|---|
| .. | .. |
|---|
| 212 | 238 | struct brcmf_cfg80211_assoc_ielen_le { |
|---|
| 213 | 239 | __le32 req_len; |
|---|
| 214 | 240 | __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) */ |
|---|
| 215 | 247 | }; |
|---|
| 216 | 248 | |
|---|
| 217 | 249 | /* dongle escan state */ |
|---|
| .. | .. |
|---|
| 303 | 335 | */ |
|---|
| 304 | 336 | struct brcmf_cfg80211_info { |
|---|
| 305 | 337 | struct wiphy *wiphy; |
|---|
| 306 | | - struct cfg80211_ops *ops; |
|---|
| 307 | 338 | struct brcmf_cfg80211_conf *conf; |
|---|
| 308 | 339 | struct brcmf_p2p_info p2p; |
|---|
| 309 | 340 | struct brcmf_btcoex_info *btcoex; |
|---|
| .. | .. |
|---|
| 333 | 364 | struct brcmf_assoclist_le assoclist; |
|---|
| 334 | 365 | struct brcmf_cfg80211_wowl wowl; |
|---|
| 335 | 366 | struct brcmf_pno_info *pno; |
|---|
| 367 | + u8 ac_priority[MAX_8021D_PRIO]; |
|---|
| 336 | 368 | }; |
|---|
| 337 | 369 | |
|---|
| 338 | 370 | /** |
|---|