nic_cmd_event.h 75 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307
  1. /*
  2. ** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/nic_cmd_event.h#1
  3. */
  4. /*! \file "nic_cmd_event.h"
  5. \brief This file contains the declairation file of the WLAN OID processing routines
  6. of Windows driver for MediaTek Inc. 802.11 Wireless LAN Adapters.
  7. */
  8. /*
  9. ** Log: nic_cmd_event.h
  10. *
  11. * 03 29 2012 eason.tsai
  12. * [WCXRP00001216] [MT6628 Wi-Fi][Driver]add conditional define
  13. * add conditional define.
  14. *
  15. * 03 04 2012 eason.tsai
  16. * NULL
  17. * modify the cal fail report code.
  18. *
  19. * 01 06 2012 wh.su
  20. * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function
  21. * redefine the CMD_ID_SET_TXPWR_CTRL value.
  22. *
  23. * 01 05 2012 wh.su
  24. * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function
  25. * Adding the related ioctl / wlan oid function to set the Tx power cfg.
  26. *
  27. * 11 30 2011 cm.chang
  28. * [WCXRP00001128] [MT5931 Wi-Fi][FW] Update BB/RF setting based on RF doc v0.7 for LGE spec
  29. * 1. Add a new CMD for driver to set device mode
  30. * 2. Update calibration parameters
  31. *
  32. * 11 19 2011 yuche.tsai
  33. * NULL
  34. * Update RSSI for P2P.
  35. *
  36. * 11 18 2011 yuche.tsai
  37. * NULL
  38. * CONFIG P2P support RSSI query, default turned off.
  39. *
  40. * 11 10 2011 eddie.chen
  41. * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog)
  42. * Add TX_DONE status detail information.
  43. *
  44. * 11 08 2011 tsaiyuan.hsu
  45. * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered
  46. * check if CFG_SUPPORT_SWCR is defined to aoid compiler error.
  47. *
  48. * 11 07 2011 tsaiyuan.hsu
  49. * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered
  50. * add debug counters and periodically dump counters for debugging.
  51. *
  52. * 10 26 2011 cp.wu
  53. * [WCXRP00001065] [MT6620 Wi-Fi][MT5931][FW][DRV] Adding parameter for controlling
  54. * minimum channel dwell time for scanning
  55. * add interface for control minimum channel dwell time for scanning.
  56. *
  57. * 09 20 2011 cm.chang
  58. * [WCXRP00000997] [MT6620 Wi-Fi][Driver][FW] Handle change of BSS preamble type and slot time
  59. * New CMD definition about RLM parameters
  60. *
  61. * 08 31 2011 cm.chang
  62. * [WCXRP00000969] [MT6620 Wi-Fi][Driver][FW] Channel list for 5G band based on country code
  63. * .
  64. *
  65. * 08 25 2011 chinghwa.yu
  66. * [WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm
  67. * Add DFS switch.
  68. *
  69. * 08 24 2011 chinghwa.yu
  70. * [WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm
  71. * Update RDD test mode cases.
  72. *
  73. * 08 15 2011 cp.wu
  74. * [WCXRP00000851] [MT6628 Wi-Fi][Driver] Add HIFSYS related definition to driver source tree
  75. * add MT6628-specific definitions.
  76. *
  77. * 08 11 2011 cp.wu
  78. * [WCXRP00000830] [MT6620 Wi-Fi][Firmware] Use MDRDY counter to detect empty channel for shortening scan time
  79. * sparse channel detection:
  80. * driver: collect sparse channel information with scan-done event
  81. *
  82. * 08 09 2011 cp.wu
  83. * [WCXRP00000702] [MT5931][Driver] Modify initialization sequence for E1 ASIC
  84. * [WCXRP00000913] [MT6620 Wi-Fi] create repository of source code dedicated for MT6620 E6 ASIC
  85. * add CCK-DSSS TX-PWR control field in NVRAM and CMD definition for MT5931-MP
  86. *
  87. * 08 03 2011 terry.wu
  88. * [WCXRP00000899] [MT6620] [FW] Reply probe rsp in FW for hotspot mode
  89. * Reply Probe Rsp in FW for Hotspot Mode.
  90. *
  91. *
  92. *
  93. * 08 03 2011 terry.wu
  94. * [WCXRP00000899] [MT6620] [FW] Reply probe rsp in FW for hotspot mode
  95. * Reply Probe Rsp in FW for Hotspot Mode.
  96. *
  97. *
  98. * 08 03 2011 terry.wu
  99. * [WCXRP00000899] [MT6620] [FW] Reply probe rsp in FW for hotspot mode
  100. * Reply Probe Rsp in FW for Hotspot Mode.
  101. *
  102. * 08 03 2011 terry.wu
  103. * [WCXRP00000899] [MT6620] [FW] Reply probe rsp in FW for hotspot mode
  104. * Reply Probe Rsp in FW for Hotspot Mode.
  105. *
  106. * 07 28 2011 chinghwa.yu
  107. * [WCXRP00000063] Update BCM CoEx design and settings
  108. * Add BWCS cmd and event.
  109. *
  110. * 07 22 2011 jeffrey.chang
  111. * [WCXRP00000864] [MT5931] Add command to adjust OSC stable time
  112. * add osc stable time command structure
  113. *
  114. * 07 22 2011 jeffrey.chang
  115. * [WCXRP00000864] [MT5931] Add command to adjust OSC stable time
  116. * modify driver to set OSC stable time after f/w download
  117. *
  118. * 07 18 2011 chinghwa.yu
  119. * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm
  120. * Add CMD/Event for RDD and BWCS.
  121. *
  122. * 07 18 2011 cp.wu
  123. * [WCXRP00000858] [MT5931][Driver][Firmware] Add support for scan to search for more than
  124. * one SSID in a single scanning request
  125. * add framework in driver domain for supporting new SCAN_REQ_V2 for more than 1 SSID
  126. * support as well as uProbeDelay in NDIS 6.x driver model
  127. *
  128. * 06 23 2011 cp.wu
  129. * [WCXRP00000812] [MT6620 Wi-Fi][Driver] not show NVRAM when there is no valid MAC address in NVRAM content
  130. * check with firmware for valid MAC address.
  131. *
  132. * 06 23 2011 cp.wu
  133. * [WCXRP00000798] [MT6620 Wi-Fi][Firmware] Follow-ups for WAPI frequency offset workaround in firmware SCN module
  134. * change parameter name from PeerAddr to BSSID
  135. *
  136. * 06 20 2011 cp.wu
  137. * [WCXRP00000798] [MT6620 Wi-Fi][Firmware] Follow-ups for WAPI frequency offset workaround in firmware SCN module
  138. * 1. specify target's BSSID when requesting channel privilege.
  139. * 2. pass BSSID information to firmware domain
  140. *
  141. * 06 09 2011 tsaiyuan.hsu
  142. * [WCXRP00000760] [MT5931 Wi-Fi][FW] Refine rxmHandleMacRxDone to reduce code size
  143. * move send_auth at rxmHandleMacRxDone in firmware to driver to reduce code size.
  144. *
  145. * 05 27 2011 cp.wu
  146. * [WCXRP00000749] [MT6620 Wi-Fi][Driver] Add band edge tx power control to Wi-Fi NVRAM
  147. * invoke CMD_ID_SET_EDGE_TXPWR_LIMIT when there is valid data exist in NVRAM content.
  148. *
  149. * 04 18 2011 terry.wu
  150. * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED
  151. * Remove flag CFG_WIFI_DIRECT_MOVED.
  152. *
  153. * 03 31 2011 chinglan.wang
  154. * [WCXRP00000613] [MT6620 Wi-Fi] [FW] [Driver] BssInfo can get the security mode which is WPA/WPA2/WAPI or not.
  155. * .
  156. *
  157. * 03 18 2011 cm.chang
  158. * [WCXRP00000576] [MT6620 Wi-Fi][Driver][FW] Remove P2P compile option in scan req/cancel command
  159. * As CR title
  160. *
  161. * 03 17 2011 yarco.yang
  162. * [WCXRP00000569] [MT6620 Wi-Fi][F/W][Driver] Set multicast address support current network usage
  163. * .
  164. *
  165. * 03 07 2011 wh.su
  166. * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code
  167. * rename the define to anti_pviracy.
  168. *
  169. * 03 05 2011 wh.su
  170. * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code
  171. * add the code to get the check rsponse and indicate to app.
  172. *
  173. * 03 02 2011 wh.su
  174. * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code
  175. * Add Security check related code.
  176. *
  177. * 03 02 2011 george.huang
  178. * [WCXRP00000504] [MT6620 Wi-Fi][FW] Support Sigma CAPI for power saving related command
  179. * Support UAPSD/OppPS/NoA parameter setting
  180. *
  181. * 02 16 2011 cm.chang
  182. * [WCXRP00000447] [MT6620 Wi-Fi][FW] Support new NVRAM update mechanism
  183. * .
  184. *
  185. * 02 10 2011 cp.wu
  186. * [WCXRP00000434] [MT6620 Wi-Fi][Driver] Obsolete unused event packet handlers
  187. * EVENT_ID_CONNECTION_STATUS has been obsoleted and no need to handle.
  188. *
  189. * 02 08 2011 eddie.chen
  190. * [WCXRP00000426] [MT6620 Wi-Fi][FW/Driver] Add STA aging timeout and defualtHwRatein AP mode
  191. * Add event STA agint timeout
  192. *
  193. * 01 27 2011 tsaiyuan.hsu
  194. * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support
  195. * add roaming fsm
  196. * 1. not support 11r, only use strength of signal to determine roaming.
  197. * 2. not enable CFG_SUPPORT_ROAMING until completion of full test.
  198. * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw
  199. * 4. assume that change of link quality in smooth way.
  200. *
  201. * 01 25 2011 yuche.tsai
  202. * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue
  203. * Update cmd format of BSS INFO, always sync OwnMac to FW no matter P2P is enabled or not..
  204. *
  205. * 01 20 2011 eddie.chen
  206. * [WCXRP00000374] [MT6620 Wi-Fi][DRV] SW debug control
  207. * Add Oid for sw control debug command
  208. *
  209. * 01 15 2011 puff.wen
  210. * NULL
  211. * Add Stress test
  212. *
  213. * 01 12 2011 cm.chang
  214. * [WCXRP00000354] [MT6620 Wi-Fi][Driver][FW] Follow NVRAM bandwidth setting
  215. * Sync HT operation element information from host to FW
  216. *
  217. * 01 12 2011 cm.chang
  218. * [WCXRP00000354] [MT6620 Wi-Fi][Driver][FW] Follow NVRAM bandwidth setting
  219. * User-defined bandwidth is for 2.4G and 5G individually
  220. *
  221. * 12 29 2010 eddie.chen
  222. * [WCXRP00000322] Add WMM IE in beacon,
  223. Add per station flow control when STA is in PS
  224. * 1) PS flow control event
  225. *
  226. * 2) WMM IE in beacon, assoc resp, probe resp
  227. *
  228. * 12 28 2010 cp.wu
  229. * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release
  230. * report EEPROM used flag via NIC_CAPABILITY
  231. *
  232. * 12 28 2010 cp.wu
  233. * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release
  234. * integrate with 'EEPROM used' flag for reporting correct capability to Engineer Mode/META and other tools
  235. *
  236. * 12 23 2010 george.huang
  237. * [WCXRP00000152] [MT6620 Wi-Fi] AP mode power saving function
  238. * 1. update WMM IE parsing, with ASSOC REQ handling
  239. * 2. extend U-APSD parameter passing from driver to FW
  240. *
  241. * 12 07 2010 cm.chang
  242. * [WCXRP00000239] MT6620 Wi-Fi][Driver][FW] Merge concurrent branch back to maintrunk
  243. * 1. BSSINFO include RLM parameter
  244. * 2. free all sta records when network is disconnected
  245. *
  246. * 12 07 2010 cm.chang
  247. * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant
  248. * 1. Country code is from NVRAM or supplicant
  249. * 2. Change band definition in CMD/EVENT.
  250. *
  251. * 11 29 2010 cm.chang
  252. * [WCXRP00000210] [MT6620 Wi-Fi][Driver][FW] Set RCPI value in STA_REC for
  253. * initial TX rate selection of auto-rate algorithm
  254. * Sync RCPI of STA_REC to FW as reference of initial TX rate
  255. *
  256. * 11 08 2010 cm.chang
  257. * [WCXRP00000169] [MT6620 Wi-Fi][Driver][FW] Remove unused CNM recover message ID
  258. * Remove CNM channel reover message ID
  259. *
  260. * 11 01 2010 cp.wu
  261. * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check
  262. * [WCXRP00000150] [MT6620 Wi-Fi][Driver] Add implementation for querying current TX rate from firmware auto rate module
  263. * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead
  264. * 2) Remove CNM CH-RECOVER event handling
  265. * 3) cfg read/write API renamed with kal prefix for unified naming rules.
  266. *
  267. * 10 26 2010 cp.wu
  268. * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check
  269. * [WCXRP00000137] [MT6620 Wi-Fi] [FW] Support NIC capability query command
  270. * 1) update NVRAM content template to ver 1.02
  271. * 2) add compile option for querying NIC capability (default: off)
  272. * 3) modify AIS 5GHz support to run-time option, which could be turned on by registry or NVRAM setting
  273. * 4) correct auto-rate compiler error under linux (treat warning as error)
  274. * 5) simplify usage of NVRAM and REG_INFO_T
  275. * 6) add version checking between driver and firmware
  276. *
  277. * 10 25 2010 cp.wu
  278. * [WCXRP00000133] [MT6620 Wi-Fi] [FW][Driver] Change TX power offset band definition
  279. * follow-up for CMD_5G_PWR_OFFSET_T definition change
  280. *
  281. * 10 20 2010 cp.wu
  282. * [WCXRP00000117] [MT6620 Wi-Fi][Driver] Add logic for suspending driver when MT6620 is not responding anymore
  283. * use OID_CUSTOM_TEST_MODE as indication for driver reset
  284. * by dropping pending TX packets
  285. *
  286. * 10 20 2010 wh.su
  287. * [WCXRP00000124] [MT6620 Wi-Fi] [Driver] Support the dissolve P2P Group
  288. * Add the code to support disconnect p2p group
  289. *
  290. * 09 15 2010 cm.chang
  291. * NULL
  292. * Add new CMD for TX power, 5G power offset and power parameters
  293. *
  294. * 09 07 2010 yuche.tsai
  295. * NULL
  296. * Add a pointer in P2P SCAN RESULT structure. This pointer
  297. * is pointed to a IE buffer for this P2p device.
  298. *
  299. * 09 07 2010 wh.su
  300. * NULL
  301. * adding the code for beacon/probe req/ probe rsp wsc ie at p2p.
  302. *
  303. * 09 03 2010 kevin.huang
  304. * NULL
  305. * Refine #include sequence and solve recursive/nested #include issue
  306. *
  307. * 08 23 2010 chinghwa.yu
  308. * NULL
  309. * Update for BOW.
  310. *
  311. * 08 20 2010 cm.chang
  312. * NULL
  313. * Migrate RLM code to host from FW
  314. *
  315. * 08 16 2010 george.huang
  316. * NULL
  317. * add new CMD ID definition
  318. *
  319. * 08 16 2010 yuche.tsai
  320. * NULL
  321. * Add a field in BSS INFO cmd to change interface address for P2P. (switching between Device Addr & Interface Addr)
  322. *
  323. * 08 12 2010 yuche.tsai
  324. * NULL
  325. * Add interface address indication when indicate connection status.
  326. * It is requested by supplicant to do 4 way handshake.
  327. *
  328. * 08 07 2010 wh.su
  329. * NULL
  330. * adding the privacy related code for P2P network
  331. *
  332. * 08 05 2010 yuche.tsai
  333. * NULL
  334. * Change data structure for P2P Device scan result, all channel time for scan command.
  335. *
  336. * 08 04 2010 george.huang
  337. * NULL
  338. * handle change PS mode OID/ CMD
  339. *
  340. * 08 04 2010 yarco.yang
  341. * NULL
  342. * Add TX_AMPDU and ADDBA_REJECT command
  343. *
  344. * 08 03 2010 george.huang
  345. * NULL
  346. * handle event for updating NOA parameters indicated from FW
  347. *
  348. * 08 02 2010 george.huang
  349. * NULL
  350. * add WMM-PS test related OID/ CMD handlers
  351. *
  352. * 07 28 2010 cp.wu
  353. * NULL
  354. * sync. CMD_BSS_INFO structure change to CMD-EVENT v0.15.
  355. *
  356. * 07 26 2010 yuche.tsai
  357. *
  358. * Add P2P Device Found Event.
  359. * Channel extension option in scan abort command.
  360. *
  361. * 07 23 2010 cp.wu
  362. *
  363. * add AIS-FSM handling for beacon timeout event.
  364. *
  365. * 07 21 2010 yuche.tsai
  366. *
  367. * Add for P2P Scan Result Parsing & Saving.
  368. *
  369. * 07 20 2010 george.huang
  370. *
  371. * DWORD align for the CMD data structure
  372. *
  373. * 07 20 2010 cp.wu
  374. *
  375. * pass band information for scan in an efficient way by mapping ENUM_BAND_T into UINT_8..
  376. *
  377. * 07 19 2010 wh.su
  378. *
  379. * update for security supporting.
  380. *
  381. * 07 19 2010 cm.chang
  382. *
  383. * Set RLM parameters and enable CNM channel manager
  384. *
  385. * 07 16 2010 yarco.yang
  386. *
  387. * 1. Support BSS Absence/Presence Event
  388. * 2. Support STA change PS mode Event
  389. * 3. Support BMC forwarding for AP mode.
  390. *
  391. * 07 14 2010 cp.wu
  392. *
  393. * [WPD00003833] [MT6620 and MT5931] Driver migration.
  394. * pass band with channel number information as scan parameter
  395. *
  396. * 07 14 2010 yarco.yang
  397. *
  398. * 1. Remove CFG_MQM_MIGRATION
  399. * 2. Add CMD_UPDATE_WMM_PARMS command
  400. *
  401. * 07 09 2010 cp.wu
  402. *
  403. * reorder members of CMD_SET_BSS_INFO.
  404. *
  405. * 07 08 2010 cp.wu
  406. *
  407. * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
  408. *
  409. * 07 07 2010 cp.wu
  410. * [WPD00003833][MT6620 and MT5931] Driver migration
  411. * update prStaRecOfAP with BSS-INFO.
  412. *
  413. * 07 07 2010 cm.chang
  414. * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
  415. * Support state of STA record change from 1 to 1
  416. *
  417. * 07 01 2010 cm.chang
  418. * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
  419. * Support sync command of STA_REC
  420. *
  421. * 07 01 2010 cp.wu
  422. * [WPD00003833][MT6620 and MT5931] Driver migration
  423. * implementation of DRV-SCN and related mailbox message handling.
  424. *
  425. * 06 30 2010 cp.wu
  426. * [WPD00003833][MT6620 and MT5931] Driver migration
  427. * sync. with CMD/EVENT document ver0.07.
  428. *
  429. * 06 29 2010 cp.wu
  430. * [WPD00003833][MT6620 and MT5931] Driver migration
  431. * correct variable naming for 8-bit variable used in CMD_BEACON_TEMPLATE_UPDATE.
  432. *
  433. * 06 29 2010 cp.wu
  434. * [WPD00003833][MT6620 and MT5931] Driver migration
  435. * 1) sync to. CMD/EVENT document v0.03
  436. * 2) simplify DTIM period parsing in scan.c only, bss.c no longer parses it again.
  437. * 3) send command packet to indicate FW-PM after
  438. * a) 1st beacon is received after AIS has connected to an AP
  439. * b) IBSS-ALONE has been created
  440. * c) IBSS-MERGE has occurred
  441. *
  442. * 06 28 2010 george.huang
  443. * [WPD00001556]Basic power managemenet function
  444. * Create beacon update path, with expose bssUpdateBeaconContent()
  445. *
  446. * 06 22 2010 cp.wu
  447. * [WPD00003833][MT6620 and MT5931] Driver migration
  448. * 1) add command warpper for STA-REC/BSS-INFO sync.
  449. * 2) enhance command packet sending procedure for non-oid part
  450. * 3) add command packet definitions for STA-REC/BSS-INFO sync.
  451. *
  452. * 06 21 2010 cp.wu
  453. * [WPD00003833][MT6620 and MT5931] Driver migration
  454. * add BSS/STA_REC commands for integration.
  455. *
  456. * 06 21 2010 yarco.yang
  457. * [WPD00003837][MT6620]Data Path Refine
  458. * Add TX Done Event handle entry
  459. *
  460. * 06 10 2010 cp.wu
  461. * [WPD00003833][MT6620 and MT5931] Driver migration
  462. * 1) eliminate CFG_CMD_EVENT_VERSION_0_9
  463. * 2) when disconnected, indicate nic directly (no event is needed)
  464. *
  465. * 06 06 2010 kevin.huang
  466. * [WPD00003832][MT6620 5931] Create driver base
  467. * [MT6620 5931] Create driver base
  468. *
  469. * 05 20 2010 cp.wu
  470. * [WPD00001943]Create WiFi test driver framework on WinXP
  471. * 1) integrate OID_GEN_NETWORK_LAYER_ADDRESSES with CMD_ID_SET_IP_ADDRESS
  472. * 2) buffer statistics data for 2 seconds
  473. * 3) use default value for adhoc parameters instead of 0
  474. *
  475. * 05 19 2010 cp.wu
  476. * [WPD00001943]Create WiFi test driver framework on WinXP
  477. * 1) do not take timeout mechanism for power mode oids
  478. * 2) retrieve network type from connection status
  479. * 3) after disassciation, set radio state to off
  480. * 4) TCP option over IPv6 is supported
  481. *
  482. * 05 17 2010 cp.wu
  483. * [WPD00001943]Create WiFi test driver framework on WinXP
  484. * correct OID_802_11_DISASSOCIATE handling.
  485. *
  486. * 05 17 2010 cp.wu
  487. * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support
  488. * 1) add timeout handler mechanism for pending command packets
  489. * 2) add p2p add/removal key
  490. *
  491. * 04 13 2010 cp.wu
  492. * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support
  493. * add framework for BT-over-Wi-Fi support.
  494. * * * * * * * * * * 1) prPendingCmdInfo is replaced by queue for multiple handler capability
  495. * * * * * * * * * * 2) command sequence number is now increased atomically
  496. * * * * * * * * * * 3) private data could be hold and taken use for other purpose
  497. *
  498. * 04 06 2010 cp.wu
  499. * [WPD00001943]Create WiFi test driver framework on WinXP
  500. * sync statistics data structure definition with firmware implementation
  501. *
  502. * 03 30 2010 cp.wu
  503. * [WPD00001943]Create WiFi test driver framework on WinXP
  504. * statistics information OIDs are now handled by querying from firmware domain
  505. *
  506. * 03 26 2010 cp.wu
  507. * [WPD00001943]Create WiFi test driver framework on WinXP
  508. * indicate media stream mode after set is done
  509. *
  510. * 03 26 2010 cp.wu
  511. * [WPD00001943]Create WiFi test driver framework on WinXP
  512. * add a temporary flag for integration with CMD/EVENT v0.9.
  513. *
  514. * 03 25 2010 cp.wu
  515. * [WPD00001943]Create WiFi test driver framework on WinXP
  516. * 1) correct OID_802_11_CONFIGURATION with frequency setting behavior.
  517. * * the frequency is used for adhoc connection only
  518. * * 2) update with SD1 v0.9 CMD/EVENT documentation
  519. *
  520. * 03 24 2010 jeffrey.chang
  521. * [WPD00003826]Initial import for Linux port
  522. * initial import for Linux port
  523. *
  524. * 03 22 2010 cp.wu
  525. * [WPD00003824][MT6620 Wi-Fi][New Feature] Add support of large scan list
  526. * Implement feature needed by CR: WPD00003824: refining association command by pasting scanning result
  527. *
  528. * 03 19 2010 cp.wu
  529. * [WPD00001943]Create WiFi test driver framework on WinXP
  530. * 1) add ACPI D0/D3 state switching support
  531. * * * * * * 2) use more formal way to handle interrupt when the status is retrieved from enhanced RX response
  532. *
  533. * 03 15 2010 kevin.huang
  534. * [WPD00003820][MT6620 Wi-Fi] Modify the code for meet the WHQL test
  535. * Add event for activate STA_RECORD_T
  536. *
  537. * 03 03 2010 cp.wu
  538. * [WPD00001943]Create WiFi test driver framework on WinXP
  539. * implement custom OID: EEPROM read/write access
  540. *
  541. * 03 03 2010 cp.wu
  542. * [WPD00001943]Create WiFi test driver framework on WinXP
  543. * implement OID_802_3_MULTICAST_LIST oid handling
  544. *
  545. * 02 26 2010 cp.wu
  546. * [WPD00001943]Create WiFi test driver framework on WinXP
  547. * move EVENT_ID_ASSOC_INFO from nic_rx.c to gl_kal_ndis_51.c
  548. * 'cause it involves OS dependent data structure handling
  549. *
  550. * 02 25 2010 cp.wu
  551. * [WPD00001943]Create WiFi test driver framework on WinXP
  552. * send CMD_ID_INFRASTRUCTURE when handling OID_802_11_INFRASTRUCTURE_MODE set.
  553. *
  554. * 02 09 2010 cp.wu
  555. * [WPD00001943]Create WiFi test driver framework on WinXP
  556. * 1. Permanent and current MAC address are now retrieved by CMD/EVENT packets instead of hard-coded address
  557. * * * * * 2. follow MSDN defined behavior when associates to another AP
  558. * * * * * 3. for firmware download, packet size could be up to 2048 bytes
  559. *
  560. * 01 27 2010 wh.su
  561. * [WPD00003816][MT6620 Wi-Fi] Adding the security support
  562. * .
  563. *
  564. * 01 27 2010 cp.wu
  565. * [WPD00001943]Create WiFi test driver framework on WinXP
  566. * 1. eliminate improper variable in rHifInfo
  567. * * * * * * 2. block TX/ordinary OID when RF test mode is engaged
  568. * * * * * * 3. wait until firmware finish operation when entering into and leaving from RF test mode
  569. * * * * * * 4. correct some HAL implementation
  570. *
  571. * 01 22 2010 cp.wu
  572. * [WPD00001943]Create WiFi test driver framework on WinXP
  573. * implement following 802.11 OIDs:
  574. * * * OID_802_11_RSSI,
  575. * * * OID_802_11_RSSI_TRIGGER,
  576. * * * OID_802_11_STATISTICS,
  577. * * * OID_802_11_DISASSOCIATE,
  578. * * * OID_802_11_POWER_MODE
  579. *
  580. * 01 21 2010 cp.wu
  581. * [WPD00001943]Create WiFi test driver framework on WinXP
  582. * implement OID_802_11_MEDIA_STREAM_MODE
  583. *
  584. * 01 21 2010 cp.wu
  585. * [WPD00001943]Create WiFi test driver framework on WinXP
  586. * implement OID_802_11_SUPPORTED_RATES / OID_802_11_DESIRED_RATES
  587. *
  588. * 12 30 2009 cp.wu
  589. * [WPD00001943]Create WiFi test driver framework on WinXP
  590. * 1) According to CMD/EVENT documentation v0.8,
  591. * * * * * * OID_CUSTOM_TEST_RX_STATUS & OID_CUSTOM_TEST_TX_STATUS is no longer used,
  592. * * * * * * and result is retrieved by get ATInfo instead
  593. * * * * * * 2) add 4 counter for recording aggregation statistics
  594. ** \main\maintrunk.MT6620WiFiDriver_Prj\20 2009-12-11 18:35:07 GMT mtk02752
  595. ** add CMD added in CMD/EVEN document v0.8
  596. ** \main\maintrunk.MT6620WiFiDriver_Prj\19 2009-12-10 16:39:37 GMT mtk02752
  597. ** eliminate unused definitions
  598. ** \main\maintrunk.MT6620WiFiDriver_Prj\18 2009-12-10 09:55:11 GMT mtk02752
  599. ** command ID/event ID revised
  600. ** \main\maintrunk.MT6620WiFiDriver_Prj\17 2009-12-09 13:57:37 GMT MTK02468
  601. ** Added event ids (EVENT_ID_RX_ADDBA and EVENT_ID_RX_DELBA)
  602. ** \main\maintrunk.MT6620WiFiDriver_Prj\16 2009-12-08 17:35:39 GMT mtk02752
  603. ** + add event ID for EVENT_ID_TEST_STATUS (rf test)
  604. ** \main\maintrunk.MT6620WiFiDriver_Prj\15 2009-12-07 23:01:09 GMT mtk02752
  605. ** add data structure for RF_TEST
  606. ** \main\maintrunk.MT6620WiFiDriver_Prj\14 2009-12-03 16:22:56 GMT mtk01461
  607. ** Modify the element - i4RSSI in EVENT of SCAN RESULT
  608. ** \main\maintrunk.MT6620WiFiDriver_Prj\13 2009-11-30 10:54:44 GMT mtk02752
  609. ** 1st DW of WIFI_CMD_T is shared with HIF_TX_HEADER_T, while 1st DW of WIFI_EVENT_T is shared with HIF_RX_HEADER_T
  610. ** \main\maintrunk.MT6620WiFiDriver_Prj\12 2009-11-26 10:16:58 GMT mtk02752
  611. ** resync EVENT_CONNECTION_STATUS
  612. ** \main\maintrunk.MT6620WiFiDriver_Prj\11 2009-11-25 21:34:01 GMT mtk02752
  613. ** sync. EVENT_SCAN_RESULT_T with firmware
  614. ** \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-11-25 21:03:48 GMT mtk02752
  615. ** refine MGMT_FRAME
  616. ** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-11-25 18:17:47 GMT mtk02752
  617. ** refine GL_WLAN_INFO_T for buffering scan result and presume max. ie length = 600 bytes
  618. ** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-11-24 22:41:20 GMT mtk02752
  619. ** add EVENT_SCAN_RESULT_T definition
  620. ** \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-11-23 20:29:16 GMT mtk02752
  621. ** fix typo
  622. ** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-11-23 14:46:01 GMT mtk02752
  623. ** add new command/event structure upon CM@SD1's documentation
  624. ** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-11-13 15:13:40 GMT mtk02752
  625. ** add command definition for CMD_BUILD_CONNECTION and EVENT_CONNECTION_STATUS
  626. ** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-05-20 12:22:22 GMT mtk01461
  627. ** Add SeqNum field to Event Header
  628. ** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-04-29 15:42:11 GMT mtk01461
  629. ** Update structure of HIF_EVENT_HEADER_T and EVENT_HDR_SIZE
  630. ** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-04-21 12:10:36 GMT mtk01461
  631. ** Add Common Set CMD Callback for MCR Write and other Set OID
  632. ** \main\maintrunk.MT6620WiFiDriver_Prj\1 2009-04-21 01:40:17 GMT mtk01461
  633. ** Command Done Handler
  634. */
  635. #ifndef _NIC_CMD_EVENT_H
  636. #define _NIC_CMD_EVENT_H
  637. /*******************************************************************************
  638. * C O M P I L E R F L A G S
  639. ********************************************************************************
  640. */
  641. /*******************************************************************************
  642. * E X T E R N A L R E F E R E N C E S
  643. ********************************************************************************
  644. */
  645. /*******************************************************************************
  646. * C O N S T A N T S
  647. ********************************************************************************
  648. */
  649. #define CMD_STATUS_SUCCESS 0
  650. #define CMD_STATUS_REJECTED 1
  651. #define CMD_STATUS_UNKNOWN 2
  652. #define EVENT_HDR_SIZE OFFSET_OF(WIFI_EVENT_T, aucBuffer[0])
  653. #define MAX_IE_LENGTH (600)
  654. #define MAX_WSC_IE_LENGTH (400)
  655. /* Action field in structure CMD_CH_PRIVILEGE_T */
  656. #define CMD_CH_ACTION_REQ 0
  657. #define CMD_CH_ACTION_ABORT 1
  658. /* Status field in structure EVENT_CH_PRIVILEGE_T */
  659. #define EVENT_CH_STATUS_GRANT 0
  660. #define SCN_PSCAN_SWC_RSSI_WIN_MAX 75
  661. #define SCN_PSCAN_SWC_MAX_NUM 8
  662. #define SCN_PSCAN_HOTLIST_REPORT_MAX_NUM 8
  663. typedef enum _ENUM_CMD_ID_T {
  664. CMD_ID_TEST_MODE = 1, /* 0x01 (Set) */
  665. CMD_ID_RESET_REQUEST, /* 0x02 (Set) */
  666. CMD_ID_BUILD_CONNECTION, /* 0x03 (Set) */
  667. CMD_ID_SCAN_REQ_V2, /* 0x04 (Set) */
  668. CMD_ID_NIC_POWER_CTRL, /* 0x05 (Set) */
  669. CMD_ID_POWER_SAVE_MODE, /* 0x06 (Set) */
  670. CMD_ID_LINK_ATTRIB, /* 0x07 (Set) */
  671. CMD_ID_ADD_REMOVE_KEY, /* 0x08 (Set) */
  672. CMD_ID_DEFAULT_KEY_ID, /* 0x09 (Set) */
  673. CMD_ID_INFRASTRUCTURE, /* 0x0a (Set) */
  674. CMD_ID_SET_RX_FILTER, /* 0x0b (Set) */
  675. CMD_ID_DOWNLOAD_BUF, /* 0x0c (Set) */
  676. CMD_ID_WIFI_START, /* 0x0d (Set) */
  677. CMD_ID_CMD_BT_OVER_WIFI, /* 0x0e (Set) */
  678. CMD_ID_SET_MEDIA_CHANGE_DELAY_TIME, /* 0x0f (Set) */
  679. CMD_ID_SEND_ADDBA_RSP, /* 0x10 (Set) */
  680. CMD_ID_WAPI_MODE, /* 0x11 (Set) (obsolete) */
  681. CMD_ID_WAPI_ASSOC_INFO, /* 0x12 (Set) (obsolete) */
  682. CMD_ID_SET_DOMAIN_INFO, /* 0x13 (Set) */
  683. CMD_ID_SET_IP_ADDRESS, /* 0x14 (Set) */
  684. CMD_ID_BSS_ACTIVATE_CTRL, /* 0x15 (Set) */
  685. CMD_ID_SET_BSS_INFO, /* 0x16 (Set) */
  686. CMD_ID_UPDATE_STA_RECORD, /* 0x17 (Set) */
  687. CMD_ID_REMOVE_STA_RECORD, /* 0x18 (Set) */
  688. CMD_ID_INDICATE_PM_BSS_CREATED, /* 0x19 (Set) */
  689. CMD_ID_INDICATE_PM_BSS_CONNECTED, /* 0x1a (Set) */
  690. CMD_ID_INDICATE_PM_BSS_ABORT, /* 0x1b (Set) */
  691. CMD_ID_UPDATE_BEACON_CONTENT, /* 0x1c (Set) */
  692. CMD_ID_SET_BSS_RLM_PARAM, /* 0x1d (Set) */
  693. CMD_ID_SCAN_REQ, /* 0x1e (Set) */
  694. CMD_ID_SCAN_CANCEL, /* 0x1f (Set) */
  695. CMD_ID_CH_PRIVILEGE, /* 0x20 (Set) */
  696. CMD_ID_UPDATE_WMM_PARMS, /* 0x21 (Set) */
  697. CMD_ID_SET_WMM_PS_TEST_PARMS, /* 0x22 (Set) */
  698. CMD_ID_TX_AMPDU, /* 0x23 (Set) */
  699. CMD_ID_ADDBA_REJECT, /* 0x24 (Set) */
  700. CMD_ID_SET_PS_PROFILE_ADV, /* 0x25 (Set) */
  701. CMD_ID_SET_RAW_PATTERN, /* 0x26 (Set) */
  702. CMD_ID_CONFIG_PATTERN_FUNC, /* 0x27 (Set) */
  703. CMD_ID_SET_TX_PWR, /* 0x28 (Set) */
  704. CMD_ID_SET_5G_PWR_OFFSET, /* 0x29 (Set) */
  705. CMD_ID_SET_PWR_PARAM, /* 0x2A (Set) */
  706. CMD_ID_P2P_ABORT, /* 0x2B (Set) */
  707. #if CFG_STRESS_TEST_SUPPORT
  708. CMD_ID_RANDOM_RX_RESET_EN = 0x2C, /* 0x2C (Set ) */
  709. CMD_ID_RANDOM_RX_RESET_DE = 0x2D, /* 0x2D (Set ) */
  710. CMD_ID_SAPP_EN = 0x2E, /* 0x2E (Set ) */
  711. CMD_ID_SAPP_DE = 0x2F, /* 0x2F (Set ) */
  712. #endif
  713. CMD_ID_ROAMING_TRANSIT = 0x30, /* 0x30 (Set) */
  714. CMD_ID_SET_PHY_PARAM, /* 0x31 (Set) */
  715. CMD_ID_SET_NOA_PARAM, /* 0x32 (Set) */
  716. CMD_ID_SET_OPPPS_PARAM, /* 0x33 (Set) */
  717. CMD_ID_SET_UAPSD_PARAM, /* 0x34 (Set) */
  718. CMD_ID_SET_SIGMA_STA_SLEEP, /* 0x35 (Set) */
  719. CMD_ID_SET_EDGE_TXPWR_LIMIT, /* 0x36 (Set) */
  720. CMD_ID_SET_DEVICE_MODE, /* 0x37 (Set) */
  721. CMD_ID_SET_TXPWR_CTRL, /* 0x38 (Set) */
  722. CMD_ID_SET_AUTOPWR_CTRL, /* 0x39 (Set) */
  723. CMD_ID_SET_WFD_CTRL, /* 0x3A (Set) */
  724. CMD_ID_SET_5G_EDGE_TXPWR_LIMIT, /* 0x3B (Set) */
  725. CMD_ID_SET_RSSI_COMPENSATE, /* 0x3C (Set) */
  726. CMD_ID_SET_BAND_SUPPORT = 0x3D, /* 0x3D (Set) */
  727. CMD_ID_SET_NLO_REQ, /* 0x3E (Set) */
  728. CMD_ID_SET_NLO_CANCEL, /* 0x3F (Set) */
  729. CMD_ID_SET_BATCH_REQ, /* 0x40 (Set) */
  730. CMD_ID_SET_WOWLAN, /* 0x41 (Set) */ /*CFG_SUPPORT_WOWLAN */
  731. CMD_ID_GET_PSCAN_CAPABILITY = 0x42, /* 0x42 (Set) */
  732. CMD_ID_SET_PSCN_ENABLE = 0x43, /* 0x43 (Set) */
  733. CMD_ID_SET_PSCAN_PARAM = 0x44, /* 0x44 (Set) */
  734. CMD_ID_SET_PSCN_ADD_HOTLIST_BSSID = 0x45, /* 0x45 (Set) */
  735. CMD_ID_SET_PSCN_ADD_SW_BSSID = 0x46, /* 0x46 (Set) */
  736. CMD_ID_SET_PSCN_MAC_ADDR = 0x47, /* 0x47 (Set) */
  737. CMD_ID_GET_GSCN_SCN_RESULT = 0x48, /* 0x48 (Get) */
  738. CMD_ID_SET_COUNTRY_POWER_LIMIT = 0x4A, /* 0x4A (Set) */
  739. CMD_ID_SET_SYSTEM_SUSPEND = 0x60, /* 0x60 (Set) */
  740. #if CFG_SUPPORT_FCC_DYNAMIC_TX_PWR_ADJUST
  741. CMD_ID_SET_FCC_TX_PWR_CERT = 0x6F, /* 0x6F (Set) */
  742. #endif
  743. CMD_ID_GET_NIC_CAPABILITY = 0x80, /* 0x80 (Query) */
  744. CMD_ID_GET_LINK_QUALITY, /* 0x81 (Query) */
  745. CMD_ID_GET_STATISTICS, /* 0x82 (Query) */
  746. CMD_ID_GET_CONNECTION_STATUS, /* 0x83 (Query) */
  747. CMD_ID_GET_ASSOC_INFO, /* 0x84 (Query) (obsolete) */
  748. CMD_ID_GET_STA_STATISTICS = 0x85, /* 0x85 (Query) */
  749. CMD_ID_GET_DEBUG_CODE = 0x86, /* 0x86 (Query) */
  750. CMD_ID_GET_LTE_CHN = 0x87, /* 0x87 (Query) */
  751. CMD_ID_GET_CHN_LOADING = 0x88, /* 0x88 (Query) */
  752. CMD_ID_GET_STATISTICS_PL = 0x89, /* 0x87 (Query) */
  753. CMD_ID_BASIC_CONFIG = 0xc1, /* 0xc1 (Set / Query) */
  754. CMD_ID_ACCESS_REG, /* 0xc2 (Set / Query) */
  755. CMD_ID_MAC_MCAST_ADDR, /* 0xc3 (Set / Query) */
  756. CMD_ID_802_11_PMKID, /* 0xc4 (Set / Query) */
  757. CMD_ID_ACCESS_EEPROM, /* 0xc5 (Set / Query) */
  758. CMD_ID_SW_DBG_CTRL, /* 0xc6 (Set / Query) */
  759. #if 1 /* CFG_SUPPORT_ANTI_PIRACY */
  760. CMD_ID_SEC_CHECK, /* 0xc7 (Set / Query) */
  761. #endif
  762. CMD_ID_DUMP_MEM, /* 0xc8 (Query) */
  763. CMD_ID_CHIP_CONFIG = 0xCA, /* 0xca (Set / Query) */
  764. #if CFG_SUPPORT_RDD_TEST_MODE
  765. CMD_ID_SET_RDD_CH = 0xE1,
  766. #endif
  767. CMD_ID_SET_BWCS = 0xF1,
  768. CMD_ID_SET_ROAMING_INFO = 0xF3,
  769. #if CFG_SUPPORT_BUILD_DATE_CODE
  770. CMD_ID_GET_BUILD_DATE_CODE = 0xF8,
  771. #endif
  772. CMD_ID_GET_BSS_INFO = 0xF9,
  773. #if 1 /* CFG_SUPPORT_HOTSPOT_OPTIMIZATION */
  774. CMD_ID_SET_HOTSPOT_OPTIMIZATION = 0xFA, /* 0xFA (Set) */
  775. #endif
  776. CMD_ID_TDLS_CORE = 0xFC,
  777. CMD_ID_STATS = 0xFD,
  778. CMD_ID_TX_AR_ERR_CONFIG = 0xFF
  779. } ENUM_CMD_ID_T, *P_ENUM_CMD_ID_T;
  780. typedef enum _ENUM_EVENT_ID_T {
  781. EVENT_ID_CMD_RESULT = 1, /* 0x01 (Query) */
  782. EVENT_ID_NIC_CAPABILITY, /* 0x02 (Query) */
  783. EVENT_ID_CONNECTION_STATUS, /* 0x03 (Query / Unsolicited) (obsolete) */
  784. EVENT_ID_SCAN_RESULT, /* 0x04 (Query / Unsolicited) (obselete) */
  785. EVENT_ID_LINK_QUALITY, /* 0x05 (Query / Unsolicited) */
  786. EVENT_ID_STATISTICS, /* 0x06 (Query) */
  787. EVENT_ID_MIC_ERR_INFO, /* 0x07 (Unsolicited) */
  788. EVENT_ID_ASSOC_INFO, /* 0x08 (Query - CMD_ID_GET_ASSOC_INFO) */
  789. EVENT_ID_BASIC_CONFIG, /* 0x09 (Query - CMD_ID_BASIC_CONFIG) */
  790. EVENT_ID_ACCESS_REG, /* 0x0a (Query - CMD_ID_ACCESS_REG) */
  791. EVENT_ID_MAC_MCAST_ADDR, /* 0x0b (Query - CMD_ID_MAC_MCAST_ADDR) */
  792. EVENT_ID_802_11_PMKID, /* 0x0c (Query - CMD_ID_802_11_PMKID) */
  793. EVENT_ID_ACCESS_EEPROM, /* 0x0d (Query - CMD_ID_ACCESS_EEPROM) */
  794. EVENT_ID_SLEEPY_NOTIFY, /* 0x0e (Query) */
  795. EVENT_ID_BT_OVER_WIFI, /* 0x0f (Unsolicited) */
  796. EVENT_ID_TEST_STATUS, /* 0x10 (Query - CMD_ID_TEST_MODE) */
  797. EVENT_ID_RX_ADDBA, /* 0x11 (Unsolicited) (obsolete) */
  798. EVENT_ID_RX_DELBA, /* 0x12 (Unsolicited) (obsolete) */
  799. EVENT_ID_ACTIVATE_STA_REC_T, /* 0x13 (Unsolicited) */
  800. EVENT_ID_DEACTIVATE_STA_REC_T, /* 0x14 (Unsolicited) */
  801. EVENT_ID_SCAN_DONE, /* 0x15 (Unsoiicited) */
  802. EVENT_ID_RX_FLUSH, /* 0x16 (Unsolicited) */
  803. EVENT_ID_TX_DONE, /* 0x17 (Unsolicited) */
  804. EVENT_ID_CH_PRIVILEGE, /* 0x18 (Unsolicited) */
  805. EVENT_ID_BSS_ABSENCE_PRESENCE = 0x19, /* 0x19 (Unsolicited) */
  806. EVENT_ID_STA_CHANGE_PS_MODE, /* 0x1A (Unsolicited) */
  807. EVENT_ID_BSS_BEACON_TIMEOUT, /* 0x1B (Unsolicited) */
  808. EVENT_ID_UPDATE_NOA_PARAMS, /* 0x1C (Unsolicited) */
  809. EVENT_ID_AP_OBSS_STATUS, /* 0x1D (Unsolicited) */
  810. EVENT_ID_STA_UPDATE_FREE_QUOTA, /* 0x1E (Unsolicited) */
  811. EVENT_ID_SW_DBG_CTRL, /* 0x1F (Query - CMD_ID_SW_DBG_CTRL) */
  812. EVENT_ID_ROAMING_STATUS, /* 0x20 (Unsolicited) */
  813. EVENT_ID_STA_AGING_TIMEOUT, /* 0x21 (Unsolicited) */
  814. #if 1 /* CFG_SUPPORT_ANTI_PIRACY */
  815. EVENT_ID_SEC_CHECK_RSP, /* 0x22 (Unsolicited) */
  816. #endif
  817. EVENT_ID_SEND_DEAUTH, /* 0x23 (Unsolicited) */
  818. #if CFG_SUPPORT_RDD_TEST_MODE
  819. EVENT_ID_UPDATE_RDD_STATUS, /* 0x24 (Unsolicited) */
  820. #endif
  821. #if CFG_SUPPORT_BCM && CFG_SUPPORT_BCM_BWCS
  822. EVENT_ID_UPDATE_BWCS_STATUS = 0x25, /* 0x25 (Unsolicited) */
  823. EVENT_ID_UPDATE_BCM_DEBUG, /* 0x26 (Unsolicited) */
  824. #endif
  825. EVENT_ID_RX_ERR,
  826. EVENT_ID_DUMP_MEM,
  827. EVENT_ID_STA_STATISTICS = 0x29, /* 0x29 (Query ) */
  828. EVENT_ID_STA_STATISTICS_UPDATE, /* 0x2A (Unsolicited) */
  829. EVENT_ID_NLO_DONE = 0x2b,
  830. EVENT_ID_GSCAN_CAPABILITY = 0x30,
  831. EVENT_ID_GSCAN_SCAN_COMPLETE = 0x31,
  832. EVENT_ID_GSCAN_FULL_RESULT = 0x32,
  833. EVENT_ID_GSCAN_SIGNIFICANT_CHANGE = 0x33,
  834. EVENT_ID_GSCAN_GEOFENCE_FOUND = 0x34,
  835. EVENT_ID_GSCAN_SCAN_AVAILABLE = 0x35,
  836. EVENT_ID_GSCAN_RESULT = 0x36,
  837. EVENT_ID_BATCH_RESULT = 0x37,
  838. EVENT_ID_TDLS = 0x80,
  839. EVENT_ID_STATS_ENV = 0x81,
  840. #if CFG_SUPPORT_BUILD_DATE_CODE
  841. EVENT_ID_BUILD_DATE_CODE = 0xF8,
  842. #endif
  843. EVENT_ID_GET_AIS_BSS_INFO = 0xF9,
  844. EVENT_ID_DEBUG_CODE = 0xFB,
  845. EVENT_ID_RFTEST_READY = 0xFC, /* 0xFC */
  846. EVENT_ID_TX_DONE_STATUS = 0xFD,
  847. EVENT_ID_FW_LOG_ENV = 0xFE, /* 0xFE, FW real time debug log */
  848. } ENUM_EVENT_ID_T, *P_ENUM_EVENT_ID_T;
  849. /*******************************************************************************
  850. * D A T A T Y P E S
  851. ********************************************************************************
  852. */
  853. #ifndef LINUX
  854. typedef UINT_8 CMD_STATUS;
  855. #endif
  856. #if CFG_SUPPORT_FCC_DYNAMIC_TX_PWR_ADJUST
  857. /* TX Power Adjust For FCC/CE Certification */
  858. typedef struct _CMD_FCC_TX_PWR_ADJUST_T {
  859. UINT_8 fgFccTxPwrAdjust;
  860. UINT_8 Offset_CCK; /* Offset for CH 11~14 */
  861. UINT_8 Offset_HT20; /* Offset for CH 11~14 */
  862. UINT_8 Offset_HT40; /* Offset for CH 11~14 */
  863. UINT_8 Channel_CCK[2]; /* [0] for start channel, [1] for ending channel */
  864. UINT_8 Channel_HT20[2]; /* [0] for start channel, [1] for ending channel */
  865. UINT_8 Channel_HT40[2]; /* [0] for start channel, [1] for ending channel */
  866. UINT_8 cReserved[2];
  867. } CMD_FCC_TX_PWR_ADJUST, *P_CMD_FCC_TX_PWR_ADJUST;
  868. #endif
  869. typedef struct _EVENT_TX_DONE_STATUS_T {
  870. UINT_8 ucPacketSeq;
  871. UINT_8 ucStatus;
  872. UINT_16 u2SequenceNumber;
  873. UINT_32 au4Reserved1;
  874. UINT_32 au4Reserved2;
  875. UINT_32 au4Reserved3;
  876. UINT_32 u4PktBufInfo;
  877. UINT_8 aucPktBuf[200];
  878. } EVENT_TX_DONE_STATUS_T, *P_EVENT_TX_DONE_STATUS_T;
  879. /* for Event Packet (via HIF-RX) */
  880. /* following CM's documentation v0.7 */
  881. typedef struct _WIFI_CMD_T {
  882. UINT_16 u2TxByteCount_UserPriority;
  883. UINT_8 ucEtherTypeOffset;
  884. UINT_8 ucResource_PktType_CSflags;
  885. UINT_8 ucCID;
  886. UINT_8 ucSetQuery;
  887. UINT_8 ucSeqNum;
  888. UINT_8 aucReserved2;
  889. UINT_8 aucBuffer[0];
  890. } WIFI_CMD_T, *P_WIFI_CMD_T;
  891. /* for Command Packet (via HIF-TX) */
  892. /* following CM's documentation v0.7 */
  893. typedef struct _WIFI_EVENT_T {
  894. UINT_16 u2PacketLen;
  895. UINT_16 u2PacketType;
  896. UINT_8 ucEID;
  897. UINT_8 ucSeqNum;
  898. UINT_8 aucReserved2[2];
  899. UINT_8 aucBuffer[0];
  900. } WIFI_EVENT_T, *P_WIFI_EVENT_T;
  901. /* CMD_ID_TEST_MODE */
  902. typedef struct _CMD_TEST_CTRL_T {
  903. UINT_8 ucAction;
  904. UINT_8 aucReserved[3];
  905. union {
  906. UINT_32 u4OpMode;
  907. UINT_32 u4ChannelFreq;
  908. PARAM_MTK_WIFI_TEST_STRUCT_T rRfATInfo;
  909. } u;
  910. } CMD_TEST_CTRL_T, *P_CMD_TEST_CTRL_T;
  911. /* EVENT_TEST_STATUS */
  912. typedef struct _PARAM_CUSTOM_RFTEST_TX_STATUS_STRUCT_T {
  913. UINT_32 u4PktSentStatus;
  914. UINT_32 u4PktSentCount;
  915. UINT_16 u2AvgAlc;
  916. UINT_8 ucCckGainControl;
  917. UINT_8 ucOfdmGainControl;
  918. } PARAM_CUSTOM_RFTEST_TX_STATUS_STRUCT_T, *P_PARAM_CUSTOM_RFTEST_TX_STATUS_STRUCT_T;
  919. typedef struct _PARAM_CUSTOM_RFTEST_RX_STATUS_STRUCT_T {
  920. UINT_32 u4IntRxOk; /*!< number of packets that Rx ok from interrupt */
  921. UINT_32 u4IntCrcErr; /*!< number of packets that CRC error from interrupt */
  922. UINT_32 u4IntShort; /*!< number of packets that is short preamble from interrupt */
  923. UINT_32 u4IntLong; /*!< number of packets that is long preamble from interrupt */
  924. UINT_32 u4PauRxPktCount; /*!< number of packets that Rx ok from PAU */
  925. UINT_32 u4PauCrcErrCount; /*!< number of packets that CRC error from PAU */
  926. UINT_32 u4PauRxFifoFullCount; /*!< number of packets that is short preamble from PAU */
  927. UINT_32 u4PauCCACount; /*!< CCA rising edge count */
  928. } PARAM_CUSTOM_RFTEST_RX_STATUS_STRUCT_T, *P_PARAM_CUSTOM_RFTEST_RX_STATUS_STRUCT_T;
  929. typedef union _EVENT_TEST_STATUS {
  930. PARAM_MTK_WIFI_TEST_STRUCT_T rATInfo;
  931. /* PARAM_CUSTOM_RFTEST_TX_STATUS_STRUCT_T rTxStatus; */
  932. /* PARAM_CUSTOM_RFTEST_RX_STATUS_STRUCT_T rRxStatus; */
  933. } EVENT_TEST_STATUS, *P_EVENT_TEST_STATUS;
  934. /* CMD_BUILD_CONNECTION */
  935. typedef struct _CMD_BUILD_CONNECTION {
  936. UINT_8 ucInfraMode;
  937. UINT_8 ucAuthMode;
  938. UINT_8 ucEncryptStatus;
  939. UINT_8 ucSsidLen;
  940. UINT_8 aucSsid[PARAM_MAX_LEN_SSID];
  941. UINT_8 aucBssid[PARAM_MAC_ADDR_LEN];
  942. /* Ad-hoc mode */
  943. UINT_16 u2BeaconPeriod;
  944. UINT_16 u2ATIMWindow;
  945. UINT_8 ucJoinOnly;
  946. UINT_8 ucReserved;
  947. UINT_32 u4FreqInKHz;
  948. /* for faster connection */
  949. UINT_8 aucScanResult[0];
  950. } CMD_BUILD_CONNECTION, *P_CMD_BUILD_CONNECTION;
  951. /* CMD_ADD_REMOVE_KEY */
  952. typedef struct _CMD_802_11_KEY {
  953. UINT_8 ucAddRemove;
  954. UINT_8 ucTxKey;
  955. UINT_8 ucKeyType;
  956. UINT_8 ucIsAuthenticator;
  957. UINT_8 aucPeerAddr[6];
  958. UINT_8 ucNetType;
  959. UINT_8 ucAlgorithmId;
  960. UINT_8 ucKeyId;
  961. UINT_8 ucKeyLen;
  962. UINT_8 aucReverved[2];
  963. UINT_8 aucKeyMaterial[32];
  964. UINT_8 aucKeyRsc[16];
  965. } CMD_802_11_KEY, *P_CMD_802_11_KEY;
  966. /* WPA2 PMKID cache structure */
  967. typedef struct _PMKID_ENTRY_T {
  968. PARAM_BSSID_INFO_T rBssidInfo;
  969. BOOLEAN fgPmkidExist;
  970. } PMKID_ENTRY_T, *P_PMKID_ENTRY_T;
  971. typedef struct _CMD_802_11_PMKID {
  972. ULONG u4BSSIDInfoCount;
  973. P_PMKID_ENTRY_T arPMKIDInfo[1];
  974. } CMD_802_11_PMKID, *P_CMD_802_11_PMKID;
  975. /* CMD_BASIC_CONFIG */
  976. typedef struct _CMD_CSUM_OFFLOAD {
  977. UINT_16 u2RxChecksum; /* bit0: IP, bit1: UDP, bit2: TCP */
  978. UINT_16 u2TxChecksum; /* bit0: IP, bit1: UDP, bit2: TCP */
  979. } CMD_CSUM_OFFLOAD, *P_CMD_CSUM_OFFLOAD;
  980. typedef struct _CMD_BASIC_CONFIG {
  981. PARAM_MAC_ADDRESS rMyMacAddr;
  982. UINT_8 ucNative80211;
  983. UINT_8 aucReserved[1];
  984. CMD_CSUM_OFFLOAD rCsumOffload;
  985. } CMD_BASIC_CONFIG, *P_CMD_BASIC_CONFIG, EVENT_BASIC_CONFIG, *P_EVENT_BASIC_CONFIG;
  986. /* CMD_MAC_MCAST_ADDR */
  987. typedef struct _CMD_MAC_MCAST_ADDR {
  988. UINT_32 u4NumOfGroupAddr;
  989. UINT_8 ucNetTypeIndex;
  990. UINT_8 aucReserved[3];
  991. PARAM_MAC_ADDRESS arAddress[MAX_NUM_GROUP_ADDR];
  992. } CMD_MAC_MCAST_ADDR, *P_CMD_MAC_MCAST_ADDR, EVENT_MAC_MCAST_ADDR, *P_EVENT_MAC_MCAST_ADDR;
  993. /* CMD_ACCESS_EEPROM */
  994. typedef struct _CMD_ACCESS_EEPROM {
  995. UINT_16 u2Offset;
  996. UINT_16 u2Data;
  997. } CMD_ACCESS_EEPROM, *P_CMD_ACCESS_EEPROM, EVENT_ACCESS_EEPROM, *P_EVENT_ACCESS_EEPROM;
  998. typedef struct _CMD_CUSTOM_NOA_PARAM_STRUCT_T {
  999. UINT_32 u4NoaDurationMs;
  1000. UINT_32 u4NoaIntervalMs;
  1001. UINT_32 u4NoaCount;
  1002. } CMD_CUSTOM_NOA_PARAM_STRUCT_T, *P_CMD_CUSTOM_NOA_PARAM_STRUCT_T;
  1003. typedef struct _CMD_CUSTOM_OPPPS_PARAM_STRUCT_T {
  1004. UINT_32 u4CTwindowMs;
  1005. } CMD_CUSTOM_OPPPS_PARAM_STRUCT_T, *P_CMD_CUSTOM_OPPPS_PARAM_STRUCT_T;
  1006. typedef struct _CMD_CUSTOM_UAPSD_PARAM_STRUCT_T {
  1007. UINT_8 fgEnAPSD;
  1008. UINT_8 fgEnAPSD_AcBe;
  1009. UINT_8 fgEnAPSD_AcBk;
  1010. UINT_8 fgEnAPSD_AcVo;
  1011. UINT_8 fgEnAPSD_AcVi;
  1012. UINT_8 ucMaxSpLen;
  1013. UINT_8 aucResv[2];
  1014. } CMD_CUSTOM_UAPSD_PARAM_STRUCT_T, *P_CMD_CUSTOM_UAPSD_PARAM_STRUCT_T;
  1015. /* EVENT_CONNECTION_STATUS */
  1016. typedef struct _EVENT_CONNECTION_STATUS {
  1017. UINT_8 ucMediaStatus;
  1018. UINT_8 ucReasonOfDisconnect;
  1019. UINT_8 ucInfraMode;
  1020. UINT_8 ucSsidLen;
  1021. UINT_8 aucSsid[PARAM_MAX_LEN_SSID];
  1022. UINT_8 aucBssid[PARAM_MAC_ADDR_LEN];
  1023. UINT_8 ucAuthenMode;
  1024. UINT_8 ucEncryptStatus;
  1025. UINT_16 u2BeaconPeriod;
  1026. UINT_16 u2AID;
  1027. UINT_16 u2ATIMWindow;
  1028. UINT_8 ucNetworkType;
  1029. UINT_8 aucReserved[1];
  1030. UINT_32 u4FreqInKHz;
  1031. #if CFG_ENABLE_WIFI_DIRECT
  1032. UINT_8 aucInterfaceAddr[PARAM_MAC_ADDR_LEN];
  1033. #endif
  1034. } EVENT_CONNECTION_STATUS, *P_EVENT_CONNECTION_STATUS;
  1035. /* EVENT_NIC_CAPABILITY */
  1036. typedef struct _EVENT_NIC_CAPABILITY {
  1037. UINT_16 u2ProductID;
  1038. UINT_16 u2FwVersion;
  1039. UINT_16 u2DriverVersion;
  1040. UINT_8 ucHw5GBandDisabled;
  1041. UINT_8 ucEepromUsed;
  1042. UINT_8 ucEfuseValid;
  1043. UINT_8 ucMacAddrValid;
  1044. #if CFG_REPORT_RFBB_VERSION
  1045. UINT_8 ucRfVersion;
  1046. UINT_8 ucPhyVersion;
  1047. #endif
  1048. #if CFG_ENABLE_CAL_LOG
  1049. UINT_8 ucRfCalFail;
  1050. UINT_8 ucBbCalFail;
  1051. #endif
  1052. #define FEATURE_SET_OFFSET_TDLS 0
  1053. #define FEATURE_SET_OFFSET_5G_SUPPORT 1
  1054. UINT_8 ucFeatureSet; /* bit0: TDLS */
  1055. UINT_8 aucReserved[1];
  1056. #if CFG_EMBED_FIRMWARE_BUILD_DATE_CODE
  1057. UINT_8 aucDateCode[16];
  1058. #endif
  1059. } EVENT_NIC_CAPABILITY, *P_EVENT_NIC_CAPABILITY;
  1060. /* modified version of WLAN_BEACON_FRAME_BODY_T for simplier buffering */
  1061. typedef struct _WLAN_BEACON_FRAME_BODY_T_LOCAL {
  1062. /* Beacon frame body */
  1063. UINT_32 au4Timestamp[2]; /* Timestamp */
  1064. UINT_16 u2BeaconInterval; /* Beacon Interval */
  1065. UINT_16 u2CapInfo; /* Capability */
  1066. UINT_8 aucInfoElem[MAX_IE_LENGTH]; /* Various IEs, start from SSID */
  1067. UINT_16 u2IELength; /* This field is *NOT* carried by F/W but caculated by nic_rx */
  1068. } WLAN_BEACON_FRAME_BODY_T_LOCAL, *P_WLAN_BEACON_FRAME_BODY_T_LOCAL;
  1069. /* EVENT_SCAN_RESULT */
  1070. typedef struct _EVENT_SCAN_RESULT_T {
  1071. INT_32 i4RSSI;
  1072. UINT_32 u4LinkQuality;
  1073. UINT_32 u4DSConfig; /* Center frequency */
  1074. UINT_32 u4DomainInfo; /* Require CM opinion */
  1075. UINT_32 u4Reserved;
  1076. UINT_8 ucNetworkType;
  1077. UINT_8 ucOpMode;
  1078. UINT_8 aucBssid[MAC_ADDR_LEN];
  1079. UINT_8 aucRatesEx[PARAM_MAX_LEN_RATES_EX];
  1080. WLAN_BEACON_FRAME_BODY_T_LOCAL rBeaconFrameBody;
  1081. } EVENT_SCAN_RESULT_T, *P_EVENT_SCAN_RESULT_T;
  1082. /* event of tkip mic error */
  1083. typedef struct _EVENT_MIC_ERR_INFO {
  1084. UINT_32 u4Flags;
  1085. } EVENT_MIC_ERR_INFO, *P_EVENT_MIC_ERR_INFO;
  1086. typedef struct _EVENT_PMKID_CANDIDATE_LIST_T {
  1087. UINT_32 u4Version; /*!< Version */
  1088. UINT_32 u4NumCandidates; /*!< How many candidates follow */
  1089. PARAM_PMKID_CANDIDATE_T arCandidateList[1];
  1090. } EVENT_PMKID_CANDIDATE_LIST_T, *P_EVENT_PMKID_CANDIDATE_LIST_T;
  1091. typedef struct _EVENT_CMD_RESULT {
  1092. UINT_8 ucCmdID;
  1093. UINT_8 ucStatus;
  1094. UINT_8 aucReserved[2];
  1095. } EVENT_CMD_RESULT, *P_EVENT_CMD_RESULT;
  1096. /* CMD_ID_ACCESS_REG & EVENT_ID_ACCESS_REG */
  1097. typedef struct _CMD_ACCESS_REG {
  1098. UINT_32 u4Address;
  1099. UINT_32 u4Data;
  1100. } CMD_ACCESS_REG, *P_CMD_ACCESS_REG;
  1101. /* CMD_ID_ACCESS_REG & EVENT_ID_ACCESS_REG */
  1102. #if CFG_AUTO_CHANNEL_SEL_SUPPORT
  1103. typedef struct _CMD_ACCESS_CHN_LOAD {
  1104. UINT_32 u4Address;
  1105. UINT_32 u4Data;
  1106. UINT_16 u2Channel;
  1107. UINT_8 aucReserved[2];
  1108. } CMD_ACCESS_CHN_LOAD, *P_ACCESS_CHN_LOAD;
  1109. #endif
  1110. /* CMD_DUMP_MEMORY */
  1111. typedef struct _CMD_DUMP_MEM {
  1112. UINT_32 u4Address;
  1113. UINT_32 u4Length;
  1114. UINT_32 u4RemainLength;
  1115. UINT_8 ucFragNum;
  1116. } CMD_DUMP_MEM, *P_CMD_DUMP_MEM;
  1117. typedef struct _EVENT_DUMP_MEM_T {
  1118. UINT_32 u4Address;
  1119. UINT_32 u4Length;
  1120. UINT_32 u4RemainLength;
  1121. UINT_8 ucFragNum;
  1122. UINT_8 aucBuffer[1];
  1123. } EVENT_DUMP_MEM_T, *P_EVENT_DUMP_MEM_T;
  1124. typedef struct _CMD_SW_DBG_CTRL_T {
  1125. UINT_32 u4Id;
  1126. UINT_32 u4Data;
  1127. /* Debug Support */
  1128. UINT_32 u4DebugCnt[64];
  1129. } CMD_SW_DBG_CTRL_T, *P_CMD_SW_DBG_CTRL_T;
  1130. /* CMD_ID_LINK_ATTRIB */
  1131. typedef struct _CMD_LINK_ATTRIB {
  1132. INT_8 cRssiTrigger;
  1133. UINT_8 ucDesiredRateLen;
  1134. UINT_16 u2DesiredRate[32];
  1135. UINT_8 ucMediaStreamMode;
  1136. UINT_8 aucReserved[1];
  1137. } CMD_LINK_ATTRIB, *P_CMD_LINK_ATTRIB;
  1138. /* CMD_ID_NIC_POWER_CTRL */
  1139. typedef struct _CMD_NIC_POWER_CTRL {
  1140. UINT_8 ucPowerMode;
  1141. UINT_8 aucReserved[3];
  1142. } CMD_NIC_POWER_CTRL, *P_CMD_NIC_POWER_CTRL;
  1143. /* CMD_ID_POWER_SAVE_MODE */
  1144. typedef struct _CMD_PS_PROFILE_T {
  1145. UINT_8 ucNetTypeIndex;
  1146. UINT_8 ucPsProfile;
  1147. UINT_8 aucReserved[2];
  1148. } CMD_PS_PROFILE_T, *P_CMD_PS_PROFILE_T;
  1149. /* EVENT_LINK_QUALITY */
  1150. typedef struct _EVENT_LINK_QUALITY {
  1151. INT_8 cRssi;
  1152. INT_8 cLinkQuality;
  1153. UINT_16 u2LinkSpeed;
  1154. UINT_8 ucMediumBusyPercentage;
  1155. } EVENT_LINK_QUALITY, *P_EVENT_LINK_QUALITY;
  1156. #if CFG_SUPPORT_P2P_RSSI_QUERY
  1157. /* EVENT_LINK_QUALITY */
  1158. typedef struct _EVENT_LINK_QUALITY_EX {
  1159. INT_8 cRssi;
  1160. INT_8 cLinkQuality;
  1161. UINT_16 u2LinkSpeed;
  1162. UINT_8 ucMediumBusyPercentage;
  1163. UINT_8 ucIsLQ0Rdy;
  1164. INT_8 cRssiP2P; /* For P2P Network. */
  1165. INT_8 cLinkQualityP2P;
  1166. UINT_16 u2LinkSpeedP2P;
  1167. UINT_8 ucMediumBusyPercentageP2P;
  1168. UINT_8 ucIsLQ1Rdy;
  1169. } EVENT_LINK_QUALITY_EX, *P_EVENT_LINK_QUALITY_EX;
  1170. #endif
  1171. /* EVENT_ID_STATISTICS */
  1172. typedef struct _EVENT_STATISTICS {
  1173. LARGE_INTEGER rTransmittedFragmentCount;
  1174. LARGE_INTEGER rMulticastTransmittedFrameCount;
  1175. LARGE_INTEGER rFailedCount;
  1176. LARGE_INTEGER rRetryCount;
  1177. LARGE_INTEGER rMultipleRetryCount;
  1178. LARGE_INTEGER rRTSSuccessCount;
  1179. LARGE_INTEGER rRTSFailureCount;
  1180. LARGE_INTEGER rACKFailureCount;
  1181. LARGE_INTEGER rFrameDuplicateCount;
  1182. LARGE_INTEGER rReceivedFragmentCount;
  1183. LARGE_INTEGER rMulticastReceivedFrameCount;
  1184. LARGE_INTEGER rFCSErrorCount;
  1185. } EVENT_STATISTICS, *P_EVENT_STATISTICS;
  1186. /* EVENT_ID_FW_SLEEPY_NOTIFY */
  1187. typedef struct _EVENT_SLEEPY_NOTIFY {
  1188. UINT_8 ucSleepyState;
  1189. UINT_8 aucReserved[3];
  1190. } EVENT_SLEEPY_NOTIFY, *P_EVENT_SLEEPY_NOTIFY;
  1191. typedef struct _EVENT_ACTIVATE_STA_REC_T {
  1192. UINT_8 aucMacAddr[6];
  1193. UINT_8 ucStaRecIdx;
  1194. UINT_8 ucNetworkTypeIndex;
  1195. BOOLEAN fgIsQoS;
  1196. BOOLEAN fgIsAP;
  1197. UINT_8 aucReserved[2];
  1198. } EVENT_ACTIVATE_STA_REC_T, *P_EVENT_ACTIVATE_STA_REC_T;
  1199. typedef struct _EVENT_DEACTIVATE_STA_REC_T {
  1200. UINT_8 ucStaRecIdx;
  1201. UINT_8 aucReserved[3];
  1202. } EVENT_DEACTIVATE_STA_REC_T, *P_EVENT_DEACTIVATE_STA_REC_T;
  1203. /* CMD_BT_OVER_WIFI */
  1204. typedef struct _CMD_BT_OVER_WIFI {
  1205. UINT_8 ucAction; /* 0: query, 1: setup, 2: destroy */
  1206. UINT_8 ucChannelNum;
  1207. PARAM_MAC_ADDRESS rPeerAddr;
  1208. UINT_16 u2BeaconInterval;
  1209. UINT_8 ucTimeoutDiscovery;
  1210. UINT_8 ucTimeoutInactivity;
  1211. UINT_8 ucRole;
  1212. UINT_8 PAL_Capabilities;
  1213. UINT_8 cMaxTxPower;
  1214. UINT_8 ucChannelBand;
  1215. UINT_8 ucReserved[1];
  1216. } CMD_BT_OVER_WIFI, *P_CMD_BT_OVER_WIFI;
  1217. /* EVENT_BT_OVER_WIFI */
  1218. typedef struct _EVENT_BT_OVER_WIFI {
  1219. UINT_8 ucLinkStatus;
  1220. UINT_8 ucSelectedChannel;
  1221. INT_8 cRSSI;
  1222. UINT_8 ucReserved[1];
  1223. } EVENT_BT_OVER_WIFI, *P_EVENT_BT_OVER_WIFI;
  1224. /* Same with DOMAIN_SUBBAND_INFO */
  1225. typedef struct _CMD_SUBBAND_INFO {
  1226. UINT_8 ucRegClass;
  1227. UINT_8 ucBand;
  1228. UINT_8 ucChannelSpan;
  1229. UINT_8 ucFirstChannelNum;
  1230. UINT_8 ucNumChannels;
  1231. UINT_8 aucReserved[3];
  1232. } CMD_SUBBAND_INFO, *P_CMD_SUBBAND_INFO;
  1233. /* CMD_SET_DOMAIN_INFO */
  1234. typedef struct _CMD_SET_DOMAIN_INFO_T {
  1235. UINT_16 u2CountryCode;
  1236. UINT_16 u2IsSetPassiveScan; /* 0: set channel domain; 1: set passive scan channel domain */
  1237. CMD_SUBBAND_INFO rSubBand[6];
  1238. UINT_8 uc2G4Bandwidth; /* CONFIG_BW_20_40M or CONFIG_BW_20M */
  1239. UINT_8 uc5GBandwidth; /* CONFIG_BW_20_40M or CONFIG_BW_20M */
  1240. UINT_8 aucReserved[2];
  1241. } CMD_SET_DOMAIN_INFO_T, *P_CMD_SET_DOMAIN_INFO_T;
  1242. #if CFG_SUPPORT_PWR_LIMIT_COUNTRY
  1243. /* CMD_SET_PWR_LIMIT_TABLE */
  1244. typedef struct _CMD_CHANNEL_POWER_LIMIT {
  1245. UINT_8 ucCentralCh;
  1246. INT_8 cPwrLimitCCK;
  1247. INT_8 cPwrLimit20;
  1248. INT_8 cPwrLimit40;
  1249. INT_8 cPwrLimit80;
  1250. INT_8 cPwrLimit160;
  1251. UINT_8 ucFlag;
  1252. UINT_8 aucReserved[1];
  1253. } CMD_CHANNEL_POWER_LIMIT, *P_CMD_CHANNEL_POWER_LIMIT;
  1254. typedef struct _CMD_SET_COUNTRY_CHANNEL_POWER_LIMIT_T {
  1255. UINT_16 u2CountryCode;
  1256. UINT_8 ucCountryFlag;
  1257. UINT_8 ucNum;
  1258. UINT_8 aucReserved[4];
  1259. CMD_CHANNEL_POWER_LIMIT rChannelPowerLimit[1];
  1260. } CMD_SET_COUNTRY_CHANNEL_POWER_LIMIT_T, *P_CMD_SET_COUNTRY_CHANNEL_POWER_LIMIT_T;
  1261. #endif
  1262. /* CMD_SET_IP_ADDRESS */
  1263. typedef struct _IPV4_NETWORK_ADDRESS {
  1264. UINT_8 aucIpAddr[4];
  1265. } IPV4_NETWORK_ADDRESS, *P_IPV4_NETWORK_ADDRESS;
  1266. typedef struct _CMD_SET_NETWORK_ADDRESS_LIST {
  1267. UINT_8 ucNetTypeIndex;
  1268. UINT_8 ucAddressCount;
  1269. UINT_8 ucReserved[2];
  1270. IPV4_NETWORK_ADDRESS arNetAddress[1];
  1271. } CMD_SET_NETWORK_ADDRESS_LIST, *P_CMD_SET_NETWORK_ADDRESS_LIST;
  1272. typedef struct _PATTERN_DESCRIPTION {
  1273. UINT_8 fgCheckBcA1;
  1274. UINT_8 fgCheckMcA1;
  1275. UINT_8 ePatternHeader;
  1276. UINT_8 fgAndOp;
  1277. UINT_8 fgNotOp;
  1278. UINT_8 ucPatternMask;
  1279. UINT_16 ucPatternOffset;
  1280. UINT_8 aucPattern[8];
  1281. } PATTERN_DESCRIPTION, *P_PATTERN_DESCRIPTION;
  1282. typedef struct _CMD_RAW_PATTERN_CONFIGURATION_T {
  1283. PATTERN_DESCRIPTION arPatternDesc[4];
  1284. } CMD_RAW_PATTERN_CONFIGURATION_T, *P_CMD_RAW_PATTERN_CONFIGURATION_T;
  1285. typedef struct _CMD_PATTERN_FUNC_CONFIG {
  1286. BOOLEAN fgBcA1En;
  1287. BOOLEAN fgMcA1En;
  1288. BOOLEAN fgBcA1MatchDrop;
  1289. BOOLEAN fgMcA1MatchDrop;
  1290. } CMD_PATTERN_FUNC_CONFIG, *P_CMD_PATTERN_FUNC_CONFIG;
  1291. typedef struct _EVENT_TX_DONE_T {
  1292. UINT_8 ucPacketSeq;
  1293. UINT_8 ucStatus;
  1294. UINT_16 u2SequenceNumber;
  1295. UINT_32 au4Reserved1;
  1296. UINT_32 au4Reserved2;
  1297. UINT_32 au4Reserved3;
  1298. } EVENT_TX_DONE_T, *P_EVENT_TX_DONE_T;
  1299. typedef struct _CMD_BSS_ACTIVATE_CTRL {
  1300. UINT_8 ucNetTypeIndex;
  1301. UINT_8 ucActive;
  1302. UINT_8 aucReserved[2];
  1303. } CMD_BSS_ACTIVATE_CTRL, *P_CMD_BSS_ACTIVATE_CTRL;
  1304. typedef struct _CMD_SET_BSS_RLM_PARAM_T {
  1305. UINT_8 ucNetTypeIndex;
  1306. UINT_8 ucRfBand;
  1307. UINT_8 ucPrimaryChannel;
  1308. UINT_8 ucRfSco;
  1309. UINT_8 ucErpProtectMode;
  1310. UINT_8 ucHtProtectMode;
  1311. UINT_8 ucGfOperationMode;
  1312. UINT_8 ucTxRifsMode;
  1313. UINT_16 u2HtOpInfo3;
  1314. UINT_16 u2HtOpInfo2;
  1315. UINT_8 ucHtOpInfo1;
  1316. UINT_8 ucUseShortPreamble;
  1317. UINT_8 ucUseShortSlotTime;
  1318. UINT_8 ucCheckId; /* Fixed value: 0x72 */
  1319. } CMD_SET_BSS_RLM_PARAM_T, *P_CMD_SET_BSS_RLM_PARAM_T;
  1320. typedef struct _CMD_SET_BSS_INFO {
  1321. UINT_8 ucNetTypeIndex;
  1322. UINT_8 ucConnectionState;
  1323. UINT_8 ucCurrentOPMode;
  1324. UINT_8 ucSSIDLen;
  1325. UINT_8 aucSSID[32];
  1326. UINT_8 aucBSSID[6];
  1327. UINT_8 ucIsQBSS;
  1328. UINT_8 ucReserved1;
  1329. UINT_16 u2OperationalRateSet;
  1330. UINT_16 u2BSSBasicRateSet;
  1331. UINT_8 ucStaRecIdxOfAP;
  1332. UINT_8 ucReserved2;
  1333. UINT_8 ucReserved3;
  1334. UINT_8 ucNonHTBasicPhyType; /* For Slot Time and CWmin */
  1335. UINT_8 ucAuthMode;
  1336. UINT_8 ucEncStatus;
  1337. UINT_8 ucPhyTypeSet;
  1338. UINT_8 aucOwnMac[6];
  1339. UINT_8 fgWapiMode;
  1340. UINT_8 fgIsApMode;
  1341. UINT_8 fgHiddenSsidMode;
  1342. CMD_SET_BSS_RLM_PARAM_T rBssRlmParam;
  1343. } CMD_SET_BSS_INFO, *P_CMD_SET_BSS_INFO;
  1344. typedef struct _CMD_UPDATE_STA_RECORD_T {
  1345. UINT_8 ucIndex;
  1346. UINT_8 ucStaType;
  1347. UINT_8 aucMacAddr[MAC_ADDR_LEN];
  1348. UINT_16 u2AssocId;
  1349. UINT_16 u2ListenInterval;
  1350. UINT_8 ucNetTypeIndex;
  1351. UINT_8 ucDesiredPhyTypeSet;
  1352. UINT_16 u2DesiredNonHTRateSet;
  1353. UINT_16 u2BSSBasicRateSet;
  1354. UINT_8 ucIsQoS;
  1355. UINT_8 ucIsUapsdSupported;
  1356. UINT_8 ucStaState;
  1357. UINT_8 ucMcsSet;
  1358. UINT_8 ucSupMcs32;
  1359. UINT_8 ucAmpduParam;
  1360. UINT_16 u2HtCapInfo;
  1361. UINT_16 u2HtExtendedCap;
  1362. UINT_32 u4TxBeamformingCap;
  1363. UINT_8 ucAselCap;
  1364. UINT_8 ucRCPI;
  1365. UINT_8 ucNeedResp;
  1366. UINT_8 ucUapsdAc; /* b0~3: Trigger enabled, b4~7: Delivery enabled */
  1367. UINT_8 ucUapsdSp; /* 0: all, 1: max 2, 2: max 4, 3: max 6 */
  1368. UINT_8 aucReserved[3];
  1369. /* TBD */
  1370. } CMD_UPDATE_STA_RECORD_T, *P_CMD_UPDATE_STA_RECORD_T;
  1371. typedef struct _CMD_REMOVE_STA_RECORD_T {
  1372. UINT_8 ucIndex;
  1373. UINT_8 ucReserved;
  1374. UINT_8 aucMacAddr[MAC_ADDR_LEN];
  1375. } CMD_REMOVE_STA_RECORD_T, *P_CMD_REMOVE_STA_RECORD_T;
  1376. typedef struct _CMD_INDICATE_PM_BSS_CREATED_T {
  1377. UINT_8 ucNetTypeIndex;
  1378. UINT_8 ucDtimPeriod;
  1379. UINT_16 u2BeaconInterval;
  1380. UINT_16 u2AtimWindow;
  1381. UINT_8 aucReserved[2];
  1382. } CMD_INDICATE_PM_BSS_CREATED, *P_CMD_INDICATE_PM_BSS_CREATED;
  1383. typedef struct _CMD_INDICATE_PM_BSS_CONNECTED_T {
  1384. UINT_8 ucNetTypeIndex;
  1385. UINT_8 ucDtimPeriod;
  1386. UINT_16 u2AssocId;
  1387. UINT_16 u2BeaconInterval;
  1388. UINT_16 u2AtimWindow;
  1389. UINT_8 fgIsUapsdConnection;
  1390. UINT_8 ucBmpDeliveryAC;
  1391. UINT_8 ucBmpTriggerAC;
  1392. UINT_8 aucReserved[1];
  1393. } CMD_INDICATE_PM_BSS_CONNECTED, *P_CMD_INDICATE_PM_BSS_CONNECTED;
  1394. typedef struct _CMD_INDICATE_PM_BSS_ABORT {
  1395. UINT_8 ucNetTypeIndex;
  1396. UINT_8 aucReserved[3];
  1397. } CMD_INDICATE_PM_BSS_ABORT, *P_CMD_INDICATE_PM_BSS_ABORT;
  1398. typedef struct _CMD_BEACON_TEMPLATE_UPDATE {
  1399. UINT_8 ucUpdateMethod; /* 0: update randomly,
  1400. * 1: update all,
  1401. * 2: delete all (1 and 2 will update directly without search)
  1402. */
  1403. UINT_8 ucNetTypeIndex;
  1404. UINT_8 aucReserved[2];
  1405. UINT_16 u2Capability;
  1406. UINT_16 u2IELen;
  1407. UINT_8 aucIE[MAX_IE_LENGTH];
  1408. } CMD_BEACON_TEMPLATE_UPDATE, *P_CMD_BEACON_TEMPLATE_UPDATE;
  1409. typedef struct _CMD_SET_WMM_PS_TEST_STRUCT_T {
  1410. UINT_8 ucNetTypeIndex;
  1411. UINT_8 bmfgApsdEnAc; /* b0~3: trigger-en AC0~3. b4~7: delivery-en AC0~3 */
  1412. UINT_8 ucIsEnterPsAtOnce; /* enter PS immediately without 5 second guard after connected */
  1413. UINT_8 ucIsDisableUcTrigger; /* not to trigger UC on beacon TIM is matched (under U-APSD) */
  1414. } CMD_SET_WMM_PS_TEST_STRUCT_T, *P_CMD_SET_WMM_PS_TEST_STRUCT_T;
  1415. /* Definition for CHANNEL_INFO.ucBand:
  1416. * 0: Reserved
  1417. * 1: BAND_2G4
  1418. * 2: BAND_5G
  1419. * Others: Reserved
  1420. */
  1421. typedef struct _CHANNEL_INFO_T {
  1422. UINT_8 ucBand;
  1423. UINT_8 ucChannelNum;
  1424. } CHANNEL_INFO_T, *P_CHANNEL_INFO_T;
  1425. typedef struct _CMD_SCAN_REQ_EXT_CH_T {
  1426. UINT_8 ucSeqNum;
  1427. UINT_8 ucNetworkType;
  1428. UINT_8 ucScanType;
  1429. UINT_8 ucSSIDType; /* BIT(0) wildcard / BIT(1) P2P-wildcard / BIT(2) specific */
  1430. UINT_8 ucSSIDLength;
  1431. UINT_8 aucReserved[1];
  1432. UINT_16 u2ChannelMinDwellTime;
  1433. UINT_8 aucSSID[32];
  1434. UINT_16 u2ChannelDwellTime; /* For P2P */
  1435. UINT_8 ucChannelType;
  1436. UINT_8 ucChannelListNum;
  1437. CHANNEL_INFO_T arChannelList[MAXIMUM_OPERATION_CHANNEL_LIST];
  1438. UINT_16 u2IELen;
  1439. UINT_8 aucIE[MAX_IE_LENGTH];
  1440. } CMD_SCAN_REQ_EXT_CH, *P_CMD_SCAN_REQ_EXT_CH;
  1441. typedef struct _CMD_SCAN_REQ_T {
  1442. UINT_8 ucSeqNum;
  1443. UINT_8 ucNetworkType;
  1444. UINT_8 ucScanType;
  1445. UINT_8 ucSSIDType; /* BIT(0) wildcard / BIT(1) P2P-wildcard / BIT(2) specific */
  1446. UINT_8 ucSSIDLength;
  1447. UINT_8 aucReserved[1];
  1448. UINT_16 u2ChannelMinDwellTime;
  1449. UINT_8 aucSSID[32];
  1450. UINT_16 u2ChannelDwellTime; /* For P2P */
  1451. UINT_8 ucChannelType;
  1452. UINT_8 ucChannelListNum;
  1453. CHANNEL_INFO_T arChannelList[32];
  1454. UINT_16 u2IELen;
  1455. UINT_8 aucIE[MAX_IE_LENGTH];
  1456. } CMD_SCAN_REQ, *P_CMD_SCAN_REQ;
  1457. typedef struct _CMD_SCAN_REQ_V2_EXT_CH_T {
  1458. UINT_8 ucSeqNum;
  1459. UINT_8 ucNetworkType;
  1460. UINT_8 ucScanType;
  1461. UINT_8 ucSSIDType;
  1462. PARAM_SSID_T arSSID[4];
  1463. UINT_16 u2ProbeDelayTime;
  1464. UINT_16 u2ChannelDwellTime; /* For P2P */
  1465. UINT_8 ucChannelType;
  1466. UINT_8 ucChannelListNum;
  1467. CHANNEL_INFO_T arChannelList[MAXIMUM_OPERATION_CHANNEL_LIST];
  1468. UINT_16 u2IELen;
  1469. UINT_8 aucIE[MAX_IE_LENGTH];
  1470. } CMD_SCAN_REQ_V2_EXT_CH, *P_CMD_SCAN_REQ_V2_EXT_CH;
  1471. typedef struct _CMD_SCAN_REQ_V2_T {
  1472. UINT_8 ucSeqNum;
  1473. UINT_8 ucNetworkType;
  1474. UINT_8 ucScanType;
  1475. UINT_8 ucSSIDType;
  1476. PARAM_SSID_T arSSID[4];
  1477. UINT_16 u2ProbeDelayTime;
  1478. UINT_16 u2ChannelDwellTime; /* For P2P */
  1479. UINT_8 ucChannelType;
  1480. UINT_8 ucChannelListNum;
  1481. CHANNEL_INFO_T arChannelList[32];
  1482. UINT_16 u2IELen;
  1483. UINT_8 aucIE[MAX_IE_LENGTH];
  1484. } CMD_SCAN_REQ_V2, *P_CMD_SCAN_REQ_V2;
  1485. typedef struct _CMD_SCAN_CANCEL_T {
  1486. UINT_8 ucSeqNum;
  1487. UINT_8 ucIsExtChannel; /* For P2P channel extension. */
  1488. UINT_8 aucReserved[2];
  1489. } CMD_SCAN_CANCEL, *P_CMD_SCAN_CANCEL;
  1490. typedef struct _EVENT_SCAN_DONE_T {
  1491. UINT_8 ucSeqNum;
  1492. UINT_8 ucSparseChannelValid;
  1493. CHANNEL_INFO_T rSparseChannel;
  1494. } EVENT_SCAN_DONE, *P_EVENT_SCAN_DONE;
  1495. #if CFG_SUPPORT_GET_CH_ENV
  1496. typedef struct _CH_ENV_T {
  1497. UINT_8 ucChNum;
  1498. UINT_8 ucApNum;
  1499. } CH_ENV_T, *P_CH_ENV_T;
  1500. #endif
  1501. #if 0 /* CFG_SUPPORT_BATCH_SCAN */
  1502. typedef struct _CMD_BATCH_REQ_T {
  1503. UINT_8 ucSeqNum;
  1504. UINT_8 ucNetTypeIndex;
  1505. UINT_8 ucCmd; /* Start/ Stop */
  1506. UINT_8 ucMScan; /* an integer number of scans per batch */
  1507. UINT_8 ucBestn; /* an integer number of the max AP to remember per scan */
  1508. UINT_8 ucRtt; /* an integer number of highest-strength AP for which we'd
  1509. like approximate distance reported */
  1510. UINT_8 ucChannel; /* channels */
  1511. UINT_8 ucChannelType;
  1512. UINT_8 ucChannelListNum;
  1513. UINT_8 aucReserved[3];
  1514. UINT_32 u4Scanfreq; /* an integer number of seconds between scans */
  1515. CHANNEL_INFO_T arChannelList[32]; /* channels */
  1516. } CMD_BATCH_REQ_T, *P_CMD_BATCH_REQ_T;
  1517. typedef struct _EVENT_BATCH_RESULT_ENTRY_T {
  1518. UINT_8 aucBssid[MAC_ADDR_LEN];
  1519. UINT_8 aucSSID[ELEM_MAX_LEN_SSID];
  1520. UINT_8 ucSSIDLen;
  1521. INT_8 cRssi;
  1522. UINT_32 ucFreq;
  1523. UINT_32 u4Age;
  1524. UINT_32 u4Dist;
  1525. UINT_32 u4Distsd;
  1526. } EVENT_BATCH_RESULT_ENTRY_T, *P_EVENT_BATCH_RESULT_ENTRY_T;
  1527. typedef struct _EVENT_BATCH_RESULT_T {
  1528. UINT_8 ucScanCount;
  1529. UINT_8 aucReserved[3];
  1530. EVENT_BATCH_RESULT_ENTRY_T arBatchResult[12]; /* Must be the same with SCN_BATCH_STORE_MAX_NUM */
  1531. } EVENT_BATCH_RESULT_T, *P_EVENT_BATCH_RESULT_T;
  1532. #endif
  1533. typedef struct _CMD_CH_PRIVILEGE_T {
  1534. UINT_8 ucNetTypeIndex;
  1535. UINT_8 ucTokenID;
  1536. UINT_8 ucAction;
  1537. UINT_8 ucPrimaryChannel;
  1538. UINT_8 ucRfSco;
  1539. UINT_8 ucRfBand;
  1540. UINT_8 ucReqType;
  1541. UINT_8 ucReserved;
  1542. UINT_32 u4MaxInterval; /* In unit of ms */
  1543. UINT_8 aucBSSID[6];
  1544. UINT_8 aucReserved[2];
  1545. } CMD_CH_PRIVILEGE_T, *P_CMD_CH_PRIVILEGE_T;
  1546. typedef struct _CMD_TX_PWR_T {
  1547. INT_8 cTxPwr2G4Cck; /* signed, in unit of 0.5dBm */
  1548. #if defined(MT6620)
  1549. INT_8 acReserved[3];
  1550. #elif defined(MT6628)
  1551. INT_8 cTxPwr2G4Dsss; /* signed, in unit of 0.5dBm */
  1552. INT_8 acReserved[2];
  1553. #else
  1554. #error "No valid definition!"
  1555. #endif
  1556. INT_8 cTxPwr2G4OFDM_BPSK;
  1557. INT_8 cTxPwr2G4OFDM_QPSK;
  1558. INT_8 cTxPwr2G4OFDM_16QAM;
  1559. INT_8 cTxPwr2G4OFDM_Reserved;
  1560. INT_8 cTxPwr2G4OFDM_48Mbps;
  1561. INT_8 cTxPwr2G4OFDM_54Mbps;
  1562. INT_8 cTxPwr2G4HT20_BPSK;
  1563. INT_8 cTxPwr2G4HT20_QPSK;
  1564. INT_8 cTxPwr2G4HT20_16QAM;
  1565. INT_8 cTxPwr2G4HT20_MCS5;
  1566. INT_8 cTxPwr2G4HT20_MCS6;
  1567. INT_8 cTxPwr2G4HT20_MCS7;
  1568. INT_8 cTxPwr2G4HT40_BPSK;
  1569. INT_8 cTxPwr2G4HT40_QPSK;
  1570. INT_8 cTxPwr2G4HT40_16QAM;
  1571. INT_8 cTxPwr2G4HT40_MCS5;
  1572. INT_8 cTxPwr2G4HT40_MCS6;
  1573. INT_8 cTxPwr2G4HT40_MCS7;
  1574. INT_8 cTxPwr5GOFDM_BPSK;
  1575. INT_8 cTxPwr5GOFDM_QPSK;
  1576. INT_8 cTxPwr5GOFDM_16QAM;
  1577. INT_8 cTxPwr5GOFDM_Reserved;
  1578. INT_8 cTxPwr5GOFDM_48Mbps;
  1579. INT_8 cTxPwr5GOFDM_54Mbps;
  1580. INT_8 cTxPwr5GHT20_BPSK;
  1581. INT_8 cTxPwr5GHT20_QPSK;
  1582. INT_8 cTxPwr5GHT20_16QAM;
  1583. INT_8 cTxPwr5GHT20_MCS5;
  1584. INT_8 cTxPwr5GHT20_MCS6;
  1585. INT_8 cTxPwr5GHT20_MCS7;
  1586. INT_8 cTxPwr5GHT40_BPSK;
  1587. INT_8 cTxPwr5GHT40_QPSK;
  1588. INT_8 cTxPwr5GHT40_16QAM;
  1589. INT_8 cTxPwr5GHT40_MCS5;
  1590. INT_8 cTxPwr5GHT40_MCS6;
  1591. INT_8 cTxPwr5GHT40_MCS7;
  1592. } CMD_TX_PWR_T, *P_CMD_TX_PWR_T;
  1593. typedef struct _CMD_5G_PWR_OFFSET_T {
  1594. INT_8 cOffsetBand0; /* 4.915-4.980G */
  1595. INT_8 cOffsetBand1; /* 5.000-5.080G */
  1596. INT_8 cOffsetBand2; /* 5.160-5.180G */
  1597. INT_8 cOffsetBand3; /* 5.200-5.280G */
  1598. INT_8 cOffsetBand4; /* 5.300-5.340G */
  1599. INT_8 cOffsetBand5; /* 5.500-5.580G */
  1600. INT_8 cOffsetBand6; /* 5.600-5.680G */
  1601. INT_8 cOffsetBand7; /* 5.700-5.825G */
  1602. } CMD_5G_PWR_OFFSET_T, *P_CMD_5G_PWR_OFFSET_T;
  1603. typedef struct _CMD_PWR_PARAM_T {
  1604. UINT_32 au4Data[28];
  1605. UINT_32 u4RefValue1;
  1606. UINT_32 u4RefValue2;
  1607. } CMD_PWR_PARAM_T, *P_CMD_PWR_PARAM_T;
  1608. typedef struct _CMD_PHY_PARAM_T {
  1609. UINT_8 aucData[144]; /* eFuse content */
  1610. } CMD_PHY_PARAM_T, *P_CMD_PHY_PARAM_T;
  1611. typedef struct _CMD_AUTO_POWER_PARAM_T {
  1612. UINT_8 ucType; /* 0: Disable 1: Enalbe 0x10: Change parameters */
  1613. UINT_8 ucNetTypeIndex;
  1614. UINT_8 aucReserved[2];
  1615. UINT_8 aucLevelRcpiTh[3];
  1616. UINT_8 aucReserved2[1];
  1617. INT_8 aicLevelPowerOffset[3]; /* signed, in unit of 0.5dBm */
  1618. UINT_8 aucReserved3[1];
  1619. UINT_8 aucReserved4[8];
  1620. } CMD_AUTO_POWER_PARAM_T, *P_CMD_AUTO_POWER_PARAM_T;
  1621. typedef struct _EVENT_CH_PRIVILEGE_T {
  1622. UINT_8 ucNetTypeIndex;
  1623. UINT_8 ucTokenID;
  1624. UINT_8 ucStatus;
  1625. UINT_8 ucPrimaryChannel;
  1626. UINT_8 ucRfSco;
  1627. UINT_8 ucRfBand;
  1628. UINT_8 ucReqType;
  1629. UINT_8 ucReserved;
  1630. UINT_32 u4GrantInterval; /* In unit of ms */
  1631. } EVENT_CH_PRIVILEGE_T, *P_EVENT_CH_PRIVILEGE_T;
  1632. typedef enum _ENUM_BEACON_TIMEOUT_TYPE_T {
  1633. BEACON_TIMEOUT_LOST_BEACON = 0,
  1634. BEACON_TIMEOUT_AGE,
  1635. BEACON_TIMEOUT_CONNECT,
  1636. BEACON_TIMEOUT_BEACON_INTERVAL,
  1637. BEACON_TIMEOUT_ABORT,
  1638. BEACON_TIMEOUT_TX_ERROR,
  1639. BEACON_TIMEOUT_TYPE_NUM
  1640. } ENUM_BEACON_TIMEOUT_TYPE_T, *P_ENUM_BEACON_TIMEOUT_TYPE_T;
  1641. typedef struct _EVENT_BSS_BEACON_TIMEOUT_T {
  1642. UINT_8 ucNetTypeIndex;
  1643. UINT_8 ucReason; /* ENUM_BEACON_TIMEOUT_TYPE_T */
  1644. UINT_8 aucReserved[2];
  1645. } EVENT_BSS_BEACON_TIMEOUT_T, *P_EVENT_BSS_BEACON_TIMEOUT_T;
  1646. typedef struct _EVENT_STA_AGING_TIMEOUT_T {
  1647. UINT_8 ucStaRecIdx;
  1648. UINT_8 aucReserved[3];
  1649. } EVENT_STA_AGING_TIMEOUT_T, *P_EVENT_STA_AGING_TIMEOUT_T;
  1650. typedef struct _EVENT_NOA_TIMING_T {
  1651. UINT_8 fgIsInUse; /* Indicate if this entry is in use or not */
  1652. UINT_8 ucCount; /* Count */
  1653. UINT_8 aucReserved[2];
  1654. UINT_32 u4Duration; /* Duration */
  1655. UINT_32 u4Interval; /* Interval */
  1656. UINT_32 u4StartTime; /* Start Time */
  1657. } EVENT_NOA_TIMING_T, *P_EVENT_NOA_TIMING_T;
  1658. typedef struct _EVENT_UPDATE_NOA_PARAMS_T {
  1659. UINT_8 ucNetTypeIndex;
  1660. UINT_8 aucReserved[2];
  1661. UINT_8 fgEnableOppPS;
  1662. UINT_16 u2CTWindow;
  1663. UINT_8 ucNoAIndex;
  1664. UINT_8 ucNoATimingCount; /* Number of NoA Timing */
  1665. EVENT_NOA_TIMING_T arEventNoaTiming[8 /*P2P_MAXIMUM_NOA_COUNT */];
  1666. } EVENT_UPDATE_NOA_PARAMS_T, *P_EVENT_UPDATE_NOA_PARAMS_T;
  1667. typedef struct _EVENT_AP_OBSS_STATUS_T {
  1668. UINT_8 ucNetTypeIndex;
  1669. UINT_8 ucObssErpProtectMode;
  1670. UINT_8 ucObssHtProtectMode;
  1671. UINT_8 ucObssGfOperationMode;
  1672. UINT_8 ucObssRifsOperationMode;
  1673. UINT_8 ucObssBeaconForcedTo20M;
  1674. UINT_8 aucReserved[2];
  1675. } EVENT_AP_OBSS_STATUS_T, *P_EVENT_AP_OBSS_STATUS_T;
  1676. typedef struct _CMD_EDGE_TXPWR_LIMIT_T {
  1677. INT_8 cBandEdgeMaxPwrCCK;
  1678. INT_8 cBandEdgeMaxPwrOFDM20;
  1679. INT_8 cBandEdgeMaxPwrOFDM40;
  1680. INT_8 cBandEdgeCert;
  1681. } CMD_EDGE_TXPWR_LIMIT_T, *P_CMD_EDGE_TXPWR_LIMIT_T;
  1682. typedef struct _CMD_RSSI_COMPENSATE_T {
  1683. UINT_8 uc2GRssiCompensation;
  1684. UINT_8 uc5GRssiCompensation;
  1685. UINT_8 ucRssiCompensationValidbit;
  1686. UINT_8 cReserved;
  1687. } CMD_RSSI_COMPENSATE_T, *P_CMD_RSSI_COMPENSATE_T;
  1688. typedef struct _CMD_BAND_SUPPORT_T {
  1689. UINT_8 uc5GBandSupport;
  1690. UINT_8 cReserved[3];
  1691. } CMD_BAND_SUPPORT_T, *P_CMD_BAND_SUPPORT_T;
  1692. typedef struct _CMD_TX_PWR_CE_T {
  1693. INT_8 cTxPwrCckLmt; /* signed, in unit of 0.5dBm */
  1694. INT_8 cTxPwrOfdmLmt; /* signed, in unit of 0.5dBm */
  1695. INT_8 cTxPwrHt20Lmt;
  1696. INT_8 cTxPwrHt40Lmt;
  1697. } CMD_TX_PWR_CE_T, *P_CMD_TX_PWR_CE_T;
  1698. typedef struct _CMD_SET_DEVICE_MODE_T {
  1699. UINT_16 u2ChipID;
  1700. UINT_16 u2Mode;
  1701. } CMD_SET_DEVICE_MODE_T, *P_CMD_SET_DEVICE_MODE_T;
  1702. #if CFG_SUPPORT_RDD_TEST_MODE
  1703. typedef struct _CMD_RDD_CH_T {
  1704. UINT_8 ucRddTestMode;
  1705. UINT_8 ucRddShutCh;
  1706. UINT_8 ucRddStartCh;
  1707. UINT_8 ucRddStopCh;
  1708. UINT_8 ucRddDfs;
  1709. UINT_8 ucReserved;
  1710. UINT_8 ucReserved1;
  1711. UINT_8 ucReserved2;
  1712. } CMD_RDD_CH_T, *P_CMD_RDD_CH_T;
  1713. typedef struct _EVENT_RDD_STATUS_T {
  1714. UINT_8 ucRddStatus;
  1715. UINT_8 aucReserved[3];
  1716. } EVENT_RDD_STATUS_T, *P_EVENT_RDD_STATUS_T;
  1717. #endif
  1718. typedef struct _EVENT_AIS_BSS_INFO_T {
  1719. ENUM_PARAM_MEDIA_STATE_T eConnectionState; /* Connected Flag used in AIS_NORMAL_TR */
  1720. ENUM_OP_MODE_T eCurrentOPMode; /* Current Operation Mode - Infra/IBSS */
  1721. BOOLEAN fgIsNetActive; /* TRUE if this network has been actived */
  1722. UINT_8 ucReserved[3];
  1723. } EVENT_AIS_BSS_INFO_T, *P_EVENT_AIS_BSS_INFO_T;
  1724. typedef struct _CMD_SET_TXPWR_CTRL_T {
  1725. INT_8 c2GLegacyStaPwrOffset; /* Unit: 0.5dBm, default: 0 */
  1726. INT_8 c2GHotspotPwrOffset;
  1727. INT_8 c2GP2pPwrOffset;
  1728. INT_8 c2GBowPwrOffset;
  1729. INT_8 c5GLegacyStaPwrOffset; /* Unit: 0.5dBm, default: 0 */
  1730. INT_8 c5GHotspotPwrOffset;
  1731. INT_8 c5GP2pPwrOffset;
  1732. INT_8 c5GBowPwrOffset;
  1733. UINT_8 ucConcurrencePolicy; /* TX power policy when concurrence
  1734. in the same channel
  1735. 0: Highest power has priority
  1736. 1: Lowest power has priority */
  1737. INT_8 acReserved1[3]; /* Must be zero */
  1738. /* Power limit by channel for all data rates */
  1739. INT_8 acTxPwrLimit2G[14]; /* Channel 1~14, Unit: 0.5dBm */
  1740. INT_8 acTxPwrLimit5G[4]; /* UNII 1~4 */
  1741. INT_8 acReserved2[2]; /* Must be zero */
  1742. } CMD_SET_TXPWR_CTRL_T, *P_CMD_SET_TXPWR_CTRL_T;
  1743. #if CFG_SUPPORT_BUILD_DATE_CODE
  1744. typedef struct _CMD_GET_BUILD_DATE_CODE {
  1745. UINT_8 aucReserved[4];
  1746. } CMD_GET_BUILD_DATE_CODE, *P_CMD_GET_BUILD_DATE_CODE;
  1747. typedef struct _EVENT_BUILD_DATE_CODE {
  1748. UINT_8 aucDateCode[16];
  1749. } EVENT_BUILD_DATE_CODE, *P_EVENT_BUILD_DATE_CODE;
  1750. #endif
  1751. typedef struct _CMD_GET_STA_STATISTICS_T {
  1752. UINT_8 ucIndex;
  1753. UINT_8 ucFlags;
  1754. UINT_8 ucReadClear;
  1755. UINT_8 aucReserved0[1];
  1756. UINT_8 aucMacAddr[MAC_ADDR_LEN];
  1757. UINT_8 aucReserved1[2];
  1758. UINT_8 aucReserved2[16];
  1759. } CMD_GET_STA_STATISTICS_T, *P_CMD_GET_STA_STATISTICS_T;
  1760. /* CFG_SUPPORT_WFD */
  1761. typedef struct _EVENT_STA_STATISTICS_T {
  1762. /* Event header */
  1763. /* UINT_16 u2Length; */
  1764. /* UINT_16 u2Reserved1; *//* Must be filled with 0x0001 (EVENT Packet) */
  1765. /* UINT_8 ucEID; */
  1766. /* UINT_8 ucSeqNum; */
  1767. /* UINT_8 aucReserved2[2]; */
  1768. /* Event Body */
  1769. UINT_8 ucVersion;
  1770. UINT_8 aucReserved1[3];
  1771. UINT_32 u4Flags; /* Bit0: valid */
  1772. UINT_8 ucStaRecIdx;
  1773. UINT_8 ucNetworkTypeIndex;
  1774. UINT_8 ucWTEntry;
  1775. UINT_8 aucReserved4[1];
  1776. UINT_8 ucMacAddr[MAC_ADDR_LEN];
  1777. UINT_8 ucPer; /* base: 128 */
  1778. UINT_8 ucRcpi;
  1779. UINT_32 u4PhyMode; /* SGI BW */
  1780. UINT_16 u2LinkSpeed; /* unit is 0.5 Mbits */
  1781. UINT_8 ucLinkQuality;
  1782. UINT_8 ucLinkReserved;
  1783. UINT_32 u4TxCount;
  1784. UINT_32 u4TxFailCount;
  1785. UINT_32 u4TxLifeTimeoutCount;
  1786. UINT_32 u4TxDoneAirTime;
  1787. UINT_8 aucReserved[64];
  1788. } EVENT_STA_STATISTICS_T, *P_EVENT_STA_STATISTICS_T;
  1789. #if CFG_SUPPORT_HOTSPOT_OPTIMIZATION
  1790. typedef struct _CMD_HOTSPOT_OPTIMIZATION_CONFIG {
  1791. UINT_32 fgHotspotOptimizationEn;
  1792. UINT_32 u4Level;
  1793. } CMD_HOTSPOT_OPTIMIZATION_CONFIG, *P_HOTSPOT_OPTIMIZATION_CONFIG;
  1794. #endif
  1795. #if CFG_AUTO_CHANNEL_SEL_SUPPORT
  1796. /* 4 Auto Channel Selection */
  1797. typedef struct _CMD_GET_CHN_LOAD_T {
  1798. UINT_8 ucIndex;
  1799. UINT_8 ucFlags;
  1800. UINT_8 ucReadClear;
  1801. UINT_8 aucReserved0[1];
  1802. UINT_8 ucChannel;
  1803. UINT_16 u2ChannelLoad;
  1804. UINT_8 aucReserved1[1];
  1805. UINT_8 aucReserved2[16];
  1806. } CMD_GET_CHN_LOAD_T, *P_CMD_GET_CHN_LOAD_T;
  1807. /* 4 Auto Channel Selection */
  1808. typedef struct _EVENT_CHN_LOAD_T {
  1809. /* Event Body */
  1810. UINT_8 ucVersion;
  1811. UINT_8 aucReserved1[3];
  1812. UINT_32 u4Flags; /* Bit0: valid */
  1813. UINT_8 ucChannel;
  1814. UINT_16 u2ChannelLoad;
  1815. UINT_8 aucReserved4[1];
  1816. UINT_8 aucReserved[64];
  1817. } EVENT_CHN_LOAD_T, *P_EVENT_CHN_LOAD_T;
  1818. typedef struct _CMD_GET_LTE_SAFE_CHN_T {
  1819. UINT_8 ucIndex;
  1820. UINT_8 ucFlags;
  1821. UINT_8 aucReserved0[2];
  1822. UINT_8 aucReserved2[16];
  1823. } CMD_GET_LTE_SAFE_CHN_T, *P_CMD_GET_LTE_SAFE_CHN_T;
  1824. typedef struct _EVENT_LTE_MODE_T {
  1825. /* Event Body */
  1826. UINT_8 ucVersion;
  1827. UINT_8 aucReserved1[3];
  1828. UINT_32 u4Flags; /* Bit0: valid */
  1829. LTE_SAFE_CH_INFO_T rLteSafeChn;
  1830. UINT_8 aucReserved4[3];
  1831. UINT_8 aucReserved[4];
  1832. } EVENT_LTE_MODE_T, *P_EVENT_LTE_MODE_T;
  1833. #endif
  1834. typedef struct _CMD_ROAMING_INFO_T {
  1835. UINT_32 fgIsFastRoamingApplied;
  1836. UINT_32 Reserved[9];
  1837. } CMD_ROAMING_INFO_T;
  1838. typedef struct _CMD_WFD_DEBUG_MODE_INFO_T {
  1839. UINT_8 ucDebugMode;
  1840. UINT_16 u2PeriodInteval;
  1841. UINT_8 Reserved;
  1842. } CMD_WFD_DEBUG_MODE_INFO_T, *P_CMD_WFD_DEBUG_MODE_INFO_T;
  1843. typedef struct _EVENT_FW_LOG_T {
  1844. UINT_8 fileName[64];
  1845. UINT_32 lineNo;
  1846. UINT_32 WifiUpTime;
  1847. UINT_8 log[896]; /* total size is aucBuffer in WIFI_EVENT_T */
  1848. } EVENT_FW_LOG_T, *P_EVENT_FW_LOG_T;
  1849. typedef enum _ENUM_NLO_CIPHER_ALGORITHM {
  1850. NLO_CIPHER_ALGO_NONE = 0x00,
  1851. NLO_CIPHER_ALGO_WEP40 = 0x01,
  1852. NLO_CIPHER_ALGO_TKIP = 0x02,
  1853. NLO_CIPHER_ALGO_CCMP = 0x04,
  1854. NLO_CIPHER_ALGO_WEP104 = 0x05,
  1855. NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  1856. NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  1857. NLO_CIPHER_ALGO_WEP = 0x101,
  1858. } ENUM_NLO_CIPHER_ALGORITHM, *P_ENUM_NLO_CIPHER_ALGORITHM;
  1859. typedef enum _ENUM_NLO_AUTH_ALGORITHM {
  1860. NLO_AUTH_ALGO_80211_OPEN = 1,
  1861. NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
  1862. NLO_AUTH_ALGO_WPA = 3,
  1863. NLO_AUTH_ALGO_WPA_PSK = 4,
  1864. NLO_AUTH_ALGO_WPA_NONE = 5,
  1865. NLO_AUTH_ALGO_RSNA = 6,
  1866. NLO_AUTH_ALGO_RSNA_PSK = 7,
  1867. } ENUM_NLO_AUTH_ALGORITHM, *P_ENUM_NLO_AUTH_ALGORITHM;
  1868. typedef struct _NLO_NETWORK {
  1869. UINT_8 ucNumChannelHint[4];
  1870. UINT_8 ucSSIDLength;
  1871. UINT_8 ucCipherAlgo;
  1872. UINT_16 u2AuthAlgo;
  1873. UINT_8 aucSSID[32];
  1874. } NLO_NETWORK, *P_NLO_NETWORK;
  1875. typedef struct _CMD_NLO_REQ {
  1876. UINT_8 ucSeqNum;
  1877. UINT_8 ucBssIndex;
  1878. UINT_8 ucNetworkType;
  1879. UINT_8 fgStopAfterIndication;
  1880. UINT_8 ucFastScanIteration;
  1881. UINT_16 u2FastScanPeriod;
  1882. UINT_16 u2SlowScanPeriod;
  1883. UINT_8 ucEntryNum;
  1884. UINT_8 ucReserved;
  1885. UINT_16 u2IELen;
  1886. NLO_NETWORK arNetworkList[16];
  1887. UINT_8 aucIE[0];
  1888. UINT_8 ucScanType;
  1889. } CMD_NLO_REQ, *P_CMD_NLO_REQ;
  1890. typedef struct _CMD_NLO_CANCEL_T {
  1891. UINT_8 ucSeqNum;
  1892. UINT_8 aucReserved[3];
  1893. } CMD_NLO_CANCEL, *P_CMD_NLO_CANCEL;
  1894. typedef struct _EVENT_NLO_DONE_T {
  1895. UINT_8 ucSeqNum;
  1896. UINT_8 ucStatus;
  1897. UINT_8 aucReserved[2];
  1898. } EVENT_NLO_DONE_T, *P_EVENT_NLO_DONE_T;
  1899. typedef struct _EVENT_GSCAN_CAPABILITY_T {
  1900. UINT_8 ucVersion;
  1901. UINT_8 aucReserved1[3];
  1902. UINT_32 u4MaxScanCacheSize;
  1903. UINT_32 u4MaxScanBuckets;
  1904. UINT_32 u4MaxApCachePerScan;
  1905. UINT_32 u4MaxRssiSampleSize;
  1906. UINT_32 u4MaxScanReportingThreshold;
  1907. UINT_32 u4MaxHotlistAps;
  1908. UINT_32 u4MaxSignificantWifiChangeAps;
  1909. UINT_32 au4Reserved[4];
  1910. } EVENT_GSCAN_CAPABILITY_T, *P_EVENT_GSCAN_CAPABILITY_T;
  1911. typedef struct _EVENT_GSCAN_SCAN_AVAILABLE_T {
  1912. UINT_16 u2Num;
  1913. UINT_8 aucReserved[2];
  1914. } EVENT_GSCAN_SCAN_AVAILABLE_T, *P_EVENT_GSCAN_SCAN_AVAILABLE_T;
  1915. typedef struct _EVENT_GSCAN_SCAN_COMPLETE_T {
  1916. UINT_8 ucScanState;
  1917. UINT_8 aucReserved[3];
  1918. } EVENT_GSCAN_SCAN_COMPLETE_T, *P_EVENT_GSCAN_SCAN_COMPLETE_T;
  1919. typedef struct WIFI_GSCAN_RESULT {
  1920. UINT_64 u8Ts; /* Time of discovery */
  1921. UINT_8 arSsid[ELEM_MAX_LEN_SSID + 1]; /* null terminated */
  1922. UINT_8 arMacAddr[6]; /* BSSID */
  1923. UINT_32 u4Channel; /* channel frequency in MHz */
  1924. INT_32 i4Rssi; /* in db */
  1925. UINT_64 u8Rtt; /* in nanoseconds */
  1926. UINT_64 u8RttSd; /* standard deviation in rtt */
  1927. UINT_16 u2BeaconPeriod; /* units are Kusec */
  1928. UINT_16 u2Capability; /* Capability information */
  1929. UINT_32 u4IeLength; /* byte length of Information Elements */
  1930. UINT_8 ucIeData[1]; /* IE data to follow */
  1931. } WIFI_GSCAN_RESULT_T, *P_WIFI_GSCAN_RESULT_T;
  1932. typedef struct _EVENT_GSCAN_RESULT_T {
  1933. UINT_8 ucVersion;
  1934. UINT_8 aucReserved[3];
  1935. UINT_16 u2ScanId;
  1936. UINT_16 u2ScanFlags;
  1937. UINT_16 u2NumOfResults;
  1938. WIFI_GSCAN_RESULT_T rResult[1];
  1939. } EVENT_GSCAN_RESULT_T, *P_EVENT_GSCAN_RESULT_T;
  1940. typedef struct _EVENT_GSCAN_FULL_RESULT_T {
  1941. UINT_8 ucVersion;
  1942. UINT_8 aucReserved[3];
  1943. WIFI_GSCAN_RESULT_T rResult;
  1944. } EVENT_GSCAN_FULL_RESULT_T, *P_EVENT_GSCAN_FULL_RESULT_T;
  1945. typedef struct GSCAN_SWC_NET {
  1946. UINT_16 u2Flags;
  1947. UINT_16 u2Channel;
  1948. UINT_8 arBssid[6];
  1949. INT_8 aicRssi[SCN_PSCAN_SWC_RSSI_WIN_MAX];
  1950. } GSCAN_SWC_NET_T, P_GSCAN_SWC_NET_T;
  1951. typedef struct _EVENT_GSCAN_SIGNIFICANT_CHANGE_T {
  1952. UINT_8 ucVersion;
  1953. UINT_8 aucReserved[3];
  1954. GSCAN_SWC_NET_T arNet[SCN_PSCAN_SWC_MAX_NUM];
  1955. } EVENT_GSCAN_SIGNIFICANT_CHANGE_T, *P_EVENT_GSCAN_SIGNIFICANT_CHANGE_T;
  1956. typedef struct _EVENT_GSCAN_GEOFENCE_FOUND_T {
  1957. UINT_8 ucVersion;
  1958. UINT_8 aucReserved[3];
  1959. WIFI_GSCAN_RESULT_T rResult[SCN_PSCAN_HOTLIST_REPORT_MAX_NUM];
  1960. } EVENT_GSCAN_GEOFENCE_FOUND_T, *P_EVENT_GSCAN_GEOFENCE_FOUND_T;
  1961. #if CFG_SUPPORT_BATCH_SCAN
  1962. #if 0 /* !CFG_SUPPORT_GSCN */
  1963. typedef struct _CMD_BATCH_REQ_T {
  1964. UINT_8 ucSeqNum;
  1965. UINT_8 ucNetTypeIndex;
  1966. UINT_8 ucCmd; /* Start/ Stop */
  1967. UINT_8 ucMScan; /* an integer number of scans per batch */
  1968. UINT_8 ucBestn; /* an integer number of the max AP to remember per scan */
  1969. UINT_8 ucRtt; /* an integer number of highest-strength AP for which
  1970. we'd like approximate distance reported */
  1971. UINT_8 ucChannel; /* channels */
  1972. UINT_8 ucChannelType;
  1973. UINT_8 ucChannelListNum;
  1974. UINT_8 aucReserved[3];
  1975. UINT_32 u4Scanfreq; /* an integer number of seconds between scans */
  1976. CHANNEL_INFO_T arChannelList[32]; /* channels */
  1977. } CMD_BATCH_REQ_T, *P_CMD_BATCH_REQ_T;
  1978. #endif
  1979. typedef struct _EVENT_BATCH_RESULT_ENTRY_T {
  1980. UINT_8 aucBssid[MAC_ADDR_LEN];
  1981. UINT_8 aucSSID[ELEM_MAX_LEN_SSID];
  1982. UINT_8 ucSSIDLen;
  1983. INT_8 cRssi;
  1984. UINT_32 ucFreq;
  1985. UINT_32 u4Age;
  1986. UINT_32 u4Dist;
  1987. UINT_32 u4Distsd;
  1988. } EVENT_BATCH_RESULT_ENTRY_T, *P_EVENT_BATCH_RESULT_ENTRY_T;
  1989. typedef struct _EVENT_BATCH_RESULT_T {
  1990. UINT_8 ucScanCount;
  1991. UINT_8 aucReserved[3];
  1992. EVENT_BATCH_RESULT_ENTRY_T arBatchResult[12]; /* Must be the same with SCN_BATCH_STORE_MAX_NUM */
  1993. } EVENT_BATCH_RESULT_T, *P_EVENT_BATCH_RESULT_T;
  1994. #endif
  1995. typedef struct _CMD_RLM_INFO_T {
  1996. UINT_32 u4Version;
  1997. UINT_32 fgIsErrRatioEnhanceApplied;
  1998. UINT_8 ucErrRatio2LimitMinRate;
  1999. /*
  2000. 0:1M, 1:2M, 2:5.5M, 3:11M, 6:6M, 7:9M, 8:12M, 9:18M, 10:24M, 11:36M, 12:48M, 13:54M
  2001. */
  2002. UINT_8 ucMinLegacyRateIdx;
  2003. INT_8 cMinRssiThreshold;
  2004. BOOLEAN fgIsRtsApplied;
  2005. UINT_8 ucRecoverTime;
  2006. UINT_32 u4Reserved[0];
  2007. } CMD_RLM_INFO_T;
  2008. typedef struct _WIFI_SYSTEM_SUSPEND_CMD_T {
  2009. BOOLEAN fgIsSystemSuspend;
  2010. UINT_8 reserved[3];
  2011. } WIFI_SYSTEM_SUSPEND_CMD_T, *P_WIFI_SYSTEM_SUSPEND_CMD_T;
  2012. /*******************************************************************************
  2013. * P U B L I C D A T A
  2014. ********************************************************************************
  2015. */
  2016. /*******************************************************************************
  2017. * P R I V A T E D A T A
  2018. ********************************************************************************
  2019. */
  2020. /*******************************************************************************
  2021. * M A C R O S
  2022. ********************************************************************************
  2023. */
  2024. /*******************************************************************************
  2025. * F U N C T I O N D E C L A R A T I O N S
  2026. ********************************************************************************
  2027. */
  2028. VOID nicCmdEventQueryMcrRead(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2029. VOID nicCmdEventQueryMemDump(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2030. VOID nicCmdEventQuerySwCtrlRead(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2031. VOID nicCmdEventQueryRfTestATInfo(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2032. VOID nicCmdEventSetCommon(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2033. VOID nicCmdEventSetDisassociate(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2034. VOID nicCmdEventSetIpAddress(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2035. VOID nicCmdEventQueryLinkQuality(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2036. VOID nicCmdEventQueryLinkSpeed(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2037. VOID nicCmdEventQueryStatistics(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2038. VOID nicCmdEventEnterRfTest(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2039. VOID nicCmdEventLeaveRfTest(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2040. VOID nicCmdEventQueryAddress(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2041. VOID nicCmdEventQueryMcastAddr(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2042. VOID nicCmdEventQueryEepromRead(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2043. VOID nicCmdEventSetMediaStreamMode(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2044. /* Statistics responder */
  2045. VOID nicCmdEventQueryXmitOk(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2046. VOID nicCmdEventQueryRecvOk(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2047. VOID nicCmdEventQueryXmitError(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2048. VOID nicCmdEventQueryRecvError(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2049. VOID nicCmdEventQueryRecvNoBuffer(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2050. VOID nicCmdEventQueryRecvCrcError(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2051. VOID nicCmdEventQueryRecvErrorAlignment(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2052. VOID nicCmdEventQueryXmitOneCollision(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2053. VOID nicCmdEventQueryXmitMoreCollisions(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2054. VOID nicCmdEventQueryXmitMaxCollisions(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2055. /* for timeout check */
  2056. VOID nicOidCmdTimeoutCommon(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo);
  2057. VOID nicCmdTimeoutCommon(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo);
  2058. VOID nicOidCmdEnterRFTestTimeout(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo);
  2059. #if CFG_SUPPORT_BUILD_DATE_CODE
  2060. VOID nicCmdEventBuildDateCode(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2061. #endif
  2062. VOID nicCmdEventQueryStaStatistics(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2063. #if CFG_AUTO_CHANNEL_SEL_SUPPORT
  2064. /* 4 Auto Channel Selection */
  2065. VOID nicCmdEventQueryChannelLoad(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2066. VOID nicCmdEventQueryLTESafeChn(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2067. #endif
  2068. #if CFG_SUPPORT_BATCH_SCAN
  2069. VOID nicCmdEventBatchScanResult(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2070. #endif
  2071. VOID nicCmdEventGetBSSInfo(IN P_ADAPTER_T prAdapter, IN P_CMD_INFO_T prCmdInfo, IN PUINT_8 pucEventBuf);
  2072. /*******************************************************************************
  2073. * F U N C T I O N S
  2074. ********************************************************************************
  2075. */
  2076. #endif /* _NIC_CMD_EVENT_H */