1 /*- 2 * Copyright (c) 2020-2021 The FreeBSD Foundation 3 * Copyright (c) 2021-2022 Bjoern A. Zeeb 4 * 5 * This software was developed by Björn Zeeb under sponsorship from 6 * the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * $FreeBSD$ 30 */ 31 32 #ifndef _LINUXKPI_NET_CFG80211_H 33 #define _LINUXKPI_NET_CFG80211_H 34 35 #include <linux/types.h> 36 #include <linux/nl80211.h> 37 #include <linux/ieee80211.h> 38 #include <linux/if_ether.h> 39 #include <linux/ethtool.h> 40 #include <linux/device.h> 41 #include <linux/netdevice.h> 42 #include <linux/random.h> 43 #include <linux/skbuff.h> 44 #include <net/regulatory.h> 45 46 /* linux_80211.c */ 47 extern int debug_80211; 48 #ifndef D80211_TODO 49 #define D80211_TODO 0x1 50 #endif 51 #ifndef D80211_IMPROVE 52 #define D80211_IMPROVE 0x2 53 #endif 54 #define TODO() if (debug_80211 & D80211_TODO) \ 55 printf("%s:%d: XXX LKPI80211 TODO\n", __func__, __LINE__) 56 #define IMPROVE(...) if (debug_80211 & D80211_IMPROVE) \ 57 printf("%s:%d: XXX LKPI80211 IMPROVE\n", __func__, __LINE__) 58 59 #define WIPHY_PARAM_FRAG_THRESHOLD __LINE__ /* TODO FIXME brcmfmac */ 60 #define WIPHY_PARAM_RETRY_LONG __LINE__ /* TODO FIXME brcmfmac */ 61 #define WIPHY_PARAM_RETRY_SHORT __LINE__ /* TODO FIXME brcmfmac */ 62 #define WIPHY_PARAM_RTS_THRESHOLD __LINE__ /* TODO FIXME brcmfmac */ 63 64 #define CFG80211_SIGNAL_TYPE_MBM __LINE__ /* TODO FIXME brcmfmac */ 65 66 #define UPDATE_ASSOC_IES 1 67 68 #define IEEE80211_MAX_CHAINS 4 /* net80211: IEEE80211_MAX_CHAINS copied */ 69 70 enum cfg80211_rate_info_flags { 71 RATE_INFO_FLAGS_SHORT_GI = BIT(0), 72 RATE_INFO_FLAGS_MCS = BIT(1), 73 RATE_INFO_FLAGS_VHT_MCS = BIT(2), 74 RATE_INFO_FLAGS_HE_MCS = BIT(3), 75 }; 76 77 extern const uint8_t rfc1042_header[6]; 78 79 enum ieee80211_privacy { 80 IEEE80211_PRIVACY_ANY, 81 }; 82 83 enum ieee80211_bss_type { 84 IEEE80211_BSS_TYPE_ANY, 85 }; 86 87 enum cfg80211_bss_frame_type { 88 CFG80211_BSS_FTYPE_UNKNOWN, 89 CFG80211_BSS_FTYPE_BEACON, 90 CFG80211_BSS_FTYPE_PRESP, 91 }; 92 93 enum ieee80211_channel_flags { 94 IEEE80211_CHAN_DISABLED = BIT(0), 95 IEEE80211_CHAN_INDOOR_ONLY = BIT(1), 96 IEEE80211_CHAN_IR_CONCURRENT = BIT(2), 97 IEEE80211_CHAN_RADAR = BIT(3), 98 IEEE80211_CHAN_NO_IR = BIT(4), 99 IEEE80211_CHAN_NO_HT40MINUS = BIT(5), 100 IEEE80211_CHAN_NO_HT40PLUS = BIT(6), 101 IEEE80211_CHAN_NO_80MHZ = BIT(7), 102 IEEE80211_CHAN_NO_160MHZ = BIT(8), 103 IEEE80211_CHAN_NO_OFDM = BIT(9), 104 }; 105 #define IEEE80211_CHAN_NO_HT40 (IEEE80211_CHAN_NO_HT40MINUS|IEEE80211_CHAN_NO_HT40PLUS) 106 107 struct ieee80211_txrx_stypes { 108 uint16_t tx; 109 uint16_t rx; 110 }; 111 112 /* XXX net80211 has an ieee80211_channel as well. */ 113 struct linuxkpi_ieee80211_channel { 114 /* TODO FIXME */ 115 uint32_t hw_value; /* ic_ieee */ 116 uint32_t center_freq; /* ic_freq */ 117 enum ieee80211_channel_flags flags; /* ic_flags */ 118 enum nl80211_band band; 119 int8_t max_power; /* ic_maxpower */ 120 bool beacon_found; 121 int max_antenna_gain, max_reg_power; 122 int orig_flags; 123 int dfs_cac_ms, dfs_state; 124 }; 125 126 /* XXX net80211 calls these IEEE80211_HTCAP_* */ 127 #define IEEE80211_HT_CAP_LDPC_CODING 0x0001 /* IEEE80211_HTCAP_LDPC */ 128 #define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 /* IEEE80211_HTCAP_CHWIDTH40 */ 129 #define IEEE80211_HT_CAP_GRN_FLD 0x0010 /* IEEE80211_HTCAP_GREENFIELD */ 130 #define IEEE80211_HT_CAP_SGI_20 0x0020 /* IEEE80211_HTCAP_SHORTGI20 */ 131 #define IEEE80211_HT_CAP_SGI_40 0x0040 /* IEEE80211_HTCAP_SHORTGI40 */ 132 #define IEEE80211_HT_CAP_TX_STBC 0x0080 /* IEEE80211_HTCAP_TXSTBC */ 133 #define IEEE80211_HT_CAP_RX_STBC 0x0100 /* IEEE80211_HTCAP_RXSTBC */ 134 #define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 /* IEEE80211_HTCAP_RXSTBC_S */ 135 #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 /* IEEE80211_HTCAP_MAXAMSDU */ 136 #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 /* IEEE80211_HTCAP_DSSSCCK40 */ 137 #define IEEE80211_HT_CAP_SM_PS 0x000c /* IEEE80211_HTCAP_SMPS */ 138 #define IEEE80211_HT_CAP_SM_PS_SHIFT 2 139 #define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 /* IEEE80211_HTCAP_LSIGTXOPPROT */ 140 141 #define IEEE80211_HT_MCS_TX_DEFINED 0x0001 142 #define IEEE80211_HT_MCS_TX_RX_DIFF 0x0002 143 #define IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT 2 144 #define IEEE80211_HT_MCS_RX_HIGHEST_MASK 0x3FF 145 #define IEEE80211_HT_MCS_MASK_LEN 10 146 147 enum ieee80211_vht_mcs_support { 148 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_7, 149 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_8, 150 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_9, 151 }; 152 153 struct cfg80211_bitrate_mask { 154 /* TODO FIXME */ 155 /* This is so weird but nothing else works out...*/ 156 struct { 157 uint64_t legacy; /* XXX? */ 158 uint8_t ht_mcs[IEEE80211_HT_MCS_MASK_LEN]; 159 uint16_t vht_mcs[16]; /* XXX? */ 160 uint16_t he_mcs[16]; /* XXX? */ 161 enum nl80211_txrate_gi gi; 162 } control[NUM_NL80211_BANDS]; 163 }; 164 165 struct rate_info { 166 /* TODO FIXME */ 167 int bw, flags, he_dcm, he_gi, he_ru_alloc, legacy, mcs, nss; 168 }; 169 170 struct ieee80211_rate { 171 /* TODO FIXME */ 172 uint32_t bitrate; 173 uint32_t hw_value; 174 uint32_t hw_value_short; 175 uint32_t flags; 176 }; 177 178 struct ieee80211_sta_ht_cap { 179 /* TODO FIXME */ 180 int ampdu_density, ampdu_factor; 181 bool ht_supported; 182 uint16_t cap; 183 struct mcs { 184 uint16_t rx_mask[IEEE80211_HT_MCS_MASK_LEN]; /* XXX ? > 4 (rtw88) */ 185 int rx_highest; 186 uint32_t tx_params; 187 } mcs; 188 }; 189 190 /* XXX net80211 calls these IEEE80211_VHTCAP_* */ 191 #define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 0x00000000 /* IEEE80211_VHTCAP_MAX_MPDU_LENGTH_3895 */ 192 #define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 0x00000001 /* IEEE80211_VHTCAP_MAX_MPDU_LENGTH_7991 */ 193 #define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 0x00000002 /* IEEE80211_VHTCAP_MAX_MPDU_LENGTH_11454 */ 194 #define IEEE80211_VHT_CAP_MAX_MPDU_MASK 0x00000003 /* IEEE80211_VHTCAP_MAX_MPDU_MASK */ 195 196 #define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160MHZ << IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK_S) 197 #define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160_80P80MHZ << IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK_S) 198 #define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK 0x0000000c /* IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK */ 199 200 #define IEEE80211_VHT_CAP_RXLDPC 0x00000010 /* IEEE80211_VHTCAP_RXLDPC */ 201 202 #define IEEE80211_VHT_CAP_SHORT_GI_80 0x00000020 /* IEEE80211_VHTCAP_SHORT_GI_80 */ 203 #define IEEE80211_VHT_CAP_SHORT_GI_160 0x00000040 /* IEEE80211_VHTCAP_SHORT_GI_160 */ 204 205 #define IEEE80211_VHT_CAP_TXSTBC 0x00000080 /* IEEE80211_VHTCAP_TXSTBC */ 206 207 #define IEEE80211_VHT_CAP_RXSTBC_1 0x00000100 /* IEEE80211_VHTCAP_RXSTBC_1 */ 208 #define IEEE80211_VHT_CAP_RXSTBC_MASK 0x00000700 /* IEEE80211_VHTCAP_RXSTBC_MASK */ 209 210 #define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE 0x00000800 /* IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE */ 211 212 #define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE 0x00001000 /* IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE */ 213 214 #define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE 0x00080000 /* IEEE80211_VHTCAP_MU_BEAMFORMER_CAPABLE */ 215 216 #define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE 0x00100000 /* IEEE80211_VHTCAP_MU_BEAMFORMEE_CAPABLE */ 217 218 #define IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT 13 /* IEEE80211_VHTCAP_BEAMFORMEE_STS_SHIFT */ 219 #define IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK (7 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT) /* IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK */ 220 221 #define IEEE80211_VHT_CAP_HTC_VHT 0x00400000 /* IEEE80211_VHTCAP_HTC_VHT */ 222 223 #define IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN 0x10000000 /* IEEE80211_VHTCAP_RX_ANTENNA_PATTERN */ 224 #define IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN 0x20000000 /* IEEE80211_VHTCAP_TX_ANTENNA_PATTERN */ 225 226 #define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB 0x0c000000 /* IEEE80211_VHTCAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB */ 227 228 #define IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_SHIFT 16 /* IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_SHIFT */ 229 #define IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK \ 230 (7 << IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_SHIFT) /* IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_MASK */ 231 232 #define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT 23 /* IEEE80211_VHTCAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT */ 233 #define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK \ 234 (7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT) /* IEEE80211_VHTCAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK */ 235 236 237 struct ieee80211_sta_vht_cap { 238 /* TODO FIXME */ 239 bool vht_supported; 240 uint32_t cap; 241 struct vht_mcs vht_mcs; 242 }; 243 244 struct cfg80211_connect_resp_params { 245 /* XXX TODO */ 246 uint8_t *bssid; 247 const uint8_t *req_ie; 248 const uint8_t *resp_ie; 249 uint32_t req_ie_len; 250 uint32_t resp_ie_len; 251 int status; 252 }; 253 254 struct cfg80211_inform_bss { 255 /* XXX TODO */ 256 int boottime_ns, scan_width, signal; 257 struct linuxkpi_ieee80211_channel *chan; 258 }; 259 260 struct cfg80211_roam_info { 261 /* XXX TODO */ 262 uint8_t *bssid; 263 const uint8_t *req_ie; 264 const uint8_t *resp_ie; 265 uint32_t req_ie_len; 266 uint32_t resp_ie_len; 267 struct linuxkpi_ieee80211_channel *channel; 268 }; 269 270 struct cfg80211_bss_ies { 271 /* XXX TODO, type is best guess. Fix if more info. */ 272 uint8_t *data; 273 int len; 274 }; 275 276 struct cfg80211_bss { 277 /* XXX TODO */ 278 struct cfg80211_bss_ies *ies; 279 }; 280 281 struct cfg80211_chan_def { 282 /* XXX TODO */ 283 struct linuxkpi_ieee80211_channel *chan; 284 enum nl80211_chan_width width; 285 uint32_t center_freq1; 286 uint32_t center_freq2; 287 }; 288 289 struct cfg80211_ftm_responder_stats { 290 /* XXX TODO */ 291 int asap_num, failed_num, filled, non_asap_num, out_of_window_triggers_num, partial_num, reschedule_requests_num, success_num, total_duration_ms, unknown_triggers_num; 292 }; 293 294 struct cfg80211_pmsr_capabilities { 295 /* XXX TODO */ 296 int max_peers, randomize_mac_addr, report_ap_tsf; 297 struct { 298 int asap, bandwidths, max_bursts_exponent, max_ftms_per_burst, non_asap, non_trigger_based, preambles, request_civicloc, request_lci, supported, trigger_based; 299 } ftm; 300 }; 301 302 struct cfg80211_pmsr_ftm_request { 303 /* XXX TODO */ 304 int asap, burst_period, ftmr_retries, ftms_per_burst, non_trigger_based, num_bursts_exp, request_civicloc, request_lci, trigger_based; 305 uint8_t bss_color; 306 bool lmr_feedback; 307 }; 308 309 struct cfg80211_pmsr_request_peer { 310 /* XXX TODO */ 311 struct cfg80211_chan_def chandef; 312 struct cfg80211_pmsr_ftm_request ftm; 313 uint8_t addr[ETH_ALEN]; 314 int report_ap_tsf; 315 }; 316 317 struct cfg80211_pmsr_request { 318 /* XXX TODO */ 319 int cookie, n_peers, timeout; 320 uint8_t mac_addr[ETH_ALEN], mac_addr_mask[ETH_ALEN]; 321 struct cfg80211_pmsr_request_peer peers[]; 322 }; 323 324 struct cfg80211_pmsr_ftm_result { 325 /* XXX TODO */ 326 int burst_index, busy_retry_time, failure_reason; 327 int num_ftmr_successes, rssi_avg, rssi_avg_valid, rssi_spread, rssi_spread_valid, rtt_avg, rtt_avg_valid, rtt_spread, rtt_spread_valid, rtt_variance, rtt_variance_valid; 328 uint8_t *lci; 329 uint8_t *civicloc; 330 int lci_len; 331 int civicloc_len; 332 }; 333 334 struct cfg80211_pmsr_result { 335 /* XXX TODO */ 336 int ap_tsf, ap_tsf_valid, final, host_time, status, type; 337 uint8_t addr[ETH_ALEN]; 338 struct cfg80211_pmsr_ftm_result ftm; 339 }; 340 341 struct cfg80211_sar_freq_ranges { 342 uint32_t start_freq; 343 uint32_t end_freq; 344 }; 345 346 struct cfg80211_sar_sub_specs { 347 uint32_t freq_range_index; 348 int power; 349 }; 350 351 struct cfg80211_sar_specs { 352 enum nl80211_sar_type type; 353 uint32_t num_sub_specs; 354 struct cfg80211_sar_sub_specs sub_specs[]; 355 }; 356 357 struct cfg80211_sar_capa { 358 enum nl80211_sar_type type; 359 uint32_t num_freq_ranges; 360 const struct cfg80211_sar_freq_ranges *freq_ranges; 361 }; 362 363 struct cfg80211_ssid { 364 int ssid_len; 365 uint8_t ssid[IEEE80211_MAX_SSID_LEN]; 366 }; 367 368 struct cfg80211_scan_6ghz_params { 369 /* XXX TODO */ 370 uint8_t *bssid; 371 int channel_idx, psc_no_listen, short_ssid, short_ssid_valid, unsolicited_probe; 372 }; 373 374 struct cfg80211_match_set { 375 uint8_t bssid[ETH_ALEN]; 376 struct cfg80211_ssid ssid; 377 int rssi_thold; 378 }; 379 380 struct cfg80211_scan_request { 381 /* XXX TODO */ 382 int duration, duration_mandatory, flags; 383 bool no_cck; 384 bool scan_6ghz; 385 struct wireless_dev *wdev; 386 struct wiphy *wiphy; 387 int ie_len; 388 uint8_t *ie; 389 uint8_t mac_addr[ETH_ALEN], mac_addr_mask[ETH_ALEN]; 390 int n_ssids; 391 int n_6ghz_params; 392 int n_channels; 393 struct cfg80211_ssid *ssids; 394 struct cfg80211_scan_6ghz_params *scan_6ghz_params; 395 struct linuxkpi_ieee80211_channel *channels[0]; 396 }; 397 398 struct cfg80211_sched_scan_plan { 399 /* XXX TODO */ 400 int interval, iterations; 401 }; 402 403 struct cfg80211_sched_scan_request { 404 /* XXX TODO */ 405 int delay, flags; 406 uint8_t mac_addr[ETH_ALEN], mac_addr_mask[ETH_ALEN]; 407 uint64_t reqid; 408 int n_match_sets; 409 int n_scan_plans; 410 int n_ssids; 411 int n_channels; 412 struct cfg80211_match_set *match_sets; 413 struct cfg80211_sched_scan_plan *scan_plans; 414 struct cfg80211_ssid *ssids; 415 struct linuxkpi_ieee80211_channel *channels[0]; 416 }; 417 418 struct cfg80211_scan_info { 419 uint64_t scan_start_tsf; 420 uint8_t tsf_bssid[ETH_ALEN]; 421 bool aborted; 422 }; 423 424 struct cfg80211_beacon_data { 425 /* XXX TODO */ 426 const uint8_t *head; 427 const uint8_t *tail; 428 uint32_t head_len; 429 uint32_t tail_len; 430 const uint8_t *proberesp_ies; 431 const uint8_t *assocresp_ies; 432 uint32_t proberesp_ies_len; 433 uint32_t assocresp_ies_len; 434 }; 435 436 struct cfg80211_ap_settings { 437 /* XXX TODO */ 438 int auth_type, beacon_interval, dtim_period, hidden_ssid, inactivity_timeout; 439 const uint8_t *ssid; 440 size_t ssid_len; 441 struct cfg80211_beacon_data beacon; 442 struct cfg80211_chan_def chandef; 443 }; 444 445 struct cfg80211_bss_selection { 446 /* XXX TODO */ 447 enum nl80211_bss_select_attr behaviour; 448 union { 449 enum nl80211_band band_pref; 450 struct { 451 enum nl80211_band band; 452 uint8_t delta; 453 } adjust; 454 } param; 455 }; 456 457 struct cfg80211_crypto { /* XXX made up name */ 458 /* XXX TODO */ 459 enum nl80211_wpa_versions wpa_versions; 460 uint32_t cipher_group; /* WLAN_CIPHER_SUITE_* */ 461 uint32_t *akm_suites; 462 uint32_t *ciphers_pairwise; 463 const uint8_t *sae_pwd; 464 const uint8_t *psk; 465 int n_akm_suites; 466 int n_ciphers_pairwise; 467 int sae_pwd_len; 468 }; 469 470 struct cfg80211_connect_params { 471 /* XXX TODO */ 472 struct linuxkpi_ieee80211_channel *channel; 473 uint8_t *bssid; 474 const uint8_t *ie; 475 const uint8_t *ssid; 476 uint32_t ie_len; 477 uint32_t ssid_len; 478 const void *key; 479 uint32_t key_len; 480 int auth_type, key_idx, privacy, want_1x; 481 struct cfg80211_bss_selection bss_select; 482 struct cfg80211_crypto crypto; 483 }; 484 485 enum bss_param_flags { /* Used as bitflags. XXX FIXME values? */ 486 BSS_PARAM_FLAGS_CTS_PROT = 0x01, 487 BSS_PARAM_FLAGS_SHORT_PREAMBLE = 0x02, 488 BSS_PARAM_FLAGS_SHORT_SLOT_TIME = 0x04, 489 }; 490 491 struct cfg80211_ibss_params { 492 /* XXX TODO */ 493 int basic_rates, beacon_interval; 494 int channel_fixed, ie, ie_len, privacy; 495 int dtim_period; 496 uint8_t *ssid; 497 uint8_t *bssid; 498 int ssid_len; 499 struct cfg80211_chan_def chandef; 500 enum bss_param_flags flags; 501 }; 502 503 struct cfg80211_mgmt_tx_params { 504 /* XXX TODO */ 505 struct linuxkpi_ieee80211_channel *chan; 506 const uint8_t *buf; 507 size_t len; 508 int wait; 509 }; 510 511 struct cfg80211_pmk_conf { 512 /* XXX TODO */ 513 const uint8_t *pmk; 514 uint8_t pmk_len; 515 }; 516 517 struct cfg80211_pmksa { 518 /* XXX TODO */ 519 const uint8_t *bssid; 520 const uint8_t *pmkid; 521 }; 522 523 struct cfg80211_wowlan_nd_match { 524 /* XXX TODO */ 525 struct cfg80211_ssid ssid; 526 int n_channels; 527 uint32_t channels[0]; /* freq! = ieee80211_channel_to_frequency() */ 528 }; 529 530 struct cfg80211_wowlan_nd_info { 531 /* XXX TODO */ 532 int n_matches; 533 struct cfg80211_wowlan_nd_match *matches[0]; 534 }; 535 536 enum wiphy_wowlan_support_flags { 537 WIPHY_WOWLAN_DISCONNECT, 538 WIPHY_WOWLAN_GTK_REKEY_FAILURE, 539 WIPHY_WOWLAN_MAGIC_PKT, 540 WIPHY_WOWLAN_SUPPORTS_GTK_REKEY, 541 WIPHY_WOWLAN_NET_DETECT, 542 }; 543 544 struct wiphy_wowlan_support { 545 /* XXX TODO */ 546 enum wiphy_wowlan_support_flags flags; 547 int max_nd_match_sets, max_pkt_offset, n_patterns, pattern_max_len, pattern_min_len; 548 }; 549 550 struct station_del_parameters { 551 /* XXX TODO */ 552 const uint8_t *mac; 553 uint32_t reason_code; /* elsewhere uint16_t? */ 554 }; 555 556 struct station_info { 557 /* TODO FIXME */ 558 int assoc_req_ies_len, connected_time; 559 int generation, inactive_time, rx_bytes, rx_dropped_misc, rx_packets, signal, tx_bytes, tx_packets; 560 int filled, rx_beacon, rx_beacon_signal_avg, signal_avg; 561 int rx_duration, tx_failed, tx_retries; 562 563 int chains; 564 uint8_t chain_signal[IEEE80211_MAX_CHAINS]; 565 uint8_t chain_signal_avg[IEEE80211_MAX_CHAINS]; 566 567 uint8_t *assoc_req_ies; 568 struct rate_info rxrate; 569 struct rate_info txrate; 570 struct cfg80211_ibss_params bss_param; 571 struct nl80211_sta_flag_update sta_flags; 572 }; 573 574 struct station_parameters { 575 /* XXX TODO */ 576 int sta_flags_mask, sta_flags_set; 577 }; 578 579 struct key_params { 580 /* XXX TODO */ 581 const uint8_t *key; 582 const uint8_t *seq; 583 int key_len; 584 int seq_len; 585 uint32_t cipher; /* WLAN_CIPHER_SUITE_* */ 586 }; 587 588 struct mgmt_frame_regs { 589 /* XXX TODO */ 590 int interface_stypes; 591 }; 592 593 struct vif_params { 594 /* XXX TODO */ 595 uint8_t macaddr[ETH_ALEN]; 596 }; 597 598 /* That the world needs so many different structs for this is amazing. */ 599 struct mac_address { 600 uint8_t addr[ETH_ALEN]; 601 }; 602 603 struct ieee80211_reg_rule { 604 /* TODO FIXME */ 605 uint32_t flags; 606 struct freq_range { 607 int start_freq_khz; 608 int end_freq_khz; 609 int max_bandwidth_khz; 610 } freq_range; 611 struct power_rule { 612 int max_antenna_gain; 613 int max_eirp; 614 } power_rule; 615 }; 616 617 struct linuxkpi_ieee80211_regdomain { 618 /* TODO FIXME */ 619 uint8_t alpha2[2]; 620 int dfs_region; 621 int n_reg_rules; 622 struct ieee80211_reg_rule reg_rules[]; 623 }; 624 625 /* XXX-BZ this are insensible values probably ... */ 626 #define IEEE80211_HE_MAC_CAP0_HTC_HE 0x1 627 #define IEEE80211_HE_MAC_CAP0_TWT_REQ 0x2 628 629 #define IEEE80211_HE_MAC_CAP1_LINK_ADAPTATION 0x1 630 #define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8 0x2 631 #define IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US 0x4 632 633 #define IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP 0x1 634 #define IEEE80211_HE_MAC_CAP2_ACK_EN 0x2 635 #define IEEE80211_HE_MAC_CAP2_BSR 0x4 636 #define IEEE80211_HE_MAC_CAP2_LINK_ADAPTATION 0x8 637 #define IEEE80211_HE_MAC_CAP2_BCAST_TWT 0x10 638 #define IEEE80211_HE_MAC_CAP2_ALL_ACK 0x20 639 640 #define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2 0x1 641 #define IEEE80211_HE_MAC_CAP3_OMI_CONTROL 0x2 642 #define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1 0x10 643 #define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2 0x20 644 #define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3 0x40 645 #define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK 0x70 646 #define IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS 0x80 647 648 #define IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU 0x1 649 #define IEEE80211_HE_MAC_CAP4_BQR 0x2 650 #define IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39 0x4 651 #define IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU 0x8 652 #define IEEE80211_HE_MAC_CAP4_OPS 0x10 653 654 #define IEEE80211_HE_MAC_CAP5_HE_DYNAMIC_SM_PS 0x1 655 #define IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX 0x2 656 #define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B40 0x4 657 #define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B41 0x8 658 #define IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU 0x10 659 660 #define IEEE80211_HE_MCS_NOT_SUPPORTED 0x0 661 #define IEEE80211_HE_MCS_SUPPORT_0_7 0x1 662 #define IEEE80211_HE_MCS_SUPPORT_0_9 0x2 663 #define IEEE80211_HE_MCS_SUPPORT_0_11 0x4 664 665 #define IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS 0x01 666 #define IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS 0x02 667 #define IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START 0x04 668 #define IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN 0x08 669 #define IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP 0x10 670 671 #define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G 0x1 672 #define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G 0x2 673 #define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G 0x4 674 #define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G 0x8 675 676 #define IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A 0x1 677 #define IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD 0x2 678 #define IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS 0x4 679 #define IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK 0x8 680 #define IEEE80211_HE_PHY_CAP1_HE_LTF_AND_GI_FOR_HE_PPDUS_0_8US 0x10 681 682 #define IEEE80211_HE_PHY_CAP2_MIDAMBLE_RX_TX_MAX_NSTS 0x1 683 #define IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US 0x2 684 #define IEEE80211_HE_PHY_CAP2_STBC_TX_UNDER_80MHZ 0x4 685 #define IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ 0x8 686 #define IEEE80211_HE_PHY_CAP2_DOPPLER_TX 0x10 687 688 #define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK 0x1 689 #define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_NO_DCM 0x2 690 #define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_NO_DCM 0x4 691 #define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1 0x8 692 #define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_1 0x10 693 #define IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER 0x20 694 #define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_16_QAM 0x40 695 #define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_16_QAM 0x80 696 #define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_2 0x100 697 #define IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU 0x200 698 699 #define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_8 0x1 700 #define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_8 0x2 701 #define IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE 0x4 702 #define IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER 0x8 703 #define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4 0x10 704 705 #define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2 0x1 706 #define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_2 0x2 707 #define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK 0x4 708 #define IEEE80211_HE_PHY_CAP5_NG16_MU_FEEDBACK 0x8 709 #define IEEE80211_HE_PHY_CAP5_NG16_SU_FEEDBACK 0x10 710 711 #define IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT 0x1 712 #define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB 0x2 713 #define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB 0x4 714 #define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB 0x8 715 #define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB 0x20 716 #define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU 0x40 717 #define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU 0x80 718 #define IEEE80211_HE_PHY_CAP6_PARTIAL_BW_EXT_RANGE 0x80 719 720 #define IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI 0x1 721 #define IEEE80211_HE_PHY_CAP7_MAX_NC_1 0x2 722 #define IEEE80211_HE_PHY_CAP7_MAX_NC_2 0x4 723 #define IEEE80211_HE_PHY_CAP7_MAX_NC_MASK 0x6 724 #define IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR 0x8 725 #define IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP 0x10 726 #define IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ 0x20 727 728 #define IEEE80211_HE_PHY_CAP8_20MHZ_IN_160MHZ_HE_PPDU 0x1 729 #define IEEE80211_HE_PHY_CAP8_20MHZ_IN_40MHZ_HE_PPDU_IN_2G 0x2 730 #define IEEE80211_HE_PHY_CAP8_80MHZ_IN_160MHZ_HE_PPDU 0x4 731 #define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_2x996 0x8 732 #define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_242 0x10 733 #define IEEE80211_HE_PHY_CAP8_HE_ER_SU_PPDU_4XLTF_AND_08_US_GI 0x20 734 #define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_996 0x40 735 #define IEEE80211_HE_PHY_CAP8_HE_ER_SU_1XLTF_AND_08_US_GI 0x80 736 737 #define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_0US 0x1 738 #define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US 0x2 739 #define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_8US 0x4 740 #define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK 0x8 741 #define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_RESERVED 0x10 742 #define IEEE80211_HE_PHY_CAP9_NON_TRIGGERED_CQI_FEEDBACK 0x20 743 #define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB 0x40 744 #define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB 0x80 745 #define IEEE80211_HE_PHY_CAP9_RX_1024_QAM_LESS_THAN_242_TONE_RU 0x100 746 #define IEEE80211_HE_PHY_CAP9_TX_1024_QAM_LESS_THAN_242_TONE_RU 0x200 747 #define IEEE80211_HE_PHY_CAP9_LONGER_THAN_16_SIGB_OFDM_SYM 0x400 748 749 #define IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF 0x1 750 751 #define VENDOR_CMD_RAW_DATA (void *)(uintptr_t)(-ENOENT) 752 753 struct ieee80211_he_cap_elem { 754 u8 mac_cap_info[6]; 755 u8 phy_cap_info[11]; 756 } __packed; 757 758 struct ieee80211_he_mcs_nss_supp { 759 /* TODO FIXME */ 760 uint32_t rx_mcs_80; 761 uint32_t tx_mcs_80; 762 uint32_t rx_mcs_160; 763 uint32_t tx_mcs_160; 764 uint32_t rx_mcs_80p80; 765 uint32_t tx_mcs_80p80; 766 }; 767 768 #define IEEE80211_STA_HE_CAP_PPE_THRES_MAX 32 769 struct ieee80211_sta_he_cap { 770 /* TODO FIXME */ 771 int has_he; 772 struct ieee80211_he_cap_elem he_cap_elem; 773 struct ieee80211_he_mcs_nss_supp he_mcs_nss_supp; 774 uint8_t ppe_thres[IEEE80211_STA_HE_CAP_PPE_THRES_MAX]; 775 }; 776 777 struct ieee80211_sta_he_6ghz_capa { 778 /* TODO FIXME */ 779 int capa; 780 }; 781 782 struct ieee80211_sband_iftype_data { 783 /* TODO FIXME */ 784 enum nl80211_iftype types_mask; 785 struct ieee80211_sta_he_cap he_cap; 786 struct ieee80211_sta_he_6ghz_capa he_6ghz_capa; 787 struct { 788 const uint8_t *data; 789 size_t len; 790 } vendor_elems; 791 }; 792 793 struct ieee80211_supported_band { 794 /* TODO FIXME */ 795 struct linuxkpi_ieee80211_channel *channels; 796 struct ieee80211_rate *bitrates; 797 struct ieee80211_sband_iftype_data *iftype_data; 798 int n_channels; 799 int n_bitrates; 800 int n_iftype_data; 801 enum nl80211_band band; 802 struct ieee80211_sta_ht_cap ht_cap; 803 struct ieee80211_sta_vht_cap vht_cap; 804 }; 805 806 struct cfg80211_pkt_pattern { 807 /* XXX TODO */ 808 uint8_t *mask; 809 uint8_t *pattern; 810 int pattern_len; 811 int pkt_offset; 812 }; 813 814 struct cfg80211_wowlan { 815 /* XXX TODO */ 816 int disconnect, gtk_rekey_failure, magic_pkt; 817 int n_patterns; 818 struct cfg80211_sched_scan_request *nd_config; 819 struct cfg80211_pkt_pattern *patterns; 820 }; 821 822 struct cfg80211_gtk_rekey_data { 823 /* XXX TODO */ 824 int kck, kek, replay_ctr; 825 }; 826 827 struct cfg80211_tid_cfg { 828 /* XXX TODO */ 829 int mask, noack, retry_long, rtscts, tids; 830 enum nl80211_tx_rate_setting txrate_type; 831 struct cfg80211_bitrate_mask txrate_mask; 832 }; 833 834 struct cfg80211_tid_config { 835 /* XXX TODO */ 836 int n_tid_conf; 837 struct cfg80211_tid_cfg tid_conf[0]; 838 }; 839 840 struct ieee80211_iface_limit { 841 /* TODO FIXME */ 842 int max, types; 843 }; 844 845 struct ieee80211_iface_combination { 846 /* TODO FIXME */ 847 const struct ieee80211_iface_limit *limits; 848 int n_limits; 849 int max_interfaces, num_different_channels; 850 int beacon_int_infra_match, beacon_int_min_gcd; 851 }; 852 853 struct iface_combination_params { 854 int num_different_channels; 855 int iftype_num[NUM_NL80211_IFTYPES]; 856 }; 857 858 struct regulatory_request { 859 /* XXX TODO */ 860 uint8_t alpha2[2]; 861 int initiator, dfs_region; 862 }; 863 864 enum wiphy_vendor_cmd_need_flags { 865 WIPHY_VENDOR_CMD_NEED_NETDEV = 0x01, 866 WIPHY_VENDOR_CMD_NEED_RUNNING = 0x02, 867 WIPHY_VENDOR_CMD_NEED_WDEV = 0x04, 868 }; 869 870 struct wiphy_vendor_command { 871 struct { 872 uint32_t vendor_id; 873 uint32_t subcmd; 874 }; 875 uint32_t flags; 876 void *policy; 877 int (*doit)(struct wiphy *, struct wireless_dev *, const void *, int); 878 }; 879 880 struct wiphy_iftype_ext_capab { 881 /* TODO FIXME */ 882 enum nl80211_iftype iftype; 883 const uint8_t *extended_capabilities; 884 const uint8_t *extended_capabilities_mask; 885 uint8_t extended_capabilities_len; 886 887 }; 888 889 struct tid_config_support { 890 /* TODO FIXME */ 891 uint64_t vif; /* enum nl80211_tid_cfg_attr */ 892 uint64_t peer; /* enum nl80211_tid_cfg_attr */ 893 }; 894 895 enum cfg80211_regulatory { 896 REGULATORY_CUSTOM_REG = BIT(0), 897 REGULATORY_STRICT_REG = BIT(1), 898 REGULATORY_DISABLE_BEACON_HINTS = BIT(2), 899 REGULATORY_ENABLE_RELAX_NO_IR = BIT(3), 900 REGULATORY_WIPHY_SELF_MANAGED = BIT(4), 901 REGULATORY_COUNTRY_IE_IGNORE = BIT(5), 902 REGULATORY_COUNTRY_IE_FOLLOW_POWER = BIT(6), 903 }; 904 905 #define WIPHY_FLAG_AP_UAPSD 0x00000001 906 #define WIPHY_FLAG_HAS_CHANNEL_SWITCH 0x00000002 907 #define WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL 0x00000004 908 #define WIPHY_FLAG_HAVE_AP_SME 0x00000008 909 #define WIPHY_FLAG_IBSS_RSN 0x00000010 910 #define WIPHY_FLAG_NETNS_OK 0x00000020 911 #define WIPHY_FLAG_OFFCHAN_TX 0x00000040 912 #define WIPHY_FLAG_PS_ON_BY_DEFAULT 0x00000080 913 #define WIPHY_FLAG_SPLIT_SCAN_6GHZ 0x00000100 914 #define WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK 0x00000200 915 #define WIPHY_FLAG_SUPPORTS_FW_ROAM 0x00000400 916 #define WIPHY_FLAG_SUPPORTS_TDLS 0x00000800 917 #define WIPHY_FLAG_TDLS_EXTERNAL_SETUP 0x00001000 918 #define WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD 0x00002000 919 920 struct wiphy { 921 922 struct device *dev; 923 struct mac_address *addresses; 924 int n_addresses; 925 uint32_t flags; 926 struct ieee80211_supported_band *bands[NUM_NL80211_BANDS]; 927 uint8_t perm_addr[ETH_ALEN]; 928 929 /* XXX TODO */ 930 const struct cfg80211_pmsr_capabilities *pmsr_capa; 931 const struct cfg80211_sar_capa *sar_capa; 932 const struct wiphy_iftype_ext_capab *iftype_ext_capab; 933 const struct linuxkpi_ieee80211_regdomain *regd; 934 char fw_version[ETHTOOL_FWVERS_LEN]; 935 const struct ieee80211_iface_combination *iface_combinations; 936 const uint32_t *cipher_suites; 937 int n_iface_combinations; 938 int n_cipher_suites; 939 void(*reg_notifier)(struct wiphy *, struct regulatory_request *); 940 enum cfg80211_regulatory regulatory_flags; 941 int n_vendor_commands; 942 const struct wiphy_vendor_command *vendor_commands; 943 const struct ieee80211_txrx_stypes *mgmt_stypes; 944 uint32_t rts_threshold; 945 uint32_t frag_threshold; 946 struct tid_config_support tid_config_support; 947 948 int available_antennas_rx, available_antennas_tx; 949 int features, hw_version; 950 int interface_modes, max_match_sets, max_remain_on_channel_duration, max_scan_ie_len, max_scan_ssids, max_sched_scan_ie_len, max_sched_scan_plan_interval, max_sched_scan_plan_iterations, max_sched_scan_plans, max_sched_scan_reqs, max_sched_scan_ssids; 951 int num_iftype_ext_capab; 952 int max_ap_assoc_sta, probe_resp_offload, software_iftypes; 953 int bss_select_support, max_num_pmkids, retry_long, retry_short, signal_type; 954 int max_data_retry_count; 955 int tx_queue_len; 956 957 unsigned long ext_features[BITS_TO_LONGS(NUM_NL80211_EXT_FEATURES)]; 958 struct dentry *debugfsdir; 959 struct cfg80211_wowlan_support *wowlan; 960 /* Lower layer (driver/mac80211) specific data. */ 961 /* Must stay last. */ 962 uint8_t priv[0] __aligned(CACHE_LINE_SIZE); 963 }; 964 965 struct wireless_dev { 966 /* XXX TODO, like ic? */ 967 int iftype; 968 int address; 969 struct net_device *netdev; 970 struct wiphy *wiphy; 971 }; 972 973 struct cfg80211_ops { 974 /* XXX TODO */ 975 struct wireless_dev *(*add_virtual_intf)(struct wiphy *, const char *, unsigned char, enum nl80211_iftype, struct vif_params *); 976 int (*del_virtual_intf)(struct wiphy *, struct wireless_dev *); 977 s32 (*change_virtual_intf)(struct wiphy *, struct net_device *, enum nl80211_iftype, struct vif_params *); 978 s32 (*scan)(struct wiphy *, struct cfg80211_scan_request *); 979 s32 (*set_wiphy_params)(struct wiphy *, u32); 980 s32 (*join_ibss)(struct wiphy *, struct net_device *, struct cfg80211_ibss_params *); 981 s32 (*leave_ibss)(struct wiphy *, struct net_device *); 982 s32 (*get_station)(struct wiphy *, struct net_device *, const u8 *, struct station_info *); 983 int (*dump_station)(struct wiphy *, struct net_device *, int, u8 *, struct station_info *); 984 s32 (*set_tx_power)(struct wiphy *, struct wireless_dev *, enum nl80211_tx_power_setting, s32); 985 s32 (*get_tx_power)(struct wiphy *, struct wireless_dev *, s32 *); 986 s32 (*add_key)(struct wiphy *, struct net_device *, u8, bool, const u8 *, struct key_params *); 987 s32 (*del_key)(struct wiphy *, struct net_device *, u8, bool, const u8 *); 988 s32 (*get_key)(struct wiphy *, struct net_device *, u8, bool, const u8 *, void *, void(*)(void *, struct key_params *)); 989 s32 (*set_default_key)(struct wiphy *, struct net_device *, u8, bool, bool); 990 s32 (*set_default_mgmt_key)(struct wiphy *, struct net_device *, u8); 991 s32 (*set_power_mgmt)(struct wiphy *, struct net_device *, bool, s32); 992 s32 (*connect)(struct wiphy *, struct net_device *, struct cfg80211_connect_params *); 993 s32 (*disconnect)(struct wiphy *, struct net_device *, u16); 994 s32 (*suspend)(struct wiphy *, struct cfg80211_wowlan *); 995 s32 (*resume)(struct wiphy *); 996 s32 (*set_pmksa)(struct wiphy *, struct net_device *, struct cfg80211_pmksa *); 997 s32 (*del_pmksa)(struct wiphy *, struct net_device *, struct cfg80211_pmksa *); 998 s32 (*flush_pmksa)(struct wiphy *, struct net_device *); 999 s32 (*start_ap)(struct wiphy *, struct net_device *, struct cfg80211_ap_settings *); 1000 int (*stop_ap)(struct wiphy *, struct net_device *); 1001 s32 (*change_beacon)(struct wiphy *, struct net_device *, struct cfg80211_beacon_data *); 1002 int (*del_station)(struct wiphy *, struct net_device *, struct station_del_parameters *); 1003 int (*change_station)(struct wiphy *, struct net_device *, const u8 *, struct station_parameters *); 1004 int (*sched_scan_start)(struct wiphy *, struct net_device *, struct cfg80211_sched_scan_request *); 1005 int (*sched_scan_stop)(struct wiphy *, struct net_device *, u64); 1006 void (*update_mgmt_frame_registrations)(struct wiphy *, struct wireless_dev *, struct mgmt_frame_regs *); 1007 int (*mgmt_tx)(struct wiphy *, struct wireless_dev *, struct cfg80211_mgmt_tx_params *, u64 *); 1008 int (*cancel_remain_on_channel)(struct wiphy *, struct wireless_dev *, u64); 1009 int (*get_channel)(struct wiphy *, struct wireless_dev *, struct cfg80211_chan_def *); 1010 int (*crit_proto_start)(struct wiphy *, struct wireless_dev *, enum nl80211_crit_proto_id, u16); 1011 void (*crit_proto_stop)(struct wiphy *, struct wireless_dev *); 1012 int (*tdls_oper)(struct wiphy *, struct net_device *, const u8 *, enum nl80211_tdls_operation); 1013 int (*update_connect_params)(struct wiphy *, struct net_device *, struct cfg80211_connect_params *, u32); 1014 int (*set_pmk)(struct wiphy *, struct net_device *, const struct cfg80211_pmk_conf *); 1015 int (*del_pmk)(struct wiphy *, struct net_device *, const u8 *); 1016 int (*remain_on_channel)(struct wiphy *, struct wireless_dev *, struct linuxkpi_ieee80211_channel *, unsigned int, u64 *); 1017 int (*start_p2p_device)(struct wiphy *, struct wireless_dev *); 1018 void (*stop_p2p_device)(struct wiphy *, struct wireless_dev *); 1019 }; 1020 1021 1022 /* -------------------------------------------------------------------------- */ 1023 1024 /* linux_80211.c */ 1025 1026 struct wiphy *linuxkpi_wiphy_new(const struct cfg80211_ops *, size_t); 1027 void linuxkpi_wiphy_free(struct wiphy *wiphy); 1028 1029 int linuxkpi_regulatory_set_wiphy_regd_sync(struct wiphy *wiphy, 1030 struct linuxkpi_ieee80211_regdomain *regd); 1031 uint32_t linuxkpi_ieee80211_channel_to_frequency(uint32_t, enum nl80211_band); 1032 uint32_t linuxkpi_ieee80211_frequency_to_channel(uint32_t, uint32_t); 1033 struct linuxkpi_ieee80211_channel * 1034 linuxkpi_ieee80211_get_channel(struct wiphy *, uint32_t); 1035 1036 /* -------------------------------------------------------------------------- */ 1037 1038 static __inline struct wiphy * 1039 wiphy_new(const struct cfg80211_ops *ops, size_t priv_len) 1040 { 1041 1042 return (linuxkpi_wiphy_new(ops, priv_len)); 1043 } 1044 1045 static __inline void 1046 wiphy_free(struct wiphy *wiphy) 1047 { 1048 1049 linuxkpi_wiphy_free(wiphy); 1050 } 1051 1052 static __inline void * 1053 wiphy_priv(struct wiphy *wiphy) 1054 { 1055 1056 return (wiphy->priv); 1057 } 1058 1059 static __inline void 1060 set_wiphy_dev(struct wiphy *wiphy, struct device *dev) 1061 { 1062 1063 wiphy->dev = dev; 1064 } 1065 1066 static __inline struct device * 1067 wiphy_dev(struct wiphy *wiphy) 1068 { 1069 1070 return (wiphy->dev); 1071 } 1072 1073 #define wiphy_err(_wiphy, _fmt, ...) \ 1074 dev_err((_wiphy)->dev, _fmt, __VA_ARGS__) 1075 1076 static __inline const struct linuxkpi_ieee80211_regdomain * 1077 wiphy_dereference(struct wiphy *wiphy, 1078 const struct linuxkpi_ieee80211_regdomain *regd) 1079 { 1080 TODO(); 1081 return (NULL); 1082 } 1083 1084 /* -------------------------------------------------------------------------- */ 1085 1086 static __inline int 1087 reg_query_regdb_wmm(uint8_t *alpha2, uint32_t center_freq, 1088 struct ieee80211_reg_rule *rule) 1089 { 1090 1091 /* ETSI has special rules. FreeBSD regdb needs to learn about them. */ 1092 TODO(); 1093 1094 return (-ENXIO); 1095 } 1096 1097 static __inline const u8 * 1098 cfg80211_find_ie_match(uint32_t f, const u8 *ies, size_t ies_len, 1099 const u8 *match, int x, int y) 1100 { 1101 TODO(); 1102 return (NULL); 1103 } 1104 1105 static __inline const u8 * 1106 cfg80211_find_ie(uint8_t eid, uint8_t *variable, uint32_t frame_size) 1107 { 1108 TODO(); 1109 return (NULL); 1110 } 1111 1112 static __inline void 1113 cfg80211_pmsr_complete(struct wireless_dev *wdev, 1114 struct cfg80211_pmsr_request *req, gfp_t gfp) 1115 { 1116 TODO(); 1117 } 1118 1119 static __inline void 1120 cfg80211_pmsr_report(struct wireless_dev *wdev, 1121 struct cfg80211_pmsr_request *req, 1122 struct cfg80211_pmsr_result *result, gfp_t gfp) 1123 { 1124 TODO(); 1125 } 1126 1127 static __inline void 1128 cfg80211_chandef_create(struct cfg80211_chan_def *chandef, 1129 struct linuxkpi_ieee80211_channel *chan, enum nl80211_chan_flags chan_flag) 1130 { 1131 1132 KASSERT(chandef != NULL, ("%s: chandef is NULL\n", __func__)); 1133 KASSERT(chan != NULL, ("%s: chan is NULL\n", __func__)); 1134 1135 chandef->chan = chan; 1136 chandef->center_freq2 = 0; /* Set here and only overwrite if needed. */ 1137 chandef->chan = chan; 1138 1139 switch (chan_flag) { 1140 case NL80211_CHAN_NO_HT: 1141 chandef->width = NL80211_CHAN_WIDTH_20_NOHT; 1142 chandef->center_freq1 = chan->center_freq; 1143 break; 1144 default: 1145 printf("%s: unsupported chan_flag %#0x\n", __func__, chan_flag); 1146 /* XXX-BZ should we panic instead? */ 1147 chandef->width = NL80211_CHAN_WIDTH_20; 1148 chandef->center_freq1 = chan->center_freq; 1149 break; 1150 }; 1151 } 1152 1153 static __inline void 1154 cfg80211_bss_iter(struct wiphy *wiphy, struct cfg80211_chan_def *chandef, 1155 void (*iterfunc)(struct wiphy *, struct cfg80211_bss *, void *), void *data) 1156 { 1157 TODO(); 1158 } 1159 1160 struct element { 1161 uint8_t id; 1162 uint8_t datalen; 1163 uint8_t data[0]; 1164 }; 1165 1166 static __inline const struct element * 1167 cfg80211_find_elem(enum ieee80211_eid eid, uint8_t *data, size_t len) 1168 { 1169 TODO(); 1170 return (NULL); 1171 } 1172 1173 static __inline uint32_t 1174 cfg80211_calculate_bitrate(struct rate_info *rate) 1175 { 1176 TODO(); 1177 return (-1); 1178 } 1179 1180 static __inline uint32_t 1181 ieee80211_channel_to_frequency(uint32_t channel, enum nl80211_band band) 1182 { 1183 1184 return (linuxkpi_ieee80211_channel_to_frequency(channel, band)); 1185 } 1186 1187 static __inline uint32_t 1188 ieee80211_frequency_to_channel(uint32_t freq) 1189 { 1190 1191 return (linuxkpi_ieee80211_frequency_to_channel(freq, 0)); 1192 } 1193 1194 static __inline int 1195 regulatory_set_wiphy_regd_sync(struct wiphy *wiphy, 1196 struct linuxkpi_ieee80211_regdomain *regd) 1197 { 1198 IMPROVE(); 1199 return (linuxkpi_regulatory_set_wiphy_regd_sync(wiphy, regd)); 1200 } 1201 1202 static __inline int 1203 regulatory_set_wiphy_regd_sync_rtnl(struct wiphy *wiphy, 1204 struct linuxkpi_ieee80211_regdomain *regd) 1205 { 1206 1207 IMPROVE(); 1208 return (linuxkpi_regulatory_set_wiphy_regd_sync(wiphy, regd)); 1209 } 1210 1211 static __inline int 1212 regulatory_set_wiphy_regd(struct wiphy *wiphy, 1213 struct linuxkpi_ieee80211_regdomain *regd) 1214 { 1215 1216 IMPROVE(); 1217 if (regd == NULL) 1218 return (EINVAL); 1219 1220 /* XXX-BZ wild guessing here based on brcmfmac. */ 1221 if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) 1222 wiphy->regd = regd; 1223 else 1224 return (EPERM); 1225 1226 /* XXX FIXME, do we have to do anything with reg_notifier? */ 1227 return (0); 1228 } 1229 1230 static __inline int 1231 regulatory_hint(struct wiphy *wiphy, const uint8_t *alpha2) 1232 { 1233 TODO(); 1234 return (-ENXIO); 1235 } 1236 1237 static __inline const char * 1238 reg_initiator_name(enum nl80211_reg_initiator initiator) 1239 { 1240 TODO(); 1241 return (NULL); 1242 } 1243 1244 static __inline struct linuxkpi_ieee80211_regdomain * 1245 rtnl_dereference(const struct linuxkpi_ieee80211_regdomain *regd) 1246 { 1247 TODO(); 1248 return (NULL); 1249 } 1250 1251 static __inline struct ieee80211_reg_rule * 1252 freq_reg_info(struct wiphy *wiphy, uint32_t center_freq) 1253 { 1254 TODO(); 1255 return (NULL); 1256 } 1257 1258 static __inline struct cfg80211_bss * 1259 cfg80211_get_bss(struct wiphy *wiphy, struct linuxkpi_ieee80211_channel *chan, 1260 uint8_t *bssid, void *p, int x, uint32_t f1, uint32_t f2) 1261 { 1262 TODO(); 1263 return (NULL); 1264 } 1265 1266 static __inline void 1267 cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *bss) 1268 { 1269 TODO(); 1270 } 1271 1272 static __inline void 1273 wiphy_apply_custom_regulatory(struct wiphy *wiphy, 1274 const struct linuxkpi_ieee80211_regdomain *regd) 1275 { 1276 TODO(); 1277 } 1278 1279 static __inline char * 1280 wiphy_name(struct wiphy *wiphy) 1281 { 1282 if (wiphy != NULL && wiphy->dev != NULL) 1283 return dev_name(wiphy->dev); 1284 else { 1285 IMPROVE("wlanNA"); 1286 return ("wlanNA"); 1287 } 1288 } 1289 1290 static __inline void 1291 wiphy_read_of_freq_limits(struct wiphy *wiphy) 1292 { 1293 #ifdef FDT 1294 TODO(); 1295 #endif 1296 } 1297 1298 static __inline uint8_t * 1299 cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type, 1300 uint8_t *data, size_t len) 1301 { 1302 TODO(); 1303 return (NULL); 1304 } 1305 1306 static __inline void 1307 wiphy_ext_feature_set(struct wiphy *wiphy, enum nl80211_ext_feature ef) 1308 { 1309 1310 set_bit(ef, wiphy->ext_features); 1311 } 1312 1313 static __inline void * 1314 wiphy_net(struct wiphy *wiphy) 1315 { 1316 TODO(); 1317 return (NULL); /* XXX passed to dev_net_set() */ 1318 } 1319 1320 static __inline int 1321 wiphy_register(struct wiphy *wiphy) 1322 { 1323 TODO(); 1324 return (0); 1325 } 1326 1327 static __inline void 1328 wiphy_unregister(struct wiphy *wiphy) 1329 { 1330 TODO(); 1331 } 1332 1333 static __inline void 1334 wiphy_warn(struct wiphy *wiphy, const char *fmt, ...) 1335 { 1336 TODO(); 1337 } 1338 1339 static __inline int 1340 cfg80211_check_combinations(struct wiphy *wiphy, 1341 struct iface_combination_params *params) 1342 { 1343 TODO(); 1344 return (-ENOENT); 1345 } 1346 1347 static __inline uint8_t 1348 cfg80211_classify8021d(struct sk_buff *skb, void *p) 1349 { 1350 TODO(); 1351 return (0); 1352 } 1353 1354 static __inline void 1355 cfg80211_connect_done(struct net_device *ndev, 1356 struct cfg80211_connect_resp_params *conn_params, gfp_t gfp) 1357 { 1358 TODO(); 1359 } 1360 1361 static __inline void 1362 cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp) 1363 { 1364 TODO(); 1365 } 1366 1367 static __inline void 1368 cfg80211_disconnected(struct net_device *ndev, uint16_t reason, 1369 void *p, int x, bool locally_generated, gfp_t gfp) 1370 { 1371 TODO(); 1372 } 1373 1374 static __inline int 1375 cfg80211_get_p2p_attr(const u8 *ie, u32 ie_len, 1376 enum ieee80211_p2p_attr_ids attr, u8 *p, size_t p_len) 1377 { 1378 TODO(); 1379 return (-1); 1380 } 1381 1382 static __inline void 1383 cfg80211_ibss_joined(struct net_device *ndev, const uint8_t *addr, 1384 struct linuxkpi_ieee80211_channel *chan, gfp_t gfp) 1385 { 1386 TODO(); 1387 } 1388 1389 static __inline struct cfg80211_bss * 1390 cfg80211_inform_bss(struct wiphy *wiphy, 1391 struct linuxkpi_ieee80211_channel *channel, 1392 enum cfg80211_bss_frame_type bss_ftype, const uint8_t *bss, int _x, 1393 uint16_t cap, uint16_t intvl, const uint8_t *ie, size_t ie_len, 1394 int signal, gfp_t gfp) 1395 { 1396 TODO(); 1397 return (NULL); 1398 } 1399 1400 static __inline struct cfg80211_bss * 1401 cfg80211_inform_bss_data(struct wiphy *wiphy, 1402 struct cfg80211_inform_bss *bss_data, 1403 enum cfg80211_bss_frame_type bss_ftype, const uint8_t *bss, int _x, 1404 uint16_t cap, uint16_t intvl, const uint8_t *ie, size_t ie_len, gfp_t gfp) 1405 { 1406 TODO(); 1407 return (NULL); 1408 } 1409 1410 static __inline void 1411 cfg80211_mgmt_tx_status(struct wireless_dev *wdev, uint64_t cookie, 1412 const u8 *buf, size_t len, bool ack, gfp_t gfp) 1413 { 1414 TODO(); 1415 } 1416 1417 static __inline void 1418 cfg80211_michael_mic_failure(struct net_device *ndev, const uint8_t *addr, 1419 enum nl80211_key_type key_type, int _x, void *p, gfp_t gfp) 1420 { 1421 TODO(); 1422 } 1423 1424 static __inline void 1425 cfg80211_new_sta(struct net_device *ndev, const uint8_t *addr, 1426 struct station_info *sinfo, gfp_t gfp) 1427 { 1428 TODO(); 1429 } 1430 1431 static __inline void 1432 cfg80211_del_sta(struct net_device *ndev, const uint8_t *addr, gfp_t gfp) 1433 { 1434 TODO(); 1435 } 1436 1437 static __inline void 1438 cfg80211_port_authorized(struct net_device *ndev, const uint8_t *bssid, 1439 gfp_t gfp) 1440 { 1441 TODO(); 1442 } 1443 1444 static __inline void 1445 cfg80211_ready_on_channel(struct wireless_dev *wdev, uint64_t cookie, 1446 struct linuxkpi_ieee80211_channel *channel, unsigned int duration, 1447 gfp_t gfp) 1448 { 1449 TODO(); 1450 } 1451 1452 static __inline void 1453 cfg80211_remain_on_channel_expired(struct wireless_dev *wdev, 1454 uint64_t cookie, struct linuxkpi_ieee80211_channel *channel, gfp_t gfp) 1455 { 1456 TODO(); 1457 } 1458 1459 static __inline void 1460 cfg80211_report_wowlan_wakeup(void) 1461 { 1462 TODO(); 1463 } 1464 1465 static __inline void 1466 cfg80211_roamed(struct net_device *ndev, struct cfg80211_roam_info *roam_info, 1467 gfp_t gfp) 1468 { 1469 TODO(); 1470 } 1471 1472 static __inline void 1473 cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int _x, 1474 uint8_t *p, size_t p_len, int _x2) 1475 { 1476 TODO(); 1477 } 1478 1479 static __inline void 1480 cfg80211_scan_done(struct cfg80211_scan_request *scan_request, 1481 struct cfg80211_scan_info *info) 1482 { 1483 TODO(); 1484 } 1485 1486 static __inline void 1487 cfg80211_sched_scan_results(struct wiphy *wiphy, uint64_t reqid) 1488 { 1489 TODO(); 1490 } 1491 1492 static __inline void 1493 cfg80211_sched_scan_stopped(struct wiphy *wiphy, int _x) 1494 { 1495 TODO(); 1496 } 1497 1498 static __inline void 1499 cfg80211_unregister_wdev(struct wireless_dev *wdev) 1500 { 1501 TODO(); 1502 } 1503 1504 static __inline struct sk_buff * 1505 cfg80211_vendor_cmd_alloc_reply_skb(struct wiphy *wiphy, unsigned int len) 1506 { 1507 TODO(); 1508 return (NULL); 1509 } 1510 1511 static __inline int 1512 cfg80211_vendor_cmd_reply(struct sk_buff *skb) 1513 { 1514 TODO(); 1515 return (-ENXIO); 1516 } 1517 1518 static __inline struct linuxkpi_ieee80211_channel * 1519 ieee80211_get_channel(struct wiphy *wiphy, uint32_t freq) 1520 { 1521 1522 return (linuxkpi_ieee80211_get_channel(wiphy, freq)); 1523 } 1524 1525 static __inline size_t 1526 ieee80211_get_hdrlen_from_skb(struct sk_buff *skb) 1527 { 1528 1529 TODO(); 1530 return (-1); 1531 } 1532 1533 static __inline void 1534 cfg80211_bss_flush(struct wiphy *wiphy) 1535 { 1536 TODO(); 1537 } 1538 1539 static __inline bool 1540 cfg80211_channel_is_psc(struct linuxkpi_ieee80211_channel *channel) 1541 { 1542 1543 /* Only 6Ghz. */ 1544 if (channel->band != NL80211_BAND_6GHZ) 1545 return (false); 1546 1547 TODO(); 1548 return (false); 1549 } 1550 1551 static __inline int 1552 cfg80211_get_ies_channel_number(const uint8_t *ie, size_t len, 1553 enum nl80211_band band, enum cfg80211_bss_frame_type ftype) 1554 { 1555 1556 TODO(); 1557 return (-1); 1558 } 1559 1560 /* Used for scanning at least. */ 1561 static __inline void 1562 get_random_mask_addr(uint8_t *dst, const uint8_t *addr, const uint8_t *mask) 1563 { 1564 int i; 1565 1566 /* Get a completely random address and then overlay what we want. */ 1567 get_random_bytes(dst, ETH_ALEN); 1568 for (i = 0; i < ETH_ALEN; i++) 1569 dst[i] = (dst[i] & ~(mask[i])) | (addr[i] & mask[i]); 1570 } 1571 1572 #ifndef LINUXKPI_NET80211 1573 #define ieee80211_channel linuxkpi_ieee80211_channel 1574 #define ieee80211_regdomain linuxkpi_ieee80211_regdomain 1575 /* net80211::IEEE80211_VHT_MCS_SUPPORT_0_n() conflicts */ 1576 #if defined(IEEE80211_VHT_MCS_SUPPORT_0_7) 1577 #undef IEEE80211_VHT_MCS_SUPPORT_0_7 1578 #endif 1579 #if defined(IEEE80211_VHT_MCS_SUPPORT_0_8) 1580 #undef IEEE80211_VHT_MCS_SUPPORT_0_8 1581 #endif 1582 #if defined(IEEE80211_VHT_MCS_SUPPORT_0_9) 1583 #undef IEEE80211_VHT_MCS_SUPPORT_0_9 1584 #endif 1585 #define IEEE80211_VHT_MCS_SUPPORT_0_7 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_7 1586 #define IEEE80211_VHT_MCS_SUPPORT_0_8 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_8 1587 #define IEEE80211_VHT_MCS_SUPPORT_0_9 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_9 1588 #endif 1589 1590 #endif /* _LINUXKPI_NET_CFG80211_H */ 1591