80211mgr.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  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: 80211mgr.h
  21. *
  22. * Purpose: 802.11 management frames pre-defines.
  23. *
  24. *
  25. * Author: Lyndon Chen
  26. *
  27. * Date: May 8, 2002
  28. *
  29. */
  30. #ifndef __80211MGR_H__
  31. #define __80211MGR_H__
  32. #include <linux/types.h>
  33. #include "linux/ieee80211.h"
  34. #include "ttype.h"
  35. #include "80211hdr.h"
  36. #define WLAN_MIN_ARRAY 1
  37. /* Information Element ID value */
  38. #define WLAN_EID_FH_PARMS 2
  39. #define WLAN_EID_DS_PARMS 3
  40. #define WLAN_EID_CF_PARMS 4
  41. #define WLAN_EID_IBSS_PARMS 6
  42. #define WLAN_EID_TPC_REQ 34
  43. #define WLAN_EID_TPC_REP 35
  44. #define WLAN_EID_SUPP_CH 36
  45. #define WLAN_EID_CH_SWITCH 37
  46. #define WLAN_EID_MEASURE_REQ 38
  47. #define WLAN_EID_MEASURE_REP 39
  48. #define WLAN_EID_QUIET 40
  49. #define WLAN_EID_IBSS_DFS 41
  50. #define WLAN_EID_ERP 42
  51. /* reference 802.11i 7.3.2 table 20 */
  52. #define WLAN_EID_EXTSUPP_RATES 50
  53. /* reference WiFi WPA spec. */
  54. #define WLAN_EID_RSN_WPA 221
  55. #define WLAN_EID_ERP_NONERP_PRESENT 0x01
  56. #define WLAN_EID_ERP_USE_PROTECTION 0x02
  57. #define WLAN_EID_ERP_BARKER_MODE 0x04
  58. /* Reason Codes */
  59. #define WLAN_MGMT_REASON_RSVD 0
  60. #define WLAN_MGMT_REASON_UNSPEC 1
  61. #define WLAN_MGMT_REASON_PRIOR_AUTH_INVALID 2
  62. #define WLAN_MGMT_REASON_DEAUTH_LEAVING 3
  63. #define WLAN_MGMT_REASON_DISASSOC_INACTIVE 4
  64. #define WLAN_MGMT_REASON_DISASSOC_AP_BUSY 5
  65. #define WLAN_MGMT_REASON_CLASS2_NONAUTH 6
  66. #define WLAN_MGMT_REASON_CLASS3_NONASSOC 7
  67. #define WLAN_MGMT_REASON_DISASSOC_STA_HASLEFT 8
  68. #define WLAN_MGMT_REASON_CANT_ASSOC_NONAUTH 9
  69. #define WLAN_MGMT_REASON_DISASSOC_PWR_CAP_UNACCEPT 10
  70. #define WLAN_MGMT_REASON_DISASSOC_SUPP_CH_UNACCEPT 11
  71. #define WLAN_MGMT_REASON_INVALID_IE 13
  72. #define WLAN_MGMT_REASON_MIC_FAILURE 14
  73. #define WLAN_MGMT_REASON_4WAY_HANDSHAKE_TIMEOUT 15
  74. #define WLAN_MGMT_REASON_GRPKEY_UPDATE_TIMEOUT 16
  75. #define WLAN_MGMT_REASON_4WAY_INFO_DIFFERENT 17
  76. #define WLAN_MGMT_REASON_MULTCAST_CIPHER_INVALID 18
  77. #define WLAN_MGMT_REASON_UNCAST_CIPHER_INVALID 19
  78. #define WLAN_MGMT_REASON_AKMP_INVALID 20
  79. #define WLAN_MGMT_REASON_RSNE_UNSUPPORTED 21
  80. #define WLAN_MGMT_REASON_RSNE_CAP_INVALID 22
  81. #define WLAN_MGMT_REASON_80211X_AUTH_FAILED 23
  82. /* Status Codes */
  83. #define WLAN_MGMT_STATUS_SUCCESS 0
  84. #define WLAN_MGMT_STATUS_UNSPEC_FAILURE 1
  85. #define WLAN_MGMT_STATUS_CAPS_UNSUPPORTED 10
  86. #define WLAN_MGMT_STATUS_REASSOC_NO_ASSOC 11
  87. #define WLAN_MGMT_STATUS_ASSOC_DENIED_UNSPEC 12
  88. #define WLAN_MGMT_STATUS_UNSUPPORTED_AUTHALG 13
  89. #define WLAN_MGMT_STATUS_RX_AUTH_NOSEQ 14
  90. #define WLAN_MGMT_STATUS_CHALLENGE_FAIL 15
  91. #define WLAN_MGMT_STATUS_AUTH_TIMEOUT 16
  92. #define WLAN_MGMT_STATUS_ASSOC_DENIED_BUSY 17
  93. #define WLAN_MGMT_STATUS_ASSOC_DENIED_RATES 18
  94. #define WLAN_MGMT_STATUS_ASSOC_DENIED_SHORTPREAMBLE 19
  95. #define WLAN_MGMT_STATUS_ASSOC_DENIED_PBCC 20
  96. #define WLAN_MGMT_STATUS_ASSOC_DENIED_AGILITY 21
  97. /* reference 802.11h 7.3.1.9 */
  98. #define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_SPECTRUM_MNG 22
  99. #define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_PWR_CAP 23
  100. #define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_SUPP_CH 24
  101. /* reference 802.11g 7.3.1.9 */
  102. #define WLAN_MGMT_STATUS_SHORTSLOTTIME_UNSUPPORTED 25
  103. #define WLAN_MGMT_STATUS_DSSSOFDM_UNSUPPORTED 26
  104. /* reference 802.11i 3.7.1.9 table 19 */
  105. #define WLAN_MGMT_STATUS_INVALID_IE 40
  106. #define WLAN_MGMT_STATUS_GROUP_CIPHER_INVALID 41
  107. #define WLAN_MGMT_STATUS_PAIRWISE_CIPHER_INVALID 42
  108. #define WLAN_MGMT_STATUS_AKMP_INVALID 43
  109. #define WLAN_MGMT_STATUS_UNSUPPORT_RSN_IE_VER 44
  110. #define WLAN_MGMT_STATUS_INVALID_RSN_IE_CAP 45
  111. #define WLAN_MGMT_STATUS_CIPHER_REJECT 46
  112. /* Auth Algorithm */
  113. #define WLAN_AUTH_ALG_OPENSYSTEM 0
  114. #define WLAN_AUTH_ALG_SHAREDKEY 1
  115. /* Management Frame Field Offsets */
  116. /* Note: Not all fields are listed because of variable lengths. */
  117. /* Note: These offsets are from the start of the frame data */
  118. #define WLAN_BEACON_OFF_TS 0
  119. #define WLAN_BEACON_OFF_BCN_INT 8
  120. #define WLAN_BEACON_OFF_CAPINFO 10
  121. #define WLAN_BEACON_OFF_SSID 12
  122. #define WLAN_DISASSOC_OFF_REASON 0
  123. #define WLAN_ASSOCREQ_OFF_CAP_INFO 0
  124. #define WLAN_ASSOCREQ_OFF_LISTEN_INT 2
  125. #define WLAN_ASSOCREQ_OFF_SSID 4
  126. #define WLAN_ASSOCRESP_OFF_CAP_INFO 0
  127. #define WLAN_ASSOCRESP_OFF_STATUS 2
  128. #define WLAN_ASSOCRESP_OFF_AID 4
  129. #define WLAN_ASSOCRESP_OFF_SUPP_RATES 6
  130. #define WLAN_REASSOCREQ_OFF_CAP_INFO 0
  131. #define WLAN_REASSOCREQ_OFF_LISTEN_INT 2
  132. #define WLAN_REASSOCREQ_OFF_CURR_AP 4
  133. #define WLAN_REASSOCREQ_OFF_SSID 10
  134. #define WLAN_REASSOCRESP_OFF_CAP_INFO 0
  135. #define WLAN_REASSOCRESP_OFF_STATUS 2
  136. #define WLAN_REASSOCRESP_OFF_AID 4
  137. #define WLAN_REASSOCRESP_OFF_SUPP_RATES 6
  138. #define WLAN_PROBEREQ_OFF_SSID 0
  139. #define WLAN_PROBERESP_OFF_TS 0
  140. #define WLAN_PROBERESP_OFF_BCN_INT 8
  141. #define WLAN_PROBERESP_OFF_CAP_INFO 10
  142. #define WLAN_PROBERESP_OFF_SSID 12
  143. #define WLAN_AUTHEN_OFF_AUTH_ALG 0
  144. #define WLAN_AUTHEN_OFF_AUTH_SEQ 2
  145. #define WLAN_AUTHEN_OFF_STATUS 4
  146. #define WLAN_AUTHEN_OFF_CHALLENGE 6
  147. #define WLAN_DEAUTHEN_OFF_REASON 0
  148. /* Cipher Suite Selectors defined in 802.11i */
  149. #define WLAN_11i_CSS_USE_GROUP 0
  150. #define WLAN_11i_CSS_WEP40 1
  151. #define WLAN_11i_CSS_TKIP 2
  152. #define WLAN_11i_CSS_CCMP 4
  153. #define WLAN_11i_CSS_WEP104 5
  154. #define WLAN_11i_CSS_UNKNOWN 255
  155. /* Authentication and Key Management Suite Selectors defined in 802.11i */
  156. #define WLAN_11i_AKMSS_802_1X 1
  157. #define WLAN_11i_AKMSS_PSK 2
  158. #define WLAN_11i_AKMSS_UNKNOWN 255
  159. /* Measurement type definitions reference ieee 802.11h Table 20b */
  160. #define MEASURE_TYPE_BASIC 0
  161. #define MEASURE_TYPE_CCA 1
  162. #define MEASURE_TYPE_RPI 2
  163. /* Measurement request mode definitions reference ieee 802.11h Figure 46h */
  164. #define MEASURE_MODE_ENABLE 0x02
  165. #define MEASURE_MODE_REQ 0x04
  166. #define MEASURE_MODE_REP 0x08
  167. /* Measurement report mode definitions reference ieee 802.11h Figure 46m */
  168. #define MEASURE_MODE_LATE 0x01
  169. #define MEASURE_MODE_INCAPABLE 0x02
  170. #define MEASURE_MODE_REFUSED 0x04
  171. /* Information Element Types */
  172. #pragma pack(1)
  173. typedef struct tagWLAN_IE {
  174. unsigned char byElementID;
  175. unsigned char len;
  176. } __attribute__ ((__packed__))
  177. WLAN_IE, *PWLAN_IE;
  178. /* Service Set Identity (SSID) */
  179. #pragma pack(1)
  180. typedef struct tagWLAN_IE_SSID {
  181. unsigned char byElementID;
  182. unsigned char len;
  183. unsigned char abySSID[1];
  184. } __attribute__ ((__packed__))
  185. WLAN_IE_SSID, *PWLAN_IE_SSID;
  186. /* Supported Rates */
  187. #pragma pack(1)
  188. typedef struct tagWLAN_IE_SUPP_RATES {
  189. unsigned char byElementID;
  190. unsigned char len;
  191. unsigned char abyRates[1];
  192. } __attribute__ ((__packed__))
  193. WLAN_IE_SUPP_RATES, *PWLAN_IE_SUPP_RATES;
  194. /* FH Parameter Set */
  195. #pragma pack(1)
  196. typedef struct _WLAN_IE_FH_PARMS {
  197. unsigned char byElementID;
  198. unsigned char len;
  199. unsigned short wDwellTime;
  200. unsigned char byHopSet;
  201. unsigned char byHopPattern;
  202. unsigned char byHopIndex;
  203. } WLAN_IE_FH_PARMS, *PWLAN_IE_FH_PARMS;
  204. /* DS Parameter Set */
  205. #pragma pack(1)
  206. typedef struct tagWLAN_IE_DS_PARMS {
  207. unsigned char byElementID;
  208. unsigned char len;
  209. unsigned char byCurrChannel;
  210. } __attribute__ ((__packed__))
  211. WLAN_IE_DS_PARMS, *PWLAN_IE_DS_PARMS;
  212. /* CF Parameter Set */
  213. #pragma pack(1)
  214. typedef struct tagWLAN_IE_CF_PARMS {
  215. unsigned char byElementID;
  216. unsigned char len;
  217. unsigned char byCFPCount;
  218. unsigned char byCFPPeriod;
  219. unsigned short wCFPMaxDuration;
  220. unsigned short wCFPDurRemaining;
  221. } __attribute__ ((__packed__))
  222. WLAN_IE_CF_PARMS, *PWLAN_IE_CF_PARMS;
  223. /* TIM */
  224. #pragma pack(1)
  225. typedef struct tagWLAN_IE_TIM {
  226. unsigned char byElementID;
  227. unsigned char len;
  228. unsigned char byDTIMCount;
  229. unsigned char byDTIMPeriod;
  230. unsigned char byBitMapCtl;
  231. unsigned char byVirtBitMap[1];
  232. } __attribute__ ((__packed__))
  233. WLAN_IE_TIM, *PWLAN_IE_TIM;
  234. /* IBSS Parameter Set */
  235. #pragma pack(1)
  236. typedef struct tagWLAN_IE_IBSS_PARMS {
  237. unsigned char byElementID;
  238. unsigned char len;
  239. unsigned short wATIMWindow;
  240. } __attribute__ ((__packed__))
  241. WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS;
  242. /* Challenge Text */
  243. #pragma pack(1)
  244. typedef struct tagWLAN_IE_CHALLENGE {
  245. unsigned char byElementID;
  246. unsigned char len;
  247. unsigned char abyChallenge[1];
  248. } __attribute__ ((__packed__))
  249. WLAN_IE_CHALLENGE, *PWLAN_IE_CHALLENGE;
  250. #pragma pack(1)
  251. typedef struct tagWLAN_IE_RSN_EXT {
  252. unsigned char byElementID;
  253. unsigned char len;
  254. unsigned char abyOUI[4];
  255. unsigned short wVersion;
  256. unsigned char abyMulticast[4];
  257. unsigned short wPKCount;
  258. struct {
  259. unsigned char abyOUI[4];
  260. } PKSList[1]; /* the rest is variable so need to */
  261. /* overlay ieauth structure */
  262. } WLAN_IE_RSN_EXT, *PWLAN_IE_RSN_EXT;
  263. #pragma pack(1)
  264. typedef struct tagWLAN_IE_RSN_AUTH {
  265. unsigned short wAuthCount;
  266. struct {
  267. unsigned char abyOUI[4];
  268. } AuthKSList[1];
  269. } WLAN_IE_RSN_AUTH, *PWLAN_IE_RSN_AUTH;
  270. /* RSN Identity */
  271. #pragma pack(1)
  272. typedef struct tagWLAN_IE_RSN {
  273. unsigned char byElementID;
  274. unsigned char len;
  275. unsigned short wVersion;
  276. unsigned char abyRSN[WLAN_MIN_ARRAY];
  277. } WLAN_IE_RSN, *PWLAN_IE_RSN;
  278. /* ERP */
  279. #pragma pack(1)
  280. typedef struct tagWLAN_IE_ERP {
  281. unsigned char byElementID;
  282. unsigned char len;
  283. unsigned char byContext;
  284. } __attribute__ ((__packed__))
  285. WLAN_IE_ERP, *PWLAN_IE_ERP;
  286. #pragma pack(1)
  287. typedef struct _MEASEURE_REQ {
  288. unsigned char byChannel;
  289. unsigned char abyStartTime[8];
  290. unsigned char abyDuration[2];
  291. } MEASEURE_REQ, *PMEASEURE_REQ,
  292. MEASEURE_REQ_BASIC, *PMEASEURE_REQ_BASIC,
  293. MEASEURE_REQ_CCA, *PMEASEURE_REQ_CCA,
  294. MEASEURE_REQ_RPI, *PMEASEURE_REQ_RPI;
  295. typedef struct _MEASEURE_REP_BASIC {
  296. unsigned char byChannel;
  297. unsigned char abyStartTime[8];
  298. unsigned char abyDuration[2];
  299. unsigned char byMap;
  300. } MEASEURE_REP_BASIC, *PMEASEURE_REP_BASIC;
  301. typedef struct _MEASEURE_REP_CCA {
  302. unsigned char byChannel;
  303. unsigned char abyStartTime[8];
  304. unsigned char abyDuration[2];
  305. unsigned char byCCABusyFraction;
  306. } MEASEURE_REP_CCA, *PMEASEURE_REP_CCA;
  307. typedef struct _MEASEURE_REP_RPI {
  308. unsigned char byChannel;
  309. unsigned char abyStartTime[8];
  310. unsigned char abyDuration[2];
  311. unsigned char abyRPIdensity[8];
  312. } MEASEURE_REP_RPI, *PMEASEURE_REP_RPI;
  313. typedef union _MEASEURE_REP {
  314. MEASEURE_REP_BASIC sBasic;
  315. MEASEURE_REP_CCA sCCA;
  316. MEASEURE_REP_RPI sRPI;
  317. } MEASEURE_REP, *PMEASEURE_REP;
  318. typedef struct _WLAN_IE_MEASURE_REQ {
  319. unsigned char byElementID;
  320. unsigned char len;
  321. unsigned char byToken;
  322. unsigned char byMode;
  323. unsigned char byType;
  324. MEASEURE_REQ sReq;
  325. } WLAN_IE_MEASURE_REQ, *PWLAN_IE_MEASURE_REQ;
  326. typedef struct _WLAN_IE_MEASURE_REP {
  327. unsigned char byElementID;
  328. unsigned char len;
  329. unsigned char byToken;
  330. unsigned char byMode;
  331. unsigned char byType;
  332. MEASEURE_REP sRep;
  333. } WLAN_IE_MEASURE_REP, *PWLAN_IE_MEASURE_REP;
  334. typedef struct _WLAN_IE_CH_SW {
  335. unsigned char byElementID;
  336. unsigned char len;
  337. unsigned char byMode;
  338. unsigned char byChannel;
  339. unsigned char byCount;
  340. } WLAN_IE_CH_SW, *PWLAN_IE_CH_SW;
  341. typedef struct _WLAN_IE_QUIET {
  342. unsigned char byElementID;
  343. unsigned char len;
  344. unsigned char byQuietCount;
  345. unsigned char byQuietPeriod;
  346. unsigned char abyQuietDuration[2];
  347. unsigned char abyQuietOffset[2];
  348. } WLAN_IE_QUIET, *PWLAN_IE_QUIET;
  349. typedef struct _WLAN_IE_COUNTRY {
  350. unsigned char byElementID;
  351. unsigned char len;
  352. unsigned char abyCountryString[3];
  353. unsigned char abyCountryInfo[3];
  354. } WLAN_IE_COUNTRY, *PWLAN_IE_COUNTRY;
  355. typedef struct _WLAN_IE_PW_CONST {
  356. unsigned char byElementID;
  357. unsigned char len;
  358. unsigned char byPower;
  359. } WLAN_IE_PW_CONST, *PWLAN_IE_PW_CONST;
  360. typedef struct _WLAN_IE_PW_CAP {
  361. unsigned char byElementID;
  362. unsigned char len;
  363. unsigned char byMinPower;
  364. unsigned char byMaxPower;
  365. } WLAN_IE_PW_CAP, *PWLAN_IE_PW_CAP;
  366. typedef struct _WLAN_IE_SUPP_CH {
  367. unsigned char byElementID;
  368. unsigned char len;
  369. unsigned char abyChannelTuple[2];
  370. } WLAN_IE_SUPP_CH, *PWLAN_IE_SUPP_CH;
  371. typedef struct _WLAN_IE_TPC_REQ {
  372. unsigned char byElementID;
  373. unsigned char len;
  374. } WLAN_IE_TPC_REQ, *PWLAN_IE_TPC_REQ;
  375. typedef struct _WLAN_IE_TPC_REP {
  376. unsigned char byElementID;
  377. unsigned char len;
  378. unsigned char byTxPower;
  379. unsigned char byLinkMargin;
  380. } WLAN_IE_TPC_REP, *PWLAN_IE_TPC_REP;
  381. typedef struct _WLAN_IE_IBSS_DFS {
  382. unsigned char byElementID;
  383. unsigned char len;
  384. unsigned char abyDFSOwner[6];
  385. unsigned char byDFSRecovery;
  386. unsigned char abyChannelMap[2];
  387. } WLAN_IE_IBSS_DFS, *PWLAN_IE_IBSS_DFS;
  388. #pragma pack()
  389. /* Frame Types */
  390. /* prototype structure, all mgmt frame types will start with these members */
  391. typedef struct tagWLAN_FR_MGMT {
  392. unsigned int uType;
  393. unsigned int len;
  394. unsigned char *pBuf;
  395. PUWLAN_80211HDR pHdr;
  396. } WLAN_FR_MGMT, *PWLAN_FR_MGMT;
  397. /* Beacon frame */
  398. typedef struct tagWLAN_FR_BEACON {
  399. unsigned int uType;
  400. unsigned int len;
  401. unsigned char *pBuf;
  402. PUWLAN_80211HDR pHdr;
  403. __le64 *pqwTimestamp;
  404. unsigned short *pwBeaconInterval;
  405. unsigned short *pwCapInfo;
  406. PWLAN_IE_SSID pSSID;
  407. PWLAN_IE_SUPP_RATES pSuppRates;
  408. PWLAN_IE_DS_PARMS pDSParms;
  409. PWLAN_IE_CF_PARMS pCFParms;
  410. PWLAN_IE_TIM pTIM;
  411. PWLAN_IE_IBSS_PARMS pIBSSParms;
  412. PWLAN_IE_RSN pRSN;
  413. PWLAN_IE_RSN_EXT pRSNWPA;
  414. PWLAN_IE_ERP pERP;
  415. PWLAN_IE_SUPP_RATES pExtSuppRates;
  416. PWLAN_IE_COUNTRY pIE_Country;
  417. PWLAN_IE_PW_CONST pIE_PowerConstraint;
  418. PWLAN_IE_CH_SW pIE_CHSW;
  419. PWLAN_IE_IBSS_DFS pIE_IBSSDFS;
  420. PWLAN_IE_QUIET pIE_Quiet;
  421. } WLAN_FR_BEACON, *PWLAN_FR_BEACON;
  422. /* IBSS ATIM frame */
  423. typedef struct tagWLAN_FR_IBSSATIM {
  424. unsigned int uType;
  425. unsigned int len;
  426. unsigned char *pBuf;
  427. PUWLAN_80211HDR pHdr;
  428. } WLAN_FR_IBSSATIM, *PWLAN_FR_IBSSATIM;
  429. /* Disassociation */
  430. typedef struct tagWLAN_FR_DISASSOC {
  431. unsigned int uType;
  432. unsigned int len;
  433. unsigned char *pBuf;
  434. PUWLAN_80211HDR pHdr;
  435. unsigned short *pwReason;
  436. } WLAN_FR_DISASSOC, *PWLAN_FR_DISASSOC;
  437. /* Association Request */
  438. typedef struct tagWLAN_FR_ASSOCREQ {
  439. unsigned int uType;
  440. unsigned int len;
  441. unsigned char *pBuf;
  442. PUWLAN_80211HDR pHdr;
  443. unsigned short *pwCapInfo;
  444. unsigned short *pwListenInterval;
  445. PWLAN_IE_SSID pSSID;
  446. PWLAN_IE_SUPP_RATES pSuppRates;
  447. PWLAN_IE_RSN pRSN;
  448. PWLAN_IE_RSN_EXT pRSNWPA;
  449. PWLAN_IE_SUPP_RATES pExtSuppRates;
  450. PWLAN_IE_PW_CAP pCurrPowerCap;
  451. PWLAN_IE_SUPP_CH pCurrSuppCh;
  452. } WLAN_FR_ASSOCREQ, *PWLAN_FR_ASSOCREQ;
  453. /* Association Response */
  454. typedef struct tagWLAN_FR_ASSOCRESP {
  455. unsigned int uType;
  456. unsigned int len;
  457. unsigned char *pBuf;
  458. PUWLAN_80211HDR pHdr;
  459. unsigned short *pwCapInfo;
  460. unsigned short *pwStatus;
  461. unsigned short *pwAid;
  462. PWLAN_IE_SUPP_RATES pSuppRates;
  463. PWLAN_IE_SUPP_RATES pExtSuppRates;
  464. } WLAN_FR_ASSOCRESP, *PWLAN_FR_ASSOCRESP;
  465. /* Reassociation Request */
  466. typedef struct tagWLAN_FR_REASSOCREQ {
  467. unsigned int uType;
  468. unsigned int len;
  469. unsigned char *pBuf;
  470. PUWLAN_80211HDR pHdr;
  471. unsigned short *pwCapInfo;
  472. unsigned short *pwListenInterval;
  473. PIEEE_ADDR pAddrCurrAP;
  474. PWLAN_IE_SSID pSSID;
  475. PWLAN_IE_SUPP_RATES pSuppRates;
  476. PWLAN_IE_RSN pRSN;
  477. PWLAN_IE_RSN_EXT pRSNWPA;
  478. PWLAN_IE_SUPP_RATES pExtSuppRates;
  479. } WLAN_FR_REASSOCREQ, *PWLAN_FR_REASSOCREQ;
  480. /* Reassociation Response */
  481. typedef struct tagWLAN_FR_REASSOCRESP {
  482. unsigned int uType;
  483. unsigned int len;
  484. unsigned char *pBuf;
  485. PUWLAN_80211HDR pHdr;
  486. unsigned short *pwCapInfo;
  487. unsigned short *pwStatus;
  488. unsigned short *pwAid;
  489. PWLAN_IE_SUPP_RATES pSuppRates;
  490. PWLAN_IE_SUPP_RATES pExtSuppRates;
  491. } WLAN_FR_REASSOCRESP, *PWLAN_FR_REASSOCRESP;
  492. /* Probe Request */
  493. typedef struct tagWLAN_FR_PROBEREQ {
  494. unsigned int uType;
  495. unsigned int len;
  496. unsigned char *pBuf;
  497. PUWLAN_80211HDR pHdr;
  498. PWLAN_IE_SSID pSSID;
  499. PWLAN_IE_SUPP_RATES pSuppRates;
  500. PWLAN_IE_SUPP_RATES pExtSuppRates;
  501. } WLAN_FR_PROBEREQ, *PWLAN_FR_PROBEREQ;
  502. /* Probe Response */
  503. typedef struct tagWLAN_FR_PROBERESP {
  504. unsigned int uType;
  505. unsigned int len;
  506. unsigned char *pBuf;
  507. PUWLAN_80211HDR pHdr;
  508. __le64 *pqwTimestamp;
  509. unsigned short *pwBeaconInterval;
  510. unsigned short *pwCapInfo;
  511. PWLAN_IE_SSID pSSID;
  512. PWLAN_IE_SUPP_RATES pSuppRates;
  513. PWLAN_IE_DS_PARMS pDSParms;
  514. PWLAN_IE_CF_PARMS pCFParms;
  515. PWLAN_IE_IBSS_PARMS pIBSSParms;
  516. PWLAN_IE_RSN pRSN;
  517. PWLAN_IE_RSN_EXT pRSNWPA;
  518. PWLAN_IE_ERP pERP;
  519. PWLAN_IE_SUPP_RATES pExtSuppRates;
  520. PWLAN_IE_COUNTRY pIE_Country;
  521. PWLAN_IE_PW_CONST pIE_PowerConstraint;
  522. PWLAN_IE_CH_SW pIE_CHSW;
  523. PWLAN_IE_IBSS_DFS pIE_IBSSDFS;
  524. PWLAN_IE_QUIET pIE_Quiet;
  525. } WLAN_FR_PROBERESP, *PWLAN_FR_PROBERESP;
  526. /* Authentication */
  527. typedef struct tagWLAN_FR_AUTHEN {
  528. unsigned int uType;
  529. unsigned int len;
  530. unsigned char *pBuf;
  531. PUWLAN_80211HDR pHdr;
  532. unsigned short *pwAuthAlgorithm;
  533. unsigned short *pwAuthSequence;
  534. unsigned short *pwStatus;
  535. PWLAN_IE_CHALLENGE pChallenge;
  536. } WLAN_FR_AUTHEN, *PWLAN_FR_AUTHEN;
  537. /* Deauthenication */
  538. typedef struct tagWLAN_FR_DEAUTHEN {
  539. unsigned int uType;
  540. unsigned int len;
  541. unsigned char *pBuf;
  542. PUWLAN_80211HDR pHdr;
  543. unsigned short *pwReason;
  544. } WLAN_FR_DEAUTHEN, *PWLAN_FR_DEAUTHEN;
  545. void
  546. vMgrEncodeBeacon(
  547. PWLAN_FR_BEACON pFrame
  548. );
  549. void
  550. vMgrDecodeBeacon(
  551. PWLAN_FR_BEACON pFrame
  552. );
  553. void
  554. vMgrEncodeIBSSATIM(
  555. PWLAN_FR_IBSSATIM pFrame
  556. );
  557. void
  558. vMgrDecodeIBSSATIM(
  559. PWLAN_FR_IBSSATIM pFrame
  560. );
  561. void
  562. vMgrEncodeDisassociation(
  563. PWLAN_FR_DISASSOC pFrame
  564. );
  565. void
  566. vMgrDecodeDisassociation(
  567. PWLAN_FR_DISASSOC pFrame
  568. );
  569. void
  570. vMgrEncodeAssocRequest(
  571. PWLAN_FR_ASSOCREQ pFrame
  572. );
  573. void
  574. vMgrDecodeAssocRequest(
  575. PWLAN_FR_ASSOCREQ pFrame
  576. );
  577. void
  578. vMgrEncodeAssocResponse(
  579. PWLAN_FR_ASSOCRESP pFrame
  580. );
  581. void
  582. vMgrDecodeAssocResponse(
  583. PWLAN_FR_ASSOCRESP pFrame
  584. );
  585. void
  586. vMgrEncodeReassocRequest(
  587. PWLAN_FR_REASSOCREQ pFrame
  588. );
  589. void
  590. vMgrDecodeReassocRequest(
  591. PWLAN_FR_REASSOCREQ pFrame
  592. );
  593. void
  594. vMgrEncodeProbeRequest(
  595. PWLAN_FR_PROBEREQ pFrame
  596. );
  597. void
  598. vMgrDecodeProbeRequest(
  599. PWLAN_FR_PROBEREQ pFrame
  600. );
  601. void
  602. vMgrEncodeProbeResponse(
  603. PWLAN_FR_PROBERESP pFrame
  604. );
  605. void
  606. vMgrDecodeProbeResponse(
  607. PWLAN_FR_PROBERESP pFrame
  608. );
  609. void
  610. vMgrEncodeAuthen(
  611. PWLAN_FR_AUTHEN pFrame
  612. );
  613. void
  614. vMgrDecodeAuthen(
  615. PWLAN_FR_AUTHEN pFrame
  616. );
  617. void
  618. vMgrEncodeDeauthen(
  619. PWLAN_FR_DEAUTHEN pFrame
  620. );
  621. void
  622. vMgrDecodeDeauthen(
  623. PWLAN_FR_DEAUTHEN pFrame
  624. );
  625. void
  626. vMgrEncodeReassocResponse(
  627. PWLAN_FR_REASSOCRESP pFrame
  628. );
  629. void
  630. vMgrDecodeReassocResponse(
  631. PWLAN_FR_REASSOCRESP pFrame
  632. );
  633. #endif/* __80211MGR_H__ */