1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 ******************************************************************************/
18 #include <osdep_service.h>
19 #include <drv_types.h>
20 #include "linux/ieee80211.h"
23 #include <linux/wireless.h>
25 #if (WIRELESS_EXT < 22)
26 #error "Obsolete pre 2007 wireless extensions are not supported"
30 #define MGMT_QUEUE_NUM 5
32 #ifdef CONFIG_8723AU_AP_MODE
35 #define WLAN_STA_AUTH BIT(0)
36 #define WLAN_STA_ASSOC BIT(1)
37 #define WLAN_STA_PS BIT(2)
38 #define WLAN_STA_TIM BIT(3)
39 #define WLAN_STA_PERM BIT(4)
40 #define WLAN_STA_AUTHORIZED BIT(5)
41 #define WLAN_STA_PENDING_POLL BIT(6) /* pending activity poll not ACKed */
42 #define WLAN_STA_SHORT_PREAMBLE BIT(7)
43 #define WLAN_STA_PREAUTH BIT(8)
44 #define WLAN_STA_WME BIT(9)
45 #define WLAN_STA_MFP BIT(10)
46 #define WLAN_STA_HT BIT(11)
47 #define WLAN_STA_WPS BIT(12)
48 #define WLAN_STA_MAYBE_WPS BIT(13)
49 #define WLAN_STA_NONERP BIT(31)
53 #define IEEE_CMD_SET_WPA_PARAM 1
54 #define IEEE_CMD_SET_WPA_IE 2
55 #define IEEE_CMD_SET_ENCRYPTION 3
57 #define IEEE_CRYPT_ALG_NAME_LEN 16
59 #define WPA_CIPHER_NONE BIT(0)
60 #define WPA_CIPHER_WEP40 BIT(1)
61 #define WPA_CIPHER_WEP104 BIT(2)
62 #define WPA_CIPHER_TKIP BIT(3)
63 #define WPA_CIPHER_CCMP BIT(4)
67 #define WPA_SELECTOR_LEN 4
68 extern u8 RTW_WPA_OUI23A_TYPE[] ;
69 extern u16 RTW_WPA_VERSION23A ;
70 extern u8 WPA_AUTH_KEY_MGMT_NONE23A[];
71 extern u8 WPA_AUTH_KEY_MGMT_UNSPEC_802_1X23A[];
72 extern u8 WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X23A[];
73 extern u8 WPA_CIPHER_SUITE_NONE23A[];
74 extern u8 WPA_CIPHER_SUITE_WEP4023A[];
75 extern u8 WPA_CIPHER_SUITE_TKIP23A[];
76 extern u8 WPA_CIPHER_SUITE_WRAP23A[];
77 extern u8 WPA_CIPHER_SUITE_CCMP23A[];
78 extern u8 WPA_CIPHER_SUITE_WEP10423A[];
81 #define RSN_HEADER_LEN 4
82 #define RSN_SELECTOR_LEN 4
84 extern u16 RSN_VERSION_BSD23A;
85 extern u8 RSN_AUTH_KEY_MGMT_UNSPEC_802_1X23A[];
86 extern u8 RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X23A[];
87 extern u8 RSN_CIPHER_SUITE_NONE23A[];
88 extern u8 RSN_CIPHER_SUITE_WEP4023A[];
89 extern u8 RSN_CIPHER_SUITE_TKIP23A[];
90 extern u8 RSN_CIPHER_SUITE_WRAP23A[];
91 extern u8 RSN_CIPHER_SUITE_CCMP23A[];
92 extern u8 RSN_CIPHER_SUITE_WEP10423A[];
94 enum ratr_table_mode {
95 RATR_INX_WIRELESS_NGB = 0, /* BGN 40 Mhz 2SS 1SS */
96 RATR_INX_WIRELESS_NG = 1, /* GN or N */
97 RATR_INX_WIRELESS_NB = 2, /* BGN 20 Mhz 2SS 1SS or BN */
98 RATR_INX_WIRELESS_N = 3,
99 RATR_INX_WIRELESS_GB = 4,
100 RATR_INX_WIRELESS_G = 5,
101 RATR_INX_WIRELESS_B = 6,
102 RATR_INX_WIRELESS_MC = 7,
103 RATR_INX_WIRELESS_AC_N = 8,
108 WIRELESS_INVALID = 0,
110 WIRELESS_11B = BIT(0), /* tx: cck only , rx: cck only, hw: cck */
111 WIRELESS_11G = BIT(1), /* tx: ofdm only, rx: ofdm & cck, hw: cck & ofdm */
112 WIRELESS_11A = BIT(2), /* tx: ofdm only, rx: ofdm only, hw: ofdm only */
113 WIRELESS_11_24N = BIT(3), /* tx: MCS only, rx: MCS & cck, hw: MCS & cck */
114 WIRELESS_11_5N = BIT(4), /* tx: MCS only, rx: MCS & ofdm, hw: ofdm only */
115 /* WIRELESS_AUTO = BIT(5), */
116 WIRELESS_AC = BIT(6),
119 WIRELESS_11BG = (WIRELESS_11B|WIRELESS_11G), /* tx: cck & ofdm, rx: cck & ofdm & MCS, hw: cck & ofdm */
120 WIRELESS_11G_24N = (WIRELESS_11G|WIRELESS_11_24N), /* tx: ofdm & MCS, rx: ofdm & cck & MCS, hw: cck & ofdm */
121 WIRELESS_11A_5N = (WIRELESS_11A|WIRELESS_11_5N), /* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */
122 WIRELESS_11BG_24N = (WIRELESS_11B|WIRELESS_11G|WIRELESS_11_24N), /* tx: ofdm & cck & MCS, rx: ofdm & cck & MCS, hw: ofdm & cck */
123 WIRELESS_11AGN = (WIRELESS_11A|WIRELESS_11G|WIRELESS_11_24N|WIRELESS_11_5N), /* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */
124 WIRELESS_11ABGN = (WIRELESS_11A|WIRELESS_11B|WIRELESS_11G|WIRELESS_11_24N|WIRELESS_11_5N),
127 #define SUPPORTED_24G_NETTYPE_MSK (WIRELESS_11B | WIRELESS_11G | WIRELESS_11_24N)
128 #define SUPPORTED_5G_NETTYPE_MSK (WIRELESS_11A | WIRELESS_11_5N)
130 #define IsSupported24G(NetType) ((NetType) & SUPPORTED_24G_NETTYPE_MSK ? true : false)
131 #define IsSupported5G(NetType) ((NetType) & SUPPORTED_5G_NETTYPE_MSK ? true : false)
133 #define IsEnableHWCCK(NetType) IsSupported24G(NetType)
134 #define IsEnableHWOFDM(NetType) ((NetType) & (WIRELESS_11G|WIRELESS_11_24N|SUPPORTED_5G_NETTYPE_MSK) ? true : false)
136 #define IsSupportedRxCCK(NetType) IsEnableHWCCK(NetType)
137 #define IsSupportedRxOFDM(NetType) IsEnableHWOFDM(NetType)
138 #define IsSupportedRxMCS(NetType) IsEnableHWOFDM(NetType)
140 #define IsSupportedTxCCK(NetType) ((NetType) & (WIRELESS_11B) ? true : false)
141 #define IsSupportedTxOFDM(NetType) ((NetType) & (WIRELESS_11G|WIRELESS_11A) ? true : false)
142 #define IsSupportedTxMCS(NetType) ((NetType) & (WIRELESS_11_24N|WIRELESS_11_5N) ? true : false)
147 u8 sta_addr[ETH_ALEN];
163 u8 alg[IEEE_CRYPT_ALG_NAME_LEN];
167 u8 seq[8]; /* sequence counter (set: RX, get: TX) */
171 #ifdef CONFIG_8723AU_AP_MODE
176 u8 tx_supp_rates[16];
177 struct ieee80211_ht_cap ht_cap;
180 u8 reserved[2];/* for set max_num_sta */
189 #define MIN_FRAG_THRESHOLD 256U
190 #define MAX_FRAG_THRESHOLD 2346U
195 #define NON_EXPLICIT_ACK 2
198 /* IEEE 802.11 defines */
200 #define P80211_OUI_LEN 3
202 struct ieee80211_snap_hdr {
204 u8 dsap; /* always 0xAA */
205 u8 ssap; /* always 0xAA */
206 u8 ctrl; /* always 0x03 */
207 u8 oui[P80211_OUI_LEN]; /* organizational universal id */
209 } __attribute__ ((packed));
212 #define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
214 #define WLAN_FC_GET_TYPE(fc) ((fc) & IEEE80211_FCTL_FTYPE)
215 #define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE)
217 #define WLAN_QC_GET_TID(qc) ((qc) & 0x0f)
219 #define WLAN_GET_SEQ_FRAG(seq) ((seq) & RTW_IEEE80211_SCTL_FRAG)
220 #define WLAN_GET_SEQ_SEQ(seq) ((seq) & RTW_IEEE80211_SCTL_SEQ)
223 #define WLAN_REASON_JOIN_WRONG_CHANNEL 65534
224 #define WLAN_REASON_EXPIRATION_CHK 65535
228 #define IEEE80211_STATMASK_SIGNAL (1<<0)
229 #define IEEE80211_STATMASK_RSSI (1<<1)
230 #define IEEE80211_STATMASK_NOISE (1<<2)
231 #define IEEE80211_STATMASK_RATE (1<<3)
232 #define IEEE80211_STATMASK_WEMASK 0x7
235 #define IEEE80211_CCK_MODULATION (1<<0)
236 #define IEEE80211_OFDM_MODULATION (1<<1)
238 #define IEEE80211_24GHZ_BAND (1<<0)
239 #define IEEE80211_52GHZ_BAND (1<<1)
241 #define IEEE80211_CCK_RATE_LEN 4
242 #define IEEE80211_NUM_OFDM_RATESLEN 8
245 #define IEEE80211_CCK_RATE_1MB 0x02
246 #define IEEE80211_CCK_RATE_2MB 0x04
247 #define IEEE80211_CCK_RATE_5MB 0x0B
248 #define IEEE80211_CCK_RATE_11MB 0x16
249 #define IEEE80211_OFDM_RATE_LEN 8
250 #define IEEE80211_OFDM_RATE_6MB 0x0C
251 #define IEEE80211_OFDM_RATE_9MB 0x12
252 #define IEEE80211_OFDM_RATE_12MB 0x18
253 #define IEEE80211_OFDM_RATE_18MB 0x24
254 #define IEEE80211_OFDM_RATE_24MB 0x30
255 #define IEEE80211_OFDM_RATE_36MB 0x48
256 #define IEEE80211_OFDM_RATE_48MB 0x60
257 #define IEEE80211_OFDM_RATE_54MB 0x6C
258 #define IEEE80211_BASIC_RATE_MASK 0x80
260 #define IEEE80211_CCK_RATE_1MB_MASK (1<<0)
261 #define IEEE80211_CCK_RATE_2MB_MASK (1<<1)
262 #define IEEE80211_CCK_RATE_5MB_MASK (1<<2)
263 #define IEEE80211_CCK_RATE_11MB_MASK (1<<3)
264 #define IEEE80211_OFDM_RATE_6MB_MASK (1<<4)
265 #define IEEE80211_OFDM_RATE_9MB_MASK (1<<5)
266 #define IEEE80211_OFDM_RATE_12MB_MASK (1<<6)
267 #define IEEE80211_OFDM_RATE_18MB_MASK (1<<7)
268 #define IEEE80211_OFDM_RATE_24MB_MASK (1<<8)
269 #define IEEE80211_OFDM_RATE_36MB_MASK (1<<9)
270 #define IEEE80211_OFDM_RATE_48MB_MASK (1<<10)
271 #define IEEE80211_OFDM_RATE_54MB_MASK (1<<11)
273 #define IEEE80211_CCK_RATES_MASK 0x0000000F
274 #define IEEE80211_CCK_BASIC_RATES_MASK (IEEE80211_CCK_RATE_1MB_MASK | \
275 IEEE80211_CCK_RATE_2MB_MASK)
276 #define IEEE80211_CCK_DEFAULT_RATES_MASK (IEEE80211_CCK_BASIC_RATES_MASK | \
277 IEEE80211_CCK_RATE_5MB_MASK | \
278 IEEE80211_CCK_RATE_11MB_MASK)
280 #define IEEE80211_OFDM_RATES_MASK 0x00000FF0
281 #define IEEE80211_OFDM_BASIC_RATES_MASK (IEEE80211_OFDM_RATE_6MB_MASK | \
282 IEEE80211_OFDM_RATE_12MB_MASK | \
283 IEEE80211_OFDM_RATE_24MB_MASK)
284 #define IEEE80211_OFDM_DEFAULT_RATES_MASK (IEEE80211_OFDM_BASIC_RATES_MASK | \
285 IEEE80211_OFDM_RATE_9MB_MASK | \
286 IEEE80211_OFDM_RATE_18MB_MASK | \
287 IEEE80211_OFDM_RATE_36MB_MASK | \
288 IEEE80211_OFDM_RATE_48MB_MASK | \
289 IEEE80211_OFDM_RATE_54MB_MASK)
290 #define IEEE80211_DEFAULT_RATES_MASK (IEEE80211_OFDM_DEFAULT_RATES_MASK | \
291 IEEE80211_CCK_DEFAULT_RATES_MASK)
293 #define IEEE80211_NUM_OFDM_RATES 8
294 #define IEEE80211_NUM_CCK_RATES 4
295 #define IEEE80211_OFDM_SHIFT_MASK_A 4
298 #define WEP_KEY_LEN 13
304 802.11 data frame from AP
306 ,-------------------------------------------------------------------.
307 Bytes | 2 | 2 | 6 | 6 | 6 | 2 | 0..2312 | 4 |
308 |------|------|---------|---------|---------|------|---------|------|
309 Desc. | ctrl | dura | DA/RA | TA | SA | Sequ | frame | fcs |
310 | | tion | (BSSID) | | | ence | data | |
311 `-------------------------------------------------------------------'
317 struct ieee80211_header_data {
326 struct ieee80211_info_element_hdr {
329 } __attribute__ ((packed));
331 struct ieee80211_info_element {
335 } __attribute__ ((packed));
338 struct ieee80211_txb {
344 struct sk_buff *fragments[0];
348 /* MAX_RATES_LENGTH needs to be 12. The spec says 8, and many APs
349 * only use 8, and then use extended rates for the remaining supported
350 * rates. Other APs, however, stick all of their supported rates on the
351 * main rates information element... */
352 #define MAX_RATES_LENGTH ((u8)12)
353 #define MAX_RATES_EX_LENGTH ((u8)16)
354 #define MAX_CHANNEL_NUMBER 161
356 #define MAX_WPA_IE_LEN (256)
357 #define MAX_WPS_IE_LEN (512)
358 #define MAX_P2P_IE_LEN (256)
359 #define MAX_WFD_IE_LEN (128)
361 #define IW_ESSID_MAX_SIZE 32
365 -1: authentication fail
370 #define DEFAULT_MAX_SCAN_AGE (15 * HZ)
371 #define DEFAULT_FTS 2346
372 #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
373 #define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
375 #define CFG_IEEE80211_RESERVE_FCS (1<<0)
376 #define CFG_IEEE80211_COMPUTE_FCS (1<<1)
380 #define IEEE_A (1<<0)
381 #define IEEE_B (1<<1)
382 #define IEEE_G (1<<2)
383 #define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G)
385 /* Baron move to ieee80211.c */
386 int ieee80211_is_empty_essid23a(const char *essid, int essid_len);
389 ACT_PUBLIC_BSSCOEXIST = 0, /* 20/40 BSS Coexistence */
390 ACT_PUBLIC_DSE_ENABLE = 1,
391 ACT_PUBLIC_DSE_DEENABLE = 2,
392 ACT_PUBLIC_DSE_REG_LOCATION = 3,
393 ACT_PUBLIC_EXT_CHL_SWITCH = 4,
394 ACT_PUBLIC_DSE_MSR_REQ = 5,
395 ACT_PUBLIC_DSE_MSR_RPRT = 6,
396 ACT_PUBLIC_MP = 7, /* Measurement Pilot */
397 ACT_PUBLIC_DSE_PWR_CONSTRAINT = 8,
398 ACT_PUBLIC_VENDOR = 9, /* for WIFI_DIRECT */
399 ACT_PUBLIC_GAS_INITIAL_REQ = 10,
400 ACT_PUBLIC_GAS_INITIAL_RSP = 11,
401 ACT_PUBLIC_GAS_COMEBACK_REQ = 12,
402 ACT_PUBLIC_GAS_COMEBACK_RSP = 13,
403 ACT_PUBLIC_TDLS_DISCOVERY_RSP = 14,
404 ACT_PUBLIC_LOCATION_TRACK = 15,
408 #define WME_OUI_TYPE 2
409 #define WME_OUI_SUBTYPE_INFORMATION_ELEMENT 0
410 #define WME_OUI_SUBTYPE_PARAMETER_ELEMENT 1
411 #define WME_OUI_SUBTYPE_TSPEC_ELEMENT 2
412 #define WME_VERSION 1
415 #define OUI_BROADCOM 0x00904c /* Broadcom (Epigram) */
417 #define VENDOR_HT_CAPAB_OUI_TYPE 0x33 /* 00-90-4c:0x33 */
419 /* Represent channel details, subset of ieee80211_channel */
420 struct rtw_ieee80211_channel {
421 /* enum ieee80211_band band; */
422 /* u16 center_freq; */
425 /* int max_antenna_gain; */
427 /* int max_reg_power; */
428 /* bool beacon_found; */
429 /* u32 orig_flags; */
436 /*"center_freq:%u, "*/ \
439 /*"max_antenna_gain:%d\n"*/ \
440 /*"max_power:%d\n"*/ \
441 /*"max_reg_power:%d\n"*/ \
442 /*"beacon_found:%u\n"*/ \
443 /*"orig_flags:0x%08x\n"*/ \
444 /*"orig_mag:%d\n"*/ \
447 #define CHAN_ARG(channel) \
448 /*(channel)->band*/ \
449 /*, (channel)->center_freq*/ \
450 (channel)->hw_value \
452 /*, (channel)->max_antenna_gain*/ \
453 /*, (channel)->max_power*/ \
454 /*, (channel)->max_reg_power*/ \
455 /*, (channel)->beacon_found*/ \
456 /*, (channel)->orig_flags*/ \
457 /*, (channel)->orig_mag*/ \
458 /*, (channel)->orig_mpwr*/ \
460 /* Parsed Information Elements */
461 struct rtw_ieee802_11_elems {
481 u8 ext_supp_rates_len;
495 u8 supp_channels_len;
503 u8 ht_capabilities_len;
507 u8 vendor_ht_cap_len;
516 enum parse_res rtw_ieee802_11_parse_elems23a(u8 *start, uint len,
517 struct rtw_ieee802_11_elems *elems,
520 u8 *rtw_set_fixed_ie23a(unsigned char *pbuf, unsigned int len, unsigned char *source, unsigned int *frlen);
521 u8 *rtw_set_ie23a(u8 *pbuf, int index, uint len, u8 *source, uint *frlen);
523 enum secondary_ch_offset {
524 SCN = 0, /* no secondary channel */
525 SCA = 1, /* secondary channel above */
526 SCB = 3, /* secondary channel below */
528 u8 secondary_ch_offset_to_hal_ch_offset23a(u8 ch_offset);
529 u8 hal_ch_offset_to_secondary_ch_offset23a(u8 ch_offset);
530 u8 *rtw_set_ie23a_ch_switch(u8 *buf, u32 *buf_len, u8 ch_switch_mode, u8 new_ch, u8 ch_switch_cnt);
531 u8 *rtw_set_ie23a_secondary_ch_offset(u8 *buf, u32 *buf_len, u8 secondary_ch_offset);
532 u8 *rtw_set_ie23a_mesh_ch_switch_parm(u8 *buf, u32 *buf_len, u8 ttl, u8 flags, u16 reason, u16 precedence);
534 u8 *rtw_get_ie23a(u8*pbuf, int index, int *len, int limit);
535 u8 *rtw_get_ie23a_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, uint *ielen);
536 int rtw_ies_remove_ie23a(u8 *ies, uint *ies_len, uint offset, u8 eid, u8 *oui, u8 oui_len);
538 void rtw_set_supported_rate23a(u8* SupportedRates, uint mode) ;
540 unsigned char *rtw_get_wpa_ie23a(unsigned char *pie, int *wpa_ie_len, int limit);
541 unsigned char *rtw_get_wpa2_ie23a(unsigned char *pie, int *rsn_ie_len, int limit);
542 int rtw_get_wpa_cipher_suite23a(u8 *s);
543 int rtw_get_wpa2_cipher_suite23a(u8 *s);
544 int rtw_parse_wpa_ie23a(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x);
545 int rtw_parse_wpa2_ie23a(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x);
547 int rtw_get_sec_ie23a(u8 *in_ie,uint in_len,u8 *rsn_ie,u16 *rsn_len,u8 *wpa_ie,u16 *wpa_len);
549 u8 rtw_is_wps_ie23a(u8 *ie_ptr, uint *wps_ielen);
550 u8 *rtw_get_wps_ie23a(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen);
551 u8 *rtw_get_wps_attr23a(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_attr, u32 *len_attr);
552 u8 *rtw_get_wps_attr_content23a(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_content, uint *len_content);
555 * for_each_ie - iterate over continuous IEs
560 #define for_each_ie(ie, buf, buf_len) \
561 for (ie = (void*)buf; (((u8*)ie) - ((u8*)buf) + 1) < buf_len; ie = (void*)(((u8*)ie) + *(((u8*)ie)+1) + 2))
563 void dump_ies23a(u8 *buf, u32 buf_len);
564 void dump_wps_ie23a(u8 *ie, u32 ie_len);
566 #ifdef CONFIG_8723AU_P2P
567 void dump_p2p_ie23a(u8 *ie, u32 ie_len);
568 u8 *rtw_get_p2p_ie23a(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen);
569 u8 *rtw_get_p2p_attr23a(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_attr, u32 *len_attr);
570 u8 *rtw_get_p2p_attr23a_content(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_content, uint *len_content);
571 u32 rtw_set_p2p_attr_content23a(u8 *pbuf, u8 attr_id, u16 attr_len, u8 *pdata_attr);
572 void rtw_wlan_bssid_ex_remove_p2p_attr23a(struct wlan_bssid_ex *bss_ex, u8 attr_id);
575 #ifdef CONFIG_8723AU_P2P
576 int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen);
577 int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *attr_content, uint *attr_contentlen);
578 #endif /* CONFIG_8723AU_P2P */
580 uint rtw_get_rateset_len23a(u8 *rateset);
582 struct registry_priv;
583 int rtw_generate_ie23a(struct registry_priv *pregistrypriv);
586 int rtw_get_bit_value_from_ieee_value23a(u8 val);
588 uint rtw_is_cckrates_included23a(u8 *rate);
590 uint rtw_is_cckratesonly_included23a(u8 *rate);
592 int rtw_check_network_type23a(unsigned char *rate, int ratelen, int channel);
594 void rtw_get_bcn_info23a(struct wlan_network *pnetwork);
596 void rtw_macaddr_cfg23a(u8 *mac_addr);
598 u16 rtw_mcs_rate23a(u8 rf_type, u8 bw_40MHz, u8 short_GI_20, u8 short_GI_40, unsigned char * MCS_rate);
600 int rtw_action_frame_parse23a(const u8 *frame, u32 frame_len, u8* category, u8 *action);
601 const char *action_public_str23a(u8 action);
603 #endif /* IEEE80211_H */