| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758 |
- /*
- ** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/nic/adapter.h#5
- */
- /*! \file adapter.h
- \brief Definition of internal data structure for driver manipulation.
- In this file we define the internal data structure - ADAPTER_T which stands
- for MiniPort ADAPTER(From Windows point of view) or stands for Network ADAPTER.
- */
- /*
- ** Log: adapter.h
- **
- ** 01 15 2014 eason.tsai
- ** [ALPS01070904] [Need Patch] [Volunteer Patch][MT6630][Driver]MT6630 Wi-Fi Patch
- ** Merging
- **
- ** //ALPS_SW/DEV/ALPS.JB2.MT6630.DEV/alps/mediatek/kernel/drivers/combo/drv_wlan/mt6630/wlan/...@2327720
- **
- ** to //ALPS_SW/TRUNK/KK/alps/mediatek/kernel/drivers/combo/drv_wlan/mt6630/wlan/...
- **
- ** 01 09 2014 eason.tsai
- ** [ALPS01070904] [Need Patch] [Volunteer Patch][MT6630][Driver]MT6630 Wi-Fi Patch
- ** fix turn off AC definition build error
- **
- ** 01 15 2014 eason.tsai
- ** [ALPS01070904] [Need Patch] [Volunteer Patch][MT6630][Driver]MT6630 Wi-Fi Patch
- ** Merging
- **
- ** //ALPS_SW/DEV/ALPS.JB2.MT6630.DEV/alps/mediatek/kernel/drivers/combo/drv_wlan/mt6630/wlan/...
- **
- ** to //ALPS_SW/TRUNK/KK/alps/mediatek/kernel/drivers/combo/drv_wlan/mt6630/wlan/...
- **
- ** 12 27 2013 eason.tsai
- ** [ALPS01070904] [Need Patch] [Volunteer Patch][MT6630][Driver]MT6630 Wi-Fi Patch
- ** update code for ICAP & nvram
- **
- ** 08 22 2013 tsaiyuan.hsu
- ** [BORA00002222] MT6630 unified MAC RXM
- ** add mDNS filter for Android.
- **
- ** 08 13 2013 terry.wu
- ** [BORA00002207] [MT6630 Wi-Fi] TXM & MQM Implementation
- ** 1. Assign TXD.PID by wlan index
- ** 2. Some bug fix
- **
- ** 08 05 2013 terry.wu
- ** [BORA00002207] [MT6630 Wi-Fi] TXM & MQM Implementation
- ** 1. Add SW rate definition
- ** 2. Add HW default rate selection logic from FW
- **
- ** 07 28 2013 eddie.chen
- ** [BORA00002450] [WIFISYS][MT6630] New design for mt6630
- ** Save the compileflag and featureflag
- **
- ** 07 23 2013 wh.su
- ** [BORA00002446] [MT6630] [Wi-Fi] [Driver] Update the security function code
- ** Sync the latest jb2.mp 11w code as draft version
- ** Not the CM bit for avoid wapi 1x drop at re-key
- **
- ** 07 12 2013 terry.wu
- ** [BORA00002207] [MT6630 Wi-Fi] TXM & MQM Implementation
- ** 1. Update VHT IE composing function
- ** 2. disable bow
- ** 3. Exchange bss/sta rec update sequence for temp solution
- **
- ** 07 05 2013 wh.su
- ** [BORA00002446] [MT6630] [Wi-Fi] [Driver] Update the security function code
- ** Fix to let the wpa-psk ok
- **
- ** 07 04 2013 wh.su
- ** [BORA00002446] [MT6630] [Wi-Fi] [Driver] Update the security function code
- ** Add the function to got the STA index via the wlan index
- ** report at Rx status
- **
- ** 07 03 2013 wh.su
- ** [BORA00002446] [MT6630] [Wi-Fi] [Driver] Update the security function code
- ** Refine some normal security code
- **
- ** 07 02 2013 wh.su
- ** [BORA00002446] [MT6630] [Wi-Fi] [Driver] Update the security function code
- ** Refine some secutity code
- **
- ** 06 26 2013 cm.chang
- ** [BORA00002149] [MT6630 Wi-Fi] Initial software development
- ** For BSS_INFO alloc/free, Use fgIsInUse instead of fgIsNetActive
- **
- ** 03 20 2013 wh.su
- ** [BORA00002446] [MT6630] [Wi-Fi] [Driver] Update the security function code
- ** Add the security code for wlan table assign operation
- **
- ** 03 14 2013 wh.su
- ** [BORA00002446] [MT6630] [Wi-Fi] [Driver] Update the security function code
- ** .modify some code define and flow
- **
- ** 03 12 2013 wh.su
- ** [BORA00002446] [MT6630] [Wi-Fi] [Driver] Update the security function code
- ** .
- **
- ** 03 08 2013 wh.su
- ** [BORA00002446] [MT6630] [Wi-Fi] [Driver] Update the security function code
- ** Modify code for security design
- **
- ** 03 06 2013 wh.su
- ** [BORA00002446] [MT6630] [Wi-Fi] [Driver] Update the security function code
- ** submit some code related with security.
- **
- ** 02 27 2013 yuche.tsai
- ** [BORA00002398] [MT6630][Volunteer Patch] P2P Driver Re-Design for Multiple BSS support
- ** Add new code, fix compile warning.
- **
- ** 02 06 2013 yuche.tsai
- ** [BORA00002398] [MT6630][Volunteer Patch] P2P Driver Re-Design for Multiple BSS support
- ** Fix BSS index to BSS Info MACRO
- **
- ** 02 05 2013 yuche.tsai
- ** [BORA00002398] [MT6630][Volunteer Patch] P2P Driver Re-Design for Multiple BSS support
- ** Code update for FW development.
- **
- ** 01 22 2013 cp.wu
- ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
- ** modification for ucBssIndex migration
- **
- ** 01 21 2013 cm.chang
- ** [BORA00002149] [MT6630 Wi-Fi] Initial software development
- ** 1. Create rP2pDevInfo structure
- ** 2. Support 80/160 MHz channel bandwidth for channel privilege
- **
- ** 01 17 2013 cm.chang
- ** [BORA00002149] [MT6630 Wi-Fi] Initial software development
- ** Use ucBssIndex to replace eNetworkTypeIndex
- **
- ** 12 27 2012 terry.wu
- ** [BORA00002207] [MT6630 Wi-Fi] TXM & MQM Implementation
- ** Update MQM index mapping mechanism
- ** 1. TID to ACI
- ** 2. ACI to SW TxQ
- ** 3. ACI to network TC resource
- **
- ** 12 19 2012 terry.wu
- ** [BORA00002207] [MT6630 Wi-Fi] TXM & MQM Implementation
- ** Add Tx desc composing function
- **
- ** 11 06 2012 eason.tsai
- ** [BORA00002255] [MT6630 Wi-Fi][Driver] develop
- ** .
- **
- ** 10 31 2012 cp.wu
- ** [BORA00002227] [MT6630 Wi-Fi][Driver] Update for Makefile and HIFSYS modifications
- ** code sync..
- **
- ** 09 17 2012 cm.chang
- ** [BORA00002149] [MT6630 Wi-Fi] Initial software development
- ** Duplicate source from MT6620 v2.3 driver branch
- ** (Davinci label: MT6620_WIFI_Driver_V2_3_120913_1942_As_MT6630_Base)
- **
- ** 08 24 2012 cp.wu
- ** [WCXRP00001269] [MT6620 Wi-Fi][Driver] cfg80211 porting merge back to DaVinci
- ** .
- **
- ** 08 24 2012 cp.wu
- ** [WCXRP00001269] [MT6620 Wi-Fi][Driver] cfg80211 porting merge back to DaVinci
- ** cfg80211 support merge back from ALPS.JB to DaVinci - MT6620 Driver v2.3 branch.
- **
- ** 07 24 2012 yuche.tsai
- ** NULL
- ** Bug fix for JB.
- *
- * 07 17 2012 yuche.tsai
- * NULL
- * Let netdev bring up.
- *
- * 07 17 2012 yuche.tsai
- * NULL
- * Compile no error before trial run.
- *
- * 06 13 2012 yuche.tsai
- * NULL
- * Update maintrunk driver.
- * Add support for driver compose assoc request frame.
- *
- * 03 02 2012 terry.wu
- * NULL
- * Snc CFG80211 modification for ICS migration from branch 2.2.
- *
- * 03 02 2012 terry.wu
- * NULL
- * Sync CFG80211 modification from branch 2,2.
- *
- * 01 16 2012 cp.wu
- * [MT6620 Wi-Fi][Driver] API and behavior modification for preferred band configuration
- * with corresponding network configuration
- * add wlanSetPreferBandByNetwork() for glue layer to invoke for setting preferred band configuration
- * corresponding to network type.
- *
- * 12 13 2011 cm.chang
- * [WCXRP00001136] [All Wi-Fi][Driver] Add wake lock for pending timer
- * Add wake lock if timer timeout value is smaller than 5 seconds
- *
- * 12 02 2011 yuche.tsai
- * NULL
- * Resolve inorder issue under AP mode.
- *
- * data frame may TX before assoc response frame.
- *
- * 11 19 2011 yuche.tsai
- * NULL
- * Update RSSI for P2P.
- *
- * 11 18 2011 yuche.tsai
- * NULL
- * CONFIG P2P support RSSI query, default turned off.
- *
- * 11 11 2011 yuche.tsai
- * NULL
- * Fix work thread cancel issue.
- *
- * 10 21 2011 eddie.chen
- * [WCXRP00001051] [MT6620 Wi-Fi][Driver/Fw] Adjust the STA aging timeout
- * Add switch to ignore the STA aging timeout.
- *
- * 10 12 2011 wh.su
- * [WCXRP00001036] [MT6620 Wi-Fi][Driver][FW] Adding the 802.11w code for MFP
- * adding the 802.11w related function and define .
- *
- * 09 20 2011 cm.chang
- * [WCXRP00000997] [MT6620 Wi-Fi][Driver][FW] Handle change of BSS preamble type and slot time
- * Remove ERP member in adapter structure
- *
- * 09 14 2011 yuche.tsai
- * NULL
- * Add P2P IE in assoc response.
- *
- * 08 31 2011 cm.chang
- * [WCXRP00000969] [MT6620 Wi-Fi][Driver][FW] Channel list for 5G band based on country code
- * .
- *
- * 07 18 2011 chinghwa.yu
- * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm
- * Add CMD/Event for RDD and BWCS.
- *
- * 06 23 2011 cp.wu
- * [WCXRP00000812] [MT6620 Wi-Fi][Driver] not show NVRAM when there is no valid MAC address in NVRAM content
- * check with firmware for valid MAC address.
- *
- * 04 18 2011 terry.wu
- * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED
- * Remove flag CFG_WIFI_DIRECT_MOVED.
- *
- * 04 12 2011 cm.chang
- * [WCXRP00000634] [MT6620 Wi-Fi][Driver][FW] 2nd BSS will not support 40MHz bandwidth for concurrency
- * .
- *
- * 04 08 2011 yuche.tsai
- * [WCXRP00000624] [Volunteer Patch][MT6620][Driver] Add device discoverability support for GO.
- * Add device discoverability support.
- * Action frame callback for GO Device Discoverability Req.
- *
- * 04 08 2011 george.huang
- * [WCXRP00000621] [MT6620 Wi-Fi][Driver] Support P2P supplicant to set power mode
- * separate settings of P2P and AIS
- *
- * 04 08 2011 eddie.chen
- * [WCXRP00000617] [MT6620 Wi-Fi][DRV/FW] Fix for sigma
- * Fix for sigma
- *
- * 03 19 2011 yuche.tsai
- * [WCXRP00000584] [Volunteer Patch][MT6620][Driver] Add beacon timeout support for WiFi Direct.
- * Add beacon timeout support for WiFi Direct Network.
- *
- * 03 19 2011 yuche.tsai
- * [WCXRP00000581] [Volunteer Patch][MT6620][Driver] P2P IE in Assoc Req Issue
- * Make assoc req to append P2P IE if wifi direct is enabled.
- *
- * 03 17 2011 cp.wu
- * [WCXRP00000562] [MT6620 Wi-Fi][Driver] I/O buffer pre-allocation to avoid physically
- * continuous memory shortage after system running for a long period
- * use pre-allocated buffer for storing enhanced interrupt response as well
- *
- * 03 15 2011 cp.wu
- * [WCXRP00000559] [MT6620 Wi-Fi][Driver] Combine TX/RX DMA buffers into a single one to reduce
- * physically continuous memory consumption
- * 1. deprecate CFG_HANDLE_IST_IN_SDIO_CALLBACK
- * 2. Use common coalescing buffer for both TX/RX directions
- *
- *
- * 03 10 2011 yuche.tsai
- * [WCXRP00000533] [Volunteer Patch][MT6620][Driver] Provide a P2P function API for Legacy WiFi to query AP mode.
- * Provide an API for Legacy WiFi to query the operation mode..
- *
- * 03 05 2011 wh.su
- * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code
- * add the code to get the check rsponse and indicate to app.
- *
- * 03 02 2011 wh.su
- * [WCXRP00000448] [MT6620 Wi-Fi][Driver] Fixed WSC IE not send out at probe request
- * Add code to send beacon and probe response WSC IE at Auto GO.
- *
- * 03 02 2011 cp.wu
- * [WCXRP00000503] [MT6620 Wi-Fi][Driver] Take RCPI brought by association response as
- * initial RSSI right after connection is built.
- * use RCPI brought by ASSOC-RESP after connection is built as initial RCPI to avoid
- * using a uninitialized MAC-RX RCPI.
- *
- * 02 21 2011 terry.wu
- * [WCXRP00000476] [MT6620 Wi-Fi][Driver] Clean P2P scan list while removing P2P
- * Clean P2P scan list while removing P2P.
- *
- * 02 17 2011 eddie.chen
- * [WCXRP00000458] [MT6620 Wi-Fi][Driver] BOW Concurrent - ProbeResp was exist in other channel
- * 1) Chnange GetFrameAction decision when BSS is absent.
- * 2) Check channel and resource in processing ProbeRequest
- *
- * 02 16 2011 cm.chang
- * [WCXRP00000447] [MT6620 Wi-Fi][FW] Support new NVRAM update mechanism
- * .
- *
- * 02 10 2011 yuche.tsai
- * [WCXRP00000431] [Volunteer Patch][MT6620][Driver] Add MLME support for deauthentication under AP(Hot-Spot) mode.
- * Add RX deauthentication & disassociation process under Hot-Spot mode.
- *
- * 02 09 2011 wh.su
- * [WCXRP00000433] [MT6620 Wi-Fi][Driver] Remove WAPI structure define for avoid P2P module
- * with structure miss-align pointer issue
- * always pre-allio WAPI related structure for align p2p module.
- *
- * 02 08 2011 yuche.tsai
- * [WCXRP00000419] [Volunteer Patch][MT6620/MT5931][Driver] Provide function of disconnect to
- * target station for AAA module.
- * Provide disconnect function for AAA module.
- *
- * 02 01 2011 cm.chang
- * [WCXRP00000415] [MT6620 Wi-Fi][Driver] Check if any memory leakage happens when uninitializing in DGB mode
- * .
- *
- * 01 27 2011 tsaiyuan.hsu
- * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support
- * add roaming fsm
- * 1. not support 11r, only use strength of signal to determine roaming.
- * 2. not enable CFG_SUPPORT_ROAMING until completion of full test.
- * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw
- * 4. assume that change of link quality in smooth way.
- *
- * 01 27 2011 george.huang
- * [WCXRP00000400] [MT6620 Wi-Fi] support CTIA power mode setting
- * Support CTIA power mode setting.
- *
- * 01 27 2011 george.huang
- * [WCXRP00000355] [MT6620 Wi-Fi] Set WMM-PS related setting with qualifying AP capability
- * Support current measure mode, assigned by registry (XP only).
- *
- * 01 24 2011 cp.wu
- * [WCXRP00000382] [MT6620 Wi-Fi][Driver] Track forwarding packet number with notifying tx thread for serving
- * 1. add an extra counter for tracking pending forward frames.
- * 2. notify TX service thread as well when there is pending forward frame
- * 3. correct build errors leaded by introduction of Wi-Fi direct separation module
- *
- * 01 12 2011 cm.chang
- * [WCXRP00000354] [MT6620 Wi-Fi][Driver][FW] Follow NVRAM bandwidth setting
- * User-defined bandwidth is for 2.4G and 5G individually
- *
- * 12 29 2010 eddie.chen
- * [WCXRP00000322] Add WMM IE in beacon,
- Add per station flow control when STA is in PS
- * Add WMM parameter for broadcast.
- *
- * 12 29 2010 eddie.chen
- * [WCXRP00000322] Add WMM IE in beacon,
- Add per station flow control when STA is in PS
- * Add CWMin CWMax for AP to generate IE.
- *
- * 12 29 2010 eddie.chen
- * [WCXRP00000322] Add WMM IE in beacon,
- Add per station flow control when STA is in PS
- * 1) PS flow control event
- *
- * 2) WMM IE in beacon, assoc resp, probe resp
- *
- * 12 28 2010 cp.wu
- * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release
- * report EEPROM used flag via NIC_CAPABILITY
- *
- * 12 28 2010 cp.wu
- * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release
- * integrate with 'EEPROM used' flag for reporting correct capability to Engineer Mode/META and other tools
- *
- * 12 07 2010 cm.chang
- * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant
- * 1. Country code is from NVRAM or supplicant
- * 2. Change band definition in CMD/EVENT.
- *
- * 11 01 2010 cp.wu
- * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000150] [MT6620 Wi-Fi][Driver]
- * Add implementation for querying current TX rate from firmware auto rate module
- * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead
- * 2) Remove CNM CH-RECOVER event handling
- * 3) cfg read/write API renamed with kal prefix for unified naming rules.
- *
- * 10 27 2010 george.huang
- * [WCXRP00000127] [MT6620 Wi-Fi][Driver] Add a registry to disable Beacon Timeout function for SQA test by using E1 EVB
- * Support registry option for disable beacon lost detection.
- *
- * 10 26 2010 cp.wu
- * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000137] [MT6620 Wi-Fi] [FW]
- * Support NIC capability query command
- * 1) update NVRAM content template to ver 1.02
- * 2) add compile option for querying NIC capability (default: off)
- * 3) modify AIS 5GHz support to run-time option, which could be turned on by registry or NVRAM setting
- * 4) correct auto-rate compiler error under linux (treat warning as error)
- * 5) simplify usage of NVRAM and REG_INFO_T
- * 6) add version checking between driver and firmware
- *
- * 10 08 2010 cp.wu
- * [WCXRP00000084] [MT6620 Wi-Fi][Driver][FW] Add fixed rate support for distance test
- * adding fixed rate support for distance test. (from registry setting)
- *
- * 10 06 2010 cp.wu
- * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning
- * code reorganization to improve isolation between GLUE and CORE layers.
- *
- * 10 05 2010 cp.wu
- * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check
- * 1) add NVRAM access API
- * 2) fake scanning result when NVRAM doesn't exist and/or version mismatch. (off by compiler option)
- * 3) add OID implementation for NVRAM read/write service
- *
- * 09 27 2010 chinghwa.yu
- * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000065] Update BoW design and settings
- * Update BCM/BoW design and settings.
- *
- * 09 24 2010 cp.wu
- * [WCXRP00000057] [MT6620 Wi-Fi][Driver] Modify online scan to a run-time switchable feature
- * Modify online scan as a run-time adjustable option (for Windows, in registry)
- *
- * 09 23 2010 cp.wu
- * [WCXRP00000051] [MT6620 Wi-Fi][Driver] WHQL test fail in MAC address changed item
- * use firmware reported mac address right after wlanAdapterStart() as permanent address
- *
- * 09 08 2010 cp.wu
- * NULL
- * use static memory pool for storing IEs of scanning result.
- *
- * 09 07 2010 yuche.tsai
- * NULL
- * Add a common IE buffer in P2P INFO structure.
- *
- * 09 03 2010 kevin.huang
- * NULL
- * Refine #include sequence and solve recursive/nested #include issue
- *
- * 09 01 2010 cp.wu
- * NULL
- * restore configuration as before.
- *
- * 09 01 2010 wh.su
- * NULL
- * adding the wapi support for integration test.
- *
- * 08 31 2010 kevin.huang
- * NULL
- * Use LINK LIST operation to process SCAN result
- *
- * 08 29 2010 yuche.tsai
- * NULL
- * Finish SLT TX/RX & Rate Changing Support.
- *
- * 08 25 2010 george.huang
- * NULL
- * update OID/ registry control path for PM related settings
- *
- * 08 24 2010 cm.chang
- * NULL
- * Support RLM initail channel of Ad-hoc, P2P and BOW
- *
- * 08 23 2010 chinghwa.yu
- * NULL
- * Update for BOW.
- *
- * 08 20 2010 cm.chang
- * NULL
- * Migrate RLM code to host from FW
- *
- * 08 16 2010 yuche.tsai
- * NULL
- * Add an intend mode for BSS info.
- * It is used to let P2P BSS Info to know which OP Mode it is going to become.
- *
- * 08 04 2010 george.huang
- * NULL
- * handle change PS mode OID/ CMD
- *
- * 08 02 2010 cp.wu
- * NULL
- * comment out deprecated members in BSS_INFO, which are only used by firmware rather than driver.
- *
- * 07 29 2010 cp.wu
- * NULL
- * eliminate u4FreqInKHz usage, combined into rConnections.ucAdHoc*
- *
- * 07 28 2010 cp.wu
- * NULL
- * 1) eliminate redundant variable eOPMode in prAdapter->rWlanInfo
- * 2) change nicMediaStateChange() API prototype
- *
- * 07 24 2010 wh.su
- *
- * .support the Wi-Fi RSN
- *
- * 07 21 2010 yuche.tsai
- *
- * Add for P2P Scan Result Parsing & Saving.
- *
- * 07 19 2010 wh.su
- *
- * update for security supporting.
- *
- * 07 19 2010 cm.chang
- *
- * Set RLM parameters and enable CNM channel manager
- *
- * 07 19 2010 yuche.tsai
- *
- * Remove BSS info which is redonedent in Wifi Var..
- *
- * 07 16 2010 yarco.yang
- *
- * 1. Support BSS Absence/Presence Event
- * 2. Support STA change PS mode Event
- * 3. Support BMC forwarding for AP mode.
- *
- * 07 14 2010 yarco.yang
- *
- * 1. Remove CFG_MQM_MIGRATION
- * 2. Add CMD_UPDATE_WMM_PARMS command
- *
- * 07 09 2010 george.huang
- *
- * [WPD00001556] Migrate PM variables from FW to driver: for composing QoS Info
- *
- * 07 08 2010 cp.wu
- *
- * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
- *
- * 07 08 2010 cm.chang
- * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
- * Check draft RLM code for HT cap
- *
- * 06 29 2010 yarco.yang
- * [WPD00003837][MT6620]Data Path Refine
- * replace g_rQM with Adpater->rQM
- *
- * 06 28 2010 cm.chang
- * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
- * 1st draft code for RLM module
- *
- * 06 21 2010 wh.su
- * [WPD00003840][MT6620 5931] Security migration
- * remove duplicate variable for migration.
- *
- * 06 21 2010 wh.su
- * [WPD00003840][MT6620 5931] Security migration
- * modify some code for concurrent network.
- *
- * 06 21 2010 yuche.tsai
- * [WPD00003839][MT6620 5931][P2P] Feature migration
- * Add P2P FSM Info in adapter.
- *
- * 06 21 2010 yarco.yang
- * [WPD00003837][MT6620]Data Path Refine
- * Support CFG_MQM_MIGRATION flag
- *
- * 06 18 2010 cm.chang
- * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
- * Provide cnmMgtPktAlloc() and alloc/free function of msg/buf
- *
- * 06 18 2010 wh.su
- * [WPD00003840][MT6620 5931] Security migration
- * migration the security related function from firmware.
- *
- * 06 17 2010 yuche.tsai
- * [WPD00003839][MT6620 5931][P2P] Feature migration
- * Add P2P related field, additional include p2p_fsm.h if p2p is enabled.
- *
- * 06 15 2010 cp.wu
- * [WPD00003833][MT6620 and MT5931] Driver migration
- * add scan.c.
- *
- * 06 14 2010 cp.wu
- * [WPD00003833][MT6620 and MT5931] Driver migration
- * add management dispatching function table.
- *
- * 06 11 2010 cp.wu
- * [WPD00003833][MT6620 and MT5931] Driver migration
- * auth.c is migrated.
- *
- * 06 11 2010 cp.wu
- * [WPD00003833][MT6620 and MT5931] Driver migration
- * 1) migrate assoc.c.
- * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness
- * 3) add configuration options for CNM_MEM and RSN modules
- * 4) add data path for management frames
- * 5) eliminate rPacketInfo of MSDU_INFO_T
- *
- * 06 10 2010 cp.wu
- * [WPD00003833][MT6620 and MT5931] Driver migration
- * add buildable & linkable ais_fsm.c
- *
- * related reference are still waiting to be resolved
- *
- * 06 09 2010 cp.wu
- * [WPD00003833][MT6620 and MT5931] Driver migration
- * add definitions for module migration.
- *
- * 06 08 2010 cp.wu
- * [WPD00003833][MT6620 and MT5931] Driver migration
- * cnm_timer has been migrated.
- *
- * 06 08 2010 cp.wu
- * [WPD00003833][MT6620 and MT5931] Driver migration
- * hem_mbox is migrated.
- *
- * 06 07 2010 cp.wu
- * [WPD00003833][MT6620 and MT5931] Driver migration
- * merge wifi_var.h, precomp.h, cnm_timer.h (data type only)
- *
- * 06 06 2010 kevin.huang
- * [WPD00003832][MT6620 5931] Create driver base
- * [MT6620 5931] Create driver base
- *
- * 05 22 2010 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * change OID behavior to meet WHQL requirement.
- *
- * 05 20 2010 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * 1) integrate OID_GEN_NETWORK_LAYER_ADDRESSES with CMD_ID_SET_IP_ADDRESS
- * 2) buffer statistics data for 2 seconds
- * 3) use default value for adhoc parameters instead of 0
- *
- * 05 19 2010 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * 1) do not take timeout mechanism for power mode oids
- * 2) retrieve network type from connection status
- * 3) after disassciation, set radio state to off
- * 4) TCP option over IPv6 is supported
- *
- * 05 18 2010 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * implement Wakeup-on-LAN except firmware integration part
- *
- * 04 27 2010 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * reserve field of privacy filter and RTS threshold setting.
- *
- * 04 13 2010 cp.wu
- * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support
- * add framework for BT-over-Wi-Fi support.
- * * * * * * 1) prPendingCmdInfo is replaced by queue for multiple handler capability
- * * * * * * 2) command sequence number is now increased atomically
- * * * * * * 3) private data could be hold and taken use for other purpose
- *
- * 04 07 2010 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * rWlanInfo should be placed at adapter rather than glue due to most operations
- * * * are done in adapter layer.
- *
- * 04 06 2010 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * code refine: fgTestMode should be at adapter rather than glue due to the device/fw is also involved
- *
- * 03 31 2010 wh.su
- * [WPD00003816][MT6620 Wi-Fi] Adding the security support
- * modify the wapi related code for new driver's design.
- *
- * 03 19 2010 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * 1) add ACPI D0/D3 state switching support
- * * * 2) use more formal way to handle interrupt when the status is retrieved from enhanced RX response
- *
- * 03 03 2010 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * implement OID_802_3_MULTICAST_LIST oid handling
- *
- * 03 02 2010 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * 1) the use of prPendingOid revised, all accessing are now protected by spin lock
- * * * 2) ensure wlanReleasePendingOid will clear all command queues
- *
- * 02 09 2010 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * move ucCmdSeqNum as instance variable
- *
- * 01 27 2010 wh.su
- * [WPD00003816][MT6620 Wi-Fi] Adding the security support
- * .
- *
- * 01 27 2010 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * 1. eliminate improper variable in rHifInfo
- * * * 2. block TX/ordinary OID when RF test mode is engaged
- * * * 3. wait until firmware finish operation when entering into and leaving from RF test mode
- * * * 4. correct some HAL implementation
- *
- * 12 30 2009 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * 1) According to CMD/EVENT documentation v0.8,
- * * * OID_CUSTOM_TEST_RX_STATUS & OID_CUSTOM_TEST_TX_STATUS is no longer used,
- * * * and result is retrieved by get ATInfo instead
- * * * 2) add 4 counter for recording aggregation statistics
- *
- * 12 28 2009 cp.wu
- * [WPD00001943]Create WiFi test driver framework on WinXP
- * eliminate redundant variables for connection_state
- ** \main\maintrunk.MT6620WiFiDriver_Prj\13 2009-12-16 18:02:03 GMT mtk02752
- ** add external reference to avoid compilation error
- ** \main\maintrunk.MT6620WiFiDriver_Prj\12 2009-12-10 16:40:26 GMT mtk02752
- ** eliminate unused member
- ** \main\maintrunk.MT6620WiFiDriver_Prj\11 2009-12-08 17:36:08 GMT mtk02752
- ** add RF test data members into P_ADAPTER_T
- ** \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-10-13 21:58:45 GMT mtk01084
- ** update for new HW architecture design
- ** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-04-28 10:29:57 GMT mtk01461
- ** Add read WTSR for SDIO_STATUS_ENHANCE mode
- ** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-04-21 09:37:35 GMT mtk01461
- ** Add prPendingCmdInfoOfOID for temporarily saving the CMD_INFO_T before en-queue to rCmdQueue
- ** \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-04-17 19:57:51 GMT mtk01461
- ** Add MGMT Buffer Info
- ** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-04-01 10:34:12 GMT mtk01461
- ** Add SW pre test CFG_HIF_LOOPBACK_PRETEST
- ** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-03-23 21:41:48 GMT mtk01461
- ** Add fgIsWmmAssoc flag for TC assignment
- ** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-03-19 18:32:51 GMT mtk01084
- ** update for basic power management functions
- ** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-03-18 20:51:52 GMT mtk01426
- ** Add #if CFG_SDIO_RX_ENHANCE related data structure
- ** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:16:17 GMT mtk01426
- ** Init for develop
- **
- */
- #ifndef _ADAPTER_H
- #define _ADAPTER_H
- /*******************************************************************************
- * C O M P I L E R F L A G S
- ********************************************************************************
- */
- /*******************************************************************************
- * E X T E R N A L R E F E R E N C E S
- ********************************************************************************
- */
- #if CFG_SUPPORT_PASSPOINT
- #include "hs20.h"
- #endif /* CFG_SUPPORT_PASSPOINT */
- /*******************************************************************************
- * C O N S T A N T S
- ********************************************************************************
- */
- /*******************************************************************************
- * D A T A T Y P E S
- ********************************************************************************
- */
- typedef struct _ENHANCE_MODE_DATA_STRUCT_T SDIO_CTRL_T, *P_SDIO_CTRL_T;
- typedef struct _WLAN_INFO_T {
- PARAM_BSSID_EX_T rCurrBssId;
- /* Scan Result */
- PARAM_BSSID_EX_T arScanResult[CFG_MAX_NUM_BSS_LIST];
- PUINT_8 apucScanResultIEs[CFG_MAX_NUM_BSS_LIST];
- UINT_32 u4ScanResultNum;
- /* IE pool for Scanning Result */
- UINT_8 aucScanIEBuf[CFG_MAX_COMMON_IE_BUF_LEN];
- UINT_32 u4ScanIEBufferUsage;
- OS_SYSTIME u4SysTime;
- /* connection parameter (for Ad-Hoc) */
- UINT_16 u2BeaconPeriod;
- UINT_16 u2AtimWindow;
- PARAM_RATES eDesiredRates;
- CMD_LINK_ATTRIB eLinkAttr;
- /* CMD_PS_PROFILE_T ePowerSaveMode; */
- CMD_PS_PROFILE_T arPowerSaveMode[BSS_INFO_NUM];
- /* trigger parameter */
- ENUM_RSSI_TRIGGER_TYPE eRssiTriggerType;
- PARAM_RSSI rRssiTriggerValue;
- /* Privacy Filter */
- ENUM_PARAM_PRIVACY_FILTER_T ePrivacyFilter;
- /* RTS Threshold */
- PARAM_RTS_THRESHOLD eRtsThreshold;
- /* Network Type */
- UINT_8 ucNetworkType;
- /* Network Type In Use */
- UINT_8 ucNetworkTypeInUse;
- } WLAN_INFO_T, *P_WLAN_INFO_T;
- /* Session for CONNECTION SETTINGS */
- typedef struct _CONNECTION_SETTINGS_T {
- UINT_8 aucMacAddress[MAC_ADDR_LEN];
- UINT_8 ucDelayTimeOfDisconnectEvent;
- BOOLEAN fgIsConnByBssidIssued;
- UINT_8 aucBSSID[MAC_ADDR_LEN];
- BOOLEAN fgIsConnReqIssued;
- BOOLEAN fgIsDisconnectedByNonRequest;
- UINT_8 ucSSIDLen;
- UINT_8 aucSSID[ELEM_MAX_LEN_SSID];
- ENUM_PARAM_OP_MODE_T eOPMode;
- ENUM_PARAM_CONNECTION_POLICY_T eConnectionPolicy;
- ENUM_PARAM_AD_HOC_MODE_T eAdHocMode;
- ENUM_PARAM_AUTH_MODE_T eAuthMode;
- ENUM_PARAM_ENCRYPTION_STATUS_T eEncStatus;
- BOOLEAN fgIsScanReqIssued;
- /* MIB attributes */
- UINT_16 u2BeaconPeriod;
- UINT_16 u2RTSThreshold; /* User desired setting */
- UINT_16 u2DesiredNonHTRateSet; /* User desired setting */
- UINT_8 ucAdHocChannelNum; /* For AdHoc */
- ENUM_BAND_T eAdHocBand; /* For AdHoc */
- UINT_32 u4FreqInKHz; /* Center frequency */
- /* ATIM windows using for IBSS power saving function */
- UINT_16 u2AtimWindow;
- /* Features */
- BOOLEAN fgIsEnableRoaming;
- BOOLEAN fgIsAdHocQoSEnable;
- ENUM_PARAM_PHY_CONFIG_T eDesiredPhyConfig;
- /* Used for AP mode for desired channel and bandwidth */
- UINT_16 u2CountryCode;
- UINT_8 uc2G4BandwidthMode; /* 20/40M or 20M only *//* Not used */
- UINT_8 uc5GBandwidthMode; /* 20/40M or 20M only *//* Not used */
- #if CFG_SUPPORT_802_11D
- BOOLEAN fgMultiDomainCapabilityEnabled;
- #endif /* CFG_SUPPORT_802_11D */
- #if 1 /* CFG_SUPPORT_WAPI */
- BOOL fgWapiMode;
- UINT_32 u4WapiSelectedGroupCipher;
- UINT_32 u4WapiSelectedPairwiseCipher;
- UINT_32 u4WapiSelectedAKMSuite;
- #endif
- /* CR1486, CR1640 */
- /* for WPS, disable the privacy check for AP selection policy */
- BOOLEAN fgPrivacyCheckDisable;
- /* b0~3: trigger-en AC0~3. b4~7: delivery-en AC0~3 */
- UINT_8 bmfgApsdEnAc;
- /* for RSN info store, when upper layer set rsn info */
- RSN_INFO_T rRsnInfo;
- } CONNECTION_SETTINGS_T, *P_CONNECTION_SETTINGS_T;
- struct _BSS_INFO_T {
- ENUM_NETWORK_TYPE_T eNetworkType;
- UINT_32 u4PrivateData; /* Private data parameter for each NETWORK type usage. */
- /* P2P network type has 3 network interface to distinguish. */
- ENUM_PARAM_MEDIA_STATE_T eConnectionState; /* Connected Flag used in AIS_NORMAL_TR */
- ENUM_PARAM_MEDIA_STATE_T eConnectionStateIndicated; /* The Media State that report to HOST */
- ENUM_OP_MODE_T eCurrentOPMode; /* Current Operation Mode - Infra/IBSS */
- #if CFG_ENABLE_WIFI_DIRECT
- ENUM_OP_MODE_T eIntendOPMode;
- #endif
- BOOLEAN fgIsInUse; /* For CNM to assign BSS_INFO */
- BOOLEAN fgIsNetActive; /* TRUE if this network has been activated */
- UINT_8 ucBssIndex; /* BSS_INFO_T index */
- UINT_8 ucReasonOfDisconnect; /* Used by media state indication */
- UINT_8 ucSSIDLen; /* Length of SSID */
- #if CFG_ENABLE_WIFI_DIRECT
- ENUM_HIDDEN_SSID_TYPE_T eHiddenSsidType; /* For Hidden SSID usage. */
- #endif
- UINT_8 aucSSID[ELEM_MAX_LEN_SSID]; /* SSID used in this BSS */
- UINT_8 aucBSSID[MAC_ADDR_LEN]; /* The BSSID of the associated BSS */
- UINT_8 aucOwnMacAddr[MAC_ADDR_LEN]; /* Owned MAC Address used in this BSS */
- UINT_8 ucOwnMacIndex; /* Owned MAC index used in this BSS */
- P_STA_RECORD_T prStaRecOfAP; /* For Infra Mode, and valid only if
- * eConnectionState == MEDIA_STATE_CONNECTED
- */
- LINK_T rStaRecOfClientList; /* For IBSS/AP Mode, all known STAs in current BSS */
- UINT_8 ucBMCWlanIndex; /* For IBSS/AP Mode, BC/MC Tx wlan index, For STA, BC/MC Rx wlan index */
- BOOLEAN fgTxBcKeyExist; /* Bc Transmit key exist or not */
- UINT_8 ucTxDefaultKeyID; /* Bc Transmit key ID */
- UINT_8 ucCurrentGtkId; /* The Current Group key ID */
- UINT_16 u2CapInfo; /* Change Detection */
- UINT_16 u2BeaconInterval; /* The Beacon Interval of this BSS */
- UINT_16 u2ATIMWindow; /* For IBSS Mode */
- UINT_16 u2AssocId; /* For Infra Mode, it is the Assoc ID assigned by AP.
- */
- UINT_8 ucDTIMPeriod; /* For Infra/AP Mode */
- UINT_8 ucDTIMCount; /* For AP Mode, it is the DTIM value we should carried in
- * the Beacon of next TBTT.
- */
- UINT_8 ucPhyTypeSet; /* Available PHY Type Set of this peer
- * (This is deduced from received BSS_DESC_T)
- */
- UINT_8 ucNonHTBasicPhyType; /* The Basic PHY Type Index, used to setup Phy Capability */
- UINT_8 ucConfigAdHocAPMode; /* The configuration of AdHoc/AP Mode. e.g. 11g or 11b */
- UINT_8 ucBeaconTimeoutCount; /* For Infra/AP Mode, it is a threshold of Beacon Lost Count to
- confirm connection was lost */
- BOOLEAN fgHoldSameBssidForIBSS; /* For IBSS Mode, to keep use same BSSID to extend the life cycle of an IBSS */
- BOOLEAN fgIsBeaconActivated; /* For AP/IBSS Mode, it is used to indicate that Beacon is sending */
- P_MSDU_INFO_T prBeacon; /* For AP/IBSS Mode - Beacon Frame */
- BOOLEAN fgIsIBSSMaster; /* For IBSS Mode - To indicate that we can reply ProbeResp Frame.
- In current TBTT interval */
- BOOLEAN fgIsShortPreambleAllowed; /* From Capability Info. of AssocResp Frame
- AND of Beacon/ProbeResp Frame */
- BOOLEAN fgUseShortPreamble; /* Short Preamble is enabled in current BSS. */
- BOOLEAN fgUseShortSlotTime; /* Short Slot Time is enabled in current BSS. */
- UINT_16 u2OperationalRateSet; /* Operational Rate Set of current BSS */
- UINT_16 u2BSSBasicRateSet; /* Basic Rate Set of current BSS */
- UINT_8 ucAllSupportedRatesLen; /* Used for composing Beacon Frame in AdHoc or AP Mode */
- UINT_8 aucAllSupportedRates[RATE_NUM_SW];
- UINT_8 ucAssocClientCnt; /* TODO(Kevin): Number of associated clients */
- BOOLEAN fgIsProtection;
- BOOLEAN fgIsQBSS; /* fgIsWmmBSS; *//* For Infra/AP/IBSS Mode, it is used to indicate if we support WMM in
- * current BSS. */
- BOOLEAN fgIsNetAbsent; /* TRUE: BSS is absent, FALSE: BSS is present */
- UINT_32 u4RsnSelectedGroupCipher;
- UINT_32 u4RsnSelectedPairwiseCipher;
- UINT_32 u4RsnSelectedAKMSuite;
- UINT_16 u2RsnSelectedCapInfo;
- /*------------------------------------------------------------------------*/
- /* Power Management related information */
- /*------------------------------------------------------------------------*/
- PM_PROFILE_SETUP_INFO_T rPmProfSetupInfo;
- /*------------------------------------------------------------------------*/
- /* WMM/QoS related information */
- /*------------------------------------------------------------------------*/
- UINT_8 ucWmmParamSetCount; /* Used to detect the change of EDCA parameters. For AP mode,
- the value is used in WMM IE */
- AC_QUE_PARMS_T arACQueParms[WMM_AC_INDEX_NUM];
- UINT_8 aucCWminLog2ForBcast[WMM_AC_INDEX_NUM]; /* For AP mode, broadcast the CWminLog2 */
- UINT_8 aucCWmaxLog2ForBcast[WMM_AC_INDEX_NUM]; /* For AP mode, broadcast the CWmaxLog2 */
- AC_QUE_PARMS_T arACQueParmsForBcast[WMM_AC_INDEX_NUM]; /* For AP mode, broadcast the value */
- /*------------------------------------------------------------------------*/
- /* 802.11n HT operation IE when (prStaRec->ucPhyTypeSet & PHY_TYPE_BIT_HT) */
- /* is true. They have the same definition with fields of */
- /* information element (CM) */
- /*------------------------------------------------------------------------*/
- ENUM_BAND_T eBand;
- UINT_8 ucPrimaryChannel;
- UINT_8 ucHtOpInfo1;
- UINT_16 u2HtOpInfo2;
- UINT_16 u2HtOpInfo3;
- /*------------------------------------------------------------------------*/
- /* 802.11ac VHT operation IE when (prStaRec->ucPhyTypeSet & PHY_TYPE_BIT_VHT) */
- /* is true. They have the same definition with fields of */
- /* information element (EASON) */
- /*------------------------------------------------------------------------*/
- #if 1 /* CFG_SUPPORT_802_11AC */
- UINT_8 ucVhtChannelWidth;
- UINT_8 ucVhtChannelFrequencyS1;
- UINT_8 ucVhtChannelFrequencyS2;
- UINT_16 u2VhtBasicMcsSet;
- #endif
- /*------------------------------------------------------------------------*/
- /* Required protection modes (CM) */
- /*------------------------------------------------------------------------*/
- BOOLEAN fgErpProtectMode;
- ENUM_HT_PROTECT_MODE_T eHtProtectMode;
- ENUM_GF_MODE_T eGfOperationMode;
- ENUM_RIFS_MODE_T eRifsOperationMode;
- BOOLEAN fgObssErpProtectMode; /* GO only */
- ENUM_HT_PROTECT_MODE_T eObssHtProtectMode; /* GO only */
- ENUM_GF_MODE_T eObssGfOperationMode; /* GO only */
- BOOLEAN fgObssRifsOperationMode; /* GO only */
- /*------------------------------------------------------------------------*/
- /* OBSS to decide if 20/40M bandwidth is permitted. */
- /* The first member indicates the following channel list length. */
- /*------------------------------------------------------------------------*/
- BOOLEAN fgAssoc40mBwAllowed;
- BOOLEAN fg40mBwAllowed;
- ENUM_CHNL_EXT_T eBssSCO; /* Real setting for HW
- * 20/40M AP mode will always set 40M,
- * but its OP IE can be changed.
- */
- UINT_8 auc2G_20mReqChnlList[CHNL_LIST_SZ_2G + 1];
- UINT_8 auc2G_NonHtChnlList[CHNL_LIST_SZ_2G + 1];
- UINT_8 auc2G_PriChnlList[CHNL_LIST_SZ_2G + 1];
- UINT_8 auc2G_SecChnlList[CHNL_LIST_SZ_2G + 1];
- UINT_8 auc5G_20mReqChnlList[CHNL_LIST_SZ_5G + 1];
- UINT_8 auc5G_NonHtChnlList[CHNL_LIST_SZ_5G + 1];
- UINT_8 auc5G_PriChnlList[CHNL_LIST_SZ_5G + 1];
- UINT_8 auc5G_SecChnlList[CHNL_LIST_SZ_5G + 1];
- TIMER_T rObssScanTimer;
- UINT_16 u2ObssScanInterval; /* in unit of sec */
- BOOLEAN fgObssActionForcedTo20M; /* GO only */
- BOOLEAN fgObssBeaconForcedTo20M; /* GO only */
- /*------------------------------------------------------------------------*/
- /* HW Related Fields (Kevin) */
- /*------------------------------------------------------------------------*/
- UINT_16 u2HwDefaultFixedRateCode; /* The default rate code copied to MAC TX Desc */
- UINT_16 u2HwLPWakeupGuardTimeUsec;
- UINT_8 ucBssFreeQuota; /* The value is updated from FW */
- #if CFG_ENABLE_GTK_FRAME_FILTER
- P_IPV4_NETWORK_ADDRESS_LIST prIpV4NetAddrList;
- #endif
- UINT_16 u2DeauthReason;
- #if CFG_SUPPORT_TDLS
- BOOLEAN fgTdlsIsProhibited;
- BOOLEAN fgTdlsIsChSwProhibited;
- #endif
- #if CFG_SUPPORT_PNO
- BOOLEAN fgIsPNOEnable;
- BOOLEAN fgIsNetRequestInActive;
- #endif
- WIFI_WMM_AC_STAT_T arLinkStatistics[WMM_AC_INDEX_NUM]; /*link layer statistics */
- };
- struct _AIS_SPECIFIC_BSS_INFO_T {
- UINT_8 ucRoamingAuthTypes; /* This value indicate the roaming type used in AIS_JOIN */
- BOOLEAN fgIsIBSSActive;
- /*! \brief Global flag to let arbiter stay at standby and not connect to any network */
- BOOLEAN fgCounterMeasure;
- /* UINT_8 ucTxWlanIndex; *//* Legacy wep, adhoc wep wpa Transmit key wlan index */
- /* BOOLEAN fgKeyMaterialExist[4]; */
- /* UINT_8 aucKeyMaterial[32][4]; */
- #if 0
- BOOLEAN fgWepWapiBcKeyExist; /* WEP WAPI BC key exist flag */
- UINT_8 ucWepWapiBcWlanIndex; /* WEP WAPI BC wlan index */
- BOOLEAN fgRsnBcKeyExist[4]; /* RSN BC key exist flag, map to key id 0, 1, 2, 3 */
- UINT_8 ucRsnBcWlanIndex[4]; /* RSN BC wlan index, map to key id 0, 1, 2, 3 */
- #endif
- /* While Do CounterMeasure procedure, check the EAPoL Error report have send out */
- BOOLEAN fgCheckEAPoLTxDone;
- UINT_32 u4RsnaLastMICFailTime;
- /* Stored the current bss wpa rsn cap filed, used for roaming policy */
- /* UINT_16 u2RsnCap; */
- TIMER_T rPreauthenticationTimer;
- /* By the flow chart of 802.11i,
- wait 60 sec before associating to same AP
- or roaming to a new AP
- or sending data in IBSS,
- keep a timer for handle the 60 sec counterMeasure */
- TIMER_T rRsnaBlockTrafficTimer;
- TIMER_T rRsnaEAPoLReportTimeoutTimer;
- /* For Keep the Tx/Rx Mic key for TKIP SW Calculate Mic */
- /* This is only one for AIS/AP */
- UINT_8 aucTxMicKey[8];
- UINT_8 aucRxMicKey[8];
- /* Buffer for WPA2 PMKID */
- /* The PMKID cache lifetime is expire by media_disconnect_indication */
- UINT_32 u4PmkidCandicateCount;
- PMKID_CANDICATE_T arPmkidCandicate[CFG_MAX_PMKID_CACHE];
- UINT_32 u4PmkidCacheCount;
- PMKID_ENTRY_T arPmkidCache[CFG_MAX_PMKID_CACHE];
- BOOLEAN fgIndicatePMKID;
- #if CFG_SUPPORT_802_11W
- BOOLEAN fgMgmtProtection;
- BOOLEAN fgAPApplyPmfReq;
- UINT_32 u4SaQueryStart;
- UINT_32 u4SaQueryCount;
- UINT_8 ucSaQueryTimedOut;
- PUINT_8 pucSaQueryTransId;
- TIMER_T rSaQueryTimer;
- BOOLEAN fgBipKeyInstalled;
- #endif
- };
- struct _BOW_SPECIFIC_BSS_INFO_T {
- UINT_16 u2Reserved; /* Reserved for Data Type Check */
- };
- #if CFG_SLT_SUPPORT
- typedef struct _SLT_INFO_T {
- P_BSS_DESC_T prPseudoBssDesc;
- UINT_16 u2SiteID;
- UINT_8 ucChannel2G4;
- UINT_8 ucChannel5G;
- BOOLEAN fgIsDUT;
- UINT_32 u4BeaconReceiveCnt;
- /* ///////Deprecated///////// */
- P_STA_RECORD_T prPseudoStaRec;
- } SLT_INFO_T, *P_SLT_INFO_T;
- #endif
- typedef struct _WLAN_TABLE_T {
- UINT_8 ucUsed;
- UINT_8 ucBssIndex;
- UINT_8 ucKeyId;
- UINT_8 ucPairwise;
- UINT_8 aucMacAddr[MAC_ADDR_LEN];
- UINT_8 ucStaIndex;
- } WLAN_TABLE_T, *P_WLAN_TABLE_T;
- #if 1 /* DBG */
- typedef struct _HAL_WTBL_SEC_CONFIG_T {
- BOOL fgRCA2;
- BOOL fgRV;
- BOOL fgIKV;
- BOOL fgRKV;
- BOOL fgRCID;
- BOOL fgRCA1;
- BOOL fgEvenPN;
- UINT_8 ucKeyID;
- UINT_8 ucMUARIdx;
- UINT_8 ucCipherSuit;
- } HAL_WTBL_SEC_CONFIG_T, *P_HAL_WTBL_SEC_CONFIG_T;
- #endif
- /* Major member variables for WiFi FW operation.
- Variables within this region will be ready for access after WIFI function is enabled.
- */
- typedef struct _WIFI_VAR_T {
- BOOLEAN fgIsRadioOff;
- BOOLEAN fgIsEnterD3ReqIssued;
- BOOLEAN fgDebugCmdResp;
- CONNECTION_SETTINGS_T rConnSettings;
- SCAN_INFO_T rScanInfo;
- #if CFG_SUPPORT_ROAMING
- ROAMING_INFO_T rRoamingInfo;
- #endif /* CFG_SUPPORT_ROAMING */
- AIS_FSM_INFO_T rAisFsmInfo;
- ENUM_PWR_STATE_T aePwrState[BSS_INFO_NUM];
- BSS_INFO_T arBssInfoPool[BSS_INFO_NUM];
- P2P_DEV_INFO_T rP2pDevInfo;
- AIS_SPECIFIC_BSS_INFO_T rAisSpecificBssInfo;
- #if CFG_ENABLE_WIFI_DIRECT
- P_P2P_CONNECTION_SETTINGS_T prP2PConnSettings;
- P_P2P_SPECIFIC_BSS_INFO_T prP2pSpecificBssInfo;
- /* P_P2P_FSM_INFO_T prP2pFsmInfo; */
- P_P2P_DEV_FSM_INFO_T prP2pDevFsmInfo;
- /* Currently we only support 2 p2p interface. */
- P_P2P_ROLE_FSM_INFO_T aprP2pRoleFsmInfo[BSS_P2P_NUM];
- #endif /* CFG_ENABLE_WIFI_DIRECT */
- #if CFG_ENABLE_BT_OVER_WIFI
- BOW_SPECIFIC_BSS_INFO_T rBowSpecificBssInfo;
- BOW_FSM_INFO_T rBowFsmInfo;
- #endif /* CFG_ENABLE_BT_OVER_WIFI */
- WLAN_TABLE_T arWtbl[WTBL_SIZE];
- #if DBG
- HAL_WTBL_SEC_CONFIG_T arWtblCfg[WTBL_SIZE];
- #endif
- DEAUTH_INFO_T arDeauthInfo[MAX_DEAUTH_INFO_COUNT];
- /* Current Wi-Fi Settings and Flags */
- UINT_8 aucPermanentAddress[MAC_ADDR_LEN];
- UINT_8 aucMacAddress[MAC_ADDR_LEN];
- UINT_8 aucDeviceAddress[MAC_ADDR_LEN];
- UINT_8 aucInterfaceAddress[MAC_ADDR_LEN];
- UINT_8 ucAvailablePhyTypeSet;
- ENUM_PHY_TYPE_INDEX_T eNonHTBasicPhyType2G4; /* Basic Phy Type used by SCN according
- * to the set of Available PHY Types
- */
- ENUM_PARAM_PREAMBLE_TYPE_T ePreambleType;
- ENUM_REGISTRY_FIXED_RATE_T eRateSetting;
- BOOLEAN fgIsShortSlotTimeOptionEnable;
- /* User desired setting, but will honor the capability of AP */
- BOOLEAN fgEnableJoinToHiddenSSID;
- BOOLEAN fgSupportWZCDisassociation;
- #if CFG_SUPPORT_WFD
- WFD_CFG_SETTINGS_T rWfdConfigureSettings;
- #endif
- #if CFG_SLT_SUPPORT
- SLT_INFO_T rSltInfo;
- #endif
- #if CFG_SUPPORT_PASSPOINT
- HS20_INFO_T rHS20Info;
- #endif /* CFG_SUPPORT_PASSPOINT */
- UINT_8 aucMediatekOuiIE[64];
- UINT_16 u2MediatekOuiIELen;
- /* Feature Options */
- UINT_8 ucQoS;
- UINT_8 ucStaHt;
- UINT_8 ucStaVht;
- UINT_8 ucApHt;
- UINT_8 ucApVht;
- UINT_8 ucP2pGoHt;
- UINT_8 ucP2pGoVht;
- UINT_8 ucP2pGcHt;
- UINT_8 ucP2pGcVht;
- UINT_8 ucAmpduTx;
- UINT_8 ucAmpduRx;
- UINT_8 ucTspec;
- UINT_8 ucUapsd;
- UINT_8 ucStaUapsd;
- UINT_8 ucApUapsd;
- UINT_8 ucP2pUapsd;
- UINT_8 ucTxShortGI;
- UINT_8 ucRxShortGI;
- UINT_8 ucTxLdpc;
- UINT_8 ucRxLdpc;
- UINT_8 ucTxStbc;
- UINT_8 ucRxStbc;
- UINT_8 ucTxGf;
- UINT_8 ucRxGf;
- UINT_8 ucTxopPsTx;
- UINT_8 ucSigTaRts;
- UINT_8 ucDynBwRts;
- UINT_8 ucStaHtBfee;
- UINT_8 ucStaVhtBfee;
- UINT_8 ucStaBfer;
- UINT_8 ucApWpsMode;
- UINT_8 ucApChannel;
- UINT_8 ucApSco;
- UINT_8 ucP2pGoSco;
- UINT_8 ucStaBandwidth;
- UINT_8 ucSta5gBandwidth;
- UINT_8 ucSta2gBandwidth;
- UINT_8 ucAp5gBandwidth;
- UINT_8 ucAp2gBandwidth;
- UINT_8 ucP2p5gBandwidth;
- UINT_8 ucP2p2gBandwidth;
- UINT_8 ucTxBaSize;
- UINT_8 ucRxHtBaSize;
- UINT_8 ucRxVhtBaSize;
- UINT_8 ucStaDisconnectDetectTh;
- UINT_8 ucApDisconnectDetectTh;
- UINT_8 ucP2pDisconnectDetectTh;
- UINT_8 ucThreadScheduling;
- UINT_8 ucThreadPriority;
- INT_8 cThreadNice;
- UINT_8 ucTcRestrict;
- UINT_32 u4MaxTxDeQLimit;
- UINT_8 ucAlwaysResetUsedRes;
- UINT_32 u4NetifStopTh;
- UINT_32 u4NetifStartTh;
- #if CFG_AUTO_CHANNEL_SEL_SUPPORT
- PARAM_GET_CHN_LOAD rChnLoadInfo;
- #endif
- #if CFG_SUPPORT_MTK_SYNERGY
- UINT_8 ucMtkOui;
- UINT_32 u4MtkOuiCap;
- UINT_8 aucMtkFeature[4];
- #endif
- UINT_32 u4HifIstLoopCount;
- UINT_32 u4Rx2OsLoopCount;
- UINT_32 u4HifTxloopCount;
- UINT_32 u4TxRxLoopCount;
- UINT_32 u4TxFromOsLoopCount;
- UINT_32 au4TcPageCount[TC_NUM];
- UINT_8 ucExtraTxDone;
- UINT_8 ucTxDbg;
- UINT_8 ucCmdRsvResource;
- UINT_32 u4MgmtQueueDelayTimeout;
- UINT_32 u4StatsLogTimeout;
- UINT_32 u4StatsLogDuration;
- UINT_8 ucDhcpTxDone;
- UINT_8 ucArpTxDone;
- } WIFI_VAR_T, *P_WIFI_VAR_T; /* end of _WIFI_VAR_T */
- /* cnm_timer module */
- typedef struct {
- LINK_T rLinkHead;
- OS_SYSTIME rNextExpiredSysTime;
- KAL_WAKE_LOCK_T rWakeLock;
- BOOLEAN fgWakeLocked;
- } ROOT_TIMER, *P_ROOT_TIMER;
- /* FW/DRV/NVRAM version information */
- typedef struct {
- /* NVRAM or Registry */
- UINT_16 u2Part1CfgOwnVersion;
- UINT_16 u2Part1CfgPeerVersion;
- UINT_16 u2Part2CfgOwnVersion;
- UINT_16 u2Part2CfgPeerVersion;
- /* Firmware */
- UINT_16 u2FwProductID;
- UINT_16 u2FwOwnVersion;
- UINT_16 u2FwPeerVersion;
- } WIFI_VER_INFO_T, *P_WIFI_VER_INFO_T;
- #if CFG_ENABLE_WIFI_DIRECT
- /*
- * p2p function pointer structure
- */
- typedef struct _P2P_FUNCTION_LINKER {
- P2P_REMOVE prP2pRemove;
- /* NIC_P2P_MEDIA_STATE_CHANGE prNicP2pMediaStateChange; */
- /* SCAN_UPDATE_P2P_DEVICE_DESC prScanUpdateP2pDeviceDesc; */
- /* P2P_FSM_RUN_EVENT_RX_PROBE_RESPONSE_FRAME prP2pFsmRunEventRxProbeResponseFrame; */
- P2P_GENERATE_P2P_IE prP2pGenerateWSC_IEForBeacon;
- /* P2P_CALCULATE_WSC_IE_LEN_FOR_PROBE_RSP prP2pCalculateWSC_IELenForProbeRsp; */
- /* P2P_GENERATE_WSC_IE_FOR_PROBE_RSP prP2pGenerateWSC_IEForProbeRsp; */
- /* SCAN_REMOVE_P2P_BSS_DESC prScanRemoveP2pBssDesc; */
- /* P2P_HANDLE_SEC_CHECK_RSP prP2pHandleSecCheckRsp; */
- P2P_NET_REGISTER prP2pNetRegister;
- P2P_NET_UNREGISTER prP2pNetUnregister;
- P2P_CALCULATE_P2P_IE_LEN prP2pCalculateP2p_IELenForAssocReq; /* All IEs generated from supplicant. */
- P2P_GENERATE_P2P_IE prP2pGenerateP2p_IEForAssocReq; /* All IEs generated from supplicant. */
- } P2P_FUNCTION_LINKER, *P_P2P_FUNCTION_LINKER;
- #endif
- /*
- * Major ADAPTER structure
- * Major data structure for driver operation
- */
- struct _ADAPTER_T {
- UINT_8 ucRevID;
- BOOLEAN fgIsReadRevID;
- UINT_16 u2NicOpChnlNum;
- BOOLEAN fgIsEnableWMM;
- BOOLEAN fgIsWmmAssoc; /* This flag is used to indicate that WMM is enable in current BSS */
- UINT_32 u4OsPacketFilter; /* packet filter used by OS */
- BOOLEAN fgAllMulicastFilter; /* mDNS filter used by OS */
- P_BSS_INFO_T aprBssInfo[HW_BSSID_NUM + 1];
- P_BSS_INFO_T prAisBssInfo;
- #if CFG_TCP_IP_CHKSUM_OFFLOAD
- UINT_32 u4CSUMFlags;
- #endif /* CFG_TCP_IP_CHKSUM_OFFLOAD */
- ENUM_BAND_T aePreferBand[BSS_INFO_NUM];
- /* ADAPTER flags */
- UINT_32 u4Flags;
- UINT_32 u4HwFlags;
- BOOLEAN fgIsRadioOff;
- BOOLEAN fgIsEnterD3ReqIssued;
- UINT_8 aucMacAddress[MAC_ADDR_LEN];
- ENUM_PHY_TYPE_INDEX_T eCurrentPhyType; /* Current selection basing on the set of Available PHY Types */
- #if CFG_COALESCING_BUFFER_SIZE || CFG_SDIO_RX_AGG
- UINT_32 u4CoalescingBufCachedSize;
- PUINT_8 pucCoalescingBufCached;
- #endif /* CFG_COALESCING_BUFFER_SIZE */
- /* Buffer for CMD_INFO_T, Mgt packet and mailbox message */
- BUF_INFO_T rMgtBufInfo;
- BUF_INFO_T rMsgBufInfo;
- PUINT_8 pucMgtBufCached;
- UINT_32 u4MgtBufCachedSize;
- UINT_8 aucMsgBuf[MSG_BUFFER_SIZE];
- #if CFG_DBG_MGT_BUF
- UINT_32 u4MemAllocDynamicCount; /* Debug only */
- UINT_32 u4MemFreeDynamicCount; /* Debug only */
- #endif
- STA_RECORD_T arStaRec[CFG_STA_REC_NUM];
- /* Element for TX PATH */
- TX_CTRL_T rTxCtrl;
- QUE_T rFreeCmdList;
- CMD_INFO_T arHifCmdDesc[CFG_TX_MAX_CMD_PKT_NUM];
- /* Element for RX PATH */
- RX_CTRL_T rRxCtrl;
- /* Timer for restarting RFB setup procedure */
- TIMER_T rPacketDelaySetupTimer;
- P_SDIO_CTRL_T prSDIOCtrl;
- /* Buffer for Authentication Event */
- /* <Todo> Move to glue layer and refine the kal function */
- /* Reference to rsnGeneratePmkidIndication function at rsn.c */
- UINT_8 aucIndicationEventBuffer[(CFG_MAX_PMKID_CACHE * 20) + 8];
- UINT_32 u4IntStatus;
- ENUM_ACPI_STATE_T rAcpiState;
- BOOLEAN fgIsIntEnable;
- BOOLEAN fgIsIntEnableWithLPOwnSet;
- BOOLEAN fgIsFwOwn;
- BOOLEAN fgWiFiInSleepyState;
- OS_SYSTIME rLastOwnFailedLogTime;
- UINT_32 u4OwnFailedCount;
- UINT_32 u4OwnFailedLogCount;
- UINT_32 u4PwrCtrlBlockCnt;
- QUE_T rPendingCmdQueue;
- #if CFG_SUPPORT_MULTITHREAD
- QUE_T rTxCmdQueue;
- QUE_T rTxCmdDoneQueue;
- QUE_T rTxP0Queue;
- QUE_T rTxP1Queue;
- QUE_T rRxQueue;
- #endif
- P_GLUE_INFO_T prGlueInfo;
- UINT_8 ucCmdSeqNum;
- UINT_8 ucTxSeqNum;
- UINT_8 aucPidPool[WTBL_SIZE];
- #if 1 /* CFG_SUPPORT_WAPI */
- BOOLEAN fgUseWapi;
- #endif
- /* RF Test flags */
- BOOLEAN fgTestMode;
- BOOLEAN fgIcapMode;
- /* WLAN Info for DRIVER_CORE OID query */
- WLAN_INFO_T rWlanInfo;
- #if CFG_ENABLE_WIFI_DIRECT
- BOOLEAN fgIsP2PRegistered;
- ENUM_NET_REG_STATE_T rP2PNetRegState;
- /* BOOLEAN fgIsWlanLaunched; */
- P_P2P_INFO_T prP2pInfo;
- #if CFG_SUPPORT_P2P_RSSI_QUERY
- OS_SYSTIME rP2pLinkQualityUpdateTime;
- BOOLEAN fgIsP2pLinkQualityValid;
- EVENT_LINK_QUALITY rP2pLinkQuality;
- #endif
- #endif
- /* Online Scan Option */
- BOOLEAN fgEnOnlineScan;
- /* Online Scan Option */
- BOOLEAN fgDisBcnLostDetection;
- /* MAC address */
- PARAM_MAC_ADDRESS rMyMacAddr;
- /* Wake-up Event for WOL */
- UINT_32 u4WakeupEventEnable;
- /* Event Buffering */
- EVENT_STATISTICS rStatStruct;
- OS_SYSTIME rStatUpdateTime;
- BOOLEAN fgIsStatValid;
- EVENT_LINK_QUALITY rLinkQuality;
- OS_SYSTIME rLinkQualityUpdateTime;
- BOOLEAN fgIsLinkQualityValid;
- OS_SYSTIME rLinkRateUpdateTime;
- BOOLEAN fgIsLinkRateValid;
- /* WIFI_VAR_T */
- WIFI_VAR_T rWifiVar;
- /* MTK WLAN NIC driver IEEE 802.11 MIB */
- IEEE_802_11_MIB_T rMib;
- /* Mailboxs for inter-module communication */
- MBOX_T arMbox[MBOX_ID_TOTAL_NUM];
- /* Timers for OID Pending Handling */
- TIMER_T rOidTimeoutTimer;
- UINT_8 ucOidTimeoutCount;
- /* Root Timer for cnm_timer module */
- ROOT_TIMER rRootTimer;
- BOOLEAN fgIsChipNoAck;
- /* RLM maintenance */
- ENUM_CHNL_EXT_T eRfSco;
- ENUM_SYS_PROTECT_MODE_T eSysProtectMode;
- ENUM_GF_MODE_T eSysHtGfMode;
- ENUM_RIFS_MODE_T eSysTxRifsMode;
- ENUM_SYS_PCO_PHASE_T eSysPcoPhase;
- P_DOMAIN_INFO_ENTRY prDomainInfo;
- /* QM */
- QUE_MGT_T rQM;
- CNM_INFO_T rCnmInfo;
- UINT_32 u4PowerMode;
- UINT_32 u4CtiaPowerMode;
- BOOLEAN fgEnCtiaPowerMode;
- UINT_32 fgEnArpFilter;
- UINT_32 u4UapsdAcBmp;
- UINT_32 u4MaxSpLen;
- UINT_32 u4PsCurrentMeasureEn;
- /* Version Information */
- WIFI_VER_INFO_T rVerInfo;
- /* 5GHz support (from F/W) */
- BOOLEAN fgIsHw5GBandDisabled;
- BOOLEAN fgEnable5GBand;
- BOOLEAN fgIsEepromUsed;
- BOOLEAN fgIsEfuseValid;
- BOOLEAN fgIsEmbbededMacAddrValid;
- #if CFG_SUPPORT_PWR_LIMIT_COUNTRY
- BOOLEAN fgIsPowerLimitTableValid;
- #endif
- /* Packet Forwarding Tracking */
- INT_32 i4PendingFwdFrameCount;
- #if CFG_SUPPORT_RDD_TEST_MODE
- UINT_8 ucRddStatus;
- #endif
- BOOL fgDisStaAgingTimeoutDetection;
- UINT_32 u4FwCompileFlag0;
- UINT_32 u4FwCompileFlag1;
- UINT_32 u4FwFeatureFlag0;
- UINT_32 u4FwFeatureFlag1;
- #if CFG_SUPPORT_CFG_FILE
- P_WLAN_CFG_T prWlanCfg;
- WLAN_CFG_T rWlanCfg;
- #endif
- #if CFG_M0VE_BA_TO_DRIVER
- TIMER_T rMqmIdleRxBaDetectionTimer;
- UINT_32 u4FlagBitmap;
- #endif
- }; /* end of _ADAPTER_T */
- /*******************************************************************************
- * P U B L I C D A T A
- ********************************************************************************
- */
- /*******************************************************************************
- * P R I V A T E D A T A
- ********************************************************************************
- */
- /*******************************************************************************
- * M A C R O S
- ********************************************************************************
- */
- /* Macros for argument _BssIndex */
- #define IS_NET_ACTIVE(_prAdapter, _BssIndex) \
- ((_prAdapter)->aprBssInfo[(_BssIndex)]->fgIsNetActive)
- /* Macros for argument _prBssInfo */
- #define IS_BSS_ACTIVE(_prBssInfo) ((_prBssInfo)->fgIsNetActive)
- #define IS_BSS_AIS(_prBssInfo) \
- ((_prBssInfo)->eNetworkType == NETWORK_TYPE_AIS)
- #define IS_BSS_P2P(_prBssInfo) \
- ((_prBssInfo)->eNetworkType == NETWORK_TYPE_P2P)
- #define IS_BSS_BOW(_prBssInfo) \
- ((_prBssInfo)->eNetworkType == NETWORK_TYPE_BOW)
- #define SET_NET_ACTIVE(_prAdapter, _BssIndex) \
- {(_prAdapter)->aprBssInfo[(_BssIndex)]->fgIsNetActive = TRUE; }
- #define UNSET_NET_ACTIVE(_prAdapter, _BssIndex) \
- {(_prAdapter)->aprBssInfo[(_BssIndex)]->fgIsNetActive = FALSE; }
- #define BSS_INFO_INIT(_prAdapter, _prBssInfo) \
- { UINT_8 _aucZeroMacAddr[] = NULL_MAC_ADDR; \
- \
- (_prBssInfo)->eConnectionState = PARAM_MEDIA_STATE_DISCONNECTED; \
- (_prBssInfo)->eConnectionStateIndicated = PARAM_MEDIA_STATE_DISCONNECTED; \
- (_prBssInfo)->eCurrentOPMode = OP_MODE_INFRASTRUCTURE; \
- (_prBssInfo)->ucReasonOfDisconnect = DISCONNECT_REASON_CODE_RESERVED; \
- COPY_MAC_ADDR((_prBssInfo)->aucBSSID, _aucZeroMacAddr); \
- LINK_INITIALIZE(&((_prBssInfo)->rStaRecOfClientList)); \
- (_prBssInfo)->fgIsBeaconActivated = FALSE; \
- (_prBssInfo)->u2HwDefaultFixedRateCode = RATE_CCK_1M_LONG; \
- }
- /*----------------------------------------------------------------------------*/
- /* Macros for Power State */
- /*----------------------------------------------------------------------------*/
- #define SET_NET_PWR_STATE_IDLE(_prAdapter, _BssIndex) \
- {_prAdapter->rWifiVar.aePwrState[(_BssIndex)] = PWR_STATE_IDLE; }
- #define SET_NET_PWR_STATE_ACTIVE(_prAdapter, _BssIndex) \
- {_prAdapter->rWifiVar.aePwrState[(_BssIndex)] = PWR_STATE_ACTIVE; }
- #define SET_NET_PWR_STATE_PS(_prAdapter, _BssIndex) \
- {_prAdapter->rWifiVar.aePwrState[(_BssIndex)] = PWR_STATE_PS; }
- #define IS_NET_PWR_STATE_ACTIVE(_prAdapter, _BssIndex) \
- (_prAdapter->rWifiVar.aePwrState[(_BssIndex)] == PWR_STATE_ACTIVE)
- #define IS_NET_PWR_STATE_IDLE(_prAdapter, _BssIndex) \
- (_prAdapter->rWifiVar.aePwrState[(_BssIndex)] == PWR_STATE_IDLE)
- #define IS_SCN_PWR_STATE_ACTIVE(_prAdapter) \
- (_prAdapter->rWifiVar.rScanInfo.eScanPwrState == SCAN_PWR_STATE_ACTIVE)
- #define IS_SCN_PWR_STATE_IDLE(_prAdapter) \
- (_prAdapter->rWifiVar.rScanInfo.eScanPwrState == SCAN_PWR_STATE_IDLE)
- /*******************************************************************************
- * F U N C T I O N D E C L A R A T I O N S
- ********************************************************************************
- */
- /*******************************************************************************
- * F U N C T I O N S
- ********************************************************************************
- */
- #endif /* _ADAPTER_H */
|