Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License along |
| 16 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | * |
| 19 | * |
| 20 | * File: wmgr.h |
| 21 | * |
| 22 | * Purpose: |
| 23 | * |
| 24 | * Author: lyndon chen |
| 25 | * |
| 26 | * Date: Jan 2, 2003 |
| 27 | * |
| 28 | * Functions: |
| 29 | * |
| 30 | * Revision History: |
| 31 | * |
| 32 | */ |
| 33 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 34 | #ifndef __WMGR_H__ |
| 35 | #define __WMGR_H__ |
| 36 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 37 | #include "ttype.h" |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 38 | #include "80211mgr.h" |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 39 | #include "80211hdr.h" |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 40 | #include "wcmd.h" |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 41 | #include "bssdb.h" |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 42 | #include "wpa2.h" |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 43 | #include "vntwifi.h" |
Jim Lieb | a7ad322 | 2009-08-12 14:54:09 -0700 | [diff] [blame] | 44 | #include "card.h" |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 45 | |
| 46 | /*--------------------- Export Definitions -------------------------*/ |
| 47 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 48 | // Scan time |
| 49 | #define PROBE_DELAY 100 // (us) |
| 50 | #define SWITCH_CHANNEL_DELAY 200 // (us) |
| 51 | #define WLAN_SCAN_MINITIME 25 // (ms) |
| 52 | #define WLAN_SCAN_MAXTIME 100 // (ms) |
| 53 | #define TRIVIAL_SYNC_DIFFERENCE 0 // (us) |
| 54 | #define DEFAULT_IBSS_BI 100 // (ms) |
| 55 | |
| 56 | #define WCMD_ACTIVE_SCAN_TIME 50 //(ms) |
| 57 | #define WCMD_PASSIVE_SCAN_TIME 100 //(ms) |
| 58 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 59 | #define DEFAULT_MSDU_LIFETIME 512 // ms |
| 60 | #define DEFAULT_MSDU_LIFETIME_RES_64us 8000 // 64us |
| 61 | |
| 62 | #define DEFAULT_MGN_LIFETIME 8 // ms |
| 63 | #define DEFAULT_MGN_LIFETIME_RES_64us 125 // 64us |
| 64 | |
| 65 | #define MAKE_BEACON_RESERVED 10 //(us) |
| 66 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 67 | #define TIM_MULTICAST_MASK 0x01 |
| 68 | #define TIM_BITMAPOFFSET_MASK 0xFE |
| 69 | #define DEFAULT_DTIM_PERIOD 1 |
| 70 | |
| 71 | #define AP_LONG_RETRY_LIMIT 4 |
| 72 | |
| 73 | #define DEFAULT_IBSS_CHANNEL 6 //2.4G |
| 74 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 75 | /*--------------------- Export Classes ----------------------------*/ |
| 76 | |
| 77 | /*--------------------- Export Variables --------------------------*/ |
| 78 | |
| 79 | /*--------------------- Export Types ------------------------------*/ |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 80 | #define timer_expire(timer, next_tick) mod_timer(&timer, RUN_AT(next_tick)) |
Charles Clément | e3fd16d | 2010-06-02 09:52:02 -0700 | [diff] [blame] | 81 | typedef void (*TimerFunction)(unsigned long); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 82 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 83 | //+++ NDIS related |
| 84 | |
Charles Clément | 5c9824e | 2010-06-02 09:51:59 -0700 | [diff] [blame] | 85 | typedef unsigned char NDIS_802_11_MAC_ADDRESS[6]; |
Guillaume Clement | b69ee55 | 2014-07-25 01:06:19 +0200 | [diff] [blame] | 86 | typedef struct _NDIS_802_11_AI_REQFI { |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 87 | unsigned short Capabilities; |
| 88 | unsigned short ListenInterval; |
| 89 | NDIS_802_11_MAC_ADDRESS CurrentAPAddress; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 90 | } NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI; |
| 91 | |
Guillaume Clement | b69ee55 | 2014-07-25 01:06:19 +0200 | [diff] [blame] | 92 | typedef struct _NDIS_802_11_AI_RESFI { |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 93 | unsigned short Capabilities; |
| 94 | unsigned short StatusCode; |
| 95 | unsigned short AssociationId; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 96 | } NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI; |
| 97 | |
Guillaume Clement | b69ee55 | 2014-07-25 01:06:19 +0200 | [diff] [blame] | 98 | typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION { |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 99 | unsigned long Length; |
| 100 | unsigned short AvailableRequestFixedIEs; |
| 101 | NDIS_802_11_AI_REQFI RequestFixedIEs; |
| 102 | unsigned long RequestIELength; |
| 103 | unsigned long OffsetRequestIEs; |
| 104 | unsigned short AvailableResponseFixedIEs; |
| 105 | NDIS_802_11_AI_RESFI ResponseFixedIEs; |
| 106 | unsigned long ResponseIELength; |
| 107 | unsigned long OffsetResponseIEs; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 108 | } NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION; |
| 109 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 110 | typedef struct tagSAssocInfo { |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 111 | NDIS_802_11_ASSOCIATION_INFORMATION AssocInfo; |
| 112 | unsigned char abyIEs[WLAN_BEACON_FR_MAXLEN+WLAN_BEACON_FR_MAXLEN]; |
| 113 | // store ReqIEs set by OID_802_11_ASSOCIATION_INFORMATION |
| 114 | unsigned long RequestIELength; |
| 115 | unsigned char abyReqIEs[WLAN_BEACON_FR_MAXLEN]; |
Jim Lieb | a884847 | 2009-08-12 14:54:07 -0700 | [diff] [blame] | 116 | } SAssocInfo, *PSAssocInfo; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 117 | //--- |
| 118 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 119 | typedef enum tagWMAC_SCAN_TYPE { |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 120 | WMAC_SCAN_ACTIVE, |
| 121 | WMAC_SCAN_PASSIVE, |
| 122 | WMAC_SCAN_HYBRID |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 123 | } WMAC_SCAN_TYPE, *PWMAC_SCAN_TYPE; |
| 124 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 125 | typedef enum tagWMAC_SCAN_STATE { |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 126 | WMAC_NO_SCANNING, |
| 127 | WMAC_IS_SCANNING, |
| 128 | WMAC_IS_PROBEPENDING |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 129 | } WMAC_SCAN_STATE, *PWMAC_SCAN_STATE; |
| 130 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 131 | // Notes: |
| 132 | // Basic Service Set state explained as following: |
| 133 | // WMAC_STATE_IDLE : no BSS is selected (Adhoc or Infra) |
| 134 | // WMAC_STATE_STARTED : no BSS is selected, start own IBSS (Adhoc only) |
| 135 | // WMAC_STATE_JOINTED : BSS is selected and synchronized (Adhoc or Infra) |
| 136 | // WMAC_STATE_AUTHPENDING : Authentication pending (Infra) |
| 137 | // WMAC_STATE_AUTH : Authenticated (Infra) |
| 138 | // WMAC_STATE_ASSOCPENDING : Association pending (Infra) |
| 139 | // WMAC_STATE_ASSOC : Associated (Infra) |
| 140 | |
| 141 | typedef enum tagWMAC_BSS_STATE { |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 142 | WMAC_STATE_IDLE, |
| 143 | WMAC_STATE_STARTED, |
| 144 | WMAC_STATE_JOINTED, |
| 145 | WMAC_STATE_AUTHPENDING, |
| 146 | WMAC_STATE_AUTH, |
| 147 | WMAC_STATE_ASSOCPENDING, |
| 148 | WMAC_STATE_ASSOC |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 149 | } WMAC_BSS_STATE, *PWMAC_BSS_STATE; |
| 150 | |
| 151 | // WMAC selected running mode |
| 152 | typedef enum tagWMAC_CURRENT_MODE { |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 153 | WMAC_MODE_STANDBY, |
| 154 | WMAC_MODE_ESS_STA, |
| 155 | WMAC_MODE_IBSS_STA, |
| 156 | WMAC_MODE_ESS_AP |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 157 | } WMAC_CURRENT_MODE, *PWMAC_CURRENT_MODE; |
| 158 | |
| 159 | /* |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 160 | typedef enum tagWMAC_POWER_MODE { |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 161 | WMAC_POWER_CAM, |
| 162 | WMAC_POWER_FAST, |
| 163 | WMAC_POWER_MAX |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 164 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 165 | } WMAC_POWER_MODE, *PWMAC_POWER_MODE; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 166 | */ |
| 167 | |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 168 | // Tx Management Packet descriptor |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 169 | typedef struct tagSTxMgmtPacket { |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 170 | PUWLAN_80211HDR p80211Header; |
| 171 | unsigned int cbMPDULen; |
| 172 | unsigned int cbPayloadLen; |
Jim Lieb | a884847 | 2009-08-12 14:54:07 -0700 | [diff] [blame] | 173 | } STxMgmtPacket, *PSTxMgmtPacket; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 174 | |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 175 | // Rx Management Packet descriptor |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 176 | typedef struct tagSRxMgmtPacket { |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 177 | PUWLAN_80211HDR p80211Header; |
Malcolm Priestley | 0fc2a76 | 2014-08-10 12:21:58 +0100 | [diff] [blame] | 178 | u64 qwLocalTSF; |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 179 | unsigned int cbMPDULen; |
| 180 | unsigned int cbPayloadLen; |
| 181 | unsigned int uRSSI; |
| 182 | unsigned char bySQ; |
| 183 | unsigned char byRxRate; |
| 184 | unsigned char byRxChannel; |
Jim Lieb | a884847 | 2009-08-12 14:54:07 -0700 | [diff] [blame] | 185 | } SRxMgmtPacket, *PSRxMgmtPacket; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 186 | |
Guillaume Clement | b69ee55 | 2014-07-25 01:06:19 +0200 | [diff] [blame] | 187 | typedef struct tagSMgmtObject { |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 188 | void *pAdapter; |
| 189 | // MAC address |
| 190 | unsigned char abyMACAddr[WLAN_ADDR_LEN]; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 191 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 192 | // Configuration Mode |
| 193 | WMAC_CONFIG_MODE eConfigMode; // MAC pre-configed mode |
| 194 | CARD_PHY_TYPE eCurrentPHYMode; |
| 195 | CARD_PHY_TYPE eConfigPHYMode; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 196 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 197 | // Operation state variables |
| 198 | WMAC_CURRENT_MODE eCurrMode; // MAC current connection mode |
| 199 | WMAC_BSS_STATE eCurrState; // MAC current BSS state |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 200 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 201 | PKnownBSS pCurrBSS; |
| 202 | unsigned char byCSSGK; |
| 203 | unsigned char byCSSPK; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 204 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 205 | // Current state vars |
| 206 | unsigned int uCurrChannel; |
Aya Mahfouz | 85061eb | 2014-10-11 02:37:21 +0200 | [diff] [blame] | 207 | unsigned char abyCurrBSSID[WLAN_BSSID_LEN]; |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 208 | unsigned char abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; |
| 209 | unsigned char abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; |
| 210 | unsigned char abyCurrSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 211 | unsigned short wCurrCapInfo; |
| 212 | unsigned short wCurrAID; |
| 213 | unsigned short wCurrATIMWindow; |
| 214 | unsigned short wCurrBeaconPeriod; |
| 215 | bool bIsDS; |
| 216 | unsigned char byERPContext; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 217 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 218 | CMD_STATE eCommandState; |
| 219 | unsigned int uScanChannel; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 220 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 221 | // Desire joining BSS vars |
| 222 | unsigned char abyDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; |
| 223 | unsigned char abyDesireBSSID[WLAN_BSSID_LEN]; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 224 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 225 | // Adhoc or AP configuration vars |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 226 | unsigned short wIBSSBeaconPeriod; |
| 227 | unsigned short wIBSSATIMWindow; |
| 228 | unsigned int uIBSSChannel; |
| 229 | unsigned char abyIBSSSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; |
| 230 | unsigned char byAPBBType; |
| 231 | unsigned char abyWPAIE[MAX_WPA_IE_LEN]; |
| 232 | unsigned short wWPAIELen; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 233 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 234 | unsigned int uAssocCount; |
| 235 | bool bMoreData; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 236 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 237 | // Scan state vars |
| 238 | WMAC_SCAN_STATE eScanState; |
| 239 | WMAC_SCAN_TYPE eScanType; |
| 240 | unsigned int uScanStartCh; |
| 241 | unsigned int uScanEndCh; |
| 242 | unsigned short wScanSteps; |
| 243 | unsigned int uScanBSSType; |
| 244 | // Desire scanning vars |
| 245 | unsigned char abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; |
| 246 | unsigned char abyScanBSSID[WLAN_BSSID_LEN]; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 247 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 248 | // Privacy |
| 249 | WMAC_AUTHENTICATION_MODE eAuthenMode; |
| 250 | WMAC_ENCRYPTION_MODE eEncryptionMode; |
| 251 | bool bShareKeyAlgorithm; |
| 252 | unsigned char abyChallenge[WLAN_CHALLENGE_LEN]; |
| 253 | bool bPrivacyInvoked; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 254 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 255 | // Received beacon state vars |
| 256 | bool bInTIM; |
| 257 | bool bMulticastTIM; |
| 258 | unsigned char byDTIMCount; |
| 259 | unsigned char byDTIMPeriod; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 260 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 261 | // Power saving state vars |
| 262 | WMAC_POWER_MODE ePSMode; |
| 263 | unsigned short wListenInterval; |
| 264 | unsigned short wCountToWakeUp; |
| 265 | bool bInTIMWake; |
| 266 | unsigned char *pbyPSPacketPool; |
| 267 | unsigned char byPSPacketPool[sizeof(STxMgmtPacket) + WLAN_NULLDATA_FR_MAXLEN]; |
| 268 | bool bRxBeaconInTBTTWake; |
| 269 | unsigned char abyPSTxMap[MAX_NODE_NUM + 1]; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 270 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 271 | // management command related |
| 272 | unsigned int uCmdBusy; |
| 273 | unsigned int uCmdHostAPBusy; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 274 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 275 | // management packet pool |
| 276 | unsigned char *pbyMgmtPacketPool; |
| 277 | unsigned char byMgmtPacketPool[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN]; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 278 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 279 | // One second callback timer |
| 280 | struct timer_list sTimerSecondCallback; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 281 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 282 | // Temporarily Rx Mgmt Packet Descriptor |
| 283 | SRxMgmtPacket sRxPacket; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 284 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 285 | // link list of known bss's (scan results) |
| 286 | KnownBSS sBSSList[MAX_BSS_NUM]; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 287 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 288 | // table list of known node |
| 289 | // sNodeDBList[0] is reserved for AP under Infra mode |
| 290 | // sNodeDBList[0] is reserved for Multicast under adhoc/AP mode |
| 291 | KnownNodeDB sNodeDBTable[MAX_NODE_NUM + 1]; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 292 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 293 | // WPA2 PMKID Cache |
| 294 | SPMKIDCache gsPMKIDCache; |
| 295 | bool bRoaming; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 296 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 297 | // rate fall back vars |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 298 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 299 | // associate info |
| 300 | SAssocInfo sAssocInfo; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 301 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 302 | // for 802.11h |
| 303 | bool b11hEnable; |
| 304 | bool bSwitchChannel; |
| 305 | unsigned char byNewChannel; |
| 306 | PWLAN_IE_MEASURE_REP pCurrMeasureEIDRep; |
| 307 | unsigned int uLengthOfRepEIDs; |
| 308 | unsigned char abyCurrentMSRReq[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN]; |
| 309 | unsigned char abyCurrentMSRRep[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN]; |
| 310 | unsigned char abyIECountry[WLAN_A3FR_MAXLEN]; |
| 311 | unsigned char abyIBSSDFSOwner[6]; |
| 312 | unsigned char byIBSSDFSRecovery; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 313 | |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 314 | struct sk_buff skb; |
Jim Lieb | a884847 | 2009-08-12 14:54:07 -0700 | [diff] [blame] | 315 | } SMgmtObject, *PSMgmtObject; |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 316 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 317 | /*--------------------- Export Macros ------------------------------*/ |
| 318 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 319 | /*--------------------- Export Functions --------------------------*/ |
| 320 | |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 321 | void |
| 322 | vMgrObjectInit( |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 323 | void *hDeviceContext |
| 324 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 325 | |
| 326 | void |
| 327 | vMgrTimerInit( |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 328 | void *hDeviceContext |
| 329 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 330 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 331 | void |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 332 | vMgrObjectReset( |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 333 | void *hDeviceContext |
| 334 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 335 | |
| 336 | void |
| 337 | vMgrAssocBeginSta( |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 338 | void *hDeviceContext, |
| 339 | PSMgmtObject pMgmt, |
| 340 | PCMD_STATUS pStatus |
| 341 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 342 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 343 | void |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 344 | vMgrReAssocBeginSta( |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 345 | void *hDeviceContext, |
| 346 | PSMgmtObject pMgmt, |
| 347 | PCMD_STATUS pStatus |
| 348 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 349 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 350 | void |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 351 | vMgrDisassocBeginSta( |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 352 | void *hDeviceContext, |
| 353 | PSMgmtObject pMgmt, |
| 354 | unsigned char *abyDestAddress, |
| 355 | unsigned short wReason, |
| 356 | PCMD_STATUS pStatus |
| 357 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 358 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 359 | void |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 360 | vMgrAuthenBeginSta( |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 361 | void *hDeviceContext, |
| 362 | PSMgmtObject pMgmt, |
| 363 | PCMD_STATUS pStatus |
| 364 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 365 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 366 | void |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 367 | vMgrCreateOwnIBSS( |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 368 | void *hDeviceContext, |
| 369 | PCMD_STATUS pStatus |
| 370 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 371 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 372 | void |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 373 | vMgrJoinBSSBegin( |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 374 | void *hDeviceContext, |
| 375 | PCMD_STATUS pStatus |
| 376 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 377 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 378 | void |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 379 | vMgrRxManagePacket( |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 380 | void *hDeviceContext, |
| 381 | PSMgmtObject pMgmt, |
| 382 | PSRxMgmtPacket pRxPacket |
| 383 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 384 | |
| 385 | /* |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 386 | void |
| 387 | vMgrScanBegin( |
| 388 | void *hDeviceContext, |
| 389 | PCMD_STATUS pStatus |
| 390 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 391 | */ |
| 392 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 393 | void |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 394 | vMgrDeAuthenBeginSta( |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 395 | void *hDeviceContext, |
| 396 | PSMgmtObject pMgmt, |
| 397 | unsigned char *abyDestAddress, |
| 398 | unsigned short wReason, |
| 399 | PCMD_STATUS pStatus |
| 400 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 401 | |
Charles Clément | 7b6a001 | 2010-08-01 17:15:50 +0200 | [diff] [blame] | 402 | bool |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 403 | bMgrPrepareBeaconToSend( |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 404 | void *hDeviceContext, |
| 405 | PSMgmtObject pMgmt |
| 406 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 407 | |
Charles Clément | 7b6a001 | 2010-08-01 17:15:50 +0200 | [diff] [blame] | 408 | bool |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 409 | bAdd_PMKID_Candidate( |
| 410 | void *hDeviceContext, |
| 411 | unsigned char *pbyBSSID, |
| 412 | PSRSNCapObject psRSNCapObj |
| 413 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 414 | |
Charles Clément | 6b35b7b | 2010-05-07 12:30:19 -0700 | [diff] [blame] | 415 | void |
Joe Perches | cb850a6 | 2013-03-18 10:45:11 -0700 | [diff] [blame] | 416 | vFlush_PMKID_Candidate( |
| 417 | void *hDeviceContext |
| 418 | ); |
Forest Bond | 5449c68 | 2009-04-25 10:30:44 -0400 | [diff] [blame] | 419 | |
| 420 | #endif // __WMGR_H__ |