123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659 |
- /*
- * Copyright (c) 2013 Eugene Krasnikov <k.eugene.e@gmail.com>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
- #ifndef _HAL_H_
- #define _HAL_H_
- /*---------------------------------------------------------------------------
- API VERSIONING INFORMATION
- The RIVA API is versioned as MAJOR.MINOR.VERSION.REVISION
- The MAJOR is incremented for major product/architecture changes
- (and then MINOR/VERSION/REVISION are zeroed)
- The MINOR is incremented for minor product/architecture changes
- (and then VERSION/REVISION are zeroed)
- The VERSION is incremented if a significant API change occurs
- (and then REVISION is zeroed)
- The REVISION is incremented if an insignificant API change occurs
- or if a new API is added
- All values are in the range 0..255 (ie they are 8-bit values)
- ---------------------------------------------------------------------------*/
- #define WCN36XX_HAL_VER_MAJOR 1
- #define WCN36XX_HAL_VER_MINOR 4
- #define WCN36XX_HAL_VER_VERSION 1
- #define WCN36XX_HAL_VER_REVISION 2
- /* This is to force compiler to use the maximum of an int ( 4 bytes ) */
- #define WCN36XX_HAL_MAX_ENUM_SIZE 0x7FFFFFFF
- #define WCN36XX_HAL_MSG_TYPE_MAX_ENUM_SIZE 0x7FFF
- /* Max no. of transmit categories */
- #define STACFG_MAX_TC 8
- /* The maximum value of access category */
- #define WCN36XX_HAL_MAX_AC 4
- #define WCN36XX_HAL_IPV4_ADDR_LEN 4
- #define WALN_HAL_STA_INVALID_IDX 0xFF
- #define WCN36XX_HAL_BSS_INVALID_IDX 0xFF
- /* Default Beacon template size */
- #define BEACON_TEMPLATE_SIZE 0x180
- /* Param Change Bitmap sent to HAL */
- #define PARAM_BCN_INTERVAL_CHANGED (1 << 0)
- #define PARAM_SHORT_PREAMBLE_CHANGED (1 << 1)
- #define PARAM_SHORT_SLOT_TIME_CHANGED (1 << 2)
- #define PARAM_llACOEXIST_CHANGED (1 << 3)
- #define PARAM_llBCOEXIST_CHANGED (1 << 4)
- #define PARAM_llGCOEXIST_CHANGED (1 << 5)
- #define PARAM_HT20MHZCOEXIST_CHANGED (1<<6)
- #define PARAM_NON_GF_DEVICES_PRESENT_CHANGED (1<<7)
- #define PARAM_RIFS_MODE_CHANGED (1<<8)
- #define PARAM_LSIG_TXOP_FULL_SUPPORT_CHANGED (1<<9)
- #define PARAM_OBSS_MODE_CHANGED (1<<10)
- #define PARAM_BEACON_UPDATE_MASK \
- (PARAM_BCN_INTERVAL_CHANGED | \
- PARAM_SHORT_PREAMBLE_CHANGED | \
- PARAM_SHORT_SLOT_TIME_CHANGED | \
- PARAM_llACOEXIST_CHANGED | \
- PARAM_llBCOEXIST_CHANGED | \
- PARAM_llGCOEXIST_CHANGED | \
- PARAM_HT20MHZCOEXIST_CHANGED | \
- PARAM_NON_GF_DEVICES_PRESENT_CHANGED | \
- PARAM_RIFS_MODE_CHANGED | \
- PARAM_LSIG_TXOP_FULL_SUPPORT_CHANGED | \
- PARAM_OBSS_MODE_CHANGED)
- /* dump command response Buffer size */
- #define DUMPCMD_RSP_BUFFER 100
- /* version string max length (including NULL) */
- #define WCN36XX_HAL_VERSION_LENGTH 64
- /* message types for messages exchanged between WDI and HAL */
- enum wcn36xx_hal_host_msg_type {
- /* Init/De-Init */
- WCN36XX_HAL_START_REQ = 0,
- WCN36XX_HAL_START_RSP = 1,
- WCN36XX_HAL_STOP_REQ = 2,
- WCN36XX_HAL_STOP_RSP = 3,
- /* Scan */
- WCN36XX_HAL_INIT_SCAN_REQ = 4,
- WCN36XX_HAL_INIT_SCAN_RSP = 5,
- WCN36XX_HAL_START_SCAN_REQ = 6,
- WCN36XX_HAL_START_SCAN_RSP = 7,
- WCN36XX_HAL_END_SCAN_REQ = 8,
- WCN36XX_HAL_END_SCAN_RSP = 9,
- WCN36XX_HAL_FINISH_SCAN_REQ = 10,
- WCN36XX_HAL_FINISH_SCAN_RSP = 11,
- /* HW STA configuration/deconfiguration */
- WCN36XX_HAL_CONFIG_STA_REQ = 12,
- WCN36XX_HAL_CONFIG_STA_RSP = 13,
- WCN36XX_HAL_DELETE_STA_REQ = 14,
- WCN36XX_HAL_DELETE_STA_RSP = 15,
- WCN36XX_HAL_CONFIG_BSS_REQ = 16,
- WCN36XX_HAL_CONFIG_BSS_RSP = 17,
- WCN36XX_HAL_DELETE_BSS_REQ = 18,
- WCN36XX_HAL_DELETE_BSS_RSP = 19,
- /* Infra STA asscoiation */
- WCN36XX_HAL_JOIN_REQ = 20,
- WCN36XX_HAL_JOIN_RSP = 21,
- WCN36XX_HAL_POST_ASSOC_REQ = 22,
- WCN36XX_HAL_POST_ASSOC_RSP = 23,
- /* Security */
- WCN36XX_HAL_SET_BSSKEY_REQ = 24,
- WCN36XX_HAL_SET_BSSKEY_RSP = 25,
- WCN36XX_HAL_SET_STAKEY_REQ = 26,
- WCN36XX_HAL_SET_STAKEY_RSP = 27,
- WCN36XX_HAL_RMV_BSSKEY_REQ = 28,
- WCN36XX_HAL_RMV_BSSKEY_RSP = 29,
- WCN36XX_HAL_RMV_STAKEY_REQ = 30,
- WCN36XX_HAL_RMV_STAKEY_RSP = 31,
- /* Qos Related */
- WCN36XX_HAL_ADD_TS_REQ = 32,
- WCN36XX_HAL_ADD_TS_RSP = 33,
- WCN36XX_HAL_DEL_TS_REQ = 34,
- WCN36XX_HAL_DEL_TS_RSP = 35,
- WCN36XX_HAL_UPD_EDCA_PARAMS_REQ = 36,
- WCN36XX_HAL_UPD_EDCA_PARAMS_RSP = 37,
- WCN36XX_HAL_ADD_BA_REQ = 38,
- WCN36XX_HAL_ADD_BA_RSP = 39,
- WCN36XX_HAL_DEL_BA_REQ = 40,
- WCN36XX_HAL_DEL_BA_RSP = 41,
- WCN36XX_HAL_CH_SWITCH_REQ = 42,
- WCN36XX_HAL_CH_SWITCH_RSP = 43,
- WCN36XX_HAL_SET_LINK_ST_REQ = 44,
- WCN36XX_HAL_SET_LINK_ST_RSP = 45,
- WCN36XX_HAL_GET_STATS_REQ = 46,
- WCN36XX_HAL_GET_STATS_RSP = 47,
- WCN36XX_HAL_UPDATE_CFG_REQ = 48,
- WCN36XX_HAL_UPDATE_CFG_RSP = 49,
- WCN36XX_HAL_MISSED_BEACON_IND = 50,
- WCN36XX_HAL_UNKNOWN_ADDR2_FRAME_RX_IND = 51,
- WCN36XX_HAL_MIC_FAILURE_IND = 52,
- WCN36XX_HAL_FATAL_ERROR_IND = 53,
- WCN36XX_HAL_SET_KEYDONE_MSG = 54,
- /* NV Interface */
- WCN36XX_HAL_DOWNLOAD_NV_REQ = 55,
- WCN36XX_HAL_DOWNLOAD_NV_RSP = 56,
- WCN36XX_HAL_ADD_BA_SESSION_REQ = 57,
- WCN36XX_HAL_ADD_BA_SESSION_RSP = 58,
- WCN36XX_HAL_TRIGGER_BA_REQ = 59,
- WCN36XX_HAL_TRIGGER_BA_RSP = 60,
- WCN36XX_HAL_UPDATE_BEACON_REQ = 61,
- WCN36XX_HAL_UPDATE_BEACON_RSP = 62,
- WCN36XX_HAL_SEND_BEACON_REQ = 63,
- WCN36XX_HAL_SEND_BEACON_RSP = 64,
- WCN36XX_HAL_SET_BCASTKEY_REQ = 65,
- WCN36XX_HAL_SET_BCASTKEY_RSP = 66,
- WCN36XX_HAL_DELETE_STA_CONTEXT_IND = 67,
- WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ = 68,
- WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_RSP = 69,
- /* PTT interface support */
- WCN36XX_HAL_PROCESS_PTT_REQ = 70,
- WCN36XX_HAL_PROCESS_PTT_RSP = 71,
- /* BTAMP related events */
- WCN36XX_HAL_SIGNAL_BTAMP_EVENT_REQ = 72,
- WCN36XX_HAL_SIGNAL_BTAMP_EVENT_RSP = 73,
- WCN36XX_HAL_TL_HAL_FLUSH_AC_REQ = 74,
- WCN36XX_HAL_TL_HAL_FLUSH_AC_RSP = 75,
- WCN36XX_HAL_ENTER_IMPS_REQ = 76,
- WCN36XX_HAL_EXIT_IMPS_REQ = 77,
- WCN36XX_HAL_ENTER_BMPS_REQ = 78,
- WCN36XX_HAL_EXIT_BMPS_REQ = 79,
- WCN36XX_HAL_ENTER_UAPSD_REQ = 80,
- WCN36XX_HAL_EXIT_UAPSD_REQ = 81,
- WCN36XX_HAL_UPDATE_UAPSD_PARAM_REQ = 82,
- WCN36XX_HAL_CONFIGURE_RXP_FILTER_REQ = 83,
- WCN36XX_HAL_ADD_BCN_FILTER_REQ = 84,
- WCN36XX_HAL_REM_BCN_FILTER_REQ = 85,
- WCN36XX_HAL_ADD_WOWL_BCAST_PTRN = 86,
- WCN36XX_HAL_DEL_WOWL_BCAST_PTRN = 87,
- WCN36XX_HAL_ENTER_WOWL_REQ = 88,
- WCN36XX_HAL_EXIT_WOWL_REQ = 89,
- WCN36XX_HAL_HOST_OFFLOAD_REQ = 90,
- WCN36XX_HAL_SET_RSSI_THRESH_REQ = 91,
- WCN36XX_HAL_GET_RSSI_REQ = 92,
- WCN36XX_HAL_SET_UAPSD_AC_PARAMS_REQ = 93,
- WCN36XX_HAL_CONFIGURE_APPS_CPU_WAKEUP_STATE_REQ = 94,
- WCN36XX_HAL_ENTER_IMPS_RSP = 95,
- WCN36XX_HAL_EXIT_IMPS_RSP = 96,
- WCN36XX_HAL_ENTER_BMPS_RSP = 97,
- WCN36XX_HAL_EXIT_BMPS_RSP = 98,
- WCN36XX_HAL_ENTER_UAPSD_RSP = 99,
- WCN36XX_HAL_EXIT_UAPSD_RSP = 100,
- WCN36XX_HAL_SET_UAPSD_AC_PARAMS_RSP = 101,
- WCN36XX_HAL_UPDATE_UAPSD_PARAM_RSP = 102,
- WCN36XX_HAL_CONFIGURE_RXP_FILTER_RSP = 103,
- WCN36XX_HAL_ADD_BCN_FILTER_RSP = 104,
- WCN36XX_HAL_REM_BCN_FILTER_RSP = 105,
- WCN36XX_HAL_SET_RSSI_THRESH_RSP = 106,
- WCN36XX_HAL_HOST_OFFLOAD_RSP = 107,
- WCN36XX_HAL_ADD_WOWL_BCAST_PTRN_RSP = 108,
- WCN36XX_HAL_DEL_WOWL_BCAST_PTRN_RSP = 109,
- WCN36XX_HAL_ENTER_WOWL_RSP = 110,
- WCN36XX_HAL_EXIT_WOWL_RSP = 111,
- WCN36XX_HAL_RSSI_NOTIFICATION_IND = 112,
- WCN36XX_HAL_GET_RSSI_RSP = 113,
- WCN36XX_HAL_CONFIGURE_APPS_CPU_WAKEUP_STATE_RSP = 114,
- /* 11k related events */
- WCN36XX_HAL_SET_MAX_TX_POWER_REQ = 115,
- WCN36XX_HAL_SET_MAX_TX_POWER_RSP = 116,
- /* 11R related msgs */
- WCN36XX_HAL_AGGR_ADD_TS_REQ = 117,
- WCN36XX_HAL_AGGR_ADD_TS_RSP = 118,
- /* P2P WLAN_FEATURE_P2P */
- WCN36XX_HAL_SET_P2P_GONOA_REQ = 119,
- WCN36XX_HAL_SET_P2P_GONOA_RSP = 120,
- /* WLAN Dump commands */
- WCN36XX_HAL_DUMP_COMMAND_REQ = 121,
- WCN36XX_HAL_DUMP_COMMAND_RSP = 122,
- /* OEM_DATA FEATURE SUPPORT */
- WCN36XX_HAL_START_OEM_DATA_REQ = 123,
- WCN36XX_HAL_START_OEM_DATA_RSP = 124,
- /* ADD SELF STA REQ and RSP */
- WCN36XX_HAL_ADD_STA_SELF_REQ = 125,
- WCN36XX_HAL_ADD_STA_SELF_RSP = 126,
- /* DEL SELF STA SUPPORT */
- WCN36XX_HAL_DEL_STA_SELF_REQ = 127,
- WCN36XX_HAL_DEL_STA_SELF_RSP = 128,
- /* Coex Indication */
- WCN36XX_HAL_COEX_IND = 129,
- /* Tx Complete Indication */
- WCN36XX_HAL_OTA_TX_COMPL_IND = 130,
- /* Host Suspend/resume messages */
- WCN36XX_HAL_HOST_SUSPEND_IND = 131,
- WCN36XX_HAL_HOST_RESUME_REQ = 132,
- WCN36XX_HAL_HOST_RESUME_RSP = 133,
- WCN36XX_HAL_SET_TX_POWER_REQ = 134,
- WCN36XX_HAL_SET_TX_POWER_RSP = 135,
- WCN36XX_HAL_GET_TX_POWER_REQ = 136,
- WCN36XX_HAL_GET_TX_POWER_RSP = 137,
- WCN36XX_HAL_P2P_NOA_ATTR_IND = 138,
- WCN36XX_HAL_ENABLE_RADAR_DETECT_REQ = 139,
- WCN36XX_HAL_ENABLE_RADAR_DETECT_RSP = 140,
- WCN36XX_HAL_GET_TPC_REPORT_REQ = 141,
- WCN36XX_HAL_GET_TPC_REPORT_RSP = 142,
- WCN36XX_HAL_RADAR_DETECT_IND = 143,
- WCN36XX_HAL_RADAR_DETECT_INTR_IND = 144,
- WCN36XX_HAL_KEEP_ALIVE_REQ = 145,
- WCN36XX_HAL_KEEP_ALIVE_RSP = 146,
- /* PNO messages */
- WCN36XX_HAL_SET_PREF_NETWORK_REQ = 147,
- WCN36XX_HAL_SET_PREF_NETWORK_RSP = 148,
- WCN36XX_HAL_SET_RSSI_FILTER_REQ = 149,
- WCN36XX_HAL_SET_RSSI_FILTER_RSP = 150,
- WCN36XX_HAL_UPDATE_SCAN_PARAM_REQ = 151,
- WCN36XX_HAL_UPDATE_SCAN_PARAM_RSP = 152,
- WCN36XX_HAL_PREF_NETW_FOUND_IND = 153,
- WCN36XX_HAL_SET_TX_PER_TRACKING_REQ = 154,
- WCN36XX_HAL_SET_TX_PER_TRACKING_RSP = 155,
- WCN36XX_HAL_TX_PER_HIT_IND = 156,
- WCN36XX_HAL_8023_MULTICAST_LIST_REQ = 157,
- WCN36XX_HAL_8023_MULTICAST_LIST_RSP = 158,
- WCN36XX_HAL_SET_PACKET_FILTER_REQ = 159,
- WCN36XX_HAL_SET_PACKET_FILTER_RSP = 160,
- WCN36XX_HAL_PACKET_FILTER_MATCH_COUNT_REQ = 161,
- WCN36XX_HAL_PACKET_FILTER_MATCH_COUNT_RSP = 162,
- WCN36XX_HAL_CLEAR_PACKET_FILTER_REQ = 163,
- WCN36XX_HAL_CLEAR_PACKET_FILTER_RSP = 164,
- /*
- * This is temp fix. Should be removed once Host and Riva code is
- * in sync.
- */
- WCN36XX_HAL_INIT_SCAN_CON_REQ = 165,
- WCN36XX_HAL_SET_POWER_PARAMS_REQ = 166,
- WCN36XX_HAL_SET_POWER_PARAMS_RSP = 167,
- WCN36XX_HAL_TSM_STATS_REQ = 168,
- WCN36XX_HAL_TSM_STATS_RSP = 169,
- /* wake reason indication (WOW) */
- WCN36XX_HAL_WAKE_REASON_IND = 170,
- /* GTK offload support */
- WCN36XX_HAL_GTK_OFFLOAD_REQ = 171,
- WCN36XX_HAL_GTK_OFFLOAD_RSP = 172,
- WCN36XX_HAL_GTK_OFFLOAD_GETINFO_REQ = 173,
- WCN36XX_HAL_GTK_OFFLOAD_GETINFO_RSP = 174,
- WCN36XX_HAL_FEATURE_CAPS_EXCHANGE_REQ = 175,
- WCN36XX_HAL_FEATURE_CAPS_EXCHANGE_RSP = 176,
- WCN36XX_HAL_EXCLUDE_UNENCRYPTED_IND = 177,
- WCN36XX_HAL_SET_THERMAL_MITIGATION_REQ = 178,
- WCN36XX_HAL_SET_THERMAL_MITIGATION_RSP = 179,
- WCN36XX_HAL_UPDATE_VHT_OP_MODE_REQ = 182,
- WCN36XX_HAL_UPDATE_VHT_OP_MODE_RSP = 183,
- WCN36XX_HAL_P2P_NOA_START_IND = 184,
- WCN36XX_HAL_GET_ROAM_RSSI_REQ = 185,
- WCN36XX_HAL_GET_ROAM_RSSI_RSP = 186,
- WCN36XX_HAL_CLASS_B_STATS_IND = 187,
- WCN36XX_HAL_DEL_BA_IND = 188,
- WCN36XX_HAL_DHCP_START_IND = 189,
- WCN36XX_HAL_DHCP_STOP_IND = 190,
- WCN36XX_HAL_MSG_MAX = WCN36XX_HAL_MSG_TYPE_MAX_ENUM_SIZE
- };
- /* Enumeration for Version */
- enum wcn36xx_hal_host_msg_version {
- WCN36XX_HAL_MSG_VERSION0 = 0,
- WCN36XX_HAL_MSG_VERSION1 = 1,
- /* define as 2 bytes data */
- WCN36XX_HAL_MSG_WCNSS_CTRL_VERSION = 0x7FFF,
- WCN36XX_HAL_MSG_VERSION_MAX_FIELD = WCN36XX_HAL_MSG_WCNSS_CTRL_VERSION
- };
- enum driver_type {
- DRIVER_TYPE_PRODUCTION = 0,
- DRIVER_TYPE_MFG = 1,
- DRIVER_TYPE_DVT = 2,
- DRIVER_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- enum wcn36xx_hal_stop_type {
- HAL_STOP_TYPE_SYS_RESET,
- HAL_STOP_TYPE_SYS_DEEP_SLEEP,
- HAL_STOP_TYPE_RF_KILL,
- HAL_STOP_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- enum wcn36xx_hal_sys_mode {
- HAL_SYS_MODE_NORMAL,
- HAL_SYS_MODE_LEARN,
- HAL_SYS_MODE_SCAN,
- HAL_SYS_MODE_PROMISC,
- HAL_SYS_MODE_SUSPEND_LINK,
- HAL_SYS_MODE_ROAM_SCAN,
- HAL_SYS_MODE_ROAM_SUSPEND_LINK,
- HAL_SYS_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- enum phy_chan_bond_state {
- /* 20MHz IF bandwidth centered on IF carrier */
- PHY_SINGLE_CHANNEL_CENTERED = 0,
- /* 40MHz IF bandwidth with lower 20MHz supporting the primary channel */
- PHY_DOUBLE_CHANNEL_LOW_PRIMARY = 1,
- /* 40MHz IF bandwidth centered on IF carrier */
- PHY_DOUBLE_CHANNEL_CENTERED = 2,
- /* 40MHz IF bandwidth with higher 20MHz supporting the primary ch */
- PHY_DOUBLE_CHANNEL_HIGH_PRIMARY = 3,
- /* 20/40MHZ offset LOW 40/80MHZ offset CENTERED */
- PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED = 4,
- /* 20/40MHZ offset CENTERED 40/80MHZ offset CENTERED */
- PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED = 5,
- /* 20/40MHZ offset HIGH 40/80MHZ offset CENTERED */
- PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED = 6,
- /* 20/40MHZ offset LOW 40/80MHZ offset LOW */
- PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW = 7,
- /* 20/40MHZ offset HIGH 40/80MHZ offset LOW */
- PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW = 8,
- /* 20/40MHZ offset LOW 40/80MHZ offset HIGH */
- PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH = 9,
- /* 20/40MHZ offset-HIGH 40/80MHZ offset HIGH */
- PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH = 10,
- PHY_CHANNEL_BONDING_STATE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- /* Spatial Multiplexing(SM) Power Save mode */
- enum wcn36xx_hal_ht_mimo_state {
- /* Static SM Power Save mode */
- WCN36XX_HAL_HT_MIMO_PS_STATIC = 0,
- /* Dynamic SM Power Save mode */
- WCN36XX_HAL_HT_MIMO_PS_DYNAMIC = 1,
- /* reserved */
- WCN36XX_HAL_HT_MIMO_PS_NA = 2,
- /* SM Power Save disabled */
- WCN36XX_HAL_HT_MIMO_PS_NO_LIMIT = 3,
- WCN36XX_HAL_HT_MIMO_PS_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- /* each station added has a rate mode which specifies the sta attributes */
- enum sta_rate_mode {
- STA_TAURUS = 0,
- STA_TITAN,
- STA_POLARIS,
- STA_11b,
- STA_11bg,
- STA_11a,
- STA_11n,
- STA_11ac,
- STA_INVALID_RATE_MODE = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- /* 1,2,5.5,11 */
- #define WCN36XX_HAL_NUM_DSSS_RATES 4
- /* 6,9,12,18,24,36,48,54 */
- #define WCN36XX_HAL_NUM_OFDM_RATES 8
- /* 72,96,108 */
- #define WCN36XX_HAL_NUM_POLARIS_RATES 3
- #define WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET 16
- enum wcn36xx_hal_bss_type {
- WCN36XX_HAL_INFRASTRUCTURE_MODE,
- /* Added for softAP support */
- WCN36XX_HAL_INFRA_AP_MODE,
- WCN36XX_HAL_IBSS_MODE,
- /* Added for BT-AMP support */
- WCN36XX_HAL_BTAMP_STA_MODE,
- /* Added for BT-AMP support */
- WCN36XX_HAL_BTAMP_AP_MODE,
- WCN36XX_HAL_AUTO_MODE,
- WCN36XX_HAL_DONOT_USE_BSS_TYPE = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- enum wcn36xx_hal_nw_type {
- WCN36XX_HAL_11A_NW_TYPE,
- WCN36XX_HAL_11B_NW_TYPE,
- WCN36XX_HAL_11G_NW_TYPE,
- WCN36XX_HAL_11N_NW_TYPE,
- WCN36XX_HAL_DONOT_USE_NW_TYPE = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- #define WCN36XX_HAL_MAC_RATESET_EID_MAX 12
- enum wcn36xx_hal_ht_operating_mode {
- /* No Protection */
- WCN36XX_HAL_HT_OP_MODE_PURE,
- /* Overlap Legacy device present, protection is optional */
- WCN36XX_HAL_HT_OP_MODE_OVERLAP_LEGACY,
- /* No legacy device, but 20 MHz HT present */
- WCN36XX_HAL_HT_OP_MODE_NO_LEGACY_20MHZ_HT,
- /* Protection is required */
- WCN36XX_HAL_HT_OP_MODE_MIXED,
- WCN36XX_HAL_HT_OP_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- /* Encryption type enum used with peer */
- enum ani_ed_type {
- WCN36XX_HAL_ED_NONE,
- WCN36XX_HAL_ED_WEP40,
- WCN36XX_HAL_ED_WEP104,
- WCN36XX_HAL_ED_TKIP,
- WCN36XX_HAL_ED_CCMP,
- WCN36XX_HAL_ED_WPI,
- WCN36XX_HAL_ED_AES_128_CMAC,
- WCN36XX_HAL_ED_NOT_IMPLEMENTED = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- #define WLAN_MAX_KEY_RSC_LEN 16
- #define WLAN_WAPI_KEY_RSC_LEN 16
- /* MAX key length when ULA is used */
- #define WCN36XX_HAL_MAC_MAX_KEY_LENGTH 32
- #define WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS 4
- /*
- * Enum to specify whether key is used for TX only, RX only or both.
- */
- enum ani_key_direction {
- WCN36XX_HAL_TX_ONLY,
- WCN36XX_HAL_RX_ONLY,
- WCN36XX_HAL_TX_RX,
- WCN36XX_HAL_TX_DEFAULT,
- WCN36XX_HAL_DONOT_USE_KEY_DIRECTION = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- enum ani_wep_type {
- WCN36XX_HAL_WEP_STATIC,
- WCN36XX_HAL_WEP_DYNAMIC,
- WCN36XX_HAL_WEP_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- enum wcn36xx_hal_link_state {
- WCN36XX_HAL_LINK_IDLE_STATE = 0,
- WCN36XX_HAL_LINK_PREASSOC_STATE = 1,
- WCN36XX_HAL_LINK_POSTASSOC_STATE = 2,
- WCN36XX_HAL_LINK_AP_STATE = 3,
- WCN36XX_HAL_LINK_IBSS_STATE = 4,
- /* BT-AMP Case */
- WCN36XX_HAL_LINK_BTAMP_PREASSOC_STATE = 5,
- WCN36XX_HAL_LINK_BTAMP_POSTASSOC_STATE = 6,
- WCN36XX_HAL_LINK_BTAMP_AP_STATE = 7,
- WCN36XX_HAL_LINK_BTAMP_STA_STATE = 8,
- /* Reserved for HAL Internal Use */
- WCN36XX_HAL_LINK_LEARN_STATE = 9,
- WCN36XX_HAL_LINK_SCAN_STATE = 10,
- WCN36XX_HAL_LINK_FINISH_SCAN_STATE = 11,
- WCN36XX_HAL_LINK_INIT_CAL_STATE = 12,
- WCN36XX_HAL_LINK_FINISH_CAL_STATE = 13,
- WCN36XX_HAL_LINK_LISTEN_STATE = 14,
- WCN36XX_HAL_LINK_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- enum wcn36xx_hal_stats_mask {
- HAL_SUMMARY_STATS_INFO = 0x00000001,
- HAL_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
- HAL_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
- HAL_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
- HAL_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
- HAL_PER_STA_STATS_INFO = 0x00000020
- };
- /* BT-AMP events type */
- enum bt_amp_event_type {
- BTAMP_EVENT_CONNECTION_START,
- BTAMP_EVENT_CONNECTION_STOP,
- BTAMP_EVENT_CONNECTION_TERMINATED,
- /* This and beyond are invalid values */
- BTAMP_EVENT_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
- };
- /* PE Statistics */
- enum pe_stats_mask {
- PE_SUMMARY_STATS_INFO = 0x00000001,
- PE_GLOBAL_CLASS_A_STATS_INFO = 0x00000002,
- PE_GLOBAL_CLASS_B_STATS_INFO = 0x00000004,
- PE_GLOBAL_CLASS_C_STATS_INFO = 0x00000008,
- PE_GLOBAL_CLASS_D_STATS_INFO = 0x00000010,
- PE_PER_STA_STATS_INFO = 0x00000020,
- /* This and beyond are invalid values */
- PE_STATS_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- /*
- * Configuration Parameter IDs
- */
- #define WCN36XX_HAL_CFG_STA_ID 0
- #define WCN36XX_HAL_CFG_CURRENT_TX_ANTENNA 1
- #define WCN36XX_HAL_CFG_CURRENT_RX_ANTENNA 2
- #define WCN36XX_HAL_CFG_LOW_GAIN_OVERRIDE 3
- #define WCN36XX_HAL_CFG_POWER_STATE_PER_CHAIN 4
- #define WCN36XX_HAL_CFG_CAL_PERIOD 5
- #define WCN36XX_HAL_CFG_CAL_CONTROL 6
- #define WCN36XX_HAL_CFG_PROXIMITY 7
- #define WCN36XX_HAL_CFG_NETWORK_DENSITY 8
- #define WCN36XX_HAL_CFG_MAX_MEDIUM_TIME 9
- #define WCN36XX_HAL_CFG_MAX_MPDUS_IN_AMPDU 10
- #define WCN36XX_HAL_CFG_RTS_THRESHOLD 11
- #define WCN36XX_HAL_CFG_SHORT_RETRY_LIMIT 12
- #define WCN36XX_HAL_CFG_LONG_RETRY_LIMIT 13
- #define WCN36XX_HAL_CFG_FRAGMENTATION_THRESHOLD 14
- #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_ZERO 15
- #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_ONE 16
- #define WCN36XX_HAL_CFG_DYNAMIC_THRESHOLD_TWO 17
- #define WCN36XX_HAL_CFG_FIXED_RATE 18
- #define WCN36XX_HAL_CFG_RETRYRATE_POLICY 19
- #define WCN36XX_HAL_CFG_RETRYRATE_SECONDARY 20
- #define WCN36XX_HAL_CFG_RETRYRATE_TERTIARY 21
- #define WCN36XX_HAL_CFG_FORCE_POLICY_PROTECTION 22
- #define WCN36XX_HAL_CFG_FIXED_RATE_MULTICAST_24GHZ 23
- #define WCN36XX_HAL_CFG_FIXED_RATE_MULTICAST_5GHZ 24
- #define WCN36XX_HAL_CFG_DEFAULT_RATE_INDEX_24GHZ 25
- #define WCN36XX_HAL_CFG_DEFAULT_RATE_INDEX_5GHZ 26
- #define WCN36XX_HAL_CFG_MAX_BA_SESSIONS 27
- #define WCN36XX_HAL_CFG_PS_DATA_INACTIVITY_TIMEOUT 28
- #define WCN36XX_HAL_CFG_PS_ENABLE_BCN_FILTER 29
- #define WCN36XX_HAL_CFG_PS_ENABLE_RSSI_MONITOR 30
- #define WCN36XX_HAL_CFG_NUM_BEACON_PER_RSSI_AVERAGE 31
- #define WCN36XX_HAL_CFG_STATS_PERIOD 32
- #define WCN36XX_HAL_CFG_CFP_MAX_DURATION 33
- #define WCN36XX_HAL_CFG_FRAME_TRANS_ENABLED 34
- #define WCN36XX_HAL_CFG_DTIM_PERIOD 35
- #define WCN36XX_HAL_CFG_EDCA_WMM_ACBK 36
- #define WCN36XX_HAL_CFG_EDCA_WMM_ACBE 37
- #define WCN36XX_HAL_CFG_EDCA_WMM_ACVO 38
- #define WCN36XX_HAL_CFG_EDCA_WMM_ACVI 39
- #define WCN36XX_HAL_CFG_BA_THRESHOLD_HIGH 40
- #define WCN36XX_HAL_CFG_MAX_BA_BUFFERS 41
- #define WCN36XX_HAL_CFG_RPE_POLLING_THRESHOLD 42
- #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG 43
- #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG 44
- #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG 45
- #define WCN36XX_HAL_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG 46
- #define WCN36XX_HAL_CFG_NO_OF_ONCHIP_REORDER_SESSIONS 47
- #define WCN36XX_HAL_CFG_PS_LISTEN_INTERVAL 48
- #define WCN36XX_HAL_CFG_PS_HEART_BEAT_THRESHOLD 49
- #define WCN36XX_HAL_CFG_PS_NTH_BEACON_FILTER 50
- #define WCN36XX_HAL_CFG_PS_MAX_PS_POLL 51
- #define WCN36XX_HAL_CFG_PS_MIN_RSSI_THRESHOLD 52
- #define WCN36XX_HAL_CFG_PS_RSSI_FILTER_PERIOD 53
- #define WCN36XX_HAL_CFG_PS_BROADCAST_FRAME_FILTER_ENABLE 54
- #define WCN36XX_HAL_CFG_PS_IGNORE_DTIM 55
- #define WCN36XX_HAL_CFG_PS_ENABLE_BCN_EARLY_TERM 56
- #define WCN36XX_HAL_CFG_DYNAMIC_PS_POLL_VALUE 57
- #define WCN36XX_HAL_CFG_PS_NULLDATA_AP_RESP_TIMEOUT 58
- #define WCN36XX_HAL_CFG_TELE_BCN_WAKEUP_EN 59
- #define WCN36XX_HAL_CFG_TELE_BCN_TRANS_LI 60
- #define WCN36XX_HAL_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS 61
- #define WCN36XX_HAL_CFG_TELE_BCN_MAX_LI 62
- #define WCN36XX_HAL_CFG_TELE_BCN_MAX_LI_IDLE_BCNS 63
- #define WCN36XX_HAL_CFG_TX_PWR_CTRL_ENABLE 64
- #define WCN36XX_HAL_CFG_VALID_RADAR_CHANNEL_LIST 65
- #define WCN36XX_HAL_CFG_TX_POWER_24_20 66
- #define WCN36XX_HAL_CFG_TX_POWER_24_40 67
- #define WCN36XX_HAL_CFG_TX_POWER_50_20 68
- #define WCN36XX_HAL_CFG_TX_POWER_50_40 69
- #define WCN36XX_HAL_CFG_MCAST_BCAST_FILTER_SETTING 70
- #define WCN36XX_HAL_CFG_BCN_EARLY_TERM_WAKEUP_INTERVAL 71
- #define WCN36XX_HAL_CFG_MAX_TX_POWER_2_4 72
- #define WCN36XX_HAL_CFG_MAX_TX_POWER_5 73
- #define WCN36XX_HAL_CFG_INFRA_STA_KEEP_ALIVE_PERIOD 74
- #define WCN36XX_HAL_CFG_ENABLE_CLOSE_LOOP 75
- #define WCN36XX_HAL_CFG_BTC_EXECUTION_MODE 76
- #define WCN36XX_HAL_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK 77
- #define WCN36XX_HAL_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS 78
- #define WCN36XX_HAL_CFG_PS_TX_INACTIVITY_TIMEOUT 79
- #define WCN36XX_HAL_CFG_WCNSS_API_VERSION 80
- #define WCN36XX_HAL_CFG_AP_KEEPALIVE_TIMEOUT 81
- #define WCN36XX_HAL_CFG_GO_KEEPALIVE_TIMEOUT 82
- #define WCN36XX_HAL_CFG_ENABLE_MC_ADDR_LIST 83
- #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_INQ_BT 84
- #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_PAGE_BT 85
- #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_CONN_BT 86
- #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_LE_BT 87
- #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_INQ_WLAN 88
- #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_PAGE_WLAN 89
- #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_CONN_WLAN 90
- #define WCN36XX_HAL_CFG_BTC_STATIC_LEN_LE_WLAN 91
- #define WCN36XX_HAL_CFG_BTC_DYN_MAX_LEN_BT 92
- #define WCN36XX_HAL_CFG_BTC_DYN_MAX_LEN_WLAN 93
- #define WCN36XX_HAL_CFG_BTC_MAX_SCO_BLOCK_PERC 94
- #define WCN36XX_HAL_CFG_BTC_DHCP_PROT_ON_A2DP 95
- #define WCN36XX_HAL_CFG_BTC_DHCP_PROT_ON_SCO 96
- #define WCN36XX_HAL_CFG_ENABLE_UNICAST_FILTER 97
- #define WCN36XX_HAL_CFG_MAX_ASSOC_LIMIT 98
- #define WCN36XX_HAL_CFG_ENABLE_LPWR_IMG_TRANSITION 99
- #define WCN36XX_HAL_CFG_ENABLE_MCC_ADAPTIVE_SCHEDULER 100
- #define WCN36XX_HAL_CFG_ENABLE_DETECT_PS_SUPPORT 101
- #define WCN36XX_HAL_CFG_AP_LINK_MONITOR_TIMEOUT 102
- #define WCN36XX_HAL_CFG_BTC_DWELL_TIME_MULTIPLIER 103
- #define WCN36XX_HAL_CFG_ENABLE_TDLS_OXYGEN_MODE 104
- #define WCN36XX_HAL_CFG_MAX_PARAMS 105
- /* Message definitons - All the messages below need to be packed */
- /* Definition for HAL API Version. */
- struct wcnss_wlan_version {
- u8 revision;
- u8 version;
- u8 minor;
- u8 major;
- } __packed;
- /* Definition for Encryption Keys */
- struct wcn36xx_hal_keys {
- u8 id;
- /* 0 for multicast */
- u8 unicast;
- enum ani_key_direction direction;
- /* Usage is unknown */
- u8 rsc[WLAN_MAX_KEY_RSC_LEN];
- /* =1 for authenticator,=0 for supplicant */
- u8 pae_role;
- u16 length;
- u8 key[WCN36XX_HAL_MAC_MAX_KEY_LENGTH];
- } __packed;
- /*
- * set_sta_key_params Moving here since it is shared by
- * configbss/setstakey msgs
- */
- struct wcn36xx_hal_set_sta_key_params {
- /* STA Index */
- u16 sta_index;
- /* Encryption Type used with peer */
- enum ani_ed_type enc_type;
- /* STATIC/DYNAMIC - valid only for WEP */
- enum ani_wep_type wep_type;
- /* Default WEP key, valid only for static WEP, must between 0 and 3. */
- u8 def_wep_idx;
- /* valid only for non-static WEP encyrptions */
- struct wcn36xx_hal_keys key[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS];
- /*
- * Control for Replay Count, 1= Single TID based replay count on Tx
- * 0 = Per TID based replay count on TX
- */
- u8 single_tid_rc;
- } __packed;
- /* 4-byte control message header used by HAL*/
- struct wcn36xx_hal_msg_header {
- enum wcn36xx_hal_host_msg_type msg_type:16;
- enum wcn36xx_hal_host_msg_version msg_version:16;
- u32 len;
- } __packed;
- /* Config format required by HAL for each CFG item*/
- struct wcn36xx_hal_cfg {
- /* Cfg Id. The Id required by HAL is exported by HAL
- * in shared header file between UMAC and HAL.*/
- u16 id;
- /* Length of the Cfg. This parameter is used to go to next cfg
- * in the TLV format.*/
- u16 len;
- /* Padding bytes for unaligned address's */
- u16 pad_bytes;
- /* Reserve bytes for making cfgVal to align address */
- u16 reserve;
- /* Following the uCfgLen field there should be a 'uCfgLen' bytes
- * containing the uCfgValue ; u8 uCfgValue[uCfgLen] */
- } __packed;
- struct wcn36xx_hal_mac_start_parameters {
- /* Drive Type - Production or FTM etc */
- enum driver_type type;
- /* Length of the config buffer */
- u32 len;
- /* Following this there is a TLV formatted buffer of length
- * "len" bytes containing all config values.
- * The TLV is expected to be formatted like this:
- * 0 15 31 31+CFG_LEN-1 length-1
- * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......|
- */
- } __packed;
- struct wcn36xx_hal_mac_start_req_msg {
- /* config buffer must start in TLV format just here */
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_mac_start_parameters params;
- } __packed;
- struct wcn36xx_hal_mac_start_rsp_params {
- /* success or failure */
- u16 status;
- /* Max number of STA supported by the device */
- u8 stations;
- /* Max number of BSS supported by the device */
- u8 bssids;
- /* API Version */
- struct wcnss_wlan_version version;
- /* CRM build information */
- u8 crm_version[WCN36XX_HAL_VERSION_LENGTH];
- /* hardware/chipset/misc version information */
- u8 wlan_version[WCN36XX_HAL_VERSION_LENGTH];
- } __packed;
- struct wcn36xx_hal_mac_start_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_mac_start_rsp_params start_rsp_params;
- } __packed;
- struct wcn36xx_hal_mac_stop_req_params {
- /* The reason for which the device is being stopped */
- enum wcn36xx_hal_stop_type reason;
- } __packed;
- struct wcn36xx_hal_mac_stop_req_msg {
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_mac_stop_req_params stop_req_params;
- } __packed;
- struct wcn36xx_hal_mac_stop_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- } __packed;
- struct wcn36xx_hal_update_cfg_req_msg {
- /*
- * Note: The length specified in tHalUpdateCfgReqMsg messages should be
- * header.msgLen = sizeof(tHalUpdateCfgReqMsg) + uConfigBufferLen
- */
- struct wcn36xx_hal_msg_header header;
- /* Length of the config buffer. Allows UMAC to update multiple CFGs */
- u32 len;
- /*
- * Following this there is a TLV formatted buffer of length
- * "uConfigBufferLen" bytes containing all config values.
- * The TLV is expected to be formatted like this:
- * 0 15 31 31+CFG_LEN-1 length-1
- * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......|
- */
- } __packed;
- struct wcn36xx_hal_update_cfg_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- } __packed;
- /* Frame control field format (2 bytes) */
- struct wcn36xx_hal_mac_frame_ctl {
- #ifndef ANI_LITTLE_BIT_ENDIAN
- u8 subType:4;
- u8 type:2;
- u8 protVer:2;
- u8 order:1;
- u8 wep:1;
- u8 moreData:1;
- u8 powerMgmt:1;
- u8 retry:1;
- u8 moreFrag:1;
- u8 fromDS:1;
- u8 toDS:1;
- #else
- u8 protVer:2;
- u8 type:2;
- u8 subType:4;
- u8 toDS:1;
- u8 fromDS:1;
- u8 moreFrag:1;
- u8 retry:1;
- u8 powerMgmt:1;
- u8 moreData:1;
- u8 wep:1;
- u8 order:1;
- #endif
- };
- /* Sequence control field */
- struct wcn36xx_hal_mac_seq_ctl {
- u8 fragNum:4;
- u8 seqNumLo:4;
- u8 seqNumHi:8;
- };
- /* Management header format */
- struct wcn36xx_hal_mac_mgmt_hdr {
- struct wcn36xx_hal_mac_frame_ctl fc;
- u8 durationLo;
- u8 durationHi;
- u8 da[6];
- u8 sa[6];
- u8 bssId[6];
- struct wcn36xx_hal_mac_seq_ctl seqControl;
- };
- /* FIXME: pronto v1 apparently has 4 */
- #define WCN36XX_HAL_NUM_BSSID 2
- /* Scan Entry to hold active BSS idx's */
- struct wcn36xx_hal_scan_entry {
- u8 bss_index[WCN36XX_HAL_NUM_BSSID];
- u8 active_bss_count;
- };
- struct wcn36xx_hal_init_scan_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* LEARN - AP Role
- SCAN - STA Role */
- enum wcn36xx_hal_sys_mode mode;
- /* BSSID of the BSS */
- u8 bssid[ETH_ALEN];
- /* Whether BSS needs to be notified */
- u8 notify;
- /* Kind of frame to be used for notifying the BSS (Data Null, QoS
- * Null, or CTS to Self). Must always be a valid frame type. */
- u8 frame_type;
- /* UMAC has the option of passing the MAC frame to be used for
- * notifying the BSS. If non-zero, HAL will use the MAC frame
- * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
- * appropriate MAC frame based on frameType. */
- u8 frame_len;
- /* Following the framelength there is a MAC frame buffer if
- * frameLength is non-zero. */
- struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
- /* Entry to hold number of active BSS idx's */
- struct wcn36xx_hal_scan_entry scan_entry;
- };
- struct wcn36xx_hal_init_scan_con_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* LEARN - AP Role
- SCAN - STA Role */
- enum wcn36xx_hal_sys_mode mode;
- /* BSSID of the BSS */
- u8 bssid[ETH_ALEN];
- /* Whether BSS needs to be notified */
- u8 notify;
- /* Kind of frame to be used for notifying the BSS (Data Null, QoS
- * Null, or CTS to Self). Must always be a valid frame type. */
- u8 frame_type;
- /* UMAC has the option of passing the MAC frame to be used for
- * notifying the BSS. If non-zero, HAL will use the MAC frame
- * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
- * appropriate MAC frame based on frameType. */
- u8 frame_length;
- /* Following the framelength there is a MAC frame buffer if
- * frameLength is non-zero. */
- struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
- /* Entry to hold number of active BSS idx's */
- struct wcn36xx_hal_scan_entry scan_entry;
- /* Single NoA usage in Scanning */
- u8 use_noa;
- /* Indicates the scan duration (in ms) */
- u16 scan_duration;
- };
- struct wcn36xx_hal_init_scan_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- } __packed;
- struct wcn36xx_hal_start_scan_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Indicates the channel to scan */
- u8 scan_channel;
- } __packed;
- struct wcn36xx_hal_start_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- u32 start_tsf[2];
- u8 tx_mgmt_power;
- } __packed;
- struct wcn36xx_hal_end_scan_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Indicates the channel to stop scanning. Not used really. But
- * retained for symmetry with "start Scan" message. It can also
- * help in error check if needed. */
- u8 scan_channel;
- } __packed;
- struct wcn36xx_hal_end_scan_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- } __packed;
- struct wcn36xx_hal_finish_scan_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Identifies the operational state of the AP/STA
- * LEARN - AP Role SCAN - STA Role */
- enum wcn36xx_hal_sys_mode mode;
- /* Operating channel to tune to. */
- u8 oper_channel;
- /* Channel Bonding state If 20/40 MHz is operational, this will
- * indicate the 40 MHz extension channel in combination with the
- * control channel */
- enum phy_chan_bond_state cb_state;
- /* BSSID of the BSS */
- u8 bssid[ETH_ALEN];
- /* Whether BSS needs to be notified */
- u8 notify;
- /* Kind of frame to be used for notifying the BSS (Data Null, QoS
- * Null, or CTS to Self). Must always be a valid frame type. */
- u8 frame_type;
- /* UMAC has the option of passing the MAC frame to be used for
- * notifying the BSS. If non-zero, HAL will use the MAC frame
- * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
- * appropriate MAC frame based on frameType. */
- u8 frame_length;
- /* Following the framelength there is a MAC frame buffer if
- * frameLength is non-zero. */
- struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
- /* Entry to hold number of active BSS idx's */
- struct wcn36xx_hal_scan_entry scan_entry;
- } __packed;
- struct wcn36xx_hal_finish_scan_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- } __packed;
- enum wcn36xx_hal_rate_index {
- HW_RATE_INDEX_1MBPS = 0x82,
- HW_RATE_INDEX_2MBPS = 0x84,
- HW_RATE_INDEX_5_5MBPS = 0x8B,
- HW_RATE_INDEX_6MBPS = 0x0C,
- HW_RATE_INDEX_9MBPS = 0x12,
- HW_RATE_INDEX_11MBPS = 0x96,
- HW_RATE_INDEX_12MBPS = 0x18,
- HW_RATE_INDEX_18MBPS = 0x24,
- HW_RATE_INDEX_24MBPS = 0x30,
- HW_RATE_INDEX_36MBPS = 0x48,
- HW_RATE_INDEX_48MBPS = 0x60,
- HW_RATE_INDEX_54MBPS = 0x6C
- };
- struct wcn36xx_hal_supported_rates {
- /*
- * For Self STA Entry: this represents Self Mode.
- * For Peer Stations, this represents the mode of the peer.
- * On Station:
- *
- * --this mode is updated when PE adds the Self Entry.
- *
- * -- OR when PE sends 'ADD_BSS' message and station context in BSS
- * is used to indicate the mode of the AP.
- *
- * ON AP:
- *
- * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry
- * for that BSS is used to indicate the self mode of the AP.
- *
- * -- OR when a station is associated, PE sends 'ADD_STA' message
- * with this mode updated.
- */
- enum sta_rate_mode op_rate_mode;
- /* 11b, 11a and aniLegacyRates are IE rates which gives rate in
- * unit of 500Kbps */
- u16 dsss_rates[WCN36XX_HAL_NUM_DSSS_RATES];
- u16 ofdm_rates[WCN36XX_HAL_NUM_OFDM_RATES];
- u16 legacy_rates[WCN36XX_HAL_NUM_POLARIS_RATES];
- u16 reserved;
- /* Taurus only supports 26 Titan Rates(no ESF/concat Rates will be
- * supported) First 26 bits are reserved for those Titan rates and
- * the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are
- * reserved. */
- /* Titan and Taurus Rates */
- u32 enhanced_rate_bitmap;
- /*
- * 0-76 bits used, remaining reserved
- * bits 0-15 and 32 should be set.
- */
- u8 supported_mcs_set[WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET];
- /*
- * RX Highest Supported Data Rate defines the highest data
- * rate that the STA is able to receive, in unites of 1Mbps.
- * This value is derived from "Supported MCS Set field" inside
- * the HT capability element.
- */
- u16 rx_highest_data_rate;
- } __packed;
- struct wcn36xx_hal_config_sta_params {
- /* BSSID of STA */
- u8 bssid[ETH_ALEN];
- /* ASSOC ID, as assigned by UMAC */
- u16 aid;
- /* STA entry Type: 0 - Self, 1 - Other/Peer, 2 - BSSID, 3 - BCAST */
- u8 type;
- /* Short Preamble Supported. */
- u8 short_preamble_supported;
- /* MAC Address of STA */
- u8 mac[ETH_ALEN];
- /* Listen interval of the STA */
- u16 listen_interval;
- /* Support for 11e/WMM */
- u8 wmm_enabled;
- /* 11n HT capable STA */
- u8 ht_capable;
- /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
- u8 tx_channel_width_set;
- /* RIFS mode 0 - NA, 1 - Allowed */
- u8 rifs_mode;
- /* L-SIG TXOP Protection mechanism
- 0 - No Support, 1 - Supported
- SG - there is global field */
- u8 lsig_txop_protection;
- /* Max Ampdu Size supported by STA. TPE programming.
- 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k */
- u8 max_ampdu_size;
- /* Max Ampdu density. Used by RA. 3 : 0~7 : 2^(11nAMPDUdensity -4) */
- u8 max_ampdu_density;
- /* Max AMSDU size 1 : 3839 bytes, 0 : 7935 bytes */
- u8 max_amsdu_size;
- /* Short GI support for 40Mhz packets */
- u8 sgi_40mhz;
- /* Short GI support for 20Mhz packets */
- u8 sgi_20Mhz;
- /* TODO move this parameter to the end for 3680 */
- /* These rates are the intersection of peer and self capabilities. */
- struct wcn36xx_hal_supported_rates supported_rates;
- /* Robust Management Frame (RMF) enabled/disabled */
- u8 rmf;
- /* The unicast encryption type in the association */
- u32 encrypt_type;
- /* HAL should update the existing STA entry, if this flag is set. UMAC
- will set this flag in case of RE-ASSOC, where we want to reuse the
- old STA ID. 0 = Add, 1 = Update */
- u8 action;
- /* U-APSD Flags: 1b per AC. Encoded as follows:
- b7 b6 b5 b4 b3 b2 b1 b0 =
- X X X X BE BK VI VO */
- u8 uapsd;
- /* Max SP Length */
- u8 max_sp_len;
- /* 11n Green Field preamble support
- 0 - Not supported, 1 - Supported */
- u8 green_field_capable;
- /* MIMO Power Save mode */
- enum wcn36xx_hal_ht_mimo_state mimo_ps;
- /* Delayed BA Support */
- u8 delayed_ba_support;
- /* Max AMPDU duration in 32us */
- u8 max_ampdu_duration;
- /* HT STA should set it to 1 if it is enabled in BSS. HT STA should
- * set it to 0 if AP does not support it. This indication is sent
- * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
- * rates. */
- u8 dsss_cck_mode_40mhz;
- /* Valid STA Idx when action=Update. Set to 0xFF when invalid!
- * Retained for backward compalibity with existing HAL code */
- u8 sta_index;
- /* BSSID of BSS to which station is associated. Set to 0xFF when
- * invalid. Retained for backward compalibity with existing HAL
- * code */
- u8 bssid_index;
- u8 p2p;
- /* TODO add this parameter for 3680. */
- /* Reserved to align next field on a dword boundary */
- /* u8 reserved; */
- } __packed;
- struct wcn36xx_hal_config_sta_req_msg {
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_config_sta_params sta_params;
- } __packed;
- struct wcn36xx_hal_config_sta_params_v1 {
- /* BSSID of STA */
- u8 bssid[ETH_ALEN];
- /* ASSOC ID, as assigned by UMAC */
- u16 aid;
- /* STA entry Type: 0 - Self, 1 - Other/Peer, 2 - BSSID, 3 - BCAST */
- u8 type;
- /* Short Preamble Supported. */
- u8 short_preamble_supported;
- /* MAC Address of STA */
- u8 mac[ETH_ALEN];
- /* Listen interval of the STA */
- u16 listen_interval;
- /* Support for 11e/WMM */
- u8 wmm_enabled;
- /* 11n HT capable STA */
- u8 ht_capable;
- /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
- u8 tx_channel_width_set;
- /* RIFS mode 0 - NA, 1 - Allowed */
- u8 rifs_mode;
- /* L-SIG TXOP Protection mechanism
- 0 - No Support, 1 - Supported
- SG - there is global field */
- u8 lsig_txop_protection;
- /* Max Ampdu Size supported by STA. TPE programming.
- 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k */
- u8 max_ampdu_size;
- /* Max Ampdu density. Used by RA. 3 : 0~7 : 2^(11nAMPDUdensity -4) */
- u8 max_ampdu_density;
- /* Max AMSDU size 1 : 3839 bytes, 0 : 7935 bytes */
- u8 max_amsdu_size;
- /* Short GI support for 40Mhz packets */
- u8 sgi_40mhz;
- /* Short GI support for 20Mhz packets */
- u8 sgi_20Mhz;
- /* Robust Management Frame (RMF) enabled/disabled */
- u8 rmf;
- /* The unicast encryption type in the association */
- u32 encrypt_type;
- /* HAL should update the existing STA entry, if this flag is set. UMAC
- will set this flag in case of RE-ASSOC, where we want to reuse the
- old STA ID. 0 = Add, 1 = Update */
- u8 action;
- /* U-APSD Flags: 1b per AC. Encoded as follows:
- b7 b6 b5 b4 b3 b2 b1 b0 =
- X X X X BE BK VI VO */
- u8 uapsd;
- /* Max SP Length */
- u8 max_sp_len;
- /* 11n Green Field preamble support
- 0 - Not supported, 1 - Supported */
- u8 green_field_capable;
- /* MIMO Power Save mode */
- enum wcn36xx_hal_ht_mimo_state mimo_ps;
- /* Delayed BA Support */
- u8 delayed_ba_support;
- /* Max AMPDU duration in 32us */
- u8 max_ampdu_duration;
- /* HT STA should set it to 1 if it is enabled in BSS. HT STA should
- * set it to 0 if AP does not support it. This indication is sent
- * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
- * rates. */
- u8 dsss_cck_mode_40mhz;
- /* Valid STA Idx when action=Update. Set to 0xFF when invalid!
- * Retained for backward compalibity with existing HAL code */
- u8 sta_index;
- /* BSSID of BSS to which station is associated. Set to 0xFF when
- * invalid. Retained for backward compalibity with existing HAL
- * code */
- u8 bssid_index;
- u8 p2p;
- /* Reserved to align next field on a dword boundary */
- u8 reserved;
- /* These rates are the intersection of peer and self capabilities. */
- struct wcn36xx_hal_supported_rates supported_rates;
- } __packed;
- struct wcn36xx_hal_config_sta_req_msg_v1 {
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_config_sta_params_v1 sta_params;
- } __packed;
- struct config_sta_rsp_params {
- /* success or failure */
- u32 status;
- /* Station index; valid only when 'status' field value SUCCESS */
- u8 sta_index;
- /* BSSID Index of BSS to which the station is associated */
- u8 bssid_index;
- /* DPU Index for PTK */
- u8 dpu_index;
- /* DPU Index for GTK */
- u8 bcast_dpu_index;
- /* DPU Index for IGTK */
- u8 bcast_mgmt_dpu_idx;
- /* PTK DPU signature */
- u8 uc_ucast_sig;
- /* GTK DPU isignature */
- u8 uc_bcast_sig;
- /* IGTK DPU signature */
- u8 uc_mgmt_sig;
- u8 p2p;
- } __packed;
- struct wcn36xx_hal_config_sta_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- struct config_sta_rsp_params params;
- } __packed;
- /* Delete STA Request message */
- struct wcn36xx_hal_delete_sta_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Index of STA to delete */
- u8 sta_index;
- } __packed;
- /* Delete STA Response message */
- struct wcn36xx_hal_delete_sta_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- /* Index of STA deleted */
- u8 sta_id;
- } __packed;
- /* 12 Bytes long because this structure can be used to represent rate and
- * extended rate set IEs. The parser assume this to be at least 12 */
- struct wcn36xx_hal_rate_set {
- u8 num_rates;
- u8 rate[WCN36XX_HAL_MAC_RATESET_EID_MAX];
- } __packed;
- /* access category record */
- struct wcn36xx_hal_aci_aifsn {
- #ifndef ANI_LITTLE_BIT_ENDIAN
- u8 rsvd:1;
- u8 aci:2;
- u8 acm:1;
- u8 aifsn:4;
- #else
- u8 aifsn:4;
- u8 acm:1;
- u8 aci:2;
- u8 rsvd:1;
- #endif
- } __packed;
- /* contention window size */
- struct wcn36xx_hal_mac_cw {
- #ifndef ANI_LITTLE_BIT_ENDIAN
- u8 max:4;
- u8 min:4;
- #else
- u8 min:4;
- u8 max:4;
- #endif
- } __packed;
- struct wcn36xx_hal_edca_param_record {
- struct wcn36xx_hal_aci_aifsn aci;
- struct wcn36xx_hal_mac_cw cw;
- u16 txop_limit;
- } __packed;
- struct wcn36xx_hal_mac_ssid {
- u8 length;
- u8 ssid[32];
- } __packed;
- /* Concurrency role. These are generic IDs that identify the various roles
- * in the software system. */
- enum wcn36xx_hal_con_mode {
- WCN36XX_HAL_STA_MODE = 0,
- /* to support softAp mode . This is misleading.
- It means AP MODE only. */
- WCN36XX_HAL_STA_SAP_MODE = 1,
- WCN36XX_HAL_P2P_CLIENT_MODE,
- WCN36XX_HAL_P2P_GO_MODE,
- WCN36XX_HAL_MONITOR_MODE,
- };
- /* This is a bit pattern to be set for each mode
- * bit 0 - sta mode
- * bit 1 - ap mode
- * bit 2 - p2p client mode
- * bit 3 - p2p go mode */
- enum wcn36xx_hal_concurrency_mode {
- HAL_STA = 1,
- HAL_SAP = 2,
- /* to support sta, softAp mode . This means STA+AP mode */
- HAL_STA_SAP = 3,
- HAL_P2P_CLIENT = 4,
- HAL_P2P_GO = 8,
- HAL_MAX_CONCURRENCY_PERSONA = 4
- };
- struct wcn36xx_hal_config_bss_params {
- /* BSSID */
- u8 bssid[ETH_ALEN];
- /* Self Mac Address */
- u8 self_mac_addr[ETH_ALEN];
- /* BSS type */
- enum wcn36xx_hal_bss_type bss_type;
- /* Operational Mode: AP =0, STA = 1 */
- u8 oper_mode;
- /* Network Type */
- enum wcn36xx_hal_nw_type nw_type;
- /* Used to classify PURE_11G/11G_MIXED to program MTU */
- u8 short_slot_time_supported;
- /* Co-exist with 11a STA */
- u8 lla_coexist;
- /* Co-exist with 11b STA */
- u8 llb_coexist;
- /* Co-exist with 11g STA */
- u8 llg_coexist;
- /* Coexistence with 11n STA */
- u8 ht20_coexist;
- /* Non GF coexist flag */
- u8 lln_non_gf_coexist;
- /* TXOP protection support */
- u8 lsig_tx_op_protection_full_support;
- /* RIFS mode */
- u8 rifs_mode;
- /* Beacon Interval in TU */
- u16 beacon_interval;
- /* DTIM period */
- u8 dtim_period;
- /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
- u8 tx_channel_width_set;
- /* Operating channel */
- u8 oper_channel;
- /* Extension channel for channel bonding */
- u8 ext_channel;
- /* Reserved to align next field on a dword boundary */
- u8 reserved;
- /* TODO move sta to the end for 3680 */
- /* Context of the station being added in HW
- * Add a STA entry for "itself" -
- *
- * On AP - Add the AP itself in an "STA context"
- *
- * On STA - Add the AP to which this STA is joining in an
- * "STA context"
- */
- struct wcn36xx_hal_config_sta_params sta;
- /* SSID of the BSS */
- struct wcn36xx_hal_mac_ssid ssid;
- /* HAL should update the existing BSS entry, if this flag is set.
- * UMAC will set this flag in case of reassoc, where we want to
- * resue the the old BSSID and still return success 0 = Add, 1 =
- * Update */
- u8 action;
- /* MAC Rate Set */
- struct wcn36xx_hal_rate_set rateset;
- /* Enable/Disable HT capabilities of the BSS */
- u8 ht;
- /* Enable/Disable OBSS protection */
- u8 obss_prot_enabled;
- /* RMF enabled/disabled */
- u8 rmf;
- /* HT Operating Mode operating mode of the 802.11n STA */
- enum wcn36xx_hal_ht_operating_mode ht_oper_mode;
- /* Dual CTS Protection: 0 - Unused, 1 - Used */
- u8 dual_cts_protection;
- /* Probe Response Max retries */
- u8 max_probe_resp_retry_limit;
- /* To Enable Hidden ssid */
- u8 hidden_ssid;
- /* To Enable Disable FW Proxy Probe Resp */
- u8 proxy_probe_resp;
- /* Boolean to indicate if EDCA params are valid. UMAC might not
- * have valid EDCA params or might not desire to apply EDCA params
- * during config BSS. 0 implies Not Valid ; Non-Zero implies
- * valid */
- u8 edca_params_valid;
- /* EDCA Parameters for Best Effort Access Category */
- struct wcn36xx_hal_edca_param_record acbe;
- /* EDCA Parameters forBackground Access Category */
- struct wcn36xx_hal_edca_param_record acbk;
- /* EDCA Parameters for Video Access Category */
- struct wcn36xx_hal_edca_param_record acvi;
- /* EDCA Parameters for Voice Access Category */
- struct wcn36xx_hal_edca_param_record acvo;
- /* Ext Bss Config Msg if set */
- u8 ext_set_sta_key_param_valid;
- /* SetStaKeyParams for ext bss msg */
- struct wcn36xx_hal_set_sta_key_params ext_set_sta_key_param;
- /* Persona for the BSS can be STA,AP,GO,CLIENT value same as enum
- * wcn36xx_hal_con_mode */
- u8 wcn36xx_hal_persona;
- u8 spectrum_mgt_enable;
- /* HAL fills in the tx power used for mgmt frames in txMgmtPower */
- s8 tx_mgmt_power;
- /* maxTxPower has max power to be used after applying the power
- * constraint if any */
- s8 max_tx_power;
- } __packed;
- struct wcn36xx_hal_config_bss_req_msg {
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_config_bss_params bss_params;
- } __packed;
- struct wcn36xx_hal_config_bss_params_v1 {
- /* BSSID */
- u8 bssid[ETH_ALEN];
- /* Self Mac Address */
- u8 self_mac_addr[ETH_ALEN];
- /* BSS type */
- enum wcn36xx_hal_bss_type bss_type;
- /* Operational Mode: AP =0, STA = 1 */
- u8 oper_mode;
- /* Network Type */
- enum wcn36xx_hal_nw_type nw_type;
- /* Used to classify PURE_11G/11G_MIXED to program MTU */
- u8 short_slot_time_supported;
- /* Co-exist with 11a STA */
- u8 lla_coexist;
- /* Co-exist with 11b STA */
- u8 llb_coexist;
- /* Co-exist with 11g STA */
- u8 llg_coexist;
- /* Coexistence with 11n STA */
- u8 ht20_coexist;
- /* Non GF coexist flag */
- u8 lln_non_gf_coexist;
- /* TXOP protection support */
- u8 lsig_tx_op_protection_full_support;
- /* RIFS mode */
- u8 rifs_mode;
- /* Beacon Interval in TU */
- u16 beacon_interval;
- /* DTIM period */
- u8 dtim_period;
- /* TX Width Set: 0 - 20 MHz only, 1 - 20/40 MHz */
- u8 tx_channel_width_set;
- /* Operating channel */
- u8 oper_channel;
- /* Extension channel for channel bonding */
- u8 ext_channel;
- /* Reserved to align next field on a dword boundary */
- u8 reserved;
- /* SSID of the BSS */
- struct wcn36xx_hal_mac_ssid ssid;
- /* HAL should update the existing BSS entry, if this flag is set.
- * UMAC will set this flag in case of reassoc, where we want to
- * resue the the old BSSID and still return success 0 = Add, 1 =
- * Update */
- u8 action;
- /* MAC Rate Set */
- struct wcn36xx_hal_rate_set rateset;
- /* Enable/Disable HT capabilities of the BSS */
- u8 ht;
- /* Enable/Disable OBSS protection */
- u8 obss_prot_enabled;
- /* RMF enabled/disabled */
- u8 rmf;
- /* HT Operating Mode operating mode of the 802.11n STA */
- enum wcn36xx_hal_ht_operating_mode ht_oper_mode;
- /* Dual CTS Protection: 0 - Unused, 1 - Used */
- u8 dual_cts_protection;
- /* Probe Response Max retries */
- u8 max_probe_resp_retry_limit;
- /* To Enable Hidden ssid */
- u8 hidden_ssid;
- /* To Enable Disable FW Proxy Probe Resp */
- u8 proxy_probe_resp;
- /* Boolean to indicate if EDCA params are valid. UMAC might not
- * have valid EDCA params or might not desire to apply EDCA params
- * during config BSS. 0 implies Not Valid ; Non-Zero implies
- * valid */
- u8 edca_params_valid;
- /* EDCA Parameters for Best Effort Access Category */
- struct wcn36xx_hal_edca_param_record acbe;
- /* EDCA Parameters forBackground Access Category */
- struct wcn36xx_hal_edca_param_record acbk;
- /* EDCA Parameters for Video Access Category */
- struct wcn36xx_hal_edca_param_record acvi;
- /* EDCA Parameters for Voice Access Category */
- struct wcn36xx_hal_edca_param_record acvo;
- /* Ext Bss Config Msg if set */
- u8 ext_set_sta_key_param_valid;
- /* SetStaKeyParams for ext bss msg */
- struct wcn36xx_hal_set_sta_key_params ext_set_sta_key_param;
- /* Persona for the BSS can be STA,AP,GO,CLIENT value same as enum
- * wcn36xx_hal_con_mode */
- u8 wcn36xx_hal_persona;
- u8 spectrum_mgt_enable;
- /* HAL fills in the tx power used for mgmt frames in txMgmtPower */
- s8 tx_mgmt_power;
- /* maxTxPower has max power to be used after applying the power
- * constraint if any */
- s8 max_tx_power;
- /* Context of the station being added in HW
- * Add a STA entry for "itself" -
- *
- * On AP - Add the AP itself in an "STA context"
- *
- * On STA - Add the AP to which this STA is joining in an
- * "STA context"
- */
- struct wcn36xx_hal_config_sta_params_v1 sta;
- } __packed;
- struct wcn36xx_hal_config_bss_req_msg_v1 {
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_config_bss_params_v1 bss_params;
- } __packed;
- struct wcn36xx_hal_config_bss_rsp_params {
- /* Success or Failure */
- u32 status;
- /* BSS index allocated by HAL */
- u8 bss_index;
- /* DPU descriptor index for PTK */
- u8 dpu_desc_index;
- /* PTK DPU signature */
- u8 ucast_dpu_signature;
- /* DPU descriptor index for GTK */
- u8 bcast_dpu_desc_indx;
- /* GTK DPU signature */
- u8 bcast_dpu_signature;
- /* DPU descriptor for IGTK */
- u8 mgmt_dpu_desc_index;
- /* IGTK DPU signature */
- u8 mgmt_dpu_signature;
- /* Station Index for BSS entry */
- u8 bss_sta_index;
- /* Self station index for this BSS */
- u8 bss_self_sta_index;
- /* Bcast station for buffering bcast frames in AP role */
- u8 bss_bcast_sta_idx;
- /* MAC Address of STA(PEER/SELF) in staContext of configBSSReq */
- u8 mac[ETH_ALEN];
- /* HAL fills in the tx power used for mgmt frames in this field. */
- s8 tx_mgmt_power;
- } __packed;
- struct wcn36xx_hal_config_bss_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_config_bss_rsp_params bss_rsp_params;
- } __packed;
- struct wcn36xx_hal_delete_bss_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* BSS index to be deleted */
- u8 bss_index;
- } __packed;
- struct wcn36xx_hal_delete_bss_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* Success or Failure */
- u32 status;
- /* BSS index that has been deleted */
- u8 bss_index;
- } __packed;
- struct wcn36xx_hal_join_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Indicates the BSSID to which STA is going to associate */
- u8 bssid[ETH_ALEN];
- /* Indicates the channel to switch to. */
- u8 channel;
- /* Self STA MAC */
- u8 self_sta_mac_addr[ETH_ALEN];
- /* Local power constraint */
- u8 local_power_constraint;
- /* Secondary channel offset */
- enum phy_chan_bond_state secondary_channel_offset;
- /* link State */
- enum wcn36xx_hal_link_state link_state;
- /* Max TX power */
- s8 max_tx_power;
- } __packed;
- struct wcn36xx_hal_join_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- /* HAL fills in the tx power used for mgmt frames in this field */
- u8 tx_mgmt_power;
- } __packed;
- struct post_assoc_req_msg {
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_config_sta_params sta_params;
- struct wcn36xx_hal_config_bss_params bss_params;
- };
- struct post_assoc_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- struct config_sta_rsp_params sta_rsp_params;
- struct wcn36xx_hal_config_bss_rsp_params bss_rsp_params;
- };
- /* This is used to create a set of WEP keys for a given BSS. */
- struct wcn36xx_hal_set_bss_key_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* BSS Index of the BSS */
- u8 bss_idx;
- /* Encryption Type used with peer */
- enum ani_ed_type enc_type;
- /* Number of keys */
- u8 num_keys;
- /* Array of keys. */
- struct wcn36xx_hal_keys keys[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS];
- /* Control for Replay Count, 1= Single TID based replay count on Tx
- * 0 = Per TID based replay count on TX */
- u8 single_tid_rc;
- } __packed;
- /* tagged version of set bss key */
- struct wcn36xx_hal_set_bss_key_req_msg_tagged {
- struct wcn36xx_hal_set_bss_key_req_msg Msg;
- u32 tag;
- } __packed;
- struct wcn36xx_hal_set_bss_key_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- } __packed;
- /*
- * This is used configure the key information on a given station.
- * When the sec_type is WEP40 or WEP104, the def_wep_idx is used to locate
- * a preconfigured key from a BSS the station assoicated with; otherwise
- * a new key descriptor is created based on the key field.
- */
- struct wcn36xx_hal_set_sta_key_req_msg {
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_set_sta_key_params set_sta_key_params;
- } __packed;
- struct wcn36xx_hal_set_sta_key_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- } __packed;
- struct wcn36xx_hal_remove_bss_key_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* BSS Index of the BSS */
- u8 bss_idx;
- /* Encryption Type used with peer */
- enum ani_ed_type enc_type;
- /* Key Id */
- u8 key_id;
- /* STATIC/DYNAMIC. Used in Nullifying in Key Descriptors for
- * Static/Dynamic keys */
- enum ani_wep_type wep_type;
- } __packed;
- struct wcn36xx_hal_remove_bss_key_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- } __packed;
- /*
- * This is used by PE to Remove the key information on a given station.
- */
- struct wcn36xx_hal_remove_sta_key_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* STA Index */
- u16 sta_idx;
- /* Encryption Type used with peer */
- enum ani_ed_type enc_type;
- /* Key Id */
- u8 key_id;
- /* Whether to invalidate the Broadcast key or Unicast key. In case
- * of WEP, the same key is used for both broadcast and unicast. */
- u8 unicast;
- } __packed;
- struct wcn36xx_hal_remove_sta_key_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /*success or failure */
- u32 status;
- } __packed;
- #ifdef FEATURE_OEM_DATA_SUPPORT
- #ifndef OEM_DATA_REQ_SIZE
- #define OEM_DATA_REQ_SIZE 134
- #endif
- #ifndef OEM_DATA_RSP_SIZE
- #define OEM_DATA_RSP_SIZE 1968
- #endif
- struct start_oem_data_req_msg {
- struct wcn36xx_hal_msg_header header;
- u32 status;
- tSirMacAddr self_mac_addr;
- u8 oem_data_req[OEM_DATA_REQ_SIZE];
- };
- struct start_oem_data_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- u8 oem_data_rsp[OEM_DATA_RSP_SIZE];
- };
- #endif
- struct wcn36xx_hal_switch_channel_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Channel number */
- u8 channel_number;
- /* Local power constraint */
- u8 local_power_constraint;
- /* Secondary channel offset */
- enum phy_chan_bond_state secondary_channel_offset;
- /* HAL fills in the tx power used for mgmt frames in this field. */
- u8 tx_mgmt_power;
- /* Max TX power */
- u8 max_tx_power;
- /* Self STA MAC */
- u8 self_sta_mac_addr[ETH_ALEN];
- /* VO WIFI comment: BSSID needed to identify session. As the
- * request has power constraints, this should be applied only to
- * that session Since MTU timing and EDCA are sessionized, this
- * struct needs to be sessionized and bssid needs to be out of the
- * VOWifi feature flag V IMP: Keep bssId field at the end of this
- * msg. It is used to mantain backward compatbility by way of
- * ignoring if using new host/old FW or old host/new FW since it is
- * at the end of this struct
- */
- u8 bssid[ETH_ALEN];
- } __packed;
- struct wcn36xx_hal_switch_channel_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* Status */
- u32 status;
- /* Channel number - same as in request */
- u8 channel_number;
- /* HAL fills in the tx power used for mgmt frames in this field */
- u8 tx_mgmt_power;
- /* BSSID needed to identify session - same as in request */
- u8 bssid[ETH_ALEN];
- } __packed;
- struct update_edca_params_req_msg {
- struct wcn36xx_hal_msg_header header;
- /*BSS Index */
- u16 bss_index;
- /* Best Effort */
- struct wcn36xx_hal_edca_param_record acbe;
- /* Background */
- struct wcn36xx_hal_edca_param_record acbk;
- /* Video */
- struct wcn36xx_hal_edca_param_record acvi;
- /* Voice */
- struct wcn36xx_hal_edca_param_record acvo;
- };
- struct update_edca_params_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct dpu_stats_params {
- /* Index of STA to which the statistics */
- u16 sta_index;
- /* Encryption mode */
- u8 enc_mode;
- /* status */
- u32 status;
- /* Statistics */
- u32 send_blocks;
- u32 recv_blocks;
- u32 replays;
- u8 mic_error_cnt;
- u32 prot_excl_cnt;
- u16 format_err_cnt;
- u16 un_decryptable_cnt;
- u32 decrypt_err_cnt;
- u32 decrypt_ok_cnt;
- };
- struct wcn36xx_hal_stats_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Valid STA Idx for per STA stats request */
- u32 sta_id;
- /* Categories of stats requested as specified in eHalStatsMask */
- u32 stats_mask;
- };
- struct ani_summary_stats_info {
- /* Total number of packets(per AC) that were successfully
- * transmitted with retries */
- u32 retry_cnt[4];
- /* The number of MSDU packets and MMPDU frames per AC that the
- * 802.11 station successfully transmitted after more than one
- * retransmission attempt */
- u32 multiple_retry_cnt[4];
- /* Total number of packets(per AC) that were successfully
- * transmitted (with and without retries, including multi-cast,
- * broadcast) */
- u32 tx_frm_cnt[4];
- /* Total number of packets that were successfully received (after
- * appropriate filter rules including multi-cast, broadcast) */
- u32 rx_frm_cnt;
- /* Total number of duplicate frames received successfully */
- u32 frm_dup_cnt;
- /* Total number packets(per AC) failed to transmit */
- u32 fail_cnt[4];
- /* Total number of RTS/CTS sequence failures for transmission of a
- * packet */
- u32 rts_fail_cnt;
- /* Total number packets failed transmit because of no ACK from the
- * remote entity */
- u32 ack_fail_cnt;
- /* Total number of RTS/CTS sequence success for transmission of a
- * packet */
- u32 rts_succ_cnt;
- /* The sum of the receive error count and dropped-receive-buffer
- * error count. HAL will provide this as a sum of (FCS error) +
- * (Fail get BD/PDU in HW) */
- u32 rx_discard_cnt;
- /*
- * The receive error count. HAL will provide the RxP FCS error
- * global counter. */
- u32 rx_error_cnt;
- /* The sum of the transmit-directed byte count, transmit-multicast
- * byte count and transmit-broadcast byte count. HAL will sum TPE
- * UC/MC/BCAST global counters to provide this. */
- u32 tx_byte_cnt;
- };
- /* defines tx_rate_flags */
- enum tx_rate_info {
- /* Legacy rates */
- HAL_TX_RATE_LEGACY = 0x1,
- /* HT20 rates */
- HAL_TX_RATE_HT20 = 0x2,
- /* HT40 rates */
- HAL_TX_RATE_HT40 = 0x4,
- /* Rate with Short guard interval */
- HAL_TX_RATE_SGI = 0x8,
- /* Rate with Long guard interval */
- HAL_TX_RATE_LGI = 0x10
- };
- struct ani_global_class_a_stats_info {
- /* The number of MPDU frames received by the 802.11 station for
- * MSDU packets or MMPDU frames */
- u32 rx_frag_cnt;
- /* The number of MPDU frames received by the 802.11 station for
- * MSDU packets or MMPDU frames when a promiscuous packet filter
- * was enabled */
- u32 promiscuous_rx_frag_cnt;
- /* The receiver input sensitivity referenced to a FER of 8% at an
- * MPDU length of 1024 bytes at the antenna connector. Each element
- * of the array shall correspond to a supported rate and the order
- * shall be the same as the supporteRates parameter. */
- u32 rx_input_sensitivity;
- /* The maximum transmit power in dBm upto one decimal. for eg: if
- * it is 10.5dBm, the value would be 105 */
- u32 max_pwr;
- /* Number of times the receiver failed to synchronize with the
- * incoming signal after detecting the sync in the preamble of the
- * transmitted PLCP protocol data unit. */
- u32 sync_fail_cnt;
- /* Legacy transmit rate, in units of 500 kbit/sec, for the most
- * recently transmitted frame */
- u32 tx_rate;
- /* mcs index for HT20 and HT40 rates */
- u32 mcs_index;
- /* to differentiate between HT20 and HT40 rates; short and long
- * guard interval */
- u32 tx_rate_flags;
- };
- struct ani_global_security_stats {
- /* The number of unencrypted received MPDU frames that the MAC
- * layer discarded when the IEEE 802.11 dot11ExcludeUnencrypted
- * management information base (MIB) object is enabled */
- u32 rx_wep_unencrypted_frm_cnt;
- /* The number of received MSDU packets that that the 802.11 station
- * discarded because of MIC failures */
- u32 rx_mic_fail_cnt;
- /* The number of encrypted MPDU frames that the 802.11 station
- * failed to decrypt because of a TKIP ICV error */
- u32 tkip_icv_err;
- /* The number of received MPDU frames that the 802.11 discarded
- * because of an invalid AES-CCMP format */
- u32 aes_ccmp_format_err;
- /* The number of received MPDU frames that the 802.11 station
- * discarded because of the AES-CCMP replay protection procedure */
- u32 aes_ccmp_replay_cnt;
- /* The number of received MPDU frames that the 802.11 station
- * discarded because of errors detected by the AES-CCMP decryption
- * algorithm */
- u32 aes_ccmp_decrpt_err;
- /* The number of encrypted MPDU frames received for which a WEP
- * decryption key was not available on the 802.11 station */
- u32 wep_undecryptable_cnt;
- /* The number of encrypted MPDU frames that the 802.11 station
- * failed to decrypt because of a WEP ICV error */
- u32 wep_icv_err;
- /* The number of received encrypted packets that the 802.11 station
- * successfully decrypted */
- u32 rx_decrypt_succ_cnt;
- /* The number of encrypted packets that the 802.11 station failed
- * to decrypt */
- u32 rx_decrypt_fail_cnt;
- };
- struct ani_global_class_b_stats_info {
- struct ani_global_security_stats uc_stats;
- struct ani_global_security_stats mc_bc_stats;
- };
- struct ani_global_class_c_stats_info {
- /* This counter shall be incremented for a received A-MSDU frame
- * with the stations MAC address in the address 1 field or an
- * A-MSDU frame with a group address in the address 1 field */
- u32 rx_amsdu_cnt;
- /* This counter shall be incremented when the MAC receives an AMPDU
- * from the PHY */
- u32 rx_ampdu_cnt;
- /* This counter shall be incremented when a Frame is transmitted
- * only on the primary channel */
- u32 tx_20_frm_cnt;
- /* This counter shall be incremented when a Frame is received only
- * on the primary channel */
- u32 rx_20_frm_cnt;
- /* This counter shall be incremented by the number of MPDUs
- * received in the A-MPDU when an A-MPDU is received */
- u32 rx_mpdu_in_ampdu_cnt;
- /* This counter shall be incremented when an MPDU delimiter has a
- * CRC error when this is the first CRC error in the received AMPDU
- * or when the previous delimiter has been decoded correctly */
- u32 ampdu_delimiter_crc_err;
- };
- struct ani_per_sta_stats_info {
- /* The number of MPDU frames that the 802.11 station transmitted
- * and acknowledged through a received 802.11 ACK frame */
- u32 tx_frag_cnt[4];
- /* This counter shall be incremented when an A-MPDU is transmitted */
- u32 tx_ampdu_cnt;
- /* This counter shall increment by the number of MPDUs in the AMPDU
- * when an A-MPDU is transmitted */
- u32 tx_mpdu_in_ampdu_cnt;
- };
- struct wcn36xx_hal_stats_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* Success or Failure */
- u32 status;
- /* STA Idx */
- u32 sta_index;
- /* Categories of STATS being returned as per eHalStatsMask */
- u32 stats_mask;
- /* message type is same as the request type */
- u16 msg_type;
- /* length of the entire request, includes the pStatsBuf length too */
- u16 msg_len;
- };
- struct wcn36xx_hal_set_link_state_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 bssid[ETH_ALEN];
- enum wcn36xx_hal_link_state state;
- u8 self_mac_addr[ETH_ALEN];
- } __packed;
- struct set_link_state_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- /* TSPEC Params */
- struct wcn36xx_hal_ts_info_tfc {
- #ifndef ANI_LITTLE_BIT_ENDIAN
- u16 ackPolicy:2;
- u16 userPrio:3;
- u16 psb:1;
- u16 aggregation:1;
- u16 accessPolicy:2;
- u16 direction:2;
- u16 tsid:4;
- u16 trafficType:1;
- #else
- u16 trafficType:1;
- u16 tsid:4;
- u16 direction:2;
- u16 accessPolicy:2;
- u16 aggregation:1;
- u16 psb:1;
- u16 userPrio:3;
- u16 ackPolicy:2;
- #endif
- };
- /* Flag to schedule the traffic type */
- struct wcn36xx_hal_ts_info_sch {
- #ifndef ANI_LITTLE_BIT_ENDIAN
- u8 rsvd:7;
- u8 schedule:1;
- #else
- u8 schedule:1;
- u8 rsvd:7;
- #endif
- };
- /* Traffic and scheduling info */
- struct wcn36xx_hal_ts_info {
- struct wcn36xx_hal_ts_info_tfc traffic;
- struct wcn36xx_hal_ts_info_sch schedule;
- };
- /* Information elements */
- struct wcn36xx_hal_tspec_ie {
- u8 type;
- u8 length;
- struct wcn36xx_hal_ts_info ts_info;
- u16 nom_msdu_size;
- u16 max_msdu_size;
- u32 min_svc_interval;
- u32 max_svc_interval;
- u32 inact_interval;
- u32 suspend_interval;
- u32 svc_start_time;
- u32 min_data_rate;
- u32 mean_data_rate;
- u32 peak_data_rate;
- u32 max_burst_sz;
- u32 delay_bound;
- u32 min_phy_rate;
- u16 surplus_bw;
- u16 medium_time;
- };
- struct add_ts_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Station Index */
- u16 sta_index;
- /* TSPEC handler uniquely identifying a TSPEC for a STA in a BSS */
- u16 tspec_index;
- /* To program TPE with required parameters */
- struct wcn36xx_hal_tspec_ie tspec;
- /* U-APSD Flags: 1b per AC. Encoded as follows:
- b7 b6 b5 b4 b3 b2 b1 b0 =
- X X X X BE BK VI VO */
- u8 uapsd;
- /* These parameters are for all the access categories */
- /* Service Interval */
- u32 service_interval[WCN36XX_HAL_MAX_AC];
- /* Suspend Interval */
- u32 suspend_interval[WCN36XX_HAL_MAX_AC];
- /* Delay Interval */
- u32 delay_interval[WCN36XX_HAL_MAX_AC];
- };
- struct add_rs_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct del_ts_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Station Index */
- u16 sta_index;
- /* TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS */
- u16 tspec_index;
- /* To lookup station id using the mac address */
- u8 bssid[ETH_ALEN];
- };
- struct del_ts_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- /* End of TSpec Parameters */
- /* Start of BLOCK ACK related Parameters */
- struct wcn36xx_hal_add_ba_session_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Station Index */
- u16 sta_index;
- /* Peer MAC Address */
- u8 mac_addr[ETH_ALEN];
- /* ADDBA Action Frame dialog token
- HAL will not interpret this object */
- u8 dialog_token;
- /* TID for which the BA is being setup
- This identifies the TC or TS of interest */
- u8 tid;
- /* 0 - Delayed BA (Not supported)
- 1 - Immediate BA */
- u8 policy;
- /* Indicates the number of buffers for this TID (baTID)
- NOTE - This is the requested buffer size. When this
- is processed by HAL and subsequently by HDD, it is
- possible that HDD may change this buffer size. Any
- change in the buffer size should be noted by PE and
- advertized appropriately in the ADDBA response */
- u16 buffer_size;
- /* BA timeout in TU's 0 means no timeout will occur */
- u16 timeout;
- /* b0..b3 - Fragment Number - Always set to 0
- b4..b15 - Starting Sequence Number of first MSDU
- for which this BA is setup */
- u16 ssn;
- /* ADDBA direction
- 1 - Originator
- 0 - Recipient */
- u8 direction;
- } __packed;
- struct wcn36xx_hal_add_ba_session_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- /* Dialog token */
- u8 dialog_token;
- /* TID for which the BA session has been setup */
- u8 ba_tid;
- /* BA Buffer Size allocated for the current BA session */
- u8 ba_buffer_size;
- u8 ba_session_id;
- /* Reordering Window buffer */
- u8 win_size;
- /* Station Index to id the sta */
- u8 sta_index;
- /* Starting Sequence Number */
- u16 ssn;
- } __packed;
- struct wcn36xx_hal_add_ba_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Session Id */
- u8 session_id;
- /* Reorder Window Size */
- u8 win_size;
- /* Old FW 1.2.2.4 does not support this*/
- #ifdef FEATURE_ON_CHIP_REORDERING
- u8 reordering_done_on_chip;
- #endif
- } __packed;
- struct wcn36xx_hal_add_ba_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- /* Dialog token */
- u8 dialog_token;
- } __packed;
- struct add_ba_info {
- u16 ba_enable:1;
- u16 starting_seq_num:12;
- u16 reserved:3;
- };
- struct wcn36xx_hal_trigger_ba_rsp_candidate {
- u8 sta_addr[ETH_ALEN];
- struct add_ba_info ba_info[STACFG_MAX_TC];
- } __packed;
- struct wcn36xx_hal_trigger_ba_req_candidate {
- u8 sta_index;
- u8 tid_bitmap;
- } __packed;
- struct wcn36xx_hal_trigger_ba_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Session Id */
- u8 session_id;
- /* baCandidateCnt is followed by trigger BA
- * Candidate List(tTriggerBaCandidate)
- */
- u16 candidate_cnt;
- } __packed;
- struct wcn36xx_hal_trigger_ba_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* TO SUPPORT BT-AMP */
- u8 bssid[ETH_ALEN];
- /* success or failure */
- u32 status;
- /* baCandidateCnt is followed by trigger BA
- * Rsp Candidate List(tTriggerRspBaCandidate)
- */
- u16 candidate_cnt;
- } __packed;
- struct wcn36xx_hal_del_ba_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Station Index */
- u16 sta_index;
- /* TID for which the BA session is being deleted */
- u8 tid;
- /* DELBA direction
- 1 - Originator
- 0 - Recipient */
- u8 direction;
- } __packed;
- struct wcn36xx_hal_del_ba_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- } __packed;
- struct tsm_stats_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Traffic Id */
- u8 tid;
- u8 bssid[ETH_ALEN];
- };
- struct tsm_stats_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /*success or failure */
- u32 status;
- /* Uplink Packet Queue delay */
- u16 uplink_pkt_queue_delay;
- /* Uplink Packet Queue delay histogram */
- u16 uplink_pkt_queue_delay_hist[4];
- /* Uplink Packet Transmit delay */
- u32 uplink_pkt_tx_delay;
- /* Uplink Packet loss */
- u16 uplink_pkt_loss;
- /* Uplink Packet count */
- u16 uplink_pkt_count;
- /* Roaming count */
- u8 roaming_count;
- /* Roaming Delay */
- u16 roaming_delay;
- };
- struct set_key_done_msg {
- struct wcn36xx_hal_msg_header header;
- /*bssid of the keys */
- u8 bssidx;
- u8 enc_type;
- };
- struct wcn36xx_hal_nv_img_download_req_msg {
- /* Note: The length specified in wcn36xx_hal_nv_img_download_req_msg
- * messages should be
- * header.len = sizeof(wcn36xx_hal_nv_img_download_req_msg) +
- * nv_img_buffer_size */
- struct wcn36xx_hal_msg_header header;
- /* Fragment sequence number of the NV Image. Note that NV Image
- * might not fit into one message due to size limitation of the SMD
- * channel FIFO. UMAC can hence choose to chop the NV blob into
- * multiple fragments starting with seqeunce number 0, 1, 2 etc.
- * The last fragment MUST be indicated by marking the
- * isLastFragment field to 1. Note that all the NV blobs would be
- * concatenated together by HAL without any padding bytes in
- * between.*/
- u16 frag_number;
- /* Is this the last fragment? When set to 1 it indicates that no
- * more fragments will be sent by UMAC and HAL can concatenate all
- * the NV blobs rcvd & proceed with the parsing. HAL would generate
- * a WCN36XX_HAL_DOWNLOAD_NV_RSP to the WCN36XX_HAL_DOWNLOAD_NV_REQ
- * after it receives each fragment */
- u16 last_fragment;
- /* NV Image size (number of bytes) */
- u32 nv_img_buffer_size;
- /* Following the 'nv_img_buffer_size', there should be
- * nv_img_buffer_size bytes of NV Image i.e.
- * u8[nv_img_buffer_size] */
- } __packed;
- struct wcn36xx_hal_nv_img_download_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* Success or Failure. HAL would generate a
- * WCN36XX_HAL_DOWNLOAD_NV_RSP after each fragment */
- u32 status;
- } __packed;
- struct wcn36xx_hal_nv_store_ind {
- /* Note: The length specified in tHalNvStoreInd messages should be
- * header.msgLen = sizeof(tHalNvStoreInd) + nvBlobSize */
- struct wcn36xx_hal_msg_header header;
- /* NV Item */
- u32 table_id;
- /* Size of NV Blob */
- u32 nv_blob_size;
- /* Following the 'nvBlobSize', there should be nvBlobSize bytes of
- * NV blob i.e. u8[nvBlobSize] */
- };
- /* End of Block Ack Related Parameters */
- #define WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE 6
- /* Definition for MIC failure indication MAC reports this each time a MIC
- * failure occures on Rx TKIP packet
- */
- struct mic_failure_ind_msg {
- struct wcn36xx_hal_msg_header header;
- u8 bssid[ETH_ALEN];
- /* address used to compute MIC */
- u8 src_addr[ETH_ALEN];
- /* transmitter address */
- u8 ta_addr[ETH_ALEN];
- u8 dst_addr[ETH_ALEN];
- u8 multicast;
- /* first byte of IV */
- u8 iv1;
- /* second byte of IV */
- u8 key_id;
- /* sequence number */
- u8 tsc[WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE];
- /* receive address */
- u8 rx_addr[ETH_ALEN];
- };
- struct update_vht_op_mode_req_msg {
- struct wcn36xx_hal_msg_header header;
- u16 op_mode;
- u16 sta_id;
- };
- struct update_vht_op_mode_params_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- u32 status;
- };
- struct update_beacon_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 bss_index;
- /* shortPreamble mode. HAL should update all the STA rates when it
- * receives this message */
- u8 short_preamble;
- /* short Slot time. */
- u8 short_slot_time;
- /* Beacon Interval */
- u16 beacon_interval;
- /* Protection related */
- u8 lla_coexist;
- u8 llb_coexist;
- u8 llg_coexist;
- u8 ht20_coexist;
- u8 lln_non_gf_coexist;
- u8 lsig_tx_op_protection_full_support;
- u8 rifs_mode;
- u16 param_change_bitmap;
- };
- struct update_beacon_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- u32 status;
- };
- struct wcn36xx_hal_send_beacon_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* length of the template. */
- u32 beacon_length;
- /* Beacon data. */
- u8 beacon[BEACON_TEMPLATE_SIZE];
- u8 bssid[ETH_ALEN];
- /* TIM IE offset from the beginning of the template. */
- u32 tim_ie_offset;
- /* P2P IE offset from the begining of the template */
- u16 p2p_ie_offset;
- } __packed;
- struct send_beacon_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- u32 status;
- } __packed;
- struct enable_radar_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 bssid[ETH_ALEN];
- u8 channel;
- };
- struct enable_radar_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* Link Parameters */
- u8 bssid[ETH_ALEN];
- /* success or failure */
- u32 status;
- };
- struct radar_detect_intr_ind_msg {
- struct wcn36xx_hal_msg_header header;
- u8 radar_det_channel;
- };
- struct radar_detect_ind_msg {
- struct wcn36xx_hal_msg_header header;
- /* channel number in which the RADAR detected */
- u8 channel_number;
- /* RADAR pulse width in usecond */
- u16 radar_pulse_width;
- /* Number of RADAR pulses */
- u16 num_radar_pulse;
- };
- struct wcn36xx_hal_get_tpc_report_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 sta[ETH_ALEN];
- u8 dialog_token;
- u8 txpower;
- };
- struct wcn36xx_hal_get_tpc_report_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_send_probe_resp_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 probe_resp_template[BEACON_TEMPLATE_SIZE];
- u32 probe_resp_template_len;
- u32 proxy_probe_req_valid_ie_bmap[8];
- u8 bssid[ETH_ALEN];
- };
- struct send_probe_resp_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct send_unknown_frame_rx_ind_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_delete_sta_context_ind_msg {
- struct wcn36xx_hal_msg_header header;
- u16 aid;
- u16 sta_id;
- /* TO SUPPORT BT-AMP */
- u8 bssid[ETH_ALEN];
- /* HAL copies bssid from the sta table. */
- u8 addr2[ETH_ALEN];
- /* To unify the keepalive / unknown A2 / tim-based disa */
- u16 reason_code;
- } __packed;
- struct indicate_del_sta {
- struct wcn36xx_hal_msg_header header;
- u8 aid;
- u8 sta_index;
- u8 bss_index;
- u8 reason_code;
- u32 status;
- };
- struct bt_amp_event_msg {
- struct wcn36xx_hal_msg_header header;
- enum bt_amp_event_type btAmpEventType;
- };
- struct bt_amp_event_rsp {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct tl_hal_flush_ac_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Station Index. originates from HAL */
- u8 sta_id;
- /* TID for which the transmit queue is being flushed */
- u8 tid;
- };
- struct tl_hal_flush_ac_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* Station Index. originates from HAL */
- u8 sta_id;
- /* TID for which the transmit queue is being flushed */
- u8 tid;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_enter_imps_req_msg {
- struct wcn36xx_hal_msg_header header;
- };
- struct wcn36xx_hal_exit_imps_req {
- struct wcn36xx_hal_msg_header header;
- };
- struct wcn36xx_hal_enter_bmps_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 bss_index;
- /* TBTT value derived from the last beacon */
- #ifndef BUILD_QWPTTSTATIC
- u64 tbtt;
- #endif
- u8 dtim_count;
- /* DTIM period given to HAL during association may not be valid, if
- * association is based on ProbeRsp instead of beacon. */
- u8 dtim_period;
- /* For CCX and 11R Roaming */
- u32 rssi_filter_period;
- u32 num_beacon_per_rssi_average;
- u8 rssi_filter_enable;
- } __packed;
- struct wcn36xx_hal_exit_bmps_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 send_data_null;
- u8 bss_index;
- } __packed;
- struct wcn36xx_hal_missed_beacon_ind_msg {
- struct wcn36xx_hal_msg_header header;
- u8 bss_index;
- } __packed;
- /* Beacon Filtering data structures */
- /* The above structure would be followed by multiple of below mentioned
- * structure
- */
- struct beacon_filter_ie {
- u8 element_id;
- u8 check_ie_presence;
- u8 offset;
- u8 value;
- u8 bitmask;
- u8 ref;
- };
- struct wcn36xx_hal_add_bcn_filter_req_msg {
- struct wcn36xx_hal_msg_header header;
- u16 capability_info;
- u16 capability_mask;
- u16 beacon_interval;
- u16 ie_num;
- u8 bss_index;
- u8 reserved;
- };
- struct wcn36xx_hal_rem_bcn_filter_req {
- struct wcn36xx_hal_msg_header header;
- u8 ie_Count;
- u8 rem_ie_id[1];
- };
- #define WCN36XX_HAL_IPV4_ARP_REPLY_OFFLOAD 0
- #define WCN36XX_HAL_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
- #define WCN36XX_HAL_IPV6_NS_OFFLOAD 2
- #define WCN36XX_HAL_IPV6_ADDR_LEN 16
- #define WCN36XX_HAL_OFFLOAD_DISABLE 0
- #define WCN36XX_HAL_OFFLOAD_ENABLE 1
- #define WCN36XX_HAL_OFFLOAD_BCAST_FILTER_ENABLE 0x2
- #define WCN36XX_HAL_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE \
- (HAL_OFFLOAD_ENABLE|HAL_OFFLOAD_BCAST_FILTER_ENABLE)
- struct wcn36xx_hal_ns_offload_params {
- u8 src_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
- u8 self_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
- /* Only support 2 possible Network Advertisement IPv6 address */
- u8 target_ipv6_addr1[WCN36XX_HAL_IPV6_ADDR_LEN];
- u8 target_ipv6_addr2[WCN36XX_HAL_IPV6_ADDR_LEN];
- u8 self_addr[ETH_ALEN];
- u8 src_ipv6_addr_valid:1;
- u8 target_ipv6_addr1_valid:1;
- u8 target_ipv6_addr2_valid:1;
- u8 reserved1:5;
- /* make it DWORD aligned */
- u8 reserved2;
- /* slot index for this offload */
- u32 slot_index;
- u8 bss_index;
- };
- struct wcn36xx_hal_host_offload_req {
- u8 offload_Type;
- /* enable or disable */
- u8 enable;
- union {
- u8 host_ipv4_addr[4];
- u8 host_ipv6_addr[WCN36XX_HAL_IPV6_ADDR_LEN];
- } u;
- };
- struct wcn36xx_hal_host_offload_req_msg {
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_host_offload_req host_offload_params;
- struct wcn36xx_hal_ns_offload_params ns_offload_params;
- };
- /* Packet Types. */
- #define WCN36XX_HAL_KEEP_ALIVE_NULL_PKT 1
- #define WCN36XX_HAL_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
- /* Enable or disable keep alive */
- #define WCN36XX_HAL_KEEP_ALIVE_DISABLE 0
- #define WCN36XX_HAL_KEEP_ALIVE_ENABLE 1
- #define WCN36XX_KEEP_ALIVE_TIME_PERIOD 30 /* unit: s */
- /* Keep Alive request. */
- struct wcn36xx_hal_keep_alive_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 packet_type;
- u32 time_period;
- u8 host_ipv4_addr[WCN36XX_HAL_IPV4_ADDR_LEN];
- u8 dest_ipv4_addr[WCN36XX_HAL_IPV4_ADDR_LEN];
- u8 dest_addr[ETH_ALEN];
- u8 bss_index;
- } __packed;
- struct wcn36xx_hal_rssi_threshold_req_msg {
- struct wcn36xx_hal_msg_header header;
- s8 threshold1:8;
- s8 threshold2:8;
- s8 threshold3:8;
- u8 thres1_pos_notify:1;
- u8 thres1_neg_notify:1;
- u8 thres2_pos_notify:1;
- u8 thres2_neg_notify:1;
- u8 thres3_pos_notify:1;
- u8 thres3_neg_notify:1;
- u8 reserved10:2;
- };
- struct wcn36xx_hal_enter_uapsd_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 bk_delivery:1;
- u8 be_delivery:1;
- u8 vi_delivery:1;
- u8 vo_delivery:1;
- u8 bk_trigger:1;
- u8 be_trigger:1;
- u8 vi_trigger:1;
- u8 vo_trigger:1;
- u8 bss_index;
- };
- struct wcn36xx_hal_exit_uapsd_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 bss_index;
- };
- #define WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE 128
- #define WCN36XX_HAL_WOWL_BCAST_MAX_NUM_PATTERNS 16
- struct wcn36xx_hal_wowl_add_bcast_ptrn_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Pattern ID */
- u8 id;
- /* Pattern byte offset from beginning of the 802.11 packet to start
- * of the wake-up pattern */
- u8 byte_Offset;
- /* Non-Zero Pattern size */
- u8 size;
- /* Pattern */
- u8 pattern[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
- /* Non-zero pattern mask size */
- u8 mask_size;
- /* Pattern mask */
- u8 mask[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
- /* Extra pattern */
- u8 extra[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
- /* Extra pattern mask */
- u8 mask_extra[WCN36XX_HAL_WOWL_BCAST_PATTERN_MAX_SIZE];
- u8 bss_index;
- };
- struct wcn36xx_hal_wow_del_bcast_ptrn_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Pattern ID of the wakeup pattern to be deleted */
- u8 id;
- u8 bss_index;
- };
- struct wcn36xx_hal_wowl_enter_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Enables/disables magic packet filtering */
- u8 magic_packet_enable;
- /* Magic pattern */
- u8 magic_pattern[ETH_ALEN];
- /* Enables/disables packet pattern filtering in firmware. Enabling
- * this flag enables broadcast pattern matching in Firmware. If
- * unicast pattern matching is also desired,
- * ucUcastPatternFilteringEnable flag must be set tot true as well
- */
- u8 pattern_filtering_enable;
- /* Enables/disables unicast packet pattern filtering. This flag
- * specifies whether we want to do pattern match on unicast packets
- * as well and not just broadcast packets. This flag has no effect
- * if the ucPatternFilteringEnable (main controlling flag) is set
- * to false
- */
- u8 ucast_pattern_filtering_enable;
- /* This configuration is valid only when magicPktEnable=1. It
- * requests hardware to wake up when it receives the Channel Switch
- * Action Frame.
- */
- u8 wow_channel_switch_receive;
- /* This configuration is valid only when magicPktEnable=1. It
- * requests hardware to wake up when it receives the
- * Deauthentication Frame.
- */
- u8 wow_deauth_receive;
- /* This configuration is valid only when magicPktEnable=1. It
- * requests hardware to wake up when it receives the Disassociation
- * Frame.
- */
- u8 wow_disassoc_receive;
- /* This configuration is valid only when magicPktEnable=1. It
- * requests hardware to wake up when it has missed consecutive
- * beacons. This is a hardware register configuration (NOT a
- * firmware configuration).
- */
- u8 wow_max_missed_beacons;
- /* This configuration is valid only when magicPktEnable=1. This is
- * a timeout value in units of microsec. It requests hardware to
- * unconditionally wake up after it has stayed in WoWLAN mode for
- * some time. Set 0 to disable this feature.
- */
- u8 wow_max_sleep;
- /* This configuration directs the WoW packet filtering to look for
- * EAP-ID requests embedded in EAPOL frames and use this as a wake
- * source.
- */
- u8 wow_eap_id_request_enable;
- /* This configuration directs the WoW packet filtering to look for
- * EAPOL-4WAY requests and use this as a wake source.
- */
- u8 wow_eapol_4way_enable;
- /* This configuration allows a host wakeup on an network scan
- * offload match.
- */
- u8 wow_net_scan_offload_match;
- /* This configuration allows a host wakeup on any GTK rekeying
- * error.
- */
- u8 wow_gtk_rekey_error;
- /* This configuration allows a host wakeup on BSS connection loss.
- */
- u8 wow_bss_connection_loss;
- u8 bss_index;
- };
- struct wcn36xx_hal_wowl_exit_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 bss_index;
- };
- struct wcn36xx_hal_get_rssi_req_msg {
- struct wcn36xx_hal_msg_header header;
- };
- struct wcn36xx_hal_get_roam_rssi_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Valid STA Idx for per STA stats request */
- u32 sta_id;
- };
- struct wcn36xx_hal_set_uapsd_ac_params_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* STA index */
- u8 sta_idx;
- /* Access Category */
- u8 ac;
- /* User Priority */
- u8 up;
- /* Service Interval */
- u32 service_interval;
- /* Suspend Interval */
- u32 suspend_interval;
- /* Delay Interval */
- u32 delay_interval;
- };
- struct wcn36xx_hal_configure_rxp_filter_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 set_mcst_bcst_filter_setting;
- u8 set_mcst_bcst_filter;
- };
- struct wcn36xx_hal_enter_imps_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_exit_imps_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_enter_bmps_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- u8 bss_index;
- } __packed;
- struct wcn36xx_hal_exit_bmps_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- u8 bss_index;
- } __packed;
- struct wcn36xx_hal_enter_uapsd_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- u8 bss_index;
- };
- struct wcn36xx_hal_exit_uapsd_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- u8 bss_index;
- };
- struct wcn36xx_hal_rssi_notification_ind_msg {
- struct wcn36xx_hal_msg_header header;
- u32 rssi_thres1_pos_cross:1;
- u32 rssi_thres1_neg_cross:1;
- u32 rssi_thres2_pos_cross:1;
- u32 rssi_thres2_neg_cross:1;
- u32 rssi_thres3_pos_cross:1;
- u32 rssi_thres3_neg_cross:1;
- u32 avg_rssi:8;
- u32 reserved:18;
- };
- struct wcn36xx_hal_get_rssio_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- s8 rssi;
- };
- struct wcn36xx_hal_get_roam_rssi_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- u8 sta_id;
- s8 rssi;
- };
- struct wcn36xx_hal_wowl_enter_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- u8 bss_index;
- };
- struct wcn36xx_hal_wowl_exit_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- u8 bss_index;
- };
- struct wcn36xx_hal_add_bcn_filter_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_rem_bcn_filter_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_add_wowl_bcast_ptrn_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- u8 bss_index;
- };
- struct wcn36xx_hal_del_wowl_bcast_ptrn_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- u8 bss_index;
- };
- struct wcn36xx_hal_host_offload_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_keep_alive_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_set_rssi_thresh_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_set_uapsd_ac_params_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_configure_rxp_filter_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct set_max_tx_pwr_req {
- struct wcn36xx_hal_msg_header header;
- /* BSSID is needed to identify which session issued this request.
- * As the request has power constraints, this should be applied
- * only to that session */
- u8 bssid[ETH_ALEN];
- u8 self_addr[ETH_ALEN];
- /* In request, power == MaxTx power to be used. */
- u8 power;
- };
- struct set_max_tx_pwr_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* power == tx power used for management frames */
- u8 power;
- /* success or failure */
- u32 status;
- };
- struct set_tx_pwr_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* TX Power in milli watts */
- u32 tx_power;
- u8 bss_index;
- };
- struct set_tx_pwr_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct get_tx_pwr_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 sta_id;
- };
- struct get_tx_pwr_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- /* TX Power in milli watts */
- u32 tx_power;
- };
- struct set_p2p_gonoa_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 opp_ps;
- u32 ct_window;
- u8 count;
- u32 duration;
- u32 interval;
- u32 single_noa_duration;
- u8 ps_selection;
- };
- struct set_p2p_gonoa_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_add_sta_self_req {
- struct wcn36xx_hal_msg_header header;
- u8 self_addr[ETH_ALEN];
- u32 status;
- } __packed;
- struct wcn36xx_hal_add_sta_self_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- /* Self STA Index */
- u8 self_sta_index;
- /* DPU Index (IGTK, PTK, GTK all same) */
- u8 dpu_index;
- /* DPU Signature */
- u8 dpu_signature;
- } __packed;
- struct wcn36xx_hal_del_sta_self_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 self_addr[ETH_ALEN];
- } __packed;
- struct wcn36xx_hal_del_sta_self_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /*success or failure */
- u32 status;
- u8 self_addr[ETH_ALEN];
- } __packed;
- struct aggr_add_ts_req {
- struct wcn36xx_hal_msg_header header;
- /* Station Index */
- u16 sta_idx;
- /* TSPEC handler uniquely identifying a TSPEC for a STA in a BSS.
- * This will carry the bitmap with the bit positions representing
- * different AC.s */
- u16 tspec_index;
- /* Tspec info per AC To program TPE with required parameters */
- struct wcn36xx_hal_tspec_ie tspec[WCN36XX_HAL_MAX_AC];
- /* U-APSD Flags: 1b per AC. Encoded as follows:
- b7 b6 b5 b4 b3 b2 b1 b0 =
- X X X X BE BK VI VO */
- u8 uapsd;
- /* These parameters are for all the access categories */
- /* Service Interval */
- u32 service_interval[WCN36XX_HAL_MAX_AC];
- /* Suspend Interval */
- u32 suspend_interval[WCN36XX_HAL_MAX_AC];
- /* Delay Interval */
- u32 delay_interval[WCN36XX_HAL_MAX_AC];
- };
- struct aggr_add_ts_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status0;
- /* FIXME PRIMA for future use for 11R */
- u32 status1;
- };
- struct wcn36xx_hal_configure_apps_cpu_wakeup_state_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 is_apps_cpu_awake;
- };
- struct wcn36xx_hal_configure_apps_cpu_wakeup_state_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_dump_cmd_req_msg {
- struct wcn36xx_hal_msg_header header;
- u32 arg1;
- u32 arg2;
- u32 arg3;
- u32 arg4;
- u32 arg5;
- } __packed;
- struct wcn36xx_hal_dump_cmd_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- /* Length of the responce message */
- u32 rsp_length;
- /* FIXME: Currently considering the the responce will be less than
- * 100bytes */
- u8 rsp_buffer[DUMPCMD_RSP_BUFFER];
- } __packed;
- #define WLAN_COEX_IND_DATA_SIZE (4)
- #define WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
- #define WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR (1)
- struct coex_ind_msg {
- struct wcn36xx_hal_msg_header header;
- /* Coex Indication Type */
- u32 type;
- /* Coex Indication Data */
- u32 data[WLAN_COEX_IND_DATA_SIZE];
- };
- struct wcn36xx_hal_tx_compl_ind_msg {
- struct wcn36xx_hal_msg_header header;
- /* Tx Complete Indication Success or Failure */
- u32 status;
- };
- struct wcn36xx_hal_wlan_host_suspend_ind_msg {
- struct wcn36xx_hal_msg_header header;
- u32 configured_mcst_bcst_filter_setting;
- u32 active_session_count;
- };
- struct wcn36xx_hal_wlan_exclude_unencrpted_ind_msg {
- struct wcn36xx_hal_msg_header header;
- u8 dot11_exclude_unencrypted;
- u8 bssid[ETH_ALEN];
- };
- struct noa_attr_ind_msg {
- struct wcn36xx_hal_msg_header header;
- u8 index;
- u8 opp_ps_flag;
- u16 ctwin;
- u16 noa1_interval_count;
- u16 bss_index;
- u32 noa1_duration;
- u32 noa1_interval;
- u32 noa1_starttime;
- u16 noa2_interval_count;
- u16 reserved2;
- u32 noa2_duration;
- u32 noa2_interval;
- u32 noa2_start_time;
- u32 status;
- };
- struct noa_start_ind_msg {
- struct wcn36xx_hal_msg_header header;
- u32 status;
- u32 bss_index;
- };
- struct wcn36xx_hal_wlan_host_resume_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 configured_mcst_bcst_filter_setting;
- };
- struct wcn36xx_hal_host_resume_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct wcn36xx_hal_del_ba_ind_msg {
- struct wcn36xx_hal_msg_header header;
- u16 sta_idx;
- /* Peer MAC Address, whose BA session has timed out */
- u8 peer_addr[ETH_ALEN];
- /* TID for which a BA session timeout is being triggered */
- u8 ba_tid;
- /* DELBA direction
- * 1 - Originator
- * 0 - Recipient
- */
- u8 direction;
- u32 reason_code;
- /* TO SUPPORT BT-AMP */
- u8 bssid[ETH_ALEN];
- };
- /* PNO Messages */
- /* Max number of channels that a network can be found on */
- #define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS 26
- /* Max number of channels that a network can be found on */
- #define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX 60
- /* Maximum numbers of networks supported by PNO */
- #define WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS 16
- /* The number of scan time intervals that can be programmed into PNO */
- #define WCN36XX_HAL_PNO_MAX_SCAN_TIMERS 10
- /* Maximum size of the probe template */
- #define WCN36XX_HAL_PNO_MAX_PROBE_SIZE 450
- /* Type of PNO enabling:
- *
- * Immediate - scanning will start immediately and PNO procedure will be
- * repeated based on timer
- *
- * Suspend - scanning will start at suspend
- *
- * Resume - scanning will start on system resume
- */
- enum pno_mode {
- PNO_MODE_IMMEDIATE,
- PNO_MODE_ON_SUSPEND,
- PNO_MODE_ON_RESUME,
- PNO_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- /* Authentication type */
- enum auth_type {
- AUTH_TYPE_ANY = 0,
- AUTH_TYPE_OPEN_SYSTEM = 1,
- /* Upper layer authentication types */
- AUTH_TYPE_WPA = 2,
- AUTH_TYPE_WPA_PSK = 3,
- AUTH_TYPE_RSN = 4,
- AUTH_TYPE_RSN_PSK = 5,
- AUTH_TYPE_FT_RSN = 6,
- AUTH_TYPE_FT_RSN_PSK = 7,
- AUTH_TYPE_WAPI_WAI_CERTIFICATE = 8,
- AUTH_TYPE_WAPI_WAI_PSK = 9,
- AUTH_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- /* Encryption type */
- enum ed_type {
- ED_ANY = 0,
- ED_NONE = 1,
- ED_WEP = 2,
- ED_TKIP = 3,
- ED_CCMP = 4,
- ED_WPI = 5,
- ED_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- /* SSID broadcast type */
- enum ssid_bcast_type {
- BCAST_UNKNOWN = 0,
- BCAST_NORMAL = 1,
- BCAST_HIDDEN = 2,
- BCAST_TYPE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
- };
- /* The network description for which PNO will have to look for */
- struct network_type {
- /* SSID of the BSS */
- struct wcn36xx_hal_mac_ssid ssid;
- /* Authentication type for the network */
- enum auth_type authentication;
- /* Encryption type for the network */
- enum ed_type encryption;
- /* Indicate the channel on which the Network can be found 0 - if
- * all channels */
- u8 channel_count;
- u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];
- /* Indicates the RSSI threshold for the network to be considered */
- u8 rssi_threshold;
- };
- struct scan_timer {
- /* How much it should wait */
- u32 value;
- /* How many times it should repeat that wait value 0 - keep using
- * this timer until PNO is disabled */
- u32 repeat;
- /* e.g: 2 3 4 0 - it will wait 2s between consecutive scans for 3
- * times - after that it will wait 4s between consecutive scans
- * until disabled */
- };
- /* The network parameters to be sent to the PNO algorithm */
- struct scan_timers_type {
- /* set to 0 if you wish for PNO to use its default telescopic timer */
- u8 count;
- /* A set value represents the amount of time that PNO will wait
- * between two consecutive scan procedures If the desired is for a
- * uniform timer that fires always at the exact same interval - one
- * single value is to be set If there is a desire for a more
- * complex - telescopic like timer multiple values can be set -
- * once PNO reaches the end of the array it will continue scanning
- * at intervals presented by the last value */
- struct scan_timer values[WCN36XX_HAL_PNO_MAX_SCAN_TIMERS];
- };
- /* Preferred network list request */
- struct set_pref_netw_list_req {
- struct wcn36xx_hal_msg_header header;
- /* Enable PNO */
- u32 enable;
- /* Immediate, On Suspend, On Resume */
- enum pno_mode mode;
- /* Number of networks sent for PNO */
- u32 networks_count;
- /* The networks that PNO needs to look for */
- struct network_type networks[WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS];
- /* The scan timers required for PNO */
- struct scan_timers_type scan_timers;
- /* Probe template for 2.4GHz band */
- u16 band_24g_probe_size;
- u8 band_24g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
- /* Probe template for 5GHz band */
- u16 band_5g_probe_size;
- u8 band_5g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
- };
- /* The network description for which PNO will have to look for */
- struct network_type_new {
- /* SSID of the BSS */
- struct wcn36xx_hal_mac_ssid ssid;
- /* Authentication type for the network */
- enum auth_type authentication;
- /* Encryption type for the network */
- enum ed_type encryption;
- /* SSID broadcast type, normal, hidden or unknown */
- enum ssid_bcast_type bcast_network_type;
- /* Indicate the channel on which the Network can be found 0 - if
- * all channels */
- u8 channel_count;
- u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];
- /* Indicates the RSSI threshold for the network to be considered */
- u8 rssi_threshold;
- };
- /* Preferred network list request new */
- struct set_pref_netw_list_req_new {
- struct wcn36xx_hal_msg_header header;
- /* Enable PNO */
- u32 enable;
- /* Immediate, On Suspend, On Resume */
- enum pno_mode mode;
- /* Number of networks sent for PNO */
- u32 networks_count;
- /* The networks that PNO needs to look for */
- struct network_type_new networks[WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS];
- /* The scan timers required for PNO */
- struct scan_timers_type scan_timers;
- /* Probe template for 2.4GHz band */
- u16 band_24g_probe_size;
- u8 band_24g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
- /* Probe template for 5GHz band */
- u16 band_5g_probe_size;
- u8 band_5g_probe_template[WCN36XX_HAL_PNO_MAX_PROBE_SIZE];
- };
- /* Preferred network list response */
- struct set_pref_netw_list_resp {
- struct wcn36xx_hal_msg_header header;
- /* status of the request - just to indicate that PNO has
- * acknowledged the request and will start scanning */
- u32 status;
- };
- /* Preferred network found indication */
- struct pref_netw_found_ind {
- struct wcn36xx_hal_msg_header header;
- /* Network that was found with the highest RSSI */
- struct wcn36xx_hal_mac_ssid ssid;
- /* Indicates the RSSI */
- u8 rssi;
- };
- /* RSSI Filter request */
- struct set_rssi_filter_req {
- struct wcn36xx_hal_msg_header header;
- /* RSSI Threshold */
- u8 rssi_threshold;
- };
- /* Set RSSI filter resp */
- struct set_rssi_filter_resp {
- struct wcn36xx_hal_msg_header header;
- /* status of the request */
- u32 status;
- };
- /* Update scan params - sent from host to PNO to be used during PNO
- * scanningx */
- struct wcn36xx_hal_update_scan_params_req {
- struct wcn36xx_hal_msg_header header;
- /* Host setting for 11d */
- u8 dot11d_enabled;
- /* Lets PNO know that host has determined the regulatory domain */
- u8 dot11d_resolved;
- /* Channels on which PNO is allowed to scan */
- u8 channel_count;
- u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];
- /* Minimum channel time */
- u16 active_min_ch_time;
- /* Maximum channel time */
- u16 active_max_ch_time;
- /* Minimum channel time */
- u16 passive_min_ch_time;
- /* Maximum channel time */
- u16 passive_max_ch_time;
- /* Cb State */
- enum phy_chan_bond_state state;
- } __packed;
- /* Update scan params - sent from host to PNO to be used during PNO
- * scanningx */
- struct update_scan_params_req_ex {
- struct wcn36xx_hal_msg_header header;
- /* Host setting for 11d */
- u8 dot11d_enabled;
- /* Lets PNO know that host has determined the regulatory domain */
- u8 dot11d_resolved;
- /* Channels on which PNO is allowed to scan */
- u8 channel_count;
- u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX];
- /* Minimum channel time */
- u16 active_min_ch_time;
- /* Maximum channel time */
- u16 active_max_ch_time;
- /* Minimum channel time */
- u16 passive_min_ch_time;
- /* Maximum channel time */
- u16 passive_max_ch_time;
- /* Cb State */
- enum phy_chan_bond_state state;
- };
- /* Update scan params - sent from host to PNO to be used during PNO
- * scanningx */
- struct wcn36xx_hal_update_scan_params_resp {
- struct wcn36xx_hal_msg_header header;
- /* status of the request */
- u32 status;
- } __packed;
- struct wcn36xx_hal_set_tx_per_tracking_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* 0: disable, 1:enable */
- u8 tx_per_tracking_enable;
- /* Check period, unit is sec. */
- u8 tx_per_tracking_period;
- /* (Fail TX packet)/(Total TX packet) ratio, the unit is 10%. */
- u8 tx_per_tracking_ratio;
- /* A watermark of check number, once the tx packet exceed this
- * number, we do the check, default is 5 */
- u32 tx_per_tracking_watermark;
- };
- struct wcn36xx_hal_set_tx_per_tracking_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- struct tx_per_hit_ind_msg {
- struct wcn36xx_hal_msg_header header;
- };
- /* Packet Filtering Definitions Begin */
- #define WCN36XX_HAL_PROTOCOL_DATA_LEN 8
- #define WCN36XX_HAL_MAX_NUM_MULTICAST_ADDRESS 240
- #define WCN36XX_HAL_MAX_NUM_FILTERS 20
- #define WCN36XX_HAL_MAX_CMP_PER_FILTER 10
- enum wcn36xx_hal_receive_packet_filter_type {
- HAL_RCV_FILTER_TYPE_INVALID,
- HAL_RCV_FILTER_TYPE_FILTER_PKT,
- HAL_RCV_FILTER_TYPE_BUFFER_PKT,
- HAL_RCV_FILTER_TYPE_MAX_ENUM_SIZE
- };
- enum wcn36xx_hal_rcv_pkt_flt_protocol_type {
- HAL_FILTER_PROTO_TYPE_INVALID,
- HAL_FILTER_PROTO_TYPE_MAC,
- HAL_FILTER_PROTO_TYPE_ARP,
- HAL_FILTER_PROTO_TYPE_IPV4,
- HAL_FILTER_PROTO_TYPE_IPV6,
- HAL_FILTER_PROTO_TYPE_UDP,
- HAL_FILTER_PROTO_TYPE_MAX
- };
- enum wcn36xx_hal_rcv_pkt_flt_cmp_flag_type {
- HAL_FILTER_CMP_TYPE_INVALID,
- HAL_FILTER_CMP_TYPE_EQUAL,
- HAL_FILTER_CMP_TYPE_MASK_EQUAL,
- HAL_FILTER_CMP_TYPE_NOT_EQUAL,
- HAL_FILTER_CMP_TYPE_MAX
- };
- struct wcn36xx_hal_rcv_pkt_filter_params {
- u8 protocol_layer;
- u8 cmp_flag;
- /* Length of the data to compare */
- u16 data_length;
- /* from start of the respective frame header */
- u8 data_offset;
- /* Reserved field */
- u8 reserved;
- /* Data to compare */
- u8 compare_data[WCN36XX_HAL_PROTOCOL_DATA_LEN];
- /* Mask to be applied on the received packet data before compare */
- u8 data_mask[WCN36XX_HAL_PROTOCOL_DATA_LEN];
- };
- struct wcn36xx_hal_sessionized_rcv_pkt_filter_cfg_type {
- u8 id;
- u8 type;
- u8 params_count;
- u32 coleasce_time;
- u8 bss_index;
- struct wcn36xx_hal_rcv_pkt_filter_params params[1];
- };
- struct wcn36xx_hal_set_rcv_pkt_filter_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 id;
- u8 type;
- u8 params_count;
- u32 coalesce_time;
- struct wcn36xx_hal_rcv_pkt_filter_params params[1];
- };
- struct wcn36xx_hal_rcv_flt_mc_addr_list_type {
- /* from start of the respective frame header */
- u8 data_offset;
- u32 mc_addr_count;
- u8 mc_addr[ETH_ALEN][WCN36XX_HAL_MAX_NUM_MULTICAST_ADDRESS];
- u8 bss_index;
- };
- struct wcn36xx_hal_set_pkt_filter_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- u8 bss_index;
- };
- struct wcn36xx_hal_rcv_flt_pkt_match_cnt_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 bss_index;
- };
- struct wcn36xx_hal_rcv_flt_pkt_match_cnt {
- u8 id;
- u32 match_cnt;
- };
- struct wcn36xx_hal_rcv_flt_pkt_match_cnt_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* Success or Failure */
- u32 status;
- u32 match_count;
- struct wcn36xx_hal_rcv_flt_pkt_match_cnt
- matches[WCN36XX_HAL_MAX_NUM_FILTERS];
- u8 bss_index;
- };
- struct wcn36xx_hal_rcv_flt_pkt_clear_param {
- /* only valid for response message */
- u32 status;
- u8 id;
- u8 bss_index;
- };
- struct wcn36xx_hal_rcv_flt_pkt_clear_req_msg {
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_rcv_flt_pkt_clear_param param;
- };
- struct wcn36xx_hal_rcv_flt_pkt_clear_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_rcv_flt_pkt_clear_param param;
- };
- struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_req_msg {
- struct wcn36xx_hal_msg_header header;
- struct wcn36xx_hal_rcv_flt_mc_addr_list_type mc_addr_list;
- };
- struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- u32 status;
- u8 bss_index;
- };
- /* Packet Filtering Definitions End */
- struct wcn36xx_hal_set_power_params_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Ignore DTIM */
- u32 ignore_dtim;
- /* DTIM Period */
- u32 dtim_period;
- /* Listen Interval */
- u32 listen_interval;
- /* Broadcast Multicast Filter */
- u32 bcast_mcast_filter;
- /* Beacon Early Termination */
- u32 enable_bet;
- /* Beacon Early Termination Interval */
- u32 bet_interval;
- } __packed;
- struct wcn36xx_hal_set_power_params_resp {
- struct wcn36xx_hal_msg_header header;
- /* status of the request */
- u32 status;
- } __packed;
- /* Capability bitmap exchange definitions and macros starts */
- enum place_holder_in_cap_bitmap {
- MCC = 0,
- P2P = 1,
- DOT11AC = 2,
- SLM_SESSIONIZATION = 3,
- DOT11AC_OPMODE = 4,
- SAP32STA = 5,
- TDLS = 6,
- P2P_GO_NOA_DECOUPLE_INIT_SCAN = 7,
- WLANACTIVE_OFFLOAD = 8,
- BEACON_OFFLOAD = 9,
- SCAN_OFFLOAD = 10,
- ROAM_OFFLOAD = 11,
- BCN_MISS_OFFLOAD = 12,
- STA_POWERSAVE = 13,
- STA_ADVANCED_PWRSAVE = 14,
- AP_UAPSD = 15,
- AP_DFS = 16,
- BLOCKACK = 17,
- PHY_ERR = 18,
- BCN_FILTER = 19,
- RTT = 20,
- RATECTRL = 21,
- WOW = 22,
- MAX_FEATURE_SUPPORTED = 128,
- };
- #define WCN36XX_HAL_CAPS_SIZE 4
- struct wcn36xx_hal_feat_caps_msg {
- struct wcn36xx_hal_msg_header header;
- u32 feat_caps[WCN36XX_HAL_CAPS_SIZE];
- } __packed;
- /* status codes to help debug rekey failures */
- enum gtk_rekey_status {
- WCN36XX_HAL_GTK_REKEY_STATUS_SUCCESS = 0,
- /* rekey detected, but not handled */
- WCN36XX_HAL_GTK_REKEY_STATUS_NOT_HANDLED = 1,
- /* MIC check error on M1 */
- WCN36XX_HAL_GTK_REKEY_STATUS_MIC_ERROR = 2,
- /* decryption error on M1 */
- WCN36XX_HAL_GTK_REKEY_STATUS_DECRYPT_ERROR = 3,
- /* M1 replay detected */
- WCN36XX_HAL_GTK_REKEY_STATUS_REPLAY_ERROR = 4,
- /* missing GTK key descriptor in M1 */
- WCN36XX_HAL_GTK_REKEY_STATUS_MISSING_KDE = 5,
- /* missing iGTK key descriptor in M1 */
- WCN36XX_HAL_GTK_REKEY_STATUS_MISSING_IGTK_KDE = 6,
- /* key installation error */
- WCN36XX_HAL_GTK_REKEY_STATUS_INSTALL_ERROR = 7,
- /* iGTK key installation error */
- WCN36XX_HAL_GTK_REKEY_STATUS_IGTK_INSTALL_ERROR = 8,
- /* GTK rekey M2 response TX error */
- WCN36XX_HAL_GTK_REKEY_STATUS_RESP_TX_ERROR = 9,
- /* non-specific general error */
- WCN36XX_HAL_GTK_REKEY_STATUS_GEN_ERROR = 255
- };
- /* wake reason types */
- enum wake_reason_type {
- WCN36XX_HAL_WAKE_REASON_NONE = 0,
- /* magic packet match */
- WCN36XX_HAL_WAKE_REASON_MAGIC_PACKET = 1,
- /* host defined pattern match */
- WCN36XX_HAL_WAKE_REASON_PATTERN_MATCH = 2,
- /* EAP-ID frame detected */
- WCN36XX_HAL_WAKE_REASON_EAPID_PACKET = 3,
- /* start of EAPOL 4-way handshake detected */
- WCN36XX_HAL_WAKE_REASON_EAPOL4WAY_PACKET = 4,
- /* network scan offload match */
- WCN36XX_HAL_WAKE_REASON_NETSCAN_OFFL_MATCH = 5,
- /* GTK rekey status wakeup (see status) */
- WCN36XX_HAL_WAKE_REASON_GTK_REKEY_STATUS = 6,
- /* BSS connection lost */
- WCN36XX_HAL_WAKE_REASON_BSS_CONN_LOST = 7,
- };
- /*
- Wake Packet which is saved at tWakeReasonParams.DataStart
- This data is sent for any wake reasons that involve a packet-based wakeup :
- WCN36XX_HAL_WAKE_REASON_TYPE_MAGIC_PACKET
- WCN36XX_HAL_WAKE_REASON_TYPE_PATTERN_MATCH
- WCN36XX_HAL_WAKE_REASON_TYPE_EAPID_PACKET
- WCN36XX_HAL_WAKE_REASON_TYPE_EAPOL4WAY_PACKET
- WCN36XX_HAL_WAKE_REASON_TYPE_GTK_REKEY_STATUS
- The information is provided to the host for auditing and debug purposes
- */
- /* Wake reason indication */
- struct wcn36xx_hal_wake_reason_ind {
- struct wcn36xx_hal_msg_header header;
- /* see tWakeReasonType */
- u32 reason;
- /* argument specific to the reason type */
- u32 reason_arg;
- /* length of optional data stored in this message, in case HAL
- * truncates the data (i.e. data packets) this length will be less
- * than the actual length */
- u32 stored_data_len;
- /* actual length of data */
- u32 actual_data_len;
- /* variable length start of data (length == storedDataLen) see
- * specific wake type */
- u8 data_start[1];
- u32 bss_index:8;
- u32 reserved:24;
- };
- #define WCN36XX_HAL_GTK_KEK_BYTES 16
- #define WCN36XX_HAL_GTK_KCK_BYTES 16
- #define WCN36XX_HAL_GTK_OFFLOAD_FLAGS_DISABLE (1 << 0)
- #define GTK_SET_BSS_KEY_TAG 0x1234AA55
- struct wcn36xx_hal_gtk_offload_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* optional flags */
- u32 flags;
- /* Key confirmation key */
- u8 kck[WCN36XX_HAL_GTK_KCK_BYTES];
- /* key encryption key */
- u8 kek[WCN36XX_HAL_GTK_KEK_BYTES];
- /* replay counter */
- u64 key_replay_counter;
- u8 bss_index;
- };
- struct wcn36xx_hal_gtk_offload_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- u8 bss_index;
- };
- struct wcn36xx_hal_gtk_offload_get_info_req_msg {
- struct wcn36xx_hal_msg_header header;
- u8 bss_index;
- };
- struct wcn36xx_hal_gtk_offload_get_info_rsp_msg {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- /* last rekey status when the rekey was offloaded */
- u32 last_rekey_status;
- /* current replay counter value */
- u64 key_replay_counter;
- /* total rekey attempts */
- u32 total_rekey_count;
- /* successful GTK rekeys */
- u32 gtk_rekey_count;
- /* successful iGTK rekeys */
- u32 igtk_rekey_count;
- u8 bss_index;
- };
- struct dhcp_info {
- /* Indicates the device mode which indicates about the DHCP activity */
- u8 device_mode;
- u8 addr[ETH_ALEN];
- };
- struct dhcp_ind_status {
- struct wcn36xx_hal_msg_header header;
- /* success or failure */
- u32 status;
- };
- /*
- * Thermal Mitigation mode of operation.
- *
- * WCN36XX_HAL_THERMAL_MITIGATION_MODE_0 - Based on AMPDU disabling aggregation
- *
- * WCN36XX_HAL_THERMAL_MITIGATION_MODE_1 - Based on AMPDU disabling aggregation
- * and reducing transmit power
- *
- * WCN36XX_HAL_THERMAL_MITIGATION_MODE_2 - Not supported */
- enum wcn36xx_hal_thermal_mitigation_mode_type {
- HAL_THERMAL_MITIGATION_MODE_INVALID = -1,
- HAL_THERMAL_MITIGATION_MODE_0,
- HAL_THERMAL_MITIGATION_MODE_1,
- HAL_THERMAL_MITIGATION_MODE_2,
- HAL_THERMAL_MITIGATION_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
- };
- /*
- * Thermal Mitigation level.
- * Note the levels are incremental i.e WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_2 =
- * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_0 +
- * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_1
- *
- * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_0 - lowest level of thermal mitigation.
- * This level indicates normal mode of operation
- *
- * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_1 - 1st level of thermal mitigation
- *
- * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_2 - 2nd level of thermal mitigation
- *
- * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_3 - 3rd level of thermal mitigation
- *
- * WCN36XX_HAL_THERMAL_MITIGATION_LEVEL_4 - 4th level of thermal mitigation
- */
- enum wcn36xx_hal_thermal_mitigation_level_type {
- HAL_THERMAL_MITIGATION_LEVEL_INVALID = -1,
- HAL_THERMAL_MITIGATION_LEVEL_0,
- HAL_THERMAL_MITIGATION_LEVEL_1,
- HAL_THERMAL_MITIGATION_LEVEL_2,
- HAL_THERMAL_MITIGATION_LEVEL_3,
- HAL_THERMAL_MITIGATION_LEVEL_4,
- HAL_THERMAL_MITIGATION_LEVEL_MAX = WCN36XX_HAL_MAX_ENUM_SIZE,
- };
- /* WCN36XX_HAL_SET_THERMAL_MITIGATION_REQ */
- struct set_thermal_mitigation_req_msg {
- struct wcn36xx_hal_msg_header header;
- /* Thermal Mitigation Operation Mode */
- enum wcn36xx_hal_thermal_mitigation_mode_type mode;
- /* Thermal Mitigation Level */
- enum wcn36xx_hal_thermal_mitigation_level_type level;
- };
- struct set_thermal_mitigation_resp {
- struct wcn36xx_hal_msg_header header;
- /* status of the request */
- u32 status;
- };
- /* Per STA Class B Statistics. Class B statistics are STA TX/RX stats
- * provided to FW from Host via periodic messages */
- struct stats_class_b_ind {
- struct wcn36xx_hal_msg_header header;
- /* Duration over which this stats was collected */
- u32 duration;
- /* Per STA Stats */
- /* TX stats */
- u32 tx_bytes_pushed;
- u32 tx_packets_pushed;
- /* RX stats */
- u32 rx_bytes_rcvd;
- u32 rx_packets_rcvd;
- u32 rx_time_total;
- };
- #endif /* _HAL_H_ */
|