wmi.h 62 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226
  1. //------------------------------------------------------------------------------
  2. // <copyright file="wmi.h" company="Atheros">
  3. // Copyright (c) 2004-2008 Atheros Corporation. 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 version 2 as
  7. // published by the Free Software Foundation;
  8. //
  9. // Software distributed under the License is distributed on an "AS
  10. // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  11. // implied. See the License for the specific language governing
  12. // rights and limitations under the License.
  13. //
  14. //
  15. //------------------------------------------------------------------------------
  16. //==============================================================================
  17. // Author(s): ="Atheros"
  18. //==============================================================================
  19. /*
  20. * This file contains the definitions of the WMI protocol specified in the
  21. * Wireless Module Interface (WMI). It includes definitions of all the
  22. * commands and events. Commands are messages from the host to the WM.
  23. * Events and Replies are messages from the WM to the host.
  24. *
  25. * Ownership of correctness in regards to WMI commands
  26. * belongs to the host driver and the WM is not required to validate
  27. * parameters for value, proper range, or any other checking.
  28. *
  29. */
  30. #ifndef _WMI_H_
  31. #define _WMI_H_
  32. #ifndef ATH_TARGET
  33. #include "athstartpack.h"
  34. #endif
  35. #include "wmix.h"
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. #define HTC_PROTOCOL_VERSION 0x0002
  40. #define HTC_PROTOCOL_REVISION 0x0000
  41. #define WMI_PROTOCOL_VERSION 0x0002
  42. #define WMI_PROTOCOL_REVISION 0x0000
  43. #define ATH_MAC_LEN 6 /* length of mac in bytes */
  44. #define WMI_CMD_MAX_LEN 100
  45. #define WMI_CONTROL_MSG_MAX_LEN 256
  46. #define WMI_OPT_CONTROL_MSG_MAX_LEN 1536
  47. #define IS_ETHERTYPE(_typeOrLen) ((_typeOrLen) >= 0x0600)
  48. #define RFC1042OUI {0x00, 0x00, 0x00}
  49. #define IP_ETHERTYPE 0x0800
  50. #define WMI_IMPLICIT_PSTREAM 0xFF
  51. #define WMI_MAX_THINSTREAM 15
  52. struct host_app_area_s {
  53. A_UINT32 wmi_protocol_ver;
  54. };
  55. /*
  56. * Data Path
  57. */
  58. typedef PREPACK struct {
  59. A_UINT8 dstMac[ATH_MAC_LEN];
  60. A_UINT8 srcMac[ATH_MAC_LEN];
  61. A_UINT16 typeOrLen;
  62. } POSTPACK ATH_MAC_HDR;
  63. typedef PREPACK struct {
  64. A_UINT8 dsap;
  65. A_UINT8 ssap;
  66. A_UINT8 cntl;
  67. A_UINT8 orgCode[3];
  68. A_UINT16 etherType;
  69. } POSTPACK ATH_LLC_SNAP_HDR;
  70. typedef enum {
  71. DATA_MSGTYPE = 0x0,
  72. CNTL_MSGTYPE,
  73. SYNC_MSGTYPE,
  74. OPT_MSGTYPE,
  75. } WMI_MSG_TYPE;
  76. typedef PREPACK struct {
  77. A_INT8 rssi;
  78. A_UINT8 info; /* WMI_MSG_TYPE in lower 2 bits - b1b0 */
  79. /* UP in next 3 bits - b4b3b2 */
  80. #define WMI_DATA_HDR_MSG_TYPE_MASK 0x03
  81. #define WMI_DATA_HDR_MSG_TYPE_SHIFT 0
  82. #define WMI_DATA_HDR_UP_MASK 0x07
  83. #define WMI_DATA_HDR_UP_SHIFT 2
  84. #define WMI_DATA_HDR_IS_MSG_TYPE(h, t) (((h)->info & (WMI_DATA_HDR_MSG_TYPE_MASK)) == (t))
  85. /* In AP mode, the same bit (b5) is used to indicate Power save state in
  86. * the Rx dir and More data bit state in the tx direction.
  87. */
  88. #define WMI_DATA_HDR_PS_MASK 0x1
  89. #define WMI_DATA_HDR_PS_SHIFT 5
  90. #define WMI_DATA_HDR_MORE_MASK 0x1
  91. #define WMI_DATA_HDR_MORE_SHIFT 5
  92. #define WMI_DATA_HDR_SET_MORE_BIT(h) ((h)->info |= (WMI_DATA_HDR_MORE_MASK << WMI_DATA_HDR_MORE_SHIFT))
  93. } POSTPACK WMI_DATA_HDR;
  94. #define WMI_DATA_HDR_SET_MSG_TYPE(h, t) (h)->info = (((h)->info & ~(WMI_DATA_HDR_MSG_TYPE_MASK << WMI_DATA_HDR_MSG_TYPE_SHIFT)) | (t << WMI_DATA_HDR_MSG_TYPE_SHIFT))
  95. #define WMI_DATA_HDR_SET_UP(h, p) (h)->info = (((h)->info & ~(WMI_DATA_HDR_UP_MASK << WMI_DATA_HDR_UP_SHIFT)) | (p << WMI_DATA_HDR_UP_SHIFT))
  96. /*
  97. * Control Path
  98. */
  99. typedef PREPACK struct {
  100. A_UINT16 commandId;
  101. } POSTPACK WMI_CMD_HDR; /* used for commands and events */
  102. /*
  103. * List of Commnands
  104. */
  105. typedef enum {
  106. WMI_CONNECT_CMDID = 0x0001,
  107. WMI_RECONNECT_CMDID,
  108. WMI_DISCONNECT_CMDID,
  109. WMI_SYNCHRONIZE_CMDID,
  110. WMI_CREATE_PSTREAM_CMDID,
  111. WMI_DELETE_PSTREAM_CMDID,
  112. WMI_START_SCAN_CMDID,
  113. WMI_SET_SCAN_PARAMS_CMDID,
  114. WMI_SET_BSS_FILTER_CMDID,
  115. WMI_SET_PROBED_SSID_CMDID, /* 10 */
  116. WMI_SET_LISTEN_INT_CMDID,
  117. WMI_SET_BMISS_TIME_CMDID,
  118. WMI_SET_DISC_TIMEOUT_CMDID,
  119. WMI_GET_CHANNEL_LIST_CMDID,
  120. WMI_SET_BEACON_INT_CMDID,
  121. WMI_GET_STATISTICS_CMDID,
  122. WMI_SET_CHANNEL_PARAMS_CMDID,
  123. WMI_SET_POWER_MODE_CMDID,
  124. WMI_SET_IBSS_PM_CAPS_CMDID,
  125. WMI_SET_POWER_PARAMS_CMDID, /* 20 */
  126. WMI_SET_POWERSAVE_TIMERS_POLICY_CMDID,
  127. WMI_ADD_CIPHER_KEY_CMDID,
  128. WMI_DELETE_CIPHER_KEY_CMDID,
  129. WMI_ADD_KRK_CMDID,
  130. WMI_DELETE_KRK_CMDID,
  131. WMI_SET_PMKID_CMDID,
  132. WMI_SET_TX_PWR_CMDID,
  133. WMI_GET_TX_PWR_CMDID,
  134. WMI_SET_ASSOC_INFO_CMDID,
  135. WMI_ADD_BAD_AP_CMDID, /* 30 */
  136. WMI_DELETE_BAD_AP_CMDID,
  137. WMI_SET_TKIP_COUNTERMEASURES_CMDID,
  138. WMI_RSSI_THRESHOLD_PARAMS_CMDID,
  139. WMI_TARGET_ERROR_REPORT_BITMASK_CMDID,
  140. WMI_SET_ACCESS_PARAMS_CMDID,
  141. WMI_SET_RETRY_LIMITS_CMDID,
  142. WMI_SET_OPT_MODE_CMDID,
  143. WMI_OPT_TX_FRAME_CMDID,
  144. WMI_SET_VOICE_PKT_SIZE_CMDID,
  145. WMI_SET_MAX_SP_LEN_CMDID, /* 40 */
  146. WMI_SET_ROAM_CTRL_CMDID,
  147. WMI_GET_ROAM_TBL_CMDID,
  148. WMI_GET_ROAM_DATA_CMDID,
  149. WMI_ENABLE_RM_CMDID,
  150. WMI_SET_MAX_OFFHOME_DURATION_CMDID,
  151. WMI_EXTENSION_CMDID, /* Non-wireless extensions */
  152. WMI_SNR_THRESHOLD_PARAMS_CMDID,
  153. WMI_LQ_THRESHOLD_PARAMS_CMDID,
  154. WMI_SET_LPREAMBLE_CMDID,
  155. WMI_SET_RTS_CMDID, /* 50 */
  156. WMI_CLR_RSSI_SNR_CMDID,
  157. WMI_SET_FIXRATES_CMDID,
  158. WMI_GET_FIXRATES_CMDID,
  159. WMI_SET_AUTH_MODE_CMDID,
  160. WMI_SET_REASSOC_MODE_CMDID,
  161. WMI_SET_WMM_CMDID,
  162. WMI_SET_WMM_TXOP_CMDID,
  163. WMI_TEST_CMDID,
  164. WMI_SET_BT_STATUS_CMDID,
  165. WMI_SET_BT_PARAMS_CMDID, /* 60 */
  166. WMI_SET_KEEPALIVE_CMDID,
  167. WMI_GET_KEEPALIVE_CMDID,
  168. WMI_SET_APPIE_CMDID,
  169. WMI_GET_APPIE_CMDID,
  170. WMI_SET_WSC_STATUS_CMDID,
  171. /* Wake on Wireless */
  172. WMI_SET_HOST_SLEEP_MODE_CMDID,
  173. WMI_SET_WOW_MODE_CMDID,
  174. WMI_GET_WOW_LIST_CMDID,
  175. WMI_ADD_WOW_PATTERN_CMDID,
  176. WMI_DEL_WOW_PATTERN_CMDID, /* 70 */
  177. WMI_SET_FRAMERATES_CMDID,
  178. /*
  179. * Developer commands starts at 0xF000
  180. */
  181. WMI_SET_BITRATE_CMDID = 0xF000,
  182. WMI_GET_BITRATE_CMDID,
  183. WMI_SET_WHALPARAM_CMDID,
  184. /*Should add the new command to the tail for compatible with
  185. * etna.
  186. */
  187. WMI_SET_MAC_ADDRESS_CMDID,
  188. WMI_SET_AKMP_PARAMS_CMDID,
  189. WMI_SET_PMKID_LIST_CMDID,
  190. WMI_GET_PMKID_LIST_CMDID,
  191. WMI_ABORT_SCAN_CMDID,
  192. WMI_SET_TARGET_EVENT_REPORT_CMDID,
  193. // Pyxis specific Command IDs
  194. WMI_PYXIS_CONFIG_CMDID,
  195. WMI_PYXIS_OPERATION_CMDID, /* 0xF00A */
  196. /*
  197. * AP mode commands
  198. */
  199. WMI_AP_HIDDEN_SSID_CMDID,
  200. WMI_AP_SET_NUM_STA_CMDID,
  201. WMI_AP_ACL_POLICY_CMDID,
  202. WMI_AP_ACL_MAC_LIST_CMDID,
  203. WMI_AP_CONFIG_COMMIT_CMDID,
  204. WMI_AP_SET_MLME_CMDID,
  205. WMI_AP_SET_PVB_CMDID,
  206. WMI_AP_CONN_INACT_CMDID,
  207. WMI_AP_PROT_SCAN_TIME_CMDID,
  208. WMI_SET_COUNTRY_CMDID, /* 0xF014 */
  209. WMI_AP_SET_DTIM_CMDID,
  210. WMI_SET_IP_CMDID,
  211. WMI_SET_PARAMS_CMDID,
  212. WMI_SET_MCAST_FILTER_CMDID,
  213. WMI_DEL_MCAST_FILTER_CMDID
  214. } WMI_COMMAND_ID;
  215. /*
  216. * Frame Types
  217. */
  218. typedef enum {
  219. WMI_FRAME_BEACON = 0,
  220. WMI_FRAME_PROBE_REQ,
  221. WMI_FRAME_PROBE_RESP,
  222. WMI_FRAME_ASSOC_REQ,
  223. WMI_FRAME_ASSOC_RESP,
  224. WMI_NUM_MGMT_FRAME
  225. } WMI_MGMT_FRAME_TYPE;
  226. /*
  227. * Connect Command
  228. */
  229. typedef enum {
  230. INFRA_NETWORK = 0x01,
  231. ADHOC_NETWORK = 0x02,
  232. ADHOC_CREATOR = 0x04,
  233. OPT_NETWORK = 0x08,
  234. AP_NETWORK = 0x10,
  235. } NETWORK_TYPE;
  236. typedef enum {
  237. OPEN_AUTH = 0x01,
  238. SHARED_AUTH = 0x02,
  239. LEAP_AUTH = 0x04, /* different from IEEE_AUTH_MODE definitions */
  240. } DOT11_AUTH_MODE;
  241. typedef enum {
  242. NONE_AUTH = 0x01,
  243. WPA_AUTH = 0x02,
  244. WPA_PSK_AUTH = 0x03,
  245. WPA2_AUTH = 0x04,
  246. WPA2_PSK_AUTH = 0x05,
  247. WPA_AUTH_CCKM = 0x06,
  248. WPA2_AUTH_CCKM = 0x07,
  249. } AUTH_MODE;
  250. typedef enum {
  251. NONE_CRYPT = 0x01,
  252. WEP_CRYPT = 0x02,
  253. TKIP_CRYPT = 0x03,
  254. AES_CRYPT = 0x04,
  255. #ifdef WAPI_ENABLE
  256. WAPI_CRYPT = 0x05,
  257. #endif /* WAPI_ENABLE */
  258. } CRYPTO_TYPE;
  259. #ifdef WAPI_ENABLE
  260. #define IW_ENCODE_ALG_SM4 0x20
  261. #define IW_AUTH_WAPI_ENABLED 0x20
  262. #endif /* WAPI_ENABLE */
  263. #define WMI_MIN_CRYPTO_TYPE NONE_CRYPT
  264. #define WMI_MAX_CRYPTO_TYPE (AES_CRYPT + 1)
  265. #ifdef WAPI_ENABLE
  266. #undef WMI_MAX_CRYPTO_TYPE
  267. #define WMI_MAX_CRYPTO_TYPE (WAPI_CRYPT + 1)
  268. #endif /* WAPI_ENABLE */
  269. #define WMI_MIN_KEY_INDEX 0
  270. #define WMI_MAX_KEY_INDEX 3
  271. #ifdef WAPI_ENABLE
  272. #undef WMI_MAX_KEY_INDEX
  273. #define WMI_MAX_KEY_INDEX 7 /* wapi grpKey 0-3, prwKey 4-7 */
  274. #endif /* WAPI_ENABLE */
  275. #define WMI_MAX_KEY_LEN 32
  276. #define WMI_MAX_SSID_LEN 32
  277. typedef enum {
  278. CONNECT_ASSOC_POLICY_USER = 0x0001,
  279. CONNECT_SEND_REASSOC = 0x0002,
  280. CONNECT_IGNORE_WPAx_GROUP_CIPHER = 0x0004,
  281. CONNECT_PROFILE_MATCH_DONE = 0x0008,
  282. CONNECT_IGNORE_AAC_BEACON = 0x0010,
  283. CONNECT_CSA_FOLLOW_BSS = 0x0020,
  284. CONNECT_PYXIS_REMOTE = 0x0040,
  285. } WMI_CONNECT_CTRL_FLAGS_BITS;
  286. #define DEFAULT_CONNECT_CTRL_FLAGS (CONNECT_CSA_FOLLOW_BSS)
  287. typedef PREPACK struct {
  288. A_UINT8 networkType;
  289. A_UINT8 dot11AuthMode;
  290. A_UINT8 authMode;
  291. A_UINT8 pairwiseCryptoType;
  292. A_UINT8 pairwiseCryptoLen;
  293. A_UINT8 groupCryptoType;
  294. A_UINT8 groupCryptoLen;
  295. A_UINT8 ssidLength;
  296. A_UCHAR ssid[WMI_MAX_SSID_LEN];
  297. A_UINT16 channel;
  298. A_UINT8 bssid[ATH_MAC_LEN];
  299. A_UINT32 ctrl_flags;
  300. } POSTPACK WMI_CONNECT_CMD;
  301. /*
  302. * WMI_RECONNECT_CMDID
  303. */
  304. typedef PREPACK struct {
  305. A_UINT16 channel; /* hint */
  306. A_UINT8 bssid[ATH_MAC_LEN]; /* mandatory if set */
  307. } POSTPACK WMI_RECONNECT_CMD;
  308. /*
  309. * WMI_ADD_CIPHER_KEY_CMDID
  310. */
  311. typedef enum {
  312. PAIRWISE_USAGE = 0x00,
  313. GROUP_USAGE = 0x01,
  314. TX_USAGE = 0x02, /* default Tx Key - Static WEP only */
  315. } KEY_USAGE;
  316. /*
  317. * Bit Flag
  318. * Bit 0 - Initialise TSC - default is Initialize
  319. */
  320. #define KEY_OP_INIT_TSC 0x01
  321. #define KEY_OP_INIT_RSC 0x02
  322. #ifdef WAPI_ENABLE
  323. #define KEY_OP_INIT_WAPIPN 0x10
  324. #endif /* WAPI_ENABLE */
  325. #define KEY_OP_INIT_VAL 0x03 /* Default Initialise the TSC & RSC */
  326. #define KEY_OP_VALID_MASK 0x03
  327. typedef PREPACK struct {
  328. A_UINT8 keyIndex;
  329. A_UINT8 keyType;
  330. A_UINT8 keyUsage; /* KEY_USAGE */
  331. A_UINT8 keyLength;
  332. A_UINT8 keyRSC[8]; /* key replay sequence counter */
  333. A_UINT8 key[WMI_MAX_KEY_LEN];
  334. A_UINT8 key_op_ctrl; /* Additional Key Control information */
  335. A_UINT8 key_macaddr[ATH_MAC_LEN];
  336. } POSTPACK WMI_ADD_CIPHER_KEY_CMD;
  337. /*
  338. * WMI_DELETE_CIPHER_KEY_CMDID
  339. */
  340. typedef PREPACK struct {
  341. A_UINT8 keyIndex;
  342. } POSTPACK WMI_DELETE_CIPHER_KEY_CMD;
  343. #define WMI_KRK_LEN 16
  344. /*
  345. * WMI_ADD_KRK_CMDID
  346. */
  347. typedef PREPACK struct {
  348. A_UINT8 krk[WMI_KRK_LEN];
  349. } POSTPACK WMI_ADD_KRK_CMD;
  350. /*
  351. * WMI_SET_TKIP_COUNTERMEASURES_CMDID
  352. */
  353. typedef enum {
  354. WMI_TKIP_CM_DISABLE = 0x0,
  355. WMI_TKIP_CM_ENABLE = 0x1,
  356. } WMI_TKIP_CM_CONTROL;
  357. typedef PREPACK struct {
  358. A_UINT8 cm_en; /* WMI_TKIP_CM_CONTROL */
  359. } POSTPACK WMI_SET_TKIP_COUNTERMEASURES_CMD;
  360. /*
  361. * WMI_SET_PMKID_CMDID
  362. */
  363. #define WMI_PMKID_LEN 16
  364. typedef enum {
  365. PMKID_DISABLE = 0,
  366. PMKID_ENABLE = 1,
  367. } PMKID_ENABLE_FLG;
  368. typedef PREPACK struct {
  369. A_UINT8 bssid[ATH_MAC_LEN];
  370. A_UINT8 enable; /* PMKID_ENABLE_FLG */
  371. A_UINT8 pmkid[WMI_PMKID_LEN];
  372. } POSTPACK WMI_SET_PMKID_CMD;
  373. /*
  374. * WMI_START_SCAN_CMD
  375. */
  376. typedef enum {
  377. WMI_LONG_SCAN = 0,
  378. WMI_SHORT_SCAN = 1,
  379. WMI_PYXIS_PAS_DSCVR = 0,
  380. WMI_PYXIS_ACT_DSCVR = 1,
  381. } WMI_SCAN_TYPE;
  382. typedef PREPACK struct {
  383. A_BOOL forceFgScan;
  384. A_BOOL isLegacy; /* For Legacy Cisco AP compatibility */
  385. A_UINT32 homeDwellTime; /* Maximum duration in the home channel(milliseconds) */
  386. A_UINT32 forceScanInterval; /* Time interval between scans (milliseconds)*/
  387. A_UINT8 scanType; /* WMI_SCAN_TYPE */
  388. A_UINT8 numChannels; /* how many channels follow */
  389. A_UINT16 channelList[1]; /* channels in Mhz */
  390. } POSTPACK WMI_START_SCAN_CMD;
  391. /*
  392. * WMI_SET_SCAN_PARAMS_CMDID
  393. */
  394. #define WMI_SHORTSCANRATIO_DEFAULT 3
  395. typedef enum {
  396. CONNECT_SCAN_CTRL_FLAGS = 0x01, /* set if can scan in the Connect cmd */
  397. SCAN_CONNECTED_CTRL_FLAGS = 0x02, /* set if scan for the SSID it is */
  398. /* already connected to */
  399. ACTIVE_SCAN_CTRL_FLAGS = 0x04, /* set if enable active scan */
  400. ROAM_SCAN_CTRL_FLAGS = 0x08, /* set if enable roam scan when bmiss and lowrssi */
  401. REPORT_BSSINFO_CTRL_FLAGS = 0x10, /* set if follows customer BSSINFO reporting rule */
  402. ENABLE_AUTO_CTRL_FLAGS = 0x20, /* if disabled, target doesn't
  403. scan after a disconnect event */
  404. ENABLE_SCAN_ABORT_EVENT = 0x40 /* Scan complete event with canceled status will be generated when a scan is prempted before it gets completed */
  405. } WMI_SCAN_CTRL_FLAGS_BITS;
  406. #define CAN_SCAN_IN_CONNECT(flags) (flags & CONNECT_SCAN_CTRL_FLAGS)
  407. #define CAN_SCAN_CONNECTED(flags) (flags & SCAN_CONNECTED_CTRL_FLAGS)
  408. #define ENABLE_ACTIVE_SCAN(flags) (flags & ACTIVE_SCAN_CTRL_FLAGS)
  409. #define ENABLE_ROAM_SCAN(flags) (flags & ROAM_SCAN_CTRL_FLAGS)
  410. #define CONFIG_REPORT_BSSINFO(flags) (flags & REPORT_BSSINFO_CTRL_FLAGS)
  411. #define IS_AUTO_SCAN_ENABLED(flags) (flags & ENABLE_AUTO_CTRL_FLAGS)
  412. #define SCAN_ABORT_EVENT_ENABLED(flags) (flags & ENABLE_SCAN_ABORT_EVENT)
  413. #define DEFAULT_SCAN_CTRL_FLAGS (CONNECT_SCAN_CTRL_FLAGS| SCAN_CONNECTED_CTRL_FLAGS| ACTIVE_SCAN_CTRL_FLAGS| ROAM_SCAN_CTRL_FLAGS | ENABLE_AUTO_CTRL_FLAGS)
  414. typedef PREPACK struct {
  415. A_UINT16 fg_start_period; /* seconds */
  416. A_UINT16 fg_end_period; /* seconds */
  417. A_UINT16 bg_period; /* seconds */
  418. A_UINT16 maxact_chdwell_time; /* msec */
  419. A_UINT16 pas_chdwell_time; /* msec */
  420. A_UINT8 shortScanRatio; /* how many shorts scan for one long */
  421. A_UINT8 scanCtrlFlags;
  422. A_UINT16 minact_chdwell_time; /* msec */
  423. A_UINT16 maxact_scan_per_ssid; /* max active scans per ssid */
  424. A_UINT32 max_dfsch_act_time; /* msecs */
  425. } POSTPACK WMI_SCAN_PARAMS_CMD;
  426. /*
  427. * WMI_SET_BSS_FILTER_CMDID
  428. */
  429. typedef enum {
  430. NONE_BSS_FILTER = 0x0, /* no beacons forwarded */
  431. ALL_BSS_FILTER, /* all beacons forwarded */
  432. PROFILE_FILTER, /* only beacons matching profile */
  433. ALL_BUT_PROFILE_FILTER, /* all but beacons matching profile */
  434. CURRENT_BSS_FILTER, /* only beacons matching current BSS */
  435. ALL_BUT_BSS_FILTER, /* all but beacons matching BSS */
  436. PROBED_SSID_FILTER, /* beacons matching probed ssid */
  437. LAST_BSS_FILTER, /* marker only */
  438. } WMI_BSS_FILTER;
  439. typedef PREPACK struct {
  440. A_UINT8 bssFilter; /* see WMI_BSS_FILTER */
  441. A_UINT8 reserved1; /* For alignment */
  442. A_UINT16 reserved2; /* For alignment */
  443. A_UINT32 ieMask;
  444. } POSTPACK WMI_BSS_FILTER_CMD;
  445. /*
  446. * WMI_SET_PROBED_SSID_CMDID
  447. */
  448. #define MAX_PROBED_SSID_INDEX 5
  449. typedef enum {
  450. DISABLE_SSID_FLAG = 0, /* disables entry */
  451. SPECIFIC_SSID_FLAG = 0x01, /* probes specified ssid */
  452. ANY_SSID_FLAG = 0x02, /* probes for any ssid */
  453. } WMI_SSID_FLAG;
  454. typedef PREPACK struct {
  455. A_UINT8 entryIndex; /* 0 to MAX_PROBED_SSID_INDEX */
  456. A_UINT8 flag; /* WMI_SSID_FLG */
  457. A_UINT8 ssidLength;
  458. A_UINT8 ssid[32];
  459. } POSTPACK WMI_PROBED_SSID_CMD;
  460. /*
  461. * WMI_SET_LISTEN_INT_CMDID
  462. * The Listen interval is between 15 and 3000 TUs
  463. */
  464. #define MIN_LISTEN_INTERVAL 15
  465. #define MAX_LISTEN_INTERVAL 5000
  466. #define MIN_LISTEN_BEACONS 1
  467. #define MAX_LISTEN_BEACONS 50
  468. typedef PREPACK struct {
  469. A_UINT16 listenInterval;
  470. A_UINT16 numBeacons;
  471. } POSTPACK WMI_LISTEN_INT_CMD;
  472. /*
  473. * WMI_SET_BEACON_INT_CMDID
  474. */
  475. typedef PREPACK struct {
  476. A_UINT16 beaconInterval;
  477. } POSTPACK WMI_BEACON_INT_CMD;
  478. /*
  479. * WMI_SET_BMISS_TIME_CMDID
  480. * valid values are between 1000 and 5000 TUs
  481. */
  482. #define MIN_BMISS_TIME 1000
  483. #define MAX_BMISS_TIME 5000
  484. #define MIN_BMISS_BEACONS 1
  485. #define MAX_BMISS_BEACONS 50
  486. typedef PREPACK struct {
  487. A_UINT16 bmissTime;
  488. A_UINT16 numBeacons;
  489. } POSTPACK WMI_BMISS_TIME_CMD;
  490. /*
  491. * WMI_SET_POWER_MODE_CMDID
  492. */
  493. typedef enum {
  494. REC_POWER = 0x01,
  495. MAX_PERF_POWER,
  496. } WMI_POWER_MODE;
  497. typedef PREPACK struct {
  498. A_UINT8 powerMode; /* WMI_POWER_MODE */
  499. } POSTPACK WMI_POWER_MODE_CMD;
  500. typedef PREPACK struct {
  501. A_INT8 status; /* WMI_SET_PARAMS_REPLY */
  502. } POSTPACK WMI_SET_PARAMS_REPLY;
  503. typedef PREPACK struct {
  504. A_UINT32 opcode;
  505. A_UINT32 length;
  506. A_CHAR buffer[1]; /* WMI_SET_PARAMS */
  507. } POSTPACK WMI_SET_PARAMS_CMD;
  508. typedef PREPACK struct {
  509. A_UINT8 multicast_mac[ATH_MAC_LEN]; /* WMI_SET_MCAST_FILTER */
  510. } POSTPACK WMI_SET_MCAST_FILTER_CMD;
  511. /*
  512. * WMI_SET_POWER_PARAMS_CMDID
  513. */
  514. typedef enum {
  515. IGNORE_DTIM = 0x01,
  516. NORMAL_DTIM = 0x02,
  517. STICK_DTIM = 0x03,
  518. } WMI_DTIM_POLICY;
  519. typedef PREPACK struct {
  520. A_UINT16 idle_period; /* msec */
  521. A_UINT16 pspoll_number;
  522. A_UINT16 dtim_policy;
  523. } POSTPACK WMI_POWER_PARAMS_CMD;
  524. typedef PREPACK struct {
  525. A_UINT8 power_saving;
  526. A_UINT8 ttl; /* number of beacon periods */
  527. A_UINT16 atim_windows; /* msec */
  528. A_UINT16 timeout_value; /* msec */
  529. } POSTPACK WMI_IBSS_PM_CAPS_CMD;
  530. /*
  531. * WMI_SET_POWERSAVE_TIMERS_POLICY_CMDID
  532. */
  533. typedef enum {
  534. IGNORE_TIM_ALL_QUEUES_APSD = 0,
  535. PROCESS_TIM_ALL_QUEUES_APSD = 1,
  536. IGNORE_TIM_SIMULATED_APSD = 2,
  537. PROCESS_TIM_SIMULATED_APSD = 3,
  538. } APSD_TIM_POLICY;
  539. typedef PREPACK struct {
  540. A_UINT16 psPollTimeout; /* msec */
  541. A_UINT16 triggerTimeout; /* msec */
  542. A_UINT32 apsdTimPolicy; /* TIM behavior with ques APSD enabled. Default is IGNORE_TIM_ALL_QUEUES_APSD */
  543. A_UINT32 simulatedAPSDTimPolicy; /* TIM behavior with simulated APSD enabled. Default is PROCESS_TIM_SIMULATED_APSD */
  544. } POSTPACK WMI_POWERSAVE_TIMERS_POLICY_CMD;
  545. /*
  546. * WMI_SET_VOICE_PKT_SIZE_CMDID
  547. */
  548. typedef PREPACK struct {
  549. A_UINT16 voicePktSize;
  550. } POSTPACK WMI_SET_VOICE_PKT_SIZE_CMD;
  551. /*
  552. * WMI_SET_MAX_SP_LEN_CMDID
  553. */
  554. typedef enum {
  555. DELIVER_ALL_PKT = 0x0,
  556. DELIVER_2_PKT = 0x1,
  557. DELIVER_4_PKT = 0x2,
  558. DELIVER_6_PKT = 0x3,
  559. } APSD_SP_LEN_TYPE;
  560. typedef PREPACK struct {
  561. A_UINT8 maxSPLen;
  562. } POSTPACK WMI_SET_MAX_SP_LEN_CMD;
  563. /*
  564. * WMI_SET_DISC_TIMEOUT_CMDID
  565. */
  566. typedef PREPACK struct {
  567. A_UINT8 disconnectTimeout; /* seconds */
  568. } POSTPACK WMI_DISC_TIMEOUT_CMD;
  569. typedef enum {
  570. UPLINK_TRAFFIC = 0,
  571. DNLINK_TRAFFIC = 1,
  572. BIDIR_TRAFFIC = 2,
  573. } DIR_TYPE;
  574. typedef enum {
  575. DISABLE_FOR_THIS_AC = 0,
  576. ENABLE_FOR_THIS_AC = 1,
  577. ENABLE_FOR_ALL_AC = 2,
  578. } VOICEPS_CAP_TYPE;
  579. typedef enum {
  580. TRAFFIC_TYPE_APERIODIC = 0,
  581. TRAFFIC_TYPE_PERIODIC = 1,
  582. }TRAFFIC_TYPE;
  583. /*
  584. * WMI_SYNCHRONIZE_CMDID
  585. */
  586. typedef PREPACK struct {
  587. A_UINT8 dataSyncMap;
  588. } POSTPACK WMI_SYNC_CMD;
  589. /*
  590. * WMI_CREATE_PSTREAM_CMDID
  591. */
  592. typedef PREPACK struct {
  593. A_UINT32 minServiceInt; /* in milli-sec */
  594. A_UINT32 maxServiceInt; /* in milli-sec */
  595. A_UINT32 inactivityInt; /* in milli-sec */
  596. A_UINT32 suspensionInt; /* in milli-sec */
  597. A_UINT32 serviceStartTime;
  598. A_UINT32 minDataRate; /* in bps */
  599. A_UINT32 meanDataRate; /* in bps */
  600. A_UINT32 peakDataRate; /* in bps */
  601. A_UINT32 maxBurstSize;
  602. A_UINT32 delayBound;
  603. A_UINT32 minPhyRate; /* in bps */
  604. A_UINT32 sba;
  605. A_UINT32 mediumTime;
  606. A_UINT16 nominalMSDU; /* in octects */
  607. A_UINT16 maxMSDU; /* in octects */
  608. A_UINT8 trafficClass;
  609. A_UINT8 trafficDirection; /* DIR_TYPE */
  610. A_UINT8 rxQueueNum;
  611. A_UINT8 trafficType; /* TRAFFIC_TYPE */
  612. A_UINT8 voicePSCapability; /* VOICEPS_CAP_TYPE */
  613. A_UINT8 tsid;
  614. A_UINT8 userPriority; /* 802.1D user priority */
  615. A_UINT8 nominalPHY; /* nominal phy rate */
  616. } POSTPACK WMI_CREATE_PSTREAM_CMD;
  617. /*
  618. * WMI_DELETE_PSTREAM_CMDID
  619. */
  620. typedef PREPACK struct {
  621. A_UINT8 txQueueNumber;
  622. A_UINT8 rxQueueNumber;
  623. A_UINT8 trafficDirection;
  624. A_UINT8 trafficClass;
  625. A_UINT8 tsid;
  626. } POSTPACK WMI_DELETE_PSTREAM_CMD;
  627. /*
  628. * WMI_SET_CHANNEL_PARAMS_CMDID
  629. */
  630. typedef enum {
  631. WMI_11A_MODE = 0x1,
  632. WMI_11G_MODE = 0x2,
  633. WMI_11AG_MODE = 0x3,
  634. WMI_11B_MODE = 0x4,
  635. WMI_11GONLY_MODE = 0x5,
  636. } WMI_PHY_MODE;
  637. #define WMI_MAX_CHANNELS 32
  638. typedef PREPACK struct {
  639. A_UINT8 reserved1;
  640. A_UINT8 scanParam; /* set if enable scan */
  641. A_UINT8 phyMode; /* see WMI_PHY_MODE */
  642. A_UINT8 numChannels; /* how many channels follow */
  643. A_UINT16 channelList[1]; /* channels in Mhz */
  644. } POSTPACK WMI_CHANNEL_PARAMS_CMD;
  645. /*
  646. * WMI_RSSI_THRESHOLD_PARAMS_CMDID
  647. * Setting the polltime to 0 would disable polling.
  648. * Threshold values are in the ascending order, and should agree to:
  649. * (lowThreshold_lowerVal < lowThreshold_upperVal < highThreshold_lowerVal
  650. * < highThreshold_upperVal)
  651. */
  652. typedef PREPACK struct WMI_RSSI_THRESHOLD_PARAMS{
  653. A_UINT32 pollTime; /* Polling time as a factor of LI */
  654. A_INT16 thresholdAbove1_Val; /* lowest of upper */
  655. A_INT16 thresholdAbove2_Val;
  656. A_INT16 thresholdAbove3_Val;
  657. A_INT16 thresholdAbove4_Val;
  658. A_INT16 thresholdAbove5_Val;
  659. A_INT16 thresholdAbove6_Val; /* highest of upper */
  660. A_INT16 thresholdBelow1_Val; /* lowest of bellow */
  661. A_INT16 thresholdBelow2_Val;
  662. A_INT16 thresholdBelow3_Val;
  663. A_INT16 thresholdBelow4_Val;
  664. A_INT16 thresholdBelow5_Val;
  665. A_INT16 thresholdBelow6_Val; /* highest of bellow */
  666. A_UINT8 weight; /* "alpha" */
  667. A_UINT8 reserved[3];
  668. } POSTPACK WMI_RSSI_THRESHOLD_PARAMS_CMD;
  669. /*
  670. * WMI_SNR_THRESHOLD_PARAMS_CMDID
  671. * Setting the polltime to 0 would disable polling.
  672. */
  673. typedef PREPACK struct WMI_SNR_THRESHOLD_PARAMS{
  674. A_UINT32 pollTime; /* Polling time as a factor of LI */
  675. A_UINT8 weight; /* "alpha" */
  676. A_UINT8 thresholdAbove1_Val; /* lowest of uppper*/
  677. A_UINT8 thresholdAbove2_Val;
  678. A_UINT8 thresholdAbove3_Val;
  679. A_UINT8 thresholdAbove4_Val; /* highest of upper */
  680. A_UINT8 thresholdBelow1_Val; /* lowest of bellow */
  681. A_UINT8 thresholdBelow2_Val;
  682. A_UINT8 thresholdBelow3_Val;
  683. A_UINT8 thresholdBelow4_Val; /* highest of bellow */
  684. A_UINT8 reserved[3];
  685. } POSTPACK WMI_SNR_THRESHOLD_PARAMS_CMD;
  686. /*
  687. * WMI_LQ_THRESHOLD_PARAMS_CMDID
  688. */
  689. typedef PREPACK struct WMI_LQ_THRESHOLD_PARAMS {
  690. A_UINT8 enable;
  691. A_UINT8 thresholdAbove1_Val;
  692. A_UINT8 thresholdAbove2_Val;
  693. A_UINT8 thresholdAbove3_Val;
  694. A_UINT8 thresholdAbove4_Val;
  695. A_UINT8 thresholdBelow1_Val;
  696. A_UINT8 thresholdBelow2_Val;
  697. A_UINT8 thresholdBelow3_Val;
  698. A_UINT8 thresholdBelow4_Val;
  699. A_UINT8 reserved[3];
  700. } POSTPACK WMI_LQ_THRESHOLD_PARAMS_CMD;
  701. typedef enum {
  702. WMI_LPREAMBLE_DISABLED = 0,
  703. WMI_LPREAMBLE_ENABLED
  704. } WMI_LPREAMBLE_STATUS;
  705. typedef PREPACK struct {
  706. A_UINT8 status;
  707. }POSTPACK WMI_SET_LPREAMBLE_CMD;
  708. typedef PREPACK struct {
  709. A_UINT16 threshold;
  710. }POSTPACK WMI_SET_RTS_CMD;
  711. /*
  712. * WMI_TARGET_ERROR_REPORT_BITMASK_CMDID
  713. * Sets the error reporting event bitmask in target. Target clears it
  714. * upon an error. Subsequent errors are counted, but not reported
  715. * via event, unless the bitmask is set again.
  716. */
  717. typedef PREPACK struct {
  718. A_UINT32 bitmask;
  719. } POSTPACK WMI_TARGET_ERROR_REPORT_BITMASK;
  720. /*
  721. * WMI_SET_TX_PWR_CMDID
  722. */
  723. typedef PREPACK struct {
  724. A_UINT8 dbM; /* in dbM units */
  725. } POSTPACK WMI_SET_TX_PWR_CMD, WMI_TX_PWR_REPLY;
  726. /*
  727. * WMI_SET_ASSOC_INFO_CMDID
  728. *
  729. * A maximum of 2 private IEs can be sent in the [Re]Assoc request.
  730. * A 3rd one, the CCX version IE can also be set from the host.
  731. */
  732. #define WMI_MAX_ASSOC_INFO_TYPE 2
  733. #define WMI_CCX_VER_IE 2 /* ieType to set CCX Version IE */
  734. #define WMI_MAX_ASSOC_INFO_LEN 240
  735. typedef PREPACK struct {
  736. A_UINT8 ieType;
  737. A_UINT8 bufferSize;
  738. A_UINT8 assocInfo[1]; /* up to WMI_MAX_ASSOC_INFO_LEN */
  739. } POSTPACK WMI_SET_ASSOC_INFO_CMD;
  740. /*
  741. * WMI_GET_TX_PWR_CMDID does not take any parameters
  742. */
  743. /*
  744. * WMI_ADD_BAD_AP_CMDID
  745. */
  746. #define WMI_MAX_BAD_AP_INDEX 1
  747. typedef PREPACK struct {
  748. A_UINT8 badApIndex; /* 0 to WMI_MAX_BAD_AP_INDEX */
  749. A_UINT8 bssid[ATH_MAC_LEN];
  750. } POSTPACK WMI_ADD_BAD_AP_CMD;
  751. /*
  752. * WMI_DELETE_BAD_AP_CMDID
  753. */
  754. typedef PREPACK struct {
  755. A_UINT8 badApIndex; /* 0 to WMI_MAX_BAD_AP_INDEX */
  756. } POSTPACK WMI_DELETE_BAD_AP_CMD;
  757. /*
  758. * WMI_SET_ACCESS_PARAMS_CMDID
  759. */
  760. #define WMI_DEFAULT_TXOP_ACPARAM 0 /* implies one MSDU */
  761. #define WMI_DEFAULT_ECWMIN_ACPARAM 4 /* corresponds to CWmin of 15 */
  762. #define WMI_DEFAULT_ECWMAX_ACPARAM 10 /* corresponds to CWmax of 1023 */
  763. #define WMI_MAX_CW_ACPARAM 15 /* maximum eCWmin or eCWmax */
  764. #define WMI_DEFAULT_AIFSN_ACPARAM 2
  765. #define WMI_MAX_AIFSN_ACPARAM 15
  766. typedef PREPACK struct {
  767. A_UINT16 txop; /* in units of 32 usec */
  768. A_UINT8 eCWmin;
  769. A_UINT8 eCWmax;
  770. A_UINT8 aifsn;
  771. } POSTPACK WMI_SET_ACCESS_PARAMS_CMD;
  772. /*
  773. * WMI_SET_RETRY_LIMITS_CMDID
  774. *
  775. * This command is used to customize the number of retries the
  776. * wlan device will perform on a given frame.
  777. */
  778. #define WMI_MIN_RETRIES 2
  779. #define WMI_MAX_RETRIES 13
  780. typedef enum {
  781. MGMT_FRAMETYPE = 0,
  782. CONTROL_FRAMETYPE = 1,
  783. DATA_FRAMETYPE = 2
  784. } WMI_FRAMETYPE;
  785. typedef PREPACK struct {
  786. A_UINT8 frameType; /* WMI_FRAMETYPE */
  787. A_UINT8 trafficClass; /* applies only to DATA_FRAMETYPE */
  788. A_UINT8 maxRetries;
  789. A_UINT8 enableNotify;
  790. } POSTPACK WMI_SET_RETRY_LIMITS_CMD;
  791. /*
  792. * WMI_SET_ROAM_CTRL_CMDID
  793. *
  794. * This command is used to influence the Roaming behaviour
  795. * Set the host biases of the BSSs before setting the roam mode as bias
  796. * based.
  797. */
  798. /*
  799. * Different types of Roam Control
  800. */
  801. typedef enum {
  802. WMI_FORCE_ROAM = 1, /* Roam to the specified BSSID */
  803. WMI_SET_ROAM_MODE = 2, /* default ,progd bias, no roam */
  804. WMI_SET_HOST_BIAS = 3, /* Set the Host Bias */
  805. WMI_SET_LOWRSSI_SCAN_PARAMS = 4, /* Set lowrssi Scan parameters */
  806. } WMI_ROAM_CTRL_TYPE;
  807. #define WMI_MIN_ROAM_CTRL_TYPE WMI_FORCE_ROAM
  808. #define WMI_MAX_ROAM_CTRL_TYPE WMI_SET_LOWRSSI_SCAN_PARAMS
  809. /*
  810. * ROAM MODES
  811. */
  812. typedef enum {
  813. WMI_DEFAULT_ROAM_MODE = 1, /* RSSI based ROAM */
  814. WMI_HOST_BIAS_ROAM_MODE = 2, /* HOST BIAS based ROAM */
  815. WMI_LOCK_BSS_MODE = 3 /* Lock to the Current BSS - no Roam */
  816. } WMI_ROAM_MODE;
  817. /*
  818. * BSS HOST BIAS INFO
  819. */
  820. typedef PREPACK struct {
  821. A_UINT8 bssid[ATH_MAC_LEN];
  822. A_INT8 bias;
  823. } POSTPACK WMI_BSS_BIAS;
  824. typedef PREPACK struct {
  825. A_UINT8 numBss;
  826. WMI_BSS_BIAS bssBias[1];
  827. } POSTPACK WMI_BSS_BIAS_INFO;
  828. typedef PREPACK struct WMI_LOWRSSI_SCAN_PARAMS {
  829. A_UINT16 lowrssi_scan_period;
  830. A_INT16 lowrssi_scan_threshold;
  831. A_INT16 lowrssi_roam_threshold;
  832. A_UINT8 roam_rssi_floor;
  833. A_UINT8 reserved[1]; /* For alignment */
  834. } POSTPACK WMI_LOWRSSI_SCAN_PARAMS;
  835. typedef PREPACK struct {
  836. PREPACK union {
  837. A_UINT8 bssid[ATH_MAC_LEN]; /* WMI_FORCE_ROAM */
  838. A_UINT8 roamMode; /* WMI_SET_ROAM_MODE */
  839. WMI_BSS_BIAS_INFO bssBiasInfo; /* WMI_SET_HOST_BIAS */
  840. WMI_LOWRSSI_SCAN_PARAMS lrScanParams;
  841. } POSTPACK info;
  842. A_UINT8 roamCtrlType ;
  843. } POSTPACK WMI_SET_ROAM_CTRL_CMD;
  844. /*
  845. * WMI_ENABLE_RM_CMDID
  846. */
  847. typedef PREPACK struct {
  848. A_BOOL enable_radio_measurements;
  849. } POSTPACK WMI_ENABLE_RM_CMD;
  850. /*
  851. * WMI_SET_MAX_OFFHOME_DURATION_CMDID
  852. */
  853. typedef PREPACK struct {
  854. A_UINT8 max_offhome_duration;
  855. } POSTPACK WMI_SET_MAX_OFFHOME_DURATION_CMD;
  856. typedef PREPACK struct {
  857. A_UINT32 frequency;
  858. A_UINT8 threshold;
  859. } POSTPACK WMI_SET_HB_CHALLENGE_RESP_PARAMS_CMD;
  860. typedef enum {
  861. BT_STREAM_UNDEF = 0,
  862. BT_STREAM_SCO, /* SCO stream */
  863. BT_STREAM_A2DP, /* A2DP stream */
  864. BT_STREAM_SCAN, /* BT Discovery or Page */
  865. BT_STREAM_ESCO,
  866. BT_STREAM_MAX
  867. } BT_STREAM_TYPE;
  868. typedef enum {
  869. BT_PARAM_SCO = 1, /* SCO stream parameters */
  870. BT_PARAM_A2DP ,
  871. BT_PARAM_ANTENNA_CONFIG,
  872. BT_PARAM_COLOCATED_BT_DEVICE,
  873. BT_PARAM_ACLCOEX,
  874. BT_PARAM_11A_SEPARATE_ANT,
  875. BT_PARAM_MAX
  876. } BT_PARAM_TYPE;
  877. typedef enum {
  878. BT_PARAM_SCO_PSPOLL_LATENCY_ONE_FOURTH =1,
  879. BT_PARAM_SCO_PSPOLL_LATENCY_HALF,
  880. BT_PARAM_SCO_PSPOLL_LATENCY_THREE_FOURTH,
  881. } BT_PARAMS_SCO_PSPOLL_LATENCY;
  882. typedef enum {
  883. BT_PARAMS_SCO_STOMP_SCO_NEVER =1,
  884. BT_PARAMS_SCO_STOMP_SCO_ALWAYS,
  885. BT_PARAMS_SCO_STOMP_SCO_IN_LOWRSSI,
  886. } BT_PARAMS_SCO_STOMP_RULES;
  887. typedef enum {
  888. BT_STATUS_UNDEF = 0,
  889. BT_STATUS_START,
  890. BT_STATUS_STOP,
  891. BT_STATUS_RESUME,
  892. BT_STATUS_SUSPEND,
  893. BT_STATUS_MAX
  894. } BT_STREAM_STATUS;
  895. typedef PREPACK struct {
  896. A_UINT8 streamType;
  897. A_UINT8 status;
  898. } POSTPACK WMI_SET_BT_STATUS_CMD;
  899. typedef enum {
  900. BT_ANT_TYPE_UNDEF=0,
  901. BT_ANT_TYPE_DUAL,
  902. BT_ANT_TYPE_SPLITTER,
  903. BT_ANT_TYPE_SWITCH
  904. } BT_ANT_FRONTEND_CONFIG;
  905. typedef enum {
  906. BT_COLOCATED_DEV_BTS4020=0,
  907. BT_COLCATED_DEV_CSR ,
  908. BT_COLOCATED_DEV_VALKYRIE
  909. } BT_COLOCATED_DEV_TYPE;
  910. #define BT_SCO_ALLOW_CLOSE_RANGE_OPT (1 << 0)
  911. #define BT_SCO_FORCE_AWAKE_OPT (1 << 1)
  912. #define BT_SCO_SET_DEFAULT_OVERRIDE(flags) ((flags) |= (1 << 2))
  913. #define BT_SCO_GET_DEFAULT_OVERRIDE(flags) (((flags) >> 2) & 0x1)
  914. typedef PREPACK struct {
  915. A_UINT32 numScoCyclesForceTrigger; /* Number SCO cycles after which
  916. force a pspoll. default = 10 */
  917. A_UINT32 dataResponseTimeout; /* Timeout Waiting for Downlink pkt
  918. in response for ps-poll,
  919. default = 10 msecs */
  920. A_UINT32 stompScoRules;
  921. A_UINT32 scoOptFlags; /* SCO Options Flags :
  922. bits: meaning:
  923. 0 Allow Close Range Optimization
  924. 1 Force awake during close range
  925. 2 If set use host supplied threshold
  926. 3 Unused
  927. 4..7 Unused
  928. 8..15 Unused
  929. 16..23 Unused
  930. */
  931. A_UINT32 p2lrpOptModeBound; /*p2lrp=packetToLowRatePacketRatio. In opt mode
  932. minimum ratio required to continue in opt mode*/
  933. A_UINT32 p2lrpNonOptModeBound; /*In Non opt mode minimum ratio required to switch
  934. to opt mode*/
  935. A_UINT8 stompDutyCyleVal; /* Sco cycles to limit ps-poll queuing
  936. if stomped */
  937. A_UINT8 stompDutyCyleMaxVal; /*firm ware increases stomp duty cycle
  938. gradually uptill this value on need basis*/
  939. A_UINT8 psPollLatencyFraction; /* Fraction of idle
  940. period, within which
  941. additional ps-polls
  942. can be queued */
  943. A_UINT8 noSCOSlots; /* Number of SCO Tx/Rx slots.
  944. HVx, EV3, 2EV3 = 2 */
  945. A_UINT8 noIdleSlots; /* Number of Bluetooth idle slots between
  946. consecutive SCO Tx/Rx slots
  947. HVx, EV3 = 4
  948. 2EV3 = 10 */
  949. A_UINT8 reserved8; /* maintain word algnment*/
  950. } POSTPACK BT_PARAMS_SCO;
  951. #define BT_A2DP_ALLOW_CLOSE_RANGE_OPT (1 << 0)
  952. #define BT_A2DP_FORCE_AWAKE_OPT (1 << 1)
  953. #define BT_A2DP_SET_DEFAULT_OVERRIDE(flags) ((flags) |= (1 << 2))
  954. #define BT_A2DP_GET_DEFAULT_OVERRIDE(flags) (((flags) >> 2) & 0x1)
  955. typedef PREPACK struct {
  956. A_UINT32 a2dpWlanUsageLimit; /* MAX time firmware uses the medium for
  957. wlan, after it identifies the idle time
  958. default (30 msecs) */
  959. A_UINT32 a2dpBurstCntMin; /* Minimum number of bluetooth data frames
  960. to replenish Wlan Usage limit (default 3) */
  961. A_UINT32 a2dpDataRespTimeout;
  962. A_UINT32 a2dpOptFlags; /* A2DP Option flags:
  963. bits: meaning:
  964. 0 Allow Close Range Optimization
  965. 1 Force awake during close range
  966. 2 If set use host threshold
  967. 3 Unused
  968. 4..7 Unused
  969. 8..15 Unused
  970. 16..23 Unused
  971. */
  972. A_UINT32 p2lrpOptModeBound; /*p2lrp=packetToLowRatePacketRatio. In opt mode
  973. minimum ratio required to continue in opt mode*/
  974. A_UINT32 p2lrpNonOptModeBound; /*In Non opt mode minimum ratio required to switch
  975. to opt mode*/
  976. A_UINT16 reserved16; /*maintain word alignment*/
  977. A_UINT8 isCoLocatedBtRoleMaster;
  978. A_UINT8 reserved8; /*maintain word alignment*/
  979. }POSTPACK BT_PARAMS_A2DP;
  980. /* During BT ftp/ BT OPP or any another data based acl profile on bluetooth
  981. (non a2dp).*/
  982. typedef PREPACK struct {
  983. A_UINT32 aclWlanMediumUsageTime; /* Wlan usage time during Acl (non-a2dp)
  984. coexistence (default 30 msecs) */
  985. A_UINT32 aclBtMediumUsageTime; /* Bt usage time during acl coexistence
  986. (default 30 msecs)*/
  987. A_UINT32 aclDataRespTimeout;
  988. A_UINT32 aclDetectTimeout; /* ACL coexistence enabled if we get
  989. 10 Pkts in X msec(default 100 msecs) */
  990. A_UINT32 aclmaxPktCnt; /* No of ACL pkts to receive before
  991. enabling ACL coex */
  992. }POSTPACK BT_PARAMS_ACLCOEX;
  993. typedef PREPACK struct {
  994. PREPACK union {
  995. BT_PARAMS_SCO scoParams;
  996. BT_PARAMS_A2DP a2dpParams;
  997. BT_PARAMS_ACLCOEX aclCoexParams;
  998. A_UINT8 antType; /* 0 -Disabled (default)
  999. 1 - BT_ANT_TYPE_DUAL
  1000. 2 - BT_ANT_TYPE_SPLITTER
  1001. 3 - BT_ANT_TYPE_SWITCH */
  1002. A_UINT8 coLocatedBtDev; /* 0 - BT_COLOCATED_DEV_BTS4020 (default)
  1003. 1 - BT_COLCATED_DEV_CSR
  1004. 2 - BT_COLOCATED_DEV_VALKYRIe
  1005. */
  1006. } POSTPACK info;
  1007. A_UINT8 paramType ;
  1008. } POSTPACK WMI_SET_BT_PARAMS_CMD;
  1009. typedef enum {
  1010. DISCONN_EVT_IN_RECONN = 0, /* default */
  1011. NO_DISCONN_EVT_IN_RECONN
  1012. } TARGET_EVENT_REPORT_CONFIG;
  1013. typedef PREPACK struct {
  1014. A_UINT32 evtConfig;
  1015. } POSTPACK WMI_SET_TARGET_EVENT_REPORT_CMD;
  1016. /*
  1017. * Command Replies
  1018. */
  1019. /*
  1020. * WMI_GET_CHANNEL_LIST_CMDID reply
  1021. */
  1022. typedef PREPACK struct {
  1023. A_UINT8 reserved1;
  1024. A_UINT8 numChannels; /* number of channels in reply */
  1025. A_UINT16 channelList[1]; /* channel in Mhz */
  1026. } POSTPACK WMI_CHANNEL_LIST_REPLY;
  1027. typedef enum {
  1028. A_SUCCEEDED = A_OK,
  1029. A_FAILED_DELETE_STREAM_DOESNOT_EXIST=250,
  1030. A_SUCCEEDED_MODIFY_STREAM=251,
  1031. A_FAILED_INVALID_STREAM = 252,
  1032. A_FAILED_MAX_THINSTREAMS = 253,
  1033. A_FAILED_CREATE_REMOVE_PSTREAM_FIRST = 254,
  1034. } PSTREAM_REPLY_STATUS;
  1035. typedef PREPACK struct {
  1036. A_UINT8 status; /* PSTREAM_REPLY_STATUS */
  1037. A_UINT8 txQueueNumber;
  1038. A_UINT8 rxQueueNumber;
  1039. A_UINT8 trafficClass;
  1040. A_UINT8 trafficDirection; /* DIR_TYPE */
  1041. } POSTPACK WMI_CRE_PRIORITY_STREAM_REPLY;
  1042. typedef PREPACK struct {
  1043. A_UINT8 status; /* PSTREAM_REPLY_STATUS */
  1044. A_UINT8 txQueueNumber;
  1045. A_UINT8 rxQueueNumber;
  1046. A_UINT8 trafficDirection; /* DIR_TYPE */
  1047. A_UINT8 trafficClass;
  1048. } POSTPACK WMI_DEL_PRIORITY_STREAM_REPLY;
  1049. /*
  1050. * List of Events (target to host)
  1051. */
  1052. typedef enum {
  1053. WMI_READY_EVENTID = 0x1001,
  1054. WMI_CONNECT_EVENTID,
  1055. WMI_DISCONNECT_EVENTID,
  1056. WMI_BSSINFO_EVENTID,
  1057. WMI_CMDERROR_EVENTID,
  1058. WMI_REGDOMAIN_EVENTID,
  1059. WMI_PSTREAM_TIMEOUT_EVENTID,
  1060. WMI_NEIGHBOR_REPORT_EVENTID,
  1061. WMI_TKIP_MICERR_EVENTID,
  1062. WMI_SCAN_COMPLETE_EVENTID, /* 0x100a */
  1063. WMI_REPORT_STATISTICS_EVENTID,
  1064. WMI_RSSI_THRESHOLD_EVENTID,
  1065. WMI_ERROR_REPORT_EVENTID,
  1066. WMI_OPT_RX_FRAME_EVENTID,
  1067. WMI_REPORT_ROAM_TBL_EVENTID,
  1068. WMI_EXTENSION_EVENTID,
  1069. WMI_CAC_EVENTID,
  1070. WMI_SNR_THRESHOLD_EVENTID,
  1071. WMI_LQ_THRESHOLD_EVENTID,
  1072. WMI_TX_RETRY_ERR_EVENTID, /* 0x1014 */
  1073. WMI_REPORT_ROAM_DATA_EVENTID,
  1074. WMI_TEST_EVENTID,
  1075. WMI_APLIST_EVENTID,
  1076. WMI_GET_WOW_LIST_EVENTID,
  1077. WMI_GET_PMKID_LIST_EVENTID,
  1078. WMI_CHANNEL_CHANGE_EVENTID,
  1079. WMI_PEER_NODE_EVENTID,
  1080. WMI_PSPOLL_EVENTID,
  1081. WMI_DTIMEXPIRY_EVENTID,
  1082. WMI_WLAN_VERSION_EVENTID,
  1083. WMI_SET_PARAMS_REPLY_EVENTID,
  1084. WMI_ACM_REJECT_EVENTID
  1085. } WMI_EVENT_ID;
  1086. typedef enum {
  1087. WMI_11A_CAPABILITY = 1,
  1088. WMI_11G_CAPABILITY = 2,
  1089. WMI_11AG_CAPABILITY = 3,
  1090. } WMI_PHY_CAPABILITY;
  1091. typedef PREPACK struct {
  1092. A_UINT8 macaddr[ATH_MAC_LEN];
  1093. A_UINT8 phyCapability; /* WMI_PHY_CAPABILITY */
  1094. } POSTPACK WMI_READY_EVENT_1;
  1095. typedef PREPACK struct {
  1096. A_UINT32 version;
  1097. A_UINT8 macaddr[ATH_MAC_LEN];
  1098. A_UINT8 phyCapability; /* WMI_PHY_CAPABILITY */
  1099. } POSTPACK WMI_READY_EVENT_2;
  1100. #if defined(ATH_TARGET)
  1101. #ifdef AR6002_REV2
  1102. #define WMI_READY_EVENT WMI_READY_EVENT_1 /* AR6002_REV2 target code */
  1103. #else
  1104. #define WMI_READY_EVENT WMI_READY_EVENT_2 /* AR6002_REV4 and AR6001 */
  1105. #endif
  1106. #else
  1107. #define WMI_READY_EVENT WMI_READY_EVENT_2 /* host code */
  1108. #endif
  1109. /*
  1110. * Connect Event
  1111. */
  1112. typedef PREPACK struct {
  1113. A_UINT16 channel;
  1114. A_UINT8 bssid[ATH_MAC_LEN];
  1115. A_UINT16 listenInterval;
  1116. A_UINT16 beaconInterval;
  1117. A_UINT32 networkType;
  1118. A_UINT8 beaconIeLen;
  1119. A_UINT8 assocReqLen;
  1120. A_UINT8 assocRespLen;
  1121. A_UINT8 assocInfo[1];
  1122. } POSTPACK WMI_CONNECT_EVENT;
  1123. /*
  1124. * Disconnect Event
  1125. */
  1126. typedef enum {
  1127. NO_NETWORK_AVAIL = 0x01,
  1128. LOST_LINK = 0x02, /* bmiss */
  1129. DISCONNECT_CMD = 0x03,
  1130. BSS_DISCONNECTED = 0x04,
  1131. AUTH_FAILED = 0x05,
  1132. ASSOC_FAILED = 0x06,
  1133. NO_RESOURCES_AVAIL = 0x07,
  1134. CSERV_DISCONNECT = 0x08,
  1135. INVALID_PROFILE = 0x0a,
  1136. DOT11H_CHANNEL_SWITCH = 0x0b,
  1137. PROFILE_MISMATCH = 0x0c,
  1138. PYXIS_VIRT_ADHOC_DISC = 0x0d,
  1139. } WMI_DISCONNECT_REASON;
  1140. typedef PREPACK struct {
  1141. A_UINT16 protocolReasonStatus; /* reason code, see 802.11 spec. */
  1142. A_UINT8 bssid[ATH_MAC_LEN]; /* set if known */
  1143. A_UINT8 disconnectReason ; /* see WMI_DISCONNECT_REASON */
  1144. A_UINT8 assocRespLen;
  1145. A_UINT8 assocInfo[1];
  1146. } POSTPACK WMI_DISCONNECT_EVENT;
  1147. /*
  1148. * BSS Info Event.
  1149. * Mechanism used to inform host of the presence and characteristic of
  1150. * wireless networks present. Consists of bss info header followed by
  1151. * the beacon or probe-response frame body. The 802.11 header is not included.
  1152. */
  1153. typedef enum {
  1154. BEACON_FTYPE = 0x1,
  1155. PROBERESP_FTYPE,
  1156. ACTION_MGMT_FTYPE,
  1157. PROBEREQ_FTYPE,
  1158. } WMI_BI_FTYPE;
  1159. enum {
  1160. BSS_ELEMID_CHANSWITCH = 0x01,
  1161. BSS_ELEMID_ATHEROS = 0x02,
  1162. };
  1163. typedef PREPACK struct {
  1164. A_UINT16 channel;
  1165. A_UINT8 frameType; /* see WMI_BI_FTYPE */
  1166. A_UINT8 snr;
  1167. A_INT16 rssi;
  1168. A_UINT8 bssid[ATH_MAC_LEN];
  1169. A_UINT32 ieMask;
  1170. } POSTPACK WMI_BSS_INFO_HDR;
  1171. /*
  1172. * Command Error Event
  1173. */
  1174. typedef enum {
  1175. INVALID_PARAM = 0x01,
  1176. ILLEGAL_STATE = 0x02,
  1177. INTERNAL_ERROR = 0x03,
  1178. } WMI_ERROR_CODE;
  1179. typedef PREPACK struct {
  1180. A_UINT16 commandId;
  1181. A_UINT8 errorCode;
  1182. } POSTPACK WMI_CMD_ERROR_EVENT;
  1183. /*
  1184. * New Regulatory Domain Event
  1185. */
  1186. typedef PREPACK struct {
  1187. A_UINT32 regDomain;
  1188. } POSTPACK WMI_REG_DOMAIN_EVENT;
  1189. typedef PREPACK struct {
  1190. A_UINT8 txQueueNumber;
  1191. A_UINT8 rxQueueNumber;
  1192. A_UINT8 trafficDirection;
  1193. A_UINT8 trafficClass;
  1194. } POSTPACK WMI_PSTREAM_TIMEOUT_EVENT;
  1195. typedef PREPACK struct {
  1196. A_UINT8 reserve1;
  1197. A_UINT8 reserve2;
  1198. A_UINT8 reserve3;
  1199. A_UINT8 trafficClass;
  1200. } POSTPACK WMI_ACM_REJECT_EVENT;
  1201. /*
  1202. * The WMI_NEIGHBOR_REPORT Event is generated by the target to inform
  1203. * the host of BSS's it has found that matches the current profile.
  1204. * It can be used by the host to cache PMKs and/to initiate pre-authentication
  1205. * if the BSS supports it. The first bssid is always the current associated
  1206. * BSS.
  1207. * The bssid and bssFlags information repeats according to the number
  1208. * or APs reported.
  1209. */
  1210. typedef enum {
  1211. WMI_DEFAULT_BSS_FLAGS = 0x00,
  1212. WMI_PREAUTH_CAPABLE_BSS = 0x01,
  1213. WMI_PMKID_VALID_BSS = 0x02,
  1214. } WMI_BSS_FLAGS;
  1215. typedef PREPACK struct {
  1216. A_UINT8 bssid[ATH_MAC_LEN];
  1217. A_UINT8 bssFlags; /* see WMI_BSS_FLAGS */
  1218. } POSTPACK WMI_NEIGHBOR_INFO;
  1219. typedef PREPACK struct {
  1220. A_INT8 numberOfAps;
  1221. WMI_NEIGHBOR_INFO neighbor[1];
  1222. } POSTPACK WMI_NEIGHBOR_REPORT_EVENT;
  1223. /*
  1224. * TKIP MIC Error Event
  1225. */
  1226. typedef PREPACK struct {
  1227. A_UINT8 keyid;
  1228. A_UINT8 ismcast;
  1229. } POSTPACK WMI_TKIP_MICERR_EVENT;
  1230. /*
  1231. * WMI_SCAN_COMPLETE_EVENTID - no parameters (old), staus parameter (new)
  1232. */
  1233. typedef PREPACK struct {
  1234. A_INT32 status;
  1235. } POSTPACK WMI_SCAN_COMPLETE_EVENT;
  1236. #define MAX_OPT_DATA_LEN 1400
  1237. /*
  1238. * WMI_SET_ADHOC_BSSID_CMDID
  1239. */
  1240. typedef PREPACK struct {
  1241. A_UINT8 bssid[ATH_MAC_LEN];
  1242. } POSTPACK WMI_SET_ADHOC_BSSID_CMD;
  1243. /*
  1244. * WMI_SET_OPT_MODE_CMDID
  1245. */
  1246. typedef enum {
  1247. SPECIAL_OFF,
  1248. SPECIAL_ON,
  1249. PYXIS_ADHOC_ON,
  1250. PYXIS_ADHOC_OFF,
  1251. } OPT_MODE_TYPE;
  1252. typedef PREPACK struct {
  1253. A_UINT8 optMode;
  1254. } POSTPACK WMI_SET_OPT_MODE_CMD;
  1255. /*
  1256. * WMI_TX_OPT_FRAME_CMDID
  1257. */
  1258. typedef enum {
  1259. OPT_PROBE_REQ = 0x01,
  1260. OPT_PROBE_RESP = 0x02,
  1261. OPT_CPPP_START = 0x03,
  1262. OPT_CPPP_STOP = 0x04,
  1263. } WMI_OPT_FTYPE;
  1264. typedef PREPACK struct {
  1265. A_UINT16 optIEDataLen;
  1266. A_UINT8 frmType;
  1267. A_UINT8 dstAddr[ATH_MAC_LEN];
  1268. A_UINT8 bssid[ATH_MAC_LEN];
  1269. A_UINT8 reserved; /* For alignment */
  1270. A_UINT8 optIEData[1];
  1271. } POSTPACK WMI_OPT_TX_FRAME_CMD;
  1272. /*
  1273. * Special frame receive Event.
  1274. * Mechanism used to inform host of the receiption of the special frames.
  1275. * Consists of special frame info header followed by special frame body.
  1276. * The 802.11 header is not included.
  1277. */
  1278. typedef PREPACK struct {
  1279. A_UINT16 channel;
  1280. A_UINT8 frameType; /* see WMI_OPT_FTYPE */
  1281. A_INT8 snr;
  1282. A_UINT8 srcAddr[ATH_MAC_LEN];
  1283. A_UINT8 bssid[ATH_MAC_LEN];
  1284. } POSTPACK WMI_OPT_RX_INFO_HDR;
  1285. /*
  1286. * Reporting statistics.
  1287. */
  1288. typedef PREPACK struct {
  1289. A_UINT32 tx_packets;
  1290. A_UINT32 tx_bytes;
  1291. A_UINT32 tx_unicast_pkts;
  1292. A_UINT32 tx_unicast_bytes;
  1293. A_UINT32 tx_multicast_pkts;
  1294. A_UINT32 tx_multicast_bytes;
  1295. A_UINT32 tx_broadcast_pkts;
  1296. A_UINT32 tx_broadcast_bytes;
  1297. A_UINT32 tx_rts_success_cnt;
  1298. A_UINT32 tx_packet_per_ac[4];
  1299. A_UINT32 tx_errors_per_ac[4];
  1300. A_UINT32 tx_errors;
  1301. A_UINT32 tx_failed_cnt;
  1302. A_UINT32 tx_retry_cnt;
  1303. A_UINT32 tx_mult_retry_cnt;
  1304. A_UINT32 tx_rts_fail_cnt;
  1305. A_INT32 tx_unicast_rate;
  1306. }POSTPACK tx_stats_t;
  1307. typedef PREPACK struct {
  1308. A_UINT32 rx_packets;
  1309. A_UINT32 rx_bytes;
  1310. A_UINT32 rx_unicast_pkts;
  1311. A_UINT32 rx_unicast_bytes;
  1312. A_UINT32 rx_multicast_pkts;
  1313. A_UINT32 rx_multicast_bytes;
  1314. A_UINT32 rx_broadcast_pkts;
  1315. A_UINT32 rx_broadcast_bytes;
  1316. A_UINT32 rx_fragment_pkt;
  1317. A_UINT32 rx_errors;
  1318. A_UINT32 rx_crcerr;
  1319. A_UINT32 rx_key_cache_miss;
  1320. A_UINT32 rx_decrypt_err;
  1321. A_UINT32 rx_duplicate_frames;
  1322. A_INT32 rx_unicast_rate;
  1323. }POSTPACK rx_stats_t;
  1324. typedef PREPACK struct {
  1325. A_UINT32 tkip_local_mic_failure;
  1326. A_UINT32 tkip_counter_measures_invoked;
  1327. A_UINT32 tkip_replays;
  1328. A_UINT32 tkip_format_errors;
  1329. A_UINT32 ccmp_format_errors;
  1330. A_UINT32 ccmp_replays;
  1331. }POSTPACK tkip_ccmp_stats_t;
  1332. typedef PREPACK struct {
  1333. A_UINT32 power_save_failure_cnt;
  1334. }POSTPACK pm_stats_t;
  1335. typedef PREPACK struct {
  1336. A_UINT32 cs_bmiss_cnt;
  1337. A_UINT32 cs_lowRssi_cnt;
  1338. A_UINT16 cs_connect_cnt;
  1339. A_UINT16 cs_disconnect_cnt;
  1340. A_INT16 cs_aveBeacon_rssi;
  1341. A_UINT16 cs_roam_count;
  1342. A_INT16 cs_rssi;
  1343. A_UINT8 cs_snr;
  1344. A_UINT8 cs_aveBeacon_snr;
  1345. A_UINT8 cs_lastRoam_msec;
  1346. } POSTPACK cserv_stats_t;
  1347. typedef PREPACK struct {
  1348. tx_stats_t tx_stats;
  1349. rx_stats_t rx_stats;
  1350. tkip_ccmp_stats_t tkipCcmpStats;
  1351. }POSTPACK wlan_net_stats_t;
  1352. typedef PREPACK struct {
  1353. A_UINT32 arp_received;
  1354. A_UINT32 arp_matched;
  1355. A_UINT32 arp_replied;
  1356. } POSTPACK arp_stats_t;
  1357. typedef PREPACK struct {
  1358. A_UINT32 wow_num_pkts_dropped;
  1359. A_UINT16 wow_num_events_discarded;
  1360. A_UINT8 wow_num_host_pkt_wakeups;
  1361. A_UINT8 wow_num_host_event_wakeups;
  1362. } POSTPACK wlan_wow_stats_t;
  1363. typedef PREPACK struct {
  1364. A_UINT32 lqVal;
  1365. A_INT32 noise_floor_calibation;
  1366. pm_stats_t pmStats;
  1367. wlan_net_stats_t txrxStats;
  1368. wlan_wow_stats_t wowStats;
  1369. arp_stats_t arpStats;
  1370. cserv_stats_t cservStats;
  1371. } POSTPACK WMI_TARGET_STATS;
  1372. /*
  1373. * WMI_RSSI_THRESHOLD_EVENTID.
  1374. * Indicate the RSSI events to host. Events are indicated when we breach a
  1375. * thresold value.
  1376. */
  1377. typedef enum{
  1378. WMI_RSSI_THRESHOLD1_ABOVE = 0,
  1379. WMI_RSSI_THRESHOLD2_ABOVE,
  1380. WMI_RSSI_THRESHOLD3_ABOVE,
  1381. WMI_RSSI_THRESHOLD4_ABOVE,
  1382. WMI_RSSI_THRESHOLD5_ABOVE,
  1383. WMI_RSSI_THRESHOLD6_ABOVE,
  1384. WMI_RSSI_THRESHOLD1_BELOW,
  1385. WMI_RSSI_THRESHOLD2_BELOW,
  1386. WMI_RSSI_THRESHOLD3_BELOW,
  1387. WMI_RSSI_THRESHOLD4_BELOW,
  1388. WMI_RSSI_THRESHOLD5_BELOW,
  1389. WMI_RSSI_THRESHOLD6_BELOW
  1390. }WMI_RSSI_THRESHOLD_VAL;
  1391. typedef PREPACK struct {
  1392. A_INT16 rssi;
  1393. A_UINT8 range;
  1394. }POSTPACK WMI_RSSI_THRESHOLD_EVENT;
  1395. /*
  1396. * WMI_ERROR_REPORT_EVENTID
  1397. */
  1398. typedef enum{
  1399. WMI_TARGET_PM_ERR_FAIL = 0x00000001,
  1400. WMI_TARGET_KEY_NOT_FOUND = 0x00000002,
  1401. WMI_TARGET_DECRYPTION_ERR = 0x00000004,
  1402. WMI_TARGET_BMISS = 0x00000008,
  1403. WMI_PSDISABLE_NODE_JOIN = 0x00000010,
  1404. WMI_TARGET_COM_ERR = 0x00000020,
  1405. WMI_TARGET_FATAL_ERR = 0x00000040
  1406. } WMI_TARGET_ERROR_VAL;
  1407. typedef PREPACK struct {
  1408. A_UINT32 errorVal;
  1409. }POSTPACK WMI_TARGET_ERROR_REPORT_EVENT;
  1410. typedef PREPACK struct {
  1411. A_UINT8 retrys;
  1412. }POSTPACK WMI_TX_RETRY_ERR_EVENT;
  1413. typedef enum{
  1414. WMI_SNR_THRESHOLD1_ABOVE = 1,
  1415. WMI_SNR_THRESHOLD1_BELOW,
  1416. WMI_SNR_THRESHOLD2_ABOVE,
  1417. WMI_SNR_THRESHOLD2_BELOW,
  1418. WMI_SNR_THRESHOLD3_ABOVE,
  1419. WMI_SNR_THRESHOLD3_BELOW,
  1420. WMI_SNR_THRESHOLD4_ABOVE,
  1421. WMI_SNR_THRESHOLD4_BELOW
  1422. } WMI_SNR_THRESHOLD_VAL;
  1423. typedef PREPACK struct {
  1424. A_UINT8 range; /* WMI_SNR_THRESHOLD_VAL */
  1425. A_UINT8 snr;
  1426. }POSTPACK WMI_SNR_THRESHOLD_EVENT;
  1427. typedef enum{
  1428. WMI_LQ_THRESHOLD1_ABOVE = 1,
  1429. WMI_LQ_THRESHOLD1_BELOW,
  1430. WMI_LQ_THRESHOLD2_ABOVE,
  1431. WMI_LQ_THRESHOLD2_BELOW,
  1432. WMI_LQ_THRESHOLD3_ABOVE,
  1433. WMI_LQ_THRESHOLD3_BELOW,
  1434. WMI_LQ_THRESHOLD4_ABOVE,
  1435. WMI_LQ_THRESHOLD4_BELOW
  1436. } WMI_LQ_THRESHOLD_VAL;
  1437. typedef PREPACK struct {
  1438. A_INT32 lq;
  1439. A_UINT8 range; /* WMI_LQ_THRESHOLD_VAL */
  1440. }POSTPACK WMI_LQ_THRESHOLD_EVENT;
  1441. /*
  1442. * WMI_REPORT_ROAM_TBL_EVENTID
  1443. */
  1444. #define MAX_ROAM_TBL_CAND 5
  1445. typedef PREPACK struct {
  1446. A_INT32 roam_util;
  1447. A_UINT8 bssid[ATH_MAC_LEN];
  1448. A_INT8 rssi;
  1449. A_INT8 rssidt;
  1450. A_INT8 last_rssi;
  1451. A_INT8 util;
  1452. A_INT8 bias;
  1453. A_UINT8 reserved; /* For alignment */
  1454. } POSTPACK WMI_BSS_ROAM_INFO;
  1455. typedef PREPACK struct {
  1456. A_UINT16 roamMode;
  1457. A_UINT16 numEntries;
  1458. WMI_BSS_ROAM_INFO bssRoamInfo[1];
  1459. } POSTPACK WMI_TARGET_ROAM_TBL;
  1460. /*
  1461. * WMI_CAC_EVENTID
  1462. */
  1463. typedef enum {
  1464. CAC_INDICATION_ADMISSION = 0x00,
  1465. CAC_INDICATION_ADMISSION_RESP = 0x01,
  1466. CAC_INDICATION_DELETE = 0x02,
  1467. CAC_INDICATION_NO_RESP = 0x03,
  1468. }CAC_INDICATION;
  1469. #define WMM_TSPEC_IE_LEN 63
  1470. typedef PREPACK struct {
  1471. A_UINT8 ac;
  1472. A_UINT8 cac_indication;
  1473. A_UINT8 statusCode;
  1474. A_UINT8 tspecSuggestion[WMM_TSPEC_IE_LEN];
  1475. }POSTPACK WMI_CAC_EVENT;
  1476. /*
  1477. * WMI_APLIST_EVENTID
  1478. */
  1479. typedef enum {
  1480. APLIST_VER1 = 1,
  1481. } APLIST_VER;
  1482. typedef PREPACK struct {
  1483. A_UINT8 bssid[ATH_MAC_LEN];
  1484. A_UINT16 channel;
  1485. } POSTPACK WMI_AP_INFO_V1;
  1486. typedef PREPACK union {
  1487. WMI_AP_INFO_V1 apInfoV1;
  1488. } POSTPACK WMI_AP_INFO;
  1489. typedef PREPACK struct {
  1490. A_UINT8 apListVer;
  1491. A_UINT8 numAP;
  1492. WMI_AP_INFO apList[1];
  1493. } POSTPACK WMI_APLIST_EVENT;
  1494. /*
  1495. * developer commands
  1496. */
  1497. /*
  1498. * WMI_SET_BITRATE_CMDID
  1499. *
  1500. * Get bit rate cmd uses same definition as set bit rate cmd
  1501. */
  1502. typedef enum {
  1503. RATE_AUTO = -1,
  1504. RATE_1Mb = 0,
  1505. RATE_2Mb = 1,
  1506. RATE_5_5Mb = 2,
  1507. RATE_11Mb = 3,
  1508. RATE_6Mb = 4,
  1509. RATE_9Mb = 5,
  1510. RATE_12Mb = 6,
  1511. RATE_18Mb = 7,
  1512. RATE_24Mb = 8,
  1513. RATE_36Mb = 9,
  1514. RATE_48Mb = 10,
  1515. RATE_54Mb = 11,
  1516. } WMI_BIT_RATE;
  1517. typedef PREPACK struct {
  1518. A_INT8 rateIndex; /* see WMI_BIT_RATE */
  1519. A_INT8 mgmtRateIndex;
  1520. A_INT8 ctlRateIndex;
  1521. } POSTPACK WMI_BIT_RATE_CMD;
  1522. typedef PREPACK struct {
  1523. A_INT8 rateIndex; /* see WMI_BIT_RATE */
  1524. } POSTPACK WMI_BIT_RATE_REPLY;
  1525. /*
  1526. * WMI_SET_FIXRATES_CMDID
  1527. *
  1528. * Get fix rates cmd uses same definition as set fix rates cmd
  1529. */
  1530. typedef enum {
  1531. FIX_RATE_1Mb = 0x1,
  1532. FIX_RATE_2Mb = 0x2,
  1533. FIX_RATE_5_5Mb = 0x4,
  1534. FIX_RATE_11Mb = 0x8,
  1535. FIX_RATE_6Mb = 0x10,
  1536. FIX_RATE_9Mb = 0x20,
  1537. FIX_RATE_12Mb = 0x40,
  1538. FIX_RATE_18Mb = 0x80,
  1539. FIX_RATE_24Mb = 0x100,
  1540. FIX_RATE_36Mb = 0x200,
  1541. FIX_RATE_48Mb = 0x400,
  1542. FIX_RATE_54Mb = 0x800,
  1543. } WMI_FIX_RATES_MASK;
  1544. typedef PREPACK struct {
  1545. A_UINT16 fixRateMask; /* see WMI_BIT_RATE */
  1546. } POSTPACK WMI_FIX_RATES_CMD, WMI_FIX_RATES_REPLY;
  1547. typedef PREPACK struct {
  1548. A_UINT8 bEnableMask;
  1549. A_UINT8 frameType; /*type and subtype*/
  1550. A_UINT16 frameRateMask; /* see WMI_BIT_RATE */
  1551. } POSTPACK WMI_FRAME_RATES_CMD, WMI_FRAME_RATES_REPLY;
  1552. /*
  1553. * WMI_SET_RECONNECT_AUTH_MODE_CMDID
  1554. *
  1555. * Set authentication mode
  1556. */
  1557. typedef enum {
  1558. RECONN_DO_AUTH = 0x00,
  1559. RECONN_NOT_AUTH = 0x01
  1560. } WMI_AUTH_MODE;
  1561. typedef PREPACK struct {
  1562. A_UINT8 mode;
  1563. } POSTPACK WMI_SET_AUTH_MODE_CMD;
  1564. /*
  1565. * WMI_SET_REASSOC_MODE_CMDID
  1566. *
  1567. * Set authentication mode
  1568. */
  1569. typedef enum {
  1570. REASSOC_DO_DISASSOC = 0x00,
  1571. REASSOC_DONOT_DISASSOC = 0x01
  1572. } WMI_REASSOC_MODE;
  1573. typedef PREPACK struct {
  1574. A_UINT8 mode;
  1575. }POSTPACK WMI_SET_REASSOC_MODE_CMD;
  1576. typedef enum {
  1577. ROAM_DATA_TIME = 1, /* Get The Roam Time Data */
  1578. } ROAM_DATA_TYPE;
  1579. typedef PREPACK struct {
  1580. A_UINT32 disassoc_time;
  1581. A_UINT32 no_txrx_time;
  1582. A_UINT32 assoc_time;
  1583. A_UINT32 allow_txrx_time;
  1584. A_UINT32 last_data_txrx_time;
  1585. A_UINT32 first_data_txrx_time;
  1586. A_UINT8 disassoc_bssid[ATH_MAC_LEN];
  1587. A_INT8 disassoc_bss_rssi;
  1588. A_UINT8 assoc_bssid[ATH_MAC_LEN];
  1589. A_INT8 assoc_bss_rssi;
  1590. } POSTPACK WMI_TARGET_ROAM_TIME;
  1591. typedef PREPACK struct {
  1592. PREPACK union {
  1593. WMI_TARGET_ROAM_TIME roamTime;
  1594. } POSTPACK u;
  1595. A_UINT8 roamDataType ;
  1596. } POSTPACK WMI_TARGET_ROAM_DATA;
  1597. typedef enum {
  1598. WMI_WMM_DISABLED = 0,
  1599. WMI_WMM_ENABLED
  1600. } WMI_WMM_STATUS;
  1601. typedef PREPACK struct {
  1602. A_UINT8 status;
  1603. }POSTPACK WMI_SET_WMM_CMD;
  1604. typedef enum {
  1605. WMI_TXOP_DISABLED = 0,
  1606. WMI_TXOP_ENABLED
  1607. } WMI_TXOP_CFG;
  1608. typedef PREPACK struct {
  1609. A_UINT8 txopEnable;
  1610. }POSTPACK WMI_SET_WMM_TXOP_CMD;
  1611. typedef PREPACK struct {
  1612. A_UINT8 keepaliveInterval;
  1613. } POSTPACK WMI_SET_KEEPALIVE_CMD;
  1614. typedef PREPACK struct {
  1615. A_BOOL configured;
  1616. A_UINT8 keepaliveInterval;
  1617. } POSTPACK WMI_GET_KEEPALIVE_CMD;
  1618. /*
  1619. * Add Application specified IE to a management frame
  1620. */
  1621. #define WMI_MAX_IE_LEN 255
  1622. typedef PREPACK struct {
  1623. A_UINT8 mgmtFrmType; /* one of WMI_MGMT_FRAME_TYPE */
  1624. A_UINT8 ieLen; /* Length of the IE that should be added to the MGMT frame */
  1625. A_UINT8 ieInfo[1];
  1626. } POSTPACK WMI_SET_APPIE_CMD;
  1627. /*
  1628. * Notify the WSC registration status to the target
  1629. */
  1630. #define WSC_REG_ACTIVE 1
  1631. #define WSC_REG_INACTIVE 0
  1632. /* Generic Hal Interface for setting hal paramters. */
  1633. /* Add new Set HAL Param cmdIds here for newer params */
  1634. typedef enum {
  1635. WHAL_SETCABTO_CMDID = 1,
  1636. }WHAL_CMDID;
  1637. typedef PREPACK struct {
  1638. A_UINT8 cabTimeOut;
  1639. } POSTPACK WHAL_SETCABTO_PARAM;
  1640. typedef PREPACK struct {
  1641. A_UINT8 whalCmdId;
  1642. A_UINT8 data[1];
  1643. } POSTPACK WHAL_PARAMCMD;
  1644. #define WOW_MAX_FILTER_LISTS 1 /*4*/
  1645. #define WOW_MAX_FILTERS_PER_LIST 4
  1646. #define WOW_PATTERN_SIZE 64
  1647. #define WOW_MASK_SIZE 64
  1648. #define MAC_MAX_FILTERS_PER_LIST 4
  1649. typedef PREPACK struct {
  1650. A_UINT8 wow_valid_filter;
  1651. A_UINT8 wow_filter_id;
  1652. A_UINT8 wow_filter_size;
  1653. A_UINT8 wow_filter_offset;
  1654. A_UINT8 wow_filter_mask[WOW_MASK_SIZE];
  1655. A_UINT8 wow_filter_pattern[WOW_PATTERN_SIZE];
  1656. } POSTPACK WOW_FILTER;
  1657. typedef PREPACK struct {
  1658. A_UINT8 wow_valid_list;
  1659. A_UINT8 wow_list_id;
  1660. A_UINT8 wow_num_filters;
  1661. A_UINT8 wow_total_list_size;
  1662. WOW_FILTER list[WOW_MAX_FILTERS_PER_LIST];
  1663. } POSTPACK WOW_FILTER_LIST;
  1664. typedef PREPACK struct {
  1665. A_UINT8 valid_filter;
  1666. A_UINT8 mac_addr[ATH_MAC_LEN];
  1667. } POSTPACK MAC_FILTER;
  1668. typedef PREPACK struct {
  1669. A_UINT8 total_list_size;
  1670. MAC_FILTER list[MAC_MAX_FILTERS_PER_LIST];
  1671. } POSTPACK MAC_FILTER_LIST;
  1672. #define MAX_IP_ADDRS 2
  1673. typedef PREPACK struct {
  1674. A_UINT32 ips[MAX_IP_ADDRS]; /* IP in Network Byte Order */
  1675. } POSTPACK WMI_SET_IP_CMD;
  1676. typedef PREPACK struct {
  1677. A_BOOL awake;
  1678. A_BOOL asleep;
  1679. } POSTPACK WMI_SET_HOST_SLEEP_MODE_CMD;
  1680. typedef PREPACK struct {
  1681. A_BOOL enable_wow;
  1682. } POSTPACK WMI_SET_WOW_MODE_CMD;
  1683. typedef PREPACK struct {
  1684. A_UINT8 filter_list_id;
  1685. } POSTPACK WMI_GET_WOW_LIST_CMD;
  1686. /*
  1687. * WMI_GET_WOW_LIST_CMD reply
  1688. */
  1689. typedef PREPACK struct {
  1690. A_UINT8 num_filters; /* number of patterns in reply */
  1691. A_UINT8 this_filter_num; /* this is filter # x of total num_filters */
  1692. A_UINT8 wow_mode;
  1693. A_UINT8 host_mode;
  1694. WOW_FILTER wow_filters[1];
  1695. } POSTPACK WMI_GET_WOW_LIST_REPLY;
  1696. typedef PREPACK struct {
  1697. A_UINT8 filter_list_id;
  1698. A_UINT8 filter_size;
  1699. A_UINT8 filter_offset;
  1700. A_UINT8 filter[1];
  1701. } POSTPACK WMI_ADD_WOW_PATTERN_CMD;
  1702. typedef PREPACK struct {
  1703. A_UINT16 filter_list_id;
  1704. A_UINT16 filter_id;
  1705. } POSTPACK WMI_DEL_WOW_PATTERN_CMD;
  1706. typedef PREPACK struct {
  1707. A_UINT8 macaddr[ATH_MAC_LEN];
  1708. } POSTPACK WMI_SET_MAC_ADDRESS_CMD;
  1709. /*
  1710. * WMI_SET_AKMP_PARAMS_CMD
  1711. */
  1712. #define WMI_AKMP_MULTI_PMKID_EN 0x000001
  1713. typedef PREPACK struct {
  1714. A_UINT32 akmpInfo;
  1715. } POSTPACK WMI_SET_AKMP_PARAMS_CMD;
  1716. typedef PREPACK struct {
  1717. A_UINT8 pmkid[WMI_PMKID_LEN];
  1718. } POSTPACK WMI_PMKID;
  1719. /*
  1720. * WMI_SET_PMKID_LIST_CMD
  1721. */
  1722. #define WMI_MAX_PMKID_CACHE 8
  1723. typedef PREPACK struct {
  1724. A_UINT32 numPMKID;
  1725. WMI_PMKID pmkidList[WMI_MAX_PMKID_CACHE];
  1726. } POSTPACK WMI_SET_PMKID_LIST_CMD;
  1727. /*
  1728. * WMI_GET_PMKID_LIST_CMD Reply
  1729. * Following the Number of PMKIDs is the list of PMKIDs
  1730. */
  1731. typedef PREPACK struct {
  1732. A_UINT32 numPMKID;
  1733. A_UINT8 bssidList[ATH_MAC_LEN][1];
  1734. WMI_PMKID pmkidList[1];
  1735. } POSTPACK WMI_PMKID_LIST_REPLY;
  1736. typedef PREPACK struct {
  1737. A_UINT16 oldChannel;
  1738. A_UINT32 newChannel;
  1739. } POSTPACK WMI_CHANNEL_CHANGE_EVENT;
  1740. typedef PREPACK struct {
  1741. A_UINT32 version;
  1742. } POSTPACK WMI_WLAN_VERSION_EVENT;
  1743. #define PEER_NODE_JOIN_EVENT 0x00
  1744. #define PEER_NODE_LEAVE_EVENT 0x01
  1745. #define PEER_FIRST_NODE_JOIN_EVENT 0x10
  1746. #define PEER_LAST_NODE_LEAVE_EVENT 0x11
  1747. typedef PREPACK struct {
  1748. A_UINT8 eventCode;
  1749. A_UINT8 peerMacAddr[ATH_MAC_LEN];
  1750. } POSTPACK WMI_PEER_NODE_EVENT;
  1751. #define IEEE80211_FRAME_TYPE_MGT 0x00
  1752. #define IEEE80211_FRAME_TYPE_CTL 0x04
  1753. typedef enum {
  1754. WMI_PYXIS_GEN_PARAMS = 0,
  1755. WMI_PYXIS_DSCVR_PARAMS,
  1756. WMI_PYXIS_SET_TX_MODE,
  1757. } WMI_PYXIS_CONFIG_TYPE;
  1758. typedef PREPACK struct {
  1759. A_UINT16 pyxisConfigType; // One of WMI_PYXIS_CONFIG_TYPE
  1760. A_UINT16 pyxisConfigLen; // Length in Bytes of Information that follows
  1761. } POSTPACK WMI_PYXIS_CONFIG_HDR;
  1762. typedef PREPACK struct {
  1763. WMI_PYXIS_CONFIG_HDR hdr;
  1764. A_UINT32 dscvrWindow;
  1765. A_UINT32 dscvrInterval;
  1766. A_UINT32 dscvrLife;
  1767. A_UINT32 probeInterval;
  1768. A_UINT32 probePeriod;
  1769. A_UINT16 dscvrChannel;
  1770. } POSTPACK WMI_PYXIS_DSCVR_CONFIG;
  1771. typedef PREPACK struct {
  1772. WMI_PYXIS_CONFIG_HDR hdr;
  1773. A_UINT32 dataWindowSizeMin;
  1774. A_UINT32 dataWindowSizeMax;
  1775. A_UINT8 maxJoiners;
  1776. } POSTPACK WMI_PYXIS_GEN_CONFIG;
  1777. typedef PREPACK struct {
  1778. WMI_PYXIS_CONFIG_HDR hdr;
  1779. A_BOOL mode;
  1780. } POSTPACK WMI_PYXIS_TX_MODE;
  1781. typedef enum {
  1782. WMI_PYXIS_DISC_PEER = 0,
  1783. WMI_PYXIS_JOIN_PEER,
  1784. } WMI_PYXIS_CMD_TYPE;
  1785. typedef PREPACK struct {
  1786. A_UINT16 pyxisCmd;
  1787. A_UINT16 pyxisCmdLen; // Length following this header
  1788. } POSTPACK WMI_PYXIS_CMD_HDR;
  1789. typedef PREPACK struct {
  1790. WMI_PYXIS_CMD_HDR hdr;
  1791. A_UINT8 peerMacAddr[ATH_MAC_LEN];
  1792. } POSTPACK WMI_PYXIS_DISCONNECT_CMD;
  1793. typedef PREPACK struct {
  1794. WMI_PYXIS_CMD_HDR hdr;
  1795. A_UINT32 ctrl_flags; /* One of the Bits determines if it
  1796. * is Virt Adhoc/the device is to
  1797. * join a BSS */
  1798. A_UINT16 channel; /* Data Channel */
  1799. A_UINT8 networkType; /* network type */
  1800. A_UINT8 dot11AuthMode; /* OPEN_AUTH */
  1801. A_UINT8 authMode; /* NONE_AUTH */
  1802. A_UINT8 pairwiseCryptoType; /* One of NONE_CRYPT, AES_CRYPT */
  1803. A_UINT8 pairwiseCryptoLen; /* 0 since ADD_KEY passes the length */
  1804. A_UINT8 groupCryptoType; /* One of NONE_CRYPT, AES_CRYPT */
  1805. A_UINT8 groupCryptoLen; /* 0 since ADD_KEY passes the length */
  1806. A_UINT8 peerMacAddr[ATH_MAC_LEN]; /* BSSID of peer network*/
  1807. A_UINT8 nwBSSID[ATH_MAC_LEN]; /* BSSID of the Pyxis Adhoc Network */
  1808. } POSTPACK WMI_PYXIS_JOIN_CMD;
  1809. typedef PREPACK struct {
  1810. WMI_PYXIS_CMD_HDR hdr;
  1811. A_BOOL mode;
  1812. } POSTPACK WMI_PYXIS_SET_TX_MODE_CMD;
  1813. /*
  1814. * ------- AP Mode definitions --------------
  1815. */
  1816. /*
  1817. * !!! Warning !!!
  1818. * -Changing the following values needs compilation of both driver and firmware
  1819. */
  1820. #define AP_MAX_NUM_STA 8
  1821. #define AP_ACL_SIZE 10
  1822. #define IEEE80211_MAX_IE 256
  1823. #define MCAST_AID 0xFF /* Spl. AID used to set DTIM flag in the beacons */
  1824. #define DEF_AP_COUNTRY_CODE "US "
  1825. #define DEF_AP_WMODE_G WMI_11G_MODE
  1826. #define DEF_AP_WMODE_AG WMI_11AG_MODE
  1827. #define DEF_AP_DTIM 5
  1828. #define DEF_BEACON_INTERVAL 100
  1829. /* AP mode disconnect reasons */
  1830. #define AP_DISCONNECT_STA_LEFT 101
  1831. #define AP_DISCONNECT_FROM_HOST 102
  1832. #define AP_DISCONNECT_COMM_TIMEOUT 103
  1833. /*
  1834. * Used with WMI_AP_HIDDEN_SSID_CMDID
  1835. */
  1836. #define HIDDEN_SSID_FALSE 0
  1837. #define HIDDEN_SSID_TRUE 1
  1838. typedef PREPACK struct {
  1839. A_UINT8 hidden_ssid;
  1840. } POSTPACK WMI_AP_HIDDEN_SSID_CMD;
  1841. /*
  1842. * Used with WMI_AP_ACL_POLICY_CMDID
  1843. */
  1844. #define AP_ACL_DISABLE 0x00
  1845. #define AP_ACL_ALLOW_MAC 0x01
  1846. #define AP_ACL_DENY_MAC 0x02
  1847. #define AP_ACL_RETAIN_LIST_MASK 0x80
  1848. typedef PREPACK struct {
  1849. A_UINT8 policy;
  1850. } POSTPACK WMI_AP_ACL_POLICY_CMD;
  1851. /*
  1852. * Used with WMI_AP_ACL_MAC_LIST_CMDID
  1853. */
  1854. #define ADD_MAC_ADDR 1
  1855. #define DEL_MAC_ADDR 2
  1856. typedef PREPACK struct {
  1857. A_UINT8 action;
  1858. A_UINT8 index;
  1859. A_UINT8 mac[ATH_MAC_LEN];
  1860. A_UINT8 wildcard;
  1861. } POSTPACK WMI_AP_ACL_MAC_CMD;
  1862. typedef PREPACK struct {
  1863. A_UINT16 index;
  1864. A_UINT8 acl_mac[AP_ACL_SIZE][ATH_MAC_LEN];
  1865. A_UINT8 wildcard[AP_ACL_SIZE];
  1866. A_UINT8 policy;
  1867. } POSTPACK WMI_AP_ACL;
  1868. /*
  1869. * Used with WMI_AP_SET_NUM_STA_CMDID
  1870. */
  1871. typedef PREPACK struct {
  1872. A_UINT8 num_sta;
  1873. } POSTPACK WMI_AP_SET_NUM_STA_CMD;
  1874. /*
  1875. * Used with WMI_AP_SET_MLME_CMDID
  1876. */
  1877. typedef PREPACK struct {
  1878. A_UINT8 mac[ATH_MAC_LEN];
  1879. A_UINT16 reason; /* 802.11 reason code */
  1880. A_UINT8 cmd; /* operation to perform */
  1881. #define WMI_AP_MLME_ASSOC 1 /* associate station */
  1882. #define WMI_AP_DISASSOC 2 /* disassociate station */
  1883. #define WMI_AP_DEAUTH 3 /* deauthenticate station */
  1884. #define WMI_AP_MLME_AUTHORIZE 4 /* authorize station */
  1885. #define WMI_AP_MLME_UNAUTHORIZE 5 /* unauthorize station */
  1886. } POSTPACK WMI_AP_SET_MLME_CMD;
  1887. typedef PREPACK struct {
  1888. A_UINT32 period;
  1889. } POSTPACK WMI_AP_CONN_INACT_CMD;
  1890. typedef PREPACK struct {
  1891. A_UINT32 period_min;
  1892. A_UINT32 dwell_ms;
  1893. } POSTPACK WMI_AP_PROT_SCAN_TIME_CMD;
  1894. typedef PREPACK struct {
  1895. A_BOOL flag;
  1896. A_UINT16 aid;
  1897. } POSTPACK WMI_AP_SET_PVB_CMD;
  1898. #define WMI_DISABLE_REGULATORY_CODE "FF"
  1899. typedef PREPACK struct {
  1900. A_UCHAR countryCode[3];
  1901. } POSTPACK WMI_SET_COUNTRY_CMD;
  1902. typedef PREPACK struct {
  1903. A_UINT8 dtim;
  1904. } POSTPACK WMI_AP_SET_DTIM_CMD;
  1905. /* AP mode events */
  1906. /* WMI_PS_POLL_EVENT */
  1907. typedef PREPACK struct {
  1908. A_UINT16 aid;
  1909. } POSTPACK WMI_PSPOLL_EVENT;
  1910. /*
  1911. * End of AP mode definitions
  1912. */
  1913. #ifndef ATH_TARGET
  1914. #include "athendpack.h"
  1915. #endif
  1916. #ifdef __cplusplus
  1917. }
  1918. #endif
  1919. #endif /* _WMI_H_ */