| .. | .. |
|---|
| 12 | 12 | #include "wifi.h" |
|---|
| 13 | 13 | #include <linux/wireless.h> |
|---|
| 14 | 14 | |
|---|
| 15 | | -#define MGMT_QUEUE_NUM 5 |
|---|
| 16 | | - |
|---|
| 17 | | -#define ETH_ALEN 6 |
|---|
| 18 | | -#define ETH_TYPE_LEN 2 |
|---|
| 19 | | -#define PAYLOAD_TYPE_LEN 1 |
|---|
| 20 | | - |
|---|
| 21 | 15 | #ifdef CONFIG_88EU_AP_MODE |
|---|
| 22 | 16 | |
|---|
| 23 | 17 | #define RTL_IOCTL_HOSTAPD (SIOCIWFIRSTPRIV + 28) |
|---|
| .. | .. |
|---|
| 96 | 90 | #define IEEE_CRYPT_ERR_TX_KEY_SET_FAILED 6 |
|---|
| 97 | 91 | #define IEEE_CRYPT_ERR_CARD_CONF_FAILED 7 |
|---|
| 98 | 92 | |
|---|
| 99 | | - |
|---|
| 100 | 93 | #define IEEE_CRYPT_ALG_NAME_LEN 16 |
|---|
| 101 | 94 | |
|---|
| 102 | 95 | #define WPA_CIPHER_NONE BIT(0) |
|---|
| .. | .. |
|---|
| 104 | 97 | #define WPA_CIPHER_WEP104 BIT(2) |
|---|
| 105 | 98 | #define WPA_CIPHER_TKIP BIT(3) |
|---|
| 106 | 99 | #define WPA_CIPHER_CCMP BIT(4) |
|---|
| 107 | | - |
|---|
| 108 | | - |
|---|
| 109 | 100 | |
|---|
| 110 | 101 | #define WPA_SELECTOR_LEN 4 |
|---|
| 111 | 102 | extern u8 RTW_WPA_OUI_TYPE[]; |
|---|
| .. | .. |
|---|
| 118 | 109 | extern u8 WPA_CIPHER_SUITE_WRAP[]; |
|---|
| 119 | 110 | extern u8 WPA_CIPHER_SUITE_CCMP[]; |
|---|
| 120 | 111 | extern u8 WPA_CIPHER_SUITE_WEP104[]; |
|---|
| 121 | | - |
|---|
| 122 | 112 | |
|---|
| 123 | 113 | #define RSN_HEADER_LEN 4 |
|---|
| 124 | 114 | #define RSN_SELECTOR_LEN 4 |
|---|
| .. | .. |
|---|
| 198 | 188 | #define IsSupportedTxMCS(NetType) \ |
|---|
| 199 | 189 | ((NetType) & (WIRELESS_11_24N | WIRELESS_11_5N) ? true : false) |
|---|
| 200 | 190 | |
|---|
| 201 | | - |
|---|
| 202 | 191 | struct ieee_param { |
|---|
| 203 | 192 | u32 cmd; |
|---|
| 204 | 193 | u8 sta_addr[ETH_ALEN]; |
|---|
| .. | .. |
|---|
| 276 | 265 | * WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) |
|---|
| 277 | 266 | */ |
|---|
| 278 | 267 | |
|---|
| 279 | | - |
|---|
| 280 | 268 | #define IEEE80211_HLEN 30 |
|---|
| 281 | 269 | #define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN) |
|---|
| 282 | | - |
|---|
| 283 | 270 | |
|---|
| 284 | 271 | /* this is stolen from ipw2200 driver */ |
|---|
| 285 | 272 | #define IEEE_IBSS_MAC_HASH_SIZE 31 |
|---|
| .. | .. |
|---|
| 302 | 289 | /* sequence control field */ |
|---|
| 303 | 290 | #define RTW_IEEE80211_SCTL_FRAG 0x000F |
|---|
| 304 | 291 | #define RTW_IEEE80211_SCTL_SEQ 0xFFF0 |
|---|
| 305 | | - |
|---|
| 306 | 292 | |
|---|
| 307 | 293 | #define RTW_ERP_INFO_NON_ERP_PRESENT BIT(0) |
|---|
| 308 | 294 | #define RTW_ERP_INFO_USE_PROTECTION BIT(1) |
|---|
| .. | .. |
|---|
| 359 | 345 | |
|---|
| 360 | 346 | #define IEEE80211_CCK_RATE_LEN 4 |
|---|
| 361 | 347 | #define IEEE80211_NUM_OFDM_RATESLEN 8 |
|---|
| 362 | | - |
|---|
| 363 | 348 | |
|---|
| 364 | 349 | #define IEEE80211_CCK_RATE_1MB 0x02 |
|---|
| 365 | 350 | #define IEEE80211_CCK_RATE_2MB 0x04 |
|---|
| .. | .. |
|---|
| 541 | 526 | RTW_WLAN_CATEGORY_P2P = 0x7f,/* P2P action frames */ |
|---|
| 542 | 527 | }; |
|---|
| 543 | 528 | |
|---|
| 544 | | -/* SPECTRUM_MGMT action code */ |
|---|
| 545 | | -enum rtw_ieee80211_spectrum_mgmt_actioncode { |
|---|
| 546 | | - RTW_WLAN_ACTION_SPCT_MSR_REQ = 0, |
|---|
| 547 | | - RTW_WLAN_ACTION_SPCT_MSR_RPRT = 1, |
|---|
| 548 | | - RTW_WLAN_ACTION_SPCT_TPC_REQ = 2, |
|---|
| 549 | | - RTW_WLAN_ACTION_SPCT_TPC_RPRT = 3, |
|---|
| 550 | | - RTW_WLAN_ACTION_SPCT_CHL_SWITCH = 4, |
|---|
| 551 | | - RTW_WLAN_ACTION_SPCT_EXT_CHL_SWITCH = 5, |
|---|
| 552 | | -}; |
|---|
| 553 | | - |
|---|
| 554 | 529 | enum _PUBLIC_ACTION { |
|---|
| 555 | 530 | ACT_PUBLIC_BSSCOEXIST = 0, /* 20/40 BSS Coexistence */ |
|---|
| 556 | 531 | ACT_PUBLIC_DSE_ENABLE = 1, |
|---|
| .. | .. |
|---|
| 618 | 593 | #define WME_TSPEC_DIRECTION_UPLINK 0 |
|---|
| 619 | 594 | #define WME_TSPEC_DIRECTION_DOWNLINK 1 |
|---|
| 620 | 595 | #define WME_TSPEC_DIRECTION_BI_DIRECTIONAL 3 |
|---|
| 621 | | - |
|---|
| 622 | 596 | |
|---|
| 623 | 597 | #define OUI_BROADCOM 0x00904c /* Broadcom (Epigram) */ |
|---|
| 624 | 598 | |
|---|
| .. | .. |
|---|
| 749 | 723 | int rtw_parse_wpa2_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, |
|---|
| 750 | 724 | int *pairwise_cipher, int *is_8021x); |
|---|
| 751 | 725 | |
|---|
| 752 | | -int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, |
|---|
| 753 | | - u8 *wpa_ie, u16 *wpa_len); |
|---|
| 726 | +void rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, |
|---|
| 727 | + u8 *wpa_ie, u16 *wpa_len); |
|---|
| 754 | 728 | |
|---|
| 755 | 729 | u8 rtw_is_wps_ie(u8 *ie_ptr, uint *wps_ielen); |
|---|
| 756 | 730 | u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen); |
|---|
| .. | .. |
|---|
| 764 | 738 | struct registry_priv; |
|---|
| 765 | 739 | int rtw_generate_ie(struct registry_priv *pregistrypriv); |
|---|
| 766 | 740 | |
|---|
| 767 | | - |
|---|
| 768 | 741 | int rtw_get_bit_value_from_ieee_value(u8 val); |
|---|
| 769 | 742 | |
|---|
| 770 | 743 | bool rtw_is_cckrates_included(u8 *rate); |
|---|
| 771 | 744 | |
|---|
| 772 | 745 | bool rtw_is_cckratesonly_included(u8 *rate); |
|---|
| 773 | 746 | |
|---|
| 774 | | -int rtw_check_network_type(unsigned char *rate, int ratelen, int channel); |
|---|
| 747 | +int rtw_check_network_type(unsigned char *rate); |
|---|
| 775 | 748 | |
|---|
| 776 | 749 | void rtw_get_bcn_info(struct wlan_network *pnetwork); |
|---|
| 777 | 750 | |
|---|