wmi_unified.h 635 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929
  1. /*
  2. * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. /**
  27. * @addtogroup WMIAPI
  28. ***@{
  29. */
  30. /** @file
  31. * This file specifies the WMI interface for the Software Architecture.
  32. *
  33. * It includes definitions of all the commands and events. Commands are messages
  34. * from the host to the target. Events and Replies are messages from the target
  35. * to the host.
  36. *
  37. * Ownership of correctness in regards to WMI commands
  38. * belongs to the host driver and the target is not required to validate
  39. * parameters for value, proper range, or any other checking.
  40. *
  41. * Guidelines for extending this interface are below.
  42. *
  43. * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
  44. * 2. Use ONLY A_UINT32 type for defining member variables within WMI command/event
  45. * structures. Do not use A_UINT8, A_UINT16, A_BOOL or enum types within these structures.
  46. * 3. DO NOT define bit fields within structures. Implement bit fields using masks
  47. * if necessary. Do not use the programming language's bit field definition.
  48. * 4. Define macros for encode/decode of A_UINT8, A_UINT16 fields within the A_UINT32
  49. * variables. Use these macros for set/get of these fields. Try to use this to
  50. * optimize the structure without bloating it with A_UINT32 variables for every lower
  51. * sized field.
  52. * 5. Do not use PACK/UNPACK attributes for the structures as each member variable is
  53. * already 4-byte aligned by virtue of being a A_UINT32 type.
  54. * 6. Comment each parameter part of the WMI command/event structure by using the
  55. * 2 stars at the begining of C comment instead of one star to enable HTML document
  56. * generation using Doxygen.
  57. *
  58. */
  59. #ifndef _WMI_UNIFIED_H_
  60. #define _WMI_UNIFIED_H_
  61. #ifdef __cplusplus
  62. extern "C" {
  63. #endif
  64. #include <wlan_defs.h>
  65. #include <wmi_services.h>
  66. #include <dbglog.h>
  67. #define ATH_MAC_LEN 6 /**< length of MAC in bytes */
  68. #define WMI_EVENT_STATUS_SUCCESS 0 /* Success return status to host */
  69. #define WMI_EVENT_STATUS_FAILURE 1 /* Failure return status to host */
  70. #define MAX_TX_RATE_VALUES 10 /*Max Tx Rates */
  71. #define MAX_RSSI_VALUES 10 /*Max Rssi values */
  72. #define WMI_MAX_CHAINS 8
  73. /* The WLAN_MAX_AC macro cannot be changed without breaking
  74. * WMI compatibility.
  75. * The maximum value of access category
  76. */
  77. #define WLAN_MAX_AC 4
  78. /*
  79. * These don't necessarily belong here; but as the MS/SM macros require
  80. * ar6000_internal.h to be included, it may not be defined as yet.
  81. */
  82. #define WMI_F_MS(_v, _f) \
  83. (((_v) & (_f)) >> (_f ## _S))
  84. /*
  85. * This breaks the "good macro practice" of only referencing each
  86. * macro field once (to avoid things like field++ from causing issues.)
  87. */
  88. #define WMI_F_RMW(_var, _v, _f) \
  89. do { \
  90. (_var) &= ~(_f); \
  91. (_var) |= (((_v) << (_f ## _S)) & (_f)); \
  92. } while (0)
  93. #define WMI_GET_BITS(_val, _index, _num_bits) \
  94. (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))
  95. #define WMI_SET_BITS(_var, _index, _num_bits, _val) do { \
  96. (_var) &= ~(((1 << (_num_bits)) - 1) << (_index)); \
  97. (_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \
  98. } while (0)
  99. /**
  100. * A packed array is an array where each entry in the array is less than
  101. * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array.
  102. * For example, if each entry in the array is 11 bits, then you can stuff
  103. * an array of 4 11-bit values into an array of 2 A_UINT32 values.
  104. * The first 2 11-bit values will be stored in the first A_UINT32,
  105. * and the last 2 11-bit values will be stored in the second A_UINT32.
  106. */
  107. #define WMI_PACKED_ARR_SIZE(num_entries, bits_per_entry) \
  108. (((num_entries) / (32 / (bits_per_entry))) + \
  109. (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
  110. static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
  111. A_UINT32 entry_index, A_UINT32 bits_per_entry)
  112. {
  113. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  114. A_UINT32 uint_index = (entry_index / entries_per_uint);
  115. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  116. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  117. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  118. return (arr[uint_index] >> start_bit_in_uint) &
  119. ((1 << bits_per_entry) - 1);
  120. }
  121. static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
  122. A_UINT32 bits_per_entry, A_UINT32 val)
  123. {
  124. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  125. A_UINT32 uint_index = (entry_index / entries_per_uint);
  126. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  127. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  128. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  129. arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint);
  130. arr[uint_index] |=
  131. ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint);
  132. }
  133. /** 2 word representation of MAC addr */
  134. typedef struct {
  135. /** upper 4 bytes of MAC address */
  136. A_UINT32 mac_addr31to0;
  137. /** lower 2 bytes of MAC address */
  138. A_UINT32 mac_addr47to32;
  139. } wmi_mac_addr;
  140. /** macro to convert MAC address from WMI word format to char array */
  141. #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \
  142. (c_macaddr)[0] = ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \
  143. (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
  144. (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
  145. (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
  146. (c_macaddr)[4] = ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \
  147. (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
  148. } while (0)
  149. /** macro to convert MAC address from char array to WMI word format */
  150. #define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr, pwmi_mac_addr) do { \
  151. (pwmi_mac_addr)->mac_addr31to0 = \
  152. ((c_macaddr)[0] | ((c_macaddr)[1] << 8) \
  153. | ((c_macaddr)[2] << 16) | ((c_macaddr)[3] << 24)); \
  154. (pwmi_mac_addr)->mac_addr47to32 = \
  155. ((c_macaddr)[4] | ((c_macaddr)[5] << 8)); \
  156. } while (0)
  157. /*
  158. * wmi command groups.
  159. */
  160. typedef enum {
  161. /* 0 to 2 are reserved */
  162. WMI_GRP_START = 0x3,
  163. WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
  164. WMI_GRP_PDEV, /* 0x4 */
  165. WMI_GRP_VDEV, /* 0x5 */
  166. WMI_GRP_PEER, /* 0x6 */
  167. WMI_GRP_MGMT, /* 0x7 */
  168. WMI_GRP_BA_NEG, /* 0x8 */
  169. WMI_GRP_STA_PS, /* 0x9 */
  170. WMI_GRP_DFS, /* 0xa */
  171. WMI_GRP_ROAM, /* 0xb */
  172. WMI_GRP_OFL_SCAN, /* 0xc */
  173. WMI_GRP_P2P, /* 0xd */
  174. WMI_GRP_AP_PS, /* 0xe */
  175. WMI_GRP_RATE_CTRL, /* 0xf */
  176. WMI_GRP_PROFILE, /* 0x10 */
  177. WMI_GRP_SUSPEND, /* 0x11 */
  178. WMI_GRP_BCN_FILTER, /* 0x12 */
  179. WMI_GRP_WOW, /* 0x13 */
  180. WMI_GRP_RTT, /* 0x14 */
  181. WMI_GRP_SPECTRAL, /* 0x15 */
  182. WMI_GRP_STATS, /* 0x16 */
  183. WMI_GRP_ARP_NS_OFL, /* 0x17 */
  184. WMI_GRP_NLO_OFL, /* 0x18 */
  185. WMI_GRP_GTK_OFL, /* 0x19 */
  186. WMI_GRP_CSA_OFL, /* 0x1a */
  187. WMI_GRP_CHATTER, /* 0x1b */
  188. WMI_GRP_TID_ADDBA, /* 0x1c */
  189. WMI_GRP_MISC, /* 0x1d */
  190. WMI_GRP_GPIO, /* 0x1e */
  191. WMI_GRP_FWTEST, /* 0x1f */
  192. WMI_GRP_TDLS, /* 0x20 */
  193. WMI_GRP_RESMGR, /* 0x21 */
  194. WMI_GRP_STA_SMPS, /* 0x22 */
  195. WMI_GRP_WLAN_HB, /* 0x23 */
  196. WMI_GRP_RMC, /* 0x24 */
  197. WMI_GRP_MHF_OFL, /* 0x25 */
  198. WMI_GRP_LOCATION_SCAN, /* 0x26 */
  199. WMI_GRP_OEM, /* 0x27 */
  200. WMI_GRP_NAN, /* 0x28 */
  201. WMI_GRP_COEX, /* 0x29 */
  202. WMI_GRP_OBSS_OFL, /* 0x2a */
  203. WMI_GRP_LPI, /* 0x2b */
  204. WMI_GRP_EXTSCAN, /* 0x2c */
  205. WMI_GRP_DHCP_OFL, /* 0x2d */
  206. WMI_GRP_IPA, /* 0x2e */
  207. WMI_GRP_MDNS_OFL, /* 0x2f */
  208. WMI_GRP_SAP_OFL, /* 0x30 */
  209. WMI_GRP_OCB, /* 0x31 */
  210. WMI_GRP_SOC, /* 0x32 */
  211. WMI_GRP_PKT_FILTER, /* 0x33 */
  212. WMI_GRP_MAWC, /* 0x34 */
  213. WMI_GRP_PMF_OFFLOAD, /* 0x35 */
  214. WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
  215. WMI_GRP_NAN_DATA, /* 0x37 */
  216. WMI_GRP_PROTOTYPE, /* 0x38 */
  217. WMI_GRP_MONITOR, /* 0x39 */
  218. } WMI_GRP_ID;
  219. #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  220. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  221. /**
  222. * Command IDs and commange events
  223. */
  224. typedef enum {
  225. /** initialize the wlan sub system */
  226. WMI_INIT_CMDID = 0x1,
  227. /* Scan specific commands */
  228. /** start scan request to FW */
  229. WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
  230. /** stop scan request to FW */
  231. WMI_STOP_SCAN_CMDID,
  232. /** full list of channels as defined by the regulatory that will be used by scanner */
  233. WMI_SCAN_CHAN_LIST_CMDID,
  234. /** overwrite default priority table in scan scheduler */
  235. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  236. /** This command to adjust the priority and min.max_rest_time
  237. * of an on ongoing scan request.
  238. */
  239. WMI_SCAN_UPDATE_REQUEST_CMDID,
  240. /** set OUI to be used in probe request if enabled */
  241. WMI_SCAN_PROB_REQ_OUI_CMDID,
  242. /** config adaptive dwell scan */
  243. WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
  244. /* PDEV(physical device) specific commands */
  245. /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
  246. WMI_PDEV_SET_REGDOMAIN_CMDID =
  247. WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
  248. /** set channel. mainly used for supporting monitor mode */
  249. WMI_PDEV_SET_CHANNEL_CMDID,
  250. /** set pdev specific parameters */
  251. WMI_PDEV_SET_PARAM_CMDID,
  252. /** enable packet log */
  253. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  254. /** disable packet log*/
  255. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  256. /** set wmm parameters */
  257. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  258. /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
  259. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  260. /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
  261. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  262. /** Command to send the DSCP-to-TID map to the target */
  263. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  264. /** set quiet ie parameters. primarily used in AP mode */
  265. WMI_PDEV_SET_QUIET_MODE_CMDID,
  266. /** Enable/Disable Green AP Power Save */
  267. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  268. /** get TPC config for the current operating channel */
  269. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  270. /** set the base MAC address for the physical device before a VDEV is created.
  271. * For firmware that doesn't support this feature and this command, the pdev
  272. * MAC address will not be changed. */
  273. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  274. /* eeprom content dump , the same to bdboard data */
  275. WMI_PDEV_DUMP_CMDID,
  276. /* set LED configuration */
  277. WMI_PDEV_SET_LED_CONFIG_CMDID,
  278. /* Get Current temprature of chip in Celcius degree */
  279. WMI_PDEV_GET_TEMPERATURE_CMDID,
  280. /* Set LED flashing behavior */
  281. WMI_PDEV_SET_LED_FLASHING_CMDID,
  282. /** Enable/Disable Smart Antenna */
  283. WMI_PDEV_SMART_ANT_ENABLE_CMDID,
  284. /** Set Smart Antenna RX antenna*/
  285. WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  286. /** Override the antenna switch table */
  287. WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  288. /** Override the CTL table */
  289. WMI_PDEV_SET_CTL_TABLE_CMDID,
  290. /** Override the array gain table */
  291. WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  292. /** FIPS test mode command */
  293. WMI_PDEV_FIPS_CMDID,
  294. /** get CCK ANI level */
  295. WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
  296. /** get OFDM ANI level */
  297. WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
  298. /** NF Cal Power dBr/dBm */
  299. WMI_PDEV_GET_NFCAL_POWER_CMDID,
  300. /** TxPPDU TPC */
  301. WMI_PDEV_GET_TPC_CMDID,
  302. /* Set to enable MIB stats collection */
  303. WMI_MIB_STATS_ENABLE_CMDID,
  304. /** Set preferred channel list for DBS Mgr */
  305. WMI_PDEV_SET_PCL_CMDID,
  306. /** Set HW mode. Eg: single MAC, DBS & SBS,
  307. * see soc_hw_mode_t for values
  308. */
  309. WMI_PDEV_SET_HW_MODE_CMDID,
  310. /** Set DFS, SCAN modes and other FW configurations */
  311. WMI_PDEV_SET_MAC_CONFIG_CMDID,
  312. /** Set per band and per pdev antenna chains */
  313. WMI_PDEV_SET_ANTENNA_MODE_CMDID,
  314. /** Periodic channel stats request command */
  315. WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
  316. /** WMI command for power debug framework */
  317. WMI_PDEV_WAL_POWER_DEBUG_CMDID,
  318. /** set per-AC rx reorder timeouts */
  319. WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
  320. /** WMI command for WOW gpio and type */
  321. WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
  322. /* Get current ANT's per chain's RSSI info */
  323. WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
  324. /** WMI command for getting Chip Power Stats */
  325. WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
  326. /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
  327. WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
  328. /* VDEV (virtual device) specific commands */
  329. /** vdev create */
  330. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
  331. /** vdev delete */
  332. WMI_VDEV_DELETE_CMDID,
  333. /** vdev start request */
  334. WMI_VDEV_START_REQUEST_CMDID,
  335. /** vdev restart request (RX only, NO TX, used for CAC period)*/
  336. WMI_VDEV_RESTART_REQUEST_CMDID,
  337. /** vdev up request */
  338. WMI_VDEV_UP_CMDID,
  339. /** vdev stop request */
  340. WMI_VDEV_STOP_CMDID,
  341. /** vdev down request */
  342. WMI_VDEV_DOWN_CMDID,
  343. /* set a vdev param */
  344. WMI_VDEV_SET_PARAM_CMDID,
  345. /* set a key (used for setting per peer unicast and per vdev multicast) */
  346. WMI_VDEV_INSTALL_KEY_CMDID,
  347. /* wnm sleep mode command */
  348. WMI_VDEV_WNM_SLEEPMODE_CMDID,
  349. WMI_VDEV_WMM_ADDTS_CMDID,
  350. WMI_VDEV_WMM_DELTS_CMDID,
  351. WMI_VDEV_SET_WMM_PARAMS_CMDID,
  352. WMI_VDEV_SET_GTX_PARAMS_CMDID,
  353. WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
  354. WMI_VDEV_PLMREQ_START_CMDID,
  355. WMI_VDEV_PLMREQ_STOP_CMDID,
  356. /* TSF timestamp action for specified vdev */
  357. WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
  358. /*
  359. * set the additional IEs in probe requests for scan or
  360. * assoc req etc for frames FW locally generates
  361. */
  362. WMI_VDEV_SET_IE_CMDID,
  363. WMI_VDEV_RATEMASK_CMDID,
  364. /** ATF VDEV REQUEST commands. */
  365. WMI_VDEV_ATF_REQUEST_CMDID,
  366. /** Command to send the DSCP-to-TID map to the target for VAP */
  367. WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
  368. /*
  369. * Configure filter for Neighbor Rx Pkt
  370. * (smart mesh selective listening)
  371. */
  372. WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
  373. /** set quiet ie parameters. primarily used in AP mode */
  374. WMI_VDEV_SET_QUIET_MODE_CMDID,
  375. /** To set custom aggregation size for per vdev */
  376. WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
  377. /* DISA feature: Encrypt-decrypt data request */
  378. WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID,
  379. /* peer specific commands */
  380. /** create a peer */
  381. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
  382. /** delete a peer */
  383. WMI_PEER_DELETE_CMDID,
  384. /** flush specific tid queues of a peer */
  385. WMI_PEER_FLUSH_TIDS_CMDID,
  386. /** set a parameter of a peer */
  387. WMI_PEER_SET_PARAM_CMDID,
  388. /** set peer to associated state. will cary all parameters determined during assocication time */
  389. WMI_PEER_ASSOC_CMDID,
  390. /**add a wds (4 address ) entry. used only for testing WDS feature on AP products */
  391. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  392. /**remove wds (4 address ) entry. used only for testing WDS feature on AP products */
  393. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  394. /** set up mcast group infor for multicast to unicast conversion */
  395. WMI_PEER_MCAST_GROUP_CMDID,
  396. /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
  397. WMI_PEER_INFO_REQ_CMDID,
  398. /** request the estimated link speed for the peer. FW shall respond with
  399. * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
  400. */
  401. WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
  402. /*
  403. * Set the conditions to report peer justified rate to driver
  404. * The justified rate means the the user-rate is justified by PER.
  405. */
  406. WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
  407. /** update a wds (4 address) entry */
  408. WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
  409. /** add a proxy sta entry */
  410. WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
  411. /** Set Smart Antenna TX antenna */
  412. WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  413. /** Set Smart Antenna TX train info */
  414. WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  415. /** Set SA node config options */
  416. WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  417. /** ATF PEER REQUEST commands */
  418. WMI_PEER_ATF_REQUEST_CMDID,
  419. /** bandwidth fairness (BWF) peer configuration request command */
  420. WMI_PEER_BWF_REQUEST_CMDID,
  421. /** rx reorder queue setup for peer/tid */
  422. WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  423. /** rx reorder queue remove for peer/tid */
  424. WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
  425. /** specify a limit for rx A-MPDU block size */
  426. WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
  427. /**
  428. * request peer antdiv info from FW. FW shall respond with
  429. * PEER_ANTDIV_INFO_EVENTID
  430. */
  431. WMI_PEER_ANTDIV_INFO_REQ_CMDID,
  432. /* beacon/management specific commands */
  433. /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
  434. WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
  435. /** transmit beacon by value */
  436. WMI_PDEV_SEND_BCN_CMDID,
  437. /** set the beacon template. used in beacon offload mode to setup the
  438. * the common beacon template with the FW to be used by FW to generate beacons */
  439. WMI_BCN_TMPL_CMDID,
  440. /** set beacon filter with FW */
  441. WMI_BCN_FILTER_RX_CMDID,
  442. /* enable/disable filtering of probe requests in the firmware */
  443. WMI_PRB_REQ_FILTER_RX_CMDID,
  444. /** transmit management frame by value. will be deprecated */
  445. WMI_MGMT_TX_CMDID,
  446. /** set the probe response template. used in beacon offload mode to setup the
  447. * the common probe response template with the FW to be used by FW to generate
  448. * probe responses */
  449. WMI_PRB_TMPL_CMDID,
  450. /** Transmit Mgmt frame by reference */
  451. WMI_MGMT_TX_SEND_CMDID,
  452. /** commands to directly control ba negotiation directly from host. only used in test mode */
  453. /** turn off FW Auto addba mode and let host control addba */
  454. WMI_ADDBA_CLEAR_RESP_CMDID =
  455. WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
  456. /** send add ba request */
  457. WMI_ADDBA_SEND_CMDID,
  458. WMI_ADDBA_STATUS_CMDID,
  459. /** send del ba */
  460. WMI_DELBA_SEND_CMDID,
  461. /** set add ba response will be used by FW to generate addba response*/
  462. WMI_ADDBA_SET_RESP_CMDID,
  463. /** send single VHT MPDU with AMSDU */
  464. WMI_SEND_SINGLEAMSDU_CMDID,
  465. /** Station power save specific config */
  466. /** enable/disable station powersave */
  467. WMI_STA_POWERSAVE_MODE_CMDID =
  468. WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
  469. /** set station power save specific parameter */
  470. WMI_STA_POWERSAVE_PARAM_CMDID,
  471. /** set station mimo powersave mode */
  472. WMI_STA_MIMO_PS_MODE_CMDID,
  473. /** DFS-specific commands */
  474. /** enable DFS (radar detection)*/
  475. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
  476. /** disable DFS (radar detection)*/
  477. WMI_PDEV_DFS_DISABLE_CMDID,
  478. /** enable DFS phyerr/parse filter offload */
  479. WMI_DFS_PHYERR_FILTER_ENA_CMDID,
  480. /** enable DFS phyerr/parse filter offload */
  481. WMI_DFS_PHYERR_FILTER_DIS_CMDID,
  482. /** enable DFS phyerr processing offload */
  483. WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID,
  484. /** disable DFS phyerr processing offload */
  485. WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID,
  486. /** set ADFS channel config */
  487. WMI_VDEV_ADFS_CH_CFG_CMDID,
  488. /** abort ADFS off-channel-availability-check currently in progress */
  489. WMI_VDEV_ADFS_OCAC_ABORT_CMDID,
  490. /* Roaming specific commands */
  491. /** set roam scan mode */
  492. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
  493. /** set roam scan rssi threshold below which roam scan is enabled */
  494. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  495. /** set roam scan period for periodic roam scan mode */
  496. WMI_ROAM_SCAN_PERIOD,
  497. /** set roam scan trigger rssi change threshold */
  498. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  499. /** set roam AP profile */
  500. WMI_ROAM_AP_PROFILE,
  501. /** set channel list for roam scans */
  502. WMI_ROAM_CHAN_LIST,
  503. /** Stop scan command */
  504. WMI_ROAM_SCAN_CMD,
  505. /** roaming sme offload sync complete */
  506. WMI_ROAM_SYNCH_COMPLETE,
  507. /** set ric request element for 11r roaming */
  508. WMI_ROAM_SET_RIC_REQUEST_CMDID,
  509. /** Invoke roaming forcefully */
  510. WMI_ROAM_INVOKE_CMDID,
  511. /** roaming filter cmd to allow further filtering of roaming candidate */
  512. WMI_ROAM_FILTER_CMDID,
  513. /** set gateway ip, mac and retries for subnet change detection */
  514. WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
  515. /** configure thresholds for MAWC */
  516. WMI_ROAM_CONFIGURE_MAWC_CMDID,
  517. /** configure MultiBand Operation(refer WFA MBO spec) parameter */
  518. WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
  519. /** offload scan specific commands */
  520. /** set offload scan AP profile */
  521. WMI_OFL_SCAN_ADD_AP_PROFILE =
  522. WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
  523. /** remove offload scan AP profile */
  524. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  525. /** set offload scan period */
  526. WMI_OFL_SCAN_PERIOD,
  527. /* P2P specific commands */
  528. /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
  529. * generated during p2p listen and for p2p discoverability */
  530. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
  531. /** enable/disable p2p discoverability on STA/AP VDEVs */
  532. WMI_P2P_DEV_SET_DISCOVERABILITY,
  533. /** set p2p ie to be carried in beacons generated by FW for GO */
  534. WMI_P2P_GO_SET_BEACON_IE,
  535. /** set p2p ie to be carried in probe response frames generated by FW for GO */
  536. WMI_P2P_GO_SET_PROBE_RESP_IE,
  537. /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
  538. * attribute in the beacons/probe responses received.
  539. */
  540. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  541. /** set the configure of p2p find offload */
  542. WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
  543. /** set the vendor specific p2p ie data for p2p find offload using */
  544. WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
  545. /** set the BSSID/device name pattern of p2p find offload */
  546. WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
  547. /** set OppPS related parameters **/
  548. WMI_P2P_SET_OPPPS_PARAM_CMDID,
  549. /** set listen offload start related parameters */
  550. WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
  551. /** set listen offload stop related parameters */
  552. WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
  553. /** AP power save specific config */
  554. /** set AP power save specific param */
  555. WMI_AP_PS_PEER_PARAM_CMDID =
  556. WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
  557. /** set AP UAPSD coex pecific param */
  558. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  559. /** set Enhanced Green AP param */
  560. WMI_AP_PS_EGAP_PARAM_CMDID,
  561. /** Rate-control specific commands */
  562. WMI_PEER_RATE_RETRY_SCHED_CMDID =
  563. WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
  564. /** WLAN Profiling commands. */
  565. WMI_WLAN_PROFILE_TRIGGER_CMDID =
  566. WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
  567. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  568. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  569. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  570. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  571. /** Suspend resume command Ids */
  572. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
  573. WMI_PDEV_RESUME_CMDID,
  574. /* Beacon filter commands */
  575. /** add a beacon filter */
  576. WMI_ADD_BCN_FILTER_CMDID =
  577. WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
  578. /** remove a beacon filter */
  579. WMI_RMV_BCN_FILTER_CMDID,
  580. /* WOW Specific WMI commands */
  581. /** add pattern for awake */
  582. WMI_WOW_ADD_WAKE_PATTERN_CMDID =
  583. WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
  584. /** deleta a wake pattern */
  585. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  586. /** enable/deisable wake event */
  587. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  588. /** enable WOW */
  589. WMI_WOW_ENABLE_CMDID,
  590. /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
  591. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  592. /* IOAC add keep alive cmd. */
  593. WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
  594. /* IOAC del keep alive cmd. */
  595. WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
  596. /* IOAC add pattern for awake */
  597. WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
  598. /* IOAC deleta a wake pattern */
  599. WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
  600. /* D0-WOW enable or disable cmd */
  601. WMI_D0_WOW_ENABLE_DISABLE_CMDID,
  602. /* enable extend WoW */
  603. WMI_EXTWOW_ENABLE_CMDID,
  604. /* Extend WoW command to configure app type1 parameter */
  605. WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
  606. /* Extend WoW command to configure app type2 parameter */
  607. WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
  608. /* enable ICMPv6 Network advertisement filtering */
  609. WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
  610. /*
  611. * Set a pattern to match UDP packet in WOW mode.
  612. * If match, construct a tx frame in a local buffer
  613. * to send through the peer AP to the entity in the
  614. * IP network that sent the UDP packet to this STA.
  615. */
  616. WMI_WOW_UDP_SVC_OFLD_CMDID,
  617. /* configure WOW host wakeup PIN pattern */
  618. WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
  619. /* Set which action category should wake the host from suspend */
  620. WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
  621. /* RTT measurement related cmd */
  622. /** request to make an RTT measurement */
  623. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
  624. /** request to report a tsf measurement */
  625. WMI_RTT_TSF_CMDID,
  626. /** spectral scan command */
  627. /** configure spectral scan */
  628. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID =
  629. WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
  630. /** enable/disable spectral scan and trigger */
  631. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  632. /* F/W stats */
  633. /** one time request for stats */
  634. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
  635. /** Push MCC Adaptive Scheduler Stats to Firmware */
  636. WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
  637. /** one time request for txrx stats */
  638. WMI_REQUEST_STATS_EXT_CMDID,
  639. /* Link Layer stats */
  640. /** Request for link layer stats */
  641. WMI_REQUEST_LINK_STATS_CMDID,
  642. /** Request for setting params to link layer stats */
  643. WMI_START_LINK_STATS_CMDID,
  644. /** Request to clear stats*/
  645. WMI_CLEAR_LINK_STATS_CMDID,
  646. /** Request for getting the Firmware Memory Dump */
  647. WMI_GET_FW_MEM_DUMP_CMDID,
  648. /** Request to flush of the buffered debug messages */
  649. WMI_DEBUG_MESG_FLUSH_CMDID,
  650. /** Cmd to configure the verbose level */
  651. WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
  652. /** One time request for wlan stats */
  653. WMI_REQUEST_WLAN_STATS_CMDID,
  654. /** Request for getting RCPI of peer */
  655. WMI_REQUEST_RCPI_CMDID,
  656. /** ARP OFFLOAD REQUEST*/
  657. WMI_SET_ARP_NS_OFFLOAD_CMDID =
  658. WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
  659. /** Proactive ARP Response Add Pattern Command*/
  660. WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  661. /** Proactive ARP Response Del Pattern Command*/
  662. WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  663. /** NS offload config*/
  664. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID =
  665. WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
  666. /** APFIND Config */
  667. WMI_APFIND_CMDID,
  668. /** Passpoint list config */
  669. WMI_PASSPOINT_LIST_CONFIG_CMDID,
  670. /** configure supprssing parameters for MAWC */
  671. WMI_NLO_CONFIGURE_MAWC_CMDID,
  672. /* GTK offload Specific WMI commands */
  673. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
  674. /* CSA offload Specific WMI commands */
  675. /** csa offload enable */
  676. WMI_CSA_OFFLOAD_ENABLE_CMDID =
  677. WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
  678. /** chan switch command */
  679. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  680. /* Chatter commands */
  681. /* Change chatter mode of operation */
  682. WMI_CHATTER_SET_MODE_CMDID =
  683. WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
  684. /** chatter add coalescing filter command */
  685. WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
  686. /** chatter delete coalescing filter command */
  687. WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
  688. /** chatter coalecing query command */
  689. WMI_CHATTER_COALESCING_QUERY_CMDID,
  690. /**addba specific commands */
  691. /** start the aggregation on this TID */
  692. WMI_PEER_TID_ADDBA_CMDID =
  693. WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
  694. /** stop the aggregation on this TID */
  695. WMI_PEER_TID_DELBA_CMDID,
  696. /** set station mimo powersave method */
  697. WMI_STA_DTIM_PS_METHOD_CMDID,
  698. /** Configure the Station UAPSD AC Auto Trigger Parameters */
  699. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  700. /** Configure the Keep Alive Parameters */
  701. WMI_STA_KEEPALIVE_CMDID,
  702. /* Request ssn from target for a sta/tid pair */
  703. WMI_BA_REQ_SSN_CMDID,
  704. /* misc command group */
  705. /** echo command mainly used for testing */
  706. WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
  707. /* !!IMPORTANT!!
  708. * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
  709. * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
  710. * as we MUST have a fixed value here to maintain compatibility between
  711. * UTF and the ART2 driver
  712. */
  713. /** UTF WMI commands */
  714. WMI_PDEV_UTF_CMDID,
  715. /** set debug log config */
  716. WMI_DBGLOG_CFG_CMDID,
  717. /* QVIT specific command id */
  718. WMI_PDEV_QVIT_CMDID,
  719. /* Factory Testing Mode request command
  720. * used for integrated chipsets */
  721. WMI_PDEV_FTM_INTG_CMDID,
  722. /* set and get keepalive parameters command */
  723. WMI_VDEV_SET_KEEPALIVE_CMDID,
  724. WMI_VDEV_GET_KEEPALIVE_CMDID,
  725. /* For fw recovery test command */
  726. WMI_FORCE_FW_HANG_CMDID,
  727. /* Set Mcast/Bdcast filter */
  728. WMI_SET_MCASTBCAST_FILTER_CMDID,
  729. /** set thermal management params **/
  730. WMI_THERMAL_MGMT_CMDID,
  731. /** set host auto shutdown params **/
  732. WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
  733. /** set tpc chainmask config command */
  734. WMI_TPC_CHAINMASK_CONFIG_CMDID,
  735. /** set Antenna diversity command */
  736. WMI_SET_ANTENNA_DIVERSITY_CMDID,
  737. /** Set OCB Sched Request, deprecated */
  738. WMI_OCB_SET_SCHED_CMDID,
  739. /* Set rssi monitoring config command */
  740. WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
  741. /* Enable/disable Large Receive Offload processing;
  742. * provide cfg params */
  743. WMI_LRO_CONFIG_CMDID,
  744. /*transfer data from host to firmware to write flash */
  745. WMI_TRANSFER_DATA_TO_FLASH_CMDID,
  746. /** Command to enable/disable filtering of multicast IP with unicast mac */
  747. WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
  748. /** Command to control WISA mode */
  749. WMI_VDEV_WISA_CMDID,
  750. /** set debug log time stamp sync up with host */
  751. WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
  752. /** Command for host to set/delete multiple mcast filters */
  753. WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
  754. /** upload a requested section of data from firmware flash to host */
  755. WMI_READ_DATA_FROM_FLASH_CMDID,
  756. /* GPIO Configuration */
  757. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
  758. WMI_GPIO_OUTPUT_CMDID,
  759. /* Txbf configuration command */
  760. WMI_TXBF_CMDID,
  761. /* FWTEST Commands */
  762. WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID =
  763. WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
  764. /** set NoA descs **/
  765. WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
  766. /* UNIT Tests */
  767. WMI_UNIT_TEST_CMDID,
  768. /* set debug and tuning parameters */
  769. WMI_FWTEST_CMDID,
  770. /* Q-Boost configuration test commands */
  771. WMI_QBOOST_CFG_CMDID,
  772. /** TDLS Configuration */
  773. /** enable/disable TDLS */
  774. WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
  775. /** set tdls peer state */
  776. WMI_TDLS_PEER_UPDATE_CMDID,
  777. /** TDLS Offchannel control */
  778. WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
  779. /** Resmgr Configuration */
  780. /** Adaptive OCS is enabled by default in the FW. This command is used to
  781. * disable FW based adaptive OCS.
  782. */
  783. WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID =
  784. WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
  785. /** set the requested channel time quota for the home channels */
  786. WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
  787. /** set the requested latency for the home channels */
  788. WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
  789. /** STA SMPS Configuration */
  790. /** force SMPS mode */
  791. WMI_STA_SMPS_FORCE_MODE_CMDID =
  792. WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
  793. /** set SMPS parameters */
  794. WMI_STA_SMPS_PARAM_CMDID,
  795. /* Wlan HB commands */
  796. /* enalbe/disable wlan HB */
  797. WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
  798. /* set tcp parameters for wlan HB */
  799. WMI_HB_SET_TCP_PARAMS_CMDID,
  800. /* set tcp pkt filter for wlan HB */
  801. WMI_HB_SET_TCP_PKT_FILTER_CMDID,
  802. /* set udp parameters for wlan HB */
  803. WMI_HB_SET_UDP_PARAMS_CMDID,
  804. /* set udp pkt filter for wlan HB */
  805. WMI_HB_SET_UDP_PKT_FILTER_CMDID,
  806. /** Wlan RMC commands*/
  807. /** enable/disable RMC */
  808. WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
  809. /** configure action frame period */
  810. WMI_RMC_SET_ACTION_PERIOD_CMDID,
  811. /** For debug/future enhancement purposes only,
  812. * configures/finetunes RMC algorithms */
  813. WMI_RMC_CONFIG_CMDID,
  814. /** WLAN MHF offload commands */
  815. /** enable/disable MHF offload */
  816. WMI_MHF_OFFLOAD_SET_MODE_CMDID =
  817. WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
  818. /** Plumb routing table for MHF offload */
  819. WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
  820. /*location scan commands */
  821. /*start batch scan */
  822. WMI_BATCH_SCAN_ENABLE_CMDID =
  823. WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  824. /*stop batch scan */
  825. WMI_BATCH_SCAN_DISABLE_CMDID,
  826. /*get batch scan result */
  827. WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
  828. /* OEM related cmd */
  829. WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
  830. WMI_OEM_REQUEST_CMDID, /* UNUSED */
  831. /** Nan Request */
  832. WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
  833. /** Modem power state command */
  834. WMI_MODEM_POWER_STATE_CMDID =
  835. WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
  836. WMI_CHAN_AVOID_UPDATE_CMDID,
  837. WMI_COEX_CONFIG_CMDID,
  838. WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
  839. WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
  840. WMI_SAR_LIMITS_CMDID,
  841. /**
  842. * OBSS scan offload enable/disable commands
  843. * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
  844. * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
  845. * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
  846. * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
  847. * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
  848. * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
  849. */
  850. WMI_OBSS_SCAN_ENABLE_CMDID =
  851. WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
  852. WMI_OBSS_SCAN_DISABLE_CMDID,
  853. /**LPI commands*/
  854. /**LPI mgmt snooping config command*/
  855. WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID =
  856. WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
  857. /**LPI scan start command*/
  858. WMI_LPI_START_SCAN_CMDID,
  859. /**LPI scan stop command*/
  860. WMI_LPI_STOP_SCAN_CMDID,
  861. /** ExtScan commands */
  862. WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
  863. WMI_EXTSCAN_STOP_CMDID,
  864. WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
  865. WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
  866. WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
  867. WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
  868. WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
  869. WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
  870. WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
  871. WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
  872. /** DHCP server offload commands */
  873. WMI_SET_DHCP_SERVER_OFFLOAD_CMDID =
  874. WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
  875. /** IPA Offload features related commands */
  876. WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID =
  877. WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
  878. /** mDNS responder offload commands */
  879. WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
  880. WMI_MDNS_SET_FQDN_CMDID,
  881. WMI_MDNS_SET_RESPONSE_CMDID,
  882. WMI_MDNS_GET_STATS_CMDID,
  883. /* enable/disable AP Authentication offload */
  884. WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
  885. WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
  886. /** Out-of-context-of-BSS (OCB) commands */
  887. WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
  888. WMI_OCB_SET_UTC_TIME_CMDID,
  889. WMI_OCB_START_TIMING_ADVERT_CMDID,
  890. WMI_OCB_STOP_TIMING_ADVERT_CMDID,
  891. WMI_OCB_GET_TSF_TIMER_CMDID,
  892. WMI_DCC_GET_STATS_CMDID,
  893. WMI_DCC_CLEAR_STATS_CMDID,
  894. WMI_DCC_UPDATE_NDL_CMDID,
  895. /* System-On-Chip commands */
  896. WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
  897. WMI_SOC_SET_HW_MODE_CMDID,
  898. WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
  899. WMI_SOC_SET_ANTENNA_MODE_CMDID,
  900. /* packet filter commands */
  901. WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
  902. WMI_PACKET_FILTER_ENABLE_CMDID,
  903. /** Motion Aided WiFi Connectivity (MAWC) commands */
  904. WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
  905. /** WMI commands related to PMF 11w Offload */
  906. WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID =
  907. WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
  908. /** WMI commands related to pkt filter (BPF) offload */
  909. WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  910. WMI_BPF_GET_VDEV_STATS_CMDID,
  911. WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
  912. WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
  913. /** WMI commands related to monitor mode. */
  914. WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
  915. /**
  916. * Nan Data commands
  917. * NDI - NAN Data Interface
  918. * NDP - NAN Data Path
  919. */
  920. /* Commands in prototyping phase */
  921. WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
  922. WMI_NDP_INITIATOR_REQ_CMDID,
  923. WMI_NDP_RESPONDER_REQ_CMDID,
  924. WMI_NDP_END_REQ_CMDID,
  925. } WMI_CMD_ID;
  926. typedef enum {
  927. /** WMI service is ready; after this event WMI messages can be sent/received */
  928. WMI_SERVICE_READY_EVENTID = 0x1,
  929. /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
  930. WMI_READY_EVENTID,
  931. /**
  932. * Specify what WMI services the target supports
  933. * (for services beyond what fits in the WMI_SERVICE_READY_EVENT
  934. * message's wmi_service_bitmap)
  935. */
  936. WMI_SERVICE_AVAILABLE_EVENTID,
  937. /** Scan specific events */
  938. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  939. /* PDEV specific events */
  940. /** TPC config for the current operating channel */
  941. WMI_PDEV_TPC_CONFIG_EVENTID =
  942. WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  943. /** Channel stats event */
  944. WMI_CHAN_INFO_EVENTID,
  945. /** PHY Error specific WMI event */
  946. WMI_PHYERR_EVENTID,
  947. /** eeprom dump event */
  948. WMI_PDEV_DUMP_EVENTID,
  949. /** traffic pause event */
  950. WMI_TX_PAUSE_EVENTID,
  951. /** DFS radar event */
  952. WMI_DFS_RADAR_EVENTID,
  953. /** track L1SS entry and residency event */
  954. WMI_PDEV_L1SS_TRACK_EVENTID,
  955. /** Report current temprature of the chip in Celcius degree */
  956. WMI_PDEV_TEMPERATURE_EVENTID,
  957. /* Extension of WMI_SERVICE_READY msg with
  958. * extra target capability info
  959. */
  960. WMI_SERVICE_READY_EXT_EVENTID,
  961. /** FIPS test mode event */
  962. WMI_PDEV_FIPS_EVENTID,
  963. /** Channel hopping avoidance */
  964. WMI_PDEV_CHANNEL_HOPPING_EVENTID,
  965. /** CCK ANI level event */
  966. WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
  967. /** OFDM ANI level event */
  968. WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
  969. /** Tx PPDU params */
  970. WMI_PDEV_TPC_EVENTID,
  971. /** NF Cal Power in DBR/DBM for all channels */
  972. WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
  973. /** SOC/PDEV events */
  974. WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
  975. WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
  976. WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
  977. /** Report ANT DIV feature's status */
  978. WMI_PDEV_ANTDIV_STATUS_EVENTID,
  979. /** Chip level Power stats */
  980. WMI_PDEV_CHIP_POWER_STATS_EVENTID,
  981. /* VDEV specific events */
  982. /** VDEV started event in response to VDEV_START request */
  983. WMI_VDEV_START_RESP_EVENTID =
  984. WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  985. /** vdev stopped event , generated in response to VDEV_STOP request */
  986. WMI_VDEV_STOPPED_EVENTID,
  987. /* Indicate the set key (used for setting per
  988. * peer unicast and per vdev multicast)
  989. * operation has completed */
  990. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  991. /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
  992. don't use this for any new implementations */
  993. /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
  994. This request is valid only for vdevs operating in soft AP or P2P GO mode */
  995. WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
  996. /* Return the TSF timestamp of specified vdev */
  997. WMI_VDEV_TSF_REPORT_EVENTID,
  998. /* FW response to Host for vdev delete cmdid */
  999. WMI_VDEV_DELETE_RESP_EVENTID,
  1000. /**
  1001. * DISA feature: FW response to Host with encrypted/decrypted
  1002. * 802.11 DISA frame
  1003. */
  1004. WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
  1005. /* peer specific events */
  1006. /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
  1007. WMI_PEER_STA_KICKOUT_EVENTID =
  1008. WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  1009. /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
  1010. WMI_PEER_INFO_EVENTID,
  1011. /** Event indicating that TX fail count reaching threshold */
  1012. WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
  1013. /** Return the estimate link speed for the Peer specified in the
  1014. * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
  1015. */
  1016. WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
  1017. /* Return the peer state
  1018. * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
  1019. */
  1020. WMI_PEER_STATE_EVENTID,
  1021. /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
  1022. * After that, host will send Mx message.
  1023. * Otherwise, host will pause any Mx(STA:M2/M4) message
  1024. */
  1025. WMI_PEER_ASSOC_CONF_EVENTID,
  1026. /* FW response to Host for peer delete cmdid */
  1027. WMI_PEER_DELETE_RESP_EVENTID,
  1028. /** Valid rate code list for peer */
  1029. WMI_PEER_RATECODE_LIST_EVENTID,
  1030. WMI_WDS_PEER_EVENTID,
  1031. WMI_PEER_STA_PS_STATECHG_EVENTID,
  1032. /** Peer Ant Div Info Event with rssi per chain, etc */
  1033. WMI_PEER_ANTDIV_INFO_EVENTID,
  1034. /* beacon/mgmt specific events */
  1035. /** RX management frame. the entire frame is carried along with the event. */
  1036. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  1037. /** software beacon alert event to Host requesting host to Queue a beacon for transmission
  1038. use only in host beacon mode */
  1039. WMI_HOST_SWBA_EVENTID,
  1040. /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theritical value.
  1041. tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
  1042. staggered beacon transmission mode */
  1043. WMI_TBTTOFFSET_UPDATE_EVENTID,
  1044. /** event after the first beacon is transmitted following
  1045. a change in the template.*/
  1046. WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
  1047. /** event after the first probe response is transmitted following
  1048. a change in the template.*/
  1049. WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
  1050. /** Event for Mgmt TX completion event */
  1051. WMI_MGMT_TX_COMPLETION_EVENTID,
  1052. /** Event for Mgmt TX bundle completion event */
  1053. WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
  1054. /** vdev_map used in WMI_TBTTOFFSET_UPDATE_EVENTID supports max 32 vdevs
  1055. * Use this event if number of vdevs > 32.
  1056. */
  1057. WMI_TBTTOFFSET_EXT_UPDATE_EVENTID,
  1058. /*ADDBA Related WMI Events */
  1059. /** Indication the completion of the prior
  1060. WMI_PEER_TID_DELBA_CMDID(initiator) */
  1061. WMI_TX_DELBA_COMPLETE_EVENTID =
  1062. WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  1063. /** Indication the completion of the prior
  1064. *WMI_PEER_TID_ADDBA_CMDID(initiator) */
  1065. WMI_TX_ADDBA_COMPLETE_EVENTID,
  1066. /* Seq num returned from hw for a sta/tid pair */
  1067. WMI_BA_RSP_SSN_EVENTID,
  1068. /* Aggregation state requested by BTC */
  1069. WMI_AGGR_STATE_TRIG_EVENTID,
  1070. /** Roam event to trigger roaming on host */
  1071. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  1072. /** matching AP found from list of profiles */
  1073. WMI_PROFILE_MATCH,
  1074. /** roam synch event */
  1075. WMI_ROAM_SYNCH_EVENTID,
  1076. /** P2P disc found */
  1077. WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
  1078. /*send noa info to host when noa is changed for beacon tx offload enable */
  1079. WMI_P2P_NOA_EVENTID,
  1080. /** send p2p listen offload stopped event with different reason */
  1081. WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
  1082. /** Send EGAP Info to host */
  1083. WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
  1084. /* send pdev resume event to host after pdev resume. */
  1085. WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
  1086. /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
  1087. will cary wake reason */
  1088. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  1089. WMI_D0_WOW_DISABLE_ACK_EVENTID,
  1090. WMI_WOW_INITIAL_WAKEUP_EVENTID,
  1091. /*RTT related event ID */
  1092. /** RTT measurement report */
  1093. WMI_RTT_MEASUREMENT_REPORT_EVENTID =
  1094. WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  1095. /** TSF measurement report */
  1096. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  1097. /** RTT error report */
  1098. WMI_RTT_ERROR_REPORT_EVENTID,
  1099. /*STATS specific events */
  1100. /** txrx stats event requested by host */
  1101. WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
  1102. /** FW iface link stats Event */
  1103. WMI_IFACE_LINK_STATS_EVENTID,
  1104. /** FW iface peer link stats Event */
  1105. WMI_PEER_LINK_STATS_EVENTID,
  1106. /** FW Update radio stats Event */
  1107. WMI_RADIO_LINK_STATS_EVENTID,
  1108. /** Firmware memory dump Complete event*/
  1109. WMI_UPDATE_FW_MEM_DUMP_EVENTID,
  1110. /** Event indicating the DIAG logs/events supported by FW */
  1111. WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
  1112. /** Instantaneous RSSI event */
  1113. WMI_INST_RSSI_STATS_EVENTID,
  1114. /** FW update tx power levels event */
  1115. WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
  1116. /** This event is used to report wlan stats to host.
  1117. * It is triggered under 3 conditions:
  1118. * (a) Periodic timer timed out, based on the period specified
  1119. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  1120. * (b) Whenever any of the (enabled) stats thresholds specified
  1121. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  1122. * within the current stats period.
  1123. * (c) In response to the one-time wlan stats request of
  1124. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  1125. *
  1126. * If this event is triggered by condition a or b,
  1127. * the stats counters are cleared at the start of each period.
  1128. * But if it is triggered by condition c, stats counters won't be cleared.
  1129. */
  1130. WMI_REPORT_STATS_EVENTID,
  1131. /** Event indicating RCPI of the peer requested by host in the
  1132. * WMI_REQUEST_RCPI_CMDID */
  1133. WMI_UPDATE_RCPI_EVENTID,
  1134. /** NLO specific events */
  1135. /** NLO match event after the first match */
  1136. WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
  1137. /** NLO scan complete event */
  1138. WMI_NLO_SCAN_COMPLETE_EVENTID,
  1139. /** APFIND specific events */
  1140. WMI_APFIND_EVENTID,
  1141. /** passpoint network match event */
  1142. WMI_PASSPOINT_MATCH_EVENTID,
  1143. /** GTK offload stautus event requested by host */
  1144. WMI_GTK_OFFLOAD_STATUS_EVENTID =
  1145. WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  1146. /** GTK offload failed to rekey event */
  1147. WMI_GTK_REKEY_FAIL_EVENTID,
  1148. /* CSA IE received event */
  1149. WMI_CSA_HANDLING_EVENTID =
  1150. WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  1151. /*chatter query reply event */
  1152. WMI_CHATTER_PC_QUERY_EVENTID =
  1153. WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
  1154. /** DFS related events */
  1155. WMI_PDEV_DFS_RADAR_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_DFS),
  1156. /** Indicate channel-availability-check completion event to host */
  1157. WMI_VDEV_DFS_CAC_COMPLETE_EVENTID,
  1158. /** Indicate off-channel-availability-check completion event to host */
  1159. WMI_VDEV_ADFS_OCAC_COMPLETE_EVENTID,
  1160. /** echo event in response to echo command */
  1161. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  1162. /* !!IMPORTANT!!
  1163. * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
  1164. * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
  1165. * as we MUST have a fixed value here to maintain compatibility between
  1166. * UTF and the ART2 driver
  1167. */
  1168. /** UTF specific WMI event */
  1169. WMI_PDEV_UTF_EVENTID,
  1170. /** event carries buffered debug messages */
  1171. WMI_DEBUG_MESG_EVENTID,
  1172. /** FW stats(periodic or on shot) */
  1173. WMI_UPDATE_STATS_EVENTID,
  1174. /** debug print message used for tracing FW code while debugging */
  1175. WMI_DEBUG_PRINT_EVENTID,
  1176. /** DCS wlan or non-wlan interference event
  1177. */
  1178. WMI_DCS_INTERFERENCE_EVENTID,
  1179. /** VI spoecific event */
  1180. WMI_PDEV_QVIT_EVENTID,
  1181. /** FW code profile data in response to profile request */
  1182. WMI_WLAN_PROFILE_DATA_EVENTID,
  1183. /* Factory Testing Mode request event
  1184. * used for integrated chipsets */
  1185. WMI_PDEV_FTM_INTG_EVENTID,
  1186. /* avoid list of frequencies .
  1187. */
  1188. WMI_WLAN_FREQ_AVOID_EVENTID,
  1189. /* Indicate the keepalive parameters */
  1190. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  1191. /* Thermal Management event */
  1192. WMI_THERMAL_MGMT_EVENTID,
  1193. /* Container for QXDM/DIAG events */
  1194. WMI_DIAG_DATA_CONTAINER_EVENTID,
  1195. /* host auto shutdown event */
  1196. WMI_HOST_AUTO_SHUTDOWN_EVENTID,
  1197. /*update mib counters together with WMI_UPDATE_STATS_EVENTID */
  1198. WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
  1199. /*update ht/vht info based on vdev (rx and tx NSS and preamble) */
  1200. WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
  1201. WMI_DIAG_EVENTID,
  1202. /** Set OCB Sched Response, deprecated */
  1203. WMI_OCB_SET_SCHED_EVENTID,
  1204. /* event to indicate the flush of the buffered debug messages is complete*/
  1205. WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
  1206. /* event to report mix/max RSSI breach events */
  1207. WMI_RSSI_BREACH_EVENTID,
  1208. /* event to report completion of data storage into flash memory */
  1209. WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
  1210. /** event to report SCPC calibrated data to host */
  1211. WMI_PDEV_UTF_SCPC_EVENTID,
  1212. /** event to provide requested data from the target's flash memory */
  1213. WMI_READ_DATA_FROM_FLASH_EVENTID,
  1214. /** event to report rx aggregation failure frame information */
  1215. WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
  1216. /* GPIO Event */
  1217. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  1218. /** upload H_CV info WMI event
  1219. * to indicate uploaded H_CV info to host
  1220. */
  1221. WMI_UPLOADH_EVENTID,
  1222. /** capture H info WMI event
  1223. * to indicate captured H info to host
  1224. */
  1225. WMI_CAPTUREH_EVENTID,
  1226. /* hw RFkill */
  1227. WMI_RFKILL_STATE_CHANGE_EVENTID,
  1228. /* TDLS Event */
  1229. WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
  1230. /* STA SMPS Event */
  1231. /* force SMPS mode */
  1232. WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID =
  1233. WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
  1234. /*location scan event */
  1235. /*report the firmware's capability of batch scan */
  1236. WMI_BATCH_SCAN_ENABLED_EVENTID =
  1237. WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  1238. /*batch scan result */
  1239. WMI_BATCH_SCAN_RESULT_EVENTID,
  1240. /* OEM Event */
  1241. WMI_OEM_CAPABILITY_EVENTID = /* DEPRECATED */
  1242. WMI_EVT_GRP_START_ID(WMI_GRP_OEM),
  1243. WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
  1244. WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
  1245. WMI_OEM_RESPONSE_EVENTID,
  1246. /* NAN Event */
  1247. WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
  1248. WMI_NAN_DISC_IFACE_CREATED_EVENTID,
  1249. WMI_NAN_DISC_IFACE_DELETED_EVENTID,
  1250. WMI_NAN_STARTED_CLUSTER_EVENTID,
  1251. WMI_NAN_JOINED_CLUSTER_EVENTID,
  1252. /* Coex Event */
  1253. WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID =
  1254. WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
  1255. /* LPI Event */
  1256. WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
  1257. WMI_LPI_STATUS_EVENTID,
  1258. WMI_LPI_HANDOFF_EVENTID,
  1259. /* ExtScan events */
  1260. WMI_EXTSCAN_START_STOP_EVENTID =
  1261. WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
  1262. WMI_EXTSCAN_OPERATION_EVENTID,
  1263. WMI_EXTSCAN_TABLE_USAGE_EVENTID,
  1264. WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
  1265. WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
  1266. WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
  1267. WMI_EXTSCAN_CAPABILITIES_EVENTID,
  1268. WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
  1269. /* mDNS offload events */
  1270. WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1271. /* SAP Authentication offload events */
  1272. WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
  1273. WMI_SAP_OFL_DEL_STA_EVENTID,
  1274. /** Out-of-context-of-bss (OCB) events */
  1275. WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
  1276. WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
  1277. WMI_DCC_GET_STATS_RESP_EVENTID,
  1278. WMI_DCC_UPDATE_NDL_RESP_EVENTID,
  1279. WMI_DCC_STATS_EVENTID,
  1280. /* System-On-Chip events */
  1281. WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
  1282. WMI_SOC_HW_MODE_TRANSITION_EVENTID,
  1283. WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
  1284. /** Motion Aided WiFi Connectivity (MAWC) events */
  1285. WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
  1286. /** pkt filter (BPF) offload relevant events */
  1287. WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1288. WMI_BPF_VDEV_STATS_INFO_EVENTID,
  1289. /* Events in Prototyping phase */
  1290. WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1291. WMI_NDP_INITIATOR_RSP_EVENTID,
  1292. WMI_NDP_RESPONDER_RSP_EVENTID,
  1293. WMI_NDP_END_RSP_EVENTID,
  1294. WMI_NDP_INDICATION_EVENTID,
  1295. WMI_NDP_CONFIRM_EVENTID,
  1296. WMI_NDP_END_INDICATION_EVENTID,
  1297. } WMI_EVT_ID;
  1298. /* defines for OEM message sub-types */
  1299. #define WMI_OEM_CAPABILITY_REQ 0x01
  1300. #define WMI_OEM_CAPABILITY_RSP 0x02
  1301. #define WMI_OEM_MEASUREMENT_REQ 0x03
  1302. #define WMI_OEM_MEASUREMENT_RSP 0x04
  1303. #define WMI_OEM_ERROR_REPORT_RSP 0x05
  1304. #define WMI_OEM_NAN_MEAS_REQ 0x06
  1305. #define WMI_OEM_NAN_MEAS_RSP 0x07
  1306. #define WMI_OEM_NAN_PEER_INFO 0x08
  1307. #define WMI_OEM_CONFIGURE_LCR 0x09
  1308. #define WMI_OEM_CONFIGURE_LCI 0x0A
  1309. /* below message subtype is internal to CLD. Target should
  1310. * never use internal response type
  1311. */
  1312. #define WMI_OEM_INTERNAL_RSP 0xdeadbeef
  1313. #define WMI_CHAN_LIST_TAG 0x1
  1314. #define WMI_SSID_LIST_TAG 0x2
  1315. #define WMI_BSSID_LIST_TAG 0x3
  1316. #define WMI_IE_TAG 0x4
  1317. typedef struct {
  1318. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  1319. /** primary 20 MHz channel frequency in mhz */
  1320. A_UINT32 mhz;
  1321. /** Center frequency 1 in MHz*/
  1322. A_UINT32 band_center_freq1;
  1323. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  1324. A_UINT32 band_center_freq2;
  1325. /** channel info described below */
  1326. A_UINT32 info;
  1327. /** contains min power, max power, reg power and reg class id. */
  1328. A_UINT32 reg_info_1;
  1329. /** contains antennamax */
  1330. A_UINT32 reg_info_2;
  1331. } wmi_channel;
  1332. typedef enum {
  1333. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  1334. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  1335. } wmi_channel_change_cause;
  1336. /** channel info consists of 6 bits of channel mode */
  1337. #define WMI_SET_CHANNEL_MODE(pwmi_channel, val) do { \
  1338. (pwmi_channel)->info &= 0xffffffc0; \
  1339. (pwmi_channel)->info |= (val); \
  1340. } while (0)
  1341. #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
  1342. #define WMI_CHAN_FLAG_HT40_PLUS 6
  1343. #define WMI_CHAN_FLAG_PASSIVE 7
  1344. #define WMI_CHAN_ADHOC_ALLOWED 8
  1345. #define WMI_CHAN_AP_DISABLED 9
  1346. #define WMI_CHAN_FLAG_DFS 10
  1347. #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
  1348. #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
  1349. #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
  1350. #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
  1351. #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
  1352. /* Enable radar event reporting for sec80 in VHT80p80 */
  1353. #define WMI_CHAN_FLAG_DFS_CFREQ2 16
  1354. #define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
  1355. #define WMI_SET_CHANNEL_FLAG(pwmi_channel, flag) do { \
  1356. (pwmi_channel)->info |= (1 << flag); \
  1357. } while (0)
  1358. #define WMI_GET_CHANNEL_FLAG(pwmi_channel, flag) \
  1359. (((pwmi_channel)->info & (1 << flag)) >> flag)
  1360. #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel, val) do { \
  1361. (pwmi_channel)->reg_info_1 &= 0xffffff00; \
  1362. (pwmi_channel)->reg_info_1 |= (val&0xff); \
  1363. } while (0)
  1364. #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
  1365. #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel, val) do { \
  1366. (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
  1367. (pwmi_channel)->reg_info_1 |= ((val&0xff) << 8); \
  1368. } while (0)
  1369. #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
  1370. #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel, val) do { \
  1371. (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
  1372. (pwmi_channel)->reg_info_1 |= ((val&0xff) << 16); \
  1373. } while (0)
  1374. #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
  1375. #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel, val) do { \
  1376. (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
  1377. (pwmi_channel)->reg_info_1 |= ((val&0xff) << 24); \
  1378. } while (0)
  1379. #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
  1380. #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel, val) do { \
  1381. (pwmi_channel)->reg_info_2 &= 0xffffff00; \
  1382. (pwmi_channel)->reg_info_2 |= (val&0xff); \
  1383. } while (0)
  1384. #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
  1385. /* max tx power is in 1 dBm units */
  1386. #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel, val) do { \
  1387. (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
  1388. (pwmi_channel)->reg_info_2 |= ((val&0xff)<<8); \
  1389. } while (0)
  1390. #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
  1391. /** HT Capabilities*/
  1392. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  1393. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  1394. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  1395. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  1396. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  1397. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  1398. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  1399. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  1400. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  1401. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  1402. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  1403. #define WMI_HT_CAP_HT40_SGI 0x0800
  1404. #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
  1405. #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
  1406. /* These macros should be used when we wish to advertise STBC support for
  1407. * only 1SS or 2SS or 3SS. */
  1408. #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  1409. #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  1410. #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  1411. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  1412. WMI_HT_CAP_HT20_SGI | \
  1413. WMI_HT_CAP_HT40_SGI | \
  1414. WMI_HT_CAP_TX_STBC | \
  1415. WMI_HT_CAP_RX_STBC | \
  1416. WMI_HT_CAP_LDPC | \
  1417. WMI_HT_CAP_TX_LDPC | \
  1418. WMI_HT_CAP_RX_LDPC)
  1419. /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  1420. field. The fields not defined here are not supported, or reserved.
  1421. Do not change these masks and if you have to add new one follow the
  1422. bitmask as specified by 802.11ac draft.
  1423. */
  1424. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  1425. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  1426. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  1427. #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
  1428. #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
  1429. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  1430. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  1431. #define WMI_VHT_CAP_SGI_160MHZ 0x00000040
  1432. #define WMI_VHT_CAP_TX_STBC 0x00000080
  1433. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  1434. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  1435. #define WMI_VHT_CAP_SU_BFORMER 0x00000800
  1436. #define WMI_VHT_CAP_SU_BFORMEE 0x00001000
  1437. #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  1438. #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  1439. #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  1440. #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  1441. #define WMI_VHT_CAP_MU_BFORMER 0x00080000
  1442. #define WMI_VHT_CAP_MU_BFORMEE 0x00100000
  1443. #define WMI_VHT_CAP_TXOP_PS 0x00200000
  1444. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  1445. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  1446. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  1447. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  1448. #define WMI_VHT_CAP_TX_LDPC 0x40000000
  1449. /* TEMPORARY:
  1450. * Preserve the incorrect old name as an alias for the correct new name
  1451. * until all references to the old name have been removed from all hosts
  1452. * and targets.
  1453. */
  1454. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
  1455. /* These macros should be used when we wish to advertise STBC support for
  1456. * only 1SS or 2SS or 3SS. */
  1457. #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
  1458. #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
  1459. #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
  1460. /* TEMPORARY:
  1461. * Preserve the incorrect old name as an alias for the correct new name
  1462. * until all references to the old name have been removed from all hosts
  1463. * and targets.
  1464. */
  1465. #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
  1466. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  1467. WMI_VHT_CAP_SGI_80MHZ | \
  1468. WMI_VHT_CAP_TX_STBC | \
  1469. WMI_VHT_CAP_RX_STBC_MASK | \
  1470. WMI_VHT_CAP_RX_LDPC | \
  1471. WMI_VHT_CAP_TX_LDPC | \
  1472. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  1473. WMI_VHT_CAP_RX_FIXED_ANT | \
  1474. WMI_VHT_CAP_TX_FIXED_ANT)
  1475. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  1476. 802.11ac
  1477. */
  1478. #define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
  1479. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  1480. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  1481. /** 11ax capabilities */
  1482. #define WMI_HE_CAP_PPE_PRESENT 0x00000001
  1483. #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
  1484. #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
  1485. #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
  1486. #define WMI_HE_FRAG_SUPPORT_SHIFT 3
  1487. /* fragmentation support field value */
  1488. enum {
  1489. WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
  1490. /*
  1491. * support for fragments within a VHT single MPDU,
  1492. * no support for fragments within AMPDU
  1493. */
  1494. WMI_HE_FRAG_SUPPORT_LEVEL1,
  1495. /* support for up to 1 fragment per MSDU within a single A-MPDU */
  1496. WMI_HE_FRAG_SUPPORT_LEVEL2,
  1497. /* support for multiple fragments per MSDU within an A-MPDU */
  1498. WMI_HE_FRAG_SUPPORT_LEVEL3,
  1499. };
  1500. /** NOTE: This defs cannot be changed in the future without
  1501. * breaking WMI compatibility
  1502. */
  1503. #define WMI_MAX_NUM_SS MAX_HE_NSS
  1504. #define WMI_MAX_NUM_RU MAX_HE_RU
  1505. /*
  1506. * Figure 8 554ae: -PPE Threshold Info field format
  1507. * we pack PPET16 and PPT8 for four RU's in one element of array.
  1508. *
  1509. * ppet16_ppet8_ru3_ru0 array element 0 holds:
  1510. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1511. *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
  1512. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1513. *
  1514. * ppet16_ppet8_ru3_ru0 array element 1 holds:
  1515. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1516. *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
  1517. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1518. *
  1519. * etc.
  1520. */
  1521. /*
  1522. * Note that in these macros, "ru" is one-based, not zero-based, while
  1523. * nssm1 is zero-based.
  1524. */
  1525. #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1526. do { \
  1527. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)&3)*6)); \
  1528. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)&3)*6)); \
  1529. } while (0)
  1530. #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1531. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)&3)*6))&7)
  1532. #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1533. do { \
  1534. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)&3)*6+3)); \
  1535. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)&3)*6+3)); \
  1536. } while (0)
  1537. #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1538. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)&3)*6+3))&7)
  1539. typedef struct _wmi_ppe_threshold {
  1540. A_UINT32 numss_m1; /** NSS - 1*/
  1541. union {
  1542. A_UINT32 ru_count; /** RU COUNT OBSOLETE to be removed after few versions */
  1543. A_UINT32 ru_mask; /** RU index mask */
  1544. };
  1545. /** ppet8 and ppet16 for max num ss */
  1546. A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS];
  1547. } wmi_ppe_threshold;
  1548. /* WMI_SYS_CAPS_* refer to the capabilities that system support
  1549. */
  1550. #define WMI_SYS_CAP_ENABLE 0x00000001
  1551. #define WMI_SYS_CAP_TXPOWER 0x00000002
  1552. /*
  1553. * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
  1554. * Bits 5:0 are reserved
  1555. */
  1556. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
  1557. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
  1558. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
  1559. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
  1560. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
  1561. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
  1562. #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
  1563. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
  1564. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1565. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1566. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1567. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1568. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1569. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1570. #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1571. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1572. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
  1573. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
  1574. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
  1575. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
  1576. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
  1577. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
  1578. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
  1579. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
  1580. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
  1581. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
  1582. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
  1583. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
  1584. #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
  1585. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
  1586. #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
  1587. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
  1588. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
  1589. ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1590. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
  1591. ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1592. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
  1593. ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1594. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
  1595. ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1596. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
  1597. ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1598. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
  1599. ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1600. #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
  1601. ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1602. #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
  1603. ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1604. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
  1605. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
  1606. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
  1607. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1608. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1609. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1610. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
  1611. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
  1612. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
  1613. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
  1614. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
  1615. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
  1616. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
  1617. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1618. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
  1619. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1620. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
  1621. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1622. #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
  1623. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
  1624. #define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  1625. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  1626. #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
  1627. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
  1628. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
  1629. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
  1630. #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
  1631. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  1632. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
  1633. ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  1634. /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
  1635. typedef struct _wmi_abi_version {
  1636. A_UINT32 abi_version_0;
  1637. /** WMI Major and Minor versions */
  1638. A_UINT32 abi_version_1;
  1639. /** WMI change revision */
  1640. A_UINT32 abi_version_ns_0;
  1641. /** ABI version namespace first four dwords */
  1642. A_UINT32 abi_version_ns_1;
  1643. /** ABI version namespace second four dwords */
  1644. A_UINT32 abi_version_ns_2;
  1645. /** ABI version namespace third four dwords */
  1646. A_UINT32 abi_version_ns_3;
  1647. /** ABI version namespace fourth four dwords */
  1648. } wmi_abi_version;
  1649. /*
  1650. * maximum number of memroy requests allowed from FW.
  1651. */
  1652. #define WMI_MAX_MEM_REQS 16
  1653. /* !!NOTE!!:
  1654. * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
  1655. * Please don't change it.
  1656. */
  1657. #define HW_BD_INFO_SIZE 5
  1658. /**
  1659. * PDEV ID to identify the physical device,
  1660. * value 0 reserved for SOC level commands/event
  1661. */
  1662. #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
  1663. #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
  1664. #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
  1665. #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
  1666. /**
  1667. * The following struct holds optional payload for
  1668. * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
  1669. * device capability to the host.
  1670. */
  1671. typedef struct {
  1672. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
  1673. A_UINT32 fw_build_vers; /* firmware build number */
  1674. wmi_abi_version fw_abi_vers;
  1675. A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
  1676. A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
  1677. A_UINT32 num_rf_chains;
  1678. /* The following field is only valid for service type WMI_SERVICE_11AC */
  1679. A_UINT32 ht_cap_info; /* WMI HT Capability */
  1680. A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
  1681. A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  1682. A_UINT32 hw_min_tx_power;
  1683. A_UINT32 hw_max_tx_power;
  1684. A_UINT32 sys_cap_info;
  1685. A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  1686. /** Max beacon and Probe Response IE offload size (includes
  1687. * optional P2P IEs) */
  1688. A_UINT32 max_bcn_ie_size;
  1689. /*
  1690. * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
  1691. * FW uses this as FW extesnsion memory for saving its data structures. Only valid
  1692. * for low latency interfaces like PCIE where FW can access this memory directly (or)
  1693. * by DMA.
  1694. */
  1695. A_UINT32 num_mem_reqs;
  1696. /* Max No. scan channels target can support
  1697. * If FW is too old and doesn't indicate this number, host side value will default to
  1698. * 0, and host will take the original compatible value (62) for future scan channel
  1699. * setup.
  1700. */
  1701. A_UINT32 max_num_scan_channels;
  1702. /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
  1703. * Default 0 means tha hw_bd_info[] is invalid(legacy board).
  1704. */
  1705. A_UINT32 hw_bd_id;
  1706. A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
  1707. /*
  1708. * Number of MACs supported, i.e. a DBS-capable device will return 2
  1709. */
  1710. A_UINT32 max_supported_macs;
  1711. /*
  1712. * FW sub-feature capabilities to be used in concurrence with
  1713. * wmi_service_bitmap
  1714. * values from enum WMI_FW_SUB_FEAT_CAPS
  1715. */
  1716. A_UINT32 wmi_fw_sub_feat_caps;
  1717. /*
  1718. * Number of Dual Band Simultaneous (DBS) hardware modes
  1719. */
  1720. A_UINT32 num_dbs_hw_modes;
  1721. /*
  1722. * txrx_chainmask
  1723. * [7:0] - 2G band tx chain mask
  1724. * [15:8] - 2G band rx chain mask
  1725. * [23:16] - 5G band tx chain mask
  1726. * [31:24] - 5G band rx chain mask
  1727. *
  1728. */
  1729. A_UINT32 txrx_chainmask;
  1730. /*
  1731. * default Dual Band Simultaneous (DBS) hardware mode
  1732. */
  1733. A_UINT32 default_dbs_hw_mode_index;
  1734. /*
  1735. * Number of msdu descriptors target would use
  1736. */
  1737. A_UINT32 num_msdu_desc;
  1738. /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
  1739. * HAL_REG_CAPABILITIES hal_reg_capabilities;
  1740. * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  1741. * wlan_host_mem_req mem_reqs[];
  1742. * wlan_dbs_hw_mode_list[];
  1743. */
  1744. } wmi_service_ready_event_fixed_param;
  1745. #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
  1746. typedef struct {
  1747. /**
  1748. * TLV tag and len; tag equals
  1749. * WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param
  1750. */
  1751. A_UINT32 tlv_header;
  1752. /**
  1753. * The wmi_service_segment offset field specifies the position
  1754. * within the logical bitmap of WMI service flags at which the
  1755. * WMI service flags specified within this message begin.
  1756. * Since the first 128 WMI service flags are specified within
  1757. * the wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT
  1758. * message, the wmi_service_segment_offset value is expected to
  1759. * be 128 or more.
  1760. */
  1761. A_UINT32 wmi_service_segment_offset;
  1762. A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
  1763. } wmi_service_available_event_fixed_param;
  1764. typedef struct {
  1765. /* TLV tag and len; tag equals
  1766. *WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT
  1767. */
  1768. A_UINT32 tlv_header;
  1769. /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
  1770. A_UINT32 default_conc_scan_config_bits;
  1771. /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
  1772. A_UINT32 default_fw_config_bits;
  1773. wmi_ppe_threshold ppet;
  1774. /*
  1775. * see section 8.4.2.213 from draft r8 of 802.11ax;
  1776. * see WMI_HE_FRAG_SUPPORT enum
  1777. */
  1778. A_UINT32 he_cap_info;
  1779. /*
  1780. * An HT STA shall not allow transmission of more than one MPDU start
  1781. * within the time limit described in the MPDU maximum density field.
  1782. */
  1783. A_UINT32 mpdu_density; /* units are microseconds */
  1784. /*
  1785. * Maximum no of BSSID based RX filters host can program
  1786. * Value 0 means FW hasn't given any limit to host.
  1787. */
  1788. A_UINT32 max_bssid_rx_filters;
  1789. /*
  1790. * Extended FW build version information:
  1791. * bits 27:0 -> reserved
  1792. * bits 31:28 -> CRM sub ID
  1793. */
  1794. A_UINT32 fw_build_vers_ext;
  1795. } wmi_service_ready_ext_event_fixed_param;
  1796. typedef enum {
  1797. WMI_HWBD_NONE = 0, /* No hw board information is given */
  1798. WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
  1799. WMI_HWBD_QCA2582 = 2, /* Killer 1525 */
  1800. } WMI_HWBD_ID;
  1801. typedef enum {
  1802. WMI_FW_STA_RTT_INITR = 0x00000001,
  1803. WMI_FW_STA_RTT_RESPR = 0x00000002,
  1804. WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
  1805. WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
  1806. WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
  1807. WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
  1808. WMI_FW_AP_RTT_INITR = 0x00000040,
  1809. WMI_FW_AP_RTT_RESPR = 0x00000080,
  1810. WMI_FW_NAN_RTT_INITR = 0x00000100,
  1811. WMI_FW_NAN_RTT_RESPR = 0x00000200,
  1812. /*
  1813. * New fw sub feature capabilites before
  1814. * WMI_FW_MAX_SUB_FEAT_CAP
  1815. */
  1816. WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
  1817. } WMI_FW_SUB_FEAT_CAPS;
  1818. #define ATH_BD_DATA_REV_MASK 0x000000FF
  1819. #define ATH_BD_DATA_REV_SHIFT 0
  1820. #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
  1821. #define ATH_BD_DATA_PROJ_ID_SHIFT 8
  1822. #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
  1823. #define ATH_BD_DATA_CUST_ID_SHIFT 16
  1824. #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
  1825. #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
  1826. #define SET_BD_DATA_REV(bd_data_ver, value) \
  1827. ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
  1828. #define GET_BD_DATA_REV(bd_data_ver) \
  1829. (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
  1830. #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
  1831. ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
  1832. #define GET_BD_DATA_PROJ_ID(bd_data_ver) \
  1833. (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
  1834. #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
  1835. ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
  1836. #define GET_BD_DATA_CUST_ID(bd_data_ver) \
  1837. (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
  1838. #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
  1839. ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
  1840. #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
  1841. (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
  1842. #ifdef ROME_LTE_COEX_FREQ_AVOID
  1843. typedef struct {
  1844. A_UINT32 start_freq; /* start frequency, not channel center freq */
  1845. A_UINT32 end_freq; /* end frequency */
  1846. } avoid_freq_range_desc;
  1847. typedef struct {
  1848. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  1849. A_UINT32 num_freq_ranges;
  1850. /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
  1851. avoid_freq_range_desc avd_freq_range[0];
  1852. } wmi_wlan_avoid_freq_ranges_event;
  1853. #endif
  1854. /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
  1855. #define WLAN_INIT_STATUS_SUCCESS 0x0
  1856. #define WLAN_INIT_STATUS_GEN_FAILED 0x1
  1857. #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  1858. #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  1859. typedef A_UINT32 WLAN_INIT_STATUS;
  1860. typedef struct {
  1861. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
  1862. wmi_abi_version fw_abi_vers;
  1863. wmi_mac_addr mac_addr;
  1864. A_UINT32 status;
  1865. A_UINT32 num_dscp_table;
  1866. } wmi_ready_event_fixed_param;
  1867. typedef struct {
  1868. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
  1869. /**
  1870. * @brief num_vdev - number of virtual devices (VAPs) to support
  1871. */
  1872. A_UINT32 num_vdevs;
  1873. /**
  1874. * @brief num_peers - number of peer nodes to support
  1875. */
  1876. A_UINT32 num_peers;
  1877. /*
  1878. * @brief In offload mode target supports features like WOW, chatter and other
  1879. * protocol offloads. In order to support them some functionalities like
  1880. * reorder buffering, PN checking need to be done in target. This determines
  1881. * maximum number of peers suported by target in offload mode
  1882. */
  1883. A_UINT32 num_offload_peers;
  1884. /* @brief Number of reorder buffers available for doing target based reorder
  1885. * Rx reorder buffering
  1886. */
  1887. A_UINT32 num_offload_reorder_buffs;
  1888. /**
  1889. * @brief num_peer_keys - number of keys per peer
  1890. */
  1891. A_UINT32 num_peer_keys;
  1892. /**
  1893. * @brief num_peer_tids - number of TIDs to provide storage for per peer.
  1894. */
  1895. A_UINT32 num_tids;
  1896. /**
  1897. * @brief ast_skid_limit - max skid for resolving hash collisions
  1898. * @details
  1899. * The address search table is sparse, so that if two MAC addresses
  1900. * result in the same hash value, the second of these conflicting
  1901. * entries can slide to the next index in the address search table,
  1902. * and use it, if it is unoccupied. This ast_skid_limit parameter
  1903. * specifies the upper bound on how many subsequent indices to search
  1904. * over to find an unoccupied space.
  1905. */
  1906. A_UINT32 ast_skid_limit;
  1907. /**
  1908. * @brief tx_chain_mask - the nominal chain mask for transmit
  1909. * @details
  1910. * The chain mask may be modified dynamically, e.g. to operate AP tx with
  1911. * a reduced number of chains if no clients are associated.
  1912. * This configuration parameter specifies the nominal chain-mask that
  1913. * should be used when not operating with a reduced set of tx chains.
  1914. */
  1915. A_UINT32 tx_chain_mask;
  1916. /**
  1917. * @brief rx_chain_mask - the nominal chain mask for receive
  1918. * @details
  1919. * The chain mask may be modified dynamically, e.g. for a client to use
  1920. * a reduced number of chains for receive if the traffic to the client
  1921. * is low enough that it doesn't require downlink MIMO or antenna
  1922. * diversity.
  1923. * This configuration parameter specifies the nominal chain-mask that
  1924. * should be used when not operating with a reduced set of rx chains.
  1925. */
  1926. A_UINT32 rx_chain_mask;
  1927. /**
  1928. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  1929. * @details
  1930. * Each WMM access class (voice, video, best-effort, background) will
  1931. * have its own timeout value to dictate how long to wait for missing
  1932. * rx MPDUs to arrive before flushing subsequent MPDUs that have already
  1933. * been received.
  1934. * This parameter specifies the timeout in milliseconds for each class .
  1935. * NOTE: the number of class (defined as 4) cannot be
  1936. * changed in the future without breaking WMI compatibility.
  1937. */
  1938. A_UINT32 rx_timeout_pri[4];
  1939. /**
  1940. * @brief rx_decap mode - what mode the rx should decap packets to
  1941. * @details
  1942. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  1943. * THis setting also determines the default TX behavior, however TX
  1944. * behavior can be modified on a per VAP basis during VAP init
  1945. */
  1946. A_UINT32 rx_decap_mode;
  1947. /**
  1948. * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
  1949. */
  1950. A_UINT32 scan_max_pending_req;
  1951. /**
  1952. * @brief maximum VDEV that could use BMISS offload
  1953. */
  1954. A_UINT32 bmiss_offload_max_vdev;
  1955. /**
  1956. * @brief maximum VDEV that could use offload roaming
  1957. */
  1958. A_UINT32 roam_offload_max_vdev;
  1959. /**
  1960. * @brief maximum AP profiles that would push to offload roaming
  1961. */
  1962. A_UINT32 roam_offload_max_ap_profiles;
  1963. /**
  1964. * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
  1965. * @details
  1966. * The target's WAL maintains a table to hold information regarding which
  1967. * peers belong to a given multicast group, so that if multicast->unicast
  1968. * conversion is enabled, the target can convert multicast tx frames to a
  1969. * series of unicast tx frames, to each peer within the multicast group.
  1970. * This num_mcast_groups configuration parameter tells the target how
  1971. * many multicast groups to provide storage for within its multicast
  1972. * group membership table.
  1973. */
  1974. A_UINT32 num_mcast_groups;
  1975. /**
  1976. * @brief num_mcast_table_elems - size to alloc for the mcast membership table
  1977. * @details
  1978. * This num_mcast_table_elems configuration parameter tells the target
  1979. * how many peer elements it needs to provide storage for in its
  1980. * multicast group membership table.
  1981. * These multicast group membership table elements are shared by the
  1982. * multicast groups stored within the table.
  1983. */
  1984. A_UINT32 num_mcast_table_elems;
  1985. /**
  1986. * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
  1987. * @details
  1988. * This configuration parameter specifies whether the target should
  1989. * perform multicast --> unicast conversion on transmit, and if so,
  1990. * what to do if it finds no entries in its multicast group membership
  1991. * table for the multicast IP address in the tx frame.
  1992. * Configuration value:
  1993. * 0 -> Do not perform multicast to unicast conversion.
  1994. * 1 -> Convert multicast frames to unicast, if the IP multicast address
  1995. * from the tx frame is found in the multicast group membership
  1996. * table. If the IP multicast address is not found, drop the frame.
  1997. * 2 -> Convert multicast frames to unicast, if the IP multicast address
  1998. * from the tx frame is found in the multicast group membership
  1999. * table. If the IP multicast address is not found, transmit the
  2000. * frame as multicast.
  2001. */
  2002. A_UINT32 mcast2ucast_mode;
  2003. /**
  2004. * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
  2005. * @details
  2006. * This parameter controls how much memory the target will allocate to
  2007. * store a log of tx PPDU meta-information (how large the PPDU was,
  2008. * when it was sent, whether it was successful, etc.)
  2009. */
  2010. A_UINT32 tx_dbg_log_size;
  2011. /**
  2012. * @brief num_wds_entries - how many AST entries to be allocated for WDS
  2013. */
  2014. A_UINT32 num_wds_entries;
  2015. /**
  2016. * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
  2017. * this limit can be 0 -default, 1 256B
  2018. */
  2019. A_UINT32 dma_burst_size;
  2020. /**
  2021. * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
  2022. * to account for interface latency to avoid underrun.
  2023. */
  2024. A_UINT32 mac_aggr_delim;
  2025. /**
  2026. * @brief rx_skip_defrag_timeout_dup_detection_check
  2027. * @details
  2028. * determine whether target is responsible for detecting duplicate
  2029. * non-aggregate MPDU and timing out stale fragments.
  2030. *
  2031. * A-MPDU reordering is always performed on the target.
  2032. *
  2033. * 0: target responsible for frag timeout and dup checking
  2034. * 1: host responsible for frag timeout and dup checking
  2035. */
  2036. A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
  2037. /**
  2038. * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
  2039. * and Max no of descriptors for each Video link (node).
  2040. */
  2041. A_UINT32 vow_config;
  2042. /**
  2043. * @brief maximum VDEV that could use GTK offload
  2044. */
  2045. A_UINT32 gtk_offload_max_vdev;
  2046. /**
  2047. * @brief num_msdu_desc - Number of msdu descriptors target should use
  2048. */
  2049. A_UINT32 num_msdu_desc; /* Number of msdu desc */
  2050. /**
  2051. * @brief max_frag_entry - Max. number of Tx fragments per MSDU
  2052. * @details
  2053. * This parameter controls the max number of Tx fragments per MSDU.
  2054. * This is sent by the target as part of the WMI_SERVICE_READY event
  2055. * and is overriden by the OS shim as required.
  2056. */
  2057. A_UINT32 max_frag_entries;
  2058. /**
  2059. * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
  2060. * @brief num_msdu_desc - Number of vdev that can support beacon offload
  2061. */
  2062. A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
  2063. /**
  2064. * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
  2065. * @details
  2066. * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
  2067. * peers in a connection tracking table for possible TDLS link creation
  2068. * or deletion. This controls the number of tracked peers per vdev.
  2069. */
  2070. A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
  2071. A_UINT32 beacon_tx_offload_max_vdev;
  2072. A_UINT32 num_multicast_filter_entries;
  2073. A_UINT32 num_wow_filters; /*host can configure the number of wow filters */
  2074. /**
  2075. * @brief num_keep_alive_pattern - Num of keep alive patterns configured
  2076. * from host.
  2077. */
  2078. A_UINT32 num_keep_alive_pattern;
  2079. /**
  2080. * @brief keep_alive_pattern_size - keep alive pattern size.
  2081. */
  2082. A_UINT32 keep_alive_pattern_size;
  2083. /**
  2084. * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
  2085. * @details
  2086. * Each TDLS STA can become a sleep STA independently. This parameter
  2087. * mentions how many such sleep STAs can be supported concurrently.
  2088. */
  2089. A_UINT32 max_tdls_concurrent_sleep_sta;
  2090. /**
  2091. * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
  2092. * @details
  2093. * Each TDLS STA can become a buffer STA independently. This parameter
  2094. * mentions how many such buffer STAs can be supported concurrently.
  2095. */
  2096. A_UINT32 max_tdls_concurrent_buffer_sta;
  2097. /**
  2098. * @brief wmi_send_separate - host configures fw to send the wmi separately
  2099. */
  2100. A_UINT32 wmi_send_separate;
  2101. /**
  2102. * @brief num_ocb_vdevs - Number of vdevs used for OCB support
  2103. */
  2104. A_UINT32 num_ocb_vdevs;
  2105. /**
  2106. * @brief num_ocb_channels - The supported number of simultaneous OCB channels
  2107. */
  2108. A_UINT32 num_ocb_channels;
  2109. /**
  2110. * @brief num_ocb_schedules - The supported number of OCB schedule segments
  2111. */
  2112. A_UINT32 num_ocb_schedules;
  2113. /**
  2114. * @brief specific configuration from host, such as per platform configuration
  2115. */
  2116. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
  2117. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
  2118. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
  2119. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
  2120. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
  2121. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
  2122. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
  2123. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
  2124. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
  2125. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
  2126. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
  2127. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
  2128. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
  2129. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
  2130. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
  2131. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
  2132. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
  2133. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
  2134. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
  2135. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
  2136. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_S 10
  2137. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_M 0x400
  2138. A_UINT32 flag1;
  2139. /** @brief smart_ant_cap - Smart Antenna capabilities information
  2140. * @details
  2141. * 1 - Smart antenna is enabled.
  2142. * 0 - Smart antenna is disabled.
  2143. * In future this can contain smart antenna specifc capabilities.
  2144. */
  2145. A_UINT32 smart_ant_cap;
  2146. /**
  2147. * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
  2148. * during init
  2149. */
  2150. A_UINT32 BK_Minfree;
  2151. A_UINT32 BE_Minfree;
  2152. A_UINT32 VI_Minfree;
  2153. A_UINT32 VO_Minfree;
  2154. /**
  2155. * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
  2156. * descriptor memory allocation.
  2157. * 1 - Allocate fragment descriptor memory for data packet in firmware.
  2158. * If host wants to transmit data packet at its desired rate,
  2159. * this field must be set.
  2160. * 0 - Don't allocate fragment descriptor for data packet.
  2161. */
  2162. A_UINT32 alloc_frag_desc_for_data_pkt;
  2163. /*
  2164. * how much space to allocate for NDP NS (neighbor solicitation)
  2165. * specs
  2166. */
  2167. A_UINT32 num_ns_ext_tuples_cfg;
  2168. /**
  2169. * size (in bytes) of the buffer the FW shall allocate to store
  2170. * packet filtering instructions
  2171. */
  2172. A_UINT32 bpf_instruction_size;
  2173. /**
  2174. * Maximum no of BSSID based RX filters host would program
  2175. * Value 0 means host doesn't given any limit to FW.
  2176. */
  2177. A_UINT32 max_bssid_rx_filters;
  2178. /**
  2179. * Use PDEV ID instead of MAC ID, added for backward compatibility with
  2180. * older host which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
  2181. */
  2182. A_UINT32 use_pdev_id;
  2183. } wmi_resource_config;
  2184. #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
  2185. do { \
  2186. (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2187. (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
  2188. WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2189. } while (0)
  2190. #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
  2191. (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
  2192. WMI_RSRC_CFG_FLAG_ ## flag ## _S)
  2193. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
  2194. WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
  2195. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
  2196. WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
  2197. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
  2198. WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
  2199. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
  2200. WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
  2201. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
  2202. WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
  2203. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
  2204. WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
  2205. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
  2206. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
  2207. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
  2208. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
  2209. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
  2210. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
  2211. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
  2212. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
  2213. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
  2214. WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
  2215. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
  2216. WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
  2217. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
  2218. WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
  2219. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
  2220. WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
  2221. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
  2222. WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
  2223. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
  2224. WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
  2225. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
  2226. WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
  2227. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
  2228. WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
  2229. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
  2230. WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
  2231. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
  2232. WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
  2233. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_SET(word32, value) \
  2234. WMI_RSRC_CFG_FLAG_SET((word32), \
  2235. TX_MSDU_ID_NEW_PARTITION_SUPPORT, (value))
  2236. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_GET(word32) \
  2237. WMI_RSRC_CFG_FLAG_GET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT)
  2238. typedef struct {
  2239. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
  2240. /** The following indicate the WMI versions to be supported by
  2241. * the host driver. Note that the host driver decide to
  2242. * "downgrade" its WMI version support and this may not be the
  2243. * native version of the host driver. */
  2244. wmi_abi_version host_abi_vers;
  2245. A_UINT32 num_host_mem_chunks;
  2246. /** size of array host_mem_chunks[] */
  2247. /* The TLVs for resource_config, host_mem_chunks[], and
  2248. * hw_mode_config will follow.
  2249. * wmi_resource_config resource_config;
  2250. * wlan_host_memory_chunk host_mem_chunks[];
  2251. * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
  2252. * Note that the hw_mode_config, in spite of its "pdev" name,
  2253. * applies to the entire target rather than for a single pdev
  2254. * within the target.
  2255. * To avoid specifying a HW mode for the target, the host should
  2256. * fill hw_mode_config's fields with 0x0.
  2257. */
  2258. } wmi_init_cmd_fixed_param;
  2259. /**
  2260. * TLV for channel list
  2261. */
  2262. typedef struct {
  2263. /** WMI_CHAN_LIST_TAG */
  2264. A_UINT32 tag;
  2265. /** # of channels to scan */
  2266. A_UINT32 num_chan;
  2267. /** channels in Mhz */
  2268. A_UINT32 channel_list[1];
  2269. } wmi_chan_list;
  2270. /**
  2271. * TLV for bssid list
  2272. */
  2273. typedef struct {
  2274. /** WMI_BSSID_LIST_TAG */
  2275. A_UINT32 tag;
  2276. /** number of bssids */
  2277. A_UINT32 num_bssid;
  2278. /** bssid list */
  2279. wmi_mac_addr bssid_list[1];
  2280. } wmi_bssid_list;
  2281. /**
  2282. * TLV for ie data.
  2283. */
  2284. typedef struct {
  2285. /** WMI_IE_TAG */
  2286. A_UINT32 tag;
  2287. /** number of bytes in ie data */
  2288. A_UINT32 ie_len;
  2289. /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4 ) */
  2290. A_UINT32 ie_data[1];
  2291. } wmi_ie_data;
  2292. /**
  2293. * TLV used for length/buffer
  2294. */
  2295. typedef struct {
  2296. /**
  2297. * TLV tag and len; tag equals
  2298. * WMITLV_TAG_STRUC_wmi_tlv_buf_len_param
  2299. */
  2300. A_UINT32 tlv_header;
  2301. A_UINT32 buf_len; /** Length of buf */
  2302. /**
  2303. * Following this structure is the TLV byte stream of buf
  2304. * of length buf_len:
  2305. * A_UINT8 buf[];
  2306. *
  2307. */
  2308. } wmi_tlv_buf_len_param;
  2309. typedef struct {
  2310. /** Len of the SSID */
  2311. A_UINT32 ssid_len;
  2312. /** SSID */
  2313. A_UINT32 ssid[8];
  2314. } wmi_ssid;
  2315. typedef struct {
  2316. /** WMI_SSID_LIST_TAG */
  2317. A_UINT32 tag;
  2318. A_UINT32 num_ssids;
  2319. wmi_ssid ssids[1];
  2320. } wmi_ssid_list;
  2321. /* prefix used by scan requestor ids on the host */
  2322. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  2323. /* prefix used by scan request ids generated on the host */
  2324. /* host cycles through the lower 12 bits to generate ids */
  2325. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  2326. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  2327. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  2328. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
  2329. /* NOTE: This constant cannot be changed without breaking WMI compatibility */
  2330. #define WMI_IE_BITMAP_SIZE 8
  2331. typedef struct {
  2332. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  2333. /** Scan ID */
  2334. A_UINT32 scan_id;
  2335. /** Scan requestor ID */
  2336. A_UINT32 scan_req_id;
  2337. /** VDEV id(interface) that is requesting scan */
  2338. A_UINT32 vdev_id;
  2339. /** Scan Priority, input to scan scheduler */
  2340. A_UINT32 scan_priority;
  2341. /** Scan events subscription */
  2342. A_UINT32 notify_scan_events;
  2343. /** dwell time in msec on active channels */
  2344. A_UINT32 dwell_time_active;
  2345. /** dwell time in msec on passive channels */
  2346. A_UINT32 dwell_time_passive;
  2347. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  2348. A_UINT32 min_rest_time;
  2349. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  2350. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  2351. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  2352. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  2353. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  2354. * irrespective of activity. activity is determined by the idle_time parameter.
  2355. */
  2356. A_UINT32 max_rest_time;
  2357. /** time before sending next set of probe requests.
  2358. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  2359. * The number of probe requests specified depends on the ssid_list and bssid_list
  2360. */
  2361. A_UINT32 repeat_probe_time;
  2362. /** time in msec between 2 consequetive probe requests with in a set. */
  2363. A_UINT32 probe_spacing_time;
  2364. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  2365. A_UINT32 idle_time;
  2366. /** maximum time in msec allowed for scan */
  2367. A_UINT32 max_scan_time;
  2368. /** delay in msec before sending first probe request after switching to a channel */
  2369. A_UINT32 probe_delay;
  2370. /** Scan control flags */
  2371. A_UINT32 scan_ctrl_flags;
  2372. /** Burst duration time in msec*/
  2373. A_UINT32 burst_duration;
  2374. /** # if channels to scan. In the TLV channel_list[] */
  2375. A_UINT32 num_chan;
  2376. /** number of bssids. In the TLV bssid_list[] */
  2377. A_UINT32 num_bssid;
  2378. /** number of ssid. In the TLV ssid_list[] */
  2379. A_UINT32 num_ssids;
  2380. /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
  2381. A_UINT32 ie_len;
  2382. /** Max number of probes to be sent */
  2383. A_UINT32 n_probes;
  2384. /** MAC Address to use in Probe Req as SA **/
  2385. wmi_mac_addr mac_addr;
  2386. /** Mask on which MAC has to be randomized **/
  2387. wmi_mac_addr mac_mask;
  2388. /** ie bitmap to use in probe req **/
  2389. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  2390. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  2391. A_UINT32 num_vendor_oui;
  2392. /**
  2393. * TLV (tag length value ) parameters follow the scan_cmd
  2394. * structure. The TLV's are:
  2395. * A_UINT32 channel_list[];
  2396. * wmi_ssid ssid_list[];
  2397. * wmi_mac_addr bssid_list[];
  2398. * A_UINT8 ie_data[];
  2399. * wmi_vendor_oui vendor_oui[];
  2400. */
  2401. } wmi_start_scan_cmd_fixed_param;
  2402. /**
  2403. * scan control flags.
  2404. */
  2405. /** passively scan all channels including active channels */
  2406. #define WMI_SCAN_FLAG_PASSIVE 0x1
  2407. /** add wild card ssid probe request even though ssid_list is specified. */
  2408. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  2409. /** add cck rates to rates/xrate ie for the generated probe request */
  2410. #define WMI_SCAN_ADD_CCK_RATES 0x4
  2411. /** add ofdm rates to rates/xrate ie for the generated probe request */
  2412. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  2413. /** To enable indication of Chan load and Noise floor to host */
  2414. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  2415. /** Filter Probe request frames */
  2416. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  2417. /**When set, not to scan DFS channels*/
  2418. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  2419. /**When set, certain errors are ignored and scan continues.
  2420. * Different FW scan engine may use its own logic to decide what errors to ignore*/
  2421. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  2422. /** Enable promiscous mode for ese */
  2423. #define WMI_SCAN_FILTER_PROMISCOUS 0x100
  2424. /** allow to send probe req on DFS channel */
  2425. #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
  2426. /** add TPC content in probe req frame */
  2427. #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
  2428. /** add DS content in probe req frame */
  2429. #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
  2430. /** use random mac address for TA for probe request frame and add
  2431. * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
  2432. * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
  2433. #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
  2434. /** allow mgmt transmission during off channel scan */
  2435. #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
  2436. /** allow data transmission during off channel scan */
  2437. #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
  2438. /** allow capture ppdu with phy errrors */
  2439. #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
  2440. /** always do passive scan on passive channels */
  2441. #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x1000
  2442. /** set HALF (10MHz) rate support */
  2443. #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
  2444. /** set Quarter (5MHz) rate support */
  2445. #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
  2446. #define WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ 0x80000
  2447. #define WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ 0x100000
  2448. /** for adaptive scan mode using 3 bits (21 - 23 bits) */
  2449. #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
  2450. #define WMI_SCAN_DWELL_MODE_SHIFT 21
  2451. typedef enum {
  2452. WMI_SCAN_DWELL_MODE_DEFAULT = 0,
  2453. WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
  2454. WMI_SCAN_DWELL_MODE_MODERATE = 2,
  2455. WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
  2456. WMI_SCAN_DWELL_MODE_STATIC = 4,
  2457. } WMI_SCAN_DWELL_MODE;
  2458. #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
  2459. do { \
  2460. (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
  2461. WMI_SCAN_DWELL_MODE_MASK); \
  2462. } while (0)
  2463. #define WMI_SCAN_GET_DWELL_MODE(flag) \
  2464. (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
  2465. /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  2466. #define WMI_SCAN_CLASS_MASK 0xFF000000
  2467. /*
  2468. * Masks identifying types/ID of scans
  2469. * Scan_Stop macros should be the same value as below defined in UMAC
  2470. * #define IEEE80211_SPECIFIC_SCAN 0x00000000
  2471. * #define IEEE80211_VAP_SCAN 0x01000000
  2472. * #define IEEE80211_ALL_SCANS 0x04000000
  2473. */
  2474. #define WMI_SCAN_STOP_ONE 0x00000000
  2475. #define WMI_SCN_STOP_VAP_ALL 0x01000000
  2476. #define WMI_SCAN_STOP_ALL 0x04000000
  2477. typedef struct {
  2478. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  2479. /** requestor requesting cancel */
  2480. A_UINT32 requestor;
  2481. /** Scan ID */
  2482. A_UINT32 scan_id;
  2483. /**
  2484. * Req Type
  2485. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  2486. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  2487. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  2488. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  2489. */
  2490. A_UINT32 req_type;
  2491. /**
  2492. * vDev ID
  2493. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  2494. */
  2495. A_UINT32 vdev_id;
  2496. } wmi_stop_scan_cmd_fixed_param;
  2497. #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
  2498. #define APPEND_TO_EXISTING_CHAN_LIST 1
  2499. typedef struct {
  2500. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
  2501. A_UINT32 num_scan_chans;
  2502. /** no of elements in chan_info[] */
  2503. A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
  2504. A_UINT32 pdev_id; /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values */
  2505. /** Followed by the variable length TLV chan_info:
  2506. * wmi_channel chan_info[] */
  2507. } wmi_scan_chan_list_cmd_fixed_param;
  2508. /*
  2509. * Priority numbers must be sequential, starting with 0.
  2510. */
  2511. /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
  2512. typedef enum {
  2513. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  2514. WMI_SCAN_PRIORITY_LOW,
  2515. WMI_SCAN_PRIORITY_MEDIUM,
  2516. WMI_SCAN_PRIORITY_HIGH,
  2517. WMI_SCAN_PRIORITY_VERY_HIGH,
  2518. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  2519. } wmi_scan_priority;
  2520. /* Five Levels for Requested Priority */
  2521. /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
  2522. typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
  2523. /**
  2524. * to keep align with UMAC implementation, we pass only vdev_type but not vdev_subtype when we overwrite an entry for a specific vdev_subtype
  2525. * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
  2526. * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
  2527. */
  2528. typedef struct {
  2529. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
  2530. /**
  2531. * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
  2532. * vdev_type should be one of enum in WLAN_OPMODE which inculdes WLAN_M_IBSS, WLAN_M_STA, WLAN_M_AP and WLAN_M_MONITOR currently
  2533. */
  2534. A_UINT32 vdev_type;
  2535. /**
  2536. * number of rows in mapping_table for a specific vdev
  2537. * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
  2538. */
  2539. A_UINT32 number_rows;
  2540. /** mapping_table for a specific vdev follows this TLV
  2541. * WLAN_PRIORITY_MAPPING mapping_table[]; */
  2542. } wmi_scan_sch_priority_table_cmd_fixed_param;
  2543. /** update flags */
  2544. #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
  2545. #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
  2546. #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
  2547. typedef struct {
  2548. A_UINT32 tlv_header;
  2549. /** requestor requesting update scan request */
  2550. A_UINT32 requestor;
  2551. /** Scan ID of the scan request that need to be update */
  2552. A_UINT32 scan_id;
  2553. /** update flags, indicating which of the following fields are valid and need to be updated*/
  2554. A_UINT32 scan_update_flags;
  2555. /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
  2556. A_UINT32 scan_priority;
  2557. /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
  2558. A_UINT32 min_rest_time;
  2559. /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
  2560. A_UINT32 max_rest_time;
  2561. } wmi_scan_update_request_cmd_fixed_param;
  2562. #define WMI_SCAN_PROBE_OUI_SPOOFED_MAC_IN_PROBE_REQ 0x1
  2563. #define WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ 0x2
  2564. #define WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ 0x4
  2565. typedef struct _wmi_vendor_oui {
  2566. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_oui */
  2567. A_UINT32 oui_type_subtype; /** Vendor OUI type and subtype, lower 3 bytes is type and highest byte is subtype**/
  2568. } wmi_vendor_oui;
  2569. typedef struct {
  2570. A_UINT32 tlv_header;
  2571. /** oui to be used in probe request frame when random mac addresss is
  2572. * requested part of scan parameters. this is applied to both FW internal scans and
  2573. * host initated scans. host can request for random mac address with
  2574. * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
  2575. A_UINT32 prob_req_oui;
  2576. A_UINT32 vdev_id;
  2577. /** Control Flags **/
  2578. A_UINT32 flags;
  2579. /** ie bitmap to use in probe req **/
  2580. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  2581. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  2582. A_UINT32 num_vendor_oui;
  2583. /* Following this tlv, there comes an array of structure of type wmi_vendor_ouiwmi_vendor_oui vendor_oui[];*/
  2584. } wmi_scan_prob_req_oui_cmd_fixed_param;
  2585. enum wmi_scan_event_type {
  2586. WMI_SCAN_EVENT_STARTED = 0x1,
  2587. WMI_SCAN_EVENT_COMPLETED = 0x2,
  2588. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  2589. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  2590. WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
  2591. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
  2592. WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
  2593. WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
  2594. WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  2595. WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
  2596. WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
  2597. WMI_SCAN_EVENT_MAX = 0x8000
  2598. };
  2599. enum wmi_scan_completion_reason {
  2600. /** scan related events */
  2601. WMI_SCAN_REASON_NONE = 0xFF,
  2602. WMI_SCAN_REASON_COMPLETED = 0,
  2603. WMI_SCAN_REASON_CANCELLED = 1,
  2604. WMI_SCAN_REASON_PREEMPTED = 2,
  2605. WMI_SCAN_REASON_TIMEDOUT = 3,
  2606. WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
  2607. WMI_SCAN_REASON_SUSPENDED = 5,
  2608. WMI_SCAN_REASON_MAX,
  2609. };
  2610. typedef struct {
  2611. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
  2612. /** scan event (wmi_scan_event_type) */
  2613. A_UINT32 event;
  2614. /** status of the scan completion event */
  2615. A_UINT32 reason;
  2616. /** channel freq , only valid for FOREIGN channel event*/
  2617. A_UINT32 channel_freq;
  2618. /**id of the requestor whose scan is in progress */
  2619. A_UINT32 requestor;
  2620. /**id of the scan that is in progress */
  2621. A_UINT32 scan_id;
  2622. /**id of VDEV that requested the scan */
  2623. A_UINT32 vdev_id;
  2624. } wmi_scan_event_fixed_param;
  2625. /* WMI Diag event */
  2626. typedef struct {
  2627. A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
  2628. A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
  2629. A_UINT32 count; /* Number of diag frames added to current event */
  2630. A_UINT32 dropped;
  2631. /* followed by WMITLV_TAG_ARRAY_BYTE */
  2632. } wmi_diag_event_fixed_param;
  2633. /*
  2634. * If FW has multiple active channels due to MCC(multi channel concurrency),
  2635. * then these stats are combined stats for all the active channels.
  2636. */
  2637. typedef struct {
  2638. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
  2639. /** ack count, it is an incremental number, not accumulated number */
  2640. A_UINT32 ackRcvBad;
  2641. /** bad rts count, it is an incremental number, not accumulated number */
  2642. A_UINT32 rtsBad;
  2643. /** good rts, it is an incremental number, not accumulated number */
  2644. A_UINT32 rtsGood;
  2645. /** fcs count, it is an incremental number, not accumulated number */
  2646. A_UINT32 fcsBad;
  2647. /** beacon count, it is an incremental number, not accumulated number */
  2648. A_UINT32 noBeacons;
  2649. } wmi_update_whal_mib_stats_event_fixed_param;
  2650. /*
  2651. * This defines how much headroom is kept in the
  2652. * receive frame between the descriptor and the
  2653. * payload, in order for the WMI PHY error and
  2654. * management handler to insert header contents.
  2655. *
  2656. * This is in bytes.
  2657. */
  2658. #define WMI_MGMT_RX_HDR_HEADROOM sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr)
  2659. /** This event will be used for sending scan results
  2660. * as well as rx mgmt frames to the host. The rx buffer
  2661. * will be sent as part of this WMI event. It would be a
  2662. * good idea to pass all the fields in the RX status
  2663. * descriptor up to the host.
  2664. */
  2665. /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
  2666. #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
  2667. /** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
  2668. #define WMI_MGMT_RX_HDR_EXTSCAN 0x01
  2669. /**
  2670. * flag indicating that the the mgmt frame (probe req/beacon) is received in
  2671. * the context of matched network by FW ENLO
  2672. */
  2673. #define WMI_MGMT_RX_HDR_ENLO 0x02
  2674. typedef struct {
  2675. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
  2676. /** channel on which this frame is received. */
  2677. A_UINT32 channel;
  2678. /** snr information used to cal rssi */
  2679. A_UINT32 snr;
  2680. /** Rate kbps */
  2681. A_UINT32 rate;
  2682. /** rx phy mode WLAN_PHY_MODE */
  2683. A_UINT32 phy_mode;
  2684. /** length of the frame */
  2685. A_UINT32 buf_len;
  2686. /** rx status */
  2687. A_UINT32 status;
  2688. /** RSSI of PRI 20MHz for each chain. */
  2689. A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
  2690. /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
  2691. A_UINT32 flags;
  2692. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  2693. A_INT32 rssi;
  2694. /** delta between local TSF(TSF timestamp when frame was RXd)
  2695. * and remote TSF(TSF timestamp in the IE for mgmt frame
  2696. * beacon,proberesp for e.g). If remote TSF is not available,
  2697. * delta set to 0.
  2698. * Although tsf_delta is stored as A_UINT32, it can be negative,
  2699. * and thus would need to be sign-extended if added to a value
  2700. * larger than 32 bits.
  2701. */
  2702. A_UINT32 tsf_delta;
  2703. /*
  2704. * The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
  2705. * TSF timestamp in the RX MAC descriptor provided by HW.
  2706. */
  2707. A_UINT32 rx_tsf_l32;
  2708. /*
  2709. *The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
  2710. * after the packet is received.
  2711. */
  2712. A_UINT32 rx_tsf_u32;
  2713. /* This TLV is followed by array of bytes:
  2714. * // management frame buffer
  2715. * A_UINT8 bufp[];
  2716. */
  2717. } wmi_mgmt_rx_hdr;
  2718. typedef struct {
  2719. /** TSF timestamp */
  2720. A_UINT32 tsf_timestamp;
  2721. /**
  2722. * Current freq1, freq2
  2723. *
  2724. * [7:0]: freq1[lo]
  2725. * [15:8] : freq1[hi]
  2726. * [23:16]: freq2[lo]
  2727. * [31:24]: freq2[hi]
  2728. */
  2729. A_UINT32 freq_info_1;
  2730. /**
  2731. * Combined RSSI over all chains and channel width for this PHY error
  2732. *
  2733. * [7:0]: RSSI combined
  2734. * [15:8]: Channel width (MHz)
  2735. * [23:16]: PHY error code
  2736. * [24:16]: reserved (future use)
  2737. */
  2738. A_UINT32 freq_info_2;
  2739. /**
  2740. * RSSI on chain 0 through 3
  2741. *
  2742. * This is formatted the same as the PPDU_START RX descriptor
  2743. * field:
  2744. *
  2745. * [7:0]: pri20
  2746. * [15:8]: sec20
  2747. * [23:16]: sec40
  2748. * [31:24]: sec80
  2749. */
  2750. A_UINT32 rssi_chain0;
  2751. A_UINT32 rssi_chain1;
  2752. A_UINT32 rssi_chain2;
  2753. A_UINT32 rssi_chain3;
  2754. /**
  2755. * Last calibrated NF value for chain 0 through 3
  2756. *
  2757. * nf_list_1:
  2758. *
  2759. * + [15:0] - chain 0
  2760. * + [31:16] - chain 1
  2761. *
  2762. * nf_list_2:
  2763. *
  2764. * + [15:0] - chain 2
  2765. * + [31:16] - chain 3
  2766. */
  2767. A_UINT32 nf_list_1;
  2768. A_UINT32 nf_list_2;
  2769. /** Length of the frame */
  2770. A_UINT32 buf_len;
  2771. } wmi_single_phyerr_rx_hdr;
  2772. #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
  2773. #define WMI_UNIFIED_FREQINFO_1_LO_S 0
  2774. #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
  2775. #define WMI_UNIFIED_FREQINFO_1_HI_S 8
  2776. #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
  2777. #define WMI_UNIFIED_FREQINFO_2_LO_S 16
  2778. #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
  2779. #define WMI_UNIFIED_FREQINFO_2_HI_S 24
  2780. /*
  2781. * Please keep in mind that these _SET macros break macro side effect
  2782. * assumptions; don't be clever with them.
  2783. */
  2784. #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
  2785. (WMI_F_MS((hdr)->freq_info_1, \
  2786. WMI_UNIFIED_FREQINFO_ ## f ## _LO) \
  2787. | (WMI_F_MS((hdr)->freq_info_1, \
  2788. WMI_UNIFIED_FREQINFO_ ## f ## _HI) << 8))
  2789. #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
  2790. do { \
  2791. WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
  2792. WMI_UNIFIED_FREQINFO_ ## f ## _LO); \
  2793. WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
  2794. WMI_UNIFIED_FREQINFO_ ## f ## _HI); \
  2795. } while (0)
  2796. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
  2797. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
  2798. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
  2799. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
  2800. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
  2801. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
  2802. #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
  2803. ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
  2804. WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
  2805. #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
  2806. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  2807. WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
  2808. #define WMI_UNIFIED_CHWIDTH_GET(hdr) \
  2809. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
  2810. #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
  2811. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  2812. WMI_UNIFIED_FREQINFO_2_CHWIDTH);
  2813. #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
  2814. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
  2815. #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
  2816. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  2817. WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
  2818. #define WMI_UNIFIED_CHAIN_0 0x0000ffff
  2819. #define WMI_UNIFIED_CHAIN_0_S 0
  2820. #define WMI_UNIFIED_CHAIN_1 0xffff0000
  2821. #define WMI_UNIFIED_CHAIN_1_S 16
  2822. #define WMI_UNIFIED_CHAIN_2 0x0000ffff
  2823. #define WMI_UNIFIED_CHAIN_2_S 0
  2824. #define WMI_UNIFIED_CHAIN_3 0xffff0000
  2825. #define WMI_UNIFIED_CHAIN_3_S 16
  2826. #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
  2827. #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
  2828. #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
  2829. #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
  2830. #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
  2831. ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, \
  2832. WMI_UNIFIED_CHAIN_ ## c)))
  2833. #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
  2834. WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, (nf) & 0xffff, \
  2835. WMI_UNIFIED_CHAIN_ ## c);
  2836. /*
  2837. * For now, this matches what the underlying hardware is doing.
  2838. * Update ar6000ProcRxDesc() to use these macros when populating
  2839. * the rx descriptor and then we can just copy the field over
  2840. * to the WMI PHY notification without worrying about breaking
  2841. * things.
  2842. */
  2843. #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
  2844. #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
  2845. #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
  2846. #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
  2847. #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
  2848. #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
  2849. #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
  2850. #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
  2851. #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
  2852. WMI_F_RMW((hdr)->rssi_chain ## c, (rssi) & 0xff, \
  2853. WMI_UNIFIED_RSSI_CHAN_ ## ch);
  2854. #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
  2855. ((int8_t) (WMI_F_MS((hdr)->rssi_chain ## c, \
  2856. WMI_UNIFIED_RSSI_CHAN_ ## ch)))
  2857. typedef struct {
  2858. /** Phy error event header */
  2859. wmi_single_phyerr_rx_hdr hdr;
  2860. /** frame buffer */
  2861. A_UINT8 bufp[1];
  2862. } wmi_single_phyerr_rx_event;
  2863. /* PHY ERROR MASK 0 */
  2864. /* bits 1:0 defined but not published */
  2865. #define WMI_PHY_ERROR_MASK0_RADAR (1<<2)
  2866. /* bits 23:3 defined but not published */
  2867. #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1<<24)
  2868. /* bits 25:24 defined but not published */
  2869. #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1<<26)
  2870. /* bits 31:27 defined but not published */
  2871. /* PHY ERROR MASK 1
  2872. * bits 13:0 defined but not published
  2873. * bits 31:14 reserved
  2874. */
  2875. /* PHY ERROR MASK 2
  2876. * bits 31:0 reserved
  2877. */
  2878. typedef struct {
  2879. /* TLV tag and len; tag equals
  2880. * WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr
  2881. */
  2882. A_UINT32 tlv_header;
  2883. /** Phy error phy error count */
  2884. A_UINT32 num_phyerr_events;
  2885. A_UINT32 tsf_l32;
  2886. A_UINT32 tsf_u32;
  2887. A_UINT32 buf_len;
  2888. union {
  2889. /* OBSOLETE - will be removed once all refs are gone */
  2890. A_UINT32 pmac_id;
  2891. /** pdev_id for identifying the MAC
  2892. * See macros starting with WMI_PDEV_ID_ for values.
  2893. */
  2894. A_UINT32 pdev_id;
  2895. };
  2896. A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
  2897. A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
  2898. A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
  2899. /* This TLV is followed by array of bytes:
  2900. * // frame buffer - contains multiple payloads in the order:
  2901. * // header - payload, header - payload...
  2902. * (The header is of type: wmi_single_phyerr_rx_hdr)
  2903. * A_UINT8 bufp[];
  2904. */
  2905. } wmi_comb_phyerr_rx_hdr;
  2906. /* WMI MGMT TX */
  2907. typedef struct {
  2908. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
  2909. /** unique id identifying the VDEV, generated by the caller */
  2910. A_UINT32 vdev_id;
  2911. /** peer MAC address */
  2912. wmi_mac_addr peer_macaddr;
  2913. /** xmit rate */
  2914. A_UINT32 tx_rate;
  2915. /** xmit power */
  2916. A_UINT32 tx_power;
  2917. /** Buffer length in bytes */
  2918. A_UINT32 buf_len;
  2919. /* This TLV is followed by array of bytes:
  2920. * // management frame buffer
  2921. * A_UINT8 bufp[];
  2922. */
  2923. } wmi_mgmt_tx_hdr;
  2924. typedef struct {
  2925. /*
  2926. * TLV tag and len;
  2927. * tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param
  2928. */
  2929. A_UINT32 tlv_header;
  2930. A_UINT32 vdev_id;
  2931. /* echoed in tx_compl_event */
  2932. A_UINT32 desc_id;
  2933. /* MHz units */
  2934. A_UINT32 chanfreq;
  2935. A_UINT32 paddr_lo;
  2936. A_UINT32 paddr_hi;
  2937. A_UINT32 frame_len;
  2938. /* Buffer length in bytes */
  2939. A_UINT32 buf_len;
  2940. /*
  2941. * This TLV is followed by array of bytes:
  2942. * First 64 bytes of management frame
  2943. * A_UINT8 bufp[];
  2944. */
  2945. } wmi_mgmt_tx_send_cmd_fixed_param;
  2946. typedef struct {
  2947. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
  2948. A_UINT32 value;
  2949. } wmi_echo_event_fixed_param;
  2950. typedef struct {
  2951. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
  2952. A_UINT32 value;
  2953. } wmi_echo_cmd_fixed_param;
  2954. typedef struct {
  2955. /* TLV tag and len; tag equals
  2956. * WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param
  2957. */
  2958. A_UINT32 tlv_header;
  2959. /** pdev_id for identifying the MAC
  2960. * See macros starting with WMI_PDEV_ID_ for values.
  2961. */
  2962. A_UINT32 pdev_id;
  2963. /** reg domain code */
  2964. A_UINT32 reg_domain;
  2965. A_UINT32 reg_domain_2G;
  2966. A_UINT32 reg_domain_5G;
  2967. A_UINT32 conformance_test_limit_2G;
  2968. A_UINT32 conformance_test_limit_5G;
  2969. A_UINT32 dfs_domain;
  2970. } wmi_pdev_set_regdomain_cmd_fixed_param;
  2971. typedef struct {
  2972. /** true for scan start and flase for scan end */
  2973. A_UINT32 scan_start;
  2974. } wmi_pdev_scan_cmd;
  2975. /* WMI support for setting ratemask in target */
  2976. typedef struct {
  2977. A_UINT32 tlv_header;
  2978. /*
  2979. * TLV tag and len; tag equals
  2980. * WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param
  2981. */
  2982. A_UINT32 vdev_id;
  2983. /*
  2984. * 0 - cck/ofdm
  2985. * 1 - HT
  2986. * 2 - VHT */
  2987. A_UINT32 type;
  2988. A_UINT32 mask_lower32;
  2989. A_UINT32 mask_higher32;
  2990. } wmi_vdev_config_ratemask_cmd_fixed_param;
  2991. /* nrp action - Filter Neighbor Rx Packets - add/remove filter */
  2992. enum {
  2993. WMI_FILTER_NRP_ACTION_ADD = 0x1,
  2994. WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
  2995. WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
  2996. }; /* nrp - Neighbor Rx Packets */
  2997. /* nrp type - Filter Neighbor Rx Packets - ap/client addr */
  2998. enum {
  2999. WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
  3000. WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
  3001. };
  3002. /* nrp flag - Filter Neighbor Rx Packets
  3003. * (capture flag, 2 & 3 not initially supported)
  3004. */
  3005. enum {
  3006. WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
  3007. WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
  3008. WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
  3009. };
  3010. /* Filter for Neighbor Rx Packets */
  3011. typedef struct {
  3012. A_UINT32 tlv_header;
  3013. /*
  3014. * TLV tag and len; tag equals
  3015. * WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param
  3016. */
  3017. A_UINT32 vdev_id;
  3018. /* AP Bssid or Client Mac-addr */
  3019. wmi_mac_addr addr;
  3020. /* Add/Remove NRF Filter */
  3021. A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
  3022. /* client/ap filter */
  3023. A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
  3024. /* optional - tx/rx capture */
  3025. A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
  3026. /* BSSID index - index of the BSSID register */
  3027. A_UINT32 bssid_idx;
  3028. } wmi_vdev_filter_nrp_config_cmd_fixed_param;
  3029. /*Command to set/unset chip in quiet mode*/
  3030. typedef struct {
  3031. /*
  3032. * TLV tag and len; tag equals
  3033. * WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param
  3034. */
  3035. A_UINT32 tlv_header;
  3036. /*
  3037. * pdev_id for identifying the MAC, See macros
  3038. * starting with WMI_PDEV_ID_ for values.
  3039. */
  3040. A_UINT32 pdev_id;
  3041. A_UINT32 period; /*period in TUs */
  3042. A_UINT32 duration; /*duration in TUs */
  3043. A_UINT32 next_start; /*offset in TUs */
  3044. A_UINT32 enabled; /*enable/disable */
  3045. } wmi_pdev_set_quiet_cmd_fixed_param;
  3046. typedef struct {
  3047. /* TLV tag and len; tag equals
  3048. * WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param
  3049. */
  3050. A_UINT32 tlv_header;
  3051. A_UINT32 vdev_id; /* Virtual interface ID */
  3052. A_UINT32 period; /* period in TUs */
  3053. A_UINT32 duration; /* duration in TUs */
  3054. A_UINT32 next_start; /* offset in TUs */
  3055. A_UINT32 enabled; /* enable/disable */
  3056. } wmi_vdev_set_quiet_cmd_fixed_param;
  3057. typedef struct {
  3058. /*
  3059. * TLV tag and len; tag equals
  3060. * WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param
  3061. */
  3062. A_UINT32 tlv_header;
  3063. /*
  3064. * vdev id indicating to which the vdev custom aggregation size
  3065. * will be applied.
  3066. */
  3067. A_UINT32 vdev_id;
  3068. /*
  3069. * Size for tx aggregation (max MPDUs per A-MPDU) for the vdev
  3070. * mentioned in vdev id
  3071. */
  3072. A_UINT32 tx_aggr_size;
  3073. /*
  3074. * Size for rx aggregation (block ack window size limit) for
  3075. * the vdev mentioned in vdev id
  3076. */
  3077. A_UINT32 rx_aggr_size;
  3078. } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
  3079. /*
  3080. * Command to enable/disable Green AP Power Save.
  3081. * This helps conserve power during AP operation. When the AP has no
  3082. * stations associated with it, the host can enable Green AP Power Save
  3083. * to request the firmware to shut down all but one transmit and receive
  3084. * chains.
  3085. */
  3086. typedef struct {
  3087. /** TLV tag and len; tag equals
  3088. * WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param
  3089. */
  3090. A_UINT32 tlv_header;
  3091. /** pdev_id for identifying the MAC
  3092. * See macros starting with WMI_PDEV_ID_ for values.
  3093. */
  3094. A_UINT32 pdev_id;
  3095. A_UINT32 enable; /*1:enable, 0:disable */
  3096. } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
  3097. #define MAX_HT_IE_LEN 32
  3098. /* DEPRECATED */
  3099. typedef struct {
  3100. A_UINT32 tlv_header;
  3101. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
  3102. A_UINT32 reserved0;
  3103. /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  3104. A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
  3105. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  3106. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  3107. /** The TLV for the HT IE follows:
  3108. * A_UINT32 ie_data[];
  3109. */
  3110. } wmi_pdev_set_ht_ie_cmd_fixed_param;
  3111. #define MAX_VHT_IE_LEN 32
  3112. /* DEPRECATED */
  3113. typedef struct {
  3114. A_UINT32 tlv_header;
  3115. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
  3116. A_UINT32 reserved0;
  3117. /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  3118. A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
  3119. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  3120. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  3121. /** The TLV for the VHT IE follows:
  3122. * A_UINT32 ie_data[];
  3123. */
  3124. } wmi_pdev_set_vht_ie_cmd_fixed_param;
  3125. typedef struct {
  3126. /** TLV tag and len; tag equals
  3127. * WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param
  3128. */
  3129. A_UINT32 tlv_header;
  3130. /** pdev_id for identifying the MAC
  3131. * See macros starting with WMI_PDEV_ID_ for values.
  3132. */
  3133. A_UINT32 pdev_id;
  3134. wmi_mac_addr base_macaddr;
  3135. } wmi_pdev_set_base_macaddr_cmd_fixed_param;
  3136. /*
  3137. * For now, the spectral configuration is global rather than
  3138. * per-vdev. The vdev is a placeholder and will be ignored
  3139. * by the firmware.
  3140. */
  3141. typedef struct {
  3142. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
  3143. A_UINT32 vdev_id;
  3144. A_UINT32 spectral_scan_count;
  3145. A_UINT32 spectral_scan_period;
  3146. A_UINT32 spectral_scan_priority;
  3147. A_UINT32 spectral_scan_fft_size;
  3148. A_UINT32 spectral_scan_gc_ena;
  3149. A_UINT32 spectral_scan_restart_ena;
  3150. A_UINT32 spectral_scan_noise_floor_ref;
  3151. A_UINT32 spectral_scan_init_delay;
  3152. A_UINT32 spectral_scan_nb_tone_thr;
  3153. A_UINT32 spectral_scan_str_bin_thr;
  3154. A_UINT32 spectral_scan_wb_rpt_mode;
  3155. A_UINT32 spectral_scan_rssi_rpt_mode;
  3156. A_UINT32 spectral_scan_rssi_thr;
  3157. A_UINT32 spectral_scan_pwr_format;
  3158. A_UINT32 spectral_scan_rpt_mode;
  3159. A_UINT32 spectral_scan_bin_scale;
  3160. A_UINT32 spectral_scan_dBm_adj;
  3161. A_UINT32 spectral_scan_chn_mask;
  3162. } wmi_vdev_spectral_configure_cmd_fixed_param;
  3163. /*
  3164. * Enabling, disabling and triggering the spectral scan
  3165. * is a per-vdev operation. That is, it will set channel
  3166. * flags per vdev rather than globally; so concurrent scan/run
  3167. * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
  3168. */
  3169. typedef struct {
  3170. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
  3171. A_UINT32 vdev_id;
  3172. /* 0 - ignore; 1 - trigger, 2 - clear trigger */
  3173. A_UINT32 trigger_cmd;
  3174. /* 0 - ignore; 1 - enable, 2 - disable */
  3175. A_UINT32 enable_cmd;
  3176. } wmi_vdev_spectral_enable_cmd_fixed_param;
  3177. /* information sub element id for QSBW, expected value is 0x02 */
  3178. #define WMI_CSA_EVENT_QSBW_ISE_ID_MASK 0x000000FF
  3179. /* length of QSBW ISE data, expected value is 0x02 */
  3180. #define WMI_CSA_EVENT_QSBW_ISE_LEN_MASK 0x0000FF00
  3181. /* capabilities, 0x01 for 5MHz, 0x02 for 10MHz, 0x01|0x2 for both
  3182. * (see WMI_CSA_EVENT_QSBW_ISE bitmask defs)
  3183. */
  3184. #define WMI_CSA_EVENT_QSBW_ISE_CAP_MASK 0x00FF0000
  3185. /* notification from AP, 0x01 for 5MHz, 0x02 for 10MHz
  3186. * (see WMI_CSA_EVENT_QSBW_ISE bitmask defs)
  3187. */
  3188. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_MASK 0xFF000000
  3189. #define WMI_CSA_EVENT_QSBW_ISE_ID 0x02
  3190. #define WMI_CSA_EVENT_QSBW_ISE_LEN 0x02
  3191. #define WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK 0x01
  3192. #define WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK 0x02
  3193. #define WMI_CSA_EVENT_QSBW_ISE_CAP_5M(qsbw_ise) \
  3194. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  3195. #define WMI_CSA_EVENT_QSBW_ISE_CAP_10M(qsbw_ise) \
  3196. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  3197. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_5M(qsbw_ise) \
  3198. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  3199. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \
  3200. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  3201. typedef enum {
  3202. WMI_CSA_IE_PRESENT = 0x00000001,
  3203. WMI_XCSA_IE_PRESENT = 0x00000002,
  3204. WMI_WBW_IE_PRESENT = 0x00000004,
  3205. WMI_CSWARP_IE_PRESENT = 0x00000008,
  3206. WMI_QSBW_ISE_PRESENT = 0x00000010,
  3207. } WMI_CSA_EVENT_IES_PRESENT_FLAG;
  3208. /* wmi CSA receive event from beacon frame */
  3209. typedef struct {
  3210. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
  3211. A_UINT32 i_fc_dur;
  3212. /* Bit 0-15: FC */
  3213. /* Bit 16-31: DUR */
  3214. wmi_mac_addr i_addr1;
  3215. wmi_mac_addr i_addr2;
  3216. /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
  3217. * changed in the future without breaking WMI compatibility */
  3218. A_UINT32 csa_ie[2];
  3219. A_UINT32 xcsa_ie[2];
  3220. A_UINT32 wb_ie[2];
  3221. A_UINT32 cswarp_ie;
  3222. A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
  3223. A_UINT32 qsbw_ise;
  3224. } wmi_csa_event_fixed_param;
  3225. typedef enum {
  3226. WAL_PEER_MCAST2UCAST_DISABLED = 0,
  3227. /* Drop the frames if match is not found */
  3228. WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1,
  3229. /* Send as mcast if match is not found */
  3230. WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2,
  3231. } WMI_PEER_MCAST2UCAST_MODE;
  3232. typedef enum {
  3233. /** TX chain mask */
  3234. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  3235. /** RX chain mask */
  3236. WMI_PDEV_PARAM_RX_CHAIN_MASK,
  3237. /** TX power limit for 2G Radio */
  3238. WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
  3239. /** TX power limit for 5G Radio */
  3240. WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
  3241. /** TX power scale */
  3242. WMI_PDEV_PARAM_TXPOWER_SCALE,
  3243. /** Beacon generation mode . 0: host, 1: target */
  3244. WMI_PDEV_PARAM_BEACON_GEN_MODE,
  3245. /** Beacon generation mode . 0: staggered 1: bursted */
  3246. WMI_PDEV_PARAM_BEACON_TX_MODE,
  3247. /** Resource manager off chan mode .
  3248. * 0: turn off off chan mode. 1: turn on offchan mode
  3249. */
  3250. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
  3251. /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
  3252. WMI_PDEV_PARAM_PROTECTION_MODE,
  3253. /** Dynamic bandwidth 0: disable 1: enable */
  3254. WMI_PDEV_PARAM_DYNAMIC_BW,
  3255. /** Non aggregrate/ 11g sw retry threshold.0-disable */
  3256. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
  3257. /** aggregrate sw retry threshold. 0-disable*/
  3258. WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
  3259. /** Station kickout threshold (non of consecutive failures).0-disable */
  3260. WMI_PDEV_PARAM_STA_KICKOUT_TH,
  3261. /** Aggerate size scaling configuration per AC */
  3262. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
  3263. /** LTR enable */
  3264. WMI_PDEV_PARAM_LTR_ENABLE,
  3265. /** LTR latency for BE, in us */
  3266. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
  3267. /** LTR latency for BK, in us */
  3268. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
  3269. /** LTR latency for VI, in us */
  3270. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
  3271. /** LTR latency for VO, in us */
  3272. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
  3273. /** LTR AC latency timeout, in ms */
  3274. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
  3275. /** LTR platform latency override, in us */
  3276. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
  3277. /** LTR-M override, in us */
  3278. WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
  3279. /** Tx activity timeout for LTR, in us */
  3280. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
  3281. /** L1SS state machine enable */
  3282. WMI_PDEV_PARAM_L1SS_ENABLE,
  3283. /** Deep sleep state machine enable */
  3284. WMI_PDEV_PARAM_DSLEEP_ENABLE,
  3285. /** RX buffering flush enable */
  3286. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
  3287. /** RX buffering matermark */
  3288. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
  3289. /** RX buffering timeout enable */
  3290. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
  3291. /** RX buffering timeout value */
  3292. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
  3293. /** pdev level stats update period in ms */
  3294. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
  3295. /** vdev level stats update period in ms */
  3296. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
  3297. /** peer level stats update period in ms */
  3298. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
  3299. /** beacon filter status update period */
  3300. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
  3301. /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  3302. WMI_PDEV_PARAM_PMF_QOS,
  3303. /** Access category on which ARP frames are sent */
  3304. WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
  3305. /** DCS configuration */
  3306. WMI_PDEV_PARAM_DCS,
  3307. /** Enable/Disable ANI on target */
  3308. WMI_PDEV_PARAM_ANI_ENABLE,
  3309. /** configure the ANI polling period */
  3310. WMI_PDEV_PARAM_ANI_POLL_PERIOD,
  3311. /** configure the ANI listening period */
  3312. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
  3313. /** configure OFDM immunity level */
  3314. WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
  3315. /** configure CCK immunity level */
  3316. WMI_PDEV_PARAM_ANI_CCK_LEVEL,
  3317. /** Enable/Disable CDD for 1x1 STAs in rate control module */
  3318. WMI_PDEV_PARAM_DYNTXCHAIN,
  3319. /** Enable/Disable proxy STA */
  3320. WMI_PDEV_PARAM_PROXY_STA,
  3321. /** Enable/Disable low power state when all VDEVs are inactive/idle. */
  3322. WMI_PDEV_PARAM_IDLE_PS_CONFIG,
  3323. /** Enable/Disable power gating sleep */
  3324. WMI_PDEV_PARAM_POWER_GATING_SLEEP,
  3325. /** Enable/Disable Rfkill */
  3326. WMI_PDEV_PARAM_RFKILL_ENABLE,
  3327. /** Set Bursting DUR */
  3328. WMI_PDEV_PARAM_BURST_DUR,
  3329. /** Set Bursting ENABLE */
  3330. WMI_PDEV_PARAM_BURST_ENABLE,
  3331. /** HW rfkill config */
  3332. WMI_PDEV_PARAM_HW_RFKILL_CONFIG,
  3333. /** Enable radio low power features */
  3334. WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE,
  3335. /** L1SS entry and residency time track */
  3336. WMI_PDEV_PARAM_L1SS_TRACK,
  3337. /** set hyst at runtime, requirement from SS */
  3338. WMI_PDEV_PARAM_HYST_EN,
  3339. /** Enable/ Disable POWER COLLAPSE */
  3340. WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE,
  3341. /** configure LED system state */
  3342. WMI_PDEV_PARAM_LED_SYS_STATE,
  3343. /** Enable/Disable LED */
  3344. WMI_PDEV_PARAM_LED_ENABLE,
  3345. /** set DIRECT AUDIO time latency */
  3346. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */
  3347. /** set DIRECT AUDIO Feature ENABLE */
  3348. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */
  3349. /** pdev level whal mib stats update enable */
  3350. WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE,
  3351. /** ht/vht info based on vdev */
  3352. WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,
  3353. /** Set CTS channel BW for dynamic BW adjustment feature */
  3354. WMI_PDEV_PARAM_CTS_CBW,
  3355. /** Set GPIO pin info used by WNTS */
  3356. WMI_PDEV_PARAM_WNTS_CONFIG,
  3357. /** Enable/Disable hardware adaptive early rx feature */
  3358. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,
  3359. /** The minimum early rx duration, to ensure early rx duration is non-zero */
  3360. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,
  3361. /** Increasing/decreasing step used by hardware */
  3362. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,
  3363. /** The fixed early rx duration when adaptive early rx is disabled */
  3364. WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,
  3365. /** Enable/Disable bmiss based adaptive beacon timeout feature */
  3366. WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,
  3367. /*
  3368. * The minimum beacon timeout duration, to ensure beacon timeout
  3369. * duration is non-zero
  3370. */
  3371. WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,
  3372. /** Increasing/decreasing step used by hardware */
  3373. WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,
  3374. /*
  3375. * The fixed beacon timeout duration when bmiss based adaptive beacon
  3376. * timeout is disabled
  3377. */
  3378. WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,
  3379. /*
  3380. * Enable/Disable Congestion Estimator based adaptive beacon
  3381. * timeout feature */
  3382. WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,
  3383. /*
  3384. * combo value of ce_id, ce_threshold, ce_time, refer
  3385. * to WMI_CE_BTO_CE_ID_MASK
  3386. */
  3387. WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,
  3388. /** 2G TX chain mask */
  3389. WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,
  3390. /** 2G RX chain mask */
  3391. WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,
  3392. /** 5G TX chain mask */
  3393. WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,
  3394. /** 5G RX chain mask */
  3395. WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,
  3396. /* Set tx chain mask for CCK rates */
  3397. WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK,
  3398. /* Set tx chain mask for 1SS stream */
  3399. WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS,
  3400. /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected*/
  3401. WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG,
  3402. /* TX power backoff in dB: tx power -= param value
  3403. * Host passes values(DB) to Halphy, Halphy reduces the power table by
  3404. * the values. Safety check will happen in Halphy
  3405. */
  3406. WMI_PDEV_PARAM_TXPOWER_DECR_DB,
  3407. /** enable and disable aggregate burst along with duration */
  3408. WMI_PDEV_PARAM_AGGR_BURST,
  3409. /** Set the global RX decap mode */
  3410. WMI_PDEV_PARAM_RX_DECAP_MODE,
  3411. /** Enable/Disable Fast channel reset */
  3412. WMI_PDEV_PARAM_FAST_CHANNEL_RESET,
  3413. /** Default antenna for Smart antenna */
  3414. WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
  3415. /** Set the user-specified antenna gain */
  3416. WMI_PDEV_PARAM_ANTENNA_GAIN,
  3417. /** Set the user-specified RX filter */
  3418. WMI_PDEV_PARAM_RX_FILTER,
  3419. /*
  3420. * configure the user-specified MCAST tid for managed mcast feature
  3421. * 0-15 is the valid range. 0xff will clear the tid setting
  3422. */
  3423. WMI_PDEV_SET_MCAST_TO_UCAST_TID,
  3424. /** Enable/Disable Proxy sta mode */
  3425. WMI_PDEV_PARAM_PROXY_STA_MODE,
  3426. /*
  3427. * configure the mcast2ucast mode for the pdev->peer_mcast.
  3428. * See WMI_PEER_MCAST2UCAST_MODE for possible values
  3429. */
  3430. WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE,
  3431. /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
  3432. WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
  3433. /** Remove the Mcast buffers added by host */
  3434. WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
  3435. /** En/disable station power save state indication */
  3436. WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE,
  3437. /** Access category on which ARP frames are sent */
  3438. WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,
  3439. /** allow or disallow interbss frame forwarding */
  3440. WMI_PDEV_PARAM_BLOCK_INTERBSS,
  3441. /** Enable/Disable reset */
  3442. WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID,
  3443. /** Enable/Disable/Set MSDU_TTL in milliseconds. */
  3444. WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID,
  3445. /** Set global PPDU duration limit (usec). */
  3446. WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID,
  3447. /** set txbf sounding period of vap in milliseconds */
  3448. WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,
  3449. /** Set promiscuous mode */
  3450. WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
  3451. /** Set burst mode */
  3452. WMI_PDEV_PARAM_SET_BURST_MODE_CMDID,
  3453. /** enable enhanced stats */
  3454. WMI_PDEV_PARAM_EN_STATS,
  3455. /** Set mu-grouping policy */
  3456. WMI_PDEV_PARAM_MU_GROUP_POLICY,
  3457. /** Channel Hopping Enable */
  3458. WMI_PDEV_PARAM_NOISE_DETECTION,
  3459. /** Set Channel Hopping NF threshold in dBm */
  3460. WMI_PDEV_PARAM_NOISE_THRESHOLD,
  3461. /** Set PAPRD policy */
  3462. WMI_PDEV_PARAM_DPD_ENABLE,
  3463. /** Enable/disable mcast/bcast echo, used by ProxySTA */
  3464. WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO,
  3465. /** ATF enable/disable strict schedule */
  3466. WMI_PDEV_PARAM_ATF_STRICT_SCH,
  3467. /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
  3468. WMI_PDEV_PARAM_ATF_SCHED_DURATION,
  3469. /** Default antenna polarization */
  3470. WMI_PDEV_PARAM_ANT_PLZN,
  3471. /** Set mgmt retry limit */
  3472. WMI_PDEV_PARAM_MGMT_RETRY_LIMIT,
  3473. /** Set CCA sensitivity level in dBm */
  3474. WMI_PDEV_PARAM_SENSITIVITY_LEVEL,
  3475. /** Set 2G positive and negative Tx power in 0.5dBm units */
  3476. WMI_PDEV_PARAM_SIGNED_TXPOWER_2G,
  3477. /** Set 5G positive and negative Tx power in 0.5dBm units */
  3478. WMI_PDEV_PARAM_SIGNED_TXPOWER_5G,
  3479. /** Enable/disble AMSDU for tids */
  3480. WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU,
  3481. /** Enable/disable AMPDU for tids */
  3482. WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU,
  3483. /** Set CCA threshold in dBm */
  3484. WMI_PDEV_PARAM_CCA_THRESHOLD,
  3485. /** RTS Fixed rate setting */
  3486. WMI_PDEV_PARAM_RTS_FIXED_RATE,
  3487. /** Pdev reset */
  3488. WMI_PDEV_PARAM_PDEV_RESET,
  3489. /** wapi mbssid offset **/
  3490. WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET,
  3491. /** ARP DEBUG source address*/
  3492. WMI_PDEV_PARAM_ARP_DBG_SRCADDR,
  3493. /** ARP DEBUG destination address*/
  3494. WMI_PDEV_PARAM_ARP_DBG_DSTADDR,
  3495. /** ATF enable/disable obss noise scheduling */
  3496. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH,
  3497. /** ATF obss noise scaling factor */
  3498. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,
  3499. /**
  3500. * TX power reduction scaling exponent - final tx power is the
  3501. * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
  3502. * 2^(scale exponent). For example:
  3503. * If this scale exponent is 0, the power is unchanged (divided by 2^0)
  3504. * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
  3505. * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
  3506. * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
  3507. */
  3508. WMI_PDEV_PARAM_CUST_TXPOWER_SCALE,
  3509. /** ATF enabe/disabe dynamically */
  3510. WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE,
  3511. /** Set tx retry limit for control frames. 0 = disable, 31 = max */
  3512. WMI_PDEV_PARAM_CTRL_RETRY_LIMIT,
  3513. /** Set propagation delay for 2G / 5G band.
  3514. * The propagation delay is fundamentally a per-peer property, but
  3515. * the target may not support per-peer settings for ack timeouts.
  3516. * This pdev parameter allows the MAC-level ack timeout to be set to
  3517. * a value suitable for the worst-case propagation delay of any peer
  3518. * within that pdev.
  3519. * Units are microseconds.
  3520. */
  3521. WMI_PDEV_PARAM_PROPAGATION_DELAY,
  3522. /**
  3523. * Host can enable/disable ANT DIV feature
  3524. * if it's been enabled in BDF
  3525. */
  3526. WMI_PDEV_PARAM_ENA_ANT_DIV,
  3527. /** Host can force one chain to select a specific ANT */
  3528. WMI_PDEV_PARAM_FORCE_CHAIN_ANT,
  3529. /**
  3530. * Start a cycle ANT self test periodically.
  3531. * In the test, the FW would select each ANT pair
  3532. * one by one, the cycle time could be configured
  3533. * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
  3534. */
  3535. WMI_PDEV_PARAM_ANT_DIV_SELFTEST,
  3536. /**
  3537. * Configure the cycle time of ANT self test,
  3538. * the unit is micro second. Per the timer
  3539. * limitation, too small value could be not so
  3540. * accurate.
  3541. */
  3542. WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL,
  3543. /**
  3544. * wlan stats observation period, the unit is millisecond.
  3545. * The value of 0 is used to turn off periodic stats report.
  3546. */
  3547. WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD,
  3548. /**
  3549. * Set tx_ppdu_delay[] bin size to specify how many
  3550. * milliseconds each bin of the wmi_tx_stats.tx_ppdu_delay[]
  3551. * histogram represents.
  3552. */
  3553. WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS,
  3554. /** set wmi_tx_stats.tx_ppdu_delay[] array length */
  3555. WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN,
  3556. /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
  3557. WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN,
  3558. /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
  3559. WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN,
  3560. /** Set TX delay value in TX sch module, unit is microseconds */
  3561. WMI_PDEV_PARAM_TX_SCH_DELAY,
  3562. /** Set RTS enable for SIFS bursting */
  3563. WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING,
  3564. /** Set Maximum number of MPDUs in an AMPDU*/
  3565. WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU,
  3566. } WMI_PDEV_PARAM;
  3567. typedef enum {
  3568. /** Set the loglevel */
  3569. WMI_DBGLOG_LOG_LEVEL = 0x1,
  3570. /** Enable VAP level debug */
  3571. WMI_DBGLOG_VAP_ENABLE,
  3572. /** Disable VAP level debug */
  3573. WMI_DBGLOG_VAP_DISABLE,
  3574. /** Enable MODULE level debug */
  3575. WMI_DBGLOG_MODULE_ENABLE,
  3576. /** Disable MODULE level debug */
  3577. WMI_DBGLOG_MODULE_DISABLE,
  3578. /** Enable MODULE level debug */
  3579. WMI_DBGLOG_MOD_LOG_LEVEL,
  3580. /** set type of the debug output */
  3581. WMI_DBGLOG_TYPE,
  3582. /** Enable Disable debug */
  3583. WMI_DBGLOG_REPORT_ENABLE
  3584. } WMI_DBG_PARAM;
  3585. /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
  3586. typedef enum {
  3587. WMI_CTS_CBW_INVALID = 0,
  3588. WMI_CTS_CBW_20,
  3589. WMI_CTS_CBW_40,
  3590. WMI_CTS_CBW_80,
  3591. WMI_CTS_CBW_80_80,
  3592. WMI_CTS_CBW_160,
  3593. } WMI_CTS_CBW;
  3594. typedef struct {
  3595. /** TLV tag and len; tag equals
  3596. * WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param
  3597. */
  3598. A_UINT32 tlv_header;
  3599. /** pdev_id for identifying the MAC
  3600. * See macros starting with WMI_PDEV_ID_ for values.
  3601. */
  3602. A_UINT32 pdev_id;
  3603. /** parameter id */
  3604. A_UINT32 param_id;
  3605. /** parametr value */
  3606. A_UINT32 param_value;
  3607. } wmi_pdev_set_param_cmd_fixed_param;
  3608. typedef struct {
  3609. /** TLV tag and len; tag equals
  3610. * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param
  3611. */
  3612. A_UINT32 tlv_header;
  3613. /** pdev_id for identifying the MAC
  3614. * See macros starting with WMI_PDEV_ID_ for values.
  3615. */
  3616. A_UINT32 pdev_id;
  3617. /** parameter */
  3618. A_UINT32 param;
  3619. } wmi_pdev_get_tpc_config_cmd_fixed_param;
  3620. #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
  3621. #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
  3622. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
  3623. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK \
  3624. (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  3625. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
  3626. (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> \
  3627. WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  3628. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
  3629. do { \
  3630. (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  3631. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
  3632. WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  3633. } while (0)
  3634. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
  3635. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK \
  3636. (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  3637. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
  3638. (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> \
  3639. WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  3640. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
  3641. do { \
  3642. (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  3643. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
  3644. WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  3645. } while (0)
  3646. typedef struct {
  3647. /** TLV tag and len; tag equals
  3648. * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param
  3649. */
  3650. A_UINT32 tlv_header;
  3651. union {
  3652. /* OBSOLETE - will be removed once all refs are gone */
  3653. A_UINT32 mac_id;
  3654. /** pdev_id for identifying the MAC
  3655. * See macros starting with WMI_PDEV_ID_ for values.
  3656. */
  3657. A_UINT32 pdev_id;
  3658. };
  3659. /*
  3660. * The following "value" field is divided into bit fields as follows:
  3661. * bits | purpose
  3662. * -----+---------------------------------------
  3663. * 0 | enable/disable FAST diversity
  3664. * 1 | enable/disable SLOW diversity
  3665. * 5:2 | chain0 slow-diversity weighting factor
  3666. * 9:6 | chain1 slow-diversity weighting factor
  3667. * 31:10| currenty unused (set to 0x0)
  3668. * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
  3669. */
  3670. A_UINT32 value;
  3671. } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
  3672. #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
  3673. typedef struct {
  3674. /*
  3675. * TLV tag and len; tag equals
  3676. * WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param
  3677. */
  3678. A_UINT32 tlv_header;
  3679. /* vdev_id, where RSSI monitoring will take place */
  3680. A_UINT32 vdev_id;
  3681. /*
  3682. * host will configure request_id and firmware echo
  3683. * this id in RSSI_BREACH_EVENT
  3684. */
  3685. A_UINT32 request_id;
  3686. /*
  3687. * bit [0-2] = low_rssi_breach_enabled[0-2]
  3688. * enabled, bit [3-5] = hi_rssi_breach_enabled[0-2]
  3689. */
  3690. A_UINT32 enabled_bitmap;
  3691. /* unit dBm. host driver to make sure [0] > [1] > [2] */
  3692. A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
  3693. /* unit dBm. host driver to make sure [0] < [1] < [2] */
  3694. A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
  3695. /*
  3696. * unit dBm. once low rssi[] breached, same event
  3697. * bitmap will be generated only after signal gets better
  3698. * than this level. This value is adopted for all low_rssi_breach_threshold[3]
  3699. */
  3700. A_UINT32 lo_rssi_reenable_hysteresis;
  3701. /*
  3702. * unit dBm. once hi rssi[] breached, same event bitmap
  3703. * will be generated only after signal gets worse than this
  3704. * level. This value is adopted for all hi_rssi_breach_threshold[3]
  3705. */
  3706. A_UINT32 hi_rssi_reenable_histeresis;
  3707. /*
  3708. * After last event is generated, we wait
  3709. * until this interval to generate next event
  3710. */
  3711. A_UINT32 min_report_interval;
  3712. /* this is to suppress number of event to be generated */
  3713. A_UINT32 max_num_report;
  3714. } wmi_rssi_breach_monitor_config_fixed_param;
  3715. typedef struct {
  3716. /** parameter */
  3717. A_UINT32 param;
  3718. } wmi_pdev_dump_cmd;
  3719. typedef enum {
  3720. PAUSE_TYPE_CHOP = 0x1,
  3721. /** for MCC (switch channel), only vdev_map is valid */
  3722. PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
  3723. PAUSE_TYPE_UAPSD = 0x3,
  3724. /** for uapsd, only peer_id and tid_map are valid. */
  3725. PAUSE_TYPE_P2P_CLIENT_NOA = 0x4,
  3726. /** only vdev_map is valid, actually only one vdev id is set at one time */
  3727. PAUSE_TYPE_P2P_GO_PS = 0x5,
  3728. /** only vdev_map is valid, actually only one vdev id is set at one time */
  3729. PAUSE_TYPE_STA_ADD_BA = 0x6,
  3730. /** only peer_id and tid_map are valid, actually only one tid is set at one time */
  3731. PAUSE_TYPE_AP_PS = 0x7,
  3732. /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
  3733. PAUSE_TYPE_IBSS_PS = 0x8,
  3734. /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
  3735. PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9,
  3736. /*
  3737. * for TDLS offchannel MCC (switch channel), only vdev_map is valid,
  3738. * TDLS connection tracker needs to be notified
  3739. */
  3740. PAUSE_TYPE_HOST = 0x15,
  3741. /** host is requesting vdev pause */
  3742. } wmi_tx_pause_type;
  3743. typedef enum {
  3744. ACTION_PAUSE = 0x0,
  3745. ACTION_UNPAUSE = 0x1,
  3746. } wmi_tx_pause_action;
  3747. typedef struct {
  3748. A_UINT32 tlv_header;
  3749. A_UINT32 pause_type;
  3750. A_UINT32 action;
  3751. A_UINT32 vdev_map;
  3752. A_UINT32 peer_id;
  3753. A_UINT32 tid_map;
  3754. } wmi_tx_pause_event_fixed_param;
  3755. typedef enum {
  3756. WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
  3757. WMI_MGMT_TX_COMP_TYPE_DISCARD,
  3758. WMI_MGMT_TX_COMP_TYPE_INSPECT,
  3759. WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
  3760. WMI_MGMT_TX_COMP_TYPE_MAX,
  3761. } WMI_MGMT_TX_COMP_STATUS_TYPE;
  3762. typedef struct {
  3763. A_UINT32 tlv_header;
  3764. A_UINT32 desc_id; /* from tx_send_cmd */
  3765. A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
  3766. } wmi_mgmt_tx_compl_event_fixed_param;
  3767. typedef struct {
  3768. A_UINT32 tlv_header;
  3769. A_UINT32 num_reports;
  3770. /* tlv for completion
  3771. * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
  3772. * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
  3773. */
  3774. } wmi_mgmt_tx_compl_bundle_event_fixed_param;
  3775. #define WMI_TPC_RATE_MAX 160
  3776. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  3777. #define WMI_TPC_TX_NUM_CHAIN 4
  3778. typedef enum {
  3779. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  3780. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  3781. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  3782. } WMI_TPC_CONFIG_EVENT_FLAG;
  3783. typedef struct {
  3784. /* TLV tag and len; tag equals
  3785. * WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param
  3786. */
  3787. A_UINT32 tlv_header;
  3788. A_UINT32 regDomain;
  3789. A_UINT32 chanFreq;
  3790. A_UINT32 phyMode;
  3791. A_UINT32 twiceAntennaReduction;
  3792. A_UINT32 twiceMaxRDPower;
  3793. A_INT32 twiceAntennaGain;
  3794. A_UINT32 powerLimit;
  3795. A_UINT32 rateMax;
  3796. A_UINT32 numTxChain;
  3797. A_UINT32 ctl;
  3798. A_UINT32 flags;
  3799. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without
  3800. * breaking the WMI compatibility
  3801. */
  3802. A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
  3803. A_INT8
  3804. maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN]
  3805. [WMI_TPC_TX_NUM_CHAIN];
  3806. A_INT8
  3807. maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN]
  3808. [WMI_TPC_TX_NUM_CHAIN];
  3809. A_INT8
  3810. maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN]
  3811. [WMI_TPC_TX_NUM_CHAIN];
  3812. /** pdev_id for identifying the MAC
  3813. * See macros starting with WMI_PDEV_ID_ for values.
  3814. */
  3815. A_UINT32 pdev_id;
  3816. /* This TLV is followed by a byte array:
  3817. * A_UINT8 ratesArray[];
  3818. */
  3819. } wmi_pdev_tpc_config_event_fixed_param;
  3820. typedef struct {
  3821. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
  3822. A_UINT32 periodCnt;
  3823. A_UINT32 L1Cnt;
  3824. A_UINT32 L11Cnt;
  3825. A_UINT32 L12Cnt;
  3826. A_UINT32 L1Entry;
  3827. A_UINT32 L11Entry;
  3828. A_UINT32 L12Entry;
  3829. /** pdev_id for identifying the MAC
  3830. * See macros starting with WMI_PDEV_ID_ for values.
  3831. */
  3832. A_UINT32 pdev_id;
  3833. } wmi_pdev_l1ss_track_event_fixed_param;
  3834. typedef struct {
  3835. A_UINT32 len;
  3836. A_UINT32 msgref;
  3837. A_UINT32 segmentInfo;
  3838. } wmi_pdev_seg_hdr_info;
  3839. /*
  3840. * Transmit power scale factor.
  3841. *
  3842. */
  3843. typedef enum {
  3844. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  3845. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  3846. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  3847. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  3848. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  3849. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  3850. } WMI_TP_SCALE;
  3851. #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
  3852. typedef struct {
  3853. /** message buffer, NULL terminated */
  3854. char bufp[WMI_MAX_DEBUG_MESG];
  3855. } wmi_debug_mesg_event;
  3856. enum {
  3857. /** P2P device */
  3858. VDEV_SUBTYPE_P2PDEV = 0,
  3859. /** P2P client */
  3860. VDEV_SUBTYPE_P2PCLI,
  3861. /** P2P GO */
  3862. VDEV_SUBTYPE_P2PGO,
  3863. /** BT3.0 HS */
  3864. VDEV_SUBTYPE_BT,
  3865. };
  3866. typedef struct {
  3867. /** idnore power , only use flags , mode and freq */
  3868. wmi_channel chan;
  3869. } wmi_pdev_set_channel_cmd;
  3870. typedef enum {
  3871. WMI_PKTLOG_EVENT_RX = 0x1,
  3872. WMI_PKTLOG_EVENT_TX = 0x2,
  3873. WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
  3874. WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
  3875. /* 0x10 used by deprecated DBG_PRINT */
  3876. WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
  3877. WMI_PKTLOG_EVENT_SW = 0x40, /* To support SW defined events */
  3878. } WMI_PKTLOG_EVENT;
  3879. typedef enum {
  3880. /* (default) FW will decide under what conditions to enable pktlog */
  3881. WMI_PKTLOG_ENABLE_AUTO = 0,
  3882. WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
  3883. } WMI_PKTLOG_ENABLE;
  3884. typedef struct {
  3885. /** TLV tag and len; tag equals
  3886. * WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param
  3887. */
  3888. A_UINT32 tlv_header;
  3889. /** pdev_id for identifying the MAC
  3890. * See macros starting with WMI_PDEV_ID_ for values.
  3891. */
  3892. A_UINT32 pdev_id;
  3893. A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
  3894. A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
  3895. } wmi_pdev_pktlog_enable_cmd_fixed_param;
  3896. typedef struct {
  3897. /** TLV tag and len; tag equals
  3898. * WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param
  3899. */
  3900. A_UINT32 tlv_header;
  3901. /** pdev_id for identifying the MAC
  3902. * See macros starting with WMI_PDEV_ID_ for values.
  3903. */
  3904. A_UINT32 pdev_id;
  3905. } wmi_pdev_pktlog_disable_cmd_fixed_param;
  3906. typedef struct {
  3907. /*
  3908. * TLV tag and len; tag equals
  3909. * WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param
  3910. */
  3911. A_UINT32 tlv_header;
  3912. /** pdev_id for identifying the MAC
  3913. * See macros starting with WMI_PDEV_ID_ for values.
  3914. */
  3915. A_UINT32 pdev_id;
  3916. /*
  3917. * enable for mib stats collection.
  3918. * Stats are delivered to host in wmi_mib_stats structure.
  3919. * If enable_Mib=1, stats collection is enabled.
  3920. * If enable_Mib=0, stats collection does not happen
  3921. */
  3922. A_UINT32 enable_Mib;
  3923. } wmi_mib_stats_enable_cmd_fixed_param;
  3924. /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
  3925. * NOTE: This constant cannot be changed without breaking
  3926. * WMI Compatibility. */
  3927. #define WMI_DSCP_MAP_MAX (64)
  3928. /*
  3929. * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
  3930. * @details
  3931. * Create an API for sending the custom DSCP-to-TID map to the target
  3932. * If this is a request from the user space or from above the UMAC
  3933. * then the best place to implement this is in the umac_if_offload of the OL path.
  3934. * Provide a place holder for this API in the ieee80211com (ic).
  3935. *
  3936. * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
  3937. * in the target should be directed to the function pointer in the ic.
  3938. *
  3939. * Implementation details of the API to send the map to the target are as described-
  3940. *
  3941. * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
  3942. * DSCP-to-TID map is a one dimensional uint32_t array of length 64 to accomodate
  3943. * 64 TID values for 2^6 (64) DSCP ids.
  3944. * Example:
  3945. * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
  3946. * 0, 0, 0, 0, 0, 0, 0, 0,
  3947. * 1, 1, 1, 1, 1, 1, 1, 1,
  3948. * 2, 2, 2, 2, 2, 2, 2, 2,
  3949. * 3, 3, 3, 3, 3, 3, 3, 3,
  3950. * 4, 4, 4, 4, 4, 4, 4, 4,
  3951. * 5, 5, 5, 5, 5, 5, 5, 5,
  3952. * 6, 6, 6, 6, 6, 6, 6, 6,
  3953. * 7, 7, 7, 7, 7, 7, 7, 7,
  3954. * };
  3955. *
  3956. * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
  3957. *
  3958. * 3. Copy the DSCP-to-TID map into the WMI buffer.
  3959. *
  3960. * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
  3961. * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
  3962. * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
  3963. * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
  3964. *
  3965. */
  3966. /* DEPRECATED - use VDEV level command instead
  3967. * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
  3968. */
  3969. typedef struct {
  3970. A_UINT32 tlv_header;
  3971. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
  3972. A_UINT32 reserved0;
  3973. /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  3974. /* map indicating DSCP to TID conversion */
  3975. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  3976. } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
  3977. typedef struct {
  3978. A_UINT32 tlv_header;
  3979. /*
  3980. * TLV tag and len; tag equals
  3981. * WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param
  3982. */
  3983. A_UINT32 vdev_id;
  3984. /** map indicating DSCP to TID conversion */
  3985. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  3986. A_UINT32 enable_override;
  3987. } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
  3988. enum WMI_WAKE_GPIO_TYPE {
  3989. WMI_WAKE_GPIO_LOW = 1,
  3990. WMI_WAKE_GPIO_HIGH = 2,
  3991. WMI_WAKE_GPIO_RISING_EDGE = 3,
  3992. WMI_WAKE_GPIO_FALLING_EDGE = 4,
  3993. };
  3994. /**
  3995. * Set GPIO numbers used to wakeup host and wakeup target.
  3996. */
  3997. typedef struct {
  3998. /**
  3999. * TLV tag and len; tag equals
  4000. * WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param
  4001. */
  4002. A_UINT32 tlv_header;
  4003. /* gpio num used to wakeup host, 0xff disable wakeup gpio */
  4004. A_UINT32 host_wakeup_gpio;
  4005. /* refer to WMI_WAKE_GPIO_TYPE */
  4006. A_UINT32 host_wakeup_type;
  4007. /* gpio num used to wakeup target, 0xff disable wakeup gpio */
  4008. A_UINT32 target_wakeup_gpio;
  4009. /* refer to WMI_WAKE_GPIO_TYPE */
  4010. A_UINT32 target_wakeup_type;
  4011. } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
  4012. /** Fixed rate (rate-code) for broadcast/ multicast data frames */
  4013. /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
  4014. * @details
  4015. * Create an API for setting the custom rate for the MCAST and BCAST frames
  4016. * in the target. If this is a request from the user space or from above the UMAC
  4017. * then the best place to implement this is in the umac_if_offload of the OL path.
  4018. * Provide a place holder for this API in the ieee80211com (ic).
  4019. *
  4020. * Implementation details of the API to set custom rates for MCAST and BCAST in
  4021. * the target are as described-
  4022. *
  4023. * 1. The function will have 3 arguments-
  4024. * vap structure,
  4025. * MCAST/ BCAST identifier code,
  4026. * 8 bit rate code
  4027. *
  4028. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  4029. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  4030. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  4031. * b'3-b'0 indicate the rate, which is indicated as follows:
  4032. * OFDM : 0: OFDM 48 Mbps
  4033. * 1: OFDM 24 Mbps
  4034. * 2: OFDM 12 Mbps
  4035. * 3: OFDM 6 Mbps
  4036. * 4: OFDM 54 Mbps
  4037. * 5: OFDM 36 Mbps
  4038. * 6: OFDM 18 Mbps
  4039. * 7: OFDM 9 Mbps
  4040. * CCK (pream == 1)
  4041. * 0: CCK 11 Mbps Long
  4042. * 1: CCK 5.5 Mbps Long
  4043. * 2: CCK 2 Mbps Long
  4044. * 3: CCK 1 Mbps Long
  4045. * 4: CCK 11 Mbps Short
  4046. * 5: CCK 5.5 Mbps Short
  4047. * 6: CCK 2 Mbps Short
  4048. * HT/VHT (pream == 2/3)
  4049. * 0..7: MCS0..MCS7 (HT)
  4050. * 0..9: MCS0..MCS9 (VHT)
  4051. *
  4052. * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
  4053. * to the target.
  4054. * Arguments to the API are-
  4055. * wmi handle,
  4056. * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
  4057. * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
  4058. * rate value.
  4059. */
  4060. typedef enum {
  4061. WMI_SET_MCAST_RATE,
  4062. WMI_SET_BCAST_RATE
  4063. } MCAST_BCAST_RATE_ID;
  4064. typedef struct {
  4065. MCAST_BCAST_RATE_ID rate_id;
  4066. A_UINT32 rate;
  4067. } mcast_bcast_rate;
  4068. typedef struct {
  4069. A_UINT32 tlv_header;
  4070. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
  4071. A_UINT32 cwmin;
  4072. A_UINT32 cwmax;
  4073. A_UINT32 aifs;
  4074. A_UINT32 txoplimit;
  4075. A_UINT32 acm;
  4076. A_UINT32 no_ack;
  4077. } wmi_wmm_params;
  4078. /* DEPRECATED - use VDEV level command instead
  4079. * (wmi_vdev_set_wmm_params_cmd_fixed_param)
  4080. */
  4081. typedef struct {
  4082. A_UINT32 tlv_header;
  4083. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
  4084. A_UINT32 reserved0;
  4085. /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  4086. A_UINT32 dg_type;
  4087. /* The TLVs for the 4 AC follows:
  4088. * wmi_wmm_params wmm_params_ac_be;
  4089. * wmi_wmm_params wmm_params_ac_bk;
  4090. * wmi_wmm_params wmm_params_ac_vi;
  4091. * wmi_wmm_params wmm_params_ac_vo;
  4092. */
  4093. } wmi_pdev_set_wmm_params_cmd_fixed_param;
  4094. typedef enum {
  4095. WMI_REQUEST_PEER_STAT = 0x01,
  4096. WMI_REQUEST_AP_STAT = 0x02,
  4097. WMI_REQUEST_PDEV_STAT = 0x04,
  4098. WMI_REQUEST_VDEV_STAT = 0x08,
  4099. WMI_REQUEST_BCNFLT_STAT = 0x10,
  4100. WMI_REQUEST_VDEV_RATE_STAT = 0x20,
  4101. WMI_REQUEST_INST_STAT = 0x40,
  4102. WMI_REQUEST_MIB_STAT = 0x80,
  4103. WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x100,
  4104. } wmi_stats_id;
  4105. typedef struct {
  4106. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
  4107. wmi_stats_id stats_id;
  4108. /** unique id identifying the VDEV, generated by the caller */
  4109. A_UINT32 vdev_id;
  4110. /** peer MAC address */
  4111. wmi_mac_addr peer_macaddr;
  4112. } wmi_request_stats_cmd_fixed_param;
  4113. /* stats type bitmap */
  4114. #define WMI_LINK_STATS_RADIO 0x00000001
  4115. #define WMI_LINK_STATS_IFACE 0x00000002
  4116. #define WMI_LINK_STATS_ALL_PEER 0x00000004
  4117. #define WMI_LINK_STATS_PER_PEER 0x00000008
  4118. /* wifi clear statistics bitmap */
  4119. #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
  4120. #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
  4121. #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
  4122. #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
  4123. #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
  4124. #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
  4125. #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
  4126. #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
  4127. #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
  4128. #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
  4129. /** Default value for stats if the stats collection has not started */
  4130. #define WMI_STATS_VALUE_INVALID 0xffffffff
  4131. #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
  4132. #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
  4133. #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
  4134. #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
  4135. #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  4136. #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  4137. typedef struct {
  4138. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
  4139. A_UINT32 num_of_diag_events_logs;
  4140. /* The TLVs will follow.
  4141. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  4142. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  4143. * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
  4144. */
  4145. } wmi_diag_event_log_config_fixed_param;
  4146. #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  4147. #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  4148. #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
  4149. #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
  4150. typedef struct {
  4151. A_UINT32 tlv_header;
  4152. A_UINT32 num_of_diag_events_logs;
  4153. /* The TLVs will follow.
  4154. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  4155. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  4156. * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
  4157. * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
  4158. */
  4159. } wmi_diag_event_log_supported_event_fixed_params;
  4160. typedef struct {
  4161. /**
  4162. * TLV tag and len; tag equals
  4163. * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param
  4164. */
  4165. A_UINT32 tlv_header;
  4166. /** placeholder for future */
  4167. A_UINT32 reserved0;
  4168. } wmi_debug_mesg_flush_fixed_param;
  4169. typedef struct {
  4170. /**
  4171. * TLV tag and len; tag equals
  4172. * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param
  4173. */
  4174. A_UINT32 tlv_header;
  4175. /** placeholder for future */
  4176. A_UINT32 reserved0;
  4177. } wmi_debug_mesg_flush_complete_fixed_param;
  4178. typedef struct {
  4179. /*
  4180. * TLV tag and len; tag equals
  4181. * WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param
  4182. * vdev_id, where RSSI breach event occurred
  4183. */
  4184. A_UINT32 tlv_header;
  4185. A_UINT32 vdev_id;
  4186. /* request id */
  4187. A_UINT32 request_id;
  4188. /*
  4189. * bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is
  4190. * corresponding to hi_rssi[0-2]
  4191. */
  4192. A_UINT32 event_bitmap;
  4193. /* rssi at the time of RSSI breach. Unit dBm */
  4194. A_UINT32 rssi;
  4195. /* bssid of the monitored AP's */
  4196. wmi_mac_addr bssid;
  4197. } wmi_rssi_breach_event_fixed_param;
  4198. typedef struct {
  4199. /** TLV tag and len; tag equals
  4200. * WMITLV_TAG_STRUC_wmi_fw_mem_dump */
  4201. A_UINT32 tlv_header;
  4202. /** unique id identifying the segment */
  4203. A_UINT32 seg_id;
  4204. /** Start address of the segment to be read */
  4205. A_UINT32 seg_start_addr_lo;
  4206. A_UINT32 seg_start_addr_hi;
  4207. /** Length of the segment to be read */
  4208. A_UINT32 seg_length;
  4209. /** Host bufeer address to which the segment will be read and dumped */
  4210. A_UINT32 dest_addr_lo;
  4211. A_UINT32 dest_addr_hi;
  4212. } wmi_fw_mem_dump;
  4213. /* Command to get firmware memory dump*/
  4214. typedef struct {
  4215. /** TLV tag and len; tag equals
  4216. * WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
  4217. A_UINT32 tlv_header;
  4218. /** unique id identifying the request */
  4219. A_UINT32 request_id;
  4220. /** number of memory dump segments */
  4221. A_UINT32 num_fw_mem_dump_segs;
  4222. /**
  4223. * This TLV is followed by another TLV
  4224. * wmi_fw_mem_dump fw_mem_dump[];
  4225. */
  4226. } wmi_get_fw_mem_dump_fixed_param;
  4227. /** Event to indicate the completion of fw mem dump */
  4228. typedef struct {
  4229. /* TLV tag and len; tag equals
  4230. * WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
  4231. A_UINT32 tlv_header;
  4232. /** unique id identifying the request, given
  4233. * in the request stats command */
  4234. A_UINT32 request_id;
  4235. /*In case of Firmware memory dump */
  4236. A_UINT32 fw_mem_dump_complete;
  4237. } wmi_update_fw_mem_dump_fixed_param;
  4238. typedef enum {
  4239. WMI_ROAMING_IDLE = 0,
  4240. WMI_ROAMING_ACTIVE = 1,
  4241. } wmi_roam_state;
  4242. /* access categories */
  4243. typedef enum {
  4244. WMI_AC_VO = 0,
  4245. WMI_AC_VI = 1,
  4246. WMI_AC_BE = 2,
  4247. WMI_AC_BK = 3,
  4248. WMI_AC_MAX = 4,
  4249. } wmi_traffic_ac;
  4250. typedef enum {
  4251. WMI_STA_STATS = 0,
  4252. WMI_SOFTAP_STATS = 1,
  4253. WMI_IBSS_STATS = 2,
  4254. WMI_P2P_CLIENT_STATS = 3,
  4255. WMI_P2P_GO_STATS = 4,
  4256. WMI_NAN_STATS = 5,
  4257. WMI_MESH_STATS = 6,
  4258. } wmi_link_iface_type;
  4259. /* channel operating width */
  4260. typedef enum {
  4261. WMI_CHAN_WIDTH_20 = 0,
  4262. WMI_CHAN_WIDTH_40 = 1,
  4263. WMI_CHAN_WIDTH_80 = 2,
  4264. WMI_CHAN_WIDTH_160 = 3,
  4265. WMI_CHAN_WIDTH_80P80 = 4,
  4266. WMI_CHAN_WIDTH_5 = 5,
  4267. WMI_CHAN_WIDTH_10 = 6,
  4268. } wmi_channel_width;
  4269. /*Clear stats*/
  4270. typedef struct {
  4271. A_UINT32 tlv_header;
  4272. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
  4273. /** unique id identifying the VDEV, generated by the caller */
  4274. A_UINT32 vdev_id;
  4275. /** stop_stats_collection_req = 1 will imply stop the statistics collection */
  4276. A_UINT32 stop_stats_collection_req;
  4277. /** identifies what stats to be cleared */
  4278. A_UINT32 stats_clear_req_mask;
  4279. /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
  4280. wmi_mac_addr peer_macaddr;
  4281. } wmi_clear_link_stats_cmd_fixed_param;
  4282. /* Link Stats configuration params. Trigger the link layer statistics collection*/
  4283. typedef struct {
  4284. A_UINT32 tlv_header;
  4285. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
  4286. /** threshold to classify the pkts as short or long */
  4287. A_UINT32 mpdu_size_threshold;
  4288. /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
  4289. A_UINT32 aggressive_statistics_gathering;
  4290. } wmi_start_link_stats_cmd_fixed_param;
  4291. typedef struct {
  4292. A_UINT32 tlv_header;
  4293. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
  4294. /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  4295. A_UINT32 stats_type;
  4296. /** unique id identifying the VDEV, generated by the caller */
  4297. A_UINT32 vdev_id;
  4298. /** unique id identifying the request, generated by the caller */
  4299. A_UINT32 request_id;
  4300. /** peer MAC address */
  4301. wmi_mac_addr peer_macaddr;
  4302. } wmi_request_link_stats_cmd_fixed_param;
  4303. /* channel statistics */
  4304. typedef struct {
  4305. A_UINT32 tlv_header;
  4306. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
  4307. /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
  4308. A_UINT32 channel_width;
  4309. /** Primary 20 MHz channel */
  4310. A_UINT32 center_freq;
  4311. /** center frequency (MHz) first segment */
  4312. A_UINT32 center_freq0;
  4313. /** center frequency (MHz) second segment */
  4314. A_UINT32 center_freq1;
  4315. /** msecs the radio is awake (32 bits number accruing over time) */
  4316. A_UINT32 radio_awake_time;
  4317. /** msecs the CCA register is busy (32 bits number accruing over time) */
  4318. A_UINT32 cca_busy_time;
  4319. } wmi_channel_stats;
  4320. /*
  4321. * Each step represents 0.5 dB. The starting value is 0 dBm.
  4322. * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
  4323. */
  4324. #define MAX_TPC_LEVELS 64
  4325. /* radio statistics */
  4326. typedef struct {
  4327. A_UINT32 tlv_header;
  4328. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
  4329. /** Wifi radio (if multiple radio supported) */
  4330. A_UINT32 radio_id;
  4331. /** msecs the radio is awake (32 bits number accruing over time) */
  4332. A_UINT32 on_time;
  4333. /** msecs the radio is transmitting (32 bits number accruing over time) */
  4334. A_UINT32 tx_time;
  4335. /** msecs the radio is in active receive (32 bits number accruing over time) */
  4336. A_UINT32 rx_time;
  4337. /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
  4338. A_UINT32 on_time_scan;
  4339. /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
  4340. A_UINT32 on_time_nbd;
  4341. /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
  4342. A_UINT32 on_time_gscan;
  4343. /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
  4344. A_UINT32 on_time_roam_scan;
  4345. /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
  4346. A_UINT32 on_time_pno_scan;
  4347. /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
  4348. A_UINT32 on_time_hs20;
  4349. /** number of channels */
  4350. A_UINT32 num_channels;
  4351. /*
  4352. * tx time per TPC level - DEPRECATED
  4353. * This field is deprecated.
  4354. * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
  4355. * message.
  4356. */
  4357. A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
  4358. } wmi_radio_link_stats;
  4359. /** tx time per power level statistics */
  4360. typedef struct {
  4361. /*
  4362. * TLV tag and len; tag equals
  4363. * WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param
  4364. */
  4365. A_UINT32 tlv_header;
  4366. /* total number of tx power levels */
  4367. A_UINT32 total_num_tx_power_levels;
  4368. /* number of tx power levels that are carried in this event */
  4369. A_UINT32 num_tx_power_levels;
  4370. /*
  4371. * offset of current stats
  4372. * If ((num_tx_power_levels + power_level_offset)) ==
  4373. * total_num_tx_power_levels)
  4374. * this message completes the report of tx time per power levels.
  4375. * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
  4376. * messages will be sent by the target to deliver the remainder of the
  4377. * tx time per power level stats.
  4378. */
  4379. A_UINT32 power_level_offset;
  4380. /* radio id for this tx time per power level statistics (if multiple radio supported) */
  4381. A_UINT32 radio_id;
  4382. /*
  4383. * This TLV will be followed by a TLV containing a variable-length
  4384. * array of A_UINT32 with tx time per power level data
  4385. * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
  4386. * The tx time is in units of milliseconds.
  4387. * The power levels are board-specific values; a board-specific
  4388. * translation has to be applied to determine what actual power
  4389. * corresponds to each power level.
  4390. * Just as the host has a BDF file available, the host should also have
  4391. * a data file available that provides the power level to power
  4392. * translations.
  4393. */
  4394. } wmi_tx_power_level_stats_evt_fixed_param;
  4395. /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
  4396. typedef struct {
  4397. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  4398. /** unique id identifying the request, given in the request stats command */
  4399. A_UINT32 request_id;
  4400. /** Number of radios*/
  4401. A_UINT32 num_radio;
  4402. /** more_data will be set depending on the number of radios */
  4403. A_UINT32 more_radio_events;
  4404. /*
  4405. * This TLV is followed by another TLV of array of bytes
  4406. * size of(struct wmi_radio_link_stats);
  4407. *
  4408. * This TLV is followed by another TLV of array of bytes
  4409. * num_channels * size of(struct wmi_channel_stats)
  4410. */
  4411. } wmi_radio_link_stats_event_fixed_param;
  4412. /* per rate statistics */
  4413. typedef struct {
  4414. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
  4415. /** rate information
  4416. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  4417. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  4418. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  4419. * b'3-b'0 indicate the rate, which is indicated as follows:
  4420. * OFDM : 0: OFDM 48 Mbps
  4421. * 1: OFDM 24 Mbps
  4422. * 2: OFDM 12 Mbps
  4423. * 3: OFDM 6 Mbps
  4424. * 4: OFDM 54 Mbps
  4425. * 5: OFDM 36 Mbps
  4426. * 6: OFDM 18 Mbps
  4427. * 7: OFDM 9 Mbps
  4428. * CCK (pream == 1)
  4429. * 0: CCK 11 Mbps Long
  4430. * 1: CCK 5.5 Mbps Long
  4431. * 2: CCK 2 Mbps Long
  4432. * 3: CCK 1 Mbps Long
  4433. * 4: CCK 11 Mbps Short
  4434. * 5: CCK 5.5 Mbps Short
  4435. * 6: CCK 2 Mbps Short
  4436. * HT/VHT (pream == 2/3)
  4437. * 0..7: MCS0..MCS7 (HT)
  4438. * 0..9: MCS0..MCS9 (VHT)
  4439. */
  4440. A_UINT32 rate;
  4441. /** units of 100 Kbps */
  4442. A_UINT32 bitrate;
  4443. /** number of successfully transmitted data pkts (ACK rcvd) */
  4444. A_UINT32 tx_mpdu;
  4445. /** number of received data pkts */
  4446. A_UINT32 rx_mpdu;
  4447. /** number of data packet losses (no ACK) */
  4448. A_UINT32 mpdu_lost;
  4449. /** total number of data pkt retries */
  4450. A_UINT32 retries;
  4451. /** number of short data pkt retries */
  4452. A_UINT32 retries_short;
  4453. /** number of long data pkt retries */
  4454. A_UINT32 retries_long;
  4455. } wmi_rate_stats;
  4456. typedef struct {
  4457. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
  4458. /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
  4459. A_UINT32 peer_type;
  4460. /** mac address */
  4461. wmi_mac_addr peer_mac_address;
  4462. /** peer wmi_CAPABILITY_XXX */
  4463. A_UINT32 capabilities;
  4464. /** number of rates */
  4465. A_UINT32 num_rates;
  4466. } wmi_peer_link_stats;
  4467. /** PEER statistics (once started) reset and start afresh after each connection */
  4468. typedef struct {
  4469. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
  4470. /** unique id identifying the request, given in the request stats command */
  4471. A_UINT32 request_id;
  4472. /** number of peers accomidated in this particular event */
  4473. A_UINT32 num_peers;
  4474. /** Indicates the fragment number */
  4475. A_UINT32 peer_event_number;
  4476. /** Indicates if there are more peers which will be sent as seperate peer_stats event */
  4477. A_UINT32 more_data;
  4478. /**
  4479. * This TLV is followed by another TLV
  4480. * num_peers * size of(struct wmi_peer_stats)
  4481. * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
  4482. */
  4483. } wmi_peer_stats_event_fixed_param;
  4484. /* per access category statistics */
  4485. typedef struct {
  4486. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
  4487. /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
  4488. A_UINT32 ac_type;
  4489. /** number of successfully transmitted unicast data pkts (ACK rcvd) */
  4490. A_UINT32 tx_mpdu;
  4491. /** number of received unicast mpdus */
  4492. A_UINT32 rx_mpdu;
  4493. /** number of succesfully transmitted multicast data packets */
  4494. /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
  4495. A_UINT32 tx_mcast;
  4496. /** number of received multicast data packets */
  4497. A_UINT32 rx_mcast;
  4498. /** number of received unicast a-mpdus */
  4499. A_UINT32 rx_ampdu;
  4500. /** number of transmitted unicast a-mpdus */
  4501. A_UINT32 tx_ampdu;
  4502. /** number of data pkt losses (no ACK) */
  4503. A_UINT32 mpdu_lost;
  4504. /** total number of data pkt retries */
  4505. A_UINT32 retries;
  4506. /** number of short data pkt retries */
  4507. A_UINT32 retries_short;
  4508. /** number of long data pkt retries */
  4509. A_UINT32 retries_long;
  4510. /** data pkt min contention time (usecs) */
  4511. A_UINT32 contention_time_min;
  4512. /** data pkt max contention time (usecs) */
  4513. A_UINT32 contention_time_max;
  4514. /** data pkt avg contention time (usecs) */
  4515. A_UINT32 contention_time_avg;
  4516. /** num of data pkts used for contention statistics */
  4517. A_UINT32 contention_num_samples;
  4518. } wmi_wmm_ac_stats;
  4519. /* interface statistics */
  4520. typedef struct {
  4521. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
  4522. /** access point beacon received count from connected AP */
  4523. A_UINT32 beacon_rx;
  4524. /** access point mgmt frames received count from connected AP (including Beacon) */
  4525. A_UINT32 mgmt_rx;
  4526. /** action frames received count */
  4527. A_UINT32 mgmt_action_rx;
  4528. /** action frames transmit count */
  4529. A_UINT32 mgmt_action_tx;
  4530. /** access Point Beacon and Management frames RSSI (averaged) */
  4531. A_UINT32 rssi_mgmt;
  4532. /** access Point Data Frames RSSI (averaged) from connected AP */
  4533. A_UINT32 rssi_data;
  4534. /** access Point ACK RSSI (averaged) from connected AP */
  4535. A_UINT32 rssi_ack;
  4536. /** number of peers */
  4537. A_UINT32 num_peers;
  4538. /** Indicates how many peer_stats events will be sent depending on the num_peers. */
  4539. A_UINT32 num_peer_events;
  4540. /** number of ac */
  4541. A_UINT32 num_ac;
  4542. /** Roaming Stat */
  4543. A_UINT32 roam_state;
  4544. /**
  4545. * Average Beacon spread offset is the averaged time delay between TBTT
  4546. * and beacon TSF */
  4547. /** Upper 32 bits of averaged 64 bit beacon spread offset */
  4548. A_UINT32 avg_bcn_spread_offset_high;
  4549. /** Lower 32 bits of averaged 64 bit beacon spread offset */
  4550. A_UINT32 avg_bcn_spread_offset_low;
  4551. /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
  4552. A_UINT32 is_leaky_ap;
  4553. /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
  4554. A_UINT32 avg_rx_frms_leaked;
  4555. /** Rx leak watch window currently in force to minimize data loss
  4556. * because of leaky AP. Rx leak window is the
  4557. * time driver waits before shutting down the radio or switching the
  4558. * channel and after receiving an ACK for
  4559. * a data frame with PM bit set) */
  4560. A_UINT32 rx_leak_window;
  4561. A_UINT32 tx_rts_succ_cnt;
  4562. A_UINT32 tx_rts_fail_cnt;
  4563. A_UINT32 tx_ppdu_succ_cnt;
  4564. A_UINT32 tx_ppdu_fail_cnt;
  4565. } wmi_iface_link_stats;
  4566. /** Interface statistics (once started) reset and start afresh after each connection */
  4567. typedef struct {
  4568. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
  4569. /** unique id identifying the request, given in the request stats command */
  4570. A_UINT32 request_id;
  4571. /** unique id identifying the VDEV, generated by the caller */
  4572. A_UINT32 vdev_id;
  4573. /*
  4574. * This TLV is followed by another TLV
  4575. * wmi_iface_link_stats iface_link_stats;
  4576. * num_ac * size of(struct wmi_wmm_ac_stats)
  4577. */
  4578. } wmi_iface_link_stats_event_fixed_param;
  4579. /** Suspend option */
  4580. enum {
  4581. WMI_PDEV_SUSPEND, /* suspend */
  4582. WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
  4583. };
  4584. typedef struct {
  4585. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
  4586. /* suspend option sent to target */
  4587. /*
  4588. * pdev_id for identifying the MAC, See macros
  4589. * starting with WMI_PDEV_ID_ for values.
  4590. */
  4591. A_UINT32 pdev_id;
  4592. A_UINT32 suspend_opt;
  4593. } wmi_pdev_suspend_cmd_fixed_param;
  4594. typedef struct {
  4595. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
  4596. /*
  4597. * pdev_id for identifying the MAC, See macros
  4598. * starting with WMI_PDEV_ID_ for values.
  4599. */
  4600. A_UINT32 pdev_id;
  4601. } wmi_pdev_resume_cmd_fixed_param;
  4602. typedef struct {
  4603. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
  4604. A_UINT32 num_vdev_stats; /* number of vdevs */
  4605. } wmi_vdev_rate_stats_event_fixed_param;
  4606. typedef struct {
  4607. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info */
  4608. A_UINT32 vdevid; /* Id of the wlan vdev */
  4609. A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted */
  4610. A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above */
  4611. A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
  4612. A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
  4613. } wmi_vdev_rate_ht_info;
  4614. typedef struct {
  4615. /**
  4616. * TLV tag and len, tag equals
  4617. * WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param
  4618. */
  4619. A_UINT32 tlv_header;
  4620. A_UINT32 num_failure_info; /* How many holes on rx aggregation */
  4621. } wmi_rx_aggr_failure_event_fixed_param;
  4622. typedef struct {
  4623. /**
  4624. * TLV tag and len, tag equals
  4625. * WMITLV_wmi_rx_aggr_failure_info
  4626. */
  4627. A_UINT32 tlv_header;
  4628. A_UINT32 start_seq; /* start sequence number of the hole */
  4629. A_UINT32 end_seq; /* end sequence number of the hole */
  4630. } wmi_rx_aggr_failure_info;
  4631. typedef struct {
  4632. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  4633. wmi_stats_id stats_id;
  4634. /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
  4635. A_UINT32 num_pdev_stats;
  4636. /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
  4637. A_UINT32 num_vdev_stats;
  4638. /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
  4639. A_UINT32 num_peer_stats;
  4640. A_UINT32 num_bcnflt_stats;
  4641. /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
  4642. A_UINT32 num_chan_stats;
  4643. /** number of MIB stats event structures (wmi_mib_stats) */
  4644. A_UINT32 num_mib_stats;
  4645. /* This TLV is followed by another TLV of array of bytes
  4646. * A_UINT8 data[];
  4647. * This data array contains
  4648. * num_pdev_stats * size of(struct wmi_pdev_stats)
  4649. * num_vdev_stats * size of(struct wmi_vdev_stats)
  4650. * num_peer_stats * size of(struct wmi_peer_stats)
  4651. * num_bcnflt_stats * size_of()
  4652. * num_chan_stats * size of(struct wmi_chan_stats)
  4653. * num_mib_stats * size of(struct wmi_mib_stats)
  4654. *
  4655. */
  4656. } wmi_stats_event_fixed_param;
  4657. /* WLAN channel CCA stats bitmap */
  4658. #define WLAN_STATS_IDLE_TIME_SHIFT 0
  4659. #define WLAN_STATS_IDLE_TIME_TIME 0x00000001
  4660. #define WLAN_STATS_TX_TIME_SHIFT 1
  4661. #define WLAN_STATS_TX_TIME_MASK 0x00000002
  4662. #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
  4663. #define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
  4664. #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
  4665. #define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
  4666. #define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
  4667. #define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
  4668. #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
  4669. #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
  4670. #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
  4671. #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
  4672. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
  4673. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
  4674. /* WLAN peer signal stats bitmap */
  4675. #define WLAN_STATS_PER_CHAIN_SNR_SHIFT 0
  4676. #define WLAN_STATS_PER_CHAIN_SNR_MASK 0x00000001
  4677. #define WLAN_STATS_PER_CHAIN_NF_SHIFT 1
  4678. #define WLAN_STATS_PER_CHAIN_NF_MASK 0x00000002
  4679. /* WLAN TX stats bitmap */
  4680. #define WLAN_STATS_TX_MSDU_CNT_SHIFT 0
  4681. #define WLAN_STATS_TX_MSDU_CNT_MASK 0x00000001
  4682. #define WLAN_STATS_TX_MPDU_CNT_SHIFT 1
  4683. #define WLAN_STATS_TX_MPDU_CNT_MASK 0x00000002
  4684. #define WLAN_STATS_TX_PPDU_CNT_SHIFT 2
  4685. #define WLAN_STATS_TX_PPDU_CNT_MASK 0x00000004
  4686. #define WLAN_STATS_TX_BYTES_SHIFT 3
  4687. #define WLAN_STATS_TX_BYTES_MASK 0x00000008
  4688. #define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT 4
  4689. #define WLAN_STATS_TX_MSDU_DROP_CNT_MASK 0x00000010
  4690. #define WLAN_STATS_TX_DROP_BYTES_SHIFT 5
  4691. #define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000020
  4692. #define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT 6
  4693. #define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK 0x00000040
  4694. #define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT 7
  4695. #define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK 0x00000080
  4696. #define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT 8
  4697. #define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK 0x00000100
  4698. #define WLAN_STATS_TX_MPDU_AGGR_SHIFT 9
  4699. #define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000200
  4700. #define WLAN_STATS_TX_SUCC_MCS_SHIFT 10
  4701. #define WLAN_STATS_TX_SUCC_MCS_MASK 0x00000400
  4702. #define WLAN_STATS_TX_FAIL_MCS_SHIFT 11
  4703. #define WLAN_STATS_TX_FAIL_MCS_MASK 0x00000800
  4704. #define WLAN_STATS_TX_PPDU_DELAY_SHIFT 12
  4705. #define WLAN_STATS_TX_PPDU_DELAY_MASK 0x00001000
  4706. /* WLAN RX stats bitmap */
  4707. #define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT 0
  4708. #define WLAN_STATS_MAC_RX_MPDU_CNT_MASK 0x00000001
  4709. #define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
  4710. #define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
  4711. #define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT 2
  4712. #define WLAN_STATS_PHY_RX_PPDU_CNT_MASK 0x00000004
  4713. #define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
  4714. #define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
  4715. #define WLAN_STATS_RX_DISORDER_CNT_SHIFT 4
  4716. #define WLAN_STATS_RX_DISORDER_CNT_MASK 0x00000010
  4717. #define WLAN_STATS_RX_RETRY_CNT_SHIFT 5
  4718. #define WLAN_STATS_RX_RETRY_CNT_MASK 0x00000020
  4719. #define WLAN_STATS_RX_DUP_CNT_SHIFT 6
  4720. #define WLAN_STATS_RX_DUP_CNT_MASK 0x00000040
  4721. #define WLAN_STATS_RX_DISCARD_CNT_SHIFT 7
  4722. #define WLAN_STATS_RX_DISCARD_CNT_MASK 0x00000080
  4723. #define WLAN_STATS_RX_MPDU_AGGR_SHIFT 8
  4724. #define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00000100
  4725. #define WLAN_STATS_RX_MCS_SHIFT 9
  4726. #define WLAN_STATS_RX_MCS_MASK 0x00000200
  4727. #define WLAN_STATS_STA_PS_INDS_SHIFT 10
  4728. #define WLAN_STATS_STA_PS_INDS_MASK 0x00000400
  4729. #define WLAN_STATS_STA_PS_DURS_SHIFT 11
  4730. #define WLAN_STATS_STA_PS_DURS_MASK 0x00000800
  4731. #define WLAN_STATS_RX_PROBE_REQS_SHIFT 12
  4732. #define WLAN_STATS_RX_PROBE_REQS_MASK 0x00001000
  4733. #define WLAN_STATS_RX_OTH_MGMTS_SHIFT 13
  4734. #define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00002000
  4735. typedef struct {
  4736. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
  4737. A_UINT32 vdev_id;
  4738. /** Percentage of idle time, no TX, no RX, no interference */
  4739. A_UINT32 idle_time;
  4740. /** Percentage of time transmitting packets */
  4741. A_UINT32 tx_time;
  4742. /** Percentage of time receiving packets in current BSSs */
  4743. A_UINT32 rx_in_bss_time;
  4744. /** Percentage of time receiving packets not in current BSSs */
  4745. A_UINT32 rx_out_bss_time;
  4746. /** Percentage of time interference detected. */
  4747. A_UINT32 rx_busy_time;
  4748. /** Percentage of time receiving packets with errors
  4749. * or packets flagged as retransmission or seqnum discontinued. */
  4750. A_UINT32 rx_in_bad_cond_time;
  4751. /** Percentage of time the device transmitted packets that haven't been ACKed. */
  4752. A_UINT32 tx_in_bad_cond_time;
  4753. /** Percentage of time the chip is unable to work in normal conditions. */
  4754. A_UINT32 wlan_not_avail_time;
  4755. } wmi_chan_cca_stats;
  4756. /** Thresholds of cca stats, stands for percentages of stats variation.
  4757. * Check wmi_chan_cca_stats for each stats's meaning.
  4758. */
  4759. typedef struct {
  4760. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
  4761. A_UINT32 idle_time; /* units = percent */
  4762. A_UINT32 tx_time; /* units = percent */
  4763. A_UINT32 rx_in_bss_time; /* units = percent */
  4764. A_UINT32 rx_out_bss_time; /* units = percent */
  4765. A_UINT32 rx_busy_time; /* units = percent */
  4766. A_UINT32 rx_in_bad_cond_time; /* units = percent */
  4767. A_UINT32 tx_in_bad_cond_time; /* units = percent */
  4768. A_UINT32 wlan_not_avail_time; /* units = percent */
  4769. } wmi_chan_cca_stats_thresh;
  4770. typedef struct {
  4771. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
  4772. A_UINT32 vdev_id;
  4773. A_UINT32 peer_id;
  4774. /** per chain SNR in current bss, units are dB */
  4775. A_INT32 per_chain_snr[WMI_MAX_CHAINS];
  4776. /** per chain background noise, units are dBm */
  4777. A_INT32 per_chain_nf[WMI_MAX_CHAINS];
  4778. } wmi_peer_signal_stats;
  4779. /** Thresholds of signal stats, stand for percentage of stats variation.
  4780. * Check wmi_peer_signal_stats for each stats's meaning.
  4781. */
  4782. typedef struct {
  4783. /**
  4784. * TLV tag and len; tag equals
  4785. * WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh
  4786. */
  4787. A_UINT32 tlv_header;
  4788. A_UINT32 per_chain_snr; /* units = dB */
  4789. A_UINT32 per_chain_nf; /* units = dBm */
  4790. } wmi_peer_signal_stats_thresh;
  4791. typedef struct {
  4792. /**
  4793. * TLV tag and len; tag equals
  4794. * WMITLV_TAG_STRUC_wmi_tx_stats
  4795. */
  4796. A_UINT32 tlv_header;
  4797. /** Number of total TX MSDUs on MAC layer in the period */
  4798. A_UINT32 tx_msdu_cnt;
  4799. /** Number of total TX MPDUs on MAC layer in the period */
  4800. A_UINT32 tx_mpdu_cnt;
  4801. /** Number of total TX PPDUs on MAC layer in the period */
  4802. A_UINT32 tx_ppdu_cnt;
  4803. /** Bytes of tx data on MAC layer in the period */
  4804. A_UINT32 tx_bytes;
  4805. /**
  4806. * Number of TX MSDUs cancelled due to any reason in the period,
  4807. * such as WMM limitation/bandwidth limitation/radio congestion
  4808. */
  4809. A_UINT32 tx_msdu_drop_cnt;
  4810. /** Bytes of dropped TX packets in the period */
  4811. A_UINT32 tx_drop_bytes;
  4812. /** Number of unacked transmissions of MPDUs */
  4813. A_UINT32 tx_mpdu_retry_cnt;
  4814. /** Number of MPDUs have not been ACKed despite retried */
  4815. A_UINT32 tx_mpdu_fail_cnt;
  4816. /** Number of PPDUs which received no block ack */
  4817. A_UINT32 tx_ppdu_fail_cnt;
  4818. /**
  4819. * This TLV is followed by TLVs below: :
  4820. * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
  4821. * A_UINT32 tx_succ_mcs[tx_succ_mcs_array_len];
  4822. * A_UINT32 tx_fail_mcs[tx_fail_mcs_array_len];
  4823. * A_UINT32 tx_delay[tx_ppdu_delay_array_len];
  4824. */
  4825. } wmi_tx_stats;
  4826. /** Thresholds of tx stats, stand for percentage of stats variation.
  4827. * Check wmi_tx_stats for each stats's meaning.
  4828. */
  4829. typedef struct {
  4830. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
  4831. A_UINT32 tx_msdu_cnt;
  4832. A_UINT32 tx_mpdu_cnt;
  4833. A_UINT32 tx_ppdu_cnt;
  4834. A_UINT32 tx_bytes;
  4835. A_UINT32 tx_msdu_drop_cnt;
  4836. A_UINT32 tx_drop_bytes;
  4837. A_UINT32 tx_mpdu_retry_cnt;
  4838. A_UINT32 tx_mpdu_fail_cnt;
  4839. A_UINT32 tx_ppdu_fail_cnt;
  4840. A_UINT32 tx_mpdu_aggr;
  4841. A_UINT32 tx_succ_mcs;
  4842. A_UINT32 tx_fail_mcs;
  4843. A_UINT32 tx_ppdu_delay;
  4844. } wmi_tx_stats_thresh;
  4845. typedef struct {
  4846. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
  4847. A_UINT32 vdev_id;
  4848. A_UINT32 peer_id;
  4849. /* The TLVs for the 4 AC follows:
  4850. * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
  4851. */
  4852. } wmi_peer_ac_tx_stats;
  4853. typedef struct {
  4854. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
  4855. A_UINT32 tlv_header;
  4856. /** Number of RX MPDUs on MAC layer */
  4857. A_UINT32 mac_rx_mpdu_cnt;
  4858. /** Bytes of RX packets on MAC layer */
  4859. A_UINT32 mac_rx_bytes;
  4860. /** Number of RX PPDU on PHY layer */
  4861. A_UINT32 phy_rx_ppdu_cnt;
  4862. /** Bytes of RX packets on PHY layer */
  4863. A_UINT32 phy_rx_bytes;
  4864. /** Number of discontinuity in seqnum */
  4865. A_UINT32 rx_disorder_cnt;
  4866. /** Number of RX MPDUs flagged as retransmissions */
  4867. A_UINT32 rx_mpdu_retry_cnt;
  4868. /** Number of RX MPDUs identified as duplicates */
  4869. A_UINT32 rx_mpdu_dup_cnt;
  4870. /** Number of RX MPDUs discarded */
  4871. A_UINT32 rx_mpdu_discard_cnt;
  4872. /**
  4873. * This TLV is followed by TLVs below:
  4874. * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
  4875. * A_UINT32 rx_mcs[rx_mcs_array_len];
  4876. */
  4877. } wmi_rx_stats;
  4878. /** Thresholds of rx stats, stands for percentage of stats variation.
  4879. * Check wmi_rx_stats for each stats's meaning.
  4880. */
  4881. typedef struct {
  4882. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
  4883. A_UINT32 tlv_header;
  4884. A_UINT32 mac_rx_mpdu_cnt;
  4885. A_UINT32 mac_rx_bytes;
  4886. A_UINT32 phy_rx_ppdu_cnt;
  4887. A_UINT32 phy_rx_bytes;
  4888. A_UINT32 rx_disorder_cnt;
  4889. A_UINT32 rx_mpdu_retry_cnt;
  4890. A_UINT32 rx_mpdu_dup_cnt;
  4891. A_UINT32 rx_mpdu_discard_cnt;
  4892. A_UINT32 rx_mpdu_aggr;
  4893. A_UINT32 rx_mcs;
  4894. A_UINT32 sta_ps_inds;
  4895. A_UINT32 sta_ps_durs;
  4896. A_UINT32 rx_probe_reqs;
  4897. A_UINT32 rx_oth_mgmts;
  4898. } wmi_rx_stats_thresh;
  4899. typedef struct {
  4900. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
  4901. A_UINT32 tlv_header;
  4902. A_UINT32 vdev_id;
  4903. A_UINT32 peer_id;
  4904. /** How many times STAs go to sleep */
  4905. A_UINT32 sta_ps_inds;
  4906. /** Total sleep time of STAs, milliseconds units */
  4907. A_UINT32 sta_ps_durs;
  4908. /** Number of probe requests received */
  4909. A_UINT32 rx_probe_reqs;
  4910. /**
  4911. * Number of other management frames received, not including probe
  4912. * requests
  4913. */
  4914. A_UINT32 rx_oth_mgmts;
  4915. /**
  4916. * The TLVs for the 4 AC follows:
  4917. * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
  4918. */
  4919. } wmi_peer_ac_rx_stats;
  4920. typedef enum {
  4921. /** Periodic timer timed out, based on the period specified
  4922. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  4923. */
  4924. TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
  4925. /** Any of the (enabled) stats thresholds specified
  4926. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  4927. * within the current stats period.
  4928. */
  4929. TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
  4930. /** In Response to the one-time wlan stats request of
  4931. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  4932. */
  4933. TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
  4934. } wmi_report_stats_event_trigger_cond_id;
  4935. typedef struct {
  4936. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
  4937. /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
  4938. A_UINT32 trigger_cond_id;
  4939. /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
  4940. A_UINT32 cca_chgd_bitmap;
  4941. /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
  4942. A_UINT32 sig_chgd_bitmap;
  4943. /** Bitmap to indicate changed TX counters which exceeded the thresholds */
  4944. A_UINT32 tx_chgd_bitmap;
  4945. /** Bitmap to indicate changed RX counters which exceeded the thresholds */
  4946. A_UINT32 rx_chgd_bitmap;
  4947. /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
  4948. A_UINT32 num_chan_cca_stats;
  4949. /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
  4950. A_UINT32 num_peer_signal_stats;
  4951. /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
  4952. A_UINT32 num_peer_ac_tx_stats;
  4953. /**
  4954. * Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  4955. * The array indicates number of MPDUs sent on specified aggregation size
  4956. * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
  4957. * Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN
  4958. */
  4959. A_UINT32 tx_mpdu_aggr_array_len;
  4960. /**
  4961. * Array length of tx_succ_mcs[] which is histogram of encoding rate.
  4962. * The array indicates number of acked PPDUs sent at a specific rate
  4963. */
  4964. A_UINT32 tx_succ_mcs_array_len;
  4965. /**
  4966. * Array length of tx_fail_mcs[] which is histogram of encoding rate.
  4967. * The array indicates number of unacked PPDUs sent at a specific rate
  4968. */
  4969. A_UINT32 tx_fail_mcs_array_len;
  4970. /**
  4971. * tx_ppdu_delay[]is a histogram of delays on MAC layer.
  4972. * The array counts numbers of PPDUs encountering different TX time delays.
  4973. * TX delay here means time interval between the time a PPDU is queued
  4974. * to the MAC HW for transmission and the time the lower layers of
  4975. * tx FW return a tx status.
  4976. *
  4977. * The bin size tx_ppdu_delay_bin_size_ms specifies how many
  4978. * milliseconds. Each bin of the tx_ppdu_delay histogram represents.
  4979. * By default the bin size is 10ms.
  4980. * tx_ppdu_delay[0] -> delays between 0-9 ms
  4981. * tx_ppdu_delay[1] -> delays between 10-19 ms
  4982. * ...
  4983. * tx_ppdu_delay[9] -> delays between 90-99 ms
  4984. * tx_ppdu_delay[10] -> delays >= 100 ms
  4985. * Bin size can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS.
  4986. */
  4987. A_UINT32 tx_ppdu_delay_bin_size_ms;
  4988. /** Array length of tx_ppdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN */
  4989. A_UINT32 tx_ppdu_delay_array_len;
  4990. /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
  4991. A_UINT32 num_peer_ac_rx_stats;
  4992. /**
  4993. * Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  4994. * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN
  4995. */
  4996. A_UINT32 rx_mpdu_aggr_array_len;
  4997. /**
  4998. * Array size of rx_mcs[] which is histogram of encoding rate.
  4999. * The array indicates number of PPDUs received at a specific rate
  5000. */
  5001. A_UINT32 rx_mcs_array_len;
  5002. /**
  5003. * This TLV is followed by TLVs below:
  5004. * wmi_chan_cca_stats chan_cca_stats[]; Array length is specified by num_chan_cca_stats
  5005. * wmi_peer_signal_stats peer_signal_stats[]; Array length is specified by num_peer_signal_stats
  5006. * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array length is specified by num_peer_ac_tx_stats
  5007. * wmi_tx_stats tx_stats[][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC, array index is (peer_index * WLAN_MAX_AC + ac_index)
  5008. * A_UINT32 tx_mpdu_aggr[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
  5009. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
  5010. * A_UINT32 tx_succ_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
  5011. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
  5012. * A_UINT32 tx_fail_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
  5013. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
  5014. * A_UINT32 tx_ppdu_delay[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_ppdu_delay_array_len,
  5015. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_ppdu_delay_array_len + tx delay index
  5016. * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array length is specified by num_peer_ac_rx_stats
  5017. * wmi_rx_stats rx_stats[][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC, array index is (peer_index * WLAN_MAX_AC + ac_index)
  5018. * A_UINT32 rx_mpdu_aggr[][][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
  5019. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
  5020. * A_UINT32 rx_mcs[][][]; Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
  5021. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
  5022. */
  5023. } wmi_report_stats_event_fixed_param;
  5024. /**
  5025. * PDEV statistics
  5026. * @todo
  5027. * add all PDEV stats here
  5028. */
  5029. typedef struct {
  5030. /** Channel noise floor */
  5031. A_INT32 chan_nf;
  5032. /** TX frame count */
  5033. A_UINT32 tx_frame_count;
  5034. /** RX frame count */
  5035. A_UINT32 rx_frame_count;
  5036. /** rx clear count */
  5037. A_UINT32 rx_clear_count;
  5038. /** cycle count */
  5039. A_UINT32 cycle_count;
  5040. /** Phy error count */
  5041. A_UINT32 phy_err_count;
  5042. /** Channel Tx Power */
  5043. A_UINT32 chan_tx_pwr;
  5044. /** WAL dbg stats */
  5045. struct wlan_dbg_stats pdev_stats;
  5046. } wmi_pdev_stats;
  5047. /**
  5048. * VDEV statistics
  5049. * @todo
  5050. * add all VDEV stats here
  5051. */
  5052. typedef struct {
  5053. A_INT32 bcn_snr;
  5054. A_INT32 dat_snr;
  5055. } wmi_snr_info;
  5056. typedef struct {
  5057. /** unique id identifying the VDEV, generated by the caller */
  5058. A_UINT32 vdev_id;
  5059. wmi_snr_info vdev_snr;
  5060. A_UINT32 tx_frm_cnt[WLAN_MAX_AC]; /* Total number of packets(per AC) that were successfully transmitted(with and without retries, including multi-cast, broadcast) */
  5061. A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
  5062. A_UINT32 multiple_retry_cnt[WLAN_MAX_AC]; /*The number of MSDU packets and MMPDU frames per AC
  5063. that the 802.11 station successfully transmitted after more than one retransmission attempt */
  5064. A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
  5065. A_UINT32 rts_fail_cnt; /*Total number of RTS/CTS sequence failures for transmission of a packet */
  5066. A_UINT32 rts_succ_cnt; /*Total number of RTS/CTS sequence success for transmission of a packet */
  5067. A_UINT32 rx_err_cnt; /*The receive error count. HAL will provide the RxP FCS error global */
  5068. A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
  5069. A_UINT32 ack_fail_cnt; /*Total number packets failed transmit because of no ACK from the remote entity */
  5070. A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES]; /*History of last ten transmit rate, in units of 500 kbit/sec */
  5071. A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES]; /*History of last ten Beacon rssi of the connected Bss */
  5072. } wmi_vdev_stats;
  5073. /**
  5074. * peer statistics.
  5075. *
  5076. * @todo
  5077. * add more stats
  5078. *
  5079. */
  5080. typedef struct {
  5081. /** peer MAC address */
  5082. wmi_mac_addr peer_macaddr;
  5083. /** rssi */
  5084. A_UINT32 peer_rssi;
  5085. /** last tx data rate used for peer */
  5086. A_UINT32 peer_tx_rate;
  5087. /** last rx data rate used for peer */
  5088. A_UINT32 peer_rx_rate;
  5089. } wmi_peer_stats;
  5090. typedef struct {
  5091. /** Primary channel freq of the channel for which stats are sent */
  5092. A_UINT32 chan_mhz;
  5093. /** Time spent on the channel */
  5094. A_UINT32 sampling_period_us;
  5095. /** Aggregate duration over a sampling period for which channel activity was observed */
  5096. A_UINT32 rx_clear_count;
  5097. /** Accumalation of the TX PPDU duration over a sampling period */
  5098. A_UINT32 tx_duration_us;
  5099. /** Accumalation of the RX PPDU duration over a sampling period */
  5100. A_UINT32 rx_duration_us;
  5101. } wmi_chan_stats;
  5102. typedef struct {
  5103. A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
  5104. A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
  5105. A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
  5106. A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
  5107. A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
  5108. A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
  5109. A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
  5110. A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
  5111. A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
  5112. A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
  5113. A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
  5114. /*dot11QosTransmittedFragmentCount */
  5115. A_UINT32 tx_Qos_mpdu_grp_frag_cnt;
  5116. A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
  5117. A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
  5118. A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
  5119. A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
  5120. A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
  5121. A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
  5122. A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
  5123. A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
  5124. A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
  5125. A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
  5126. /*dot11RSNAStatsRobustMgmtCCMPReplays */
  5127. A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt;
  5128. A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
  5129. A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
  5130. /*dot11RSNAStatsCCMPDecryptErrors */
  5131. A_UINT32 rsna_CCMP_decrypt_err_cnt;
  5132. A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
  5133. A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
  5134. /*dot11TransmittedMPDUsInAMPDUCount*/
  5135. A_UINT32 tx_mpdu_cnt_in_ampdu;
  5136. /*dot11TransmittedOctetsInAMPDUCount*/
  5137. union {
  5138. A_UINT64 counter; /* for use by target only */
  5139. struct {
  5140. A_UINT32 low;
  5141. A_UINT32 high;
  5142. } upload; /* for use by host */
  5143. } tx_octets_in_ampdu;
  5144. A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
  5145. A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
  5146. union {
  5147. A_UINT64 counter; /* for use by target only */
  5148. struct {
  5149. A_UINT32 rx_octets_in_ampdu_low;
  5150. A_UINT32 rx_octets_in_ampdu_high;
  5151. } upload; /* for use by host */
  5152. } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
  5153. A_UINT32 reserved_1;
  5154. A_UINT32 reserved_2;
  5155. A_UINT32 reserved_3;
  5156. A_UINT32 reserved_4;
  5157. } wmi_mib_stats;
  5158. typedef struct {
  5159. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
  5160. A_UINT32 tlv_header;
  5161. A_UINT32 vdev_id;
  5162. A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
  5163. A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
  5164. wmi_mac_addr peer_macaddr;
  5165. } wmi_rssi_stats;
  5166. typedef struct {
  5167. /*
  5168. * TLV tag and len; tag equals
  5169. * WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats
  5170. */
  5171. A_UINT32 tlv_header;
  5172. A_UINT32 num_per_chain_rssi_stats;
  5173. /*
  5174. * This TLV is followed by another TLV of array of structs:
  5175. * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
  5176. */
  5177. } wmi_per_chain_rssi_stats;
  5178. typedef struct {
  5179. A_UINT32 tlv_header;
  5180. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
  5181. /** unique id identifying the VDEV, generated by the caller */
  5182. A_UINT32 vdev_id;
  5183. /** VDEV type (AP,STA,IBSS,MONITOR) */
  5184. A_UINT32 vdev_type;
  5185. /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
  5186. A_UINT32 vdev_subtype;
  5187. /** VDEV MAC address */
  5188. wmi_mac_addr vdev_macaddr;
  5189. /** Number of configured txrx streams */
  5190. A_UINT32 num_cfg_txrx_streams;
  5191. /*
  5192. * pdev_id for identifying the MAC,
  5193. * See macros starting with WMI_PDEV_ID_ for values.
  5194. */
  5195. A_UINT32 pdev_id;
  5196. /*
  5197. * This TLV is followed by another TLV of array of structures
  5198. * wmi_vdev_txrx_streams cfg_txrx_streams[];
  5199. */
  5200. } wmi_vdev_create_cmd_fixed_param;
  5201. typedef struct {
  5202. /*
  5203. * TLV tag and len; tag equals
  5204. * WMITLV_TAG_STRUC_wmi_vdev_txrx_streams
  5205. */
  5206. A_UINT32 tlv_header;
  5207. /* band - Should take values from wmi_channel_band_mask */
  5208. A_UINT32 band;
  5209. /* max supported tx streams per given band for this vdev */
  5210. A_UINT32 supported_tx_streams;
  5211. /* max supported rx streams per given band for this vdev */
  5212. A_UINT32 supported_rx_streams;
  5213. } wmi_vdev_txrx_streams;
  5214. /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
  5215. typedef struct {
  5216. A_UINT32 tlv_header;
  5217. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
  5218. A_UINT32 type_count;
  5219. /** 255: continuous schedule, 0: reserved */
  5220. A_UINT32 duration;
  5221. /** Absent period duration in micro seconds */
  5222. A_UINT32 interval;
  5223. /** Absent period interval in micro seconds */
  5224. A_UINT32 start_time;
  5225. /** 32 bit tsf time when in starts */
  5226. } wmi_p2p_noa_descriptor;
  5227. /** values for vdev_type */
  5228. #define WMI_VDEV_TYPE_AP 0x1
  5229. #define WMI_VDEV_TYPE_STA 0x2
  5230. #define WMI_VDEV_TYPE_IBSS 0x3
  5231. #define WMI_VDEV_TYPE_MONITOR 0x4
  5232. /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
  5233. * by FW to execute the NAN specific WMI commands and also implement NAN specific
  5234. * operations like Network discovery, service provisioning and service
  5235. * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
  5236. * WMI command to create this VDEV once during initialization and host is not
  5237. * expected to use any VDEV specific WMI commands on this VDEV.
  5238. **/
  5239. #define WMI_VDEV_TYPE_NAN 0x5
  5240. #define WMI_VDEV_TYPE_OCB 0x6
  5241. /* NAN Data Interface */
  5242. #define WMI_VDEV_TYPE_NDI 0x7
  5243. /*
  5244. * Param values to be sent for WMI_VDEV_PARAM_SGI command
  5245. * which are used in 11ax systems
  5246. */
  5247. #define WMI_SGI_LEGACY 0x1 /* for HT and VHT */
  5248. #define WMI_SGI_HE_400_NS 0x2 /* for HE 400 nsec */
  5249. #define WMI_SGI_HE_800_NS 0x4 /* for HE 800 nsec */
  5250. #define WMI_SGI_HE_1600_NS 0x8 /* for HE 1600 nsec */
  5251. #define WMI_SGI_HE_3200_NS 0x10 /* for HE 3200 nsec */
  5252. /** values for vdev_subtype */
  5253. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
  5254. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
  5255. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
  5256. #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
  5257. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
  5258. /*
  5259. * new subtype for 11S mesh is required as 11S functionality differs
  5260. * in many ways from proprietary mesh
  5261. * 11S uses 6-addr frame format and supports peering between mesh
  5262. * stations and dynamic best path selection between mesh stations.
  5263. * While in proprietary mesh, neighboring mesh station MAC is manually
  5264. * added to AST table for traffic flow between mesh stations
  5265. */
  5266. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
  5267. /** values for vdev_start_request flags */
  5268. /** Indicates that AP VDEV uses hidden ssid. only valid for
  5269. * AP/GO */
  5270. #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
  5271. /** Indicates if robust management frame/management frame
  5272. * protection is enabled. For GO/AP vdevs, it indicates that
  5273. * it may support station/client associations with RMF enabled.
  5274. * For STA/client vdevs, it indicates that sta will
  5275. * associate with AP with RMF enabled. */
  5276. #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
  5277. /*
  5278. * Host is sending bcn_tx_rate to override the beacon tx rates.
  5279. */
  5280. #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
  5281. #define WMI_HEOPS_COLOR_GET(he_ops) WMI_GET_BITS(he_ops, 0, 6)
  5282. #define WMI_HEOPS_COLOR_SET(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
  5283. #define WMI_HEOPS_DEFPE_GET(he_ops) WMI_GET_BITS(he_ops, 6, 3)
  5284. #define WMI_HEOPS_DEFPE_SET(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
  5285. #define WMI_HEOPS_TWT_GET(he_ops) WMI_GET_BITS(he_ops, 9, 1)
  5286. #define WMI_HEOPS_TWT_SET(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
  5287. #define WMI_HEOPS_RTSTHLD_GET(he_ops) WMI_GET_BITS(he_ops, 10, 10)
  5288. #define WMI_HEOPS_RTSTHLD_SET(he_ops, value) WMI_SET_BITS(he_ops, 10, 10, value)
  5289. #define WMI_HEOPS_PDMIN_GET(he_ops) WMI_GET_BITS(he_ops, 20, 5)
  5290. #define WMI_HEOPS_PDMIN_SET(he_ops, value) WMI_SET_BITS(he_ops, 20, 5, value)
  5291. #define WMI_HEOPS_PDMAX_GET(he_ops) WMI_GET_BITS(he_ops, 25, 5)
  5292. #define WMI_HEOPS_PDMAX_SET(he_ops, value) WMI_SET_BITS(he_ops, 25, 5, value)
  5293. #define WMI_MAX_HECAP_PHY_SIZE (3)
  5294. #define WMI_HECAP_PHY_COD_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
  5295. #define WMI_HECAP_PHY_COD_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
  5296. #define WMI_HECAP_PHY_TXLDPC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 1)
  5297. #define WMI_HECAP_PHY_TXLDPC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 1, value)
  5298. #define WMI_HECAP_PHY_RXLDPC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 2, 1)
  5299. #define WMI_HECAP_PHY_RXLDPC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 2, 1, value)
  5300. #define WMI_HECAP_PHY_DCM_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 3, 3)
  5301. #define WMI_HECAP_PHY_DCM_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 3, 3, value)
  5302. #define WMI_HECAP_PHY_OLTF_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 6, 1)
  5303. #define WMI_HECAP_PHY_OLTF_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 6, 1, value)
  5304. #define WMI_HECAP_PHY_CBW_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 7, 3)
  5305. #define WMI_HECAP_PHY_CBW_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 7, 3, value)
  5306. #define WMI_HECAP_PHY_TXSTBC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 10, 1)
  5307. #define WMI_HECAP_PHY_TXSTBC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 10, 1, value)
  5308. #define WMI_HECAP_PHY_RXSTBC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 11, 1)
  5309. #define WMI_HECAP_PHY_RXSTBC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 11, 1, value)
  5310. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  5311. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  5312. #define WMI_HECAP_PHY_UL_MU_MIMO_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  5313. #define WMI_HECAP_PHY_UL_MU_MIMO_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  5314. #define WMI_HECAP_PHY_ULOFDMA_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  5315. #define WMI_HECAP_PHY_ULOFDMA_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  5316. #define WMI_HECAP_PHY_TXDOPPLER_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 1)
  5317. #define WMI_HECAP_PHY_TXDOPPLER_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 1, value)
  5318. #define WMI_HECAP_PHY_RXDOPPLER_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 16, 1)
  5319. #define WMI_HECAP_PHY_RXDOPPLER_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 16, 1, value)
  5320. #define WMI_HECAP_PHY_CBMODE_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 8)
  5321. #define WMI_HECAP_PHY_CBMODE_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 8, value)
  5322. #define WMI_HECAP_PHY_PADDING_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 25, 2)
  5323. #define WMI_HECAP_PHY_PADDING_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 25, 2, value)
  5324. #define WMI_HECAP_PHY_32GI_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 26)
  5325. #define WMI_HECAP_PHY_32GI_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 26, value)
  5326. #define WMI_HECAP_PHY_SUBFMR_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  5327. #define WMI_HECAP_PHY_SUBFMR_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  5328. #define WMI_HECAP_PHY_SUBFME_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 1)
  5329. #define WMI_HECAP_PHY_SUBFME_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 1, value)
  5330. #define WMI_HECAP_PHY_SUBFMESTS_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 28, 3)
  5331. #define WMI_HECAP_PHY_SUBFMESTS_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 28, 3, value)
  5332. #define WMI_HECAP_PHY_NOSUNDIMENS_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 3)
  5333. #define WMI_HECAP_PHY_NOSUNDIMENS_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 3, value)
  5334. #define WMI_HECAP_PHY_MUBFMR_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  5335. #define WMI_HECAP_PHY_MUBFMR_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  5336. #define WMI_HECAP_PHY_40MHZNSS_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 18)
  5337. #define WMI_HECAP_PHY_40MHZNSS_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 18, value)
  5338. #define WMI_HECAP_MAC_MTID_GET(he_cap) WMI_GET_BITS(he_cap, 0, 3)
  5339. #define WMI_HECAP_MAC_MTID_SET(he_cap, value) WMI_SET_BITS(he_cap, 0, 3, value)
  5340. #define WMI_HECAP_MAC_AACK_GET(he_cap) WMI_GET_BITS(he_cap, 3, 1)
  5341. #define WMI_HECAP_MAC_AACK_SET(he_cap, value) WMI_SET_BITS(he_cap, 3, 1, value)
  5342. #define WMI_HECAP_MAC_MINFRAGSZ_GET(he_cap) WMI_GET_BITS(he_cap, 4, 2)
  5343. #define WMI_HECAP_MAC_MINFRAGSZ_SET(he_cap, value) WMI_SET_BITS(he_cap, 4, 2, value)
  5344. #define WMI_HECAP_MAC_HEFRAG_GET(he_cap) WMI_GET_BITS(he_cap, 6, 2)
  5345. #define WMI_HECAP_MAC_HEFRAG_SET(he_cap, value) WMI_SET_BITS(he_cap, 6, 2, value)
  5346. #define WMI_HECAP_MAC_MURTS_GET(he_cap) WMI_GET_BITS(he_cap, 8, 1)
  5347. #define WMI_HECAP_MAC_MURTS_SET(he_cap, value) WMI_SET_BITS(he_cap, 8, 1, value)
  5348. #define WMI_HECAP_MAC_OMI_GET(he_cap) WMI_GET_BITS(he_cap, 9, 1)
  5349. #define WMI_HECAP_MAC_OMI_SET(he_cap, value) WMI_SET_BITS(he_cap, 9, 1, value)
  5350. #define WMI_HECAP_MAC_HECTRL_GET(he_cap) WMI_GET_BITS(he_cap, 10, 1)
  5351. #define WMI_HECAP_MAC_HECTRL_SET(he_cap, value) WMI_SET_BITS(he_cap, 10, 1, value)
  5352. #define WMI_HECAP_MAC_MBAHECTRL_GET(he_cap) WMI_GET_BITS(he_cap, 11, 1)
  5353. #define WMI_HECAP_MAC_MBAHECTRL_SET(he_cap, value) WMI_SET_BITS(he_cap, 11, 1, value)
  5354. #define WMI_HECAP_MAC_ULMURSP_GET(he_cap) WMI_GET_BITS(he_cap, 12, 1)
  5355. #define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) WMI_SET_BITS(he_cap, 12, 1, value)
  5356. #define WMI_HECAP_MAC_HELKAD_GET(he_cap) WMI_GET_BITS(he_cap, 13, 2)
  5357. #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) WMI_SET_BITS(he_cap, 13, 2, value)
  5358. #define WMI_HECAP_MAC_BSR_GET(he_cap) WMI_GET_BITS(he_cap, 15, 1)
  5359. #define WMI_HECAP_MAC_BSR_SET(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
  5360. #define WMI_HECAP_MAC_TWTREQ_GET(he_cap) WMI_GET_BITS(he_cap, 16, 1)
  5361. #define WMI_HECAP_MAC_TWTREQ_SET(he_cap, value) WMI_SET_BITS(he_cap, 16, 1, value)
  5362. #define WMI_HECAP_MAC_TWTRSP_GET(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  5363. #define WMI_HECAP_MAC_TWTRSP_SET(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  5364. #define WMI_HECAP_MAC_BCSTTWT_GET(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  5365. #define WMI_HECAP_MAC_BCSTTWT_SET(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  5366. #define WMI_HECAP_MAC_MBSS_GET(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  5367. #define WMI_HECAP_MAC_MBSS_SET(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  5368. #define WMI_HECAP_MAC_TRIGPADDUR_GET(he_cap) WMI_GET_BITS(he_cap, 20, 2)
  5369. #define WMI_HECAP_MAC_TRIGPADDUR_SET(he_cap, value) WMI_SET_BITS(he_cap, 20, 2, value)
  5370. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET(he_cap) WMI_GET_BITS(he_cap, 22, 3)
  5371. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET(he_cap, value) WMI_SET_BITS(he_cap, 22, 3, value)
  5372. #define WMI_HECAP_MAC_32BITBA_GET(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  5373. #define WMI_HECAP_MAC_32BITBA_SET(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  5374. #define WMI_HECAP_MAC_MUCASCADE_GET(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  5375. #define WMI_HECAP_MAC_MUCASCADE_SET(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  5376. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET(he_cap) WMI_GET_BITS(he_cap, 27, 1)
  5377. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET(he_cap, value) WMI_SET_BITS(he_cap, 27, 1, value)
  5378. #define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) WMI_GET_BITS(he_cap, 28, 1)
  5379. #define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) WMI_SET_BITS(he_cap, 28, 1, value)
  5380. #define WMI_HECAP_MAC_OFDMARA_GET(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  5381. #define WMI_HECAP_MAC_OFDMARA_SET(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  5382. #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode) (((_rcode) >> 8) & 0x7)
  5383. #define WMI_GET_HW_RATECODE_NSS_V1(_rcode) (((_rcode) >> 5) & 0x7)
  5384. #define WMI_GET_HW_RATECODE_RATE_V1(_rcode) (((_rcode) >> 0) & 0x1F)
  5385. #define WMI_ASSEMBLE_RATECODE_V1(_rate, _nss, _pream) \
  5386. (((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
  5387. typedef struct {
  5388. A_UINT32 tlv_header;
  5389. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
  5390. /** unique id identifying the VDEV, generated by the caller */
  5391. A_UINT32 vdev_id;
  5392. /** requestor id identifying the caller module */
  5393. A_UINT32 requestor_id;
  5394. /** beacon interval from received beacon */
  5395. A_UINT32 beacon_interval;
  5396. /** DTIM Period from the received beacon */
  5397. A_UINT32 dtim_period;
  5398. /** Flags */
  5399. A_UINT32 flags;
  5400. /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  5401. wmi_ssid ssid;
  5402. /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
  5403. /** This field will be invalid and ignored unless the */
  5404. /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
  5405. /** When valid, this field contains the fixed tx rate for the beacon */
  5406. /** and probe response frames send by the GO or SoftAP */
  5407. A_UINT32 bcn_tx_rate;
  5408. /** beacon/probe reponse xmit power. Applicable for SoftAP. */
  5409. A_UINT32 bcn_txPower;
  5410. /** number of p2p NOA descriptor(s) from scan entry */
  5411. A_UINT32 num_noa_descriptors;
  5412. /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  5413. During CAC, Our HW shouldn't ack ditected frames */
  5414. A_UINT32 disable_hw_ack;
  5415. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  5416. /** The DBS policy manager indicates the preferred number of transmit streams. */
  5417. A_UINT32 preferred_tx_streams;
  5418. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  5419. /** the DBS policy manager indicates the preferred number of receive streams. */
  5420. A_UINT32 preferred_rx_streams;
  5421. A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
  5422. A_UINT32 cac_duration_ms; /* in milliseconds */
  5423. A_UINT32 regdomain;
  5424. /* The TLVs follows this structure:
  5425. * wmi_channel chan; //WMI channel
  5426. * wmi_p2p_noa_descriptor noa_descriptors[]; //actual p2p NOA descriptor from scan entry
  5427. */
  5428. } wmi_vdev_start_request_cmd_fixed_param;
  5429. typedef struct {
  5430. A_UINT32 tlv_header;
  5431. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
  5432. /** unique id identifying the VDEV, generated by the caller */
  5433. A_UINT32 vdev_id;
  5434. } wmi_vdev_delete_cmd_fixed_param;
  5435. typedef struct {
  5436. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
  5437. /** unique id identifying the VDEV, generated by the caller */
  5438. A_UINT32 vdev_id;
  5439. /** aid (assoc id) received in association response for STA VDEV */
  5440. A_UINT32 vdev_assoc_id;
  5441. /** bssid of the BSS the VDEV is joining */
  5442. wmi_mac_addr vdev_bssid;
  5443. } wmi_vdev_up_cmd_fixed_param;
  5444. typedef struct {
  5445. A_UINT32 tlv_header;
  5446. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
  5447. /** unique id identifying the VDEV, generated by the caller */
  5448. A_UINT32 vdev_id;
  5449. } wmi_vdev_stop_cmd_fixed_param;
  5450. typedef struct {
  5451. A_UINT32 tlv_header;
  5452. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
  5453. /** unique id identifying the VDEV, generated by the caller */
  5454. A_UINT32 vdev_id;
  5455. } wmi_vdev_down_cmd_fixed_param;
  5456. typedef struct {
  5457. /** unique id identifying the VDEV, generated by the caller */
  5458. A_UINT32 vdev_id;
  5459. } wmi_vdev_standby_response_cmd;
  5460. typedef struct {
  5461. /** unique id identifying the VDEV, generated by the caller */
  5462. A_UINT32 vdev_id;
  5463. } wmi_vdev_resume_response_cmd;
  5464. typedef struct {
  5465. A_UINT32 tlv_header;
  5466. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  5467. /** unique id identifying the VDEV, generated by the caller */
  5468. A_UINT32 vdev_id;
  5469. /** parameter id */
  5470. A_UINT32 param_id;
  5471. /** parameter value */
  5472. A_UINT32 param_value;
  5473. } wmi_vdev_set_param_cmd_fixed_param;
  5474. typedef struct {
  5475. A_UINT32 key_seq_counter_l;
  5476. A_UINT32 key_seq_counter_h;
  5477. } wmi_key_seq_counter;
  5478. #define WMI_CIPHER_NONE 0x0 /* clear key */
  5479. #define WMI_CIPHER_WEP 0x1
  5480. #define WMI_CIPHER_TKIP 0x2
  5481. #define WMI_CIPHER_AES_OCB 0x3
  5482. #define WMI_CIPHER_AES_CCM 0x4
  5483. #define WMI_CIPHER_WAPI 0x5
  5484. #define WMI_CIPHER_CKIP 0x6
  5485. #define WMI_CIPHER_AES_CMAC 0x7
  5486. #define WMI_CIPHER_ANY 0x8
  5487. #define WMI_CIPHER_AES_GCM 0x9
  5488. #define WMI_CIPHER_AES_GMAC 0xa
  5489. typedef struct {
  5490. A_UINT32 tlv_header;
  5491. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
  5492. /** unique id identifying the VDEV, generated by the caller */
  5493. A_UINT32 vdev_id;
  5494. /** MAC address used for installing */
  5495. wmi_mac_addr peer_macaddr;
  5496. /** key index */
  5497. A_UINT32 key_ix;
  5498. /** key flags */
  5499. A_UINT32 key_flags;
  5500. /** key cipher, defined above */
  5501. A_UINT32 key_cipher;
  5502. /** key rsc counter */
  5503. wmi_key_seq_counter key_rsc_counter;
  5504. /** global key rsc counter */
  5505. wmi_key_seq_counter key_global_rsc_counter;
  5506. /** global key tsc counter */
  5507. wmi_key_seq_counter key_tsc_counter;
  5508. /** WAPI key rsc counter */
  5509. A_UINT8 wpi_key_rsc_counter[16];
  5510. /** WAPI key tsc counter */
  5511. A_UINT8 wpi_key_tsc_counter[16];
  5512. /** key length */
  5513. A_UINT32 key_len;
  5514. /** key tx mic length */
  5515. A_UINT32 key_txmic_len;
  5516. /** key rx mic length */
  5517. A_UINT32 key_rxmic_len;
  5518. /*
  5519. * Following this struct are this TLV.
  5520. * // actual key data
  5521. * A_UINT8 key_data[]; // contains key followed by tx mic followed by rx mic
  5522. */
  5523. } wmi_vdev_install_key_cmd_fixed_param;
  5524. /** Preamble types to be used with VDEV fixed rate configuration */
  5525. typedef enum {
  5526. WMI_RATE_PREAMBLE_OFDM,
  5527. WMI_RATE_PREAMBLE_CCK,
  5528. WMI_RATE_PREAMBLE_HT,
  5529. WMI_RATE_PREAMBLE_VHT,
  5530. WMI_RATE_PREAMBLE_HE,
  5531. } WMI_RATE_PREAMBLE;
  5532. /** Value to disable fixed rate setting */
  5533. #define WMI_FIXED_RATE_NONE (0xff)
  5534. /** the definition of different VDEV parameters */
  5535. typedef enum {
  5536. /** RTS Threshold */
  5537. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  5538. /** Fragmentation threshold */
  5539. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
  5540. /** beacon interval in TUs */
  5541. WMI_VDEV_PARAM_BEACON_INTERVAL,
  5542. /** Listen interval in TUs */
  5543. WMI_VDEV_PARAM_LISTEN_INTERVAL,
  5544. /** muticast rate in Mbps */
  5545. WMI_VDEV_PARAM_MULTICAST_RATE,
  5546. /** management frame rate in Mbps */
  5547. WMI_VDEV_PARAM_MGMT_TX_RATE,
  5548. /** slot time (long vs short) */
  5549. WMI_VDEV_PARAM_SLOT_TIME,
  5550. /** preamble (long vs short) */
  5551. WMI_VDEV_PARAM_PREAMBLE,
  5552. /** SWBA time (time before tbtt in msec) */
  5553. WMI_VDEV_PARAM_SWBA_TIME,
  5554. /** time period for updating VDEV stats */
  5555. WMI_VDEV_STATS_UPDATE_PERIOD,
  5556. /** age out time in msec for frames queued for station in power save*/
  5557. WMI_VDEV_PWRSAVE_AGEOUT_TIME,
  5558. /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
  5559. WMI_VDEV_HOST_SWBA_INTERVAL,
  5560. /** DTIM period (specified in units of num beacon intervals) */
  5561. WMI_VDEV_PARAM_DTIM_PERIOD,
  5562. /** scheduler air time limit for this VDEV. used by off chan scheduler */
  5563. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
  5564. /** enable/dsiable WDS for this VDEV */
  5565. WMI_VDEV_PARAM_WDS,
  5566. /** ATIM Window */
  5567. WMI_VDEV_PARAM_ATIM_WINDOW,
  5568. /** BMISS max */
  5569. WMI_VDEV_PARAM_BMISS_COUNT_MAX,
  5570. /** BMISS first time */
  5571. WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
  5572. /** BMISS final time */
  5573. WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
  5574. /** WMM enables/disabled */
  5575. WMI_VDEV_PARAM_FEATURE_WMM,
  5576. /** Channel width */
  5577. WMI_VDEV_PARAM_CHWIDTH,
  5578. /** Channel Offset */
  5579. WMI_VDEV_PARAM_CHEXTOFFSET,
  5580. /** Disable HT Protection */
  5581. WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
  5582. /** Quick STA Kickout */
  5583. WMI_VDEV_PARAM_STA_QUICKKICKOUT,
  5584. /** Rate to be used with Management frames */
  5585. WMI_VDEV_PARAM_MGMT_RATE,
  5586. /** Protection Mode */
  5587. WMI_VDEV_PARAM_PROTECTION_MODE,
  5588. /** Fixed rate setting
  5589. * The top nibble is used to select which format to use for encoding
  5590. * the rate specification: 0xVXXXXXXX
  5591. * If V == 0b0000: format is same as before: 0x000000RR
  5592. * If V == 0b0001: format is: 0x1000RRRR.
  5593. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  5594. * The host shall use the new V1 format (and set V = 0x1) if the target
  5595. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  5596. * system is configured with Nss > 4 (either at compile time within the
  5597. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  5598. * by the target).
  5599. */
  5600. WMI_VDEV_PARAM_FIXED_RATE,
  5601. /** Short GI Enable/Disable */
  5602. WMI_VDEV_PARAM_SGI,
  5603. /** Enable LDPC */
  5604. WMI_VDEV_PARAM_LDPC,
  5605. /** Enable Tx STBC */
  5606. WMI_VDEV_PARAM_TX_STBC,
  5607. /** Enable Rx STBC */
  5608. WMI_VDEV_PARAM_RX_STBC,
  5609. /** Intra BSS forwarding */
  5610. WMI_VDEV_PARAM_INTRA_BSS_FWD,
  5611. /** Setting Default xmit key for Vdev */
  5612. WMI_VDEV_PARAM_DEF_KEYID,
  5613. /** NSS width */
  5614. WMI_VDEV_PARAM_NSS,
  5615. /** Set the custom rate for the broadcast data frames */
  5616. WMI_VDEV_PARAM_BCAST_DATA_RATE,
  5617. /** Set the custom rate (rate-code) for multicast data frames */
  5618. WMI_VDEV_PARAM_MCAST_DATA_RATE,
  5619. /** Tx multicast packet indicate Enable/Disable */
  5620. WMI_VDEV_PARAM_MCAST_INDICATE,
  5621. /** Tx DHCP packet indicate Enable/Disable */
  5622. WMI_VDEV_PARAM_DHCP_INDICATE,
  5623. /** Enable host inspection of Tx unicast packet to unknown destination */
  5624. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
  5625. /* The minimum amount of time AP begins to consider STA inactive */
  5626. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
  5627. /* An associated STA is considered inactive when there is no recent TX/RX
  5628. * activity and no downlink frames are buffered for it. Once a STA exceeds
  5629. * the maximum idle inactive time, the AP will send an 802.11 data-null as
  5630. * a keep alive to verify the STA is still associated. If the STA does ACK
  5631. * the data-null, or if the data-null is buffered and the STA does not
  5632. * retrieve it, the STA will be considered unresponsive (see
  5633. * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
  5634. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
  5635. /* An associated STA is considered unresponsive if there is no recent
  5636. * TX/RX activity and downlink frames are buffered for it. Once a STA
  5637. * exceeds the maximum unresponsive time, the AP will send a
  5638. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  5639. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
  5640. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  5641. WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
  5642. /** Enable/Disable RTS-CTS */
  5643. WMI_VDEV_PARAM_ENABLE_RTSCTS,
  5644. /* Enable TXBFee/er */
  5645. WMI_VDEV_PARAM_TXBF,
  5646. /**Set packet power save */
  5647. WMI_VDEV_PARAM_PACKET_POWERSAVE,
  5648. /**Drops un-encrypted packets if any received in an encryted connection
  5649. * otherwise forwards to host
  5650. */
  5651. WMI_VDEV_PARAM_DROP_UNENCRY,
  5652. /*
  5653. * Set TX encap type.
  5654. *
  5655. * enum wmi_pkt_type is to be used as the parameter
  5656. * specifying the encap type.
  5657. */
  5658. WMI_VDEV_PARAM_TX_ENCAP_TYPE,
  5659. /*
  5660. * Try to detect stations that woke-up and exited power save but did not
  5661. * successfully transmit data-null with PM=0 to AP. When this happens,
  5662. * STA and AP power save state are out-of-sync. Use buffered but
  5663. * undelivered MSDU to the STA as a hint that the STA is really awake
  5664. * and expecting normal ASAP delivery, rather than retrieving BU with
  5665. * PS-Poll, U-APSD trigger, etc.
  5666. *
  5667. * 0 disables out-of-sync detection. Maximum time is 255 seconds.
  5668. */
  5669. WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
  5670. /* Enable/Disable early rx dynamic adjust feature.
  5671. * Early-rx dynamic adjust is a advance power save feature.
  5672. * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
  5673. * timing discrepancies in the system.
  5674. * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
  5675. * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
  5676. * properly to minimum the power consume.*/
  5677. WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
  5678. /* set target bmiss number per sample cycle if bmiss adjust was chosen.
  5679. * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
  5680. * which can be set by user through WMI command.
  5681. */
  5682. WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
  5683. /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
  5684. WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
  5685. /* set slop_step */
  5686. WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP,
  5687. /* set init slop */
  5688. WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP,
  5689. /* pause adjust enable/disable */
  5690. WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
  5691. /* Set channel pwr limit value of the vdev the minimal value of all
  5692. * vdevs operating on this channel will be set as channel tx power
  5693. * limit, which is used to configure ratearray
  5694. */
  5695. WMI_VDEV_PARAM_TX_PWRLIMIT,
  5696. /* set the count of snr value for calculation in snr monitor */
  5697. WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,
  5698. /** Roaming offload */
  5699. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
  5700. /** Enable Leader request RX functionality for RMC */
  5701. WMI_VDEV_PARAM_ENABLE_RMC,
  5702. /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
  5703. * by himself. If the beacon lost time exceed this threshold, the peer is
  5704. * thought to be gone. */
  5705. WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,
  5706. /** max rate in kpbs, transmit rate can't go beyond it */
  5707. WMI_VDEV_PARAM_MAX_RATE,
  5708. /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift */
  5709. WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE,
  5710. /* set Tx failure count threshold for the vdev */
  5711. WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,
  5712. /* set ebt resync timeout value, in the unit of TU */
  5713. WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT,
  5714. /* Enable Aggregation State Trigger Event */
  5715. WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE,
  5716. /* This parameter indicates whether IBSS station can enter into power save
  5717. * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
  5718. * awake all the time and should never set PM=1 in its transmitted frames.
  5719. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
  5720. * is non-zero. */
  5721. WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,
  5722. /* This parameter indicates if this station can enter into power collapse
  5723. * for the remaining beacon interval after the ATIM window.
  5724. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
  5725. * is set to true. */
  5726. WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,
  5727. /* This parameter indicates whether IBSS station exit power save mode and
  5728. * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
  5729. * whenever there is a TX/RX activity. */
  5730. WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,
  5731. /* If Awake on TX/RX activity is enabled, this parameter indicates
  5732. * the data inactivity time in number of beacon intervals after which
  5733. * IBSS station reenters power save by sending Null frame with PM=1. */
  5734. WMI_VDEV_PARAM_INACTIVITY_CNT,
  5735. /* Inactivity time in msec after which TX Service Period (SP) is
  5736. * terminated by sending a Qos Null frame with EOSP.
  5737. * If value is 0, TX SP is terminated with the last buffered packet itself
  5738. * instead of waiting for the inactivity timeout. */
  5739. WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,
  5740. /** DTIM policy */
  5741. WMI_VDEV_PARAM_DTIM_POLICY,
  5742. /* When IBSS network is initialized, PS-supporting device
  5743. * does not enter protocol sleep state during first
  5744. * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
  5745. WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,
  5746. /* Enable/Disable 1 RX chain usage during the ATIM window */
  5747. WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
  5748. /**
  5749. * RX Leak window is the time driver waits before shutting down
  5750. * the radio or switching the channel and after receiving an ACK
  5751. * for a data frame with PM bit set)
  5752. */
  5753. WMI_VDEV_PARAM_RX_LEAK_WINDOW,
  5754. /**
  5755. * Averaging factor(16 bit value) is used in the calculations to
  5756. * perform averaging of different link level statistics like average
  5757. * beacon spread or average number of frames leaked
  5758. */
  5759. WMI_VDEV_PARAM_STATS_AVG_FACTOR,
  5760. /*
  5761. * disconnect threshold, once the consecutive error for specific peer
  5762. * exceed this threhold, FW will send kickout event to host
  5763. */
  5764. WMI_VDEV_PARAM_DISCONNECT_TH,
  5765. /*
  5766. * The rate_code of RTS_CTS changed by host. Now FW can support
  5767. * more non-HT rates rather than 1Mbps or 6Mbps */
  5768. WMI_VDEV_PARAM_RTSCTS_RATE,
  5769. /** This parameter indicates whether using a long duration RTS-CTS
  5770. * protection when a SAP goes off channel in MCC mode */
  5771. WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE,
  5772. /*
  5773. * This parameter indicates whether using a broadcast probe response
  5774. * to increase the detectability of SAP in MCC mode
  5775. */
  5776. WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,
  5777. /* This parameter indicates the power backoff in percentage
  5778. * currently supports 100%, 50%, 25%, 12.5%, and minimum
  5779. * Host passes 0, 1, 2, 3, 4 to Firmware
  5780. * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
  5781. * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
  5782. */
  5783. WMI_VDEV_PARAM_TXPOWER_SCALE,
  5784. /* TX power backoff in dB: tx power -= param value
  5785. * Host passes values(DB) to Halphy, Halphy reduces the power table
  5786. * by the values. Safety check will happen in Halphy.
  5787. */
  5788. WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB,
  5789. /** Multicast to Unicast conversion setting */
  5790. WMI_VDEV_PARAM_MCAST2UCAST_SET,
  5791. /** Total number of HW retries */
  5792. WMI_VDEV_PARAM_RC_NUM_RETRIES,
  5793. /** Max tx percentage for cabq */
  5794. WMI_VDEV_PARAM_CABQ_MAXDUR,
  5795. /** MFPTEST settings */
  5796. WMI_VDEV_PARAM_MFPTEST_SET,
  5797. /** RTS Fixed rate setting */
  5798. WMI_VDEV_PARAM_RTS_FIXED_RATE,
  5799. /** VHT SGI MASK */
  5800. WMI_VDEV_PARAM_VHT_SGIMASK,
  5801. /** VHT80 Auto Rate MASK */
  5802. WMI_VDEV_PARAM_VHT80_RATEMASK,
  5803. /** set Proxy STA features for this vap */
  5804. WMI_VDEV_PARAM_PROXY_STA,
  5805. /** set virtual cell mode - enable/disable */
  5806. WMI_VDEV_PARAM_VIRTUAL_CELL_MODE,
  5807. /** Set receive packet type */
  5808. WMI_VDEV_PARAM_RX_DECAP_TYPE,
  5809. /** Set ratemask with specific Bandwidth and NSS */
  5810. WMI_VDEV_PARAM_BW_NSS_RATEMASK,
  5811. /** Set SENSOR Support */
  5812. WMI_VDEV_PARAM_SENSOR_AP,
  5813. /** Set beacon rate */
  5814. WMI_VDEV_PARAM_BEACON_RATE,
  5815. /** Enable CTS to self for DTIM beacon */
  5816. WMI_VDEV_PARAM_DTIM_ENABLE_CTS,
  5817. /** Disable station kickout at Vap level */
  5818. WMI_VDEV_PARAM_STA_KICKOUT,
  5819. /* VDEV capabilities */
  5820. WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */
  5821. /*
  5822. * Increment TSF in micro seconds to avoid beacon collision on mesh VAP
  5823. * The host must ensure that either no other vdevs share the TSF with
  5824. * this vdev, or else that it is acceptable to apply this TSF adjustment
  5825. * to all vdevs sharing the TSF
  5826. */
  5827. WMI_VDEV_PARAM_TSF_INCREMENT,
  5828. WMI_VDEV_PARAM_PLACE_HOLDER_1,
  5829. /*
  5830. * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
  5831. * Used mainly for mesh-vap.
  5832. * The parameter value delivered with the RX_FILTER vdev param contains
  5833. * a bit-or mask of wmi_vdev_param_filter enum values.
  5834. */
  5835. WMI_VDEV_PARAM_RX_FILTER,
  5836. /* vdev-specific mgmt tx power in dBm units (signed integer value) */
  5837. WMI_VDEV_PARAM_MGMT_TX_POWER,
  5838. /*
  5839. * Vdev level non aggregration/11g sw retry threshold.
  5840. * 0-disable, min:0, max:31, default:15
  5841. */
  5842. WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH,
  5843. /*
  5844. * Vdev level aggregration sw retry threshold.
  5845. * 0-disable, min:0, max:31, default:15
  5846. */
  5847. WMI_VDEV_PARAM_AGG_SW_RETRY_TH,
  5848. /** disable dynamic bw RTS **/
  5849. WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS,
  5850. /*
  5851. * Per ssid (vdev) based ATF strict/fair scheduling policy
  5852. * Param values are WMI_ATF_SSID_FAIR_SCHED or
  5853. * WMI_ATF_SSID_STRICT_SCHED
  5854. */
  5855. WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY,
  5856. /** Enable or disable Dual carrier modulation
  5857. * valid values: 0-Disable DCM, 1-Enable DCM.
  5858. */
  5859. WMI_VDEV_PARAM_HE_DCM,
  5860. /** Enable or disable Extended range
  5861. * valid values: 0-Disable ER, 1-Enable ER.
  5862. */
  5863. WMI_VDEV_PARAM_HE_RANGE_EXT,
  5864. /*
  5865. * === ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
  5866. * The below vdev param types are used for prototyping, and are
  5867. * prone to change.
  5868. */
  5869. WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
  5870. /* 11AX SPECIFIC defines */
  5871. WMI_VDEV_PARAM_BSS_COLOR,
  5872. /*
  5873. * Enable / disable trigger access for a AP vdev's peers.
  5874. * For a STA mode vdev this will enable/disable triggered access
  5875. * and enable/disable Multi User mode of operation.
  5876. * 0 - Disable MU OFDMA and MU MIMO
  5877. * 1 - Disable DL OFDMA
  5878. * 2 - Disable DL MUMIMO
  5879. * 3 - Disable UL OFDMA
  5880. * 4 - Disable UL MUMIMO
  5881. * 5 - Enable MU OFDMA and MU MIMO
  5882. * 6 - Enable DL OFDMA
  5883. * 7 - Enable DL MUMIMO
  5884. * 8 - Enable UL OFDMA
  5885. * 9 - Enable UL MUMIMO
  5886. */
  5887. WMI_VDEV_PARAM_SET_HEMU_MODE,
  5888. /*
  5889. * For Tx OFDMA this will set values of CP length or guard interval
  5890. * to be
  5891. * 0: Auto
  5892. * 1: 0.8 us
  5893. * 2: 1.6 us
  5894. * 3: 3.2 us
  5895. * Similar to Guard Interval
  5896. */
  5897. WMI_VDEV_PARAM_TX_OFDMA_CPLEN,
  5898. /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
  5899. } WMI_VDEV_PARAM;
  5900. /* vdev capabilities bit mask */
  5901. #define WMI_VDEV_BEACON_SUPPORT 0x1
  5902. #define WMI_VDEV_WDS_LRN_ENABLED 0x2
  5903. #define WMI_VDEV_VOW_ENABLED 0x4
  5904. #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
  5905. #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
  5906. #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
  5907. /* TXBF capabilities masks */
  5908. #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
  5909. #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
  5910. #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << \
  5911. WMI_TXBF_CONF_SU_TX_BFEE_S)
  5912. #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFEE)
  5913. #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z,\
  5914. WMI_TXBF_CONF_SU_TX_BFEE)
  5915. #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
  5916. #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
  5917. #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << \
  5918. WMI_TXBF_CONF_MU_TX_BFEE_S)
  5919. #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFEE)
  5920. #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z, \
  5921. WMI_TXBF_CONF_MU_TX_BFEE)
  5922. #define WMI_TXBF_CONF_SU_TX_BFER_S 2
  5923. #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
  5924. #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << \
  5925. WMI_TXBF_CONF_SU_TX_BFER_S)
  5926. #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFER)
  5927. #define WMI_TXBF_CONF_SU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
  5928. WMI_TXBF_CONF_SU_TX_BFER)
  5929. #define WMI_TXBF_CONF_MU_TX_BFER_S 3
  5930. #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
  5931. #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << \
  5932. WMI_TXBF_CONF_MU_TX_BFER_S)
  5933. #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFER)
  5934. #define WMI_TXBF_CONF_MU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
  5935. WMI_TXBF_CONF_MU_TX_BFER)
  5936. #define WMI_TXBF_CONF_STS_CAP_S 4
  5937. #define WMI_TXBF_CONF_STS_CAP_M 0x7
  5938. #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << \
  5939. WMI_TXBF_CONF_STS_CAP_S)
  5940. #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_STS_CAP);
  5941. #define WMI_TXBF_CONF_STS_CAP_SET(x, z) WMI_F_RMW(x, z, \
  5942. WMI_TXBF_CONF_STS_CAP)
  5943. #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
  5944. #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
  5945. #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << \
  5946. WMI_TXBF_CONF_IMPLICIT_BF_S)
  5947. #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_IMPLICIT_BF)
  5948. #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x, z) WMI_F_RMW(x, z, \
  5949. WMI_TXBF_CONF_IMPLICIT_BF)
  5950. #define WMI_TXBF_CONF_BF_SND_DIM_S 8
  5951. #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
  5952. #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << \
  5953. WMI_TXBF_CONF_BF_SND_DIM_S)
  5954. #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_BF_SND_DIM)
  5955. #define WMI_TXBF_CONF_BF_SND_DIM_SET(x, z) WMI_F_RMW(x, z, \
  5956. WMI_TXBF_CONF_BF_SND_DIM)
  5957. /* TXBF capabilities */
  5958. typedef struct {
  5959. A_UINT32 txbf_cap;
  5960. } wmi_vdev_txbf_cap;
  5961. /* vdev rx filters (for mesh) */
  5962. typedef enum {
  5963. /* Don't drop any frames - Default */
  5964. WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0,
  5965. /* Drop FromDS frames */
  5966. WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1,
  5967. /* Drop ToDS frames */
  5968. WMI_VDEV_RX_FILTER_OUT_TODS = 0x2,
  5969. /* Drop NODS frames */
  5970. WMI_VDEV_RX_FILTER_OUT_NODS = 0x4,
  5971. /* Drop RA frames */
  5972. WMI_VDEV_RX_FILTER_OUT_RA = 0x8,
  5973. /* Drop TA frames */
  5974. WMI_VDEV_RX_FILTER_OUT_TA = 0x10,
  5975. } wmi_vdev_param_filter;
  5976. /* Length of ATIM Window in TU */
  5977. #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
  5978. enum wmi_pkt_type {
  5979. WMI_PKT_TYPE_RAW = 0,
  5980. WMI_PKT_TYPE_NATIVE_WIFI = 1,
  5981. WMI_PKT_TYPE_ETHERNET = 2,
  5982. };
  5983. /*******************************************************************
  5984. * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
  5985. * Do not use it!
  5986. *******************************************************************/
  5987. typedef struct {
  5988. A_UINT8 sutxbfee:1, mutxbfee:1, sutxbfer:1, mutxbfer:1,
  5989. #if defined(AR900B)
  5990. txb_sts_cap:3, implicit_bf:1;
  5991. #else
  5992. reserved:4;
  5993. #endif
  5994. } wmi_vdev_txbf_en;
  5995. /** Upto 8 bits are available for Roaming module to be sent along with
  5996. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
  5997. /* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
  5998. #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
  5999. /* Enable Roaming module in FW to do scan based on Final BMISS */
  6000. #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
  6001. /** slot time long */
  6002. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  6003. /** slot time short */
  6004. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  6005. /** preablbe long */
  6006. #define WMI_VDEV_PREAMBLE_LONG 0x1
  6007. /** preablbe short */
  6008. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  6009. /** the definition of different START/RESTART Event response */
  6010. typedef enum {
  6011. /* Event respose of START CMD */
  6012. WMI_VDEV_START_RESP_EVENT = 0,
  6013. /* Event respose of RESTART CMD */
  6014. WMI_VDEV_RESTART_RESP_EVENT,
  6015. } WMI_START_EVENT_PARAM;
  6016. typedef struct {
  6017. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
  6018. /** unique id identifying the VDEV, generated by the caller */
  6019. A_UINT32 vdev_id;
  6020. /** requestor id that requested the VDEV start request */
  6021. A_UINT32 requestor_id;
  6022. /* Respose of Event type START/RESTART */
  6023. WMI_START_EVENT_PARAM resp_type;
  6024. /** status of the response */
  6025. A_UINT32 status;
  6026. /** Vdev chain mask */
  6027. A_UINT32 chain_mask;
  6028. /** Vdev mimo power save mode */
  6029. A_UINT32 smps_mode;
  6030. union {
  6031. /* OBSOLETE - will be removed once all refs are gone */
  6032. A_UINT32 mac_id;
  6033. /** pdev_id for identifying the MAC
  6034. * See macros starting with WMI_PDEV_ID_ for values.
  6035. */
  6036. A_UINT32 pdev_id;
  6037. };
  6038. /** Configured Transmit Streams **/
  6039. A_UINT32 cfgd_tx_streams;
  6040. /** Configured Receive Streams **/
  6041. A_UINT32 cfgd_rx_streams;
  6042. } wmi_vdev_start_response_event_fixed_param;
  6043. typedef struct {
  6044. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
  6045. /** unique id identifying the VDEV, generated by the caller */
  6046. A_UINT32 vdev_id;
  6047. } wmi_vdev_stopped_event_fixed_param;
  6048. typedef struct {
  6049. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
  6050. /** unique id identifying the VDEV, generated by the caller */
  6051. A_UINT32 vdev_id;
  6052. } wmi_vdev_delete_resp_event_fixed_param;
  6053. /** common structure used for simple events (stopped, resume_req, standby response) */
  6054. typedef struct {
  6055. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
  6056. /** unique id identifying the VDEV, generated by the caller */
  6057. A_UINT32 vdev_id;
  6058. } wmi_vdev_simple_event_fixed_param;
  6059. /** VDEV start response status codes */
  6060. #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
  6061. #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
  6062. #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
  6063. /** Beacon processing related command and event structures */
  6064. typedef struct {
  6065. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
  6066. /** unique id identifying the VDEV, generated by the caller */
  6067. A_UINT32 vdev_id;
  6068. /** xmit rate */
  6069. A_UINT32 tx_rate;
  6070. /** xmit power */
  6071. A_UINT32 txPower;
  6072. /** beacon buffer length in bytes */
  6073. A_UINT32 buf_len;
  6074. /* This TLV is followed by array of bytes:
  6075. * // beacon frame buffer
  6076. * A_UINT8 bufp[];
  6077. */
  6078. } wmi_bcn_tx_hdr;
  6079. /* Beacon filter */
  6080. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  6081. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  6082. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  6083. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  6084. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  6085. typedef struct {
  6086. /** Filter ID */
  6087. A_UINT32 bcn_filter_id;
  6088. /** Filter type - wmi_bcn_filter */
  6089. A_UINT32 bcn_filter;
  6090. /** Buffer len */
  6091. A_UINT32 bcn_filter_len;
  6092. /** Filter info (threshold, BSSID, RSSI) */
  6093. A_UINT8 *bcn_filter_buf;
  6094. } wmi_bcn_filter_rx_cmd;
  6095. /** Capabilities and IEs to be passed to firmware */
  6096. typedef struct {
  6097. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
  6098. /** Capabilities */
  6099. A_UINT32 caps;
  6100. /** ERP info */
  6101. A_UINT32 erp;
  6102. /** Advanced capabilities */
  6103. /** HT capabilities */
  6104. /** HT Info */
  6105. /** ibss_dfs */
  6106. /** wpa Info */
  6107. /** rsn Info */
  6108. /** rrm info */
  6109. /** ath_ext */
  6110. /** app IE */
  6111. } wmi_bcn_prb_info;
  6112. typedef struct {
  6113. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
  6114. /** unique id identifying the VDEV, generated by the caller */
  6115. A_UINT32 vdev_id;
  6116. /** TIM IE offset from the beginning of the template. */
  6117. A_UINT32 tim_ie_offset;
  6118. /** beacon buffer length. data is in TLV data[] */
  6119. A_UINT32 buf_len;
  6120. /*
  6121. * The TLVs follows:
  6122. * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
  6123. * A_UINT8 data[]; //Variable length data
  6124. */
  6125. } wmi_bcn_tmpl_cmd_fixed_param;
  6126. typedef struct {
  6127. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
  6128. /** unique id identifying the VDEV, generated by the caller */
  6129. A_UINT32 vdev_id;
  6130. /** beacon buffer length. data is in TLV data[] */
  6131. A_UINT32 buf_len;
  6132. /*
  6133. * The TLVs follows:
  6134. * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
  6135. * A_UINT8 data[]; //Variable length data
  6136. */
  6137. } wmi_prb_tmpl_cmd_fixed_param;
  6138. typedef struct {
  6139. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
  6140. A_UINT32 tlv_header;
  6141. /** unique id identifying the VDEV */
  6142. A_UINT32 vdev_id;
  6143. /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
  6144. A_UINT32 tx_status;
  6145. } wmi_offload_bcn_tx_status_event_fixed_param;
  6146. enum wmi_sta_ps_mode {
  6147. /** enable power save for the given STA VDEV */
  6148. WMI_STA_PS_MODE_DISABLED = 0,
  6149. /** disable power save for a given STA VDEV */
  6150. WMI_STA_PS_MODE_ENABLED = 1,
  6151. };
  6152. typedef struct {
  6153. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
  6154. /** unique id identifying the VDEV, generated by the caller */
  6155. A_UINT32 vdev_id;
  6156. /** Power save mode
  6157. *
  6158. * (see enum wmi_sta_ps_mode)
  6159. */
  6160. A_UINT32 sta_ps_mode;
  6161. } wmi_sta_powersave_mode_cmd_fixed_param;
  6162. enum wmi_csa_offload_en {
  6163. WMI_CSA_OFFLOAD_DISABLE = 0,
  6164. WMI_CSA_OFFLOAD_ENABLE = 1,
  6165. };
  6166. typedef struct {
  6167. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
  6168. A_UINT32 vdev_id;
  6169. A_UINT32 csa_offload_enable;
  6170. } wmi_csa_offload_enable_cmd_fixed_param;
  6171. typedef struct {
  6172. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
  6173. A_UINT32 vdev_id;
  6174. /*
  6175. * The TLVs follows:
  6176. * wmi_channel chan;
  6177. */
  6178. } wmi_csa_offload_chanswitch_cmd_fixed_param;
  6179. /**
  6180. * This parameter controls the policy for retrieving frames from AP while the
  6181. * STA is in sleep state.
  6182. *
  6183. * Only takes affect if the sta_ps_mode is enabled
  6184. */
  6185. enum wmi_sta_ps_param_rx_wake_policy {
  6186. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  6187. * the Power save SM(state machine) will come out of sleep by either
  6188. * sending null frame (or) a data frame (with PS==0) in response to TIM
  6189. * bit set in the received beacon frame from AP.
  6190. */
  6191. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  6192. /* Here the power save state machine will not wakeup in response to TIM
  6193. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  6194. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  6195. * access categories are delivery-enabled, the station will send a UAPSD
  6196. * trigger frame, otherwise it will send a PS-Poll.
  6197. */
  6198. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  6199. };
  6200. /** Number of tx frames/beacon that cause the power save SM to wake up.
  6201. *
  6202. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  6203. * meaning, It will cause the SM to never wake up. This is useful if you want
  6204. * to keep the system to sleep all the time for some kind of test mode . host
  6205. * can change this parameter any time. It will affect at the next tx frame.
  6206. */
  6207. enum wmi_sta_ps_param_tx_wake_threshold {
  6208. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  6209. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  6210. /* Values greater than one indicate that many TX attempts per beacon
  6211. * interval before the STA will wake up
  6212. */
  6213. };
  6214. /**
  6215. * The maximum number of PS-Poll frames the FW will send in response to
  6216. * traffic advertised in TIM before waking up (by sending a null frame with PS
  6217. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  6218. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  6219. * parameter is used when the RX wake policy is
  6220. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  6221. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  6222. */
  6223. enum wmi_sta_ps_param_pspoll_count {
  6224. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  6225. /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
  6226. * will send before waking up.
  6227. */
  6228. };
  6229. /*
  6230. * This will include the delivery and trigger enabled state for every AC.
  6231. * This is the negotiated state with AP. The host MLME needs to set this based
  6232. * on AP capability and the state Set in the association request by the
  6233. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  6234. */
  6235. #define WMI_UAPSD_AC_TYPE_DELI 0
  6236. #define WMI_UAPSD_AC_TYPE_TRIG 1
  6237. #define WMI_UAPSD_AC_BIT_MASK(ac, type) \
  6238. do { \
  6239. (type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : \
  6240. (1<<((ac<<1)+1)) \
  6241. } while (0)
  6242. enum wmi_sta_ps_param_uapsd {
  6243. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  6244. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  6245. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  6246. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  6247. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  6248. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  6249. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  6250. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  6251. };
  6252. enum wmi_sta_powersave_param {
  6253. /**
  6254. * Controls how frames are retrievd from AP while STA is sleeping
  6255. *
  6256. * (see enum wmi_sta_ps_param_rx_wake_policy)
  6257. */
  6258. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  6259. /**
  6260. * The STA will go active after this many TX
  6261. *
  6262. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  6263. */
  6264. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  6265. /**
  6266. * Number of PS-Poll to send before STA wakes up
  6267. *
  6268. * (see enum wmi_sta_ps_param_pspoll_count)
  6269. *
  6270. */
  6271. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  6272. /**
  6273. * TX/RX inactivity time in msec before going to sleep.
  6274. *
  6275. * The power save SM will monitor tx/rx activity on the VDEV, if no
  6276. * activity for the specified msec of the parameter the Power save SM will
  6277. * go to sleep.
  6278. */
  6279. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  6280. /**
  6281. * Set uapsd configuration.
  6282. *
  6283. * (see enum wmi_sta_ps_param_uapsd)
  6284. */
  6285. WMI_STA_PS_PARAM_UAPSD = 4,
  6286. /**
  6287. * Number of PS-Poll to send before STA wakes up in QPower Mode
  6288. */
  6289. WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
  6290. /**
  6291. * Enable QPower
  6292. */
  6293. WMI_STA_PS_ENABLE_QPOWER = 6,
  6294. /**
  6295. * Number of TX frames before the entering the Active state
  6296. */
  6297. WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
  6298. /**
  6299. * QPower SPEC PSPOLL interval
  6300. */
  6301. WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
  6302. /**
  6303. * Max SPEC PSPOLL to be sent when the PSPOLL response has
  6304. * no-data bit set
  6305. */
  6306. WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
  6307. };
  6308. typedef struct {
  6309. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
  6310. /** unique id identifying the VDEV, generated by the caller */
  6311. A_UINT32 vdev_id;
  6312. /** station power save parameter (see enum wmi_sta_powersave_param) */
  6313. A_UINT32 param;
  6314. A_UINT32 value;
  6315. } wmi_sta_powersave_param_cmd_fixed_param;
  6316. /** No MIMO power save */
  6317. #define WMI_STA_MIMO_PS_MODE_DISABLE
  6318. /** mimo powersave mode static*/
  6319. #define WMI_STA_MIMO_PS_MODE_STATIC
  6320. /** mimo powersave mode dynamic */
  6321. #define WMI_STA_MIMO_PS_MODE_DYNAMI
  6322. typedef struct {
  6323. /** unique id identifying the VDEV, generated by the caller */
  6324. A_UINT32 vdev_id;
  6325. /** mimo powersave mode as defined above */
  6326. A_UINT32 mimo_pwrsave_mode;
  6327. } wmi_sta_mimo_ps_mode_cmd;
  6328. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  6329. enum wmi_ap_ps_param_uapsd {
  6330. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  6331. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  6332. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  6333. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  6334. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  6335. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  6336. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  6337. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  6338. };
  6339. /** U-APSD maximum service period of peer station */
  6340. enum wmi_ap_ps_peer_param_max_sp {
  6341. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  6342. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  6343. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  6344. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  6345. /* keep last! */
  6346. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  6347. };
  6348. /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
  6349. enum wmi_ap_ps_param_sifs_resp_frmtype {
  6350. WMI_SIFS_RESP_PSPOLL = (1 << 0),
  6351. WMI_SIFS_RESP_UAPSD = (1 << 1),
  6352. WMI_SIFS_RESP_QBST_EXP = (1 << 2),
  6353. WMI_SIFS_RESP_QBST_DATA = (1 << 3),
  6354. WMI_SIFS_RESP_QBST_BAR = (1 << 4),
  6355. };
  6356. /**
  6357. * AP power save parameter
  6358. * Set a power save specific parameter for a peer station
  6359. */
  6360. enum wmi_ap_ps_peer_param {
  6361. /** Set uapsd configuration for a given peer.
  6362. *
  6363. * This will include the delivery and trigger enabled state for every AC.
  6364. * The host MLME needs to set this based on AP capability and stations
  6365. * request Set in the association request received from the station.
  6366. *
  6367. * Lower 8 bits of the value specify the UAPSD configuration.
  6368. *
  6369. * (see enum wmi_ap_ps_param_uapsd)
  6370. * The default value is 0.
  6371. */
  6372. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  6373. /**
  6374. * Set the service period for a UAPSD capable station
  6375. *
  6376. * The service period from wme ie in the (re)assoc request frame.
  6377. *
  6378. * (see enum wmi_ap_ps_peer_param_max_sp)
  6379. */
  6380. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  6381. /** Time in seconds for aging out buffered frames for STA in power save */
  6382. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  6383. /**
  6384. * Specify frame types that are considered SIFS RESP trigger frame
  6385. * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
  6386. */
  6387. WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  6388. /*
  6389. * Specifies the trigger state of TID.
  6390. * Valid only for UAPSD frame type
  6391. */
  6392. WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  6393. /** Specifies the WNM sleep state of a STA */
  6394. WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  6395. };
  6396. typedef struct {
  6397. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
  6398. /** unique id identifying the VDEV, generated by the caller */
  6399. A_UINT32 vdev_id;
  6400. /** peer MAC address */
  6401. wmi_mac_addr peer_macaddr;
  6402. /** AP powersave param (see enum wmi_ap_ps_peer_param) */
  6403. A_UINT32 param;
  6404. /** AP powersave param value (see defines) */
  6405. A_UINT32 value;
  6406. } wmi_ap_ps_peer_cmd_fixed_param;
  6407. /** Configure peer station 11v U-APSD coexistance
  6408. *
  6409. * Two parameters from uaspd coexistence ie info (as specified in 11v) are
  6410. * sent down to FW along with this command.
  6411. *
  6412. * The semantics of these fields are described in the following text extracted
  6413. * from 802.11v.
  6414. *
  6415. * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
  6416. * U-APSD Coexistence element, the AP should not transmit frames to the
  6417. * non-AP STA outside of the U-APSD Coexistence Service Period, which
  6418. * begins when the AP receives the U-APSD trigger frame and ends after
  6419. * the transmission period specified by the result of the following
  6420. * calculation:
  6421. *
  6422. * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
  6423. *
  6424. * Where T is the time the U-APSD trigger frame was received at the AP
  6425. * Interval is the UAPSD Coexistence element Duration/Interval field
  6426. * value (see 7.3.2.91) or upon the successful transmission of a frame
  6427. * with EOSP bit set to 1, whichever is earlier.
  6428. *
  6429. *
  6430. * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
  6431. * Coexistence element, the AP should not transmit frames to the non-AP
  6432. * STA outside of the U-APSD Coexistence Service Period, which begins
  6433. * when the AP receives a U-APSD trigger frame and ends after the
  6434. * transmission period specified by the result of the following
  6435. * calculation: End of transmission period = T + Duration
  6436. */
  6437. typedef struct {
  6438. /** unique id identifying the VDEV, generated by the caller */
  6439. A_UINT32 vdev_id;
  6440. /** peer MAC address */
  6441. wmi_mac_addr peer_macaddr;
  6442. /** Enable U-APSD coexistence support for this peer
  6443. *
  6444. * 0 -> disabled (default)
  6445. * 1 -> enabled
  6446. */
  6447. A_UINT32 enabled;
  6448. /** Duration/Interval as defined by 11v U-ASPD coexistance */
  6449. A_UINT32 duration_interval;
  6450. /** Upper 32 bits of 64-bit TSF offset */
  6451. A_UINT32 tsf_offset_high;
  6452. /** Lower 32 bits of 64-bit TSF offset */
  6453. A_UINT32 tsf_offset_low;
  6454. } wmi_ap_powersave_peer_uapsd_coex_cmd;
  6455. typedef enum {
  6456. WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
  6457. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
  6458. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
  6459. WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
  6460. } wmi_ap_ps_egap_flag_type;
  6461. /**
  6462. * configure ehanced green ap parameters
  6463. */
  6464. typedef struct {
  6465. /*
  6466. * TLV tag and len; tag equals
  6467. * wmi_ap_powersave_egap_param_cmd_fixed_param
  6468. */
  6469. A_UINT32 tlv_header;
  6470. /** Enable enhanced green ap
  6471. * 0 -> disabled
  6472. * 1 -> enabled
  6473. */
  6474. A_UINT32 enable;
  6475. /** The param indicates a duration that all STAs connected
  6476. * to S-AP have no traffic.
  6477. */
  6478. A_UINT32 inactivity_time; /* in unit of milliseconds */
  6479. /** The param indicates a duration that all STAs connected
  6480. * to S-AP have no traffic, after all STAs have entered powersave.
  6481. */
  6482. A_UINT32 wait_time; /* in unit of milliseconds */
  6483. /** The param is used to turn on/off some functions within E-GAP.
  6484. */
  6485. A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
  6486. } wmi_ap_ps_egap_param_cmd_fixed_param;
  6487. typedef enum {
  6488. WMI_AP_PS_EGAP_STATUS_IDLE = 1,
  6489. WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
  6490. WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
  6491. WMI_AP_PS_EGAP_STATUS_MAX = 15
  6492. } wmi_ap_ps_egap_status_type;
  6493. /**
  6494. * send ehanced green ap status to host
  6495. */
  6496. typedef struct {
  6497. /* TLV tag and len; tag equals
  6498. * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list
  6499. */
  6500. A_UINT32 tlv_header;
  6501. union {
  6502. /* OBSOLETE - will be removed once all refs are gone */
  6503. A_UINT32 mac_id;
  6504. /** pdev_id for identifying the MAC
  6505. * See macros starting with WMI_PDEV_ID_ for values.
  6506. */
  6507. A_UINT32 pdev_id;
  6508. };
  6509. /** The param indicates the current tx chainmask with the mac id. */
  6510. A_UINT32 tx_chainmask;
  6511. /** The param indicates the current rx chainmask with the mac id. */
  6512. A_UINT32 rx_chainmask;
  6513. } wmi_ap_ps_egap_info_chainmask_list;
  6514. typedef struct {
  6515. /*
  6516. * TLV tag and len; tag equals
  6517. * wmi_ap_powersave_egap_param_cmd_fixed_param
  6518. */
  6519. A_UINT32 tlv_header;
  6520. /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
  6521. A_UINT32 status;
  6522. /* This TLV is followed by
  6523. * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
  6524. */
  6525. } wmi_ap_ps_egap_info_event_fixed_param;
  6526. /* 128 clients = 4 words */
  6527. /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
  6528. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  6529. typedef struct {
  6530. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  6531. /** TIM bitmap len (in bytes) */
  6532. A_UINT32 tim_len;
  6533. /** TIM Partial Virtual Bitmap */
  6534. A_UINT32 tim_mcast;
  6535. A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  6536. A_UINT32 tim_changed;
  6537. A_UINT32 tim_num_ps_pending;
  6538. /** Use the vdev_id only if vdev_id_valid is set */
  6539. A_UINT32 vdev_id_valid;
  6540. /** unique id identifying the VDEV */
  6541. A_UINT32 vdev_id;
  6542. } wmi_tim_info;
  6543. typedef struct {
  6544. /** Flag to enable quiet period IE support */
  6545. A_UINT32 is_enabled;
  6546. /** Quiet start */
  6547. A_UINT32 tbttcount;
  6548. /** Beacon intervals between quiets*/
  6549. A_UINT32 period;
  6550. /** TUs of each quiet*/
  6551. A_UINT32 duration;
  6552. /** TUs of from TBTT of quiet start*/
  6553. A_UINT32 offset;
  6554. } wmi_quiet_info;
  6555. /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
  6556. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
  6557. typedef struct {
  6558. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
  6559. /** Bit 0: Flag to indicate an update in NOA schedule
  6560. * Bits 7-1: Reserved
  6561. * Bits 15-8: Index (identifies the instance of NOA sub element)
  6562. * Bit 16: Opp PS state of the AP
  6563. * Bits 23-17: Ctwindow in TUs
  6564. * Bits 31-24: Number of NOA descriptors
  6565. */
  6566. A_UINT32 noa_attributes;
  6567. wmi_p2p_noa_descriptor
  6568. noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  6569. /** Use the vdev_id only if vdev_id_valid is set */
  6570. A_UINT32 vdev_id_valid;
  6571. /** unique id identifying the VDEV */
  6572. A_UINT32 vdev_id;
  6573. } wmi_p2p_noa_info;
  6574. #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
  6575. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
  6576. #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
  6577. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
  6578. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
  6579. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  6580. WMI_UNIFIED_NOA_ATTR_MODIFIED);
  6581. #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
  6582. #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
  6583. #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
  6584. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
  6585. #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
  6586. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  6587. WMI_UNIFIED_NOA_ATTR_INDEX);
  6588. #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
  6589. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
  6590. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
  6591. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
  6592. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
  6593. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  6594. WMI_UNIFIED_NOA_ATTR_OPP_PS);
  6595. #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
  6596. #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
  6597. #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
  6598. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
  6599. #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
  6600. WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
  6601. WMI_UNIFIED_NOA_ATTR_CTWIN);
  6602. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
  6603. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
  6604. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
  6605. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
  6606. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
  6607. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  6608. WMI_UNIFIED_NOA_ATTR_NUM_DESC);
  6609. typedef struct {
  6610. /** TIM info */
  6611. wmi_tim_info tim_info;
  6612. /** P2P NOA info */
  6613. wmi_p2p_noa_info p2p_noa_info;
  6614. /* TBD: More info elements to be added later */
  6615. } wmi_bcn_info;
  6616. typedef struct {
  6617. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
  6618. /** bitmap identifying the VDEVs, generated by the caller */
  6619. A_UINT32 vdev_map;
  6620. /** how many vdev's info is included in this message
  6621. * If this field is zero, then the number of vdevs is specified by
  6622. * the number of bits set in the vdev_map bitmap.
  6623. */
  6624. A_UINT32 num_vdevs;
  6625. /* This TLV is followed by tim_info and p2p_noa_info for each vdev:
  6626. * wmi_tim_info tim_info[];
  6627. * wmi_p2p_noa_info p2p_noa_info[];
  6628. *
  6629. */
  6630. } wmi_host_swba_event_fixed_param;
  6631. #define WMI_MAX_AP_VDEV 16
  6632. typedef struct {
  6633. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
  6634. /** bimtap of VDEVs that has tbtt offset updated */
  6635. A_UINT32 vdev_map;
  6636. /* The TLVs for tbttoffset_list will follow this TLV.
  6637. * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
  6638. * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
  6639. */
  6640. } wmi_tbtt_offset_event_fixed_param;
  6641. typedef struct {
  6642. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
  6643. A_UINT32 tlv_header;
  6644. /** unique id identifying the VDEV */
  6645. A_UINT32 vdev_id;
  6646. /** tbttoffset in TUs */
  6647. A_UINT32 tbttoffset;
  6648. } wmi_tbtt_offset_info;
  6649. /** Use this event if number of vdevs > 32 */
  6650. typedef struct {
  6651. /*
  6652. * TLV tag and len;
  6653. * tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param
  6654. */
  6655. A_UINT32 tlv_header;
  6656. A_UINT32 num_vdevs;
  6657. /*
  6658. * The TLVs for tbttoffset will follow this TLV.
  6659. * Of size num_vdevs * wmi_tbtt_offset_info
  6660. */
  6661. } wmi_tbtt_offset_ext_event_fixed_param;
  6662. /* Peer Specific commands and events */
  6663. typedef struct {
  6664. A_UINT32 percentage; /* in unit of 12.5% */
  6665. A_UINT32 min_delta; /* in unit of Mbps */
  6666. } rate_delta_t;
  6667. #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
  6668. #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
  6669. #define MAX_NUM_OF_RATE_THRESH 4
  6670. typedef struct {
  6671. /*
  6672. * PEER_RATE_REPORT_COND_FLAG_DELTA,
  6673. * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  6674. * Any of these two conditions or both of
  6675. * them can be set.
  6676. */
  6677. A_UINT32 val_cond_flags;
  6678. rate_delta_t rate_delta;
  6679. /*
  6680. * In unit of Mbps. There are at most 4 thresholds
  6681. * If the threshold count is less than 4, set zero to
  6682. * the one following the last threshold
  6683. */
  6684. A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH];
  6685. } report_cond_per_phy_t;
  6686. enum peer_rate_report_cond_phy_type {
  6687. PEER_RATE_REPORT_COND_11B = 0,
  6688. PEER_RATE_REPORT_COND_11A_G,
  6689. PEER_RATE_REPORT_COND_11N,
  6690. PEER_RATE_REPORT_COND_11AC,
  6691. PEER_RATE_REPORT_COND_MAX_NUM
  6692. };
  6693. typedef struct {
  6694. /*
  6695. * TLV tag and len; tag equals
  6696. * WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param
  6697. */
  6698. A_UINT32 tlv_header;
  6699. /* 1= enable, 0=disable */
  6700. A_UINT32 enable_rate_report;
  6701. A_UINT32 report_backoff_time; /* in unit of msecond */
  6702. A_UINT32 report_timer_period; /* in unit of msecond */
  6703. /*
  6704. *In the following field, the array index means the phy type,
  6705. * please see enum peer_rate_report_cond_phy_type for detail
  6706. */
  6707. report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
  6708. } wmi_peer_set_rate_report_condition_fixed_param;
  6709. /* Peer Type:
  6710. * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
  6711. * on address and vdev opmode. This is largely here to allow host to indicate that
  6712. * peer is explicitly a TDLS peer
  6713. */
  6714. enum wmi_peer_type {
  6715. WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
  6716. WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
  6717. WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
  6718. WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
  6719. WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
  6720. WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type
  6721. * is assigned up to 127 */
  6722. /* Reserved from 128 - 255 for
  6723. * target internal use.*/
  6724. WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
  6725. };
  6726. typedef struct {
  6727. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
  6728. /** unique id identifying the VDEV, generated by the caller */
  6729. A_UINT32 vdev_id;
  6730. /** peer MAC address */
  6731. wmi_mac_addr peer_macaddr;
  6732. /** peer type: see enum values above */
  6733. A_UINT32 peer_type;
  6734. } wmi_peer_create_cmd_fixed_param;
  6735. typedef struct {
  6736. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
  6737. /** unique id identifying the VDEV, generated by the caller */
  6738. A_UINT32 vdev_id;
  6739. /** peer MAC address */
  6740. wmi_mac_addr peer_macaddr;
  6741. } wmi_peer_delete_cmd_fixed_param;
  6742. typedef struct {
  6743. /**
  6744. * TLV tag and len; tag equals
  6745. * WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param
  6746. */
  6747. A_UINT32 tlv_header;
  6748. /** unique id identifying the VDEV, generated by the caller */
  6749. A_UINT32 vdev_id;
  6750. /** peer MAC address */
  6751. wmi_mac_addr peer_macaddr;
  6752. /**
  6753. * maximum block ack window size to use during a rx block ack
  6754. * negotiation, i.e. the maximum number of MPDUs per A-MPDU
  6755. * that will be received
  6756. */
  6757. A_UINT32 rx_block_ack_win_limit;
  6758. } wmi_peer_set_rx_blocksize_cmd_fixed_param;
  6759. typedef struct {
  6760. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
  6761. /** unique id identifying the VDEV, generated by the caller */
  6762. A_UINT32 vdev_id;
  6763. /** peer MAC address */
  6764. wmi_mac_addr peer_macaddr;
  6765. /** tid bitmap identifying the tids to flush */
  6766. A_UINT32 peer_tid_bitmap;
  6767. } wmi_peer_flush_tids_cmd_fixed_param;
  6768. typedef struct {
  6769. /** rate mode . 0: disable fixed rate (auto rate)
  6770. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  6771. * 2: ht20 11n rate specified as mcs index
  6772. * 3: ht40 11n rate specified as mcs index
  6773. */
  6774. A_UINT32 rate_mode;
  6775. /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  6776. * and series 3 is stored at byte 3 (MSB) */
  6777. A_UINT32 rate_series;
  6778. /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
  6779. * and retry count for rate 3 is stored at byte 3 (MSB) */
  6780. A_UINT32 rate_retries;
  6781. } wmi_fixed_rate;
  6782. typedef struct {
  6783. /** unique id identifying the VDEV, generated by the caller */
  6784. A_UINT32 vdev_id;
  6785. /** peer MAC address */
  6786. wmi_mac_addr peer_macaddr;
  6787. /** fixed rate */
  6788. wmi_fixed_rate peer_fixed_rate;
  6789. } wmi_peer_fixed_rate_cmd;
  6790. #define WMI_MGMT_TID 17
  6791. typedef struct {
  6792. A_UINT32 tlv_header;
  6793. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
  6794. /** unique id identifying the VDEV, generated by the caller */
  6795. A_UINT32 vdev_id;
  6796. /** peer MAC address */
  6797. wmi_mac_addr peer_macaddr;
  6798. } wmi_addba_clear_resp_cmd_fixed_param;
  6799. typedef struct {
  6800. A_UINT32 tlv_header;
  6801. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
  6802. /** unique id identifying the VDEV, generated by the caller */
  6803. A_UINT32 vdev_id;
  6804. /** peer MAC address */
  6805. wmi_mac_addr peer_macaddr;
  6806. /** Tid number */
  6807. A_UINT32 tid;
  6808. /** Buffer/Window size*/
  6809. A_UINT32 buffersize;
  6810. } wmi_addba_send_cmd_fixed_param;
  6811. typedef struct {
  6812. A_UINT32 tlv_header;
  6813. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
  6814. /** unique id identifying the VDEV, generated by the caller */
  6815. A_UINT32 vdev_id;
  6816. /** peer MAC address */
  6817. wmi_mac_addr peer_macaddr;
  6818. /** Tid number */
  6819. A_UINT32 tid;
  6820. /** Is Initiator */
  6821. A_UINT32 initiator;
  6822. /** Reason code */
  6823. A_UINT32 reasoncode;
  6824. } wmi_delba_send_cmd_fixed_param;
  6825. typedef struct {
  6826. A_UINT32 tlv_header;
  6827. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
  6828. /** unique id identifying the vdev, generated by the caller */
  6829. A_UINT32 vdev_id;
  6830. /** peer mac address */
  6831. wmi_mac_addr peer_macaddr;
  6832. /** Tid number */
  6833. A_UINT32 tid;
  6834. /** status code */
  6835. A_UINT32 statuscode;
  6836. } wmi_addba_setresponse_cmd_fixed_param;
  6837. typedef struct {
  6838. A_UINT32 tlv_header;
  6839. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
  6840. /** unique id identifying the vdev, generated by the caller */
  6841. A_UINT32 vdev_id;
  6842. /** peer mac address */
  6843. wmi_mac_addr peer_macaddr;
  6844. /** Tid number */
  6845. A_UINT32 tid;
  6846. } wmi_send_singleamsdu_cmd_fixed_param;
  6847. /* Type of Station DTIM Power Save method */
  6848. enum {
  6849. /* For NORMAL DTIM, the parameter is the number of beacon intervals and
  6850. * also the same value as the listen interval. For this method, the
  6851. * station will wake up based on the listen interval. If this
  6852. * listen interval is not equal to DTIM, then the station may
  6853. * miss certain DTIM beacons. If this value is 1, then the
  6854. * station will wake up for every beacon.
  6855. */
  6856. WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
  6857. /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
  6858. * When this value is 1, then the station will wake at every DTIM beacon.
  6859. * If this value is >1, then the station will skip certain DTIM beacons.
  6860. * This value is the multiple of DTIM intervals that the station will
  6861. * wake up to receive the DTIM beacons.
  6862. */
  6863. WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
  6864. };
  6865. /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
  6866. typedef struct {
  6867. A_UINT32 tlv_header;
  6868. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
  6869. /** unique id identifying the VDEV, generated by the caller */
  6870. A_UINT32 vdev_id;
  6871. /* Station DTIM Power Save method as defined above */
  6872. A_UINT32 dtim_pwrsave_method;
  6873. /* DTIM PS value. Contents depends on the method */
  6874. A_UINT32 value;
  6875. /* Modulated DTIM value */
  6876. A_UINT32 MaxLIModulatedDTIM;
  6877. } wmi_sta_dtim_ps_method_cmd_fixed_param;
  6878. /*
  6879. * For Station UAPSD Auto Trigger feature, the Firmware monitors the
  6880. * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
  6881. * If there is no uplink/download for the specified service interval (field service_interval),
  6882. * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
  6883. * specified in the UP (field user_priority).
  6884. * Firmware also monitors the responses for these QOS-NULL triggers.
  6885. * If the peer does not have any delivery frames, it will respond with
  6886. * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
  6887. * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
  6888. * are unused and should be set to 0.
  6889. * When service_interval is 0, then the firmware will not send any trigger frames. This is for
  6890. * certain host-based implementations that don't want this firmware offload.
  6891. * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
  6892. * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
  6893. * and rest of the AC default to 300 ms.
  6894. *
  6895. * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
  6896. * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
  6897. * the more advanced monitoring method.
  6898. * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
  6899. * suspend interval (field suspend_interval), firmware will change its auto trigger interval
  6900. * to delay interval (field delay_interval). This way, when there is no traffic, the station
  6901. * will save more power by waking up less and sending less trigger frames.
  6902. * The (service_interval < suspend_interval) and (service_interval < delay_interval).
  6903. * If this variable auto trigger is not required, then the suspend_interval and delay_interval
  6904. * should be 0.
  6905. */
  6906. typedef struct {
  6907. A_UINT32 tlv_header;
  6908. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
  6909. /** WMM Access category from 0 to 3 */
  6910. A_UINT32 wmm_ac;
  6911. /** User priority to use in trigger frames. It is the TID
  6912. * value. This field needs to be specified and may not be
  6913. * equivalent to AC since some implementation may use the TSPEC
  6914. * to enable UAPSD and negotiate a particular user priority. */
  6915. A_UINT32 user_priority;
  6916. /** service interval in ms */
  6917. A_UINT32 service_interval;
  6918. /** Suspend interval in ms */
  6919. A_UINT32 suspend_interval;
  6920. /** delay interval in ms */
  6921. A_UINT32 delay_interval;
  6922. } wmi_sta_uapsd_auto_trig_param;
  6923. typedef struct {
  6924. A_UINT32 tlv_header;
  6925. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
  6926. /** unique id identifying the VDEV, generated by the caller */
  6927. A_UINT32 vdev_id;
  6928. /** peer mac address */
  6929. wmi_mac_addr peer_macaddr;
  6930. /** Number of AC to specify */
  6931. A_UINT32 num_ac;
  6932. /*
  6933. * Following this struc is the TLV:
  6934. * wmi_sta_uapsd_auto_trig_param ac_param[]; //Variable number of AC parameters (defined by field num_ac)
  6935. */
  6936. } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
  6937. /** mimo powersave state */
  6938. #define WMI_PEER_MIMO_PS_STATE 0x1
  6939. /** enable/disable AMPDU . initial value (enabled) */
  6940. #define WMI_PEER_AMPDU 0x2
  6941. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  6942. #define WMI_PEER_AUTHORIZE 0x3
  6943. /** peer channel bandwidth */
  6944. #define WMI_PEER_CHWIDTH 0x4
  6945. /** peer NSS */
  6946. #define WMI_PEER_NSS 0x5
  6947. /** USE 4 ADDR */
  6948. #define WMI_PEER_USE_4ADDR 0x6
  6949. /* set group membership status */
  6950. #define WMI_PEER_MEMBERSHIP 0x7
  6951. #define WMI_PEER_USERPOS 0x8
  6952. /*
  6953. * A critical high-level protocol is being used with this peer. Target
  6954. * should take appropriate measures (if possible) to ensure more
  6955. * reliable link with minimal latency. This *may* include modifying the
  6956. * station power save policy, enabling more RX chains, increased
  6957. * priority of channel scheduling, etc.
  6958. *
  6959. * NOTE: This parameter should only be considered a hint as specific
  6960. * behavior will depend on many factors including current network load
  6961. * and vdev/peer configuration.
  6962. *
  6963. * For STA VDEV this peer corresponds to the AP's BSS peer.
  6964. * For AP VDEV this peer corresponds to the remote peer STA.
  6965. */
  6966. #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
  6967. /* set Tx failure count threshold for the peer - Currently unused */
  6968. #define WMI_PEER_TX_FAIL_CNT_THR 0xA
  6969. /* Enable H/W retry and Enable H/W Send CTS2S before Data */
  6970. #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
  6971. /* Set peer advertised IBSS atim window length */
  6972. #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
  6973. /** peer phy mode */
  6974. #define WMI_PEER_PHYMODE 0xD
  6975. /** Use FIXED Pwr */
  6976. #define WMI_PEER_USE_FIXED_PWR 0xE
  6977. /** Set peer fixed rate
  6978. * The top nibble is used to select which format to use for encoding
  6979. * the rate specification: 0xVXXXXXXX
  6980. * If V == 0b0000: format is same as before: 0x000000RR
  6981. * If V == 0b0001: format is: 0x1000RRRR.
  6982. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  6983. * The host shall use the new V1 format (and set V = 0x1) if the target
  6984. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  6985. * system is configured with Nss > 4 (either at compile time within the
  6986. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  6987. * by the target).
  6988. */
  6989. #define WMI_PEER_PARAM_FIXED_RATE 0xF
  6990. /** Whitelist peer TIDs */
  6991. #define WMI_PEER_SET_MU_WHITELIST 0x10
  6992. /** Set peer max tx rate (MCS) in adaptive rate ctrl */
  6993. #define WMI_PEER_SET_MAX_TX_RATE 0x11
  6994. /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
  6995. #define WMI_PEER_SET_MIN_TX_RATE 0x12
  6996. /**
  6997. * default ring routing for peer data packets,
  6998. * param_value = bit 0 for hash based routing enabled or not
  6999. * (value 1 is enabled, value 0 is disabled)
  7000. * bits 1:5 are for ring 32 (i.e. ring id value
  7001. * selected from 0 to 31 values)
  7002. */
  7003. #define WMI_PEER_SET_DEFAULT_ROUTING 0x13
  7004. /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
  7005. #define WMI_PEER_MIMO_PS_NONE 0x0
  7006. #define WMI_PEER_MIMO_PS_STATIC 0x1
  7007. #define WMI_PEER_MIMO_PS_DYNAMIC 0x2
  7008. typedef struct {
  7009. A_UINT32 tlv_header;
  7010. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
  7011. /** unique id identifying the VDEV, generated by the caller */
  7012. A_UINT32 vdev_id;
  7013. /** peer MAC address */
  7014. wmi_mac_addr peer_macaddr;
  7015. /** parameter id */
  7016. A_UINT32 param_id;
  7017. /** parametr value */
  7018. A_UINT32 param_value;
  7019. } wmi_peer_set_param_cmd_fixed_param;
  7020. typedef union {
  7021. /*
  7022. * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
  7023. * by the target or a little-endian host.
  7024. * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
  7025. * macros on the A_UINT32 "value" field.
  7026. */
  7027. struct {
  7028. /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
  7029. A_UINT16 mode;
  7030. A_UINT16 tx_rate; /* see per-mode specs below */
  7031. };
  7032. A_UINT32 value; /* for use by big-endian host */
  7033. } wmi_peer_max_min_tx_rate;
  7034. /*
  7035. * Any access to the mode/tx_rate in an big endian system should use
  7036. * the below Macros on the wmi_peer_max_min_tx_rate.value field.
  7037. */
  7038. #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
  7039. #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
  7040. #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
  7041. #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
  7042. /*
  7043. * CCK max/min tx Rate description
  7044. * tx_rate = 0: 1 Mbps
  7045. * tx_rate = 1: 2 Mbps
  7046. * tx_rate = 2: 5.5 Mbps
  7047. * tx_rate = 3: 11 Mbps
  7048. * tx_rate = else: invalid
  7049. */
  7050. enum {
  7051. WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */
  7052. WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */
  7053. WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */
  7054. WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */
  7055. WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
  7056. };
  7057. /*
  7058. * OFDM max/min tx Rate description
  7059. * tx_rate = 0: 6 Mbps
  7060. * tx_rate = 1: 9 Mbps
  7061. * tx_rate = 2: 12 Mbps
  7062. * tx_rate = 3: 18 Mbps
  7063. * tx_rate = 4: 24 Mbps
  7064. * tx_rate = 5: 32 Mbps
  7065. * tx_rate = 6: 48 Mbps
  7066. * tx_rate = 7: 54 Mbps
  7067. * tx_rate = else: invalid
  7068. */
  7069. enum {
  7070. WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */
  7071. WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */
  7072. WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */
  7073. WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */
  7074. WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */
  7075. WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */
  7076. WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */
  7077. WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */
  7078. WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
  7079. };
  7080. /*
  7081. * HT max/min tx rate description
  7082. * tx_rate = 0~7 : MCS Rate 0~7
  7083. * tx_rate=else : invalid.
  7084. */
  7085. #define WMI_MAX_HT_TX_MCS 0x07
  7086. /*
  7087. * VHT max/min tx rate description
  7088. * tx_rate = 0~9 : MCS Rate 0~9
  7089. * tx_rate=else : invalid.
  7090. */
  7091. #define WMI_MAX_VHT_TX_MCS 0x09
  7092. #define MAX_SUPPORTED_RATES 128
  7093. typedef struct {
  7094. /** total number of rates */
  7095. A_UINT32 num_rates;
  7096. /**
  7097. * rates (each 8bit value) packed into a 32 bit word.
  7098. * the rates are filled from least significant byte to most
  7099. * significant byte.
  7100. */
  7101. A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
  7102. } wmi_rate_set;
  7103. /* NOTE: It would bea good idea to represent the Tx MCS
  7104. * info in one word and Rx in another word. This is split
  7105. * into multiple words for convenience
  7106. */
  7107. typedef struct {
  7108. A_UINT32 tlv_header;
  7109. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
  7110. A_UINT32 rx_max_rate; /* Max Rx data rate */
  7111. A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
  7112. A_UINT32 tx_max_rate; /* Max Tx data rate */
  7113. A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
  7114. A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
  7115. } wmi_vht_rate_set;
  7116. /*
  7117. * IMPORTANT: Make sure the bit definitions here are consistent
  7118. * with the ni_flags definitions in wlan_peer.h
  7119. */
  7120. #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
  7121. #define WMI_PEER_QOS 0x00000002 /* QoS enabled */
  7122. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
  7123. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
  7124. #define WMI_PEER_HE 0x00000400 /* HE Enabled */
  7125. #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
  7126. #define WMI_PEER_HT 0x00001000 /* HT enabled */
  7127. #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
  7128. #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
  7129. #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
  7130. #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
  7131. #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
  7132. #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
  7133. #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
  7134. #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
  7135. #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
  7136. /** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
  7137. #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
  7138. #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
  7139. #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
  7140. /**
  7141. * Peer rate capabilities.
  7142. *
  7143. * This is of interest to the ratecontrol
  7144. * module which resides in the firmware. The bit definitions are
  7145. * consistent with that defined in if_athrate.c.
  7146. *
  7147. * @todo
  7148. * Move this to a common header file later so there is no need to
  7149. * duplicate the definitions or maintain consistency.
  7150. */
  7151. #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
  7152. #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
  7153. #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  7154. #define WMI_RC_HT_FLAG 0x08 /* HT */
  7155. #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  7156. #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  7157. #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
  7158. #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  7159. #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  7160. #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  7161. #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
  7162. #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  7163. typedef struct {
  7164. A_UINT32 tlv_header;
  7165. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
  7166. /** peer MAC address */
  7167. wmi_mac_addr peer_macaddr;
  7168. /** VDEV id */
  7169. A_UINT32 vdev_id;
  7170. /** assoc = 1 reassoc = 0 */
  7171. A_UINT32 peer_new_assoc;
  7172. /** peer associd (16 bits) */
  7173. A_UINT32 peer_associd;
  7174. /** peer station flags: see definition above */
  7175. A_UINT32 peer_flags;
  7176. /** negotiated capabilities (lower 16 bits)*/
  7177. A_UINT32 peer_caps;
  7178. /** Listen interval */
  7179. A_UINT32 peer_listen_intval;
  7180. /** HT capabilties of the peer */
  7181. A_UINT32 peer_ht_caps;
  7182. /** maximum rx A-MPDU length */
  7183. A_UINT32 peer_max_mpdu;
  7184. /** mpdu density of the peer in usec(0 to 16) */
  7185. A_UINT32 peer_mpdu_density;
  7186. /** peer rate capabilties see flags above */
  7187. A_UINT32 peer_rate_caps;
  7188. /** num spatial streams */
  7189. A_UINT32 peer_nss;
  7190. /** VHT capabilties of the peer */
  7191. A_UINT32 peer_vht_caps;
  7192. /** phy mode */
  7193. A_UINT32 peer_phymode;
  7194. /** HT Operation Element of the peer. Five bytes packed in 2
  7195. * INT32 array and filled from lsb to msb.
  7196. * Note that the size of array peer_ht_info[] cannotbe changed
  7197. * without breaking WMI Compatibility. */
  7198. A_UINT32 peer_ht_info[2];
  7199. /** total number of negotiated legacy rate set. Also the sizeof
  7200. * peer_legacy_rates[] */
  7201. A_UINT32 num_peer_legacy_rates;
  7202. /** total number of negotiated ht rate set. Also the sizeof
  7203. * peer_ht_rates[] */
  7204. A_UINT32 num_peer_ht_rates;
  7205. /*
  7206. * Bitmap providing customized mapping of bandwidths to max Rx NSS
  7207. * for this peer.
  7208. * This is required since 802.11 standard currently facilitates peer to
  7209. * be able to advertise only a single max Rx NSS value across all
  7210. * bandwidths.
  7211. * Some QCA chipsets might need to be able to advertise a different max
  7212. * Rx NSS value for 160 MHz, than that for 80 MHz and lower.
  7213. *
  7214. * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
  7215. * bit[30:3]: Reserved
  7216. * bit[31] : MSB(0/1): 1 in case of valid data else all bits will be
  7217. * set to 0 by host
  7218. */
  7219. A_UINT32 peer_bw_rxnss_override;
  7220. /* 802.11ax capabilities */
  7221. wmi_ppe_threshold peer_ppet;
  7222. /* protocol-defined HE / 11ax capability flags */
  7223. A_UINT32 peer_he_cap_info;
  7224. A_UINT32 peer_he_ops; /* HE operation contains BSS color */
  7225. A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
  7226. A_UINT32 peer_he_mcs; /* HE MCS/NSS set */
  7227. /* Following this struct are the TLV's:
  7228. * A_UINT8 peer_legacy_rates[];
  7229. * A_UINT8 peer_ht_rates[];
  7230. * wmi_vht_rate_set peer_vht_rates; //VHT capabilties of the peer
  7231. */
  7232. } wmi_peer_assoc_complete_cmd_fixed_param;
  7233. /* WDS Entry Flags */
  7234. #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
  7235. typedef struct {
  7236. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
  7237. /** peer MAC address */
  7238. wmi_mac_addr peer_macaddr;
  7239. /** wds MAC addr */
  7240. wmi_mac_addr wds_macaddr;
  7241. /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
  7242. A_UINT32 flags;
  7243. A_UINT32 vdev_id;
  7244. } wmi_peer_add_wds_entry_cmd_fixed_param;
  7245. #define WMI_CHAN_INFO_START_RESP 0
  7246. #define WMI_CHAN_INFO_END_RESP 1
  7247. typedef struct {
  7248. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
  7249. /** wds MAC addr */
  7250. wmi_mac_addr wds_macaddr;
  7251. A_UINT32 vdev_id;
  7252. } wmi_peer_remove_wds_entry_cmd_fixed_param;
  7253. typedef struct {
  7254. /** peer MAC address */
  7255. wmi_mac_addr peer_macaddr;
  7256. } wmi_peer_q_empty_callback_event;
  7257. /*
  7258. * Command to update an already existing WDS entry. Different address setting
  7259. * combinations are possible.
  7260. *
  7261. * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
  7262. * Valid wds and null peer -> Associated WDS entry flags will be updated.
  7263. * Null wds and Valid peer-> Flags will be updated for all WDS entries
  7264. * behind the peer.
  7265. * Null wds and peer -> Flags will be updated for all WDS entries.
  7266. */
  7267. typedef struct {
  7268. /*
  7269. * TLV tag and len; tag equals
  7270. * WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param
  7271. */
  7272. A_UINT32 tlv_header;
  7273. /** peer MAC address */
  7274. wmi_mac_addr peer_macaddr;
  7275. /** wds MAC addr */
  7276. wmi_mac_addr wds_macaddr;
  7277. /* Flags associated with WDS entry */
  7278. A_UINT32 flags;
  7279. A_UINT32 vdev_id;
  7280. } wmi_peer_update_wds_entry_cmd_fixed_param;
  7281. /**
  7282. * Channel info WMI event
  7283. */
  7284. typedef struct {
  7285. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
  7286. /** Error code */
  7287. A_UINT32 err_code;
  7288. /** Channel freq */
  7289. A_UINT32 freq;
  7290. /** Read flags */
  7291. A_UINT32 cmd_flags;
  7292. /** Noise Floor value */
  7293. A_UINT32 noise_floor;
  7294. /** rx clear count */
  7295. A_UINT32 rx_clear_count;
  7296. /** cycle count */
  7297. A_UINT32 cycle_count;
  7298. /** channel tx power per range in 0.5dBm steps */
  7299. A_UINT32 chan_tx_pwr_range;
  7300. /** channel tx power per throughput */
  7301. A_UINT32 chan_tx_pwr_tp;
  7302. /** rx frame count (cumulative) */
  7303. A_UINT32 rx_frame_count;
  7304. /** BSS rx cycle count */
  7305. A_UINT32 my_bss_rx_cycle_count;
  7306. /** b-mode data rx time (units are microseconds) */
  7307. A_UINT32 rx_11b_mode_data_duration;
  7308. /** tx frame count */
  7309. A_UINT32 tx_frame_cnt;
  7310. /** mac clock */
  7311. A_UINT32 mac_clk_mhz;
  7312. } wmi_chan_info_event_fixed_param;
  7313. /**
  7314. * Non wlan interference event
  7315. */
  7316. typedef struct {
  7317. A_UINT32 tlv_header;
  7318. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_ath_dcs_cw_int */
  7319. A_UINT32 channel; /* either number or freq in mhz */
  7320. } wlan_dcs_cw_int;
  7321. #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
  7322. /**
  7323. * wlan_dcs_im_tgt_stats
  7324. *
  7325. */
  7326. typedef struct _wlan_dcs_im_tgt_stats {
  7327. /** TLV tag and len; tag equals
  7328. * WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t
  7329. */
  7330. A_UINT32 tlv_header;
  7331. /** current running TSF from the TSF-1 */
  7332. A_UINT32 reg_tsf32;
  7333. /** Known last frame rssi, in case of multiple stations, if
  7334. * and at different ranges, this would not gaurantee that
  7335. * this is the least rssi.
  7336. */
  7337. A_UINT32 last_ack_rssi;
  7338. /** Sum of all the failed durations in the last one second interval.
  7339. */
  7340. A_UINT32 tx_waste_time;
  7341. /** count how many times the hal_rxerr_phy is marked, in this
  7342. * time period
  7343. */
  7344. A_UINT32 rx_time;
  7345. A_UINT32 phyerr_cnt;
  7346. /**
  7347. * WLAN IM stats from target to host
  7348. *
  7349. * Below statistics are sent from target to host periodically.
  7350. * These are collected at target as long as target is running
  7351. * and target chip is not in sleep.
  7352. *
  7353. */
  7354. /** listen time from ANI */
  7355. A_INT32 listen_time;
  7356. /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
  7357. A_UINT32 reg_tx_frame_cnt;
  7358. /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
  7359. A_UINT32 reg_rx_frame_cnt;
  7360. /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
  7361. A_UINT32 reg_rxclr_cnt;
  7362. /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
  7363. A_UINT32 reg_cycle_cnt; /* delta cycle count */
  7364. /** extenstion channel rx clear count */
  7365. A_UINT32 reg_rxclr_ext_cnt;
  7366. /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
  7367. A_UINT32 reg_ofdm_phyerr_cnt;
  7368. /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
  7369. A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
  7370. /** Channel noise floor (units are dBm) */
  7371. A_INT32 chan_nf;
  7372. /** BSS rx cycle count */
  7373. A_UINT32 my_bss_rx_cycle_count;
  7374. } wlan_dcs_im_tgt_stats_t;
  7375. /**
  7376. * wmi_dcs_interference_event_t
  7377. *
  7378. * Right now this is event and stats together. Partly this is
  7379. * because cw interference is handled in target now. This
  7380. * can be done at host itself, if we can carry the NF alone
  7381. * as a stats event. In future this would be done and this
  7382. * event would carry only stats.
  7383. */
  7384. typedef struct {
  7385. A_UINT32 tlv_header;
  7386. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
  7387. /**
  7388. * Type of the event present, either the cw interference event, or the wlan_im stats
  7389. */
  7390. A_UINT32 interference_type; /* type of interference, wlan or cw */
  7391. /** pdev_id for identifying the MAC
  7392. * See macros starting with WMI_PDEV_ID_ for values.
  7393. */
  7394. A_UINT32 pdev_id;
  7395. /*
  7396. * Following this struct are these TLVs. Note that they are both array of structures
  7397. * but can have at most one element. Which TLV is empty or has one element depends
  7398. * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
  7399. * elements (not arrays). union { wlan_dcs_cw_int cw_int;
  7400. * wlan_dcs_im_tgt_stats_t wlan_stat; }
  7401. * int_event;
  7402. *
  7403. * //cw_interference event
  7404. * wlan_dcs_cw_int cw_int[]; this element
  7405. * // wlan im interfernce stats
  7406. * wlan_dcs_im_tgt_stats_t wlan_stat[];
  7407. */
  7408. } wmi_dcs_interference_event_fixed_param;
  7409. enum wmi_peer_mcast_group_action {
  7410. wmi_peer_mcast_group_action_add = 0,
  7411. wmi_peer_mcast_group_action_del = 1
  7412. };
  7413. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
  7414. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
  7415. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
  7416. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
  7417. /* flag to exclude an ip while filtering.set to exclude */
  7418. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4
  7419. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
  7420. /* flag to say ipv4/ipv6. Will be set for ipv6 */
  7421. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8
  7422. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
  7423. /* delete all mcast table entries. */
  7424. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10
  7425. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
  7426. /* multicast group membership commands */
  7427. /* TODO: Converting this will be tricky since it uses an union.
  7428. Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
  7429. typedef struct {
  7430. A_UINT32 tlv_header;
  7431. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
  7432. A_UINT32 flags;
  7433. wmi_mac_addr ucast_mac_addr;
  7434. /*
  7435. * for ipv4, bytes (12-15) should contain ip address and
  7436. * other lower bytes 0. ipv6 should have all bytes valid
  7437. */
  7438. A_UINT8 mcast_ip_addr[16]; /* in network byte order */
  7439. /*
  7440. * for ipv6, all 16 bytes has to be valid;
  7441. * for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s
  7442. */
  7443. A_UINT8 mcast_ip_mask[16]; /* zero out lower bytes if ipv4 */
  7444. /* number of address filters - irrespective of ipv4/ipv6 addresses */
  7445. A_UINT32 num_filter_addr;
  7446. /*
  7447. * this array should contain the src IPs that are to be filtered
  7448. * during find. The array should be packed. If there are 2 ipv4
  7449. * addresses, there should be 8 bytes and rest all 0s
  7450. */
  7451. A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
  7452. A_UINT8 vdev_id; /* vdev of this mcast group */
  7453. } wmi_peer_mcast_group_cmd_fixed_param;
  7454. /** Offload Scan and Roaming related commands */
  7455. /** The FW performs 2 different kinds of offload scans independent
  7456. * of host. One is Roam scan which is primarily performed on a
  7457. * station VDEV after association to look for a better AP that
  7458. * the station VDEV can roam to. The second scan is connect scan
  7459. * which is mainly performed when the station is not associated
  7460. * and to look for a matching AP profile from a list of
  7461. * configured profiles. */
  7462. /**
  7463. * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
  7464. * the roam scan mode is one of the periodic, rssi change, both, none.
  7465. * None : Disable Roam scan. No Roam scan at all.
  7466. * Periodic : Scan periodically with a configurable period.
  7467. * Rssi change : Scan when ever rssi to current AP changes by the threshold value
  7468. * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
  7469. * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
  7470. *
  7471. */
  7472. typedef struct {
  7473. A_UINT32 tlv_header;
  7474. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
  7475. A_UINT32 roam_scan_mode;
  7476. A_UINT32 vdev_id;
  7477. } wmi_roam_scan_mode_fixed_param;
  7478. #define WMI_ROAM_SCAN_MODE_NONE 0x0
  7479. #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
  7480. #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
  7481. #define WMI_ROAM_SCAN_MODE_BOTH 0x3
  7482. /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
  7483. #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
  7484. typedef struct {
  7485. A_UINT32 tlv_header;
  7486. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
  7487. A_UINT32 vdev_id;
  7488. A_UINT32 command_arg;
  7489. } wmi_roam_scan_cmd_fixed_param;
  7490. #define WMI_ROAM_SCAN_STOP_CMD 0x1
  7491. /**
  7492. * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
  7493. * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
  7494. * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
  7495. */
  7496. typedef struct {
  7497. A_UINT32 tlv_header;
  7498. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
  7499. /** unique id identifying the VDEV, generated by the caller */
  7500. A_UINT32 vdev_id;
  7501. /** roam scan rssi threshold */
  7502. A_UINT32 roam_scan_rssi_thresh;
  7503. /** When using Hw generated beacon RSSI interrupts */
  7504. A_UINT32 roam_rssi_thresh_diff;
  7505. /** 5G scan max count */
  7506. A_UINT32 hirssi_scan_max_count;
  7507. /** 5G scan rssi change threshold value */
  7508. A_UINT32 hirssi_scan_delta;
  7509. /** 5G scan upper bound */
  7510. A_UINT32 hirssi_upper_bound;
  7511. /* The TLVs will follow.
  7512. * wmi_roam_scan_extended_threshold_param extended_param;
  7513. * wmi_roam_earlystop_rssi_thres_param earlystop_param;
  7514. * wmi_roam_dense_thres_param dense_param;
  7515. */
  7516. } wmi_roam_scan_rssi_threshold_fixed_param;
  7517. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
  7518. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
  7519. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
  7520. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
  7521. typedef struct {
  7522. /** TLV tag and len; tag equals
  7523. *WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
  7524. A_UINT32 tlv_header;
  7525. A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
  7526. A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
  7527. A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  7528. A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
  7529. A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  7530. A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
  7531. A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
  7532. A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
  7533. /**
  7534. * RSSI below which roam is kicked in by background scan
  7535. * although rssi is still good
  7536. */
  7537. A_UINT32 good_rssi_threshold;
  7538. } wmi_roam_scan_extended_threshold_param;
  7539. /**
  7540. * WMI_ROAM_SCAN_PERIOD: period for roam scan.
  7541. * Applicable when the scan mode is Periodic or both.
  7542. */
  7543. typedef struct {
  7544. A_UINT32 tlv_header;
  7545. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
  7546. /** unique id identifying the VDEV, generated by the caller */
  7547. A_UINT32 vdev_id;
  7548. /** roam scan period value */
  7549. A_UINT32 roam_scan_period;
  7550. /** Aging for Roam scans */
  7551. A_UINT32 roam_scan_age;
  7552. } wmi_roam_scan_period_fixed_param;
  7553. /**
  7554. * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
  7555. * Rssi change threshold used when mode is Rssi change (or) Both.
  7556. * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
  7557. * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
  7558. */
  7559. typedef struct {
  7560. A_UINT32 tlv_header;
  7561. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
  7562. /** unique id identifying the VDEV, generated by the caller */
  7563. A_UINT32 vdev_id;
  7564. /** roam scan rssi change threshold value */
  7565. A_UINT32 roam_scan_rssi_change_thresh;
  7566. /** When using Hw generated beacon RSSI interrupts */
  7567. A_UINT32 bcn_rssi_weight;
  7568. /** Minimum delay between two 5G scans */
  7569. A_UINT32 hirssi_delay_btw_scans;
  7570. } wmi_roam_scan_rssi_change_threshold_fixed_param;
  7571. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
  7572. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
  7573. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
  7574. /**
  7575. * TLV for roaming channel list
  7576. */
  7577. typedef struct {
  7578. A_UINT32 tlv_header;
  7579. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
  7580. /** unique id identifying the VDEV, generated by the caller */
  7581. A_UINT32 vdev_id;
  7582. /** WMI_CHAN_LIST_TAG */
  7583. A_UINT32 chan_list_type;
  7584. /** # if channels to scan */
  7585. A_UINT32 num_chan;
  7586. /**
  7587. * TLV (tag length value ) parameters follow the wmi_roam_chan_list
  7588. * structure. The TLV's are:
  7589. * A_UINT32 channel_list[];
  7590. **/
  7591. } wmi_roam_chan_list_fixed_param;
  7592. /** Authentication modes */
  7593. enum {
  7594. WMI_AUTH_NONE, /* no upper level auth */
  7595. WMI_AUTH_OPEN, /* open */
  7596. WMI_AUTH_SHARED, /* shared-key */
  7597. WMI_AUTH_8021X, /* 802.1x */
  7598. WMI_AUTH_AUTO, /* Auto */
  7599. WMI_AUTH_WPA, /* WPA */
  7600. WMI_AUTH_RSNA, /* WPA2/RSNA */
  7601. WMI_AUTH_CCKM, /* CCKM */
  7602. WMI_AUTH_WAPI, /* WAPI */
  7603. WMI_AUTH_AUTO_PSK,
  7604. WMI_AUTH_WPA_PSK,
  7605. WMI_AUTH_RSNA_PSK,
  7606. WMI_AUTH_WAPI_PSK,
  7607. WMI_AUTH_FT_RSNA, /* 11r FT */
  7608. WMI_AUTH_FT_RSNA_PSK,
  7609. WMI_AUTH_RSNA_PSK_SHA256,
  7610. WMI_AUTH_RSNA_8021X_SHA256,
  7611. WMI_AUTH_CCKM_WPA,
  7612. WMI_AUTH_CCKM_RSNA,
  7613. };
  7614. typedef struct {
  7615. /** authentication mode (defined above) */
  7616. A_UINT32 rsn_authmode;
  7617. /** unicast cipher set */
  7618. A_UINT32 rsn_ucastcipherset;
  7619. /** mcast/group cipher set */
  7620. A_UINT32 rsn_mcastcipherset;
  7621. /** mcast/group management frames cipher set */
  7622. A_UINT32 rsn_mcastmgmtcipherset;
  7623. } wmi_rsn_params;
  7624. /** looking for a wps enabled AP */
  7625. #define WMI_AP_PROFILE_FLAG_WPS 0x1
  7626. /** looking for a secure AP */
  7627. #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
  7628. /** looking for a PMF enabled AP */
  7629. #define WMI_AP_PROFILE_FLAG_PMF 0x4
  7630. /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
  7631. * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
  7632. * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
  7633. * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
  7634. */
  7635. typedef struct {
  7636. A_UINT32 tlv_header;
  7637. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
  7638. /** flags as defined above */
  7639. A_UINT32 flags;
  7640. /**
  7641. * rssi thresold value: the value of the the candidate AP should
  7642. * higher by this threshold than the rssi of the currrently associated AP.
  7643. */
  7644. A_UINT32 rssi_threshold;
  7645. /**
  7646. * ssid vlaue to be matched.
  7647. */
  7648. wmi_ssid ssid;
  7649. /**
  7650. * security params to be matched.
  7651. */
  7652. /** authentication mode (defined above) */
  7653. A_UINT32 rsn_authmode;
  7654. /** unicast cipher set */
  7655. A_UINT32 rsn_ucastcipherset;
  7656. /** mcast/group cipher set */
  7657. A_UINT32 rsn_mcastcipherset;
  7658. /** mcast/group management frames cipher set */
  7659. A_UINT32 rsn_mcastmgmtcipherset;
  7660. } wmi_ap_profile;
  7661. /** Support early stop roaming scanning when finding a strong candidate AP
  7662. * A 'strong' candidate is
  7663. * 1) Is eligible candidate
  7664. * (all conditions are met in existing candidate selection).
  7665. * 2) Its rssi is better than earlystop threshold.
  7666. * Earlystop threshold will be relaxed as each channel is scanned.
  7667. */
  7668. typedef struct {
  7669. A_UINT32 tlv_header;
  7670. /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
  7671. A_UINT32 roam_earlystop_thres_min;
  7672. /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
  7673. A_UINT32 roam_earlystop_thres_max;
  7674. } wmi_roam_earlystop_rssi_thres_param;
  7675. typedef struct {
  7676. /* TLV tag and len;
  7677. * tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param
  7678. */
  7679. A_UINT32 tlv_header;
  7680. /* rssi threshold offset under trffic and dense env */
  7681. A_UINT32 roam_dense_rssi_thres_offset;
  7682. /* minimum number of APs to determine dense env */
  7683. A_UINT32 roam_dense_min_aps;
  7684. /* initial dense status detected by host
  7685. * at the time of initial connection */
  7686. A_UINT32 roam_dense_status;
  7687. /* traffic threshold to enable aggressive roaming in dense env;
  7688. * units are percent of medium occupancy, 0 - 100
  7689. */
  7690. A_UINT32 roam_dense_traffic_thres;
  7691. } wmi_roam_dense_thres_param;
  7692. /** Beacon filter wmi command info */
  7693. #define BCN_FLT_MAX_SUPPORTED_IES 256
  7694. #define BCN_FLT_MAX_ELEMS_IE_LIST BCN_FLT_MAX_SUPPORTED_IES/32
  7695. typedef struct bss_bcn_stats {
  7696. A_UINT32 vdev_id;
  7697. A_UINT32 bss_bcnsdropped;
  7698. A_UINT32 bss_bcnsdelivered;
  7699. } wmi_bss_bcn_stats_t;
  7700. typedef struct bcn_filter_stats {
  7701. A_UINT32 bcns_dropped;
  7702. A_UINT32 bcns_delivered;
  7703. A_UINT32 activefilters;
  7704. wmi_bss_bcn_stats_t bss_stats;
  7705. } wmi_bcnfilter_stats_t;
  7706. typedef struct wmi_add_bcn_filter_cmd {
  7707. A_UINT32 tlv_header;
  7708. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
  7709. A_UINT32 vdev_id;
  7710. /*
  7711. * Following this structure is the TLV:
  7712. * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  7713. */
  7714. } wmi_add_bcn_filter_cmd_fixed_param;
  7715. typedef struct wmi_rmv_bcn_filter_cmd {
  7716. A_UINT32 tlv_header;
  7717. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
  7718. A_UINT32 vdev_id;
  7719. } wmi_rmv_bcn_filter_cmd_fixed_param;
  7720. #define WMI_BCN_SEND_DTIM_ZERO 1
  7721. #define WMI_BCN_SEND_DTIM_BITCTL_SET 2
  7722. typedef struct wmi_bcn_send_from_host {
  7723. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
  7724. A_UINT32 vdev_id;
  7725. A_UINT32 data_len;
  7726. union {
  7727. A_UINT32 frag_ptr; /* Physical address of the frame */
  7728. A_UINT32 frag_ptr_lo; /* LSB of physical address of the frame */
  7729. };
  7730. A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
  7731. A_UINT32 dtim_flag; /* to control CABQ traffic */
  7732. A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
  7733. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  7734. } wmi_bcn_send_from_host_cmd_fixed_param;
  7735. /* cmd to support bcn snd for all vaps at once */
  7736. typedef struct wmi_pdev_send_bcn {
  7737. A_UINT32 num_vdevs;
  7738. wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
  7739. } wmi_pdev_send_bcn_cmd_t;
  7740. /*
  7741. * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
  7742. */
  7743. typedef struct {
  7744. A_UINT32 tlv_header;
  7745. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
  7746. /** id of AP criteria */
  7747. A_UINT32 id;
  7748. /** unique id identifying the VDEV, generated by the caller */
  7749. A_UINT32 vdev_id;
  7750. /*
  7751. * Following this structure is the TLV:
  7752. * wmi_ap_profile ap_profile; //AP profile info
  7753. */
  7754. } wmi_roam_ap_profile_fixed_param;
  7755. /**
  7756. * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
  7757. */
  7758. typedef struct {
  7759. /** id of AP criteria */
  7760. A_UINT32 id;
  7761. /** unique id identifying the VDEV, generated by the caller */
  7762. A_UINT32 vdev_id;
  7763. /** AP profile info */
  7764. wmi_ap_profile ap_profile;
  7765. } wmi_ofl_scan_add_ap_profile;
  7766. /**
  7767. * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
  7768. */
  7769. typedef struct {
  7770. /** id of AP criteria */
  7771. A_UINT32 id;
  7772. /** unique id identifying the VDEV, generated by the caller */
  7773. A_UINT32 vdev_id;
  7774. } wmi_ofl_scan_remove_ap_profile;
  7775. /**
  7776. * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
  7777. * 0 will disable ofload scan and a very low value will perform a continous
  7778. * scan.
  7779. */
  7780. typedef struct {
  7781. /** offload scan period value, used for scans used when not connected */
  7782. A_UINT32 ofl_scan_period;
  7783. } wmi_ofl_scan_period;
  7784. /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
  7785. #define ROAM_OFFLOAD_PMK_BYTES (32)
  7786. #define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
  7787. #define ROAM_OFFLOAD_KRK_BYTES (16)
  7788. #define ROAM_OFFLOAD_BTK_BYTES (32)
  7789. #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
  7790. #define ROAM_OFFLOAD_NUM_MCS_SET (16)
  7791. /* This TLV will be filled only in case roam offload
  7792. * for wpa2-psk/okc/ese/11r is enabled */
  7793. typedef struct {
  7794. A_UINT32 tlv_header;
  7795. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
  7796. A_UINT32 rssi_cat_gap; /* gap for every category bucket */
  7797. A_UINT32 prefer_5g; /* prefer select 5G candidate */
  7798. A_UINT32 select_5g_margin;
  7799. A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
  7800. A_UINT32 capability;
  7801. A_UINT32 ht_caps_info;
  7802. A_UINT32 ampdu_param;
  7803. A_UINT32 ht_ext_cap;
  7804. A_UINT32 ht_txbf;
  7805. A_UINT32 asel_cap;
  7806. A_UINT32 qos_enabled;
  7807. A_UINT32 qos_caps;
  7808. A_UINT32 wmm_caps;
  7809. A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET >> 2]; /* since this 4 byte aligned,
  7810. * we don't declare it as
  7811. * tlv array */
  7812. } wmi_roam_offload_tlv_param;
  7813. /* flags for 11i offload */
  7814. #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
  7815. /* from bit 1 to bit 31 are reserved */
  7816. #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
  7817. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  7818. } while (0)
  7819. #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
  7820. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  7821. } while (0)
  7822. #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
  7823. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
  7824. /* This TLV will be filled only in case of wpa-psk/wpa2-psk */
  7825. typedef struct {
  7826. A_UINT32 tlv_header;
  7827. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
  7828. A_UINT32 flags;
  7829. /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
  7830. A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES >> 2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
  7831. A_UINT32 pmk_len;
  7832. /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
  7833. } wmi_roam_11i_offload_tlv_param;
  7834. /* This TLV will be filled only in case of 11R*/
  7835. typedef struct {
  7836. A_UINT32 tlv_header;
  7837. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
  7838. A_UINT32 mdie_present;
  7839. A_UINT32 mdid;
  7840. A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN >> 2];
  7841. A_UINT32 r0kh_id_len;
  7842. A_UINT32 psk_msk[ROAM_OFFLOAD_PSK_MSK_BYTES >> 2]; /* psk/msk offload. As this 4 byte aligned, we don't declare it as tlv array */
  7843. A_UINT32 psk_msk_len;
  7844. /**length of psk_msk*/
  7845. } wmi_roam_11r_offload_tlv_param;
  7846. /* This TLV will be filled only in case of ESE */
  7847. typedef struct {
  7848. A_UINT32 tlv_header;
  7849. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
  7850. A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES >> 2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
  7851. A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES >> 2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
  7852. } wmi_roam_ese_offload_tlv_param;
  7853. /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
  7854. * generated when ever a better AP is found in the recent roam scan (or)
  7855. * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
  7856. * from the current AP.
  7857. */
  7858. typedef struct {
  7859. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
  7860. /** unique id identifying the VDEV, generated by the caller */
  7861. A_UINT32 vdev_id;
  7862. /** reason for roam event */
  7863. A_UINT32 reason;
  7864. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
  7865. A_UINT32 rssi;
  7866. /** roam notification */
  7867. A_UINT32 notif;
  7868. } wmi_roam_event_fixed_param;
  7869. /* roam_reason: bits 0-3 */
  7870. /** invalid reason. Do not interpret reason field */
  7871. #define WMI_ROAM_REASON_INVALID 0x0
  7872. #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
  7873. #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
  7874. #define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
  7875. #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
  7876. #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
  7877. SSID and Security profile in
  7878. WMI_ROAM_AP_PROFILE, found during scan
  7879. triggered upon FINAL_BMISS **/
  7880. #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
  7881. /*
  7882. * WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
  7883. * Result code of WMI_ROAM_INVOKE_CMDID.
  7884. * Any roaming failure before reassociation will be indicated to host
  7885. * with this reason.
  7886. * Any roaming failure after reassociation will be indicated to host with
  7887. * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
  7888. */
  7889. #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
  7890. /* reserved up through 0xF */
  7891. /* subnet status: bits 4-5 */
  7892. typedef enum {
  7893. WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
  7894. WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
  7895. WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
  7896. } wmi_roam_subnet_change_status;
  7897. #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
  7898. #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
  7899. #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
  7900. do { \
  7901. (roam_reason) |= \
  7902. (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
  7903. WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
  7904. } while (0)
  7905. #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
  7906. (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
  7907. WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
  7908. /* roaming notification */
  7909. /** invalid notification. Do not interpret notif field */
  7910. #define WMI_ROAM_NOTIF_INVALID 0x0
  7911. /** indicate that roaming is started. sent only in non WOW state */
  7912. #define WMI_ROAM_NOTIF_ROAM_START 0x1
  7913. /** indicate that roaming is aborted. sent only in non WOW state */
  7914. #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2
  7915. /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
  7916. * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
  7917. */
  7918. typedef struct {
  7919. A_UINT32 tlv_header;
  7920. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
  7921. A_UINT32 vdev_id;
  7922. /**unique id identifying the VDEV, generated by the caller*/
  7923. A_UINT32 num_ric_request;
  7924. /**number of ric request ie send to firmware.(max value is 2 now)*/
  7925. A_UINT32 is_add_ric;
  7926. /**support add ric or delete ric*/
  7927. } wmi_ric_request_fixed_param;
  7928. /**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
  7929. * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
  7930. */
  7931. typedef struct {
  7932. A_UINT32 tlv_header;
  7933. A_UINT32 ts_info; /** bits value of TS Info field.*/
  7934. A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
  7935. A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
  7936. A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
  7937. A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
  7938. A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
  7939. A_UINT32 suspension_interval; /**The Suspension Interval field*/
  7940. A_UINT32 svc_start_time; /**The Service Start Time field*/
  7941. A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
  7942. A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
  7943. A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
  7944. A_UINT32 max_burst_size; /**The Burst Size field*/
  7945. A_UINT32 delay_bound; /**The Delay Bound field*/
  7946. A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
  7947. A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
  7948. A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
  7949. } wmi_ric_tspec;
  7950. /* flags for roam_invoke_cmd */
  7951. /* add this channel into roam cache channel list after this command is finished */
  7952. #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
  7953. /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
  7954. #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
  7955. /* during host-invoked roaming, don't send null data frame to AP */
  7956. #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
  7957. /* from bit 3 to bit 31 are reserved */
  7958. #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  7959. (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  7960. } while (0)
  7961. #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  7962. (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  7963. } while (0)
  7964. #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
  7965. ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
  7966. #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
  7967. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
  7968. #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
  7969. #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
  7970. #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
  7971. /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
  7972. *
  7973. * if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
  7974. * if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
  7975. *
  7976. * This command can be used to add specific channel into roam cached channel list by following
  7977. * <roam_scan_ch_mode> = 0
  7978. * <roam_ap_sel_mode> = 0
  7979. * <roam_delay> = 0
  7980. * <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
  7981. * <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
  7982. * <channel_no> = channel list to be added
  7983. */
  7984. typedef struct {
  7985. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
  7986. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
  7987. A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
  7988. A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
  7989. A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
  7990. A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
  7991. A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
  7992. A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
  7993. /**
  7994. * TLV (tag length value ) parameters follows roam_invoke_req
  7995. * The TLV's are:
  7996. * A_UINT32 channel_list[];
  7997. * wmi_mac_addr bssid_list[];
  7998. */
  7999. } wmi_roam_invoke_cmd_fixed_param;
  8000. /* Definition for op_bitmap */
  8001. enum {
  8002. ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
  8003. ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
  8004. ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
  8005. };
  8006. typedef struct {
  8007. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
  8008. A_UINT32 tlv_header;
  8009. /** Unique id identifying the VDEV on which roaming filter is adopted */
  8010. A_UINT32 vdev_id;
  8011. A_UINT32 flags; /** flags for filter */
  8012. /** 32 bit bitmap to be set on.
  8013. * bit0 = first param,
  8014. * bit 1 = second param...etc. Can be or'ed
  8015. */
  8016. A_UINT32 op_bitmap;
  8017. /* number of blacklist in the TLV variable bssid_black_list */
  8018. A_UINT32 num_bssid_black_list;
  8019. /* number of whitelist in the TLV variable ssid_white_list */
  8020. A_UINT32 num_ssid_white_list;
  8021. /* only for lfr 3.0. number of preferred list & factor in the TLV */
  8022. A_UINT32 num_bssid_preferred_list;
  8023. /**
  8024. * TLV (tag length value ) parameters follows roam_filter_list_cmd
  8025. * The TLV's are:
  8026. * wmi_mac_addr bssid_black_list[];
  8027. * wmi_ssid ssid_white_list[];
  8028. * wmi_mac_addr bssid_preferred_list[];
  8029. * A_UINT32 bssid_preferred_factor[];
  8030. */
  8031. } wmi_roam_filter_fixed_param;
  8032. typedef struct {
  8033. A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
  8034. } WMI_IPV4_ADDR;
  8035. typedef struct _WMI_IPV6_ADDR {
  8036. A_UINT8 address[16]; /* IPV6 in Network Byte Order */
  8037. } WMI_IPV6_ADDR;
  8038. /* flags for subnet change detection */
  8039. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
  8040. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
  8041. /* bit 2 to bit 31 are reserved */
  8042. /* set IPv4 enabled/disabled flag and get the flag */
  8043. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
  8044. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  8045. } while (0)
  8046. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
  8047. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  8048. } while (0)
  8049. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
  8050. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
  8051. /* set IPv6 enabled flag, disabled and get the flag */
  8052. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
  8053. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  8054. } while (0)
  8055. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
  8056. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  8057. } while (0)
  8058. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
  8059. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
  8060. /**
  8061. * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
  8062. * to FW. FW uses these parameters for subnet change detection.
  8063. */
  8064. typedef struct {
  8065. /*
  8066. * TLV tag and len; tag equals
  8067. * WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param
  8068. */
  8069. A_UINT32 tlv_header;
  8070. /** unique id identifying the VDEV, generated by the caller */
  8071. A_UINT32 vdev_id;
  8072. /** IPv4/IPv6 enabled/disabled */
  8073. /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/
  8074. DISABLED */
  8075. A_UINT32 flag;
  8076. /** Gateway MAC address */
  8077. wmi_mac_addr inet_gw_mac_addr;
  8078. /** IP addresses */
  8079. WMI_IPV4_ADDR inet_gw_ip_v4_addr;
  8080. WMI_IPV6_ADDR inet_gw_ip_v6_addr;
  8081. /** Number of software retries for ARP/Neighbor solicitation request */
  8082. A_UINT32 max_retries;
  8083. /** timeout in milliseconds for each ARP request*/
  8084. A_UINT32 timeout;
  8085. /** number of skipped aps **/
  8086. A_UINT32 num_skip_subnet_change_detection_bssid_list;
  8087. /**
  8088. * TLV (tag length value ) parameters follows roam_subnet_change_config_cmd
  8089. * structure. The TLV's are:
  8090. * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
  8091. **/
  8092. } wmi_roam_subnet_change_config_fixed_param;
  8093. /** WMI_PROFILE_MATCH_EVENT: offload scan
  8094. * generated when ever atleast one of the matching profiles is found
  8095. * in recent NLO scan. no data is carried with the event.
  8096. */
  8097. /** P2P specific commands */
  8098. /**
  8099. * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
  8100. * FW to generate P2P IE tobe carried in probe response frames.
  8101. * FW will respond to probe requests while in listen state.
  8102. */
  8103. typedef struct {
  8104. /* number of secondary device types,supported */
  8105. A_UINT32 num_secondary_dev_types;
  8106. /**
  8107. * followed by 8 bytes of primary device id and
  8108. * num_secondary_dev_types * 8 bytes of secondary device
  8109. * id.
  8110. */
  8111. } wmi_p2p_dev_set_device_info;
  8112. /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
  8113. * state. if enabled, an active STA/AP will respond to P2P probe requests on
  8114. * the operating channel of the VDEV.
  8115. */
  8116. typedef struct {
  8117. /* 1:enable disoverability, 0:disable discoverability */
  8118. A_UINT32 enable_discoverability;
  8119. } wmi_p2p_set_discoverability;
  8120. /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
  8121. * beacons generated by FW. used in FW beacon mode.
  8122. * the FW will add this IE to beacon in addition to the beacon
  8123. * template set by WMI_BCN_TMPL_CMDID command.
  8124. */
  8125. typedef struct {
  8126. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
  8127. /** unique id identifying the VDEV, generated by the caller */
  8128. A_UINT32 vdev_id;
  8129. /* ie length */
  8130. A_UINT32 ie_buf_len;
  8131. /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  8132. * A_UINT8 ie_data[]; // length in byte given by field num_data.
  8133. */
  8134. } wmi_p2p_go_set_beacon_ie_fixed_param;
  8135. /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
  8136. * probe response generated by FW. used in FW beacon mode.
  8137. * the FW will add this IE to probe response in addition to the probe response
  8138. * template set by WMI_PRB_TMPL_CMDID command.
  8139. */
  8140. typedef struct {
  8141. /** unique id identifying the VDEV, generated by the caller */
  8142. A_UINT32 vdev_id;
  8143. /* ie length */
  8144. A_UINT32 ie_buf_len;
  8145. /*followed by byte stream of ie data of length ie_buf_len */
  8146. } wmi_p2p_go_set_probe_resp_ie;
  8147. /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
  8148. * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
  8149. * and action frames received by the P2P Client.
  8150. */
  8151. typedef struct {
  8152. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
  8153. /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
  8154. A_UINT32 p2p_ie_oui_type;
  8155. /** OS specific NoA Attribute ID */
  8156. A_UINT32 p2p_noa_attribute;
  8157. } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
  8158. /*----P2P disc offload definition ----*/
  8159. typedef struct {
  8160. A_UINT32 pattern_type;
  8161. /**
  8162. * TLV (tag length value ) paramerters follow the pattern structure.
  8163. * TLV can contain bssid list, ssid list and
  8164. * ie. the TLV tags are defined above;
  8165. */
  8166. } wmi_p2p_disc_offload_pattern_cmd;
  8167. typedef struct {
  8168. /* unique id identifying the VDEV, generated by the caller */
  8169. A_UINT32 vdev_id;
  8170. /* mgmt type of the ie */
  8171. A_UINT32 mgmt_type;
  8172. /* ie length */
  8173. A_UINT32 ie_buf_len;
  8174. /*followed by byte stream of ie data of length ie_buf_len */
  8175. } wmi_p2p_disc_offload_appie_cmd;
  8176. typedef struct {
  8177. /* enable/disable p2p find offload */
  8178. A_UINT32 enable;
  8179. /* unique id identifying the VDEV, generated by the caller */
  8180. A_UINT32 vdev_id;
  8181. /* p2p find type */
  8182. A_UINT32 disc_type;
  8183. /* p2p find perodic */
  8184. A_UINT32 perodic;
  8185. /* p2p find listen channel */
  8186. A_UINT32 listen_channel;
  8187. /* p2p find full channel number */
  8188. A_UINT32 num_scan_chans;
  8189. /**
  8190. * TLV (tag length value ) paramerters follow the pattern structure.
  8191. * TLV contain channel list
  8192. */
  8193. } wmi_p2p_disc_offload_config_cmd;
  8194. /*----P2P OppPS definition ----*/
  8195. typedef struct {
  8196. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
  8197. A_UINT32 tlv_header;
  8198. /* unique id identifying the VDEV, generated by the caller */
  8199. A_UINT32 vdev_id;
  8200. /* OppPS attributes */
  8201. /** Bit 0: Indicate enable/disable of OppPS
  8202. * Bits 7-1: Ctwindow in TUs
  8203. * Bits 31-8: Reserved
  8204. */
  8205. A_UINT32 oppps_attr;
  8206. } wmi_p2p_set_oppps_cmd_fixed_param;
  8207. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
  8208. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
  8209. #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
  8210. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
  8211. #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
  8212. WMI_F_RMW((hdr)->oppps_attr, 0x1, \
  8213. WMI_UNIFIED_OPPPS_ATTR_ENALBED);
  8214. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
  8215. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
  8216. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
  8217. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
  8218. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
  8219. WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
  8220. WMI_UNIFIED_OPPPS_ATTR_CTWIN);
  8221. typedef enum p2p_lo_start_ctrl_flags_e {
  8222. /* flush prob. req when host is awake */
  8223. P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0,
  8224. } p2p_lo_start_ctrl_flags;
  8225. typedef struct {
  8226. A_UINT32 tlv_header;
  8227. A_UINT32 vdev_id;
  8228. A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
  8229. A_UINT32 channel; /* MHz */
  8230. A_UINT32 period; /* ms */
  8231. A_UINT32 interval; /* ms, interval should be larger than period */
  8232. A_UINT32 count; /* 0 means forever */
  8233. /*
  8234. * device_types_len specifies the number of bytes in the
  8235. * device_types_data[] byte-array TLV that follows this TLV.
  8236. * The data in device_types_data[] is in 8-byte elements, so
  8237. * device_types_len will be a multiple of 8.
  8238. */
  8239. A_UINT32 device_types_len;
  8240. /*
  8241. * prob_resp_len specifies the number of bytes in the
  8242. * prob_resp_data[] byte-array TLV that follows this TLV.
  8243. */
  8244. A_UINT32 prob_resp_len;
  8245. /*
  8246. * Two other TLVs follow this TLV:
  8247. * A_UINT8 device_types_data[device_types_len];
  8248. * A_UINT8 prob_resp_data[prob_resp_len];
  8249. * The information in device_types_data[] and prob_resp_data[]
  8250. * needs to be provided to the target in over-the-air byte order.
  8251. * On a big-endian host, if device_types_data and prob_resp_data
  8252. * are initially in the correct over-the-air byte order,
  8253. * the automatic byteswap for endianness-correction during WMI
  8254. * message download will mess up the byte order.
  8255. * Thus, a big-endian host needs to explicitly byte-swap the bytes
  8256. * within each quad-byte segment of device_types_data[] and
  8257. * prob_resp_data[], so that the automatic byte-swap applied during
  8258. * WMI download from a big-endian host to the little-endian target
  8259. * will restore device_types_data and prob_resp_data into the
  8260. * correct byte ordering.
  8261. */
  8262. } wmi_p2p_lo_start_cmd_fixed_param;
  8263. typedef struct {
  8264. A_UINT32 tlv_header;
  8265. A_UINT32 vdev_id;
  8266. } wmi_p2p_lo_stop_cmd_fixed_param;
  8267. typedef enum p2p_lo_stopped_reason_e {
  8268. /* finished as scheduled */
  8269. P2P_LO_STOPPED_REASON_COMPLETE = 0,
  8270. /* host stops it */
  8271. P2P_LO_STOPPED_REASON_RECV_STOP_CMD,
  8272. /* invalid listen offload par */
  8273. P2P_LO_STOPPED_REASON_INVALID_LO_PAR,
  8274. /* vdev cannot support it right now */
  8275. P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT,
  8276. } p2p_lo_stopped_reason;
  8277. typedef struct {
  8278. A_UINT32 tlv_header;
  8279. A_UINT32 vdev_id;
  8280. A_UINT32 reason; /* refer to p2p_lo_stopped_reason_e */
  8281. } wmi_p2p_lo_stopped_event_fixed_param;
  8282. typedef enum {
  8283. WMI_MNT_FILTER_CONFIG_MANAGER,
  8284. WMI_MNT_FILTER_CONFIG_CONTROL,
  8285. WMI_MNT_FILTER_CONFIG_DATA,
  8286. WMI_MNT_FILTER_CONFIG_ALL,
  8287. WMI_MNT_FILTER_CONFIG_UNKNOWN,
  8288. } WMI_MNT_FILTER_CONFIG_TYPE;
  8289. typedef struct {
  8290. A_UINT32 tlv_header;
  8291. A_UINT32 vdev_id;
  8292. A_UINT32 clear_or_set;
  8293. A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
  8294. } wmi_mnt_filter_cmd_fixed_param;
  8295. typedef struct {
  8296. A_UINT32 time32; /* upper 32 bits of time stamp */
  8297. A_UINT32 time0; /* lower 32 bits of time stamp */
  8298. } A_TIME64;
  8299. typedef enum wmi_peer_sta_kickout_reason {
  8300. WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
  8301. WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
  8302. WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
  8303. WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
  8304. WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
  8305. WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
  8306. } PEER_KICKOUT_REASON;
  8307. typedef struct {
  8308. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
  8309. /** peer mac address */
  8310. wmi_mac_addr peer_macaddr;
  8311. /** Reason code, defined as above */
  8312. A_UINT32 reason;
  8313. /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
  8314. A_UINT32 rssi;
  8315. } wmi_peer_sta_kickout_event_fixed_param;
  8316. #define WMI_WLAN_PROFILE_MAX_HIST 3
  8317. #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
  8318. typedef struct _wmi_wlan_profile_t {
  8319. A_UINT32 tlv_header;
  8320. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
  8321. A_UINT32 id;
  8322. A_UINT32 cnt;
  8323. A_UINT32 tot;
  8324. A_UINT32 min;
  8325. A_UINT32 max;
  8326. A_UINT32 hist_intvl;
  8327. A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
  8328. } wmi_wlan_profile_t;
  8329. typedef struct _wmi_wlan_profile_ctx_t {
  8330. A_UINT32 tlv_header;
  8331. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
  8332. A_UINT32 tot; /* time in us */
  8333. A_UINT32 tx_msdu_cnt;
  8334. A_UINT32 tx_mpdu_cnt;
  8335. A_UINT32 tx_ppdu_cnt;
  8336. A_UINT32 rx_msdu_cnt;
  8337. A_UINT32 rx_mpdu_cnt;
  8338. A_UINT32 bin_count;
  8339. } wmi_wlan_profile_ctx_t;
  8340. typedef struct {
  8341. A_UINT32 tlv_header;
  8342. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
  8343. A_UINT32 enable;
  8344. } wmi_wlan_profile_trigger_cmd_fixed_param;
  8345. typedef struct {
  8346. A_UINT32 tlv_header;
  8347. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
  8348. A_UINT32 value;
  8349. } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
  8350. typedef struct {
  8351. A_UINT32 tlv_header;
  8352. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
  8353. A_UINT32 profile_id;
  8354. A_UINT32 value;
  8355. } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
  8356. typedef struct {
  8357. A_UINT32 tlv_header;
  8358. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
  8359. A_UINT32 profile_id;
  8360. A_UINT32 enable;
  8361. } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
  8362. /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
  8363. 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
  8364. when comparing wifi header.*/
  8365. /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
  8366. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
  8367. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
  8368. #define WOW_DEFAULT_BITMASK_SIZE 146
  8369. #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
  8370. #define WOW_MAX_BITMAP_FILTERS 32
  8371. #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
  8372. #define WOW_EXTEND_PATTERN_MATCH_CNT 16
  8373. #define WOW_SHORT_PATTERN_MATCH_CNT 8
  8374. #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
  8375. The 148 comes from (128 - 14 ) payload size + 8bytes LLC + 26bytes MAC header */
  8376. #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
  8377. #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
  8378. #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
  8379. #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
  8380. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
  8381. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
  8382. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
  8383. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
  8384. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
  8385. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
  8386. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
  8387. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
  8388. typedef enum pattern_type_e {
  8389. WOW_PATTERN_MIN = 0,
  8390. WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
  8391. WOW_IPV4_SYNC_PATTERN,
  8392. WOW_IPV6_SYNC_PATTERN,
  8393. WOW_WILD_CARD_PATTERN,
  8394. WOW_TIMER_PATTERN,
  8395. WOW_MAGIC_PATTERN,
  8396. WOW_IPV6_RA_PATTERN,
  8397. WOW_IOAC_PKT_PATTERN,
  8398. WOW_IOAC_TMR_PATTERN,
  8399. WOW_IOAC_SOCK_PATTERN,
  8400. WOW_PATTERN_MAX
  8401. } WOW_PATTERN_TYPE;
  8402. typedef enum event_type_e {
  8403. WOW_BMISS_EVENT = 0,
  8404. WOW_BETTER_AP_EVENT,
  8405. WOW_DEAUTH_RECVD_EVENT,
  8406. WOW_MAGIC_PKT_RECVD_EVENT,
  8407. WOW_GTK_ERR_EVENT,
  8408. WOW_FOURWAY_HSHAKE_EVENT,
  8409. WOW_EAPOL_RECVD_EVENT,
  8410. WOW_NLO_DETECTED_EVENT,
  8411. WOW_DISASSOC_RECVD_EVENT,
  8412. WOW_PATTERN_MATCH_EVENT,
  8413. WOW_CSA_IE_EVENT,
  8414. WOW_PROBE_REQ_WPS_IE_EVENT,
  8415. WOW_AUTH_REQ_EVENT,
  8416. WOW_ASSOC_REQ_EVENT,
  8417. WOW_HTT_EVENT,
  8418. WOW_RA_MATCH_EVENT,
  8419. WOW_HOST_AUTO_SHUTDOWN_EVENT,
  8420. WOW_IOAC_MAGIC_EVENT,
  8421. WOW_IOAC_SHORT_EVENT,
  8422. WOW_IOAC_EXTEND_EVENT,
  8423. WOW_IOAC_TIMER_EVENT,
  8424. WOW_DFS_PHYERR_RADAR_EVENT,
  8425. WOW_BEACON_EVENT,
  8426. WOW_CLIENT_KICKOUT_EVENT,
  8427. WOW_NAN_EVENT,
  8428. WOW_EXTSCAN_EVENT,
  8429. WOW_IOAC_REV_KA_FAIL_EVENT,
  8430. WOW_IOAC_SOCK_EVENT,
  8431. WOW_NLO_SCAN_COMPLETE_EVENT,
  8432. WOW_NAN_DATA_EVENT,
  8433. WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */
  8434. /* reuse deprecated event value */
  8435. WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT,
  8436. WOW_TDLS_CONN_TRACKER_EVENT,
  8437. WOW_CRITICAL_LOG_EVENT,
  8438. } WOW_WAKE_EVENT_TYPE;
  8439. typedef enum wake_reason_e {
  8440. WOW_REASON_UNSPECIFIED = -1,
  8441. WOW_REASON_NLOD = 0,
  8442. WOW_REASON_AP_ASSOC_LOST,
  8443. WOW_REASON_LOW_RSSI,
  8444. WOW_REASON_DEAUTH_RECVD,
  8445. WOW_REASON_DISASSOC_RECVD,
  8446. WOW_REASON_GTK_HS_ERR,
  8447. WOW_REASON_EAP_REQ,
  8448. WOW_REASON_FOURWAY_HS_RECV,
  8449. WOW_REASON_TIMER_INTR_RECV,
  8450. WOW_REASON_PATTERN_MATCH_FOUND,
  8451. WOW_REASON_RECV_MAGIC_PATTERN,
  8452. WOW_REASON_P2P_DISC,
  8453. WOW_REASON_WLAN_HB,
  8454. WOW_REASON_CSA_EVENT,
  8455. WOW_REASON_PROBE_REQ_WPS_IE_RECV,
  8456. WOW_REASON_AUTH_REQ_RECV,
  8457. WOW_REASON_ASSOC_REQ_RECV,
  8458. WOW_REASON_HTT_EVENT,
  8459. WOW_REASON_RA_MATCH,
  8460. WOW_REASON_HOST_AUTO_SHUTDOWN,
  8461. WOW_REASON_IOAC_MAGIC_EVENT,
  8462. WOW_REASON_IOAC_SHORT_EVENT,
  8463. WOW_REASON_IOAC_EXTEND_EVENT,
  8464. WOW_REASON_IOAC_TIMER_EVENT,
  8465. WOW_REASON_ROAM_HO,
  8466. WOW_REASON_DFS_PHYERR_RADADR_EVENT,
  8467. WOW_REASON_BEACON_RECV,
  8468. WOW_REASON_CLIENT_KICKOUT_EVENT,
  8469. WOW_REASON_NAN_EVENT,
  8470. WOW_REASON_EXTSCAN,
  8471. WOW_REASON_RSSI_BREACH_EVENT,
  8472. WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
  8473. WOW_REASON_IOAC_SOCK_EVENT,
  8474. WOW_REASON_NLO_SCAN_COMPLETE,
  8475. WOW_REASON_PACKET_FILTER_MATCH,
  8476. WOW_REASON_ASSOC_RES_RECV,
  8477. WOW_REASON_REASSOC_REQ_RECV,
  8478. WOW_REASON_REASSOC_RES_RECV,
  8479. WOW_REASON_ACTION_FRAME_RECV,
  8480. WOW_REASON_BPF_ALLOW,
  8481. WOW_REASON_NAN_DATA,
  8482. WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
  8483. /* reuse deprecated reason value */
  8484. WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT,
  8485. WOW_REASON_TDLS_CONN_TRACKER_EVENT,
  8486. WOW_REASON_CRITICAL_LOG,
  8487. WOW_REASON_P2P_LISTEN_OFFLOAD,
  8488. WOW_REASON_NAN_EVENT_WAKE_HOST,
  8489. WOW_REASON_DEBUG_TEST = 0xFF,
  8490. } WOW_WAKE_REASON_TYPE;
  8491. typedef enum {
  8492. WOW_IFACE_PAUSE_ENABLED,
  8493. WOW_IFACE_PAUSE_DISABLED
  8494. } WOW_IFACE_STATUS;
  8495. enum {
  8496. /* some win10 platfrom will not assert pcie_reset for wow.*/
  8497. WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001,
  8498. /*
  8499. * WMI_WOW_FLAG_SEND_PM_PME
  8500. * Some platforms have issues if the PM_PME message is sent after WoW,
  8501. * so don't send PM_PME after WoW unless the host uses this flag
  8502. * to request it.
  8503. */
  8504. WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
  8505. /* Flag to indicate unit test */
  8506. WMI_WOW_FLAG_UNIT_TEST_ENABLE = 0x00000004,
  8507. /* Force HTC wakeup */
  8508. WMI_WOW_FLAG_DO_HTC_WAKEUP = 0x00000008,
  8509. };
  8510. typedef struct {
  8511. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
  8512. A_UINT32 enable;
  8513. A_UINT32 pause_iface_config;
  8514. A_UINT32 flags; /* WMI_WOW_FLAG enums */
  8515. } wmi_wow_enable_cmd_fixed_param;
  8516. typedef struct {
  8517. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
  8518. /** Reserved for future use */
  8519. A_UINT32 reserved0;
  8520. } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
  8521. #define WOW_ICMPV6_NA_FILTER_DISABLE 0
  8522. #define WOW_ICMPV6_NA_FILTER_ENABLE 1
  8523. typedef struct {
  8524. /* TLV tag and len;
  8525. * tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param
  8526. */
  8527. A_UINT32 tlv_header;
  8528. A_UINT32 vdev_id;
  8529. A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
  8530. } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
  8531. typedef struct bitmap_pattern_s {
  8532. A_UINT32 tlv_header;
  8533. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
  8534. A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
  8535. A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
  8536. A_UINT32 pattern_offset;
  8537. A_UINT32 pattern_len;
  8538. A_UINT32 bitmask_len;
  8539. A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
  8540. } WOW_BITMAP_PATTERN_T;
  8541. typedef struct ipv4_sync_s {
  8542. A_UINT32 tlv_header;
  8543. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
  8544. A_UINT32 ipv4_src_addr;
  8545. A_UINT32 ipv4_dst_addr;
  8546. A_UINT32 tcp_src_prt;
  8547. A_UINT32 tcp_dst_prt;
  8548. } WOW_IPV4_SYNC_PATTERN_T;
  8549. typedef struct ipv6_sync_s {
  8550. A_UINT32 tlv_header;
  8551. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
  8552. A_UINT32 ipv6_src_addr[4];
  8553. A_UINT32 ipv6_dst_addr[4];
  8554. A_UINT32 tcp_src_prt;
  8555. A_UINT32 tcp_dst_prt;
  8556. } WOW_IPV6_SYNC_PATTERN_T;
  8557. typedef struct WOW_MAGIC_PATTERN_CMD {
  8558. A_UINT32 tlv_header;
  8559. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
  8560. wmi_mac_addr macaddr;
  8561. } WOW_MAGIC_PATTERN_CMD;
  8562. typedef enum wow_ioac_pattern_type {
  8563. WOW_IOAC_MAGIC_PATTERN = 1,
  8564. WOW_IOAC_SHORT_PATTERN,
  8565. WOW_IOAC_EXTEND_PATTERN,
  8566. } WOW_IOAC_PATTERN_TYPE;
  8567. typedef struct ioac_sock_pattern_s {
  8568. /**
  8569. * TLV tag and len;
  8570. * tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T
  8571. */
  8572. A_UINT32 tlv_header;
  8573. A_UINT32 id;
  8574. A_UINT32 local_ipv4;
  8575. A_UINT32 remote_ipv4;
  8576. A_UINT32 local_port;
  8577. A_UINT32 remote_port;
  8578. A_UINT32 pattern_len; /* units = bytes */
  8579. A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
  8580. WMI_IPV6_ADDR local_ipv6;
  8581. WMI_IPV6_ADDR remote_ipv6;
  8582. A_UINT32 ack_nak_len;
  8583. A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  8584. A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  8585. } WOW_IOAC_SOCK_PATTERN_T;
  8586. typedef struct ioac_pkt_pattern_s {
  8587. A_UINT32 tlv_header;
  8588. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
  8589. A_UINT32 pattern_type;
  8590. A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
  8591. A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
  8592. A_UINT32 pattern_len;
  8593. A_UINT32 random_len;
  8594. } WOW_IOAC_PKT_PATTERN_T;
  8595. typedef struct ioac_tmr_pattern_s {
  8596. A_UINT32 tlv_header;
  8597. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
  8598. A_UINT32 wake_in_s;
  8599. A_UINT32 vdev_id;
  8600. } WOW_IOAC_TMR_PATTERN_T;
  8601. typedef struct {
  8602. A_UINT32 tlv_header;
  8603. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
  8604. A_UINT32 nID;
  8605. } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
  8606. typedef struct {
  8607. A_UINT32 tlv_header;
  8608. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
  8609. A_UINT32 nID;
  8610. } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
  8611. typedef struct ioac_keepalive_s {
  8612. A_UINT32 tlv_header;
  8613. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
  8614. A_UINT32
  8615. keepalive_pkt_buf
  8616. [WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
  8617. A_UINT32 keepalive_pkt_len;
  8618. A_UINT32 period_in_ms;
  8619. A_UINT32 vdev_id;
  8620. A_UINT32 max_loss_cnt;
  8621. A_UINT32 local_ipv4;
  8622. A_UINT32 remote_ipv4;
  8623. A_UINT32 local_port;
  8624. A_UINT32 remote_port;
  8625. A_UINT32 recv_period_in_ms;
  8626. A_UINT32 rev_ka_size;
  8627. A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
  8628. WMI_IPV6_ADDR local_ipv6;
  8629. WMI_IPV6_ADDR remote_ipv6;
  8630. } WMI_WOW_IOAC_KEEPALIVE_T;
  8631. typedef struct {
  8632. A_UINT32 tlv_header;
  8633. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
  8634. A_UINT32 vdev_id;
  8635. A_UINT32 pattern_type;
  8636. /*
  8637. * Following this struct are these TLVs. Note that they are all array of structures
  8638. * but can have at most one element. Which TLV is empty or has one element depends
  8639. * on the field pattern_type. This is to emulate an union.
  8640. * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
  8641. * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
  8642. */
  8643. } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
  8644. typedef struct {
  8645. A_UINT32 tlv_header;
  8646. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
  8647. A_UINT32 vdev_id;
  8648. A_UINT32 pattern_type;
  8649. A_UINT32 pattern_id;
  8650. } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
  8651. typedef struct {
  8652. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
  8653. A_UINT32 vdev_id;
  8654. A_UINT32 pattern_id;
  8655. A_UINT32 pattern_type;
  8656. /*
  8657. * Following this struct are these TLVs. Note that they are all array of structures
  8658. * but can have at most one element. Which TLV is empty or has one element depends
  8659. * on the field pattern_type. This is to emulate an union.
  8660. * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
  8661. * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
  8662. * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
  8663. * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
  8664. * A_UINT32 pattern_info_timeout[];
  8665. * A_UINT32 ra_ratelimit_interval;
  8666. */
  8667. } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
  8668. typedef struct {
  8669. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
  8670. A_UINT32 vdev_id;
  8671. A_UINT32 pattern_id;
  8672. A_UINT32 pattern_type;
  8673. } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
  8674. #define WMI_WOW_MAX_EVENT_BM_LEN 4
  8675. typedef struct {
  8676. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
  8677. A_UINT32 vdev_id;
  8678. A_UINT32 is_add;
  8679. union {
  8680. A_UINT32 event_bitmap;
  8681. A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
  8682. };
  8683. } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
  8684. /*
  8685. * This structure is used to set the pattern to check UDP packet in WOW mode.
  8686. * If match, construct a tx frame in a local buffer to send through the peer
  8687. * AP to the entity in the IP network that sent the UDP packet to this STA.
  8688. */
  8689. typedef struct {
  8690. /*
  8691. * TLV tag and len;
  8692. * tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param
  8693. */
  8694. A_UINT32 tlv_header;
  8695. A_UINT32 vdev_id;
  8696. A_UINT32 enable; /* 1: enable, 0: disable */
  8697. /*
  8698. * dest_port -
  8699. * bits 7:0 contain the LSB of the UDP dest port,
  8700. * bits 15:8 contain the MSB of the UDP dest port
  8701. */
  8702. A_UINT32 dest_port;
  8703. A_UINT32 pattern_len; /* length in byte of pattern[] */
  8704. A_UINT32 response_len; /* length in byte of response[] */
  8705. /*
  8706. * Following this struct are the TLV's:
  8707. * payload of UDP packet to be checked, network byte order
  8708. * A_UINT8 pattern[];
  8709. * payload of UDP packet to be response, network byte order
  8710. * A_UINT8 response[];
  8711. */
  8712. } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
  8713. /*
  8714. * This structure is used to set the pattern for WOW host wakeup pin pulse
  8715. * pattern confirguration.
  8716. */
  8717. typedef struct {
  8718. /*
  8719. * TLV tag and len; tag equals
  8720. * WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param
  8721. */
  8722. A_UINT32 tlv_header;
  8723. /* 1: enable, 0: disable */
  8724. A_UINT32 enable;
  8725. /* pin for host wakeup */
  8726. A_UINT32 pin;
  8727. /* interval for keeping low voltage, unit: ms */
  8728. A_UINT32 interval_low;
  8729. /* interval for keeping high voltage, unit: ms */
  8730. A_UINT32 interval_high;
  8731. /* repeat times for pulse (0xffffffff means forever) */
  8732. A_UINT32 repeat_cnt;
  8733. } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
  8734. #define MAX_SUPPORTED_ACTION_CATEGORY 256
  8735. #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
  8736. typedef enum {
  8737. WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
  8738. WOW_ACTION_WAKEUP_OPERATION_SET,
  8739. WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
  8740. WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
  8741. } WOW_ACTION_WAKEUP_OPERATION;
  8742. typedef struct {
  8743. /*
  8744. * TLV tag and len; tag equals
  8745. * WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param
  8746. */
  8747. A_UINT32 tlv_header;
  8748. A_UINT32 vdev_id;
  8749. /*
  8750. * 0 reset to fw default, 1 set the bits, 2 add the setting bits,
  8751. * 3 delete the setting bits
  8752. */
  8753. A_UINT32 operation;
  8754. A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
  8755. } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
  8756. typedef struct wow_event_info_s {
  8757. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
  8758. A_UINT32 vdev_id;
  8759. A_UINT32 flag; /*This is current reserved. */
  8760. A_INT32 wake_reason;
  8761. A_UINT32 data_len;
  8762. } WOW_EVENT_INFO_fixed_param;
  8763. typedef struct wow_initial_wakeup_event_s {
  8764. /*
  8765. * TLV tag and len; tag equals
  8766. * WOW_INITIAL_WAKEUP_EVENT_fixed_param
  8767. */
  8768. A_UINT32 tlv_header;
  8769. A_UINT32 vdev_id;
  8770. } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
  8771. typedef enum {
  8772. WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
  8773. WOW_EVENT_INFO_TYPE_BITMAP,
  8774. WOW_EVENT_INFO_TYPE_GTKIGTK,
  8775. } WOW_EVENT_INFO_TYPE;
  8776. typedef struct wow_event_info_section_s {
  8777. A_UINT32 data_type;
  8778. A_UINT32 data_len;
  8779. } WOW_EVENT_INFO_SECTION;
  8780. typedef struct wow_event_info_section_packet_s {
  8781. A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
  8782. } WOW_EVENT_INFO_SECTION_PACKET;
  8783. typedef struct wow_event_info_section_bitmap_s {
  8784. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
  8785. A_UINT32 flag; /*This is current reserved. */
  8786. A_UINT32 value; /*This could be the pattern id for bitmap pattern. */
  8787. A_UINT32 org_len; /*The length of the orginal packet. */
  8788. } WOW_EVENT_INFO_SECTION_BITMAP;
  8789. /**
  8790. * This command is sent from WLAN host driver to firmware to
  8791. * enable or disable D0-WOW. D0-WOW means APSS suspend with
  8792. * PCIe link and DDR being active.
  8793. *
  8794. *
  8795. * Entering D0-WOW Mode (based on kernel suspend request):
  8796. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
  8797. * target: Take action (e.g. dbglog suspend)
  8798. * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
  8799. *
  8800. * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
  8801. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
  8802. * target: Take action (e.g. dbglog resume)
  8803. * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
  8804. *
  8805. * This command is applicable only on the PCIE LL systems
  8806. * Host can enter either D0-WOW or WOW mode, but NOT both at same time
  8807. * Decision to enter D0-WOW or WOW is based on active interfaces
  8808. *
  8809. */
  8810. typedef struct {
  8811. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
  8812. A_UINT32 enable; /* 1 = enable, 0 = disable */
  8813. } wmi_d0_wow_enable_disable_cmd_fixed_param;
  8814. typedef enum extend_wow_type_e {
  8815. EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
  8816. EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
  8817. EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
  8818. EXTWOW_TYPE_APP_PULSETEST,
  8819. EXTWOW_DISABLED = 255,
  8820. } EXTWOW_TYPE;
  8821. typedef struct {
  8822. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
  8823. A_UINT32 vdev_id;
  8824. A_UINT32 type;
  8825. A_UINT32 wakeup_pin_num;
  8826. A_UINT32 swol_pulsetest_type;
  8827. A_UINT32 swol_pulsetest_application;
  8828. } wmi_extwow_enable_cmd_fixed_param;
  8829. #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
  8830. #define SWOL_INDOOR_KEY_LEN 16
  8831. typedef struct {
  8832. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
  8833. A_UINT32 vdev_id;
  8834. wmi_mac_addr wakee_mac;
  8835. A_UINT8 ident[8];
  8836. A_UINT8 passwd[16];
  8837. A_UINT32 ident_len;
  8838. A_UINT32 passwd_len;
  8839. /* indoor check parameters */
  8840. /* key for mac addresses specified in swol_indoor_key_mac
  8841. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  8842. * segment of this array, so the bytes will return to their original
  8843. * order when the entire WMI message contents are byte-swapped to
  8844. * convert from big-endian to little-endian format.
  8845. */
  8846. A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
  8847. /* key length for specified mac address index
  8848. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  8849. * segment of this array, so the bytes will return to their original
  8850. * order when the entire WMI message contents are byte-swapped to
  8851. * convert from big-endian to little-endian format.
  8852. */
  8853. A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  8854. /* mac address array allowed to wakeup host*/
  8855. wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  8856. /* app mask for the mac addresses specified in swol_indoor_key_mac */
  8857. A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  8858. A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
  8859. A_UINT32 swol_indoor_pw_check; /* whether to check password */
  8860. A_UINT32 swol_indoor_pattern; /* wakeup pattern */
  8861. A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
  8862. A_UINT32 swol_indoor_exception_app;
  8863. A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
  8864. } wmi_extwow_set_app_type1_params_cmd_fixed_param;
  8865. typedef struct {
  8866. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
  8867. A_UINT32 vdev_id;
  8868. A_UINT8 rc4_key[16];
  8869. A_UINT32 rc4_key_len;
  8870. /** ip header parameter */
  8871. A_UINT32 ip_id; /* NC id */
  8872. A_UINT32 ip_device_ip; /* NC IP address */
  8873. A_UINT32 ip_server_ip; /* Push server IP address */
  8874. /** tcp header parameter */
  8875. A_UINT16 tcp_src_port; /* NC TCP port */
  8876. A_UINT16 tcp_dst_port; /* Push server TCP port */
  8877. A_UINT32 tcp_seq;
  8878. A_UINT32 tcp_ack_seq;
  8879. A_UINT32 keepalive_init; /* Initial ping interval */
  8880. A_UINT32 keepalive_min; /* Minimum ping interval */
  8881. A_UINT32 keepalive_max; /* Maximum ping interval */
  8882. A_UINT32 keepalive_inc; /* Increment of ping interval */
  8883. wmi_mac_addr gateway_mac;
  8884. A_UINT32 tcp_tx_timeout_val;
  8885. A_UINT32 tcp_rx_timeout_val;
  8886. /** add extra parameter for backward-compatible */
  8887. /*
  8888. * For all byte arrays, natural order is used. E.g.
  8889. * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
  8890. * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
  8891. */
  8892. /* used to encrypt transmit packet such as keep-alive */
  8893. A_UINT8 rc4_write_sandbox[256];
  8894. A_UINT32 rc4_write_x;
  8895. A_UINT32 rc4_write_y;
  8896. /* used to decrypt received packet such as wow data */
  8897. A_UINT8 rc4_read_sandbox[256];
  8898. A_UINT32 rc4_read_x;
  8899. A_UINT32 rc4_read_y;
  8900. /* used to caculate HMAC hash for transmit packet such as keep-alive */
  8901. A_UINT8 ssl_write_seq[8];
  8902. A_UINT8 ssl_sha1_write_key[64];
  8903. A_UINT32 ssl_sha1_write_key_len;
  8904. /* used to calculate HAMC hash for receive packet such as wow data */
  8905. A_UINT8 ssl_read_seq[8];
  8906. A_UINT8 ssl_sha1_read_key[64];
  8907. A_UINT32 ssl_sha1_read_key_len;
  8908. /* optional element for specifying TCP options data to include in
  8909. * transmit packets such as keep-alive
  8910. */
  8911. A_UINT32 tcp_options_len;
  8912. A_UINT8 tcp_options[40];
  8913. A_UINT32 async_id; /* keep-alive request id */
  8914. } wmi_extwow_set_app_type2_params_cmd_fixed_param;
  8915. #define WMI_RXERR_CRC 0x01 /* CRC error on frame */
  8916. #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  8917. #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  8918. #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  8919. typedef enum {
  8920. PKT_PWR_SAVE_PAID_MATCH = 0x0001,
  8921. PKT_PWR_SAVE_GID_MATCH = 0x0002,
  8922. PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x0004,
  8923. PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x0008,
  8924. PKT_PWR_SAVE_EOF_PAD_DELIM = 0x0010,
  8925. PKT_PWR_SAVE_MACADDR_MISMATCH = 0x0020,
  8926. PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040,
  8927. PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080,
  8928. PKT_PWR_SAVE_RSSI_CHECK = 0x0100,
  8929. PKT_PWR_SAVE_5G_EBT = 0x0200,
  8930. PKT_PWR_SAVE_2G_EBT = 0x0400,
  8931. WMI_PKT_PWR_SAVE_MAX = 0x0800,
  8932. } WMI_PKT_PWR_SAVE_TYPE;
  8933. typedef struct {
  8934. A_UINT32 tlv_header;
  8935. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
  8936. A_UINT32 num_data;
  8937. /** length in byte of data[]. */
  8938. /** pdev_id for identifying the MAC
  8939. * See macros starting with WMI_PDEV_ID_ for values.
  8940. */
  8941. A_UINT32 pdev_id;
  8942. /* This structure is used to send Factory Test Mode [FTM] command
  8943. * from host to firmware for integrated chips which are binary blobs.
  8944. * Following this structure is the TLV:
  8945. * A_UINT8 data[]; // length in byte given by field num_data.
  8946. */
  8947. } wmi_ftm_intg_cmd_fixed_param;
  8948. typedef struct {
  8949. A_UINT32 tlv_header;
  8950. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
  8951. A_UINT32 num_data;
  8952. /** length in byte of data[]. */
  8953. /* This structure is used to receive Factory Test Mode [FTM] event
  8954. * from firmware to host for integrated chips which are binary blobs.
  8955. * Following this structure is the TLV:
  8956. * A_UINT8 data[]; // length in byte given by field num_data.
  8957. */
  8958. } wmi_ftm_intg_event_fixed_param;
  8959. #define WMI_MAX_NS_OFFLOADS 2
  8960. #define WMI_MAX_ARP_OFFLOADS 2
  8961. #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  8962. #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  8963. #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  8964. typedef struct {
  8965. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
  8966. A_UINT32 flags; /* flags */
  8967. A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node */
  8968. A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
  8969. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  8970. } WMI_ARP_OFFLOAD_TUPLE;
  8971. #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  8972. #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  8973. #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  8974. /* whether the configured IPv6 address is anycast */
  8975. #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3)
  8976. #define WMI_NSOFF_MAX_TARGET_IPS 2
  8977. typedef struct {
  8978. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
  8979. A_UINT32 flags; /* flags */
  8980. /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
  8981. WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
  8982. WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
  8983. WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
  8984. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  8985. } WMI_NS_OFFLOAD_TUPLE;
  8986. typedef struct {
  8987. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
  8988. A_UINT32 flags;
  8989. A_UINT32 vdev_id;
  8990. A_UINT32 num_ns_ext_tuples;
  8991. /* Following this structure are the TLVs:
  8992. * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
  8993. * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
  8994. * size of ns_ext_tuples is based on num_ns_ext_tuples
  8995. * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[];
  8996. */
  8997. } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
  8998. typedef struct {
  8999. A_UINT32 tlv_header;
  9000. A_UINT32 vdev_id;
  9001. A_UINT32 pattern_id;
  9002. A_UINT32 timeout;
  9003. A_UINT32 length;
  9004. /* Following this would be the pattern
  9005. A_UINT8 pattern[] of length specifed by length
  9006. field in the structure. */
  9007. } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  9008. typedef struct {
  9009. A_UINT32 tlv_header;
  9010. A_UINT32 vdev_id;
  9011. A_UINT32 pattern_id;
  9012. } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  9013. typedef struct {
  9014. A_UINT32 tlv_header;
  9015. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
  9016. /** unique id identifying the VDEV, generated by the caller */
  9017. A_UINT32 vdev_id;
  9018. /** peer MAC address */
  9019. wmi_mac_addr peer_macaddr;
  9020. /** Tid number */
  9021. A_UINT32 tid;
  9022. /** Initiator (1) or Responder (0) for this aggregation */
  9023. A_UINT32 initiator;
  9024. /** size of the negotiated window */
  9025. A_UINT32 window_size;
  9026. /** starting sequence number (only valid for initiator) */
  9027. A_UINT32 ssn;
  9028. /** timeout field represents the time to wait for Block Ack in
  9029. * initiator case and the time to wait for BAR in responder
  9030. * case. 0 represents no timeout. */
  9031. A_UINT32 timeout;
  9032. /* BA policy: immediate ACK (0) or delayed ACK (1) */
  9033. A_UINT32 policy;
  9034. } wmi_peer_tid_addba_cmd_fixed_param;
  9035. typedef struct {
  9036. A_UINT32 tlv_header;
  9037. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
  9038. /** unique id identifying the VDEV, generated by the caller */
  9039. A_UINT32 vdev_id;
  9040. /** peer MAC address */
  9041. wmi_mac_addr peer_macaddr;
  9042. /** Tid number */
  9043. A_UINT32 tid;
  9044. /** Initiator (1) or Responder (0) for this aggregation */
  9045. A_UINT32 initiator;
  9046. } wmi_peer_tid_delba_cmd_fixed_param;
  9047. typedef struct {
  9048. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
  9049. /** unique id identifying the VDEV, generated by the caller */
  9050. A_UINT32 vdev_id;
  9051. /** peer MAC address */
  9052. wmi_mac_addr peer_macaddr;
  9053. /** Tid number */
  9054. A_UINT32 tid;
  9055. /** Event status */
  9056. A_UINT32 status;
  9057. } wmi_tx_addba_complete_event_fixed_param;
  9058. typedef struct {
  9059. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
  9060. /** unique id identifying the VDEV, generated by the caller */
  9061. A_UINT32 vdev_id;
  9062. /** peer MAC address */
  9063. wmi_mac_addr peer_macaddr;
  9064. /** Tid number */
  9065. A_UINT32 tid;
  9066. /** Event status */
  9067. A_UINT32 status;
  9068. } wmi_tx_delba_complete_event_fixed_param;
  9069. /*
  9070. * Structure to request sequence numbers for a given
  9071. * peer station on different TIDs. The TIDs are
  9072. * indicated in the tidBitMap, tid 0 would
  9073. * be represented by LSB bit 0. tid 1 would be
  9074. * represented by LSB bit 1 etc.
  9075. * The target will retrieve the current sequence
  9076. * numbers for the peer on all the TIDs requested
  9077. * and send back a response in a WMI event.
  9078. */
  9079. typedef struct {
  9080. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  9081. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
  9082. wmi_mac_addr peer_macaddr;
  9083. A_UINT32 tidBitmap;
  9084. } wmi_ba_req_ssn;
  9085. typedef struct {
  9086. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  9087. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
  9088. /** unique id identifying the VDEV, generated by the caller */
  9089. A_UINT32 vdev_id;
  9090. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  9091. A_UINT32 num_ba_req_ssn;
  9092. /* Following this struc are the TLV's:
  9093. * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
  9094. */
  9095. } wmi_ba_req_ssn_cmd_fixed_param;
  9096. /*
  9097. * Max transmit categories
  9098. *
  9099. * Note: In future if we need to increase WMI_MAX_TC definition
  9100. * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
  9101. */
  9102. #define WMI_MAX_TC 8
  9103. /*
  9104. * Structure to send response sequence numbers
  9105. * for a give peer and tidmap.
  9106. */
  9107. typedef struct {
  9108. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  9109. WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
  9110. wmi_mac_addr peer_macaddr;
  9111. /* A bool to indicate if ssn is present */
  9112. A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
  9113. /* The ssn from target, valid only if
  9114. * ssn_present_for_tid[tidn] equals 1
  9115. */
  9116. A_UINT32 ssn_for_tid[WMI_MAX_TC];
  9117. } wmi_ba_event_ssn;
  9118. typedef struct {
  9119. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  9120. WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
  9121. /** unique id identifying the VDEV, generated by the caller */
  9122. A_UINT32 vdev_id;
  9123. /** Event status, success or failure of the overall operation */
  9124. A_UINT32 status;
  9125. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  9126. A_UINT32 num_ba_event_ssn;
  9127. /* Following this struc are the TLV's:
  9128. * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
  9129. */
  9130. } wmi_ba_rsp_ssn_event_fixed_param;
  9131. enum wmi_aggr_state_req_type {
  9132. WMI_DISABLE_AGGREGATION,
  9133. WMI_ENABLE_AGGREGATION
  9134. };
  9135. /*
  9136. * This event is generated by the COEX module
  9137. * when esco call is begins the coex module in fw genrated this event to host to
  9138. * disable the RX aggregation and after completion of the esco call fw will indicate to
  9139. * enable back the Rx aggregation .
  9140. */
  9141. typedef struct {
  9142. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
  9143. /** unique id identifying the VDEV, generated by the caller */
  9144. A_UINT32 vdev_id;
  9145. /** req_type contains values from enum
  9146. * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
  9147. A_UINT32 req_type;
  9148. } wmi_aggr_state_trig_event_fixed_param;
  9149. typedef struct {
  9150. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
  9151. /** unique id identifying the VDEV, generated by the caller */
  9152. A_UINT32 vdev_id;
  9153. /** MAC address used for installing */
  9154. wmi_mac_addr peer_macaddr;
  9155. /** key index */
  9156. A_UINT32 key_ix;
  9157. /** key flags */
  9158. A_UINT32 key_flags;
  9159. /** Event status */
  9160. A_UINT32 status;
  9161. } wmi_vdev_install_key_complete_event_fixed_param;
  9162. typedef enum _WMI_NLO_AUTH_ALGORITHM {
  9163. WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
  9164. WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
  9165. WMI_NLO_AUTH_ALGO_WPA = 3,
  9166. WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
  9167. WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
  9168. WMI_NLO_AUTH_ALGO_RSNA = 6,
  9169. WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
  9170. } WMI_NLO_AUTH_ALGORITHM;
  9171. typedef enum _WMI_NLO_CIPHER_ALGORITHM {
  9172. WMI_NLO_CIPHER_ALGO_NONE = 0x00,
  9173. WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
  9174. WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
  9175. WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
  9176. WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
  9177. WMI_NLO_CIPHER_ALGO_BIP = 0x06,
  9178. WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  9179. WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  9180. WMI_NLO_CIPHER_ALGO_WEP = 0x101,
  9181. } WMI_NLO_CIPHER_ALGORITHM;
  9182. /* SSID broadcast type passed in NLO params */
  9183. typedef enum _WMI_NLO_SSID_BcastNwType {
  9184. WMI_NLO_BCAST_UNKNOWN = 0,
  9185. WMI_NLO_BCAST_NORMAL = 1,
  9186. WMI_NLO_BCAST_HIDDEN = 2,
  9187. } WMI_NLO_SSID_BcastNwType;
  9188. #define WMI_NLO_MAX_SSIDS 16
  9189. #define WMI_NLO_MAX_CHAN 48
  9190. #define WMI_NLO_CONFIG_STOP (0x1 << 0)
  9191. #define WMI_NLO_CONFIG_START (0x1 << 1)
  9192. #define WMI_NLO_CONFIG_RESET (0x1 << 2)
  9193. #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
  9194. #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
  9195. #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
  9196. /* This bit is used to indicate if EPNO or supplicant PNO is enabled. Only
  9197. * one of them can be enabled at a given time */
  9198. #define WMI_NLO_CONFIG_ENLO (0x1 << 7)
  9199. #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
  9200. #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
  9201. #define WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ (0x1 << 10)
  9202. #define WMI_NLO_CONFIG_RANDOM_SEQ_NO_IN_PROBE_REQ (0x1 << 11)
  9203. #define WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ (0x1 << 12)
  9204. /* Whether directed scan needs to be performed (for hidden SSIDs) */
  9205. #define WMI_ENLO_FLAG_DIRECTED_SCAN 1
  9206. /* Whether PNO event shall be triggered if the network is found on A band */
  9207. #define WMI_ENLO_FLAG_A_BAND 2
  9208. /* Whether PNO event shall be triggered if the network is found on G band */
  9209. #define WMI_ENLO_FLAG_G_BAND 4
  9210. /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
  9211. #define WMI_ENLO_FLAG_STRICT_MATCH 8
  9212. /* Code for matching the beacon AUTH IE - additional codes TBD open */
  9213. #define WMI_ENLO_AUTH_CODE_OPEN 1
  9214. /* WPA_PSK or WPA2PSK */
  9215. #define WMI_ENLO_AUTH_CODE_PSK 2
  9216. /* any EAPOL */
  9217. #define WMI_ENLO_AUTH_CODE_EAPOL 4
  9218. /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
  9219. typedef struct wmi_nlo_ssid_param {
  9220. A_UINT32 valid;
  9221. wmi_ssid ssid;
  9222. } wmi_nlo_ssid_param;
  9223. /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
  9224. typedef struct wmi_nlo_enc_param {
  9225. A_UINT32 valid;
  9226. A_UINT32 enc_type;
  9227. } wmi_nlo_enc_param;
  9228. /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
  9229. typedef struct wmi_nlo_auth_param {
  9230. A_UINT32 valid;
  9231. A_UINT32 auth_type;
  9232. } wmi_nlo_auth_param;
  9233. /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
  9234. typedef struct wmi_nlo_bcast_nw_param {
  9235. A_UINT32 valid;
  9236. /**
  9237. * If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value
  9238. * should be true/false.Otherwise EPNO is enabled. bcast_nw_type would be used
  9239. * as a bit flag contains WMI_ENLO_FLAG_XXX
  9240. */
  9241. A_UINT32 bcast_nw_type;
  9242. } wmi_nlo_bcast_nw_param;
  9243. /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
  9244. typedef struct wmi_nlo_rssi_param {
  9245. A_UINT32 valid;
  9246. A_INT32 rssi;
  9247. } wmi_nlo_rssi_param;
  9248. typedef struct nlo_configured_parameters {
  9249. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
  9250. wmi_nlo_ssid_param ssid;
  9251. wmi_nlo_enc_param enc_type;
  9252. wmi_nlo_auth_param auth_type;
  9253. wmi_nlo_rssi_param rssi_cond;
  9254. wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
  9255. } nlo_configured_parameters;
  9256. /* Support channel prediction for PNO scan after scanning top_k_num channels
  9257. * if stationary_threshold is met.
  9258. */
  9259. typedef struct nlo_channel_prediction_cfg {
  9260. A_UINT32 tlv_header;
  9261. /* Enable or disable this feature. */
  9262. A_UINT32 enable;
  9263. /* Top K channels will be scanned before deciding whether to further
  9264. * scan or stop. Minimum value is 3 and maximum is 5. */
  9265. A_UINT32 top_k_num;
  9266. /* Preconfigured stationary threshold. Lesser value means more
  9267. * conservative. Bigger value means more aggressive.
  9268. * Maximum is 100 and mininum is 0. */
  9269. A_UINT32 stationary_threshold;
  9270. /* Periodic full channel scan in milliseconds unit.
  9271. * After full_scan_period_ms since last full scan, channel prediction
  9272. * scan is suppressed and will do full scan.
  9273. * This is to help detecting sudden AP power-on or -off.
  9274. * Value 0 means no full scan at all (not recommended).
  9275. */
  9276. A_UINT32 full_scan_period_ms;
  9277. } nlo_channel_prediction_cfg;
  9278. typedef struct enlo_candidate_score_params_t {
  9279. /*
  9280. * TLV tag and len;
  9281. * tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param
  9282. */
  9283. A_UINT32 tlv_header;
  9284. /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
  9285. A_INT32 min5GHz_rssi;
  9286. /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
  9287. A_INT32 min24GHz_rssi;
  9288. /* the maximum score that a network can have before bonuses */
  9289. A_UINT32 initial_score_max;
  9290. /* current_connection_bonus:
  9291. * only report when there is a network's score this much higher
  9292. * than the current connection
  9293. */
  9294. A_UINT32 current_connection_bonus;
  9295. /* score bonus for all networks with the same network flag */
  9296. A_UINT32 same_network_bonus;
  9297. /* score bonus for networks that are not open */
  9298. A_UINT32 secure_bonus;
  9299. /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
  9300. A_UINT32 band5GHz_bonus;
  9301. } enlo_candidate_score_params;
  9302. typedef struct wmi_nlo_config {
  9303. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
  9304. A_UINT32 flags;
  9305. A_UINT32 vdev_id;
  9306. A_UINT32 fast_scan_max_cycles;
  9307. A_UINT32 active_dwell_time;
  9308. A_UINT32 passive_dwell_time; /* PDT in msecs */
  9309. A_UINT32 probe_bundle_size;
  9310. A_UINT32 rest_time; /* ART = IRT */
  9311. A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
  9312. A_UINT32 scan_backoff_multiplier; /* SBM */
  9313. A_UINT32 fast_scan_period; /* SCBM */
  9314. A_UINT32 slow_scan_period; /* specific to windows */
  9315. A_UINT32 no_of_ssids;
  9316. A_UINT32 num_of_channels;
  9317. A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
  9318. /** MAC Address to use in Probe Req as SA **/
  9319. wmi_mac_addr mac_addr;
  9320. /** Mask on which MAC has to be randomized **/
  9321. wmi_mac_addr mac_mask;
  9322. /** IE bitmap to use in Probe Req **/
  9323. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  9324. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  9325. A_UINT32 num_vendor_oui;
  9326. /* The TLVs will follow.
  9327. * nlo_configured_parameters nlo_list[];
  9328. * A_UINT32 channel_list[];
  9329. * nlo_channel_prediction_cfg ch_prediction_cfg;
  9330. * enlo_candidate_score_params candidate_score_params;
  9331. * wmi_vendor_oui vendor_oui[];
  9332. */
  9333. } wmi_nlo_config_cmd_fixed_param;
  9334. typedef struct wmi_nlo_event {
  9335. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
  9336. A_UINT32 vdev_id;
  9337. } wmi_nlo_event;
  9338. /* WMI_PASSPOINT_CONFIG_SET
  9339. * Sets a list for passpoint networks for PNO purposes;
  9340. * it should be matched against any passpoint networks found
  9341. * during regular PNO scan.
  9342. */
  9343. #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
  9344. /* WMI_PASSPOINT_CONFIG_RESET
  9345. * Reset passpoint network list -
  9346. * no Passpoint networks should be matched after this.
  9347. */
  9348. #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
  9349. #define PASSPOINT_REALM_LEN 256
  9350. #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
  9351. #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  9352. #define PASSPOINT_PLMN_ID_LEN 3
  9353. #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
  9354. (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
  9355. /*
  9356. * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
  9357. * A_UINT8 realm[PASSPOINT_REALM_LEN]
  9358. * array will end on a 4-byte boundary.
  9359. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  9360. */
  9361. A_COMPILE_TIME_ASSERT(check_passpoint_realm_size, (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
  9362. /*
  9363. * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
  9364. * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
  9365. * roaming_consortium_ids array below will end on a 4-byte boundary.
  9366. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  9367. */
  9368. A_COMPILE_TIME_ASSERT(check_passpoint_roaming_consortium_ids_size,
  9369. ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
  9370. /* wildcard ID to allow an action (reset) to apply to all networks */
  9371. #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
  9372. typedef struct wmi_passpoint_config {
  9373. /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
  9374. A_UINT32 tlv_header;
  9375. /* (network) id
  9376. * identifier of the matched network, report this in event
  9377. * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
  9378. * that indicates the action should be applied to all networks.
  9379. * Currently, the only action that is applied to all networks is "reset".
  9380. * If a non-wildcard ID is specified, that particular network is configured.
  9381. * If a wildcard ID is specified, all networks are reset.
  9382. */
  9383. A_UINT32 id;
  9384. A_UINT32 req_id;
  9385. /*null terminated UTF8 encoded realm, 0 if unspecified*/
  9386. A_UINT8 realm[PASSPOINT_REALM_LEN];
  9387. /*roaming consortium ids to match, 0s if unspecified*/
  9388. A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN];
  9389. /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
  9390. /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
  9391. A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN];
  9392. } wmi_passpoint_config_cmd_fixed_param;
  9393. typedef struct {
  9394. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  9395. wmi_passpoint_event_hdr */
  9396. A_UINT32 id; /* identifier of the matched network */
  9397. A_UINT32 vdev_id;
  9398. A_UINT32 timestamp; /* time since boot (in microsecond) when the
  9399. result was retrieved*/
  9400. wmi_ssid ssid;
  9401. wmi_mac_addr bssid; /* bssid of the network */
  9402. A_UINT32 channel_mhz; /* channel frequency in MHz */
  9403. A_UINT32 rssi; /* rssi value */
  9404. A_UINT32 rtt; /* timestamp in nanoseconds*/
  9405. A_UINT32 rtt_sd; /* standard deviation in rtt */
  9406. A_UINT32 beacon_period; /* beacon advertised in the beacon */
  9407. A_UINT32 capability; /* capabilities advertised in the beacon */
  9408. A_UINT32 ie_length; /* size of the ie_data blob */
  9409. A_UINT32 anqp_length; /* length of ANQP blob */
  9410. /**
  9411. * Following this structure is the byte stream of ie data of length ie_buf_len:
  9412. * A_UINT8 ie_data[]; // length in byte given by field ie_length, blob of ie data in beacon
  9413. * A_UINT8 anqp_ie[]; // length in byte given by field anqp_len, blob of anqp data of IE
  9414. * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes
  9415. * stream of each ie should be same as BEACON/Action-frm by 802.11 spec
  9416. */
  9417. } wmi_passpoint_event_hdr;
  9418. #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
  9419. /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
  9420. #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
  9421. /** Disable GTK offload */
  9422. #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
  9423. /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
  9424. #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
  9425. enum wmi_chatter_mode {
  9426. /* Chatter enter/exit happens
  9427. * automatically based on preset
  9428. * params
  9429. */
  9430. WMI_CHATTER_MODE_AUTO,
  9431. /* Chatter enter is triggered
  9432. * manually by the user
  9433. */
  9434. WMI_CHATTER_MODE_MANUAL_ENTER,
  9435. /* Chatter exit is triggered
  9436. * manually by the user
  9437. */
  9438. WMI_CHATTER_MODE_MANUAL_EXIT,
  9439. /* Placeholder max value, always last */
  9440. WMI_CHATTER_MODE_MAX
  9441. };
  9442. enum wmi_chatter_query_type {
  9443. /*query coalescing filter match counter */
  9444. WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
  9445. WMI_CHATTER_QUERY_MAX
  9446. };
  9447. typedef struct {
  9448. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
  9449. A_UINT32 chatter_mode;
  9450. } wmi_chatter_set_mode_cmd_fixed_param;
  9451. /** maximum number of filter supported*/
  9452. #define CHATTER_MAX_COALESCING_RULES 11
  9453. /** maximum number of field tests per filter*/
  9454. #define CHATTER_MAX_FIELD_TEST 5
  9455. /** maximum field length in number of DWORDS*/
  9456. #define CHATTER_MAX_TEST_FIELD_LEN32 2
  9457. /** field test kinds*/
  9458. #define CHATTER_COALESCING_TEST_EQUAL 1
  9459. #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
  9460. #define CHATTER_COALESCING_TEST_NOT_EQUAL 3
  9461. /** packet type*/
  9462. #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
  9463. #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
  9464. #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
  9465. /** coalescing field test*/
  9466. typedef struct _chatter_pkt_coalescing_hdr_test {
  9467. /** offset from start of mac header, for windows native wifi host driver
  9468. * should assume standard 802.11 frame format without QoS info and address4
  9469. * FW would account for any non-stand fields for final offset value.
  9470. */
  9471. A_UINT32 offset;
  9472. A_UINT32 length; /* length of test field */
  9473. A_UINT32 test; /*equal, not equal or masked equal */
  9474. A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream */
  9475. A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream */
  9476. } chatter_pkt_coalescing_hdr_test;
  9477. /** packet coalescing filter*/
  9478. typedef struct _chatter_pkt_coalescing_filter {
  9479. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
  9480. A_UINT32 filter_id; /*unique id assigned by OS */
  9481. A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold */
  9482. A_UINT32 pkt_type; /*unicast/multicast/broadcast */
  9483. A_UINT32 num_of_test_field; /*number of field test in table */
  9484. chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl */
  9485. } chatter_pkt_coalescing_filter;
  9486. /** packet coalescing filter add command*/
  9487. typedef struct {
  9488. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
  9489. A_UINT32 num_of_filters;
  9490. /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
  9491. chatter_pkt_coalescing_filter rx_filter[1]; */
  9492. } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
  9493. /** packet coalescing filter delete command*/
  9494. typedef struct {
  9495. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
  9496. A_UINT32 filter_id; /*filter id which will be deleted */
  9497. } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
  9498. /** packet coalescing query command*/
  9499. typedef struct {
  9500. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
  9501. A_UINT32 type; /*type of query */
  9502. } wmi_chatter_coalescing_query_cmd_fixed_param;
  9503. /** chatter query reply event*/
  9504. typedef struct {
  9505. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
  9506. A_UINT32 type; /*query type */
  9507. A_UINT32 filter_match_cnt; /*coalescing filter match counter */
  9508. } wmi_chatter_query_reply_event_fixed_param;
  9509. /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
  9510. * cannot be changed without breaking WMI compatibility. */
  9511. #define GTK_OFFLOAD_KEK_BYTES 16
  9512. #define GTK_OFFLOAD_KCK_BYTES 16
  9513. /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
  9514. #define GTK_REPLAY_COUNTER_BYTES 8
  9515. #define WMI_MAX_KEY_LEN 32
  9516. #define IGTK_PN_SIZE 6
  9517. typedef struct {
  9518. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
  9519. A_UINT32 vdev_id;
  9520. /** unique id identifying the VDEV */
  9521. A_UINT32 flags; /* status flags */
  9522. A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
  9523. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
  9524. A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  9525. A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  9526. A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  9527. A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  9528. } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
  9529. typedef struct {
  9530. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
  9531. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  9532. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  9533. /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
  9534. A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
  9535. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  9536. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  9537. } WMI_GTK_OFFLOAD_CMD_fixed_param;
  9538. typedef struct {
  9539. /* TLV tag and len; tag equals
  9540. * WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param
  9541. */
  9542. A_UINT32 tlv_header;
  9543. A_UINT32 vdev_id;
  9544. A_UINT32 sa_query_retry_interval; /* in msec */
  9545. A_UINT32 sa_query_max_retry_count;
  9546. } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
  9547. typedef enum {
  9548. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
  9549. WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
  9550. WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK */
  9551. /* gratuitous ARP req*/
  9552. WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4,
  9553. } WMI_STA_KEEPALIVE_METHOD;
  9554. typedef struct {
  9555. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
  9556. WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
  9557. WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
  9558. wmi_mac_addr dest_mac_addr; /* destination MAC address */
  9559. } WMI_STA_KEEPALVE_ARP_RESPONSE;
  9560. typedef struct {
  9561. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
  9562. A_UINT32 vdev_id;
  9563. A_UINT32 enable; /* 1 - Enable, 0 - disable */
  9564. A_UINT32 method; /* keep alive method */
  9565. A_UINT32 interval; /* time interval in seconds */
  9566. /*
  9567. * NOTE: following this structure is the TLV for ARP Resonse:
  9568. * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; // ARP response
  9569. */
  9570. } WMI_STA_KEEPALIVE_CMD_fixed_param;
  9571. typedef struct {
  9572. A_UINT32 tlv_header;
  9573. A_UINT32 vdev_id;
  9574. A_UINT32 action;
  9575. } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
  9576. typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
  9577. typedef struct {
  9578. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
  9579. A_UINT32 vdev_id;
  9580. A_UINT32 keepaliveInterval; /* seconds */
  9581. A_UINT32 keepaliveMethod;
  9582. } wmi_vdev_set_keepalive_cmd_fixed_param;
  9583. typedef struct {
  9584. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
  9585. A_UINT32 vdev_id;
  9586. } wmi_vdev_get_keepalive_cmd_fixed_param;
  9587. typedef struct {
  9588. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
  9589. A_UINT32 vdev_id;
  9590. A_UINT32 keepaliveInterval; /* seconds */
  9591. A_UINT32 keepaliveMethod; /* seconds */
  9592. } wmi_vdev_get_keepalive_event_fixed_param;
  9593. #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
  9594. #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
  9595. typedef struct {
  9596. A_UINT32 tlv_header;
  9597. A_UINT32 vdev_id;
  9598. A_UINT32 action;
  9599. } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
  9600. typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param
  9601. WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
  9602. typedef struct {
  9603. A_UINT32 tlv_header;
  9604. A_UINT32 vdev_id;
  9605. A_UINT32 mcc_tbttmode;
  9606. wmi_mac_addr mcc_bssid;
  9607. } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
  9608. typedef struct {
  9609. A_UINT32 tlv_header;
  9610. A_UINT32 vdev_id; /* home vdev id */
  9611. A_UINT32 meas_token; /* from measure request frame */
  9612. A_UINT32 dialog_token;
  9613. A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
  9614. A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst */
  9615. A_UINT32 burst_cycle; /* times cycle through within one burst */
  9616. A_UINT32 tx_power; /* for path frame */
  9617. A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
  9618. wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
  9619. A_UINT32 num_chans;
  9620. } wmi_vdev_plmreq_start_cmd_fixed_param;
  9621. typedef struct {
  9622. A_UINT32 tlv_header;
  9623. A_UINT32 vdev_id;
  9624. A_UINT32 meas_token; /* same value from req */
  9625. } wmi_vdev_plmreq_stop_cmd_fixed_param;
  9626. typedef struct {
  9627. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
  9628. A_UINT32 tlv_header;
  9629. /* unique id identifying the VDEV, generated by the caller */
  9630. A_UINT32 vdev_id;
  9631. /* enable/disable NoA */
  9632. A_UINT32 enable;
  9633. /** number of NoA desc. In the TLV noa_descriptor[] */
  9634. A_UINT32 num_noa;
  9635. /**
  9636. * TLV (tag length value ) paramerters follow the pattern structure.
  9637. * TLV contain NoA desc with num of num_noa
  9638. */
  9639. } wmi_p2p_set_noa_cmd_fixed_param;
  9640. typedef struct {
  9641. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
  9642. A_UINT32 tlv_header;
  9643. /* unique id identifying the VDEV, generated by the caller */
  9644. A_UINT32 vdev_id;
  9645. /* Identify the wlan module */
  9646. A_UINT32 module_id;
  9647. /* Num of test arguments passed */
  9648. A_UINT32 num_args;
  9649. /**
  9650. * TLV (tag length value ) parameters follow the wmi_roam_chan_list
  9651. * structure. The TLV's are:
  9652. * A_UINT32 args[];
  9653. **/
  9654. } wmi_unit_test_cmd_fixed_param;
  9655. /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
  9656. * after it received WMI_ROAM_SYNCH_EVENTID.
  9657. */
  9658. typedef struct {
  9659. A_UINT32 tlv_header;
  9660. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
  9661. /** unique id identifying the VDEV, generated by the caller */
  9662. A_UINT32 vdev_id;
  9663. } wmi_roam_synch_complete_fixed_param;
  9664. typedef enum {
  9665. RECOVERY_SIM_ASSERT = 0x01,
  9666. RECOVERY_SIM_NO_DETECT = 0x02,
  9667. RECOVERY_SIM_CTR_EP_FULL = 0x03,
  9668. RECOVERY_SIM_EMPTY_POINT = 0x04,
  9669. RECOVERY_SIM_STACK_OV = 0x05,
  9670. RECOVERY_SIM_INFINITE_LOOP = 0x06,
  9671. RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
  9672. RECOVERY_SIM_SELF_RECOVERY = 0x08,
  9673. } RECOVERY_SIM_TYPE;
  9674. /* WMI_FORCE_FW_HANG_CMDID */
  9675. typedef struct {
  9676. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
  9677. A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:... */
  9678. A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) */
  9679. } WMI_FORCE_FW_HANG_CMD_fixed_param;
  9680. typedef enum {
  9681. WMI_MCAST_FILTER_SET = 1,
  9682. WMI_MCAST_FILTER_DELETE
  9683. } WMI_SET_SINGLE_MCAST_FILTER_OP;
  9684. typedef struct {
  9685. A_UINT32 tlv_header;
  9686. A_UINT32 vdev_id;
  9687. A_UINT32 index;
  9688. A_UINT32 action;
  9689. wmi_mac_addr mcastbdcastaddr;
  9690. } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
  9691. typedef enum {
  9692. WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
  9693. /* clear all previous mc list, and set new list */
  9694. WMI_MULTIPLE_MCAST_FILTER_SET,
  9695. WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
  9696. WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
  9697. } WMI_MULTIPLE_MCAST_FILTER_OP;
  9698. typedef struct {
  9699. A_UINT32 tlv_header;
  9700. A_UINT32 vdev_id;
  9701. A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
  9702. /* number of elements in the subsequent mcast addr list */
  9703. A_UINT32 num_mcastaddrs;
  9704. /**
  9705. * TLV (tag length value) parameters follow the
  9706. * structure. The TLV's are:
  9707. * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
  9708. */
  9709. } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
  9710. /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
  9711. typedef enum {
  9712. WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
  9713. WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
  9714. } WMI_TIME_STAMP_SYNC_MODE;
  9715. typedef struct {
  9716. /*
  9717. * TLV tag and len; tag equals
  9718. * WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param
  9719. */
  9720. A_UINT32 tlv_header;
  9721. /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
  9722. A_UINT32 mode;
  9723. A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
  9724. A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
  9725. } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
  9726. /* GPIO Command and Event data structures */
  9727. /* WMI_GPIO_CONFIG_CMDID */
  9728. enum {
  9729. WMI_GPIO_PULL_NONE,
  9730. WMI_GPIO_PULL_UP,
  9731. WMI_GPIO_PULL_DOWN,
  9732. };
  9733. enum {
  9734. WMI_GPIO_INTTYPE_DISABLE,
  9735. WMI_GPIO_INTTYPE_RISING_EDGE,
  9736. WMI_GPIO_INTTYPE_FALLING_EDGE,
  9737. WMI_GPIO_INTTYPE_BOTH_EDGE,
  9738. WMI_GPIO_INTTYPE_LEVEL_LOW,
  9739. WMI_GPIO_INTTYPE_LEVEL_HIGH
  9740. };
  9741. typedef struct {
  9742. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
  9743. A_UINT32 gpio_num; /* GPIO number to be setup */
  9744. A_UINT32 input; /* 0 - Output/ 1 - Input */
  9745. A_UINT32 pull_type; /* Pull type defined above */
  9746. A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
  9747. } wmi_gpio_config_cmd_fixed_param;
  9748. /* WMI_GPIO_OUTPUT_CMDID */
  9749. typedef struct {
  9750. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
  9751. A_UINT32 gpio_num; /* GPIO number to be setup */
  9752. A_UINT32 set; /* Set the GPIO pin */
  9753. } wmi_gpio_output_cmd_fixed_param;
  9754. /* WMI_GPIO_INPUT_EVENTID */
  9755. typedef struct {
  9756. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
  9757. A_UINT32 gpio_num; /* GPIO number which changed state */
  9758. } wmi_gpio_input_event_fixed_param;
  9759. /* WMI_P2P_DISC_EVENTID */
  9760. enum {
  9761. P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
  9762. P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
  9763. };
  9764. enum {
  9765. P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload */
  9766. P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload */
  9767. P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload */
  9768. };
  9769. enum {
  9770. P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
  9771. P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
  9772. };
  9773. typedef struct {
  9774. A_UINT32 vdev_id;
  9775. A_UINT32 reason; /* P2P DISC wake up reason */
  9776. } wmi_p2p_disc_event;
  9777. typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param
  9778. WOW_EVENT_INFO_SECTION_GTKIGTK;
  9779. typedef enum {
  9780. WMI_FAKE_TXBFER_SEND_NDPA,
  9781. WMI_FAKE_TXBFER_SEND_MU,
  9782. WMI_FAKE_TXBFER_NDPA_FBTYPE,
  9783. WMI_FAKE_TXBFER_NDPA_NCIDX,
  9784. WMI_FAKE_TXBFER_NDPA_POLL,
  9785. WMI_FAKE_TXBFER_NDPA_BW,
  9786. WMI_FAKE_TXBFER_NDPA_PREAMBLE,
  9787. WMI_FAKE_TXBFER_NDPA_RATE,
  9788. WMI_FAKE_TXBFER_NDP_BW,
  9789. WMI_FAKE_TXBFER_NDP_NSS,
  9790. WMI_TXBFEE_ENABLE_UPLOAD_H,
  9791. WMI_TXBFEE_ENABLE_CAPTURE_H,
  9792. WMI_TXBFEE_SET_CBF_TBL,
  9793. WMI_TXBFEE_CBF_TBL_LSIG,
  9794. WMI_TXBFEE_CBF_TBL_SIGA1,
  9795. WMI_TXBFEE_CBF_TBL_SIGA2,
  9796. WMI_TXBFEE_CBF_TBL_SIGB,
  9797. WMI_TXBFEE_CBF_TBL_PAD,
  9798. WMI_TXBFEE_CBF_TBL_DUR,
  9799. WMI_TXBFEE_SU_NCIDX,
  9800. WMI_TXBFEE_CBIDX,
  9801. WMI_TXBFEE_NGIDX,
  9802. } WMI_TXBF_PARAM_ID;
  9803. typedef struct {
  9804. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
  9805. /** parameter id */
  9806. A_UINT32 param_id;
  9807. /** parameter value */
  9808. A_UINT32 param_value;
  9809. } wmi_txbf_cmd_fixed_param;
  9810. typedef struct {
  9811. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
  9812. A_UINT32 h_length;
  9813. A_UINT32 cv_length;
  9814. /* This TLV is followed by array of bytes:
  9815. * // h_cv info buffer
  9816. * A_UINT8 bufp[];
  9817. */
  9818. } wmi_upload_h_hdr;
  9819. typedef struct {
  9820. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
  9821. A_UINT32 svd_num;
  9822. A_UINT32 tone_num;
  9823. A_UINT32 reserved;
  9824. } wmi_capture_h_event_hdr;
  9825. typedef struct {
  9826. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
  9827. A_UINT32 start_freq; /* start frequency, not channel center freq */
  9828. A_UINT32 end_freq; /* end frequency */
  9829. } wmi_avoid_freq_range_desc;
  9830. typedef struct {
  9831. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
  9832. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  9833. A_UINT32 num_freq_ranges;
  9834. /* The TLVs will follow.
  9835. * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
  9836. * wmi_avoid_freq_range_desc avd_freq_range[]; // message buffer, NULL terminated
  9837. */
  9838. } wmi_avoid_freq_ranges_event_fixed_param;
  9839. typedef struct {
  9840. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
  9841. /** Reserved for future use */
  9842. A_UINT32 reserved0;
  9843. A_UINT32 vdev_id;
  9844. } wmi_gtk_rekey_fail_event_fixed_param;
  9845. enum wmm_ac_downgrade_policy {
  9846. WMM_AC_DOWNGRADE_DEPRIO,
  9847. WMM_AC_DOWNGRADE_DROP,
  9848. WMM_AC_DOWNGRADE_INVALID,
  9849. };
  9850. /* WMM EDCA Params type */
  9851. #define WMM_PARAM_TYPE_LEGACY 0
  9852. /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
  9853. #define WMM_PARAM_TYPE_11AX_EDCA 1
  9854. typedef struct {
  9855. A_UINT32 tlv_header;
  9856. A_UINT32 cwmin;
  9857. A_UINT32 cwmax;
  9858. A_UINT32 aifs;
  9859. A_UINT32 txoplimit;
  9860. A_UINT32 acm;
  9861. A_UINT32 no_ack;
  9862. } wmi_wmm_vparams;
  9863. typedef struct {
  9864. A_UINT32 tlv_header;
  9865. A_UINT32 vdev_id;
  9866. wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
  9867. A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
  9868. } wmi_vdev_set_wmm_params_cmd_fixed_param;
  9869. typedef struct {
  9870. A_UINT32 tlv_header;
  9871. A_UINT32 vdev_id;
  9872. A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
  9873. A_UINT32 userGtxMask; /* host request for GTX mask */
  9874. A_UINT32 gtxPERThreshold; /* default: 10% */
  9875. A_UINT32 gtxPERMargin; /* default: 2% */
  9876. A_UINT32 gtxTPCstep; /* default: 1 */
  9877. A_UINT32 gtxTPCMin; /* default: 5 */
  9878. A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
  9879. } wmi_vdev_set_gtx_params_cmd_fixed_param;
  9880. typedef struct {
  9881. A_UINT32 tlv_header;
  9882. A_UINT32 vdev_id;
  9883. A_UINT32 ac;
  9884. A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
  9885. A_UINT32 downgrade_type;
  9886. } wmi_vdev_wmm_addts_cmd_fixed_param;
  9887. typedef struct {
  9888. A_UINT32 tlv_header;
  9889. A_UINT32 vdev_id;
  9890. A_UINT32 ac;
  9891. } wmi_vdev_wmm_delts_cmd_fixed_param;
  9892. /* DEPRECATED */
  9893. typedef struct {
  9894. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
  9895. /** Reserved for future use */
  9896. A_UINT32 reserved0;
  9897. } wmi_pdev_dfs_enable_cmd_fixed_param;
  9898. /* DEPRECATED */
  9899. typedef struct {
  9900. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
  9901. /** pdev_id for identifying the MAC
  9902. * See macros starting with WMI_PDEV_ID_ for values.
  9903. */
  9904. A_UINT32 pdev_id;
  9905. } wmi_pdev_dfs_disable_cmd_fixed_param;
  9906. typedef struct {
  9907. /** TLV tag and len; tag equals
  9908. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
  9909. */
  9910. A_UINT32 tlv_header;
  9911. /** pdev_id for identifying the MAC
  9912. * See macros starting with WMI_PDEV_ID_ for values.
  9913. */
  9914. A_UINT32 pdev_id;
  9915. } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
  9916. typedef struct {
  9917. /** TLV tag and len; tag equals
  9918. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
  9919. */
  9920. A_UINT32 tlv_header;
  9921. /** pdev_id for identifying the MAC
  9922. * See macros starting with WMI_PDEV_ID_ for values.
  9923. */
  9924. A_UINT32 pdev_id;
  9925. } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
  9926. typedef struct {
  9927. A_UINT32 tlv_header;
  9928. A_UINT32 pdev_id;
  9929. } wmi_pdev_dfs_phyerr_offload_enable_cmd_fixed_param;
  9930. typedef struct {
  9931. A_UINT32 tlv_header;
  9932. A_UINT32 pdev_id;
  9933. } wmi_pdev_dfs_phyerr_offload_disable_cmd_fixed_param;
  9934. typedef enum {
  9935. QUICK_OCAC = 0,
  9936. EXTENSIVE_OCAC,
  9937. } WMI_ADFS_OCAC_MODE;
  9938. typedef struct {
  9939. A_UINT32 tlv_header;
  9940. A_UINT32 vdev_id;
  9941. A_UINT32 ocac_mode; /* WMI_ADFS_OCAC_MODE */
  9942. A_UINT32 min_duration_ms; /* in milliseconds */
  9943. A_UINT32 max_duration_ms; /* in milliseconds */
  9944. A_UINT32 chan_freq; /* in MHz */
  9945. A_UINT32 chan_width; /* in MHz */
  9946. A_UINT32 center_freq; /* in MHz */
  9947. } wmi_vdev_adfs_ch_cfg_cmd_fixed_param;
  9948. typedef struct {
  9949. A_UINT32 tlv_header;
  9950. A_UINT32 vdev_id;
  9951. } wmi_vdev_adfs_ocac_abort_cmd_fixed_param;
  9952. typedef enum {
  9953. IN_SERVICE_MODE = 0,
  9954. OCAC_MODE,
  9955. } WMI_DFS_RADAR_DETECTION_MODE;
  9956. typedef struct {
  9957. A_UINT32 tlv_header;
  9958. A_UINT32 pdev_id;
  9959. /* In-service mode or O-CAC mode */
  9960. A_UINT32 detection_mode; /* WMI_DFS_RADAR_DETECTION_MODE */
  9961. A_UINT32 chan_freq; /* in MHz */
  9962. A_UINT32 chan_width; /* in MHz */
  9963. A_UINT32 detector_id;
  9964. A_UINT32 segment_id;
  9965. A_UINT32 timestamp;
  9966. A_UINT32 is_chirp;
  9967. } wmi_pdev_dfs_radar_detection_event_fixed_param;
  9968. typedef enum {
  9969. OCAC_COMPLETE = 0,
  9970. OCAC_ABORT,
  9971. } WMI_VDEV_OCAC_COMPLETE_STATUS;
  9972. typedef struct {
  9973. A_UINT32 tlv_header;
  9974. A_UINT32 vdev_id;
  9975. A_UINT32 chan_freq; /* in MHz */
  9976. A_UINT32 chan_width; /* in MHz */
  9977. A_UINT32 center_freq; /* in MHz */
  9978. A_UINT32 status; /* WMI_VDEV_OCAC_COMPLETE_STATUS */
  9979. } wmi_vdev_adfs_ocac_complete_event_fixed_param;
  9980. typedef struct {
  9981. A_UINT32 tlv_header;
  9982. A_UINT32 vdev_id;
  9983. } wmi_vdev_dfs_cac_complete_event_fixed_param;
  9984. /** TDLS COMMANDS */
  9985. /* WMI_TDLS_SET_STATE_CMDID */
  9986. /* TDLS State */
  9987. enum wmi_tdls_state {
  9988. /** TDLS disable */
  9989. WMI_TDLS_DISABLE,
  9990. /** TDLS enabled - no firmware connection tracking/notifications */
  9991. WMI_TDLS_ENABLE_PASSIVE,
  9992. /** TDLS enabled - with firmware connection tracking/notifications */
  9993. WMI_TDLS_ENABLE_ACTIVE,
  9994. /* TDLS enabled - firmware waits for peer mac for connection tracking */
  9995. WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
  9996. /** TDLS enabled - TDLS connection tracking is done in host */
  9997. WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
  9998. };
  9999. /* TDLS Options */
  10000. #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
  10001. #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
  10002. #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
  10003. typedef struct {
  10004. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
  10005. A_UINT32 tlv_header;
  10006. /** unique id identifying the VDEV */
  10007. A_UINT32 vdev_id;
  10008. /** Enable/Disable TDLS (wmi_tdls_state) */
  10009. A_UINT32 state;
  10010. /* Duration (in ms) over which to calculate tx/rx threshold
  10011. * to trigger TDLS Discovery
  10012. */
  10013. A_UINT32 notification_interval_ms;
  10014. /** number of packets OVER which notify/suggest TDLS Discovery:
  10015. * if current tx pps counter / notification interval >= threshold
  10016. * then a notification will be sent to host to advise TDLS Discovery */
  10017. A_UINT32 tx_discovery_threshold;
  10018. /** number of packets UNDER which notify/suggest TDLS Teardown:
  10019. * if current tx pps counter / notification interval < threshold
  10020. * then a notification will be sent to host to advise TDLS Tear down */
  10021. A_UINT32 tx_teardown_threshold;
  10022. /** Absolute RSSI value under which notify/suggest TDLS Teardown */
  10023. A_INT32 rssi_teardown_threshold;
  10024. /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
  10025. A_INT32 rssi_delta;
  10026. /** TDLS Option Control
  10027. * Off-Channel, Buffer STA, (later)Sleep STA support */
  10028. A_UINT32 tdls_options;
  10029. /* Buffering time in number of beacon intervals */
  10030. A_UINT32 tdls_peer_traffic_ind_window;
  10031. /* Wait time for PTR frame */
  10032. A_UINT32 tdls_peer_traffic_response_timeout_ms;
  10033. /* Self PUAPSD mask */
  10034. A_UINT32 tdls_puapsd_mask;
  10035. /* Inactivity timeout */
  10036. A_UINT32 tdls_puapsd_inactivity_time_ms;
  10037. /* Max of rx frame during SP */
  10038. A_UINT32 tdls_puapsd_rx_frame_threshold;
  10039. /* Duration (in ms) over which to check whether TDLS link
  10040. * needs to be torn down
  10041. */
  10042. A_UINT32 teardown_notification_ms;
  10043. /* STA kickout threshold for TDLS peer */
  10044. A_UINT32 tdls_peer_kickout_threshold;
  10045. } wmi_tdls_set_state_cmd_fixed_param;
  10046. /* WMI_TDLS_PEER_UPDATE_CMDID */
  10047. enum wmi_tdls_peer_state {
  10048. /** tx peer TDLS link setup now starting, traffic to DA should be
  10049. * paused (except TDLS frames) until state is moved to CONNECTED (or
  10050. * TEARDOWN on setup failure) */
  10051. WMI_TDLS_PEER_STATE_PEERING,
  10052. /** tx peer TDLS link established, running (all traffic to DA unpaused) */
  10053. WMI_TDLS_PEER_STATE_CONNECTED,
  10054. /** tx peer TDLS link tear down started (link paused, any frames
  10055. * queued for DA will be requeued back through the AP)*/
  10056. WMI_TDLS_PEER_STATE_TEARDOWN,
  10057. /* Add peer mac into connection table */
  10058. WMI_TDLS_PEER_ADD_MAC_ADDR,
  10059. /* Remove peer mac from connection table */
  10060. WMI_TDLS_PEER_REMOVE_MAC_ADDR,
  10061. };
  10062. /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
  10063. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  10064. typedef struct {
  10065. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
  10066. A_UINT32 tlv_header;
  10067. /* Peer's QoS Info - for U-APSD */
  10068. /* AC FLAGS - accessed through macros below */
  10069. /* Ack, SP, More Data Ack - accessed through macros below */
  10070. A_UINT32 peer_qos;
  10071. /*TDLS Peer's U-APSD Buffer STA Support */
  10072. A_UINT32 buff_sta_support;
  10073. /*TDLS off channel related params */
  10074. A_UINT32 off_chan_support;
  10075. A_UINT32 peer_curr_operclass;
  10076. A_UINT32 self_curr_operclass;
  10077. /* Number of channels available for off channel operation */
  10078. A_UINT32 peer_chan_len;
  10079. A_UINT32 peer_operclass_len;
  10080. A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  10081. /* Is peer initiator or responder of TDLS setup request */
  10082. A_UINT32 is_peer_responder;
  10083. /* Preferred off channel number as configured by user */
  10084. A_UINT32 pref_offchan_num;
  10085. /* Preferred off channel bandwidth as configured by user */
  10086. A_UINT32 pref_offchan_bw;
  10087. /** Followed by the variable length TLV peer_chan_list:
  10088. * wmi_channel peer_chan_list[].
  10089. * Array size would be peer_chan_len.
  10090. * This array is intersected channels which is supported by both peer
  10091. * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
  10092. * FW shall compute BW for an offchan based on peer's ht/vht cap
  10093. * received in peer_assoc cmd during change STA operation
  10094. */
  10095. } wmi_tdls_peer_capabilities;
  10096. #define WMI_TDLS_QOS_VO_FLAG 0
  10097. #define WMI_TDLS_QOS_VI_FLAG 1
  10098. #define WMI_TDLS_QOS_BK_FLAG 2
  10099. #define WMI_TDLS_QOS_BE_FLAG 3
  10100. #define WMI_TDLS_QOS_ACK_FLAG 4
  10101. #define WMI_TDLS_QOS_SP_FLAG 5
  10102. #define WMI_TDLS_QOS_MOREDATA_FLAG 7
  10103. #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, flag) do { \
  10104. (ppeer_caps)->peer_qos |= (1 << flag); \
  10105. } while (0)
  10106. #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, flag) \
  10107. (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
  10108. #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  10109. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  10110. #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  10111. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  10112. #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  10113. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  10114. #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  10115. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  10116. #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  10117. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  10118. #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  10119. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  10120. #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  10121. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  10122. #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  10123. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  10124. #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  10125. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  10126. #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  10127. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  10128. /* SP has 2 bits */
  10129. #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps, val) do { \
  10130. (ppeer_caps)->peer_qos |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
  10131. } while (0)
  10132. #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
  10133. (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  10134. #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  10135. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  10136. #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  10137. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  10138. #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, flag) do { \
  10139. (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
  10140. } while (0)
  10141. #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, flag) \
  10142. (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
  10143. #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  10144. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  10145. #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  10146. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  10147. #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  10148. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  10149. #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  10150. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  10151. #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
  10152. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  10153. #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
  10154. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  10155. #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  10156. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  10157. #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  10158. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  10159. #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  10160. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  10161. #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  10162. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  10163. /* SP has 2 bits */
  10164. #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd, val) do { \
  10165. (pset_cmd)->tdls_puapsd_mask |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
  10166. } while (0)
  10167. #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
  10168. (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  10169. #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  10170. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  10171. #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  10172. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  10173. typedef struct {
  10174. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
  10175. A_UINT32 tlv_header;
  10176. /** unique id identifying the VDEV */
  10177. A_UINT32 vdev_id;
  10178. /** peer MAC address */
  10179. wmi_mac_addr peer_macaddr;
  10180. /** new TDLS state for peer (wmi_tdls_peer_state) */
  10181. A_UINT32 peer_state;
  10182. /* The TLV for wmi_tdls_peer_capabilities will follow.
  10183. * wmi_tdls_peer_capabilities peer_caps;
  10184. */
  10185. /** Followed by the variable length TLV chan_info:
  10186. * wmi_channel chan_info[] */
  10187. } wmi_tdls_peer_update_cmd_fixed_param;
  10188. /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
  10189. /* bitmap 20, 40, 80 or 160 MHz wide channel */
  10190. #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
  10191. #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
  10192. #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
  10193. #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
  10194. enum wmi_tdls_offchan_mode {
  10195. WMI_TDLS_ENABLE_OFFCHANNEL,
  10196. WMI_TDLS_DISABLE_OFFCHANNEL
  10197. };
  10198. typedef struct {
  10199. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
  10200. A_UINT32 tlv_header;
  10201. /** unique id identifying the VDEV */
  10202. A_UINT32 vdev_id;
  10203. /** Enable/Disable TDLS offchannel */
  10204. A_UINT32 offchan_mode;
  10205. /** peer MAC address */
  10206. wmi_mac_addr peer_macaddr;
  10207. /* Is peer initiator or responder of TDLS setup request */
  10208. A_UINT32 is_peer_responder;
  10209. /* off channel number */
  10210. A_UINT32 offchan_num;
  10211. /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
  10212. A_UINT32 offchan_bw_bitmap;
  10213. /* operating class for offchan */
  10214. A_UINT32 offchan_oper_class;
  10215. } wmi_tdls_set_offchan_mode_cmd_fixed_param;
  10216. /** TDLS EVENTS */
  10217. enum wmi_tdls_peer_notification {
  10218. /** tdls discovery recommended for peer (based
  10219. * on tx bytes per second > tx_discover threshold) */
  10220. WMI_TDLS_SHOULD_DISCOVER,
  10221. /** tdls link tear down recommended for peer
  10222. * due to tx bytes per second below tx_teardown_threshold
  10223. * NB: this notification sent once */
  10224. WMI_TDLS_SHOULD_TEARDOWN,
  10225. /** tx peer TDLS link tear down complete */
  10226. WMI_TDLS_PEER_DISCONNECTED,
  10227. /** TDLS/BT role change notification for connection tracker */
  10228. WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
  10229. };
  10230. enum wmi_tdls_peer_reason {
  10231. /** tdls teardown recommended due to low transmits */
  10232. WMI_TDLS_TEARDOWN_REASON_TX,
  10233. /** tdls link tear down recommended due to poor RSSI */
  10234. WMI_TDLS_TEARDOWN_REASON_RSSI,
  10235. /** tdls link tear down recommended due to offchannel scan */
  10236. WMI_TDLS_TEARDOWN_REASON_SCAN,
  10237. /** tdls peer disconnected due to peer deletion */
  10238. WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
  10239. /** tdls peer disconnected due to PTR timeout */
  10240. WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
  10241. /** tdls peer disconnected due wrong PTR format */
  10242. WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
  10243. /** tdls peer not responding */
  10244. WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
  10245. /*
  10246. * tdls entered buffer STA role, TDLS connection tracker
  10247. * needs to handle this
  10248. */
  10249. WMI_TDLS_ENTER_BUF_STA,
  10250. /*
  10251. * tdls exited buffer STA role, TDLS connection tracker
  10252. * needs to handle this
  10253. */
  10254. WMI_TDLS_EXIT_BUF_STA,
  10255. /* BT entered busy mode, TDLS connection tracker needs to handle this */
  10256. WMI_TDLS_ENTER_BT_BUSY_MODE,
  10257. /** BT exited busy mode, TDLS connection tracker needs to handle this */
  10258. WMI_TDLS_EXIT_BT_BUSY_MODE,
  10259. /*
  10260. * TDLS module received a scan start event, TDLS connection tracker
  10261. * needs to handle this
  10262. */
  10263. WMI_TDLS_SCAN_STARTED_EVENT,
  10264. /*
  10265. * TDLS module received a scan complete event, TDLS connection tracker
  10266. * needs to handle this
  10267. */
  10268. WMI_TDLS_SCAN_COMPLETED_EVENT,
  10269. };
  10270. /* WMI_TDLS_PEER_EVENTID */
  10271. typedef struct {
  10272. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
  10273. A_UINT32 tlv_header;
  10274. /** peer MAC address */
  10275. wmi_mac_addr peer_macaddr;
  10276. /** TDLS peer status (wmi_tdls_peer_notification)*/
  10277. A_UINT32 peer_status;
  10278. /** TDLS peer reason (wmi_tdls_peer_reason) */
  10279. A_UINT32 peer_reason;
  10280. /** unique id identifying the VDEV */
  10281. A_UINT32 vdev_id;
  10282. } wmi_tdls_peer_event_fixed_param;
  10283. /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
  10284. don't use this for any new implementations */
  10285. typedef struct {
  10286. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
  10287. /** unique id identifying the VDEV, generated by the caller */
  10288. A_UINT32 vdev_id;
  10289. /* New beacon interval to be used for the specified VDEV suggested by firmware */
  10290. A_UINT32 new_bcn_intvl;
  10291. } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
  10292. /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
  10293. typedef struct {
  10294. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
  10295. A_UINT32 tlv_header;
  10296. /** 1: enable fw based adaptive ocs,
  10297. * 0: disable fw based adaptive ocs
  10298. */
  10299. A_UINT32 enable;
  10300. /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
  10301. union {
  10302. /* OBSOLETE - will be removed once all refs are gone */
  10303. A_UINT32 mac_id;
  10304. /** pdev_id for identifying the MAC
  10305. * See macros starting with WMI_PDEV_ID_ for values.
  10306. */
  10307. A_UINT32 pdev_id;
  10308. };
  10309. } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
  10310. /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
  10311. typedef struct {
  10312. /* Frequency of the channel for which the quota is set */
  10313. A_UINT32 chan_mhz;
  10314. /* Requested channel time quota expressed as percentage */
  10315. A_UINT32 channel_time_quota;
  10316. } wmi_resmgr_chan_time_quota;
  10317. typedef struct {
  10318. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
  10319. A_UINT32 tlv_header;
  10320. /** number of channel time quota command structures
  10321. * (wmi_resmgr_chan_time_quota) 1 or 2
  10322. */
  10323. A_UINT32 num_chans;
  10324. /* This TLV is followed by another TLV of array of bytes
  10325. * A_UINT8 data[];
  10326. * This data array contains
  10327. * num_chans * size of(struct wmi_resmgr_chan_time_quota)
  10328. */
  10329. } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
  10330. /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
  10331. typedef struct {
  10332. /* Frequency of the channel for which the latency is set */
  10333. A_UINT32 chan_mhz;
  10334. /* Requested channel latency in milliseconds */
  10335. A_UINT32 latency;
  10336. } wmi_resmgr_chan_latency;
  10337. typedef struct {
  10338. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
  10339. A_UINT32 tlv_header;
  10340. /** number of channel latency command structures
  10341. * (wmi_resmgr_chan_latency) 1 or 2
  10342. */
  10343. A_UINT32 num_chans;
  10344. /* This TLV is followed by another TLV of array of bytes
  10345. * A_UINT8 data[];
  10346. * This data array contains
  10347. * num_chans * size of(struct wmi_resmgr_chan_latency)
  10348. */
  10349. } wmi_resmgr_set_chan_latency_cmd_fixed_param;
  10350. /* WMI_STA_SMPS_FORCE_MODE_CMDID */
  10351. /** STA SMPS Forced Mode */
  10352. typedef enum {
  10353. WMI_SMPS_FORCED_MODE_NONE = 0,
  10354. WMI_SMPS_FORCED_MODE_DISABLED,
  10355. WMI_SMPS_FORCED_MODE_STATIC,
  10356. WMI_SMPS_FORCED_MODE_DYNAMIC
  10357. } wmi_sta_smps_forced_mode;
  10358. typedef struct {
  10359. /** TLV tag and len; tag equals
  10360. * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
  10361. A_UINT32 tlv_header;
  10362. /** Unique id identifying the VDEV */
  10363. A_UINT32 vdev_id;
  10364. /** The mode of SMPS that is to be forced in the FW. */
  10365. A_UINT32 forced_mode;
  10366. } wmi_sta_smps_force_mode_cmd_fixed_param;
  10367. /** wlan HB commands */
  10368. #define WMI_WLAN_HB_ITEM_UDP 0x1
  10369. #define WMI_WLAN_HB_ITEM_TCP 0x2
  10370. #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE, must be a multiple of 4 bytes */
  10371. typedef struct {
  10372. /** TLV tag and len; tag equals
  10373. * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
  10374. A_UINT32 tlv_header;
  10375. A_UINT32 vdev_id;
  10376. A_UINT32 enable;
  10377. A_UINT32 item;
  10378. A_UINT32 session;
  10379. } wmi_hb_set_enable_cmd_fixed_param;
  10380. typedef struct {
  10381. /** TLV tag and len; tag equals
  10382. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
  10383. A_UINT32 tlv_header;
  10384. A_UINT32 vdev_id;
  10385. A_UINT32 srv_ip;
  10386. A_UINT32 dev_ip;
  10387. A_UINT32 seq;
  10388. A_UINT32 src_port;
  10389. A_UINT32 dst_port;
  10390. A_UINT32 interval;
  10391. A_UINT32 timeout;
  10392. A_UINT32 session;
  10393. wmi_mac_addr gateway_mac;
  10394. } wmi_hb_set_tcp_params_cmd_fixed_param;
  10395. typedef struct {
  10396. /** TLV tag and len; tag equals
  10397. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
  10398. A_UINT32 tlv_header;
  10399. A_UINT32 vdev_id;
  10400. A_UINT32 length;
  10401. A_UINT32 offset;
  10402. A_UINT32 session;
  10403. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  10404. } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
  10405. typedef struct {
  10406. /** TLV tag and len; tag equals
  10407. * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
  10408. A_UINT32 tlv_header;
  10409. A_UINT32 vdev_id;
  10410. A_UINT32 srv_ip;
  10411. A_UINT32 dev_ip;
  10412. A_UINT32 src_port;
  10413. A_UINT32 dst_port;
  10414. A_UINT32 interval;
  10415. A_UINT32 timeout;
  10416. A_UINT32 session;
  10417. wmi_mac_addr gateway_mac;
  10418. } wmi_hb_set_udp_params_cmd_fixed_param;
  10419. typedef struct {
  10420. /** TLV tag and len; tag equals
  10421. * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
  10422. A_UINT32 tlv_header;
  10423. A_UINT32 vdev_id;
  10424. A_UINT32 length;
  10425. A_UINT32 offset;
  10426. A_UINT32 session;
  10427. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  10428. } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
  10429. /** wlan HB events */
  10430. typedef enum {
  10431. WMI_WLAN_HB_REASON_UNKNOWN = 0,
  10432. WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
  10433. WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
  10434. } WMI_HB_WAKEUP_REASON;
  10435. typedef struct {
  10436. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
  10437. A_UINT32 vdev_id; /* unique id identifying the VDEV */
  10438. A_UINT32 session; /* Session ID from driver */
  10439. A_UINT32 reason; /* wakeup reason */
  10440. } wmi_hb_ind_event_fixed_param;
  10441. /** WMI_STA_SMPS_PARAM_CMDID */
  10442. typedef enum {
  10443. /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
  10444. WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
  10445. /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
  10446. * to enter D-SMPS mode from Stalled-D-SMPS mode */
  10447. WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
  10448. /** RSSI threshold to disable SMPS modes */
  10449. WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
  10450. /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
  10451. WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
  10452. /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
  10453. WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
  10454. /** Enable/Disable DTIM 1chRx feature */
  10455. WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
  10456. } wmi_sta_smps_param;
  10457. typedef struct {
  10458. /** TLV tag and len; tag equals
  10459. * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
  10460. A_UINT32 tlv_header;
  10461. /** Unique id identifying the VDEV */
  10462. A_UINT32 vdev_id;
  10463. /** SMPS parameter (see wmi_sta_smps_param) */
  10464. A_UINT32 param;
  10465. /** Value of SMPS parameter */
  10466. A_UINT32 value;
  10467. } wmi_sta_smps_param_cmd_fixed_param;
  10468. typedef struct {
  10469. /** TLV tag and len; tag equals
  10470. * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
  10471. A_UINT32 tlv_header;
  10472. /* TX stats */
  10473. A_UINT32 txBytesPushed;
  10474. A_UINT32 txPacketsPushed;
  10475. /* RX stats */
  10476. A_UINT32 rxBytesRcvd;
  10477. A_UINT32 rxPacketsRcvd;
  10478. A_UINT32 rxTimeTotal;
  10479. /** peer MAC address */
  10480. wmi_mac_addr peer_macaddr;
  10481. } wmi_mcc_sched_sta_traffic_stats;
  10482. typedef struct {
  10483. /** TLV tag and len; tag equals
  10484. * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
  10485. A_UINT32 tlv_header;
  10486. /** Duration over which the host stats were collected */
  10487. A_UINT32 duration;
  10488. /** Number of stations filled in following stats array */
  10489. A_UINT32 num_sta;
  10490. /* Following this struct are the TLVs:
  10491. * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
  10492. */
  10493. } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
  10494. typedef struct {
  10495. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
  10496. /* unique id identifying the VDEV, generated by the caller */
  10497. A_UINT32 vdev_id;
  10498. /*Batch scan enable command parameters */
  10499. A_UINT32 scanInterval;
  10500. A_UINT32 numScan2Batch;
  10501. A_UINT32 bestNetworks;
  10502. A_UINT32 rfBand;
  10503. A_UINT32 rtt;
  10504. } wmi_batch_scan_enable_cmd_fixed_param;
  10505. typedef struct {
  10506. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
  10507. A_UINT32 supportedMscan;
  10508. } wmi_batch_scan_enabled_event_fixed_param;
  10509. typedef struct {
  10510. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
  10511. /* unique id identifying the VDEV, generated by the caller */
  10512. A_UINT32 vdev_id;
  10513. A_UINT32 param;
  10514. } wmi_batch_scan_disable_cmd_fixed_param;
  10515. typedef struct {
  10516. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
  10517. /** unique id identifying the VDEV, generated by the caller */
  10518. A_UINT32 vdev_id;
  10519. A_UINT32 param;
  10520. } wmi_batch_scan_trigger_result_cmd_fixed_param;
  10521. typedef struct {
  10522. A_UINT32 tlv_header;
  10523. wmi_mac_addr bssid; /* BSSID */
  10524. wmi_ssid ssid; /* SSID */
  10525. A_UINT32 ch; /* Channel */
  10526. A_UINT32 rssi; /* RSSI or Level */
  10527. /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
  10528. A_UINT32 timestamp;
  10529. } wmi_batch_scan_result_network_info;
  10530. typedef struct {
  10531. A_UINT32 tlv_header;
  10532. A_UINT32 scanId; /* Scan List ID. */
  10533. /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
  10534. A_UINT32 numNetworksInScanList;
  10535. A_UINT32 netWorkStartIndex; /* indicate the start index of network info */
  10536. } wmi_batch_scan_result_scan_list;
  10537. #define LPI_IE_BITMAP_BSSID 0x00000001 /* if this bit is set, bssid of the scan response frame is sent as the first IE in the data buffer sent to LOWI LP.*/
  10538. #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /*send true or false based on scan response frame being a Probe Rsp or not*/
  10539. #define LPI_IE_BITMAP_SSID 0x00000004 /*send ssid from received scan response frame*/
  10540. #define LPI_IE_BITMAP_RSSI 0x00000008 /* end RSSI value reported by HW for the received scan response after adjusting with noise floor*/
  10541. #define LPI_IE_BITMAP_CHAN 0x00000010 /*send channel number from the received scan response*/
  10542. #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* sen Tx power from TPC IE of scan rsp*/
  10543. #define LPI_IE_BITMAP_TX_RATE 0x00000040 /*send rate of the received frame as reported by HW.*/
  10544. #define LPI_IE_BITMAP_80211_MC_SUPPORT 0x00000080 /*send true or false based on the received scan rsp was from a 11mc supported AP or not.*/
  10545. #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /*send timestamp reported in the received scan rsp frame.*/
  10546. #define LPI_IE_BITMAP_AGE_OF_MEASUREMENT 0x00000200 /* current system time - received time) = duration of time scan rsp frame data is kept in the buffer before sending to LOWI LP.*/
  10547. /*
  10548. * TEMPORARY alias of incorrect old name the correct name.
  10549. * This alias will be removed once all references to the old name have been fixed.
  10550. */
  10551. #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
  10552. #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false.*/
  10553. #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP*/
  10554. #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled*/
  10555. #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device.*/
  10556. #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel*/
  10557. #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received.*/
  10558. #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz*/
  10559. #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above*/
  10560. #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations*/
  10561. #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan*/
  10562. #define LPI_IE_BITMAP_SCAN_ID 0x00100000 /*extscan inserts the scan cycle count for this value; other scan clients can insert the scan id of the scan, if needed.*/
  10563. #define LPI_IE_BITMAP_FLAGS 0x00200000 /* reserved as a bitmap to indicate more scan information; one such use being to indicate if the on-going scan is interrupted or not*/
  10564. #define LPI_IE_BITMAP_CACHING_REQD 0x00400000 /*extscan will use this field to indicate if this frame info needs to be cached in LOWI LP or not*/
  10565. /*
  10566. * extscan will use this field to indicate to
  10567. * LOWI LP whether to report result to context hub or not
  10568. */
  10569. #define LPI_IE_BITMAP_REPORT_CONTEXT_HUB 0x00800000
  10570. #define LPI_IE_BITMAP_ALL 0xFFFFFFFF
  10571. typedef struct {
  10572. A_UINT32 tlv_header;
  10573. /**A_BOOL indicates LPI mgmt snooping enable/disable*/
  10574. A_UINT32 enable;
  10575. /**LPI snooping mode*/
  10576. A_UINT32 snooping_mode;
  10577. /** LPI interested IEs in snooping context */
  10578. A_UINT32 ie_bitmap;
  10579. } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
  10580. typedef struct {
  10581. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  10582. /** Scan ID */
  10583. A_UINT32 scan_id;
  10584. /** Scan requestor ID */
  10585. A_UINT32 scan_req_id;
  10586. /** VDEV id(interface) that is requesting scan */
  10587. A_UINT32 vdev_id;
  10588. /** LPI interested IEs in scan context */
  10589. A_UINT32 ie_bitmap;
  10590. /** Scan Priority, input to scan scheduler */
  10591. A_UINT32 scan_priority;
  10592. /** dwell time in msec on active channels */
  10593. A_UINT32 dwell_time_active;
  10594. /** dwell time in msec on passive channels */
  10595. A_UINT32 dwell_time_passive;
  10596. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  10597. A_UINT32 min_rest_time;
  10598. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  10599. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  10600. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  10601. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  10602. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  10603. * irrespective of activity. activity is determined by the idle_time parameter.
  10604. */
  10605. A_UINT32 max_rest_time;
  10606. /** time before sending next set of probe requests.
  10607. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  10608. * The number of probe requests specified depends on the ssid_list and bssid_list
  10609. */
  10610. A_UINT32 repeat_probe_time;
  10611. /** time in msec between 2 consequetive probe requests with in a set. */
  10612. A_UINT32 probe_spacing_time;
  10613. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  10614. A_UINT32 idle_time;
  10615. /** maximum time in msec allowed for scan */
  10616. A_UINT32 max_scan_time;
  10617. /** delay in msec before sending first probe request after switching to a channel */
  10618. A_UINT32 probe_delay;
  10619. /** Scan control flags */
  10620. A_UINT32 scan_ctrl_flags;
  10621. /** Burst duration time in msec*/
  10622. A_UINT32 burst_duration;
  10623. /** # if channels to scan. In the TLV channel_list[] */
  10624. A_UINT32 num_chan;
  10625. /** number of bssids. In the TLV bssid_list[] */
  10626. A_UINT32 num_bssid;
  10627. /** number of ssid. In the TLV ssid_list[] */
  10628. A_UINT32 num_ssids;
  10629. /** number of bytes in ie data. In the TLV ie_data[] */
  10630. A_UINT32 ie_len;
  10631. /**
  10632. * TLV (tag length value ) parameters follow the scan_cmd
  10633. * structure. The TLV's are:
  10634. * A_UINT32 channel_list[];
  10635. * wmi_ssid ssid_list[];
  10636. * wmi_mac_addr bssid_list[];
  10637. * A_UINT8 ie_data[];
  10638. */
  10639. } wmi_lpi_start_scan_cmd_fixed_param;
  10640. typedef struct {
  10641. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  10642. /** Scan requestor ID */
  10643. A_UINT32 scan_req_id;
  10644. /** Scan ID */
  10645. A_UINT32 scan_id;
  10646. /**
  10647. * Req Type
  10648. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  10649. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  10650. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  10651. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  10652. */
  10653. A_UINT32 req_type;
  10654. /**
  10655. * vDev ID
  10656. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  10657. */
  10658. A_UINT32 vdev_id;
  10659. } wmi_lpi_stop_scan_cmd_fixed_param;
  10660. typedef enum {
  10661. WMI_LPI_DEVICE_TYPE_AP = 1,
  10662. WMI_LPI_DEVICE_TYPE_P2P = 2,
  10663. WMI_LPI_DEVICE_TYPE_NAN = 3,
  10664. } wmi_lpi_device_type;
  10665. typedef struct {
  10666. A_UINT32 tlv_header;
  10667. /** Scan requestor ID */
  10668. A_UINT32 scan_req_id;
  10669. A_UINT32 ie_bitmap;
  10670. A_UINT32 data_len;
  10671. } wmi_lpi_result_event_fixed_param;
  10672. typedef enum {
  10673. /** User scan Request completed */
  10674. WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
  10675. /** User Request was never serviced */
  10676. WMI_LPI_STATUS_DROPPED_REQ = 1,
  10677. /** Illegal channel Req */
  10678. WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
  10679. /** Illegal Operation Req */
  10680. WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
  10681. /** Request Aborted */
  10682. WMI_LPI_STATUS_REQ_ABORTED = 4,
  10683. /** Request Timed Out */
  10684. WMI_LPI_STATUS_REQ_TIME_OUT = 5,
  10685. /** Medium Busy, already there
  10686. * is a scan is going on */
  10687. WMI_LPI_STATUS_MEDIUM_BUSY = 6,
  10688. /* Extscan is the scan client whose scan complete event is triggered */
  10689. WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
  10690. } wmi_lpi_staus;
  10691. typedef struct {
  10692. A_UINT32 tlv_header;
  10693. wmi_lpi_staus status;
  10694. /** Scan requestor ID */
  10695. A_UINT32 scan_req_id;
  10696. } wmi_lpi_status_event_fixed_param;
  10697. typedef struct {
  10698. A_UINT32 tlv_header;
  10699. wmi_mac_addr bssid;
  10700. wmi_ssid ssid;
  10701. A_UINT32 freq;
  10702. A_UINT32 rssi;
  10703. A_UINT32 vdev_id;
  10704. } wmi_lpi_handoff_event_fixed_param;
  10705. typedef struct {
  10706. A_UINT32 tlv_header;
  10707. A_UINT32 timestamp; /*timestamp of batch scan event */
  10708. A_UINT32 numScanLists; /*number of scan in this event */
  10709. A_UINT32 isLastResult; /*is this event a last event of the whole batch scan */
  10710. } wmi_batch_scan_result_event_fixed_param;
  10711. typedef struct {
  10712. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
  10713. A_UINT32 vdev_id;
  10714. /* This TLV is followed by p2p_noa_info for vdev :
  10715. * wmi_p2p_noa_info p2p_noa_info;
  10716. */
  10717. } wmi_p2p_noa_event_fixed_param;
  10718. #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
  10719. #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
  10720. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
  10721. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
  10722. #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
  10723. #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
  10724. typedef struct {
  10725. /** TLV tag and len; tag equals
  10726. * */
  10727. A_UINT32 tlv_header;
  10728. /** gpip pin number */
  10729. A_UINT32 gpio_pin_num;
  10730. /** gpio interupt type */
  10731. A_UINT32 int_type;
  10732. /** RF radio status */
  10733. A_UINT32 radio_state;
  10734. } wmi_rfkill_mode_param;
  10735. typedef enum {
  10736. WMI_SET_LED_SYS_POWEROFF,
  10737. WMI_SET_LED_SYS_S3_SUSPEND,
  10738. WMI_SET_LED_SYS_S4_S5,
  10739. WMI_SET_LED_SYS_DRIVER_DISABLE,
  10740. WMI_SET_LED_SYS_WAKEUP,
  10741. WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
  10742. WMI_SET_LED_SYS_POWERON,
  10743. } wmi_led_sys_state_param;
  10744. typedef enum {
  10745. WMI_CONFIG_LED_TO_VDD = 0,
  10746. WMI_CONFIG_LED_TO_GND = 1,
  10747. } wmi_config_led_connect_type;
  10748. typedef enum {
  10749. WMI_CONFIG_LED_NOT_WITH_BT = 0,
  10750. WMI_CONFIG_LED_WITH_BT = 1,
  10751. } wmi_config_led_with_bt_flag;
  10752. typedef enum {
  10753. WMI_CONFIG_LED_DISABLE = 0,
  10754. WMI_CONFIG_LED_ENABLE = 1,
  10755. } wmi_config_led_enable_flag;
  10756. typedef enum {
  10757. WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
  10758. WMI_CONFIG_LED_HIGH_OFF = 1,
  10759. WMI_CONFIG_LED_HIGH_ON = 2,
  10760. } wmi_config_led_on_flag;
  10761. typedef enum {
  10762. WMI_CONFIG_LED_UNSPECIFIED = 0,
  10763. WMI_CONFIG_LED_ON = 1,
  10764. WMI_CONFIG_LED_OFF = 2,
  10765. WMI_CONFIG_LED_DIM = 3,
  10766. WMI_CONFIG_LED_BLINK = 4,
  10767. WMI_CONFIG_LED_TXRX = 5,
  10768. } wmi_config_led_operation_type;
  10769. typedef struct {
  10770. /** TLV tag and len; tag equals
  10771. * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
  10772. A_UINT32 tlv_header;
  10773. /* Set GPIO pin */
  10774. A_UINT32 led_gpio_pin;
  10775. /* Set connect type defined in wmi_config_led_connect_type */
  10776. A_UINT32 connect_type;
  10777. /* Set flag defined in wmi_config_led_with_bt_flag */
  10778. A_UINT32 with_bt;
  10779. /* Set LED enablement defined in wmi_config_led_enable_flag */
  10780. A_UINT32 led_enable;
  10781. /** pdev_id for identifying the MAC
  10782. * See macros starting with WMI_PDEV_ID_ for values.
  10783. */
  10784. A_UINT32 pdev_id;
  10785. /* see wmi_config_led_operation_type enum */
  10786. A_UINT32 led_operation_type;
  10787. /* see wmi_config_led_on_flag enum */
  10788. A_UINT32 led_on_flag; /* configure high/low on/off sense */
  10789. A_UINT32 led_on_interval; /* for blink function; unit: ms */
  10790. A_UINT32 led_off_interval; /* for blink function; unit: ms */
  10791. A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
  10792. } wmi_pdev_set_led_config_cmd_fixed_param;
  10793. #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
  10794. #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
  10795. /** WMI_PEER_INFO_REQ_CMDID
  10796. * Request FW to provide peer info */
  10797. typedef struct {
  10798. /** TLV tag and len; tag equals
  10799. * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
  10800. A_UINT32 tlv_header;
  10801. /** In order to get the peer info for a single peer, host shall
  10802. * issue the peer_mac_address of that peer. For getting the
  10803. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  10804. * address. The firmware will return the peer info for all the
  10805. * peers on the specified vdev_id */
  10806. wmi_mac_addr peer_mac_address;
  10807. /** vdev id */
  10808. A_UINT32 vdev_id;
  10809. } wmi_peer_info_req_cmd_fixed_param;
  10810. typedef struct {
  10811. /** TLV tag and len; tag equals
  10812. * WMITLV_TAG_STRUC_wmi_peer_info */
  10813. A_UINT32 tlv_header;
  10814. /** mac addr of the peer */
  10815. wmi_mac_addr peer_mac_address;
  10816. /** data_rate of the peer */
  10817. A_UINT32 data_rate;
  10818. /** rssi of the peer */
  10819. A_UINT32 rssi;
  10820. /** tx fail count */
  10821. A_UINT32 tx_fail_cnt;
  10822. } wmi_peer_info;
  10823. /** FW response with the peer info */
  10824. typedef struct {
  10825. /** TLV tag and len; tag equals
  10826. * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
  10827. A_UINT32 tlv_header;
  10828. /** number of peers in peer_info */
  10829. A_UINT32 num_peers;
  10830. /* Set to 1 only if vdev_id field is valid */
  10831. A_UINT32 valid_vdev_id;
  10832. /* VDEV to which the peer belongs to */
  10833. A_UINT32 vdev_id;
  10834. /* This TLV is followed by another TLV of array of structs
  10835. * wmi_peer_info peer_info[];
  10836. */
  10837. } wmi_peer_info_event_fixed_param;
  10838. /**
  10839. * WMI_PEER_ANTDIV_INFO_REQ_CMDID
  10840. * Request FW to provide peer info
  10841. */
  10842. typedef struct {
  10843. /**
  10844. * TLV tag and len; tag equals
  10845. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param
  10846. */
  10847. A_UINT32 tlv_header;
  10848. /**
  10849. * In order to get the peer antdiv info for a single peer, host shall
  10850. * issue the peer_mac_address of that peer. For getting the
  10851. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  10852. * address. The firmware will return the peer info for all the
  10853. * peers on the specified vdev_id
  10854. */
  10855. wmi_mac_addr peer_mac_address;
  10856. /** vdev id */
  10857. A_UINT32 vdev_id;
  10858. } wmi_peer_antdiv_info_req_cmd_fixed_param;
  10859. /** FW response with the peer antdiv info */
  10860. typedef struct {
  10861. /** TLV tag and len; tag equals
  10862. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param
  10863. */
  10864. A_UINT32 tlv_header;
  10865. /** number of peers in peer_info */
  10866. A_UINT32 num_peers;
  10867. /** VDEV to which the peer belongs to */
  10868. A_UINT32 vdev_id;
  10869. /**
  10870. * This TLV is followed by another TLV of array of structs
  10871. * wmi_peer_antdiv_info peer_antdiv_info[];
  10872. */
  10873. } wmi_peer_antdiv_info_event_fixed_param;
  10874. typedef struct {
  10875. /**
  10876. * TLV tag and len; tag equals
  10877. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info
  10878. */
  10879. A_UINT32 tlv_header;
  10880. /** mac addr of the peer */
  10881. wmi_mac_addr peer_mac_address;
  10882. /**
  10883. * per chain rssi of the peer, for up to 8 chains.
  10884. * Each chain's entry reports the RSSI for different bandwidths:
  10885. * bits 7:0 -> primary 20 MHz
  10886. * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
  10887. * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
  10888. * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
  10889. * Each of these 8-bit RSSI reports is in dB units, with respect to
  10890. * the noise floor.
  10891. * 0x80 means invalid.
  10892. * All unused bytes within used chain_rssi indices shall be
  10893. * set to 0x80.
  10894. * All unused chain_rssi indices shall be set to 0x80808080.
  10895. */
  10896. A_INT32 chain_rssi[8];
  10897. } wmi_peer_antdiv_info;
  10898. /** FW response when tx failure count has reached threshold
  10899. * for a peer */
  10900. typedef struct {
  10901. /** TLV tag and len; tag equals
  10902. * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
  10903. A_UINT32 tlv_header;
  10904. /** vdev id*/
  10905. A_UINT32 vdev_id;
  10906. /** mac address */
  10907. wmi_mac_addr peer_mac_address;
  10908. /** tx failure count- will eventually be removed and not used * */
  10909. A_UINT32 tx_fail_cnt;
  10910. /** seq number of the nth tx_fail_event */
  10911. A_UINT32 seq_no;
  10912. } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
  10913. enum wmi_rmc_mode {
  10914. /** Disable RMC */
  10915. WMI_RMC_MODE_DISABLED = 0,
  10916. /** Enable RMC */
  10917. WMI_RMC_MODE_ENABLED = 1,
  10918. };
  10919. /** Enable RMC transmitter functionality. Upon
  10920. * receiving this, the FW shall mutlicast frames with
  10921. * reliablity. This is a vendor
  10922. * proprietary feature. */
  10923. typedef struct {
  10924. /** TLV tag and len; tag equals
  10925. * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
  10926. A_UINT32 tlv_header;
  10927. /** vdev id*/
  10928. A_UINT32 vdev_id;
  10929. /** enable_rmc contains values from enum wmi_rmc_mode;
  10930. * Default value: 0 (disabled) */
  10931. A_UINT32 enable_rmc;
  10932. } wmi_rmc_set_mode_cmd_fixed_param;
  10933. /** Configure transmission periodicity of action frames in a
  10934. * RMC network for the multicast transmitter */
  10935. typedef struct {
  10936. /** TLV tag and len; tag equals
  10937. * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
  10938. A_UINT32 tlv_header;
  10939. /** vdev id */
  10940. A_UINT32 vdev_id;
  10941. /** time period in milliseconds. Default: 300 ms.
  10942. An action frame indicating the current leader is transmitted by the
  10943. RMC transmitter once every 'periodity_msec' */
  10944. A_UINT32 periodicity_msec;
  10945. } wmi_rmc_set_action_period_cmd_fixed_param;
  10946. /** Optimise Leader selection process in RMC functionality. For
  10947. * Enhancement/Debug purposes only */
  10948. typedef struct {
  10949. /** TLV tag and len; tag equals
  10950. * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
  10951. A_UINT32 tlv_header;
  10952. /** vdev id */
  10953. A_UINT32 vdev_id;
  10954. /** flags ::
  10955. * 0x0001 - Enable beacon averaging
  10956. * 0x0002 - Force leader selection
  10957. * 0x0004 - Enable Timer based leader switch
  10958. * 0x0008 - Use qos/NULL based for multicast reliability */
  10959. A_UINT32 flags;
  10960. /** control leader change timeperiod (in seconds) */
  10961. A_UINT32 peridocity_leader_switch;
  10962. /** control activity timeout value for data rx (in seconds) */
  10963. A_UINT32 data_activity_timeout;
  10964. /** mac address of leader */
  10965. wmi_mac_addr forced_leader_mac_addr;
  10966. } wmi_rmc_config_cmd_fixed_param;
  10967. /** MHF is generally implemented in
  10968. * the kernel. To decrease system power consumption, the
  10969. * driver can enable offloading this to the chipset. In
  10970. * order for the offload, the firmware needs the routing table.
  10971. * The host shall plumb the routing table into FW. The firmware
  10972. * shall perform an IP address lookup and forward the packet to
  10973. * the next hop using next hop's mac address. This is a vendor
  10974. * proprietary feature. */
  10975. enum wmi_mhf_ofl_mode {
  10976. /** Disable MHF offload */
  10977. WMI_MHF_OFL_MODE_DISABLED = 0,
  10978. /** Enable MHF offload */
  10979. WMI_MHF_OFL_MODE_ENABLED = 1,
  10980. };
  10981. typedef struct {
  10982. /** TLV tag and len; tag equals
  10983. * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
  10984. A_UINT32 tlv_header;
  10985. /** vdev id*/
  10986. A_UINT32 vdev_id;
  10987. /** enable_mhf_ofl contains values from enum
  10988. * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
  10989. A_UINT32 enable_mhf_ofl;
  10990. } wmi_mhf_offload_set_mode_cmd_fixed_param;
  10991. enum wmi_mhf_ofl_table_action {
  10992. /** Create forwarding offload table in FW */
  10993. WMI_MHF_OFL_TBL_CREATE = 0,
  10994. /** Append to existing MHF offload table */
  10995. WMI_MHF_OFL_TBL_APPEND = 1,
  10996. /** Flush entire MHF offload table in FW */
  10997. WMI_MHF_OFL_TBL_FLUSH = 2,
  10998. };
  10999. typedef struct {
  11000. /** TLV tag and len; tag equals
  11001. * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
  11002. A_UINT32 tlv_header;
  11003. /** vdev id*/
  11004. A_UINT32 vdev_id;
  11005. /** action corresponds to values from enum
  11006. * wmi_mhf_ofl_table_action */
  11007. A_UINT32 action;
  11008. /** number of entries in the table */
  11009. A_UINT32 num_entries;
  11010. /** Followed by the variable length TLV
  11011. * wmi_mhf_offload_routing_table_entry entries[] */
  11012. } wmi_mhf_offload_plumb_routing_table_cmd;
  11013. typedef struct {
  11014. /** TLV tag and len; tag equals
  11015. * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
  11016. A_UINT32 tlv_header;
  11017. /** Destination node's IP address */
  11018. WMI_IPV4_ADDR dest_ipv4_addr;
  11019. /** Next hop node's MAC address */
  11020. wmi_mac_addr next_hop_mac_addr;
  11021. } wmi_mhf_offload_routing_table_entry;
  11022. typedef struct {
  11023. /** tlv tag and len, tag equals
  11024. * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
  11025. A_UINT32 tlv_header;
  11026. /** full 64 tsf timestamp get from MAC tsf timer indicates
  11027. * the time that the radar event uploading to host, split
  11028. * it to high 32 bit and lower 32 bit in fulltsf_high and
  11029. * full_tsf_low
  11030. */
  11031. A_UINT32 upload_fullts_low;
  11032. A_UINT32 upload_fullts_high;
  11033. /** timestamp indicates the time when DFS pulse is detected
  11034. * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
  11035. */
  11036. A_UINT32 pulse_detect_ts;
  11037. /** the duaration of the pulse in us */
  11038. A_UINT32 pulse_duration;
  11039. /** the center frequency of the radar pulse detected, KHz */
  11040. A_UINT32 pulse_center_freq;
  11041. /** bandwidth of current DFS channel, MHz */
  11042. A_UINT32 ch_bandwidth;
  11043. /** center channel frequency1 of current DFS channel, MHz */
  11044. A_UINT16 ch_center_freq1;
  11045. /** center channel frequency2 of current DFS channel, MHz,
  11046. * reserved for 160 BW mode
  11047. */
  11048. A_UINT16 ch_center_freq2;
  11049. /** flag to indicate if this pulse is chirp */
  11050. A_UINT8 pulse_is_chirp;
  11051. /** RSSI recorded in the ppdu */
  11052. A_UINT8 rssi;
  11053. /** extened RSSI info */
  11054. A_UINT8 rssi_ext;
  11055. /** For 4-byte aligment padding */
  11056. A_UINT8 reserved;
  11057. union {
  11058. /* OBSOLETE - will be removed once all refs are gone */
  11059. A_UINT8 pmac_id;
  11060. /** pdev_id for identifying the MAC
  11061. * See macros starting with WMI_PDEV_ID_ for values.
  11062. */
  11063. A_UINT8 pdev_id;
  11064. };
  11065. /** index of peak magnitude bin (signed) */
  11066. A_INT32 peak_sidx;
  11067. } wmi_dfs_radar_event_fixed_param;
  11068. typedef struct {
  11069. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
  11070. /*Thermal thresholds */
  11071. A_UINT32 lower_thresh_degreeC; /* in degree C */
  11072. A_UINT32 upper_thresh_degreeC; /* in degree C */
  11073. /*Enable/Disable Thermal Monitoring for Mitigation */
  11074. A_UINT32 enable;
  11075. } wmi_thermal_mgmt_cmd_fixed_param;
  11076. typedef struct {
  11077. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
  11078. A_UINT32 temperature_degreeC; /* temperature in degree C */
  11079. } wmi_thermal_mgmt_event_fixed_param;
  11080. /**
  11081. * This command is sent from WLAN host driver to firmware to
  11082. * request firmware to configure auto shutdown timer in fw
  11083. * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
  11084. */
  11085. typedef struct {
  11086. A_UINT32 tlv_header;
  11087. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
  11088. A_UINT32 timer_value;
  11089. /** timer value; 0=disable */
  11090. } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
  11091. enum wmi_host_auto_shutdown_reason {
  11092. WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
  11093. WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
  11094. WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
  11095. };
  11096. /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
  11097. typedef struct {
  11098. A_UINT32 tlv_header;
  11099. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
  11100. A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
  11101. } wmi_host_auto_shutdown_event_fixed_param;
  11102. /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
  11103. * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
  11104. * This command is only used by some customer for verification test. It is not for end-user.
  11105. *
  11106. * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
  11107. *
  11108. * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
  11109. * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
  11110. * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
  11111. * <channel, ack_offset> pair is unique.
  11112. *
  11113. * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
  11114. * called basic_config_info by bitmap
  11115. * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
  11116. *
  11117. * 'rate bit' or 'channel bit' field of basic_config_info indicate validity of the channel and rate fields.if rate bit is 0 then the rate field
  11118. * is ignored.
  11119. * disable will remove preious conditions from FW.
  11120. * conditions from the later command will over write conditions stored from a previous command.
  11121. *
  11122. */
  11123. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
  11124. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
  11125. #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
  11126. #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
  11127. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
  11128. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
  11129. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
  11130. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
  11131. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
  11132. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
  11133. #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
  11134. #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
  11135. #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
  11136. #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
  11137. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
  11138. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
  11139. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
  11140. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
  11141. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
  11142. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
  11143. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
  11144. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
  11145. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
  11146. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
  11147. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
  11148. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
  11149. #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
  11150. #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
  11151. /** Bit map definition for basic_config_info starts */
  11152. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
  11153. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
  11154. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  11155. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x, z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  11156. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
  11157. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
  11158. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  11159. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x, z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  11160. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
  11161. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
  11162. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  11163. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x, z) WMI_F_RMW(x, (z)&0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  11164. #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
  11165. #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
  11166. #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BT)
  11167. #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x, z) WMI_F_RMW(x, (z)&0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
  11168. #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
  11169. #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
  11170. #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STBC)
  11171. #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x, z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
  11172. #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
  11173. #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
  11174. #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BAND)
  11175. #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x, z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
  11176. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
  11177. #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
  11178. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STREAM)
  11179. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x, z) WMI_F_RMW(x, (z)&0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
  11180. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
  11181. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
  11182. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  11183. #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x, z) WMI_F_RMW(x, (z)&0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  11184. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
  11185. /*
  11186. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
  11187. * is temporarily maintained as an alias for the correct name
  11188. * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  11189. */
  11190. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
  11191. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
  11192. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  11193. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x, z) WMI_F_RMW(x, (z)&0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  11194. #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
  11195. /*
  11196. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
  11197. * is temporarily maintained as an alias for the correct name
  11198. * (WMI_TPC_CHAINMASK_CONFIG_RATE)
  11199. */
  11200. #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
  11201. #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
  11202. #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
  11203. #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x, z) WMI_F_RMW(x, (z)&0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
  11204. /** Bit map definition for basic_config_info ends */
  11205. typedef struct {
  11206. A_UINT32 tlv_header;
  11207. /** Basic condition defined as bit map above, bitmap is chosen to save memory.
  11208. * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
  11209. * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
  11210. * Bit10 ~ Bit11: chainmask b'00: don't care, b'01: force to use chain0, b'10: force to use chain1, b'11: force to use chain0&chain1
  11211. * Bit12 ~ Bit13: bt condition b'00: don't care, b'01: apply only when bt on, b'10: apply only when bt off, b'11: reserved
  11212. * Bit14 ~ Bit15: stbc condition b'00: don't care, b'01: apply only when stbc on, b'10: apply only when stbc off, b'11: reserved
  11213. * Bit16 : band condition b'0: 2G, b'1: 5G
  11214. * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
  11215. * Bit18 ~ Bit20: phy mode condition: b'000: 11b 2g, b'001: 11g 2g, b'010: 11n 2g, b'011: 11n+11ac 2g, b'100: 11a, b'101: 11n 5g, b'110: 11ac 5g, b'111: 11n+11ac 5g
  11216. * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
  11217. * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
  11218. * Bit23 ~ Bit31: reserved
  11219. */
  11220. A_UINT32 basic_config_info;
  11221. /** channel mapping bit rule: The lower bit corresponds with smaller channel.
  11222. * it depends on Bit14 of basic_config_info
  11223. * Total 24 channels for 5G
  11224. * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
  11225. * Total 14 channels for 2G
  11226. * 1 ~ 14
  11227. */
  11228. A_UINT32 channel;
  11229. /** rate mapping bit rule: The lower bit corresponds with lower rate.
  11230. * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
  11231. * Legacy rates , 11b, 11g, 11A
  11232. * 11n one stream ( ht20, ht40 ) 8+8
  11233. * 11n two streams ( ht20, ht40 ) 8+8
  11234. * 11ac one stream ( vht20, vht40, vht80 ) 10+10+10
  11235. * 11ac two streams (vht20, vht40, vht80 ) 10+10+10
  11236. */
  11237. A_UINT32 rate0;
  11238. /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
  11239. * For example, for 11g/11a, when rate0 equals 0xf0,it means "54Mbps", "48Mbps", "36Mbps", "24Mb's" is selected, while "18Mbps", "12Mbps", "9Mbps", "6Mbps" is not selected
  11240. */
  11241. /** only used for "11n+11ac" combined phy_mode, (WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G , WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G) in this case, 11n rates begins on rate0, while 11ac rates begins on rate1
  11242. */
  11243. A_UINT32 rate1;
  11244. } wmi_tpc_chainmask_config;
  11245. #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
  11246. #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
  11247. typedef struct {
  11248. A_UINT32 tlv_header;
  11249. A_UINT32 enable;
  11250. /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
  11251. A_UINT32 num_tpc_chainmask_configs;
  11252. /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
  11253. } wmi_tpc_chainmask_config_cmd_fixed_param;
  11254. typedef struct {
  11255. A_UINT32 tlv_header;
  11256. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
  11257. A_UINT32 data_len;
  11258. /** length in byte of data[]. */
  11259. /* This structure is used to send REQ binary blobs
  11260. * from application/service to firmware where Host drv is pass through .
  11261. * Following this structure is the TLV:
  11262. * A_UINT8 data[]; // length in byte given by field data_len.
  11263. */
  11264. } wmi_nan_cmd_param;
  11265. typedef struct {
  11266. A_UINT32 tlv_header;
  11267. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
  11268. A_UINT32 data_len;
  11269. /** length in byte of data[]. */
  11270. /* This structure is used to send REQ binary blobs
  11271. * from firmware to application/service where Host drv is pass through .
  11272. * Following this structure is the TLV:
  11273. * A_UINT8 data[]; // length in byte given by field data_len.
  11274. */
  11275. } wmi_nan_event_hdr;
  11276. /**
  11277. * Event to indicate NAN discovery interface created
  11278. */
  11279. typedef struct {
  11280. /*
  11281. * TLV tag and len; tag equals
  11282. * WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param
  11283. */
  11284. A_UINT32 tlv_header;
  11285. /** Unique id identifying the VDEV */
  11286. A_UINT32 vdev_id;
  11287. /** NAN interface MAC address */
  11288. wmi_mac_addr nan_interface_macaddr;
  11289. } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
  11290. #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
  11291. /**
  11292. * Event to indicate NAN discovery interface deleted
  11293. */
  11294. typedef struct {
  11295. /*
  11296. * TLV tag and len; tag equals
  11297. * WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param
  11298. */
  11299. A_UINT32 tlv_header;
  11300. /** Unique id identifying the VDEV */
  11301. A_UINT32 vdev_id;
  11302. } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
  11303. #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
  11304. /**
  11305. * Event to indicate NAN device started new cluster
  11306. */
  11307. typedef struct {
  11308. /*
  11309. * TLV tag and len; tag equals
  11310. * WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param
  11311. */
  11312. A_UINT32 tlv_header;
  11313. /** Unique id identifying the VDEV */
  11314. A_UINT32 vdev_id;
  11315. /** NAN Cluster ID */
  11316. A_UINT32 nan_cluster_id;
  11317. } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
  11318. #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
  11319. /**
  11320. * Event to indicate NAN device joined to cluster
  11321. */
  11322. typedef struct {
  11323. /*
  11324. * TLV tag and len; tag equals
  11325. * WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param
  11326. */
  11327. A_UINT32 tlv_header;
  11328. /** Unique id identifying the VDEV */
  11329. A_UINT32 vdev_id;
  11330. /** NAN Cluster ID */
  11331. A_UINT32 nan_cluster_id;
  11332. } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
  11333. #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
  11334. /** NAN DATA CMD's */
  11335. /**
  11336. * NAN Data get capabilities req
  11337. */
  11338. typedef struct {
  11339. /*
  11340. * TLV tag and len; tag equals
  11341. * WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param
  11342. */
  11343. A_UINT32 tlv_header;
  11344. /** unique id generated in upper layer for the transaction */
  11345. A_UINT32 transaction_id;
  11346. } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
  11347. #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
  11348. /**
  11349. * NDP Response code
  11350. */
  11351. typedef enum {
  11352. NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
  11353. NDP_RSP_CODE_REQUEST_REJECT = 0x01,
  11354. NDP_RSP_CODE_REQUEST_DEFER = 0x02,
  11355. } wmi_ndp_rsp_code_PROTOTYPE;
  11356. #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
  11357. /**
  11358. * NDP Channel configuration type
  11359. */
  11360. typedef enum {
  11361. WMI_NDP_CHANNEL_NOT_REQUESTED = 0, /* Channel will not configured */
  11362. WMI_NDP_REQUEST_CHANNEL_SETUP = 1, /* Channel will be provided and is optional/hint */
  11363. WMI_NDP_FORCE_CHANNEL_SETUP = 2/* NDP must start on the provided channel */
  11364. } wmi_ndp_channel_cfg_PROTOTYPE;
  11365. #define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
  11366. /**
  11367. * NDP Initiator requesting a data session
  11368. */
  11369. typedef struct {
  11370. /*
  11371. * TLV tag and len; tag equals
  11372. * WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param
  11373. */
  11374. A_UINT32 tlv_header;
  11375. /** Unique id identifying the VDEV */
  11376. A_UINT32 vdev_id;
  11377. /** unique id generated in upper layer for the transaction */
  11378. A_UINT32 transaction_id;
  11379. /** Unique Instance Id identifying the Responder's service */
  11380. A_UINT32 service_instance_id;
  11381. /** Discovery MAC addr of the publisher/peer */
  11382. wmi_mac_addr peer_discovery_mac_addr;
  11383. /* Actual number of bytes in TLV ndp_cfg */
  11384. A_UINT32 ndp_cfg_len;
  11385. /* Actual number of bytes in TLV ndp_app_info */
  11386. A_UINT32 ndp_app_info_len;
  11387. /** NDP channel configuration type defined in wmi_ndp_channel_cfg */
  11388. A_UINT32 ndp_channel_cfg;
  11389. /** NAN Cipher Suite Shared Key */
  11390. A_UINT32 nan_csid;
  11391. /** Actual number of bytes in TLV nan_pmk */
  11392. A_UINT32 nan_pmk_len;
  11393. /**
  11394. * TLV (tag length value ) parameters follow the ndp_initiator_req
  11395. * structure. The TLV's are:
  11396. * wmi_channel channel;
  11397. * A_UINT8 ndp_cfg[];
  11398. * A_UINT8 ndp_app_info[];
  11399. * A_UINT8 nan_pmk[];
  11400. */
  11401. } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
  11402. #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
  11403. /**
  11404. * Initiate a data response on the responder side
  11405. * for data request indication from the peer
  11406. */
  11407. typedef struct {
  11408. /*
  11409. * TLV tag and len; tag equals
  11410. * WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param
  11411. */
  11412. A_UINT32 tlv_header;
  11413. /** Unique id identifying the VDEV */
  11414. A_UINT32 vdev_id;
  11415. /** unique id generated in upper layer for the transaction */
  11416. A_UINT32 transaction_id;
  11417. /**
  11418. * Unique token Id generated on the initiator/responder
  11419. * side used for a NDP session between two NAN devices
  11420. */
  11421. A_UINT32 ndp_instance_id;
  11422. /** Response Code defined in wmi_ndp_rsp_code */
  11423. A_UINT32 rsp_code;
  11424. /** Number of bytes in TLV ndp_cfg */
  11425. A_UINT32 ndp_cfg_len;
  11426. /** Number of bytes in TLV ndp_app_info */
  11427. A_UINT32 ndp_app_info_len;
  11428. /** NAN Cipher Suite Shared Key */
  11429. A_UINT32 nan_csid;
  11430. /** Actual number of bytes in TLV nan_pmk */
  11431. A_UINT32 nan_pmk_len;
  11432. /**
  11433. * TLV (tag length value ) parameters follow the ndp_responder_req
  11434. * structure. The TLV's are:
  11435. * A_UINT8 ndp_cfg[];
  11436. * A_UINT8 ndp_app_info[];
  11437. * A_UINT8 nan_pmk[];
  11438. */
  11439. } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
  11440. #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
  11441. /**
  11442. * NDP end type
  11443. */
  11444. typedef enum {
  11445. WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
  11446. WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
  11447. WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
  11448. } wmi_ndp_end_type_PROTOTYPE;
  11449. #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
  11450. /**
  11451. * NDP end reason code
  11452. */
  11453. typedef enum {
  11454. WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
  11455. WMI_NDP_END_REASON_INACTIVITY = 0x01,
  11456. WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
  11457. } wmi_ndp_end_reason_code_PROTOTYPE;
  11458. #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
  11459. /**
  11460. * NDP end request
  11461. */
  11462. typedef struct {
  11463. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
  11464. A_UINT32 tlv_header;
  11465. /** NDP instance id */
  11466. A_UINT32 ndp_instance_id;
  11467. } wmi_ndp_end_req_PROTOTYPE;
  11468. #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
  11469. /**
  11470. * NDP End request
  11471. */
  11472. typedef struct {
  11473. /*
  11474. * TLV tag and len; tag equals
  11475. * WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param
  11476. */
  11477. A_UINT32 tlv_header;
  11478. /** unique id generated in upper layer for the transaction */
  11479. A_UINT32 transaction_id;
  11480. /**
  11481. * TLV (tag length value ) parameters follow the ndp_end_req
  11482. * structure. The TLV's are:
  11483. * wmi_ndp_end_req ndp_end_req_list[];
  11484. */
  11485. } wmi_ndp_end_req_fixed_param_PROTOTYPE;
  11486. #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
  11487. /* NAN DATA RSP EVENTS */
  11488. /**
  11489. * Event to indicate NAN Data Interface capabilities cmd
  11490. */
  11491. typedef struct {
  11492. /*
  11493. * TLV tag and len; tag equals
  11494. * WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param
  11495. */
  11496. A_UINT32 tlv_header;
  11497. /** Copy of transaction_id received in wmi_ndi_get_cap_req */
  11498. A_UINT32 transaction_id;
  11499. /** Max ndi interface support */
  11500. A_UINT32 max_ndi_interfaces;
  11501. /** Max ndp sessions can support */
  11502. A_UINT32 max_ndp_sessions;
  11503. /** Max number of peer's per ndi */
  11504. A_UINT32 max_peers_per_ndi;
  11505. /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
  11506. A_UINT32 nan_data_supported_bands;
  11507. } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
  11508. #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
  11509. /**
  11510. * NDP command response code
  11511. */
  11512. typedef enum {
  11513. NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
  11514. NDP_CMD_RSP_STATUS_ERROR = 0x01,
  11515. } wmi_ndp_cmd_rsp_status_PROTOTYPE;
  11516. #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
  11517. /**
  11518. * Event response for wmi_ndp_initiator_req
  11519. */
  11520. typedef struct {
  11521. /*
  11522. * TLV tag and len; tag equals
  11523. * WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param
  11524. */
  11525. A_UINT32 tlv_header;
  11526. /** Unique id identifying the VDEV */
  11527. A_UINT32 vdev_id;
  11528. /** Copy of transaction_id received in wmi_ndp_initiator_req */
  11529. A_UINT32 transaction_id;
  11530. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  11531. A_UINT32 rsp_status;
  11532. A_UINT32 reason_code;
  11533. /*
  11534. * Unique token Id generated on the initiator/responder
  11535. * side used for a NDP session between two NAN devices
  11536. */
  11537. A_UINT32 ndp_instance_id;
  11538. } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
  11539. #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
  11540. /**
  11541. * Event response for wmi_ndp_responder_req cmd
  11542. */
  11543. typedef struct {
  11544. /*
  11545. * TLV tag and len; tag equals
  11546. * WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param
  11547. */
  11548. A_UINT32 tlv_header;
  11549. /** Unique id identifying the VDEV */
  11550. A_UINT32 vdev_id;
  11551. /** Copy of transaction_id received in wmi_ndp_responder_req */
  11552. A_UINT32 transaction_id;
  11553. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  11554. A_UINT32 rsp_status;
  11555. A_UINT32 reason_code;
  11556. /*
  11557. * Unique token Id generated on the initiator/responder
  11558. * side used for a NDP session between two NAN devices
  11559. */
  11560. A_UINT32 ndp_instance_id;
  11561. /* NDI mac address of the peer */
  11562. wmi_mac_addr peer_ndi_mac_addr;
  11563. /** Host can create peer if this entry is TRUE */
  11564. A_UINT32 create_peer;
  11565. } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
  11566. #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
  11567. /**
  11568. * Active ndp instance id
  11569. */
  11570. typedef struct {
  11571. /*
  11572. * TLV tag and len; tag equals
  11573. * WMITLV_TAG_STRUC_wmi_active_ndp_instance_id
  11574. */
  11575. A_UINT32 tlv_header;
  11576. /* NDP instance id */
  11577. A_UINT32 ndp_instance_id;
  11578. } wmi_active_ndp_instance_id_PROTOTYPE;
  11579. #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
  11580. /**
  11581. * NDP end response per ndi
  11582. */
  11583. typedef struct {
  11584. /*
  11585. * TLV tag and len; tag equals
  11586. * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi
  11587. */
  11588. A_UINT32 tlv_header;
  11589. /** Unique id identifying the VDEV */
  11590. A_UINT32 vdev_id;
  11591. /** Peer MAC addr */
  11592. wmi_mac_addr peer_mac_addr;
  11593. /** Number of active ndps on this ndi */
  11594. A_UINT32 num_active_ndps_on_ndi;
  11595. } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
  11596. #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
  11597. /**
  11598. * Event response for wmi_ndp_end_req cmd
  11599. */
  11600. typedef struct {
  11601. /*
  11602. * TLV tag and len; tag equals
  11603. * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param
  11604. */
  11605. A_UINT32 tlv_header;
  11606. /** Copy of transaction_id received in wmi_ndp_end_req */
  11607. A_UINT32 transaction_id;
  11608. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  11609. A_UINT32 rsp_status;
  11610. A_UINT32 reason_code;
  11611. /**
  11612. * TLV (tag length value ) parameters follow the ndp_end_rsp
  11613. * structure. The TLV's are:
  11614. * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
  11615. * wmi_active_ndp_instance_id active_ndp_instances_id[];
  11616. */
  11617. } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
  11618. #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
  11619. /** NAN DATA EVENTS */
  11620. /**
  11621. * NDP self role
  11622. */
  11623. typedef enum {
  11624. WMI_NDP_INITIATOR_ROLE,
  11625. WMI_NDP_RESPONDER_ROLE,
  11626. } wmi_ndp_self_role_PROTOTYPE;
  11627. #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
  11628. /**
  11629. * NDP accept policy
  11630. */
  11631. typedef enum {
  11632. WMI_NDP_ACCEPT_POLICY_NONE,
  11633. WMI_NDP_ACCEPT_POLICY_ALL,
  11634. } wmi_ndp_accept_policy_PROTOTYPE;
  11635. #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
  11636. /**
  11637. * Event indication received on the responder side when a NDP Initiator request/
  11638. * NDP session is initiated on the Initiator side
  11639. * (self role will be NDP_RESPONDER_ROLE)
  11640. *
  11641. * Event indication received on the initiator side when a
  11642. * NDP responder request on the Initiator side
  11643. * (self role will be NDP_INITIATOR_ROLE)
  11644. */
  11645. typedef struct {
  11646. /*
  11647. * TLV tag and len; tag equals
  11648. * WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param
  11649. */
  11650. A_UINT32 tlv_header;
  11651. /** Unique id identifying the VDEV */
  11652. A_UINT32 vdev_id;
  11653. /** Self NDP Role defined in wmi_ndp_self_role */
  11654. A_UINT32 self_ndp_role;
  11655. /** Accept policy defined in wmi_ndp_accept_policy */
  11656. A_UINT32 accept_policy;
  11657. /** Unique Instance Id corresponding to a service/session. */
  11658. A_UINT32 service_instance_id;
  11659. /** Discovery MAC addr of the peer/initiator */
  11660. wmi_mac_addr peer_discovery_mac_addr;
  11661. /* NDI mac address of the peer */
  11662. wmi_mac_addr peer_ndi_mac_addr;
  11663. /**
  11664. * Unique token Id generated on the initiator/responder
  11665. * side used for a NDP session between two NAN devices
  11666. */
  11667. A_UINT32 ndp_instance_id;
  11668. /** Number of bytes in TLV wmi_ndp_cfg */
  11669. A_UINT32 ndp_cfg_len;
  11670. /** Number of bytes in TLV wmi_ndp_app_info */
  11671. A_UINT32 ndp_app_info_len;
  11672. /** Peer NAN Cipher Suite Shared Key */
  11673. A_UINT32 nan_csid;
  11674. /** Actual number of bytes in TLV nan_scid */
  11675. A_UINT32 nan_scid_len;
  11676. /**
  11677. * TLV (tag length value ) parameters follow the ndp_indication
  11678. * structure. The TLV's are:
  11679. * A_UINT8 ndp_cfg[];
  11680. * A_UINT8 ndp_app_info[];
  11681. * A_UINT8 nan_scid[];
  11682. */
  11683. } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
  11684. #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
  11685. /**
  11686. * Event indication of data confirm is received on both
  11687. * initiator and responder side confirming a NDP session
  11688. */
  11689. typedef struct {
  11690. /*
  11691. * TLV tag and len; tag equals
  11692. * WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param
  11693. */
  11694. A_UINT32 tlv_header;
  11695. /** Unique id identifying the VDEV */
  11696. A_UINT32 vdev_id;
  11697. /**
  11698. * Unique token Id generated on the initiator/responder
  11699. * side used for a NDP session between two NAN devices
  11700. */
  11701. A_UINT32 ndp_instance_id;
  11702. /*
  11703. * NDI mac address of the peer
  11704. * (required to derive target ipv6 address)
  11705. */
  11706. wmi_mac_addr peer_ndi_mac_addr;
  11707. /** Response Code defined in wmi_ndp_rsp_code */
  11708. A_UINT32 rsp_code;
  11709. /** Number of bytes in TLV wmi_ndp_cfg */
  11710. A_UINT32 ndp_cfg_len;
  11711. /** Number of bytes in TLV wmi_ndp_app_info */
  11712. A_UINT32 ndp_app_info_len;
  11713. /** Reason Code */
  11714. A_UINT32 reason_code;
  11715. /** Number of active ndps on this peer */
  11716. A_UINT32 num_active_ndps_on_peer;
  11717. /**
  11718. * TLV (tag length value ) parameters follow the ndp_confirm
  11719. * structure. The TLV's are:
  11720. * A_UINT8 ndp_cfg[];
  11721. * A_UINT8 ndp_app_info[];
  11722. */
  11723. } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
  11724. #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
  11725. /**
  11726. * Event indication received on the initiator/responder side terminating a NDP session
  11727. */
  11728. typedef struct {
  11729. /*
  11730. * TLV tag and len; tag equals
  11731. * WMITLV_TAG_STRUC_wmi_ndp_end_indication
  11732. */
  11733. A_UINT32 tlv_header;
  11734. /** type defined in wmi_ndp_end_type */
  11735. A_UINT32 type;
  11736. /* Unique id identifying the VDEV */
  11737. A_UINT32 vdev_id;
  11738. /** reason_code defined in wmi_ndp_end_reason_code */
  11739. A_UINT32 reason_code;
  11740. /** NDP instance id */
  11741. A_UINT32 ndp_instance_id;
  11742. /* NDI MAC addr of the peer */
  11743. wmi_mac_addr peer_ndi_mac_addr;
  11744. /* Number of active ndps on this peer */
  11745. A_UINT32 num_active_ndps_on_peer;
  11746. } wmi_ndp_end_indication_PROTOTYPE;
  11747. #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
  11748. typedef struct {
  11749. A_UINT32 tlv_header;
  11750. A_UINT32 num_data;
  11751. /* followed by WMITLV_TAG_ARRAY_BYTE */
  11752. } wmi_diag_data_container_event_fixed_param;
  11753. enum {
  11754. WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
  11755. WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
  11756. WMI_PDEV_PARAM_TXPOWER_REASON_MAX
  11757. };
  11758. #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
  11759. #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
  11760. #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
  11761. #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
  11762. #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
  11763. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
  11764. #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
  11765. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
  11766. #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
  11767. (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
  11768. #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
  11769. (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
  11770. /**
  11771. * This command is sent from WLAN host driver to firmware to
  11772. * notify the current modem power state. Host would receive a
  11773. * message from modem when modem is powered on. Host driver
  11774. * would then send this command to firmware. Firmware would then
  11775. * power on WCI-2 (UART) interface for LTE/MWS Coex.
  11776. *
  11777. * This command is only applicable for APQ platform which has
  11778. * modem on the platform. If firmware doesn't support MWS Coex,
  11779. * this command can be dropped by firmware.
  11780. *
  11781. * This is a requirement from modem team that WCN can't toggle
  11782. * UART before modem is powered on.
  11783. */
  11784. typedef struct {
  11785. /** TLV tag and len; tag equals
  11786. * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
  11787. A_UINT32 tlv_header;
  11788. /** Modem power state parameter */
  11789. A_UINT32 modem_power_state;
  11790. } wmi_modem_power_state_cmd_param;
  11791. enum {
  11792. WMI_MODEM_STATE_OFF = 0,
  11793. WMI_MODEM_STATE_ON
  11794. };
  11795. /**
  11796. * This command is sent from WLAN host driver to firmware to
  11797. * notify the updated Specific Absorption Rate (SAR) limits.
  11798. * A critical regulation for FCC compliance, OEMs require methods to set
  11799. * limits on TX power of WLAN/WWAN.
  11800. * Host would receive instructions on what to set the limits per
  11801. * band/chain/modulation to, it would then interpret and send the limits
  11802. * to FW using this WMI message.
  11803. * Since it is possible to have too many commands to fit into one message,
  11804. * FW will keep receiving the messages, until it finds one with
  11805. * commit_limits = 1, at which point it will apply all the received
  11806. * specifications.
  11807. */
  11808. typedef struct {
  11809. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
  11810. A_UINT32 tlv_header;
  11811. /** when set to WMI_SAR_FEATURE_ON, enable SAR feature;
  11812. * with BDF (SET_0 to 4) or WMI
  11813. * if set to WMI_SAR_FEATURE_OFF, disable feature;
  11814. * if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
  11815. */
  11816. A_UINT32 sar_enable;
  11817. /** number of items in sar_limits[] */
  11818. A_UINT32 num_limit_rows;
  11819. /** once received and is set to 1, FW will calculate the power limits
  11820. * and send set_power command to apply them.
  11821. * Otherwise just update local values stored in FW until a future msg
  11822. * with commit_limits=1 arrives.
  11823. */
  11824. A_UINT32 commit_limits;
  11825. /**
  11826. * TLV (tag length value) parameters follow the sar_limit_cmd_row
  11827. * structure. The TLV's are:
  11828. * wmi_sar_limit_cmd_row sar_limits[];
  11829. */
  11830. } wmi_sar_limits_cmd_fixed_param;
  11831. enum wmi_sar_feature_state_flags {
  11832. WMI_SAR_FEATURE_OFF = 0,
  11833. WMI_SAR_FEATURE_ON_SET_0,
  11834. WMI_SAR_FEATURE_ON_SET_1,
  11835. WMI_SAR_FEATURE_ON_SET_2,
  11836. WMI_SAR_FEATURE_ON_SET_3,
  11837. WMI_SAR_FEATURE_ON_SET_4,
  11838. WMI_SAR_FEATURE_NO_CHANGE,
  11839. WMI_SAR_FEATURE_ON_USER_DEFINED,
  11840. };
  11841. typedef struct {
  11842. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
  11843. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  11844. * new band_id values .
  11845. */
  11846. A_UINT32 band_id;
  11847. A_UINT32 chain_id;
  11848. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  11849. A_UINT32 mod_id;
  11850. /** actual power limit value, in steps of 0.5 dBm */
  11851. A_UINT32 limit_value;
  11852. /** in case the OEM doesn't care about one of the qualifiers from above,
  11853. * the bit for that qualifier within the validity_bitmap can be set to 0
  11854. * so that limit is applied to all possible cases of this qualifier
  11855. * (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
  11856. * treated as a wildcard).
  11857. * Current masks:
  11858. * WMI_SAR_BAND_ID_VALID_MASK
  11859. * WMI_SAR_CHAIN_ID_VALID_MASK
  11860. * WMI_SAR_MOD_ID_VALID_MASK
  11861. * Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
  11862. * it means apply same limit_value to both WMI_SAR_MOD_CCK and
  11863. * WMI_SAR_MOD_OFDM cases.
  11864. */
  11865. A_UINT32 validity_bitmap;
  11866. } wmi_sar_limit_cmd_row;
  11867. enum wmi_sar_band_id_flags {
  11868. WMI_SAR_2G_ID = 0,
  11869. WMI_SAR_5G_ID
  11870. };
  11871. enum wmi_sar_mod_id_flags {
  11872. WMI_SAR_MOD_CCK = 0,
  11873. WMI_SAR_MOD_OFDM
  11874. };
  11875. #define WMI_SAR_BAND_ID_VALID_MASK (0x1)
  11876. #define WMI_SAR_CHAIN_ID_VALID_MASK (0x2)
  11877. #define WMI_SAR_MOD_ID_VALID_MASK (0x4)
  11878. #define WMI_SET_SAR_BAND_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
  11879. #define WMI_SET_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
  11880. #define WMI_SET_SAR_MOD_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
  11881. #define WMI_IS_SAR_BAND_ID_VALID(bitmap) ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
  11882. #define WMI_IS_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
  11883. #define WMI_IS_SAR_MOD_ID_VALID(bitmap) ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
  11884. #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
  11885. #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
  11886. /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
  11887. generated whenever firmware roamed to new AP silently and
  11888. (a) If the host is awake, FW sends the event to the host immediately .
  11889. (b) If host is in sleep then either
  11890. (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
  11891. command to FW (part of host wake up sequence from low power mode) before sending the event host.
  11892. (2) data/mgmt frame is received from roamed AP, which needs to return to host
  11893. */
  11894. typedef struct {
  11895. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
  11896. A_UINT32 tlv_header;
  11897. A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
  11898. A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
  11899. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
  11900. } wmi_key_material;
  11901. typedef struct {
  11902. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
  11903. /** Unique id identifying the VDEV on which roaming is done by firmware */
  11904. A_UINT32 vdev_id;
  11905. /** auth_status: connected or authorized */
  11906. A_UINT32 auth_status;
  11907. /*
  11908. * roam_reason:
  11909. * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
  11910. * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
  11911. */
  11912. A_UINT32 roam_reason;
  11913. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
  11914. A_UINT32 rssi;
  11915. /** MAC address of roamed AP */
  11916. wmi_mac_addr bssid; /* BSSID */
  11917. /** whether the frame is beacon or probe rsp */
  11918. A_UINT32 is_beacon;
  11919. /** the length of beacon/probe rsp */
  11920. A_UINT32 bcn_probe_rsp_len;
  11921. /** the length of reassoc rsp */
  11922. A_UINT32 reassoc_rsp_len;
  11923. /** the length of reassoc req */
  11924. A_UINT32 reassoc_req_len;
  11925. /**
  11926. * TLV (tag length value ) parameters follows roam_synch_event
  11927. * The TLV's are:
  11928. * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
  11929. * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
  11930. * wmi_channel chan;
  11931. * wmi_key_material key;
  11932. * A_UINT32 status; subnet changed status not being used
  11933. * currently. will pass the information using roam_status.
  11934. * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
  11935. **/
  11936. } wmi_roam_synch_event_fixed_param;
  11937. #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
  11938. typedef struct {
  11939. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
  11940. A_UINT32 tlv_header;
  11941. /** MAC address of the peer for which the estimated link speed is required. */
  11942. wmi_mac_addr peer_macaddr;
  11943. /* Set to 1 only if vdev_id field is valid */
  11944. A_UINT32 valid_vdev_id;
  11945. /* VDEV to which the peer belongs to */
  11946. A_UINT32 vdev_id;
  11947. } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
  11948. typedef struct {
  11949. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
  11950. A_UINT32 tlv_header;
  11951. /** MAC address of the peer for which the estimated link speed is required.
  11952. */
  11953. wmi_mac_addr peer_macaddr;
  11954. /* Estimated link speed in kbps.
  11955. * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
  11956. */
  11957. A_UINT32 est_linkspeed_kbps;
  11958. /* Set to 1 only if vdev_id field is valid */
  11959. A_UINT32 valid_vdev_id;
  11960. /* VDEV to which the peer belongs to */
  11961. A_UINT32 vdev_id;
  11962. } wmi_peer_estimated_linkspeed_event_fixed_param;
  11963. typedef struct {
  11964. A_UINT32 tlv_header; /* TLV tag and len; tag equals */
  11965. /* vdev ID */
  11966. A_UINT32 vdev_id;
  11967. A_UINT32 data_len;
  11968. /** length in byte of data[]. */
  11969. /* This structure is used to send REQ binary blobs
  11970. * from application/service to firmware where Host drv is pass through .
  11971. * Following this structure is the TLV:
  11972. * A_UINT8 data[]; // length in byte given by field data_len.
  11973. */
  11974. } wmi_req_stats_ext_cmd_fixed_param;
  11975. typedef struct {
  11976. A_UINT32 tlv_header;
  11977. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
  11978. A_UINT32 vdev_id;
  11979. /** vdev ID */
  11980. A_UINT32 data_len;
  11981. /** length in byte of data[]. */
  11982. /* This structure is used to send REQ binary blobs
  11983. * from firmware to application/service where Host drv is pass through .
  11984. * Following this structure is the TLV:
  11985. * A_UINT8 data[]; // length in byte given by field data_len.
  11986. */
  11987. } wmi_stats_ext_event_fixed_param;
  11988. typedef struct {
  11989. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
  11990. /** unique id identifying the VDEV, generated by the caller */
  11991. A_UINT32 vdev_id;
  11992. /** peer MAC address */
  11993. wmi_mac_addr peer_macaddr;
  11994. } wmi_peer_delete_resp_event_fixed_param;
  11995. typedef struct {
  11996. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
  11997. A_UINT32 tlv_header;
  11998. A_UINT32 vdev_id; /* vdev ID */
  11999. /* MAC address of the peer for which the estimated link speed is required. */
  12000. wmi_mac_addr peer_macaddr;
  12001. A_UINT32 state; /* peer state */
  12002. } wmi_peer_state_event_fixed_param;
  12003. typedef struct {
  12004. /*
  12005. * TLV tag and len; tag equals
  12006. * WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param
  12007. */
  12008. A_UINT32 tlv_header;
  12009. /* unique id identifying the VDEV, generated by the caller */
  12010. A_UINT32 vdev_id;
  12011. /* peer MAC address */
  12012. wmi_mac_addr peer_macaddr;
  12013. } wmi_peer_assoc_conf_event_fixed_param;
  12014. enum {
  12015. WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0,
  12016. /** scan_type: passive */
  12017. WMI_2G4_HT40_OBSS_SCAN_ACTIVE,
  12018. /** scan_type: active */
  12019. };
  12020. typedef struct {
  12021. /**
  12022. * TLV tag and len;
  12023. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
  12024. */
  12025. A_UINT32 tlv_header;
  12026. A_UINT32 vdev_id;
  12027. /**
  12028. * active or passive. if active all the channels are actively scanned.
  12029. * if passive then all the channels are passively scanned
  12030. */
  12031. A_UINT32 scan_type;
  12032. /**
  12033. * FW can perform multiple scans with in a OBSS scan interval.
  12034. * For each scan,
  12035. * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
  12036. * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
  12037. * The unit for these 2 parameters is TUs.
  12038. */
  12039. A_UINT32 obss_scan_passive_dwell;
  12040. A_UINT32 obss_scan_active_dwell;
  12041. /**
  12042. * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
  12043. * both min and total per channel dwell time requirement
  12044. */
  12045. A_UINT32 bss_channel_width_trigger_scan_interval;
  12046. /**
  12047. * FW can perform multiple scans with in a OBSS scan interval.
  12048. * For each scan,
  12049. * the total per channel dwell time across all scans with in OBSS scan interval should be
  12050. * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
  12051. * for active scans and ,
  12052. * The unit for these 2 parameters is TUs.
  12053. */
  12054. A_UINT32 obss_scan_passive_total_per_channel;
  12055. A_UINT32 obss_scan_active_total_per_channel;
  12056. A_UINT32 bss_width_channel_transition_delay_factor;
  12057. /** parameter to check exemption from scan */
  12058. A_UINT32 obss_scan_activity_threshold;
  12059. /** parameter to check exemption from scan */
  12060. /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
  12061. A_UINT32 forty_mhz_intolerant;
  12062. /** STA 40M bandwidth intolerant capability */
  12063. A_UINT32 current_operating_class;
  12064. /** STA current operating class */
  12065. /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
  12066. A_UINT32 channel_len;
  12067. /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
  12068. A_UINT32 ie_len;
  12069. } wmi_obss_scan_enable_cmd_fixed_param;
  12070. typedef struct {
  12071. /**
  12072. * TLV tag and len;
  12073. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
  12074. */
  12075. A_UINT32 tlv_header;
  12076. A_UINT32 vdev_id;
  12077. } wmi_obss_scan_disable_cmd_fixed_param;
  12078. typedef struct {
  12079. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
  12080. A_UINT32 tlv_header;
  12081. /** unique id identifying the VDEV */
  12082. A_UINT32 vdev_id;
  12083. /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
  12084. A_UINT32 tx_status;
  12085. } wmi_offload_prb_rsp_tx_status_event_fixed_param;
  12086. typedef enum {
  12087. WMI_FRAME_TX_OK, /* frame tx ok */
  12088. WMI_FRAME_TX_XRETRY, /* excessivley retried */
  12089. WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
  12090. WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
  12091. } WMI_FRAME_TX_STATUS;
  12092. /**
  12093. * This command is sent from WLAN host driver to firmware to
  12094. * request firmware to send the latest channel avoidance range
  12095. * to host.
  12096. *
  12097. * This command is only applicable for APQ platform which has
  12098. * modem on the platform. If firmware doesn't support MWS Coex,
  12099. * this command can be dropped by firmware.
  12100. *
  12101. * Host would send this command to firmware to request a channel
  12102. * avoidance information update.
  12103. */
  12104. typedef struct {
  12105. /** TLV tag and len; tag equals
  12106. * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
  12107. A_UINT32 tlv_header;
  12108. } wmi_chan_avoid_update_cmd_param;
  12109. /* ExtScan operation mode */
  12110. typedef enum {
  12111. WMI_EXTSCAN_MODE_NONE = 0x0000,
  12112. WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
  12113. WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
  12114. WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
  12115. } wmi_extscan_operation_mode;
  12116. /* Channel Mask */
  12117. typedef enum {
  12118. WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
  12119. WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
  12120. WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
  12121. WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
  12122. } wmi_channel_band_mask;
  12123. typedef enum {
  12124. WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
  12125. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
  12126. WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
  12127. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
  12128. WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
  12129. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
  12130. WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
  12131. WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
  12132. WMI_EXTSCAN_EVENT_MAX = 0x8000
  12133. } wmi_extscan_event_type;
  12134. #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
  12135. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
  12136. #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
  12137. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
  12138. WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
  12139. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
  12140. typedef enum {
  12141. WMI_EXTSCAN_NO_FORWARDING = 0x0000,
  12142. WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
  12143. } wmi_extscan_forwarding_flags;
  12144. typedef enum {
  12145. /* Use Motion Sensor Detection */
  12146. WMI_EXTSCAN_USE_MSD = 0x0001,
  12147. /* Extscan LPASS extended batching feature is supported and enabled */
  12148. WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002,
  12149. } wmi_extscan_configuration_flags;
  12150. typedef enum {
  12151. /*
  12152. * Cache the results of bucket whose
  12153. * configuration flags has this bit set
  12154. */
  12155. WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001,
  12156. /* Report ext scan results to context hub or not.*/
  12157. WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002,
  12158. } wmi_extscan_bucket_configuration_flags;
  12159. typedef enum {
  12160. WMI_EXTSCAN_STATUS_OK = 0,
  12161. WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
  12162. WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
  12163. WMI_EXTSCAN_STATUS_INTERNAL_ERROR
  12164. } wmi_extscan_start_stop_status;
  12165. typedef struct {
  12166. /** Request ID - to identify command. Cannot be 0 */
  12167. A_UINT32 request_id;
  12168. /** Requestor ID - client requesting ExtScan */
  12169. A_UINT32 requestor_id;
  12170. /** VDEV id(interface) that is requesting scan */
  12171. A_UINT32 vdev_id;
  12172. } wmi_extscan_command_id;
  12173. typedef struct {
  12174. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  12175. /** channel number */
  12176. A_UINT32 channel;
  12177. /** dwell time in msec - use defaults if 0 */
  12178. A_UINT32 min_dwell_time;
  12179. A_UINT32 max_dwell_time;
  12180. /** passive/active channel and other flags */
  12181. A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
  12182. } wmi_extscan_bucket_channel;
  12183. /* Scan Bucket specification */
  12184. typedef struct {
  12185. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  12186. /** Bucket ID - 0-based */
  12187. A_UINT32 bucket_id;
  12188. /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
  12189. A_UINT32 notify_extscan_events;
  12190. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  12191. A_UINT32 forwarding_flags;
  12192. /*
  12193. * ExtScan configuration flags -
  12194. * wmi_extscan__bucket_configuration_flags
  12195. */
  12196. A_UINT32 configuration_flags;
  12197. /** DEPRECATED member:multiplier to be applied to the periodic scan's base period */
  12198. A_UINT32 base_period_multiplier;
  12199. /** dwell time in msec on active channels - use defaults if 0 */
  12200. A_UINT32 min_dwell_time_active;
  12201. A_UINT32 max_dwell_time_active;
  12202. /** dwell time in msec on passive channels - use defaults if 0 */
  12203. A_UINT32 min_dwell_time_passive;
  12204. A_UINT32 max_dwell_time_passive;
  12205. /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
  12206. A_UINT32 channel_band;
  12207. /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
  12208. A_UINT32 num_channels;
  12209. /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
  12210. A_UINT32 min_period;
  12211. /** period above which exponent is not applied anymore */
  12212. A_UINT32 max_period;
  12213. /**
  12214. * back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
  12215. * new_bucket_period = last_bucket_period + last_exponent_period exp_backoff
  12216. */
  12217. A_UINT32 exp_backoff;
  12218. /** number of scans performed at a given periodicity after which exponential back off value is
  12219. * applied to current periodicity to obtain a newer one
  12220. */
  12221. A_UINT32 exp_max_step_count;
  12222. /** Followed by the variable length TLV chan_list:
  12223. * wmi_extscan_bucket_channel chan_list[] */
  12224. } wmi_extscan_bucket;
  12225. typedef struct {
  12226. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
  12227. /** Request ID - to identify command. Cannot be 0 */
  12228. A_UINT32 request_id;
  12229. /** Requestor ID - client requesting ExtScan */
  12230. A_UINT32 requestor_id;
  12231. /** VDEV id(interface) that is requesting scan */
  12232. A_UINT32 vdev_id;
  12233. /** table ID - to allow support for multiple simultaneous requests */
  12234. A_UINT32 table_id;
  12235. /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
  12236. A_UINT32 base_period;
  12237. /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
  12238. A_UINT32 max_iterations;
  12239. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  12240. A_UINT32 forwarding_flags;
  12241. /** ExtScan configuration flags - wmi_extscan_configuration_flags */
  12242. A_UINT32 configuration_flags;
  12243. /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
  12244. A_UINT32 notify_extscan_events;
  12245. /** Scan Priority, input to scan scheduler */
  12246. A_UINT32 scan_priority;
  12247. /** Maximum number of BSSIDs to cache on each scan cycle */
  12248. A_UINT32 max_bssids_per_scan_cycle;
  12249. /** Minimum RSSI value to report */
  12250. A_UINT32 min_rssi;
  12251. /** Maximum table usage in percentage */
  12252. A_UINT32 max_table_usage;
  12253. /** default dwell time in msec on active channels */
  12254. A_UINT32 min_dwell_time_active;
  12255. A_UINT32 max_dwell_time_active;
  12256. /** default dwell time in msec on passive channels */
  12257. A_UINT32 min_dwell_time_passive;
  12258. A_UINT32 max_dwell_time_passive;
  12259. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  12260. A_UINT32 min_rest_time;
  12261. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  12262. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  12263. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  12264. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  12265. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  12266. * irrespective of activity. activity is determined by the idle_time parameter.
  12267. */
  12268. A_UINT32 max_rest_time;
  12269. /** time before sending next set of probe requests.
  12270. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  12271. * The number of probe requests specified depends on the ssid_list and bssid_list
  12272. */
  12273. /** Max number of probes to be sent */
  12274. A_UINT32 n_probes;
  12275. /** time in msec between 2 sets of probe requests. */
  12276. A_UINT32 repeat_probe_time;
  12277. /** time in msec between 2 consequetive probe requests with in a set. */
  12278. A_UINT32 probe_spacing_time;
  12279. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  12280. A_UINT32 idle_time;
  12281. /** maximum time in msec allowed for scan */
  12282. A_UINT32 max_scan_time;
  12283. /** delay in msec before sending first probe request after switching to a channel */
  12284. A_UINT32 probe_delay;
  12285. /** Scan control flags */
  12286. A_UINT32 scan_ctrl_flags;
  12287. /** Burst duration time in msec*/
  12288. A_UINT32 burst_duration;
  12289. /** number of bssids in the TLV bssid_list[] */
  12290. A_UINT32 num_bssid;
  12291. /** number of ssid in the TLV ssid_list[] */
  12292. A_UINT32 num_ssids;
  12293. /** number of bytes in TLV ie_data[] */
  12294. A_UINT32 ie_len;
  12295. /** number of buckets in the TLV bucket_list[] */
  12296. A_UINT32 num_buckets;
  12297. /** in number of scans, send notifications to host after these many scans */
  12298. A_UINT32 report_threshold_num_scans;
  12299. /** number of channels in channel_list[] determined by the
  12300. sum of wmi_extscan_bucket.num_channels in array */
  12301. /**
  12302. * TLV (tag length value ) parameters follow the extscan_cmd
  12303. * structure. The TLV's are:
  12304. * wmi_ssid ssid_list[];
  12305. * wmi_mac_addr bssid_list[];
  12306. * A_UINT8 ie_data[];
  12307. * wmi_extscan_bucket bucket_list[];
  12308. * wmi_extscan_bucket_channel channel_list[];
  12309. */
  12310. } wmi_extscan_start_cmd_fixed_param;
  12311. typedef struct {
  12312. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
  12313. /** Request ID - to match running command. 0 matches any request */
  12314. A_UINT32 request_id;
  12315. /** Requestor ID - client requesting stop */
  12316. A_UINT32 requestor_id;
  12317. /** VDEV id(interface) that is requesting scan */
  12318. A_UINT32 vdev_id;
  12319. /** table ID - to allow support for multiple simultaneous requests */
  12320. A_UINT32 table_id;
  12321. } wmi_extscan_stop_cmd_fixed_param;
  12322. enum wmi_extscan_get_cached_results_flags {
  12323. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
  12324. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
  12325. };
  12326. typedef struct {
  12327. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
  12328. /** request ID - used to correlate command with events */
  12329. A_UINT32 request_id;
  12330. /** Requestor ID - client that requested results */
  12331. A_UINT32 requestor_id;
  12332. /** VDEV id(interface) that is requesting scan */
  12333. A_UINT32 vdev_id;
  12334. /** table ID - to allow support for multiple simultaneous requests */
  12335. A_UINT32 table_id;
  12336. /** maximum number of results to be returned */
  12337. A_UINT32 max_results;
  12338. /** flush BSSID list - wmi_extscan_get_cached_results_flags */
  12339. A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
  12340. } wmi_extscan_get_cached_results_cmd_fixed_param;
  12341. typedef struct {
  12342. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
  12343. /** request ID - used to correlate command with events */
  12344. A_UINT32 request_id;
  12345. /** Requestor ID - client that requested results */
  12346. A_UINT32 requestor_id;
  12347. /** VDEV id(interface) that is requesting scan */
  12348. A_UINT32 vdev_id;
  12349. /** table ID - to allow support for multiple simultaneous requests */
  12350. A_UINT32 table_id;
  12351. } wmi_extscan_get_wlan_change_results_cmd_fixed_param;
  12352. typedef struct {
  12353. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  12354. /**bssid */
  12355. wmi_mac_addr bssid;
  12356. /**channel number */
  12357. A_UINT32 channel;
  12358. /**upper RSSI limit */
  12359. A_UINT32 upper_rssi_limit;
  12360. /**lower RSSI limit */
  12361. A_UINT32 lower_rssi_limit;
  12362. } wmi_extscan_wlan_change_bssid_param;
  12363. typedef struct {
  12364. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
  12365. /** Request ID - to identify command. Cannot be 0 */
  12366. A_UINT32 request_id;
  12367. /** Requestor ID - client requesting wlan change monitoring */
  12368. A_UINT32 requestor_id;
  12369. /** VDEV id(interface) that is requesting scan */
  12370. A_UINT32 vdev_id;
  12371. /** table ID - to allow support for multiple simultaneous tables */
  12372. A_UINT32 table_id;
  12373. /** operation mode: start/stop */
  12374. A_UINT32 mode; /* wmi_extscan_operation_mode */
  12375. /** number of rssi samples to store */
  12376. A_UINT32 max_rssi_samples;
  12377. /** number of samples to use to calculate RSSI average */
  12378. A_UINT32 rssi_averaging_samples;
  12379. /** number of scans to confirm loss of contact with RSSI */
  12380. A_UINT32 lost_ap_scan_count;
  12381. /** number of out-of-range BSSIDs necessary to send event */
  12382. A_UINT32 max_out_of_range_count;
  12383. /** total number of bssid signal descriptors (in all pages) */
  12384. A_UINT32 total_entries;
  12385. /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
  12386. A_UINT32 first_entry_index;
  12387. /** number of bssid signal descriptors in this page */
  12388. A_UINT32 num_entries_in_page;
  12389. /* Following this structure is the TLV:
  12390. * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[]; // number of elements given by field num_page_entries.
  12391. */
  12392. } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
  12393. typedef struct {
  12394. /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  12395. A_UINT32 tlv_header;
  12396. /**ssid */
  12397. wmi_ssid ssid;
  12398. /**band */
  12399. A_UINT32 band;
  12400. /**RSSI threshold for reporting */
  12401. A_UINT32 min_rssi;
  12402. A_UINT32 max_rssi;
  12403. } wmi_extscan_hotlist_ssid_entry;
  12404. typedef struct {
  12405. /**
  12406. * TLV tag and len; tag equals
  12407. * MITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param
  12408. */
  12409. A_UINT32 tlv_header;
  12410. /** Request ID - to identify command. Cannot be 0 */
  12411. A_UINT32 request_id;
  12412. /** Requestor ID - client requesting hotlist ssid monitoring */
  12413. A_UINT32 requestor_id;
  12414. /** VDEV id(interface) that is requesting scan */
  12415. A_UINT32 vdev_id;
  12416. /** table ID - to allow support for multiple simultaneous tables */
  12417. A_UINT32 table_id;
  12418. /** operation mode: start/stop */
  12419. A_UINT32 mode; /* wmi_extscan_operation_mode */
  12420. /**total number of ssids (in all pages) */
  12421. A_UINT32 total_entries;
  12422. /**index of the first ssid entry found in the TLV extscan_hotlist_ssid_entry*/
  12423. A_UINT32 first_entry_index;
  12424. /**number of ssids in this page */
  12425. A_UINT32 num_entries_in_page;
  12426. /** number of consecutive scans to confirm loss of an ssid **/
  12427. A_UINT32 lost_ap_scan_count;
  12428. /* Following this structure is the TLV:
  12429. * wmi_extscan_hotlist_ssid_entry hotlist_ssid[];
  12430. * number of element given by field num_page_entries.
  12431. */
  12432. } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
  12433. typedef struct {
  12434. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  12435. /**bssid */
  12436. wmi_mac_addr bssid;
  12437. /**RSSI min threshold for reporting */
  12438. A_UINT32 min_rssi;
  12439. /**Deprecated entry channel number */
  12440. A_UINT32 channel;
  12441. /** RSSI max threshold for reporting */
  12442. A_UINT32 max_rssi;
  12443. } wmi_extscan_hotlist_entry;
  12444. typedef struct {
  12445. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
  12446. /** Request ID - to identify command. Cannot be 0 */
  12447. A_UINT32 request_id;
  12448. /** Requestor ID - client requesting hotlist monitoring */
  12449. A_UINT32 requestor_id;
  12450. /** VDEV id(interface) that is requesting scan */
  12451. A_UINT32 vdev_id;
  12452. /** table ID - to allow support for multiple simultaneous tables */
  12453. A_UINT32 table_id;
  12454. /** operation mode: start/stop */
  12455. A_UINT32 mode; /* wmi_extscan_operation_mode */
  12456. /**total number of bssids (in all pages) */
  12457. A_UINT32 total_entries;
  12458. /**index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry*/
  12459. A_UINT32 first_entry_index;
  12460. /**number of bssids in this page */
  12461. A_UINT32 num_entries_in_page;
  12462. /** number of consecutive scans to confirm loss of contact with AP */
  12463. A_UINT32 lost_ap_scan_count;
  12464. /* Following this structure is the TLV:
  12465. * wmi_extscan_hotlist_entry hotlist[]; // number of elements given by field num_page_entries.
  12466. */
  12467. } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
  12468. typedef struct {
  12469. /* TLV tag and len; tag equals
  12470. *WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  12471. A_UINT32 tlv_header;
  12472. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  12473. A_UINT32 config_request_id;
  12474. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID
  12475. that configured the table */
  12476. A_UINT32 config_requestor_id;
  12477. /**
  12478. * VDEV id(interface) of the
  12479. * WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table
  12480. */
  12481. A_UINT32 config_vdev_id;
  12482. /** table ID - to allow support for multiple simultaneous tables */
  12483. A_UINT32 table_id;
  12484. /**total number of ssids (in all pages) */
  12485. A_UINT32 total_entries;
  12486. /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  12487. A_UINT32 first_entry_index;
  12488. /**number of ssids in this page */
  12489. A_UINT32 num_entries_in_page;
  12490. /* Following this structure is the TLV:
  12491. * wmi_extscan_wlan_descriptor hotlist_match[];
  12492. * number of descriptors given by field num_entries_in_page
  12493. */
  12494. } wmi_extscan_hotlist_ssid_match_event_fixed_param;
  12495. typedef struct {
  12496. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  12497. /** table ID - to allow support for multiple simultaneous tables */
  12498. A_UINT32 table_id;
  12499. /** size in bytes of scan cache entry */
  12500. A_UINT32 scan_cache_entry_size;
  12501. /** maximum number of scan cache entries */
  12502. A_UINT32 max_scan_cache_entries;
  12503. /** maximum number of buckets per extscan request */
  12504. A_UINT32 max_buckets;
  12505. /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
  12506. A_UINT32 max_bssid_per_scan;
  12507. /** table usage level at which indication must be sent to host */
  12508. A_UINT32 max_table_usage_threshold;
  12509. } wmi_extscan_cache_capabilities;
  12510. typedef struct {
  12511. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  12512. /** table ID - to allow support for multiple simultaneous tables */
  12513. A_UINT32 table_id;
  12514. /** size in bytes of wlan change entry */
  12515. A_UINT32 wlan_change_entry_size;
  12516. /** maximum number of entries in wlan change table */
  12517. A_UINT32 max_wlan_change_entries;
  12518. /** number of RSSI samples used for averaging RSSI */
  12519. A_UINT32 max_rssi_averaging_samples;
  12520. /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
  12521. A_UINT32 max_rssi_history_entries;
  12522. } wmi_extscan_wlan_change_monitor_capabilities;
  12523. typedef struct {
  12524. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  12525. /** table ID - to allow support for multiple simultaneous tables */
  12526. A_UINT32 table_id;
  12527. /** size in bytes of hotlist entry */
  12528. A_UINT32 wlan_hotlist_entry_size;
  12529. /** maximum number of entries in wlan change table */
  12530. A_UINT32 max_hotlist_entries;
  12531. } wmi_extscan_hotlist_monitor_capabilities;
  12532. typedef struct {
  12533. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
  12534. /** Request ID - matches request ID used to start hot list monitoring */
  12535. A_UINT32 request_id;
  12536. /** Requestor ID - client requesting stop */
  12537. A_UINT32 requestor_id;
  12538. /** number of extscan caches */
  12539. A_UINT32 num_extscan_cache_tables;
  12540. /** number of wlan change lists */
  12541. A_UINT32 num_wlan_change_monitor_tables;
  12542. /** number of hotlists */
  12543. A_UINT32 num_hotlist_monitor_tables;
  12544. /** if one sided rtt data collection is supported */
  12545. A_UINT32 rtt_one_sided_supported;
  12546. /** if 11v data collection is supported */
  12547. A_UINT32 rtt_11v_supported;
  12548. /** if 11mc data collection is supported */
  12549. A_UINT32 rtt_ftm_supported;
  12550. /** number of extscan cache capabilities (one per table) */
  12551. A_UINT32 num_extscan_cache_capabilities;
  12552. /** number of wlan change capabilities (one per table) */
  12553. A_UINT32 num_extscan_wlan_change_capabilities;
  12554. /** number of extscan hotlist capabilities (one per table) */
  12555. A_UINT32 num_extscan_hotlist_capabilities;
  12556. /* Following this structure is the TLV:
  12557. * wmi_extscan_cache_capabilities extscan_cache_capabilities; // number of capabilities given by num_extscan_caches
  12558. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; // number of capabilities given by num_wlan_change_monitor_tables
  12559. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; // number of capabilities given by num_hotlist_monitor_tables
  12560. */
  12561. } wmi_extscan_set_capabilities_cmd_fixed_param;
  12562. typedef struct {
  12563. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
  12564. /** Request ID - matches request ID used to start hot list monitoring */
  12565. A_UINT32 request_id;
  12566. /** Requestor ID - client requesting capabilities */
  12567. A_UINT32 requestor_id;
  12568. } wmi_extscan_get_capabilities_cmd_fixed_param;
  12569. typedef struct {
  12570. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
  12571. /** Request ID of the operation that was started/stopped */
  12572. A_UINT32 request_id;
  12573. /** Requestor ID of the operation that was started/stopped */
  12574. A_UINT32 requestor_id;
  12575. /** VDEV id(interface) of the operation that was started/stopped */
  12576. A_UINT32 vdev_id;
  12577. /** extscan WMI command */
  12578. A_UINT32 command;
  12579. /** operation mode: start/stop */
  12580. A_UINT32 mode; /* wmi_extscan_operation_mode */
  12581. /**success/failure */
  12582. A_UINT32 status; /* enum wmi_extscan_start_stop_status */
  12583. /** table ID - to allow support for multiple simultaneous requests */
  12584. A_UINT32 table_id;
  12585. } wmi_extscan_start_stop_event_fixed_param;
  12586. typedef struct {
  12587. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
  12588. /** Request ID of the extscan operation that is currently running */
  12589. A_UINT32 request_id;
  12590. /** Requestor ID of the extscan operation that is currently running */
  12591. A_UINT32 requestor_id;
  12592. /** VDEV id(interface) of the extscan operation that is currently running */
  12593. A_UINT32 vdev_id;
  12594. /** scan event (wmi_scan_event_type) */
  12595. A_UINT32 event; /* wmi_extscan_event_type */
  12596. /** table ID - to allow support for multiple simultaneous requests */
  12597. A_UINT32 table_id;
  12598. /**number of buckets */
  12599. A_UINT32 num_buckets;
  12600. /* Following this structure is the TLV:
  12601. * A_UINT32 bucket_id[]; // number of elements given by field num_buckets.
  12602. */
  12603. } wmi_extscan_operation_event_fixed_param;
  12604. /* Types of extscan tables */
  12605. typedef enum {
  12606. EXTSCAN_TABLE_NONE = 0,
  12607. EXTSCAN_TABLE_BSSID = 1,
  12608. EXTSCAN_TABLE_RSSI = 2,
  12609. } wmi_extscan_table_type;
  12610. typedef struct {
  12611. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
  12612. /** Request ID of the extscan operation that is currently running */
  12613. A_UINT32 request_id;
  12614. /** Requestor ID of the extscan operation that is currently running */
  12615. A_UINT32 requestor_id;
  12616. /** VDEV id(interface) of the extscan operation that is currently running */
  12617. A_UINT32 vdev_id;
  12618. /** table ID - to allow support for multiple simultaneous tables */
  12619. A_UINT32 table_id;
  12620. /**see wmi_extscan_table_type for table reporting usage */
  12621. A_UINT32 table_type;
  12622. /**number of entries in use */
  12623. A_UINT32 entries_in_use;
  12624. /**maximum number of entries in table */
  12625. A_UINT32 maximum_entries;
  12626. } wmi_extscan_table_usage_event_fixed_param;
  12627. typedef enum {
  12628. /**
  12629. * Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
  12630. * this can be used to discard scan results
  12631. */
  12632. WMI_SCAN_STATUS_INTERRUPTED = 1
  12633. } wmi_scan_status_flags;
  12634. typedef struct {
  12635. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  12636. /** RSSI */
  12637. A_UINT32 rssi;
  12638. /** time stamp in milliseconds */
  12639. A_UINT32 tstamp;
  12640. /** Extscan cycle during which this entry was scanned */
  12641. A_UINT32 scan_cycle_id;
  12642. /**
  12643. * flag to indicate if the given result was obtained as part of
  12644. * interrupted (aborted/large time gap preempted) scan
  12645. */
  12646. A_UINT32 flags;
  12647. /** Bitmask of buckets (i.e. sets of channels) scanned */
  12648. A_UINT32 buckets_scanned;
  12649. } wmi_extscan_rssi_info;
  12650. typedef struct {
  12651. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  12652. /**bssid */
  12653. wmi_mac_addr bssid;
  12654. /**ssid */
  12655. wmi_ssid ssid;
  12656. /**channel number */
  12657. A_UINT32 channel;
  12658. /* capabilities */
  12659. A_UINT32 capabilities;
  12660. /* beacon interval in TUs */
  12661. A_UINT32 beacon_interval;
  12662. /**time stamp in milliseconds - time last seen */
  12663. A_UINT32 tstamp;
  12664. /**flags - _tExtScanEntryFlags */
  12665. A_UINT32 flags;
  12666. /**RTT in ns */
  12667. A_UINT32 rtt;
  12668. /**rtt standard deviation */
  12669. A_UINT32 rtt_sd;
  12670. /* rssi information */
  12671. A_UINT32 number_rssi_samples;
  12672. /** IE length */
  12673. A_UINT32 ie_length; /* length of IE data */
  12674. } wmi_extscan_wlan_descriptor;
  12675. typedef struct {
  12676. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
  12677. /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  12678. A_UINT32 request_id;
  12679. /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  12680. A_UINT32 requestor_id;
  12681. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  12682. A_UINT32 vdev_id;
  12683. /** Request ID of the extscan operation that is currently running */
  12684. A_UINT32 extscan_request_id;
  12685. /** Requestor ID of the extscan operation that is currently running */
  12686. A_UINT32 extscan_requestor_id;
  12687. /** VDEV id(interface) of the extscan operation that is currently running */
  12688. A_UINT32 extscan_vdev_id;
  12689. /** table ID - to allow support for multiple simultaneous tables */
  12690. A_UINT32 table_id;
  12691. /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
  12692. A_UINT32 current_tstamp;
  12693. /**total number of bssids (in all pages) */
  12694. A_UINT32 total_entries;
  12695. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  12696. A_UINT32 first_entry_index;
  12697. /**number of bssids in this page */
  12698. A_UINT32 num_entries_in_page;
  12699. /* number of buckets scanned */
  12700. A_UINT32 buckets_scanned;
  12701. /* Followed by the variable length TLVs
  12702. * wmi_extscan_wlan_descriptor bssid_list[]
  12703. * wmi_extscan_rssi_info rssi_list[]
  12704. * A_UINT8 ie_list[]
  12705. */
  12706. } wmi_extscan_cached_results_event_fixed_param;
  12707. typedef enum {
  12708. EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
  12709. EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
  12710. EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
  12711. } wmi_extscan_wlan_change_flags;
  12712. typedef struct {
  12713. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  12714. /**bssid */
  12715. wmi_mac_addr bssid;
  12716. /**time stamp in milliseconds */
  12717. A_UINT32 tstamp;
  12718. /**upper RSSI limit */
  12719. A_UINT32 upper_rssi_limit;
  12720. /**lower RSSI limit */
  12721. A_UINT32 lower_rssi_limit;
  12722. /** channel */
  12723. A_UINT32 channel; /* in MHz */
  12724. /**current RSSI average */
  12725. A_UINT32 rssi_average;
  12726. /**flags - wmi_extscan_wlan_change_flags */
  12727. A_UINT32 flags;
  12728. /**legnth of RSSI history to follow (number of values) */
  12729. A_UINT32 num_rssi_samples;
  12730. } wmi_extscan_wlan_change_result_bssid;
  12731. typedef struct {
  12732. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
  12733. /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  12734. A_UINT32 request_id;
  12735. /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  12736. A_UINT32 requestor_id;
  12737. /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  12738. A_UINT32 vdev_id;
  12739. /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  12740. A_UINT32 config_request_id;
  12741. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  12742. A_UINT32 config_requestor_id;
  12743. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  12744. A_UINT32 config_vdev_id;
  12745. /** table ID - to allow support for multiple simultaneous tables */
  12746. A_UINT32 table_id;
  12747. /**number of entries with RSSI out of range or BSSID not detected */
  12748. A_UINT32 change_count;
  12749. /**total number of bssid signal descriptors (in all pages) */
  12750. A_UINT32 total_entries;
  12751. /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
  12752. A_UINT32 first_entry_index;
  12753. /**number of bssids signal descriptors in this page */
  12754. A_UINT32 num_entries_in_page;
  12755. /* Following this structure is the TLV:
  12756. * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[]; // number of descriptors given by field num_entries_in_page.
  12757. * Following this structure is the list of RSSI values (each is an A_UINT8):
  12758. * A_UINT8 rssi_list[]; // last N RSSI values.
  12759. */
  12760. } wmi_extscan_wlan_change_results_event_fixed_param;
  12761. enum _tExtScanEntryFlags {
  12762. WMI_HOTLIST_FLAG_NONE = 0x00,
  12763. WMI_HOTLIST_FLAG_PRESENCE = 0x01,
  12764. WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
  12765. };
  12766. typedef struct {
  12767. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  12768. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  12769. A_UINT32 config_request_id;
  12770. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  12771. A_UINT32 config_requestor_id;
  12772. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  12773. A_UINT32 config_vdev_id;
  12774. /** table ID - to allow support for multiple simultaneous tables */
  12775. A_UINT32 table_id;
  12776. /**total number of bssids (in all pages) */
  12777. A_UINT32 total_entries;
  12778. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  12779. A_UINT32 first_entry_index;
  12780. /**number of bssids in this page */
  12781. A_UINT32 num_entries_in_page;
  12782. /* Following this structure is the TLV:
  12783. * wmi_extscan_wlan_descriptor hotlist_match[]; // number of descriptors given by field num_entries_in_page.
  12784. */
  12785. } wmi_extscan_hotlist_match_event_fixed_param;
  12786. typedef struct {
  12787. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
  12788. /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  12789. A_UINT32 request_id;
  12790. /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  12791. A_UINT32 requestor_id;
  12792. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  12793. A_UINT32 vdev_id;
  12794. /** number of extscan caches */
  12795. A_UINT32 num_extscan_cache_tables;
  12796. /** number of wlan change lists */
  12797. A_UINT32 num_wlan_change_monitor_tables;
  12798. /** number of hotlists */
  12799. A_UINT32 num_hotlist_monitor_tables;
  12800. /** if one sided rtt data collection is supported */
  12801. A_UINT32 rtt_one_sided_supported;
  12802. /** if 11v data collection is supported */
  12803. A_UINT32 rtt_11v_supported;
  12804. /** if 11mc data collection is supported */
  12805. A_UINT32 rtt_ftm_supported;
  12806. /** number of extscan cache capabilities (one per table) */
  12807. A_UINT32 num_extscan_cache_capabilities;
  12808. /** number of wlan change capabilities (one per table) */
  12809. A_UINT32 num_extscan_wlan_change_capabilities;
  12810. /** number of extscan hotlist capabilities (one per table) */
  12811. A_UINT32 num_extscan_hotlist_capabilities;
  12812. /* max number of roaming ssid whitelist firmware can support */
  12813. A_UINT32 num_roam_ssid_whitelist;
  12814. /* max number of blacklist bssid firmware can support */
  12815. A_UINT32 num_roam_bssid_blacklist;
  12816. /* max number of preferred list firmware can support */
  12817. A_UINT32 num_roam_bssid_preferred_list;
  12818. /* max number of hotlist ssids firmware can support */
  12819. A_UINT32 num_extscan_hotlist_ssid;
  12820. /* max number of epno networks firmware can support */
  12821. A_UINT32 num_epno_networks;
  12822. /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
  12823. * supports multiple lists of each type.
  12824. *
  12825. * wmi_extscan_cache_capabilities extscan_cache_capabilities[] // capabilities of extscan cache (BSSID/RSSI lists)
  12826. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] // capabilities of wlan_change_monitor_tables
  12827. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] // capabilities of hotlist_monitor_tables
  12828. */
  12829. } wmi_extscan_capabilities_event_fixed_param;
  12830. /* WMI_D0_WOW_DISABLE_ACK_EVENTID */
  12831. typedef struct {
  12832. A_UINT32 tlv_header;
  12833. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
  12834. A_UINT32 reserved0; /* for future need */
  12835. } wmi_d0_wow_disable_ack_event_fixed_param;
  12836. /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
  12837. typedef struct {
  12838. /** TLV tag and len; tag equals
  12839. * WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param
  12840. */
  12841. A_UINT32 tlv_header;
  12842. /** pdev_id for identifying the MAC
  12843. * See macros starting with WMI_PDEV_ID_ for values.
  12844. */
  12845. A_UINT32 pdev_id;
  12846. } wmi_pdev_resume_event_fixed_param;
  12847. /** value representing all modules */
  12848. #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
  12849. /* param definitions */
  12850. /**
  12851. * Log level for a given module. Value contains both module id and log level.
  12852. * here is the bitmap definition for value.
  12853. * module Id : 16
  12854. * Flags : reserved
  12855. * Level : 8
  12856. * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
  12857. * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
  12858. */
  12859. #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
  12860. #define WMI_DBGLOG_SET_LOG_LEVEL(val, lvl) do { \
  12861. (val) |= (lvl & 0xff); \
  12862. } while (0)
  12863. #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
  12864. #define WMI_DBGLOG_SET_MODULE_ID(val, mid) do { \
  12865. (val) |= ((mid & 0xffff) << 16); \
  12866. } while (0)
  12867. #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
  12868. /**
  12869. * Enable the debug log for a given vdev. Value is vdev id
  12870. */
  12871. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
  12872. /**
  12873. * Disable the debug log for a given vdev. Value is vdev id
  12874. * All the log level for a given VDEV is disabled except the ERROR log messages
  12875. */
  12876. #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
  12877. /**
  12878. * set vdev enable bitmap. value is the vden enable bitmap
  12879. */
  12880. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
  12881. /**
  12882. * set a given log level to all the modules specified in the module bitmap.
  12883. * and set the log levle for all other modules to DBGLOG_ERR.
  12884. * value: log levelt to be set.
  12885. * module_id_bitmap : identifies the modules for which the log level should be set and
  12886. * modules for which the log level should be reset to DBGLOG_ERR.
  12887. */
  12888. #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
  12889. #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
  12890. #define WMI_MODULE_ENABLE(pmid_bitmap, mod_id) \
  12891. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
  12892. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
  12893. #define WMI_MODULE_DISABLE(pmid_bitmap, mod_id) \
  12894. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
  12895. (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
  12896. #define WMI_MODULE_IS_ENABLED(pmid_bitmap, mod_id) \
  12897. (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
  12898. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
  12899. #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
  12900. typedef struct {
  12901. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
  12902. A_UINT32 dbg_log_param;
  12903. /** param types are defined above */
  12904. A_UINT32 value;
  12905. /* The below array will follow this tlv ->fixed length module_id_bitmap[]
  12906. A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
  12907. */
  12908. } wmi_debug_log_config_cmd_fixed_param;
  12909. typedef struct {
  12910. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
  12911. A_UINT32 param; /* Reserved for future use */
  12912. /** pdev_id for identifying the MAC
  12913. * See macros starting with WMI_PDEV_ID_ for values.
  12914. */
  12915. A_UINT32 pdev_id;
  12916. } wmi_pdev_get_temperature_cmd_fixed_param;
  12917. typedef struct {
  12918. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
  12919. A_INT32 value; /* temprature value in Celcius degree */
  12920. /** pdev_id for identifying the MAC
  12921. * See macros starting with WMI_PDEV_ID_ for values.
  12922. */
  12923. A_UINT32 pdev_id;
  12924. } wmi_pdev_temperature_event_fixed_param;
  12925. typedef enum {
  12926. ANTDIV_HW_CFG_STATUS,
  12927. ANTDIV_SW_CFG_STATUS,
  12928. ANTDIV_MAX_STATUS_TYPE_NUM
  12929. } ANTDIV_STATUS_TYPE;
  12930. typedef struct {
  12931. /**
  12932. * TLV tag and len; tag equals
  12933. * WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param
  12934. */
  12935. A_UINT32 tlv_header;
  12936. /* Status event ID - see ANTDIV_STATUS_TYPE */
  12937. A_UINT32 status_event_id;
  12938. /**
  12939. * pdev_id for identifying the MAC
  12940. * See macros starting with WMI_PDEV_ID_ for values.
  12941. */
  12942. A_UINT32 pdev_id;
  12943. } wmi_pdev_get_antdiv_status_cmd_fixed_param;
  12944. typedef struct {
  12945. /**
  12946. * TLV tag and len; tag equals
  12947. * WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param
  12948. */
  12949. A_UINT32 tlv_header;
  12950. /* ANT DIV feature enabled or not */
  12951. A_UINT32 support;
  12952. A_UINT32 chain_num; /* how many chain supported */
  12953. /* how many ANT supported, 32 max */
  12954. A_UINT32 ant_num;
  12955. /**
  12956. * Each entry is for a tx/rx chain, and contains a bitmap
  12957. * identifying the antennas attached to that tx/rx chain.
  12958. */
  12959. A_UINT32 selectable_ant_mask[8];
  12960. /**
  12961. * pdev_id for identifying the MAC
  12962. * See macros starting with WMI_PDEV_ID_ for values.
  12963. */
  12964. A_UINT32 pdev_id;
  12965. } wmi_pdev_antdiv_status_event_fixed_param;
  12966. typedef struct {
  12967. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
  12968. A_UINT32 vdev_id;
  12969. A_UINT32 enable;
  12970. A_UINT32 srv_ipv4; /* server IP */
  12971. A_UINT32 start_lsb; /* starting address assigned to client */
  12972. A_UINT32 num_client; /* number of clients we support */
  12973. } wmi_set_dhcp_server_offload_cmd_fixed_param;
  12974. typedef enum {
  12975. AP_RX_DATA_OFFLOAD = 0x00,
  12976. STA_RX_DATA_OFFLOAD = 0x01,
  12977. } wmi_ipa_offload_types;
  12978. /**
  12979. * This command is sent from WLAN host driver to firmware for
  12980. * enabling/disabling IPA data-path offload features.
  12981. *
  12982. *
  12983. * Enabling data path offload to IPA(based on host INI configuration), example:
  12984. * when STA interface comes up,
  12985. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  12986. * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  12987. *
  12988. * Disabling data path offload to IPA, example:
  12989. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  12990. * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  12991. *
  12992. *
  12993. * This command is applicable only on the PCIE LL systems
  12994. *
  12995. */
  12996. typedef struct {
  12997. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
  12998. A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
  12999. A_UINT32 vdev_id;
  13000. A_UINT32 enable; /* 1 == enable, 0 == disable */
  13001. } wmi_ipa_offload_enable_disable_cmd_fixed_param;
  13002. typedef enum {
  13003. WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
  13004. WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
  13005. WMI_LED_FLASHING_PATTERN_RESERVED = 2,
  13006. } wmi_set_led_flashing_type;
  13007. /**
  13008. The state of the LED GPIO control is determined by two 32 bit values(X_0 and X_1) to produce a 64 bit value.
  13009. Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
  13010. remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
  13011. with the MSB of X_0 and continues to the LSB of X_1. After executing the timer interval of the LSB of X_1, the
  13012. pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
  13013. High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
  13014. Zero is reached, it is skipped and moves on to the next interval.
  13015. */
  13016. typedef struct {
  13017. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
  13018. A_UINT32 pattern_id; /* pattern identifier */
  13019. A_UINT32 led_x0; /* led flashing parameter0 */
  13020. A_UINT32 led_x1; /* led flashing parameter1 */
  13021. A_UINT32 gpio_num; /* GPIO number */
  13022. } wmi_set_led_flashing_cmd_fixed_param;
  13023. /**
  13024. * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
  13025. * within small networks that do not include a local name server.
  13026. * It utilizes essentially the same programming interfaces, packet formats and operating semantics
  13027. * as the unicast DNS, and the advantage is zero configuration service while no need for central or
  13028. * global server.
  13029. * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
  13030. * by type in a specified domain using standard DNS queries.
  13031. * Here, we provide the ability to advertise the available services by responding to mDNS queries.
  13032. */
  13033. typedef struct {
  13034. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
  13035. A_UINT32 vdev_id;
  13036. A_UINT32 enable;
  13037. } wmi_mdns_offload_cmd_fixed_param;
  13038. #define WMI_MAX_MDNS_FQDN_LEN 64
  13039. #define WMI_MAX_MDNS_RESP_LEN 512
  13040. #define WMI_MDNS_FQDN_TYPE_GENERAL 0
  13041. #define WMI_MDNS_FQDN_TYPE_UNIQUE 1
  13042. typedef struct {
  13043. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
  13044. A_UINT32 vdev_id;
  13045. /** type of fqdn, general or unique */
  13046. A_UINT32 type;
  13047. /** length of fqdn */
  13048. A_UINT32 fqdn_len;
  13049. /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
  13050. * A_UINT8 fqdn_data[]; // fully-qualified domain name to check if match with the received queries
  13051. */
  13052. } wmi_mdns_set_fqdn_cmd_fixed_param;
  13053. typedef struct {
  13054. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
  13055. A_UINT32 vdev_id;
  13056. /** Answer Resource Record count */
  13057. A_UINT32 AR_count;
  13058. /** length of response */
  13059. A_UINT32 resp_len;
  13060. /* Following this structure is the TLV byte stream of resp data of length resp_len
  13061. * A_UINT8 resp_data[]; // responses consisits of Resource Records
  13062. */
  13063. } wmi_mdns_set_resp_cmd_fixed_param;
  13064. typedef struct {
  13065. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
  13066. A_UINT32 vdev_id;
  13067. } wmi_mdns_get_stats_cmd_fixed_param;
  13068. typedef struct {
  13069. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
  13070. A_UINT32 vdev_id;
  13071. /** curTimestamp in milliseconds */
  13072. A_UINT32 curTimestamp;
  13073. /** last received Query in milliseconds */
  13074. A_UINT32 lastQueryTimestamp;
  13075. /** last sent Response in milliseconds */
  13076. A_UINT32 lastResponseTimestamp;
  13077. /** stats of received queries */
  13078. A_UINT32 totalQueries;
  13079. /** stats of macth queries */
  13080. A_UINT32 totalMatches;
  13081. /** stats of responses */
  13082. A_UINT32 totalResponses;
  13083. /** indicate the current status of mDNS offload */
  13084. A_UINT32 status;
  13085. } wmi_mdns_stats_event_fixed_param;
  13086. /**
  13087. * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
  13088. * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
  13089. * request and create/remove connection even host is suspended.
  13090. * 3 major components are offloaded:
  13091. * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
  13092. * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
  13093. * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
  13094. * Current implementation only supports WPA2 CCMP.
  13095. */
  13096. typedef struct {
  13097. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
  13098. /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
  13099. A_UINT32 vdev_id;
  13100. /** enable/disable sap auth offload */
  13101. A_UINT32 enable;
  13102. /** sap ssid */
  13103. wmi_ssid ap_ssid;
  13104. /** authentication mode (defined above) */
  13105. A_UINT32 rsn_authmode;
  13106. /** unicast cipher set */
  13107. A_UINT32 rsn_ucastcipherset;
  13108. /** mcast/group cipher set */
  13109. A_UINT32 rsn_mcastcipherset;
  13110. /** mcast/group management frames cipher set */
  13111. A_UINT32 rsn_mcastmgmtcipherset;
  13112. /** sap channel */
  13113. A_UINT32 channel;
  13114. /** length of psk */
  13115. A_UINT32 psk_len;
  13116. /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
  13117. * A_UINT8 psk[];
  13118. */
  13119. } wmi_sap_ofl_enable_cmd_fixed_param;
  13120. typedef struct {
  13121. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
  13122. /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
  13123. A_UINT32 vdev_id;
  13124. /** aid (association id) of this station */
  13125. A_UINT32 assoc_id;
  13126. /** peer station's mac addr */
  13127. wmi_mac_addr peer_macaddr;
  13128. /** length of association request frame */
  13129. A_UINT32 data_len;
  13130. /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
  13131. * A_UINT8 bufp[];
  13132. */
  13133. } wmi_sap_ofl_add_sta_event_fixed_param;
  13134. typedef enum {
  13135. SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
  13136. SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
  13137. } wmi_sap_ofl_del_sta_flags;
  13138. typedef struct {
  13139. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
  13140. /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
  13141. A_UINT32 vdev_id;
  13142. /** aid (association id) of this station */
  13143. A_UINT32 assoc_id;
  13144. /** peer station's mac addr */
  13145. wmi_mac_addr peer_macaddr;
  13146. /** disassociation reason */
  13147. A_UINT32 reason;
  13148. /** flags - wmi_sap_ofl_del_sta_flags */
  13149. A_UINT32 flags;
  13150. } wmi_sap_ofl_del_sta_event_fixed_param;
  13151. typedef struct {
  13152. /*
  13153. * TLV tag and len; tag equals
  13154. * WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param
  13155. */
  13156. A_UINT32 tlv_header;
  13157. A_UINT32 vdev_id;
  13158. /* Number of client failure connection attempt */
  13159. A_UINT32 num_retry;
  13160. /*Time in milliseconds to record the client's failure connection attempts*/
  13161. A_UINT32 retry_allow_time_ms;
  13162. /*
  13163. * Time in milliseconds to drop the connection request if
  13164. * client is blacklisted
  13165. */
  13166. A_UINT32 blackout_time_ms;
  13167. } wmi_sap_set_blacklist_param_cmd_fixed_param;
  13168. typedef struct {
  13169. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
  13170. A_UINT32 data_len; /** length in byte of data[]. */
  13171. /** This structure is used to send REQ binary blobs
  13172. * from application/service to firmware where Host drv is pass through .
  13173. * Following this structure is the TLV:
  13174. * A_UINT8 data[]; // length in byte given by field data_len.
  13175. */
  13176. } wmi_apfind_cmd_param;
  13177. typedef enum apfind_event_type_e {
  13178. APFIND_MATCH_EVENT = 0,
  13179. APFIND_WAKEUP_EVENT,
  13180. } APFIND_EVENT_TYPE;
  13181. typedef struct {
  13182. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
  13183. A_UINT32 event_type; /** APFIND_EVENT_TYPE */
  13184. A_UINT32 data_len; /** length in byte of data[]. */
  13185. /** This structure is used to send event binary blobs
  13186. * from firmware to application/service and Host drv.
  13187. * Following this structure is the TLV:
  13188. * A_UINT8 data[]; // length in byte given by field data_len.
  13189. */
  13190. } wmi_apfind_event_hdr;
  13191. /**
  13192. * OCB DCC types and structures.
  13193. */
  13194. /**
  13195. * DCC types as described in ETSI TS 102 687
  13196. * Type Format stepSize referenceValue numBits
  13197. * -------------------------------------------------------------------------
  13198. * ndlType_acPrio INTEGER (0...7) 1 number 3
  13199. * ndlType_controlLoop INTEGER (0...7) 1 0 3
  13200. * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
  13201. * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
  13202. * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
  13203. * ndlType_datarate INTEGER (0..7) Table 8 3
  13204. * ndlType_distance INTEGER (0..4095) 1 m 0 12
  13205. * ndlType_numberElements INTEGER (0..63) number 6
  13206. * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
  13207. * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
  13208. * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
  13209. * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
  13210. * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
  13211. * ndlType_timing INTEGER (0..4095) 10 ms 0 12
  13212. * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
  13213. * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
  13214. * ndlType_exponent INTEGER (0..100) 0.1 0 7
  13215. * ndlType_queueStatus Enumeration Table A.2 1
  13216. * ndlType_dccMechanism Bitset Table A.2 6
  13217. *
  13218. * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
  13219. * cannot be changed without breaking WMI compatibility.
  13220. *
  13221. * NOTE: For each of the types, one additional bit is allocated. This
  13222. * leftmost bit is used to indicate that the value is invalid.
  13223. */
  13224. #define SIZE_NDLTYPE_ACPRIO (1 + 3)
  13225. #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
  13226. #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
  13227. #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
  13228. #define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
  13229. #define SIZE_NDLTYPE_DATARATE (1 + 3)
  13230. #define SIZE_NDLTYPE_DISTANCE (1 + 12)
  13231. #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
  13232. #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
  13233. #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
  13234. #define SIZE_NDLTYPE_PATHLOSS (1 + 5)
  13235. #define SIZE_NDLTYPE_RXPOWER (1 + 7)
  13236. #define SIZE_NDLTYPE_SNR (1 + 7)
  13237. #define SIZE_NDLTYPE_TIMING (1 + 12)
  13238. #define SIZE_NDLTYPE_TXPOWER (1 + 7)
  13239. #define SIZE_NDLTYPE_RATIO (1 + 7)
  13240. #define SIZE_NDLTYPE_EXPONENT (1 + 7)
  13241. #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
  13242. #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
  13243. #define SIZE_BYTE (8)
  13244. #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
  13245. #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
  13246. #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
  13247. #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
  13248. #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
  13249. #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
  13250. #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
  13251. #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
  13252. #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
  13253. #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
  13254. #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
  13255. #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
  13256. #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
  13257. #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
  13258. #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
  13259. #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
  13260. #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
  13261. #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
  13262. #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
  13263. /**
  13264. * The MCS_COUNT macro cannot be modified without breaking
  13265. * WMI compatibility.
  13266. */
  13267. #define MCS_COUNT (8)
  13268. /**
  13269. * Flags for ndlType_dccMechanism.
  13270. */
  13271. typedef enum {
  13272. DCC_MECHANISM_TPC = 1,
  13273. DCC_MECHANISM_TRC = 2,
  13274. DCC_MECHANISM_TDC = 4,
  13275. DCC_MECHANISM_DSC = 8,
  13276. DCC_MECHANISM_TAC = 16,
  13277. DCC_MECHANISM_RESERVED = 32,
  13278. DCC_MECHANISM_ALL = 0x3f,
  13279. } wmi_dcc_ndl_type_dcc_mechanism;
  13280. /** Values for ndlType_queueStatus. */
  13281. typedef enum {
  13282. DCC_QUEUE_CLOSED = 0,
  13283. DCC_QUEUE_OPEN = 1,
  13284. } wmi_dcc_ndl_type_queue_status;
  13285. /**
  13286. * For ndlType_acPrio, use the values in wmi_traffic_ac.
  13287. * Values for ndlType_datarate.
  13288. */
  13289. typedef enum {
  13290. DCC_DATARATE_3_MBPS = 0,
  13291. DCC_DATARATE_4_5_MBPS = 1,
  13292. DCC_DATARATE_6_MBPS = 2,
  13293. DCC_DATARATE_9_MBPS = 3,
  13294. DCC_DATARATE_12_MBPS = 4,
  13295. DCC_DATARATE_18_MBPS = 5,
  13296. DCC_DATARATE_24_MBPS = 6,
  13297. DCC_DATARATE_27_MBPS = 7,
  13298. } wmi_dcc_ndl_type_datarate;
  13299. /** Data structure for active state configuration. */
  13300. typedef struct {
  13301. /** TLV tag and len; tag equals
  13302. * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config
  13303. */
  13304. A_UINT32 tlv_header;
  13305. /**
  13306. * NDL_asStateId, ndlType_numberElements, 1+6 bits.
  13307. * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
  13308. */
  13309. A_UINT32 state_info;
  13310. /**
  13311. * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
  13312. * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
  13313. * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
  13314. * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
  13315. */
  13316. A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
  13317. /**
  13318. * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  13319. * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  13320. * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  13321. * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  13322. */
  13323. A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  13324. /**
  13325. * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  13326. * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  13327. * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  13328. * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  13329. */
  13330. A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
  13331. /**
  13332. * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  13333. * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  13334. * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  13335. * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  13336. */
  13337. A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
  13338. /**
  13339. * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
  13340. * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
  13341. * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
  13342. * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
  13343. */
  13344. A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
  13345. } wmi_dcc_ndl_active_state_config;
  13346. #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
  13347. #define WMI_NDL_AS_STATE_ID_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
  13348. #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
  13349. #define WMI_NDL_AS_CHAN_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
  13350. #define WMI_NDL_AS_DCC_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
  13351. #define WMI_NDL_AS_DCC_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
  13352. #define WMI_NDL_AS_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  13353. #define WMI_NDL_AS_TX_POWER_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
  13354. #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  13355. #define WMI_NDL_AS_PACKET_INTERVAL_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL, val)
  13356. #define WMI_NDL_AS_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  13357. #define WMI_NDL_AS_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  13358. #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
  13359. #define WMI_NDL_AS_CARRIER_SENSE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER, val)
  13360. /** Data structure for EDCA/QOS parameters. */
  13361. typedef struct {
  13362. /** TLV tag and len; tag equals
  13363. * WMITLV_TAG_STRUC_wmi_qos_parameter */
  13364. A_UINT32 tlv_header;
  13365. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  13366. A_UINT32 aifsn;
  13367. /** Contention Window minimum. Range: 1 - 10 */
  13368. A_UINT32 cwmin;
  13369. /** Contention Window maximum. Range: 1 - 10 */
  13370. A_UINT32 cwmax;
  13371. } wmi_qos_parameter;
  13372. /** Data structure for information specific to a channel. */
  13373. typedef struct {
  13374. /** TLV tag and len; tag equals
  13375. * WMITLV_TAG_STRUC_wmi_ocb_channel */
  13376. A_UINT32 tlv_header;
  13377. A_UINT32 bandwidth; /* MHz units */
  13378. wmi_mac_addr mac_address;
  13379. } wmi_ocb_channel;
  13380. /** Data structure for an element of the schedule array. */
  13381. typedef struct {
  13382. /** TLV tag and len; tag equals
  13383. * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
  13384. A_UINT32 tlv_header;
  13385. A_UINT32 channel_freq; /* MHz units */
  13386. A_UINT32 total_duration; /* ms units */
  13387. A_UINT32 guard_interval; /* ms units */
  13388. } wmi_ocb_schedule_element;
  13389. /** Data structure for OCB configuration. */
  13390. typedef struct {
  13391. /** TLV tag and len; tag equals
  13392. * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
  13393. A_UINT32 tlv_header;
  13394. /** VDEV id(interface) that is being configured */
  13395. A_UINT32 vdev_id;
  13396. A_UINT32 channel_count;
  13397. A_UINT32 schedule_size;
  13398. A_UINT32 flags;
  13399. /**
  13400. * Max duration of continuing multichannel operation without
  13401. * receiving a TA frame (units = seconds)
  13402. */
  13403. A_UINT32 ta_max_duration;
  13404. /** This is followed by a TLV array of wmi_channel.
  13405. * This is followed by a TLV array of wmi_ocb_channel.
  13406. * This is followed by a TLV array of wmi_qos_parameter.
  13407. * This is followed by a TLV array of wmi_dcc_ndl_chan.
  13408. * This is followed by a TLV array of wmi_dcc_ndl_active_state_config.
  13409. * This is followed by a TLV array of wmi_ocb_schedule_element.
  13410. */
  13411. } wmi_ocb_set_config_cmd_fixed_param;
  13412. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
  13413. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
  13414. #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) \
  13415. (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
  13416. /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
  13417. typedef struct {
  13418. /** TLV tag and len; tag equals
  13419. * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param
  13420. */
  13421. A_UINT32 tlv_header;
  13422. /* VDEV id(interface)*/
  13423. A_UINT32 vdev_id;
  13424. A_UINT32 status;
  13425. } wmi_ocb_set_config_resp_event_fixed_param;
  13426. /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
  13427. * WMI compatibility.
  13428. */
  13429. /* The size of the utc time in bytes. */
  13430. #define SIZE_UTC_TIME (10)
  13431. /* The size of the utc time error in bytes. */
  13432. #define SIZE_UTC_TIME_ERROR (5)
  13433. /** Data structure to set the UTC time. */
  13434. typedef struct {
  13435. /** TLV tag and len; tag equals
  13436. * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
  13437. A_UINT32 tlv_header;
  13438. /*VDEV Identifier*/
  13439. A_UINT32 vdev_id;
  13440. /** 10 bytes of the utc time. */
  13441. A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME, SIZE_BYTE)];
  13442. /** 5 bytes of the time error. */
  13443. A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR, SIZE_BYTE)];
  13444. } wmi_ocb_set_utc_time_cmd_fixed_param;
  13445. #define WMI_UTC_TIME_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
  13446. #define WMI_UTC_TIME_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
  13447. #define WMI_TIME_ERROR_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
  13448. #define WMI_TIME_ERROR_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
  13449. /** Data structure start the timing advertisement. The template for the
  13450. * timing advertisement frame follows this structure in the WMI command.
  13451. */
  13452. typedef struct {
  13453. /** TLV tag and len; tag equals
  13454. * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
  13455. A_UINT32 tlv_header;
  13456. /*VDEV Identifier*/
  13457. A_UINT32 vdev_id;
  13458. /** Number of times the TA is sent every 5 seconds. */
  13459. A_UINT32 repeat_rate;
  13460. /** The frequency on which to transmit. */
  13461. A_UINT32 channel_freq; /* MHz units */
  13462. /** The offset into the template of the timestamp. */
  13463. A_UINT32 timestamp_offset;
  13464. /** The offset into the template of the time value. */
  13465. A_UINT32 time_value_offset;
  13466. /** The length of the timing advertisement template. The
  13467. * template is in the TLV data. */
  13468. A_UINT32 timing_advert_template_length;
  13469. /** This is followed by a binary array containing the TA template. */
  13470. } wmi_ocb_start_timing_advert_cmd_fixed_param;
  13471. /** Data structure to stop the timing advertisement. */
  13472. typedef struct {
  13473. /** TLV tag and len; tag equals
  13474. * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
  13475. A_UINT32 tlv_header;
  13476. /*VDEV Identifier*/
  13477. A_UINT32 vdev_id;
  13478. A_UINT32 channel_freq; /* MHz units */
  13479. } wmi_ocb_stop_timing_advert_cmd_fixed_param;
  13480. /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
  13481. typedef struct {
  13482. /** TLV tag and len; tag equals
  13483. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
  13484. A_UINT32 tlv_header;
  13485. /*VDEV Identifier*/
  13486. A_UINT32 vdev_id;
  13487. A_UINT32 reserved;
  13488. } wmi_ocb_get_tsf_timer_cmd_fixed_param;
  13489. /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
  13490. typedef struct {
  13491. /** TLV tag and len; tag equals
  13492. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
  13493. A_UINT32 tlv_header;
  13494. /*VDEV Identifier*/
  13495. A_UINT32 vdev_id;
  13496. A_UINT32 tsf_timer_high;
  13497. A_UINT32 tsf_timer_low;
  13498. } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
  13499. /** Data structure for DCC stats configuration per channel. */
  13500. typedef struct {
  13501. /** TLV tag and len; tag equals
  13502. * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
  13503. A_UINT32 tlv_header;
  13504. /*VDEV Identifier*/
  13505. A_UINT32 vdev_id;
  13506. /** The channel for which this applies, 16 bits.
  13507. * The dcc_stats_bitmap, 8 bits. */
  13508. A_UINT32 chan_info;
  13509. /** Demodulation model parameters.
  13510. *
  13511. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  13512. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  13513. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  13514. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  13515. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  13516. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  13517. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  13518. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  13519. */
  13520. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
  13521. /** Communication ranges.
  13522. *
  13523. * tx_power, ndlType_txPower, 1+7 bits.
  13524. * datarate, ndlType_datarate, 1+3 bits.
  13525. */
  13526. A_UINT32 tx_power_datarate;
  13527. /**
  13528. * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
  13529. * NDL_estCommRange, ndlType_distance, 1+12 bits.
  13530. */
  13531. A_UINT32 carrier_sense_est_comm_range;
  13532. /** Channel load measures. */
  13533. /**
  13534. * dccSensitivity, ndlType_rxPower, 1+7 bits.
  13535. * carrierSense, ndlType_rxPower, 1+7 bits.
  13536. * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
  13537. */
  13538. A_UINT32 dcc_stats;
  13539. /**
  13540. * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
  13541. * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
  13542. */
  13543. A_UINT32 packet_stats;
  13544. /**
  13545. * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
  13546. */
  13547. A_UINT32 channel_busy_time;
  13548. /**
  13549. *Transmit packet statistics.
  13550. * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  13551. * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  13552. * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  13553. * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  13554. */
  13555. A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
  13556. /**
  13557. * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  13558. * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  13559. * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  13560. * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  13561. */
  13562. A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  13563. /**
  13564. * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  13565. * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  13566. * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  13567. * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  13568. */
  13569. A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
  13570. /**
  13571. * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  13572. * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  13573. * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  13574. * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  13575. */
  13576. A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  13577. } wmi_dcc_ndl_stats_per_channel;
  13578. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  13579. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  13580. #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  13581. #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  13582. #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
  13583. #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
  13584. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  13585. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  13586. #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
  13587. #define WMI_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
  13588. #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
  13589. #define WMI_TX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
  13590. #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
  13591. #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
  13592. #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
  13593. #define WMI_NDL_EST_COMM_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
  13594. #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
  13595. #define WMI_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
  13596. #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
  13597. #define WMI_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
  13598. #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
  13599. #define WMI_NDL_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
  13600. #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
  13601. #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
  13602. #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
  13603. #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
  13604. #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
  13605. #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr, val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
  13606. #define WMI_NDL_TX_PACKET_ARRIVAL_RATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE)
  13607. #define WMI_NDL_TX_PACKET_ARRIVAL_RATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tx_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE, val)
  13608. #define WMI_NDL_TX_PACKET_AVG_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  13609. #define WMI_NDL_TX_PACKET_AVG_DURATION_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tx_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val)
  13610. #define WMI_NDL_TX_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  13611. #define WMI_NDL_TX_CHANNEL_USE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE, val)
  13612. #define WMI_NDL_TX_SIGNAL_AVG_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  13613. #define WMI_NDL_TX_SIGNAL_AVG_POWER_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tx_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
  13614. /** Bitmap for DCC stats. */
  13615. typedef enum {
  13616. DCC_STATS_DEMODULATION_MODEL = 1,
  13617. DCC_STATS_COMMUNICATION_RANGES = 2,
  13618. DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
  13619. DCC_STATS_TRANSMIT_PACKET_STATS = 8,
  13620. DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
  13621. DCC_STATS_ALL = 0xff,
  13622. } wmi_dcc_stats_bitmap;
  13623. /** Data structure for getting the DCC stats. */
  13624. typedef struct {
  13625. /**
  13626. * TLV tag and len; tag equals
  13627. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param
  13628. */
  13629. A_UINT32 tlv_header;
  13630. /* VDEV identifier */
  13631. A_UINT32 vdev_id;
  13632. /**The number of channels for which stats are being requested. */
  13633. A_UINT32 num_channels;
  13634. /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
  13635. } wmi_dcc_get_stats_cmd_fixed_param;
  13636. typedef struct {
  13637. /**
  13638. * TLV tag and len; tag equals
  13639. * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request.
  13640. */
  13641. A_UINT32 tlv_header;
  13642. /** The channel for which this applies. */
  13643. A_UINT32 chan_freq; /* MHz units */
  13644. /** The DCC stats being requested. */
  13645. A_UINT32 dcc_stats_bitmap;
  13646. } wmi_dcc_channel_stats_request;
  13647. /** Data structure for the response with the DCC stats. */
  13648. typedef struct {
  13649. /**
  13650. * TLV tag and len; tag equals
  13651. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param
  13652. */
  13653. A_UINT32 tlv_header;
  13654. /* VDEV identifier */
  13655. A_UINT32 vdev_id;
  13656. /** Number of channels in the response. */
  13657. A_UINT32 num_channels;
  13658. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  13659. } wmi_dcc_get_stats_resp_event_fixed_param;
  13660. /** Data structure for clearing the DCC stats. */
  13661. typedef struct {
  13662. /**
  13663. * TLV tag and len; tag equals
  13664. * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param
  13665. */
  13666. A_UINT32 tlv_header;
  13667. /* VDEV identifier */
  13668. A_UINT32 vdev_id;
  13669. A_UINT32 dcc_stats_bitmap;
  13670. } wmi_dcc_clear_stats_cmd_fixed_param;
  13671. /** Data structure for the pushed DCC stats */
  13672. typedef struct {
  13673. /**
  13674. * TLV tag and len; tag equals
  13675. * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param
  13676. */
  13677. A_UINT32 tlv_header;
  13678. /* VDEV identifier */
  13679. A_UINT32 vdev_id;
  13680. /** The number of channels in the response. */
  13681. A_UINT32 num_channels;
  13682. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  13683. } wmi_dcc_stats_event_fixed_param;
  13684. /** Data structure for updating NDL per channel. */
  13685. typedef struct {
  13686. /**
  13687. * TLV tag and len; tag equals
  13688. * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan
  13689. */
  13690. A_UINT32 tlv_header;
  13691. /**
  13692. * Channel frequency, 16 bits
  13693. * NDL_numActiveState, ndlType_numberElements, 1+6 bits
  13694. */
  13695. A_UINT32 chan_info;
  13696. /**
  13697. * NDL_minDccSampling, 10 bits.
  13698. * Maximum time interval between subsequent checks of the DCC rules.
  13699. */
  13700. A_UINT32 ndl_min_dcc_sampling;
  13701. /**
  13702. * dcc_enable, 1 bit.
  13703. * dcc_stats_enable, 1 bit.
  13704. * dcc_stats_interval, 16 bits.
  13705. */
  13706. A_UINT32 dcc_flags;
  13707. /** General DCC configuration.
  13708. * NDL_timeUp, ndlType_timing, 1+12 bits.
  13709. * NDL_timeDown, ndlType_timing, 1+12 bits.
  13710. */
  13711. A_UINT32 general_config;
  13712. /** Transmit power thresholds.
  13713. * NDL_minTxPower, ndlType_txPower, 1+7 bits.
  13714. * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
  13715. */
  13716. /* see "ETSI TS 102 687" table above for units */
  13717. A_UINT32 min_max_tx_power;
  13718. /**
  13719. * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  13720. * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  13721. * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  13722. * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  13723. */
  13724. /* see "ETSI TS 102 687" table above for units */
  13725. A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  13726. /** Packet timing thresholds.
  13727. * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  13728. * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  13729. * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  13730. * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  13731. */
  13732. A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  13733. /**
  13734. * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
  13735. * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
  13736. */
  13737. A_UINT32 min_max_packet_interval;
  13738. /**
  13739. * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  13740. * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  13741. * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  13742. * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits
  13743. */
  13744. A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
  13745. /** Packet datarate thresholds.
  13746. * NDL_minDatarate, ndlType_datarate, 1+3 bits.
  13747. * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
  13748. */
  13749. A_UINT32 min_max_datarate;
  13750. /**
  13751. * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  13752. * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  13753. * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  13754. * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  13755. */
  13756. A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
  13757. /** Receive signal thresholds.
  13758. * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
  13759. * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
  13760. * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
  13761. */
  13762. A_UINT32 min_max_def_carrier_sense;
  13763. /** Receive model parameter.
  13764. * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
  13765. * NDL_maxCsRange, ndlType_distance, 1+12 bits.
  13766. * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
  13767. */
  13768. A_UINT32 receive_model_parameter;
  13769. /**
  13770. * NDL_minSNR, ndlType_snr, 1+7 bits.
  13771. */
  13772. A_UINT32 receive_model_parameter_2;
  13773. /** Demodulation model parameters.
  13774. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  13775. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  13776. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  13777. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  13778. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  13779. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  13780. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  13781. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  13782. */
  13783. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
  13784. /** Transmit model parameters.
  13785. * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  13786. * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  13787. * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  13788. * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  13789. */
  13790. A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
  13791. /**
  13792. * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  13793. * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  13794. * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  13795. * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  13796. */
  13797. A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  13798. /**
  13799. * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  13800. * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  13801. * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  13802. * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  13803. */
  13804. A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  13805. /* NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits. */
  13806. A_UINT32 tm_max_channel_use;
  13807. /**
  13808. * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  13809. * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  13810. * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  13811. * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  13812. */
  13813. A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
  13814. /** Channel load thresholds.
  13815. * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
  13816. * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
  13817. */
  13818. A_UINT32 min_max_channel_load;
  13819. /** Transmit queue parameters.
  13820. * NDL_numQueue, ndlType_acPrio, 1+3 bits.
  13821. * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
  13822. * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
  13823. * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
  13824. * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
  13825. */
  13826. A_UINT32 transmit_queue_parameters;
  13827. /**
  13828. * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
  13829. * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
  13830. * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
  13831. * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
  13832. */
  13833. A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
  13834. } wmi_dcc_ndl_chan;
  13835. #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  13836. #define WMI_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  13837. #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
  13838. #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
  13839. #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
  13840. #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
  13841. #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
  13842. #define WMI_NDL_MEASURE_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
  13843. #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
  13844. #define WMI_NDL_DCC_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
  13845. #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
  13846. #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
  13847. #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
  13848. #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
  13849. #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
  13850. #define WMI_NDL_TIME_UP_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
  13851. #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
  13852. #define WMI_NDL_TIME_DOWN_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
  13853. #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
  13854. #define WMI_NDL_MIN_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
  13855. #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
  13856. #define WMI_NDL_MAX_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
  13857. #define WMI_NDL_DEF_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  13858. #define WMI_NDL_DEF_TX_POWER_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
  13859. #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  13860. #define WMI_NDL_MAX_PACKET_DURATION_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val)
  13861. #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
  13862. #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
  13863. #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
  13864. #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
  13865. #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  13866. #define WMI_NDL_DEF_PACKET_INTERVAL_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL, val)
  13867. #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
  13868. #define WMI_NDL_MIN_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
  13869. #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
  13870. #define WMI_NDL_MAX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
  13871. #define WMI_NDL_DEF_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  13872. #define WMI_NDL_DEF_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  13873. #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
  13874. #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
  13875. #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
  13876. #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
  13877. #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
  13878. #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
  13879. #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
  13880. #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
  13881. #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
  13882. #define WMI_NDL_MAX_CS_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
  13883. #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
  13884. #define WMI_NDL_REF_PATH_LOSS_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
  13885. #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
  13886. #define WMI_NDL_MIN_SNR_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
  13887. #define WMI_NDL_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  13888. #define WMI_NDL_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  13889. #define WMI_NDL_TM_PACKET_ARRIVAL_RATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE)
  13890. #define WMI_NDL_TM_PACKET_ARRIVAL_RATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tm_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE, val)
  13891. #define WMI_NDL_TM_PACKET_AVG_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  13892. #define WMI_NDL_TM_PACKET_AVG_DURATION_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tm_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val)
  13893. #define WMI_NDL_TM_SIGNAL_AVG_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  13894. #define WMI_NDL_TM_SIGNAL_AVG_POWER_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tm_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
  13895. #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
  13896. #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr, val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
  13897. #define WMI_NDL_TM_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  13898. #define WMI_NDL_TM_CHANNEL_USE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE, val)
  13899. #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
  13900. #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
  13901. #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
  13902. #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
  13903. #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
  13904. #define WMI_NDL_NUM_QUEUE_SET(ptr, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
  13905. #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr, acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
  13906. #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr, acprio, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
  13907. #define WMI_NDL_REF_QUEUE_LEN_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
  13908. #define WMI_NDL_REF_QUEUE_LEN_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
  13909. /** Data structure for updating the NDL. */
  13910. typedef struct {
  13911. /** TLV tag and len; tag equals
  13912. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
  13913. A_UINT32 tlv_header;
  13914. /* VDEV identifier */
  13915. A_UINT32 vdev_id;
  13916. /** The number of channels in the request. */
  13917. A_UINT32 num_channel;
  13918. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  13919. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  13920. } wmi_dcc_update_ndl_cmd_fixed_param;
  13921. typedef struct {
  13922. /**
  13923. * TLV tag and len; tag equals
  13924. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param
  13925. */
  13926. A_UINT32 tlv_header;
  13927. /* VDEV identifier */
  13928. A_UINT32 vdev_id;
  13929. A_UINT32 status;
  13930. } wmi_dcc_update_ndl_resp_event_fixed_param;
  13931. /* Actions for TSF timestamp */
  13932. typedef enum {
  13933. TSF_TSTAMP_CAPTURE_REQ = 1,
  13934. TSF_TSTAMP_CAPTURE_RESET = 2,
  13935. TSF_TSTAMP_READ_VALUE = 3,
  13936. TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
  13937. } wmi_tsf_tstamp_action;
  13938. typedef struct {
  13939. /** TLV tag and len; tag equals
  13940. * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
  13941. A_UINT32 tlv_header;
  13942. /** unique id identifying the VDEV, generated by the caller */
  13943. A_UINT32 vdev_id;
  13944. /* action type, refer to wmi_tsf_tstamp_action */
  13945. A_UINT32 tsf_action;
  13946. } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
  13947. typedef struct {
  13948. /* TLV tag and len; tag equals
  13949. * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
  13950. A_UINT32 tlv_header;
  13951. /* VDEV identifier */
  13952. A_UINT32 vdev_id;
  13953. /* low 32bit of tsf */
  13954. A_UINT32 tsf_low;
  13955. /* high 32 bit of tsf */
  13956. A_UINT32 tsf_high;
  13957. /* low 32 bits of qtimer */
  13958. A_UINT32 qtimer_low;
  13959. /* high 32 bits of qtimer */
  13960. A_UINT32 qtimer_high;
  13961. } wmi_vdev_tsf_report_event_fixed_param;
  13962. /**
  13963. * ie_id values:
  13964. * 0 to 255 are used for individual IEEE802.11 Information Element types
  13965. */
  13966. #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
  13967. /* source values: */
  13968. #define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
  13969. /* band values: */
  13970. typedef enum {
  13971. WMI_SET_VDEV_IE_BAND_ALL = 0,
  13972. WMI_SET_VDEV_IE_BAND_2_4GHZ,
  13973. WMI_SET_VDEV_IE_BAND_5GHZ,
  13974. } wmi_set_vdev_ie_band;
  13975. typedef struct {
  13976. /** TLV tag and len; tag equals
  13977. * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
  13978. A_UINT32 tlv_header;
  13979. /* unique id identifying the VDEV, generated by the caller */
  13980. A_UINT32 vdev_id;
  13981. /* unique id to identify the ie_data as defined by ieee 802.11 spec */
  13982. A_UINT32 ie_id;
  13983. /* ie_len corresponds to num of bytes in ie_data[] */
  13984. A_UINT32 ie_len;
  13985. /** source of this command */
  13986. A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
  13987. /** band for this IE - se wmi_set_vdev_ie_band enum */
  13988. A_UINT32 band;
  13989. /*
  13990. * Following this structure is the TLV byte stream of ie data of length
  13991. * buf_len:
  13992. * A_UINT8 ie_data[];
  13993. */
  13994. } wmi_vdev_set_ie_cmd_fixed_param;
  13995. /* DISA feature related data structures */
  13996. #define MAX_MAC_HEADER_LEN 32
  13997. typedef enum {
  13998. WMI_ENCRYPT_DECRYPT_FLAG_INVALID,
  13999. WMI_ENCRYPT = 1,
  14000. WMI_DECRYPT = 2,
  14001. } WMI_ENCRYPT_DECRYPT_FLAG;
  14002. typedef struct {
  14003. /**
  14004. * TLV tag and len; tag equals
  14005. * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param
  14006. */
  14007. A_UINT32 tlv_header;
  14008. /** unique id identifying the VDEV, generated by the caller */
  14009. A_UINT32 vdev_id;
  14010. A_UINT32 key_flag; /* WMI_ENCRYPT_DECRYPT_FLAG */
  14011. A_UINT32 key_idx;
  14012. A_UINT32 key_cipher;
  14013. A_UINT32 key_len; /* units = bytes */
  14014. A_UINT32 key_txmic_len; /* units = bytes */
  14015. A_UINT32 key_rxmic_len; /* units = bytes */
  14016. /** Key: This array needs to be provided in little-endian order */
  14017. A_UINT8 key_data[WMI_MAX_KEY_LEN];
  14018. /**
  14019. * Packet number: This array needs to be provided in little-endian
  14020. * order.
  14021. * If the PN is less than 8 bytes, the PN data shall be placed into this
  14022. * pn[] array starting at byte 0, leaving the MSBs empty.
  14023. */
  14024. A_UINT8 pn[8];
  14025. /**
  14026. * 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
  14027. * This array needs to be provided in little-endian order.
  14028. */
  14029. A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
  14030. A_UINT32 data_len; /** Payload length, units = bytes */
  14031. /**
  14032. * Following this struct are this TLV:
  14033. * A_UINT8 data[]; <-- actual data to be encrypted,
  14034. * needs to be provided in little-endian order
  14035. */
  14036. } wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
  14037. /**
  14038. * This event is generated in response to
  14039. * WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
  14040. * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
  14041. * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
  14042. * then on receiving the tx completion for the DISA frame this WMI event
  14043. * will be delivered to HOST with the encrypted frame.
  14044. */
  14045. typedef struct {
  14046. /**
  14047. * TLV tag and len; tag equals
  14048. * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param
  14049. */
  14050. A_UINT32 tlv_header;
  14051. /* VDEV identifier */
  14052. A_UINT32 vdev_id;
  14053. A_INT32 status; /* 0: success, -1: Failure, */
  14054. /* 802.11 header length + encrypted payload length (units = bytes) */
  14055. A_UINT32 data_length;
  14056. /**
  14057. * Following this struct is this TLV:
  14058. * A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
  14059. * 802.11 header + encrypted payload,
  14060. * provided in little-endian order
  14061. */
  14062. } wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
  14063. /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
  14064. typedef struct {
  14065. /*
  14066. * TLV tag and len; tag equals
  14067. * WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param
  14068. * Set Preferred Channel List
  14069. */
  14070. A_UINT32 tlv_header;
  14071. /* # of channels to scan */
  14072. A_UINT32 num_chan;
  14073. /*
  14074. * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
  14075. * structure. The TLV's are:
  14076. * A_UINT32 channel_list[];
  14077. */
  14078. } wmi_soc_set_pcl_cmd_fixed_param;
  14079. /* Values for channel_weight */
  14080. typedef enum {
  14081. WMI_PCL_WEIGHT_DISALLOW = 0,
  14082. WMI_PCL_WEIGHT_LOW = 1,
  14083. WMI_PCL_WEIGHT_MEDIUM = 2,
  14084. WMI_PCL_WEIGHT_HIGH = 3,
  14085. WMI_PCL_WEIGHT_VERY_HIGH = 4,
  14086. } wmi_pcl_chan_weight;
  14087. typedef struct {
  14088. /* TLV tag and len; tag equals
  14089. * WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param
  14090. */
  14091. A_UINT32 tlv_header;
  14092. /** Set Preferred Channel List **/
  14093. /** pdev_id for identifying the MAC
  14094. * See macros starting with WMI_PDEV_ID_ for values.
  14095. */
  14096. A_UINT32 pdev_id;
  14097. /** # of channels to scan */
  14098. A_UINT32 num_chan;
  14099. /**
  14100. * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
  14101. * structure. The TLV's are:
  14102. * A_UINT32 channel_weight[];
  14103. * channel order & size will be as per the list provided
  14104. * in WMI_SCAN_CHAN_LIST_CMDID
  14105. **/
  14106. } wmi_pdev_set_pcl_cmd_fixed_param;
  14107. /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
  14108. typedef struct {
  14109. /* TLV tag and len; tag equals
  14110. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param
  14111. * Set Hardware Mode */
  14112. A_UINT32 tlv_header;
  14113. /* Hardware Mode Index */
  14114. A_UINT32 hw_mode_index;
  14115. } wmi_soc_set_hw_mode_cmd_fixed_param;
  14116. typedef struct {
  14117. /* TLV tag and len tag equals WMITLV_TAG_STRUC_wmi_pdev_band_to_mac */
  14118. A_UINT32 tlv_header;
  14119. /** pdev_id for identifying the MAC
  14120. * See macros starting with WMI_PDEV_ID_ for values.
  14121. */
  14122. A_UINT32 pdev_id;
  14123. /* start frequency in MHz */
  14124. A_UINT32 start_freq;
  14125. /* end frequency in MHz */
  14126. A_UINT32 end_freq;
  14127. } wmi_pdev_band_to_mac;
  14128. typedef struct {
  14129. /* TLV tag and len; tag equals
  14130. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param
  14131. */
  14132. A_UINT32 tlv_header;
  14133. /** Set Hardware Mode **/
  14134. /** pdev_id for identifying the MAC
  14135. * See macros starting with WMI_PDEV_ID_ for values.
  14136. */
  14137. A_UINT32 pdev_id;
  14138. /* Hardware Mode Index */
  14139. A_UINT32 hw_mode_index;
  14140. /* Number of band to mac TLVs */
  14141. A_UINT32 num_band_to_mac;
  14142. /* Followed by TLVs of type
  14143. * num_band_to_mac * wmi_pdev_band_to_mac.
  14144. */
  14145. } wmi_pdev_set_hw_mode_cmd_fixed_param;
  14146. /* DEPRECATED - use wmi_pdev_set_mac_config_cmd_fixed_param instead */
  14147. typedef struct {
  14148. /*
  14149. * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param
  14150. * Set Dual MAC Firmware Configuration
  14151. */
  14152. A_UINT32 tlv_header;
  14153. /* Concurrent scan configuration bits */
  14154. A_UINT32 concurrent_scan_config_bits;
  14155. /* Firmware mode configuration bits */
  14156. A_UINT32 fw_mode_config_bits;
  14157. } wmi_soc_set_dual_mac_config_cmd_fixed_param;
  14158. typedef struct {
  14159. /* TLV tag and len; tag equals
  14160. * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param
  14161. */
  14162. A_UINT32 tlv_header;
  14163. /** Set Dual MAC Firmware Configuration **/
  14164. /** pdev_id for identifying the MAC
  14165. * See macros starting with WMI_PDEV_ID_ for values.
  14166. */
  14167. A_UINT32 pdev_id;
  14168. /* Concurrent scan configuration bits */
  14169. A_UINT32 concurrent_scan_config_bits;
  14170. /* Firmware mode configuration bits */
  14171. A_UINT32 fw_mode_config_bits;
  14172. } wmi_pdev_set_mac_config_cmd_fixed_param;
  14173. typedef struct { /* DEPRECATED */
  14174. A_UINT32 num_tx_chains;
  14175. A_UINT32 num_rx_chains;
  14176. A_UINT32 reserved[2];
  14177. } soc_num_tx_rx_chains;
  14178. typedef struct {
  14179. A_UINT32 num_tx_chains_2g;
  14180. A_UINT32 num_rx_chains_2g;
  14181. A_UINT32 num_tx_chains_5g;
  14182. A_UINT32 num_rx_chains_5g;
  14183. } band_num_tx_rx_chains;
  14184. typedef union {
  14185. soc_num_tx_rx_chains soc_txrx_chain_setting;
  14186. band_num_tx_rx_chains band_txrx_chain_setting;
  14187. } antenna_num_tx_rx_chains;
  14188. typedef enum {
  14189. ANTENNA_MODE_DISABLED = 0x0,
  14190. ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
  14191. /* reserved */
  14192. } antenna_mode_reason;
  14193. /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
  14194. typedef struct {
  14195. /*
  14196. * TLV tag and len;
  14197. * tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param
  14198. */
  14199. A_UINT32 tlv_header;
  14200. /* the reason for setting antenna mode, refer antenna_mode_reason */
  14201. A_UINT32 reason;
  14202. /*
  14203. * The above reason parameter will select whether the following union
  14204. * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
  14205. */
  14206. antenna_num_tx_rx_chains num_txrx_chains_setting;
  14207. } wmi_soc_set_antenna_mode_cmd_fixed_param;
  14208. typedef struct {
  14209. /* TLV tag and len; tag equals
  14210. * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param
  14211. */
  14212. A_UINT32 tlv_header;
  14213. /** pdev_id for identifying the MAC
  14214. * See macros starting with WMI_PDEV_ID_ for values.
  14215. */
  14216. A_UINT32 pdev_id;
  14217. /* Bits 0-15 is the number of RX chains and
  14218. * 16-31 is the number of TX chains
  14219. */
  14220. A_UINT32 num_txrx_chains;
  14221. } wmi_pdev_set_antenna_mode_cmd_fixed_param;
  14222. /** Data structure for information specific to a VDEV to MAC mapping. */
  14223. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
  14224. typedef struct {
  14225. /*
  14226. * TLV tag and len; tag equals
  14227. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
  14228. A_UINT32 tlv_header;
  14229. A_UINT32 vdev_id; /* VDEV ID */
  14230. A_UINT32 mac_id; /* MAC ID */
  14231. } wmi_soc_set_hw_mode_response_vdev_mac_entry;
  14232. /** Data structure for information specific to a VDEV to MAC mapping. */
  14233. typedef struct {
  14234. /** TLV tag and len; tag equals
  14235. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
  14236. A_UINT32 tlv_header;
  14237. /** pdev_id for identifying the MAC
  14238. * See macros starting with WMI_PDEV_ID_ for values.
  14239. */
  14240. A_UINT32 pdev_id;
  14241. A_UINT32 vdev_id;
  14242. } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
  14243. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
  14244. typedef struct {
  14245. /* TLV tag and len; tag equals
  14246. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param
  14247. * Set Hardware Mode Response Event **/
  14248. A_UINT32 tlv_header;
  14249. /* Status of set_hw_mode command
  14250. * Values for Status:
  14251. * 0 - OK; command successful
  14252. * 1 - EINVAL; Requested invalid hw_mode
  14253. * 2 - ECANCELED; HW mode change canceled
  14254. * 3 - ENOTSUP; HW mode not supported
  14255. * 4 - EHARDWARE; HW mode change prevented by hardware
  14256. * 5 - EPENDING; HW mode change is pending
  14257. * 6 - ECOEX; HW mode change conflict with Coex
  14258. */
  14259. A_UINT32 status;
  14260. /* Configured Hardware Mode */
  14261. A_UINT32 cfgd_hw_mode_index;
  14262. /* Number of Vdev to Mac entries */
  14263. A_UINT32 num_vdev_mac_entries;
  14264. /*
  14265. * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
  14266. * structure. The TLV's are:
  14267. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  14268. */
  14269. } wmi_soc_set_hw_mode_response_event_fixed_param;
  14270. typedef struct {
  14271. /* TLV tag and len; tag equals
  14272. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param
  14273. */
  14274. A_UINT32 tlv_header;
  14275. /** Set Hardware Mode Response Event **/
  14276. /** pdev_id for identifying the MAC
  14277. * See macros starting with WMI_PDEV_ID_ for values.
  14278. */
  14279. A_UINT32 pdev_id;
  14280. /* Status of set_hw_mode command */
  14281. /*
  14282. * Values for Status:
  14283. * 0 - OK; command successful
  14284. * 1 - EINVAL; Requested invalid hw_mode
  14285. * 2 - ECANCELED; HW mode change canceled
  14286. * 3 - ENOTSUP; HW mode not supported
  14287. * 4 - EHARDWARE; HW mode change prevented by hardware
  14288. * 5 - EPENDING; HW mode change is pending
  14289. * 6 - ECOEX; HW mode change conflict with Coex
  14290. */
  14291. A_UINT32 status;
  14292. /* Configured Hardware Mode */
  14293. A_UINT32 cfgd_hw_mode_index;
  14294. /* Number of Vdev to Mac entries */
  14295. A_UINT32 num_vdev_mac_entries;
  14296. /**
  14297. * TLV (tag length value ) parameters follow the
  14298. * soc_set_hw_mode_response_event structure. The TLV's are:
  14299. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  14300. */
  14301. } wmi_pdev_set_hw_mode_response_event_fixed_param;
  14302. /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
  14303. typedef struct {
  14304. /*
  14305. * TLV tag and len; tag equals
  14306. * WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param
  14307. * Hardware Mode Transition Event
  14308. */
  14309. A_UINT32 tlv_header;
  14310. /* Original or old Hardware mode */
  14311. A_UINT32 old_hw_mode_index;
  14312. /* New Hardware Mode */
  14313. A_UINT32 new_hw_mode_index;
  14314. /* Number of Vdev to Mac entries */
  14315. A_UINT32 num_vdev_mac_entries;
  14316. /**
  14317. * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
  14318. * structure. The TLV's are:
  14319. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  14320. */
  14321. } wmi_soc_hw_mode_transition_event_fixed_param;
  14322. typedef struct {
  14323. /* TLV tag and len; tag equals
  14324. * WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param
  14325. */
  14326. A_UINT32 tlv_header;
  14327. /** Hardware Mode Transition Event **/
  14328. /** pdev_id for identifying the MAC
  14329. * See macros starting with WMI_PDEV_ID_ for values.
  14330. */
  14331. A_UINT32 pdev_id;
  14332. /* Original or old Hardware mode */
  14333. A_UINT32 old_hw_mode_index;
  14334. /* New Hardware Mode */
  14335. A_UINT32 new_hw_mode_index;
  14336. /* Number of Vdev to Mac entries */
  14337. A_UINT32 num_vdev_mac_entries;
  14338. /**
  14339. * TLV (tag length value ) parameters follow the
  14340. * soc_set_hw_mode_response_event structure. The TLV's are:
  14341. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  14342. */
  14343. } wmi_pdev_hw_mode_transition_event_fixed_param;
  14344. /**
  14345. * This command is sent from WLAN host driver to firmware for
  14346. * plugging in reorder queue desc to lithium hw.
  14347. *
  14348. * Example: plug-in queue desc for TID 5
  14349. * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  14350. * (vdev_id = PEER vdev id,
  14351. * peer_macaddr = PEER mac addr,
  14352. * tid = 5,
  14353. * queue_ptr_lo = queue desc addr lower 32 bits,
  14354. * queue_ptr_hi = queue desc addr higher 32 bits,
  14355. * queue_no = 16-bit number assigned by host for queue,
  14356. * stored in bits 15:0 of queue_no field)
  14357. */
  14358. typedef struct {
  14359. /* TLV tag and len; tag equals
  14360. * WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param
  14361. */
  14362. A_UINT32 tlv_header;
  14363. A_UINT32 vdev_id;
  14364. /* peer mac address */
  14365. wmi_mac_addr peer_macaddr;
  14366. /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  14367. A_UINT32 tid;
  14368. /* lower 32 bits of queue desc adddress */
  14369. A_UINT32 queue_ptr_lo;
  14370. /* upper 32 bits of queue desc adddress */
  14371. A_UINT32 queue_ptr_hi;
  14372. /* 16-bit number assigned by host for queue,
  14373. * stored in bits 15:0 of queue_no field
  14374. */
  14375. A_UINT32 queue_no;
  14376. } wmi_peer_reorder_queue_setup_cmd_fixed_param;
  14377. /**
  14378. * This command is sent from WLAN host driver to firmware for
  14379. * removing one or more reorder queue desc to lithium hw.
  14380. *
  14381. * Example: remove queue desc for all TIDs
  14382. * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
  14383. * (vdev_id = PEER vdev id,
  14384. * peer_macaddr = PEER mac addr,
  14385. * tid = 0x1FFFF,
  14386. */
  14387. typedef struct {
  14388. /* TLV tag and len;
  14389. * tag equals
  14390. * WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param
  14391. */
  14392. A_UINT32 tlv_header;
  14393. A_UINT32 vdev_id;
  14394. /* peer mac address */
  14395. wmi_mac_addr peer_macaddr;
  14396. /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
  14397. A_UINT32 tid_mask;
  14398. } wmi_peer_reorder_queue_remove_cmd_fixed_param;
  14399. /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param
  14400. * instead
  14401. */
  14402. typedef struct {
  14403. /*
  14404. * TLV tag and len; tag equals
  14405. * WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param
  14406. * Set Dual MAC Config Response Event
  14407. */
  14408. A_UINT32 tlv_header;
  14409. /* Status for set_dual_mac_config command */
  14410. /*
  14411. * Values for Status:
  14412. * 0 - OK; command successful
  14413. * 1 - EINVAL; Requested invalid hw_mode
  14414. * 3 - ENOTSUP; HW mode not supported
  14415. * 4 - EHARDWARE; HW mode change prevented by hardware
  14416. * 6 - ECOEX; HW mode change conflict with Coex
  14417. */
  14418. A_UINT32 status;
  14419. } wmi_soc_set_dual_mac_config_response_event_fixed_param;
  14420. typedef struct {
  14421. /* TLV tag and len; tag equals
  14422. * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param
  14423. */
  14424. A_UINT32 tlv_header;
  14425. /** Set Dual MAC Config Response Event **/
  14426. /** pdev_id for identifying the MAC
  14427. * See macros starting with WMI_PDEV_ID_ for values.
  14428. */
  14429. A_UINT32 pdev_id;
  14430. /* Status for set_dual_mac_config command */
  14431. /*
  14432. * Values for Status:
  14433. * 0 - OK; command successful
  14434. * 1 - EINVAL; Requested invalid hw_mode
  14435. * 3 - ENOTSUP; HW mode not supported
  14436. * 4 - EHARDWARE; HW mode change prevented by hardware
  14437. * 6 - ECOEX; HW mode change conflict with Coex
  14438. */
  14439. A_UINT32 status;
  14440. } wmi_pdev_set_mac_config_response_event_fixed_param;
  14441. typedef enum {
  14442. MAWC_MOTION_STATE_UNKNOWN,
  14443. MAWC_MOTION_STATE_STATIONARY,
  14444. MAWC_MOTION_STATE_WALK,
  14445. MAWC_MOTION_STATE_TRANSIT,
  14446. } MAWC_MOTION_STATE;
  14447. typedef enum {
  14448. MAWC_SENSOR_STATUS_OK,
  14449. MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
  14450. MAWC_SENSOR_STATUS_SHUTDOWN,
  14451. } MAWC_SENSOR_STATUS;
  14452. typedef struct {
  14453. /* TLV tag and len; tag equals
  14454. * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
  14455. A_UINT32 tlv_header;
  14456. /** new motion state, MAWC_MOTION_STATE */
  14457. A_UINT32 motion_state;
  14458. /** status code of sensor, MAWC_SENSOR_STATUS */
  14459. A_UINT32 sensor_status;
  14460. } wmi_mawc_sensor_report_ind_cmd_fixed_param;
  14461. /* MBO flag field definition */
  14462. /*
  14463. * Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
  14464. * 1 - Allow to connect to MBO AP only
  14465. * Bit 1-31 : reserved.
  14466. */
  14467. #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
  14468. typedef struct {
  14469. /*
  14470. * TLV tag and len; tag equals
  14471. * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param
  14472. */
  14473. A_UINT32 tlv_header;
  14474. /** vdev id */
  14475. A_UINT32 vdev_id;
  14476. /** enable or disable MBO */
  14477. A_UINT32 enable;
  14478. /** MBO flags, refer to definition of MBO flags*/
  14479. A_UINT32 flags;
  14480. } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
  14481. typedef struct {
  14482. /*
  14483. * TLV tag and len; tag equals
  14484. * WMITLV_TAG_ARRAY_STRUC
  14485. */
  14486. A_UINT32 tlv_header;
  14487. /** Current operating class number */
  14488. A_UINT32 cur_op_class;
  14489. /*
  14490. * Country string of current reg domain,
  14491. * the expected value should be same as country str defined
  14492. * in country IE.
  14493. * 3 octets (COUNTRY_STR) + 1 octet (always 0)
  14494. * The ordering of this array must be maintained,
  14495. * even when a big-endian host's WMI messages undergo
  14496. * automatic byte reordering for conversion to the
  14497. * little-endian ordering required by the target.
  14498. * On big-endian hosts, this array may need to be byte-swapped
  14499. * by the host, so the subsequent automatic byte-swap
  14500. * will result in the correct final byte order.
  14501. * global operating class: set country_str[0]=0
  14502. */
  14503. A_UINT8 country_str[4];
  14504. /** Supported operating class number in current regdomain */
  14505. A_UINT32 supp_op_class_num;
  14506. /* The TLVs will follow. */
  14507. /* A_UINT32 supp_op_class_list[] */
  14508. } wmi_supported_operating_class_param;
  14509. typedef struct {
  14510. /*
  14511. * TLV tag and len; tag equals
  14512. * WMITLV_TAG_ARRAY_STRUC
  14513. */
  14514. A_UINT32 tlv_header;
  14515. /** non preferred channel attribute length */
  14516. A_UINT32 non_prefer_ch_attr_len;
  14517. /* The TLVs will follow. */
  14518. /** A_UINT8 non_prefer_ch_attr[];*/
  14519. } wmi_mbo_non_preferred_channel_report_param;
  14520. typedef struct {
  14521. /* TLV tag and len; tag equals
  14522. * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
  14523. A_UINT32 tlv_header;
  14524. /* enable(1) or disable(0) */
  14525. A_UINT32 enable;
  14526. } wmi_mawc_enable_sensor_event_fixed_param;
  14527. typedef struct {
  14528. /* TLV tag and len; tag equals
  14529. * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
  14530. A_UINT32 tlv_header;
  14531. /* Unique id identifying the VDEV */
  14532. A_UINT32 vdev_id;
  14533. /* enable(1) or disable(0) MAWC */
  14534. A_UINT32 enable;
  14535. /* ratio of skipping suppressing scan, skip one out of x */
  14536. A_UINT32 suppress_ratio;
  14537. } wmi_extscan_configure_mawc_cmd_fixed_param;
  14538. typedef struct {
  14539. /* TLV tag and len; tag equals
  14540. * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
  14541. A_UINT32 tlv_header;
  14542. /* Unique id identifying the VDEV */
  14543. A_UINT32 vdev_id;
  14544. /* enable(1) or disable(0) MAWC */
  14545. A_UINT32 enable;
  14546. /* ratio of exponential backoff, next = current + current*ratio/100 */
  14547. A_UINT32 exp_backoff_ratio;
  14548. /* initial scan interval(msec) */
  14549. A_UINT32 init_scan_interval;
  14550. /* max scan interval(msec) */
  14551. A_UINT32 max_scan_interval;
  14552. } wmi_nlo_configure_mawc_cmd_fixed_param;
  14553. typedef struct {
  14554. /* TLV tag and len; tag equals
  14555. * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
  14556. A_UINT32 tlv_header;
  14557. /* Unique id identifying the VDEV */
  14558. A_UINT32 vdev_id;
  14559. /* enable(1) or disable(0) MAWC */
  14560. A_UINT32 enable;
  14561. /* data traffic load (kBps) to register CMC */
  14562. A_UINT32 traffic_load_threshold;
  14563. /* RSSI threshold (dBm) to scan for Best AP */
  14564. A_UINT32 best_ap_rssi_threshold;
  14565. /* high RSSI threshold adjustment in Stationary to suppress scan */
  14566. A_UINT32 rssi_stationary_high_adjust;
  14567. /* low RSSI threshold adjustment in Stationary to suppress scan */
  14568. A_UINT32 rssi_stationary_low_adjust;
  14569. } wmi_roam_configure_mawc_cmd_fixed_param;
  14570. #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
  14571. #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
  14572. typedef enum {
  14573. PACKET_FILTER_TYPE_INVALID = 0,
  14574. PACKET_FILTER_TYPE_FILTER_PKT,
  14575. PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
  14576. PACKET_FILTER_TYPE_MAX_ENUM_SIZE
  14577. } WMI_PACKET_FILTER_FILTER_TYPE;
  14578. typedef enum {
  14579. PACKET_FILTER_PROTO_TYPE_INVALID = 0,
  14580. /* L2 header */
  14581. PACKET_FILTER_PROTO_TYPE_MAC,
  14582. PACKET_FILTER_PROTO_TYPE_SNAP,
  14583. /* L3 header (EtherType) */
  14584. PACKET_FILTER_PROTO_TYPE_IPV4,
  14585. PACKET_FILTER_PROTO_TYPE_IPV6,
  14586. /* L4 header (IP protocol) */
  14587. PACKET_FILTER_PROTO_TYPE_UDP,
  14588. PACKET_FILTER_PROTO_TYPE_TCP,
  14589. PACKET_FILTER_PROTO_TYPE_ICMPV6,
  14590. PACKET_FILTER_PROTO_TYPE_MAX
  14591. } WMI_PACKET_FILTER_PROTO_TYPE;
  14592. typedef enum {
  14593. PACKET_FILTER_CMP_TYPE_INVALID = 0,
  14594. PACKET_FILTER_CMP_TYPE_EQUAL,
  14595. PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
  14596. PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
  14597. PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  14598. PACKET_FILTER_CMP_TYPE_ADDRTYPE,
  14599. PACKET_FILTER_CMP_TYPE_MAX
  14600. } WMI_PACKET_FILTER_CMP_TYPE;
  14601. typedef enum {
  14602. PACKET_FILTER_SET_INACTIVE = 0,
  14603. PACKET_FILTER_SET_ACTIVE
  14604. } WMI_PACKET_FILTER_ACTION;
  14605. typedef enum {
  14606. PACKET_FILTER_SET_DISABLE = 0,
  14607. PACKET_FILTER_SET_ENABLE
  14608. } WMI_PACKET_FILTER_RUNTIME_ENABLE;
  14609. typedef struct {
  14610. A_UINT32 proto_type;
  14611. A_UINT32 cmp_type;
  14612. A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
  14613. /*
  14614. * from start of the respective frame header (
  14615. * units = bytes)
  14616. */
  14617. A_UINT32 data_offset;
  14618. /* Data to compare, little-endian order */
  14619. A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
  14620. /* Mask to be applied on rcvd packet data before compare, little-endian order */
  14621. A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
  14622. } WMI_PACKET_FILTER_PARAMS_TYPE;
  14623. typedef struct {
  14624. A_UINT32 tlv_header;
  14625. A_UINT32 vdev_id;
  14626. A_UINT32 filter_id;
  14627. A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
  14628. A_UINT32 filter_type;
  14629. A_UINT32 num_params; /* how many entries in paramsData are valid */
  14630. A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
  14631. WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
  14632. /*
  14633. * deprecated0:
  14634. * This field simply provides filler space to retain the
  14635. * original message format while reducing
  14636. * WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER from 10 to 5.
  14637. */
  14638. WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
  14639. } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
  14640. /* enable / disable all filters within the specified vdev */
  14641. typedef struct {
  14642. A_UINT32 tlv_header;
  14643. A_UINT32 vdev_id;
  14644. A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
  14645. } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
  14646. #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
  14647. #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
  14648. #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
  14649. WMI_SET_BITS(tcp_flag_u32, \
  14650. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  14651. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
  14652. tcp_flag_values)
  14653. #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
  14654. WMI_GET_BITS(tcp_flag_u32, \
  14655. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  14656. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
  14657. #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
  14658. #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
  14659. #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
  14660. WMI_SET_BITS(tcp_flag_u32, \
  14661. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  14662. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
  14663. tcp_flags_mask)
  14664. #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
  14665. WMI_GET_BITS(tcp_flag_u32, \
  14666. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  14667. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
  14668. typedef struct {
  14669. A_UINT32 tlv_header;
  14670. /**
  14671. * @brief lro_enable - indicates whether lro is enabled
  14672. * [0] LRO Enable
  14673. */
  14674. A_UINT32 lro_enable;
  14675. /**
  14676. * @brief tcp_flag_u32 - mask of which TCP flags to check and
  14677. * values to check for
  14678. * [8:0] TCP flag values - If the TCP flags from the packet do not match
  14679. * the values in this field after masking with TCP flags mask
  14680. * below,LRO eligible will not be set
  14681. * [17:9] TCP flags mask - Mask field for comparing the TCP values
  14682. * provided above with the TCP flags field in the received packet
  14683. * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
  14684. * macros to isolate the mask field and values field that are packed
  14685. * into this u32 "word".
  14686. */
  14687. A_UINT32 tcp_flag_u32;
  14688. /**
  14689. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  14690. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  14691. * bytes 0 to 3
  14692. *
  14693. * In this and all the below toeplitz_hash fields, the bytes are
  14694. * specified in little-endian order. For example:
  14695. * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
  14696. * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
  14697. * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
  14698. * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
  14699. */
  14700. A_UINT32 toeplitz_hash_ipv4_0_3;
  14701. /**
  14702. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  14703. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  14704. * bytes 4 to 7
  14705. */
  14706. A_UINT32 toeplitz_hash_ipv4_4_7;
  14707. /**
  14708. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  14709. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  14710. * bytes 8 to 11
  14711. */
  14712. A_UINT32 toeplitz_hash_ipv4_8_11;
  14713. /**
  14714. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  14715. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  14716. * bytes 12 to 15
  14717. */
  14718. A_UINT32 toeplitz_hash_ipv4_12_15;
  14719. /**
  14720. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  14721. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  14722. * byte 16
  14723. */
  14724. A_UINT32 toeplitz_hash_ipv4_16;
  14725. /**
  14726. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  14727. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  14728. * bytes 0 to 3
  14729. */
  14730. A_UINT32 toeplitz_hash_ipv6_0_3;
  14731. /**
  14732. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  14733. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  14734. * bytes 4 to 7
  14735. */
  14736. A_UINT32 toeplitz_hash_ipv6_4_7;
  14737. /**
  14738. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  14739. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  14740. * bytes 8 to 11
  14741. */
  14742. A_UINT32 toeplitz_hash_ipv6_8_11;
  14743. /**
  14744. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  14745. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  14746. * bytes 12 to 15
  14747. */
  14748. A_UINT32 toeplitz_hash_ipv6_12_15;
  14749. /**
  14750. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  14751. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  14752. * bytes 16 to 19
  14753. */
  14754. A_UINT32 toeplitz_hash_ipv6_16_19;
  14755. /**
  14756. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  14757. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  14758. * bytes 20 to 22
  14759. */
  14760. A_UINT32 toeplitz_hash_ipv6_20_23;
  14761. /**
  14762. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  14763. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  14764. * bytes 24 to 27
  14765. */
  14766. A_UINT32 toeplitz_hash_ipv6_24_27;
  14767. /**
  14768. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  14769. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  14770. * bytes 28 to 31
  14771. */
  14772. A_UINT32 toeplitz_hash_ipv6_28_31;
  14773. /**
  14774. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  14775. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  14776. * bytes 32 to 35
  14777. */
  14778. A_UINT32 toeplitz_hash_ipv6_32_35;
  14779. /**
  14780. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  14781. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  14782. * bytes 36 to 39
  14783. */
  14784. A_UINT32 toeplitz_hash_ipv6_36_39;
  14785. /**
  14786. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  14787. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  14788. * byte 40
  14789. */
  14790. A_UINT32 toeplitz_hash_ipv6_40;
  14791. } wmi_lro_info_cmd_fixed_param;
  14792. typedef struct {
  14793. /*
  14794. * TLV tag and len; tag equals
  14795. * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param
  14796. */
  14797. A_UINT32 tlv_header;
  14798. /* flash offset to write, starting from 0 */
  14799. A_UINT32 offset;
  14800. /* vaild data length in buffer, unit: byte */
  14801. A_UINT32 length;
  14802. } wmi_transfer_data_to_flash_cmd_fixed_param;
  14803. typedef struct {
  14804. /*
  14805. * TLV tag and len; tag equals
  14806. * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param
  14807. */
  14808. A_UINT32 tlv_header;
  14809. /* Return status. 0 for success, non-zero otherwise */
  14810. A_UINT32 status;
  14811. } wmi_transfer_data_to_flash_complete_event_fixed_param;
  14812. typedef struct {
  14813. /*
  14814. * TLV tag and len; tag equals
  14815. * WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param
  14816. */
  14817. A_UINT32 tlv_header;
  14818. A_UINT32 offset; /* flash offset to read, starting from 0 */
  14819. A_UINT32 length; /* data length to read, unit: byte */
  14820. } wmi_read_data_from_flash_cmd_fixed_param;
  14821. typedef struct {
  14822. /*
  14823. * TLV tag and len; tag equals
  14824. * WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param
  14825. */
  14826. A_UINT32 tlv_header;
  14827. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  14828. A_UINT32 offset; /* flash offset reading from, starting from 0 */
  14829. A_UINT32 length; /* length of data being reported, unit: byte */
  14830. } wmi_read_data_from_flash_event_fixed_param;
  14831. typedef enum {
  14832. ENHANCED_MCAST_FILTER_DISABLED,
  14833. ENHANCED_MCAST_FILTER_ENABLED
  14834. } ENHANCED_MCAST_FILTER_CONFIG;
  14835. /*
  14836. * Command to enable/disable filtering of multicast IP with unicast mac
  14837. */
  14838. typedef struct {
  14839. /*
  14840. * TLV tag and len; tag equals
  14841. * WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param
  14842. */
  14843. A_UINT32 tlv_header;
  14844. /* Unique id identifying the VDEV */
  14845. A_UINT32 vdev_id;
  14846. /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
  14847. A_UINT32 enable;
  14848. } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
  14849. typedef struct {
  14850. /*
  14851. * TLV tag and len; tag equals
  14852. * WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param
  14853. */
  14854. A_UINT32 tlv_header;
  14855. /* unique id identifying the VDEV, generated by the caller */
  14856. A_UINT32 vdev_id;
  14857. /* WISA enable / disable mode */
  14858. A_UINT32 wisa_mode;
  14859. } wmi_vdev_wisa_cmd_fixed_param;
  14860. /*
  14861. * This structure is used to report SMPS force mode set complete to host.
  14862. */
  14863. typedef struct {
  14864. /* TLV tag and len; tag equals
  14865. * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param
  14866. */
  14867. A_UINT32 tlv_header;
  14868. /* Unique id identifying the VDEV */
  14869. A_UINT32 vdev_id;
  14870. /* Return status. 0 for success, non-zero otherwise */
  14871. A_UINT32 status;
  14872. } wmi_sta_smps_force_mode_complete_event_fixed_param;
  14873. /*
  14874. * This structure is used to report SCPC calibrated data to host.
  14875. */
  14876. typedef struct {
  14877. /* TLV tag and len; tag equals
  14878. * WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param
  14879. */
  14880. A_UINT32 tlv_header;
  14881. /* number of BDF patches. Each patch contains offset, length and data */
  14882. A_UINT32 num_patch;
  14883. /* This TLV is followed by another TLV of array of bytes
  14884. * A_UINT8 data[];
  14885. * This data array contains, for example
  14886. * patch1 offset(byte3~0), patch1 data length(byte7~4),
  14887. * patch1 data(byte11~8)
  14888. * patch2 offset(byte15~12), patch2 data length(byte19~16),
  14889. * patch2 data(byte47~20)
  14890. */
  14891. } wmi_scpc_event_fixed_param;
  14892. /* bpf interface structure */
  14893. typedef struct wmi_bpf_get_capability_cmd_s {
  14894. A_UINT32 tlv_header;
  14895. A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
  14896. } wmi_bpf_get_capability_cmd_fixed_param;
  14897. typedef struct wmi_bpf_capability_info_evt_s {
  14898. A_UINT32 tlv_header;
  14899. A_UINT32 bpf_version; /* fw's implement version */
  14900. A_UINT32 max_bpf_filters; /* max filters that fw supports */
  14901. A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
  14902. } wmi_bpf_capability_info_evt_fixed_param;
  14903. /* bit 0 of flags: report counters */
  14904. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
  14905. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
  14906. typedef struct wmi_bpf_get_vdev_stats_cmd_s {
  14907. A_UINT32 tlv_header;
  14908. A_UINT32 flags;
  14909. A_UINT32 vdev_id;
  14910. } wmi_bpf_get_vdev_stats_cmd_fixed_param;
  14911. typedef struct wmi_bpf_vdev_stats_info_evt_s {
  14912. A_UINT32 tlv_header;
  14913. A_UINT32 vdev_id;
  14914. A_UINT32 num_filters;
  14915. A_UINT32 num_checked_pkts;
  14916. A_UINT32 num_dropped_pkts;
  14917. } wmi_bpf_vdev_stats_info_evt_fixed_param;
  14918. typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
  14919. A_UINT32 tlv_header;
  14920. A_UINT32 vdev_id;
  14921. A_UINT32 filter_id;
  14922. A_UINT32 bpf_version; /* host bpf version */
  14923. A_UINT32 total_length;
  14924. A_UINT32 current_offset;
  14925. A_UINT32 current_length;
  14926. /*
  14927. * The TLV follows:
  14928. * A_UINT8 buf_inst[]; //Variable length buffer for the instuctions
  14929. */
  14930. } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
  14931. #define BPF_FILTER_ID_ALL 0xFFFFFFFF
  14932. typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
  14933. A_UINT32 tlv_header;
  14934. A_UINT32 vdev_id;
  14935. A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
  14936. } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
  14937. #define AES_BLOCK_LEN 16 /* in bytes */
  14938. #define FIPS_KEY_LENGTH_128 16 /* in bytes */
  14939. #define FIPS_KEY_LENGTH_256 32 /* in bytes */
  14940. #define FIPS_ENCRYPT_CMD 0
  14941. #define FIPS_DECRYPT_CMD 1
  14942. #define FIPS_ENGINE_AES_CTR 0
  14943. #define FIPS_ENGINE_AES_MIC 1
  14944. #define FIPS_ERROR_OPER_TIMEOUT 1
  14945. /* WMI_PDEV_FIPS_CMDID */
  14946. typedef struct {
  14947. /*
  14948. * TLV tag and len; tag equals
  14949. * WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param
  14950. */
  14951. A_UINT32 tlv_header;
  14952. union {
  14953. /* OBSOLETE - will be removed once all refs are gone */
  14954. A_UINT32 mac_id;
  14955. /** pdev_id for identifying the MAC
  14956. * See macros starting with WMI_PDEV_ID_ for values.
  14957. */
  14958. A_UINT32 pdev_id;
  14959. };
  14960. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  14961. /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
  14962. A_UINT32 mode;
  14963. /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
  14964. A_UINT32 key_len;
  14965. A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
  14966. A_UINT32 data_len; /* data length */
  14967. /*
  14968. * Following this structure is the TLV:
  14969. * A_UINT32 data[1]; - In Data (keep this in the end)
  14970. */
  14971. } wmi_pdev_fips_cmd_fixed_param;
  14972. typedef struct {
  14973. /*
  14974. * TLV tag and len; tag equals
  14975. * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param
  14976. */
  14977. A_UINT32 tlv_header;
  14978. union {
  14979. /* OBSOLETE - will be removed once all refs are gone */
  14980. A_UINT32 mac_id;
  14981. /** pdev_id for identifying the MAC
  14982. * See macros starting with WMI_PDEV_ID_ for values.
  14983. */
  14984. A_UINT32 pdev_id;
  14985. };
  14986. A_UINT32 enable; /* 1:enable, 0:disable */
  14987. /* 1:GPIO parallel mode, 0:GPIO serial mode */
  14988. A_UINT32 mode;
  14989. A_UINT32 rx_antenna; /* rx antenna */
  14990. A_UINT32 tx_default_antenna; /* tx default antenna */
  14991. /*
  14992. * Following this structure is the TLV:
  14993. * wmi_pdev_smart_ant_gpio_handle
  14994. */
  14995. } wmi_pdev_smart_ant_enable_cmd_fixed_param;
  14996. /** GPIO pins/function values to control antennas */
  14997. typedef struct {
  14998. /*
  14999. * TLV tag and len; tag equals
  15000. * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle
  15001. */
  15002. A_UINT32 tlv_header;
  15003. /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
  15004. A_UINT32 gpio_pin;
  15005. A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
  15006. /** pdev_id for identifying the MAC
  15007. * See macros starting with WMI_PDEV_ID_ for values.
  15008. */
  15009. A_UINT32 pdev_id;
  15010. } wmi_pdev_smart_ant_gpio_handle;
  15011. typedef struct {
  15012. /*
  15013. * TLV tag and len; tag equals
  15014. * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param
  15015. */
  15016. A_UINT32 tlv_header;
  15017. union {
  15018. /* OBSOLETE - will be removed once all refs are gone */
  15019. A_UINT32 mac_id;
  15020. /** pdev_id for identifying the MAC
  15021. * See macros starting with WMI_PDEV_ID_ for values.
  15022. */
  15023. A_UINT32 pdev_id;
  15024. };
  15025. A_UINT32 rx_antenna;
  15026. } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
  15027. typedef struct {
  15028. /*
  15029. * TLV tag and len; tag equals
  15030. * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param
  15031. */
  15032. A_UINT32 tlv_header;
  15033. /** unique id identifying the vdev, generated by the caller */
  15034. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  15035. /** peer MAC address */
  15036. wmi_mac_addr peer_macaddr;
  15037. /*
  15038. * Following this structure is the TLV:
  15039. * wmi_peer_smart_ant_set_tx_antenna_series
  15040. */
  15041. } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
  15042. typedef struct {
  15043. /*
  15044. * TLV tag and len; tag equals
  15045. * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series
  15046. */
  15047. A_UINT32 tlv_header;
  15048. /* antenna array */
  15049. A_UINT32 antenna_series;
  15050. } wmi_peer_smart_ant_set_tx_antenna_series;
  15051. typedef struct {
  15052. /*
  15053. * TLV tag and len; tag equals
  15054. * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param
  15055. */
  15056. A_UINT32 tlv_header;
  15057. /* rate array */
  15058. A_UINT32 train_rate_series;
  15059. /* antenna array */
  15060. A_UINT32 train_antenna_series;
  15061. /* Rate flags */
  15062. /* TODO: For future use? */
  15063. A_UINT32 rc_flags;
  15064. } wmi_peer_smart_ant_set_train_antenna_param;
  15065. typedef struct {
  15066. /*
  15067. * TLV tag and len; tag equals
  15068. * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param
  15069. */
  15070. A_UINT32 tlv_header;
  15071. /** unique id identifying the VDEV, generated by the caller */
  15072. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  15073. /** peer MAC address */
  15074. wmi_mac_addr peer_macaddr;
  15075. /* num packets; 0-stop training */
  15076. A_UINT32 num_pkts;
  15077. /*
  15078. * Following this structure is the TLV:
  15079. * wmi_peer_smart_ant_set_train_antenna_param
  15080. */
  15081. } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
  15082. typedef struct {
  15083. /*
  15084. * TLV tag and len; tag equals
  15085. * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param
  15086. */
  15087. A_UINT32 tlv_header;
  15088. /** unique id identifying the vdev, generated by the caller */
  15089. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  15090. /** peer MAC address */
  15091. wmi_mac_addr peer_macaddr;
  15092. /* command id*/
  15093. A_UINT32 cmd_id;
  15094. /* number of arguments passed */
  15095. A_UINT32 args_count;
  15096. /*
  15097. * Following this structure is the TLV:
  15098. * A_UINT32 args[]; // argument list
  15099. */
  15100. } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
  15101. typedef struct {
  15102. /*
  15103. * TLV tag and len; tag equals
  15104. * WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain
  15105. */
  15106. A_UINT32 tlv_header;
  15107. A_UINT32 antCtrlChain;
  15108. /** pdev_id for identifying the MAC
  15109. * See macros starting with WMI_PDEV_ID_ for values.
  15110. */
  15111. A_UINT32 pdev_id;
  15112. } wmi_pdev_set_ant_ctrl_chain;
  15113. typedef struct {
  15114. /*
  15115. * TLV tag and len; tag equals
  15116. * WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param
  15117. */
  15118. A_UINT32 tlv_header;
  15119. A_UINT32 mac_id; /* MAC ID */
  15120. A_UINT32 antCtrlCommon1;
  15121. A_UINT32 antCtrlCommon2;
  15122. /*
  15123. * Following this structure is the TLV:
  15124. * wmi_pdev_set_ant_ctrl_chain
  15125. */
  15126. } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
  15127. typedef struct {
  15128. /* TLV tag and len; tag equals
  15129. * WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param
  15130. */
  15131. A_UINT32 tlv_header;
  15132. union {
  15133. /* OBSOLETE - will be removed once all refs are gone */
  15134. A_UINT32 mac_id;
  15135. /** pdev_id for identifying the MAC
  15136. * See macros starting with WMI_PDEV_ID_ for values.
  15137. */
  15138. A_UINT32 pdev_id;
  15139. };
  15140. /** len of CTL info */
  15141. A_UINT32 ctl_len;
  15142. /* ctl array (len adjusted to number of words)
  15143. * Following this structure is the TLV:
  15144. * A_UINT32 ctl_info[1];
  15145. */
  15146. } wmi_pdev_set_ctl_table_cmd_fixed_param;
  15147. typedef struct {
  15148. /*
  15149. * TLV tag and len; tag equals
  15150. * WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param
  15151. */
  15152. A_UINT32 tlv_header;
  15153. union {
  15154. /* OBSOLETE - will be removed once all refs are gone */
  15155. A_UINT32 mac_id;
  15156. /** pdev_id for identifying the MAC
  15157. * See macros starting with WMI_PDEV_ID_ for values.
  15158. */
  15159. A_UINT32 pdev_id;
  15160. };
  15161. A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
  15162. /*
  15163. * Bit 7:0 len of array gain table
  15164. * Bit 8 bypass multi chain gain or not
  15165. */
  15166. /*
  15167. * array gain table(s) (len adjusted to number of words).
  15168. * Following this structure is the TLV:
  15169. * A_UINT32 arraygain_tbl[1];
  15170. */
  15171. } wmi_pdev_set_mimogain_table_cmd_fixed_param;
  15172. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
  15173. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
  15174. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  15175. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  15176. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
  15177. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
  15178. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  15179. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  15180. typedef struct {
  15181. /*
  15182. * TLV tag and len; tag equals
  15183. * WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param
  15184. */
  15185. A_UINT32 tlv_header;
  15186. /** parameter id */
  15187. A_UINT32 param_id;
  15188. /** parameter value */
  15189. A_UINT32 param_value;
  15190. } wmi_fwtest_set_param_cmd_fixed_param;
  15191. /* Expressed in 1 part in 1000 (permille) */
  15192. #define WMI_ATF_DENOMINATION 1000
  15193. #define WMI_ATF_SSID_FAIR_SCHED 0 /** Fair ATF scheduling for vdev */
  15194. #define WMI_ATF_SSID_STRICT_SCHED 1 /** Strict ATF scheduling for vdev */
  15195. typedef struct {
  15196. /*
  15197. * TLV tag and len; tag equals
  15198. * WMITLV_TAG_STRUC_wmi_atf_peer_info
  15199. */
  15200. A_UINT32 tlv_header;
  15201. wmi_mac_addr peer_macaddr;
  15202. A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
  15203. A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
  15204. /* Peer congestion threshold for future use */
  15205. A_UINT32 atf_units_reserved;
  15206. } wmi_atf_peer_info;
  15207. typedef struct {
  15208. /*
  15209. * TLV tag and len; tag equals
  15210. * WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param
  15211. */
  15212. A_UINT32 tlv_header;
  15213. A_UINT32 num_peers;
  15214. /*
  15215. * Following this structure is the TLV:
  15216. * struct wmi_atf_peer_info peer_info[num_peers];
  15217. */
  15218. } wmi_peer_atf_request_fixed_param;
  15219. /* Structure for Bandwidth Fairness peer information */
  15220. typedef struct {
  15221. /*
  15222. * TLV tag and len; tag equals
  15223. * WMITLV_TAG_STRUC_wmi_bwf_peer_info
  15224. */
  15225. A_UINT32 tlv_header;
  15226. wmi_mac_addr peer_macaddr;
  15227. /* BWF guaranteed_bandwidth for the peers in mbps */
  15228. A_UINT32 bwf_guaranteed_bandwidth;
  15229. /*
  15230. * BWF Maximum airtime percentage that can be allocated
  15231. * to the peer to meet the guaranteed_bandwidth
  15232. */
  15233. A_UINT32 bwf_max_airtime;
  15234. /* BWF priority of the peer to allocate the tokens dynamically */
  15235. A_UINT32 bwf_peer_priority;
  15236. } wmi_bwf_peer_info;
  15237. /* Structure for Bandwidth Fairness peer request */
  15238. typedef struct {
  15239. /*
  15240. * TLV tag and len; tag equals
  15241. * WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param
  15242. */
  15243. A_UINT32 tlv_header;
  15244. A_UINT32 num_peers;
  15245. /*
  15246. * Following this structure is the TLV:
  15247. * struct wmi_bwf_peer_info peer_info[num_peers];
  15248. */
  15249. } wmi_peer_bwf_request_fixed_param;
  15250. /* Equal distribution of ATF air time within an VDEV. */
  15251. typedef struct {
  15252. /*
  15253. * TLV tag and len; tag equals
  15254. * WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param
  15255. */
  15256. A_UINT32 tlv_header;
  15257. A_UINT32 vdev_id;
  15258. A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
  15259. } wmi_vdev_atf_request_fixed_param;
  15260. typedef struct {
  15261. /*
  15262. * TLV tag and len; tag equals
  15263. * WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param
  15264. */
  15265. A_UINT32 tlv_header;
  15266. /** pdev_id for identifying the MAC
  15267. * See macros starting with WMI_PDEV_ID_ for values.
  15268. */
  15269. A_UINT32 pdev_id;
  15270. /** parameter */
  15271. A_UINT32 param;
  15272. } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
  15273. typedef struct {
  15274. /*
  15275. * TLV tag and len; tag equals
  15276. * WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param
  15277. */
  15278. A_UINT32 tlv_header;
  15279. /** pdev_id for identifying the MAC
  15280. * See macros starting with WMI_PDEV_ID_ for values.
  15281. */
  15282. A_UINT32 pdev_id;
  15283. /** parameter */
  15284. A_UINT32 param;
  15285. } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
  15286. typedef struct {
  15287. /*
  15288. * TLV tag and len; tag equals
  15289. * WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param
  15290. */
  15291. A_UINT32 tlv_header;
  15292. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  15293. A_UINT32 qb_enable;
  15294. wmi_mac_addr peer_macaddr;
  15295. } WMI_QBOOST_CFG_CMD_fixed_param;
  15296. #define WMI_INST_STATS_INVALID_RSSI 0
  15297. typedef struct {
  15298. /*
  15299. * TLV tag and len; tag equals
  15300. * WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param
  15301. */
  15302. A_UINT32 tlv_header;
  15303. A_UINT32 iRSSI; /* dBm above the noise floor */
  15304. /* peer MAC address */
  15305. wmi_mac_addr peer_macaddr;
  15306. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  15307. } wmi_inst_rssi_stats_resp_fixed_param;
  15308. typedef struct {
  15309. /*
  15310. * TLV tag and len; tag equals
  15311. * WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info
  15312. */
  15313. A_UINT32 tlv_header;
  15314. A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
  15315. } wmi_peer_cck_ofdm_rate_info;
  15316. typedef struct {
  15317. /*
  15318. * TLV tag and len; tag equals
  15319. * WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info
  15320. */
  15321. A_UINT32 tlv_header;
  15322. A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
  15323. A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
  15324. A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
  15325. } wmi_peer_mcs_rate_info;
  15326. typedef struct {
  15327. /*
  15328. * TLV tag and len; tag equals
  15329. * WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param
  15330. */
  15331. A_UINT32 tlv_header;
  15332. wmi_mac_addr peer_macaddr;
  15333. A_UINT32 ratecount; /* Max Rate count for each mode */
  15334. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  15335. /*
  15336. * Following this structure are the TLV
  15337. * struct wmi_peer_cck_ofdm_rate_info;
  15338. * struct wmi_peer_mcs_rate_info;
  15339. */
  15340. } wmi_peer_ratecode_list_event_fixed_param;
  15341. typedef struct wmi_wds_addr_event {
  15342. /*
  15343. * TLV tag and len; tag equals
  15344. * WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param
  15345. */
  15346. A_UINT32 tlv_header;
  15347. A_UINT32 event_type[4];
  15348. wmi_mac_addr peer_mac;
  15349. wmi_mac_addr dest_mac;
  15350. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  15351. } wmi_wds_addr_event_fixed_param;
  15352. typedef struct {
  15353. /*
  15354. * TLV tag and len; tag equals
  15355. * WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param
  15356. */
  15357. A_UINT32 tlv_header;
  15358. wmi_mac_addr peer_macaddr;
  15359. A_UINT32 peer_ps_state;
  15360. } wmi_peer_sta_ps_statechange_event_fixed_param;
  15361. /* WMI_PDEV_FIPS_EVENTID */
  15362. typedef struct {
  15363. /*
  15364. * TLV tag and len; tag equals
  15365. * WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param
  15366. */
  15367. A_UINT32 tlv_header;
  15368. union {
  15369. /* OBSOLETE - will be removed once all refs are gone */
  15370. A_UINT32 mac_id;
  15371. /** pdev_id for identifying the MAC
  15372. * See macros starting with WMI_PDEV_ID_ for values.
  15373. */
  15374. A_UINT32 pdev_id;
  15375. };
  15376. /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  15377. A_UINT32 error_status;
  15378. A_UINT32 data_len; /* Data length */
  15379. /*
  15380. * Following this structure is the TLV:
  15381. * A_UINT32 data[1]; // Out Data (keep this in the end)
  15382. */
  15383. } wmi_pdev_fips_event_fixed_param;
  15384. typedef struct {
  15385. /*
  15386. * TLV tag and len; tag equals
  15387. * WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param
  15388. */
  15389. A_UINT32 tlv_header;
  15390. A_UINT32 mac_id; /* MAC ID */
  15391. /* Noise threshold iterations with high values */
  15392. A_UINT32 noise_floor_report_iter;
  15393. /* Total noise threshold iterations */
  15394. A_UINT32 noise_floor_total_iter;
  15395. } wmi_pdev_channel_hopping_event_fixed_param;
  15396. enum {
  15397. WMI_PDEV_RESERVE_AST_ENTRY_OK,
  15398. WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
  15399. WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
  15400. };
  15401. typedef struct {
  15402. /*
  15403. * TLV tag and len; tag equals
  15404. * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param
  15405. */
  15406. A_UINT32 tlv_header;
  15407. A_UINT32 mac_id; /* MAC ID */
  15408. A_UINT32 rate_flags;
  15409. /**
  15410. * FLAG_ONE_CHAIN 0x001 - one chain mask
  15411. * FLAG_TWO_CHAIN 0x005 - two chain mask
  15412. * FLAG_THREE_CHAIN 0x007 - three chain mask
  15413. * FLAG_FOUR_CHAIN 0x00F - four chain mask
  15414. * FLAG_STBC 0x010 - STBC is set
  15415. * FLAG_40MHZ 0x020
  15416. * FLAG_80MHZ 0x040
  15417. * FLAG_160MHZ 0x080
  15418. * FLAG_TXBF 0x0100 - Tx Bf enabled
  15419. * FLAG_RTSENA 0x0200 - RTS enabled
  15420. * FLAG_CTSENA 0x0400 - CTS enabled
  15421. * FLAG_LDPC 0x0800 - LDPC set
  15422. * FLAG_SERIES1 0x1000 -
  15423. * FLAG_SGI 0x2000 - Short gaurd interval
  15424. * FLAG_MU2 0x4000 - MU2 data
  15425. * FLAG_MU3 0x8000 - MU3 data
  15426. * */
  15427. A_UINT32 nss;
  15428. /**
  15429. * NSS 0x0 - 0x3
  15430. * */
  15431. A_UINT32 preamble;
  15432. /**
  15433. * PREAM_OFDM - 0x0
  15434. * PREAM_CCK - 0x1
  15435. * PREAM_HT - 0x2
  15436. * PREAM_VHT - 0x3
  15437. * */
  15438. A_UINT32 hw_rate;
  15439. /**
  15440. * *** HW_OFDM_RATE ***
  15441. * OFDM_48_MBPS - 0x0
  15442. * OFDM_24_MBPS - 0x1
  15443. * OFDM_12_MBPS - 0x2
  15444. * OFDM_6_MBPS - 0x3
  15445. * OFDM_54_MBPS - 0x4
  15446. * OFDM_36_MBPS - 0x5
  15447. * OFDM_18_MBPS - 0x6
  15448. * OFDM_9_MBPS - 0x7
  15449. *
  15450. * *** HW_CCK_RATE ***
  15451. * CCK_11_LONG_MBPS - 0x0
  15452. * CCK_5_5_LONG_MBPS - 0x1
  15453. * CCK_2_LONG_MBPS - 0x2
  15454. * CCK_1_LONG_MBPS - 0x3
  15455. * CCK_11_SHORT_MBPS - 0x4
  15456. * CCK_5_5_SHORT_MBPS - 0x5
  15457. * CCK_2_SHORT_MBPS - 0x6
  15458. *
  15459. * *** HW_HT / VHT_RATE ***
  15460. * MCS 0x0 - 0x9
  15461. * */
  15462. } wmi_pdev_get_tpc_cmd_fixed_param;
  15463. typedef struct {
  15464. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  15465. WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
  15466. /**
  15467. * pdev_id for identifying the MAC See macros
  15468. * starting with WMI_PDEV_ID_ for values.
  15469. */
  15470. A_UINT32 pdev_id;
  15471. } wmi_pdev_get_chip_power_stats_cmd_fixed_param;
  15472. typedef struct {
  15473. /*
  15474. * TLV tag and len; tag equals
  15475. * WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param
  15476. */
  15477. A_UINT32 tlv_header;
  15478. A_UINT32 reserved0; /* for future need */
  15479. /*
  15480. * Following this structure is the TLV:
  15481. * A_UINT32 tpc[1];
  15482. */
  15483. } wmi_pdev_tpc_event_fixed_param;
  15484. typedef struct {
  15485. /*
  15486. * TLV tag and len; tag equals
  15487. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param
  15488. */
  15489. A_UINT32 tlv_header;
  15490. A_UINT32 mac_id; /* MAC ID */
  15491. A_UINT32 nfdBr_len;
  15492. A_UINT32 nfdBm_len;
  15493. A_UINT32 freqNum_len;
  15494. /*
  15495. * Following this structure is the TLV:
  15496. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
  15497. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
  15498. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
  15499. */
  15500. } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
  15501. typedef struct {
  15502. /*
  15503. * TLV tag and len; tag equals
  15504. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr
  15505. */
  15506. A_UINT32 tlv_header;
  15507. A_UINT32 nfdBr;
  15508. } wmi_pdev_nfcal_power_all_channels_nfdBr;
  15509. typedef struct {
  15510. /*
  15511. * TLV tag and len; tag equals
  15512. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm
  15513. */
  15514. A_UINT32 tlv_header;
  15515. A_UINT32 nfdBm;
  15516. } wmi_pdev_nfcal_power_all_channels_nfdBm;
  15517. typedef struct {
  15518. /*
  15519. * TLV tag and len; tag equals
  15520. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum
  15521. */
  15522. A_UINT32 tlv_header;
  15523. A_UINT32 freqNum;
  15524. } wmi_pdev_nfcal_power_all_channels_freqNum;
  15525. typedef struct {
  15526. /*
  15527. * TLV tag and len; tag equals
  15528. * WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param
  15529. */
  15530. A_UINT32 tlv_header;
  15531. A_UINT32 cck_level;
  15532. } wmi_ani_cck_event_fixed_param;
  15533. typedef enum wmi_power_debug_reg_fmt_type {
  15534. /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
  15535. * SOC_SYSTEM_SLEEP
  15536. * WLAN_SYSTEM_SLEEP
  15537. * RTC_SYNC_FORCE_WAKE
  15538. * MAC_DMA_ISR
  15539. * MAC_DMA_TXRX_ISR
  15540. * MAC_DMA_ISR_S1
  15541. * MAC_DMA_ISR_S2
  15542. * MAC_DMA_ISR_S3
  15543. * MAC_DMA_ISR_S4
  15544. * MAC_DMA_ISR_S5
  15545. * MAC_DMA_ISR_S6
  15546. * MAC_DMA_ISR_S7
  15547. */
  15548. WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
  15549. WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
  15550. } WMI_POWER_DEBUG_REG_FMT_TYPE;
  15551. typedef struct {
  15552. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  15553. WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
  15554. /*
  15555. * maximum range is 35 hours, due to conversion from internal
  15556. * 0.03215 ms units to ms
  15557. */
  15558. A_UINT32 cumulative_sleep_time_ms;
  15559. /*
  15560. * maximum range is 35 hours, due to conversion from internal
  15561. * 0.03215 ms units to ms
  15562. */
  15563. A_UINT32 cumulative_total_on_time_ms;
  15564. /* count of number of times chip enterred deep sleep */
  15565. A_UINT32 deep_sleep_enter_counter;
  15566. /* Last Timestamp when Chip went to deep sleep */
  15567. A_UINT32 last_deep_sleep_enter_tstamp_ms;
  15568. /*
  15569. * WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers
  15570. * being dumped as part of the event
  15571. */
  15572. A_UINT32 debug_register_fmt;
  15573. /* number of debug registers being sent to host */
  15574. A_UINT32 num_debug_register;
  15575. /*
  15576. * Following this structure is the TLV:
  15577. * A_UINT32 debug_registers[num_debug_registers];
  15578. */
  15579. } wmi_pdev_chip_power_stats_event_fixed_param;
  15580. typedef struct {
  15581. /*
  15582. * TLV tag and len; tag equals
  15583. * WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param
  15584. */
  15585. A_UINT32 tlv_header;
  15586. A_UINT32 ofdm_level;
  15587. } wmi_ani_ofdm_event_fixed_param;
  15588. typedef enum wmi_coex_config_type {
  15589. /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
  15590. WMI_COEX_CONFIG_PAGE_P2P_TDM = 1,
  15591. /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
  15592. WMI_COEX_CONFIG_PAGE_STA_TDM = 2,
  15593. /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
  15594. WMI_COEX_CONFIG_PAGE_SAP_TDM = 3,
  15595. /* config during WLAN connection */
  15596. WMI_COEX_CONFIG_DURING_WLAN_CONN = 4,
  15597. /* config to enable/disable BTC */
  15598. WMI_COEX_CONFIG_BTC_ENABLE = 5,
  15599. /* config of COEX debug setting */
  15600. WMI_COEX_CONFIG_COEX_DBG = 6,
  15601. /*
  15602. * config interval (ms units) (arg1 BT, arg2 WLAN)
  15603. * for P2P + STA + PAGE
  15604. */
  15605. WMI_COEX_CONFIG_PAGE_P2P_STA_TDM = 7,
  15606. /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + INQUIRY */
  15607. WMI_COEX_CONFIG_INQUIRY_P2P_TDM = 8,
  15608. /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + INQUIRY */
  15609. WMI_COEX_CONFIG_INQUIRY_STA_TDM = 9,
  15610. /* config interval (ms units) (arg1 BT, arg2 WLAN) for SAP + INQUIRY */
  15611. WMI_COEX_CONFIG_INQUIRY_SAP_TDM = 10,
  15612. /*
  15613. * config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA +
  15614. * INQUIRY
  15615. */
  15616. WMI_COEX_CONFIG_INQUIRY_P2P_STA_TDM = 11,
  15617. /* config wlan total tx power when bt coex (arg1 is wlan_tx_power_limit, in 0.5dbm units) */
  15618. WMI_COEX_CONFIG_TX_POWER = 12,
  15619. } WMI_COEX_CONFIG_TYPE;
  15620. typedef struct {
  15621. A_UINT32 tlv_header;
  15622. A_UINT32 vdev_id;
  15623. /* wmi_coex_config_type enum */
  15624. A_UINT32 config_type;
  15625. A_UINT32 config_arg1;
  15626. A_UINT32 config_arg2;
  15627. } WMI_COEX_CONFIG_CMD_fixed_param;
  15628. /**
  15629. * This command is sent from WLAN host driver to firmware to
  15630. * request firmware to enable/disable channel avoidance report
  15631. * to host.
  15632. */
  15633. enum {
  15634. WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
  15635. WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
  15636. };
  15637. typedef struct {
  15638. /*
  15639. * TLV tag and len; tag equals
  15640. * WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param
  15641. */
  15642. A_UINT32 tlv_header;
  15643. /* Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
  15644. A_UINT32 rpt_allow;
  15645. } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
  15646. /*
  15647. * Periodic channel stats WMI command structure
  15648. * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
  15649. */
  15650. typedef struct {
  15651. /*
  15652. * TLV tag and len; tag equals
  15653. * WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param
  15654. */
  15655. A_UINT32 tlv_header;
  15656. /** 1 = enable, 0 = disable */
  15657. A_UINT32 enable;
  15658. /** periodic stats duration (units are milliseconds) */
  15659. A_UINT32 stats_period;
  15660. } wmi_set_periodic_channel_stats_config_fixed_param;
  15661. typedef struct {
  15662. /*
  15663. * TLV tag and len; tag equals
  15664. * WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param
  15665. */
  15666. A_UINT32 tlv_header;
  15667. /*
  15668. * pdev_id for identifying the MAC
  15669. * See macros starting with WMI_PDEV_ID_ for values.
  15670. */
  15671. A_UINT32 pdev_id;
  15672. /* Identify the wlan module */
  15673. A_UINT32 module_id;
  15674. /* Num of elements in the following args[] array */
  15675. A_UINT32 num_args;
  15676. /**
  15677. * Following this structure are the TLVs:
  15678. * A_UINT32 args[];
  15679. **/
  15680. } wmi_pdev_wal_power_debug_cmd_fixed_param;
  15681. typedef struct {
  15682. /*
  15683. * TLV tag and len; tag equals
  15684. * WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param
  15685. */
  15686. A_UINT32 tlv_header;
  15687. /**
  15688. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use
  15689. * for the AC
  15690. * @details
  15691. * Each WMM access category (voice, video, best-effort,
  15692. * background) will have its own timeout value to dictate
  15693. * how long to wait for missing rx MPDUs to arrive before
  15694. * releasing subsequent MPDUs that have already been
  15695. * received.
  15696. * This parameter specifies the timeout in milliseconds
  15697. * for each access category.
  15698. * The array elements are indexed by the WMI_AC enum to
  15699. * identify which array element corresponds to which AC /
  15700. * traffic type.
  15701. */
  15702. A_UINT32 rx_timeout_pri[WMI_AC_MAX];
  15703. } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
  15704. /**
  15705. * wlan stats shall be understood as per period.
  15706. * Generally, it is reported periodically based on the period specified by host.
  15707. * But if the variation of one stats of compared to the
  15708. * pervious notification exceeds a threshold,
  15709. * FW will report the wlan stats immediately.
  15710. * The values of the stats becomes the new reference to compute variations.
  15711. * This threshold can be a global setting or per category.
  15712. * Host can enable/disable the mechanism for any stats per bitmap.
  15713. * TX/RX thresholds (percentage value) are shared across ACs,
  15714. * and TX/RX stats comprisons are processed per AC of each peer.
  15715. * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
  15716. * and the detailed tx_mpdus threshold value is set to 10%,
  15717. * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
  15718. * and it reaches 110 during the second period,
  15719. * FW will generate and send out a wlan stats event immediately.
  15720. */
  15721. typedef struct {
  15722. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
  15723. /** Indicate if threshold mechnism is enabled or disabled.
  15724. * It is disabled by default.
  15725. * Host can enable and disable it dynamically.
  15726. */
  15727. A_UINT32 enable_thresh;
  15728. /** use_thresh_bitmap equals 0 means gbl_thresh is used.
  15729. * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
  15730. */
  15731. A_UINT32 use_thresh_bitmap;
  15732. /** global threshold, valid when use_thresh_bitmap equals 0.
  15733. * It takes effect for all counters.
  15734. * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
  15735. */
  15736. A_UINT32 gbl_thresh;
  15737. /** Enable/disable bitmap for threshold mechanism of CCA stats */
  15738. A_UINT32 cca_thresh_enable_bitmap;
  15739. /** Enable/disable bitmap for threshold mechanism of signal stats */
  15740. A_UINT32 signal_thresh_enable_bitmap;
  15741. /** Enable/disable bitmap for threshold mechanism of TX stats */
  15742. A_UINT32 tx_thresh_enable_bitmap;
  15743. /** Enable/disable bitmap for threshold mechanism of RX stats */
  15744. A_UINT32 rx_thresh_enable_bitmap;
  15745. /* This TLV is followed by TLVs below:
  15746. * wmi_chan_cca_stats_thresh cca_thresh;
  15747. * wmi_peer_signal_stats_thresh signal_thresh;
  15748. * wmi_tx_stats_thresh tx_thresh;
  15749. * wmi_rx_stats_thresh rx_thresh;
  15750. */
  15751. } wmi_pdev_set_stats_threshold_cmd_fixed_param;
  15752. typedef enum {
  15753. WMI_REQUEST_WLAN_TX_STAT = 0x01,
  15754. WMI_REQUEST_WLAN_RX_STAT = 0x02,
  15755. WMI_REQUEST_WLAN_CCA_STAT = 0x04,
  15756. WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
  15757. } wmi_wlan_stats_id;
  15758. typedef struct {
  15759. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
  15760. wmi_wlan_stats_id stats_id;
  15761. } wmi_request_wlan_stats_cmd_fixed_param;
  15762. typedef enum {
  15763. WLAN_2G_CAPABILITY = 0x1,
  15764. WLAN_5G_CAPABILITY = 0x2,
  15765. } WLAN_BAND_CAPABILITY;
  15766. typedef enum wmi_hw_mode_config_type {
  15767. /* Only one PHY is active. */
  15768. WMI_HW_MODE_SINGLE = 0,
  15769. /**
  15770. * Both PHYs are active in different bands, one in 2G
  15771. * and another in 5G.
  15772. */
  15773. WMI_HW_MODE_DBS = 1,
  15774. /**
  15775. * Both PHYs are in passive mode (only rx) in same band;
  15776. * no tx allowed.
  15777. */
  15778. WMI_HW_MODE_SBS_PASSIVE = 2,
  15779. /**
  15780. * Both PHYs are active in the same band.
  15781. * Support for both PHYs within one band is planned for 5G only
  15782. * (as indicated in WMI_MAC_PHY_CAPABILITIES),
  15783. * but could be extended to other bands in the future.
  15784. * The separation of the band between the two PHYs needs to be
  15785. * communicated separately.
  15786. */
  15787. WMI_HW_MODE_SBS = 3,
  15788. /**
  15789. * 3 PHYs, with 2 on the same band doing SBS
  15790. * as in WMI_HW_MODE_SBS, and 3rd on the other band
  15791. */
  15792. WMI_HW_MODE_DBS_SBS = 4,
  15793. } WMI_HW_MODE_CONFIG_TYPE;
  15794. #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
  15795. #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  15796. #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
  15797. #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  15798. #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
  15799. #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  15800. #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
  15801. #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  15802. #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
  15803. #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  15804. #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
  15805. #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  15806. #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
  15807. #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
  15808. typedef struct {
  15809. /*
  15810. * TLV tag and len; tag equals
  15811. * WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES
  15812. */
  15813. A_UINT32 tlv_header;
  15814. /*
  15815. * hw_mode_id - identify a particular set of HW characteristics, as
  15816. * specified by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element
  15817. * must be mapped to its parent WMI_HW_MODE_CAPABILITIES element using
  15818. * hw_mode_id. No particular ordering of WMI_MAC_PHY_CAPABILITIES
  15819. * elements should be assumed, though in practice the elements may
  15820. * always be ordered by hw_mode_id
  15821. */
  15822. A_UINT32 hw_mode_id;
  15823. /*
  15824. * pdev_id starts with 1. pdev_id 1 => phy_id 0,
  15825. * pdev_id 2 => phy_id 1
  15826. */
  15827. A_UINT32 pdev_id;
  15828. /* phy id. Starts with 0 */
  15829. A_UINT32 phy_id;
  15830. /* supported modulations and number of MU beamformees */
  15831. union {
  15832. struct {
  15833. A_UINT32 supports_11b:1,
  15834. supports_11g:1,
  15835. supports_11a:1,
  15836. supports_11n:1,
  15837. supports_11ac:1,
  15838. supports_11ax:1,
  15839. unused:22,
  15840. /* max MU beamformees supported per MAC */
  15841. max_mubfee:4;
  15842. };
  15843. A_UINT32 supported_flags;
  15844. };
  15845. /* supported bands, enum WLAN_BAND_CAPABILITY */
  15846. A_UINT32 supported_bands;
  15847. /*
  15848. * ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
  15849. * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us
  15850. */
  15851. A_UINT32 ampdu_density;
  15852. /* max bw supported 2G, enum wmi_channel_width */
  15853. A_UINT32 max_bw_supported_2G;
  15854. /* WMI HT Capability, WMI_HT_CAP defines */
  15855. A_UINT32 ht_cap_info_2G;
  15856. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  15857. A_UINT32 vht_cap_info_2G;
  15858. /*
  15859. * VHT Supported MCS Set field Rx/Tx same
  15860. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
  15861. * follows
  15862. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  15863. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  15864. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  15865. * - 3 indicates that n spatial streams is not supported
  15866. */
  15867. A_UINT32 vht_supp_mcs_2G;
  15868. /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
  15869. A_UINT32 he_cap_info_2G;
  15870. /* HE Supported MCS Set field Rx/Tx same */
  15871. A_UINT32 he_supp_mcs_2G;
  15872. /* Valid Transmit chain mask */
  15873. A_UINT32 tx_chain_mask_2G;
  15874. /* Valid Receive chain mask */
  15875. A_UINT32 rx_chain_mask_2G;
  15876. /* max bw supported 5G, enum wmi_channel_width */
  15877. A_UINT32 max_bw_supported_5G;
  15878. /* WMI HT Capability, WMI_HT_CAP defines */
  15879. A_UINT32 ht_cap_info_5G;
  15880. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  15881. A_UINT32 vht_cap_info_5G;
  15882. /*
  15883. * VHT Supported MCS Set field Rx/Tx same
  15884. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
  15885. * follows
  15886. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  15887. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  15888. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  15889. * - 3 indicates that n spatial streams is not supported
  15890. */
  15891. A_UINT32 vht_supp_mcs_5G;
  15892. /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
  15893. A_UINT32 he_cap_info_5G;
  15894. /* HE Supported MCS Set field Rx/Tx same */
  15895. A_UINT32 he_supp_mcs_5G;
  15896. /* Valid Transmit chain mask */
  15897. A_UINT32 tx_chain_mask_5G;
  15898. /* Valid Receive chain mask */
  15899. A_UINT32 rx_chain_mask_5G;
  15900. /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
  15901. A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
  15902. A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
  15903. wmi_ppe_threshold he_ppet2G;
  15904. wmi_ppe_threshold he_ppet5G;
  15905. } WMI_MAC_PHY_CAPABILITIES;
  15906. typedef struct {
  15907. /*
  15908. * TLV tag and len; tag equal
  15909. * WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES
  15910. */
  15911. A_UINT32 tlv_header;
  15912. /*
  15913. * hw_mode_id - identify a particular set of HW characteristics,
  15914. * as specified by the subsequent fields
  15915. */
  15916. A_UINT32 hw_mode_id;
  15917. /**
  15918. * BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on.
  15919. * Number of bits set in phy_id_map represents number of
  15920. * WMI_MAC_PHY_CAPABILITIES TLV's
  15921. * one for each active PHY for current HW mode
  15922. * identified by hw_mode_id. For example for
  15923. * DBS/SBS mode there will be 2
  15924. * WMI_MAC_PHY_CAPABILITIES TLVs and for
  15925. * single MAC modes it
  15926. * will be 1 WMI_MAC_PHY_CAPABILITIES
  15927. * TLVs
  15928. */
  15929. A_UINT32 phy_id_map;
  15930. /**
  15931. * hw_mode_config_type
  15932. * Identify a particular type of HW mode such as SBS, DBS etc.
  15933. * Refer to WMI_HW_MODE_CONFIG_TYPE values.
  15934. */
  15935. A_UINT32 hw_mode_config_type;
  15936. } WMI_HW_MODE_CAPABILITIES;
  15937. typedef struct {
  15938. /*
  15939. * TLV tag and len; tag equals
  15940. * WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS
  15941. */
  15942. A_UINT32 tlv_header;
  15943. /* num HW modes */
  15944. A_UINT32 num_hw_modes;
  15945. /* num_hw_modes WMI_HW_MODE_CAPABILITIES TLV's */
  15946. } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
  15947. /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
  15948. typedef struct {
  15949. /*
  15950. * TLV tag and len; tag equals
  15951. * WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT
  15952. */
  15953. A_UINT32 tlv_header;
  15954. /* phy id */
  15955. A_UINT32 phy_id;
  15956. /* regdomain value specified in EEPROM */
  15957. A_UINT32 eeprom_reg_domain;
  15958. /* regdomain */
  15959. A_UINT32 eeprom_reg_domain_ext;
  15960. /*
  15961. * CAP1 capabilities bit map, see REGDMN_CAP1_
  15962. * defines
  15963. */
  15964. A_UINT32 regcap1;
  15965. /*
  15966. * REGDMN EEPROM CAP, see
  15967. * REGDMN_EEPROM_EEREGCAP_ defines
  15968. */
  15969. A_UINT32 regcap2;
  15970. /* REGDMN MODE, see REGDMN_MODE_ enum */
  15971. A_UINT32 wireless_modes;
  15972. A_UINT32 low_2ghz_chan;
  15973. A_UINT32 high_2ghz_chan;
  15974. A_UINT32 low_5ghz_chan;
  15975. A_UINT32 high_5ghz_chan;
  15976. } WMI_HAL_REG_CAPABILITIES_EXT;
  15977. typedef struct {
  15978. /*
  15979. * TLV tag and len; tag equals
  15980. * WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES
  15981. */
  15982. A_UINT32 tlv_header;
  15983. /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
  15984. A_UINT32 num_phy;
  15985. } WMI_SOC_HAL_REG_CAPABILITIES;
  15986. typedef struct {
  15987. /*
  15988. * TLV tag and len; tag equals
  15989. * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv
  15990. */
  15991. A_UINT32 tlv_header;
  15992. /*
  15993. * global default adaptive dwell mode,
  15994. * used when WMI_SCAN_DWELL_MODE_DEFAULT
  15995. */
  15996. A_UINT32 default_adaptive_dwell_mode;
  15997. /*
  15998. * the weight to calculate the average low pass filter for
  15999. * channel congestion. 0-100
  16000. */
  16001. A_UINT32 adapative_lpf_weight;
  16002. /* interval to monitor passive scan in msec */
  16003. A_UINT32 passive_monitor_interval_ms;
  16004. /* % of wifi activity to switch from passive to active 0-100 */
  16005. A_UINT32 wifi_activity_threshold_pct;
  16006. } wmi_scan_adaptive_dwell_parameters_tlv;
  16007. typedef struct {
  16008. /*
  16009. * TLV tag and len; tag equals
  16010. * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param
  16011. */
  16012. A_UINT32 tlv_header;
  16013. /* globally enable/disable adaptive dwell */
  16014. A_UINT32 enable;
  16015. /*
  16016. * followed by TLV (tag length value) parameters array
  16017. * The TLV's are:
  16018. * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
  16019. */
  16020. } wmi_scan_adaptive_dwell_config_fixed_param;
  16021. typedef struct {
  16022. /** TLV tag and len; tag equals
  16023. * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
  16024. A_UINT32 tlv_header;
  16025. /* Currently there are no parameters for this message. */
  16026. } wmi_coex_get_antenna_isolation_cmd_fixed_param;
  16027. typedef struct {
  16028. /** TLV tag and len; tag equals
  16029. * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
  16030. A_UINT32 tlv_header;
  16031. /** Antenna isolation value in dB units, none zero value is valid while 0 means failed to do isolation measurement or corresponding chain is not active.
  16032. * Currently the HW descriptor only supports 4 chains at most.
  16033. * Further isolation_chainX elements can be added in the future
  16034. * for additional chains, if needed.
  16035. */
  16036. A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
  16037. isolation_chain1:8, /* [15:8], isolation value for chain 1 */
  16038. isolation_chain2:8, /* [23:16], isolation value for chain 2 */
  16039. isolation_chain3:8; /* [31:24], isolation value for chain 3 */
  16040. } wmi_coex_report_isolation_event_fixed_param;
  16041. typedef enum {
  16042. WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT = 1,
  16043. WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA = 2,
  16044. WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT = 3,
  16045. WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA = 4,
  16046. } wmi_rcpi_measurement_type;
  16047. typedef struct {
  16048. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param */
  16049. A_UINT32 tlv_header;
  16050. /* VDEV identifier */
  16051. A_UINT32 vdev_id;
  16052. /* peer MAC address */
  16053. wmi_mac_addr peer_macaddr;
  16054. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  16055. A_UINT32 measurement_type;
  16056. } wmi_request_rcpi_cmd_fixed_param;
  16057. typedef struct {
  16058. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_rcpi_event_fixed_param */
  16059. A_UINT32 tlv_header;
  16060. /* VDEV identifier */
  16061. A_UINT32 vdev_id;
  16062. /* peer MAC address */
  16063. wmi_mac_addr peer_macaddr;
  16064. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  16065. A_UINT32 measurement_type;
  16066. /* Measured RCPI in dBm of the peer requested by host */
  16067. A_INT32 rcpi;
  16068. /** status
  16069. * 0 - Requested peer RCPI available
  16070. * 1 - Requested peer RCPI not available
  16071. */
  16072. A_UINT32 status;
  16073. } wmi_update_rcpi_event_fixed_param;
  16074. /* ADD NEW DEFS HERE */
  16075. /*****************************************************************************
  16076. * The following structures are deprecated. DO NOT USE THEM!
  16077. */
  16078. /** Max number of channels in the schedule. */
  16079. #define OCB_CHANNEL_MAX (5)
  16080. /* NOTE: Make sure these data structures are identical to those 9235
  16081. * defined in sirApi.h */
  16082. typedef struct {
  16083. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  16084. A_UINT32 aifsn;
  16085. /** Contention Window minimum. Range: 1 - 10 */
  16086. A_UINT32 cwmin;
  16087. /** Contention Window maximum. Range: 1 - 10 */
  16088. A_UINT32 cwmax;
  16089. } wmi_qos_params_t;
  16090. typedef struct {
  16091. /** Channel frequency in MHz */
  16092. A_UINT32 chan_freq;
  16093. /** Channel duration in ms */
  16094. A_UINT32 duration;
  16095. /** Start guard interval in ms */
  16096. A_UINT32 start_guard_interval;
  16097. /** End guard interval in ms */
  16098. A_UINT32 end_guard_interval;
  16099. /** Transmit power in dBm, range 0 - 23 */
  16100. A_UINT32 tx_power;
  16101. /** Transmit datarate in Mbps */
  16102. A_UINT32 tx_rate;
  16103. /** QoS parameters for each AC */
  16104. wmi_qos_params_t qos_params[WLAN_MAX_AC];
  16105. /** 1 to enable RX stats for this channel, 0 otherwise */
  16106. A_UINT32 rx_stats;
  16107. } wmi_ocb_channel_t;
  16108. typedef struct {
  16109. /** TLV tag and len; tag equals
  16110. * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
  16111. A_UINT32 tlv_header;
  16112. /* VDEV identifier */
  16113. A_UINT32 vdev_id;
  16114. /** Number of valid channels in the channels array */
  16115. A_UINT32 num_channels;
  16116. /** The array of channels */
  16117. wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
  16118. /** 1 to allow off-channel tx, 0 otherwise */
  16119. A_UINT32 off_channel_tx; /* Not supported */
  16120. } wmi_ocb_set_sched_cmd_fixed_param;
  16121. typedef struct {
  16122. /** Return status. 0 for success, non-zero otherwise */
  16123. A_UINT32 status;
  16124. } wmi_ocb_set_sched_event_fixed_param;
  16125. /**
  16126. * END DEPRECATED
  16127. */
  16128. #ifdef __cplusplus
  16129. }
  16130. #endif
  16131. #endif /*_WMI_UNIFIED_H_*/
  16132. /**@}*/