wmi_unified.h 1.2 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194
  1. /*
  2. * Copyright (c) 2010-2019 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. #define ATH_MAC_LEN 6 /**< length of MAC in bytes */
  67. #define WMI_EVENT_STATUS_SUCCESS 0 /* Success return status to host */
  68. #define WMI_EVENT_STATUS_FAILURE 1 /* Failure return status to host */
  69. #define MAX_TX_RATE_VALUES 10 /*Max Tx Rates*/
  70. #define MAX_RSSI_VALUES 10 /*Max Rssi values*/
  71. #define WMI_MAX_CHAINS 8
  72. /* The WLAN_MAX_AC macro cannot be changed without breaking
  73. WMI compatibility. */
  74. /* The maximum value of access category */
  75. #define WLAN_MAX_AC 4
  76. /*
  77. * These don't necessarily belong here; but as the MS/SM macros require
  78. * ar6000_internal.h to be included, it may not be defined as yet.
  79. */
  80. #define WMI_F_MS(_v, _f) \
  81. (((_v) & (_f)) >> (_f##_S))
  82. /*
  83. * This breaks the "good macro practice" of only referencing each
  84. * macro field once (to avoid things like field++ from causing issues.)
  85. */
  86. #define WMI_F_RMW(_var, _v, _f) \
  87. do { \
  88. (_var) &= ~(_f); \
  89. (_var) |= (((_v) << (_f##_S)) & (_f)); \
  90. } while (0)
  91. #define WMI_GET_BITS(_val,_index,_num_bits) \
  92. (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))
  93. #define WMI_SET_BITS(_var,_index,_num_bits,_val) do { \
  94. (_var) &= ~(((1 << (_num_bits)) - 1) << (_index)); \
  95. (_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \
  96. } while (0)
  97. /**
  98. * A packed array is an array where each entry in the array is less than
  99. * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array.
  100. * For example, if each entry in the array is 11 bits, then you can stuff
  101. * an array of 4 11-bit values into an array of 2 A_UINT32 values.
  102. * The first 2 11-bit values will be stored in the first A_UINT32,
  103. * and the last 2 11-bit values will be stored in the second A_UINT32.
  104. */
  105. #define WMI_PACKED_ARR_SIZE(num_entries,bits_per_entry) \
  106. (((num_entries) / (32 / (bits_per_entry))) + \
  107. (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
  108. #define WMI_RETURN_STRING(str) case ((str)): return (uint8_t *)(# str);
  109. static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
  110. A_UINT32 entry_index, A_UINT32 bits_per_entry)
  111. {
  112. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  113. A_UINT32 uint_index = (entry_index / entries_per_uint);
  114. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  115. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  116. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  117. return (arr[uint_index] >> start_bit_in_uint) &
  118. ((1 << bits_per_entry) - 1);
  119. }
  120. static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
  121. A_UINT32 bits_per_entry, A_UINT32 val)
  122. {
  123. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  124. A_UINT32 uint_index = (entry_index / entries_per_uint);
  125. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  126. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  127. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  128. arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint);
  129. arr[uint_index] |=
  130. ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint);
  131. }
  132. /** 2 word representation of MAC addr */
  133. typedef struct _wmi_mac_addr {
  134. /** upper 4 bytes of MAC address */
  135. A_UINT32 mac_addr31to0;
  136. /** lower 2 bytes of MAC address */
  137. A_UINT32 mac_addr47to32;
  138. } wmi_mac_addr;
  139. /** macro to convert MAC address from WMI word format to char array */
  140. #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr,c_macaddr) do { \
  141. (c_macaddr)[0] = (((pwmi_mac_addr)->mac_addr31to0) >> 0) & 0xff; \
  142. (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
  143. (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
  144. (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
  145. (c_macaddr)[4] = (((pwmi_mac_addr)->mac_addr47to32) >> 0) & 0xff; \
  146. (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
  147. } while (0)
  148. /** macro to convert MAC address from char array to WMI word format */
  149. #define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr,pwmi_mac_addr) do { \
  150. (pwmi_mac_addr)->mac_addr31to0 = \
  151. (((c_macaddr)[0] << 0) | \
  152. ((c_macaddr)[1] << 8) | \
  153. ((c_macaddr)[2] << 16) | \
  154. ((c_macaddr)[3] << 24)); \
  155. (pwmi_mac_addr)->mac_addr47to32 = ((c_macaddr)[4] | ((c_macaddr)[5] << 8));\
  156. } while (0)
  157. /*
  158. * The below function declarations are for implementations on some
  159. * platforms of the above macros, but in function form, to save code
  160. * memory by avoiding macro-inlining of a non-trivial amount of code.
  161. * These function versions of the above macros may not be available
  162. * on all host and target platforms.
  163. */
  164. void wmi_mac_addr_to_char_array(wmi_mac_addr *pwmi_mac_addr, A_UINT8 *c_macaddr);
  165. void wmi_char_array_to_mac_addr(A_UINT8 *c_macaddr, wmi_mac_addr *pwmi_mac_addr);
  166. /*
  167. * wmi command groups.
  168. */
  169. typedef enum {
  170. /* 0 to 2 are reserved */
  171. WMI_GRP_START = 0x3,
  172. WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
  173. WMI_GRP_PDEV, /* 0x4 */
  174. WMI_GRP_VDEV, /* 0x5 */
  175. WMI_GRP_PEER, /* 0x6 */
  176. WMI_GRP_MGMT, /* 0x7 */
  177. WMI_GRP_BA_NEG, /* 0x8 */
  178. WMI_GRP_STA_PS, /* 0x9 */
  179. WMI_GRP_DFS, /* 0xa */
  180. WMI_GRP_ROAM, /* 0xb */
  181. WMI_GRP_OFL_SCAN, /* 0xc */
  182. WMI_GRP_P2P, /* 0xd */
  183. WMI_GRP_AP_PS, /* 0xe */
  184. WMI_GRP_RATE_CTRL, /* 0xf */
  185. WMI_GRP_PROFILE, /* 0x10 */
  186. WMI_GRP_SUSPEND, /* 0x11 */
  187. WMI_GRP_BCN_FILTER, /* 0x12 */
  188. WMI_GRP_WOW, /* 0x13 */
  189. WMI_GRP_RTT, /* 0x14 */
  190. WMI_GRP_SPECTRAL, /* 0x15 */
  191. WMI_GRP_STATS, /* 0x16 */
  192. WMI_GRP_ARP_NS_OFL, /* 0x17 */
  193. WMI_GRP_NLO_OFL, /* 0x18 */
  194. WMI_GRP_GTK_OFL, /* 0x19 */
  195. WMI_GRP_CSA_OFL, /* 0x1a */
  196. WMI_GRP_CHATTER, /* 0x1b */
  197. WMI_GRP_TID_ADDBA, /* 0x1c */
  198. WMI_GRP_MISC, /* 0x1d */
  199. WMI_GRP_GPIO, /* 0x1e */
  200. WMI_GRP_FWTEST, /* 0x1f */
  201. WMI_GRP_TDLS, /* 0x20 */
  202. WMI_GRP_RESMGR, /* 0x21 */
  203. WMI_GRP_STA_SMPS, /* 0x22 */
  204. WMI_GRP_WLAN_HB, /* 0x23 */
  205. WMI_GRP_RMC, /* 0x24 */
  206. WMI_GRP_MHF_OFL, /* 0x25 */
  207. WMI_GRP_LOCATION_SCAN, /* 0x26 */
  208. WMI_GRP_OEM, /* 0x27 */
  209. WMI_GRP_NAN, /* 0x28 */
  210. WMI_GRP_COEX, /* 0x29 */
  211. WMI_GRP_OBSS_OFL, /* 0x2a */
  212. WMI_GRP_LPI, /* 0x2b */
  213. WMI_GRP_EXTSCAN, /* 0x2c */
  214. WMI_GRP_DHCP_OFL, /* 0x2d */
  215. WMI_GRP_IPA, /* 0x2e */
  216. WMI_GRP_MDNS_OFL, /* 0x2f */
  217. WMI_GRP_SAP_OFL, /* 0x30 */
  218. WMI_GRP_OCB, /* 0x31 */
  219. WMI_GRP_SOC, /* 0x32 */
  220. WMI_GRP_PKT_FILTER, /* 0x33 */
  221. WMI_GRP_MAWC, /* 0x34 */
  222. WMI_GRP_PMF_OFFLOAD, /* 0x35 */
  223. WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
  224. WMI_GRP_NAN_DATA, /* 0x37 */
  225. WMI_GRP_PROTOTYPE, /* 0x38 */
  226. WMI_GRP_MONITOR, /* 0x39 */
  227. WMI_GRP_REGULATORY, /* 0x3a */
  228. WMI_GRP_HW_DATA_FILTER, /* 0x3b */
  229. WMI_GRP_WLM, /* 0x3c WLAN Latency Manager */
  230. WMI_GRP_11K_OFFLOAD, /* 0x3d */
  231. WMI_GRP_TWT, /* 0x3e TWT (Target Wake Time) for STA and AP */
  232. WMI_GRP_MOTION_DET, /* 0x3f */
  233. WMI_GRP_SPATIAL_REUSE, /* 0x40 */
  234. WMI_GRP_ESP, /* 0x41 Estimate Service Parameters (802.11mc) */
  235. WMI_GRP_HPCS_PULSE, /* 0x42 */
  236. WMI_GRP_AUDIO, /* 0x43 */
  237. WMI_GRP_CFR_CAPTURE, /* 0x44 */
  238. } WMI_GRP_ID;
  239. #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  240. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  241. /**
  242. * Command IDs and commange events
  243. */
  244. typedef enum {
  245. /** initialize the wlan sub system */
  246. WMI_INIT_CMDID = 0x1,
  247. /* Scan specific commands */
  248. /** start scan request to FW */
  249. WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
  250. /** stop scan request to FW */
  251. WMI_STOP_SCAN_CMDID,
  252. /** full list of channels as defined by the regulatory that will be used by scanner */
  253. WMI_SCAN_CHAN_LIST_CMDID,
  254. /** overwrite default priority table in scan scheduler */
  255. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  256. /** This command to adjust the priority and min.max_rest_time
  257. * of an on ongoing scan request.
  258. */
  259. WMI_SCAN_UPDATE_REQUEST_CMDID,
  260. /** set OUI to be used in probe request if enabled */
  261. WMI_SCAN_PROB_REQ_OUI_CMDID,
  262. /** config adaptive dwell scan */
  263. WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
  264. /** Only applicable to DBS capable product */
  265. WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID,
  266. /* PDEV(physical device) specific commands */
  267. /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
  268. WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
  269. /** set channel. mainly used for supporting monitor mode */
  270. WMI_PDEV_SET_CHANNEL_CMDID,
  271. /** set pdev specific parameters */
  272. WMI_PDEV_SET_PARAM_CMDID,
  273. /** enable packet log */
  274. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  275. /** disable packet log*/
  276. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  277. /** set wmm parameters */
  278. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  279. /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
  280. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  281. /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
  282. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  283. /** Command to send the DSCP-to-TID map to the target */
  284. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  285. /** set quiet ie parameters. primarily used in AP mode */
  286. WMI_PDEV_SET_QUIET_MODE_CMDID,
  287. /** Enable/Disable Green AP Power Save */
  288. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  289. /** get TPC config for the current operating channel */
  290. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  291. /** set the base MAC address for the physical device before a VDEV is created.
  292. * For firmware that doesn't support this feature and this command, the pdev
  293. * MAC address will not be changed. */
  294. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  295. /* eeprom content dump , the same to bdboard data */
  296. WMI_PDEV_DUMP_CMDID,
  297. /* set LED configuration */
  298. WMI_PDEV_SET_LED_CONFIG_CMDID,
  299. /* Get Current temprature of chip in Celcius degree*/
  300. WMI_PDEV_GET_TEMPERATURE_CMDID,
  301. /* Set LED flashing behavior */
  302. WMI_PDEV_SET_LED_FLASHING_CMDID,
  303. /** Enable/Disable Smart Antenna */
  304. WMI_PDEV_SMART_ANT_ENABLE_CMDID,
  305. /** Set Smart Antenna RX antenna*/
  306. WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  307. /** Override the antenna switch table */
  308. WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  309. /** Override the CTL table */
  310. WMI_PDEV_SET_CTL_TABLE_CMDID,
  311. /** Override the array gain table */
  312. WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  313. /** FIPS test mode command */
  314. WMI_PDEV_FIPS_CMDID,
  315. /** get CCK ANI level */
  316. WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
  317. /** get OFDM ANI level */
  318. WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
  319. /** NF Cal Power dBr/dBm */
  320. WMI_PDEV_GET_NFCAL_POWER_CMDID,
  321. /** TxPPDU TPC */
  322. WMI_PDEV_GET_TPC_CMDID,
  323. /** Set to enable MIB stats collection */
  324. WMI_MIB_STATS_ENABLE_CMDID,
  325. /** Set preferred channel list for DBS Mgr */
  326. WMI_PDEV_SET_PCL_CMDID,
  327. /** Set HW mode. Eg: single MAC, DBS & SBS, see soc_hw_mode_t for values */
  328. WMI_PDEV_SET_HW_MODE_CMDID,
  329. /** Set DFS, SCAN modes and other FW configurations */
  330. WMI_PDEV_SET_MAC_CONFIG_CMDID,
  331. /** Set per band and per pdev antenna chains */
  332. WMI_PDEV_SET_ANTENNA_MODE_CMDID,
  333. /** Periodic channel stats request command */
  334. WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
  335. /** WMI command for power debug framework */
  336. WMI_PDEV_WAL_POWER_DEBUG_CMDID,
  337. /** set per-AC rx reorder timeouts */
  338. WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
  339. /** WMI command for WOW gpio and type */
  340. WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
  341. /* Get current ANT's per chain's RSSI info */
  342. WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
  343. /** WMI command for getting Chip Power Stats */
  344. WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
  345. /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
  346. WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
  347. /** vdev restart request for multiple vdevs */
  348. WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID,
  349. /** Pdev update packet routing command */
  350. WMI_PDEV_UPDATE_PKT_ROUTING_CMDID,
  351. /** Get Calibration data version details */
  352. WMI_PDEV_CHECK_CAL_VERSION_CMDID,
  353. /** Set Diversity Gain */
  354. WMI_PDEV_SET_DIVERSITY_GAIN_CMDID,
  355. /** Get chain RSSI and antena index command */
  356. WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID,
  357. /** get bss chan info */
  358. WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
  359. /** update pmk cache info */
  360. WMI_PDEV_UPDATE_PMK_CACHE_CMDID,
  361. /** update fils HLP */
  362. WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID,
  363. /** update ctltable request **/
  364. WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID,
  365. /** Command to set beacon OUI **/
  366. WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID,
  367. /** enable/disable per-AC tx queue optimizations */
  368. WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID,
  369. /** enable/disable rx promiscuous mode */
  370. WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID,
  371. /* set a generic direct DMA ring config */
  372. WMI_PDEV_DMA_RING_CFG_REQ_CMDID,
  373. /* enable/disable Action frame response as HE TB PPDU */
  374. WMI_PDEV_HE_TB_ACTION_FRM_CMDID,
  375. /** filter packet log based on MAC address */
  376. WMI_PDEV_PKTLOG_FILTER_CMDID,
  377. /** wmi command for setting rogue ap configuration */
  378. WMI_PDEV_SET_RAP_CONFIG_CMDID,
  379. /** Specify DSM filters along with disallow bssid filters */
  380. WMI_PDEV_DSM_FILTER_CMDID,
  381. /* VDEV (virtual device) specific commands */
  382. /** vdev create */
  383. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
  384. /** vdev delete */
  385. WMI_VDEV_DELETE_CMDID,
  386. /** vdev start request */
  387. WMI_VDEV_START_REQUEST_CMDID,
  388. /** vdev restart request (RX only, NO TX, used for CAC period)*/
  389. WMI_VDEV_RESTART_REQUEST_CMDID,
  390. /** vdev up request */
  391. WMI_VDEV_UP_CMDID,
  392. /** vdev stop request */
  393. WMI_VDEV_STOP_CMDID,
  394. /** vdev down request */
  395. WMI_VDEV_DOWN_CMDID,
  396. /* set a vdev param */
  397. WMI_VDEV_SET_PARAM_CMDID,
  398. /* set a key (used for setting per peer unicast and per vdev multicast) */
  399. WMI_VDEV_INSTALL_KEY_CMDID,
  400. /* wnm sleep mode command */
  401. WMI_VDEV_WNM_SLEEPMODE_CMDID,
  402. WMI_VDEV_WMM_ADDTS_CMDID,
  403. WMI_VDEV_WMM_DELTS_CMDID,
  404. WMI_VDEV_SET_WMM_PARAMS_CMDID,
  405. WMI_VDEV_SET_GTX_PARAMS_CMDID,
  406. WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
  407. WMI_VDEV_PLMREQ_START_CMDID,
  408. WMI_VDEV_PLMREQ_STOP_CMDID,
  409. /* TSF timestamp action for specified vdev */
  410. WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
  411. /** set the additional IEs in probe requests for scan or
  412. * assoc req etc for frames FW locally generates */
  413. WMI_VDEV_SET_IE_CMDID,
  414. WMI_VDEV_RATEMASK_CMDID,
  415. /** ATF VDEV REQUEST commands. */
  416. WMI_VDEV_ATF_REQUEST_CMDID,
  417. /** Command to send the DSCP-to-TID map to the target for VAP */
  418. WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
  419. /* Configure filter for Neighbor Rx Pkt (smart mesh selective listening) */
  420. WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
  421. /** set quiet ie parameters. primarily used in AP mode */
  422. WMI_VDEV_SET_QUIET_MODE_CMDID,
  423. /** To set custom aggregation size for per vdev */
  424. WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
  425. /* DISA feature: Encrypt-decrypt data request */
  426. WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID,
  427. /** Command to enable mac randomizaton **/
  428. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID,
  429. /** WMI commands related to dbg arp stats */
  430. WMI_VDEV_SET_ARP_STAT_CMDID,
  431. WMI_VDEV_GET_ARP_STAT_CMDID,
  432. /** get tx power for the current vdev */
  433. WMI_VDEV_GET_TX_POWER_CMDID,
  434. /* limit STA offchannel activity */
  435. WMI_VDEV_LIMIT_OFFCHAN_CMDID,
  436. /** To set custom software retries per-AC for vdev */
  437. WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID,
  438. /** To set chainmask configuration for vdev */
  439. WMI_VDEV_CHAINMASK_CONFIG_CMDID,
  440. WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID,
  441. /* request LTE-Coex info */
  442. WMI_VDEV_GET_MWS_COEX_INFO_CMDID,
  443. /** delete all peer (excluding bss peer) */
  444. WMI_VDEV_DELETE_ALL_PEER_CMDID,
  445. /* peer specific commands */
  446. /** create a peer */
  447. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
  448. /** delete a peer */
  449. WMI_PEER_DELETE_CMDID,
  450. /** flush specific tid queues of a peer */
  451. WMI_PEER_FLUSH_TIDS_CMDID,
  452. /** set a parameter of a peer */
  453. WMI_PEER_SET_PARAM_CMDID,
  454. /** set peer to associated state. will cary all parameters determined during assocication time */
  455. WMI_PEER_ASSOC_CMDID,
  456. /**add a wds (4 address) entry. used only for testing WDS feature on AP products */
  457. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  458. /**remove wds (4 address) entry. used only for testing WDS feature on AP products */
  459. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  460. /** set up mcast group infor for multicast to unicast conversion */
  461. WMI_PEER_MCAST_GROUP_CMDID,
  462. /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
  463. WMI_PEER_INFO_REQ_CMDID,
  464. /** request the estimated link speed for the peer. FW shall respond with
  465. * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
  466. */
  467. WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
  468. /** Set the conditions to report peer justified rate to driver
  469. * The justified rate means the user-rate is justified by PER.
  470. */
  471. WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
  472. /** update a wds (4 address) entry */
  473. WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
  474. /** add a proxy sta entry */
  475. WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
  476. /** Set Smart Antenna TX antenna */
  477. WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  478. /** Set Smart Antenna TX train info */
  479. WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  480. /** Set SA node config options */
  481. WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  482. /** ATF PEER REQUEST commands */
  483. WMI_PEER_ATF_REQUEST_CMDID,
  484. /** bandwidth fairness (BWF) peer configuration request command */
  485. WMI_PEER_BWF_REQUEST_CMDID,
  486. /** rx reorder queue setup for peer/tid */
  487. WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  488. /** rx reorder queue remove for peer/tid */
  489. WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
  490. /** specify a limit for rx A-MPDU block size */
  491. WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
  492. /** request peer antdiv info from FW. FW shall respond with PEER_ANTDIV_INFO_EVENTID */
  493. WMI_PEER_ANTDIV_INFO_REQ_CMDID,
  494. /*
  495. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def was originally mistakenly
  496. * placed here, amongst the CMDID defs.
  497. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def has been moved to the
  498. * EVENTID section, but to preserve backwards compatibility, the value
  499. * here that had been used for WMI_PEER_OPER_MODE_CHANGE_EVENTID
  500. * is kept reserved/deprecated.
  501. *
  502. * This WMI_PEER_RESERVED0_CMDID value can be replaced with an actual
  503. * WMI peer event message ID, though it will be simpler to instead add
  504. * new WMI_PEER CMDID defs at the end of the WMI_GRP_PEER WMI_CMD_GRP.
  505. */
  506. WMI_PEER_RESERVED0_CMDID,
  507. /** Peer/Tid/Msduq threshold update */
  508. WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID,
  509. /** TID specific configurations per peer of type
  510. * wmi_peer_tid_configurations_cmd_fixed_param
  511. */
  512. WMI_PEER_TID_CONFIGURATIONS_CMDID,
  513. /** Peer configuration for Channel Frequency Response (CFR) capture
  514. * of type wmi_peer_cfr_capture_cmd.
  515. *
  516. * On targets that do not use the direct DMA framework,
  517. * completion of the CFR capture is communicated through
  518. * HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND.
  519. * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_MSG_TYPE_1
  520. * in WMI Service Ready.
  521. *
  522. * On targets that use direct DMA, completion of CFR capture is
  523. * communicated through WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID
  524. * using module ID WMI_DMA_RING_CONFIG_MODULE_RTT.
  525. * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_EVT_TYPE_1
  526. * in WMI Service Ready and enumerate WMI_DMA_RING_CONFIG_MODULE_RTT
  527. * in the dma_ring_caps entry of WMI_SERVICE_READY_EXT_EVENTID.
  528. * Additional MAC metadata is provided in WMI_PEER_CFR_CAPTURE_EVENTID.
  529. */
  530. WMI_PEER_CFR_CAPTURE_CMDID,
  531. /** WMI command related to AP channel width switching */
  532. WMI_PEER_CHAN_WIDTH_SWITCH_CMDID,
  533. /** WMI command to fetch current tx PN for the peer */
  534. WMI_PEER_TX_PN_REQUEST_CMDID,
  535. /** unmap response with peer ids */
  536. WMI_PEER_UNMAP_RESPONSE_CMDID,
  537. /* beacon/management specific commands */
  538. /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
  539. WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
  540. /** transmit beacon by value */
  541. WMI_PDEV_SEND_BCN_CMDID,
  542. /** set the beacon template. used in beacon offload mode to setup the
  543. * the common beacon template with the FW to be used by FW to generate beacons */
  544. WMI_BCN_TMPL_CMDID,
  545. /** set beacon filter with FW */
  546. WMI_BCN_FILTER_RX_CMDID,
  547. /* enable/disable filtering of probe requests in the firmware */
  548. WMI_PRB_REQ_FILTER_RX_CMDID,
  549. /** transmit management frame by value. will be deprecated */
  550. WMI_MGMT_TX_CMDID,
  551. /** set the probe response template. used in beacon offload mode to setup the
  552. * the common probe response template with the FW to be used by FW to generate
  553. * probe responses */
  554. WMI_PRB_TMPL_CMDID,
  555. /** Transmit Mgmt frame by reference */
  556. WMI_MGMT_TX_SEND_CMDID,
  557. /** Transmit data frame by reference */
  558. WMI_OFFCHAN_DATA_TX_SEND_CMDID,
  559. /** transmit FILS Discovery frame by value */
  560. WMI_PDEV_SEND_FD_CMDID,
  561. /** Cmd to enable/disable offloaded beacons */
  562. WMI_BCN_OFFLOAD_CTRL_CMDID,
  563. /** Cmd to enable FW handling BSS color change notification from AP. */
  564. WMI_BSS_COLOR_CHANGE_ENABLE_CMDID,
  565. /** To configure Beacon offload quiet-ie params */
  566. WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID,
  567. /** set FILS Discovery frame template for FW to generate FD frames */
  568. WMI_FD_TMPL_CMDID,
  569. /** commands to directly control ba negotiation directly from host. only used in test mode */
  570. /** turn off FW Auto addba mode and let host control addba */
  571. WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
  572. /** send add ba request */
  573. WMI_ADDBA_SEND_CMDID,
  574. WMI_ADDBA_STATUS_CMDID,
  575. /** send del ba */
  576. WMI_DELBA_SEND_CMDID,
  577. /** set add ba response will be used by FW to generate addba response*/
  578. WMI_ADDBA_SET_RESP_CMDID,
  579. /** send single VHT MPDU with AMSDU */
  580. WMI_SEND_SINGLEAMSDU_CMDID,
  581. /** Station power save specific config */
  582. /** enable/disable station powersave */
  583. WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
  584. /** set station power save specific parameter */
  585. WMI_STA_POWERSAVE_PARAM_CMDID,
  586. /** set station mimo powersave mode */
  587. WMI_STA_MIMO_PS_MODE_CMDID,
  588. /** config station TX cycle percentage in a beacon interval */
  589. WMI_STA_TDCC_CONFIG_CMDID,
  590. /** DFS-specific commands */
  591. /** enable DFS (radar detection)*/
  592. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
  593. /** disable DFS (radar detection)*/
  594. WMI_PDEV_DFS_DISABLE_CMDID,
  595. /** enable DFS phyerr/parse filter offload */
  596. WMI_DFS_PHYERR_FILTER_ENA_CMDID,
  597. /** enable DFS phyerr/parse filter offload */
  598. WMI_DFS_PHYERR_FILTER_DIS_CMDID,
  599. /** enable DFS phyerr processing offload */
  600. WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID,
  601. /** disable DFS phyerr processing offload */
  602. WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID,
  603. /** set ADFS channel config */
  604. WMI_VDEV_ADFS_CH_CFG_CMDID,
  605. /** abort ADFS off-channel-availability-check currently in progress */
  606. WMI_VDEV_ADFS_OCAC_ABORT_CMDID,
  607. /* Roaming specific commands */
  608. /** set roam scan mode */
  609. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
  610. /** set roam scan rssi threshold below which roam scan is enabled */
  611. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  612. /** set roam scan period for periodic roam scan mode */
  613. WMI_ROAM_SCAN_PERIOD,
  614. /** set roam scan trigger rssi change threshold */
  615. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  616. /** set roam AP profile */
  617. WMI_ROAM_AP_PROFILE,
  618. /** set channel list for roam scans */
  619. WMI_ROAM_CHAN_LIST,
  620. /** Stop scan command */
  621. WMI_ROAM_SCAN_CMD,
  622. /** roaming sme offload sync complete */
  623. WMI_ROAM_SYNCH_COMPLETE,
  624. /** set ric request element for 11r roaming */
  625. WMI_ROAM_SET_RIC_REQUEST_CMDID,
  626. /** Invoke roaming forcefully */
  627. WMI_ROAM_INVOKE_CMDID,
  628. /** roaming filter cmd to allow further filtering of roaming candidate */
  629. WMI_ROAM_FILTER_CMDID,
  630. /** set gateway ip, mac and retries for subnet change detection */
  631. WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
  632. /** configure thresholds for MAWC */
  633. WMI_ROAM_CONFIGURE_MAWC_CMDID,
  634. /** configure MultiBand Operation(refer WFA MBO spec) parameter */
  635. WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
  636. /** configure packet error rate threshold for triggering roaming */
  637. WMI_ROAM_PER_CONFIG_CMDID,
  638. /** configure BSS Transition Management (BTM) offload for roaming */
  639. WMI_ROAM_BTM_CONFIG_CMDID,
  640. /** Enable or Disable Fast Initial Link Setup (FILS) feature */
  641. WMI_ENABLE_FILS_CMDID,
  642. /** Request for roam scan stats */
  643. WMI_REQUEST_ROAM_SCAN_STATS_CMDID,
  644. /** Configure BSS load parameters for roam trigger */
  645. WMI_ROAM_BSS_LOAD_CONFIG_CMDID,
  646. /** Configure deauth roam trigger parameters */
  647. WMI_ROAM_DEAUTH_CONFIG_CMDID,
  648. /** Configure idle roam trigger parameters */
  649. WMI_ROAM_IDLE_CONFIG_CMDID,
  650. /**
  651. * WMI_ROAM_DSM_FILTER_CMDID is deprecated and should be unused,
  652. * but leave it reserved just to be safe.
  653. */
  654. DEPRECATED__WMI_ROAM_DSM_FILTER_CMDID,
  655. /** Enable or disable roaming triggers */
  656. WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID,
  657. /** Pre-Authentication completion status command */
  658. WMI_ROAM_PREAUTH_STATUS_CMDID,
  659. /** offload scan specific commands */
  660. /** set offload scan AP profile */
  661. WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
  662. /** remove offload scan AP profile */
  663. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  664. /** set offload scan period */
  665. WMI_OFL_SCAN_PERIOD,
  666. /* P2P specific commands */
  667. /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
  668. * generated during p2p listen and for p2p discoverability */
  669. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
  670. /** enable/disable p2p discoverability on STA/AP VDEVs */
  671. WMI_P2P_DEV_SET_DISCOVERABILITY,
  672. /** set p2p ie to be carried in beacons generated by FW for GO */
  673. WMI_P2P_GO_SET_BEACON_IE,
  674. /** set p2p ie to be carried in probe response frames generated by FW for GO */
  675. WMI_P2P_GO_SET_PROBE_RESP_IE,
  676. /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
  677. * attribute in the beacons/probe responses received.
  678. * Note: This command is currently used only for Apple P2P implementation.
  679. */
  680. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  681. /** set the configure of p2p find offload */
  682. WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
  683. /** set the vendor specific p2p ie data for p2p find offload using */
  684. WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
  685. /** set the BSSID/device name pattern of p2p find offload */
  686. WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
  687. /** set OppPS related parameters **/
  688. WMI_P2P_SET_OPPPS_PARAM_CMDID,
  689. /** set listen offload start related parameters */
  690. WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
  691. /** set listen offload stop related parameters */
  692. WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
  693. /** AP power save specific config */
  694. /** set AP power save specific param */
  695. WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
  696. /** set AP UAPSD coex specific param */
  697. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  698. /** set Enhanced Green AP param */
  699. WMI_AP_PS_EGAP_PARAM_CMDID,
  700. /** Rate-control specific commands */
  701. WMI_PEER_RATE_RETRY_SCHED_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
  702. /** WLAN Profiling commands. */
  703. WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
  704. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  705. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  706. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  707. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  708. /** Suspend resume command Ids */
  709. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
  710. WMI_PDEV_RESUME_CMDID,
  711. /* Beacon filter commands */
  712. /** add a beacon filter */
  713. WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
  714. /** remove a beacon filter */
  715. WMI_RMV_BCN_FILTER_CMDID,
  716. /* WOW Specific WMI commands*/
  717. /** add pattern for awake */
  718. WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
  719. /** deleta a wake pattern */
  720. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  721. /** enable/deisable wake event */
  722. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  723. /** enable WOW */
  724. WMI_WOW_ENABLE_CMDID,
  725. /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
  726. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  727. /* IOAC add keep alive cmd. */
  728. WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
  729. /* IOAC del keep alive cmd. */
  730. WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
  731. /* IOAC add pattern for awake */
  732. WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
  733. /* IOAC deleta a wake pattern */
  734. WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
  735. /* D0-WOW enable or disable cmd */
  736. WMI_D0_WOW_ENABLE_DISABLE_CMDID,
  737. /* enable extend WoW */
  738. WMI_EXTWOW_ENABLE_CMDID,
  739. /* Extend WoW command to configure app type1 parameter */
  740. WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
  741. /* Extend WoW command to configure app type2 parameter */
  742. WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
  743. /* enable ICMPv6 Network advertisement filtering */
  744. WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
  745. /*
  746. * Set a pattern to match UDP packet in WOW mode.
  747. * If match, construct a tx frame in a local buffer
  748. * to send through the peer AP to the entity in the
  749. * IP network that sent the UDP packet to this STA.
  750. */
  751. WMI_WOW_UDP_SVC_OFLD_CMDID,
  752. /* configure WOW host wakeup PIN pattern */
  753. WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
  754. /* Set which action category should wake the host from suspend */
  755. WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
  756. /* RTT measurement related cmd */
  757. /** request to make an RTT measurement */
  758. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
  759. /** request to report a tsf measurement */
  760. WMI_RTT_TSF_CMDID,
  761. /** spectral scan command */
  762. /** configure spectral scan */
  763. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
  764. /** enable/disable spectral scan and trigger */
  765. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  766. /* F/W stats */
  767. /** one time request for stats */
  768. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
  769. /** Push MCC Adaptive Scheduler Stats to Firmware */
  770. WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
  771. /** one time request for txrx stats */
  772. WMI_REQUEST_STATS_EXT_CMDID,
  773. /* Link Layer stats */
  774. /** Request for link layer stats */
  775. WMI_REQUEST_LINK_STATS_CMDID,
  776. /** Request for setting params to link layer stats */
  777. WMI_START_LINK_STATS_CMDID,
  778. /** Request to clear stats*/
  779. WMI_CLEAR_LINK_STATS_CMDID,
  780. /** Request for getting the Firmware Memory Dump */
  781. WMI_GET_FW_MEM_DUMP_CMDID,
  782. /** Request to flush of the buffered debug messages */
  783. WMI_DEBUG_MESG_FLUSH_CMDID,
  784. /** Cmd to configure the verbose level */
  785. WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
  786. /** One time request for wlan stats */
  787. WMI_REQUEST_WLAN_STATS_CMDID,
  788. /** Request for getting RCPI of peer */
  789. WMI_REQUEST_RCPI_CMDID,
  790. /** One time request for peer stats info */
  791. WMI_REQUEST_PEER_STATS_INFO_CMDID,
  792. /** One time request for radio channel stats */
  793. WMI_REQUEST_RADIO_CHAN_STATS_CMDID,
  794. /** request for WLM (wlan latency manager) stats */
  795. WMI_REQUEST_WLM_STATS_CMDID,
  796. /** ARP OFFLOAD REQUEST*/
  797. WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
  798. /** Proactive ARP Response Add Pattern Command*/
  799. WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  800. /** Proactive ARP Response Del Pattern Command*/
  801. WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  802. /** NS offload confid*/
  803. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
  804. /** APFIND Config */
  805. WMI_APFIND_CMDID,
  806. /** Passpoint list config */
  807. WMI_PASSPOINT_LIST_CONFIG_CMDID,
  808. /** configure supprssing parameters for MAWC */
  809. WMI_NLO_CONFIGURE_MAWC_CMDID,
  810. /* GTK offload Specific WMI commands*/
  811. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
  812. /* CSA offload Specific WMI commands*/
  813. /** csa offload enable */
  814. WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
  815. /** chan switch command */
  816. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  817. /* Chatter commands*/
  818. /* Change chatter mode of operation */
  819. WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
  820. /** chatter add coalescing filter command */
  821. WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
  822. /** chatter delete coalescing filter command */
  823. WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
  824. /** chatter coalecing query command */
  825. WMI_CHATTER_COALESCING_QUERY_CMDID,
  826. /**addba specific commands */
  827. /** start the aggregation on this TID */
  828. WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
  829. /** stop the aggregation on this TID */
  830. WMI_PEER_TID_DELBA_CMDID,
  831. /** set station mimo powersave method */
  832. WMI_STA_DTIM_PS_METHOD_CMDID,
  833. /** Configure the Station UAPSD AC Auto Trigger Parameters */
  834. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  835. /** Configure the Keep Alive Parameters */
  836. WMI_STA_KEEPALIVE_CMDID,
  837. /* Request ssn from target for a sta/tid pair */
  838. WMI_BA_REQ_SSN_CMDID,
  839. /* misc command group */
  840. /** echo command mainly used for testing */
  841. WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
  842. /* !!IMPORTANT!!
  843. * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
  844. * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
  845. * as we MUST have a fixed value here to maintain compatibility between
  846. * UTF and the ART2 driver
  847. */
  848. /** UTF WMI commands */
  849. WMI_PDEV_UTF_CMDID,
  850. /** set debug log config */
  851. WMI_DBGLOG_CFG_CMDID,
  852. /* QVIT specific command id */
  853. WMI_PDEV_QVIT_CMDID,
  854. /* Factory Testing Mode request command
  855. * used for integrated chipsets */
  856. WMI_PDEV_FTM_INTG_CMDID,
  857. /* set and get keepalive parameters command */
  858. WMI_VDEV_SET_KEEPALIVE_CMDID,
  859. WMI_VDEV_GET_KEEPALIVE_CMDID,
  860. /* For fw recovery test command */
  861. WMI_FORCE_FW_HANG_CMDID,
  862. /* Set Mcast/Bdcast filter */
  863. WMI_SET_MCASTBCAST_FILTER_CMDID,
  864. /** set thermal management params **/
  865. WMI_THERMAL_MGMT_CMDID,
  866. /** set host auto shutdown params **/
  867. WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
  868. /** set tpc chainmask config command */
  869. WMI_TPC_CHAINMASK_CONFIG_CMDID,
  870. /** set Antenna diversity command */
  871. WMI_SET_ANTENNA_DIVERSITY_CMDID,
  872. /** Set OCB Sched Request, deprecated */
  873. WMI_OCB_SET_SCHED_CMDID,
  874. /** Set rssi monitoring config command */
  875. WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
  876. /** Enable/disable Large Receive Offload processing; provide cfg params */
  877. WMI_LRO_CONFIG_CMDID,
  878. /** transfer data from host to firmware to write flash */
  879. WMI_TRANSFER_DATA_TO_FLASH_CMDID,
  880. /** Command to enable/disable filtering of multicast IP with unicast mac */
  881. WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
  882. /** Command to control WISA mode */
  883. WMI_VDEV_WISA_CMDID,
  884. /** set debug log time stamp sync up with host */
  885. WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
  886. /** Command for host to set/delete multiple mcast filters */
  887. WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
  888. /** upload a requested section of data from firmware flash to host */
  889. WMI_READ_DATA_FROM_FLASH_CMDID,
  890. /* Thermal Throttling SET CONF commands */
  891. WMI_THERM_THROT_SET_CONF_CMDID,
  892. /* set runtime dpd recalibration params */
  893. WMI_RUNTIME_DPD_RECAL_CMDID,
  894. /* get TX power for input HALPHY parameters */
  895. WMI_GET_TPC_POWER_CMDID,
  896. /* Specify when to start monitoring for idle state */
  897. WMI_IDLE_TRIGGER_MONITOR_CMDID,
  898. /** set ELNA BYPASS status */
  899. WMI_SET_ELNA_BYPASS_CMDID,
  900. /** get ELNA BYPASS status */
  901. WMI_GET_ELNA_BYPASS_CMDID,
  902. /* Offload 11k related requests */
  903. WMI_11K_OFFLOAD_REPORT_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_11K_OFFLOAD),
  904. /* invoke neighbor report from FW */
  905. WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID,
  906. /* GPIO Configuration */
  907. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
  908. WMI_GPIO_OUTPUT_CMDID,
  909. /* Txbf configuration command */
  910. WMI_TXBF_CMDID,
  911. /* FWTEST Commands */
  912. WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
  913. /** set NoA descs **/
  914. WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
  915. /* UNIT Tests */
  916. WMI_UNIT_TEST_CMDID,
  917. /* set debug and tuning parameters */
  918. WMI_FWTEST_CMDID,
  919. /* Q-Boost configuration test commands */
  920. WMI_QBOOST_CFG_CMDID,
  921. /** TDLS Configuration */
  922. /** enable/disable TDLS */
  923. WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
  924. /** set tdls peer state */
  925. WMI_TDLS_PEER_UPDATE_CMDID,
  926. /** TDLS Offchannel control */
  927. WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
  928. /** Resmgr Configuration */
  929. /** Adaptive OCS is enabled by default in the FW. This command is used to
  930. * disable FW based adaptive OCS.
  931. */
  932. WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
  933. /** set the requested channel time quota for the home channels */
  934. WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
  935. /** set the requested latency for the home channels */
  936. WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
  937. /** STA SMPS Configuration */
  938. /** force SMPS mode */
  939. WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
  940. /** set SMPS parameters */
  941. WMI_STA_SMPS_PARAM_CMDID,
  942. /* Wlan HB commands*/
  943. /* enalbe/disable wlan HB */
  944. WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
  945. /* set tcp parameters for wlan HB */
  946. WMI_HB_SET_TCP_PARAMS_CMDID,
  947. /* set tcp pkt filter for wlan HB */
  948. WMI_HB_SET_TCP_PKT_FILTER_CMDID,
  949. /* set udp parameters for wlan HB */
  950. WMI_HB_SET_UDP_PARAMS_CMDID,
  951. /* set udp pkt filter for wlan HB */
  952. WMI_HB_SET_UDP_PKT_FILTER_CMDID,
  953. /* OIC ping keep alive */
  954. WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID,
  955. WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID,
  956. /* WMI commands related to DHCP Lease Renew Offload **/
  957. WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID,
  958. /** Wlan RMC commands*/
  959. /** enable/disable RMC */
  960. WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
  961. /** configure action frame period */
  962. WMI_RMC_SET_ACTION_PERIOD_CMDID,
  963. /** For debug/future enhancement purposes only,
  964. * configures/finetunes RMC algorithms */
  965. WMI_RMC_CONFIG_CMDID,
  966. /** select manual leader */
  967. WMI_RMC_SET_MANUAL_LEADER_CMDID,
  968. /** WLAN MHF offload commands */
  969. /** enable/disable MHF offload */
  970. WMI_MHF_OFFLOAD_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
  971. /** Plumb routing table for MHF offload */
  972. WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
  973. /*location scan commands*/
  974. /*start batch scan*/
  975. WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  976. /*stop batch scan*/
  977. WMI_BATCH_SCAN_DISABLE_CMDID,
  978. /*get batch scan result*/
  979. WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
  980. /* OEM related cmd */
  981. WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
  982. WMI_OEM_REQUEST_CMDID, /* UNUSED */
  983. /* OEM related cmd used for Low Power ranging */
  984. WMI_LPI_OEM_REQ_CMDID,
  985. WMI_OEM_DMA_RING_CFG_REQ_CMDID,
  986. /** Command to handle OEM's opaque data */
  987. WMI_OEM_DATA_CMDID,
  988. /** Nan Request */
  989. WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
  990. /** Modem power state command */
  991. WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
  992. WMI_CHAN_AVOID_UPDATE_CMDID,
  993. WMI_COEX_CONFIG_CMDID,
  994. WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
  995. WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
  996. WMI_SAR_LIMITS_CMDID,
  997. WMI_SAR_GET_LIMITS_CMDID,
  998. /**
  999. * OBSS scan offload enable/disable commands
  1000. * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
  1001. * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
  1002. * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
  1003. * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
  1004. * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
  1005. * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
  1006. */
  1007. WMI_OBSS_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
  1008. WMI_OBSS_SCAN_DISABLE_CMDID,
  1009. WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID,
  1010. /**LPI commands*/
  1011. /**LPI mgmt snooping config command*/
  1012. WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
  1013. /**LPI scan start command*/
  1014. WMI_LPI_START_SCAN_CMDID,
  1015. /**LPI scan stop command*/
  1016. WMI_LPI_STOP_SCAN_CMDID,
  1017. /** ExtScan commands */
  1018. WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
  1019. WMI_EXTSCAN_STOP_CMDID,
  1020. WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
  1021. WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
  1022. WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
  1023. WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
  1024. WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
  1025. WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
  1026. WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
  1027. WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
  1028. /** DHCP server offload commands */
  1029. WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
  1030. /** IPA Offload features related commands */
  1031. WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
  1032. /** mDNS responder offload commands */
  1033. WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1034. WMI_MDNS_SET_FQDN_CMDID,
  1035. WMI_MDNS_SET_RESPONSE_CMDID,
  1036. WMI_MDNS_GET_STATS_CMDID,
  1037. /* enable/disable AP Authentication offload */
  1038. WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
  1039. WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
  1040. WMI_SAP_OBSS_DETECTION_CFG_CMDID,
  1041. /** Out-of-context-of-BSS (OCB) commands */
  1042. WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
  1043. WMI_OCB_SET_UTC_TIME_CMDID,
  1044. WMI_OCB_START_TIMING_ADVERT_CMDID,
  1045. WMI_OCB_STOP_TIMING_ADVERT_CMDID,
  1046. WMI_OCB_GET_TSF_TIMER_CMDID,
  1047. WMI_DCC_GET_STATS_CMDID,
  1048. WMI_DCC_CLEAR_STATS_CMDID,
  1049. WMI_DCC_UPDATE_NDL_CMDID,
  1050. /* System-On-Chip commands */
  1051. WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
  1052. WMI_SOC_SET_HW_MODE_CMDID,
  1053. WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
  1054. WMI_SOC_SET_ANTENNA_MODE_CMDID,
  1055. /* packet filter commands */
  1056. WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
  1057. WMI_PACKET_FILTER_ENABLE_CMDID,
  1058. /** Motion Aided WiFi Connectivity (MAWC) commands */
  1059. WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
  1060. /** WMI commands related to PMF 11w Offload */
  1061. WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
  1062. /** WMI commands related to pkt filter (BPF) offload */
  1063. WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1064. WMI_BPF_GET_VDEV_STATS_CMDID,
  1065. WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
  1066. WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
  1067. WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID,
  1068. WMI_BPF_SET_VDEV_ENABLE_CMDID,
  1069. WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID,
  1070. WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID,
  1071. /** WMI commands related to monitor mode. */
  1072. WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
  1073. /** WMI commands related to regulatory offload */
  1074. WMI_SET_CURRENT_COUNTRY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_REGULATORY),
  1075. WMI_11D_SCAN_START_CMDID,
  1076. WMI_11D_SCAN_STOP_CMDID,
  1077. WMI_SET_INIT_COUNTRY_CMDID,
  1078. /**
  1079. * Nan Data commands
  1080. * NDI - NAN Data Interface
  1081. * NDP - NAN Data Path
  1082. */
  1083. /* Commands in prototyping phase */
  1084. WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1085. WMI_NDP_INITIATOR_REQ_CMDID,
  1086. WMI_NDP_RESPONDER_REQ_CMDID,
  1087. WMI_NDP_END_REQ_CMDID,
  1088. WMI_NDP_CMDID,
  1089. /** WMI commands related to HW data filtering **/
  1090. WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
  1091. /** WMI commands related to WLAN latency module **/
  1092. WMI_WLM_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLM),
  1093. /** WMI commands related to STA & AP TWT module **/
  1094. WMI_TWT_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TWT),
  1095. WMI_TWT_DISABLE_CMDID,
  1096. WMI_TWT_ADD_DIALOG_CMDID,
  1097. WMI_TWT_DEL_DIALOG_CMDID,
  1098. WMI_TWT_PAUSE_DIALOG_CMDID,
  1099. WMI_TWT_RESUME_DIALOG_CMDID,
  1100. WMI_TWT_BTWT_INVITE_STA_CMDID,
  1101. WMI_TWT_BTWT_REMOVE_STA_CMDID,
  1102. /** WMI commands related to motion detection **/
  1103. WMI_MOTION_DET_CONFIG_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MOTION_DET),
  1104. WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID,
  1105. WMI_MOTION_DET_START_STOP_CMDID,
  1106. WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID,
  1107. /** WMI commands related to OBSS PD Spatial Reuse **/
  1108. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPATIAL_REUSE),
  1109. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID,
  1110. /** WMI commands related to High Precision Clock Synchronization feature **/
  1111. WMI_HPCS_PULSE_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HPCS_PULSE),
  1112. /** WMI commands related to Audio Frame aggregation feature **/
  1113. WMI_AUDIO_AGGR_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AUDIO),
  1114. WMI_AUDIO_AGGR_ADD_GROUP_CMDID,
  1115. WMI_AUDIO_AGGR_DEL_GROUP_CMDID,
  1116. WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID,
  1117. WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID,
  1118. /** WMI commands related to Channel Frequency Response Capture **/
  1119. WMI_CFR_CAPTURE_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CFR_CAPTURE),
  1120. } WMI_CMD_ID;
  1121. typedef enum {
  1122. /** WMI service is ready; after this event WMI messages can be sent/received */
  1123. WMI_SERVICE_READY_EVENTID = 0x1,
  1124. /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
  1125. WMI_READY_EVENTID,
  1126. /** Specify what WMI services the target supports (for services beyond
  1127. * what fits in the WMI_SERVICE_READY_EVENT message's wmi_service_bitmap)
  1128. */
  1129. WMI_SERVICE_AVAILABLE_EVENTID,
  1130. /** Specify what numbers and kinds of interfaces (a.k.a. vdevs)
  1131. * the target supports
  1132. */
  1133. WMI_IFACE_COMBINATION_IND_EVENTID,
  1134. /** Scan specific events */
  1135. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  1136. /* PDEV specific events */
  1137. /** TPC config for the current operating channel */
  1138. WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  1139. /** Channel stats event */
  1140. WMI_CHAN_INFO_EVENTID,
  1141. /** PHY Error specific WMI event */
  1142. WMI_PHYERR_EVENTID,
  1143. /** eeprom dump event */
  1144. WMI_PDEV_DUMP_EVENTID,
  1145. /** traffic pause event */
  1146. WMI_TX_PAUSE_EVENTID,
  1147. /** DFS radar event */
  1148. WMI_DFS_RADAR_EVENTID,
  1149. /** track L1SS entry and residency event */
  1150. WMI_PDEV_L1SS_TRACK_EVENTID,
  1151. /** Report current temprature of the chip in Celcius degree */
  1152. WMI_PDEV_TEMPERATURE_EVENTID,
  1153. /** Extension of WMI_SERVICE_READY msg with extra target capability info */
  1154. WMI_SERVICE_READY_EXT_EVENTID,
  1155. /** FIPS test mode event */
  1156. WMI_PDEV_FIPS_EVENTID,
  1157. /** Channel hopping avoidance */
  1158. WMI_PDEV_CHANNEL_HOPPING_EVENTID,
  1159. /** CCK ANI level event */
  1160. WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
  1161. /** OFDM ANI level event */
  1162. WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
  1163. /** Tx PPDU params */
  1164. WMI_PDEV_TPC_EVENTID,
  1165. /** NF Cal Power in DBR/DBM for all channels */
  1166. WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
  1167. /** SOC/PDEV events */
  1168. WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
  1169. WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
  1170. WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
  1171. /** Report ANT DIV feature's status */
  1172. WMI_PDEV_ANTDIV_STATUS_EVENTID,
  1173. /** Chip level Power stats */
  1174. WMI_PDEV_CHIP_POWER_STATS_EVENTID,
  1175. /** Power Save Failure Detected */
  1176. WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID,
  1177. /* Event to report the switch count in csa of one or more VDEVs */
  1178. WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID,
  1179. /** Report the caldata version to host */
  1180. WMI_PDEV_CHECK_CAL_VERSION_EVENTID,
  1181. /** Report chain RSSI and antenna index to host */
  1182. WMI_PDEV_DIV_RSSI_ANTID_EVENTID,
  1183. /** provide noise floor and cycle counts for a channel */
  1184. WMI_PDEV_BSS_CHAN_INFO_EVENTID,
  1185. /** Response received the ctl table to host */
  1186. WMI_PDEV_UPDATE_CTLTABLE_EVENTID,
  1187. WMI_PDEV_DMA_RING_CFG_RSP_EVENTID,
  1188. WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID,
  1189. /** WMI Event to deliver CTL Failsafe application */
  1190. WMI_PDEV_CTL_FAILSAFE_CHECK_EVENTID,
  1191. /* Event to report the switch count in BSS color of one or more VDEVs */
  1192. WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID,
  1193. /* Event to send cold boot calibration data */
  1194. WMI_PDEV_COLD_BOOT_CAL_DATA_EVENTID,
  1195. /* Event to report a rogue ap info that is detected in fw */
  1196. WMI_PDEV_RAP_INFO_EVENTID,
  1197. WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENTID,
  1198. /** 2nd extension of SERVICE_READY msg with extra target capability info */
  1199. WMI_SERVICE_READY_EXT2_EVENTID,
  1200. /* VDEV specific events */
  1201. /** VDEV started event in response to VDEV_START request */
  1202. WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  1203. /** vdev stopped event , generated in response to VDEV_STOP request */
  1204. WMI_VDEV_STOPPED_EVENTID,
  1205. /* Indicate the set key (used for setting per
  1206. * peer unicast and per vdev multicast)
  1207. * operation has completed */
  1208. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  1209. /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
  1210. don't use this for any new implementations */
  1211. /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
  1212. This request is valid only for vdevs operating in soft AP or P2P GO mode */
  1213. WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
  1214. /* Return the TSF timestamp of specified vdev */
  1215. WMI_VDEV_TSF_REPORT_EVENTID,
  1216. /* FW response to Host for vdev delete cmdid */
  1217. WMI_VDEV_DELETE_RESP_EVENTID,
  1218. /* DISA feature: FW response to Host with encrypted/decrypted 802.11 DISA frame */
  1219. WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
  1220. /** event to report mac randomization success **/
  1221. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID,
  1222. /* event for ARP stats collection */
  1223. WMI_VDEV_GET_ARP_STAT_EVENTID,
  1224. /** get tx power event in response to VDEV_GET_TX_POWER request */
  1225. WMI_VDEV_GET_TX_POWER_EVENTID,
  1226. WMI_VDEV_BCN_RECEPTION_STATS_EVENTID,
  1227. /* provide LTE-Coex state */
  1228. WMI_VDEV_GET_MWS_COEX_STATE_EVENTID,
  1229. /* provide LTE-Coex Dynamic Power Back-off info */
  1230. WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID,
  1231. /* provide LTE-Coex TDM info */
  1232. WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID,
  1233. /* provide LTE-Coex IDRx info */
  1234. WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID,
  1235. /* provide LTE-Coex antenna sharing info */
  1236. WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID,
  1237. /* Event to handle FW offloaded mgmt packets */
  1238. WMI_VDEV_MGMT_OFFLOAD_EVENTID,
  1239. /* FW response to Host for delete all peer cmdid */
  1240. WMI_VDEV_DELETE_ALL_PEER_RESP_EVENTID,
  1241. /* peer specific events */
  1242. /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
  1243. WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  1244. /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
  1245. WMI_PEER_INFO_EVENTID,
  1246. /** Event indicating that TX fail count reaching threshold */
  1247. WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
  1248. /* Return the estimate link speed for the Peer specified in the
  1249. * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
  1250. */
  1251. WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
  1252. /* Return the peer state
  1253. * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
  1254. */
  1255. WMI_PEER_STATE_EVENTID,
  1256. /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
  1257. * After that, host will send Mx message.
  1258. * Otherwise, host will pause any Mx(STA:M2/M4) message
  1259. */
  1260. WMI_PEER_ASSOC_CONF_EVENTID,
  1261. /* FW response to Host for peer delete cmdid */
  1262. WMI_PEER_DELETE_RESP_EVENTID,
  1263. /** Valid rate code list for peer */
  1264. WMI_PEER_RATECODE_LIST_EVENTID,
  1265. WMI_WDS_PEER_EVENTID,
  1266. WMI_PEER_STA_PS_STATECHG_EVENTID,
  1267. /** Peer Ant Div Info Event with rssi per chain, etc */
  1268. WMI_PEER_ANTDIV_INFO_EVENTID,
  1269. /*
  1270. * WMI_PEER_RESERVED_EVENTID
  1271. * These values are used for placeholders, to allow the subsequent
  1272. * WMI_PEER_OPER_MODE_CHANGE_EVENTID constant to have the same value
  1273. * as it had in its original location, when it was mistakenly placed
  1274. * amongst the WMI_PEER CMDID defs.
  1275. *
  1276. * These WMI_PEER_RESERVED values can be replaced with actual WMI peer
  1277. * event message IDs, though it will be simpler to instead add new
  1278. * WMI_PEER EVENTID defs at the end of the WMI_GRP_PEER WMI_EVT_GRP.
  1279. */
  1280. WMI_PEER_RESERVED0_EVENTID,
  1281. WMI_PEER_RESERVED1_EVENTID,
  1282. WMI_PEER_RESERVED2_EVENTID,
  1283. WMI_PEER_RESERVED3_EVENTID,
  1284. WMI_PEER_RESERVED4_EVENTID,
  1285. WMI_PEER_RESERVED5_EVENTID,
  1286. WMI_PEER_RESERVED6_EVENTID,
  1287. WMI_PEER_RESERVED7_EVENTID,
  1288. WMI_PEER_RESERVED8_EVENTID,
  1289. WMI_PEER_RESERVED9_EVENTID,
  1290. WMI_PEER_RESERVED10_EVENTID,
  1291. /** Peer operating mode change indication sent to host to update stats */
  1292. WMI_PEER_OPER_MODE_CHANGE_EVENTID,
  1293. /** report the current tx PN for the peer */
  1294. WMI_PEER_TX_PN_RESPONSE_EVENTID,
  1295. WMI_PEER_CFR_CAPTURE_EVENTID,
  1296. /* beacon/mgmt specific events */
  1297. /** RX management frame. the entire frame is carried along with the event. */
  1298. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  1299. /** software beacon alert event to Host requesting host to Queue a beacon for transmission
  1300. use only in host beacon mode */
  1301. WMI_HOST_SWBA_EVENTID,
  1302. /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theoretical value.
  1303. tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
  1304. staggered beacon transmission mode */
  1305. WMI_TBTTOFFSET_UPDATE_EVENTID,
  1306. /** event after the first beacon is transmitted following
  1307. a change in the template.*/
  1308. WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
  1309. /** event after the first probe response is transmitted following
  1310. a change in the template.*/
  1311. WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
  1312. /** Event for Mgmt TX completion event */
  1313. WMI_MGMT_TX_COMPLETION_EVENTID,
  1314. /** Event for Mgmt TX bundle completion event */
  1315. WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
  1316. /** vdev_map used in WMI_TBTTOFFSET_UPDATE_EVENTID supports max 32 vdevs.
  1317. * Use this event if number of vdevs > 32.
  1318. */
  1319. WMI_TBTTOFFSET_EXT_UPDATE_EVENTID,
  1320. /** Event for offchan data TX completion event */
  1321. WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID,
  1322. /** software FILS Discovery Frame alert event to Host, requesting host to Queue an FD frame for transmission */
  1323. WMI_HOST_SWFDA_EVENTID,
  1324. /** software beacon alert event to Host requesting host to Queue a beacon for transmission.
  1325. * Used only in host beacon mode. */
  1326. WMI_HOST_SWBA_V2_EVENTID,
  1327. /* ADDBA Related WMI Events*/
  1328. /** Indication the completion of the prior
  1329. WMI_PEER_TID_DELBA_CMDID(initiator) */
  1330. WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  1331. /** Indication the completion of the prior
  1332. *WMI_PEER_TID_ADDBA_CMDID(initiator) */
  1333. WMI_TX_ADDBA_COMPLETE_EVENTID,
  1334. /* Seq num returned from hw for a sta/tid pair */
  1335. WMI_BA_RSP_SSN_EVENTID,
  1336. /* Aggregation state requested by BTC */
  1337. WMI_AGGR_STATE_TRIG_EVENTID,
  1338. /** Roam event to trigger roaming on host */
  1339. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  1340. /** matching AP found from list of profiles */
  1341. WMI_PROFILE_MATCH,
  1342. /** roam synch event */
  1343. WMI_ROAM_SYNCH_EVENTID,
  1344. /** roam synch frame event */
  1345. WMI_ROAM_SYNCH_FRAME_EVENTID,
  1346. /** various roam scan stats */
  1347. WMI_ROAM_SCAN_STATS_EVENTID,
  1348. /** Blacklisted AP information event */
  1349. WMI_ROAM_BLACKLIST_EVENTID,
  1350. /** Roam Pre-Authentication start event */
  1351. WMI_ROAM_PREAUTH_START_EVENTID,
  1352. /** Roaming PMKID request event */
  1353. WMI_ROAM_PMKID_REQUEST_EVENTID,
  1354. /** P2P disc found */
  1355. WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
  1356. /** send noa info to host when noa is changed for beacon tx offload enable */
  1357. WMI_P2P_NOA_EVENTID,
  1358. /** send p2p listen offload stopped event with different reason */
  1359. WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
  1360. /** Send EGAP Info to host */
  1361. WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
  1362. /* send pdev resume event to host after pdev resume. */
  1363. WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
  1364. /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
  1365. will cary wake reason */
  1366. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  1367. WMI_D0_WOW_DISABLE_ACK_EVENTID,
  1368. WMI_WOW_INITIAL_WAKEUP_EVENTID,
  1369. /*RTT related event ID*/
  1370. /** RTT measurement report */
  1371. WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  1372. /** TSF measurement report */
  1373. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  1374. /** RTT error report */
  1375. WMI_RTT_ERROR_REPORT_EVENTID,
  1376. /*STATS specific events*/
  1377. /** txrx stats event requested by host */
  1378. WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
  1379. /** FW iface link stats Event */
  1380. WMI_IFACE_LINK_STATS_EVENTID,
  1381. /** FW iface peer link stats Event */
  1382. WMI_PEER_LINK_STATS_EVENTID,
  1383. /** FW Update radio stats Event */
  1384. WMI_RADIO_LINK_STATS_EVENTID,
  1385. /** Firmware memory dump Complete event*/
  1386. WMI_UPDATE_FW_MEM_DUMP_EVENTID,
  1387. /** Event indicating the DIAG logs/events supported by FW */
  1388. WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
  1389. /** Instantaneous RSSI event */
  1390. WMI_INST_RSSI_STATS_EVENTID,
  1391. /** FW update tx power levels event */
  1392. WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
  1393. /** This event is used to report wlan stats to host.
  1394. * It is triggered under 3 conditions:
  1395. * (a) Periodic timer timed out, based on the period specified
  1396. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  1397. * (b) Whenever any of the (enabled) stats thresholds specified
  1398. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  1399. * within the current stats period.
  1400. * (c) In response to the one-time wlan stats request of
  1401. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  1402. *
  1403. * If this event is triggered by condition a or b,
  1404. * the stats counters are cleared at the start of each period.
  1405. * But if it is triggered by condition c, stats counters won't be cleared.
  1406. */
  1407. WMI_REPORT_STATS_EVENTID,
  1408. /** Event indicating RCPI of the peer requested by host in the WMI_REQUEST_RCPI_CMDID */
  1409. WMI_UPDATE_RCPI_EVENTID,
  1410. /** This event is used to respond to WMI_REQUEST_PEER_STATS_INFO_CMDID
  1411. * and report peer stats info to host */
  1412. WMI_PEER_STATS_INFO_EVENTID,
  1413. /** This event is used to respond to WMI_REQUEST_RADIO_CHAN_STATS_CMDID
  1414. * and report radio channel stats to host */
  1415. WMI_RADIO_CHAN_STATS_EVENTID,
  1416. /** This event is used to respond to WMI_REQUEST_WLM_STATS_CMDID
  1417. * and report WLM (WLAN latency manager) stats info to host */
  1418. WMI_WLM_STATS_EVENTID,
  1419. /* NLO specific events */
  1420. /** NLO match event after the first match */
  1421. WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
  1422. /** NLO scan complete event */
  1423. WMI_NLO_SCAN_COMPLETE_EVENTID,
  1424. /** APFIND specific events */
  1425. WMI_APFIND_EVENTID,
  1426. /** passpoint network match event */
  1427. WMI_PASSPOINT_MATCH_EVENTID,
  1428. /** GTK offload stautus event requested by host */
  1429. WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  1430. /** GTK offload failed to rekey event */
  1431. WMI_GTK_REKEY_FAIL_EVENTID,
  1432. /* CSA IE received event */
  1433. WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  1434. /*chatter query reply event*/
  1435. WMI_CHATTER_PC_QUERY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
  1436. /** DFS related events */
  1437. WMI_PDEV_DFS_RADAR_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_DFS),
  1438. /** Indicate channel-availability-check completion event to host */
  1439. WMI_VDEV_DFS_CAC_COMPLETE_EVENTID,
  1440. /** Indicate off-channel-availability-check completion event to host */
  1441. WMI_VDEV_ADFS_OCAC_COMPLETE_EVENTID,
  1442. /** echo event in response to echo command */
  1443. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  1444. /* !!IMPORTANT!!
  1445. * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
  1446. * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
  1447. * as we MUST have a fixed value here to maintain compatibility between
  1448. * UTF and the ART2 driver
  1449. */
  1450. /** UTF specific WMI event */
  1451. WMI_PDEV_UTF_EVENTID,
  1452. /** event carries buffered debug messages */
  1453. WMI_DEBUG_MESG_EVENTID,
  1454. /** FW stats(periodic or on shot) */
  1455. WMI_UPDATE_STATS_EVENTID,
  1456. /** debug print message used for tracing FW code while debugging */
  1457. WMI_DEBUG_PRINT_EVENTID,
  1458. /** DCS wlan or non-wlan interference event
  1459. */
  1460. WMI_DCS_INTERFERENCE_EVENTID,
  1461. /** VI spoecific event */
  1462. WMI_PDEV_QVIT_EVENTID,
  1463. /** FW code profile data in response to profile request */
  1464. WMI_WLAN_PROFILE_DATA_EVENTID,
  1465. /* Factory Testing Mode request event
  1466. * used for integrated chipsets */
  1467. WMI_PDEV_FTM_INTG_EVENTID,
  1468. /* avoid list of frequencies .
  1469. */
  1470. WMI_WLAN_FREQ_AVOID_EVENTID,
  1471. /* Indicate the keepalive parameters */
  1472. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  1473. /*Thermal Management event*/
  1474. WMI_THERMAL_MGMT_EVENTID,
  1475. /* Container for DIAG event and log data */
  1476. WMI_DIAG_DATA_CONTAINER_EVENTID,
  1477. /* host auto shutdown event */
  1478. WMI_HOST_AUTO_SHUTDOWN_EVENTID,
  1479. /*update mib counters together with WMI_UPDATE_STATS_EVENTID*/
  1480. WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
  1481. /*update ht/vht info based on vdev (rx and tx NSS and preamble)*/
  1482. WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
  1483. WMI_DIAG_EVENTID,
  1484. /** Set OCB Sched Response, deprecated */
  1485. WMI_OCB_SET_SCHED_EVENTID,
  1486. /** event to indicate the flush of the buffered debug messages is complete*/
  1487. WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
  1488. /** event to report mix/max RSSI breach events */
  1489. WMI_RSSI_BREACH_EVENTID,
  1490. /** event to report completion of data storage into flash memory */
  1491. WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
  1492. /** event to report SCPC calibrated data to host */
  1493. WMI_PDEV_UTF_SCPC_EVENTID,
  1494. /** event to provide requested data from the target's flash memory */
  1495. WMI_READ_DATA_FROM_FLASH_EVENTID,
  1496. /** event to report rx aggregation failure frame information */
  1497. WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
  1498. /** event to upload a PKGID to host to identify chip for various products */
  1499. WMI_PKGID_EVENTID,
  1500. /* Thermal Throttling stats event id for every pdev and zones, etc */
  1501. WMI_THERM_THROT_STATS_EVENTID,
  1502. /* WMI UNIT TEST event */
  1503. WMI_UNIT_TEST_EVENTID,
  1504. /** event to report result of host configure SAR2 */
  1505. WMI_SAR2_RESULT_EVENTID,
  1506. /** event to get TX power per input HALPHY parameters */
  1507. WMI_GET_TPC_POWER_EVENTID,
  1508. /** event to provide MU-EDCA Parameters (to update host's beacon config) */
  1509. WMI_MUEDCA_PARAMS_CONFIG_EVENTID,
  1510. /** event to get ELNA BYPASS status */
  1511. WMI_GET_ELNA_BYPASS_EVENTID,
  1512. /* GPIO Event */
  1513. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  1514. /** upload H_CV info WMI event
  1515. * to indicate uploaded H_CV info to host
  1516. */
  1517. WMI_UPLOADH_EVENTID,
  1518. /** capture H info WMI event
  1519. * to indicate captured H info to host
  1520. */
  1521. WMI_CAPTUREH_EVENTID,
  1522. /* hw RFkill */
  1523. WMI_RFKILL_STATE_CHANGE_EVENTID,
  1524. /* TDLS Event */
  1525. WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
  1526. /** STA SMPS Event */
  1527. /** force SMPS mode */
  1528. WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
  1529. /*location scan event*/
  1530. /*report the firmware's capability of batch scan*/
  1531. WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  1532. /*batch scan result*/
  1533. WMI_BATCH_SCAN_RESULT_EVENTID,
  1534. /* OEM Event */
  1535. WMI_OEM_CAPABILITY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OEM), /*DEPRECATED*/
  1536. WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
  1537. WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
  1538. WMI_OEM_RESPONSE_EVENTID,
  1539. WMI_OEM_DMA_RING_CFG_RSP_EVENTID,
  1540. WMI_OEM_DMA_BUF_RELEASE_EVENTID,
  1541. /* NAN Event */
  1542. WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
  1543. WMI_NAN_DISC_IFACE_CREATED_EVENTID,
  1544. WMI_NAN_DISC_IFACE_DELETED_EVENTID,
  1545. WMI_NAN_STARTED_CLUSTER_EVENTID,
  1546. WMI_NAN_JOINED_CLUSTER_EVENTID,
  1547. /* Coex Event */
  1548. WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
  1549. WMI_SAR_GET_LIMITS_EVENTID,
  1550. /* LPI Event */
  1551. WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
  1552. WMI_LPI_STATUS_EVENTID,
  1553. WMI_LPI_HANDOFF_EVENTID,
  1554. /* ExtScan events */
  1555. WMI_EXTSCAN_START_STOP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
  1556. WMI_EXTSCAN_OPERATION_EVENTID,
  1557. WMI_EXTSCAN_TABLE_USAGE_EVENTID,
  1558. WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
  1559. WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
  1560. WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
  1561. WMI_EXTSCAN_CAPABILITIES_EVENTID,
  1562. WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
  1563. /* mDNS offload events */
  1564. WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1565. /* SAP Authentication offload events */
  1566. WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
  1567. WMI_SAP_OFL_DEL_STA_EVENTID,
  1568. WMI_SAP_OBSS_DETECTION_REPORT_EVENTID,
  1569. /* OBSS Offloads events */
  1570. WMI_OBSS_COLOR_COLLISION_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OBSS_OFL),
  1571. /** Out-of-context-of-bss (OCB) events */
  1572. WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
  1573. WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
  1574. WMI_DCC_GET_STATS_RESP_EVENTID,
  1575. WMI_DCC_UPDATE_NDL_RESP_EVENTID,
  1576. WMI_DCC_STATS_EVENTID,
  1577. /* System-On-Chip events */
  1578. WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
  1579. WMI_SOC_HW_MODE_TRANSITION_EVENTID,
  1580. WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
  1581. /** Motion Aided WiFi Connectivity (MAWC) events */
  1582. WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
  1583. /** pkt filter (BPF) offload relevant events */
  1584. WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1585. WMI_BPF_VDEV_STATS_INFO_EVENTID,
  1586. WMI_BPF_GET_VDEV_WORK_MEMORY_RESP_EVENTID,
  1587. /* RMC specific event */
  1588. /* RMC manual leader selected event */
  1589. WMI_RMC_NEW_LEADER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
  1590. /** WMI events related to regulatory offload */
  1591. WMI_REG_CHAN_LIST_CC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_REGULATORY),
  1592. WMI_11D_NEW_COUNTRY_EVENTID,
  1593. /** Events for TWT(Target Wake Time) of STA and AP */
  1594. WMI_TWT_ENABLE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TWT),
  1595. WMI_TWT_DISABLE_COMPLETE_EVENTID,
  1596. WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID,
  1597. WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID,
  1598. WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID,
  1599. WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID,
  1600. WMI_TWT_BTWT_INVITE_STA_COMPLETE_EVENTID,
  1601. WMI_TWT_BTWT_REMOVE_STA_COMPLETE_EVENTID,
  1602. /** Events in Prototyping phase */
  1603. WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1604. WMI_NDP_INITIATOR_RSP_EVENTID,
  1605. WMI_NDP_RESPONDER_RSP_EVENTID,
  1606. WMI_NDP_END_RSP_EVENTID,
  1607. WMI_NDP_INDICATION_EVENTID,
  1608. WMI_NDP_CONFIRM_EVENTID,
  1609. WMI_NDP_END_INDICATION_EVENTID,
  1610. WMI_WLAN_COEX_BT_ACTIVITY_EVENTID,
  1611. WMI_NDL_SCHEDULE_UPDATE_EVENTID,
  1612. WMI_NDP_EVENTID,
  1613. /** WMI events related to motion detection */
  1614. WMI_MOTION_DET_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MOTION_DET),
  1615. WMI_MOTION_DET_BASE_LINE_HOST_EVENTID,
  1616. /** WMI events related to Estimation of Service Parameters (802.11mc) */
  1617. WMI_ESP_ESTIMATE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ESP),
  1618. } WMI_EVT_ID;
  1619. /* defines for OEM message sub-types */
  1620. #define WMI_OEM_CAPABILITY_REQ 0x01
  1621. #define WMI_OEM_CAPABILITY_RSP 0x02
  1622. #define WMI_OEM_MEASUREMENT_REQ 0x03
  1623. #define WMI_OEM_MEASUREMENT_RSP 0x04
  1624. #define WMI_OEM_ERROR_REPORT_RSP 0x05
  1625. #define WMI_OEM_NAN_MEAS_REQ 0x06
  1626. #define WMI_OEM_NAN_MEAS_RSP 0x07
  1627. #define WMI_OEM_NAN_PEER_INFO 0x08
  1628. #define WMI_OEM_CONFIGURE_LCR 0x09
  1629. #define WMI_OEM_CONFIGURE_LCI 0x0A
  1630. #define WMI_CHAN_LIST_TAG 0x1
  1631. #define WMI_SSID_LIST_TAG 0x2
  1632. #define WMI_BSSID_LIST_TAG 0x3
  1633. #define WMI_IE_TAG 0x4
  1634. #define WMI_SCAN_START_OFFSET_TAG 0x5
  1635. typedef struct {
  1636. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  1637. /** primary 20 MHz channel frequency in mhz */
  1638. A_UINT32 mhz;
  1639. /** Center frequency 1 in MHz*/
  1640. A_UINT32 band_center_freq1;
  1641. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  1642. A_UINT32 band_center_freq2;
  1643. /** channel info described below */
  1644. A_UINT32 info;
  1645. /** contains min power, max power, reg power and reg class id. */
  1646. A_UINT32 reg_info_1;
  1647. /** contains antennamax, max bandwidth */
  1648. A_UINT32 reg_info_2;
  1649. } wmi_channel;
  1650. typedef enum {
  1651. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  1652. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  1653. } wmi_channel_change_cause;
  1654. /** channel info consists of 6 bits of channel mode */
  1655. #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \
  1656. (pwmi_channel)->info &= 0xffffffc0; \
  1657. (pwmi_channel)->info |= (val); \
  1658. } while (0)
  1659. #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
  1660. #define WMI_CHAN_FLAG_HT40_PLUS 6
  1661. #define WMI_CHAN_FLAG_PASSIVE 7
  1662. #define WMI_CHAN_ADHOC_ALLOWED 8
  1663. #define WMI_CHAN_AP_DISABLED 9
  1664. #define WMI_CHAN_FLAG_DFS 10
  1665. #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
  1666. #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
  1667. #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
  1668. #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
  1669. #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
  1670. #define WMI_CHAN_FLAG_DFS_CFREQ2 16 /* Enable radar event reporting for sec80 in VHT80p80 */
  1671. #define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
  1672. #define WMI_CHAN_FLAG_PSC 18 /* Indicate it is a PSC (preferred scanning channel) */
  1673. #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
  1674. (pwmi_channel)->info |= (1 << flag); \
  1675. } while (0)
  1676. #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag) \
  1677. (((pwmi_channel)->info & (1 << flag)) >> flag)
  1678. #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
  1679. (pwmi_channel)->reg_info_1 &= 0xffffff00; \
  1680. (pwmi_channel)->reg_info_1 |= (val & 0xff); \
  1681. } while (0)
  1682. #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
  1683. #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \
  1684. (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
  1685. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 8); \
  1686. } while (0)
  1687. #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
  1688. #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \
  1689. (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
  1690. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 16); \
  1691. } while (0)
  1692. #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
  1693. #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \
  1694. (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
  1695. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 24); \
  1696. } while (0)
  1697. #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
  1698. #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \
  1699. (pwmi_channel)->reg_info_2 &= 0xffffff00; \
  1700. (pwmi_channel)->reg_info_2 |= (val & 0xff); \
  1701. } while (0)
  1702. #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
  1703. /* max tx power is in 1 dBm units */
  1704. #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
  1705. (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
  1706. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 8); \
  1707. } while (0)
  1708. #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
  1709. /* max bw supported for each channel, enum wmi_channel_width as value */
  1710. #define WMI_SET_CHANNEL_MAX_BANDWIDTH(pwmi_channel,val) do { \
  1711. (pwmi_channel)->reg_info_2 &= 0xff00ffff; \
  1712. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 16); \
  1713. } while (0)
  1714. #define WMI_GET_CHANNEL_MAX_BANDWIDTH(pwmi_channel) ((((pwmi_channel)->reg_info_2) >> 16) & 0xff)
  1715. /** HT Capabilities*/
  1716. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  1717. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  1718. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  1719. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  1720. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  1721. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  1722. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  1723. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  1724. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  1725. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  1726. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  1727. #define WMI_HT_CAP_HT40_SGI 0x0800
  1728. #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
  1729. #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
  1730. /* These macros should be used when we wish to advertise STBC support for
  1731. * only 1SS or 2SS or 3SS. */
  1732. #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  1733. #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  1734. #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  1735. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  1736. WMI_HT_CAP_HT20_SGI | \
  1737. WMI_HT_CAP_HT40_SGI | \
  1738. WMI_HT_CAP_TX_STBC | \
  1739. WMI_HT_CAP_RX_STBC | \
  1740. WMI_HT_CAP_LDPC | \
  1741. WMI_HT_CAP_TX_LDPC | \
  1742. WMI_HT_CAP_RX_LDPC)
  1743. /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  1744. field. The fields not defined here are not supported, or reserved.
  1745. Do not change these masks and if you have to add new one follow the
  1746. bitmask as specified by 802.11ac draft.
  1747. */
  1748. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  1749. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  1750. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  1751. #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
  1752. #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
  1753. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  1754. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  1755. #define WMI_VHT_CAP_SGI_160MHZ 0x00000040
  1756. #define WMI_VHT_CAP_TX_STBC 0x00000080
  1757. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  1758. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  1759. #define WMI_VHT_CAP_SU_BFORMER 0x00000800
  1760. #define WMI_VHT_CAP_SU_BFORMEE 0x00001000
  1761. #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  1762. #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  1763. #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  1764. #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  1765. #define WMI_VHT_CAP_MU_BFORMER 0x00080000
  1766. #define WMI_VHT_CAP_MU_BFORMEE 0x00100000
  1767. #define WMI_VHT_CAP_TXOP_PS 0x00200000
  1768. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  1769. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  1770. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  1771. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  1772. #define WMI_VHT_CAP_TX_LDPC 0x40000000
  1773. /* TEMPORARY:
  1774. * Preserve the incorrect old name as an alias for the correct new name
  1775. * until all references to the old name have been removed from all hosts
  1776. * and targets.
  1777. */
  1778. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
  1779. /* These macros should be used when we wish to advertise STBC support for
  1780. * only 1SS or 2SS or 3SS. */
  1781. #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
  1782. #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
  1783. #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
  1784. /* TEMPORARY:
  1785. * Preserve the incorrect old name as an alias for the correct new name
  1786. * until all references to the old name have been removed from all hosts
  1787. * and targets.
  1788. */
  1789. #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
  1790. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  1791. WMI_VHT_CAP_SGI_80MHZ | \
  1792. WMI_VHT_CAP_TX_STBC | \
  1793. WMI_VHT_CAP_RX_STBC_MASK | \
  1794. WMI_VHT_CAP_RX_LDPC | \
  1795. WMI_VHT_CAP_TX_LDPC | \
  1796. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  1797. WMI_VHT_CAP_RX_FIXED_ANT | \
  1798. WMI_VHT_CAP_TX_FIXED_ANT)
  1799. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  1800. 802.11ac
  1801. */
  1802. #define WMI_VHT_MAX_MCS_EXT_SS_GET(vht_mcs_map, index) WMI_GET_BITS(vht_mcs_map, 16 + index, 1)
  1803. #define WMI_VHT_MAX_MCS_EXT_SS_SET(vht_mcs_map, index, value) WMI_SET_BITS(vht_mcs_map, 16 + index, 1, value)
  1804. /* Notification bit for Ext MCS 10/11 support */
  1805. #define WMI_VHT_MCS_NOTIFY_EXT_SS_GET(vht_mcs_map) WMI_GET_BITS(vht_mcs_map, 24, 1)
  1806. #define WMI_VHT_MCS_NOTIFY_EXT_SS_SET(vht_mcs_map, value) WMI_SET_BITS(vht_mcs_map, 24, 1, value)
  1807. #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  1808. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  1809. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  1810. /** 11ax capabilities */
  1811. #define WMI_HE_CAP_PPE_PRESENT 0x00000001
  1812. #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
  1813. #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
  1814. #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
  1815. #define WMI_HE_FRAG_SUPPORT_SHIFT 3
  1816. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT 0x00000001
  1817. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT 0x00000002
  1818. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT 0x00000004
  1819. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT 0x00000018
  1820. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT 0x00000030
  1821. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  1822. WMI_GET_BITS(he_cap_info_dword1, 0, 1)
  1823. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  1824. WMI_SET_BITS(he_cap_info_dword1, 0, 1, value)
  1825. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  1826. WMI_GET_BITS(he_cap_info_dword1, 1, 1)
  1827. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  1828. WMI_SET_BITS(he_cap_info_dword1, 1, 1, value)
  1829. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_GET(he_cap_info_dword1) \
  1830. WMI_GET_BITS(he_cap_info_dword1, 2, 1)
  1831. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_SET(he_cap_info_dword1, value) \
  1832. WMI_SET_BITS(he_cap_info_dword1, 2, 1, value)
  1833. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_GET(he_cap_info_dword1) \
  1834. WMI_GET_BITS(he_cap_info_dword1, 3, 2)
  1835. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_SET(he_cap_info_dword1, value) \
  1836. WMI_SET_BITS(he_cap_info_dword1, 3, 2, value)
  1837. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_GET(he_cap_info_dword1) \
  1838. WMI_GET_BITS(he_cap_info_dword1, 5, 2)
  1839. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_SET(he_cap_info_dword1, value) \
  1840. WMI_SET_BITS(he_cap_info_dword1, 5, 2, value)
  1841. /* Interested readers refer to Rx/Tx MCS Map definition as defined in 802.11ax
  1842. */
  1843. #define WMI_HE_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  1844. /* fragmentation support field value */
  1845. enum {
  1846. WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
  1847. WMI_HE_FRAG_SUPPORT_LEVEL1, /* support for fragments within a VHT single MPDU, no support for fragments within AMPDU */
  1848. WMI_HE_FRAG_SUPPORT_LEVEL2, /* support for up to 1 fragment per MSDU within a single A-MPDU */
  1849. WMI_HE_FRAG_SUPPORT_LEVEL3, /* support for multiple fragments per MSDU within an A-MPDU */
  1850. };
  1851. enum {
  1852. WMI_HE_RX_DL_OFDMA_SUPPORT_DEFAULT, /* Default */
  1853. WMI_HE_RX_DL_OFDMA_SUPPORT_DISABLE, /* RX DL OFDMA Support Disabled */
  1854. WMI_HE_RX_DL_OFDMA_SUPPORT_ENABLE, /* RX DL OFDMA Support Enabled */
  1855. WMI_HE_RX_DL_OFDMA_SUPPORT_INVALID, /* INVALID */
  1856. };
  1857. enum {
  1858. WMI_HE_RX_DL_MUMIMO_SUPPORT_DEFAULT, /* Default */
  1859. WMI_HE_RX_DL_MUMIMO_SUPPORT_DISABLE, /* RX DL MU-MIMO Support Disabled */
  1860. WMI_HE_RX_DL_MUMIMO_SUPPORT_ENABLE, /* RX DL MU-MIMO Support Enabled */
  1861. WMI_HE_RX_DL_MUMIMO_SUPPORT_INVALID, /* INVALID */
  1862. };
  1863. /** NOTE: This defs cannot be changed in the future without breaking WMI compatibility */
  1864. #define WMI_MAX_NUM_SS MAX_HE_NSS
  1865. #define WMI_MAX_NUM_RU MAX_HE_RU
  1866. /*
  1867. * Figure 8 554ae: -PPE Threshold Info field format
  1868. * we pack PPET16 and PPT8 for four RU's in one element of array.
  1869. *
  1870. * ppet16_ppet8_ru3_ru0 array element 0 holds:
  1871. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1872. *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
  1873. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1874. *
  1875. * ppet16_ppet8_ru3_ru0 array element 1 holds:
  1876. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1877. *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
  1878. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1879. *
  1880. * etc.
  1881. */
  1882. /*
  1883. * Note that in these macros, "ru" is one-based, not zero-based, while
  1884. * nssm1 is zero-based.
  1885. */
  1886. #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1887. do { \
  1888. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6)); \
  1889. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet & 7) << (((ru-1) & 3) * 6)); \
  1890. } while (0)
  1891. #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1892. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6)) & 7)
  1893. #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1894. do { \
  1895. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6 + 3)); \
  1896. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1) & 3) * 6 + 3)); \
  1897. } while (0)
  1898. #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1899. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6 + 3)) & 7)
  1900. typedef struct _wmi_ppe_threshold {
  1901. A_UINT32 numss_m1; /** NSS - 1*/
  1902. union {
  1903. A_UINT32 ru_count; /** RU COUNT OBSOLETE to be removed after few versions */
  1904. A_UINT32 ru_mask; /** RU index mask */
  1905. };
  1906. A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; /** ppet8 and ppet16 for max num ss */
  1907. } wmi_ppe_threshold;
  1908. /* WMI_SYS_CAPS_* refer to the capabilities that system support
  1909. */
  1910. #define WMI_SYS_CAP_ENABLE 0x00000001
  1911. #define WMI_SYS_CAP_TXPOWER 0x00000002
  1912. /*
  1913. * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
  1914. * Bits 5:0 are reserved
  1915. */
  1916. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
  1917. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
  1918. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
  1919. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
  1920. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
  1921. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
  1922. #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
  1923. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
  1924. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1925. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1926. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1927. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1928. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1929. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1930. #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1931. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1932. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
  1933. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
  1934. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
  1935. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
  1936. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
  1937. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
  1938. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
  1939. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
  1940. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
  1941. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
  1942. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
  1943. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
  1944. #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
  1945. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
  1946. #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
  1947. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
  1948. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
  1949. ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1950. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
  1951. ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1952. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
  1953. ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1954. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
  1955. ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1956. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
  1957. ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1958. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
  1959. ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1960. #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
  1961. ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1962. #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
  1963. ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1964. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
  1965. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
  1966. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
  1967. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS (28)
  1968. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS (27)
  1969. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1970. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1971. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1972. #define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  1973. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  1974. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
  1975. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
  1976. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
  1977. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
  1978. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
  1979. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
  1980. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_SET(scan_cfg, value) \
  1981. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS, 1, value)
  1982. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_SET(scan_cfg, value) \
  1983. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS, 1, value)
  1984. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
  1985. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1986. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
  1987. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1988. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
  1989. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1990. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_GET(scan_cfg) \
  1991. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  1992. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_GET(scan_cfg) \
  1993. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  1994. #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
  1995. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
  1996. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS (29)
  1997. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS (28)
  1998. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS (27)
  1999. #define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  2000. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  2001. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  2002. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  2003. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  2004. #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
  2005. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
  2006. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
  2007. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
  2008. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_SET(fw_mode, value) \
  2009. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS, 1, value)
  2010. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_SET(fw_mode, value) \
  2011. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS, 1, value)
  2012. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_SET(fw_mode, value) \
  2013. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS, 1, value)
  2014. #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
  2015. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  2016. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
  2017. ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  2018. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_GET(fw_mode) \
  2019. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  2020. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_GET(fw_mode) \
  2021. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  2022. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_GET(fw_mode) \
  2023. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  2024. /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
  2025. typedef struct _wmi_abi_version {
  2026. A_UINT32 abi_version_0; /** WMI Major and Minor versions */
  2027. A_UINT32 abi_version_1; /** WMI change revision */
  2028. A_UINT32 abi_version_ns_0; /** ABI version namespace first four dwords */
  2029. A_UINT32 abi_version_ns_1; /** ABI version namespace second four dwords */
  2030. A_UINT32 abi_version_ns_2; /** ABI version namespace third four dwords */
  2031. A_UINT32 abi_version_ns_3; /** ABI version namespace fourth four dwords */
  2032. } wmi_abi_version;
  2033. /*
  2034. * maximum number of memroy requests allowed from FW.
  2035. */
  2036. #define WMI_MAX_MEM_REQS 16
  2037. /* !!NOTE!!:
  2038. * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
  2039. * Please don't change it.
  2040. */
  2041. #define HW_BD_INFO_SIZE 5
  2042. /**
  2043. * PDEV ID to identify the physical device,
  2044. * value 0 reserved for SOC level commands/event
  2045. */
  2046. #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
  2047. #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
  2048. #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
  2049. #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
  2050. /*
  2051. * Enum regarding which BDF elements are provided in which elements of the
  2052. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  2053. */
  2054. typedef enum {
  2055. BDF_VERSION = 0,
  2056. REF_DESIGN_ID = 1,
  2057. CUSTOMER_ID = 2,
  2058. PROJECT_ID = 3,
  2059. BOARD_DATA_REV = 4,
  2060. } wmi_hw_bd_info_e;
  2061. /*
  2062. * Macros to get/set BDF details within the
  2063. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  2064. */
  2065. #define WMI_GET_BDF_VERSION(hw_bd_info) ((hw_bd_info)[BDF_VERSION])
  2066. #define WMI_GET_REF_DESIGN(hw_bd_info) ((hw_bd_info)[REF_DESIGN_ID])
  2067. #define WMI_GET_CUSTOMER_ID(hw_bd_info) ((hw_bd_info)[CUSTOMER_ID])
  2068. #define WMI_GET_PROJECT_ID(hw_bd_info) ((hw_bd_info)[PROJECT_ID])
  2069. #define WMI_GET_BOARD_DATA_REV(hw_bd_info) ((hw_bd_info)[BOARD_DATA_REV])
  2070. #define WMI_SET_BDF_VERSION(hw_bd_info, val) ((hw_bd_info)[BDF_VERSION] = (val))
  2071. #define WMI_SET_REF_DESIGN(hw_bd_info, val) ((hw_bd_info)[REF_DESIGN_ID] = (val))
  2072. #define WMI_SET_CUSTOMER_ID(hw_bd_info, val) ((hw_bd_info)[CUSTOMER_ID] = (val))
  2073. #define WMI_SET_PROJECT_ID(hw_bd_info, val) ((hw_bd_info)[PROJECT_ID] = (val))
  2074. #define WMI_SET_BOARD_DATA_REV(hw_bd_info, val) ((hw_bd_info)[BOARD_DATA_REV] = (val))
  2075. /**
  2076. * The following struct holds optional payload for
  2077. * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
  2078. * device capability to the host.
  2079. */
  2080. typedef struct {
  2081. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
  2082. A_UINT32 fw_build_vers; /* firmware build number */
  2083. wmi_abi_version fw_abi_vers;
  2084. A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
  2085. A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
  2086. A_UINT32 num_rf_chains;
  2087. /* The following field is only valid for service type WMI_SERVICE_11AC */
  2088. A_UINT32 ht_cap_info; /* WMI HT Capability */
  2089. A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
  2090. A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  2091. A_UINT32 hw_min_tx_power;
  2092. A_UINT32 hw_max_tx_power;
  2093. /* sys_cap_info:
  2094. * bits 1:0 - RXTX LED + RFKILL enable flags (see WMI_LEDRFKILL_FLAGS)
  2095. * bits 31:2 - reserved (must be set to zero)
  2096. */
  2097. A_UINT32 sys_cap_info;
  2098. A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  2099. /** Max beacon and Probe Response IE offload size (includes
  2100. * optional P2P IEs) */
  2101. A_UINT32 max_bcn_ie_size;
  2102. /*
  2103. * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
  2104. * FW uses this as FW extesnsion memory for saving its data structures. Only valid
  2105. * for low latency interfaces like PCIE where FW can access this memory directly (or)
  2106. * by DMA.
  2107. */
  2108. A_UINT32 num_mem_reqs;
  2109. /* Max No. scan channels target can support
  2110. * If FW is too old and doesn't indicate this number, host side value will default to
  2111. * 0, and host will take the original compatible value (62) for future scan channel
  2112. * setup.
  2113. */
  2114. A_UINT32 max_num_scan_channels;
  2115. /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
  2116. * Default 0 means tha hw_bd_info[] is invalid(legacy board).
  2117. */
  2118. A_UINT32 hw_bd_id;
  2119. A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
  2120. /*
  2121. * Number of MACs supported, i.e. a DBS-capable device will return 2
  2122. */
  2123. A_UINT32 max_supported_macs;
  2124. /*
  2125. * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
  2126. */
  2127. A_UINT32 wmi_fw_sub_feat_caps; /* values from enum WMI_FW_SUB_FEAT_CAPS */
  2128. /*
  2129. * Number of Dual Band Simultaneous (DBS) hardware modes
  2130. */
  2131. A_UINT32 num_dbs_hw_modes;
  2132. /*
  2133. * txrx_chainmask
  2134. * [7:0] - 2G band tx chain mask
  2135. * [15:8] - 2G band rx chain mask
  2136. * [23:16] - 5G band tx chain mask
  2137. * [31:24] - 5G band rx chain mask
  2138. *
  2139. */
  2140. A_UINT32 txrx_chainmask;
  2141. /*
  2142. * default Dual Band Simultaneous (DBS) hardware mode
  2143. */
  2144. A_UINT32 default_dbs_hw_mode_index;
  2145. /*
  2146. * Number of msdu descriptors target would use
  2147. */
  2148. A_UINT32 num_msdu_desc;
  2149. /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
  2150. * HAL_REG_CAPABILITIES hal_reg_capabilities;
  2151. * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  2152. * wlan_host_mem_req mem_reqs[];
  2153. * wlan_dbs_hw_mode_list[];
  2154. */
  2155. } wmi_service_ready_event_fixed_param;
  2156. typedef enum {
  2157. WMI_RXTX_LED_ENABLE = 0x00000001,
  2158. WMI_RFKILL_ENABLE = 0x00000002,
  2159. } WMI_LEDRFKILL_FLAGS;
  2160. #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
  2161. typedef struct {
  2162. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param */
  2163. /*
  2164. * The wmi_service_segment offset field specifies the position within the
  2165. * logical bitmap of WMI service flags at which the WMI service flags
  2166. * specified within this message begin.
  2167. * Since the first 128 WMI service flags are specified within the
  2168. * wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT message,
  2169. * the wmi_service_segment_offset value is expected to be 128 or more.
  2170. */
  2171. A_UINT32 wmi_service_segment_offset;
  2172. A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
  2173. } wmi_service_available_event_fixed_param;
  2174. typedef struct {
  2175. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT */
  2176. /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
  2177. A_UINT32 default_conc_scan_config_bits;
  2178. /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
  2179. A_UINT32 default_fw_config_bits;
  2180. wmi_ppe_threshold ppet;
  2181. A_UINT32 he_cap_info; /* see section 8.4.2.213 from draft r8 of 802.11ax; see WMI_HE_FRAG_SUPPORT enum */
  2182. /*
  2183. * An HT STA shall not allow transmission of more than one MPDU start
  2184. * within the time limit described in the MPDU maximum density field.
  2185. */
  2186. A_UINT32 mpdu_density; /* units are microseconds */
  2187. /*
  2188. * Maximum no of BSSID based RX filters host can program
  2189. * Value 0 means FW hasn't given any limit to host.
  2190. */
  2191. A_UINT32 max_bssid_rx_filters;
  2192. /*
  2193. * Extended FW build version information:
  2194. * bits 27:0 -> reserved
  2195. * bits 31:28 -> CRM sub ID
  2196. */
  2197. A_UINT32 fw_build_vers_ext;
  2198. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  2199. * This limit is the maximum number of SSIDs that can be configured in the
  2200. * target for Network List Offload (i.e. scanning for a preferred network).
  2201. * If this value is 0x0, the target supports WMI_NLO_MAX_SSIDS (16).
  2202. * If this value is non-zero, the host should send back in the
  2203. * WMI_INIT message's wmi_resource_config.max_nlo_ssids a value that
  2204. * is equal to or less than the target capability limit reported here.
  2205. */
  2206. A_UINT32 max_nlo_ssids;
  2207. /* ref to section 8.4.2.48 Multiple BSSID element
  2208. * The Max BSSID Indicator field contains a value assigned to n,
  2209. * where 2^n is the maximum number of BSSIDs
  2210. */
  2211. A_UINT32 max_bssid_indicator;
  2212. /* 2nd DWORD of HE MAC Capabilities */
  2213. A_UINT32 he_cap_info_ext;
  2214. /*
  2215. * A variable-length TLV array of wmi_chan_rf_characterization_info will
  2216. * follow this fixed_param TLV, containing rx characterization info for
  2217. * primary channels.
  2218. * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
  2219. */
  2220. } wmi_service_ready_ext_event_fixed_param;
  2221. /*
  2222. * regdb version GET/SET APIs
  2223. */
  2224. #define WMI_REG_DB_VERSION_MAJOR_BITPOS 0
  2225. #define WMI_REG_DB_VERSION_MINOR_BITPOS 8
  2226. #define WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS 16
  2227. #define WMI_BDF_REG_DB_VERSION_MINOR_BITPOS 24
  2228. #define WMI_REG_DB_VERSION_NUM_BITS 8
  2229. #define WMI_REG_DB_VERSION_MAJOR_GET(dword) \
  2230. WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2231. #define WMI_REG_DB_VERSION_MAJOR_SET(dword, value) \
  2232. WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2233. #define WMI_REG_DB_VERSION_MINOR_GET(dword) \
  2234. WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2235. #define WMI_REG_DB_VERSION_MINOR_SET(dword, value) \
  2236. WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2237. #define WMI_BDF_REG_DB_VERSION_MAJOR_GET(dword) \
  2238. WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2239. #define WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, value) \
  2240. WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2241. #define WMI_BDF_REG_DB_VERSION_MINOR_GET(dword) \
  2242. WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2243. #define WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, value) \
  2244. WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2245. #define WMI_REG_DB_VERSION_SET(dword, reg_db_ver_major, reg_db_ver_minor, bdf_reg_db_ver_major, bdf_reg_db_ver_minor) \
  2246. do { \
  2247. WMI_REG_DB_VERSION_MAJOR_SET(dword, reg_db_ver_major); \
  2248. WMI_REG_DB_VERSION_MINOR_SET(dword, reg_db_ver_minor); \
  2249. WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, bdf_reg_db_ver_major); \
  2250. WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, bdf_reg_db_ver_minor); \
  2251. } while (0)
  2252. typedef struct {
  2253. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_ready_ext2_event_fixed_param.*/
  2254. /*
  2255. * regDB Version to be sent to Host on WMI service ready ext2 event.
  2256. * [7:0] - regDbVersionMajor
  2257. * [15:8] - regDbVersionMinor
  2258. * [23:16] - bdfRegDbVersionMajor
  2259. * [31:24] - bdfRegDbVersionMinor
  2260. * The WMI_*REG_DB_VERSION_[MAJOR,MINOR]_[SET,GET] macros are used to
  2261. * access these bitfields.
  2262. */
  2263. A_UINT32 reg_db_version;
  2264. } wmi_service_ready_ext2_event_fixed_param;
  2265. typedef struct {
  2266. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_rf_characterization_info_event_fixed_param */
  2267. /*
  2268. * A variable-length TLV array of wmi_chan_rf_characterization_info will
  2269. * follow this fixed_param TLV, containing rx characterization info for
  2270. * primary channels.
  2271. * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
  2272. */
  2273. } wmi_chan_rf_characterization_info_event_fixed_param;
  2274. typedef enum {
  2275. WMI_FW_STA_RTT_INITR = 0x00000001,
  2276. WMI_FW_STA_RTT_RESPR = 0x00000002,
  2277. WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
  2278. WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
  2279. WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
  2280. WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
  2281. WMI_FW_AP_RTT_INITR = 0x00000040,
  2282. WMI_FW_AP_RTT_RESPR = 0x00000080,
  2283. WMI_FW_NAN_RTT_INITR = 0x00000100,
  2284. WMI_FW_NAN_RTT_RESPR = 0x00000200,
  2285. WMI_FW_SCAN_DBS_POLICY = 0x00000400,
  2286. /*
  2287. * New fw sub feature capabilites before
  2288. * WMI_FW_MAX_SUB_FEAT_CAP
  2289. */
  2290. WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
  2291. } WMI_FW_SUB_FEAT_CAPS;
  2292. typedef enum {
  2293. WMI_HWBD_NONE = 0, /* No hw board information is given */
  2294. WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
  2295. WMI_HWBD_QCA2582 = 2, /* Killer 1525*/
  2296. } WMI_HWBD_ID;
  2297. #define ATH_BD_DATA_REV_MASK 0x000000FF
  2298. #define ATH_BD_DATA_REV_SHIFT 0
  2299. #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
  2300. #define ATH_BD_DATA_PROJ_ID_SHIFT 8
  2301. #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
  2302. #define ATH_BD_DATA_CUST_ID_SHIFT 16
  2303. #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
  2304. #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
  2305. #define SET_BD_DATA_REV(bd_data_ver, value) \
  2306. ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
  2307. #define GET_BD_DATA_REV(bd_data_ver) \
  2308. (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
  2309. #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
  2310. ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
  2311. #define GET_BD_DATA_PROJ_ID(bd_data_ver) \
  2312. (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
  2313. #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
  2314. ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
  2315. #define GET_BD_DATA_CUST_ID(bd_data_ver) \
  2316. (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
  2317. #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
  2318. ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
  2319. #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
  2320. (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
  2321. #ifdef ROME_LTE_COEX_FREQ_AVOID
  2322. typedef struct {
  2323. A_UINT32 start_freq; /* start frequency, not channel center freq */
  2324. A_UINT32 end_freq; /* end frequency */
  2325. } avoid_freq_range_desc;
  2326. typedef struct {
  2327. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  2328. A_UINT32 num_freq_ranges;
  2329. /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
  2330. avoid_freq_range_desc avd_freq_range[0];
  2331. } wmi_wlan_avoid_freq_ranges_event;
  2332. #endif
  2333. /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
  2334. #define WLAN_INIT_STATUS_SUCCESS 0x0
  2335. #define WLAN_INIT_STATUS_GEN_FAILED 0x1
  2336. #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  2337. #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  2338. typedef A_UINT32 WLAN_INIT_STATUS;
  2339. typedef struct {
  2340. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
  2341. wmi_abi_version fw_abi_vers;
  2342. /*
  2343. * mac_addr is always filled; in addition, there can be a mac_addr_list
  2344. * TLV following this fixed_param TLV to specify additional MAC addresses,
  2345. * for cases where the target specifies one MAC address per pdev
  2346. * (so the host can treat the pdevs within the target as separately
  2347. * as possible) rather than one MAC address for the whole SOC.
  2348. */
  2349. wmi_mac_addr mac_addr;
  2350. A_UINT32 status;
  2351. A_UINT32 num_dscp_table;
  2352. /* num_extra_mac_addr -
  2353. * how many additional MAC addresses besides the above mac_addr
  2354. * are provided in the subsequent mac_addr_list TLV
  2355. */
  2356. A_UINT32 num_extra_mac_addr;
  2357. /*
  2358. * Total number of "real" peers (remote peers of an AP vdev,
  2359. * BSS peer of a STA vdev, TDLS peer of a STA vdev) that FW supports.
  2360. * If 0, then Host can use param_tlv->resource_config->num_peers as
  2361. * total number of peers.
  2362. */
  2363. A_UINT32 num_total_peers;
  2364. /*
  2365. * Number of extra peers that Firmware adds.
  2366. * These are self peers and/or other FW only peers that don't represent
  2367. * a 802.11 transceiver, but instead are used for convenience, e.g. to
  2368. * provide a pseudo-peer object for an AP vdev's bcast/mcast tx queues,
  2369. * to allow each tx queue to belong to a peer object.
  2370. * Peer ID can be up to num_total_peers + num_extra_peers.
  2371. */
  2372. A_UINT32 num_extra_peers;
  2373. /*
  2374. * max_ast_index - max AST index that Firmware can generate
  2375. * max_ast_index = (ast_table_size-1), ast_table_size is dynamically chosen
  2376. * based on num_peers configutation from Host. Hence Host needs to know the
  2377. * max_ast_index that Firmware can generate.
  2378. * A 0x0 value for max_ast_index means the target has not specified a limit.
  2379. */
  2380. A_UINT32 max_ast_index;
  2381. /* pktlog_defs_checksum:
  2382. * checksum computed from the definitions of the enums and structs
  2383. * used within pktlog traces.
  2384. * This pktlog defs checksum needs to be embedded into pktlog trace files
  2385. * (specifically in ath_pktlog_bufhdr.version).
  2386. *
  2387. * If pktlog_defs_checksum is zero then it is invalid; it should be ignored
  2388. * and ath_pktlog_bufhdr.magic_num needs to be PKTLOG_MAGIC_NUM_LEGACY
  2389. * (i.e. 7735225).
  2390. *
  2391. * If pktlog_defs_checksum is non-zero then it is valid, and the host
  2392. * should put it into the pktlog trace file header and set
  2393. * ath_pktlog_bufhdr.magic_num as PKTLOG_MAGIC_NUM_VERSION_IS_CHECKSUM
  2394. * (i.e. 2453506), to indicate that the file header version field contains
  2395. * a checksum.
  2396. */
  2397. A_UINT32 pktlog_defs_checksum;
  2398. /*
  2399. * This fixed_param TLV is followed by these additional TLVs:
  2400. * mac_addr_list[num_extra_mac_addr];
  2401. */
  2402. } wmi_ready_event_fixed_param;
  2403. typedef struct {
  2404. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
  2405. /**
  2406. * @brief num_vdev - number of virtual devices (VAPs) to support
  2407. */
  2408. A_UINT32 num_vdevs;
  2409. /**
  2410. * @brief num_peers - number of peer nodes to support
  2411. */
  2412. A_UINT32 num_peers;
  2413. /*
  2414. * @brief In offload mode target supports features like WOW, chatter and other
  2415. * protocol offloads. In order to support them some functionalities like
  2416. * reorder buffering, PN checking need to be done in target. This determines
  2417. * maximum number of peers suported by target in offload mode
  2418. */
  2419. A_UINT32 num_offload_peers;
  2420. /* @brief Number of reorder buffers available for doing target based reorder
  2421. * Rx reorder buffering
  2422. */
  2423. A_UINT32 num_offload_reorder_buffs;
  2424. /**
  2425. * @brief num_peer_keys - number of keys per peer
  2426. */
  2427. A_UINT32 num_peer_keys;
  2428. /**
  2429. * @brief num_peer_tids - number of TIDs to provide storage for per peer.
  2430. */
  2431. A_UINT32 num_tids;
  2432. /**
  2433. * @brief ast_skid_limit - max skid for resolving hash collisions
  2434. * @details
  2435. * The address search table is sparse, so that if two MAC addresses
  2436. * result in the same hash value, the second of these conflicting
  2437. * entries can slide to the next index in the address search table,
  2438. * and use it, if it is unoccupied. This ast_skid_limit parameter
  2439. * specifies the upper bound on how many subsequent indices to search
  2440. * over to find an unoccupied space.
  2441. */
  2442. A_UINT32 ast_skid_limit;
  2443. /**
  2444. * @brief tx_chain_mask - the nominal chain mask for transmit
  2445. * @details
  2446. * The chain mask may be modified dynamically, e.g. to operate AP tx with
  2447. * a reduced number of chains if no clients are associated.
  2448. * This configuration parameter specifies the nominal chain-mask that
  2449. * should be used when not operating with a reduced set of tx chains.
  2450. */
  2451. A_UINT32 tx_chain_mask;
  2452. /**
  2453. * @brief rx_chain_mask - the nominal chain mask for receive
  2454. * @details
  2455. * The chain mask may be modified dynamically, e.g. for a client to use
  2456. * a reduced number of chains for receive if the traffic to the client
  2457. * is low enough that it doesn't require downlink MIMO or antenna
  2458. * diversity.
  2459. * This configuration parameter specifies the nominal chain-mask that
  2460. * should be used when not operating with a reduced set of rx chains.
  2461. */
  2462. A_UINT32 rx_chain_mask;
  2463. /**
  2464. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  2465. * @details
  2466. * Each WMM access class (voice, video, best-effort, background) will
  2467. * have its own timeout value to dictate how long to wait for missing
  2468. * rx MPDUs to arrive before flushing subsequent MPDUs that have already
  2469. * been received.
  2470. * This parameter specifies the timeout in milliseconds for each class .
  2471. * NOTE: the number of class (defined as 4) cannot be
  2472. * changed in the future without breaking WMI compatibility.
  2473. */
  2474. A_UINT32 rx_timeout_pri[4];
  2475. /**
  2476. * @brief rx_decap mode - what mode the rx should decap packets to
  2477. * @details
  2478. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  2479. * THis setting also determines the default TX behavior, however TX
  2480. * behavior can be modified on a per VAP basis during VAP init
  2481. */
  2482. A_UINT32 rx_decap_mode;
  2483. /**
  2484. * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
  2485. */
  2486. A_UINT32 scan_max_pending_req;
  2487. /**
  2488. * @brief maximum VDEV that could use BMISS offload
  2489. */
  2490. A_UINT32 bmiss_offload_max_vdev;
  2491. /**
  2492. * @brief maximum VDEV that could use offload roaming
  2493. */
  2494. A_UINT32 roam_offload_max_vdev;
  2495. /**
  2496. * @brief maximum AP profiles that would push to offload roaming
  2497. */
  2498. A_UINT32 roam_offload_max_ap_profiles;
  2499. /**
  2500. * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
  2501. * @details
  2502. * The target's WAL maintains a table to hold information regarding which
  2503. * peers belong to a given multicast group, so that if multicast->unicast
  2504. * conversion is enabled, the target can convert multicast tx frames to a
  2505. * series of unicast tx frames, to each peer within the multicast group.
  2506. * This num_mcast_groups configuration parameter tells the target how
  2507. * many multicast groups to provide storage for within its multicast
  2508. * group membership table.
  2509. */
  2510. A_UINT32 num_mcast_groups;
  2511. /**
  2512. * @brief num_mcast_table_elems - size to alloc for the mcast membership table
  2513. * @details
  2514. * This num_mcast_table_elems configuration parameter tells the target
  2515. * how many peer elements it needs to provide storage for in its
  2516. * multicast group membership table.
  2517. * These multicast group membership table elements are shared by the
  2518. * multicast groups stored within the table.
  2519. */
  2520. A_UINT32 num_mcast_table_elems;
  2521. /**
  2522. * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
  2523. * @details
  2524. * This configuration parameter specifies whether the target should
  2525. * perform multicast --> unicast conversion on transmit, and if so,
  2526. * what to do if it finds no entries in its multicast group membership
  2527. * table for the multicast IP address in the tx frame.
  2528. * Configuration value:
  2529. * 0 -> Do not perform multicast to unicast conversion.
  2530. * 1 -> Convert multicast frames to unicast, if the IP multicast address
  2531. * from the tx frame is found in the multicast group membership
  2532. * table. If the IP multicast address is not found, drop the frame.
  2533. * 2 -> Convert multicast frames to unicast, if the IP multicast address
  2534. * from the tx frame is found in the multicast group membership
  2535. * table. If the IP multicast address is not found, transmit the
  2536. * frame as multicast.
  2537. */
  2538. A_UINT32 mcast2ucast_mode;
  2539. /**
  2540. * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
  2541. * @details
  2542. * This parameter controls how much memory the target will allocate to
  2543. * store a log of tx PPDU meta-information (how large the PPDU was,
  2544. * when it was sent, whether it was successful, etc.)
  2545. */
  2546. A_UINT32 tx_dbg_log_size;
  2547. /**
  2548. * @brief num_wds_entries - how many AST entries to be allocated for WDS
  2549. */
  2550. A_UINT32 num_wds_entries;
  2551. /**
  2552. * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
  2553. * this limit can be 0 -default, 1 256B
  2554. */
  2555. A_UINT32 dma_burst_size;
  2556. /**
  2557. * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
  2558. * to account for interface latency to avoid underrun.
  2559. */
  2560. A_UINT32 mac_aggr_delim;
  2561. /**
  2562. * @brief rx_skip_defrag_timeout_dup_detection_check
  2563. * @details
  2564. * determine whether target is responsible for detecting duplicate
  2565. * non-aggregate MPDU and timing out stale fragments.
  2566. *
  2567. * A-MPDU reordering is always performed on the target.
  2568. *
  2569. * 0: target responsible for frag timeout and dup checking
  2570. * 1: host responsible for frag timeout and dup checking
  2571. */
  2572. A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
  2573. /**
  2574. * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
  2575. * and Max no of descriptors for each Video link (node).
  2576. */
  2577. A_UINT32 vow_config;
  2578. /**
  2579. * @brief maximum VDEV that could use GTK offload
  2580. */
  2581. A_UINT32 gtk_offload_max_vdev;
  2582. /**
  2583. * @brief num_msdu_desc - Number of msdu descriptors target should use
  2584. */
  2585. A_UINT32 num_msdu_desc; /* Number of msdu desc */
  2586. /**
  2587. * @brief max_frag_entry - Max. number of Tx fragments per MSDU
  2588. * @details
  2589. * This parameter controls the max number of Tx fragments per MSDU.
  2590. * This is sent by the target as part of the WMI_SERVICE_READY event
  2591. * and is overriden by the OS shim as required.
  2592. */
  2593. A_UINT32 max_frag_entries;
  2594. /**
  2595. * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
  2596. * @brief num_msdu_desc - Number of vdev that can support beacon offload
  2597. */
  2598. A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
  2599. /**
  2600. * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
  2601. * @details
  2602. * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
  2603. * peers in a connection tracking table for possible TDLS link creation
  2604. * or deletion. This controls the number of tracked peers per vdev.
  2605. */
  2606. A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
  2607. A_UINT32 beacon_tx_offload_max_vdev;
  2608. A_UINT32 num_multicast_filter_entries;
  2609. A_UINT32 num_wow_filters; /*host can configure the number of wow filters*/
  2610. /**
  2611. * @brief num_keep_alive_pattern - Num of keep alive patterns configured
  2612. * from host.
  2613. */
  2614. A_UINT32 num_keep_alive_pattern;
  2615. /**
  2616. * @brief keep_alive_pattern_size - keep alive pattern size.
  2617. */
  2618. A_UINT32 keep_alive_pattern_size;
  2619. /**
  2620. * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
  2621. * @details
  2622. * Each TDLS STA can become a sleep STA independently. This parameter
  2623. * mentions how many such sleep STAs can be supported concurrently.
  2624. */
  2625. A_UINT32 max_tdls_concurrent_sleep_sta;
  2626. /**
  2627. * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
  2628. * @details
  2629. * Each TDLS STA can become a buffer STA independently. This parameter
  2630. * mentions how many such buffer STAs can be supported concurrently.
  2631. */
  2632. A_UINT32 max_tdls_concurrent_buffer_sta;
  2633. /**
  2634. * @brief wmi_send_separate - host configures fw to send the wmi separately
  2635. */
  2636. A_UINT32 wmi_send_separate;
  2637. /**
  2638. * @brief num_ocb_vdevs - Number of vdevs used for OCB support
  2639. */
  2640. A_UINT32 num_ocb_vdevs;
  2641. /**
  2642. * @brief num_ocb_channels - The supported number of simultaneous OCB channels
  2643. */
  2644. A_UINT32 num_ocb_channels;
  2645. /**
  2646. * @brief num_ocb_schedules - The supported number of OCB schedule segments
  2647. */
  2648. A_UINT32 num_ocb_schedules;
  2649. /**
  2650. * @brief specific configuration from host, such as per platform configuration
  2651. */
  2652. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
  2653. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
  2654. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
  2655. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
  2656. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
  2657. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
  2658. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
  2659. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
  2660. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
  2661. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
  2662. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
  2663. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
  2664. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
  2665. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
  2666. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
  2667. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
  2668. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
  2669. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
  2670. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
  2671. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
  2672. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_S 10
  2673. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_M 0x400
  2674. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_S 11
  2675. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_M 0x800
  2676. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_S 12
  2677. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_M 0x1000
  2678. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_S 13
  2679. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_M 0x2000
  2680. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_S 14
  2681. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_M 0x4000
  2682. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_S 15
  2683. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_M 0x8000
  2684. /*
  2685. * If the AC override valid bit is set then this field will specify the
  2686. * access category to use for EAPOL frames
  2687. * 0 - WMM_AC_BE
  2688. * 1 - WMM_AC_BK
  2689. * 2 - WMM_AC_VI
  2690. * 3 - WMM_AC_VO
  2691. */
  2692. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_S 16
  2693. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_M 0x30000
  2694. /*
  2695. * If TX_ACK_RSSI is set, then the target should populate the ack_rssi
  2696. * field within the WMI_MGMT_TX_COMPLETION_EVENT message, the ack_rssi
  2697. * TLV within the WMI_MGMT_TX_BUNDLE_COMPLETION_EVENT message, and the
  2698. * "MSDU ACK RSSI" array within the HTT_T2H TX_COMPL_IND message.
  2699. */
  2700. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_S 18
  2701. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_M 0x40000
  2702. /*
  2703. * If HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN is set, the host will not
  2704. * include the HTC header length in the payload length for all HTT_H2T
  2705. * messages.
  2706. * Otherwise, only when sending HTT_H2T_MSG_TYPE_TX_FRM message,
  2707. * payload length includes HTC header length. Other HTT_H2T messages'
  2708. * payload length does not include HTC header length.
  2709. * The host will only set this HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN flag
  2710. * if the target has set the WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN
  2711. * flag to indicate its support for this option.
  2712. */
  2713. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_S 19
  2714. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_M 0x80000
  2715. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_S 20
  2716. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_M 0x100000
  2717. /*
  2718. * If this HTT_PEER_STATS is set, then the target should use the
  2719. * the HTT_T2H_MSG_TYPE_PEER_STATS_IND message to upload peer stats;
  2720. * else the target should avoid sending the PEER_STATS_IND message.
  2721. */
  2722. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_S 21
  2723. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_M 0x200000
  2724. /*
  2725. * If this BIT is set, then the target should use peer_tid_ext to analyze
  2726. * per peer per tid extended configurations
  2727. */
  2728. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_S 22
  2729. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_M 0x400000
  2730. /*
  2731. * If the VIDEO_OVER_WIFI_ENABLE flag is set, the target will use a
  2732. * series of algorithmic adjustments to optimize Video performance
  2733. * by reducing latency, reducing latency jitter, and minimizing
  2734. * dropped packets.
  2735. */
  2736. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_S 23
  2737. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_M 0x800000
  2738. /*
  2739. * If the THREE_WAY_COEX_CONFIG_LEGACY flag is set, the target will use
  2740. * the configuration parameters given by Host driver to WLAN FW and
  2741. * apply them along with the existing CoEx Weights Override logic to
  2742. * prioritize the WLAN-BT-Zigbee packets accordingly.
  2743. *
  2744. * The host shall only set the THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT
  2745. * RSRC_CFG flag if the target has set the WMI_SERVICE
  2746. * THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT flag.
  2747. *
  2748. * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
  2749. */
  2750. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_S 24
  2751. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_M 0x1000000
  2752. /*
  2753. * If the THREE_WAY_COEX_CONFIG_OVERRIDE flag is set, the target will use
  2754. * the configuration parameters given by Host driver to WLAN FW and
  2755. * apply them by OVERRIDing the existing CoEx Weights Override logic to
  2756. * prioritize the WLAN-BT-Zigbee packets accordingly.
  2757. *
  2758. * The host shall only set the THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT
  2759. * RSRC_CFG flag if the target has set the WMI_SERVICE
  2760. * THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT flag.
  2761. *
  2762. * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
  2763. */
  2764. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_S 25
  2765. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_M 0x2000000
  2766. /*
  2767. * If the TX_COMPLETION_TX_TSF64 flag is set, the target should
  2768. * populate the htt_tx_compl_ind_append_tx_tsf64 array within the
  2769. * HTT_T2H TX_COMPL_IND message.
  2770. */
  2771. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_S 26
  2772. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_M 0x4000000
  2773. /*
  2774. * If this BIT is set, then the target should support Packet capture(SMART MU FR)
  2775. */
  2776. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_S 27
  2777. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_M 0x8000000
  2778. A_UINT32 flag1;
  2779. /** @brief smart_ant_cap - Smart Antenna capabilities information
  2780. * @details
  2781. * 1 - Smart antenna is enabled.
  2782. * 0 - Smart antenna is disabled.
  2783. * In future this can contain smart antenna specifc capabilities.
  2784. */
  2785. A_UINT32 smart_ant_cap;
  2786. /**
  2787. * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
  2788. * during init
  2789. */
  2790. A_UINT32 BK_Minfree;
  2791. A_UINT32 BE_Minfree;
  2792. A_UINT32 VI_Minfree;
  2793. A_UINT32 VO_Minfree;
  2794. /**
  2795. * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
  2796. * descriptor memory allocation.
  2797. * 1 - Allocate fragment descriptor memory for data packet in firmware.
  2798. * If host wants to transmit data packet at its desired rate,
  2799. * this field must be set.
  2800. * 0 - Don't allocate fragment descriptor for data packet.
  2801. */
  2802. A_UINT32 alloc_frag_desc_for_data_pkt;
  2803. /** how much space to allocate for NDP NS (neighbor solicitation) specs */
  2804. A_UINT32 num_ns_ext_tuples_cfg;
  2805. /**
  2806. * size (in bytes) of the buffer the FW shall allocate per vdev
  2807. * firmware can dynamic allocate memory (or disable)
  2808. * packet filtering feature.
  2809. * 0 - fw chooses its default value
  2810. * -1 (0XFFFFFFFF) - disable APF
  2811. */
  2812. A_UINT32 bpf_instruction_size;
  2813. /**
  2814. * Maximum no of BSSID based RX filters host would program
  2815. * Value 0 means host doesn't given any limit to FW.
  2816. */
  2817. A_UINT32 max_bssid_rx_filters;
  2818. /**
  2819. * Use PDEV ID instead of MAC ID, added for backward compatibility with older host
  2820. * which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
  2821. */
  2822. A_UINT32 use_pdev_id;
  2823. /** Maximum number of scan clients whose DBS scan duty cycle can be configured */
  2824. A_UINT32 max_num_dbs_scan_duty_cycle;
  2825. /** Maximum number of Multi group key to support */
  2826. A_UINT32 max_num_group_keys;
  2827. /**
  2828. * HTT peer map/unmap V2 format support
  2829. * 0 -> host doesn't support HTT peer map/unmap v2 format.
  2830. * 1 -> host supports HTT peer map/unmap v2 format; the target is
  2831. * allowed but not required to use peer map/unmap v2 format.
  2832. */
  2833. A_UINT32 peer_map_unmap_v2_support;
  2834. /** Sched config params for all pdevs
  2835. * These tx scheduling configuration parameters are currently only
  2836. * used for internal testing purposes; therefore the non-default
  2837. * values for this field are not currently documented.
  2838. * For regular use, this field should be set to 0x0.
  2839. */
  2840. A_UINT32 sched_params;
  2841. /* Number of MAC on which AP TWT feature is supported */
  2842. A_UINT32 twt_ap_pdev_count;
  2843. /* Max no of STA with which TWT sessions can be formed by the AP */
  2844. A_UINT32 twt_ap_sta_count;
  2845. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  2846. * This parameter provides the final specification for the maximum number
  2847. * of SSIDs for the target to support for Network List Offload's scanning
  2848. * for preferred networks.
  2849. * This wmi_resource_config.max_nlo_ssids must be <= the max_nlo_ssids
  2850. * field from the target's WMI_SERVICE_READY_EXT_EVENT message.
  2851. * (If the target didn't provide a max_nlo_ssids field in the
  2852. * WMI_SERVICE_READY_EXT message, or if the SERVICE_READY_EXT msg's
  2853. * max_nlo_ssids value was 0x0, the target doesn't support dynamic
  2854. * negotiation of max NLO SSIDs, and WMI_NLO_MAX_SSIDS (=16) applies.)
  2855. * If this wmi_resource_config.max_nlo_ssids field is absent or 0x0,
  2856. * the host does not support dynamic negotiation of max NLO SSIDs.
  2857. * In such a case, the target will respond as follows:
  2858. * If the target supports at least WMI_NLO_MAX_SSIDS, the target will
  2859. * use the statically-configured WMI_NLO_MAX_SSIDS value.
  2860. * If the target supports less than WMI_NLO_MAX_SSIDS, the target will
  2861. * abort its boot-up, due to receiving an invalid/unsupported
  2862. * configuration specification.
  2863. */
  2864. A_UINT32 max_nlo_ssids;
  2865. /**
  2866. * num_packet_filters: the num that host requests fw to support for
  2867. * pktfilter in total, then firmware can dynamic allocate
  2868. * memory(or disable) pktfilter feature.
  2869. *
  2870. * 0 - fw chooses its default value.
  2871. * -1(0XFFFFFFFF)- disable pktfilter.
  2872. */
  2873. A_UINT32 num_packet_filters;
  2874. /**
  2875. * num_max_sta_vdevs: the max num for the sta vdevs
  2876. * fw will use it to config the memory of offload features that
  2877. * are only for sta vdevs.
  2878. * p2p client should be included.
  2879. *
  2880. * 0 - fw chooses its default value: 'num_vdevs' of this structure.
  2881. */
  2882. A_UINT32 num_max_sta_vdevs;
  2883. /* ref to section 8.4.2.48 Multiple BSSID element
  2884. * The Max BSSID Indicator field contains a value assigned to n,
  2885. * where 2^n is the maximum number of BSSIDs
  2886. */
  2887. A_UINT32 max_bssid_indicator;
  2888. /** @brief ul_resp_config - Configures the 11ax uplink ofdma feature on STA.
  2889. * I.e. sending uplink response to a trigger frame sent by AP.
  2890. * @details
  2891. * 0 - fw default behavior, based on chipset
  2892. * 1 - UL_RESP is disabled.
  2893. * 2 - UL_RESP is enabled.
  2894. * other - reserved.
  2895. */
  2896. A_UINT32 ul_resp_config;
  2897. /* msdu_flow_override_config0 - contains AST enable bitmask
  2898. * AST0 is unconditionally enabled, unless the MSDU flow override feature
  2899. * is entirely disabled.
  2900. * AST1 through AST3 are conditionally enabled, based on bits 0-2 in
  2901. * msdu_flow_override_config0.
  2902. * If all three bits are 0, no msdu flow override feature at all in FW.
  2903. *
  2904. * The WMI_MSDU_FLOW_AST_ENABLE_GET and WMI_MSDU_FLOW_AST_ENABLE_SET
  2905. * macros are used to read and write these bitfields.
  2906. */
  2907. A_UINT32 msdu_flow_override_config0;
  2908. /* msdu_flow_override_config1:
  2909. * Bits 3:0 - AST0_FLOW_MASK(4)
  2910. * Bits 7:4 - AST1_FLOW_MASK(4)
  2911. * Bits 11:8 - AST2_FLOW_MASK(4)
  2912. * Bits 15:12 - AST3_FLOW_MASK(4)
  2913. * Bits 23:16 - TID_VALID_HI_PRI (8)
  2914. * Bits 31:24 - TID_VALID_LOW_PRI (8)
  2915. *
  2916. * The macros
  2917. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET
  2918. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET
  2919. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET
  2920. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET
  2921. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET
  2922. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET
  2923. * are used to read and write these bitfields.
  2924. */
  2925. A_UINT32 msdu_flow_override_config1;
  2926. } wmi_resource_config;
  2927. #define WMI_MSDU_FLOW_AST_ENABLE_GET(msdu_flow_config0, ast_x) \
  2928. (((ast_x) == 0) ? 1 : ((msdu_flow_config0) & (1 << ((ast_x) - 1))))
  2929. #define WMI_MSDU_FLOW_AST_ENABLE_SET(msdu_flow_config0, ast_x, enable) \
  2930. do { \
  2931. if ((ast_x) == 0) break; \
  2932. if ((enable)) { \
  2933. (msdu_flow_config0) |= (1 << ((ast_x) - 1)); \
  2934. } else { \
  2935. (msdu_flow_config0) &= ~(1 << ((ast_x) - 1)); \
  2936. } \
  2937. } while(0)
  2938. #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x) \
  2939. (((msdu_flow_config1) & (0x0f << ((ast_x) * 4))) >> ((ast_x) * 4))
  2940. #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET( \
  2941. msdu_flow_config1, ast_x, mask) \
  2942. do { \
  2943. (msdu_flow_config1) &= ~(0xF << ((ast_x) * 4)); \
  2944. (msdu_flow_config1) |= ((mask) << ((ast_x) * 4)); \
  2945. } while(0)
  2946. #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1) \
  2947. (((msdu_flow_config1) & 0xff0000) >> 16)
  2948. #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask) \
  2949. do { \
  2950. (msdu_flow_config1) &= ~0xff0000; \
  2951. (msdu_flow_config1) |= ((mask) << 16); \
  2952. } while(0)
  2953. #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1) \
  2954. ((msdu_flow_config1 & 0xff000000) >> 24)
  2955. #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask) \
  2956. do { \
  2957. (msdu_flow_config1) &= ~0xff000000; \
  2958. (msdu_flow_config1) |= ((mask) << 24); \
  2959. } while(0)
  2960. #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
  2961. do { \
  2962. (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2963. (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
  2964. WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2965. } while (0)
  2966. #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
  2967. (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
  2968. WMI_RSRC_CFG_FLAG_ ## flag ## _S)
  2969. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
  2970. WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
  2971. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
  2972. WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
  2973. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
  2974. WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
  2975. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
  2976. WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
  2977. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
  2978. WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
  2979. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
  2980. WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
  2981. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
  2982. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
  2983. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
  2984. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
  2985. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
  2986. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
  2987. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
  2988. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
  2989. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
  2990. WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
  2991. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
  2992. WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
  2993. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
  2994. WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
  2995. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
  2996. WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
  2997. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
  2998. WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
  2999. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
  3000. WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
  3001. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
  3002. WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
  3003. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
  3004. WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
  3005. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
  3006. WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
  3007. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
  3008. WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
  3009. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_SET(word32, value) \
  3010. WMI_RSRC_CFG_FLAG_SET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT, (value))
  3011. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_GET(word32) \
  3012. WMI_RSRC_CFG_FLAG_GET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT)
  3013. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_SET(word32, value) \
  3014. WMI_RSRC_CFG_FLAG_SET((word32), TCL_CCE_DISABLE, (value))
  3015. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_GET(word32) \
  3016. WMI_RSRC_CFG_FLAG_GET((word32), TCL_CCE_DISABLE)
  3017. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_SET(word32, value) \
  3018. WMI_RSRC_CFG_FLAG_SET((word32), TIM_V2_SUPPORT_ENABLE, (value))
  3019. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_GET(word32) \
  3020. WMI_RSRC_CFG_FLAG_GET((word32), TIM_V2_SUPPORT_ENABLE)
  3021. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_SET(word32, value) \
  3022. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE, (value))
  3023. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_GET(word32) \
  3024. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE)
  3025. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_SET(word32, value) \
  3026. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE_VALID, (value))
  3027. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_GET(word32) \
  3028. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE_VALID)
  3029. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_SET(word32, value) \
  3030. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE, (value))
  3031. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_GET(word32) \
  3032. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE)
  3033. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_SET(word32, value) \
  3034. WMI_RSRC_CFG_FLAG_SET((word32), TX_ACK_RSSI, (value))
  3035. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_GET(word32) \
  3036. WMI_RSRC_CFG_FLAG_GET((word32), TX_ACK_RSSI)
  3037. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_SET(word32, value) \
  3038. WMI_RSRC_CFG_FLAG_SET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN, (value))
  3039. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_GET(word32) \
  3040. WMI_RSRC_CFG_FLAG_GET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN)
  3041. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_SET(word32, value) \
  3042. WMI_RSRC_CFG_FLAG_SET((word32), PEER_UNMAP_RESPONSE_SUPPORT, (value))
  3043. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_GET(word32) \
  3044. WMI_RSRC_CFG_FLAG_GET((word32), PEER_UNMAP_RESPONSE_SUPPORT)
  3045. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_SET(word32, value) \
  3046. WMI_RSRC_CFG_FLAG_SET((word32), HTT_PEER_STATS, (value))
  3047. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_GET(word32) \
  3048. WMI_RSRC_CFG_FLAG_GET((word32), HTT_PEER_STATS)
  3049. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_SET(word32, value) \
  3050. WMI_RSRC_CFG_FLAG_SET((word32), PEER_TID_EXT, (value))
  3051. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_GET(word32) \
  3052. WMI_RSRC_CFG_FLAG_GET((word32), PEER_TID_EXT)
  3053. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_SET(word32, value) \
  3054. WMI_RSRC_CFG_FLAG_SET((word32), VIDEO_OVER_WIFI_ENABLE, (value))
  3055. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_GET(word32) \
  3056. WMI_RSRC_CFG_FLAG_GET((word32), VIDEO_OVER_WIFI_ENABLE)
  3057. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_SET(word32, value) \
  3058. WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT, (value))
  3059. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_GET(word32) \
  3060. WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT)
  3061. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_SET(word32, value) \
  3062. WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT, (value))
  3063. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_GET(word32) \
  3064. WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT)
  3065. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_SET(word32, value) \
  3066. WMI_RSRC_CFG_FLAG_SET((word32), TX_COMPLETION_TX_TSF64_ENABLE, (value))
  3067. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_GET(word32) \
  3068. WMI_RSRC_CFG_FLAG_GET((word32), TX_COMPLETION_TX_TSF64_ENABLE)
  3069. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_SET(word32, value) \
  3070. WMI_RSRC_CFG_FLAG_SET((word32), PACKET_CAPTURE_SUPPORT, (value))
  3071. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_GET(word32) \
  3072. WMI_RSRC_CFG_FLAG_GET((word32), PACKET_CAPTURE_SUPPORT)
  3073. typedef struct {
  3074. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
  3075. /** The following indicate the WMI versions to be supported by
  3076. * the host driver. Note that the host driver decide to
  3077. * "downgrade" its WMI version support and this may not be the
  3078. * native version of the host driver. */
  3079. wmi_abi_version host_abi_vers;
  3080. A_UINT32 num_host_mem_chunks; /** size of array host_mem_chunks[] */
  3081. /* The TLVs for resource_config, host_mem_chunks[], and hw_mode_config will follow.
  3082. * wmi_resource_config resource_config;
  3083. * wlan_host_memory_chunk host_mem_chunks[];
  3084. * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
  3085. * Note that the hw_mode_config, in spite of its "pdev" name,
  3086. * applies to the entire target rather than for a single pdev
  3087. * within the target.
  3088. * To avoid specifying a HW mode for the target, the host should
  3089. * fill hw_mode_config's fields with 0x0.
  3090. */
  3091. } wmi_init_cmd_fixed_param;
  3092. /**
  3093. * TLV for channel list
  3094. */
  3095. typedef struct {
  3096. /** WMI_CHAN_LIST_TAG */
  3097. A_UINT32 tag;
  3098. /** # of channels to scan */
  3099. A_UINT32 num_chan;
  3100. /** channels in Mhz */
  3101. A_UINT32 channel_list[1];
  3102. } wmi_chan_list;
  3103. /**
  3104. * TLV for bssid list
  3105. */
  3106. typedef struct {
  3107. /** WMI_BSSID_LIST_TAG */
  3108. A_UINT32 tag;
  3109. /** number of bssids */
  3110. A_UINT32 num_bssid;
  3111. /** bssid list */
  3112. wmi_mac_addr bssid_list[1];
  3113. } wmi_bssid_list;
  3114. /**
  3115. * TLV for ie data.
  3116. */
  3117. typedef struct {
  3118. /** WMI_IE_TAG */
  3119. A_UINT32 tag;
  3120. /** number of bytes in ie data */
  3121. A_UINT32 ie_len;
  3122. /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4) */
  3123. A_UINT32 ie_data[1];
  3124. } wmi_ie_data;
  3125. /**
  3126. * TLV used for length/buffer
  3127. */
  3128. typedef struct {
  3129. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_buf_len_param */
  3130. A_UINT32 buf_len; /** Length of buf */
  3131. /**
  3132. * Following this structure is the TLV byte stream of buf of length buf_len:
  3133. * A_UINT8 buf[];
  3134. *
  3135. */
  3136. } wmi_tlv_buf_len_param;
  3137. /**
  3138. * TLV used for specifying the demensions of a multi-dimensional array
  3139. * that has been stored in a flat buffer
  3140. */
  3141. typedef struct {
  3142. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_arrays_len_param */
  3143. /**
  3144. * d1_len, d2_len, d3_len, and d4_len are the lengths of each dimension
  3145. * for a multi-dimensional array.
  3146. * If the length of outer dimension is not 1, the inner dimension
  3147. * shouldn't be 1.
  3148. * If the multi-dimensional array has less than 4 dimensions, the outer
  3149. * dimensions' lengths should be 1. For example, a buf[3][4] array
  3150. * would have d1_len = 4, d2_len = 3, d3_len = 1, d4_len = 1.
  3151. * The outermost dimension of the array can be inferred from the array
  3152. * length; thus, this struct supports up to 5-D arrays. For a 5-D array,
  3153. * the outermost (5th) dimension would be
  3154. * array length / (d1_len * d2_len * d3_len * d4_len)
  3155. *
  3156. * For security (to ensure no out-of-bounds memory access),
  3157. * the receiver shall validate that the product of all dimensions
  3158. * is equal to (or less than) the array length.
  3159. */
  3160. A_UINT32 d1_len; /* the length of 1st (innermost) dimension array */
  3161. A_UINT32 d2_len; /* the length of 2nd dimension array */
  3162. A_UINT32 d3_len; /* the length of 3rd dimension array */
  3163. A_UINT32 d4_len; /* the length of 4th dimension array */
  3164. /**
  3165. * Following this structure is the TLV multi-dimension array buffer:
  3166. * <type> buf[L1*L2*L3*L4];
  3167. * where, L1, L2, L3, and L4 are the values of
  3168. * d1_len, d2_len, d3_len and d4_len.
  3169. * To access the 4-D element a[i][j][k][l], the buf[] array would be
  3170. * indexed as buf[i*L3*L2*L1 + j*L2*L1 + k*L1 + l].
  3171. */
  3172. } wmi_tlv_arrays_len_param;
  3173. typedef struct {
  3174. /** Len of the SSID */
  3175. A_UINT32 ssid_len;
  3176. /** SSID */
  3177. A_UINT32 ssid[8];
  3178. } wmi_ssid;
  3179. typedef struct {
  3180. /** WMI_SSID_LIST_TAG */
  3181. A_UINT32 tag;
  3182. A_UINT32 num_ssids;
  3183. wmi_ssid ssids[1];
  3184. } wmi_ssid_list;
  3185. typedef struct {
  3186. /** WMI_SCAN_START_OFFSET_TAG */
  3187. A_UINT32 tag;
  3188. /** Number of start TSF offsets */
  3189. A_UINT32 num_offset;
  3190. /** Array of start TSF offsets provided in milliseconds */
  3191. A_UINT32 start_tsf_offset[1];
  3192. } wmi_scan_start_offset;
  3193. /**
  3194. * WLAN_SCAN_CHAN_MODE Macros defined for A_UINT8 phymode_list[]
  3195. */
  3196. /** enum WLAN_PHY_MODE _mode starts from 0, but the WMI message requires
  3197. * 0 to be used to represent unspecified / don't care / default values.
  3198. * Therefore, WMI phy mode = WLAN phy mode + 1.
  3199. */
  3200. /** If the received WMI phy mode is 0 then it is ignored by the FW,
  3201. * and the FW will use any mode as long as the frequency matches.
  3202. */
  3203. /** The number of phy_mode's (BW+mode) passed in the TLV phymode_list[] must
  3204. * be equal to num_chan. (Unless the host does not specify phymode_list values
  3205. * at all, in which case the number of phymode_list elements will be zero.)
  3206. * The indexing of the phymode_list[] array corresponds to same index of
  3207. * the chan_list[] array.
  3208. */
  3209. #define WMI_SCAN_CHAN_SET_MODE(_c) ((_c) + 1)
  3210. #define WMI_SCAN_CHAN_GET_MODE(_c) ((_c) - 1)
  3211. #define WMI_SCAN_CHAN_MODE_IS_SET(_c) (_c)
  3212. typedef struct {
  3213. /*
  3214. * freq unit: MHz (upper 16bits -- value)
  3215. * flags (lower 16bits -- bitfield): valid for the freq short ssid
  3216. * The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
  3217. */
  3218. A_UINT32 freq_flags;
  3219. /* per spec, only 4 bytes*/
  3220. A_UINT32 short_ssid;
  3221. } wmi_hint_freq_short_ssid;
  3222. /** following bssid mac address same as wmi_mac_addr
  3223. * one example: freq -- 5980(0x175c), flags -- 0x1, mac -- 00:03:7f:12:34:56
  3224. * freq_flags will be: 0x175c0001
  3225. * macaddr31to00 will be: 0x127f0300
  3226. * macaddr47to32 will be: 0x00005634
  3227. */
  3228. typedef struct {
  3229. /*
  3230. * freq unit: MHz (upper 16bits -- value)
  3231. * flags (lower 16bits -- bitfield): valid for the freq bssid
  3232. * The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
  3233. */
  3234. A_UINT32 freq_flags;
  3235. /* legacy bssid addr, use same macro to convert: WMI_MAC_ADDR_TO_CHAR_ARRAY, WMI_CHAR_ARRAY_TO_MAC_ADDR */
  3236. wmi_mac_addr bssid;
  3237. } wmi_hint_freq_bssid;
  3238. /** macro to get freq and corresponding flags from wmi_hint_freq_short_ssid */
  3239. #define WMI_GET_FREQ_FROM_HINT_FREQ_SHORT_SSID(pwmi_hint_freq_short_ssid_addr) ((((pwmi_hint_freq_short_ssid_addr)->freq_flags) >> 16) & 0xffff)
  3240. #define WMI_GET_FLAGS_FROM_HINT_FREQ_SHORT_SSID(pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) & 0xffff)
  3241. /** macro to set freq and corresponding flags in wmi_hint_freq_short_ssid */
  3242. #define WMI_SET_FREQ_IN_HINT_FREQ_SHORT_SSID(freq, pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) |= ((freq) << 16))
  3243. #define WMI_SET_FLAGS_IN_HINT_FREQ_SHORT_SSID(flags, pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) |= (flags))
  3244. /** macro to get freq and corresponding flags from wmi_hint_freq_bssid */
  3245. #define WMI_GET_FREQ_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) ((((pwmi_hint_freq_bssid_addr)->freq_flags) >> 16) & 0xffff)
  3246. #define WMI_GET_FLAGS_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) & 0xffff)
  3247. /** macro to set freq and corresponding flags in wmi_hint_freq_bssid */
  3248. #define WMI_SET_FREQ_IN_HINT_FREQ_BSSID(freq, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= ((freq) << 16))
  3249. #define WMI_SET_FLAGS_IN_HINT_FREQ_BSSID(flags, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= (flags))
  3250. /** other macro for 6GHZ, TU(time unit), 20TU normally it is 20ms */
  3251. #define MAX_NUM_20TU_EACH_CH 4
  3252. #define MAX_NUM_S_SSID_EACH_20TU 1
  3253. #define MAX_NUM_BSSID_EACH_20TU 3
  3254. /* prefix used by scan requestor ids on the host */
  3255. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  3256. /* prefix used by scan request ids generated on the host */
  3257. /* host cycles through the lower 12 bits to generate ids */
  3258. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  3259. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  3260. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  3261. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
  3262. /* NOTE: This constant cannot be changed without breaking WMI compatibility */
  3263. #define WMI_IE_BITMAP_SIZE 8
  3264. typedef struct {
  3265. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  3266. /** Scan ID (lower 16 bits) MSB 4 bits is used to identify scan client based on enum WMI_SCAN_CLIENT_ID */
  3267. A_UINT32 scan_id;
  3268. /** Scan requestor ID (lower 16 bits) is used by scan client to classify the scan source, reason, ...etc */
  3269. A_UINT32 scan_req_id;
  3270. /** VDEV id(interface) that is requesting scan */
  3271. A_UINT32 vdev_id;
  3272. /** Scan Priority, input to scan scheduler */
  3273. A_UINT32 scan_priority;
  3274. /** Scan events subscription */
  3275. A_UINT32 notify_scan_events;
  3276. /** dwell time in msec on active channels */
  3277. A_UINT32 dwell_time_active;
  3278. /** dwell time in msec on passive channels */
  3279. A_UINT32 dwell_time_passive;
  3280. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  3281. A_UINT32 min_rest_time;
  3282. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  3283. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  3284. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  3285. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  3286. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  3287. * irrespective of activity. activity is determined by the idle_time parameter.
  3288. */
  3289. A_UINT32 max_rest_time;
  3290. /** time before sending next set of probe requests.
  3291. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  3292. * The number of probe requests specified depends on the ssid_list and bssid_list
  3293. */
  3294. A_UINT32 repeat_probe_time;
  3295. /** time in msec between 2 consequetive probe requests with in a set. */
  3296. A_UINT32 probe_spacing_time;
  3297. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  3298. A_UINT32 idle_time;
  3299. /** maximum time in msec allowed for scan */
  3300. A_UINT32 max_scan_time;
  3301. /** delay in msec before sending first probe request after switching to a channel */
  3302. A_UINT32 probe_delay;
  3303. /** Scan control flags */
  3304. A_UINT32 scan_ctrl_flags;
  3305. /** Burst duration time in msec*/
  3306. A_UINT32 burst_duration;
  3307. /** # if channels to scan. In the TLV channel_list[] */
  3308. A_UINT32 num_chan;
  3309. /** number of bssids. In the TLV bssid_list[] */
  3310. A_UINT32 num_bssid;
  3311. /** number of ssid. In the TLV ssid_list[] */
  3312. A_UINT32 num_ssids;
  3313. /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
  3314. A_UINT32 ie_len;
  3315. /** Max number of probes to be sent */
  3316. A_UINT32 n_probes;
  3317. /** MAC Address to use in Probe Req as SA **/
  3318. wmi_mac_addr mac_addr;
  3319. /** Mask on which MAC has to be randomized **/
  3320. wmi_mac_addr mac_mask;
  3321. /** ie bitmap to use in probe req **/
  3322. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  3323. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  3324. A_UINT32 num_vendor_oui;
  3325. /** Scan control flags extended **/
  3326. A_UINT32 scan_ctrl_flags_ext;
  3327. /** dwell time in msec on active 2G channels, if it's not zero */
  3328. A_UINT32 dwell_time_active_2g;
  3329. /**
  3330. * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
  3331. * as an active channel
  3332. */
  3333. A_UINT32 dwell_time_active_6ghz;
  3334. /**
  3335. * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
  3336. * as a passive channel
  3337. */
  3338. A_UINT32 dwell_time_passive_6ghz;
  3339. /**
  3340. * TLV (tag length value) parameters follow the scan_cmd
  3341. * structure. The TLV's are:
  3342. * A_UINT32 channel_list[num_chan]; // in MHz
  3343. * wmi_ssid ssid_list[num_ssids];
  3344. * wmi_mac_addr bssid_list[num_bssid];
  3345. * A_UINT8 ie_data[ie_len];
  3346. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  3347. * A_UINT8 phymode_list[0 or num_chan]; // see WMI_SCAN_CHAN_MODE macros
  3348. * wmi_hint_freq_short_ssid hint_freq_short_ssid[num]; // the num can be calculated by TLV len
  3349. * wmi_hint_freq_bssid hint_freq_bssid[num]; // the num can be calculated by TLV len
  3350. * *** NOTE:
  3351. * *** Use caution when using further TLVs, in case the additional
  3352. * *** TLVs cause the message size to exceed the of the buffer to
  3353. * *** hold the message.
  3354. */
  3355. } wmi_start_scan_cmd_fixed_param;
  3356. /**
  3357. * scan control flags.
  3358. */
  3359. /** passively scan all channels including active channels */
  3360. #define WMI_SCAN_FLAG_PASSIVE 0x1
  3361. /** add wild card ssid probe request even though ssid_list is specified. */
  3362. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  3363. /** add cck rates to rates/xrate ie for the generated probe request */
  3364. #define WMI_SCAN_ADD_CCK_RATES 0x4
  3365. /** add ofdm rates to rates/xrate ie for the generated probe request */
  3366. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  3367. /** To enable indication of Chan load and Noise floor to host */
  3368. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  3369. /** Filter Probe request frames */
  3370. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  3371. /**When set, not to scan DFS channels*/
  3372. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  3373. /**When set, certain errors are ignored and scan continues.
  3374. * Different FW scan engine may use its own logic to decide what errors to ignore*/
  3375. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  3376. /** Enable promiscous mode for CCXv4 */
  3377. #define WMI_SCAN_FILTER_PROMISCOUS 0x100
  3378. /** allow to send probe req on DFS channel */
  3379. #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
  3380. /** add TPC content in probe req frame */
  3381. #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
  3382. /** add DS content in probe req frame */
  3383. #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
  3384. /** use random mac address for TA for probe request frame and add
  3385. * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
  3386. * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
  3387. #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
  3388. /** allow mgmt transmission during off channel scan */
  3389. #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
  3390. /** allow data transmission during off channel scan */
  3391. #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
  3392. /** allow capture ppdu with phy errrors */
  3393. #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
  3394. /** always do passive scan on passive channels */
  3395. #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x10000
  3396. /** set HALF (10MHz) rate support */
  3397. #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
  3398. /** set Quarter (5MHz) rate support */
  3399. #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
  3400. #define WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ 0x80000
  3401. #define WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ 0x100000
  3402. /** for adaptive scan mode using 3 bits (21 - 23 bits) */
  3403. #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
  3404. #define WMI_SCAN_DWELL_MODE_SHIFT 21
  3405. typedef enum {
  3406. WMI_SCAN_DWELL_MODE_DEFAULT = 0,
  3407. WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
  3408. WMI_SCAN_DWELL_MODE_MODERATE = 2,
  3409. WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
  3410. WMI_SCAN_DWELL_MODE_STATIC = 4,
  3411. } WMI_SCAN_DWELL_MODE;
  3412. #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
  3413. do { \
  3414. (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
  3415. WMI_SCAN_DWELL_MODE_MASK); \
  3416. } while (0)
  3417. #define WMI_SCAN_GET_DWELL_MODE(flag) \
  3418. (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
  3419. /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  3420. #define WMI_SCAN_CLASS_MASK 0xFF000000
  3421. /*
  3422. * Masks identifying types/ID of scans
  3423. * Scan_Stop macros should be the same value as below defined in UMAC
  3424. * #define IEEE80211_SPECIFIC_SCAN 0x00000000
  3425. * #define IEEE80211_VAP_SCAN 0x01000000
  3426. * #define IEEE80211_ALL_SCANS 0x04000000
  3427. */
  3428. #define WMI_SCAN_STOP_ONE 0x00000000
  3429. #define WMI_SCN_STOP_VAP_ALL 0x01000000
  3430. #define WMI_SCAN_STOP_ALL 0x04000000
  3431. /** extended Scan ctrl flags **/
  3432. #define WMI_SCAN_FLAG_EXT_DBS_SCAN_POLICY_MASK 0x00000003 /* Bit 0-1 reserved for DBS scan selection policy.*/
  3433. #define WMI_SCAN_DBS_POLICY_DEFAULT 0x0 /** Select duty cycle if configured, else fall back to whatever
  3434. policy scan manager computes */
  3435. #define WMI_SCAN_DBS_POLICY_FORCE_NONDBS 0x1 /** Force to select Non-DBS scan */
  3436. #define WMI_SCAN_DBS_POLICY_IGNORE_DUTY 0x2 /** Ignore duty cycle even if configured and fall back to whatever
  3437. policy scan manager computes*/
  3438. #define WMI_SCAN_DBS_POLICY_RESERVED 0x3
  3439. #define WMI_SCAN_DBS_POLICY_MAX 0x3
  3440. /* Enable Reception of Public Action frame with this flag */
  3441. #define WMI_SCAN_FLAG_EXT_FILTER_PUBLIC_ACTION_FRAME 0x00000004
  3442. /* Indicate to scan all PSC channel */
  3443. #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_PSC_CH 0x00000008
  3444. /* Indicate to scan all NON-PSC channel */
  3445. #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_NON_PSC_CH 0x00000010
  3446. /* Indicate to save scan result matching hint from scan client */
  3447. #define WMI_SCAN_FLAG_EXT_6GHZ_MATCH_HINT 0x00000020
  3448. /* Skip any ch on which no any RNR had been received */
  3449. #define WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH 0x00000040
  3450. /* Indicate client hint req is high priority than fw rnr or FILS disc */
  3451. #define WMI_SCAN_FLAG_EXT_6GHZ_CLIENT_HIGH_PRIORITY 0x00000080
  3452. /* Force all 6ghz scan channels to active channel */
  3453. #define WMI_SCAN_FLAG_EXT_6GHZ_FORCE_CHAN_ACTIVE 0x00000100
  3454. /**
  3455. * new 6 GHz flags per chan (short ssid or bssid) in struct
  3456. * wmi_hint_freq_short_ssid or wmi_hint_freq_bssid
  3457. */
  3458. /* Indicate not to send probe req for short_ssid or bssid on that channel */
  3459. #define WMI_SCAN_HINT_FLAG_SKIP_TX_PROBE_REQ 0x00000001
  3460. /* Force channel in WMI hint to active channel */
  3461. #define WMI_SCAN_HINT_FLAG_FORCE_CHAN_ACTIVE 0x00000002
  3462. typedef struct {
  3463. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  3464. /** requestor requesting cancel */
  3465. A_UINT32 requestor;
  3466. /** Scan ID */
  3467. A_UINT32 scan_id;
  3468. /**
  3469. * Req Type
  3470. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  3471. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id (on a specific pdev in DBDC)
  3472. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  3473. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine (on a specific pdev in DBDC)
  3474. */
  3475. A_UINT32 req_type;
  3476. /**
  3477. * vDev ID
  3478. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  3479. */
  3480. A_UINT32 vdev_id;
  3481. /** pdev_id for identifying the MAC
  3482. * See macros starting with WMI_PDEV_ID_ for values.
  3483. * In non-DBDC case host should set it to 0
  3484. */
  3485. A_UINT32 pdev_id;
  3486. } wmi_stop_scan_cmd_fixed_param;
  3487. #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
  3488. #define APPEND_TO_EXISTING_CHAN_LIST 1
  3489. #define CHANNEL_MAX_BANDWIDTH_VALID 2
  3490. typedef struct {
  3491. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
  3492. A_UINT32 num_scan_chans; /** no of elements in chan_info[] */
  3493. A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
  3494. A_UINT32 pdev_id; /** pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0. */
  3495. /** Followed by the variable length TLV chan_info:
  3496. * wmi_channel chan_info[] */
  3497. } wmi_scan_chan_list_cmd_fixed_param;
  3498. /*
  3499. * Priority numbers must be sequential, starting with 0.
  3500. */
  3501. /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
  3502. typedef enum {
  3503. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  3504. WMI_SCAN_PRIORITY_LOW,
  3505. WMI_SCAN_PRIORITY_MEDIUM,
  3506. WMI_SCAN_PRIORITY_HIGH,
  3507. WMI_SCAN_PRIORITY_VERY_HIGH,
  3508. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  3509. } wmi_scan_priority;
  3510. /* Five Levels for Requested Priority */
  3511. /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
  3512. typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
  3513. /**
  3514. * 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
  3515. * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
  3516. * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
  3517. */
  3518. typedef struct {
  3519. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
  3520. /**
  3521. * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
  3522. * 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
  3523. */
  3524. A_UINT32 vdev_type;
  3525. /**
  3526. * number of rows in mapping_table for a specific vdev
  3527. * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
  3528. */
  3529. A_UINT32 number_rows;
  3530. /**
  3531. * pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values.
  3532. * In non-DBDC case host should set it to 0
  3533. */
  3534. A_UINT32 pdev_id;
  3535. /** mapping_table for a specific vdev follows this TLV
  3536. * WLAN_PRIORITY_MAPPING mapping_table[]; */
  3537. } wmi_scan_sch_priority_table_cmd_fixed_param;
  3538. /** update flags */
  3539. #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
  3540. #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
  3541. #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
  3542. typedef struct {
  3543. A_UINT32 tlv_header;
  3544. /** requestor requesting update scan request */
  3545. A_UINT32 requestor;
  3546. /** Scan ID of the scan request that need to be update */
  3547. A_UINT32 scan_id;
  3548. /** update flags, indicating which of the following fields are valid and need to be updated*/
  3549. A_UINT32 scan_update_flags;
  3550. /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
  3551. A_UINT32 scan_priority;
  3552. /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
  3553. A_UINT32 min_rest_time;
  3554. /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
  3555. A_UINT32 max_rest_time;
  3556. /** pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0 */
  3557. A_UINT32 pdev_id;
  3558. } wmi_scan_update_request_cmd_fixed_param;
  3559. #define WMI_SCAN_PROBE_OUI_SPOOFED_MAC_IN_PROBE_REQ 0x1
  3560. #define WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ 0x2
  3561. #define WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ 0x4
  3562. typedef struct _wmi_vendor_oui {
  3563. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_oui */
  3564. A_UINT32 oui_type_subtype; /** Vendor OUI type and subtype, lower 3 bytes is type and highest byte is subtype**/
  3565. }wmi_vendor_oui;
  3566. typedef struct {
  3567. A_UINT32 tlv_header;
  3568. /** oui to be used in probe request frame when random mac addresss is
  3569. * requested part of scan parameters. this is applied to both FW internal scans and
  3570. * host initated scans. host can request for random mac address with
  3571. * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
  3572. A_UINT32 prob_req_oui;
  3573. A_UINT32 vdev_id;
  3574. /** Control Flags **/
  3575. A_UINT32 flags;
  3576. /** ie bitmap to use in probe req **/
  3577. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  3578. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  3579. A_UINT32 num_vendor_oui;
  3580. /** pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0 */
  3581. A_UINT32 pdev_id;
  3582. /* Following this tlv, there comes an array of structure of type wmi_vendor_oui
  3583. wmi_vendor_oui vendor_oui[];*/
  3584. } wmi_scan_prob_req_oui_cmd_fixed_param;
  3585. enum wmi_scan_event_type {
  3586. WMI_SCAN_EVENT_STARTED = 0x1,
  3587. WMI_SCAN_EVENT_COMPLETED = 0x2,
  3588. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  3589. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  3590. WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
  3591. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
  3592. WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
  3593. WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
  3594. WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  3595. WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
  3596. WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
  3597. WMI_SCAN_EVENT_MAX = 0x8000
  3598. };
  3599. enum wmi_scan_completion_reason {
  3600. /** scan related events */
  3601. WMI_SCAN_REASON_NONE = 0xFF,
  3602. WMI_SCAN_REASON_COMPLETED = 0,
  3603. WMI_SCAN_REASON_CANCELLED = 1,
  3604. WMI_SCAN_REASON_PREEMPTED = 2,
  3605. WMI_SCAN_REASON_TIMEDOUT = 3,
  3606. WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
  3607. WMI_SCAN_REASON_SUSPENDED = 5,
  3608. WMI_SCAN_REASON_DFS_VIOLATION = 6, /* Failure when tried to SCAN channel in NOL list */
  3609. WMI_SCAN_REASON_MAX,
  3610. };
  3611. typedef struct {
  3612. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
  3613. /** scan event (wmi_scan_event_type) */
  3614. A_UINT32 event;
  3615. /** status of the scan completion event */
  3616. A_UINT32 reason;
  3617. /** channel freq , only valid for FOREIGN channel event*/
  3618. A_UINT32 channel_freq;
  3619. /**id of the requestor whose scan is in progress */
  3620. A_UINT32 requestor;
  3621. /**id of the scan that is in progress */
  3622. A_UINT32 scan_id;
  3623. /**id of VDEV that requested the scan */
  3624. A_UINT32 vdev_id;
  3625. /** TSF Timestamp when the scan event (wmi_scan_event_type) is completed
  3626. * In case of AP it is TSF of the AP vdev
  3627. * In case of STA connected state this is the TSF of the AP
  3628. * In case of STA not connected it will be the free running HW timer
  3629. */
  3630. A_UINT32 tsf_timestamp;
  3631. } wmi_scan_event_fixed_param;
  3632. /* WMI Diag event */
  3633. typedef struct {
  3634. A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
  3635. A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
  3636. A_UINT32 count; /* Number of diag frames added to current event */
  3637. A_UINT32 dropped;
  3638. /* followed by WMITLV_TAG_ARRAY_BYTE */
  3639. } wmi_diag_event_fixed_param;
  3640. #define WMI_11K_OFFLOAD_BITMAP_NEIGHBOR_REPORT_REQ 0x1
  3641. typedef struct {
  3642. A_UINT32 time_offset; /* positive offset in secs from the time 11k offload command has been received, 0xFFFFFFFF if offset is not valid */
  3643. A_UINT32 low_rssi_offset; /* positive offset in dB from current low rssi roaming trigger to send neighbor req, 0xFFFFFFFF if offset is not valid */
  3644. A_UINT32 bmiss_count_trigger; /* value 1 is to send neighbor report at 1st BMISS, 0xFFFFFFFF if input is not valid */
  3645. A_UINT32 per_threshold_offset; /* percentage offset from the current per_threshold, 0xFFFFFFFF if input is not valid */
  3646. A_UINT32 neighbor_report_cache_timeout; /* cache timeout in secs after which neighbor cache is not valid in FW, 0xFFFFFFFF if input is not valid */
  3647. A_UINT32 max_neighbor_report_req_cap; /* 0xFFFFFFFF if input is not valid, else positive number per every roam, these are the maximum number of
  3648. * neighbor report requests that will be sent by FW after every roam */
  3649. wmi_ssid ssid; /* ssid of current connected AP FW might choose to use this SSID in the neighbor report req frame if it is
  3650. * interested in candidate of the same SSID */
  3651. } wmi_neighbor_report_offload;
  3652. typedef struct {
  3653. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param */
  3654. A_UINT32 vdev_id;
  3655. A_UINT32 offload_11k; /* bitmask to indicate to FW what all 11k features are offloaded */
  3656. } wmi_11k_offload_report_fixed_param;
  3657. typedef struct {
  3658. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_neighbor_report_offload_tlv_param */
  3659. wmi_neighbor_report_offload neighbor_rep_ofld_params;
  3660. } wmi_neighbor_report_11k_offload_tlv_param;
  3661. #define WMI_INVOKE_NEIGHBOR_REPORT_FLAGS_SEND_RESP_TO_HOST 0x1
  3662. typedef struct {
  3663. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param */
  3664. A_UINT32 vdev_id;
  3665. A_UINT32 flags;
  3666. wmi_ssid ssid; /* if ssid.len == 0, firmware doesn't include ssid sub-element.
  3667. * In that case AP gives all the candidates in ESS without SSID filter
  3668. * If host wants to insert ssid subelement in the neighbor report request frame, then it can specify the ssid here */
  3669. } wmi_11k_offload_invoke_neighbor_report_fixed_param;
  3670. #define WMI_MAX_PMKID_LEN 16
  3671. #define WMI_MAX_PMK_LEN 64
  3672. #define WMI_PMK_CACHE_CAT_FLAG_BSSID 0x1
  3673. #define WMI_PMK_CACHE_CAT_FLAG_SSID_CACHE_ID 0x2
  3674. #define WMI_PMK_CACHE_ACTION_FLAG_ADD_ENTRY 0x1
  3675. #define WMI_PMK_CACHE_ACTION_FLAG_DEL_ENTRY 0x2
  3676. typedef struct {
  3677. A_UINT32 tlv_header;
  3678. A_UINT32 pmk_len;
  3679. A_UINT8 pmk[WMI_MAX_PMK_LEN];/* for big-endian hosts, manual endian conversion will be needed to keep the array values in their original order,
  3680. in spite of the automatic byte-swap applied to WMI messages during download*/
  3681. A_UINT32 pmkid_len;
  3682. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  3683. wmi_mac_addr bssid;
  3684. wmi_ssid ssid;
  3685. A_UINT32 cache_id;
  3686. A_UINT32 cat_flag; // whether (bssid) or (ssid,cache_id) is valid
  3687. A_UINT32 action_flag; // add/delete the entry
  3688. } wmi_pmk_cache;
  3689. #define WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL 0x1
  3690. typedef struct {
  3691. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pmk_cache_cmd_fixed_param */
  3692. A_UINT32 op_flag; //option to flush all the cache at once
  3693. A_UINT32 vdev_id;
  3694. A_UINT32 num_cache;
  3695. /**
  3696. * TLV (tag length value) parameters follow the update_pmk_cache cmd
  3697. * structure. The TLV's are:
  3698. * wmi_pmk_cache cache_list[];
  3699. */
  3700. } wmi_pdev_update_pmk_cache_cmd_fixed_param;
  3701. #define WMI_FILS_MAX_USERNAME_LEN 16
  3702. #define WMI_FILS_MAX_REALM_LEN 256
  3703. #define WMI_FILS_MAX_RRK_LEN 64
  3704. #define WMI_FILS_MAX_RIK_LEN 64
  3705. /* for big-endian hosts, manual endian conversion will be needed to keep the array values in their original order,
  3706. in spite of the automatic byte-swap applied to WMI messages during download*/
  3707. typedef struct {
  3708. A_UINT8 username[WMI_FILS_MAX_USERNAME_LEN];
  3709. A_UINT32 username_length;
  3710. A_UINT32 next_erp_seq_num;
  3711. A_UINT8 rRk[WMI_FILS_MAX_RRK_LEN];
  3712. A_UINT32 rRk_length;
  3713. A_UINT8 rIk[WMI_FILS_MAX_RIK_LEN];
  3714. A_UINT32 rIk_length;
  3715. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  3716. A_UINT32 realm_len;
  3717. } wmi_erp_info;
  3718. enum wmi_fils_hlp_pkt_type {
  3719. WMI_FILS_HLP_PKT_TYPE_DHCP_DISCOVER = 1,
  3720. };
  3721. typedef struct {
  3722. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_offload_tlv_param */
  3723. A_UINT32 flags;
  3724. wmi_erp_info vdev_erp_info;
  3725. } wmi_roam_fils_offload_tlv_param;
  3726. typedef struct {
  3727. A_UINT32 tlv_header; /** tag WMITLV_TAG_STRUC_wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param**/
  3728. A_UINT32 flags;
  3729. A_UINT32 vdev_id;
  3730. A_UINT32 size;
  3731. A_UINT32 pkt_type; // filled using enum wmi_fils_hlp_pkt_type
  3732. // A_UINT8 fils_hlp_pkt[];
  3733. } wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param;
  3734. #define WMI_MAX_KEK_LEN 64
  3735. #define GTK_OFFLOAD_KEK_EXTENDED_BYTES WMI_MAX_KEK_LEN /*KEK len has been increased to 64 to support FILS security.
  3736. To not break backward compatibility, new GTK_OFFLOAD_KEK_EXTENDED_BYTES has been defined without modifying old GTK_OFFLOAD_KEK_BYTES */
  3737. typedef struct {
  3738. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_synch_tlv_param */
  3739. A_UINT32 update_erp_next_seq_num;// Boolean denoting whether next erp_seq_num changed or not.
  3740. A_UINT32 next_erp_seq_num;
  3741. A_UINT32 kek_len;
  3742. A_UINT8 kek[WMI_MAX_KEK_LEN];
  3743. A_UINT32 pmk_len;
  3744. A_UINT8 pmk[WMI_MAX_PMK_LEN];
  3745. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  3746. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  3747. A_UINT32 realm_len;
  3748. } wmi_roam_fils_synch_tlv_param;
  3749. /*
  3750. * If FW has multiple active channels due to MCC(multi channel concurrency),
  3751. * then these stats are combined stats for all the active channels.
  3752. */
  3753. typedef struct {
  3754. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
  3755. /** ack count, it is an incremental number, not accumulated number */
  3756. A_UINT32 ackRcvBad;
  3757. /** bad rts count, it is an incremental number, not accumulated number */
  3758. A_UINT32 rtsBad;
  3759. /** good rts, it is an incremental number, not accumulated number */
  3760. A_UINT32 rtsGood;
  3761. /** fcs count, it is an incremental number, not accumulated number */
  3762. A_UINT32 fcsBad;
  3763. /** beacon count, it is an incremental number, not accumulated number */
  3764. A_UINT32 noBeacons;
  3765. } wmi_update_whal_mib_stats_event_fixed_param;
  3766. /*
  3767. * This defines how much headroom is kept in the
  3768. * receive frame between the descriptor and the
  3769. * payload, in order for the WMI PHY error and
  3770. * management handler to insert header contents.
  3771. *
  3772. * This is in bytes.
  3773. */
  3774. #define WMI_MGMT_RX_HDR_HEADROOM (sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr))
  3775. /** This event will be used for sending scan results
  3776. * as well as rx mgmt frames to the host. The rx buffer
  3777. * will be sent as part of this WMI event. It would be a
  3778. * good idea to pass all the fields in the RX status
  3779. * descriptor up to the host.
  3780. */
  3781. /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
  3782. #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
  3783. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
  3784. #define WMI_MGMT_RX_HDR_EXTSCAN 0x01
  3785. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of matched network by FW ENLO */
  3786. #define WMI_MGMT_RX_HDR_ENLO 0x02
  3787. #define MAX_ANTENNA_EIGHT 8
  3788. typedef struct {
  3789. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
  3790. /** channel on which this frame is received (channel number) */
  3791. A_UINT32 channel;
  3792. /** snr information used to cal rssi */
  3793. A_UINT32 snr;
  3794. /** Rate kbps */
  3795. A_UINT32 rate;
  3796. /** rx phy mode WLAN_PHY_MODE */
  3797. A_UINT32 phy_mode;
  3798. /** length of the frame */
  3799. A_UINT32 buf_len;
  3800. /** rx status */
  3801. A_UINT32 status; /* capture mode indication */
  3802. /** RSSI of PRI 20MHz for each chain. */
  3803. A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
  3804. /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
  3805. A_UINT32 flags;
  3806. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  3807. A_INT32 rssi;
  3808. /** delta between local TSF(TSF timestamp when frame was RXd)
  3809. * and remote TSF(TSF timestamp in the IE for mgmt frame -
  3810. * beacon,proberesp for e.g). If remote TSF is not available,
  3811. * delta set to 0.
  3812. * Although tsf_delta is stored as A_UINT32, it can be negative,
  3813. * and thus would need to be sign-extended if added to a value
  3814. * larger than 32 bits.
  3815. */
  3816. A_UINT32 tsf_delta;
  3817. /* The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
  3818. * TSF timestamp in the RX MAC descriptor provided by HW.
  3819. */
  3820. A_UINT32 rx_tsf_l32;
  3821. /* The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
  3822. * after the packet is received.
  3823. */
  3824. A_UINT32 rx_tsf_u32;
  3825. /** pdev_id for identifying the MAC the rx mgmt frame was received by
  3826. * See macros starting with WMI_PDEV_ID_ for values.
  3827. */
  3828. A_UINT32 pdev_id;
  3829. /** freq in MHz of the channel on which this frame was received */
  3830. A_UINT32 chan_freq;
  3831. /* This TLV is followed by array of bytes:
  3832. * A_UINT8 bufp[]; <-- management frame buffer
  3833. */
  3834. /* This TLV is optionally followed by array of struct:
  3835. * wmi_rssi_ctl_ext rssi_ctl_ext;
  3836. */
  3837. } wmi_mgmt_rx_hdr;
  3838. typedef enum {
  3839. PKT_CAPTURE_MODE_DISABLE = 0,
  3840. PKT_CAPTURE_MODE_MGMT_ONLY,
  3841. PKT_CAPTURE_MODE_DATA_ONLY,
  3842. PKT_CAPTURE_MODE_DATA_MGMT,
  3843. } WMI_PKT_CAPTURE_MODE_CONFIG;
  3844. /* This information sending to host during offloaded MGMT local TX and host TX */
  3845. typedef struct {
  3846. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_hdr */
  3847. /* channel frequency in MHz */
  3848. A_UINT32 chan_freq;
  3849. /** snr information used to cal rssi in dB */
  3850. A_UINT32 snr;
  3851. /** Rate kbps */
  3852. A_UINT32 rate_kbps;
  3853. /** phy mode WLAN_PHY_MODE */
  3854. A_UINT32 phy_mode;
  3855. /** length of the frame in bytes */
  3856. A_UINT32 buf_len;
  3857. /** status:
  3858. * 0x00: CRC ERR
  3859. * 0x08: DECRYPT ERR
  3860. * 0x10: MIC ERR
  3861. * 0x20: KEY CACHE MISS
  3862. */
  3863. A_UINT32 status;
  3864. /** flags:
  3865. * Information about the management frame e.g. can give a scan source
  3866. * for a scan result mgmt frame
  3867. * Refer to WMI_MGMT_RX_HDR_ definitions.
  3868. * ex: WMI_MGMT_RX_HDR_EXTSCAN,WMI_MGMT_RX_HDR_ENLO
  3869. */
  3870. A_UINT32 flags;
  3871. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  3872. A_INT32 rssi;
  3873. /** delta between local TSF (TSF timestamp when frame was RXd)
  3874. * and remote TSF (TSF timestamp in the IE for mgmt frame -
  3875. * beacon, proberesp for example). If remote TSF is not available,
  3876. * delta is set to 0.
  3877. * Although tsf_delta is stored as A_UINT32, it can be negative,
  3878. * and thus would need to be sign-extended if added to a value
  3879. * larger than 32 bits.
  3880. */
  3881. A_UINT32 tsf_delta;
  3882. /* The lower 32 bits of the TSF (tsf_l32) is copied by FW from
  3883. * TSF timestamp in the TX MAC descriptor provided by HW.
  3884. */
  3885. A_UINT32 tsf_l32;
  3886. /* The upper 32 bits of the TSF (tsf_u32) is copied by FW from
  3887. * TSF timestamp in the TX MAC descriptor provided by HW.
  3888. */
  3889. A_UINT32 tsf_u32;
  3890. /** pdev_id for identifying the MAC the tx mgmt frame transmitted.
  3891. * See macros starting with WMI_PDEV_ID_ for values.
  3892. */
  3893. A_UINT32 pdev_id;
  3894. A_UINT32 direction; /* tx:0,rx:1*/
  3895. /** tx_status:
  3896. * 0: xmit ok
  3897. * 1: excessive retries
  3898. * 2: blocked by tx filtering
  3899. * 4: fifo underrun
  3900. * 8: swabort
  3901. */
  3902. A_UINT32 tx_status;
  3903. A_UINT32
  3904. /* tx_retry_cnt:
  3905. * Indicates retry count of offloaded/local & host mgmt tx frames.
  3906. * The WMI_MGMT_HDR_TX_RETRY_[SET,GET] macros can be used to access
  3907. * this bitfield in a portable manner.
  3908. */
  3909. tx_retry_cnt:6, /* [5:0] */
  3910. reserved_1:26; /* [31:6] */
  3911. /* This TLV may be followed by array of bytes:
  3912. * A_UINT8 bufp[]; <-- management frame buffer
  3913. */
  3914. } wmi_mgmt_hdr;
  3915. /* Tx retry cnt set & get bits*/
  3916. #define WMI_MGMT_HDR_TX_RETRY_CNT_SET(tx_retry_cnt, value) \
  3917. WMI_SET_BITS(tx_retry_cnt, 0, 6, value)
  3918. #define WMI_MGMT_HDR_TX_RETRY_CNT_GET(tx_retry_cnt) \
  3919. WMI_GET_BITS(tx_retry_cnt, 0, 6)
  3920. /*
  3921. * Instead of universally increasing the RX_HDR_HEADROOM size which may cause problems for older targets,
  3922. * this new ext_hdr can be used for extending the header and will be only applicable for new targets.
  3923. */
  3924. typedef struct
  3925. {
  3926. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_rssi_ctl_ext */
  3927. /** RSSI of PRI 20MHz for each chain, in dB w.r.t. noise floor */
  3928. A_UINT32 rssi_ctl_ext[MAX_ANTENNA_EIGHT - ATH_MAX_ANTENNA];
  3929. } wmi_rssi_ctl_ext;
  3930. typedef struct {
  3931. /** TSF timestamp */
  3932. A_UINT32 tsf_timestamp;
  3933. /**
  3934. * Current freq1, freq2
  3935. *
  3936. * [7:0]: freq1[lo]
  3937. * [15:8] : freq1[hi]
  3938. * [23:16]: freq2[lo]
  3939. * [31:24]: freq2[hi]
  3940. */
  3941. A_UINT32 freq_info_1;
  3942. /**
  3943. * Combined RSSI over all chains and channel width for this PHY error
  3944. *
  3945. * [7:0]: RSSI combined
  3946. * [15:8]: Channel width (MHz)
  3947. * [23:16]: PHY error code
  3948. * [24:16]: reserved (future use)
  3949. */
  3950. A_UINT32 freq_info_2;
  3951. /**
  3952. * RSSI on chain 0 through 3
  3953. *
  3954. * This is formatted the same as the PPDU_START RX descriptor
  3955. * field:
  3956. *
  3957. * [7:0]: pri20
  3958. * [15:8]: sec20
  3959. * [23:16]: sec40
  3960. * [31:24]: sec80
  3961. */
  3962. A_UINT32 rssi_chain0;
  3963. A_UINT32 rssi_chain1;
  3964. A_UINT32 rssi_chain2;
  3965. A_UINT32 rssi_chain3;
  3966. /**
  3967. * Last calibrated NF value for chain 0 through 3
  3968. *
  3969. * nf_list_1:
  3970. *
  3971. * + [15:0] - chain 0
  3972. * + [31:16] - chain 1
  3973. *
  3974. * nf_list_2:
  3975. *
  3976. * + [15:0] - chain 2
  3977. * + [31:16] - chain 3
  3978. */
  3979. A_UINT32 nf_list_1;
  3980. A_UINT32 nf_list_2;
  3981. /** Length of the frame */
  3982. A_UINT32 buf_len;
  3983. } wmi_single_phyerr_rx_hdr;
  3984. typedef struct {
  3985. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_single_phyerr_ext_rx_hdr */
  3986. /**
  3987. * RSSI on chain 4 through 7 in dB w.r.t noise floor.
  3988. *
  3989. * This is formatted the same as the PPDU_START RX descriptor
  3990. * field:
  3991. *
  3992. * [7:0]: pri20
  3993. * [15:8]: sec20
  3994. * [23:16]: sec40
  3995. * [31:24]: sec80
  3996. */
  3997. A_UINT32 rssi_chain4;
  3998. A_UINT32 rssi_chain5;
  3999. A_UINT32 rssi_chain6;
  4000. A_UINT32 rssi_chain7;
  4001. /**
  4002. * Last calibrated NF value for chain 4 through 7 in dbm
  4003. *
  4004. * nf_list_3:
  4005. * + [15:0] - chain 4
  4006. * + [31:16] - chain 5
  4007. *
  4008. * nf_list_4:
  4009. * + [15:0] - chain 6
  4010. * + [31:16] - chain 7
  4011. *
  4012. * Each chain's noise floor is stored as a sign-extended (negative)
  4013. * value in dBm units.
  4014. */
  4015. A_UINT32 nf_list_3;
  4016. A_UINT32 nf_list_4;
  4017. } wmi_single_phyerr_ext_rx_hdr;
  4018. #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
  4019. #define WMI_UNIFIED_FREQINFO_1_LO_S 0
  4020. #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
  4021. #define WMI_UNIFIED_FREQINFO_1_HI_S 8
  4022. #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
  4023. #define WMI_UNIFIED_FREQINFO_2_LO_S 16
  4024. #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
  4025. #define WMI_UNIFIED_FREQINFO_2_HI_S 24
  4026. /*
  4027. * Please keep in mind that these _SET macros break macro side effect
  4028. * assumptions; don't be clever with them.
  4029. */
  4030. #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
  4031. (WMI_F_MS((hdr)->freq_info_1, \
  4032. WMI_UNIFIED_FREQINFO_##f##_LO) \
  4033. | (WMI_F_MS((hdr)->freq_info_1, \
  4034. WMI_UNIFIED_FREQINFO_##f##_HI) << 8))
  4035. #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
  4036. do { \
  4037. WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
  4038. WMI_UNIFIED_FREQINFO_##f##_LO); \
  4039. WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
  4040. WMI_UNIFIED_FREQINFO_##f##_HI); \
  4041. } while (0)
  4042. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
  4043. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
  4044. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
  4045. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
  4046. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
  4047. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
  4048. #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
  4049. ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
  4050. WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
  4051. #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
  4052. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  4053. WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
  4054. #define WMI_UNIFIED_CHWIDTH_GET(hdr) \
  4055. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
  4056. #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
  4057. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  4058. WMI_UNIFIED_FREQINFO_2_CHWIDTH);
  4059. #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
  4060. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
  4061. #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
  4062. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  4063. WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
  4064. #define WMI_UNIFIED_CHAIN_0 0x0000ffff
  4065. #define WMI_UNIFIED_CHAIN_0_S 0
  4066. #define WMI_UNIFIED_CHAIN_1 0xffff0000
  4067. #define WMI_UNIFIED_CHAIN_1_S 16
  4068. #define WMI_UNIFIED_CHAIN_2 0x0000ffff
  4069. #define WMI_UNIFIED_CHAIN_2_S 0
  4070. #define WMI_UNIFIED_CHAIN_3 0xffff0000
  4071. #define WMI_UNIFIED_CHAIN_3_S 16
  4072. #define WMI_UNIFIED_CHAIN_4 0x0000ffff
  4073. #define WMI_UNIFIED_CHAIN_4_S 0
  4074. #define WMI_UNIFIED_CHAIN_5 0xffff0000
  4075. #define WMI_UNIFIED_CHAIN_5_S 16
  4076. #define WMI_UNIFIED_CHAIN_6 0x0000ffff
  4077. #define WMI_UNIFIED_CHAIN_6_S 0
  4078. #define WMI_UNIFIED_CHAIN_7 0xffff0000
  4079. #define WMI_UNIFIED_CHAIN_7_S 16
  4080. #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
  4081. #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
  4082. #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
  4083. #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
  4084. #define WMI_UNIFIED_CHAIN_4_FIELD nf_list_3
  4085. #define WMI_UNIFIED_CHAIN_5_FIELD nf_list_3
  4086. #define WMI_UNIFIED_CHAIN_6_FIELD nf_list_4
  4087. #define WMI_UNIFIED_CHAIN_7_FIELD nf_list_4
  4088. #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
  4089. ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, \
  4090. WMI_UNIFIED_CHAIN_##c)))
  4091. #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
  4092. WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, (nf) & 0xffff, \
  4093. WMI_UNIFIED_CHAIN_##c);
  4094. /*
  4095. * For now, this matches what the underlying hardware is doing.
  4096. * Update ar6000ProcRxDesc() to use these macros when populating
  4097. * the rx descriptor and then we can just copy the field over
  4098. * to the WMI PHY notification without worrying about breaking
  4099. * things.
  4100. */
  4101. #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
  4102. #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
  4103. #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
  4104. #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
  4105. #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
  4106. #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
  4107. #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
  4108. #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
  4109. #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
  4110. WMI_F_RMW((hdr)->rssi_chain##c, (rssi) & 0xff, \
  4111. WMI_UNIFIED_RSSI_CHAN_##ch);
  4112. #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
  4113. ((int8_t) (WMI_F_MS((hdr)->rssi_chain##c, \
  4114. WMI_UNIFIED_RSSI_CHAN_##ch)))
  4115. #define WMI_UNIFIED_CHAIN_RSSI_GET(tlv, chain_idx, band) \
  4116. ((A_INT8) WMI_F_MS((tlv)->chain_rssi[chain_idx], WMI_UNIFIED_RSSI_CHAN_ ## band))
  4117. typedef struct {
  4118. /** Phy error event header */
  4119. wmi_single_phyerr_rx_hdr hdr;
  4120. /** frame buffer */
  4121. A_UINT8 bufp[1];
  4122. } wmi_single_phyerr_rx_event;
  4123. /* PHY ERROR MASK 0 */
  4124. /* bits 1:0 defined but not published */
  4125. #define WMI_PHY_ERROR_MASK0_RADAR (1 << 2)
  4126. /* bits 23:3 defined but not published */
  4127. #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1 << 24)
  4128. /* bits 25:24 defined but not published */
  4129. #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1 << 26)
  4130. /* bits 31:27 defined but not published */
  4131. /* PHY ERROR MASK 1 */
  4132. /* bits 13:0 defined but not published */
  4133. /* bits 31:14 reserved */
  4134. /* PHY ERROR MASK 2 */
  4135. /* bits 31:0 reserved */
  4136. typedef struct {
  4137. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
  4138. /** Phy error phy error count */
  4139. A_UINT32 num_phyerr_events;
  4140. A_UINT32 tsf_l32;
  4141. A_UINT32 tsf_u32;
  4142. A_UINT32 buf_len;
  4143. union {
  4144. A_UINT32 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  4145. /** pdev_id for identifying the MAC
  4146. * See macros starting with WMI_PDEV_ID_ for values.
  4147. */
  4148. A_UINT32 pdev_id;
  4149. };
  4150. A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
  4151. A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
  4152. A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
  4153. /* This TLV is followed by array of bytes:
  4154. * frame buffer - contains multiple payloads in the order:
  4155. * header - payload, header - payload...
  4156. * (The header is of type: wmi_single_phyerr_rx_hdr)
  4157. * A_UINT8 bufp[];
  4158. * The extension hdr will repeat num_phyerr_events of times
  4159. * and will have 1:1 mapping with above header. i.e the 1st
  4160. * ext_rx_hdr will belong to 1st phyerr_rx_hdr and so on.
  4161. * wmi_single_phyerr_ext_rx_hdr single_phyerr_ext;
  4162. */
  4163. } wmi_comb_phyerr_rx_hdr;
  4164. /* WMI MGMT TX */
  4165. typedef struct {
  4166. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
  4167. /** unique id identifying the VDEV, generated by the caller */
  4168. A_UINT32 vdev_id;
  4169. /** peer MAC address */
  4170. wmi_mac_addr peer_macaddr;
  4171. /** xmit rate */
  4172. A_UINT32 tx_rate;
  4173. /** xmit power */
  4174. A_UINT32 tx_power;
  4175. /** Buffer length in bytes */
  4176. A_UINT32 buf_len;
  4177. /* This TLV is followed by array of bytes:
  4178. * A_UINT8 bufp[]; <-- management frame buffer
  4179. */
  4180. } wmi_mgmt_tx_hdr;
  4181. #define WMI_TX_SEND_PARAM_PWR_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 0, 8)
  4182. #define WMI_TX_SEND_PARAM_PWR_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 8, value)
  4183. #define WMI_TX_SEND_PARAM_MCS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 8, 12)
  4184. #define WMI_TX_SEND_PARAM_MCS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 8, 12, value)
  4185. #define WMI_TX_SEND_PARAM_NSS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 20, 8)
  4186. #define WMI_TX_SEND_PARAM_NSS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 20, 8, value)
  4187. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 28, 4)
  4188. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 28, 4, value)
  4189. #define WMI_TX_SEND_PARAM_CHAIN_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 0, 8)
  4190. #define WMI_TX_SEND_PARAM_CHAIN_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 8, value)
  4191. #define WMI_TX_SEND_PARAM_BW_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 8, 7)
  4192. #define WMI_TX_SEND_PARAM_BW_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 8, 7, value)
  4193. #define WMI_TX_SEND_PARAM_PREAMBLE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 15, 5)
  4194. #define WMI_TX_SEND_PARAM_PREAMBLE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 15, 5, value)
  4195. #define WMI_TX_SEND_PARAM_FRAME_TYPE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 20, 1)
  4196. #define WMI_TX_SEND_PARAM_FRAME_TYPE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 20, 1, value)
  4197. #define WMI_TX_SEND_PARAM_CFR_CAPTURE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 21, 1)
  4198. #define WMI_TX_SEND_PARAM_CFR_CAPTURE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 21, 1, value)
  4199. typedef struct {
  4200. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_send_params */
  4201. union {
  4202. struct {
  4203. /* DWORD 0: tx power, tx rate, retry_limit */
  4204. A_UINT32
  4205. /* pwr -
  4206. * Specify what power the tx frame needs to be transmitted at.
  4207. * The power a signed (two's complement) value is in units of 0.5 dBm.
  4208. * The value needs to be appropriately sign-extended when extracting
  4209. * the value from the message and storing it in a variable that is
  4210. * larger than A_INT8. (fw automatically handles this sign-extension.)
  4211. * If the transmission uses multiple tx chains, this power spec is
  4212. * the total transmit power, assuming incoherent combination of
  4213. * per-chain power to produce the total power.
  4214. */
  4215. pwr: 8,
  4216. /* mcs_mask -
  4217. * Specify the allowable values for MCS index (modulation and coding)
  4218. * to use for transmitting the frame.
  4219. *
  4220. * For HT / VHT preamble types, this mask directly corresponds to
  4221. * the HT or VHT MCS indices that are allowed. For each bit N set
  4222. * within the mask, MCS index N is allowed for transmitting the frame.
  4223. * For legacy CCK and OFDM rates, separate bits are provided for CCK
  4224. * rates versus OFDM rates, so the host has the option of specifying
  4225. * that the target must transmit the frame with CCK or OFDM rates
  4226. * (not HT or VHT), but leaving the decision to the target whether
  4227. * to use CCK or OFDM.
  4228. *
  4229. * For CCK and OFDM, the bits within this mask are interpreted as
  4230. * follows:
  4231. * bit 0 -> CCK 1 Mbps rate is allowed
  4232. * bit 1 -> CCK 2 Mbps rate is allowed
  4233. * bit 2 -> CCK 5.5 Mbps rate is allowed
  4234. * bit 3 -> CCK 11 Mbps rate is allowed
  4235. * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
  4236. * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
  4237. * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
  4238. * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
  4239. * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
  4240. * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
  4241. * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
  4242. * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
  4243. *
  4244. * The MCS index specification needs to be compatible with the
  4245. * bandwidth mask specification. For example, a MCS index == 9
  4246. * specification is inconsistent with a preamble type == VHT,
  4247. * Nss == 1, and channel bandwidth == 20 MHz.
  4248. *
  4249. * Furthermore, the host has only a limited ability to specify to
  4250. * the target to select from HT + legacy rates, or VHT + legacy rates,
  4251. * since this mcs_mask can specify either HT/VHT rates or legacy rates.
  4252. * If no bits are set, target can choose what MCS type to use.
  4253. */
  4254. mcs_mask: 12,
  4255. /* nss_mask -
  4256. * Specify which numbers of spatial streams (MIMO factor) are permitted.
  4257. * Each bit in this mask corresponds to a Nss value:
  4258. * bit 0: if set, Nss = 1 (non-MIMO) is permitted
  4259. * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
  4260. * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
  4261. * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
  4262. * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
  4263. * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
  4264. * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
  4265. * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
  4266. * The values in the Nss mask must be suitable for the recipient, e.g.
  4267. * a value of 0x4 (Nss = 3) cannot be specified for a tx frame to a
  4268. * recipient which only supports 2x2 MIMO.
  4269. * If no bits are set, target can choose what NSS type to use.
  4270. */
  4271. nss_mask: 8,
  4272. /* retry_limit -
  4273. * Specify the maximum number of transmissions, including the
  4274. * initial transmission, to attempt before giving up if no ack
  4275. * is received.
  4276. * If the tx rate is specified, then all retries shall use the
  4277. * same rate as the initial transmission.
  4278. * If no tx rate is specified, the target can choose whether to
  4279. * retain the original rate during the retransmissions, or to
  4280. * fall back to a more robust rate.
  4281. */
  4282. retry_limit: 4;
  4283. };
  4284. A_UINT32 tx_param_dword0;
  4285. };
  4286. union {
  4287. struct {
  4288. /* DWORD 1: tx chain mask, preamble_type, tx BW */
  4289. A_UINT32
  4290. /* chain_mask - specify which chains to transmit from
  4291. * If not set, target will choose what chain_mask to use.
  4292. */
  4293. chain_mask: 8,
  4294. /* The bits in this mask correspond to the values as below
  4295. * bit 0 -> 5MHz
  4296. * bit 1 -> 10MHz
  4297. * bit 2 -> 20MHz
  4298. * bit 3 -> 40MHz
  4299. * bit 4 -> 80MHz
  4300. * bit 5 -> 160MHz
  4301. * bit 6 -> 80_80MHz
  4302. * If no bits are set, target can choose what BW to use.
  4303. */
  4304. bw_mask: 7,
  4305. /* preamble_type_mask -
  4306. * Specify which preamble types (CCK, OFDM, HT, VHT) the target
  4307. * may choose from for transmitting this frame.
  4308. * Each bit in this mask corresponds to a preamble_type value:
  4309. * bit 0: if set, OFDM
  4310. * bit 1: if set, CCK
  4311. * bit 2: if set, HT
  4312. * bit 3: if set, VHT
  4313. * bit 4: if set, HE
  4314. * If no bits are set, target can choose what preamble type to use.
  4315. */
  4316. preamble_type: 5,
  4317. /* Data:1 Mgmt:0
  4318. */
  4319. frame_type: 1,
  4320. /* Capture CFR when bit is set
  4321. */
  4322. cfr_capture: 1,
  4323. reserved1_31_22: 10;
  4324. };
  4325. A_UINT32 tx_param_dword1;
  4326. };
  4327. } wmi_tx_send_params;
  4328. typedef struct {
  4329. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param */
  4330. A_UINT32 vdev_id;
  4331. A_UINT32 desc_id; /* echoed in tx_compl_event */
  4332. A_UINT32 chanfreq; /* MHz units */
  4333. /* WMI_MGMT_TX_SEND_CMDID is used for both pass by value and
  4334. * pass by reference WMI management frames.
  4335. *
  4336. * a) If the command is for pass by reference,
  4337. * paddr_lo and padd_hi will hold the address of remote/host buffer
  4338. * b) If the command is for pass by value,
  4339. * paddr_lo and paddr_hi will be NULL.
  4340. */
  4341. A_UINT32 paddr_lo;
  4342. A_UINT32 paddr_hi;
  4343. A_UINT32 frame_len;
  4344. A_UINT32 buf_len; /** Buffer length in bytes */
  4345. /*
  4346. * The frame which will have tx_params_valid set will be always be RAW
  4347. * frame, as it will be tx'ed on non-pause tid
  4348. */
  4349. A_UINT32 tx_params_valid;
  4350. /* This TLV is followed by array of bytes: First 64 bytes of management frame
  4351. * A_UINT8 bufp[];
  4352. */
  4353. /* This TLV is followed by wmi_tx_send_params
  4354. * wmi_tx_send_params tx_send_params;
  4355. */
  4356. } wmi_mgmt_tx_send_cmd_fixed_param;
  4357. typedef struct {
  4358. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_send_cmd_fixed_param */
  4359. A_UINT32 vdev_id;
  4360. A_UINT32 desc_id; /* echoed in tx_compl_event */
  4361. A_UINT32 chanfreq; /* MHz units */
  4362. A_UINT32 paddr_lo;
  4363. A_UINT32 paddr_hi;
  4364. A_UINT32 frame_len;
  4365. A_UINT32 buf_len; /** Buffer length in bytes */
  4366. /* The frame which will have tx_params_valid set will be always be RAW
  4367. * frame, as it will be tx'ed on non-pause tid
  4368. */
  4369. A_UINT32 tx_params_valid;
  4370. /* This TLV is followed by array of bytes: First 64 bytes of frame
  4371. * A_UINT8 bufp[];
  4372. */
  4373. /* This TLV is followed by wmi_tx_send_params
  4374. * wmi_tx_send_params tx_send_params;
  4375. */
  4376. } wmi_offchan_data_tx_send_cmd_fixed_param;
  4377. typedef struct {
  4378. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
  4379. A_UINT32 value;
  4380. } wmi_echo_event_fixed_param;
  4381. typedef struct {
  4382. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
  4383. A_UINT32 value;
  4384. } wmi_echo_cmd_fixed_param;
  4385. typedef struct {
  4386. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
  4387. /** pdev_id for identifying the MAC
  4388. * See macros starting with WMI_PDEV_ID_ for values.
  4389. */
  4390. A_UINT32 pdev_id;
  4391. /** reg domain code */
  4392. A_UINT32 reg_domain;
  4393. A_UINT32 reg_domain_2G;
  4394. A_UINT32 reg_domain_5G;
  4395. A_UINT32 conformance_test_limit_2G;
  4396. A_UINT32 conformance_test_limit_5G;
  4397. A_UINT32 dfs_domain;
  4398. } wmi_pdev_set_regdomain_cmd_fixed_param;
  4399. typedef struct {
  4400. /** TRUE for scan start and flase for scan end */
  4401. A_UINT32 scan_start;
  4402. } wmi_pdev_scan_cmd;
  4403. /* WMI support for setting ratemask in target */
  4404. typedef struct {
  4405. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param */
  4406. A_UINT32 vdev_id;
  4407. /*
  4408. * 0 - cck/ofdm
  4409. * 1 - HT
  4410. * 2 - VHT
  4411. * 3 - HE
  4412. */
  4413. A_UINT32 type;
  4414. A_UINT32 mask_lower32;
  4415. A_UINT32 mask_higher32;
  4416. A_UINT32 mask_lower32_2;
  4417. A_UINT32 mask_higher32_2;
  4418. } wmi_vdev_config_ratemask_cmd_fixed_param;
  4419. /* nrp action - Filter Neighbor Rx Packets - add/remove filter */
  4420. enum {
  4421. WMI_FILTER_NRP_ACTION_ADD = 0x1,
  4422. WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
  4423. WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
  4424. }; /* nrp - Neighbor Rx Packets */
  4425. /* nrp type - Filter Neighbor Rx Packets - ap/client addr */
  4426. enum {
  4427. WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
  4428. WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
  4429. };
  4430. /* nrp flag - Filter Neighbor Rx Packets
  4431. * (capture flag, 2 & 3 not initially supported)
  4432. */
  4433. enum {
  4434. WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
  4435. WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
  4436. WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
  4437. };
  4438. typedef struct {
  4439. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param */
  4440. A_UINT32 vdev_id;
  4441. /* AP Bssid or Client Mac-addr */
  4442. wmi_mac_addr addr;
  4443. /* Add/Remove NRF Filter */
  4444. A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
  4445. /* client/ap filter */
  4446. A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
  4447. /* optional - tx/rx capture */
  4448. A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
  4449. /* BSSID index - index of the BSSID register */
  4450. A_UINT32 bssid_idx;
  4451. } wmi_vdev_filter_nrp_config_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  4452. /*Command to set/unset chip in quiet mode*/
  4453. typedef struct {
  4454. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
  4455. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  4456. A_UINT32 period; /*period in TUs*/
  4457. A_UINT32 duration; /*duration in TUs*/
  4458. A_UINT32 next_start; /*offset in TUs*/
  4459. A_UINT32 enabled; /*enable/disable*/
  4460. } wmi_pdev_set_quiet_cmd_fixed_param;
  4461. typedef struct {
  4462. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param */
  4463. A_UINT32 vdev_id; /* Virtual interface ID */
  4464. A_UINT32 period; /* period in TUs */
  4465. A_UINT32 duration; /* duration in TUs */
  4466. A_UINT32 next_start; /* offset in TUs */
  4467. A_UINT32 enabled; /* enable/disable */
  4468. } wmi_vdev_set_quiet_cmd_fixed_param;
  4469. /*
  4470. * START_STOP flag value: 1 - Start, 0 - Stop
  4471. */
  4472. #define WMI_OFFLOAD_QUIET_FLAG_START_STOP 0x00000001
  4473. /*
  4474. * ONE_SHOT flag value: 1 - One shot, 0 - Repeat
  4475. * This flag is only relevant if the START_STOP flag == 1 (start).
  4476. */
  4477. #define WMI_OFFLOAD_QUIET_FLAG_ONE_SHOT 0x00000002
  4478. /*
  4479. * Enable/Disable sending Quiet IE info in SWBA event from the target
  4480. * 0 - Don't include Quiet IE in WMI SWBA Event
  4481. * 1 - Include Quiet IE in WMI SWBA Event
  4482. */
  4483. #define WMI_OFFLOAD_QUIET_FLAG_INFO_IN_SWBA_START_STOP 0x00000004
  4484. typedef struct {
  4485. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param */
  4486. A_UINT32 vdev_id; /* Virtual interface ID */
  4487. A_UINT32 period; /* period in TUs */
  4488. A_UINT32 duration; /* duration in TUs */
  4489. A_UINT32 next_start; /* offset in TUs from beacon */
  4490. A_UINT32 flags; /* STOP or START (and single vs. repeated) Quiet IE
  4491. * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
  4492. */
  4493. } wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param;
  4494. typedef struct {
  4495. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
  4496. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom aggregation size will be applied. */
  4497. /* Size for tx aggregation for the vdev mentioned in vdev id
  4498. * (max MPDUs per A-MPDU or max MSDUs per A-MSDU based on aggr_type field)
  4499. */
  4500. A_UINT32 tx_aggr_size;
  4501. A_UINT32 rx_aggr_size; /* Size for rx aggregation (block ack window size limit) for the vdev mentioned in vdev id */
  4502. /*
  4503. * To set TX aggregation size limits per VDEV per AC
  4504. * bits 1:0 (ac):
  4505. * Access Category (0x0=BE, 0x1=BK, 0x2=VI, 0x3=VO)
  4506. * If tx_ac_enable bit is not set, tx_aggr_size is applied
  4507. * for all Access Categories
  4508. * bit 2 (aggr_type): TX Aggregation Type (0=A-MPDU, 1=A-MSDU)
  4509. * bit 3 (tx_aggr_size_disable): If set tx_aggr_size is invalid
  4510. * bit 4 (rx_aggr_size_disable): If set rx_aggr_size is invalid
  4511. * bit 5 (tx_ac_enable): If set, above ac bitmap is valid.
  4512. * bits 31:6: Reserved bits. should be set to zero.
  4513. */
  4514. A_UINT32 enable_bitmap;
  4515. } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
  4516. typedef enum {
  4517. WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU = 0,
  4518. WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU = 1,
  4519. WMI_VDEV_CUSTOM_AGGR_TYPE_MAX,
  4520. } wmi_vdev_custom_aggr_type_t;
  4521. #define WMI_VDEV_CUSTOM_AGGR_AC_BITPOS 0
  4522. #define WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS 2
  4523. #define WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS 2
  4524. #define WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS 1
  4525. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS 3
  4526. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS 1
  4527. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS 4
  4528. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS 1
  4529. #define WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS 5
  4530. #define WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS 1
  4531. #define WMI_VDEV_CUSTOM_AGGR_AC_SET(param, value) \
  4532. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  4533. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS, value)
  4534. #define WMI_VDEV_CUSTOM_AGGR_AC_GET(param) \
  4535. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  4536. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS)
  4537. #define WMI_VDEV_CUSTOM_AGGR_TYPE_SET(param, value) \
  4538. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  4539. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS, value)
  4540. #define WMI_VDEV_CUSTOM_AGGR_TYPE_GET(param) \
  4541. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  4542. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS)
  4543. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_SET(param, value) \
  4544. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  4545. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS, value)
  4546. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_GET(param) \
  4547. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  4548. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS)
  4549. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_SET(param, value) \
  4550. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  4551. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS, value)
  4552. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_GET(param) \
  4553. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  4554. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS)
  4555. #define WMI_VDEV_CUSTOM_TX_AC_EN_SET(param, value) \
  4556. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  4557. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS, value)
  4558. #define WMI_VDEV_CUSTOM_TX_AC_EN_GET(param) \
  4559. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  4560. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS)
  4561. typedef enum {
  4562. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_NONAGGR = 0,
  4563. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR = 1,
  4564. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_MAX,
  4565. } wmi_vdev_custom_sw_retry_type_t;
  4566. typedef struct {
  4567. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param */
  4568. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom software retries will be applied. */
  4569. A_UINT32 ac_type; /* access category (VI, VO, BE, BK) enum wmi_traffic_ac */
  4570. A_UINT32 sw_retry_type; /* 0 = non-aggr retry, 1 = aggr retry (wmi_vdev_custom_sw_retry_type_t enum) */
  4571. A_UINT32 sw_retry_th; /* max retry count per AC base on ac_type for the vdev mentioned in vdev id*/
  4572. } wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param;
  4573. typedef struct {
  4574. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_chainmask_config_cmd_fixed_param */
  4575. A_UINT32 tlv_header;
  4576. /* vdev id indicating to which the vdev, this chainmask configuration will be applied. */
  4577. A_UINT32 vdev_id;
  4578. /* number of chains to use for transmissions in 2.4 GHz band */
  4579. A_UINT32 num_tx_chains_2g;
  4580. /* number of chains to use for reception in 2.4 GHz band */
  4581. A_UINT32 num_rx_chains_2g;
  4582. /* nss to use for transmissions in 2.4 GHz band */
  4583. A_UINT32 tx_nss_2g;
  4584. /* nss to use for reception in 2.4 GHz band */
  4585. A_UINT32 rx_nss_2g;
  4586. /* number of chains to use for 11b transmissions. Valid only in 2.4 GHz */
  4587. A_UINT32 num_tx_chains_b;
  4588. /* number of chains to use for 11g transmissions. Valid only in 2.4 GHz */
  4589. A_UINT32 num_tx_chains_g;
  4590. /* number of chains to use for transmissions in 5 GHz band */
  4591. A_UINT32 num_tx_chains_5g;
  4592. /* number of chains to use for reception in 5 GHz band */
  4593. A_UINT32 num_rx_chains_5g;
  4594. /* nss to use for transmissions in 5 GHz band */
  4595. A_UINT32 tx_nss_5g;
  4596. /* nss to use for reception in 5 GHz band */
  4597. A_UINT32 rx_nss_5g;
  4598. /* number of chains to use for 11a transmissions. Valid only in 5 GHz */
  4599. A_UINT32 num_tx_chains_a;
  4600. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 2.4 GHz */
  4601. A_UINT32 disable_tx_mrc_2g;
  4602. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 2.4 GHz */
  4603. A_UINT32 disable_rx_mrc_2g;
  4604. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 5 GHz */
  4605. A_UINT32 disable_tx_mrc_5g;
  4606. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 5 GHz */
  4607. A_UINT32 disable_rx_mrc_5g;
  4608. } wmi_vdev_chainmask_config_cmd_fixed_param;
  4609. /*
  4610. * Command to enable/disable Green AP Power Save.
  4611. * This helps conserve power during AP operation. When the AP has no
  4612. * stations associated with it, the host can enable Green AP Power Save
  4613. * to request the firmware to shut down all but one transmit and receive
  4614. * chains.
  4615. */
  4616. typedef struct {
  4617. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
  4618. /** pdev_id for identifying the MAC
  4619. * See macros starting with WMI_PDEV_ID_ for values.
  4620. */
  4621. A_UINT32 pdev_id;
  4622. A_UINT32 enable; /*1:enable, 0:disable*/
  4623. } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
  4624. #define MAX_HT_IE_LEN 32
  4625. /* DEPRECATED */
  4626. typedef struct {
  4627. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
  4628. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  4629. A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
  4630. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  4631. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  4632. /** The TLV for the HT IE follows:
  4633. * A_UINT32 ie_data[];
  4634. */
  4635. } wmi_pdev_set_ht_ie_cmd_fixed_param;
  4636. #define MAX_VHT_IE_LEN 32
  4637. /* DEPRECATED */
  4638. typedef struct {
  4639. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
  4640. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  4641. A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
  4642. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  4643. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  4644. /** The TLV for the VHT IE follows:
  4645. * A_UINT32 ie_data[];
  4646. */
  4647. } wmi_pdev_set_vht_ie_cmd_fixed_param;
  4648. typedef struct {
  4649. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
  4650. /** pdev_id for identifying the MAC
  4651. * See macros starting with WMI_PDEV_ID_ for values.
  4652. */
  4653. A_UINT32 pdev_id;
  4654. wmi_mac_addr base_macaddr;
  4655. } wmi_pdev_set_base_macaddr_cmd_fixed_param;
  4656. /*
  4657. * For now, the spectral configuration is global rather than
  4658. * per-vdev. The vdev is a placeholder and will be ignored
  4659. * by the firmware.
  4660. */
  4661. typedef struct {
  4662. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
  4663. A_UINT32 vdev_id;
  4664. A_UINT32 spectral_scan_count;
  4665. A_UINT32 spectral_scan_period;
  4666. A_UINT32 spectral_scan_priority;
  4667. A_UINT32 spectral_scan_fft_size;
  4668. A_UINT32 spectral_scan_gc_ena;
  4669. A_UINT32 spectral_scan_restart_ena;
  4670. A_UINT32 spectral_scan_noise_floor_ref;
  4671. A_UINT32 spectral_scan_init_delay;
  4672. A_UINT32 spectral_scan_nb_tone_thr;
  4673. A_UINT32 spectral_scan_str_bin_thr;
  4674. A_UINT32 spectral_scan_wb_rpt_mode;
  4675. A_UINT32 spectral_scan_rssi_rpt_mode;
  4676. A_UINT32 spectral_scan_rssi_thr;
  4677. A_UINT32 spectral_scan_pwr_format;
  4678. A_UINT32 spectral_scan_rpt_mode;
  4679. A_UINT32 spectral_scan_bin_scale;
  4680. A_UINT32 spectral_scan_dBm_adj;
  4681. A_UINT32 spectral_scan_chn_mask;
  4682. } wmi_vdev_spectral_configure_cmd_fixed_param;
  4683. /*
  4684. * Enabling, disabling and triggering the spectral scan
  4685. * is a per-vdev operation. That is, it will set channel
  4686. * flags per vdev rather than globally; so concurrent scan/run
  4687. * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
  4688. */
  4689. typedef struct {
  4690. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
  4691. A_UINT32 vdev_id;
  4692. /* 0 - ignore; 1 - trigger, 2 - clear trigger */
  4693. A_UINT32 trigger_cmd;
  4694. /* 0 - ignore; 1 - enable, 2 - disable */
  4695. A_UINT32 enable_cmd;
  4696. } wmi_vdev_spectral_enable_cmd_fixed_param;
  4697. typedef struct {
  4698. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_tx_power_cmd_fixed_param */
  4699. A_UINT32 vdev_id;
  4700. } wmi_vdev_get_tx_power_cmd_fixed_param;
  4701. #define WMI_BEACON_CTRL_TX_DISABLE 0
  4702. #define WMI_BEACON_CTRL_TX_ENABLE 1
  4703. #define WMI_BEACON_CTRL_SWBA_EVENT_DISABLE 2
  4704. #define WMI_BEACON_CTRL_SWBA_EVENT_ENABLE 3
  4705. typedef struct {
  4706. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_offload_ctrl_cmd_fixed_param */
  4707. /** unique id identifying the VDEV, generated by the caller */
  4708. A_UINT32 vdev_id;
  4709. A_UINT32 bcn_ctrl_op; /* fw default 1 (see WMI_BEACON_CTRL defs) */
  4710. } wmi_bcn_offload_ctrl_cmd_fixed_param;
  4711. /** common structure used for wmi_vedv_get_tx_power_event */
  4712. typedef struct {
  4713. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tx_power_event_fixed_param */
  4714. A_UINT32 tx_power; /** units: 0.5 dBm, per-chain tx power */
  4715. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  4716. } wmi_vdev_get_tx_power_event_fixed_param;
  4717. typedef enum {
  4718. /** Limit the offchannel duration */
  4719. WMI_VDEV_LIMIT_OFFCHAN_ENABLE = 0x1,
  4720. /** Skip DFS channels from Scan channel list.
  4721. * valid for both host scans and FW scans */
  4722. WMI_VDEV_LIMIT_OFFCHAN_SKIP_DFS = 0x2,
  4723. } wmi_vdev_limit_offchan_flags;
  4724. typedef struct {
  4725. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_limit_offchan_cmd_fixed_param */
  4726. /** Limit the duration of offchannel events requested by the vdev corresponding to the specified vdev_id */
  4727. A_UINT32 vdev_id;
  4728. /** see enum wmi_vdev_limit_offchan_flags */
  4729. A_UINT32 flags;
  4730. /** max offchannel time allowed in msec when WMI_VDEV_LIMIT_OFFCHAN_ENABLE flag is set */
  4731. A_UINT32 max_offchan_time;
  4732. /** rest time in msec on the BSS channel */
  4733. A_UINT32 rest_time;
  4734. } wmi_vdev_limit_offchan_cmd_fixed_param;
  4735. #define WMI_CSA_EVENT_QSBW_ISE_ID_MASK 0x000000FF /* information sub element id for QSBW, expected value is 0x02 */
  4736. #define WMI_CSA_EVENT_QSBW_ISE_LEN_MASK 0x0000FF00 /* length of QSBW ISE data, expected value is 0x02 */
  4737. #define WMI_CSA_EVENT_QSBW_ISE_CAP_MASK 0x00FF0000 /* capabilities, 0x01 for 5MHz, 0x02 for 10MHz, 0x01|0x2 for both (see WMI_CSA_EVENT_QSBW_ISE bitmask defs) */
  4738. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_MASK 0xFF000000 /* notification from AP, 0x01 for 5MHz, 0x02 for 10MHz (see WMI_CSA_EVENT_QSBW_ISE bitmask defs) */
  4739. #define WMI_CSA_EVENT_QSBW_ISE_ID 0x02
  4740. #define WMI_CSA_EVENT_QSBW_ISE_LEN 0x02
  4741. #define WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK 0x01
  4742. #define WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK 0x02
  4743. #define WMI_CSA_EVENT_QSBW_ISE_CAP_5M(qsbw_ise) \
  4744. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  4745. #define WMI_CSA_EVENT_QSBW_ISE_CAP_10M(qsbw_ise) \
  4746. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  4747. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_5M(qsbw_ise) \
  4748. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  4749. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \
  4750. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  4751. typedef enum {
  4752. WMI_CSA_IE_PRESENT = 0x00000001,
  4753. WMI_XCSA_IE_PRESENT = 0x00000002,
  4754. WMI_WBW_IE_PRESENT = 0x00000004,
  4755. WMI_CSWARP_IE_PRESENT = 0x00000008,
  4756. WMI_QSBW_ISE_PRESENT = 0x00000010,
  4757. } WMI_CSA_EVENT_IES_PRESENT_FLAG;
  4758. /* wmi CSA receive event from beacon frame */
  4759. typedef struct {
  4760. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
  4761. A_UINT32 i_fc_dur; /* Bit 0-15: FC, Bit 16-31: DUR */
  4762. wmi_mac_addr i_addr1;
  4763. wmi_mac_addr i_addr2;
  4764. /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
  4765. * changed in the future without breaking WMI compatibility */
  4766. A_UINT32 csa_ie[2];
  4767. A_UINT32 xcsa_ie[2];
  4768. A_UINT32 wb_ie[2];
  4769. A_UINT32 cswarp_ie;
  4770. A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
  4771. A_UINT32 qsbw_ise;
  4772. } wmi_csa_event_fixed_param;
  4773. typedef enum {
  4774. WAL_PEER_MCAST2UCAST_DISABLED = 0,
  4775. WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1, /* Drop the frames if match is not found */
  4776. WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, /* Send as mcast if match is not found */
  4777. } WMI_PEER_MCAST2UCAST_MODE;
  4778. typedef enum {
  4779. PKT_PWR_SAVE_NAP_ENABLE = 0x00000001,
  4780. PKT_PWR_SAVE_LS_ENABLE = 0x00000002,
  4781. PKT_PWR_SAVE_DS_ENABLE = 0x00000004,
  4782. PKT_PWR_SAVE_BTCOEX_ENABLE = 0x00000008,
  4783. PKT_PWR_SAVE_FSM_ENABLE = 0x80000000,
  4784. } WMI_PDEV_PKT_PWR_SAVE_LEVEL;
  4785. /** MACROs to get user setting for enabling/disabling Secondary Rate Feature set
  4786. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  4787. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  4788. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  4789. * Bit 3-5 : "Xretry threshold" to use
  4790. * Bit 6~31 : reserved for future use.
  4791. */
  4792. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT_S 0
  4793. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT 0x00000001
  4794. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT_S 1
  4795. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT 0x00000002
  4796. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION_S 2
  4797. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION 0x00000004
  4798. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD_S 3
  4799. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD 0x00000038
  4800. #define WMI_PDEV_PARAM_IS_SECONDARY_RATE_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT)
  4801. #define WMI_PDEV_PARAM_IS_RTS_BL_WL_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT)
  4802. #define WMI_PDEV_PARAM_IS_HIGHER_MCS_XRETRY_RESTRICTION_SET(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION)
  4803. #define WMI_PDEV_PARAM_GET_XRETRY_THRESHOLD(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_XRETRY_THRESHOLD)
  4804. typedef enum {
  4805. /** TX chain mask */
  4806. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  4807. /** RX chain mask */
  4808. WMI_PDEV_PARAM_RX_CHAIN_MASK, /* 0x2 */
  4809. /** TX power limit for 2G Radio */
  4810. WMI_PDEV_PARAM_TXPOWER_LIMIT2G, /* 0x3 */
  4811. /** TX power limit for 5G Radio */
  4812. WMI_PDEV_PARAM_TXPOWER_LIMIT5G, /* 0x4 */
  4813. /** TX power scale */
  4814. WMI_PDEV_PARAM_TXPOWER_SCALE, /* 0x5 */
  4815. /** Beacon generation mode . 0: host, 1: target */
  4816. WMI_PDEV_PARAM_BEACON_GEN_MODE, /* 0x6 */
  4817. /** Beacon generation mode . 0: staggered 1: bursted */
  4818. WMI_PDEV_PARAM_BEACON_TX_MODE, /* 0x7 */
  4819. /** Resource manager off chan mode .
  4820. * 0: turn off off chan mode. 1: turn on offchan mode
  4821. */
  4822. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, /* 0x8 */
  4823. /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
  4824. WMI_PDEV_PARAM_PROTECTION_MODE, /* 0x9 */
  4825. /** Dynamic bandwidth 0: disable 1: enable */
  4826. WMI_PDEV_PARAM_DYNAMIC_BW, /* 0xa */
  4827. /** Non aggregrate/ 11g sw retry threshold.0-disable */
  4828. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0xb */
  4829. /** aggregrate sw retry threshold. 0-disable*/
  4830. WMI_PDEV_PARAM_AGG_SW_RETRY_TH, /* 0xc */
  4831. /** Station kickout threshold (non of consecutive failures).0-disable */
  4832. WMI_PDEV_PARAM_STA_KICKOUT_TH, /* 0xd */
  4833. /** Aggerate size scaling configuration per AC */
  4834. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, /* 0xe */
  4835. /** LTR enable */
  4836. WMI_PDEV_PARAM_LTR_ENABLE, /* 0xf */
  4837. /** LTR latency for BE, in us */
  4838. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, /* 0x10 */
  4839. /** LTR latency for BK, in us */
  4840. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, /* 0x11 */
  4841. /** LTR latency for VI, in us */
  4842. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, /* 0x12 */
  4843. /** LTR latency for VO, in us */
  4844. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, /* 0x13 */
  4845. /** LTR AC latency timeout, in ms */
  4846. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, /* 0x14 */
  4847. /** LTR platform latency override, in us */
  4848. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, /* 0x15 */
  4849. /** LTR-M override, in us */
  4850. WMI_PDEV_PARAM_LTR_RX_OVERRIDE, /* 0x16 */
  4851. /** Tx activity timeout for LTR, in us */
  4852. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, /* 0x17 */
  4853. /** L1SS state machine enable */
  4854. WMI_PDEV_PARAM_L1SS_ENABLE, /* 0x18 */
  4855. /** Deep sleep state machine enable */
  4856. WMI_PDEV_PARAM_DSLEEP_ENABLE, /* 0x19 */
  4857. /** RX buffering flush enable */
  4858. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, /* 0x1a */
  4859. /** RX buffering matermark */
  4860. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, /* 0x1b */
  4861. /** RX buffering timeout enable */
  4862. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, /* 0x1c */
  4863. /** RX buffering timeout value */
  4864. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, /* 0x1d */
  4865. /** pdev level stats update period in ms */
  4866. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, /* 0x1e */
  4867. /** vdev level stats update period in ms */
  4868. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, /* 0x1f */
  4869. /** peer level stats update period in ms */
  4870. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, /* 0x20 */
  4871. /** beacon filter status update period */
  4872. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, /* 0x21 */
  4873. /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  4874. WMI_PDEV_PARAM_PMF_QOS, /* 0x22 */
  4875. /** Access category on which ARP frames are sent */
  4876. WMI_PDEV_PARAM_ARP_AC_OVERRIDE, /* 0x23 */
  4877. /** DCS configuration */
  4878. WMI_PDEV_PARAM_DCS, /* 0x24 */
  4879. /** Enable/Disable ANI on target */
  4880. WMI_PDEV_PARAM_ANI_ENABLE, /* 0x25 */
  4881. /** configure the ANI polling period */
  4882. WMI_PDEV_PARAM_ANI_POLL_PERIOD, /* 0x26 */
  4883. /** configure the ANI listening period */
  4884. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, /* 0x27 */
  4885. /** configure OFDM immunity level */
  4886. WMI_PDEV_PARAM_ANI_OFDM_LEVEL, /* 0x28 */
  4887. /** configure CCK immunity level */
  4888. WMI_PDEV_PARAM_ANI_CCK_LEVEL, /* 0x29 */
  4889. /** Enable/Disable CDD for 1x1 STAs in rate control module */
  4890. WMI_PDEV_PARAM_DYNTXCHAIN, /* 0x2a */
  4891. /** Enable/Disable proxy STA */
  4892. WMI_PDEV_PARAM_PROXY_STA, /* 0x2b */
  4893. /** Enable/Disable low power state when all VDEVs are inactive/idle. */
  4894. WMI_PDEV_PARAM_IDLE_PS_CONFIG, /* 0x2c */
  4895. /** Enable/Disable power gating sleep */
  4896. WMI_PDEV_PARAM_POWER_GATING_SLEEP, /* 0x2d */
  4897. /** Enable/Disable Rfkill */
  4898. WMI_PDEV_PARAM_RFKILL_ENABLE, /* 0x2e */
  4899. /** Set Bursting DUR */
  4900. WMI_PDEV_PARAM_BURST_DUR, /* 0x2f */
  4901. /** Set Bursting ENABLE */
  4902. WMI_PDEV_PARAM_BURST_ENABLE, /* 0x30 */
  4903. /** HW rfkill config */
  4904. WMI_PDEV_PARAM_HW_RFKILL_CONFIG, /* 0x31 */
  4905. /** Enable radio low power features */
  4906. WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE, /* 0x32 */
  4907. /** L1SS entry and residency time track */
  4908. WMI_PDEV_PARAM_L1SS_TRACK, /* 0x33 */
  4909. /** set hyst at runtime, requirement from SS */
  4910. WMI_PDEV_PARAM_HYST_EN, /* 0x34 */
  4911. /** Enable/ Disable POWER COLLAPSE */
  4912. WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE, /* 0x35 */
  4913. /** configure LED system state */
  4914. WMI_PDEV_PARAM_LED_SYS_STATE, /* 0x36 */
  4915. /** Enable/Disable LED */
  4916. WMI_PDEV_PARAM_LED_ENABLE, /* 0x37 */
  4917. /** set DIRECT AUDIO time latency */
  4918. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */ /* 0x38 */
  4919. /** set DIRECT AUDIO Feature ENABLE */
  4920. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */ /* 0x39 */
  4921. /** pdev level whal mib stats update enable */
  4922. WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE, /* 0x3a */
  4923. /** ht/vht info based on vdev */
  4924. WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD, /* 0x3b */
  4925. /** Set CTS channel BW for dynamic BW adjustment feature */
  4926. WMI_PDEV_PARAM_CTS_CBW, /* 0x3c */
  4927. /** Set GPIO pin info used by WNTS */
  4928. WMI_PDEV_PARAM_WNTS_CONFIG, /* 0x3d */
  4929. /** Enable/Disable hardware adaptive early rx feature */
  4930. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE, /* 0x3e */
  4931. /** The minimum early rx duration, to ensure early rx duration is non-zero */
  4932. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP, /* 0x3f */
  4933. /** Increasing/decreasing step used by hardware */
  4934. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP, /* 0x40 */
  4935. /** The fixed early rx duration when adaptive early rx is disabled */
  4936. WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP, /* 0x41 */
  4937. /** Enable/Disable bmiss based adaptive beacon timeout feature */
  4938. WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE, /* 0x42 */
  4939. /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
  4940. WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT, /* 0x43 */
  4941. /** Increasing/decreasing step used by hardware */
  4942. WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP, /* 0x44 */
  4943. /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
  4944. WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT, /* 0x45 */
  4945. /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
  4946. WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE, /* 0x46 */
  4947. /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
  4948. WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE, /* 0x47 */
  4949. /** 2G TX chain mask */
  4950. WMI_PDEV_PARAM_TX_CHAIN_MASK_2G, /* 0x48 */
  4951. /** 2G RX chain mask */
  4952. WMI_PDEV_PARAM_RX_CHAIN_MASK_2G, /* 0x49 */
  4953. /** 5G TX chain mask */
  4954. WMI_PDEV_PARAM_TX_CHAIN_MASK_5G, /* 0x4a */
  4955. /** 5G RX chain mask */
  4956. WMI_PDEV_PARAM_RX_CHAIN_MASK_5G, /* 0x4b */
  4957. /* Set tx chain mask for CCK rates */
  4958. WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK, /* 0x4c */
  4959. /* Set tx chain mask for 1SS stream */
  4960. WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS, /* 0x4d */
  4961. /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected */
  4962. WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG, /* 0x4e */
  4963. /** TX power backoff in dB: tx power -= param value
  4964. * Host passes values(DB) to Halphy, Halphy reduces the power table by
  4965. * the values. Safety check will happen in Halphy
  4966. */
  4967. WMI_PDEV_PARAM_TXPOWER_DECR_DB, /* 0x4f */
  4968. /** enable and disable aggregate burst along with duration */
  4969. WMI_PDEV_PARAM_AGGR_BURST, /* 0x50 */
  4970. /** Set the global RX decap mode */
  4971. WMI_PDEV_PARAM_RX_DECAP_MODE, /* 0x51 */
  4972. /** Enable/Disable Fast channel reset */
  4973. WMI_PDEV_PARAM_FAST_CHANNEL_RESET, /* 0x52 */
  4974. /** Default antenna for Smart antenna */
  4975. WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, /* 0x53 */
  4976. /** Set the user-specified antenna gain */
  4977. WMI_PDEV_PARAM_ANTENNA_GAIN, /* 0x54 */
  4978. /** Set the user-specified RX filter */
  4979. WMI_PDEV_PARAM_RX_FILTER, /* 0x55 */
  4980. /** configure the user-specified MCAST tid for managed mcast feature
  4981. * 0-15 is the valid range. 0xff will clear the tid setting */
  4982. WMI_PDEV_SET_MCAST_TO_UCAST_TID, /* 0x56 */
  4983. /** Enable/Disable Proxy sta mode */
  4984. WMI_PDEV_PARAM_PROXY_STA_MODE, /* 0x57 */
  4985. /** configure the mcast2ucast mode for the pdev->peer_mcast.
  4986. * See WMI_PEER_MCAST2UCAST_MODE for possible values */
  4987. WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE, /* 0x58 */
  4988. /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
  4989. WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, /* 0x59 */
  4990. /** Remove the Mcast buffers added by host */
  4991. WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, /* 0x5a */
  4992. /** En/disable station power save state indication */
  4993. WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE, /* 0x5b */
  4994. /** Access category on which ARP frames are sent */
  4995. WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE, /* 0x5c */
  4996. /** allow or disallow interbss frame forwarding */
  4997. WMI_PDEV_PARAM_BLOCK_INTERBSS, /* 0x5d */
  4998. /** Enable/Disable reset */
  4999. WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID, /* 0x5e */
  5000. /** Enable/Disable/Set MSDU_TTL in milliseconds. */
  5001. WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID, /* 0x5f */
  5002. /** Set global PPDU duration limit (usec). */
  5003. WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID, /* 0x60 */
  5004. /** set txbf sounding period of vap in milliseconds */
  5005. WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID, /* 0x61 */
  5006. /** Set promiscuous mode */
  5007. WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID, /* 0x62 */
  5008. /** Set burst mode */
  5009. WMI_PDEV_PARAM_SET_BURST_MODE_CMDID, /* 0x63 */
  5010. /** enable enhanced stats */
  5011. WMI_PDEV_PARAM_EN_STATS, /* 0x64 */
  5012. /** Set mu-grouping policy */
  5013. WMI_PDEV_PARAM_MU_GROUP_POLICY, /* 0x65 */
  5014. /** Channel Hopping Enable */
  5015. WMI_PDEV_PARAM_NOISE_DETECTION, /* 0x66 */
  5016. /** Set Channel Hopping NF threshold in dBm */
  5017. WMI_PDEV_PARAM_NOISE_THRESHOLD, /* 0x67 */
  5018. /** Set PAPRD policy */
  5019. WMI_PDEV_PARAM_DPD_ENABLE, /* 0x68 */
  5020. /** Enable/disable mcast/bcast echo, used by ProxySTA */
  5021. WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO, /* 0x69 */
  5022. /** ATF enable/disable strict schedule */
  5023. WMI_PDEV_PARAM_ATF_STRICT_SCH, /* 0x6a */
  5024. /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
  5025. WMI_PDEV_PARAM_ATF_SCHED_DURATION, /* 0x6b */
  5026. /** Default antenna polarization */
  5027. WMI_PDEV_PARAM_ANT_PLZN, /* 0x6c */
  5028. /** Set mgmt retry limit */
  5029. WMI_PDEV_PARAM_MGMT_RETRY_LIMIT, /* 0x6d */
  5030. /** Set CCA sensitivity level in dBm */
  5031. WMI_PDEV_PARAM_SENSITIVITY_LEVEL, /* 0x6e */
  5032. /** Set 2G positive and negative Tx power in 0.5dBm units */
  5033. WMI_PDEV_PARAM_SIGNED_TXPOWER_2G, /* 0x6f */
  5034. /** Set 5G positive and negative Tx power in 0.5dBm
  5035. * units */
  5036. WMI_PDEV_PARAM_SIGNED_TXPOWER_5G, /* 0x70 */
  5037. /** Enable/disble AMSDU for tids */
  5038. WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU, /* 0x71 */
  5039. /** Enable/disable AMPDU for tids */
  5040. WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU, /* 0x72 */
  5041. /** Set CCA threshold in dBm */
  5042. WMI_PDEV_PARAM_CCA_THRESHOLD, /* 0x73 */
  5043. /** RTS Fixed rate setting */
  5044. WMI_PDEV_PARAM_RTS_FIXED_RATE, /* 0x74 */
  5045. /** Pdev reset */
  5046. WMI_PDEV_PARAM_PDEV_RESET, /* 0x75 */
  5047. /** wapi mbssid offset **/
  5048. WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET, /* 0x76 */
  5049. /** ARP DEBUG source address*/
  5050. WMI_PDEV_PARAM_ARP_DBG_SRCADDR, /* 0x77 */
  5051. /** ARP DEBUG destination address*/
  5052. WMI_PDEV_PARAM_ARP_DBG_DSTADDR, /* 0x78 */
  5053. /** ATF enable/disable obss noise scheduling */
  5054. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH, /* 0x79 */
  5055. /** ATF obss noise scaling factor */
  5056. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR, /* 0x7a */
  5057. /**
  5058. * TX power reduction scaling exponent - final tx power is the
  5059. * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
  5060. * 2^(scale exponent). For example:
  5061. * If this scale exponent is 0, the power is unchanged (divided by 2^0)
  5062. * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
  5063. * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
  5064. * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
  5065. */
  5066. WMI_PDEV_PARAM_CUST_TXPOWER_SCALE, /* 0x7b */
  5067. /** ATF enabe/disabe dynamically */
  5068. WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE, /* 0x7c */
  5069. /** Set tx retry limit for control frames. 0 = disable, 31 = max */
  5070. WMI_PDEV_PARAM_CTRL_RETRY_LIMIT, /* 0x7d */
  5071. /** Set propagation delay for 2G / 5G band.
  5072. * The propagation delay is fundamentally a per-peer property, but
  5073. * the target may not support per-peer settings for ack timeouts.
  5074. * This pdev parameter allows the MAC-level ack timeout to be set to
  5075. * a value suitable for the worst-case propagation delay of any peer
  5076. * within that pdev.
  5077. * Units are microseconds.
  5078. */
  5079. WMI_PDEV_PARAM_PROPAGATION_DELAY, /* 0x7e */
  5080. /**
  5081. * Host can enable/disable ANT DIV feature
  5082. * if it's been enabled in BDF
  5083. */
  5084. WMI_PDEV_PARAM_ENA_ANT_DIV, /* 0x7f */
  5085. /** Host can force one chain to select a specific ANT */
  5086. WMI_PDEV_PARAM_FORCE_CHAIN_ANT, /* 0x80 */
  5087. /**
  5088. * Start a cycle ANT self test periodically.
  5089. * In the test, the FW would select each ANT pair
  5090. * one by one, the cycle time could be configured
  5091. * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
  5092. */
  5093. WMI_PDEV_PARAM_ANT_DIV_SELFTEST, /* 0x81 */
  5094. /**
  5095. * Configure the cycle time of ANT self test,
  5096. * the unit is micro second. Per the timer
  5097. * limitation, too small value could be not so
  5098. * accurate.
  5099. */
  5100. WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL, /* 0x82 */
  5101. /**
  5102. * wlan stats observation period, the unit is millisecond.
  5103. * The value of 0 is used to turn off periodic stats report.
  5104. */
  5105. WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD, /* 0x83 */
  5106. /**
  5107. * Set tx_ppdu_delay[] bin size to specify how many
  5108. * milliseconds each bin of the wmi_tx_stats.tx_ppdu_delay[]
  5109. * histogram represents.
  5110. */
  5111. WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS, /* 0x84 */
  5112. /** set wmi_tx_stats.tx_ppdu_delay[] array length */
  5113. WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN, /* 0x85 */
  5114. /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
  5115. WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN, /* 0x86 */
  5116. /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
  5117. WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN, /* 0x87 */
  5118. /** Set TX delay value in TX sch module, unit is microseconds */
  5119. WMI_PDEV_PARAM_TX_SCH_DELAY, /* 0x88 */
  5120. /** Set RTS enable for SIFS bursting */
  5121. WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING, /* 0x89 */
  5122. /** Set Maximum number of MPDUs in an AMPDU*/
  5123. WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU, /* 0x8a */
  5124. /** Enable/disable peer stats info mechanism
  5125. * A zero value disables; a non-zero value enables.
  5126. */
  5127. WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE, /* 0x8b */
  5128. /** Configure Fast PWR Transition mode
  5129. * 0x0 -> inidcates Fast PWR transition disabled
  5130. * 0x1 -> indicates Static mode enabled
  5131. * 0x2 -> indicates Dynamic mode enabled
  5132. */
  5133. WMI_PDEV_PARAM_FAST_PWR_TRANSITION, /* 0x8c */
  5134. /** Enable/disable radio channel stats mechanism
  5135. * A zero value disables; a non-zero value enables.
  5136. */
  5137. WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE, /* 0x8d */
  5138. /** Enable/disable radio diagnosis feature
  5139. * which allows retrieving the status of radio.
  5140. * A zero value disables; a non-zero value enables.
  5141. */
  5142. WMI_PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE, /* 0x8e */
  5143. /** Enable/Disable mesh mcast traffic
  5144. * 1 - Allow mesh mcast traffic
  5145. * 0 - Disallow mesh mcast traffic
  5146. */
  5147. WMI_PDEV_PARAM_MESH_MCAST_ENABLE, /* 0x8f */
  5148. /** Enable/Disable smart chainmask scheme
  5149. * 1 - Enable smart chainmask scheme
  5150. * 0 - Disable smart chainmask scheme
  5151. */
  5152. WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME, /* 0x90 */
  5153. /** Enable/Disable alternate chainmask scheme
  5154. * 1 - Enable alternate chainmask scheme
  5155. * 0 - Disable alternate chainmask scheme
  5156. */
  5157. WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME, /* 0x91 */
  5158. /** User configured parameters for antenna diversity algorithm
  5159. * BIT[25..13]: Probe period (milliseconds units)
  5160. * BIT[12..0]: Stay period (milliseconds units)
  5161. */
  5162. WMI_PDEV_PARAM_ANT_DIV_USRCFG, /* 0x92 */
  5163. /** pdev packet power save levels,
  5164. * refer to WMI_PDEV_PKT_PWR_SAVE_LEVEL
  5165. */
  5166. WMI_PDEV_PARAM_PACKET_POWER_SAVE_LEVEL, /* 0x93 */
  5167. /** Define IOT pattern to be enabled/disabled
  5168. * bit values: 0 - disable, 1 - enable
  5169. * BIT[0..31]: each bit represents an IOT pattern
  5170. * -----
  5171. * Bit 0 - avoid SMPS with certain APs
  5172. * Bits 31:1 - reserved
  5173. */
  5174. WMI_PDEV_PARAM_SET_IOT_PATTERN, /* 0x94 */
  5175. /** ACK timeout - change wireless packet ack timeout configuration,
  5176. * units are microseconds
  5177. */
  5178. WMI_PDEV_PARAM_ACK_TIMEOUT, /* 0x95 */
  5179. /** Number of TX chains to use for a/b/g rates.
  5180. * bit 0~15 : 11b mode TX chain number.
  5181. * bit 16~31 : 11ag mode TX chain number.
  5182. */
  5183. WMI_PDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x96 */
  5184. /** Enable/Disable cck txfir override
  5185. * bit 0 - enable (1) or disable (0) CCK tx FIR
  5186. * bits 31:1 - unused / reserved (set to 0)
  5187. */
  5188. WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE, /* 0x97 */
  5189. /** Enable/Disable DTIM Synth
  5190. * 1- Enable DTIM Synth
  5191. * 0- Disable DTIM Synth
  5192. */
  5193. WMI_PDEV_PARAM_DTIM_SYNTH, /* 0x98 */
  5194. /** Configure auto detect power failure feature.
  5195. * 0 - FW will trigger crash if power failure happens.
  5196. * 1 - FW will send a failure notification to host, and the host
  5197. * framework determines how to respond to the power failure
  5198. * 2 - Silently rejuvenate if power failure occurs.
  5199. * 3 - Feature disabled.
  5200. */
  5201. WMI_PDEV_AUTO_DETECT_POWER_FAILURE, /* 0x99 */
  5202. /** Configure operating voltage corner mode based on phymode and bw.
  5203. * bit 0-1 - operating voltage corner mode for 11a/b.
  5204. * bit 2-3 - operating voltage corner mode for 11g.
  5205. * bit 4-5 - operating voltage corner mode for 11n, 20MHz, 1x1.
  5206. * bit 6-7 - operating voltage corner mode for 11n, 20MHz, 2x2.
  5207. * bit 8-9 - operating voltage corner mode for 11n, 40MHz, 1x1.
  5208. * bit 10-11 - operating voltage corner mode for 11n, 40MHz, 2x2.
  5209. * bit 12-13 - operating voltage corner mode for 11ac, 20MHz, 1x1.
  5210. * bit 14-15 - operating voltage corner mode for 11ac, 20MHz, 2x2.
  5211. * bit 16-17 - operating voltage corner mode for 11ac, 40MHz, 1x1.
  5212. * bit 18-19 - operating voltage corner mode for 11ac, 40MHz, 2x2.
  5213. * bit 20-21 - operating voltage corner mode for 11ac, 80MHz, 1x1.
  5214. * bit 22-23 - operating voltage corner mode for 11ac, 80MHz, 2x2.
  5215. * bit 24-25 - operating voltage corner mode for 11ac, 160MHz, 1x1.
  5216. * bit 26-27 - operating voltage corner mode for 11ac, 160MHz, 2x2.
  5217. * ---------------------------------------------
  5218. * 00 - Static voltage corner SVS
  5219. * 01 - static voltage corner LOW SVS
  5220. * 10 - Dynamic voltage corner selection based on TPUT
  5221. * 11 - Dynamic voltage corner selection based on TPUT and Tx Flush counters
  5222. */
  5223. WMI_PDEV_UPDATE_WDCVS_ALGO, /* 0x9a */
  5224. /* Enable/Disable data stall detection */
  5225. WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE, /* 0x9b */
  5226. /* GCMP Support indication to FW */
  5227. WMI_PDEV_PARAM_GCMP_SUPPORT_ENABLE, /* 0x9c */
  5228. /** Enable/Disable chain selection optimization for one chain dtim
  5229. * non-zero - Enable optimization and use this non-zero value as the
  5230. * chain imbalance threshold for optimization to kick in
  5231. * (units = dB)
  5232. * 0- Disable optimization
  5233. */
  5234. WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION,/* 0x9d */
  5235. /*
  5236. * Override default FW behavior and explicitly enable / disable
  5237. * the use of CCK for PPDU transmissions.
  5238. *
  5239. * When CCK transmissions are disabled, the default OFDM legacy
  5240. * rate will be used instead.
  5241. */
  5242. WMI_PDEV_PARAM_CCK_TX_ENABLE, /* 0x9e */
  5243. /*
  5244. * Set the user-specified antenna gain, but in 0.5 dB units.
  5245. * This is a finer-granularity version of WMI_PDEV_PARAM_ANTENNA_GAIN.
  5246. * E.g. to set a gain of 15.5 dB, a value of 31 could be provided as the
  5247. * value accompanying the PDEV_PARAM_ANTENNA_GAIN_HALF_DB parameter type.
  5248. */
  5249. WMI_PDEV_PARAM_ANTENNA_GAIN_HALF_DB, /* 0x9f */
  5250. /*
  5251. * Global Enable/Disable control for Secondary Retry Feature Set
  5252. *
  5253. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  5254. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  5255. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  5256. * Bit 3-5: "Xretry threshold" to use
  5257. */
  5258. WMI_PDEV_PARAM_SECONDARY_RETRY_ENABLE, /* 0xA0 */
  5259. /** Set global uplink triggered PPDU duration limit (usec). */
  5260. WMI_PDEV_PARAM_SET_UL_PPDU_DURATION, /* 0xA1 */
  5261. /** Set target buffer status report trigger interval (ms) */
  5262. WMI_PDEV_PARAM_SET_UL_BSR_TRIG_INTERVAL, /* 0xA2 */
  5263. /** Use simplified equal RU allocation for DL and UL OFDMA */
  5264. WMI_PDEV_PARAM_EQUAL_RU_ALLOCATION_ENABLE, /* 0xA3 */
  5265. /** Enable/disable MWS-COEX 4G (LTE) Quick FTDM.
  5266. * 0 - Don't allow quick FTDM Policy (Default)
  5267. * 1 - Allow quick FTDM policy.
  5268. */
  5269. WMI_PDEV_PARAM_MWSCOEX_4G_ALLOW_QUICK_FTDM, /* 0xA4 */
  5270. /** Set MWS-COEX 5G-NR power limit.
  5271. * 0: Don't apply user specific power limit,
  5272. * use internal power limit (Default)
  5273. * 1-2: invalid value (ignored)
  5274. * 3-21: apply the specified value as the external power limit, in dBm
  5275. * >21: invalid value (ignored)
  5276. */
  5277. WMI_PDEV_PARAM_MWSCOEX_SET_5GNR_PWR_LIMIT, /* 0xA5 */
  5278. /** Set max msdus available for cong ctrl in target */
  5279. WMI_PDEV_PARAM_SET_CONG_CTRL_MAX_MSDUS, /* 0xA6 */
  5280. /*
  5281. * Configures the Estimated Throughput Calculation indication (802.11mc) settings.
  5282. * The accompanying A_UINT32 parameter, in units of seconds, specifies how often FW needs to send the ESP estimation indication to the host.
  5283. * Value 0: Disable this feature
  5284. * Non zero Value: Periodicity (seconds)
  5285. */
  5286. WMI_PDEV_PARAM_ESP_INDICATION_PERIOD, /* 0xA7 */
  5287. /*
  5288. * Enable/Disable periodic peer CFR capture
  5289. * WMI_PEER_CFR_CAPTURE_ENABLE - Enable per peer periodic CFR capture
  5290. * WMI_PEER_CFR_CAPTURE_DISABLE - Disable per peer periodic CFR capture
  5291. */
  5292. WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE,
  5293. /*
  5294. * Set the base timer for the periodic CFR capture. By default this is 10ms.
  5295. * The period ('periodicity' param in wmi_peer_cfr_capture_cmd) of
  5296. * CFR measurment of other peers will be in multiples of this base timer.
  5297. * The unit is in milliseconds.
  5298. */
  5299. WMI_PDEV_PARAM_PERIODIC_CFR_BASE_TIMER,
  5300. /*
  5301. * Once the periodic capture is enabled using
  5302. * WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE, the timer starts running in
  5303. * the target. This parameter will ensure that the timer stops if there are
  5304. * no active peers in the capture list. Once the peers are added again to
  5305. * the capture list, the timer will not start again. The timer has to be
  5306. * started again using WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE.
  5307. * Value 1: Enable this feature
  5308. * Value 0: Disable this feature
  5309. */
  5310. WMI_PDEV_PARAM_ENABLE_OPTIMIZED_PERIODIC_CFR_TIMER,
  5311. /*
  5312. * Configures a portion of the Estimated Service Params indication
  5313. * (802.11mc) settings, which together specify estimated throughput.
  5314. * The accompanying A_UINT32 parameter is the ESP BA WINDOW size advertised
  5315. * Value 0: Disable this feature
  5316. * Non zero Value: ESP BA WINDOW size
  5317. */
  5318. WMI_PDEV_PARAM_ESP_BA_WINDOW,
  5319. /*
  5320. * Configures a portion of the Estimated Service Params indication
  5321. * (802.11mc) settings, which together specify estimated throughput.
  5322. * The accompanying A_UINT32 parameter is the air time fraction to be
  5323. * advertised in the ESP IE
  5324. * Value 0: Disable this feature
  5325. * Non zero Value: Air time fraction in percentage
  5326. */
  5327. WMI_PDEV_PARAM_ESP_AIRTIME_FRACTION,
  5328. /*
  5329. * Configures a portion of the Estimated Service Params indication
  5330. * (802.11mc) settings, which together specify estimated throughput.
  5331. * The accompanying A_UINT32 parameter specifies PPDU duration in units
  5332. * of milliseconds.
  5333. * Value 0: Disable this feature
  5334. * Non zero Value: PPDU duration in milliseconds
  5335. */
  5336. WMI_PDEV_PARAM_ESP_PPDU_DURATION,
  5337. /*
  5338. * Enable/Disable NOL(Non Occupancy list) in firmware
  5339. * 1- Use NOL in firmware
  5340. * 0- Don't use NOL in firmware
  5341. */
  5342. WMI_PDEV_PARAM_USE_NOL,
  5343. /*
  5344. * Allow / Not Allow RU26 in any user's RU allocation field in UL OFDMA
  5345. * trigger frames sent by AP
  5346. * 1 - Allow RU26
  5347. * 0 - Do not allow RU26
  5348. */
  5349. WMI_PDEV_PARAM_UL_RU26_ALLOWED,
  5350. /*
  5351. * Enable/Disable sub channel marking
  5352. * 1 - Enable sub channel marking
  5353. * 0 - Disable sub channel marking (default value)
  5354. */
  5355. WMI_PDEV_PARAM_SUB_CHANNEL_MARKING,
  5356. /*
  5357. * Enable/Disable/Set MGMT_TTL in milliseconds.
  5358. * non_zero - Enable, with the specified value
  5359. * 0 - Disable
  5360. */
  5361. WMI_PDEV_PARAM_SET_MGMT_TTL,
  5362. /*
  5363. * Enable/Disable/Set PROBE_RESP_TTL in milliseconds.
  5364. * non_zero - Enable, with the specified value
  5365. * 0 - Disable
  5366. */
  5367. WMI_PDEV_PARAM_SET_PROBE_RESP_TTL,
  5368. /*
  5369. * TBTT_CTRL_CFG
  5370. * BITS 0 - 2 (refer to WMI_TBTT_CTRL_CFG enum)
  5371. * 0 - DEFAULT -> HW_TBTT
  5372. * 1 - SW_TBTT -> HW_TBTT disabled,
  5373. * software would truncate BURST near TBTT
  5374. * 2 - IGNORE_TBTT
  5375. *
  5376. * BITS 3 - 31 Reserved, must be set to 0x0
  5377. */
  5378. WMI_PDEV_PARAM_SET_TBTT_CTRL,
  5379. /*
  5380. * BITS0 ~1 (refer to enum)
  5381. * 0 - default --> always update
  5382. * 1 - ignore to update
  5383. * 2 - update if larger than threshould
  5384. * 3 - update if less or equal than threshould
  5385. *
  5386. * BITS 2 ~ 31 Threshould
  5387. */
  5388. WMI_PDEV_PARAM_NAV_OVERRIDE_CONFIG,
  5389. /* Set global MU PPDU duration for DL (usec units) */
  5390. WMI_PDEV_PARAM_SET_MU_PPDU_DURATION,
  5391. /*
  5392. * Enable / disable test mode configuration.
  5393. * By default FW will always send triggers dynamically (mix of BSR/Basic).
  5394. * The below testmode are only used for certain tests.
  5395. * A value of 1 in a given bit enables corresponding test mode.
  5396. * bit | test mode
  5397. * ---------------
  5398. * 0 | FW only sends BSR triggers.
  5399. * 1 | FW only sends Basic triggers.
  5400. * 2 | If set, FW enables MU-RTS trigger.
  5401. * | If cleared, FW uses implementation-specific internal default setting.
  5402. * 3 | FW enables unicast embedded trigger in HE MU PPDU.
  5403. * 4-31| reserved.
  5404. */
  5405. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_TYPE_ENABLE,
  5406. /*
  5407. * Configure test command to set LSIG len.
  5408. * Value 0: Dynamic LSIG based on STA's qdepth.
  5409. * Non zero Value: LSIG length to be configured
  5410. * as part of trigger frame.
  5411. * bit |
  5412. * ---------------
  5413. * 0 - 30 | Bits storing the host supplied <value>.
  5414. * 31 | If set: The legitimate value closest to the value specified in
  5415. * | in bits 30:0 is directly set in UL len in trigger frame.
  5416. * | The FW performs calculations to determine which legitimate
  5417. * | value is closest to the specified value, if the specified
  5418. * | value is not already legitimate.
  5419. * | If not set: The value in lower bits is the duration (in ms),
  5420. * | from which the UL len is derived.
  5421. * | Example: if host sets 2000 (2ms), then UL Len in trigger
  5422. * | will be derived to accomodate the given duration.
  5423. */
  5424. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_LSIG_LEN,
  5425. /*
  5426. * Configure test cmd for fixed rate setting used for UL Trigger
  5427. * (only Basic/BSR triggers).
  5428. * The top nibble is used to select which format to use for encoding
  5429. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  5430. * format.
  5431. * If V == 0b0001: format is: 0x1000RRRR.
  5432. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  5433. *
  5434. */
  5435. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_FIXED_RATE,
  5436. /*
  5437. * Configure test command to set the mac padding duration.
  5438. * 0 - FW set Mac Padding to 0us
  5439. * 1 - FW set Mac Padding to 8us
  5440. * 2 - FW set Mac Padding to 16us
  5441. */
  5442. WMI_PDEV_PARAM_SET_TEST_CMD_UL_MAC_PADDING,
  5443. /*
  5444. * Configure test command to set the fc duration in BSR trigger frame.
  5445. * value 0 - FW calulates the duration(default).
  5446. * Non zero Value: Duration to be configured.
  5447. */
  5448. WMI_PDEV_PARAM_SET_TEST_CMD_UL_BSR_FC_DURATION,
  5449. /* Parameter used for configuring TWT scheduling properties
  5450. * bit | config_mode
  5451. * -----------------
  5452. * 0 | Disables DL MU for TWT peers within TWT SP
  5453. * 1 | Disables UL MU for TWT peers within TWT SP
  5454. * 2 | Disables scheduling from WMM sched context for TWT peers
  5455. * 3 | If set, FW only sends Basic triggers in TWT SP.
  5456. * 4-31| reserved.
  5457. */
  5458. WMI_PDEV_PARAM_SET_TEST_CMD_TWT_SCHED_CONFIG,
  5459. /* Parameter used to configure OBSS Packet Detect threshold
  5460. * for Spatial Reuse feature.
  5461. * The accepted values are in between 0x00 and 0xFF, inclusive.
  5462. * The parameter value is programmed into the spatial reuse register,
  5463. * to specify how low the background signal strength from neighboring
  5464. * BSS cells must be, for this AP to employ spatial reuse.
  5465. *
  5466. * The value of the parameter is compared against the OBSS RSSI in dB.
  5467. * It is a 8-bit value whose
  5468. * range is -128 to 127 (after two's complement operation).
  5469. * For example, if the parameter value is 0xF5, the target will
  5470. * allow spatial reuse if the RSSI detected from other BSS
  5471. * is below -10 dB.
  5472. * Similarly, if the parameter value is 0x0A, the target will
  5473. * allow spatial reuse only if the RSSI detected from neighboring
  5474. * BSS cells is no more than 10 dB.
  5475. *
  5476. * bit | purpose
  5477. * -------------
  5478. * 0 - 7 | Param Value
  5479. * 8 - 30 | reserved
  5480. * 31 | Enable/Disable. If set to 0, ignore bits 0-7.
  5481. */
  5482. WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD,
  5483. /* Parameter used for enabling/disabling non wlan coex from boot */
  5484. WMI_PDEV_PARAM_ENABLE_NON_WLAN_COEX_FROM_BOOT,
  5485. /* Parameter used to configure OBSS Packet Detection per Access Category
  5486. * for Spatial Reuse feature.
  5487. * Based on the bits set, the corresponding Access Category Queues will have
  5488. * spatial reuse enabled / disabled.
  5489. * bit | AC
  5490. * -----------
  5491. * 0 | BK
  5492. * 1 | BE
  5493. * 2 | VI
  5494. * 3 | VO
  5495. * 4 - 31 | Reserved
  5496. */
  5497. WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC,
  5498. } WMI_PDEV_PARAM;
  5499. #define WMI_PDEV_ONLY_BSR_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 0, 1)
  5500. #define WMI_PDEV_ONLY_BSR_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 1)
  5501. #define WMI_PDEV_ONLY_BSR_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 0)
  5502. #define WMI_PDEV_ONLY_BASIC_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 1, 1)
  5503. #define WMI_PDEV_ONLY_BASIC_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 1)
  5504. #define WMI_PDEV_ONLY_BASIC_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 0)
  5505. #define WMI_PDEV_MU_RTS_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 2, 1)
  5506. #define WMI_PDEV_MU_RTS_ENABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 1)
  5507. #define WMI_PDEV_MU_RTS_DISABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 0)
  5508. #define WMI_PDEV_EMBEDDED_TRIGGER_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 3, 1)
  5509. #define WMI_PDEV_EMBEDDED_TRIGGER_ENABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 1)
  5510. #define WMI_PDEV_EMBEDDED_TRIGGER_DISABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 0)
  5511. #define WMI_PDEV_TWT_SCHED_CFG_IS_DL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 0, 1)
  5512. #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 1)
  5513. #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 0)
  5514. #define WMI_PDEV_TWT_SCHED_CFG_IS_UL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 1, 1)
  5515. #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 1)
  5516. #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 0)
  5517. #define WMI_PDEV_TWT_SCHED_CFG_IS_WMM_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 2, 1)
  5518. #define WMI_PDEV_TWT_SCHED_CFG_WMM_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 1)
  5519. #define WMI_PDEV_TWT_SCHED_CFG_WMM_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 0)
  5520. #define WMI_PDEV_TWT_SCHED_CFG_IS_USE_ONLY_BASIC_TRIGGER_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 3, 1)
  5521. #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 1)
  5522. #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 0)
  5523. #define WMI_PDEV_LSIG_LEN_DURATION_ENABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 1)
  5524. #define WMI_PDEV_LSIG_LEN_DURATION_DISABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 0)
  5525. #define WMI_PDEV_LSIG_LEN_DURATION_GET(lsig_len) WMI_GET_BITS(lsig_len, 0, 30)
  5526. #define WMI_PDEV_LSIG_LEN_DURATION_SET(lsig_len, value) WMI_SET_BITS(lsig_len, 0, 30, value)
  5527. typedef struct {
  5528. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
  5529. /** pdev_id for identifying the MAC
  5530. * See macros starting with WMI_PDEV_ID_ for values.
  5531. */
  5532. A_UINT32 pdev_id;
  5533. /** parameter id */
  5534. A_UINT32 param_id; /* WMI_PDEV_PARAM */
  5535. /** parameter value */
  5536. A_UINT32 param_value;
  5537. } wmi_pdev_set_param_cmd_fixed_param;
  5538. /* param values for WMI_PDEV_PARAM_SET_TBTT_CTRL's TBTT_CTRL_CFG bit-field */
  5539. typedef enum {
  5540. WMI_TBTT_CTRL_HW_TRUNCATE = 0,
  5541. WMI_TBTT_CTRL_SW_TRUNCATE,
  5542. WMI_TBTT_CTRL_IGNORE_TBTT,
  5543. WMI_TBTT_CTRL_MAX = 0x7,
  5544. } WMI_TBTT_CTRL_CFG;
  5545. /** MACRO to set / get TBTT_CTRL_CFG bit-field within
  5546. * WMI_PDEV_PARAM_SET_TBTT_CTRL:
  5547. * bits 0~2 : TBTT_CTRL_CFG
  5548. * bits 3~31: Reserved (set to 0x0)
  5549. */
  5550. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG_S 0
  5551. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG 0x00000007
  5552. #define WMI_PDEV_PARAM_GET_TBTT_CTRL_CFG(word32) \
  5553. WMI_F_MS(word32, WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  5554. #define WMI_PDEV_PARAM_SET_TBTT_CTRL_CFG(word32, value) \
  5555. WMI_F_RMW(word32,value,WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  5556. /** MACRO define to set / get 11b and 11ag mode TX chain number:
  5557. * bit 0~15 : 11b mode TX chain number.
  5558. * bit 16~31: 11ag mode TX chain number.
  5559. */
  5560. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM_S 0
  5561. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM 0x0000FFFF
  5562. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM_S 16
  5563. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM 0xFFFF0000
  5564. #define WMI_PDEV_PARAM_GET_11B_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  5565. #define WMI_PDEV_PARAM_SET_11B_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  5566. #define WMI_PDEV_PARAM_GET_11AG_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  5567. #define WMI_PDEV_PARAM_SET_11AG_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  5568. /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
  5569. typedef enum {
  5570. WMI_CTS_CBW_INVALID = 0,
  5571. WMI_CTS_CBW_20,
  5572. WMI_CTS_CBW_40,
  5573. WMI_CTS_CBW_80,
  5574. WMI_CTS_CBW_80_80,
  5575. WMI_CTS_CBW_160,
  5576. } WMI_CTS_CBW;
  5577. typedef struct {
  5578. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
  5579. /** pdev_id for identifying the MAC
  5580. * See macros starting with WMI_PDEV_ID_ for values.
  5581. */
  5582. A_UINT32 pdev_id;
  5583. /** parameter */
  5584. A_UINT32 param;
  5585. } wmi_pdev_get_tpc_config_cmd_fixed_param;
  5586. typedef struct {
  5587. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_div_get_rssi_antid_fixed_param */
  5588. /** pdev_id for identifying the MAC */
  5589. A_UINT32 pdev_id;
  5590. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  5591. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  5592. /** index of the last-used antenna for each chain */
  5593. A_UINT32 ant_id[WMI_MAX_CHAINS];
  5594. /** mac address of diversity peer */
  5595. wmi_mac_addr macaddr;
  5596. } wmi_pdev_div_get_rssi_antid_fixed_param;
  5597. typedef struct {
  5598. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_request_fixed_param */
  5599. A_UINT32 param; /* 1 = read only, 2= read and clear */
  5600. } wmi_pdev_bss_chan_info_request_fixed_param;
  5601. typedef struct {
  5602. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_request_fixed_param */
  5603. A_UINT32 total_len; /* the total number of ctl table bytes to be transferred */
  5604. A_UINT32 len; /* the number of ctltable bytes in current payload */
  5605. A_UINT32 seq; /* the number of current transfers */
  5606. /*
  5607. * This TLV is followed by the following additional TLVs:
  5608. * ARRAY_BYTE TLV of ctltable_data
  5609. */
  5610. } wmi_pdev_update_ctltable_request_fixed_param;
  5611. #define WMI_ESP_ESTIMATE_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  5612. #define WMI_ESP_ESTIMATE_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  5613. #define WMI_ESP_ESTIMATE_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  5614. #define WMI_ESP_ESTIMATE_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  5615. #define WMI_ESP_ESTIMATE_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  5616. #define WMI_ESP_ESTIMATE_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  5617. #define WMI_ESP_ESTIMATE_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  5618. #define WMI_ESP_ESTIMATE_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  5619. typedef struct {
  5620. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_esp_estimate_event_fixed_param */
  5621. /** pdev_id for identifying the MAC
  5622. * See macros starting with WMI_PDEV_ID_ for values.
  5623. * In non-DBDC case host should set it to 0
  5624. */
  5625. A_UINT32 pdev_id;
  5626. /*
  5627. * Percentage of air time available for each AC
  5628. * BIT[0-7] : AC_BE
  5629. * BIT[8-15] : AC_BK
  5630. * BIT[16-23] : AC_VI
  5631. * BIT[24-31] : AC_VO
  5632. */
  5633. A_UINT32 ac_airtime_percentage;
  5634. } wmi_esp_estimate_event_fixed_param;
  5635. #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
  5636. #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
  5637. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
  5638. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  5639. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
  5640. (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  5641. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
  5642. do { \
  5643. (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  5644. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
  5645. WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  5646. } while (0)
  5647. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
  5648. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  5649. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
  5650. (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  5651. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
  5652. do { \
  5653. (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  5654. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
  5655. WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  5656. } while (0)
  5657. typedef struct {
  5658. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
  5659. union {
  5660. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  5661. /** pdev_id for identifying the MAC
  5662. * See macros starting with WMI_PDEV_ID_ for values.
  5663. */
  5664. A_UINT32 pdev_id;
  5665. };
  5666. /**
  5667. * The following "value" field is divided into bit fields as follows:
  5668. * bits | purpose
  5669. * -----+---------------------------------------
  5670. * 0 | enable/disable FAST diversity
  5671. * 1 | enable/disable SLOW diversity
  5672. * 5:2 | chain0 slow-diversity weighting factor
  5673. * 9:6 | chain1 slow-diversity weighting factor
  5674. * 31:10| currenty unused (set to 0x0)
  5675. * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
  5676. */
  5677. A_UINT32 value;
  5678. } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
  5679. #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
  5680. typedef struct {
  5681. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
  5682. A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
  5683. A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
  5684. A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
  5685. A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
  5686. A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
  5687. A_UINT32 lo_rssi_reenable_hysteresis; /* unit dBm. once low rssi[] breached, same event bitmap will be generated only after signal gets better than this level. This value is adopted for all low_rssi_breach_threshold[3] */
  5688. A_UINT32 hi_rssi_reenable_histeresis;/* unit dBm. once hi rssi[] breached, same event bitmap will be generated only after signal gets worse than this level. This value is adopted for all hi_rssi_breach_threshold[3] */
  5689. A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event */
  5690. A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
  5691. } wmi_rssi_breach_monitor_config_fixed_param;
  5692. typedef struct {
  5693. /** parameter */
  5694. A_UINT32 param;
  5695. } wmi_pdev_dump_cmd;
  5696. typedef enum {
  5697. PAUSE_TYPE_CHOP = 0x1, /** for MCC (switch channel), only vdev_map is valid */
  5698. PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
  5699. PAUSE_TYPE_UAPSD = 0x3, /** for uapsd, only peer_id and tid_map are valid. */
  5700. PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, /** only vdev_map is valid, actually only one vdev id is set at one time */
  5701. PAUSE_TYPE_P2P_GO_PS = 0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
  5702. PAUSE_TYPE_STA_ADD_BA = 0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
  5703. PAUSE_TYPE_AP_PS = 0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
  5704. PAUSE_TYPE_IBSS_PS = 0x8, /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
  5705. PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, /** for TDLS offchannel MCC (switch channel), only vdev_map is valid, TDLS connection tracker needs to be notified */
  5706. PAUSE_TYPE_HOST = 0x15, /* host is requesting vdev pause */
  5707. } wmi_tx_pause_type;
  5708. typedef enum {
  5709. ACTION_PAUSE = 0x0,
  5710. ACTION_UNPAUSE = 0x1,
  5711. } wmi_tx_pause_action;
  5712. typedef struct {
  5713. A_UINT32 tlv_header;
  5714. A_UINT32 pause_type;
  5715. A_UINT32 action;
  5716. A_UINT32 vdev_map;
  5717. A_UINT32 peer_id;
  5718. A_UINT32 tid_map;
  5719. } wmi_tx_pause_event_fixed_param;
  5720. typedef enum {
  5721. WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
  5722. WMI_MGMT_TX_COMP_TYPE_DISCARD,
  5723. WMI_MGMT_TX_COMP_TYPE_INSPECT,
  5724. WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
  5725. WMI_MGMT_TX_COMP_TYPE_MAX,
  5726. } WMI_MGMT_TX_COMP_STATUS_TYPE;
  5727. typedef struct {
  5728. A_UINT32 tlv_header;
  5729. A_UINT32 desc_id; /* from tx_send_cmd */
  5730. A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
  5731. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  5732. * See macros starting with WMI_PDEV_ID_ for values.
  5733. */
  5734. A_UINT32 pdev_id;
  5735. /* ppdu_id
  5736. * Hardware PPDU ID for tracking the completion stats
  5737. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  5738. */
  5739. A_UINT32 ppdu_id;
  5740. /* ack_rssi
  5741. * TX mgmt ack RSSI report to host.
  5742. * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
  5743. * ACK RSSI is reported as SNR dB, i.e. how many dB the RSSI is above
  5744. * the noise floor.
  5745. */
  5746. A_UINT32 ack_rssi;
  5747. } wmi_mgmt_tx_compl_event_fixed_param;
  5748. typedef struct {
  5749. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_compl_event_fixed_param */
  5750. A_UINT32 desc_id; /* from tx_send_cmd */
  5751. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  5752. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  5753. * See macros starting with WMI_PDEV_ID_ for values.
  5754. */
  5755. A_UINT32 pdev_id;
  5756. /* ppdu_id
  5757. * Hardware PPDU ID for tracking the completion stats
  5758. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  5759. */
  5760. A_UINT32 ppdu_id;
  5761. } wmi_offchan_data_tx_compl_event_fixed_param;
  5762. typedef struct {
  5763. A_UINT32 tlv_header;
  5764. A_UINT32 num_reports;
  5765. /* tlv for completion
  5766. * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
  5767. * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
  5768. * A_UINT32 ppdu_id[num_reports]; <- list of PPDU IDs
  5769. * A_UINT32 ack_rssi[num_reports]; <- list of ack RSSI
  5770. * RSSI units = dB w.r.t. noise floor
  5771. */
  5772. } wmi_mgmt_tx_compl_bundle_event_fixed_param;
  5773. #define WMI_TPC_RATE_MAX 160
  5774. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  5775. #define WMI_TPC_TX_NUM_CHAIN 4
  5776. typedef enum {
  5777. /* bits 0-7 for table flags */
  5778. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  5779. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  5780. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  5781. /* bits 8-11 for interface version flags */
  5782. WMI_TPC_CONFIG_EVENT_FLAG_IF_MASK = 0x0F00,
  5783. WMI_TPC_CONFIG_EVENT_FLAG_IF_V1 = 0x0100,
  5784. } WMI_TPC_CONFIG_EVENT_FLAG;
  5785. typedef struct {
  5786. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */
  5787. A_UINT32 regDomain;
  5788. A_UINT32 chanFreq;
  5789. A_UINT32 phyMode;
  5790. A_UINT32 twiceAntennaReduction;
  5791. A_UINT32 twiceMaxRDPower;
  5792. A_INT32 twiceAntennaGain;
  5793. A_UINT32 powerLimit;
  5794. A_UINT32 rateMax;
  5795. A_UINT32 numTxChain;
  5796. A_UINT32 ctl;
  5797. A_UINT32 flags;
  5798. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  5799. A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
  5800. A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  5801. A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  5802. A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  5803. /** pdev_id for identifying the MAC
  5804. * See macros starting with WMI_PDEV_ID_ for values.
  5805. */
  5806. A_UINT32 pdev_id;
  5807. /* This TLV is followed by further TLVs:
  5808. * 1. byte array:
  5809. * A_UINT8 ratesArray[];
  5810. * 2a. multi-dimensional array dimension spec:
  5811. * wmi_tlv_arrays_len_param ctlPwrTbl_param[0 or 1]
  5812. *
  5813. * 2b. ctl power table
  5814. * A_UINT8 ctlPwrTbl_buf[bf][modes][nss], i.e.
  5815. * A_UINT8 ctlPwrTbl_buf[d3_len * d2_len * d1_len]
  5816. * bf is [0 or 1] for [on or off].
  5817. * For 2G, modes is [0, 1, 2, or 3] for
  5818. * [cck, legacy, (v)ht20, or (v)ht40]
  5819. * For 5G, modes is [0, 1, 2, or 3] for
  5820. * [legacy, (v)ht20, (v)ht40, or vht80]
  5821. * nss is [0, 1, 2, or 3] for the number of streams 1~4.
  5822. */
  5823. } wmi_pdev_tpc_config_event_fixed_param;
  5824. typedef struct {
  5825. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_div_rssi_antid_event_fixed_param */
  5826. A_UINT32 tlv_header;
  5827. /** how many elements in the MAX_CHAINS arrays below contain valid info */
  5828. A_UINT32 num_chains_valid;
  5829. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  5830. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  5831. /** index of the last-used antenna for each chain */
  5832. A_UINT32 ant_id[WMI_MAX_CHAINS];
  5833. /** mac address of diversity peer */
  5834. wmi_mac_addr macaddr;
  5835. /* EVM value for stream0 and stream1 20Mhz, dB units */
  5836. A_INT32 chain_evm[WMI_MAX_CHAINS];
  5837. } wmi_pdev_div_rssi_antid_event_fixed_param;
  5838. typedef struct {
  5839. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_event_fixed_param */
  5840. A_UINT32 freq; /* Units in MHz */
  5841. A_INT32 noise_floor; /* units are dBm */
  5842. /* rx clear - how often the channel was unused */
  5843. A_UINT32 rx_clear_count_low; /* low 31 bits of rx_clear cnt in 64bits format */
  5844. A_UINT32 rx_clear_count_high; /* high 31 bits of rx_clear cnt in 64bits format */
  5845. /* cycle count - elapsed time during the measured period, in clock ticks */
  5846. A_UINT32 cycle_count_low; /* low 31 bits of cycle cnt in 64bits format */
  5847. A_UINT32 cycle_count_high; /* high 31 bits of cycle cnt in 64bits format */
  5848. /* tx cycle count - elapsed time spent in tx, in clock ticks */
  5849. A_UINT32 tx_cycle_count_low; /* low 31 bits of tx_cycle cnt in 64bits format */
  5850. A_UINT32 tx_cycle_count_high; /* high 31 bits of tx_cycle cnt in 64bits format */
  5851. /* rx cycle count - elapsed time spent in rx, in clock ticks */
  5852. A_UINT32 rx_cycle_count_low; /* low 31 bits of rx_cycle cnt in 64bits format */
  5853. A_UINT32 rx_cycle_count_high; /* high 31 bits of rx_cycle cnt in 64bits format */
  5854. A_UINT32 rx_bss_cycle_count_low; /* low 31 bits of rx cycle cnt for my bss in 64bits format */
  5855. A_UINT32 rx_bss_cycle_count_high; /* high 31 bits of rx_cycle cnt for my bss in 64bits format */
  5856. } wmi_pdev_bss_chan_info_event_fixed_param;
  5857. typedef struct {
  5858. /* WMI event response update ctltable request to host */
  5859. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_event_fixed_param */
  5860. A_UINT32 total_len; /* the total number of bytes to be transferred */
  5861. A_UINT32 len; /* the number of FW received bytes from host */
  5862. A_UINT32 seq; /* the number of current transfers */
  5863. } wmi_pdev_update_ctltable_event_fixed_param;
  5864. typedef struct {
  5865. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
  5866. A_UINT32 periodCnt;
  5867. A_UINT32 L1Cnt;
  5868. A_UINT32 L11Cnt;
  5869. A_UINT32 L12Cnt;
  5870. A_UINT32 L1Entry;
  5871. A_UINT32 L11Entry;
  5872. A_UINT32 L12Entry;
  5873. /** pdev_id for identifying the MAC
  5874. * See macros starting with WMI_PDEV_ID_ for values.
  5875. */
  5876. A_UINT32 pdev_id;
  5877. } wmi_pdev_l1ss_track_event_fixed_param;
  5878. typedef struct {
  5879. A_UINT32 len;
  5880. A_UINT32 msgref;
  5881. A_UINT32 segmentInfo;
  5882. } wmi_pdev_seg_hdr_info;
  5883. /*
  5884. * Transmit power scale factor.
  5885. *
  5886. */
  5887. typedef enum {
  5888. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  5889. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  5890. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  5891. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  5892. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  5893. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  5894. } WMI_TP_SCALE;
  5895. #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
  5896. typedef struct {
  5897. /** message buffer, NULL terminated */
  5898. char bufp[WMI_MAX_DEBUG_MESG];
  5899. } wmi_debug_mesg_event;
  5900. enum {
  5901. /** P2P device */
  5902. VDEV_SUBTYPE_P2PDEV = 0,
  5903. /** P2P client */
  5904. VDEV_SUBTYPE_P2PCLI,
  5905. /** P2P GO */
  5906. VDEV_SUBTYPE_P2PGO,
  5907. /** BT3.0 HS */
  5908. VDEV_SUBTYPE_BT,
  5909. };
  5910. typedef struct {
  5911. /** idnore power , only use flags , mode and freq */
  5912. wmi_channel chan;
  5913. } wmi_pdev_set_channel_cmd;
  5914. typedef enum {
  5915. WMI_PKTLOG_EVENT_RX = 0x1,
  5916. WMI_PKTLOG_EVENT_TX = 0x2,
  5917. WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
  5918. WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
  5919. /* 0x10 used by deprecated DBG_PRINT */
  5920. WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
  5921. WMI_PKTLOG_EVENT_SW = 0x40, /* To support SW defined events */
  5922. } WMI_PKTLOG_EVENT;
  5923. typedef enum {
  5924. WMI_PKTLOG_ENABLE_AUTO = 0, /* (default) FW will decide under what conditions to enable pktlog */
  5925. WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
  5926. } WMI_PKTLOG_ENABLE;
  5927. typedef enum {
  5928. WMI_PKTLOG_FILTER_IN = 0, /* capture only for the MAC addresses in pktlog_mac_addr_list*/
  5929. WMI_PKTLOG_FILTER_OUT = 1, /* capture for all MAC addresses except those in pktlog_mac_addr_list */
  5930. } WMI_PKTLOG_FILTER_TYPE;
  5931. typedef struct {
  5932. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
  5933. /** pdev_id for identifying the MAC
  5934. * See macros starting with WMI_PDEV_ID_ for values.
  5935. */
  5936. A_UINT32 pdev_id;
  5937. A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
  5938. A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
  5939. } wmi_pdev_pktlog_enable_cmd_fixed_param;
  5940. typedef struct {
  5941. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
  5942. /** pdev_id for identifying the MAC
  5943. * See macros starting with WMI_PDEV_ID_ for values.
  5944. */
  5945. A_UINT32 pdev_id;
  5946. } wmi_pdev_pktlog_disable_cmd_fixed_param;
  5947. typedef struct {
  5948. /** TLV tag and len; tag equals
  5949. * WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_info */
  5950. A_UINT32 tlv_header;
  5951. /** mac addr of the peer to be filtered */
  5952. wmi_mac_addr peer_mac_address;
  5953. } wmi_pdev_pktlog_filter_info;
  5954. typedef struct {
  5955. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_cmd_fixed_param */
  5956. /** pdev_id for identifying the MAC
  5957. * See macros starting with WMI_PDEV_ID_ for values.
  5958. */
  5959. A_UINT32 pdev_id;
  5960. /** 0 - disable filtering, 1 - enable filtering */
  5961. A_UINT32 enable;
  5962. A_UINT32 filter_type; /* WMI_PKTLOG_FILTER_TYPE */
  5963. A_UINT32 num_of_mac_addresses;
  5964. /* This TLV is followed by another TLV of array of structs
  5965. * wmi_pdev_pktlog_filter_info pdev_pktlog_filter_info[];
  5966. */
  5967. } wmi_pdev_pktlog_filter_cmd_fixed_param;
  5968. typedef enum {
  5969. WMI_ROGUE_AP_ON_STA_PS = 1, /* rogue ap on sta ps module */
  5970. } WMI_ROGUE_AP_TYPE;
  5971. typedef struct {
  5972. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_fixed_param */
  5973. /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
  5974. * See macros starting with WMI_PDEV_ID_ for values.
  5975. */
  5976. A_UINT32 pdev_id;
  5977. /** rogue ap type, see WMI_ROGUE_AP_TYPE */
  5978. A_UINT32 type;
  5979. /** Enable detection of rogue ap in the ps module
  5980. *
  5981. * 0 -> disabled
  5982. * 1 -> enabled (default)
  5983. */
  5984. A_UINT32 sta_ps_detection_enabled;
  5985. /* This TLV is followed by rap_param for each rogue ap:
  5986. * wmi_pdev_set_rap_config_on_sta_ps_tlv_param rap_param[];
  5987. */
  5988. } wmi_pdev_set_rap_config_fixed_param;
  5989. typedef struct {
  5990. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_on_sta_ps_tlv_param */
  5991. /** bssid of rogue ap */
  5992. wmi_mac_addr bssid;
  5993. } wmi_pdev_set_rap_config_on_sta_ps_tlv_param;
  5994. typedef struct {
  5995. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
  5996. /** pdev_id for identifying the MAC
  5997. * See macros starting with WMI_PDEV_ID_ for values.
  5998. */
  5999. A_UINT32 pdev_id;
  6000. A_UINT32 enable_Mib; /** enable for mib stats collection. Stats are delivered to host in wmi_mib_stats structure.
  6001. * If enable_Mib=1, stats collection is enabled. If enable_Mib=0, stats collection does not happen */
  6002. } wmi_mib_stats_enable_cmd_fixed_param;
  6003. /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
  6004. * NOTE: This constant cannot be changed without breaking
  6005. * WMI Compatibility. */
  6006. #define WMI_DSCP_MAP_MAX (64)
  6007. /*
  6008. * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
  6009. * @details
  6010. * Create an API for sending the custom DSCP-to-TID map to the target
  6011. * If this is a request from the user space or from above the UMAC
  6012. * then the best place to implement this is in the umac_if_offload of the OL path.
  6013. * Provide a place holder for this API in the ieee80211com (ic).
  6014. *
  6015. * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
  6016. * in the target should be directed to the function pointer in the ic.
  6017. *
  6018. * Implementation details of the API to send the map to the target are as described-
  6019. *
  6020. * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
  6021. * DSCP-to-TID map is a one dimensional u_int32_t array of length 64 to accomodate
  6022. * 64 TID values for 2^6 (64) DSCP ids.
  6023. * Example:
  6024. * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
  6025. * 0, 0, 0, 0, 0, 0, 0, 0,
  6026. * 1, 1, 1, 1, 1, 1, 1, 1,
  6027. * 2, 2, 2, 2, 2, 2, 2, 2,
  6028. * 3, 3, 3, 3, 3, 3, 3, 3,
  6029. * 4, 4, 4, 4, 4, 4, 4, 4,
  6030. * 5, 5, 5, 5, 5, 5, 5, 5,
  6031. * 6, 6, 6, 6, 6, 6, 6, 6,
  6032. * 7, 7, 7, 7, 7, 7, 7, 7,
  6033. * };
  6034. *
  6035. * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
  6036. *
  6037. * 3. Copy the DSCP-to-TID map into the WMI buffer.
  6038. *
  6039. * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
  6040. * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
  6041. * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
  6042. * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
  6043. *
  6044. */
  6045. /* DEPRECATED - use VDEV level command instead
  6046. * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
  6047. */
  6048. typedef struct {
  6049. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
  6050. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  6051. /* map indicating DSCP to TID conversion */
  6052. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  6053. } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
  6054. typedef struct {
  6055. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param */
  6056. A_UINT32 vdev_id;
  6057. /** map indicating DSCP to TID conversion */
  6058. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  6059. A_UINT32 enable_override;
  6060. } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
  6061. enum WMI_WAKE_GPIO_TYPE {
  6062. WMI_WAKE_GPIO_LOW = 1,
  6063. WMI_WAKE_GPIO_HIGH = 2,
  6064. WMI_WAKE_GPIO_RISING_EDGE = 3,
  6065. WMI_WAKE_GPIO_FALLING_EDGE = 4,
  6066. };
  6067. /**
  6068. * Set GPIO numbers used to wakeup host and wakeup target.
  6069. */
  6070. typedef struct {
  6071. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param */
  6072. A_UINT32 host_wakeup_gpio; /* gpio num used to wakeup host, 0xff disable wakeup gpio */
  6073. A_UINT32 host_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  6074. A_UINT32 target_wakeup_gpio; /* gpio num used to wakeup target, 0xff disable wakeup gpio */
  6075. A_UINT32 target_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  6076. } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
  6077. /** Fixed rate (rate-code) for broadcast/ multicast data frames */
  6078. /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
  6079. * @details
  6080. * Create an API for setting the custom rate for the MCAST and BCAST frames
  6081. * in the target. If this is a request from the user space or from above the UMAC
  6082. * then the best place to implement this is in the umac_if_offload of the OL path.
  6083. * Provide a place holder for this API in the ieee80211com (ic).
  6084. *
  6085. * Implementation details of the API to set custom rates for MCAST and BCAST in
  6086. * the target are as described-
  6087. *
  6088. * 1. The function will have 3 arguments-
  6089. * vap structure,
  6090. * MCAST/ BCAST identifier code,
  6091. * 8 bit rate code
  6092. *
  6093. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  6094. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  6095. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  6096. * b'3-b'0 indicate the rate, which is indicated as follows:
  6097. * OFDM : 0: OFDM 48 Mbps
  6098. * 1: OFDM 24 Mbps
  6099. * 2: OFDM 12 Mbps
  6100. * 3: OFDM 6 Mbps
  6101. * 4: OFDM 54 Mbps
  6102. * 5: OFDM 36 Mbps
  6103. * 6: OFDM 18 Mbps
  6104. * 7: OFDM 9 Mbps
  6105. * CCK (pream == 1)
  6106. * 0: CCK 11 Mbps Long
  6107. * 1: CCK 5.5 Mbps Long
  6108. * 2: CCK 2 Mbps Long
  6109. * 3: CCK 1 Mbps Long
  6110. * 4: CCK 11 Mbps Short
  6111. * 5: CCK 5.5 Mbps Short
  6112. * 6: CCK 2 Mbps Short
  6113. * HT/VHT (pream == 2/3)
  6114. * 0..7: MCS0..MCS7 (HT)
  6115. * 0..9: MCS0..MCS9 (VHT)
  6116. *
  6117. * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
  6118. * to the target.
  6119. * Arguments to the API are-
  6120. * wmi handle,
  6121. * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
  6122. * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
  6123. * rate value.
  6124. */
  6125. typedef enum {
  6126. WMI_SET_MCAST_RATE,
  6127. WMI_SET_BCAST_RATE
  6128. } MCAST_BCAST_RATE_ID;
  6129. typedef struct {
  6130. MCAST_BCAST_RATE_ID rate_id;
  6131. A_UINT32 rate;
  6132. } mcast_bcast_rate;
  6133. typedef struct {
  6134. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
  6135. A_UINT32 cwmin;
  6136. A_UINT32 cwmax;
  6137. A_UINT32 aifs;
  6138. A_UINT32 txoplimit;
  6139. A_UINT32 acm;
  6140. A_UINT32 no_ack;
  6141. } wmi_wmm_params;
  6142. /* DEPRECATED - use VDEV level command instead
  6143. * (wmi_vdev_set_wmm_params_cmd_fixed_param)
  6144. */
  6145. typedef struct {
  6146. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
  6147. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  6148. A_UINT32 dg_type;
  6149. /* The TLVs for the 4 AC follows:
  6150. * wmi_wmm_params wmm_params_ac_be;
  6151. * wmi_wmm_params wmm_params_ac_bk;
  6152. * wmi_wmm_params wmm_params_ac_vi;
  6153. * wmi_wmm_params wmm_params_ac_vo;
  6154. */
  6155. } wmi_pdev_set_wmm_params_cmd_fixed_param;
  6156. typedef enum {
  6157. WMI_REQUEST_PEER_STAT = 0x0001,
  6158. WMI_REQUEST_AP_STAT = 0x0002,
  6159. WMI_REQUEST_PDEV_STAT = 0x0004,
  6160. WMI_REQUEST_VDEV_STAT = 0x0008,
  6161. WMI_REQUEST_BCNFLT_STAT = 0x0010,
  6162. WMI_REQUEST_VDEV_RATE_STAT = 0x0020,
  6163. WMI_REQUEST_INST_STAT = 0x0040,
  6164. WMI_REQUEST_MIB_STAT = 0x0080,
  6165. WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x0100,
  6166. WMI_REQUEST_CONGESTION_STAT = 0x0200,
  6167. WMI_REQUEST_PEER_EXTD_STAT = 0x0400,
  6168. WMI_REQUEST_BCN_STAT = 0x0800,
  6169. WMI_REQUEST_BCN_STAT_RESET = 0x1000,
  6170. WMI_REQUEST_PEER_EXTD2_STAT = 0x2000,
  6171. WMI_REQUEST_MIB_EXTD_STAT = 0x4000,
  6172. } wmi_stats_id;
  6173. /*
  6174. * cfg_retry_count is set to max number of times the AP should try sending
  6175. * QoS Null frames to the STA for measuring the instantaneous RSSI
  6176. *
  6177. * retry_count is used to maintain the number of times the AP has tried sending
  6178. * QoS Null frames to the STA for measuring the instantaneous RSSI
  6179. */
  6180. typedef struct {
  6181. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_sub_struc_param */
  6182. A_UINT32 cfg_retry_count;
  6183. A_UINT32 retry_count;
  6184. } wmi_inst_rssi_stats_params;
  6185. typedef struct {
  6186. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
  6187. wmi_stats_id stats_id;
  6188. /** unique id identifying the VDEV, generated by the caller */
  6189. A_UINT32 vdev_id;
  6190. /** peer MAC address */
  6191. wmi_mac_addr peer_macaddr;
  6192. A_UINT32 pdev_id; /** pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0. */
  6193. /*
  6194. * This TLV is (optionally) followed by other TLVs:
  6195. * wmi_inst_rssi_stats_params inst_rssi_params;
  6196. */
  6197. } wmi_request_stats_cmd_fixed_param;
  6198. /* stats type bitmap */
  6199. #define WMI_LINK_STATS_RADIO 0x00000001
  6200. #define WMI_LINK_STATS_IFACE 0x00000002
  6201. #define WMI_LINK_STATS_ALL_PEER 0x00000004
  6202. #define WMI_LINK_STATS_PER_PEER 0x00000008
  6203. /* wifi clear statistics bitmap */
  6204. #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
  6205. #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
  6206. #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
  6207. #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
  6208. #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
  6209. #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
  6210. #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
  6211. #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
  6212. #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
  6213. #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
  6214. /** Default value for stats if the stats collection has not started */
  6215. #define WMI_STATS_VALUE_INVALID 0xffffffff
  6216. #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
  6217. #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
  6218. #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
  6219. #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
  6220. #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  6221. #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  6222. typedef struct {
  6223. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
  6224. A_UINT32 num_of_diag_events_logs;
  6225. /* The TLVs will follow.
  6226. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  6227. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  6228. * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
  6229. */
  6230. } wmi_diag_event_log_config_fixed_param;
  6231. #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  6232. #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  6233. #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
  6234. #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
  6235. typedef struct {
  6236. A_UINT32 tlv_header;
  6237. A_UINT32 num_of_diag_events_logs;
  6238. /* The TLVs will follow.
  6239. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  6240. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  6241. * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
  6242. * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
  6243. */
  6244. } wmi_diag_event_log_supported_event_fixed_params;
  6245. typedef struct {
  6246. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
  6247. A_UINT32 reserved0; /** placeholder for future */
  6248. } wmi_debug_mesg_flush_fixed_param;
  6249. typedef struct {
  6250. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_data_stall_param */
  6251. A_UINT32 vdev_id_bitmap; /** bitmap representation for vdev_id's where data stall happened */
  6252. A_UINT32 data_stall_type; /** wlan_dbg_data_stall_type_e */
  6253. /** reason_code1:
  6254. * The information stored in reason_code1 varies based on the data stally
  6255. * type values:
  6256. * data_stall_type | reason_code1
  6257. * -----------------------------------------------------
  6258. * HWSCHED_CMD_FLUSH | flush req reason (0-40)
  6259. * RX_REFILL_FAILED | ring_id (0-7)
  6260. * RX_FCS_LEN_ERROR | exact error type
  6261. */
  6262. A_UINT32 reason_code1;
  6263. A_UINT32 reason_code2; /** on which tid/hwq stall happened */
  6264. A_UINT32 recovery_type; /** wlan_dbg_data_stall_recovery_type_e */
  6265. } wmi_debug_mesg_fw_data_stall_param;
  6266. typedef struct {
  6267. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
  6268. A_UINT32 reserved0; /** placeholder for future */
  6269. } wmi_debug_mesg_flush_complete_fixed_param;
  6270. typedef struct {
  6271. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
  6272. /* vdev_id, where RSSI breach event occurred */
  6273. A_UINT32 vdev_id;
  6274. /* request id */
  6275. A_UINT32 request_id;
  6276. /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
  6277. A_UINT32 event_bitmap;
  6278. /* rssi at the time of RSSI breach. Unit dBm */
  6279. A_UINT32 rssi;
  6280. /* bssid of the monitored AP's */
  6281. wmi_mac_addr bssid;
  6282. } wmi_rssi_breach_event_fixed_param;
  6283. typedef struct {
  6284. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
  6285. /** unique id identifying the segment */
  6286. A_UINT32 seg_id;
  6287. /** Start address of the segment to be read */
  6288. A_UINT32 seg_start_addr_lo;
  6289. A_UINT32 seg_start_addr_hi;
  6290. /** Length of the segment to be read */
  6291. A_UINT32 seg_length;
  6292. /** Host bufeer address to which the segment will be read and dumped */
  6293. A_UINT32 dest_addr_lo;
  6294. A_UINT32 dest_addr_hi;
  6295. } wmi_fw_mem_dump;
  6296. /* Command to get firmware memory dump*/
  6297. typedef struct {
  6298. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
  6299. /** unique id identifying the request */
  6300. A_UINT32 request_id;
  6301. /** number of memory dump segments */
  6302. A_UINT32 num_fw_mem_dump_segs;
  6303. /**
  6304. * This TLV is followed by another TLV
  6305. * wmi_fw_mem_dump fw_mem_dump[];
  6306. */
  6307. } wmi_get_fw_mem_dump_fixed_param;
  6308. /** Event to indicate the completion of fw mem dump */
  6309. typedef struct {
  6310. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
  6311. /** unique id identifying the request, given in the request stats command */
  6312. A_UINT32 request_id;
  6313. /*In case of Firmware memory dump */
  6314. A_UINT32 fw_mem_dump_complete;
  6315. } wmi_update_fw_mem_dump_fixed_param;
  6316. typedef enum {
  6317. WMI_ROAMING_IDLE = 0,
  6318. WMI_ROAMING_ACTIVE = 1,
  6319. } wmi_roam_state;
  6320. /* access categories */
  6321. typedef enum {
  6322. WMI_AC_VO = 0,
  6323. WMI_AC_VI = 1,
  6324. WMI_AC_BE = 2,
  6325. WMI_AC_BK = 3,
  6326. WMI_AC_MAX = 4,
  6327. } wmi_traffic_ac;
  6328. typedef enum {
  6329. WMI_STA_STATS = 0,
  6330. WMI_SOFTAP_STATS = 1,
  6331. WMI_IBSS_STATS = 2,
  6332. WMI_P2P_CLIENT_STATS = 3,
  6333. WMI_P2P_GO_STATS = 4,
  6334. WMI_NAN_STATS = 5,
  6335. WMI_MESH_STATS = 6,
  6336. } wmi_link_iface_type;
  6337. /* channel operating width */
  6338. typedef enum {
  6339. WMI_CHAN_WIDTH_20 = 0,
  6340. WMI_CHAN_WIDTH_40 = 1,
  6341. WMI_CHAN_WIDTH_80 = 2,
  6342. WMI_CHAN_WIDTH_160 = 3,
  6343. WMI_CHAN_WIDTH_80P80 = 4,
  6344. WMI_CHAN_WIDTH_5 = 5,
  6345. WMI_CHAN_WIDTH_10 = 6,
  6346. WMI_CHAN_WIDTH_165 = 7,
  6347. } wmi_channel_width;
  6348. /*Clear stats*/
  6349. typedef struct {
  6350. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
  6351. /** unique id identifying the VDEV, generated by the caller */
  6352. A_UINT32 vdev_id;
  6353. /** stop_stats_collection_req = 1 will imply stop the statistics collection */
  6354. A_UINT32 stop_stats_collection_req;
  6355. /** identifies what stats to be cleared */
  6356. A_UINT32 stats_clear_req_mask;
  6357. /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
  6358. wmi_mac_addr peer_macaddr;
  6359. } wmi_clear_link_stats_cmd_fixed_param;
  6360. /* Link Stats configuration params. Trigger the link layer statistics collection*/
  6361. typedef struct {
  6362. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
  6363. /** threshold to classify the pkts as short or long */
  6364. A_UINT32 mpdu_size_threshold;
  6365. /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
  6366. A_UINT32 aggressive_statistics_gathering;
  6367. } wmi_start_link_stats_cmd_fixed_param;
  6368. typedef struct {
  6369. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
  6370. /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  6371. A_UINT32 stats_type;
  6372. /** unique id identifying the VDEV, generated by the caller */
  6373. A_UINT32 vdev_id;
  6374. /** unique id identifying the request, generated by the caller */
  6375. A_UINT32 request_id;
  6376. /** peer MAC address */
  6377. wmi_mac_addr peer_macaddr;
  6378. } wmi_request_link_stats_cmd_fixed_param;
  6379. #define WLM_STATS_REQ_LINK 0x00000001
  6380. typedef struct {
  6381. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param */
  6382. /** unique id identifying the VDEV, generated by the caller */
  6383. A_UINT32 vdev_id;
  6384. /** WLM event request bitmask
  6385. * Used by host to customize the wlm stats report.
  6386. * Filled with a combination of WLM_STATS_xxx values.
  6387. */
  6388. A_UINT32 request_bitmask;
  6389. } wmi_request_wlm_stats_cmd_fixed_param;
  6390. /* channel statistics */
  6391. typedef struct {
  6392. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
  6393. /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
  6394. A_UINT32 channel_width;
  6395. /** Primary 20 MHz channel */
  6396. A_UINT32 center_freq;
  6397. /** center frequency (MHz) first segment */
  6398. A_UINT32 center_freq0;
  6399. /** center frequency (MHz) second segment */
  6400. A_UINT32 center_freq1;
  6401. /** msecs the radio is awake (32 bits number accruing over time) */
  6402. A_UINT32 radio_awake_time;
  6403. /** msecs the CCA register is busy (32 bits number accruing over time) */
  6404. A_UINT32 cca_busy_time;
  6405. } wmi_channel_stats;
  6406. /*
  6407. * Each step represents 0.5 dB. The starting value is 0 dBm.
  6408. * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
  6409. */
  6410. #define MAX_TPC_LEVELS 64
  6411. /* radio statistics */
  6412. typedef struct {
  6413. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
  6414. /** Wifi radio (if multiple radio supported) */
  6415. A_UINT32 radio_id;
  6416. /** msecs the radio is awake (32 bits number accruing over time) */
  6417. A_UINT32 on_time;
  6418. /** msecs the radio is transmitting (32 bits number accruing over time) */
  6419. A_UINT32 tx_time;
  6420. /** msecs the radio is in active receive (32 bits number accruing over time) */
  6421. A_UINT32 rx_time;
  6422. /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
  6423. A_UINT32 on_time_scan;
  6424. /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
  6425. A_UINT32 on_time_nbd;
  6426. /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
  6427. A_UINT32 on_time_gscan;
  6428. /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
  6429. A_UINT32 on_time_roam_scan;
  6430. /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
  6431. A_UINT32 on_time_pno_scan;
  6432. /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
  6433. A_UINT32 on_time_hs20;
  6434. /** number of channels */
  6435. A_UINT32 num_channels;
  6436. /** tx time per TPC level - DEPRECATED
  6437. * This field is deprecated.
  6438. * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID message.
  6439. */
  6440. A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
  6441. /** msecs the radio is awake due to Host initiated scan (accruing over time) */
  6442. A_UINT32 on_time_host_scan;
  6443. /** msecs the radio is awake due to LPI scan (accruing over time) */
  6444. A_UINT32 on_time_lpi_scan;
  6445. } wmi_radio_link_stats;
  6446. /** tx time per power level statistics */
  6447. typedef struct {
  6448. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */
  6449. /** total number of tx power levels */
  6450. A_UINT32 total_num_tx_power_levels;
  6451. /** number of tx power levels that are carried in this event */
  6452. A_UINT32 num_tx_power_levels;
  6453. /** offset of current stats
  6454. * If ((num_tx_power_levels + power_level_offset)) ==
  6455. * total_num_tx_power_levels)
  6456. * this message completes the report of tx time per power levels.
  6457. * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID messages
  6458. * will be sent by the target to deliver the remainder of the tx time
  6459. * per power level stats.
  6460. */
  6461. A_UINT32 power_level_offset;
  6462. /* radio id for this tx time per power level statistics (if multiple radio supported) */
  6463. A_UINT32 radio_id;
  6464. /*
  6465. * This TLV will be followed by a TLV containing a variable-length array of
  6466. * A_UINT32 with tx time per power level data
  6467. * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
  6468. * The tx time is in units of milliseconds.
  6469. * The power levels are board-specific values; a board-specific translation
  6470. * has to be applied to determine what actual power corresponds to each
  6471. * power level.
  6472. * Just as the host has a BDF file available, the host should also have
  6473. * a data file available that provides the power level to power translations.
  6474. */
  6475. } wmi_tx_power_level_stats_evt_fixed_param;
  6476. /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
  6477. typedef struct {
  6478. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  6479. /** unique id identifying the request, given in the request stats command */
  6480. A_UINT32 request_id;
  6481. /** Number of radios*/
  6482. A_UINT32 num_radio;
  6483. /** more_data will be set depending on the number of radios */
  6484. A_UINT32 more_radio_events;
  6485. /*
  6486. * This TLV is followed by another TLV of array of bytes
  6487. * size of(struct wmi_radio_link_stats);
  6488. *
  6489. * This TLV is followed by another TLV of array of bytes
  6490. * num_channels * size of(struct wmi_channel_stats)
  6491. */
  6492. } wmi_radio_link_stats_event_fixed_param;
  6493. /* per rate statistics */
  6494. typedef struct {
  6495. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
  6496. /** rate information
  6497. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  6498. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  6499. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  6500. * b'3-b'0 indicate the rate, which is indicated as follows:
  6501. * OFDM : 0: OFDM 48 Mbps
  6502. * 1: OFDM 24 Mbps
  6503. * 2: OFDM 12 Mbps
  6504. * 3: OFDM 6 Mbps
  6505. * 4: OFDM 54 Mbps
  6506. * 5: OFDM 36 Mbps
  6507. * 6: OFDM 18 Mbps
  6508. * 7: OFDM 9 Mbps
  6509. * CCK (pream == 1)
  6510. * 0: CCK 11 Mbps Long
  6511. * 1: CCK 5.5 Mbps Long
  6512. * 2: CCK 2 Mbps Long
  6513. * 3: CCK 1 Mbps Long
  6514. * 4: CCK 11 Mbps Short
  6515. * 5: CCK 5.5 Mbps Short
  6516. * 6: CCK 2 Mbps Short
  6517. * HT/VHT (pream == 2/3)
  6518. * 0..7: MCS0..MCS7 (HT)
  6519. * 0..9: MCS0..MCS9 (VHT)
  6520. */
  6521. A_UINT32 rate;
  6522. /** units of 100 Kbps */
  6523. A_UINT32 bitrate;
  6524. /** number of successfully transmitted data pkts (ACK rcvd) */
  6525. A_UINT32 tx_mpdu;
  6526. /** number of received data pkts */
  6527. A_UINT32 rx_mpdu;
  6528. /** number of data packet losses (no ACK) */
  6529. A_UINT32 mpdu_lost;
  6530. /** total number of data pkt retries */
  6531. A_UINT32 retries;
  6532. /** number of short data pkt retries */
  6533. A_UINT32 retries_short;
  6534. /** number of long data pkt retries */
  6535. A_UINT32 retries_long;
  6536. } wmi_rate_stats;
  6537. typedef struct {
  6538. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
  6539. /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
  6540. A_UINT32 peer_type;
  6541. /** mac address */
  6542. wmi_mac_addr peer_mac_address;
  6543. /** peer wmi_CAPABILITY_XXX */
  6544. A_UINT32 capabilities;
  6545. /** number of rates */
  6546. A_UINT32 num_rates;
  6547. } wmi_peer_link_stats;
  6548. /** PEER statistics (once started) reset and start afresh after each connection */
  6549. typedef struct {
  6550. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
  6551. /** unique id identifying the request, given in the request stats command */
  6552. A_UINT32 request_id;
  6553. /** number of peers accomidated in this particular event */
  6554. A_UINT32 num_peers;
  6555. /** Indicates the fragment number */
  6556. A_UINT32 peer_event_number;
  6557. /** Indicates if there are more peers which will be sent as seperate peer_stats event */
  6558. A_UINT32 more_data;
  6559. /**
  6560. * This TLV is followed by another TLV
  6561. * num_peers * size of(struct wmi_peer_stats)
  6562. * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
  6563. */
  6564. } wmi_peer_stats_event_fixed_param;
  6565. /* per access category statistics */
  6566. typedef struct {
  6567. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
  6568. /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
  6569. A_UINT32 ac_type;
  6570. /** number of successfully transmitted unicast data pkts (ACK rcvd) */
  6571. A_UINT32 tx_mpdu;
  6572. /** number of received unicast mpdus */
  6573. A_UINT32 rx_mpdu;
  6574. /** number of succesfully transmitted multicast data packets */
  6575. /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
  6576. A_UINT32 tx_mcast;
  6577. /** number of received multicast data packets */
  6578. A_UINT32 rx_mcast;
  6579. /** number of received unicast a-mpdus */
  6580. A_UINT32 rx_ampdu;
  6581. /** number of transmitted unicast a-mpdus */
  6582. A_UINT32 tx_ampdu;
  6583. /** number of data pkt losses (no ACK) */
  6584. A_UINT32 mpdu_lost;
  6585. /** total number of data pkt retries */
  6586. A_UINT32 retries;
  6587. /** number of short data pkt retries */
  6588. A_UINT32 retries_short;
  6589. /** number of long data pkt retries */
  6590. A_UINT32 retries_long;
  6591. /** data pkt min contention time (usecs) */
  6592. A_UINT32 contention_time_min;
  6593. /** data pkt max contention time (usecs) */
  6594. A_UINT32 contention_time_max;
  6595. /** data pkt avg contention time (usecs) */
  6596. A_UINT32 contention_time_avg;
  6597. /** num of data pkts used for contention statistics */
  6598. A_UINT32 contention_num_samples;
  6599. /** number of pending pkts */
  6600. A_UINT32 tx_pending_msdu;
  6601. } wmi_wmm_ac_stats;
  6602. /* interface statistics */
  6603. typedef struct {
  6604. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
  6605. /** access point beacon received count from connected AP */
  6606. A_UINT32 beacon_rx;
  6607. /** access point mgmt frames received count from connected AP (including Beacon) */
  6608. A_UINT32 mgmt_rx;
  6609. /** action frames received count */
  6610. A_UINT32 mgmt_action_rx;
  6611. /** action frames transmit count */
  6612. A_UINT32 mgmt_action_tx;
  6613. /** access Point Beacon and Management frames RSSI (averaged) */
  6614. A_UINT32 rssi_mgmt;
  6615. /** access Point Data Frames RSSI (averaged) from connected AP */
  6616. A_UINT32 rssi_data;
  6617. /** access Point ACK RSSI (averaged) from connected AP */
  6618. A_UINT32 rssi_ack;
  6619. /** number of peers */
  6620. A_UINT32 num_peers;
  6621. /** Indicates how many peer_stats events will be sent depending on the num_peers. */
  6622. A_UINT32 num_peer_events;
  6623. /** number of ac */
  6624. A_UINT32 num_ac;
  6625. /** Roaming Stat */
  6626. A_UINT32 roam_state;
  6627. /** Average Beacon spread offset is the averaged time delay between TBTT and beacon TSF */
  6628. /** Upper 32 bits of averaged 64 bit beacon spread offset */
  6629. A_UINT32 avg_bcn_spread_offset_high;
  6630. /** Lower 32 bits of averaged 64 bit beacon spread offset */
  6631. A_UINT32 avg_bcn_spread_offset_low;
  6632. /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
  6633. A_UINT32 is_leaky_ap;
  6634. /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
  6635. A_UINT32 avg_rx_frms_leaked;
  6636. /** Rx leak watch window currently in force to minimize data loss because of leaky AP. Rx leak window is the
  6637. time driver waits before shutting down the radio or switching the channel and after receiving an ACK for
  6638. a data frame with PM bit set) */
  6639. A_UINT32 rx_leak_window;
  6640. A_UINT32 tx_rts_succ_cnt;
  6641. A_UINT32 tx_rts_fail_cnt;
  6642. A_UINT32 tx_ppdu_succ_cnt;
  6643. A_UINT32 tx_ppdu_fail_cnt;
  6644. /** msecs the interface is in Connected state (accruing over time) */
  6645. A_UINT32 connected_duration;
  6646. /** msecs the interface is in DisConnected state (accruing over time) */
  6647. A_UINT32 disconnected_duration;
  6648. /** msecs the interface is doing RTT ranging (accruing over time) */
  6649. A_UINT32 rtt_ranging_duration;
  6650. /** msecs the interface is in RTT responder mode (accruing over time) */
  6651. A_UINT32 rtt_responder_duration;
  6652. /** Number of Probes (Tx) sent on the interface (accruing over time) */
  6653. A_UINT32 num_probes_tx;
  6654. /** Number of Beacon misses on this interface (accruing over time) */
  6655. A_UINT32 num_beacon_miss;
  6656. } wmi_iface_link_stats;
  6657. typedef enum {
  6658. WMI_OFFLOAD_STATS_TYPE_SOC_BCAST = 0,
  6659. WMI_OFFLOAD_STATS_TYPE_SOC_MCAST = 1,
  6660. WMI_OFFLOAD_STATS_TYPE_SOC_UCAST = 2,
  6661. WMI_OFFLOAD_STATS_TYPE_ARP = 3,
  6662. WMI_OFFLOAD_STATS_TYPE_NS = 4,
  6663. WMI_OFFLOAD_STATS_TYPE_APF_BCAST = 5,
  6664. WMI_OFFLOAD_STATS_TYPE_APF_MCAST = 6,
  6665. WMI_OFFLOAD_STATS_TYPE_APF_UCAST = 7,
  6666. /* Add New offload stat type here */
  6667. WMI_OFFLOAD_STATS_TYPE_MAX,
  6668. } wmi_offload_stats_type;
  6669. typedef struct {
  6670. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_offload_stats */
  6671. /** Type of offload stat. enum wmi_offload_stats_type **/
  6672. A_UINT32 type;
  6673. /** Number of (MSDUs) frames Received **/
  6674. A_UINT32 rx_count;
  6675. /** Number of frames Dropped **/
  6676. A_UINT32 drp_count;
  6677. /** Number of frames for which FW Responded (Valid for ARP and NS only). (or)
  6678. * Number of frames forwarded to Host (Valid for stats type except ARP and NS). **/
  6679. A_UINT32 fwd_count;
  6680. } wmi_iface_offload_stats;
  6681. /** Interface statistics (once started) reset and start afresh after each connection */
  6682. typedef struct {
  6683. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
  6684. /** unique id identifying the request, given in the request stats command */
  6685. A_UINT32 request_id;
  6686. /** unique id identifying the VDEV, generated by the caller */
  6687. A_UINT32 vdev_id;
  6688. /** Number of offload stats **/
  6689. A_UINT32 num_offload_stats;
  6690. /*
  6691. * This TLV is followed by other TLVs:
  6692. * wmi_iface_link_stats iface_link_stats;
  6693. * num_ac * size of(struct wmi_wmm_ac_stats)
  6694. * wmi_iface_offload_stats iface_offload_stats[num_offload_stats]
  6695. */
  6696. } wmi_iface_link_stats_event_fixed_param;
  6697. typedef struct {
  6698. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param */
  6699. /** bitmask listing which WLM stats are provided.
  6700. * Copied from wlm_stats_cmd_fixed_param.
  6701. * (This field is provided for convenience rather than necessity, since
  6702. * the recipient can directly check which TLV arrays have non-zero length.)
  6703. */
  6704. A_UINT32 request_bitmask;
  6705. /** unique id identifying the VDEV, generated by the caller */
  6706. A_UINT32 vdev_id;
  6707. /**
  6708. * timestamp of event report, in microseconds units
  6709. * This timestamp is for debugging purposes only.
  6710. * It can be used to correlate this WLM stats event data with
  6711. * other WLM information uploaded through other means.
  6712. */
  6713. A_UINT32 timestamp;
  6714. /**
  6715. * Interval between two consecutive WLM stats query requests,
  6716. * in microseconds units.
  6717. * This interval is used for converting the scan_period and pwr_on_period
  6718. * values from within wmi_wlm_link_stats from percentage units to time
  6719. * units.
  6720. */
  6721. A_UINT32 req_interval;
  6722. /*
  6723. * This TLV is followed by an A_UINT32 array TLV carrying an opaque payload.
  6724. */
  6725. } wmi_wlm_stats_event_fixed_param;
  6726. /** Suspend option */
  6727. enum {
  6728. WMI_PDEV_SUSPEND, /* suspend */
  6729. WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
  6730. };
  6731. typedef struct {
  6732. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
  6733. /* suspend option sent to target */
  6734. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  6735. A_UINT32 suspend_opt;
  6736. } wmi_pdev_suspend_cmd_fixed_param;
  6737. typedef struct {
  6738. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
  6739. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  6740. } wmi_pdev_resume_cmd_fixed_param;
  6741. typedef struct {
  6742. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
  6743. A_UINT32 num_vdev_stats; /* number of vdevs */
  6744. } wmi_vdev_rate_stats_event_fixed_param;
  6745. typedef struct {
  6746. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info*/
  6747. A_UINT32 vdevid; /* Id of the wlan vdev*/
  6748. A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted*/
  6749. A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above*/
  6750. A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
  6751. A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
  6752. } wmi_vdev_rate_ht_info;
  6753. typedef struct {
  6754. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param */
  6755. A_UINT32 num_failure_info; /* How many holes on rx aggregation */
  6756. } wmi_rx_aggr_failure_event_fixed_param;
  6757. typedef struct {
  6758. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_wmi_rx_aggr_failure_info */
  6759. A_UINT32 start_seq; /* start sequence number of the hole */
  6760. A_UINT32 end_seq; /* end sequence number of the hole */
  6761. } wmi_rx_aggr_failure_info;
  6762. typedef struct {
  6763. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_request_cmd_fixed_param */
  6764. /** unique id identifying the VDEV, generated by the caller */
  6765. A_UINT32 vdev_id;
  6766. /** peer MAC address */
  6767. wmi_mac_addr peer_macaddr;
  6768. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  6769. } wmi_peer_tx_pn_request_cmd_fixed_param;
  6770. typedef struct {
  6771. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_response_event_fixed_param */
  6772. /** unique id identifying the VDEV, generated by the caller */
  6773. A_UINT32 vdev_id;
  6774. /** peer MAC address */
  6775. wmi_mac_addr peer_macaddr;
  6776. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  6777. /** Packet Number
  6778. * The PN is provided in little endian order, with bits 7:0 of the PN
  6779. * residing in pn[0].
  6780. * The key_type indirectly specifies the packet number length, and thus
  6781. * how many bytes within pn[] are filled with valid data.
  6782. */
  6783. A_UINT8 pn[16];
  6784. } wmi_peer_tx_pn_response_event_fixed_param;
  6785. typedef struct {
  6786. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  6787. wmi_stats_id stats_id;
  6788. /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
  6789. A_UINT32 num_pdev_stats;
  6790. /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
  6791. A_UINT32 num_vdev_stats;
  6792. /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
  6793. A_UINT32 num_peer_stats;
  6794. A_UINT32 num_bcnflt_stats;
  6795. /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
  6796. A_UINT32 num_chan_stats;
  6797. /** number of MIB stats event structures (wmi_mib_stats) */
  6798. A_UINT32 num_mib_stats;
  6799. A_UINT32 pdev_id; /** pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0. */
  6800. /** number of beacon stats event structures (wmi_bcn_stats) */
  6801. A_UINT32 num_bcn_stats;
  6802. /** number of extended peer stats event structures (wmi_peer_extd_stats) */
  6803. A_UINT32 num_peer_extd_stats;
  6804. /** number of extd2 peer stats event structures (wmi_peer_extd2_stats) */
  6805. A_UINT32 num_peer_extd2_stats;
  6806. /** last_event
  6807. * The most significant bit is set to 1 to indicate whether the last_event
  6808. * field contains valid data. The least significant bit is set to 1 to
  6809. * indicate this is the final WMI_STATS_EVENT in a series.
  6810. */
  6811. A_UINT32 last_event;
  6812. /** number of extended MIB stats event structures (wmi_mib_extd_stats) */
  6813. A_UINT32 num_mib_extd_stats;
  6814. /* This TLV is followed by another TLV of array of bytes
  6815. * A_UINT8 data[];
  6816. * This data array contains
  6817. * num_pdev_stats * size of(struct wmi_pdev_stats)
  6818. * num_vdev_stats * size of(struct wmi_vdev_stats)
  6819. * num_peer_stats * size of(struct wmi_peer_stats)
  6820. * num_bcnflt_stats * size_of()
  6821. * num_chan_stats * size of(struct wmi_chan_stats)
  6822. * num_mib_stats * size of(struct wmi_mib_stats)
  6823. * num_bcn_stats * size of(struct wmi_bcn_stats)
  6824. */
  6825. /* If WMI_REQUEST_PEER_EXTD_STAT is set in stats_id,
  6826. * the data[] array also contains num_peer_stats * size of wmi_peer_extd_stats
  6827. * following the information elements listed above.
  6828. */
  6829. /* If WMI_REQUEST_MIB_EXTD_STAT is set in stats_id,
  6830. * the data[] array also contains
  6831. * num_mib_extd_stats * size of(struct wmi_mib_extd_stats)
  6832. * following the information elements listed above.
  6833. */
  6834. } wmi_stats_event_fixed_param;
  6835. /* WLAN channel CCA stats bitmap */
  6836. #define WLAN_STATS_IDLE_TIME_SHIFT 0
  6837. #define WLAN_STATS_IDLE_TIME_TIME 0x00000001
  6838. #define WLAN_STATS_TX_TIME_SHIFT 1
  6839. #define WLAN_STATS_TX_TIME_MASK 0x00000002
  6840. #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
  6841. #define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
  6842. #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
  6843. #define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
  6844. #define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
  6845. #define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
  6846. #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
  6847. #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
  6848. #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
  6849. #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
  6850. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
  6851. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
  6852. /* WLAN peer signal stats bitmap */
  6853. #define WLAN_STATS_PER_CHAIN_SNR_SHIFT 0
  6854. #define WLAN_STATS_PER_CHAIN_SNR_MASK 0x00000001
  6855. #define WLAN_STATS_PER_CHAIN_NF_SHIFT 1
  6856. #define WLAN_STATS_PER_CHAIN_NF_MASK 0x00000002
  6857. /* WLAN TX stats bitmap */
  6858. #define WLAN_STATS_TX_MSDU_CNT_SHIFT 0
  6859. #define WLAN_STATS_TX_MSDU_CNT_MASK 0x00000001
  6860. #define WLAN_STATS_TX_MPDU_CNT_SHIFT 1
  6861. #define WLAN_STATS_TX_MPDU_CNT_MASK 0x00000002
  6862. #define WLAN_STATS_TX_PPDU_CNT_SHIFT 2
  6863. #define WLAN_STATS_TX_PPDU_CNT_MASK 0x00000004
  6864. #define WLAN_STATS_TX_BYTES_SHIFT 3
  6865. #define WLAN_STATS_TX_BYTES_MASK 0x00000008
  6866. #define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT 4
  6867. #define WLAN_STATS_TX_MSDU_DROP_CNT_MASK 0x00000010
  6868. #define WLAN_STATS_TX_DROP_BYTES_SHIFT 5
  6869. #define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000020
  6870. #define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT 6
  6871. #define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK 0x00000040
  6872. #define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT 7
  6873. #define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK 0x00000080
  6874. #define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT 8
  6875. #define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK 0x00000100
  6876. #define WLAN_STATS_TX_MPDU_AGGR_SHIFT 9
  6877. #define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000200
  6878. #define WLAN_STATS_TX_SUCC_MCS_SHIFT 10
  6879. #define WLAN_STATS_TX_SUCC_MCS_MASK 0x00000400
  6880. #define WLAN_STATS_TX_FAIL_MCS_SHIFT 11
  6881. #define WLAN_STATS_TX_FAIL_MCS_MASK 0x00000800
  6882. #define WLAN_STATS_TX_PPDU_DELAY_SHIFT 12
  6883. #define WLAN_STATS_TX_PPDU_DELAY_MASK 0x00001000
  6884. /* WLAN RX stats bitmap */
  6885. #define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT 0
  6886. #define WLAN_STATS_MAC_RX_MPDU_CNT_MASK 0x00000001
  6887. #define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
  6888. #define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
  6889. #define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT 2
  6890. #define WLAN_STATS_PHY_RX_PPDU_CNT_MASK 0x00000004
  6891. #define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
  6892. #define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
  6893. #define WLAN_STATS_RX_DISORDER_CNT_SHIFT 4
  6894. #define WLAN_STATS_RX_DISORDER_CNT_MASK 0x00000010
  6895. #define WLAN_STATS_RX_MPDU_RETRY_CNT_SHIFT 5
  6896. #define WLAN_STATS_RX_MPDU_RETRY_CNT_MASK 0x00000020
  6897. #define WLAN_STATS_RX_MPDU_DUP_CNT_SHIFT 6
  6898. #define WLAN_STATS_RX_MPDU_DUP_CNT_MASK 0x00000040
  6899. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_SHIFT 7
  6900. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_MASK 0x00000080
  6901. #define WLAN_STATS_RX_MPDU_AGGR_SHIFT 8
  6902. #define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00000100
  6903. #define WLAN_STATS_RX_MCS_SHIFT 9
  6904. #define WLAN_STATS_RX_MCS_MASK 0x00000200
  6905. #define WLAN_STATS_STA_PS_INDS_SHIFT 10
  6906. #define WLAN_STATS_STA_PS_INDS_MASK 0x00000400
  6907. #define WLAN_STATS_STA_PS_DURS_SHIFT 11
  6908. #define WLAN_STATS_STA_PS_DURS_MASK 0x00000800
  6909. #define WLAN_STATS_RX_PROBE_REQS_SHIFT 12
  6910. #define WLAN_STATS_RX_PROBE_REQS_MASK 0x00001000
  6911. #define WLAN_STATS_RX_OTH_MGMTS_SHIFT 13
  6912. #define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00002000
  6913. typedef struct
  6914. {
  6915. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
  6916. A_UINT32 vdev_id;
  6917. /** Percentage of idle time, no TX, no RX, no interference */
  6918. A_UINT32 idle_time;
  6919. /** Percentage of time transmitting packets */
  6920. A_UINT32 tx_time;
  6921. /** Percentage of time receiving packets in current BSSs */
  6922. A_UINT32 rx_in_bss_time;
  6923. /** Percentage of time receiving packets not in current BSSs */
  6924. A_UINT32 rx_out_bss_time;
  6925. /** Percentage of time interference detected. */
  6926. A_UINT32 rx_busy_time;
  6927. /** Percentage of time receiving packets with errors
  6928. * or packets flagged as retransmission or seqnum discontinued. */
  6929. A_UINT32 rx_in_bad_cond_time;
  6930. /** Percentage of time the device transmitted packets that haven't been ACKed. */
  6931. A_UINT32 tx_in_bad_cond_time;
  6932. /** Percentage of time the chip is unable to work in normal conditions. */
  6933. A_UINT32 wlan_not_avail_time;
  6934. } wmi_chan_cca_stats;
  6935. /** Thresholds of cca stats, stands for percentages of stats variation.
  6936. * Check wmi_chan_cca_stats for each stats's meaning.
  6937. */
  6938. typedef struct
  6939. {
  6940. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
  6941. A_UINT32 idle_time; /* units = percent */
  6942. A_UINT32 tx_time; /* units = percent */
  6943. A_UINT32 rx_in_bss_time; /* units = percent */
  6944. A_UINT32 rx_out_bss_time; /* units = percent */
  6945. A_UINT32 rx_busy_time; /* units = percent */
  6946. A_UINT32 rx_in_bad_cond_time; /* units = percent */
  6947. A_UINT32 tx_in_bad_cond_time; /* units = percent */
  6948. A_UINT32 wlan_not_avail_time; /* units = percent */
  6949. } wmi_chan_cca_stats_thresh;
  6950. typedef struct
  6951. {
  6952. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
  6953. A_UINT32 vdev_id;
  6954. A_UINT32 peer_id;
  6955. /** per chain SNR in current bss, units are dB */
  6956. A_INT32 per_chain_snr[WMI_MAX_CHAINS];
  6957. /** per chain background noise, units are dBm */
  6958. A_INT32 per_chain_nf[WMI_MAX_CHAINS];
  6959. /** per antenna rx MPDUs */
  6960. A_UINT32 per_antenna_rx_mpdus[WMI_MAX_CHAINS];
  6961. /** per antenna tx MPDUs */
  6962. A_UINT32 per_antenna_tx_mpdus[WMI_MAX_CHAINS];
  6963. /** num of valid chains for per antenna rx/tx MPDU cnts*/
  6964. A_UINT32 num_chains_valid;
  6965. } wmi_peer_signal_stats;
  6966. /** Thresholds of signal stats, stand for percentage of stats variation.
  6967. * Check wmi_peer_signal_stats for each stats's meaning.
  6968. */
  6969. typedef struct
  6970. {
  6971. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh */
  6972. A_UINT32 per_chain_snr; /* units = dB */
  6973. A_UINT32 per_chain_nf; /* units = dBm */
  6974. } wmi_peer_signal_stats_thresh;
  6975. typedef struct
  6976. {
  6977. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
  6978. /** Number of total TX MSDUs on MAC layer in the period */
  6979. A_UINT32 tx_msdu_cnt;
  6980. /** Number of total TX MPDUs on MAC layer in the period */
  6981. A_UINT32 tx_mpdu_cnt;
  6982. /** Number of total TX PPDUs on MAC layer in the period */
  6983. A_UINT32 tx_ppdu_cnt;
  6984. /** Bytes of tx data on MAC layer in the period */
  6985. A_UINT32 tx_bytes;
  6986. /** Number of TX MSDUs cancelled due to any reason in the period,
  6987. * such as WMM limitation/bandwidth limitation/radio congestion */
  6988. A_UINT32 tx_msdu_drop_cnt;
  6989. /** Bytes of dropped TX packets in the period */
  6990. A_UINT32 tx_drop_bytes;
  6991. /** Number of unacked transmissions of MPDUs */
  6992. A_UINT32 tx_mpdu_retry_cnt;
  6993. /** Number of MPDUs have not been ACKed despite retried */
  6994. A_UINT32 tx_mpdu_fail_cnt;
  6995. /** Number of PPDUs which received no block ack */
  6996. A_UINT32 tx_ppdu_fail_cnt;
  6997. /* This TLV is followed by TLVs below: :
  6998. * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
  6999. * A_UINT32 tx_succ_mcs[tx_succ_mcs_array_len];
  7000. * A_UINT32 tx_fail_mcs[tx_fail_mcs_array_len];
  7001. * A_UINT32 tx_ppdu_delay[tx_ppdu_delay_array_len];
  7002. */
  7003. } wmi_tx_stats;
  7004. /** Thresholds of tx stats, stand for percentage of stats variation.
  7005. * Check wmi_tx_stats for each stats's meaning.
  7006. */
  7007. typedef struct
  7008. {
  7009. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
  7010. A_UINT32 tx_msdu_cnt;
  7011. A_UINT32 tx_mpdu_cnt;
  7012. A_UINT32 tx_ppdu_cnt;
  7013. A_UINT32 tx_bytes;
  7014. A_UINT32 tx_msdu_drop_cnt;
  7015. A_UINT32 tx_drop_bytes;
  7016. A_UINT32 tx_mpdu_retry_cnt;
  7017. A_UINT32 tx_mpdu_fail_cnt;
  7018. A_UINT32 tx_ppdu_fail_cnt;
  7019. A_UINT32 tx_mpdu_aggr;
  7020. A_UINT32 tx_succ_mcs;
  7021. A_UINT32 tx_fail_mcs;
  7022. A_UINT32 tx_ppdu_delay;
  7023. } wmi_tx_stats_thresh;
  7024. typedef struct
  7025. {
  7026. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
  7027. A_UINT32 vdev_id;
  7028. A_UINT32 peer_id;
  7029. /* The TLVs for the 4 AC follows:
  7030. * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
  7031. */
  7032. } wmi_peer_ac_tx_stats;
  7033. typedef struct
  7034. {
  7035. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
  7036. /** Number of RX MPDUs on MAC layer */
  7037. A_UINT32 mac_rx_mpdu_cnt;
  7038. /** Bytes of RX packets on MAC layer */
  7039. A_UINT32 mac_rx_bytes;
  7040. /** Number of RX PPDU on PHY layer */
  7041. A_UINT32 phy_rx_ppdu_cnt;
  7042. /** Bytes of RX packets on PHY layer */
  7043. A_UINT32 phy_rx_bytes;
  7044. /** Number of discontinuity in seqnum */
  7045. A_UINT32 rx_disorder_cnt;
  7046. /** Number of RX MPDUs flagged as retransmissions */
  7047. A_UINT32 rx_mpdu_retry_cnt;
  7048. /** Number of RX MPDUs identified as duplicates */
  7049. A_UINT32 rx_mpdu_dup_cnt;
  7050. /** Number of RX MPDUs discarded */
  7051. A_UINT32 rx_mpdu_discard_cnt;
  7052. /* This TLV is followed by TLVs below:
  7053. * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
  7054. * A_UINT32 rx_mcs[rx_mcs_array_len];
  7055. */
  7056. } wmi_rx_stats;
  7057. /** Thresholds of rx stats, stands for percentage of stats variation.
  7058. * Check wmi_rx_stats for each stats's meaning.
  7059. */
  7060. typedef struct
  7061. {
  7062. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
  7063. A_UINT32 mac_rx_mpdu_cnt;
  7064. A_UINT32 mac_rx_bytes;
  7065. A_UINT32 phy_rx_ppdu_cnt;
  7066. A_UINT32 phy_rx_bytes;
  7067. A_UINT32 rx_disorder_cnt;
  7068. A_UINT32 rx_mpdu_retry_cnt;
  7069. A_UINT32 rx_mpdu_dup_cnt;
  7070. A_UINT32 rx_mpdu_discard_cnt;
  7071. A_UINT32 rx_mpdu_aggr;
  7072. A_UINT32 rx_mcs;
  7073. A_UINT32 sta_ps_inds;
  7074. A_UINT32 sta_ps_durs;
  7075. A_UINT32 rx_probe_reqs;
  7076. A_UINT32 rx_oth_mgmts;
  7077. } wmi_rx_stats_thresh;
  7078. typedef struct
  7079. {
  7080. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
  7081. A_UINT32 vdev_id;
  7082. A_UINT32 peer_id;
  7083. /** How many times STAs go to sleep */
  7084. A_UINT32 sta_ps_inds;
  7085. /** Total sleep time of STAs, milliseconds units */
  7086. A_UINT32 sta_ps_durs;
  7087. /** Number of probe requests received */
  7088. A_UINT32 rx_probe_reqs;
  7089. /** Number of other management frames received, not including probe requests */
  7090. A_UINT32 rx_oth_mgmts;
  7091. /* The TLVs for the 4 AC follows:
  7092. * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
  7093. */
  7094. } wmi_peer_ac_rx_stats;
  7095. typedef struct
  7096. {
  7097. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_period */
  7098. /*
  7099. * This struct provides the timestamps from a low-frequency timer
  7100. * for the start and end of a stats period.
  7101. * Each timestamp is reported twice, with different units.
  7102. * The _msec timestamp is in millisecond units.
  7103. * The _count timestamp is in clock tick units.
  7104. * The timestamp is reported in clock ticks as well as in milliseconds
  7105. * so that if the stats start and end times fall within the same
  7106. * millisecond, the clock tick timestamps can still be used to
  7107. * determine what fraction of a millisecond the stats period occupied.
  7108. */
  7109. A_UINT32 start_low_freq_msec;
  7110. A_UINT32 start_low_freq_count;
  7111. A_UINT32 end_low_freq_msec;
  7112. A_UINT32 end_low_freq_count;
  7113. } wmi_stats_period;
  7114. typedef enum {
  7115. /** Periodic timer timed out, based on the period specified
  7116. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  7117. */
  7118. TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
  7119. /** Any of the (enabled) stats thresholds specified
  7120. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  7121. * within the current stats period.
  7122. */
  7123. TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
  7124. /** In Response to the one-time wlan stats request of
  7125. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  7126. */
  7127. TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
  7128. } wmi_report_stats_event_trigger_cond_id;
  7129. typedef struct
  7130. {
  7131. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_interference */
  7132. /** For cases where a single rx chain has options to be connected to
  7133. * different rx antennas, show which rx antennas were in use during
  7134. * receipt of a given PPDU.
  7135. * This sa_ant_matrix provides a bitmask of the antennas used while
  7136. * receiving this frame.
  7137. */
  7138. A_UINT32 sa_ant_matrix;
  7139. /** Count how many times the hal_rxerr_phy is marked, in this time period.
  7140. * The counter value is reset each period. The host specifies the period
  7141. * via WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD.
  7142. */
  7143. A_UINT32 phyerr_count;
  7144. /** The timestamp at which the WMI event is reported.
  7145. * In targets that have a WBTIMER_1 timer, this timestamp is taken
  7146. * from WBTIMER_1.
  7147. */
  7148. A_UINT32 timestamp;
  7149. } wmi_stats_interference;
  7150. typedef struct {
  7151. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
  7152. /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
  7153. A_UINT32 trigger_cond_id;
  7154. /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
  7155. A_UINT32 cca_chgd_bitmap;
  7156. /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
  7157. A_UINT32 sig_chgd_bitmap;
  7158. /** Bitmap to indicate changed TX counters which exceeded the thresholds */
  7159. A_UINT32 tx_chgd_bitmap;
  7160. /** Bitmap to indicate changed RX counters which exceeded the thresholds */
  7161. A_UINT32 rx_chgd_bitmap;
  7162. /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
  7163. A_UINT32 num_chan_cca_stats;
  7164. /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
  7165. A_UINT32 num_peer_signal_stats;
  7166. /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
  7167. A_UINT32 num_peer_ac_tx_stats;
  7168. /** Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  7169. * The array indicates number of MPDUs sent on specified aggregation size
  7170. * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
  7171. * Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN */
  7172. A_UINT32 tx_mpdu_aggr_array_len;
  7173. /** Array length of tx_succ_mcs[] which is histogram of encoding rate.
  7174. * The array indicates number of acked PPDUs sent at a specific rate */
  7175. A_UINT32 tx_succ_mcs_array_len;
  7176. /** Array length of tx_fail_mcs[] which is histogram of encoding rate.
  7177. * The array indicates number of unacked PPDUs sent at a specific rate */
  7178. A_UINT32 tx_fail_mcs_array_len;
  7179. /** tx_ppdu_delay[]is a histogram of delays on MAC layer.
  7180. * The array counts numbers of PPDUs encountering different TX time delays.
  7181. * TX delay here means time interval between the time a PPDU is queued
  7182. * to the MAC HW for transmission and the time the lower layers of
  7183. * tx FW return a tx status.
  7184. *
  7185. * The bin size tx_ppdu_delay_bin_size_ms specifies how many milliseconds
  7186. * each bin of the tx_ppdu_delay histogram represents.
  7187. * By default the bin size is 10ms.
  7188. * tx_ppdu_delay[0] -> delays between 0-9 ms
  7189. * tx_ppdu_delay[1] -> delays between 10-19 ms
  7190. * ...
  7191. * tx_ppdu_delay[9] -> delays between 90-99 ms
  7192. * tx_ppdu_delay[10] -> delays >= 100 ms
  7193. * Bin size can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS.
  7194. */
  7195. A_UINT32 tx_ppdu_delay_bin_size_ms;
  7196. /** Array length of tx_ppdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN */
  7197. A_UINT32 tx_ppdu_delay_array_len;
  7198. /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
  7199. A_UINT32 num_peer_ac_rx_stats;
  7200. /** Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  7201. * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN */
  7202. A_UINT32 rx_mpdu_aggr_array_len;
  7203. /** Array size of rx_mcs[] which is histogram of encoding rate.
  7204. * The array indicates number of PPDUs received at a specific rate */
  7205. A_UINT32 rx_mcs_array_len;
  7206. /** Array size of stats_period[] which contains several stats periods. */
  7207. A_UINT32 stats_period_array_len;
  7208. /**
  7209. * This TLV is followed by TLVs below:
  7210. * wmi_chan_cca_stats chan_cca_stats[]; Array length is specified by num_chan_cca_stats
  7211. * wmi_peer_signal_stats peer_signal_stats[]; Array length is specified by num_peer_signal_stats
  7212. * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array length is specified by num_peer_ac_tx_stats
  7213. * 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)
  7214. * A_UINT32 tx_mpdu_aggr[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
  7215. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
  7216. * A_UINT32 tx_succ_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
  7217. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
  7218. * A_UINT32 tx_fail_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
  7219. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
  7220. * A_UINT32 tx_ppdu_delay[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_ppdu_delay_array_len,
  7221. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_ppdu_delay_array_len + tx delay index
  7222. * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array length is specified by num_peer_ac_rx_stats
  7223. * 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)
  7224. * A_UINT32 rx_mpdu_aggr[][][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
  7225. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
  7226. * A_UINT32 rx_mcs[][][]; Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
  7227. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
  7228. * wmi_stats_period stats_period[]; Array length is specified by stats_period_array_len
  7229. * wmi_stats_interference stats_interference[]; Array length is determied by dividing array level TLV header's length value by array-element TLV header's length value.
  7230. **/
  7231. } wmi_report_stats_event_fixed_param;
  7232. typedef struct {
  7233. /** TLV tag and len; tag equals
  7234. * WMITLV_TAG_STRUC_wmi_peer_stats_info */
  7235. A_UINT32 tlv_header;
  7236. /** peer MAC address */
  7237. wmi_mac_addr peer_macaddr;
  7238. /** bytes (size of MPDUs) transmitted to this peer */
  7239. struct {
  7240. /* lower 32 bits of the tx_bytes value */
  7241. A_UINT32 low_32;
  7242. /* upper 32 bits of the tx_bytes value */
  7243. A_UINT32 high_32;
  7244. } tx_bytes;
  7245. /** packets (MSDUs) transmitted to this peer */
  7246. struct {
  7247. /* lower 32 bits of the tx_packets value */
  7248. A_UINT32 low_32;
  7249. /* upper 32 bits of the tx_packets value */
  7250. A_UINT32 high_32;
  7251. } tx_packets;
  7252. /** bytes (size of MPDUs) received from this peer */
  7253. struct {
  7254. /* lower 32 bits of the rx_bytes value */
  7255. A_UINT32 low_32;
  7256. /* upper 32 bits of the rx_bytes value */
  7257. A_UINT32 high_32;
  7258. } rx_bytes;
  7259. /** packets (MSDUs) received from this peer */
  7260. struct {
  7261. /* lower 32 bits of the rx_packets value */
  7262. A_UINT32 low_32;
  7263. /* upper 32 bits of the rx_packets value */
  7264. A_UINT32 high_32;
  7265. } rx_packets;
  7266. /** cumulative retry counts (MPDUs) */
  7267. A_UINT32 tx_retries;
  7268. /** number of failed transmissions (MPDUs) (retries exceeded, no ACK) */
  7269. A_UINT32 tx_failed;
  7270. /** rate information, it is output of WMI_ASSEMBLE_RATECODE_V1
  7271. * (in format of 0x1000RRRR)
  7272. * The rate-code is a 4-bytes field in which,
  7273. * for given rate, nss and preamble
  7274. *
  7275. * b'31-b'29 unused / reserved
  7276. * b'28 indicate the version of rate-code (1 = RATECODE_V1)
  7277. * b'27-b'11 unused / reserved
  7278. * b'10-b'8 indicate the preamble (0 OFDM, 1 CCK, 2 HT, 3 VHT)
  7279. * b'7-b'5 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  7280. * b'4-b'0 indicate the rate, which is indicated as follows:
  7281. * OFDM : 0: OFDM 48 Mbps
  7282. * 1: OFDM 24 Mbps
  7283. * 2: OFDM 12 Mbps
  7284. * 3: OFDM 6 Mbps
  7285. * 4: OFDM 54 Mbps
  7286. * 5: OFDM 36 Mbps
  7287. * 6: OFDM 18 Mbps
  7288. * 7: OFDM 9 Mbps
  7289. * CCK (pream == 1)
  7290. * 0: CCK 11 Mbps Long
  7291. * 1: CCK 5.5 Mbps Long
  7292. * 2: CCK 2 Mbps Long
  7293. * 3: CCK 1 Mbps Long
  7294. * 4: CCK 11 Mbps Short
  7295. * 5: CCK 5.5 Mbps Short
  7296. * 6: CCK 2 Mbps Short
  7297. * HT/VHT (pream == 2/3)
  7298. * 0..7: MCS0..MCS7 (HT)
  7299. * 0..9: MCS0..MCS9 (11AC VHT)
  7300. * 0..11: MCS0..MCS11 (11AX VHT)
  7301. */
  7302. /** rate-code of the last transmission */
  7303. A_UINT32 last_tx_rate_code;
  7304. /** rate-code of the last received PPDU */
  7305. A_UINT32 last_rx_rate_code;
  7306. /** bitrate of the last transmission, in units of kbps */
  7307. A_UINT32 last_tx_bitrate_kbps;
  7308. /** bitrate of the last received PPDU, in units of kbps */
  7309. A_UINT32 last_rx_bitrate_kbps;
  7310. /** combined RSSI of the last received PPDU, in unit of dBm */
  7311. A_INT32 peer_rssi;
  7312. /** number of succeed transmissions (MPDUs) (ACK) */
  7313. A_UINT32 tx_succeed;
  7314. /**
  7315. * The RSSI values are in dBm units, and are exponentially time-averaged.
  7316. * The averaging is performed on the dB values (rather than the linear
  7317. * values).
  7318. */
  7319. A_INT32 peer_rssi_per_chain[WMI_MAX_CHAINS];
  7320. } wmi_peer_stats_info;
  7321. typedef struct {
  7322. /** TLV tag and len; tag equals
  7323. * WMITLV_TAG_STRUC_wmi_peer_stats_info_event_fixed_param */
  7324. A_UINT32 tlv_header;
  7325. /** VDEV to which the peers belong to */
  7326. A_UINT32 vdev_id;
  7327. /** number of peers in peer_stats_info[] */
  7328. A_UINT32 num_peers;
  7329. /** flag to indicate if there are more peers which will
  7330. * be sent a following seperate peer_stats_info event */
  7331. A_UINT32 more_data;
  7332. /* This TLV is followed by another TLV of array of structs
  7333. * wmi_peer_stats_info peer_stats_info[];
  7334. */
  7335. } wmi_peer_stats_info_event_fixed_param;
  7336. typedef struct {
  7337. /** TLV tag and len; tag equals
  7338. * WMITLV_TAG_STRUC_wmi_radio_chan_stats */
  7339. A_UINT32 tlv_header;
  7340. /** primary channel freq of the channel whose stats is sent */
  7341. A_UINT32 chan_mhz;
  7342. /** accumulation of time the radio is tuned to this channel,
  7343. * in units of microseconds */
  7344. A_UINT32 on_chan_us;
  7345. /** accumulation of the TX PPDU duration over the measurement period,
  7346. * in units of microseconds */
  7347. A_UINT32 tx_duration_us;
  7348. /** accumulation of the RX PPDU duration over the measurement period,
  7349. * in units of microseconds */
  7350. A_UINT32 rx_duration_us;
  7351. /** ratio of channel busy time to on_chan_us, in units of percent */
  7352. A_UINT32 chan_busy_ratio;
  7353. /** ratio of on_chan_us to the measurement period, in units of percent */
  7354. A_UINT32 on_chan_ratio;
  7355. /** measurement period, in units of microseconds */
  7356. A_UINT32 measurement_period_us;
  7357. /** MPDUs transmitted on this channel */
  7358. A_UINT32 tx_mpdus;
  7359. /** MSDUs transmitted on this channel */
  7360. A_UINT32 tx_msdus;
  7361. /** MPDUS successfully received on this channel */
  7362. A_UINT32 rx_succ_mpdus;
  7363. /** Failed MPDUs (CRC failures) received on this channel */
  7364. A_UINT32 rx_fail_mpdus;
  7365. } wmi_radio_chan_stats;
  7366. typedef struct {
  7367. /** TLV tag and len; tag equals
  7368. * WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param */
  7369. A_UINT32 tlv_header;
  7370. /** number of channel stats in radio_chan_stats[] */
  7371. A_UINT32 num_chans;
  7372. /* This TLV is followed by another TLV of array of structs
  7373. * wmi_radio_chan_stats radio_chan_stats[];
  7374. */
  7375. } wmi_radio_chan_stats_event_fixed_param;
  7376. /**
  7377. * PDEV statistics
  7378. *
  7379. * This struct incorporates the wlan_dbg_stats struct, which is
  7380. * conditionally defined, based on the AR900B flag.
  7381. * The below _v1 struct variant is the unconditional definition
  7382. * that matches what would be conditionally defined by builds that
  7383. * don't use the AR900B flag. The _v2 struct variant is the
  7384. * unconditional definition that matches what would be conditionally
  7385. * defined by builds that use the AR900B flag.
  7386. * The _v2 struct def can be used within host or target builds
  7387. * that don't use the AR900B flag, but needs to interoperate with a
  7388. * target or host build that does use the AR900B flag.
  7389. * Similarly, the _v1 struct def can be used by a host or target build
  7390. * that does use the AR900B flag, but needs to interoperate with a
  7391. * target or host build that doesn't use the AR900B flag.
  7392. *
  7393. * For backwards compatibility, wmi_pdev_stats is still (conditionally)
  7394. * defined, as an alias for either the _v1 or _v2 variant.
  7395. */
  7396. typedef struct {
  7397. /** Channel noise floor */
  7398. A_INT32 chan_nf;
  7399. /** TX frame count */
  7400. A_UINT32 tx_frame_count;
  7401. /** RX frame count */
  7402. A_UINT32 rx_frame_count;
  7403. /** rx clear count */
  7404. A_UINT32 rx_clear_count;
  7405. /** cycle count */
  7406. A_UINT32 cycle_count;
  7407. /** Phy error count */
  7408. A_UINT32 phy_err_count;
  7409. /** Channel Tx Power */
  7410. A_UINT32 chan_tx_pwr;
  7411. /** WAL dbg stats */
  7412. struct wlan_dbg_stats_v1 pdev_stats;
  7413. } wmi_pdev_stats_v1;
  7414. typedef struct {
  7415. /** Channel noise floor */
  7416. A_INT32 chan_nf;
  7417. /** TX frame count */
  7418. A_UINT32 tx_frame_count;
  7419. /** RX frame count */
  7420. A_UINT32 rx_frame_count;
  7421. /** rx clear count */
  7422. A_UINT32 rx_clear_count;
  7423. /** cycle count */
  7424. A_UINT32 cycle_count;
  7425. /** Phy error count */
  7426. A_UINT32 phy_err_count;
  7427. /** Channel Tx Power */
  7428. A_UINT32 chan_tx_pwr;
  7429. /** WAL dbg stats */
  7430. struct wlan_dbg_stats_v2 pdev_stats;
  7431. } wmi_pdev_stats_v2;
  7432. #if defined(AR900B)
  7433. #define wmi_pdev_stats wmi_pdev_stats_v2
  7434. #else
  7435. #define wmi_pdev_stats wmi_pdev_stats_v1
  7436. #endif
  7437. /**
  7438. * VDEV statistics
  7439. * @todo
  7440. * add all VDEV stats here
  7441. */
  7442. typedef struct {
  7443. A_INT32 bcn_snr;
  7444. A_INT32 dat_snr;
  7445. } wmi_snr_info;
  7446. typedef struct {
  7447. /** unique id identifying the VDEV, generated by the caller */
  7448. A_UINT32 vdev_id;
  7449. wmi_snr_info vdev_snr;
  7450. 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) */
  7451. A_UINT32 rx_frm_cnt;/* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast)*/
  7452. A_UINT32 multiple_retry_cnt[WLAN_MAX_AC];/*The number of MSDU packets and MMPDU frames per AC
  7453. that the 802.11 station successfully transmitted after more than one retransmission attempt*/
  7454. A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
  7455. A_UINT32 rts_fail_cnt;/*Total number of RTS/CTS sequence failures for transmission of a packet*/
  7456. A_UINT32 rts_succ_cnt;/*Total number of RTS/CTS sequence success for transmission of a packet*/
  7457. A_UINT32 rx_err_cnt;/*The receive error count. HAL will provide the RxP FCS error global */
  7458. A_UINT32 rx_discard_cnt;/* The sum of the receive error count and dropped-receive-buffer error count. (FCS error)*/
  7459. A_UINT32 ack_fail_cnt;/*Total number packets failed transmit because of no ACK from the remote entity*/
  7460. A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES];/*History of last ten transmit rate, in units of 500 kbit/sec*/
  7461. A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES];/*History of last ten Beacon rssi of the connected Bss*/
  7462. } wmi_vdev_stats;
  7463. /*
  7464. * vdev ext stats with additonal bcn stats
  7465. * (Due to backward compatiblity requirements, these new stats fields cannot be
  7466. * added inside wmi_vdev_stats.)
  7467. */
  7468. typedef struct {
  7469. A_UINT32 vdev_id;
  7470. A_UINT32 tx_bcn_succ_cnt; /* Total number of beacon frame transmitted successfully */
  7471. A_UINT32 tx_bcn_outage_cnt; /* Total number of failed beacons */
  7472. } wmi_bcn_stats;
  7473. /**
  7474. * peer statistics.
  7475. */
  7476. typedef struct {
  7477. /** peer MAC address */
  7478. wmi_mac_addr peer_macaddr;
  7479. /** rssi */
  7480. A_UINT32 peer_rssi;
  7481. /** last tx data rate used for peer */
  7482. A_UINT32 peer_tx_rate;
  7483. /** last rx data rate used for peer */
  7484. A_UINT32 peer_rx_rate;
  7485. } wmi_peer_stats;
  7486. /**
  7487. * Peer extension statistics
  7488. */
  7489. typedef struct {
  7490. /** peer MAC address */
  7491. wmi_mac_addr peer_macaddr;
  7492. /* lower 32 bits of rx duration in microseconds */
  7493. A_UINT32 rx_duration;
  7494. /** Total TX bytes (including dot11 header) sent to peer */
  7495. A_UINT32 peer_tx_bytes;
  7496. /** Total RX bytes (including dot11 header) received from peer */
  7497. A_UINT32 peer_rx_bytes;
  7498. /** last TX ratecode */
  7499. A_UINT32 last_tx_rate_code;
  7500. /** TX power used by peer - units are 0.5 dBm */
  7501. A_INT32 last_tx_power;
  7502. /* Total number of received multicast & broadcast data frames corresponding to this peer */
  7503. A_UINT32 rx_mc_bc_cnt; /* 1 in the MSB of rx_mc_bc_cnt represents a valid data */
  7504. /* upper 32 bits of rx duration in microseconds */
  7505. A_UINT32 rx_duration_u32; /* 1 in the most significant bit indicates this field contains valid data */
  7506. A_UINT32 reserved[2]; /** for future use - add new peer stats here */
  7507. } wmi_peer_extd_stats;
  7508. typedef struct {
  7509. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_extd2_stats */
  7510. /** peer MAC address */
  7511. wmi_mac_addr peer_macaddr;
  7512. /*
  7513. * The following rx_bytes field (lower/upper pair) counts only the
  7514. * MSDU bytes (after 802.11 decap, if applicable), and thus doesn't
  7515. * count the 802.11 header, unlike the wmi_peer_extd_stats.peer_rx_bytes
  7516. * and wmi_peer_stats_info.rx_bytes fields.
  7517. */
  7518. /** Lower 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  7519. A_UINT32 rx_bytes_l32;
  7520. /** Upper 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  7521. A_UINT32 rx_bytes_u32;
  7522. /** Number of MPDUS received with FCS error from this peer */
  7523. A_UINT32 rx_fcs_err;
  7524. /** Number of MPDUs(both data and non data) received from this peer */
  7525. A_UINT32 rx_mpdus;
  7526. /** nss of last tx data to peer */
  7527. A_UINT32 last_tx_nss;
  7528. /** nss of last rx data from peer */
  7529. A_UINT32 last_rx_nss;
  7530. /** chain mask used for last tx data to peer */
  7531. A_UINT32 last_tx_chain_mask;
  7532. /** chain mask used for last rx data from peer */
  7533. A_UINT32 last_rx_chain_mask;
  7534. } wmi_peer_extd2_stats;
  7535. typedef struct {
  7536. /** Primary channel freq of the channel for which stats are sent */
  7537. A_UINT32 chan_mhz;
  7538. /** Time spent on the channel */
  7539. A_UINT32 sampling_period_us;
  7540. /** Aggregate duration over a sampling period for which channel activity was observed */
  7541. A_UINT32 rx_clear_count;
  7542. /** Accumalation of the TX PPDU duration over a sampling period */
  7543. A_UINT32 tx_duration_us;
  7544. /** Accumalation of the RX PPDU duration over a sampling period */
  7545. A_UINT32 rx_duration_us;
  7546. } wmi_chan_stats;
  7547. /**
  7548. * MIB statistics. See 802.11 spec for the meaning of each field.
  7549. */
  7550. typedef struct {
  7551. A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
  7552. A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
  7553. A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
  7554. A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
  7555. A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
  7556. A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
  7557. A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
  7558. A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
  7559. A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
  7560. A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
  7561. A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
  7562. A_UINT32 tx_Qos_mpdu_grp_frag_cnt; /*dot11QosTransmittedFragmentCount */
  7563. A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
  7564. A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
  7565. A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
  7566. A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
  7567. A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
  7568. A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
  7569. A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
  7570. A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
  7571. A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
  7572. A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
  7573. A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; /*dot11RSNAStatsRobustMgmtCCMPReplays*/
  7574. A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
  7575. A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
  7576. A_UINT32 rsna_CCMP_decrypt_err_cnt; /*dot11RSNAStatsCCMPDecryptErrors*/
  7577. A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
  7578. A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
  7579. A_UINT32 tx_mpdu_cnt_in_ampdu; /*dot11TransmittedMPDUsInAMPDUCount*/
  7580. union {
  7581. A_UINT64 counter; /* for use by target only */
  7582. struct {
  7583. A_UINT32 low;
  7584. A_UINT32 high;
  7585. } upload; /* for use by host */
  7586. } tx_octets_in_ampdu; /*dot11TransmittedOctetsInAMPDUCount*/
  7587. A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
  7588. A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
  7589. union {
  7590. A_UINT64 counter; /* for use by target only */
  7591. struct {
  7592. A_UINT32 rx_octets_in_ampdu_low;
  7593. A_UINT32 rx_octets_in_ampdu_high;
  7594. } upload; /* for use by host */
  7595. } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
  7596. A_UINT32 reserved_1;
  7597. A_UINT32 reserved_2;
  7598. A_UINT32 reserved_3;
  7599. A_UINT32 reserved_4;
  7600. } wmi_mib_stats;
  7601. /**
  7602. * MIB extension statistics.
  7603. */
  7604. typedef struct {
  7605. A_UINT32 tx_msdu_multi_retry_cnt; /*dot11MultipleRetryCount*/
  7606. A_UINT32 tx_ack_fail_cnt; /*dot11ACKFailureCount*/
  7607. A_UINT32 tx_qos_msdu_multi_retry_up; /*dot11QosMultipleRetryCount*/
  7608. A_UINT32 tx_qos_ack_fail_cnt_up; /*dot11QosACKFailureCount*/
  7609. A_UINT32 rsna_cmac_icv_err_cnt; /*dot11RSNAStatsCMACICVErrors*/
  7610. A_UINT32 rsna_cmac_replay_err_cnt; /*dot11RSNAStatsCMACReplays*/
  7611. A_UINT32 rx_ampdu_deli_crc_err_cnt; /*dot11AMPDUDelimiterCRCErrorCount*/
  7612. A_UINT32 reserved[8]; /* Reserve more fields for future extension */
  7613. } wmi_mib_extd_stats;
  7614. typedef struct {
  7615. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
  7616. A_UINT32 vdev_id;
  7617. A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
  7618. A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
  7619. wmi_mac_addr peer_macaddr;
  7620. } wmi_rssi_stats;
  7621. typedef struct {
  7622. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_congestion_stats */
  7623. A_UINT32 vdev_id;
  7624. /* congestion -
  7625. * This field holds the congestion percentage = (busy_time/total_time)*100
  7626. * for the interval from when the vdev was started to the current time
  7627. * (or the time at which the vdev was stopped).
  7628. */
  7629. A_UINT32 congestion;
  7630. } wmi_congestion_stats;
  7631. typedef struct {
  7632. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats */
  7633. A_UINT32 num_per_chain_rssi_stats;
  7634. /* This TLV is followed by another TLV of array of structs:
  7635. * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
  7636. */
  7637. } wmi_per_chain_rssi_stats;
  7638. /* vdev control flags (per bits) */
  7639. #define VDEV_FLAGS_NON_MBSSID_AP 0x00000001 /* legacy AP */
  7640. #define VDEV_FLAGS_TRANSMIT_AP 0x00000002 /* indicate if this vdev is transmitting AP */
  7641. #define VDEV_FLAGS_NON_TRANSMIT_AP 0x00000004 /* explicitly indicate this vdev is non-transmitting AP */
  7642. typedef struct {
  7643. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
  7644. /** unique id identifying the VDEV, generated by the caller */
  7645. A_UINT32 vdev_id;
  7646. /** VDEV type (AP,STA,IBSS,MONITOR) */
  7647. A_UINT32 vdev_type;
  7648. /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
  7649. A_UINT32 vdev_subtype;
  7650. /** VDEV MAC address */
  7651. wmi_mac_addr vdev_macaddr;
  7652. /** Number of configured txrx streams */
  7653. A_UINT32 num_cfg_txrx_streams;
  7654. /**
  7655. * pdev_id for identifying the MAC,
  7656. * See macros starting with WMI_PDEV_ID_ for values.
  7657. */
  7658. A_UINT32 pdev_id;
  7659. /** control flags for this vdev */
  7660. A_UINT32 flags;
  7661. /** vdevid of transmitted AP (mbssid case) */
  7662. A_UINT32 vdevid_trans;
  7663. /* This TLV is followed by another TLV of array of structures
  7664. * wmi_vdev_txrx_streams cfg_txrx_streams[];
  7665. */
  7666. } wmi_vdev_create_cmd_fixed_param;
  7667. typedef struct {
  7668. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_txrx_streams */
  7669. /* band - Should take values from wmi_channel_band_mask */
  7670. A_UINT32 band;
  7671. /* max supported tx streams per given band for this vdev */
  7672. A_UINT32 supported_tx_streams;
  7673. /* max supported rx streams per given band for this vdev */
  7674. A_UINT32 supported_rx_streams;
  7675. } wmi_vdev_txrx_streams;
  7676. /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
  7677. typedef struct {
  7678. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
  7679. A_UINT32 type_count; /** 255: continuous schedule, 0: reserved */
  7680. A_UINT32 duration; /** Absent period duration in micro seconds */
  7681. A_UINT32 interval; /** Absent period interval in micro seconds */
  7682. A_UINT32 start_time; /** 32 bit tsf time when in starts */
  7683. } wmi_p2p_noa_descriptor;
  7684. /** values for vdev_type */
  7685. #define WMI_VDEV_TYPE_AP 0x1
  7686. #define WMI_VDEV_TYPE_STA 0x2
  7687. #define WMI_VDEV_TYPE_IBSS 0x3
  7688. #define WMI_VDEV_TYPE_MONITOR 0x4
  7689. /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
  7690. * by FW to execute the NAN specific WMI commands and also implement NAN specific
  7691. * operations like Network discovery, service provisioning and service
  7692. * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
  7693. * WMI command to create this VDEV once during initialization and host is not
  7694. * expected to use any VDEV specific WMI commands on this VDEV.
  7695. **/
  7696. #define WMI_VDEV_TYPE_NAN 0x5
  7697. #define WMI_VDEV_TYPE_OCB 0x6
  7698. /* NAN Data Interface */
  7699. #define WMI_VDEV_TYPE_NDI 0x7
  7700. #define WMI_VDEV_TYPE_MESH_POINT 0x8
  7701. /*
  7702. * Param values to be sent for WMI_VDEV_PARAM_SGI command
  7703. * which are used in 11ax systems
  7704. */
  7705. #define WMI_SGI_LEGACY 0x1 /* for HT and VHT */
  7706. #define WMI_SGI_HE_400_NS 0x2 /* for HE 400 nsec */
  7707. #define WMI_SGI_HE_800_NS 0x4 /* for HE 800 nsec */
  7708. #define WMI_SGI_HE_1600_NS 0x8 /* for HE 1600 nsec */
  7709. #define WMI_SGI_HE_3200_NS 0x10 /* for HE 3200 nsec */
  7710. /*
  7711. * Param values to be sent for WMI_VDEV_PARAM_HE_LTF command
  7712. * which are used in 11ax systems
  7713. */
  7714. #define WMI_HE_LTF_DEFAULT 0x0
  7715. #define WMI_HE_LTF_1X 0x1
  7716. #define WMI_HE_LTF_2X 0x2
  7717. #define WMI_HE_LTF_4X 0x3
  7718. /** values for vdev_subtype */
  7719. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
  7720. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
  7721. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
  7722. #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
  7723. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
  7724. /* new subtype for 11S mesh is required as 11S functionality differs
  7725. * in many ways from proprietary mesh
  7726. * 11S uses 6-addr frame format and supports peering between mesh
  7727. * stations and dynamic best path selection between mesh stations.
  7728. * While in proprietary mesh, neighboring mesh station MAC is manually
  7729. * added to AST table for traffic flow between mesh stations
  7730. */
  7731. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
  7732. /* Subtype to indicate that the AP VAP is in smart monitor mode
  7733. * This is needed to differentiate in firmware betweem normal AP mode
  7734. * with smart monitor AP mode
  7735. */
  7736. #define WMI_UNIFIED_VDEV_SUBTYPE_SMART_MON 0x7
  7737. /** values for vdev_start_request flags */
  7738. /** Indicates that AP VDEV uses hidden ssid. only valid for
  7739. * AP/GO */
  7740. #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
  7741. /** Indicates if robust management frame/management frame
  7742. * protection is enabled. For GO/AP vdevs, it indicates that
  7743. * it may support station/client associations with RMF enabled.
  7744. * For STA/client vdevs, it indicates that sta will
  7745. * associate with AP with RMF enabled. */
  7746. #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
  7747. /*
  7748. * Host is sending bcn_tx_rate to override the beacon tx rates.
  7749. */
  7750. #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
  7751. /** Indicates if LDPC RX will be advertized inside HT/VHT Capabilities IE
  7752. * of assoc request/response
  7753. */
  7754. #define WMI_UNIFIED_VDEV_START_LDPC_RX_ENABLED (1<<3)
  7755. /* BSS color 0-6 */
  7756. #define WMI_HEOPS_COLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 0, 6)
  7757. #define WMI_HEOPS_COLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
  7758. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  7759. #define WMI_HEOPS_DEFPE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 6, 3)
  7760. #define WMI_HEOPS_DEFPE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
  7761. /* TWT required */
  7762. #define WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops) WMI_GET_BITS(he_ops, 9, 1)
  7763. #define WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
  7764. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET instead */
  7765. #define WMI_HEOPS_TWT_GET_D2(he_ops) \
  7766. WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops)
  7767. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET instead */
  7768. #define WMI_HEOPS_TWT_SET_D2(he_ops, value) \
  7769. WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value)
  7770. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  7771. #define WMI_HEOPS_RTSTHLD_GET_D2(he_ops) WMI_GET_BITS(he_ops, 10, 10)
  7772. #define WMI_HEOPS_RTSTHLD_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 10, 10, value)
  7773. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  7774. #define WMI_HEOPS_PARTBSSCOLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 20, 1)
  7775. #define WMI_HEOPS_PARTBSSCOLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 20, 1, value)
  7776. /* MAX BSS supported by MultiBSS element */
  7777. #define WMI_HEOPS_MAXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 21, 8)
  7778. #define WMI_HEOPS_MAXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 21, 8, value)
  7779. /* Tx BSSID Indicator indicates whether HE AP corresponds to transmitted BSSID */
  7780. #define WMI_HEOPS_TXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 29, 1)
  7781. #define WMI_HEOPS_TXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 29, 1, value)
  7782. /* when set to 1 disables use of BSS color */
  7783. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  7784. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  7785. /**--- HEOPS_DUALBEACON: DO NOT USE - DEPRECATED ---*/
  7786. /* When set to 1 HE AP transmits beacons using two PHY formats,
  7787. * one in non-HE format and other in an HE_EXT_SU PHY format
  7788. */
  7789. #define WMI_HEOPS_DUALBEACON_GET_D2(he_ops) (0)
  7790. #define WMI_HEOPS_DUALBEACON_SET_D2(he_ops, value) {;}
  7791. #define WMI_MAX_HECAP_PHY_SIZE (3)
  7792. /* Dual Band both 2.4 GHz and 5 GHz Supported */
  7793. #define WMI_HECAP_PHY_DB_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
  7794. #define WMI_HECAP_PHY_DB_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
  7795. /*
  7796. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  7797. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  7798. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  7799. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  7800. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  7801. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  7802. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  7803. * 242-tone RU mapping in 40 MHz and 80
  7804. * MHz channel width in 5 GHz. Otherwise Reserved.
  7805. * B6: Reserved
  7806. */
  7807. #define WMI_HECAP_PHY_CBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  7808. #define WMI_HECAP_PHY_CBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  7809. /*
  7810. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  7811. * where in the preamble only the secondary 20 MHz is punctured
  7812. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  7813. * where in the preamble only one of the two 20 MHz sub-channels in the
  7814. * secondary 40 MHz is punctured
  7815. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  7816. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  7817. * secondary 20 MHz is punctured
  7818. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  7819. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  7820. * primary 40 MHz is present
  7821. */
  7822. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  7823. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  7824. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  7825. #define WMI_HECAP_PHY_COD_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  7826. #define WMI_HECAP_PHY_COD_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  7827. /* Indicates support of transmission and reception of LDPC encoded packets */
  7828. #define WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  7829. #define WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  7830. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  7831. #define WMI_HECAP_PHY_TXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  7832. #define WMI_HECAP_PHY_TXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  7833. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  7834. #define WMI_HECAP_PHY_RXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  7835. #define WMI_HECAP_PHY_RXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  7836. /*
  7837. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  7838. */
  7839. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  7840. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  7841. /*
  7842. * When the Doppler Rx subfield is 1, indicates the maximum number of space-
  7843. * time streams supported for reception when midamble is used in the Data field.
  7844. */
  7845. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  7846. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  7847. /*
  7848. * B0: For a transmitting STA acting as beamformee, it indicates support of
  7849. * NDP reception using 4x LTF and 3.2 us guard interval duration
  7850. */
  7851. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  7852. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  7853. /* indicates support for the transmission of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  7854. #define WMI_HECAP_PHY_TXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  7855. #define WMI_HECAP_PHY_TXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  7856. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  7857. #define WMI_HECAP_PHY_RXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  7858. #define WMI_HECAP_PHY_RXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  7859. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  7860. #define WMI_HECAP_PHY_TXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  7861. #define WMI_HECAP_PHY_TXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  7862. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  7863. #define WMI_HECAP_PHY_RXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  7864. #define WMI_HECAP_PHY_RXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  7865. /*
  7866. * If the transmitting STA is an AP:
  7867. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  7868. * transmission.
  7869. * If the transmitting STA is a non-AP STA:
  7870. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  7871. * transmission.
  7872. */
  7873. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  7874. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  7875. /*
  7876. * If the transmitting STA is an AP:
  7877. * indicates STA supports of reception of UL MUMIMO transmission on an
  7878. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  7879. * If the transmitting STA is a non-AP STA:
  7880. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  7881. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  7882. */
  7883. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  7884. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  7885. /* Tx DCM
  7886. * B0:B1
  7887. * 00: Does not support DCM
  7888. * 01: BPSK
  7889. * 10: QPSK
  7890. * 11: 16-QAM
  7891. * B2 signals maximum number of spatial streams with DCM
  7892. * 0: 1 spatial stream
  7893. * 1: 2 spatial streams
  7894. */
  7895. #define WMI_HECAP_PHY_DCMTX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  7896. #define WMI_HECAP_PHY_DCMTX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  7897. /* Rx DCM
  7898. * B0:B1
  7899. * 00: Does not support DCM
  7900. * 01: BPSK
  7901. * 10: QPSK
  7902. * 11: 16-QAM
  7903. * B2 signals maximum number of spatial streams with DCM
  7904. * 0: 1 spatial stream
  7905. * 1: 2 spatial streams
  7906. */
  7907. #define WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  7908. #define WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  7909. /*
  7910. * Indicates that the STA supports the reception of an HE MU PPDU payload
  7911. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  7912. */
  7913. #define WMI_HECAP_PHY_ULHEMU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  7914. #define WMI_HECAP_PHY_ULHEMU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  7915. /* Indicates support for operation as an SU beamformer */
  7916. #define WMI_HECAP_PHY_SUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  7917. #define WMI_HECAP_PHY_SUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  7918. /* Indicates support for operation as an SU beamformee */
  7919. #define WMI_HECAP_PHY_SUBFME_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  7920. #define WMI_HECAP_PHY_SUBFME_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  7921. /* Indicates support for operation as an MU Beamformer */
  7922. #define WMI_HECAP_PHY_MUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  7923. #define WMI_HECAP_PHY_MUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  7924. /*
  7925. * Num STS -1 for <= 80MHz (min val 3)
  7926. * The maximum number of space-time streams minus 1 that the STA can
  7927. * receive in an HE NDP
  7928. */
  7929. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  7930. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  7931. /*
  7932. * Num STS -1 for > 80MHz (min val 3)
  7933. * The maximum number of space-time streams minus 1 that the STA can
  7934. * receive in an HE NDP
  7935. */
  7936. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  7937. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  7938. /*
  7939. * Number Of Sounding Dimensions For <= 80 MHz
  7940. * If SU beamformer capable, set to the maximum supported value of the
  7941. * TXVECTOR parameter NUM_STS minus 1.
  7942. * Otherwise, reserved.
  7943. */
  7944. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  7945. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  7946. /*
  7947. * Number Of Sounding Dimensions For > 80 MHz
  7948. * If SU beamformer capable, set to the maximum supported value of the
  7949. * TXVECTOR parameter NUM_STS minus 1.
  7950. * Otherwise, reserved.
  7951. */
  7952. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  7953. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  7954. /*
  7955. * Indicates if the HE beamformee is capable of feedback with tone
  7956. * grouping of 16 in the HE Compressed Beamforming Report field for
  7957. * a SU-type feedback.
  7958. */
  7959. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  7960. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  7961. /*
  7962. * Indicates if the HE beamformee is capable of feedback with tone
  7963. * grouping of 16 in the HE Compressed Beamforming Report field for
  7964. * a MU-type feedback.
  7965. */
  7966. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  7967. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  7968. /*
  7969. * Indicates if HE beamformee is capable of feedback with codebook
  7970. * size {4, 2} in the HECompressed Beamforming Report field for
  7971. * a SU-type feedback.
  7972. */
  7973. #define WMI_HECAP_PHY_CODBK42SU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  7974. #define WMI_HECAP_PHY_CODBK42SU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  7975. /*
  7976. * Indicates if HE beamformee is capable of feedback with codebook
  7977. * size {7, 5} in the HE Compressed Beamforming Report field for
  7978. * a MU-type feedback.
  7979. */
  7980. #define WMI_HECAP_PHY_CODBK75MU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  7981. #define WMI_HECAP_PHY_CODBK75MU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  7982. /*
  7983. * Beamforming Feedback With Trigger Frame
  7984. * If the transmitting STA is an AP STA:
  7985. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  7986. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  7987. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  7988. * If the transmitting STA is a non-AP STA:
  7989. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  7990. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  7991. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  7992. */
  7993. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  7994. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  7995. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  7996. * over the right 106-tone RU or partial BW ER
  7997. */
  7998. #define WMI_HECAP_PHY_HEERSU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  7999. #define WMI_HECAP_PHY_HEERSU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  8000. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  8001. * where the RU does not span the entire PPDU bandwidth.
  8002. */
  8003. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  8004. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  8005. /* Indicates whether or not the PPE Threshold field is present */
  8006. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  8007. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  8008. /* Indicates that the STA supports SRP-based SR operation */
  8009. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  8010. #define WMI_HECAP_PHY_SRPPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  8011. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  8012. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  8013. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  8014. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  8015. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  8016. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  8017. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  8018. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  8019. * minus 1. Otherwise, reserved.
  8020. */
  8021. #define WMI_HECAP_PHY_MAXNC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  8022. #define WMI_HECAP_PHY_MAXNC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  8023. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  8024. * STBC with one spatial stream
  8025. */
  8026. #define WMI_HECAP_PHY_STBCTXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  8027. #define WMI_HECAP_PHY_STBCTXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  8028. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  8029. * STBC with one spatial stream
  8030. */
  8031. #define WMI_HECAP_PHY_STBCRXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  8032. #define WMI_HECAP_PHY_STBCRXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  8033. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  8034. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  8035. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  8036. /*
  8037. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  8038. * receiver of a 40 MHz HE MU PPDU in 2.4 GHz band, or the transmitter of a 40 MHz HE TB PPDU in 2.4GHz band.
  8039. */
  8040. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  8041. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  8042. /*
  8043. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  8044. * receiver of a 80+80 MHz or a 160 MHz HE MU PPDU, or the transmitter of a 80+80 MHz or 160 MHz HE TB PPDU.
  8045. */
  8046. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  8047. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  8048. /*
  8049. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  8050. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  8051. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  8052. * 160 MHz HE TB PPDU.
  8053. */
  8054. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  8055. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  8056. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  8057. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  8058. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  8059. /*
  8060. * When the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF
  8061. * in HE SU PPDU if the HE SU PPDU With 1x HE-LTF And 0.8 s GI subfield is set to 1, and 1x HE-LTF in
  8062. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  8063. */
  8064. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  8065. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  8066. /*HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field*/
  8067. #define WMI_HECAP_MAC_HECTRL_GET_D2(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  8068. #define WMI_HECAP_MAC_HECTRL_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  8069. /* set to 1 to for TWT Requestor support*/
  8070. #define WMI_HECAP_MAC_TWTREQ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  8071. #define WMI_HECAP_MAC_TWTREQ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  8072. /* set to 1 to for TWT Responder support*/
  8073. #define WMI_HECAP_MAC_TWTRSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  8074. #define WMI_HECAP_MAC_TWTRSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  8075. /* Level of frag support
  8076. Set to 0 for no support for dynamic fragmentation.
  8077. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  8078. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  8079. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  8080. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  8081. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  8082. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  8083. */
  8084. #define WMI_HECAP_MAC_HEFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  8085. #define WMI_HECAP_MAC_HEFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  8086. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs*/
  8087. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  8088. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  8089. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  8090. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  8091. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  8092. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  8093. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  8094. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  8095. /*number of TIDs minus 1 of QoS Data frames that HE STA can aggregate in multi-TID AMPDU*/
  8096. #define WMI_HECAP_MAC_MTID_GET_D2(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  8097. #define WMI_HECAP_MAC_MTID_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  8098. /*
  8099. * Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  8100. * a QoS Data frame for which no block ack agreement exists.
  8101. */
  8102. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 15, 1)
  8103. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
  8104. /*--- HECAP_MAC_HELKAD: DO NOT USE - DEPRECATED ---*/
  8105. /*0=No Feedback,2=Unsolicited,3=Both*/
  8106. #define WMI_HECAP_MAC_HELKAD_GET_D2(he_cap) (0)
  8107. #define WMI_HECAP_MAC_HELKAD_SET_D2(he_cap, value) {;}
  8108. /* bit 16 reserved. */
  8109. /*Set to 1 for reception of AllAck support*/
  8110. #define WMI_HECAP_MAC_AACK_GET_D2(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  8111. #define WMI_HECAP_MAC_AACK_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  8112. /*Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field*/
  8113. #define WMI_HECAP_MAC_ULMURSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  8114. #define WMI_HECAP_MAC_ULMURSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  8115. /*Set to 1 if the STA supports the BSR A-Control field functionality.*/
  8116. #define WMI_HECAP_MAC_BSR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  8117. #define WMI_HECAP_MAC_BSR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  8118. /*Set to 1 when the STA supports broadcast TWT functionality.*/
  8119. #define WMI_HECAP_MAC_BCSTTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  8120. #define WMI_HECAP_MAC_BCSTTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  8121. /*Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap*/
  8122. #define WMI_HECAP_MAC_32BITBA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  8123. #define WMI_HECAP_MAC_32BITBA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  8124. /*Set to 1 if the STA supports MU cascading operation*/
  8125. #define WMI_HECAP_MAC_MUCASCADE_GET_D2(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  8126. #define WMI_HECAP_MAC_MUCASCADE_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  8127. /*Set to 1 when the STA supports reception of this multi-TID A-MPDU format*/
  8128. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  8129. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  8130. /*Set to 1 when the STA supports its reception*/
  8131. #define WMI_HECAP_MAC_GROUPMSTABA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 24, 1)
  8132. #define WMI_HECAP_MAC_GROUPMSTABA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 24, 1, value)
  8133. /*Set to 1 if the STA supports reception of the OMI A-Control field*/
  8134. #define WMI_HECAP_MAC_OMI_GET_D2(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  8135. #define WMI_HECAP_MAC_OMI_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  8136. /*1 if OFDMA Random Access Supported*/
  8137. #define WMI_HECAP_MAC_OFDMARA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  8138. #define WMI_HECAP_MAC_OFDMARA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  8139. /* Maximum AMPDU Length Exponent.
  8140. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  8141. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  8142. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  8143. * padding is not included in this limit.
  8144. */
  8145. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  8146. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  8147. /*A-MSDU Fragmentation Support*/
  8148. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  8149. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  8150. /*Flexible TWT Schedule Support*/
  8151. #define WMI_HECAP_MAC_FLEXTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  8152. #define WMI_HECAP_MAC_FLEXTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  8153. /*Rx Control Frame to MultiBSS*/
  8154. #define WMI_HECAP_MAC_MBSS_GET_D2(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  8155. #define WMI_HECAP_MAC_MBSS_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  8156. /* BSRP A-MPDU Aggregation
  8157. * maintaining compatability since we dont support this now so not wasting memory
  8158. */
  8159. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D2(he_cap) (0)
  8160. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D2(he_cap, value) {;}
  8161. /* Quiet Time Period (QTP) operation
  8162. * maintaining compatability since we dont support this now so not wasting memory
  8163. */
  8164. #define WMI_HECAP_MAC_QTP_GET_D2(he_cap) (0)
  8165. #define WMI_HECAP_MAC_QTP_SET_D2(he_cap, value) {;}
  8166. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  8167. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  8168. * that contains a BQR in the A-Control subfield
  8169. * maintaining compatability since we dont support this now so not wasting memory
  8170. */
  8171. #define WMI_HECAP_MAC_ABQR_GET_D2(he_cap) (0)
  8172. #define WMI_HECAP_MAC_ABQR_SET_D2(he_cap, value) {;}
  8173. /*Indicates support by the STA for the role of SR Responder.*/
  8174. #define WMI_HECAP_MAC_SRRESP_GET_D2(he_cap) (0)
  8175. #define WMI_HECAP_MAC_SRRESP_SET_D2(he_cap, value) {;}
  8176. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  8177. * frames or TIM frames as described in AP operation for opportunistic power save.
  8178. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  8179. */
  8180. #define WMI_HECAP_MAC_OPS_GET_D2(he_cap) (0)
  8181. #define WMI_HECAP_MAC_OPS_SET_D2(he_cap, value) {;}
  8182. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  8183. * the NDP Feedback Report Poll Trigger frame.
  8184. */
  8185. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D2(he_cap) (0)
  8186. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D2(he_cap, value) {;}
  8187. /* BELOW MACROS ARE DEPRECATED Also we are not defining bits for capabilities
  8188. * beyond bit 31 we donot support as it adds additional dword to our struct which may be later
  8189. * removed by standard
  8190. */
  8191. #define WMI_HECAP_MAC_MBAHECTRL_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  8192. #define WMI_HECAP_MAC_MBAHECTRL_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  8193. #define WMI_HECAP_MAC_MURTS_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  8194. #define WMI_HECAP_MAC_MURTS_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  8195. /*Deprecate use WMI_HECAP_PHY_PREAMBLEPUNCRX instead*/
  8196. #define WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy) WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy)
  8197. #define WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value)
  8198. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LTFGIFORHE_GET instead */
  8199. #define WMI_HECAP_PHY_OLTF_GET_D2(he_cap_phy) WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy)
  8200. #define WMI_HECAP_PHY_OLTF_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value)
  8201. /*DEPRECATED - USE WMI_HECAP_PHY_BFMENLTSGT80MHZ*/
  8202. #define WMI_HECAP_PHY_SUBFMESTS_GET_D2(he_cap_phy) WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy)
  8203. #define WMI_HECAP_PHY_SUBFMESTS_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value)
  8204. /*DEPRECATED - use WMI_HECAP_PHY_PETHRESPRESENT**/
  8205. #define WMI_HECAP_PHY_PADDING_GET_D2(he_cap_phy) WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy)
  8206. #define WMI_HECAP_PHY_PADDING_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value)
  8207. /**DO NOT USE - DEPRECATED*/
  8208. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2(he_cap_phy) (0)
  8209. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2(he_cap_phy, value) {;}
  8210. /*DO NOT USE - DEPRECATED**/
  8211. #define WMI_HECAP_PHY_32GI_GET_D2(he_cap_phy) (0)
  8212. #define WMI_HECAP_PHY_32GI_SET_D2(he_cap_phy, value) {;}
  8213. /*DO NOT USE - DEPRECATED**/
  8214. #define WMI_HECAP_PHY_NOSUNDIMENS_GET_D2(he_cap_phy) (0)
  8215. #define WMI_HECAP_PHY_NOSUNDIMENS_SET_D2(he_cap_phy, value) {;}
  8216. /*DO NOT USE - DEPRECATED**/
  8217. #define WMI_HECAP_PHY_40MHZNSS_GET_D2(he_cap_phy)(0)
  8218. #define WMI_HECAP_PHY_40MHZNSS_SET_D2(he_cap_phy, value) {;}
  8219. /* START TEMPORARY WORKAROUND -
  8220. * Leave legacy names as aliases for new names, until all references to the
  8221. * legacy names have been removed.
  8222. */
  8223. #define WMI_HECAP_PHY_ULOFDMA_GET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  8224. #define WMI_HECAP_PHY_ULOFDMA_SET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  8225. /* END TEMPORARY WORKAROUND */
  8226. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  8227. #define WMI_HECAP_PHY_DCM_GET_D2(he_cap_phy) WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy)
  8228. #define WMI_HECAP_PHY_DCM_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value)
  8229. /*
  8230. * The maximum value for NSTS-1<=80MHz,(min val 3)total that can be sent
  8231. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  8232. */
  8233. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  8234. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  8235. /*
  8236. * The maximum value for NSTS-1 > 80MHz (min val 3) total that can be sent
  8237. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  8238. */
  8239. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  8240. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  8241. /*
  8242. * Indicates the spatial multiplexing power save mode after receiving a
  8243. * Trigger frame that is in operation immediately after (re)association.
  8244. */
  8245. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2(he_cap2) (0)
  8246. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2(he_cap2, value) {;}
  8247. /* Indicates support for Punctured Sounding */
  8248. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D2(he_cap2) (0)
  8249. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D2(he_cap2, value) {;}
  8250. /*
  8251. * Indicates support for receiving a Trigger frame in an HT PPDU and
  8252. * receiving a Trigger frame in a VHT PPDU
  8253. */
  8254. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2(he_cap2) (0)
  8255. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2(he_cap2, value) {;}
  8256. #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode) (((_rcode) >> 8) & 0x7)
  8257. #define WMI_GET_HW_RATECODE_NSS_V1(_rcode) (((_rcode) >> 5) & 0x7)
  8258. #define WMI_GET_HW_RATECODE_RATE_V1(_rcode) (((_rcode) >> 0) & 0x1F)
  8259. #define WMI_ASSEMBLE_RATECODE_V1(_rate, _nss, _pream) \
  8260. (((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
  8261. typedef struct {
  8262. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
  8263. /** unique id identifying the VDEV, generated by the caller */
  8264. A_UINT32 vdev_id;
  8265. /** requestor id identifying the caller module */
  8266. A_UINT32 requestor_id;
  8267. /** beacon interval from received beacon */
  8268. A_UINT32 beacon_interval;
  8269. /** DTIM Period from the received beacon */
  8270. A_UINT32 dtim_period;
  8271. /** Flags */
  8272. A_UINT32 flags;
  8273. /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  8274. wmi_ssid ssid;
  8275. /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
  8276. /** This field will be invalid and ignored unless the */
  8277. /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
  8278. /** When valid, this field contains the fixed tx rate for the beacon */
  8279. /** and probe response frames send by the GO or SoftAP */
  8280. A_UINT32 bcn_tx_rate;
  8281. /** beacon/probe reponse xmit power. Applicable for SoftAP. */
  8282. A_UINT32 bcn_txPower;
  8283. /** number of p2p NOA descriptor(s) from scan entry */
  8284. A_UINT32 num_noa_descriptors;
  8285. /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  8286. During CAC, Our HW shouldn't ack ditected frames */
  8287. A_UINT32 disable_hw_ack;
  8288. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  8289. /** The DBS policy manager indicates the preferred number of transmit streams. */
  8290. A_UINT32 preferred_tx_streams;
  8291. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  8292. /** the DBS policy manager indicates the preferred number of receive streams. */
  8293. A_UINT32 preferred_rx_streams;
  8294. A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
  8295. A_UINT32 cac_duration_ms; /* in milliseconds */
  8296. A_UINT32 regdomain;
  8297. /* min data rate to be used in BSS in Mbps */
  8298. A_UINT32 min_data_rate;
  8299. /* The TLVs follows this structure:
  8300. * wmi_channel chan; <-- WMI channel
  8301. * wmi_p2p_noa_descriptor noa_descriptors[]; <-- actual p2p NOA descriptor from scan entry
  8302. */
  8303. } wmi_vdev_start_request_cmd_fixed_param;
  8304. typedef struct {
  8305. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
  8306. /** unique id identifying the VDEV, generated by the caller */
  8307. A_UINT32 vdev_id;
  8308. } wmi_vdev_delete_cmd_fixed_param;
  8309. typedef struct {
  8310. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
  8311. /** unique id identifying the VDEV, generated by the caller */
  8312. A_UINT32 vdev_id;
  8313. /** aid (assoc id) received in association response for STA VDEV */
  8314. A_UINT32 vdev_assoc_id;
  8315. /** bssid of the BSS the VDEV is joining */
  8316. wmi_mac_addr vdev_bssid;
  8317. /** bssid of transmitted AP (mbssid case) */
  8318. wmi_mac_addr trans_bssid;
  8319. /** the profile index of the connected non-trans ap (mbssid case). 0 means invalid */
  8320. A_UINT32 profile_idx;
  8321. /** the total profile numbers of non-trans aps (mbssid case). 0 means legacy AP */
  8322. A_UINT32 profile_num;
  8323. } wmi_vdev_up_cmd_fixed_param;
  8324. typedef struct {
  8325. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
  8326. /** unique id identifying the VDEV, generated by the caller */
  8327. A_UINT32 vdev_id;
  8328. } wmi_vdev_stop_cmd_fixed_param;
  8329. typedef struct {
  8330. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
  8331. /** unique id identifying the VDEV, generated by the caller */
  8332. A_UINT32 vdev_id;
  8333. } wmi_vdev_down_cmd_fixed_param;
  8334. typedef struct {
  8335. /** unique id identifying the VDEV, generated by the caller */
  8336. A_UINT32 vdev_id;
  8337. } wmi_vdev_standby_response_cmd;
  8338. typedef struct {
  8339. /** unique id identifying the VDEV, generated by the caller */
  8340. A_UINT32 vdev_id;
  8341. } wmi_vdev_resume_response_cmd;
  8342. typedef struct {
  8343. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  8344. /** unique id identifying the VDEV, generated by the caller */
  8345. A_UINT32 vdev_id;
  8346. /** parameter id */
  8347. A_UINT32 param_id;
  8348. /** parameter value */
  8349. A_UINT32 param_value;
  8350. } wmi_vdev_set_param_cmd_fixed_param;
  8351. typedef struct {
  8352. A_UINT32 key_seq_counter_l;
  8353. A_UINT32 key_seq_counter_h;
  8354. } wmi_key_seq_counter;
  8355. #define WMI_CIPHER_NONE 0x0 /* clear key */
  8356. #define WMI_CIPHER_WEP 0x1
  8357. #define WMI_CIPHER_TKIP 0x2
  8358. #define WMI_CIPHER_AES_OCB 0x3
  8359. #define WMI_CIPHER_AES_CCM 0x4
  8360. #define WMI_CIPHER_WAPI 0x5
  8361. #define WMI_CIPHER_CKIP 0x6
  8362. #define WMI_CIPHER_AES_CMAC 0x7
  8363. #define WMI_CIPHER_ANY 0x8
  8364. #define WMI_CIPHER_AES_GCM 0x9
  8365. #define WMI_CIPHER_AES_GMAC 0xa
  8366. #define WMI_CIPHER_WAPI_GCM_SM4 0xb
  8367. typedef struct {
  8368. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
  8369. /** unique id identifying the VDEV, generated by the caller */
  8370. A_UINT32 vdev_id;
  8371. /** MAC address used for installing */
  8372. wmi_mac_addr peer_macaddr;
  8373. /** key index */
  8374. A_UINT32 key_ix;
  8375. /** key flags */
  8376. A_UINT32 key_flags;
  8377. /** key cipher, defined above */
  8378. A_UINT32 key_cipher;
  8379. /** key rsc counter */
  8380. wmi_key_seq_counter key_rsc_counter;
  8381. /** global key rsc counter */
  8382. wmi_key_seq_counter key_global_rsc_counter;
  8383. /** global key tsc counter */
  8384. wmi_key_seq_counter key_tsc_counter;
  8385. /** WAPI key rsc counter */
  8386. A_UINT8 wpi_key_rsc_counter[16];
  8387. /** WAPI key tsc counter */
  8388. A_UINT8 wpi_key_tsc_counter[16];
  8389. /** key length */
  8390. A_UINT32 key_len;
  8391. /** key tx mic length */
  8392. A_UINT32 key_txmic_len;
  8393. /** key rx mic length */
  8394. A_UINT32 key_rxmic_len;
  8395. /** specifies if the group_key_ix is valid, filled by the sender */
  8396. A_UINT32 is_group_key_ix_valid;
  8397. /** Multi group key ID */
  8398. A_UINT32 group_key_ix;
  8399. /*
  8400. * Following this struct are this TLV.
  8401. * A_UINT8 key_data[]; <-- actual key data; contains key followed by tx mic followed by rx mic
  8402. */
  8403. } wmi_vdev_install_key_cmd_fixed_param;
  8404. /** Preamble types to be used with VDEV fixed rate configuration */
  8405. typedef enum {
  8406. WMI_RATE_PREAMBLE_OFDM,
  8407. WMI_RATE_PREAMBLE_CCK,
  8408. WMI_RATE_PREAMBLE_HT,
  8409. WMI_RATE_PREAMBLE_VHT,
  8410. WMI_RATE_PREAMBLE_HE,
  8411. } WMI_RATE_PREAMBLE;
  8412. /** Value to disable fixed rate setting */
  8413. #define WMI_FIXED_RATE_NONE (0xff)
  8414. #define WMI_GI_400_NS 1
  8415. #define WMI_GI_800_NS 0
  8416. #define WMI_GI_1600_NS 2
  8417. #define WMI_GI_3200_NS 3
  8418. /** OCE(Optimized Connectivity_Experience) Feature flags */
  8419. #define WMI_VDEV_OCE_PROBE_REQUEST_RATE_FEATURE_BITMAP 0x1
  8420. #define WMI_VDEV_OCE_PROBE_RESPONSE_RATE_FEATURE_BITMAP 0x2
  8421. #define WMI_VDEV_OCE_BEACON_RATE_FEATURE_BITMAP 0x4
  8422. #define WMI_VDEV_OCE_PROBE_REQUEST_DEFERRAL_FEATURE_BITMAP 0x8
  8423. #define WMI_VDEV_OCE_FILS_DISCOVERY_FRAME_FEATURE_BITMAP 0x10
  8424. #define WMI_VDEV_OCE_ESP_FEATURE_BITMAP 0x20
  8425. #define WMI_VDEV_OCE_REASSOC_REJECT_FEATURE_BITMAP 0x40
  8426. /** 6GHZ params **/
  8427. /* Control to enable/disable beacon tx in non-HT duplicate */
  8428. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BEACON 0x1
  8429. /* Control to enable/disable broadcast probe response tx in non-HT duplicate */
  8430. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BCAST_PROBE_RSP 0x2
  8431. /* Control to enable/disable FILS discovery frame tx in non-HT duplicate */
  8432. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_FD_FRAME 0x4
  8433. /* Control to enable/disable periodic FILS discovery frame transmission */
  8434. #define WMI_VDEV_6GHZ_BITMAP_FD_FRAME 0x8
  8435. /* Control to enable/disable periodic broadcast probe response transmission */
  8436. #define WMI_VDEV_6GHZ_BITMAP_BCAST_PROBE_RSP 0x10
  8437. /** the definition of different VDEV parameters */
  8438. typedef enum {
  8439. /** RTS Threshold */
  8440. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  8441. /** Fragmentation threshold */
  8442. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, /* 0x2 */
  8443. /** beacon interval in TUs */
  8444. WMI_VDEV_PARAM_BEACON_INTERVAL, /* 0x3 */
  8445. /** Listen interval in TUs */
  8446. WMI_VDEV_PARAM_LISTEN_INTERVAL, /* 0x4 */
  8447. /** muticast rate in Mbps */
  8448. WMI_VDEV_PARAM_MULTICAST_RATE, /* 0x5 */
  8449. /** management frame rate in Mbps */
  8450. WMI_VDEV_PARAM_MGMT_TX_RATE, /* 0x6 */
  8451. /** slot time (long vs short) */
  8452. WMI_VDEV_PARAM_SLOT_TIME, /* 0x7 */
  8453. /** preamble (long vs short) */
  8454. WMI_VDEV_PARAM_PREAMBLE, /* 0x8 */
  8455. /** SWBA time (time before tbtt in msec) */
  8456. WMI_VDEV_PARAM_SWBA_TIME, /* 0x9 */
  8457. /** time period for updating VDEV stats */
  8458. WMI_VDEV_STATS_UPDATE_PERIOD, /* 0xa */
  8459. /** age out time in msec for frames queued for station in power save*/
  8460. WMI_VDEV_PWRSAVE_AGEOUT_TIME, /* 0xb */
  8461. /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
  8462. WMI_VDEV_HOST_SWBA_INTERVAL, /* 0xc */
  8463. /** DTIM period (specified in units of num beacon intervals) */
  8464. WMI_VDEV_PARAM_DTIM_PERIOD, /* 0xd */
  8465. /** scheduler air time limit for this VDEV. used by off chan scheduler */
  8466. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, /* 0xe */
  8467. /** enable/dsiable WDS for this VDEV */
  8468. WMI_VDEV_PARAM_WDS, /* 0xf */
  8469. /** ATIM Window */
  8470. WMI_VDEV_PARAM_ATIM_WINDOW, /* 0x10 */
  8471. /** BMISS max */
  8472. WMI_VDEV_PARAM_BMISS_COUNT_MAX, /* 0x11 */
  8473. /** BMISS first time */
  8474. WMI_VDEV_PARAM_BMISS_FIRST_BCNT, /* 0x12 */
  8475. /** BMISS final time */
  8476. WMI_VDEV_PARAM_BMISS_FINAL_BCNT, /* 0x13 */
  8477. /** WMM enables/disabled */
  8478. WMI_VDEV_PARAM_FEATURE_WMM, /* 0x14 */
  8479. /** Channel width */
  8480. WMI_VDEV_PARAM_CHWIDTH, /* 0x15 */
  8481. /** Channel Offset */
  8482. WMI_VDEV_PARAM_CHEXTOFFSET, /* 0x16 */
  8483. /** Disable HT Protection */
  8484. WMI_VDEV_PARAM_DISABLE_HTPROTECTION, /* 0x17 */
  8485. /** Quick STA Kickout */
  8486. WMI_VDEV_PARAM_STA_QUICKKICKOUT, /* 0x18 */
  8487. /** Rate to be used with Management frames */
  8488. WMI_VDEV_PARAM_MGMT_RATE, /* 0x19 */
  8489. /** Protection Mode */
  8490. WMI_VDEV_PARAM_PROTECTION_MODE, /* 0x1a */
  8491. /** Fixed rate setting
  8492. * The top nibble is used to select which format to use for encoding
  8493. * the rate specification: 0xVXXXXXXX
  8494. * If V == 0b0000: format is same as before: 0x000000RR
  8495. * If V == 0b0001: format is: 0x1000RRRR.
  8496. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  8497. * The host shall use the new V1 format (and set V = 0x1) if the target
  8498. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  8499. * system is configured with Nss > 4 (either at compile time within the
  8500. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  8501. * by the target).
  8502. */
  8503. WMI_VDEV_PARAM_FIXED_RATE, /* 0x1b */
  8504. /**
  8505. * 11AX: GI =
  8506. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  8507. * 11N: SGI=WMI_GI_400_NS
  8508. */
  8509. WMI_VDEV_PARAM_SGI, /* 0x1c */
  8510. /** Enable LDPC */
  8511. WMI_VDEV_PARAM_LDPC, /* 0x1d */
  8512. /** Enable Tx STBC */
  8513. WMI_VDEV_PARAM_TX_STBC, /* 0x1e */
  8514. /** Enable Rx STBC */
  8515. WMI_VDEV_PARAM_RX_STBC, /* 0x1f */
  8516. /** Intra BSS forwarding */
  8517. WMI_VDEV_PARAM_INTRA_BSS_FWD, /* 0x20 */
  8518. /** Setting Default xmit key for Vdev */
  8519. WMI_VDEV_PARAM_DEF_KEYID, /* 0x21 */
  8520. /** NSS width */
  8521. WMI_VDEV_PARAM_NSS, /* 0x22 */
  8522. /** Set the custom rate for the broadcast data frames */
  8523. WMI_VDEV_PARAM_BCAST_DATA_RATE, /* 0x23 */
  8524. /** Set the custom rate (rate-code) for multicast data frames */
  8525. WMI_VDEV_PARAM_MCAST_DATA_RATE, /* 0x24 */
  8526. /** Tx multicast packet indicate Enable/Disable */
  8527. WMI_VDEV_PARAM_MCAST_INDICATE, /* 0x25 */
  8528. /** Tx DHCP packet indicate Enable/Disable */
  8529. WMI_VDEV_PARAM_DHCP_INDICATE, /* 0x26 */
  8530. /** Enable host inspection of Tx unicast packet to unknown destination */
  8531. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, /* 0x27 */
  8532. /* The minimum amount of time AP begins to consider STA inactive */
  8533. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, /* 0x28 */
  8534. /* An associated STA is considered inactive when there is no recent TX/RX
  8535. * activity and no downlink frames are buffered for it. Once a STA exceeds
  8536. * the maximum idle inactive time, the AP will send an 802.11 data-null as
  8537. * a keep alive to verify the STA is still associated. If the STA does ACK
  8538. * the data-null, or if the data-null is buffered and the STA does not
  8539. * retrieve it, the STA will be considered unresponsive (see
  8540. * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
  8541. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, /* 0x29 */
  8542. /* An associated STA is considered unresponsive if there is no recent
  8543. * TX/RX activity and downlink frames are buffered for it. Once a STA
  8544. * exceeds the maximum unresponsive time, the AP will send a
  8545. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  8546. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, /* 0x2a */
  8547. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  8548. WMI_VDEV_PARAM_AP_ENABLE_NAWDS, /* 0x2b */
  8549. /** Enable/Disable RTS-CTS */
  8550. WMI_VDEV_PARAM_ENABLE_RTSCTS, /* 0x2c */
  8551. /* Enable TXBFee/er */
  8552. WMI_VDEV_PARAM_TXBF, /* 0x2d */
  8553. /**Set packet power save */
  8554. WMI_VDEV_PARAM_PACKET_POWERSAVE, /* 0x2e */
  8555. /**Drops un-encrypted packets if any received in an encryted connection
  8556. * otherwise forwards to host
  8557. */
  8558. WMI_VDEV_PARAM_DROP_UNENCRY, /* 0x2f */
  8559. /*
  8560. * Set TX encap type.
  8561. *
  8562. * enum wmi_pkt_type is to be used as the parameter
  8563. * specifying the encap type.
  8564. */
  8565. WMI_VDEV_PARAM_TX_ENCAP_TYPE, /* 0x30 */
  8566. /*
  8567. * Try to detect stations that woke-up and exited power save but did not
  8568. * successfully transmit data-null with PM=0 to AP. When this happens,
  8569. * STA and AP power save state are out-of-sync. Use buffered but
  8570. * undelivered MSDU to the STA as a hint that the STA is really awake
  8571. * and expecting normal ASAP delivery, rather than retrieving BU with
  8572. * PS-Poll, U-APSD trigger, etc.
  8573. *
  8574. * 0 disables out-of-sync detection. Maximum time is 255 seconds.
  8575. */
  8576. WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, /* 0x31 */
  8577. /* Enable/Disable early rx dynamic adjust feature.
  8578. * Early-rx dynamic adjust is a advance power save feature.
  8579. * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
  8580. * timing discrepancies in the system.
  8581. * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
  8582. * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
  8583. * properly to minimum the power consume.*/
  8584. WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, /* 0x32 */
  8585. /* set target bmiss number per sample cycle if bmiss adjust was chosen.
  8586. * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
  8587. * which can be set by user through WMI command.
  8588. */
  8589. WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, /* 0x33 */
  8590. /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
  8591. WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, /* 0x34 */
  8592. /* set slop_step */
  8593. WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP, /* 0x35 */
  8594. /* set init slop */
  8595. WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP, /* 0x36 */
  8596. /* pause adjust enable/disable */
  8597. WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, /* 0x37 */
  8598. /* Set channel pwr limit value of the vdev the minimal value of all
  8599. * vdevs operating on this channel will be set as channel tx power
  8600. * limit, which is used to configure ratearray
  8601. */
  8602. WMI_VDEV_PARAM_TX_PWRLIMIT, /* 0x38 */
  8603. /* set the count of snr value for calculation in snr monitor */
  8604. WMI_VDEV_PARAM_SNR_NUM_FOR_CAL, /* 0x39 */
  8605. /** Roaming offload */
  8606. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, /* 0x3a */
  8607. /** Enable Leader request RX functionality for RMC */
  8608. WMI_VDEV_PARAM_ENABLE_RMC, /* 0x3b */
  8609. /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
  8610. * by himself. If the beacon lost time exceed this threshold, the peer is
  8611. * thought to be gone. */
  8612. WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS, /* 0x3c */
  8613. /** max rate in kpbs, transmit rate can't go beyond it */
  8614. WMI_VDEV_PARAM_MAX_RATE, /* 0x3d */
  8615. /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift*/
  8616. WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE, /* 0x3e */
  8617. /* set Tx failure count threshold for the vdev */
  8618. WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR, /* 0x3f */
  8619. /* set ebt resync timeout value, in the unit of TU */
  8620. WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT, /* 0x40 */
  8621. /* Enable Aggregation State Trigger Event */
  8622. WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE, /* 0x41 */
  8623. /* This parameter indicates whether IBSS station can enter into power save
  8624. * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
  8625. * awake all the time and should never set PM=1 in its transmitted frames.
  8626. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
  8627. * is non-zero. */
  8628. WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED, /* 0x42 */
  8629. /* This parameter indicates if this station can enter into power collapse
  8630. * for the remaining beacon interval after the ATIM window.
  8631. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
  8632. * is set to TRUE. */
  8633. WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED, /* 0x43 */
  8634. /* This parameter indicates whether IBSS station exit power save mode and
  8635. * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
  8636. * whenever there is a TX/RX activity. */
  8637. WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED, /* 0x44 */
  8638. /* If Awake on TX/RX activity is enabled, this parameter indicates
  8639. * the data inactivity time in number of beacon intervals after which
  8640. * IBSS station reenters power save by sending Null frame with PM=1. */
  8641. WMI_VDEV_PARAM_INACTIVITY_CNT, /* 0x45 */
  8642. /* Inactivity time in msec after which TX Service Period (SP) is
  8643. * terminated by sending a Qos Null frame with EOSP.
  8644. * If value is 0, TX SP is terminated with the last buffered packet itself
  8645. * instead of waiting for the inactivity timeout. */
  8646. WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS, /* 0x46 */
  8647. /** DTIM policy */
  8648. WMI_VDEV_PARAM_DTIM_POLICY, /* 0x47 */
  8649. /* When IBSS network is initialized, PS-supporting device
  8650. * does not enter protocol sleep state during first
  8651. * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
  8652. WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS, /* 0x48 */
  8653. /* Enable/Disable 1 RX chain usage during the ATIM window */
  8654. WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE, /* 0x49 */
  8655. /* RX Leak window is the time driver waits before shutting down
  8656. * the radio or switching the channel and after receiving an ACK
  8657. * for a data frame with PM bit set) */
  8658. WMI_VDEV_PARAM_RX_LEAK_WINDOW, /* 0x4a */
  8659. /** Averaging factor(16 bit value) is used in the calculations to
  8660. * perform averaging of different link level statistics like average
  8661. * beacon spread or average number of frames leaked */
  8662. WMI_VDEV_PARAM_STATS_AVG_FACTOR, /* 0x4b */
  8663. /** disconnect threshold, once the consecutive error for specific peer
  8664. * exceed this threhold, FW will send kickout event to host */
  8665. WMI_VDEV_PARAM_DISCONNECT_TH, /* 0x4c */
  8666. /** The rate_code of RTS_CTS changed by host. Now FW can support
  8667. * more non-HT rates rather than 1Mbps or 6Mbps */
  8668. WMI_VDEV_PARAM_RTSCTS_RATE, /* 0x4d */
  8669. /** This parameter indicates whether using a long duration RTS-CTS
  8670. * protection when a SAP goes off channel in MCC mode */
  8671. WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE, /* 0x4e */
  8672. /** This parameter indicates whether using a broadcast probe response
  8673. * to increase the detectability of SAP in MCC mode */
  8674. WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE, /* 0x4f */
  8675. /** This parameter indicates the power backoff in percentage
  8676. * currently supports 100%, 50%, 25%, 12.5%, and minimum
  8677. * Host passes 0, 1, 2, 3, 4 to Firmware
  8678. * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
  8679. * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
  8680. */
  8681. WMI_VDEV_PARAM_TXPOWER_SCALE, /* 0x50 */
  8682. /** TX power backoff in dB: tx power -= param value
  8683. * Host passes values(DB) to Halphy, Halphy reduces the power table
  8684. * by the values. Safety check will happen in Halphy.
  8685. */
  8686. WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB, /* 0x51 */
  8687. /** Multicast to Unicast conversion setting */
  8688. WMI_VDEV_PARAM_MCAST2UCAST_SET, /* 0x52 */
  8689. /** Total number of HW retries */
  8690. WMI_VDEV_PARAM_RC_NUM_RETRIES, /* 0x53 */
  8691. /** Max tx percentage for cabq */
  8692. WMI_VDEV_PARAM_CABQ_MAXDUR, /* 0x54 */
  8693. /** MFPTEST settings */
  8694. WMI_VDEV_PARAM_MFPTEST_SET, /* 0x55 */
  8695. /** RTS Fixed rate setting */
  8696. WMI_VDEV_PARAM_RTS_FIXED_RATE, /* 0x56 */
  8697. /** VHT SGI MASK */
  8698. WMI_VDEV_PARAM_VHT_SGIMASK, /* 0x57 */
  8699. /** VHT80 Auto Rate MASK */
  8700. WMI_VDEV_PARAM_VHT80_RATEMASK, /* 0x58 */
  8701. /** set Proxy STA features for this vap */
  8702. WMI_VDEV_PARAM_PROXY_STA, /* 0x59 */
  8703. /** set virtual cell mode - enable/disable */
  8704. WMI_VDEV_PARAM_VIRTUAL_CELL_MODE, /* 0x5a */
  8705. /** Set receive packet type */
  8706. WMI_VDEV_PARAM_RX_DECAP_TYPE, /* 0x5b */
  8707. /** Set ratemask with specific Bandwidth and NSS */
  8708. WMI_VDEV_PARAM_BW_NSS_RATEMASK, /* 0x5c */
  8709. /** Set SENSOR Support */
  8710. WMI_VDEV_PARAM_SENSOR_AP, /* 0x5d */
  8711. /** Set beacon rate */
  8712. WMI_VDEV_PARAM_BEACON_RATE, /* 0x5e */
  8713. /** Enable CTS to self for DTIM beacon */
  8714. WMI_VDEV_PARAM_DTIM_ENABLE_CTS, /* 0x5f */
  8715. /** Disable station kickout at Vap level */
  8716. WMI_VDEV_PARAM_STA_KICKOUT, /* 0x60 */
  8717. /* VDEV capabilities */
  8718. WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */ /* 0x61 */
  8719. /**
  8720. * Increment TSF in micro seconds to avoid beacon collision on mesh VAP.
  8721. * The host must ensure that either no other vdevs share the TSF with
  8722. * this vdev, or else that it is acceptable to apply this TSF adjustment
  8723. * to all vdevs sharing the TSF.
  8724. */
  8725. WMI_VDEV_PARAM_TSF_INCREMENT, /* 0x62 */
  8726. /** Disable/Enable AMPDU of vdev per AC:
  8727. * bit | AC
  8728. * --------
  8729. * 0 | VO
  8730. * 1 | VI
  8731. * 2 | BE
  8732. * 3 | BK
  8733. * A value of 0 in a given bit disables A-MPDU aggregation for
  8734. * that AC; a value of 1 enables A-MPDU aggregation
  8735. */
  8736. WMI_VDEV_PARAM_AMPDU_PER_AC, /* 0x63 */
  8737. /**
  8738. * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
  8739. * Used mainly for mesh-vap.
  8740. * The parameter value delivered with the RX_FILTER vdev param contains
  8741. * a bit-or mask of wmi_vdev_param_filter enum values.
  8742. */
  8743. WMI_VDEV_PARAM_RX_FILTER, /* 0x64 */
  8744. /** vdev-specific mgmt tx power in dBm units (signed integer value) */
  8745. WMI_VDEV_PARAM_MGMT_TX_POWER, /* 0x65 */
  8746. /** Vdev level non aggregration/11g sw retry threshold. 0-disable, min:0, max:31, default:15 */
  8747. WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0x66 */
  8748. /** Vdev level aggregration sw retry threshold. 0-disable, min:0, max:31, default:15 */
  8749. WMI_VDEV_PARAM_AGG_SW_RETRY_TH, /* 0x67 */
  8750. /** disable dynamic bw RTS **/
  8751. WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS, /* 0x68 */
  8752. /** per ssid (vdev) based ATF strict/fair scheduling policy
  8753. * param values are WMI_ATF_SSID_FAIR_SCHED or WMI_ATF_SSID_STRICT_SCHED
  8754. */
  8755. WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY, /* 0x69 */
  8756. /** Enable or disable Dual carrier modulation
  8757. * valid values: 0-Disable DCM, 1-Enable DCM.
  8758. */
  8759. WMI_VDEV_PARAM_HE_DCM, /* 0x6a */
  8760. /** Enable or disable Extended range
  8761. * valid values: 0-Disable ER, 1-Enable ER.
  8762. */
  8763. WMI_VDEV_PARAM_HE_RANGE_EXT, /* 0x6b */
  8764. /* enable or disable BCAST probe response feature */
  8765. WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE, /* 0x6c */
  8766. /* param to specify probe request Tx delay during Fast Initial Link Setup */
  8767. WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME, /* units = milliseconds */ /* 0x6d */
  8768. /* enable or disable NOA for P2P GO */
  8769. WMI_VDEV_PARAM_DISABLE_NOA_P2P_GO, /* 0x6e */
  8770. /** Per band user management frame fix rate setting
  8771. * BIT 31: enable (1) or disable (0) mgmt fix rate for 5G
  8772. * BIT 30: enable (1) or disable (0) mgmt fix rate for 2G
  8773. *
  8774. * BIT 23: 11ax (1) or legacy (0) rate code
  8775. * BITS [22..12]: rate code for 5G
  8776. *
  8777. * BIT 11: 11ax (1) or legacy (0) rate code
  8778. * BITS [10..0]: rate code for 2G
  8779. */
  8780. WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE, /* 0x6f */
  8781. /* This should be called before WMI_VDEV_PARAM_TXBF */
  8782. WMI_VDEV_PARAM_11AX_TXBF, /* 0x70 */
  8783. /** This parameter indicates whether VDEV is SMPS intolerant.
  8784. * I.e. - SMPS action frame cannot be transmitted by the VDEV to
  8785. * dynamically change the RX NSS.
  8786. *
  8787. * valid values: 1 - VDEV is SMPS intolerant, 0 - VDEV is SMPS tolerant
  8788. */
  8789. WMI_VDEV_PARAM_SMPS_INTOLERANT, /* 0x71 */
  8790. /** specify probe request Tx delay for scans triggered on this VDEV */
  8791. WMI_VDEV_PARAM_PROBE_DELAY, /* units = milliseconds */ /* 0x72 */
  8792. /** specify the time gap between each set of probe request transmissions.
  8793. * The number of probe requests in each set depends on the ssid_list and
  8794. * bssid_list in the scan request.
  8795. * This parameter will be applied only for scans triggered on this VDEV.
  8796. */
  8797. WMI_VDEV_PARAM_REPEAT_PROBE_TIME, /* units = milliseconds */ /* 0x73 */
  8798. /** specify the HE LTF setting that should be used for fixed rate
  8799. * transmissions.
  8800. *
  8801. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  8802. * or WMI_HE_LTF_4X.
  8803. */
  8804. WMI_VDEV_PARAM_HE_LTF, /* 0x74 */
  8805. /** VDEV parameter to configure the number of TX chains to use for
  8806. * a/b/g rates.
  8807. * bit 0~15 : 11b mode TX chain number.
  8808. * bit 16~31 : 11ag mode TX chain number.
  8809. *
  8810. * valid values:
  8811. * Should not exceed the maximum number of supported TX Chains
  8812. * 0 - Used to reset the vote. Acts as Don't Care
  8813. */
  8814. WMI_VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x75 */
  8815. /**
  8816. * Enable or disable the multi group key feature on this VDEV.
  8817. * used for NAN APP and VLAN Tagging
  8818. */
  8819. WMI_VDEV_PARAM_ENABLE_MULTI_GROUP_KEY, /* 0x76 */
  8820. /*
  8821. * Specify the total number of multi group key on this VDEV.
  8822. */
  8823. WMI_VDEV_PARAM_NUM_GROUP_KEYS, /* 0x77 */
  8824. /** VDEV parameter to enable or disable various OCE features */
  8825. WMI_VDEV_PARAM_ENABLE_DISABLE_OCE_FEATURES, /* 0x78 */
  8826. /*
  8827. * Set/Clear 3 least-significant bits to
  8828. * Disable or Enable rate drop down for MGMT, SU data and MU data pkts
  8829. *
  8830. * bit 0 -> If set MGMT Pkt rate drop down is enabled else disabled
  8831. * bit 1 -> If set SU data Pkt rate drop down is enabled else disabled
  8832. * bit 2 -> If set MU data Pkt rate drop down is enabled else disabled
  8833. * bits 31:3 -> Reserved bits. should be set to zero.
  8834. */
  8835. WMI_VDEV_PARAM_RATE_DROPDOWN_BMAP, /* 0x79 */
  8836. /** VDEV parameter to config modulated DTIM count */
  8837. WMI_VDEV_PARAM_MODDTIM_CNT, /* 0x7a */
  8838. /**
  8839. * VDEV parameter to config max listen interval,
  8840. * when modulated DTIM is enabled.
  8841. * Units are 100TU.
  8842. */
  8843. WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM, /* 0x7b */
  8844. /** VDEV parameter to config dynamic DTIM count */
  8845. WMI_VDEV_PARAM_DYNDTIM_CNT, /* 0x7c */
  8846. /** VDEV parameter to enable or disable RTT responder role
  8847. * valid values: 0-Disable responder role 1-Enable responder role
  8848. */
  8849. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE, /* 0x7d */
  8850. /** Parameter to configure BA mode.
  8851. * Valid values: 0- Auto mode,
  8852. * 1- Manual mode(addba req not sent).
  8853. * 2- buffer size 64
  8854. * 3- buffer size 256
  8855. */
  8856. WMI_VDEV_PARAM_BA_MODE, /* 0x7e */
  8857. /**
  8858. * VDEV parameter to force to set modulate DTIM count as listen interval,
  8859. * no matter whether WoW is enabled
  8860. * Default: Disabled.
  8861. * Valid values: 0- Disabled,
  8862. * 1- Enabled.
  8863. */
  8864. WMI_VDEV_PARAM_FORCED_MODDTIM_ENABLE, /* 0x7f */
  8865. /** specify the setting that are valid for auto rate transmissions.
  8866. * bits 7:0 (LTF): When bitmask is set, then corresponding LTF value is
  8867. * used for auto rate.
  8868. * BIT0 = 1 (WMI_HE_LTF_1X)
  8869. * BIT1 = 1 (WMI_HE_LTF_2X)
  8870. * BIT2 = 1 (WMI_HE_LTF_4X)
  8871. * BIT3-7 = Reserved bits.
  8872. * bits 15:8 (SGI): When bitmask is set, then corresponding SGI value is
  8873. * used for auto rate.
  8874. * BIT8 = 1 (400 NS)
  8875. * BIT9 = 1 (800 NS)
  8876. * BIT10 = 1 (1600 NS)
  8877. * BIT11 = 1 (3200 NS)
  8878. * BIT12-15 = Reserved bits.
  8879. * bits 31:16: Reserved bits. should be set to zero.
  8880. */
  8881. WMI_VDEV_PARAM_AUTORATE_MISC_CFG, /* 0x80 */
  8882. /** VDEV parameter to enable or disable RTT initiator mac address
  8883. * randomization.
  8884. * Default: Disabled.
  8885. * valid values: 0-Disable random mac 1-Enable random mac
  8886. */
  8887. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC, /* 0x81 */
  8888. /**
  8889. * For each AC, configure how many tx retries to send without RTS
  8890. * before enabling RTS
  8891. * bits 0:7 :BE
  8892. * bits 8:15 :BK
  8893. * bits 16:23 :VI
  8894. * bits 24:31 :VO
  8895. * A value of 0 in specific AC means default configuration for that AC.
  8896. */
  8897. WMI_VDEV_PARAM_TX_RETRIES_BEFORE_RTS_PER_AC, /* 0x82 */
  8898. /**
  8899. * Parameter to enable/disable AMSDU aggregation size auto-selection logic.
  8900. * We have logic where AMSDU aggregation size is dynamically decided
  8901. * based on MCS. That logic is enabled by default.
  8902. * For certain tests, we need a method to disable this optimization,
  8903. * and base AMSDU size only on the peer's capability rather than our logic.
  8904. * A value of 0 means disable internal optimization,
  8905. * 1 means enable internal optimzation.
  8906. */
  8907. WMI_VDEV_PARAM_AMSDU_AGGREGATION_SIZE_OPTIMIZATION, /* 0x83 */
  8908. /**
  8909. * In RAW mode, FW will not know whether the encryption is enabled
  8910. * on this vdev or not.
  8911. * Because of this, FW will not program the right info into the
  8912. * RawNwifi TLV resulting in the connection failure in RAW mode.
  8913. * So to program the right info, FW should know whether the security
  8914. * is enabled on this VDEV.
  8915. * Host will send this VDEV param command (With Value = 1) in case of
  8916. * RAW secure mode.
  8917. */
  8918. WMI_VDEV_PARAM_RAW_IS_ENCRYPTED, /* 0x84 */
  8919. /**
  8920. * Dynamically enable/disable green tx (GTX) on supported rates.
  8921. * Host will set this param to 1 for enabling GTX & 0 for disabling it.
  8922. * Note: If GTX was already running (since the global GTX control
  8923. * resides with default BDF setting) & host wants to disable GTX,
  8924. * the VDEV does not exercise any more TPC changes on the GTX supported
  8925. * rates & goes to a default GTX SM where all PPDU's sent on default TPC.
  8926. * Whenever, host wants to reenable GTX, the enable command resumes the
  8927. * GTX functionality & TPC convergence to lower power levels can be
  8928. * attained as long as PER on GTX supported rates is within the pre-defined
  8929. * PER margin configured through the BDF.
  8930. */
  8931. WMI_VDEV_PARAM_GTX_ENABLE, /* 0x85 */
  8932. /*
  8933. * Enable/Disable multicast buffer.
  8934. * A FLAG to enable & disable buffering of multicast frames at AP
  8935. * when stations are in Power Save mode.
  8936. * Once AP disables buffering of multicast frame,
  8937. * clients which goes into Power save mode will not receive these frames.
  8938. * by default MCAST buffering will be enabled.
  8939. * (CABQ = Content After Beacon Queue = multicast queue)
  8940. * Host will send this VDEV param command,
  8941. * With Value = 1 means fw will disable the MCAST buffering
  8942. * With Value = 0 means fw will enable the MCAST buffering.
  8943. */
  8944. WMI_VDEV_PARAM_DISABLE_CABQ, /* 0x86 */
  8945. /**
  8946. * For SU and MU sounding
  8947. * switch between su ac/ax sounding and mu ac/ax sounding
  8948. * switch between triggered/ non-triggered on ax sounding enabled.
  8949. * each bit toggles the corresponding modes by enabling/disabling
  8950. *
  8951. * Bit 1 doesn't carry any operation for now and may change later,
  8952. * so reserved.
  8953. *
  8954. *-----------------------
  8955. * bit(0) | mode
  8956. *-----------------------
  8957. * 0 | AC
  8958. * 1 | AX
  8959. *-----------------------
  8960. *
  8961. * bit(1) | Reserved
  8962. *
  8963. *-----------------------
  8964. * bit(2) | mode
  8965. *-----------------------
  8966. * 0 | SU
  8967. * 1 | MU
  8968. *-----------------------
  8969. * bit(3) | mode
  8970. *-----------------------
  8971. * 0 | non -triggered
  8972. * 1 | triggered
  8973. */
  8974. WMI_VDEV_PARAM_SET_HE_SOUNDING_MODE, /* 0x87 */
  8975. /** Fixed rate setting used in UL Trigger
  8976. * The top nibble is used to select which format to use for encoding
  8977. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  8978. * format.
  8979. * If V == 0b0001: format is: 0x1000RRRR.
  8980. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  8981. *
  8982. * This parameter controls the UL OFDMA and UL MU-MIMO vdev fixed rate.
  8983. */
  8984. WMI_VDEV_PARAM_UL_FIXED_RATE, /* 0x88 */
  8985. /**
  8986. * Uplink MU-MIMO & OFDMA GI configuration used in UL Trigger
  8987. * 11AX: GI =
  8988. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  8989. * 11N: SGI=WMI_GI_400_NS
  8990. */
  8991. WMI_VDEV_PARAM_UL_GI, /* 0x89 */
  8992. /** Enable/Disable LDPC in UL Trigger */
  8993. WMI_VDEV_PARAM_UL_LDPC, /* 0x8A */
  8994. /** Max NSS allowed in UL Trigger */
  8995. WMI_VDEV_PARAM_UL_NSS, /* 0x8B */
  8996. /** Enable/Disable STBC in UL Trigger */
  8997. WMI_VDEV_PARAM_UL_STBC, /* 0x8C */
  8998. /** specify the HE LTF setting that should be used for fixed rate
  8999. * uplink transmissions.
  9000. *
  9001. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  9002. * or WMI_HE_LTF_4X.
  9003. */
  9004. WMI_VDEV_PARAM_UL_HE_LTF, /* 0x8D */
  9005. /** Uplink OFDMA PPDU bandwidth (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz)*/
  9006. WMI_VDEV_PARAM_UL_PPDU_BW, /* 0x8E */
  9007. /** Enable/Disable FW handling MU EDCA change from AP (1: En, 0:Dis) */
  9008. WMI_VDEV_PARAM_MU_EDCA_FW_UPDATE_EN, /* 0x8F */
  9009. /** Update dot11ObssNbruToleranceTime in fw. Param value: seconds */
  9010. WMI_VDEV_PARAM_UPDATE_OBSS_RU_TOLERANCE_TIME, /* 0x90 */
  9011. /** Parameter used when MTU size is sent by the host
  9012. * In particular, this configuration message is used for cases where the
  9013. * encapsulation header results in a larger max frame size than the
  9014. * typical 802.3 + SNAP/LLC frame.
  9015. */
  9016. WMI_VDEV_PARAM_MAX_MTU_SIZE, /* 0x91 */
  9017. /** Send every nth beacon to host
  9018. * if value of n is 0, it means this Nth beacon upload is disabled
  9019. */
  9020. WMI_VDEV_PARAM_NTH_BEACON_TO_HOST, /* 0x92 */
  9021. /**
  9022. * To capture the MGMT OR DATA OR BOTH packets.
  9023. * Refer to enum WMI_PKT_CAPTURE_MODE_CONFIG for specifications of
  9024. * which parameter value enables which kind of packet captures.
  9025. */
  9026. WMI_VDEV_PARAM_PACKET_CAPTURE_MODE, /* 0x93 */
  9027. /**
  9028. * To configure duration of how many seconds without tx unicast traffic is
  9029. * considered stale for mcast rate adaptation
  9030. */
  9031. WMI_VDEV_PARAM_MCAST_RC_STALE_PERIOD, /* 0x94 */
  9032. /*
  9033. * Bits 3:0 - AST0_FLOW_MASK(4)
  9034. * Bits 7:4 - AST1_FLOW_MASK(4)
  9035. * Bits 11:8 - AST2_FLOW_MASK(4)
  9036. * Bits 15:12 - AST3_FLOW_MASK(4)
  9037. * Bits 23:16 - TID_VALID_HI_PRI(8)
  9038. * Bits 31:24 - TID_VALID_LOW_PRI(8)
  9039. *
  9040. * The below macros can be used to set/get the relevent fields.
  9041. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x)
  9042. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET(msdu_flow_config1, ast_x, mask)
  9043. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1)
  9044. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask)
  9045. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1)
  9046. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask)
  9047. */
  9048. WMI_VDEV_PARAM_MSDU_FLOW_OVERRIDE_CONFIG, /* 0x95 */
  9049. /* Enable/Disable using NULL frame for leaky AP */
  9050. WMI_VDEV_PARAM_ENABLE_NULL_FOR_LEAKY_AP, /* 0x96 */
  9051. /**
  9052. * To configure duration of how many seconds without TX/RX data traffic,
  9053. * NDI vdev can kickout the connected peer (i.e. NDP Termination).
  9054. */
  9055. WMI_VDEV_PARAM_NDP_INACTIVITY_TIMEOUT, /* 0x97 */
  9056. /* To enable/disable multicast rate adaptation feature at vdev level */
  9057. WMI_VDEV_PARAM_ENABLE_MCAST_RC, /* 0x98 */
  9058. /*
  9059. * Params related to 6GHz operation
  9060. * The parameter value is formed from WMI_VDEV_6GHZ_BITMAP flags.
  9061. */
  9062. WMI_VDEV_PARAM_6GHZ_PARAMS, /* 0x99 */
  9063. /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
  9064. * The below vdev param types are used for prototyping, and are
  9065. * prone to change.
  9066. */
  9067. WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
  9068. /* 11AX SPECIFIC defines */
  9069. /* USE this for BSS color change */
  9070. WMI_VDEV_PARAM_BSS_COLOR, /* 0x8001 */
  9071. /*
  9072. * Enable / disable trigger access for a AP vdev's peers.
  9073. * For a STA mode vdev this will enable/disable triggered access
  9074. * and enable/disable Multi User mode of operation.
  9075. * A value of 0 in a given bit disables corresponding mode.
  9076. * bit | hemu mode
  9077. * ---------------
  9078. * 0 | HE SUBFEE
  9079. * 1 | HE SUBFER
  9080. * 2 | HE MUBFEE
  9081. * 3 | HE MUBFER
  9082. * 4 | DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
  9083. * 5 | UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
  9084. * | trigger receive & UL response
  9085. * 6 | UL MUMIMO
  9086. */
  9087. WMI_VDEV_PARAM_SET_HEMU_MODE, /* 0x8002 */
  9088. WMI_VDEV_PARAM_HEOPS_0_31, /* 0x8003 */
  9089. WMI_VDEV_PARAM_OBSSPD, /* 0x8004 */
  9090. /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
  9091. } WMI_VDEV_PARAM;
  9092. #define WMI_VDEV_HE_SUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 0, 1)
  9093. #define WMI_VDEV_HE_SUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 1)
  9094. #define WMI_VDEV_HE_SUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 0)
  9095. #define WMI_VDEV_HE_SUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 1, 1)
  9096. #define WMI_VDEV_HE_SUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 1)
  9097. #define WMI_VDEV_HE_SUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 0)
  9098. #define WMI_VDEV_HE_MUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 2, 1)
  9099. #define WMI_VDEV_HE_MUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 1)
  9100. #define WMI_VDEV_HE_MUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 0)
  9101. #define WMI_VDEV_HE_MUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 3, 1)
  9102. #define WMI_VDEV_HE_MUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 1)
  9103. #define WMI_VDEV_HE_MUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 0)
  9104. #define WMI_VDEV_HE_DLOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 4, 1)
  9105. #define WMI_VDEV_HE_DLOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 1)
  9106. #define WMI_VDEV_HE_DLOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 0)
  9107. #define WMI_VDEV_HE_ULOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 5, 1)
  9108. #define WMI_VDEV_HE_ULOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 1)
  9109. #define WMI_VDEV_HE_ULOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 0)
  9110. #define WMI_VDEV_HE_ULMUMIMO_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 6, 1)
  9111. #define WMI_VDEV_HE_ULMUMIMO_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 1)
  9112. #define WMI_VDEV_HE_ULMUMIMO_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 0)
  9113. #define WMI_VDEV_HE_AX_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 0, 1)
  9114. #define WMI_VDEV_HE_MU_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 2, 1)
  9115. #define WMI_VDEV_HE_AX_TRIG_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 3, 1)
  9116. /* vdev capabilities bit mask */
  9117. #define WMI_VDEV_BEACON_SUPPORT 0x1
  9118. #define WMI_VDEV_WDS_LRN_ENABLED 0x2
  9119. #define WMI_VDEV_VOW_ENABLED 0x4
  9120. #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
  9121. #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
  9122. #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
  9123. /* Per VAP rate dropdown masks */
  9124. #define WMI_VDEV_MGMT_RATE_DROPDOWN_M 0x01
  9125. #define WMI_VDEV_MGMT_RATE_DROPDOWN_S 0
  9126. #define WMI_VDEV_MGMT_RATE_DROPDOWN (WMI_VDEV_MGMT_RATE_DROPDOWN_M << WMI_VDEV_MGMT_RATE_DROPDOWN_S)
  9127. #define WMI_VDEV_MGMT_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MGMT_RATE_DROPDOWN)
  9128. #define WMI_VDEV_MGMT_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MGMT_RATE_DROPDOWN)
  9129. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_M 0x01
  9130. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_S 1
  9131. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN (WMI_VDEV_SU_DATA_RATE_DROPDOWN_M << WMI_VDEV_SU_DATA_RATE_DROPDOWN_S)
  9132. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  9133. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  9134. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_M 0x01
  9135. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_S 2
  9136. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN (WMI_VDEV_MU_DATA_RATE_DROPDOWN_M << WMI_VDEV_MU_DATA_RATE_DROPDOWN_S)
  9137. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  9138. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  9139. /* TXBF capabilities masks */
  9140. #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
  9141. #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
  9142. #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << WMI_TXBF_CONF_SU_TX_BFEE_S)
  9143. #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFEE)
  9144. #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFEE)
  9145. #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
  9146. #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
  9147. #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << WMI_TXBF_CONF_MU_TX_BFEE_S)
  9148. #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFEE)
  9149. #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFEE)
  9150. #define WMI_TXBF_CONF_SU_TX_BFER_S 2
  9151. #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
  9152. #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << WMI_TXBF_CONF_SU_TX_BFER_S)
  9153. #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFER)
  9154. #define WMI_TXBF_CONF_SU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFER)
  9155. #define WMI_TXBF_CONF_MU_TX_BFER_S 3
  9156. #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
  9157. #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << WMI_TXBF_CONF_MU_TX_BFER_S)
  9158. #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFER)
  9159. #define WMI_TXBF_CONF_MU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFER)
  9160. #define WMI_TXBF_CONF_STS_CAP_S 4
  9161. #define WMI_TXBF_CONF_STS_CAP_M 0x7
  9162. #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << WMI_TXBF_CONF_STS_CAP_S)
  9163. #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_STS_CAP);
  9164. #define WMI_TXBF_CONF_STS_CAP_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_STS_CAP)
  9165. #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
  9166. #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
  9167. #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << WMI_TXBF_CONF_IMPLICIT_BF_S)
  9168. #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_IMPLICIT_BF)
  9169. #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_IMPLICIT_BF)
  9170. #define WMI_TXBF_CONF_BF_SND_DIM_S 8
  9171. #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
  9172. #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << WMI_TXBF_CONF_BF_SND_DIM_S)
  9173. #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_BF_SND_DIM)
  9174. #define WMI_TXBF_CONF_BF_SND_DIM_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_BF_SND_DIM)
  9175. /* commands for 11ax TXBF capabilities */
  9176. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_GET(x) WMI_GET_BITS((x,0,1)
  9177. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_SET(x,z) WMI_SET_BITS(x,0,1,z)
  9178. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_GET(x) WMI_GET_BITS((x,1,1)
  9179. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_SET(x,z) WMI_SET_BITS(x,1,1,z)
  9180. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_GET(x) WMI_GET_BITS((x,2,1)
  9181. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_SET(x,z) WMI_SET_BITS(x,2,1,z)
  9182. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_GET(x) WMI_GET_BITS((x,3,3)
  9183. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,3,3,z)
  9184. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_GET(x) WMI_GET_BITS((x,6,3)
  9185. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,6,3,z)
  9186. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_GET(x) WMI_GET_BITS((x,9,3)
  9187. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_SET(x,z) WMI_SET_BITS(x,9,3,z)
  9188. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_GET(x) WMI_GET_BITS((x,12,3)
  9189. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_SET(x,z) WMI_SET_BITS(x,12,3,z)
  9190. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_GET(x) WMI_GET_BITS((x,15,3)
  9191. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,15,3,z)
  9192. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_GET(x) WMI_GET_BITS((x,18,3)
  9193. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,18,3,z)
  9194. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,21,1)
  9195. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,21,1,z)
  9196. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,22,1)
  9197. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,22,1,z)
  9198. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_GET(x) WMI_GET_BITS((x,23,1)
  9199. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_SET(x,z) WMI_SET_BITS(x,23,1,z)
  9200. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_GET(x) WMI_GET_BITS((x,24,1)
  9201. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_SET(x,z) WMI_SET_BITS(x,24,1,z)
  9202. #define WMI_TXBF_CONF_AX_FDBK_TRIG_GET(x) WMI_GET_BITS((x,25,1)
  9203. #define WMI_TXBF_CONF_AX_FDBK_TRIG_SET(x,z) WMI_SET_BITS(x,25,1,z)
  9204. /* TXBF capabilities */
  9205. typedef struct {
  9206. A_UINT32 txbf_cap;
  9207. } wmi_vdev_txbf_cap;
  9208. /* vdev rx filters (for mesh) */
  9209. typedef enum {
  9210. WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0, /* Don't drop any frames - Default */
  9211. WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1, /* Drop FromDS frames */
  9212. WMI_VDEV_RX_FILTER_OUT_TODS = 0x2, /* Drop ToDS frames */
  9213. WMI_VDEV_RX_FILTER_OUT_NODS = 0x4, /* Drop NODS frames */
  9214. WMI_VDEV_RX_FILTER_OUT_RA = 0x8, /* Drop RA frames */
  9215. WMI_VDEV_RX_FILTER_OUT_TA = 0x10, /* Drop TA frames */
  9216. } wmi_vdev_param_filter;
  9217. /* Length of ATIM Window in TU */
  9218. #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
  9219. enum wmi_pkt_type {
  9220. WMI_PKT_TYPE_RAW = 0,
  9221. WMI_PKT_TYPE_NATIVE_WIFI = 1,
  9222. WMI_PKT_TYPE_ETHERNET = 2,
  9223. };
  9224. /*******************************************************************
  9225. * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
  9226. * Do not use it!
  9227. *******************************************************************/
  9228. typedef struct {
  9229. A_UINT8 sutxbfee : 1,
  9230. mutxbfee : 1,
  9231. sutxbfer : 1,
  9232. mutxbfer : 1,
  9233. txb_sts_cap : 3,
  9234. implicit_bf : 1;
  9235. } wmi_vdev_txbf_en;
  9236. /** Upto 8 bits are available for Roaming module to be sent along with
  9237. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
  9238. /* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
  9239. #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
  9240. /* Enable Roaming module in FW to do scan based on Final BMISS */
  9241. #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
  9242. /**
  9243. * To enable/disable EAPOL_4WAY_HANDSHAKE process while roaming.
  9244. * param value = 0 --> Enable EAPOL 4way handshake
  9245. * param value = 1 --> Skip EAPOL 4way handshake
  9246. */
  9247. #define WMI_VDEV_PARAM_SKIP_ROAM_EAPOL_4WAY_HANDSHAKE 0x4
  9248. /** slot time long */
  9249. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  9250. /** slot time short */
  9251. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  9252. /** preablbe long */
  9253. #define WMI_VDEV_PREAMBLE_LONG 0x1
  9254. /** preablbe short */
  9255. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  9256. /** the definition of different START/RESTART Event response */
  9257. typedef enum {
  9258. /* Event respose of START CMD */
  9259. WMI_VDEV_START_RESP_EVENT = 0,
  9260. /* Event respose of RESTART CMD */
  9261. WMI_VDEV_RESTART_RESP_EVENT,
  9262. } WMI_START_EVENT_PARAM;
  9263. typedef struct {
  9264. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
  9265. /** unique id identifying the VDEV, generated by the caller */
  9266. A_UINT32 vdev_id;
  9267. /** requestor id that requested the VDEV start request */
  9268. A_UINT32 requestor_id;
  9269. /* Respose of Event type START/RESTART */
  9270. WMI_START_EVENT_PARAM resp_type;
  9271. /** status of the response */
  9272. A_UINT32 status;
  9273. /** Vdev chain mask */
  9274. A_UINT32 chain_mask;
  9275. /** Vdev mimo power save mode */
  9276. A_UINT32 smps_mode;
  9277. union {
  9278. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  9279. /** pdev_id for identifying the MAC
  9280. * See macros starting with WMI_PDEV_ID_ for values.
  9281. */
  9282. A_UINT32 pdev_id;
  9283. };
  9284. /** Configured Transmit Streams **/
  9285. A_UINT32 cfgd_tx_streams;
  9286. /** Configured Receive Streams **/
  9287. A_UINT32 cfgd_rx_streams;
  9288. } wmi_vdev_start_response_event_fixed_param;
  9289. typedef struct {
  9290. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
  9291. /** unique id identifying the VDEV, generated by the caller */
  9292. A_UINT32 vdev_id;
  9293. } wmi_vdev_stopped_event_fixed_param;
  9294. typedef struct {
  9295. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
  9296. /** unique id identifying the VDEV, generated by the caller */
  9297. A_UINT32 vdev_id;
  9298. } wmi_vdev_delete_resp_event_fixed_param;
  9299. /** common structure used for simple events (stopped, resume_req, standby response) */
  9300. typedef struct {
  9301. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
  9302. /** unique id identifying the VDEV, generated by the caller */
  9303. A_UINT32 vdev_id;
  9304. } wmi_vdev_simple_event_fixed_param;
  9305. /** VDEV start response status codes */
  9306. #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
  9307. #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
  9308. #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
  9309. #define WMI_VDEV_START_RESPONSE_DFS_VIOLATION 0x3 /** DFS_VIOLATION since channel in the NOL is selected */
  9310. #define WMI_VDEV_START_RESPONSE_INVALID_REGDOMAIN 0x4 /** Invalid regulatory domain in VDEV start */
  9311. #define WMI_VDEV_START_RESPONSE_INVALID_BAND 0x5 /** Band unsupported by current hw mode in VDEV start */
  9312. /** Beacon processing related command and event structures */
  9313. typedef struct {
  9314. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
  9315. /** unique id identifying the VDEV, generated by the caller */
  9316. A_UINT32 vdev_id;
  9317. /** xmit rate */
  9318. A_UINT32 tx_rate;
  9319. /** xmit power */
  9320. A_UINT32 txPower;
  9321. /** beacon buffer length in bytes */
  9322. A_UINT32 buf_len;
  9323. /* This TLV is followed by array of bytes:
  9324. * A_UINT8 bufp[]; <-- beacon frame buffer
  9325. */
  9326. } wmi_bcn_tx_hdr;
  9327. /* Beacon filter */
  9328. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  9329. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  9330. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  9331. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  9332. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  9333. typedef struct {
  9334. /** Filter ID */
  9335. A_UINT32 bcn_filter_id;
  9336. /** Filter type - wmi_bcn_filter */
  9337. A_UINT32 bcn_filter;
  9338. /** Buffer len */
  9339. A_UINT32 bcn_filter_len;
  9340. /** Filter info (threshold, BSSID, RSSI) */
  9341. A_UINT8 *bcn_filter_buf;
  9342. } wmi_bcn_filter_rx_cmd;
  9343. /** Capabilities and IEs to be passed to firmware */
  9344. typedef struct {
  9345. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
  9346. /** Capabilities */
  9347. A_UINT32 caps;
  9348. /** ERP info */
  9349. A_UINT32 erp;
  9350. /** Advanced capabilities */
  9351. /** HT capabilities */
  9352. /** HT Info */
  9353. /** ibss_dfs */
  9354. /** wpa Info */
  9355. /** rsn Info */
  9356. /** rrm info */
  9357. /** ath_ext */
  9358. /** app IE */
  9359. } wmi_bcn_prb_info;
  9360. typedef struct {
  9361. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
  9362. /** unique id identifying the VDEV, generated by the caller */
  9363. A_UINT32 vdev_id;
  9364. /** TIM IE offset from the beginning of the template. */
  9365. A_UINT32 tim_ie_offset;
  9366. /** beacon buffer length. data is in TLV data[] */
  9367. A_UINT32 buf_len;
  9368. /** CSA IE switch count offset from the beginning of data[]
  9369. * Value 0 indicates CSA IE is not present in beacon template.
  9370. */
  9371. A_UINT32 csa_switch_count_offset; /* units = bytes */
  9372. /** Extended CSA IE switch count offset from the beginning of data[]
  9373. * Value 0 indicates CSA IE is not present in beacon template.
  9374. */
  9375. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  9376. /** Specify when to send the CSA switch count status from FW to host.
  9377. * See WMI_CSA_EVENT_BMAP* below for more information.
  9378. * E.g. if CSA switch count event is needed to be sent when the switch count
  9379. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  9380. */
  9381. A_UINT32 csa_event_bitmap;
  9382. /** offset (in octets/bytes) of MBSSID IE in beacon frame */
  9383. A_UINT32 mbssid_ie_offset;
  9384. /** offset (in octets/bytes) of ESP IE in beacon frame */
  9385. A_UINT32 esp_ie_offset;
  9386. /** CSC IE color switch count offset from the beginning of data[]
  9387. * Value 0 indicates CSC IE is not present in beacon template.
  9388. */
  9389. A_UINT32 csc_switch_count_offset; /* units = bytes */
  9390. /** Specify when to send the CSC switch count status from FW to host.
  9391. * See WMI_CSC_EVENT_BMAP* below for more information.
  9392. * E.g. if CSA switch count event is needed to be sent when the switch count
  9393. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  9394. */
  9395. A_UINT32 csc_event_bitmap;
  9396. /*
  9397. * The TLVs follows:
  9398. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  9399. * A_UINT8 data[]; <-- Variable length data
  9400. */
  9401. } wmi_bcn_tmpl_cmd_fixed_param;
  9402. #define WMI_CSA_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSA switch count event */
  9403. #define WMI_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  9404. Same can also be achieved by setting bitmap to 0X80000001 */
  9405. #define WMI_CSA_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSA switch count event for every update to switch count */
  9406. #define WMI_CSC_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSC switch count event */
  9407. #define WMI_CSC_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  9408. Same can also be achieved by setting bitmap to 0X80000001 */
  9409. #define WMI_CSC_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSC switch count event for every update to switch count */
  9410. typedef struct {
  9411. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
  9412. /** unique id identifying the VDEV, generated by the caller */
  9413. A_UINT32 vdev_id;
  9414. /** beacon buffer length. data is in TLV data[] */
  9415. A_UINT32 buf_len;
  9416. /*
  9417. * The TLVs follows:
  9418. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  9419. * A_UINT8 data[]; <-- Variable length data
  9420. */
  9421. } wmi_prb_tmpl_cmd_fixed_param;
  9422. typedef struct {
  9423. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_tmpl_cmd_fixed_param */
  9424. /** unique id identifying the VDEV, generated by the caller */
  9425. A_UINT32 vdev_id;
  9426. /** fd frame buffer length. data is in TLV data[] */
  9427. A_UINT32 buf_len;
  9428. /*
  9429. * The TLVs follows:
  9430. * A_UINT8 data[]; <-- Variable length data
  9431. */
  9432. } wmi_fd_tmpl_cmd_fixed_param;
  9433. typedef struct {
  9434. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
  9435. A_UINT32 tlv_header;
  9436. /** unique id identifying the VDEV */
  9437. A_UINT32 vdev_id;
  9438. /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
  9439. A_UINT32 tx_status;
  9440. } wmi_offload_bcn_tx_status_event_fixed_param;
  9441. enum wmi_sta_ps_mode {
  9442. /** enable power save for the given STA VDEV */
  9443. WMI_STA_PS_MODE_DISABLED = 0,
  9444. /** disable power save for a given STA VDEV */
  9445. WMI_STA_PS_MODE_ENABLED = 1,
  9446. };
  9447. typedef struct {
  9448. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
  9449. /** unique id identifying the VDEV, generated by the caller */
  9450. A_UINT32 vdev_id;
  9451. /** Power save mode
  9452. *
  9453. * (see enum wmi_sta_ps_mode)
  9454. */
  9455. A_UINT32 sta_ps_mode;
  9456. } wmi_sta_powersave_mode_cmd_fixed_param;
  9457. typedef struct {
  9458. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_tdcc_config_cmd_fixed_param */
  9459. /** Set a max tx period: percentage of one beacon interval. range: 0 - 100 */
  9460. A_UINT32 tx_cycle_percentage;
  9461. /** Enable/disable TX Duty Cycle Control powersave */
  9462. A_UINT32 enabled;
  9463. } wmi_sta_tdcc_config_cmd_fixed_param;
  9464. enum wmi_csa_offload_en {
  9465. WMI_CSA_OFFLOAD_DISABLE = 0,
  9466. WMI_CSA_OFFLOAD_ENABLE = 1,
  9467. };
  9468. typedef struct {
  9469. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
  9470. A_UINT32 vdev_id;
  9471. A_UINT32 csa_offload_enable;
  9472. } wmi_csa_offload_enable_cmd_fixed_param;
  9473. typedef struct {
  9474. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
  9475. A_UINT32 vdev_id;
  9476. /*
  9477. * The TLVs follows:
  9478. * wmi_channel chan;
  9479. */
  9480. } wmi_csa_offload_chanswitch_cmd_fixed_param;
  9481. /**
  9482. * This parameter controls the policy for retrieving frames from AP while the
  9483. * STA is in sleep state.
  9484. *
  9485. * Only takes affect if the sta_ps_mode is enabled
  9486. */
  9487. enum wmi_sta_ps_param_rx_wake_policy {
  9488. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  9489. * the Power save SM(state machine) will come out of sleep by either
  9490. * sending null frame (or) a data frame (with PS==0) in response to TIM
  9491. * bit set in the received beacon frame from AP.
  9492. */
  9493. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  9494. /* Here the power save state machine will not wakeup in response to TIM
  9495. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  9496. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  9497. * access categories are delivery-enabled, the station will send a UAPSD
  9498. * trigger frame, otherwise it will send a PS-Poll.
  9499. */
  9500. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  9501. };
  9502. /** Number of tx frames/beacon that cause the power save SM to wake up.
  9503. *
  9504. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  9505. * meaning, It will cause the SM to never wake up. This is useful if you want
  9506. * to keep the system to sleep all the time for some kind of test mode . host
  9507. * can change this parameter any time. It will affect at the next tx frame.
  9508. */
  9509. enum wmi_sta_ps_param_tx_wake_threshold {
  9510. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  9511. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  9512. /* Values greater than one indicate that many TX attempts per beacon
  9513. * interval before the STA will wake up
  9514. */
  9515. };
  9516. /**
  9517. * The maximum number of PS-Poll frames the FW will send in response to
  9518. * traffic advertised in TIM before waking up (by sending a null frame with PS
  9519. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  9520. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  9521. * parameter is used when the RX wake policy is
  9522. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  9523. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  9524. */
  9525. enum wmi_sta_ps_param_pspoll_count {
  9526. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  9527. /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
  9528. * will send before waking up.
  9529. */
  9530. };
  9531. /*
  9532. * This will include the delivery and trigger enabled state for every AC.
  9533. * This is the negotiated state with AP. The host MLME needs to set this based
  9534. * on AP capability and the state Set in the association request by the
  9535. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  9536. */
  9537. #define WMI_UAPSD_AC_TYPE_DELI 0
  9538. #define WMI_UAPSD_AC_TYPE_TRIG 1
  9539. #define WMI_UAPSD_AC_BIT_MASK(ac,type) \
  9540. ((type == WMI_UAPSD_AC_TYPE_DELI) ? \
  9541. (1 << (ac<<1)) : \
  9542. (1 << ((ac<<1)+1)))
  9543. enum wmi_sta_ps_param_uapsd {
  9544. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  9545. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  9546. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  9547. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  9548. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  9549. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  9550. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  9551. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  9552. };
  9553. enum wmi_sta_powersave_param {
  9554. /**
  9555. * Controls how frames are retrievd from AP while STA is sleeping
  9556. *
  9557. * (see enum wmi_sta_ps_param_rx_wake_policy)
  9558. */
  9559. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  9560. /**
  9561. * The STA will go active after this many TX
  9562. *
  9563. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  9564. */
  9565. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  9566. /**
  9567. * Number of PS-Poll to send before STA wakes up
  9568. *
  9569. * (see enum wmi_sta_ps_param_pspoll_count)
  9570. *
  9571. */
  9572. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  9573. /**
  9574. * TX/RX inactivity time in msec before going to sleep.
  9575. *
  9576. * The power save SM will monitor tx/rx activity on the VDEV, if no
  9577. * activity for the specified msec of the parameter the Power save SM will
  9578. * go to sleep.
  9579. */
  9580. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  9581. /**
  9582. * Set uapsd configuration.
  9583. *
  9584. * (see enum wmi_sta_ps_param_uapsd)
  9585. */
  9586. WMI_STA_PS_PARAM_UAPSD = 4,
  9587. /**
  9588. * Number of PS-Poll to send before STA wakes up in QPower Mode
  9589. */
  9590. WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
  9591. /**
  9592. * Enable QPower
  9593. */
  9594. WMI_STA_PS_ENABLE_QPOWER = 6,
  9595. /**
  9596. * Number of TX frames before the entering the Active state
  9597. */
  9598. WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
  9599. /**
  9600. * QPower SPEC PSPOLL interval
  9601. */
  9602. WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
  9603. /**
  9604. * Max SPEC PSPOLL to be sent when the PSPOLL response has
  9605. * no-data bit set
  9606. */
  9607. WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
  9608. /**
  9609. * Max value of ITO reset when there is no tx-rx
  9610. * after AP has set the TIM bit
  9611. */
  9612. WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX = 10,
  9613. };
  9614. typedef struct {
  9615. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
  9616. /** unique id identifying the VDEV, generated by the caller */
  9617. A_UINT32 vdev_id;
  9618. /** station power save parameter (see enum wmi_sta_powersave_param) */
  9619. A_UINT32 param;
  9620. A_UINT32 value;
  9621. } wmi_sta_powersave_param_cmd_fixed_param;
  9622. /** No MIMO power save */
  9623. #define WMI_STA_MIMO_PS_MODE_DISABLE
  9624. /** mimo powersave mode static*/
  9625. #define WMI_STA_MIMO_PS_MODE_STATIC
  9626. /** mimo powersave mode dynamic */
  9627. #define WMI_STA_MIMO_PS_MODE_DYNAMI
  9628. typedef struct {
  9629. /** unique id identifying the VDEV, generated by the caller */
  9630. A_UINT32 vdev_id;
  9631. /** mimo powersave mode as defined above */
  9632. A_UINT32 mimo_pwrsave_mode;
  9633. } wmi_sta_mimo_ps_mode_cmd;
  9634. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  9635. enum wmi_ap_ps_param_uapsd {
  9636. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  9637. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  9638. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  9639. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  9640. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  9641. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  9642. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  9643. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  9644. };
  9645. /** U-APSD maximum service period of peer station */
  9646. enum wmi_ap_ps_peer_param_max_sp {
  9647. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  9648. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  9649. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  9650. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  9651. /* keep last! */
  9652. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  9653. };
  9654. /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
  9655. enum wmi_ap_ps_param_sifs_resp_frmtype {
  9656. WMI_SIFS_RESP_PSPOLL = (1 << 0),
  9657. WMI_SIFS_RESP_UAPSD = (1 << 1),
  9658. WMI_SIFS_RESP_QBST_EXP = (1 << 2),
  9659. WMI_SIFS_RESP_QBST_DATA = (1 << 3),
  9660. WMI_SIFS_RESP_QBST_BAR = (1 << 4),
  9661. };
  9662. /**
  9663. * AP power save parameter
  9664. * Set a power save specific parameter for a peer station
  9665. */
  9666. enum wmi_ap_ps_peer_param {
  9667. /** Set uapsd configuration for a given peer.
  9668. *
  9669. * This will include the delivery and trigger enabled state for every AC.
  9670. * The host MLME needs to set this based on AP capability and stations
  9671. * request Set in the association request received from the station.
  9672. *
  9673. * Lower 8 bits of the value specify the UAPSD configuration.
  9674. *
  9675. * (see enum wmi_ap_ps_param_uapsd)
  9676. * The default value is 0.
  9677. */
  9678. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  9679. /**
  9680. * Set the service period for a UAPSD capable station
  9681. *
  9682. * The service period from wme ie in the (re)assoc request frame.
  9683. *
  9684. * (see enum wmi_ap_ps_peer_param_max_sp)
  9685. */
  9686. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  9687. /** Time in seconds for aging out buffered frames for STA in power save */
  9688. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  9689. /**
  9690. * Specify frame types that are considered SIFS RESP trigger frame
  9691. * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
  9692. */
  9693. WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  9694. /** Specifies the trigger state of TID. Valid only for UAPSD frame type */
  9695. WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  9696. /** Specifies the WNM sleep state of a STA */
  9697. WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  9698. };
  9699. typedef struct {
  9700. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
  9701. /** unique id identifying the VDEV, generated by the caller */
  9702. A_UINT32 vdev_id;
  9703. /** peer MAC address */
  9704. wmi_mac_addr peer_macaddr;
  9705. /** AP powersave param (see enum wmi_ap_ps_peer_param) */
  9706. A_UINT32 param;
  9707. /** AP powersave param value (see defines) */
  9708. A_UINT32 value;
  9709. } wmi_ap_ps_peer_cmd_fixed_param;
  9710. /** Configure peer station 11v U-APSD coexistance
  9711. *
  9712. * Two parameters from uaspd coexistence ie info (as specified in 11v) are
  9713. * sent down to FW along with this command.
  9714. *
  9715. * The semantics of these fields are described in the following text extracted
  9716. * from 802.11v.
  9717. *
  9718. * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
  9719. * U-APSD Coexistence element, the AP should not transmit frames to the
  9720. * non-AP STA outside of the U-APSD Coexistence Service Period, which
  9721. * begins when the AP receives the U-APSD trigger frame and ends after
  9722. * the transmission period specified by the result of the following
  9723. * calculation:
  9724. *
  9725. * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
  9726. *
  9727. * Where T is the time the U-APSD trigger frame was received at the AP
  9728. * Interval is the UAPSD Coexistence element Duration/Interval field
  9729. * value (see 7.3.2.91) or upon the successful transmission of a frame
  9730. * with EOSP bit set to 1, whichever is earlier.
  9731. *
  9732. *
  9733. * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
  9734. * Coexistence element, the AP should not transmit frames to the non-AP
  9735. * STA outside of the U-APSD Coexistence Service Period, which begins
  9736. * when the AP receives a U-APSD trigger frame and ends after the
  9737. * transmission period specified by the result of the following
  9738. * calculation: End of transmission period = T + Duration
  9739. */
  9740. typedef struct {
  9741. /** unique id identifying the VDEV, generated by the caller */
  9742. A_UINT32 vdev_id;
  9743. /** peer MAC address */
  9744. wmi_mac_addr peer_macaddr;
  9745. /** Enable U-APSD coexistence support for this peer
  9746. *
  9747. * 0 -> disabled (default)
  9748. * 1 -> enabled
  9749. */
  9750. A_UINT32 enabled;
  9751. /** Duration/Interval as defined by 11v U-ASPD coexistance */
  9752. A_UINT32 duration_interval;
  9753. /** Upper 32 bits of 64-bit TSF offset */
  9754. A_UINT32 tsf_offset_high;
  9755. /** Lower 32 bits of 64-bit TSF offset */
  9756. A_UINT32 tsf_offset_low;
  9757. } wmi_ap_powersave_peer_uapsd_coex_cmd;
  9758. typedef enum {
  9759. WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
  9760. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
  9761. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
  9762. WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
  9763. } wmi_ap_ps_egap_flag_type;
  9764. #define WMI_EGAP_GET_REDUCED_2G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 0, 8)
  9765. #define WMI_EGAP_GET_REDUCED_2G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 8, 8)
  9766. #define WMI_EGAP_GET_REDUCED_5G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 16, 8)
  9767. #define WMI_EGAP_GET_REDUCED_5G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 24, 8)
  9768. #define WMI_EGAP_SET_REDUCED_2G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 0, 8, val)
  9769. #define WMI_EGAP_SET_REDUCED_2G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 8, 8, val)
  9770. #define WMI_EGAP_SET_REDUCED_5G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 16, 8, val)
  9771. #define WMI_EGAP_SET_REDUCED_5G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 24, 8, val)
  9772. /**
  9773. * configure enhanced green ap parameters
  9774. */
  9775. typedef struct {
  9776. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  9777. /** Enable enhanced green ap
  9778. * 0 -> disabled
  9779. * 1 -> enabled
  9780. */
  9781. A_UINT32 enable;
  9782. /** The param indicates a duration that all STAs connected
  9783. * to S-AP have no traffic.
  9784. */
  9785. A_UINT32 inactivity_time; /* in unit of milliseconds */
  9786. /** The param indicates a duration that all STAs connected
  9787. * to S-AP have no traffic, after all STAs have entered powersave.
  9788. */
  9789. A_UINT32 wait_time; /* in unit of milliseconds */
  9790. /** The param is used to turn on/off some functions within E-GAP.
  9791. */
  9792. A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
  9793. /** Reduced_txrx_chainmask
  9794. * [7:0] - 2G band tx chain mask
  9795. * [15:8] - 2G band rx chain mask
  9796. * [23:16] - 5G band tx chain mask
  9797. * [31:24] - 5G band rx chain mask
  9798. */
  9799. A_UINT32 reduced_txrx_chainmask;
  9800. } wmi_ap_ps_egap_param_cmd_fixed_param;
  9801. typedef enum {
  9802. WMI_AP_PS_EGAP_STATUS_IDLE = 1,
  9803. WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
  9804. WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
  9805. WMI_AP_PS_EGAP_STATUS_MAX = 15
  9806. } wmi_ap_ps_egap_status_type;
  9807. /**
  9808. * send ehanced green ap status to host
  9809. */
  9810. typedef struct
  9811. {
  9812. /** TLV tag and len; tag equals
  9813. * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list */
  9814. A_UINT32 tlv_header;
  9815. union {
  9816. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  9817. /** pdev_id for identifying the MAC
  9818. * See macros starting with WMI_PDEV_ID_ for values.
  9819. */
  9820. A_UINT32 pdev_id;
  9821. };
  9822. /** The param indicates the current tx chainmask with the mac id. */
  9823. A_UINT32 tx_chainmask;
  9824. /** The param indicates the current rx chainmask with the mac id. */
  9825. A_UINT32 rx_chainmask;
  9826. } wmi_ap_ps_egap_info_chainmask_list;
  9827. typedef struct {
  9828. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  9829. /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
  9830. A_UINT32 status;
  9831. /* This TLV is followed by
  9832. * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
  9833. */
  9834. } wmi_ap_ps_egap_info_event_fixed_param;
  9835. /* 128 clients = 4 words */
  9836. /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
  9837. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  9838. typedef struct {
  9839. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  9840. /** TIM bitmap len (in bytes) */
  9841. A_UINT32 tim_len;
  9842. /** TIM Partial Virtual Bitmap */
  9843. A_UINT32 tim_mcast;
  9844. A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  9845. A_UINT32 tim_changed;
  9846. A_UINT32 tim_num_ps_pending;
  9847. /** Use the vdev_id only if vdev_id_valid is set */
  9848. A_UINT32 vdev_id_valid;
  9849. /** unique id identifying the VDEV */
  9850. A_UINT32 vdev_id;
  9851. } wmi_tim_info;
  9852. typedef struct {
  9853. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  9854. /** TIM Partial Virtual Bitmap */
  9855. A_UINT32 tim_mcast;
  9856. A_UINT32 tim_changed;
  9857. A_UINT32 tim_num_ps_pending;
  9858. /** Use the vdev_id only if vdev_id_valid is set */
  9859. A_UINT32 vdev_id_valid;
  9860. /** unique id identifying the VDEV */
  9861. A_UINT32 vdev_id;
  9862. /** TIM bitmap len (in bytes) */
  9863. A_UINT32 tim_len;
  9864. /* followed by WMITLV_TAG_ARRAY_BYTE holding the TIM bitmap */
  9865. } wmi_tim_info_v2;
  9866. typedef struct {
  9867. /** Flag to enable quiet period IE support */
  9868. A_UINT32 is_enabled;
  9869. /** Quiet start */
  9870. A_UINT32 tbttcount;
  9871. /** Beacon intervals between quiets*/
  9872. A_UINT32 period;
  9873. /** TUs of each quiet*/
  9874. A_UINT32 duration;
  9875. /** TUs of from TBTT of quiet start*/
  9876. A_UINT32 offset;
  9877. } wmi_quiet_info;
  9878. /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
  9879. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
  9880. typedef struct {
  9881. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
  9882. /** Bit 0: Flag to indicate an update in NOA schedule
  9883. * Bits 7-1: Reserved
  9884. * Bits 15-8: Index (identifies the instance of NOA sub element)
  9885. * Bit 16: Opp PS state of the AP
  9886. * Bits 23-17: Ctwindow in TUs
  9887. * Bits 31-24: Number of NOA descriptors
  9888. */
  9889. A_UINT32 noa_attributes;
  9890. wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  9891. /** Use the vdev_id only if vdev_id_valid is set */
  9892. A_UINT32 vdev_id_valid;
  9893. /** unique id identifying the VDEV */
  9894. A_UINT32 vdev_id;
  9895. } wmi_p2p_noa_info;
  9896. typedef struct {
  9897. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_offload_info */
  9898. A_UINT32 vdev_id; /* unique id identifying the VDEV */
  9899. A_UINT8 tbttcount; /* quiet start */
  9900. A_UINT8 period; /* beacon intervals between quiets */
  9901. A_UINT16 duration; /* TUs of each quiet */
  9902. A_UINT16 offset; /* TUs of from TBTT of quiet start */
  9903. } wmi_quiet_offload_info;
  9904. #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
  9905. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
  9906. #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
  9907. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
  9908. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
  9909. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  9910. WMI_UNIFIED_NOA_ATTR_MODIFIED);
  9911. #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
  9912. #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
  9913. #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
  9914. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
  9915. #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
  9916. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  9917. WMI_UNIFIED_NOA_ATTR_INDEX);
  9918. #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
  9919. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
  9920. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
  9921. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
  9922. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
  9923. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  9924. WMI_UNIFIED_NOA_ATTR_OPP_PS);
  9925. #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
  9926. #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
  9927. #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
  9928. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
  9929. #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
  9930. WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
  9931. WMI_UNIFIED_NOA_ATTR_CTWIN);
  9932. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
  9933. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
  9934. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
  9935. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
  9936. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
  9937. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  9938. WMI_UNIFIED_NOA_ATTR_NUM_DESC);
  9939. typedef struct {
  9940. /** TIM info */
  9941. wmi_tim_info tim_info;
  9942. /** P2P NOA info */
  9943. wmi_p2p_noa_info p2p_noa_info;
  9944. /* TBD: More info elements to be added later */
  9945. } wmi_bcn_info;
  9946. typedef struct {
  9947. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
  9948. /** bitmap identifying the VDEVs, generated by the caller */
  9949. A_UINT32 vdev_map;
  9950. /** how many vdev's info is included in this message
  9951. * If this field is zero, then the number of vdevs is specified by
  9952. * the number of bits set in the vdev_map bitmap.
  9953. */
  9954. A_UINT32 num_vdevs;
  9955. /* This TLV is followed by tim_info and p2p_noa_info for each vdev:
  9956. * wmi_tim_info tim_info[];
  9957. * wmi_p2p_noa_info p2p_noa_info[];
  9958. * wmi_quiet_offload_info quiet_offload_info[0/1];
  9959. *
  9960. */
  9961. } wmi_host_swba_event_fixed_param;
  9962. #define WMI_MAX_AP_VDEV 16
  9963. typedef struct {
  9964. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swfda_event_fixed_param */
  9965. /** vdev_id identifying the VDEV for which FILS should be generated */
  9966. A_UINT32 vdev_id;
  9967. /** time (in TU) at which current FILS Discovery frame is scheduled for Tx */
  9968. A_UINT32 fils_tt;
  9969. /** next TBTT time (in TU) for this vdev */
  9970. A_UINT32 tbtt;
  9971. } wmi_host_swfda_event_fixed_param;
  9972. typedef struct {
  9973. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
  9974. /** bimtap of VDEVs that has tbtt offset updated */
  9975. A_UINT32 vdev_map;
  9976. /* The TLVs for tbttoffset_list will follow this TLV.
  9977. * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
  9978. * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
  9979. */
  9980. } wmi_tbtt_offset_event_fixed_param;
  9981. typedef struct {
  9982. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
  9983. /** unique id identifying the VDEV */
  9984. A_UINT32 vdev_id;
  9985. /** tbttoffset in TUs */
  9986. A_UINT32 tbttoffset;
  9987. } wmi_tbtt_offset_info;
  9988. /** Use this event if number of vdevs > 32 */
  9989. typedef struct {
  9990. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param */
  9991. A_UINT32 num_vdevs;
  9992. /*
  9993. * The TLVs for tbttoffset will follow this TLV.
  9994. * Of size num_vdevs * wmi_tbtt_offset_info
  9995. */
  9996. } wmi_tbtt_offset_ext_event_fixed_param;
  9997. /* Peer Specific commands and events */
  9998. typedef struct {
  9999. A_UINT32 percentage; /* in unit of 12.5% */
  10000. A_UINT32 min_delta; /* in unit of Mbps */
  10001. } rate_delta_t;
  10002. #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
  10003. #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
  10004. #define MAX_NUM_OF_RATE_THRESH 4
  10005. typedef struct {
  10006. A_UINT32 val_cond_flags; /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  10007. Any of these two conditions or both of them can be set. */
  10008. rate_delta_t rate_delta;
  10009. A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; /* In unit of Mbps. There are at most 4 thresholds.
  10010. If the threshold count is less than 4, set zero to
  10011. the one following the last threshold */
  10012. } report_cond_per_phy_t;
  10013. enum peer_rate_report_cond_phy_type {
  10014. PEER_RATE_REPORT_COND_11B = 0,
  10015. PEER_RATE_REPORT_COND_11A_G,
  10016. PEER_RATE_REPORT_COND_11N,
  10017. PEER_RATE_REPORT_COND_11AC,
  10018. PEER_RATE_REPORT_COND_MAX_NUM
  10019. };
  10020. typedef struct {
  10021. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param */
  10022. A_UINT32 enable_rate_report; /* 1= enable, 0=disable */
  10023. A_UINT32 report_backoff_time; /* in unit of msecond */
  10024. A_UINT32 report_timer_period; /* in unit of msecond */
  10025. /* In the following field, the array index means the phy type,
  10026. * please see enum peer_rate_report_cond_phy_type for detail */
  10027. report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
  10028. } wmi_peer_set_rate_report_condition_fixed_param;
  10029. /* Peer Type:
  10030. * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
  10031. * on address and vdev opmode. This is largely here to allow host to indicate that
  10032. * peer is explicitly a TDLS peer
  10033. */
  10034. enum wmi_peer_type {
  10035. WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
  10036. WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
  10037. WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
  10038. WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
  10039. WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
  10040. WMI_PEER_TYPE_TRANS_BSS = 5, /* For creating BSS peer when connecting with non-transmit AP */
  10041. WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
  10042. /* Reserved from 128 - 255 for target internal use.*/
  10043. WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
  10044. };
  10045. typedef struct {
  10046. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
  10047. /** unique id identifying the VDEV, generated by the caller */
  10048. A_UINT32 vdev_id;
  10049. /** peer MAC address */
  10050. wmi_mac_addr peer_macaddr;
  10051. /** peer type: see enum values above */
  10052. A_UINT32 peer_type;
  10053. } wmi_peer_create_cmd_fixed_param;
  10054. typedef struct {
  10055. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
  10056. /** unique id identifying the VDEV, generated by the caller */
  10057. A_UINT32 vdev_id;
  10058. /** peer MAC address */
  10059. wmi_mac_addr peer_macaddr;
  10060. } wmi_peer_delete_cmd_fixed_param;
  10061. typedef struct {
  10062. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delete_all_peer_cmd_fixed_param */
  10063. /** unique id identifying the VDEV, generated by the caller */
  10064. A_UINT32 vdev_id;
  10065. } wmi_vdev_delete_all_peer_cmd_fixed_param;
  10066. typedef struct {
  10067. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param */
  10068. A_UINT32 tlv_header;
  10069. /*
  10070. * Following this struct is the TLV:
  10071. * A_UINT32 peer_ids[]; <-- variable-length array of peer_ids
  10072. * that have been unmapped by the host
  10073. */
  10074. } wmi_peer_unmap_response_cmd_fixed_param;
  10075. typedef struct {
  10076. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
  10077. /** unique id identifying the VDEV, generated by the caller */
  10078. A_UINT32 vdev_id;
  10079. /** peer MAC address */
  10080. wmi_mac_addr peer_macaddr;
  10081. /**
  10082. * maximum block ack window size to use during a rx block ack negotiation,
  10083. * i.e. the maximum number of MPDUs per A-MPDU that will be received
  10084. */
  10085. A_UINT32 rx_block_ack_win_limit;
  10086. } wmi_peer_set_rx_blocksize_cmd_fixed_param;
  10087. typedef struct {
  10088. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
  10089. /** unique id identifying the VDEV, generated by the caller */
  10090. A_UINT32 vdev_id;
  10091. /** peer MAC address */
  10092. wmi_mac_addr peer_macaddr;
  10093. /** tid bitmap identifying the tids to flush */
  10094. A_UINT32 peer_tid_bitmap;
  10095. } wmi_peer_flush_tids_cmd_fixed_param;
  10096. typedef struct {
  10097. /** rate mode . 0: disable fixed rate (auto rate)
  10098. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  10099. * 2: ht20 11n rate specified as mcs index
  10100. * 3: ht40 11n rate specified as mcs index
  10101. */
  10102. A_UINT32 rate_mode;
  10103. /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  10104. * and series 3 is stored at byte 3 (MSB) */
  10105. A_UINT32 rate_series;
  10106. /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
  10107. * and retry count for rate 3 is stored at byte 3 (MSB) */
  10108. A_UINT32 rate_retries;
  10109. } wmi_fixed_rate;
  10110. typedef struct {
  10111. /** unique id identifying the VDEV, generated by the caller */
  10112. A_UINT32 vdev_id;
  10113. /** peer MAC address */
  10114. wmi_mac_addr peer_macaddr;
  10115. /** fixed rate */
  10116. wmi_fixed_rate peer_fixed_rate;
  10117. } wmi_peer_fixed_rate_cmd;
  10118. #define WMI_MGMT_TID 17
  10119. typedef struct {
  10120. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
  10121. /** unique id identifying the VDEV, generated by the caller */
  10122. A_UINT32 vdev_id;
  10123. /** peer MAC address */
  10124. wmi_mac_addr peer_macaddr;
  10125. } wmi_addba_clear_resp_cmd_fixed_param;
  10126. typedef struct {
  10127. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
  10128. /** unique id identifying the VDEV, generated by the caller */
  10129. A_UINT32 vdev_id;
  10130. /** peer MAC address */
  10131. wmi_mac_addr peer_macaddr;
  10132. /** Tid number */
  10133. A_UINT32 tid;
  10134. /** Buffer/Window size*/
  10135. A_UINT32 buffersize;
  10136. } wmi_addba_send_cmd_fixed_param;
  10137. typedef struct {
  10138. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
  10139. /** unique id identifying the VDEV, generated by the caller */
  10140. A_UINT32 vdev_id;
  10141. /** peer MAC address */
  10142. wmi_mac_addr peer_macaddr;
  10143. /** Tid number */
  10144. A_UINT32 tid;
  10145. /** Is Initiator */
  10146. A_UINT32 initiator;
  10147. /** Reason code */
  10148. A_UINT32 reasoncode;
  10149. } wmi_delba_send_cmd_fixed_param;
  10150. typedef struct {
  10151. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
  10152. /** unique id identifying the vdev, generated by the caller */
  10153. A_UINT32 vdev_id;
  10154. /** peer mac address */
  10155. wmi_mac_addr peer_macaddr;
  10156. /** Tid number */
  10157. A_UINT32 tid;
  10158. /** status code */
  10159. A_UINT32 statuscode;
  10160. } wmi_addba_setresponse_cmd_fixed_param;
  10161. typedef struct {
  10162. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
  10163. /** unique id identifying the vdev, generated by the caller */
  10164. A_UINT32 vdev_id;
  10165. /** peer mac address */
  10166. wmi_mac_addr peer_macaddr;
  10167. /** Tid number */
  10168. A_UINT32 tid;
  10169. } wmi_send_singleamsdu_cmd_fixed_param;
  10170. /* Type of Station DTIM Power Save method */
  10171. enum {
  10172. /* For NORMAL DTIM, the parameter is the number of beacon intervals and
  10173. * also the same value as the listen interval. For this method, the
  10174. * station will wake up based on the listen interval. If this
  10175. * listen interval is not equal to DTIM, then the station may
  10176. * miss certain DTIM beacons. If this value is 1, then the
  10177. * station will wake up for every beacon.
  10178. */
  10179. WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
  10180. /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
  10181. * When this value is 1, then the station will wake at every DTIM beacon.
  10182. * If this value is >1, then the station will skip certain DTIM beacons.
  10183. * This value is the multiple of DTIM intervals that the station will
  10184. * wake up to receive the DTIM beacons.
  10185. */
  10186. WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
  10187. };
  10188. /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
  10189. typedef struct {
  10190. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
  10191. /** unique id identifying the VDEV, generated by the caller */
  10192. A_UINT32 vdev_id;
  10193. /** Station DTIM Power Save method as defined above */
  10194. A_UINT32 dtim_pwrsave_method;
  10195. /** DTIM PS value. Contents depends on the method */
  10196. A_UINT32 value;
  10197. /** Modulated DTIM value */
  10198. A_UINT32 MaxLIModulatedDTIM;
  10199. } wmi_sta_dtim_ps_method_cmd_fixed_param;
  10200. /*
  10201. * For Station UAPSD Auto Trigger feature, the Firmware monitors the
  10202. * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
  10203. * If there is no uplink/download for the specified service interval (field service_interval),
  10204. * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
  10205. * specified in the UP (field user_priority).
  10206. * Firmware also monitors the responses for these QOS-NULL triggers.
  10207. * If the peer does not have any delivery frames, it will respond with
  10208. * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
  10209. * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
  10210. * are unused and should be set to 0.
  10211. * When service_interval is 0, then the firmware will not send any trigger frames. This is for
  10212. * certain host-based implementations that don't want this firmware offload.
  10213. * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
  10214. * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
  10215. * and rest of the AC default to 300 ms.
  10216. *
  10217. * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
  10218. * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
  10219. * the more advanced monitoring method.
  10220. * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
  10221. * suspend interval (field suspend_interval), firmware will change its auto trigger interval
  10222. * to delay interval (field delay_interval). This way, when there is no traffic, the station
  10223. * will save more power by waking up less and sending less trigger frames.
  10224. * The (service_interval < suspend_interval) and (service_interval < delay_interval).
  10225. * If this variable auto trigger is not required, then the suspend_interval and delay_interval
  10226. * should be 0.
  10227. */
  10228. typedef struct {
  10229. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
  10230. /** WMM Access category from 0 to 3 */
  10231. A_UINT32 wmm_ac;
  10232. /** User priority to use in trigger frames. It is the TID
  10233. * value. This field needs to be specified and may not be
  10234. * equivalent to AC since some implementation may use the TSPEC
  10235. * to enable UAPSD and negotiate a particular user priority. */
  10236. A_UINT32 user_priority;
  10237. /** service interval in ms */
  10238. A_UINT32 service_interval;
  10239. /** Suspend interval in ms */
  10240. A_UINT32 suspend_interval;
  10241. /** delay interval in ms */
  10242. A_UINT32 delay_interval;
  10243. } wmi_sta_uapsd_auto_trig_param;
  10244. typedef struct {
  10245. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
  10246. /** unique id identifying the VDEV, generated by the caller */
  10247. A_UINT32 vdev_id;
  10248. /** peer mac address */
  10249. wmi_mac_addr peer_macaddr;
  10250. /** Number of AC to specify */
  10251. A_UINT32 num_ac;
  10252. /*
  10253. * Following this struc is the TLV:
  10254. * wmi_sta_uapsd_auto_trig_param ac_param[]; <-- Variable number of AC parameters (defined by field num_ac)
  10255. */
  10256. } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
  10257. /** mimo powersave state */
  10258. #define WMI_PEER_MIMO_PS_STATE 0x1
  10259. /** enable/disable AMPDU . initial value (enabled) */
  10260. #define WMI_PEER_AMPDU 0x2
  10261. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  10262. #define WMI_PEER_AUTHORIZE 0x3
  10263. /** peer channel bandwidth */
  10264. #define WMI_PEER_CHWIDTH 0x4
  10265. /** peer NSS */
  10266. #define WMI_PEER_NSS 0x5
  10267. /** USE 4 ADDR */
  10268. #define WMI_PEER_USE_4ADDR 0x6
  10269. /* set group membership status */
  10270. #define WMI_PEER_MEMBERSHIP 0x7
  10271. #define WMI_PEER_USERPOS 0x8
  10272. /*
  10273. * A critical high-level protocol is being used with this peer. Target
  10274. * should take appropriate measures (if possible) to ensure more
  10275. * reliable link with minimal latency. This *may* include modifying the
  10276. * station power save policy, enabling more RX chains, increased
  10277. * priority of channel scheduling, etc.
  10278. *
  10279. * NOTE: This parameter should only be considered a hint as specific
  10280. * behavior will depend on many factors including current network load
  10281. * and vdev/peer configuration.
  10282. *
  10283. * For STA VDEV this peer corresponds to the AP's BSS peer.
  10284. * For AP VDEV this peer corresponds to the remote peer STA.
  10285. */
  10286. #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
  10287. /* set Tx failure count threshold for the peer - Currently unused */
  10288. #define WMI_PEER_TX_FAIL_CNT_THR 0xA
  10289. /* Enable H/W retry and Enable H/W Send CTS2S before Data */
  10290. #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
  10291. /* Set peer advertised IBSS atim window length */
  10292. #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
  10293. /** peer phy mode */
  10294. #define WMI_PEER_PHYMODE 0xD
  10295. /** Use FIXED Pwr */
  10296. #define WMI_PEER_USE_FIXED_PWR 0xE
  10297. /** Set peer fixed rate
  10298. * The top nibble is used to select which format to use for encoding
  10299. * the rate specification: 0xVXXXXXXX
  10300. * If V == 0b0000: format is same as before: 0x000000RR
  10301. * If V == 0b0001: format is: 0x1000RRRR.
  10302. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  10303. * The host shall use the new V1 format (and set V = 0x1) if the target
  10304. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  10305. * system is configured with Nss > 4 (either at compile time within the
  10306. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  10307. * by the target).
  10308. */
  10309. #define WMI_PEER_PARAM_FIXED_RATE 0xF
  10310. /** Whitelist peer TIDs */
  10311. #define WMI_PEER_SET_MU_WHITELIST 0x10
  10312. /** Set peer max tx rate (MCS) in adaptive rate ctrl */
  10313. #define WMI_PEER_SET_MAX_TX_RATE 0x11
  10314. /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
  10315. #define WMI_PEER_SET_MIN_TX_RATE 0x12
  10316. /**
  10317. * default ring routing for peer data packets,
  10318. * param_value = bit 0 for hash based routing enabled or not
  10319. * (value 1 is enabled, value 0 is disabled)
  10320. * bits 1:5 are for ring 32 (i.e. ring id value
  10321. * selected from 0 to 31 values)
  10322. * bit 8 for peer based ring selection enabled or not
  10323. * (value 1 is enabled, value 0 is disabled
  10324. * bits 9-15 are valid when bit 8 is set to 1)
  10325. * bit 9 is for ring selection enabled for filter-pass
  10326. * unicast or not (value 1 is enabled, value 0 is disabled)
  10327. * bit 10 is for ring selection enabled for filter-pass
  10328. * mcast or not (value 1 is enabled, value 0 is disabled)
  10329. * bit 11 is for ring selection enabled for filter-pass
  10330. * BAR or not (value 1 is enabled, value 0 is disabled)
  10331. * bit 12-13 is for source ring selection value
  10332. * (value 0 for wbm2rxdma buf ring,
  10333. * value 1 for fw2rxdma buf ring,
  10334. * value 2 for sw2rxdma buf ring,
  10335. * value 3 for no buf ring)
  10336. * bit 14-15 is for destination ring selection value
  10337. * (value 0 for wbm release ring,
  10338. * value 1 for rxdma2fw ring,
  10339. * value 2 for rxdma2sw ring,
  10340. * value 3 for rxdma2reo ring)
  10341. */
  10342. #define WMI_PEER_SET_DEFAULT_ROUTING 0x13
  10343. /* peer NSS for VHT160 - Extended NSS support */
  10344. #define WMI_PEER_NSS_VHT160 0x14
  10345. /* peer NSS for VHT160 - Extended NSS support */
  10346. #define WMI_PEER_NSS_VHT80_80 0x15
  10347. /* Peer SU TXBF sounding interval */
  10348. #define WMI_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL 0x16
  10349. /* Peer MU TXBF sounding interval */
  10350. #define WMI_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL 0x17
  10351. /* Peer TXBF sounding enable or disable */
  10352. #define WMI_PEER_PARAM_TXBF_SOUNDING_ENABLE 0x18
  10353. /* Per peer 11ax OFDMA enable or disable */
  10354. #define WMI_PEER_PARAM_OFDMA_ENABLE 0x19
  10355. /* Per peer 11ax/11ac MU enable or disable */
  10356. #define WMI_PEER_PARAM_MU_ENABLE 0x1a
  10357. /** Set peer fixed rate used in UL Trigger
  10358. * The top nibble is used to select which format to use for encoding
  10359. * the rate specification: 0xVXXXXXXX, V must be 1 for this parameter.
  10360. * If V == 0b0001: format is: 0x1000RRRR.
  10361. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  10362. *
  10363. * This parameter controls the UL OFDMA and UL MU-MIMO peer fixed rate.
  10364. */
  10365. #define WMI_PEER_PARAM_UL_FIXED_RATE 0x1b
  10366. /** send specific OMI to peer via QoS-null frame
  10367. * param_value = follow 11ax spec definition
  10368. * bit0:VHT(1), bit1:HE(1), bit2-31:A-Control
  10369. */
  10370. #define WMI_PEER_PARAM_XMIT_OMI 0x1c
  10371. #define WMI_PEER_RARAM_XMIT_OMI WMI_PEER_PARAM_XMIT_OMI /* alias due to prior typo */
  10372. /* Disable burst and assist */
  10373. #define WMI_PEER_PARAM_DISABLE_AGGRESSIVE_TX 0x1d
  10374. /* Enable 11r FT Roaming */
  10375. #define WMI_PEER_PARAM_ENABLE_FT 0x1e
  10376. /* update peer flag for ptk 4 way handshake */
  10377. #define WMI_PEER_PARAM_NEED_PTK_4_WAY 0x1f
  10378. /* update peer flag for gtk 2 way handshake */
  10379. #define WMI_PEER_PARAM_NEED_GTK_2_WAY 0x20
  10380. /* update peer flag for M4 sent */
  10381. #define WMI_PEER_PARAM_M4_SENT 0x21
  10382. /* Per peer MISC stats enable or disable */
  10383. #define WMI_PEER_PARAM_MISC_STATS_ENABLE 0x22
  10384. /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
  10385. #define WMI_PEER_MIMO_PS_NONE 0x0
  10386. #define WMI_PEER_MIMO_PS_STATIC 0x1
  10387. #define WMI_PEER_MIMO_PS_DYNAMIC 0x2
  10388. typedef struct {
  10389. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
  10390. /** unique id identifying the VDEV, generated by the caller */
  10391. A_UINT32 vdev_id;
  10392. /** peer MAC address */
  10393. wmi_mac_addr peer_macaddr;
  10394. /** parameter id */
  10395. A_UINT32 param_id;
  10396. /** parametr value */
  10397. A_UINT32 param_value;
  10398. } wmi_peer_set_param_cmd_fixed_param;
  10399. typedef union {
  10400. /*
  10401. * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
  10402. * by the target or a little-endian host.
  10403. * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
  10404. * macros on the A_UINT32 "value" field.
  10405. */
  10406. struct {
  10407. A_UINT16 mode; /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
  10408. A_UINT16 tx_rate; /* see per-mode specs below */
  10409. };
  10410. A_UINT32 value; /* for use by big-endian host */
  10411. } wmi_peer_max_min_tx_rate;
  10412. /*
  10413. * Any access to the mode/tx_rate in an big endian system should use
  10414. * the below Macros on the wmi_peer_max_min_tx_rate.value field.
  10415. */
  10416. #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
  10417. #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
  10418. #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
  10419. #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
  10420. /* CCK max/min tx Rate description
  10421. * tx_rate = 0: 1 Mbps
  10422. * tx_rate = 1: 2 Mbps
  10423. * tx_rate = 2: 5.5 Mbps
  10424. * tx_rate = 3: 11 Mbps
  10425. * tx_rate = else: invalid
  10426. */
  10427. enum {
  10428. WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */
  10429. WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */
  10430. WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */
  10431. WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */
  10432. WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
  10433. };
  10434. /* OFDM max/min tx Rate description
  10435. * tx_rate = 0: 6 Mbps
  10436. * tx_rate = 1: 9 Mbps
  10437. * tx_rate = 2: 12 Mbps
  10438. * tx_rate = 3: 18 Mbps
  10439. * tx_rate = 4: 24 Mbps
  10440. * tx_rate = 5: 32 Mbps
  10441. * tx_rate = 6: 48 Mbps
  10442. * tx_rate = 7: 54 Mbps
  10443. * tx_rate = else: invalid
  10444. */
  10445. enum {
  10446. WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */
  10447. WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */
  10448. WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */
  10449. WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */
  10450. WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */
  10451. WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */
  10452. WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */
  10453. WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */
  10454. WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
  10455. };
  10456. /* HT max/min tx rate description
  10457. * tx_rate = 0~7 : MCS Rate 0~7
  10458. * tx_rate=else : invalid.
  10459. */
  10460. #define WMI_MAX_HT_TX_MCS 0x07
  10461. /* VHT max/min tx rate description
  10462. * tx_rate = 0~9 : MCS Rate 0~9
  10463. * tx_rate=else : invalid.
  10464. */
  10465. #define WMI_MAX_VHT_TX_MCS 0x09
  10466. #define MAX_SUPPORTED_RATES 128
  10467. typedef struct {
  10468. /** total number of rates */
  10469. A_UINT32 num_rates;
  10470. /**
  10471. * rates (each 8bit value) packed into a 32 bit word.
  10472. * the rates are filled from least significant byte to most
  10473. * significant byte.
  10474. */
  10475. A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
  10476. } wmi_rate_set;
  10477. /* NOTE: It would bea good idea to represent the Tx MCS
  10478. * info in one word and Rx in another word. This is split
  10479. * into multiple words for convenience
  10480. */
  10481. typedef struct {
  10482. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
  10483. A_UINT32 rx_max_rate; /* Max Rx data rate */
  10484. A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
  10485. A_UINT32 tx_max_rate; /* Max Tx data rate */
  10486. /*
  10487. * bit [15:0] indicates MCS 0 to 9
  10488. * bit [23:16] indicates MCS 10 & 11
  10489. * bit [24] indicates whether MCS 10 & 11 is notified in bit [23:16]
  10490. */
  10491. A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
  10492. A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
  10493. } wmi_vht_rate_set;
  10494. /* NOTE: It would bea good idea to represent the Tx MCS
  10495. * info in one word and Rx in another word. This is split
  10496. * into multiple words for convenience
  10497. * currently this is being defined in IEEE802.11ax so this is same as wmi_vht_rate_set and is sub change in future and may include BW as well
  10498. */
  10499. typedef struct {
  10500. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_he_rate_set */
  10501. /* HE Supported MCS Set field Rx
  10502. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  10503. * value 0 - MCS 0-7 enabled for this NSS
  10504. * value 1 - MCS 0-9 enabled for this NSS
  10505. * value 2 - MCS 0-11 enabled for this NSS
  10506. * value 3 - NSS disabled
  10507. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  10508. */
  10509. A_UINT32 rx_mcs_set; /* Negotiated RX HE rates (i.e. rate this node can RX from peer)*/
  10510. /* HE Supported MCS Set field Tx
  10511. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  10512. * value 0 - MCS 0-7 enabled for this NSS
  10513. * value 1 - MCS 0-9 enabled for this NSS
  10514. * value 2 - MCS 0-11 enabled for this NSS
  10515. * value 3 - NSS disabled
  10516. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  10517. */
  10518. A_UINT32 tx_mcs_set; /* Negotiated TX HE rates(i.e. rate this node can TX to peer) */
  10519. } wmi_he_rate_set;
  10520. /*
  10521. * IMPORTANT: Make sure the bit definitions here are consistent
  10522. * with the ni_flags definitions in wlan_peer.h
  10523. */
  10524. #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
  10525. #define WMI_PEER_QOS 0x00000002 /* QoS enabled */
  10526. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
  10527. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
  10528. #define WMI_PEER_HE 0x00000400 /* HE Enabled */
  10529. #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
  10530. #define WMI_PEER_HT 0x00001000 /* HT enabled */
  10531. #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
  10532. #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
  10533. #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
  10534. #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
  10535. #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
  10536. #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
  10537. #define WMI_PEER_TWT_REQ 0x00400000 /* TWT Requester Support bit in Extended Capabilities element */
  10538. #define WMI_PEER_TWT_RESP 0x00800000 /* TWT Responder Support bit in Extended Capabilities element */
  10539. #define WMI_PEER_MULTI_BSSID 0x01000000 /* Multiple BSSID Support bit in Extended Capabilities element */
  10540. #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
  10541. #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
  10542. #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
  10543. /** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
  10544. #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
  10545. #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
  10546. #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
  10547. /**
  10548. * Peer rate capabilities.
  10549. *
  10550. * This is of interest to the ratecontrol
  10551. * module which resides in the firmware. The bit definitions are
  10552. * consistent with that defined in if_athrate.c.
  10553. *
  10554. * @todo
  10555. * Move this to a common header file later so there is no need to
  10556. * duplicate the definitions or maintain consistency.
  10557. */
  10558. #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
  10559. #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
  10560. #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  10561. #define WMI_RC_HT_FLAG 0x08 /* HT */
  10562. #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  10563. #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  10564. #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
  10565. #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  10566. #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  10567. #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  10568. #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
  10569. #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  10570. typedef struct {
  10571. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
  10572. /** peer MAC address */
  10573. wmi_mac_addr peer_macaddr;
  10574. /** VDEV id */
  10575. A_UINT32 vdev_id;
  10576. /** assoc = 1 reassoc = 0 */
  10577. A_UINT32 peer_new_assoc;
  10578. /** peer associd (16 bits) */
  10579. A_UINT32 peer_associd;
  10580. /** peer station flags: see definition above */
  10581. A_UINT32 peer_flags;
  10582. /** negotiated capabilities (lower 16 bits)*/
  10583. A_UINT32 peer_caps;
  10584. /** Listen interval */
  10585. A_UINT32 peer_listen_intval;
  10586. /** HT capabilties of the peer */
  10587. A_UINT32 peer_ht_caps;
  10588. /** maximum rx A-MPDU length */
  10589. A_UINT32 peer_max_mpdu;
  10590. /** mpdu density of the peer in usec(0 to 16) */
  10591. A_UINT32 peer_mpdu_density;
  10592. /** peer rate capabilties see flags above */
  10593. A_UINT32 peer_rate_caps;
  10594. /** num spatial streams */
  10595. A_UINT32 peer_nss;
  10596. /** VHT capabilties of the peer */
  10597. A_UINT32 peer_vht_caps;
  10598. /** phy mode */
  10599. A_UINT32 peer_phymode;
  10600. /** HT Operation Element of the peer. Five bytes packed in 2
  10601. * INT32 array and filled from lsb to msb.
  10602. * Note that the size of array peer_ht_info[] cannotbe changed
  10603. * without breaking WMI Compatibility. */
  10604. A_UINT32 peer_ht_info[2];
  10605. /** total number of negotiated legacy rate set. Also the sizeof
  10606. * peer_legacy_rates[] */
  10607. A_UINT32 num_peer_legacy_rates;
  10608. /** total number of negotiated ht rate set. Also the sizeof
  10609. * peer_ht_rates[] */
  10610. A_UINT32 num_peer_ht_rates;
  10611. /**
  10612. * Bitmap providing the mapping of bandwidths to max Rx NSS for this peer
  10613. * in VHT160 / VHT80+80 Mode.
  10614. * As per the New IEEE 802.11 Update, the AP & Peer could advertise and
  10615. * handshake with the Max Rx NSS differing for different bandwidths
  10616. * instead of a single max Rx NSS Value.
  10617. * Some QCA chipsets have to advertise a different max Rx NSS value for
  10618. * 160 MHz and 80MHz.
  10619. *
  10620. * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
  10621. * bit[5:3] : Represents value of Rx NSS for VHT 80_80 MHz -
  10622. * Extended NSS support
  10623. * bit[30:6]: Reserved
  10624. * bit[31] : MSB(0/1): 1 in case of valid data sent from Host
  10625. */
  10626. A_UINT32 peer_bw_rxnss_override;
  10627. /* 802.11ax capabilities */
  10628. wmi_ppe_threshold peer_ppet;
  10629. A_UINT32 peer_he_cap_info; /* protocol-defined HE / 11ax capability flags */
  10630. A_UINT32 peer_he_ops; /* HE operation contains BSS color */
  10631. A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
  10632. A_UINT32 peer_he_mcs; /* Indicates number of HE MCS TLV present */
  10633. /* 2nd DWORD of 11ax MAC Capabilities */
  10634. A_UINT32 peer_he_cap_info_ext;
  10635. /*
  10636. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  10637. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  10638. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  10639. * bit[4:3] : Indicates support for DL OFDMA
  10640. * Refer to enum WMI_HE_RX_DL_OFDMA_SUPPORT_x
  10641. * bit[6:5] : Indicates support for DL MU-MIMO
  10642. * Refer to enum WMI_HE_RX_DL_MUMIMO_SUPPORT_x
  10643. * bit[31:7] : Reserved
  10644. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  10645. */
  10646. A_UINT32 peer_he_cap_info_internal;
  10647. /* min data rate to be used in Mbps */
  10648. A_UINT32 min_data_rate;
  10649. /* Following this struct are the TLV's:
  10650. * A_UINT8 peer_legacy_rates[];
  10651. * A_UINT8 peer_ht_rates[];
  10652. * wmi_vht_rate_set peer_vht_rates; <-- VHT capabilties of the peer
  10653. * WMI_he_rate_set_peer_he_rates; <-- HE capabilities of the peer
  10654. */
  10655. } wmi_peer_assoc_complete_cmd_fixed_param;
  10656. /* WDS Entry Flags */
  10657. #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
  10658. typedef struct {
  10659. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
  10660. /** peer MAC address */
  10661. wmi_mac_addr peer_macaddr;
  10662. /** wds MAC addr */
  10663. wmi_mac_addr wds_macaddr;
  10664. /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
  10665. A_UINT32 flags;
  10666. A_UINT32 vdev_id;
  10667. } wmi_peer_add_wds_entry_cmd_fixed_param;
  10668. #define WMI_CHAN_INFO_START_RESP 0
  10669. #define WMI_CHAN_INFO_END_RESP 1
  10670. /* deprecated but maintained as aliases: old names containing typo */
  10671. #define WMI_CHAN_InFO_START_RESP WMI_CHAN_INFO_START_RESP
  10672. #define WMI_CHAN_InFO_END_RESP WMI_CHAN_INFO_END_RESP
  10673. typedef struct {
  10674. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
  10675. /** wds MAC addr */
  10676. wmi_mac_addr wds_macaddr;
  10677. A_UINT32 vdev_id;
  10678. } wmi_peer_remove_wds_entry_cmd_fixed_param;
  10679. typedef struct {
  10680. /** peer MAC address */
  10681. wmi_mac_addr peer_macaddr;
  10682. } wmi_peer_q_empty_callback_event;
  10683. /*
  10684. * Command to update an already existing WDS entry. Different address setting
  10685. * combinations are possible.
  10686. *
  10687. * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
  10688. * Valid wds and null peer -> Associated WDS entry flags will be updated.
  10689. * Null wds and Valid peer -> Flags will be updated for all WDS entries behind the peer.
  10690. * Null wds and peer -> Flags will be updated for all WDS entries.
  10691. */
  10692. typedef struct {
  10693. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param */
  10694. /** peer MAC address */
  10695. wmi_mac_addr peer_macaddr;
  10696. /** wds MAC addr */
  10697. wmi_mac_addr wds_macaddr;
  10698. /* Flags associated with WDS entry */
  10699. A_UINT32 flags;
  10700. A_UINT32 vdev_id;
  10701. } wmi_peer_update_wds_entry_cmd_fixed_param;
  10702. /**
  10703. * Channel info WMI event
  10704. */
  10705. typedef struct {
  10706. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
  10707. /** Error code */
  10708. A_UINT32 err_code;
  10709. /** Channel freq */
  10710. A_UINT32 freq;
  10711. /** Read flags */
  10712. A_UINT32 cmd_flags;
  10713. /** Noise Floor value */
  10714. A_UINT32 noise_floor;
  10715. /** rx clear count */
  10716. A_UINT32 rx_clear_count;
  10717. /** cycle count */
  10718. A_UINT32 cycle_count;
  10719. /** channel tx power per range in 0.5dBm steps */
  10720. A_UINT32 chan_tx_pwr_range;
  10721. /** channel tx power per throughput */
  10722. A_UINT32 chan_tx_pwr_tp;
  10723. /** rx frame count (cumulative) */
  10724. A_UINT32 rx_frame_count;
  10725. /** BSS rx cycle count */
  10726. A_UINT32 my_bss_rx_cycle_count;
  10727. /** b-mode data rx time (units are microseconds) */
  10728. A_UINT32 rx_11b_mode_data_duration;
  10729. /** tx frame count */
  10730. A_UINT32 tx_frame_cnt;
  10731. /** mac clock */
  10732. A_UINT32 mac_clk_mhz;
  10733. /** unique id identifying the VDEV */
  10734. A_UINT32 vdev_id;
  10735. } wmi_chan_info_event_fixed_param;
  10736. /**
  10737. * Non wlan interference event
  10738. */
  10739. typedef struct {
  10740. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_cw_int */
  10741. A_UINT32 channel; /* either number or freq in mhz*/
  10742. } wlan_dcs_cw_int;
  10743. #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
  10744. /**
  10745. * wlan_dcs_im_tgt_stats
  10746. *
  10747. */
  10748. typedef struct _wlan_dcs_im_tgt_stats {
  10749. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t */
  10750. /** current running TSF from the TSF-1 */
  10751. A_UINT32 reg_tsf32;
  10752. /** Known last frame rssi, in case of multiple stations, if
  10753. * and at different ranges, this would not gaurantee that
  10754. * this is the least rssi.
  10755. */
  10756. A_UINT32 last_ack_rssi;
  10757. /** Sum of all the failed durations in the last one second interval.
  10758. */
  10759. A_UINT32 tx_waste_time;
  10760. /** count how many times the hal_rxerr_phy is marked, in this
  10761. * time period
  10762. */
  10763. A_UINT32 rx_time;
  10764. A_UINT32 phyerr_cnt;
  10765. /**
  10766. * WLAN IM stats from target to host
  10767. *
  10768. * Below statistics are sent from target to host periodically.
  10769. * These are collected at target as long as target is running
  10770. * and target chip is not in sleep.
  10771. *
  10772. */
  10773. /** listen time from ANI */
  10774. A_INT32 listen_time;
  10775. /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
  10776. A_UINT32 reg_tx_frame_cnt;
  10777. /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
  10778. A_UINT32 reg_rx_frame_cnt;
  10779. /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
  10780. A_UINT32 reg_rxclr_cnt;
  10781. /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
  10782. A_UINT32 reg_cycle_cnt; /* delta cycle count */
  10783. /** extenstion channel rx clear count */
  10784. A_UINT32 reg_rxclr_ext_cnt;
  10785. /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
  10786. A_UINT32 reg_ofdm_phyerr_cnt;
  10787. /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
  10788. A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
  10789. /** Channel noise floor (units are dBm) */
  10790. A_INT32 chan_nf;
  10791. /** BSS rx cycle count */
  10792. A_UINT32 my_bss_rx_cycle_count;
  10793. } wlan_dcs_im_tgt_stats_t;
  10794. /**
  10795. * wmi_dcs_interference_event_t
  10796. *
  10797. * Right now this is event and stats together. Partly this is
  10798. * because cw interference is handled in target now. This
  10799. * can be done at host itself, if we can carry the NF alone
  10800. * as a stats event. In future this would be done and this
  10801. * event would carry only stats.
  10802. */
  10803. typedef struct {
  10804. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
  10805. /**
  10806. * Type of the event present, either the cw interference event, or the wlan_im stats
  10807. */
  10808. A_UINT32 interference_type; /* type of interference, wlan or cw */
  10809. /** pdev_id for identifying the MAC
  10810. * See macros starting with WMI_PDEV_ID_ for values.
  10811. */
  10812. A_UINT32 pdev_id;
  10813. /*
  10814. * Following this struct are these TLVs. Note that they are both array of structures
  10815. * but can have at most one element. Which TLV is empty or has one element depends
  10816. * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
  10817. * elements (not arrays). union { wlan_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event;
  10818. *
  10819. * wlan_dcs_cw_int cw_int[]; <-- cw_interference event
  10820. * wlan_dcs_im_tgt_stats_t wlan_stat[]; <-- wlan im interfernce stats
  10821. */
  10822. } wmi_dcs_interference_event_fixed_param;
  10823. enum wmi_peer_mcast_group_action {
  10824. wmi_peer_mcast_group_action_add = 0,
  10825. wmi_peer_mcast_group_action_del = 1
  10826. };
  10827. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
  10828. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
  10829. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
  10830. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
  10831. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 /* flag to exclude an ip while filtering. set to exclude */
  10832. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
  10833. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 /* flag to say ipv4/ipv6. Will be set for ipv6 */
  10834. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
  10835. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 /* delete all mcast table entries. */
  10836. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
  10837. /* multicast group membership commands */
  10838. /* TODO: Converting this will be tricky since it uses an union.
  10839. Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
  10840. typedef struct {
  10841. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
  10842. A_UINT32 flags;
  10843. wmi_mac_addr ucast_mac_addr;
  10844. /* in network byte order */
  10845. /* for ipv4, bytes (12-15) should contain ip address and other lower bytes 0. ipv6 should have all bytes valid */
  10846. A_UINT8 mcast_ip_addr[16];
  10847. /* for ipv6, all 16 bytes has to be valid; for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s */
  10848. A_UINT8 mcast_ip_mask[16];/* zero out lower bytes if ipv4*/
  10849. /* number of address filters - irrespective of ipv4/ipv6 addresses */
  10850. A_UINT32 num_filter_addr;
  10851. /* this array should contain the src IPs that are to be filtered during find
  10852. The array should be packed.
  10853. If there are 2 ipv4 addresses, there should be 8 bytes and rest all 0s */
  10854. A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
  10855. A_UINT8 vdev_id; /* vdev of this mcast group */
  10856. } wmi_peer_mcast_group_cmd_fixed_param;
  10857. /** Offload Scan and Roaming related commands */
  10858. /** The FW performs 2 different kinds of offload scans independent
  10859. * of host. One is Roam scan which is primarily performed on a
  10860. * station VDEV after association to look for a better AP that
  10861. * the station VDEV can roam to. The second scan is connect scan
  10862. * which is mainly performed when the station is not associated
  10863. * and to look for a matching AP profile from a list of
  10864. * configured profiles. */
  10865. /* flags for roam_scan_mode_cmd
  10866. * indicate the status (success/fail) of wmi_roam_scan_mode cmd through WMI_ROAM_EVENTID */
  10867. #define WMI_ROAM_SCAN_MODE_FLAG_REPORT_STATUS 0x1
  10868. /**
  10869. * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
  10870. * the roam scan mode is one of the periodic, rssi change, both, none.
  10871. * None : Disable Roam scan. No Roam scan at all.
  10872. * Periodic : Scan periodically with a configurable period.
  10873. * Rssi change : Scan when ever rssi to current AP changes by the threshold value
  10874. * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
  10875. * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
  10876. *
  10877. */
  10878. typedef struct {
  10879. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
  10880. A_UINT32 roam_scan_mode;
  10881. A_UINT32 vdev_id;
  10882. A_UINT32 flags; /* see WMI_ROAM_SCAN_MODE_FLAG defs */
  10883. /*
  10884. * Minimum duration allowed between two consecutive roam scans.
  10885. * Roam scan is not allowed, if duration between two consecutive
  10886. * roam scans is less than this time.
  10887. */
  10888. A_UINT32 min_delay_btw_scans; /* In msec */
  10889. /*
  10890. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  10891. * positions) showing for which roam_trigger_reasons the
  10892. * min_delay_btw_scans constraint should be applied.
  10893. * 0x0 means there is no time restrictions between successive roam scans.
  10894. */
  10895. A_UINT32 min_delay_roam_trigger_reason_bitmask;
  10896. } wmi_roam_scan_mode_fixed_param;
  10897. #define WMI_ROAM_SCAN_MODE_NONE 0x0
  10898. #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
  10899. #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
  10900. #define WMI_ROAM_SCAN_MODE_BOTH 0x3
  10901. /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
  10902. #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
  10903. typedef struct {
  10904. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
  10905. A_UINT32 vdev_id;
  10906. A_UINT32 command_arg;
  10907. } wmi_roam_scan_cmd_fixed_param;
  10908. #define WMI_ROAM_SCAN_STOP_CMD 0x1
  10909. /**
  10910. * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
  10911. * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
  10912. * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
  10913. */
  10914. typedef struct {
  10915. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
  10916. /** unique id identifying the VDEV, generated by the caller */
  10917. A_UINT32 vdev_id;
  10918. /** roam scan rssi threshold */
  10919. A_UINT32 roam_scan_rssi_thresh;
  10920. /** When using Hw generated beacon RSSI interrupts */
  10921. A_UINT32 roam_rssi_thresh_diff;
  10922. /** 5G scan max count */
  10923. A_UINT32 hirssi_scan_max_count;
  10924. /** 5G scan rssi change threshold value */
  10925. A_UINT32 hirssi_scan_delta;
  10926. /** 5G scan upper bound */
  10927. A_UINT32 hirssi_upper_bound;
  10928. /** roam scan rssi threshold for 5G band.
  10929. * offset from roam_scan_rssi_thres, in dB units
  10930. */
  10931. A_INT32 rssi_thresh_offset_5g;
  10932. /* The TLVs will follow.
  10933. * wmi_roam_scan_extended_threshold_param extended_param;
  10934. * wmi_roam_earlystop_rssi_thres_param earlystop_param;
  10935. * wmi_roam_dense_thres_param dense_param;
  10936. * wmi_roam_bg_scan_roaming_param bg_scan_param;
  10937. */
  10938. } wmi_roam_scan_rssi_threshold_fixed_param;
  10939. /**
  10940. * WMI_ROAM_BTM_CONFIG_CMDID : set BTM (BSS Transition Management. 802.11v) offload config
  10941. * Applicable only when WMI_ROAM_SCAN_MODE is enabled with WMI_ROAM_SCAN_MODE_ROAMOFFLOAD
  10942. */
  10943. /**
  10944. * btm_config.flags
  10945. * BIT 0 : Enable/Disable the BTM offload.
  10946. * BIT 1-2 : Action on non matching candidate with cache. Used WMI_ROAM_BTM_OFLD_NON_MATCHING_CND_XXX
  10947. * BIT 3-5 : Roaming handoff decisions. Use WMI_ROAM_BTM_OFLD_CNDS_MATCH_XXX
  10948. * BIT 6 : Enable/Disable solicited BTM
  10949. * BIT 7 : Roam BTM candidates based on the roam score instead of BTM preferred value
  10950. * BIT 8 : BTM query preference over 11k neighbor report request
  10951. * BIT 9-31 : Reserved
  10952. */
  10953. #define WMI_ROAM_BTM_SET_ENABLE(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  10954. #define WMI_ROAM_BTM_GET_ENABLE(flags) WMI_GET_BITS(flags, 0, 1)
  10955. #define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val) WMI_SET_BITS(flags, 1, 2, val)
  10956. #define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags) WMI_GET_BITS(flags, 1, 2)
  10957. #define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val) WMI_SET_BITS(flags, 3, 3, val)
  10958. #define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags) WMI_GET_BITS(flags, 3, 3)
  10959. #define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val) WMI_SET_BITS(flags, 6, 1, val)
  10960. #define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags) WMI_GET_BITS(flags, 6, 1)
  10961. #define WMI_ROAM_BTM_SET_CNDS_SELECT_BASED_ON_SCORE(flags, val) WMI_SET_BITS(flags, 7, 1, val)
  10962. #define WMI_ROAM_BTM_GET_CNDS_SELECT_BASED_ON_SCORE(flags) WMI_GET_BITS(flags, 7, 1)
  10963. #define WMI_ROAM_BTM_SET_BTM_QUERY_PREFERENCE_OVER_11K(flags, val) WMI_SET_BITS(flags, 8, 1, val)
  10964. #define WMI_ROAM_BTM_GET_BTM_QUERY_PREFERENCE_OVER_11K(flags) WMI_GET_BITS(flags, 8, 1)
  10965. #define WMI_ROAM_BTM_SET_BTM_QUERY_WITH_CANDIDATE_LIST(flags, val) WMI_SET_BITS(flags, 9, 1, val)
  10966. #define WMI_ROAM_BTM_GET_BTM_QUERY_WITH_CANDIDATE_LIST(flags) WMI_GET_BITS(flags, 9, 1)
  10967. /** WMI_ROAM_BTM_SET_NON_MATCHING_CNDS_ACTION definition: When BTM candidate is not matched with cache by WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION, determine what to do */
  10968. #define WMI_ROAM_BTM_NON_MATCHING_CNDS_SCAN_CONSUME 0 /** Invoke roam scan and consume within firmware. Applicable only when ROAM_SCAN_MODE is enabled. If ROAM_SCAN_MODE is disabled, firmware won't scan and forward it to host */
  10969. #define WMI_ROAM_BTM_NON_MATCHING_CNDS_NO_SCAN_FORWARD 1 /** Does not allow roam scan and forward BTM frame to host */
  10970. /** reserved upto 3 */
  10971. /** WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION definition: This is used to invoke WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION when compared with cache. i.e this condition is not applied with fresh scan result */
  10972. #define WMI_ROAM_BTM_CNDS_MATCH_EXACT 0 /** Exactly matched with roam candidate list to BTM candidates */
  10973. #define WMI_ROAM_BTM_CNDS_MATCH_AT_LEAST_TOP 1 /** At least one or more top priority bssid matched */
  10974. /** reserved upto 7 */
  10975. typedef struct {
  10976. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_btm_config_fixed_param */
  10977. A_UINT32 tlv_header;
  10978. /** unique id identifying the VDEV on which BTM is enabled/disabled */
  10979. A_UINT32 vdev_id;
  10980. /** BTM configuration control flags */
  10981. A_UINT32 flags;
  10982. /* BTM query timeout, unit: milliseconds
  10983. * valid value range: 1-10000,
  10984. * default value: 100 will be set if invalid value is given
  10985. */
  10986. A_UINT32 solicited_timeout_ms;
  10987. /* Maximum attempt of solicited BTM
  10988. * If continuous failure reach to this value, solicited BTM to current
  10989. * ESS will be disabled.
  10990. * valid value range: 1 - (2^32-1). (2^32)-1 means sending forever
  10991. * Default value: 3 will be set if invalid value is given
  10992. */
  10993. A_UINT32 max_attempt_cnt;
  10994. /* Time to stick to current AP after BTM, unit: seconds
  10995. * valid value range: 0 -(2^16-1).
  10996. * Either 0 or (2^16)-1 means stick to AP forever.
  10997. * Default value: 300 will be set if invalid value is given
  10998. */
  10999. A_UINT32 stick_time_seconds;
  11000. /* Disassoc time threshold in milliseconds
  11001. * This time threshold allows the target to judge whether the STA
  11002. * should can move to another AP immediately, or if the STA has time
  11003. * to calculate roaming candidates.
  11004. * If the disassoc_timer_threshold value is 0x0, the field should be
  11005. * disregarded.
  11006. */
  11007. A_UINT32 disassoc_timer_threshold;
  11008. /*
  11009. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  11010. * positions) showing for which roam_trigger_reasons the
  11011. * btm query needs to be sent.
  11012. * If roam trigger reasons are unspecified, btm_bitmap will be 0x0.
  11013. */
  11014. A_UINT32 btm_bitmap;
  11015. /*
  11016. * Consider AP as roam candidate only if AP score is better than
  11017. * btm_candidate_min_score for BTM roam trigger
  11018. */
  11019. A_UINT32 btm_candidate_min_score;
  11020. } wmi_btm_config_fixed_param;
  11021. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
  11022. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
  11023. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
  11024. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
  11025. typedef struct {
  11026. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
  11027. A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
  11028. A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
  11029. A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  11030. A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
  11031. A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  11032. A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
  11033. A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
  11034. A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
  11035. A_UINT32 good_rssi_threshold; /** RSSI below which roam is kicked in by background scan, although rssi is still good */
  11036. } wmi_roam_scan_extended_threshold_param;
  11037. /**
  11038. * WMI_ROAM_SCAN_PERIOD: period for roam scan.
  11039. * Applicable when the scan mode is Periodic or both.
  11040. */
  11041. typedef struct {
  11042. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
  11043. /** unique id identifying the VDEV, generated by the caller */
  11044. A_UINT32 vdev_id;
  11045. /** roam scan period value */
  11046. A_UINT32 roam_scan_period; /* units = milliseconds */
  11047. /** Aging for Roam scans */
  11048. A_UINT32 roam_scan_age;
  11049. /** Inactivity monitoring time to consider device is in inactive state with data count is less than roam_inactive_count */
  11050. A_UINT32 inactivity_time_period; /* units = milliseconds */
  11051. /** Maximum allowed data packets count during inactivity_time_period */
  11052. A_UINT32 roam_inactive_count;
  11053. /** New roam scan period after device is in inactivity state */
  11054. A_UINT32 roam_scan_period_after_inactivity; /* units = milliseconds */
  11055. /** roam full scan period value */
  11056. A_UINT32 roam_full_scan_period; /* units = milliseconds */
  11057. } wmi_roam_scan_period_fixed_param;
  11058. /**
  11059. * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
  11060. * Rssi change threshold used when mode is Rssi change (or) Both.
  11061. * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
  11062. * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
  11063. */
  11064. typedef struct {
  11065. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
  11066. /** unique id identifying the VDEV, generated by the caller */
  11067. A_UINT32 vdev_id;
  11068. /** roam scan rssi change threshold value */
  11069. A_UINT32 roam_scan_rssi_change_thresh;
  11070. /** When using Hw generated beacon RSSI interrupts */
  11071. A_UINT32 bcn_rssi_weight;
  11072. /** Minimum delay between two 5G scans */
  11073. A_UINT32 hirssi_delay_btw_scans;
  11074. } wmi_roam_scan_rssi_change_threshold_fixed_param;
  11075. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
  11076. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
  11077. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
  11078. /**
  11079. * TLV for roaming channel list
  11080. */
  11081. typedef struct {
  11082. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
  11083. /** unique id identifying the VDEV, generated by the caller */
  11084. A_UINT32 vdev_id;
  11085. /** WMI_CHAN_LIST_TAG */
  11086. A_UINT32 chan_list_type;
  11087. /** # if channels to scan */
  11088. A_UINT32 num_chan;
  11089. /**
  11090. * TLV (tag length value) parameters follow the wmi_roam_chan_list
  11091. * structure. The TLV's are:
  11092. * A_UINT32 channel_list[]; // in MHz
  11093. **/
  11094. } wmi_roam_chan_list_fixed_param;
  11095. /** Authentication modes */
  11096. enum {
  11097. WMI_AUTH_NONE, /* no upper level auth */
  11098. WMI_AUTH_OPEN, /* open */
  11099. WMI_AUTH_SHARED, /* shared-key */
  11100. WMI_AUTH_8021X, /* 802.1x */
  11101. WMI_AUTH_AUTO, /* Auto */
  11102. WMI_AUTH_WPA, /* WPA */
  11103. WMI_AUTH_RSNA, /* WPA2/RSNA */
  11104. WMI_AUTH_CCKM, /* CCKM */
  11105. WMI_AUTH_WAPI, /* WAPI */
  11106. WMI_AUTH_AUTO_PSK,
  11107. WMI_AUTH_WPA_PSK,
  11108. WMI_AUTH_RSNA_PSK,
  11109. WMI_AUTH_WAPI_PSK,
  11110. WMI_AUTH_FT_RSNA, /* 11r FT */
  11111. WMI_AUTH_FT_RSNA_PSK,
  11112. WMI_AUTH_RSNA_PSK_SHA256,
  11113. WMI_AUTH_RSNA_8021X_SHA256,
  11114. WMI_AUTH_CCKM_WPA,
  11115. WMI_AUTH_CCKM_RSNA,
  11116. WMI_AUTH_RSNA_FILS_SHA256,
  11117. WMI_AUTH_RSNA_FILS_SHA384,
  11118. WMI_AUTH_RSNA_SUITE_B_8021X_SHA256,
  11119. WMI_AUTH_RSNA_SUITE_B_8021X_SHA384,
  11120. WMI_AUTH_FT_RSNA_SAE,
  11121. WMI_AUTH_FT_RSNA_SUITE_B_8021X_SHA384,
  11122. WMI_AUTH_FT_RSNA_FILS_SHA256,
  11123. WMI_AUTH_FT_RSNA_FILS_SHA384,
  11124. WMI_AUTH_WPA3_SAE,
  11125. WMI_AUTH_WPA3_OWE,
  11126. };
  11127. typedef enum {
  11128. WMI_SCAN_CLIENT_NLO = 0x1, /* 1 */
  11129. WMI_SCAN_CLIENT_EXTSCAN, /* 2 */
  11130. WMI_SCAN_CLIENT_ROAM, /* 3 */
  11131. WMI_SCAN_CLIENT_P2P, /* 4 */
  11132. WMI_SCAN_CLIENT_LPI, /* 5 */
  11133. WMI_SCAN_CLIENT_NAN, /* 6 */
  11134. WMI_SCAN_CLIENT_ANQP, /* 7 */
  11135. WMI_SCAN_CLIENT_OBSS, /* 8 */
  11136. WMI_SCAN_CLIENT_PLM, /* 9 */
  11137. WMI_SCAN_CLIENT_HOST, /* 10 */
  11138. } WMI_SCAN_CLIENT_ID;
  11139. typedef struct {
  11140. /** authentication mode (defined above) */
  11141. A_UINT32 rsn_authmode;
  11142. /** unicast cipher set */
  11143. A_UINT32 rsn_ucastcipherset;
  11144. /** mcast/group cipher set */
  11145. A_UINT32 rsn_mcastcipherset;
  11146. /** mcast/group management frames cipher set */
  11147. A_UINT32 rsn_mcastmgmtcipherset;
  11148. } wmi_rsn_params;
  11149. /** looking for a wps enabled AP */
  11150. #define WMI_AP_PROFILE_FLAG_WPS 0x1
  11151. /** looking for a secure AP */
  11152. #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
  11153. /** looking for a PMF enabled AP */
  11154. #define WMI_AP_PROFILE_FLAG_PMF 0x4
  11155. /* the value used in wmi_roam_cnd_scoring_param->disable_bitmap */
  11156. #define WLAN_ROAM_SCORING_RSSI_DISABLE 0x00000001
  11157. #define WLAN_ROAM_SCORING_HT_DISABLE 0x00000002
  11158. #define WLAN_ROAM_SCORING_VHT_DISABLE 0x00000004
  11159. #define WLAN_ROAM_SCORING_BW_DISABLE 0x00000008
  11160. #define WLAN_ROAM_SCORING_BAND_DISABLE 0x00000010
  11161. #define WLAN_ROAM_SCORING_NSS_DISABLE 0x00000020
  11162. #define WLAN_ROAM_SCORING_CHAN_CONGESTION_DISABLE 0x00000040
  11163. #define WLAN_ROAM_SCORING_BEAMFORMING_DISABLE 0x00000080
  11164. #define WLAN_ROAM_SCORING_PCL_DISABLE 0x00000100
  11165. #define WLAN_ROAM_SCORING_HE_DISABLE 0x00000200
  11166. #define WLAN_ROAM_SCORING_OCE_WAN_DISABLE 0x00000400
  11167. #define WLAN_ROAM_SCORING_DISABLE_ALL 0xFFFFFFFF
  11168. #define WLAN_ROAM_SCORING_DEFAULT_PARAM_ALLOW 0x0
  11169. #define WLAN_ROAM_MAX_SELECTION_SCORE 10000
  11170. #define WLAN_ROAM_SCORE_20MHZ_BW_INDEX 0
  11171. #define WLAN_ROAM_SCORE_40MHZ_BW_INDEX 1
  11172. #define WLAN_ROAM_SCORE_80MHZ_BW_INDEX 2
  11173. #define WLAN_ROAM_SCORE_160MHZ_BW_INDEX 3
  11174. #define WLAN_ROAM_SCORE_MAX_BW_INDEX 4
  11175. #define WMI_ROAM_GET_BW_SCORE_PERCENTAGE(value32, bw_index) WMI_GET_BITS(value32, (8 * (bw_index)), 8)
  11176. #define WMI_ROAM_SET_BW_SCORE_PERCENTAGE(value32, score_pcnt, bw_index) WMI_SET_BITS(value32, (8 * (bw_index)), 8, score_pcnt)
  11177. #define WLAN_ROAM_SCORE_NSS_1x1_INDEX 0
  11178. #define WLAN_ROAM_SCORE_NSS_2x2_INDEX 1
  11179. #define WLAN_ROAM_SCORE_NSS_3x3_INDEX 2
  11180. #define WLAN_ROAM_SCORE_NSS_4x4_INDEX 3
  11181. #define WLAN_ROAM_SCORE_MAX_NSS_INDEX 4
  11182. #define WMI_ROAM_GET_NSS_SCORE_PERCENTAGE(value32, nss_index) WMI_GET_BITS(value32, (8 * (nss_index)), 8)
  11183. #define WMI_ROAM_SET_NSS_SCORE_PERCENTAGE(value32, score_pcnt, nss_index) WMI_SET_BITS(value32, (8 * (nss_index)), 8, score_pcnt)
  11184. #define WLAN_ROAM_SCORE_BAND_2G_INDEX 0
  11185. #define WLAN_ROAM_SCORE_BAND_5G_INDEX 1
  11186. /* 2 and 3 are reserved */
  11187. #define WLAN_ROAM_SCORE_MAX_BAND_INDEX 4
  11188. #define WMI_ROAM_GET_BAND_SCORE_PERCENTAGE(value32, band_index) WMI_GET_BITS(value32, (8 * (band_index)), 8)
  11189. #define WMI_ROAM_SET_BAND_SCORE_PERCENTAGE(value32, score_pcnt, band_index) WMI_SET_BITS(value32, (8 * (band_index)), 8, score_pcnt)
  11190. #define WLAN_ROAM_SCORE_MAX_CHAN_CONGESTION_SLOT 16
  11191. #define WLAN_ROAM_SCORE_DEFAULT_CONGESTION_SLOT 0
  11192. #define WLAN_ROAM_SCORE_MAX_OCE_WAN_SLOT 16
  11193. #define WLAN_ROAM_SCORE_DEFAULT_OCE_WAN_SLOT 0
  11194. /**
  11195. best_rssi_threshold: Roamable AP RSSI equal or better than this threshold, full rssi score 100. Units in dBm.
  11196. good_rssi_threshold: Below this threshold, scoring linear percentage between rssi_good_pcnt and 100. Units in dBm.
  11197. bad_rssi_threshold: Between good and bad rssi threshold, scoring linear percentage between rssi_bad_pcnt and rssi_good_pcnt. Units in dBm.
  11198. good_rssi_pcnt: Used to assigned scoring percentage of each slot between best to good rssi threshold. Units in percentage.
  11199. bad_rssi_pcnt: Used to assigned scoring percentage of each slot between good to bad rssi threshold. Units in percentage.
  11200. good_bucket_size : bucket size of slot in good zone. Units in dB.
  11201. bad_bucket_size : bucket size of slot in bad zone. Units in dB.
  11202. rssi_pref_5g_rssi_thresh: Below rssi threshold, 5G AP have given preference of band percentage. Units in dBm.
  11203. */
  11204. /**
  11205. The graph below explains how RSSI scoring percentage is calculated
  11206. as the RSSI improves. In the graph, the derived parameters good_buckets
  11207. and bad_buckets are used. These derived parameters are related to the
  11208. specified parameters as follows:
  11209. good_buckets =
  11210. (best_rssi_threshold - good_rssi_threshold) / good_bucket_size
  11211. bad_buckets =
  11212. (good_rssi_threshold - bad_rssi_threshold) / bad_bucket_size
  11213. | (x0,y0) (x0 = best_rssi, y0 = 100)
  11214. p 100 |-------o
  11215. e | |<--------- (100 - good_rssi_pct)/good_buckets
  11216. r | |___ ,---- good_bucket_size
  11217. c | | |
  11218. e | |_V_
  11219. n | |
  11220. t | |___o (x1,y1) (x1 = good_rssi, y1 = good_rssi_pcnt)
  11221. 80 | |
  11222. % | |<------ (good_rssi_pcnt - bad_rssi_pcnt)/bad_buckets
  11223. | |_____
  11224. | | ,-- bad_bucket_size
  11225. | | |
  11226. | |__v__
  11227. | |
  11228. | |
  11229. 40 | o------------
  11230. | (x2,y2) (x2 = bad_rssi, y2 = bad_rssi_pcnt)
  11231. +------o------------o-----------o------------->
  11232. -50 -70 -80 rssi dBm
  11233. | excellent | good | bad | poor
  11234. | zone | zone | zone | zone
  11235. V V V
  11236. BEST_THRES GOOD_THRES BAD_THRES
  11237. */
  11238. typedef struct {
  11239. A_INT32 best_rssi_threshold;
  11240. A_INT32 good_rssi_threshold;
  11241. A_INT32 bad_rssi_threshold;
  11242. A_UINT32 good_rssi_pcnt;
  11243. A_UINT32 bad_rssi_pcnt;
  11244. A_UINT32 good_bucket_size;
  11245. A_UINT32 bad_bucket_size;
  11246. A_INT32 rssi_pref_5g_rssi_thresh;
  11247. } wmi_roam_cnd_rssi_scoring;
  11248. /**
  11249. Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the value respectively.
  11250. BITS 0-7 :- It contains scoring percentage of 20MHz BW
  11251. BITS 8-15 :- It contains scoring percentage of 40MHz BW
  11252. BITS 16-23 :- It contains scoring percentage of 80MHz BW
  11253. BITS 24-31 :- It contains scoring percentage of 1600MHz BW
  11254. The value of each index must be 0-100
  11255. */
  11256. typedef struct {
  11257. A_UINT32 score_pcnt;
  11258. } wmi_roam_cnd_bw_scoring;
  11259. /**
  11260. Use macro WMI_ROAM_CND_GET/SET_BAND_SCORE_PERCENTAGE to get and set the value respectively.
  11261. BITS 0-7 :- It contains scoring percentage of 2G
  11262. BITS 8-15 :- It contains scoring percentage of 5G
  11263. BITS 16-23 :- reserved
  11264. BITS 24-31 :- reserved
  11265. The value of each index must be 0-100
  11266. */
  11267. typedef struct {
  11268. A_UINT32 score_pcnt;
  11269. } wmi_roam_cnd_band_scoring;
  11270. /**
  11271. Use macro WMI_ROAM_CND_GET/SET_NSS_SCORE_PERCENTAGE to get and set the value respectively.
  11272. BITS 0-7 :- It contains scoring percentage of 1x1
  11273. BITS 8-15 :- It contains scoring percentage of 2x2
  11274. BITS 16-23 :- It contains scoring percentage of 3x3
  11275. BITS 24-31 :- It contains scoring percentage of 4x4
  11276. The value of each index must be 0-100
  11277. */
  11278. typedef struct {
  11279. A_UINT32 score_pcnt;
  11280. } wmi_roam_cnd_nss_scoring;
  11281. /**
  11282. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  11283. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  11284. BITS 8-15 :- SLOT_1
  11285. BITS 16-23 :- SLOT_2
  11286. BITS 24-31 :- SLOT_3
  11287. BITS 32- ...
  11288. num_slot will equally divide 100. e.g, if num_slot = 4
  11289. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  11290. */
  11291. typedef struct {
  11292. A_UINT32 num_slot; /* max 15 */
  11293. A_UINT32 score_pcnt3_to_0;
  11294. A_UINT32 score_pcnt7_to_4;
  11295. A_UINT32 score_pcnt11_to_8;
  11296. A_UINT32 score_pcnt15_to_12;
  11297. } wmi_roam_cnd_esp_qbss_scoring;
  11298. /**
  11299. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  11300. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  11301. BITS 8-15 :- SLOT_1
  11302. BITS 16-23 :- SLOT_2
  11303. BITS 24-31 :- SLOT_3
  11304. BITS 32- ...
  11305. num_slot will equally divide 100. e.g, if num_slot = 4
  11306. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  11307. */
  11308. typedef struct {
  11309. A_UINT32 num_slot; /* max 15 */
  11310. A_UINT32 score_pcnt3_to_0;
  11311. A_UINT32 score_pcnt7_to_4;
  11312. A_UINT32 score_pcnt11_to_8;
  11313. A_UINT32 score_pcnt15_to_12;
  11314. } wmi_roam_cnd_oce_wan_scoring;
  11315. typedef enum {
  11316. WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_NONE = 0, /* Legacy roam score algorithm */
  11317. WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_RSSI_CU_BASED = 1, /* Roam score algorithm based on RSSI and CU */
  11318. } WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID;
  11319. /**
  11320. disable_bitmap :- Each bit will be either allow(0)/disallow(1) to considered the roam score param.
  11321. rssi_weightage_pcnt :- RSSI weightage out of total score in percentage
  11322. ht_weightage_pcnt :- HT weightage out of total score in percentage.
  11323. vht_weightage_pcnt :- VHT weightage out of total score in percentage.
  11324. he_weightage_pcnt :- 11ax weightage out of total score in percentage.
  11325. bw_weightage_pcnt :- Bandwidth weightage out of total score in percentage.
  11326. band_weightage_pcnt :- Band(2G/5G) weightage out of total score in percentage.
  11327. nss_weightage_pcnt:- NSS(1x1 / 2x2) weightage out of total score in percentage.
  11328. esp_qbss_weightage_pcnt: ESP/QBSS weightage out of total score in percentage.
  11329. beamforming_weightage_pcnt :- Beamforming weightage out of total score in percentage.
  11330. pcl_weightage_pcnt :- PCL weightage out of total score in percentage.
  11331. oce_wan_weightage_pcnt :- OCE WAN metrics weightage out of total score in percentage.
  11332. rssi_scoring :- RSSI scoring information.
  11333. bw_scoring :- channel BW scoring percentage information.
  11334. band_scoring : - band scording percentage information.
  11335. nss_scoring :- NSS scoring percentage information.
  11336. esp_qbss_scoring :- ESP/QBSS scoring percentage information
  11337. oce_wan_scoring : OCE WAN metrics percentage information
  11338. roam_score_delta_pcnt :- consider scanned AP as roam eligible candidate only if scanned AP score is at least roam_score_delta % better than connected AP score
  11339. roam_score_delta_mask :- roam trigger bitmap for which roam_score_delta needs to apply. The WMI_ROAM_TRIGGER_REASON_ID enum values identify which bit within the mask is used for which roam trigger cause.
  11340. */
  11341. typedef struct {
  11342. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_scoring_param */
  11343. A_UINT32 disable_bitmap;
  11344. A_INT32 rssi_weightage_pcnt;
  11345. A_INT32 ht_weightage_pcnt;
  11346. A_INT32 vht_weightage_pcnt;
  11347. A_INT32 he_weightage_pcnt;
  11348. A_INT32 bw_weightage_pcnt;
  11349. A_INT32 band_weightage_pcnt;
  11350. A_INT32 nss_weightage_pcnt;
  11351. A_INT32 esp_qbss_weightage_pcnt;
  11352. A_INT32 beamforming_weightage_pcnt;
  11353. A_INT32 pcl_weightage_pcnt;
  11354. A_INT32 oce_wan_weightage_pcnt;
  11355. wmi_roam_cnd_rssi_scoring rssi_scoring;
  11356. wmi_roam_cnd_bw_scoring bw_scoring;
  11357. wmi_roam_cnd_band_scoring band_scoring;
  11358. wmi_roam_cnd_nss_scoring nss_scoring;
  11359. wmi_roam_cnd_esp_qbss_scoring esp_qbss_scoring;
  11360. wmi_roam_cnd_oce_wan_scoring oce_wan_scoring;
  11361. A_UINT32 roam_score_delta_pcnt;
  11362. A_UINT32 roam_score_delta_mask;
  11363. /* Vendor specific roam score algorithm ID from WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID enum */
  11364. A_UINT32 vendor_roam_score_algorithm_id;
  11365. } wmi_roam_cnd_scoring_param;
  11366. typedef struct {
  11367. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_score_delta_param */
  11368. /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
  11369. A_UINT32 roam_trigger_reason;
  11370. /* Roam score delta in %.
  11371. * Consider AP as roam candidate only if AP score is at least
  11372. * roam_score_delta % better than connected AP score.
  11373. * Ex: roam_score_delta = 20, and connected AP score is 4000,
  11374. * then consider candidate AP only if its score is at least
  11375. * 4800 (= 4000 * 120%)
  11376. */
  11377. A_UINT32 roam_score_delta;
  11378. } wmi_roam_score_delta_param;
  11379. typedef struct {
  11380. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_min_rssi_param */
  11381. /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
  11382. A_UINT32 roam_trigger_reason;
  11383. /*
  11384. * Consider AP as roam candidate only if AP rssi is better than
  11385. * candidate_min_rssi
  11386. */
  11387. A_UINT32 candidate_min_rssi; /* units = dbm */
  11388. } wmi_roam_cnd_min_rssi_param;
  11389. /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
  11390. * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
  11391. * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
  11392. * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
  11393. */
  11394. typedef struct {
  11395. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
  11396. /** flags as defined above */
  11397. A_UINT32 flags;
  11398. /**
  11399. * rssi threshold value in dB: the value of the candidate AP should
  11400. * higher by this threshold than the rssi of the currrently associated AP.
  11401. */
  11402. A_UINT32 rssi_threshold;
  11403. /**
  11404. * ssid vlaue to be matched.
  11405. */
  11406. wmi_ssid ssid;
  11407. /**
  11408. * security params to be matched.
  11409. */
  11410. /** authentication mode (defined above) */
  11411. A_UINT32 rsn_authmode;
  11412. /** unicast cipher set */
  11413. A_UINT32 rsn_ucastcipherset;
  11414. /** mcast/group cipher set */
  11415. A_UINT32 rsn_mcastcipherset;
  11416. /** mcast/group management frames cipher set */
  11417. A_UINT32 rsn_mcastmgmtcipherset;
  11418. /**
  11419. * rssi_abs_threshold value: the value of the candidate AP should
  11420. * higher than this absolute RSSI threshold.
  11421. * Zero means no absolute minimum RSSI is required.
  11422. * units are the offset from the noise floor in dB.
  11423. */
  11424. A_UINT32 rssi_abs_thresh;
  11425. /**
  11426. * bg_rssi_threshold value in dB: For background scan the value of
  11427. * the candidate AP should be higher by this threshold than the rssi
  11428. * of the currrently associated AP.
  11429. */
  11430. A_UINT32 bg_rssi_threshold;
  11431. } wmi_ap_profile;
  11432. /** Support early stop roaming scanning when finding a strong candidate AP
  11433. * A 'strong' candidate is
  11434. * 1) Is eligible candidate
  11435. * (all conditions are met in existing candidate selection).
  11436. * 2) Its rssi is better than earlystop threshold.
  11437. * Earlystop threshold will be relaxed as each channel is scanned.
  11438. */
  11439. typedef struct {
  11440. A_UINT32 tlv_header;
  11441. /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
  11442. A_UINT32 roam_earlystop_thres_min;
  11443. /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
  11444. A_UINT32 roam_earlystop_thres_max;
  11445. } wmi_roam_earlystop_rssi_thres_param;
  11446. typedef struct {
  11447. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param */
  11448. A_UINT32 tlv_header;
  11449. /** rssi threshold offset under trffic and dense env */
  11450. A_UINT32 roam_dense_rssi_thres_offset;
  11451. /** minimum number of APs to determine dense env */
  11452. A_UINT32 roam_dense_min_aps;
  11453. /** initial dense status detected by host at the time of initial connection */
  11454. A_UINT32 roam_dense_status;
  11455. /* traffic threshold to enable aggressive roaming in dense env; units are percent of medium occupancy, 0 - 100 */
  11456. A_UINT32 roam_dense_traffic_thres;
  11457. } wmi_roam_dense_thres_param;
  11458. /* Definition for flags in wmi_roam_bg_scan_roaming_param
  11459. * Bit 0: BG roaming enabled when we connect to 2G AP only and roaming to 5G AP only.
  11460. * Bit 1-31: Reserved
  11461. */
  11462. #define WMI_ROAM_BG_SCAN_FLAGS_2G_TO_5G_ONLY 1
  11463. typedef struct {
  11464. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bg_scan_roaming_param */
  11465. A_UINT32 tlv_header;
  11466. /** rssi threshold in dBm below which roaming will be triggered during background scan(non-roam scan). 0 will disable this threshold */
  11467. A_UINT32 roam_bg_scan_bad_rssi_thresh;
  11468. /** bitmap for which scan client will enable/disable background roaming. bit position is mapped to the enum WMI_SCAN_CLIENT_ID. 1 = enable, 0 = disable */
  11469. A_UINT32 roam_bg_scan_client_bitmap;
  11470. /** roam scan rssi threshold for 2G band.
  11471. * offset from roam_bg_scan_bad_rssi_thresh, in dB units
  11472. */
  11473. A_INT32 bad_rssi_thresh_offset_2g;
  11474. /* flags for background roaming */
  11475. A_UINT32 flags;
  11476. } wmi_roam_bg_scan_roaming_param;
  11477. /** Beacon filter wmi command info */
  11478. #define BCN_FLT_MAX_SUPPORTED_IES 256
  11479. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES/32)
  11480. typedef struct bss_bcn_stats {
  11481. A_UINT32 vdev_id;
  11482. A_UINT32 bss_bcnsdropped;
  11483. A_UINT32 bss_bcnsdelivered;
  11484. } wmi_bss_bcn_stats_t;
  11485. typedef struct bcn_filter_stats {
  11486. A_UINT32 bcns_dropped;
  11487. A_UINT32 bcns_delivered;
  11488. A_UINT32 activefilters;
  11489. wmi_bss_bcn_stats_t bss_stats;
  11490. } wmi_bcnfilter_stats_t;
  11491. typedef struct wmi_add_bcn_filter_cmd {
  11492. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
  11493. A_UINT32 vdev_id;
  11494. /*
  11495. * Following this structure is the TLV:
  11496. * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  11497. */
  11498. } wmi_add_bcn_filter_cmd_fixed_param;
  11499. typedef struct wmi_rmv_bcn_filter_cmd {
  11500. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
  11501. A_UINT32 vdev_id;
  11502. } wmi_rmv_bcn_filter_cmd_fixed_param;
  11503. #define WMI_BCN_SEND_DTIM_ZERO 1
  11504. #define WMI_BCN_SEND_DTIM_BITCTL_SET 2
  11505. typedef struct wmi_bcn_send_from_host {
  11506. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
  11507. A_UINT32 vdev_id;
  11508. A_UINT32 data_len;
  11509. union {
  11510. A_UINT32 frag_ptr; /* Physical address of the frame */
  11511. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  11512. };
  11513. A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
  11514. A_UINT32 dtim_flag; /* to control CABQ traffic */
  11515. A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
  11516. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  11517. } wmi_bcn_send_from_host_cmd_fixed_param;
  11518. /* cmd to support bcn snd for all vaps at once */
  11519. typedef struct wmi_pdev_send_bcn {
  11520. A_UINT32 num_vdevs;
  11521. wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
  11522. } wmi_pdev_send_bcn_cmd_t;
  11523. typedef struct wmi_fd_send_from_host {
  11524. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_send_from_host_cmd_fixed_param */
  11525. A_UINT32 vdev_id;
  11526. A_UINT32 data_len;
  11527. union {
  11528. A_UINT32 frag_ptr; /* Physical address of the frame */
  11529. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  11530. };
  11531. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  11532. A_UINT32 frame_ctrl; /* frame ctrl to setup PPDU desc */
  11533. } wmi_fd_send_from_host_cmd_fixed_param;
  11534. /*
  11535. * WMI command structure for FILS feature enable/disable
  11536. */
  11537. typedef struct {
  11538. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_fils_cmd_fixed_param */
  11539. /* VDEV identifier */
  11540. A_UINT32 vdev_id;
  11541. A_UINT32 fd_period; /* non-zero - enable Fils Discovery frames with this period (in TU), 0 - disable FD frames */
  11542. } wmi_enable_fils_cmd_fixed_param;
  11543. /*
  11544. * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
  11545. */
  11546. typedef struct {
  11547. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
  11548. /** id of AP criteria */
  11549. A_UINT32 id;
  11550. /** unique id identifying the VDEV, generated by the caller */
  11551. A_UINT32 vdev_id;
  11552. /*
  11553. * Following this structure is the TLV:
  11554. * wmi_ap_profile ap_profile; <-- AP profile info
  11555. * wmi_roam_cnd_scoring_param roam_cnd_scoring_param
  11556. * wmi_roam_score_delta_param roam_score_delta_param_list[]
  11557. * wmi_roam_cnd_min_rssi_param roam_cnd_min_rssi_param_list[]
  11558. */
  11559. } wmi_roam_ap_profile_fixed_param;
  11560. /**
  11561. * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
  11562. */
  11563. typedef struct {
  11564. /** id of AP criteria */
  11565. A_UINT32 id;
  11566. /** unique id identifying the VDEV, generated by the caller */
  11567. A_UINT32 vdev_id;
  11568. /** AP profile info */
  11569. wmi_ap_profile ap_profile;
  11570. } wmi_ofl_scan_add_ap_profile;
  11571. /**
  11572. * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
  11573. */
  11574. typedef struct {
  11575. /** id of AP criteria */
  11576. A_UINT32 id;
  11577. /** unique id identifying the VDEV, generated by the caller */
  11578. A_UINT32 vdev_id;
  11579. } wmi_ofl_scan_remove_ap_profile;
  11580. /**
  11581. * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
  11582. * 0 will disable ofload scan and a very low value will perform a continous
  11583. * scan.
  11584. */
  11585. typedef struct {
  11586. /** offload scan period value, used for scans used when not connected */
  11587. A_UINT32 ofl_scan_period;
  11588. } wmi_ofl_scan_period;
  11589. /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
  11590. #define ROAM_OFFLOAD_PMK_BYTES (32)
  11591. #define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
  11592. #define ROAM_OFFLOAD_KRK_BYTES (16)
  11593. #define ROAM_OFFLOAD_BTK_BYTES (32)
  11594. #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
  11595. #define ROAM_OFFLOAD_NUM_MCS_SET (16)
  11596. /* This TLV will be filled only in case roam offload for wpa2-psk/okc/ese/11r is enabled */
  11597. typedef struct {
  11598. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
  11599. A_UINT32 rssi_cat_gap; /* gap for every category bucket */
  11600. A_UINT32 prefer_5g; /* prefer select 5G candidate */
  11601. A_UINT32 select_5g_margin;
  11602. A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
  11603. A_UINT32 capability;
  11604. A_UINT32 ht_caps_info;
  11605. A_UINT32 ampdu_param;
  11606. A_UINT32 ht_ext_cap;
  11607. A_UINT32 ht_txbf;
  11608. A_UINT32 asel_cap;
  11609. A_UINT32 qos_enabled;
  11610. A_UINT32 qos_caps;
  11611. A_UINT32 wmm_caps;
  11612. A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned, we don't declare it as tlv array */
  11613. A_UINT32 handoff_delay_for_rx; /* In msec. Delay Hand-Off by this duration to receive pending Rx frames from current BSS */
  11614. A_UINT32 max_mlme_sw_retries; /* maximum number of software retries for preauth and reassoc req */
  11615. A_UINT32 no_ack_timeout; /* In msec. duration to wait before another SW retry made if no ack seen for previous frame */
  11616. A_UINT32 roam_candidate_validity_time; /* In msec. validity duration of each entry in roam cache. If the value is 0x0, this field should be disregarded. */
  11617. } wmi_roam_offload_tlv_param;
  11618. /* flags for 11i offload */
  11619. #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
  11620. #define WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED 1 /* pmk caching is disabled */
  11621. /* from bit 2 to bit 31 are reserved */
  11622. #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
  11623. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  11624. } while (0)
  11625. #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
  11626. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  11627. } while (0)
  11628. #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
  11629. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
  11630. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_ENABLED(flag) \
  11631. do { \
  11632. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  11633. } while (0)
  11634. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  11635. do { \
  11636. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  11637. } while (0)
  11638. #define WMI_GET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  11639. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED))
  11640. /* This TLV will be filled only in case of wpa-psk/wpa2-psk */
  11641. typedef struct {
  11642. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
  11643. A_UINT32 flags; /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
  11644. A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
  11645. A_UINT32 pmk_len; /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
  11646. } wmi_roam_11i_offload_tlv_param;
  11647. /* This TLV will be filled only in case of 11R*/
  11648. typedef struct {
  11649. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
  11650. A_UINT32 mdie_present;
  11651. A_UINT32 mdid;
  11652. A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN>>2];
  11653. A_UINT32 r0kh_id_len;
  11654. 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 */
  11655. A_UINT32 psk_msk_len; /**length of psk_msk*/
  11656. A_UINT32 psk_msk_ext_len; /**length of psk_msk_ext*/
  11657. A_UINT32 psk_msk_ext[ROAM_OFFLOAD_PSK_MSK_BYTES>>2];
  11658. A_UINT32 adaptive_11r; /* FW needs to perform adaptive 11r roaming */
  11659. } wmi_roam_11r_offload_tlv_param;
  11660. /* This TLV will be filled only in case of ESE */
  11661. typedef struct {
  11662. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
  11663. A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
  11664. A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
  11665. } wmi_roam_ese_offload_tlv_param;
  11666. typedef struct {
  11667. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_with_timeout_tlv_param */
  11668. A_UINT32 tlv_header;
  11669. /** Blaclisted AP mac address */
  11670. wmi_mac_addr bssid;
  11671. /** How much time in milliseconds to keep AP in blacklist */
  11672. A_UINT32 timeout;
  11673. } wmi_roam_blacklist_with_timeout_tlv_param;
  11674. /** WMI_ROAM_BLACKLIST_EVENT: generated whenever STA needs to move AP to blacklist for a particluar time
  11675. * Ex: AP which sends BTM request with disassoc imminent is set should be
  11676. * moved to blacklist until disassociation timer expires
  11677. */
  11678. typedef struct {
  11679. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param */
  11680. A_UINT32 vdev_id;
  11681. /* This TLV is followed by further TLVs:
  11682. * wmi_roam_blacklist_with_timeout_tlv_param blacklist_with_timeout[]
  11683. */
  11684. } wmi_roam_blacklist_event_fixed_param;
  11685. typedef struct {
  11686. A_UINT32 tlv_header;
  11687. /** candidate AP mac address */
  11688. wmi_mac_addr bssid;
  11689. } wmi_roam_pmkid_request_tlv_param;
  11690. /** WMI_ROAM_PMKID_REQUEST_EVENT: generated whenever FW needs the PMKID while roaming **/
  11691. typedef struct {
  11692. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmkid_request_event_fixed_param */
  11693. A_UINT32 vdev_id;
  11694. /* This TLV is followed by further TLVs:
  11695. * wmi_roam_pmkid_request_tlv_param pmkid_request[]
  11696. */
  11697. } wmi_roam_pmkid_request_event_fixed_param;
  11698. /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
  11699. * generated when ever a better AP is found in the recent roam scan (or)
  11700. * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
  11701. * from the current AP.
  11702. */
  11703. typedef struct {
  11704. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
  11705. /** unique id identifying the VDEV, generated by the caller */
  11706. A_UINT32 vdev_id;
  11707. /** reason for roam event */
  11708. A_UINT32 reason;
  11709. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
  11710. A_UINT32 rssi;
  11711. /** roam notification */
  11712. A_UINT32 notif;
  11713. /** roam notification param
  11714. * Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params value.
  11715. */
  11716. A_UINT32 notif_params;
  11717. /** roam notification param1
  11718. * Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params1 value.
  11719. */
  11720. A_UINT32 notif_params1;
  11721. } wmi_roam_event_fixed_param;
  11722. /* roam_reason: bits 0-3 */
  11723. #define WMI_ROAM_REASON_INVALID 0x0 /** invalid reason. Do not interpret reason field */
  11724. #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
  11725. #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
  11726. #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
  11727. #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
  11728. SSID and Security profile in
  11729. WMI_ROAM_AP_PROFILE, found during scan
  11730. triggered upon FINAL_BMISS **/
  11731. #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
  11732. /** WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
  11733. * Result code of WMI_ROAM_INVOKE_CMDID.
  11734. * Any roaming failure before reassociation will be indicated to host
  11735. * with this reason.
  11736. * Any roaming failure after reassociation will be indicated to host with
  11737. * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
  11738. */
  11739. #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
  11740. #define WMI_ROAM_REASON_RSO_STATUS 0x7
  11741. #define WMI_ROAM_REASON_BTM 0x8 /** Roaming because of BTM request received */
  11742. #define WMI_ROAM_REASON_DEAUTH 0x9 /** deauth/disassoc received */
  11743. /* reserved up through 0xF */
  11744. /* subnet status: bits 4-5 */
  11745. typedef enum
  11746. {
  11747. WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
  11748. WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
  11749. WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
  11750. } wmi_roam_subnet_change_status;
  11751. #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
  11752. #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
  11753. #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
  11754. do { \
  11755. (roam_reason) |= \
  11756. (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
  11757. WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
  11758. } while (0)
  11759. #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
  11760. (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
  11761. WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
  11762. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK 0x40
  11763. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT 6
  11764. #define WMI_SET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason, status) \
  11765. do { \
  11766. (roam_reason) |= \
  11767. (((status) << WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT) & \
  11768. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK); \
  11769. } while (0)
  11770. #define WMI_GET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason) \
  11771. (((roam_reason) & WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK) >> \
  11772. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT)
  11773. /* roaming notification */
  11774. #define WMI_ROAM_NOTIF_INVALID 0x0 /** invalid notification. Do not interpret notif field */
  11775. #define WMI_ROAM_NOTIF_ROAM_START 0x1 /** indicate that roaming is started. sent only in non WOW state */
  11776. #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2 /** indicate that roaming is aborted. sent only in non WOW state */
  11777. #define WMI_ROAM_NOTIF_ROAM_REASSOC 0x3 /** indicate that reassociation is done. sent only in non WOW state */
  11778. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS 0x4 /** indicate that roaming scan mode is successful */
  11779. #define WMI_ROAM_NOTIF_SCAN_MODE_FAIL 0x5 /** indicate that roaming scan mode is failed due to internal roaming state */
  11780. #define WMI_ROAM_NOTIF_DISCONNECT 0x6 /** indicate that roaming not allowed due BTM req */
  11781. #define WMI_ROAM_NOTIF_SUBNET_CHANGED 0x7 /** indicate that subnet has changed */
  11782. #define WMI_ROAM_NOTIF_SCAN_START 0x8 /** indicate roam scan start, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
  11783. #define WMI_ROAM_NOTIF_DEAUTH_RECV 0x9 /** indicate deauth received, notif_params to be sent as reason code, notif_params1 to be sent as frame length */
  11784. #define WMI_ROAM_NOTIF_DISASSOC_RECV 0xa /** indicate disassoc received, notif_params to be sent as reason code, notif_params1 to be sent as frame length */
  11785. /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
  11786. * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
  11787. */
  11788. typedef struct
  11789. {
  11790. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
  11791. A_UINT32 vdev_id; /**unique id identifying the VDEV, generated by the caller*/
  11792. A_UINT32 num_ric_request; /**number of ric request ie send to firmware.(max value is 2 now)*/
  11793. A_UINT32 is_add_ric; /**support add ric or delete ric*/
  11794. } wmi_ric_request_fixed_param;
  11795. /**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
  11796. * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
  11797. */
  11798. typedef struct{
  11799. A_UINT32 tlv_header;
  11800. A_UINT32 ts_info; /** bits value of TS Info field.*/
  11801. A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
  11802. A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
  11803. A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
  11804. A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
  11805. A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
  11806. A_UINT32 suspension_interval; /**The Suspension Interval field*/
  11807. A_UINT32 svc_start_time; /**The Service Start Time field*/
  11808. A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
  11809. A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
  11810. A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
  11811. A_UINT32 max_burst_size; /**The Burst Size field*/
  11812. A_UINT32 delay_bound; /**The Delay Bound field*/
  11813. A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
  11814. A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
  11815. A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
  11816. } wmi_ric_tspec;
  11817. /* flags for roam_invoke_cmd */
  11818. /* add this channel into roam cache channel list after this command is finished */
  11819. #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
  11820. /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
  11821. #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
  11822. /* during host-invoked roaming, don't send null data frame to AP */
  11823. #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
  11824. /* from bit 3 to bit 31 are reserved */
  11825. #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  11826. (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  11827. } while (0)
  11828. #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  11829. (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  11830. } while (0)
  11831. #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
  11832. ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
  11833. #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
  11834. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
  11835. #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
  11836. #define WMI_ROAM_INVOKE_SCAN_MODE_SKIP 3 /* no scan is performed. use beacon/probe resp given by the host */
  11837. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_MAP 4 /* scan cached channel map */
  11838. #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
  11839. #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
  11840. /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
  11841. *
  11842. if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
  11843. if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
  11844. This command can be used to add specific channel into roam cached channel list by following
  11845. <roam_scan_ch_mode> = 0
  11846. <roam_ap_sel_mode> = 0
  11847. <roam_delay> = 0
  11848. <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
  11849. <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
  11850. <channel_no> = channel list to be added
  11851. */
  11852. typedef struct {
  11853. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
  11854. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
  11855. A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
  11856. A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
  11857. A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
  11858. A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
  11859. A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
  11860. A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
  11861. A_UINT32 num_buf; /** number of buffers In the TLV bcn_prb_buf_list[] */
  11862. /**
  11863. * TLV (tag length value) parameters follows roam_invoke_req
  11864. * The TLV's are:
  11865. * A_UINT32 channel_list[]; // in MHz
  11866. * wmi_mac_addr bssid_list[];
  11867. * wmi_tlv_buf_len_param bcn_prb_buf_list[];
  11868. * A_UINT8 bcn_prb_frm[];
  11869. */
  11870. } wmi_roam_invoke_cmd_fixed_param;
  11871. /* Definition for op_bitmap */
  11872. enum {
  11873. ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
  11874. ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
  11875. ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
  11876. ROAM_FILTER_OP_BITMAP_LCA_DISALLOW = 0x8,
  11877. ROAM_FILTER_OP_BITMAP_RSSI_REJECTION_OCE = 0x10,
  11878. };
  11879. /** lca_enable_source_bitmap */
  11880. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PER 0x1
  11881. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BMISS 0x2
  11882. #define WMI_ROAM_LCA_DISALLOW_SOURCE_LOW_RSSI 0x4
  11883. #define WMI_ROAM_LCA_DISALLOW_SOURCE_HIGH_RSSI 0x8
  11884. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PERIODIC 0x10
  11885. #define WMI_ROAM_LCA_DISALLOW_SOURCE_MAWC 0x20 /* MAWC = Motion Aided Wifi connectivity */
  11886. #define WMI_ROAM_LCA_DISALLOW_SOURCE_DENSE 0x40
  11887. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BACKGROUND 0x80
  11888. #define WMI_ROAM_LCA_DISALLOW_SOURCE_FORCED 0x100
  11889. typedef struct {
  11890. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_rejection_list_config_param */
  11891. A_UINT32 tlv_header;
  11892. /** BSSID of AP, who reject (re-)assoc due to low RSSI */
  11893. wmi_mac_addr bssid;
  11894. /** Disallowed AP for certain duration, in units of milliseconds */
  11895. A_UINT32 remaining_disallow_duration;
  11896. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  11897. A_INT32 requested_rssi;
  11898. } wmi_roam_rejection_list_config_param;
  11899. typedef wmi_roam_rejection_list_config_param wmi_roam_rssi_rejection_oce_config_param; /* retain old struct name as an alias for the new name */
  11900. typedef struct {
  11901. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
  11902. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
  11903. A_UINT32 flags; /** flags for filter */
  11904. A_UINT32 op_bitmap; /** 32 bit bitmap to be set on. bit0 = first param, bit 1 = second param...etc. Can be or'ed */
  11905. A_UINT32 num_bssid_black_list; /* number of blacklist in the TLV variable bssid_black_list */
  11906. A_UINT32 num_ssid_white_list; /* number of whitelist in the TLV variable ssid_white_list */
  11907. A_UINT32 num_bssid_preferred_list; /* only for lfr 3.0. number of preferred list & factor in the TLV */
  11908. A_UINT32 num_rssi_rejection_ap; /** number of list of AP who rejected STA due to low RSSI */
  11909. /**
  11910. * TLV (tag length value) parameters follows roam_filter_list_cmd
  11911. * The TLV's are:
  11912. * wmi_mac_addr bssid_black_list[];
  11913. * wmi_ssid ssid_white_list[];
  11914. * wmi_mac_addr bssid_preferred_list[];
  11915. * A_UINT32 bssid_preferred_factor[];
  11916. * wmi_roam_lca_disallow_config_tlv_param lca_disallow_param[0/1] (opt)
  11917. * wmi_roam_rejection_list_config_param rssi_rejection_list[]
  11918. */
  11919. } wmi_roam_filter_fixed_param;
  11920. typedef struct {
  11921. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param */
  11922. A_UINT32 disallow_duration; /** How long LCA AP will be disallowed before it can be a roaming candidate again, in units of seconds */
  11923. A_UINT32 rssi_channel_penalization; /** How much RSSI will be penalized if candidate(s) are found in the same channel as disallowed AP's, in units of db */
  11924. A_UINT32 num_disallowed_aps; /** How many APs the target should maintain in its LCA (Last Connected AP) list */
  11925. A_UINT32 disallow_lca_enable_source_bitmap; /** disallow LCA logic is enabled only when trigger sources are matched with corresponding bit (see WMI_ROAM_LCA_DISALLOW_SOURCE constants) */
  11926. } wmi_roam_lca_disallow_config_tlv_param;
  11927. typedef struct {
  11928. A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
  11929. } WMI_IPV4_ADDR;
  11930. typedef struct _WMI_IPV6_ADDR {
  11931. A_UINT8 address[16]; /* IPV6 in Network Byte Order */
  11932. } WMI_IPV6_ADDR;
  11933. /* flags for subnet change detection */
  11934. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
  11935. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
  11936. /* bit 2 to bit 31 are reserved */
  11937. /* set IPv4 enabled/disabled flag and get the flag */
  11938. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
  11939. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  11940. } while (0)
  11941. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
  11942. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  11943. } while (0)
  11944. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
  11945. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
  11946. /* set IPv6 enabled flag, disabled and get the flag */
  11947. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
  11948. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  11949. } while (0)
  11950. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
  11951. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  11952. } while (0)
  11953. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
  11954. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
  11955. /**
  11956. * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
  11957. * to FW. FW uses these parameters for subnet change detection.
  11958. */
  11959. typedef struct {
  11960. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
  11961. /** unique id identifying the VDEV, generated by the caller */
  11962. A_UINT32 vdev_id;
  11963. /** IPv4/IPv6 enabled/disabled */
  11964. /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/DISABLED */
  11965. A_UINT32 flag;
  11966. /** Gateway MAC address */
  11967. wmi_mac_addr inet_gw_mac_addr;
  11968. /** IP addresses */
  11969. WMI_IPV4_ADDR inet_gw_ip_v4_addr;
  11970. WMI_IPV6_ADDR inet_gw_ip_v6_addr;
  11971. /** Number of software retries for ARP/Neighbor solicitation request */
  11972. A_UINT32 max_retries;
  11973. /** timeout in milliseconds for each ARP request*/
  11974. A_UINT32 timeout;
  11975. /** number of skipped aps **/
  11976. A_UINT32 num_skip_subnet_change_detection_bssid_list;
  11977. /**
  11978. * TLV (tag length value) parameters follows roam_subnet_change_config_cmd
  11979. * structure. The TLV's are:
  11980. * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
  11981. **/
  11982. } wmi_roam_subnet_change_config_fixed_param;
  11983. /**
  11984. * WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON:
  11985. * Enable or disable roaming triggers in FW.
  11986. */
  11987. typedef struct {
  11988. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_enable_disable_trigger_reason_fixed_param */
  11989. /** unique id identifying the VDEV, generated by the caller */
  11990. A_UINT32 vdev_id;
  11991. /**
  11992. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  11993. * positions) showing for which roam_trigger_reasons are enabled by
  11994. * bit value equal 0x1, and which roam_trigger_reasons are disabled by
  11995. * bit value equal 0x0.
  11996. */
  11997. A_UINT32 trigger_reason_bitmask;
  11998. } wmi_roam_enable_disable_trigger_reason_fixed_param;
  11999. /** WMI_PROFILE_MATCH_EVENT: offload scan
  12000. * generated when ever atleast one of the matching profiles is found
  12001. * in recent NLO scan. no data is carried with the event.
  12002. */
  12003. /** P2P specific commands */
  12004. /**
  12005. * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
  12006. * FW to generate P2P IE tobe carried in probe response frames.
  12007. * FW will respond to probe requests while in listen state.
  12008. */
  12009. typedef struct {
  12010. /* number of secondary device types,supported */
  12011. A_UINT32 num_secondary_dev_types;
  12012. /**
  12013. * followed by 8 bytes of primary device id and
  12014. * num_secondary_dev_types * 8 bytes of secondary device
  12015. * id.
  12016. */
  12017. } wmi_p2p_dev_set_device_info;
  12018. /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
  12019. * state. if enabled, an active STA/AP will respond to P2P probe requests on
  12020. * the operating channel of the VDEV.
  12021. */
  12022. typedef struct {
  12023. /* 1:enable disoverability, 0:disable discoverability */
  12024. A_UINT32 enable_discoverability;
  12025. } wmi_p2p_set_discoverability;
  12026. /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
  12027. * beacons generated by FW. used in FW beacon mode.
  12028. * the FW will add this IE to beacon in addition to the beacon
  12029. * template set by WMI_BCN_TMPL_CMDID command.
  12030. */
  12031. typedef struct {
  12032. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
  12033. /** unique id identifying the VDEV, generated by the caller */
  12034. A_UINT32 vdev_id;
  12035. /* ie length */
  12036. A_UINT32 ie_buf_len;
  12037. /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  12038. * A_UINT8 ie_data[]; <-- length in byte given by field num_data.
  12039. */
  12040. } wmi_p2p_go_set_beacon_ie_fixed_param;
  12041. /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
  12042. * probe response generated by FW. used in FW beacon mode.
  12043. * the FW will add this IE to probe response in addition to the probe response
  12044. * template set by WMI_PRB_TMPL_CMDID command.
  12045. */
  12046. typedef struct {
  12047. /** unique id identifying the VDEV, generated by the caller */
  12048. A_UINT32 vdev_id;
  12049. /* ie length */
  12050. A_UINT32 ie_buf_len;
  12051. /*followed by byte stream of ie data of length ie_buf_len */
  12052. } wmi_p2p_go_set_probe_resp_ie;
  12053. /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
  12054. * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
  12055. * and action frames received by the P2P Client.
  12056. * Note: This command is currently used only for Apple P2P implementation.
  12057. */
  12058. typedef struct {
  12059. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
  12060. /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
  12061. A_UINT32 p2p_ie_oui_type;
  12062. /** OS specific NoA Attribute ID */
  12063. A_UINT32 p2p_noa_attribute;
  12064. } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
  12065. /*----P2P disc offload definition ----*/
  12066. typedef struct {
  12067. A_UINT32 pattern_type;
  12068. /**
  12069. * TLV (tag length value) paramerters follow the pattern structure.
  12070. * TLV can contain bssid list, ssid list and
  12071. * ie. the TLV tags are defined above;
  12072. */
  12073. } wmi_p2p_disc_offload_pattern_cmd;
  12074. typedef struct {
  12075. /* unique id identifying the VDEV, generated by the caller */
  12076. A_UINT32 vdev_id;
  12077. /* mgmt type of the ie*/
  12078. A_UINT32 mgmt_type;
  12079. /* ie length */
  12080. A_UINT32 ie_buf_len;
  12081. /*followed by byte stream of ie data of length ie_buf_len */
  12082. } wmi_p2p_disc_offload_appie_cmd;
  12083. typedef struct {
  12084. /* enable/disable p2p find offload*/
  12085. A_UINT32 enable;
  12086. /* unique id identifying the VDEV, generated by the caller */
  12087. A_UINT32 vdev_id;
  12088. /* p2p find type */
  12089. A_UINT32 disc_type;
  12090. /* p2p find perodic */
  12091. A_UINT32 perodic;
  12092. /* p2p find listen channel in MHz */
  12093. A_UINT32 listen_channel;
  12094. /* p2p find full channel number */
  12095. A_UINT32 num_scan_chans;
  12096. /**
  12097. * TLV (tag length value) paramerters follow the pattern structure.
  12098. * TLV contain channel list in MHz
  12099. */
  12100. } wmi_p2p_disc_offload_config_cmd;
  12101. /*----P2P OppPS definition ----*/
  12102. typedef struct {
  12103. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
  12104. A_UINT32 tlv_header;
  12105. /* unique id identifying the VDEV, generated by the caller */
  12106. A_UINT32 vdev_id;
  12107. /* OppPS attributes */
  12108. /** Bit 0: Indicate enable/disable of OppPS
  12109. * Bits 7-1: Ctwindow in TUs
  12110. * Bits 31-8: Reserved
  12111. */
  12112. A_UINT32 oppps_attr;
  12113. } wmi_p2p_set_oppps_cmd_fixed_param;
  12114. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
  12115. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
  12116. #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
  12117. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
  12118. #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
  12119. WMI_F_RMW((hdr)->oppps_attr, 0x1, \
  12120. WMI_UNIFIED_OPPPS_ATTR_ENALBED);
  12121. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
  12122. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
  12123. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
  12124. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
  12125. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
  12126. WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
  12127. WMI_UNIFIED_OPPPS_ATTR_CTWIN);
  12128. typedef enum p2p_lo_start_ctrl_flags_e {
  12129. P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0, /* flush prob. req when host is awake */
  12130. } p2p_lo_start_ctrl_flags;
  12131. #define P2P_LO_PER_DEV_TYPE_LEN 8
  12132. #define P2P_LO_DEV_TYPES_COUNT_MAX 10
  12133. #define P2P_LO_DEV_TYPES_LEN_MAX (P2P_LO_PER_DEV_TYPE_LEN * P2P_LO_DEV_TYPES_COUNT_MAX)
  12134. #define P2P_LO_PROB_RESP_MAX_LEN 512
  12135. typedef struct {
  12136. A_UINT32 tlv_header;
  12137. A_UINT32 vdev_id;
  12138. A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
  12139. A_UINT32 channel; /* MHz */
  12140. A_UINT32 period; /* ms */
  12141. A_UINT32 interval; /* ms, interval should be larger than period */
  12142. A_UINT32 count; /* 0 means forever */
  12143. /*
  12144. * device_types_len specifies the number of bytes in the
  12145. * device_types_data[] byte-array TLV that follows this TLV.
  12146. * The data in device_types_data[] is in 8-byte elements, so
  12147. * device_types_len will be a multiple of 8.
  12148. * Refer to P2P_LO_DEV_TYPES_LEN_MAX
  12149. */
  12150. A_UINT32 device_types_len;
  12151. /*
  12152. * prob_resp_len specifies the number of bytes in the
  12153. * prob_resp_data[] byte-array TLV that follows this TLV.
  12154. * Refer to P2P_LO_PROB_RESP_MAX_LEN
  12155. */
  12156. A_UINT32 prob_resp_len;
  12157. /*
  12158. * Two other TLVs follow this TLV:
  12159. * A_UINT8 device_types_data[device_types_len];
  12160. * A_UINT8 prob_resp_data[prob_resp_len];
  12161. * The information in device_types_data[] and prob_resp_data[]
  12162. * needs to be provided to the target in over-the-air byte order.
  12163. * On a big-endian host, if device_types_data and prob_resp_data
  12164. * are initially in the correct over-the-air byte order,
  12165. * the automatic byteswap for endianness-correction during WMI
  12166. * message download will mess up the byte order.
  12167. * Thus, a big-endian host needs to explicitly byte-swap the bytes
  12168. * within each quad-byte segment of device_types_data[] and
  12169. * prob_resp_data[], so that the automatic byte-swap applied during
  12170. * WMI download from a big-endian host to the little-endian target
  12171. * will restore device_types_data and prob_resp_data into the
  12172. * correct byte ordering.
  12173. */
  12174. } wmi_p2p_lo_start_cmd_fixed_param;
  12175. typedef struct {
  12176. A_UINT32 tlv_header;
  12177. A_UINT32 vdev_id;
  12178. } wmi_p2p_lo_stop_cmd_fixed_param;
  12179. typedef enum p2p_lo_stopped_reason_e {
  12180. P2P_LO_STOPPED_REASON_COMPLETE = 0, /* finished as scheduled */
  12181. P2P_LO_STOPPED_REASON_RECV_STOP_CMD, /* host stops it */
  12182. P2P_LO_STOPPED_REASON_INVALID_LO_PAR, /* invalid listen offload par */
  12183. P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, /* vdev cannot support it right now */
  12184. } p2p_lo_stopped_reason;
  12185. typedef struct {
  12186. A_UINT32 tlv_header;
  12187. A_UINT32 vdev_id;
  12188. A_UINT32 reason;/* refer to p2p_lo_stopped_reason_e */
  12189. } wmi_p2p_lo_stopped_event_fixed_param;
  12190. typedef enum {
  12191. WMI_MNT_FILTER_CONFIG_MANAGER,
  12192. WMI_MNT_FILTER_CONFIG_CONTROL,
  12193. WMI_MNT_FILTER_CONFIG_DATA,
  12194. WMI_MNT_FILTER_CONFIG_ALL,
  12195. WMI_MNT_FILTER_CONFIG_UNKNOWN,
  12196. } WMI_MNT_FILTER_CONFIG_TYPE;
  12197. typedef struct {
  12198. A_UINT32 tlv_header;
  12199. A_UINT32 vdev_id;
  12200. A_UINT32 clear_or_set;
  12201. A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
  12202. } wmi_mnt_filter_cmd_fixed_param;
  12203. typedef struct {
  12204. A_UINT32 time32; /* upper 32 bits of time stamp */
  12205. A_UINT32 time0; /* lower 32 bits of time stamp */
  12206. } A_TIME64;
  12207. typedef enum wmi_peer_sta_kickout_reason {
  12208. WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
  12209. WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
  12210. WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
  12211. WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
  12212. WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
  12213. WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
  12214. } PEER_KICKOUT_REASON;
  12215. typedef struct {
  12216. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
  12217. /** peer mac address */
  12218. wmi_mac_addr peer_macaddr;
  12219. /** Reason code, defined as above */
  12220. A_UINT32 reason;
  12221. /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
  12222. A_UINT32 rssi;
  12223. } wmi_peer_sta_kickout_event_fixed_param;
  12224. #define WMI_WLAN_PROFILE_MAX_HIST 3
  12225. #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
  12226. typedef struct _wmi_wlan_profile_t {
  12227. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
  12228. A_UINT32 id;
  12229. A_UINT32 cnt;
  12230. A_UINT32 tot;
  12231. A_UINT32 min;
  12232. A_UINT32 max;
  12233. A_UINT32 hist_intvl;
  12234. A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
  12235. } wmi_wlan_profile_t;
  12236. typedef struct _wmi_wlan_profile_ctx_t {
  12237. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
  12238. A_UINT32 tot; /* time in us */
  12239. A_UINT32 tx_msdu_cnt;
  12240. A_UINT32 tx_mpdu_cnt;
  12241. A_UINT32 tx_ppdu_cnt;
  12242. A_UINT32 rx_msdu_cnt;
  12243. A_UINT32 rx_mpdu_cnt;
  12244. A_UINT32 bin_count;
  12245. } wmi_wlan_profile_ctx_t;
  12246. typedef struct {
  12247. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
  12248. A_UINT32 enable;
  12249. } wmi_wlan_profile_trigger_cmd_fixed_param;
  12250. typedef struct {
  12251. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
  12252. A_UINT32 value;
  12253. } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
  12254. typedef struct {
  12255. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
  12256. A_UINT32 profile_id;
  12257. A_UINT32 value;
  12258. } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
  12259. typedef struct {
  12260. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
  12261. A_UINT32 profile_id;
  12262. A_UINT32 enable;
  12263. } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
  12264. /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
  12265. 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
  12266. when comparing wifi header.*/
  12267. /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
  12268. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
  12269. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
  12270. #define WOW_DEFAULT_BITMASK_SIZE 146
  12271. #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
  12272. #define WOW_MAX_BITMAP_FILTERS 32
  12273. #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
  12274. #define WOW_EXTEND_PATTERN_MATCH_CNT 16
  12275. #define WOW_SHORT_PATTERN_MATCH_CNT 8
  12276. #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
  12277. The 148 comes from (128 - 14) payload size + 8bytes LLC + 26bytes MAC header*/
  12278. #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
  12279. #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
  12280. #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
  12281. #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
  12282. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
  12283. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
  12284. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
  12285. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
  12286. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
  12287. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
  12288. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
  12289. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
  12290. typedef enum pattern_type_e {
  12291. WOW_PATTERN_MIN = 0,
  12292. WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
  12293. WOW_IPV4_SYNC_PATTERN,
  12294. WOW_IPV6_SYNC_PATTERN,
  12295. WOW_WILD_CARD_PATTERN,
  12296. WOW_TIMER_PATTERN,
  12297. WOW_MAGIC_PATTERN,
  12298. WOW_IPV6_RA_PATTERN,
  12299. WOW_IOAC_PKT_PATTERN,
  12300. WOW_IOAC_TMR_PATTERN,
  12301. WOW_IOAC_SOCK_PATTERN,
  12302. WOW_PATTERN_MAX
  12303. } WOW_PATTERN_TYPE;
  12304. typedef enum event_type_e {
  12305. WOW_BMISS_EVENT = 0,
  12306. WOW_BETTER_AP_EVENT,
  12307. WOW_DEAUTH_RECVD_EVENT,
  12308. WOW_MAGIC_PKT_RECVD_EVENT,
  12309. WOW_GTK_ERR_EVENT,
  12310. WOW_FOURWAY_HSHAKE_EVENT,
  12311. WOW_EAPOL_RECVD_EVENT,
  12312. WOW_NLO_DETECTED_EVENT,
  12313. WOW_DISASSOC_RECVD_EVENT,
  12314. WOW_PATTERN_MATCH_EVENT,
  12315. WOW_CSA_IE_EVENT,
  12316. WOW_PROBE_REQ_WPS_IE_EVENT,
  12317. WOW_AUTH_REQ_EVENT,
  12318. WOW_ASSOC_REQ_EVENT,
  12319. WOW_HTT_EVENT,
  12320. WOW_RA_MATCH_EVENT,
  12321. WOW_HOST_AUTO_SHUTDOWN_EVENT,
  12322. WOW_IOAC_MAGIC_EVENT,
  12323. WOW_IOAC_SHORT_EVENT,
  12324. WOW_IOAC_EXTEND_EVENT,
  12325. WOW_IOAC_TIMER_EVENT,
  12326. WOW_DFS_PHYERR_RADAR_EVENT,
  12327. WOW_BEACON_EVENT,
  12328. WOW_CLIENT_KICKOUT_EVENT,
  12329. WOW_NAN_EVENT,
  12330. WOW_EXTSCAN_EVENT,
  12331. WOW_IOAC_REV_KA_FAIL_EVENT,
  12332. WOW_IOAC_SOCK_EVENT,
  12333. WOW_NLO_SCAN_COMPLETE_EVENT,
  12334. WOW_NAN_DATA_EVENT,
  12335. WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */
  12336. WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, /* reuse deprecated event value */
  12337. WOW_TDLS_CONN_TRACKER_EVENT,
  12338. WOW_CRITICAL_LOG_EVENT,
  12339. WOW_CHIP_POWER_FAILURE_DETECT_EVENT,
  12340. WOW_11D_SCAN_EVENT,
  12341. WOW_SAP_OBSS_DETECTION_EVENT,
  12342. WOW_BSS_COLOR_COLLISION_DETECT_EVENT,
  12343. WOW_TKIP_MIC_ERR_FRAME_RECVD_EVENT,
  12344. WOW_ROAM_PREAUTH_START_EVENT,
  12345. WOW_ROAM_PMKID_REQUEST_EVENT,
  12346. } WOW_WAKE_EVENT_TYPE;
  12347. typedef enum wake_reason_e {
  12348. WOW_REASON_UNSPECIFIED = -1,
  12349. WOW_REASON_NLOD = 0,
  12350. WOW_REASON_AP_ASSOC_LOST,
  12351. WOW_REASON_LOW_RSSI,
  12352. WOW_REASON_DEAUTH_RECVD,
  12353. WOW_REASON_DISASSOC_RECVD,
  12354. WOW_REASON_GTK_HS_ERR,
  12355. WOW_REASON_EAP_REQ,
  12356. WOW_REASON_FOURWAY_HS_RECV,
  12357. WOW_REASON_TIMER_INTR_RECV,
  12358. WOW_REASON_PATTERN_MATCH_FOUND,
  12359. WOW_REASON_RECV_MAGIC_PATTERN,
  12360. WOW_REASON_P2P_DISC,
  12361. WOW_REASON_WLAN_HB,
  12362. WOW_REASON_CSA_EVENT,
  12363. WOW_REASON_PROBE_REQ_WPS_IE_RECV,
  12364. WOW_REASON_AUTH_REQ_RECV,
  12365. WOW_REASON_ASSOC_REQ_RECV,
  12366. WOW_REASON_HTT_EVENT,
  12367. WOW_REASON_RA_MATCH,
  12368. WOW_REASON_HOST_AUTO_SHUTDOWN,
  12369. WOW_REASON_IOAC_MAGIC_EVENT,
  12370. WOW_REASON_IOAC_SHORT_EVENT,
  12371. WOW_REASON_IOAC_EXTEND_EVENT,
  12372. WOW_REASON_IOAC_TIMER_EVENT,
  12373. WOW_REASON_ROAM_HO,
  12374. WOW_REASON_DFS_PHYERR_RADADR_EVENT,
  12375. WOW_REASON_BEACON_RECV,
  12376. WOW_REASON_CLIENT_KICKOUT_EVENT,
  12377. WOW_REASON_NAN_EVENT,
  12378. WOW_REASON_EXTSCAN,
  12379. WOW_REASON_RSSI_BREACH_EVENT,
  12380. WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
  12381. WOW_REASON_IOAC_SOCK_EVENT,
  12382. WOW_REASON_NLO_SCAN_COMPLETE,
  12383. WOW_REASON_PACKET_FILTER_MATCH,
  12384. WOW_REASON_ASSOC_RES_RECV,
  12385. WOW_REASON_REASSOC_REQ_RECV,
  12386. WOW_REASON_REASSOC_RES_RECV,
  12387. WOW_REASON_ACTION_FRAME_RECV,
  12388. WOW_REASON_BPF_ALLOW,
  12389. WOW_REASON_NAN_DATA,
  12390. WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
  12391. WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, /* reuse deprecated reason value */
  12392. WOW_REASON_TDLS_CONN_TRACKER_EVENT,
  12393. WOW_REASON_CRITICAL_LOG,
  12394. WOW_REASON_P2P_LISTEN_OFFLOAD,
  12395. WOW_REASON_NAN_EVENT_WAKE_HOST,
  12396. WOW_REASON_CHIP_POWER_FAILURE_DETECT,
  12397. WOW_REASON_11D_SCAN,
  12398. WOW_REASON_THERMAL_CHANGE,
  12399. WOW_REASON_OIC_PING_OFFLOAD,
  12400. WOW_REASON_WLAN_DHCP_RENEW,
  12401. WOW_REASON_SAP_OBSS_DETECTION,
  12402. WOW_REASON_BSS_COLOR_COLLISION_DETECT,
  12403. WOW_REASON_TKIP_MIC_ERR_FRAME_RECVD_DETECT,
  12404. WOW_REASON_WLAN_MD, /* motion detected */
  12405. WOW_REASON_WLAN_BL, /* baselining done */
  12406. WOW_REASON_NTH_BCN_OFLD, /* nth beacon forward to host */
  12407. WOW_REASON_PKT_CAPTURE_MODE_WAKE,
  12408. WOW_REASON_PAGE_FAULT, /* Host wake up due to page fault */
  12409. WOW_REASON_ROAM_PREAUTH_START,
  12410. WOW_REASON_ROAM_PMKID_REQUEST,
  12411. /* add new WOW_REASON_ defs before this line */
  12412. WOW_REASON_MAX,
  12413. WOW_REASON_DEBUG_TEST = 0xFF,
  12414. } WOW_WAKE_REASON_TYPE;
  12415. typedef enum {
  12416. WOW_IFACE_PAUSE_ENABLED,
  12417. WOW_IFACE_PAUSE_DISABLED
  12418. } WOW_IFACE_STATUS;
  12419. enum {
  12420. WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, /* some win10 platfrom will not assert pcie_reset for wow.*/
  12421. /* WMI_WOW_FLAG_SEND_PM_PME
  12422. * Some platforms have issues if the PM_PME message is sent after WoW,
  12423. * so don't send PM_PME after WoW unless the host uses this flag
  12424. * to request it.
  12425. */
  12426. WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
  12427. /* Flag to indicate unit test */
  12428. WMI_WOW_FLAG_UNIT_TEST_ENABLE = 0x00000004,
  12429. /* Force HTC wakeup */
  12430. WMI_WOW_FLAG_DO_HTC_WAKEUP = 0x00000008,
  12431. /* Enable L1SS sleep for PCIE DRV case */
  12432. WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP = 0x00000010,
  12433. };
  12434. typedef struct {
  12435. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
  12436. A_UINT32 enable;
  12437. A_UINT32 pause_iface_config;
  12438. A_UINT32 flags; /* WMI_WOW_FLAG enums */
  12439. } wmi_wow_enable_cmd_fixed_param;
  12440. typedef struct {
  12441. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
  12442. /** Reserved for future use */
  12443. A_UINT32 reserved0;
  12444. } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
  12445. #define WOW_ICMPV6_NA_FILTER_DISABLE 0
  12446. #define WOW_ICMPV6_NA_FILTER_ENABLE 1
  12447. typedef struct {
  12448. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param */
  12449. A_UINT32 vdev_id;
  12450. A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
  12451. } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
  12452. typedef struct bitmap_pattern_s {
  12453. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
  12454. A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
  12455. A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
  12456. A_UINT32 pattern_offset;
  12457. A_UINT32 pattern_len;
  12458. A_UINT32 bitmask_len;
  12459. A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
  12460. } WOW_BITMAP_PATTERN_T;
  12461. typedef struct ipv4_sync_s {
  12462. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
  12463. A_UINT32 ipv4_src_addr;
  12464. A_UINT32 ipv4_dst_addr;
  12465. A_UINT32 tcp_src_prt;
  12466. A_UINT32 tcp_dst_prt;
  12467. } WOW_IPV4_SYNC_PATTERN_T;
  12468. typedef struct ipv6_sync_s {
  12469. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
  12470. A_UINT32 ipv6_src_addr[4];
  12471. A_UINT32 ipv6_dst_addr[4];
  12472. A_UINT32 tcp_src_prt;
  12473. A_UINT32 tcp_dst_prt;
  12474. } WOW_IPV6_SYNC_PATTERN_T;
  12475. typedef struct WOW_MAGIC_PATTERN_CMD
  12476. {
  12477. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
  12478. wmi_mac_addr macaddr;
  12479. } WOW_MAGIC_PATTERN_CMD;
  12480. typedef enum wow_ioac_pattern_type {
  12481. WOW_IOAC_MAGIC_PATTERN = 1,
  12482. WOW_IOAC_SHORT_PATTERN,
  12483. WOW_IOAC_EXTEND_PATTERN,
  12484. } WOW_IOAC_PATTERN_TYPE;
  12485. typedef struct ioac_sock_pattern_s {
  12486. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T */
  12487. A_UINT32 id;
  12488. A_UINT32 local_ipv4;
  12489. A_UINT32 remote_ipv4;
  12490. A_UINT32 local_port;
  12491. A_UINT32 remote_port;
  12492. A_UINT32 pattern_len; /* units = bytes */
  12493. A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
  12494. WMI_IPV6_ADDR local_ipv6;
  12495. WMI_IPV6_ADDR remote_ipv6;
  12496. A_UINT32 ack_nak_len;
  12497. A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  12498. A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  12499. } WOW_IOAC_SOCK_PATTERN_T;
  12500. typedef struct ioac_pkt_pattern_s {
  12501. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
  12502. A_UINT32 pattern_type;
  12503. A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
  12504. A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
  12505. A_UINT32 pattern_len;
  12506. A_UINT32 random_len;
  12507. } WOW_IOAC_PKT_PATTERN_T;
  12508. typedef struct ioac_tmr_pattern_s {
  12509. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
  12510. A_UINT32 wake_in_s;
  12511. A_UINT32 vdev_id;
  12512. } WOW_IOAC_TMR_PATTERN_T;
  12513. typedef struct {
  12514. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
  12515. A_UINT32 nID;
  12516. } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
  12517. typedef struct {
  12518. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
  12519. A_UINT32 nID;
  12520. } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
  12521. typedef struct ioac_keepalive_s {
  12522. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
  12523. A_UINT32 keepalive_pkt_buf[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
  12524. A_UINT32 keepalive_pkt_len;
  12525. A_UINT32 period_in_ms;
  12526. A_UINT32 vdev_id;
  12527. A_UINT32 max_loss_cnt;
  12528. A_UINT32 local_ipv4;
  12529. A_UINT32 remote_ipv4;
  12530. A_UINT32 local_port;
  12531. A_UINT32 remote_port;
  12532. A_UINT32 recv_period_in_ms;
  12533. A_UINT32 rev_ka_size;
  12534. A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
  12535. WMI_IPV6_ADDR local_ipv6;
  12536. WMI_IPV6_ADDR remote_ipv6;
  12537. } WMI_WOW_IOAC_KEEPALIVE_T;
  12538. typedef struct {
  12539. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
  12540. A_UINT32 vdev_id;
  12541. A_UINT32 pattern_type;
  12542. /*
  12543. * Following this struct are these TLVs. Note that they are all array of structures
  12544. * but can have at most one element. Which TLV is empty or has one element depends
  12545. * on the field pattern_type. This is to emulate an union.
  12546. * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
  12547. * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
  12548. */
  12549. } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
  12550. typedef struct {
  12551. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
  12552. A_UINT32 vdev_id;
  12553. A_UINT32 pattern_type;
  12554. A_UINT32 pattern_id;
  12555. } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
  12556. typedef struct {
  12557. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
  12558. A_UINT32 vdev_id;
  12559. A_UINT32 pattern_id;
  12560. A_UINT32 pattern_type;
  12561. /*
  12562. * Following this struct are these TLVs. Note that they are all array of structures
  12563. * but can have at most one element. Which TLV is empty or has one element depends
  12564. * on the field pattern_type. This is to emulate an union.
  12565. * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
  12566. * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
  12567. * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
  12568. * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
  12569. * A_UINT32 pattern_info_timeout[];
  12570. * A_UINT32 ra_ratelimit_interval;
  12571. */
  12572. } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
  12573. typedef struct {
  12574. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
  12575. A_UINT32 vdev_id;
  12576. A_UINT32 pattern_id;
  12577. A_UINT32 pattern_type;
  12578. } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
  12579. #define WMI_WOW_MAX_EVENT_BM_LEN 4
  12580. typedef struct {
  12581. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
  12582. A_UINT32 vdev_id;
  12583. A_UINT32 is_add;
  12584. union {
  12585. A_UINT32 event_bitmap;
  12586. A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
  12587. };
  12588. } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
  12589. /*
  12590. * This structure is used to set the pattern to check UDP packet in WOW mode.
  12591. * If match, construct a tx frame in a local buffer to send through the peer
  12592. * AP to the entity in the IP network that sent the UDP packet to this STA.
  12593. */
  12594. typedef struct {
  12595. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param */
  12596. A_UINT32 vdev_id;
  12597. A_UINT32 enable; /* 1: enable, 0: disable*/
  12598. /* dest_port -
  12599. * bits 7:0 contain the LSB of the UDP dest port,
  12600. * bits 15:8 contain the MSB of the UDP dest port
  12601. */
  12602. A_UINT32 dest_port;
  12603. A_UINT32 pattern_len; /* length in byte of pattern[] */
  12604. A_UINT32 response_len; /* length in byte of response[] */
  12605. /* Following this struct are the TLV's:
  12606. * A_UINT8 pattern[]; <-- payload of UDP packet to be checked, network byte order
  12607. * A_UINT8 response[]; <-- payload of UDP packet to be response, network byte order
  12608. */
  12609. } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
  12610. /*
  12611. * This structure is used to set the pattern for WOW host wakeup pin pulse pattern confirguration.
  12612. */
  12613. typedef struct {
  12614. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param */
  12615. A_UINT32 enable; /* 1: enable, 0: disable */
  12616. A_UINT32 pin; /* pin for host wakeup */
  12617. A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
  12618. A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
  12619. A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
  12620. A_UINT32 init_state; /* Sense of the GPIO pin used for host wakeups.
  12621. * If init_state is 0, a low --> high transition
  12622. * causes a host wakeup interrupt.
  12623. * If init_state is 1, a high --> low transition
  12624. * causes a host wakeup interrrupt.
  12625. */
  12626. } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
  12627. #define MAX_SUPPORTED_ACTION_CATEGORY 256
  12628. #define MAX_SUPPORTED_ACTION_SUBCATEGORY 32
  12629. #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
  12630. typedef enum {
  12631. WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
  12632. WOW_ACTION_WAKEUP_OPERATION_SET,
  12633. WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
  12634. WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
  12635. } WOW_ACTION_WAKEUP_OPERATION;
  12636. typedef struct {
  12637. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param */
  12638. A_UINT32 vdev_id;
  12639. A_UINT32 operation; /* 0 reset to fw default, 1 set the bits, 2 add the setting bits, 3 delete the setting bits */
  12640. A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
  12641. /* This fixed_param TLV is followed by these additional TLV's
  12642. * action_bitmaps_per_category -
  12643. * Each element is a 32-bit bitmap indicating which subcategories
  12644. * for that particular action category are considered for WoW wakeup
  12645. * (if the subcategory's bit is 0) or ignored for WoW wakeup (if the
  12646. * subcategory's bit is 1).
  12647. *
  12648. * A_UINT32 action_bitmaps_per_category[]; <-- variable length array
  12649. */
  12650. } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
  12651. typedef struct wow_event_info_s {
  12652. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
  12653. A_UINT32 vdev_id;
  12654. A_UINT32 flag; /*This is current reserved.*/
  12655. A_INT32 wake_reason;
  12656. A_UINT32 data_len;
  12657. } WOW_EVENT_INFO_fixed_param;
  12658. typedef struct wow_initial_wakeup_event_s {
  12659. A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param */
  12660. A_UINT32 vdev_id;
  12661. } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
  12662. typedef enum {
  12663. WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
  12664. WOW_EVENT_INFO_TYPE_BITMAP,
  12665. WOW_EVENT_INFO_TYPE_GTKIGTK,
  12666. } WOW_EVENT_INFO_TYPE;
  12667. typedef struct wow_event_info_section_s {
  12668. A_UINT32 data_type;
  12669. A_UINT32 data_len;
  12670. } WOW_EVENT_INFO_SECTION;
  12671. typedef struct wow_event_info_section_packet_s {
  12672. A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
  12673. } WOW_EVENT_INFO_SECTION_PACKET;
  12674. typedef struct wow_event_info_section_bitmap_s {
  12675. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
  12676. A_UINT32 flag; /*This is current reserved.*/
  12677. A_UINT32 value; /*This could be the pattern id for bitmap pattern.*/
  12678. A_UINT32 org_len; /*The length of the orginal packet.*/
  12679. } WOW_EVENT_INFO_SECTION_BITMAP;
  12680. /**
  12681. * This command is sent from WLAN host driver to firmware to
  12682. * enable or disable D0-WOW. D0-WOW means APSS suspend with
  12683. * PCIe link and DDR being active.
  12684. *
  12685. *
  12686. * Entering D0-WOW Mode (based on kernel suspend request):
  12687. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
  12688. * target: Take action (e.g. dbglog suspend)
  12689. * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
  12690. *
  12691. * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
  12692. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
  12693. * target: Take action (e.g. dbglog resume)
  12694. * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
  12695. *
  12696. * This command is applicable only on the PCIE LL systems
  12697. * Host can enter either D0-WOW or WOW mode, but NOT both at same time
  12698. * Decision to enter D0-WOW or WOW is based on active interfaces
  12699. *
  12700. */
  12701. typedef struct {
  12702. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
  12703. A_UINT32 enable; /* 1 = enable, 0 = disable */
  12704. } wmi_d0_wow_enable_disable_cmd_fixed_param;
  12705. typedef enum extend_wow_type_e {
  12706. EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
  12707. EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
  12708. EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
  12709. EXTWOW_TYPE_APP_PULSETEST,
  12710. EXTWOW_DISABLED = 255,
  12711. } EXTWOW_TYPE;
  12712. typedef struct {
  12713. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
  12714. A_UINT32 vdev_id;
  12715. A_UINT32 type;
  12716. A_UINT32 wakeup_pin_num;
  12717. A_UINT32 swol_pulsetest_type;
  12718. A_UINT32 swol_pulsetest_application;
  12719. } wmi_extwow_enable_cmd_fixed_param;
  12720. #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
  12721. #define SWOL_INDOOR_KEY_LEN 16
  12722. typedef struct {
  12723. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
  12724. A_UINT32 vdev_id;
  12725. wmi_mac_addr wakee_mac;
  12726. A_UINT8 ident[8];
  12727. A_UINT8 passwd[16];
  12728. A_UINT32 ident_len;
  12729. A_UINT32 passwd_len;
  12730. /* indoor check parameters */
  12731. /* key for mac addresses specified in swol_indoor_key_mac
  12732. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  12733. * segment of this array, so the bytes will return to their original
  12734. * order when the entire WMI message contents are byte-swapped to
  12735. * convert from big-endian to little-endian format.
  12736. */
  12737. A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
  12738. /* key length for specified mac address index
  12739. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  12740. * segment of this array, so the bytes will return to their original
  12741. * order when the entire WMI message contents are byte-swapped to
  12742. * convert from big-endian to little-endian format.
  12743. */
  12744. A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  12745. /* mac address array allowed to wakeup host*/
  12746. wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  12747. /* app mask for the mac addresses specified in swol_indoor_key_mac */
  12748. A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  12749. A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
  12750. A_UINT32 swol_indoor_pw_check; /* whether to check password */
  12751. A_UINT32 swol_indoor_pattern; /* wakeup pattern */
  12752. A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
  12753. A_UINT32 swol_indoor_exception_app;
  12754. A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
  12755. } wmi_extwow_set_app_type1_params_cmd_fixed_param;
  12756. typedef struct {
  12757. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
  12758. A_UINT32 vdev_id;
  12759. A_UINT8 rc4_key[16];
  12760. A_UINT32 rc4_key_len;
  12761. /** ip header parameter */
  12762. A_UINT32 ip_id; /* NC id */
  12763. A_UINT32 ip_device_ip; /* NC IP address */
  12764. A_UINT32 ip_server_ip; /* Push server IP address */
  12765. /** tcp header parameter */
  12766. A_UINT16 tcp_src_port; /* NC TCP port */
  12767. A_UINT16 tcp_dst_port; /* Push server TCP port */
  12768. A_UINT32 tcp_seq;
  12769. A_UINT32 tcp_ack_seq;
  12770. A_UINT32 keepalive_init; /* Initial ping interval */
  12771. A_UINT32 keepalive_min; /* Minimum ping interval */
  12772. A_UINT32 keepalive_max; /* Maximum ping interval */
  12773. A_UINT32 keepalive_inc; /* Increment of ping interval */
  12774. wmi_mac_addr gateway_mac;
  12775. A_UINT32 tcp_tx_timeout_val;
  12776. A_UINT32 tcp_rx_timeout_val;
  12777. /** add extra parameter for backward-compatible */
  12778. /*
  12779. * For all byte arrays, natural order is used. E.g.
  12780. * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
  12781. * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
  12782. */
  12783. /* used to encrypt transmit packet such as keep-alive */
  12784. A_UINT8 rc4_write_sandbox[256];
  12785. A_UINT32 rc4_write_x;
  12786. A_UINT32 rc4_write_y;
  12787. /* used to decrypt received packet such as wow data */
  12788. A_UINT8 rc4_read_sandbox[256];
  12789. A_UINT32 rc4_read_x;
  12790. A_UINT32 rc4_read_y;
  12791. /* used to caculate HMAC hash for transmit packet such as keep-alive */
  12792. A_UINT8 ssl_write_seq[8];
  12793. A_UINT8 ssl_sha1_write_key[64];
  12794. A_UINT32 ssl_sha1_write_key_len;
  12795. /* used to calculate HAMC hash for receive packet such as wow data */
  12796. A_UINT8 ssl_read_seq[8];
  12797. A_UINT8 ssl_sha1_read_key[64];
  12798. A_UINT32 ssl_sha1_read_key_len;
  12799. /* optional element for specifying TCP options data to include in
  12800. * transmit packets such as keep-alive
  12801. */
  12802. A_UINT32 tcp_options_len;
  12803. A_UINT8 tcp_options[40];
  12804. A_UINT32 async_id; /* keep-alive request id */
  12805. } wmi_extwow_set_app_type2_params_cmd_fixed_param;
  12806. #define WMI_RXERR_CRC 0x01 /* CRC error on frame */
  12807. #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  12808. #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  12809. #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  12810. #define WMI_RX_OFFLOAD_MON_MODE 0x40 /* Offload dropped mgmt pkt's for only in capture mode*/
  12811. typedef enum {
  12812. PKT_PWR_SAVE_PAID_MATCH = 0x00000001,
  12813. PKT_PWR_SAVE_GID_MATCH = 0x00000002,
  12814. PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x00000004,
  12815. PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x00000008,
  12816. PKT_PWR_SAVE_EOF_PAD_DELIM = 0x00000010,
  12817. PKT_PWR_SAVE_MACADDR_MISMATCH = 0x00000020,
  12818. PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x00000040,
  12819. PKT_PWR_SAVE_GID_NSTS_ZERO = 0x00000080,
  12820. PKT_PWR_SAVE_RSSI_CHECK = 0x00000100,
  12821. PKT_PWR_SAVE_5G_EBT = 0x00000200,
  12822. PKT_PWR_SAVE_2G_EBT = 0x00000400,
  12823. PKT_PWR_SAVE_BSS_COLOR_MISMATCH = 0x00000800,
  12824. PKT_PWR_SAVE_UL_FLAG = 0x00001000,
  12825. PKT_PWR_SAVE_STA_ID_MISMATCH = 0x00002000,
  12826. PKT_PWR_SAVE_MACADDR_MISMATCH_FCS = 0x00004000,
  12827. PKT_PWR_SAVE_ENABLE = 0x80000000,
  12828. } WMI_PKT_PWR_SAVE_TYPE;
  12829. typedef struct {
  12830. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
  12831. A_UINT32 num_data; /** length in byte of data[]. */
  12832. /** pdev_id for identifying the MAC
  12833. * See macros starting with WMI_PDEV_ID_ for values.
  12834. */
  12835. A_UINT32 pdev_id;
  12836. /* This structure is used to send Factory Test Mode [FTM] command
  12837. * from host to firmware for integrated chips which are binary blobs.
  12838. * Following this structure is the TLV:
  12839. * A_UINT8 data[]; <-- length in byte given by field num_data.
  12840. */
  12841. } wmi_ftm_intg_cmd_fixed_param;
  12842. typedef struct {
  12843. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
  12844. A_UINT32 num_data; /** length in byte of data[]. */
  12845. /* This structure is used to receive Factory Test Mode [FTM] event
  12846. * from firmware to host for integrated chips which are binary blobs.
  12847. * Following this structure is the TLV:
  12848. * A_UINT8 data[]; <-- length in byte given by field num_data.
  12849. */
  12850. } wmi_ftm_intg_event_fixed_param;
  12851. #define WMI_MAX_NS_OFFLOADS 2
  12852. #define WMI_MAX_ARP_OFFLOADS 2
  12853. #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  12854. #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  12855. #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  12856. typedef struct {
  12857. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
  12858. A_UINT32 flags; /* flags */
  12859. A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node*/
  12860. A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
  12861. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  12862. } WMI_ARP_OFFLOAD_TUPLE;
  12863. #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  12864. #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  12865. #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  12866. #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3) /* whether the configured IPv6 address is anycast */
  12867. #define WMI_NSOFF_MAX_TARGET_IPS 2
  12868. typedef struct {
  12869. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
  12870. A_UINT32 flags; /* flags */
  12871. /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
  12872. WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
  12873. WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
  12874. WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
  12875. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  12876. } WMI_NS_OFFLOAD_TUPLE;
  12877. typedef struct {
  12878. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
  12879. A_UINT32 flags;
  12880. A_UINT32 vdev_id;
  12881. A_UINT32 num_ns_ext_tuples;
  12882. /* Following this structure are the TLVs:
  12883. * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
  12884. * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
  12885. * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; <-- size based on num_ns_ext_tuples
  12886. */
  12887. } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
  12888. typedef struct {
  12889. A_UINT32 tlv_header;
  12890. A_UINT32 vdev_id;
  12891. A_UINT32 pattern_id;
  12892. A_UINT32 timeout;
  12893. A_UINT32 length;
  12894. /*Following this would be the pattern
  12895. A_UINT8 pattern[] of length specifed by length
  12896. field in the structure.*/
  12897. } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  12898. typedef struct {
  12899. A_UINT32 tlv_header;
  12900. A_UINT32 vdev_id;
  12901. A_UINT32 pattern_id;
  12902. } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  12903. typedef struct {
  12904. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
  12905. /** unique id identifying the VDEV, generated by the caller */
  12906. A_UINT32 vdev_id;
  12907. /** peer MAC address */
  12908. wmi_mac_addr peer_macaddr;
  12909. /** Tid number */
  12910. A_UINT32 tid;
  12911. /** Initiator (1) or Responder (0) for this aggregation */
  12912. A_UINT32 initiator;
  12913. /** size of the negotiated window */
  12914. A_UINT32 window_size;
  12915. /** starting sequence number (only valid for initiator) */
  12916. A_UINT32 ssn;
  12917. /** timeout field represents the time to wait for Block Ack in
  12918. * initiator case and the time to wait for BAR in responder
  12919. * case. 0 represents no timeout. */
  12920. A_UINT32 timeout;
  12921. /* BA policy: immediate ACK (0) or delayed ACK (1) */
  12922. A_UINT32 policy;
  12923. } wmi_peer_tid_addba_cmd_fixed_param;
  12924. typedef struct {
  12925. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
  12926. /** unique id identifying the VDEV, generated by the caller */
  12927. A_UINT32 vdev_id;
  12928. /** peer MAC address */
  12929. wmi_mac_addr peer_macaddr;
  12930. /** Tid number */
  12931. A_UINT32 tid;
  12932. /** Initiator (1) or Responder (0) for this aggregation */
  12933. A_UINT32 initiator;
  12934. } wmi_peer_tid_delba_cmd_fixed_param;
  12935. typedef struct {
  12936. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
  12937. /** unique id identifying the VDEV, generated by the caller */
  12938. A_UINT32 vdev_id;
  12939. /** peer MAC address */
  12940. wmi_mac_addr peer_macaddr;
  12941. /** Tid number */
  12942. A_UINT32 tid;
  12943. /** Event status */
  12944. A_UINT32 status;
  12945. } wmi_tx_addba_complete_event_fixed_param;
  12946. typedef struct {
  12947. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
  12948. /** unique id identifying the VDEV, generated by the caller */
  12949. A_UINT32 vdev_id;
  12950. /** peer MAC address */
  12951. wmi_mac_addr peer_macaddr;
  12952. /** Tid number */
  12953. A_UINT32 tid;
  12954. /** Event status */
  12955. A_UINT32 status;
  12956. } wmi_tx_delba_complete_event_fixed_param;
  12957. /*
  12958. * Structure to request sequence numbers for a given
  12959. * peer station on different TIDs. The TIDs are
  12960. * indicated in the tidBitMap, tid 0 would
  12961. * be represented by LSB bit 0. tid 1 would be
  12962. * represented by LSB bit 1 etc.
  12963. * The target will retrieve the current sequence
  12964. * numbers for the peer on all the TIDs requested
  12965. * and send back a response in a WMI event.
  12966. */
  12967. typedef struct
  12968. {
  12969. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  12970. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
  12971. wmi_mac_addr peer_macaddr;
  12972. A_UINT32 tidBitmap;
  12973. } wmi_ba_req_ssn;
  12974. typedef struct {
  12975. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  12976. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
  12977. /** unique id identifying the VDEV, generated by the caller */
  12978. A_UINT32 vdev_id;
  12979. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  12980. A_UINT32 num_ba_req_ssn;
  12981. /* Following this struc are the TLV's:
  12982. * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
  12983. */
  12984. } wmi_ba_req_ssn_cmd_fixed_param;
  12985. /*
  12986. * Max transmit categories
  12987. *
  12988. * Note: In future if we need to increase WMI_MAX_TC definition
  12989. * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
  12990. */
  12991. #define WMI_MAX_TC 8
  12992. /*
  12993. * Structure to send response sequence numbers
  12994. * for a give peer and tidmap.
  12995. */
  12996. typedef struct
  12997. {
  12998. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  12999. WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
  13000. wmi_mac_addr peer_macaddr;
  13001. /* A boolean to indicate if ssn is present */
  13002. A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
  13003. /* The ssn from target, valid only if
  13004. * ssn_present_for_tid[tidn] equals 1
  13005. */
  13006. A_UINT32 ssn_for_tid[WMI_MAX_TC];
  13007. } wmi_ba_event_ssn;
  13008. typedef struct {
  13009. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  13010. WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
  13011. /** unique id identifying the VDEV, generated by the caller */
  13012. A_UINT32 vdev_id;
  13013. /** Event status, success or failure of the overall operation */
  13014. A_UINT32 status;
  13015. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  13016. A_UINT32 num_ba_event_ssn;
  13017. /* Following this struc are the TLV's:
  13018. * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
  13019. */
  13020. } wmi_ba_rsp_ssn_event_fixed_param;
  13021. enum wmi_aggr_state_req_type {
  13022. WMI_DISABLE_AGGREGATION,
  13023. WMI_ENABLE_AGGREGATION
  13024. };
  13025. /*
  13026. * This event is generated by the COEX module
  13027. * when esco call is begins the coex module in fw genrated this event to host to
  13028. * disable the RX aggregation and after completion of the esco call fw will indicate to
  13029. * enable back the Rx aggregation .
  13030. */
  13031. typedef struct {
  13032. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
  13033. /** unique id identifying the VDEV, generated by the caller */
  13034. A_UINT32 vdev_id;
  13035. /** req_type contains values from enum
  13036. * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
  13037. A_UINT32 req_type;
  13038. } wmi_aggr_state_trig_event_fixed_param;
  13039. typedef struct {
  13040. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
  13041. /** unique id identifying the VDEV, generated by the caller */
  13042. A_UINT32 vdev_id;
  13043. /** MAC address used for installing */
  13044. wmi_mac_addr peer_macaddr;
  13045. /** key index */
  13046. A_UINT32 key_ix;
  13047. /** key flags */
  13048. A_UINT32 key_flags;
  13049. /** Event status */
  13050. A_UINT32 status;
  13051. } wmi_vdev_install_key_complete_event_fixed_param;
  13052. typedef enum _WMI_NLO_AUTH_ALGORITHM {
  13053. WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
  13054. WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
  13055. WMI_NLO_AUTH_ALGO_WPA = 3,
  13056. WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
  13057. WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
  13058. WMI_NLO_AUTH_ALGO_RSNA = 6,
  13059. WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
  13060. } WMI_NLO_AUTH_ALGORITHM;
  13061. typedef enum _WMI_NLO_CIPHER_ALGORITHM {
  13062. WMI_NLO_CIPHER_ALGO_NONE = 0x00,
  13063. WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
  13064. WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
  13065. WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
  13066. WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
  13067. WMI_NLO_CIPHER_ALGO_BIP = 0x06,
  13068. WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  13069. WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  13070. WMI_NLO_CIPHER_ALGO_WEP = 0x101,
  13071. } WMI_NLO_CIPHER_ALGORITHM;
  13072. /* SSID broadcast type passed in NLO params */
  13073. typedef enum _WMI_NLO_SSID_BcastNwType
  13074. {
  13075. WMI_NLO_BCAST_UNKNOWN = 0,
  13076. WMI_NLO_BCAST_NORMAL = 1,
  13077. WMI_NLO_BCAST_HIDDEN = 2,
  13078. } WMI_NLO_SSID_BcastNwType;
  13079. #define WMI_NLO_MAX_SSIDS 16
  13080. #define WMI_NLO_MAX_CHAN 48
  13081. #define WMI_NLO_CONFIG_STOP (0x1 << 0)
  13082. #define WMI_NLO_CONFIG_START (0x1 << 1)
  13083. #define WMI_NLO_CONFIG_RESET (0x1 << 2)
  13084. #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
  13085. #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
  13086. #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
  13087. /* This bit is used to indicate if EPNO Profile is enabled */
  13088. #define WMI_NLO_CONFIG_ENLO (0x1 << 7)
  13089. #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
  13090. #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
  13091. #define WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ (0x1 << 10)
  13092. #define WMI_NLO_CONFIG_RANDOM_SEQ_NO_IN_PROBE_REQ (0x1 << 11)
  13093. #define WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ (0x1 << 12)
  13094. #define WMI_NLO_CONFIG_ENABLE_CNLO_RSSI_CONFIG (0x1 << 13)
  13095. /* Whether directed scan needs to be performed (for hidden SSIDs) */
  13096. #define WMI_ENLO_FLAG_DIRECTED_SCAN 1
  13097. /* Whether PNO event shall be triggered if the network is found on A band */
  13098. #define WMI_ENLO_FLAG_A_BAND 2
  13099. /* Whether PNO event shall be triggered if the network is found on G band */
  13100. #define WMI_ENLO_FLAG_G_BAND 4
  13101. /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
  13102. #define WMI_ENLO_FLAG_STRICT_MATCH 8
  13103. /* Code for matching the beacon AUTH IE - additional codes TBD */
  13104. /* open */
  13105. #define WMI_ENLO_AUTH_CODE_OPEN 1
  13106. /* WPA_PSK or WPA2PSK */
  13107. #define WMI_ENLO_AUTH_CODE_PSK 2
  13108. /* any EAPOL */
  13109. #define WMI_ENLO_AUTH_CODE_EAPOL 4
  13110. /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
  13111. typedef struct wmi_nlo_ssid_param
  13112. {
  13113. A_UINT32 valid;
  13114. wmi_ssid ssid;
  13115. } wmi_nlo_ssid_param;
  13116. /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
  13117. typedef struct wmi_nlo_enc_param
  13118. {
  13119. A_UINT32 valid;
  13120. A_UINT32 enc_type;
  13121. } wmi_nlo_enc_param;
  13122. /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
  13123. typedef struct wmi_nlo_auth_param
  13124. {
  13125. A_UINT32 valid;
  13126. A_UINT32 auth_type;
  13127. } wmi_nlo_auth_param;
  13128. /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
  13129. typedef struct wmi_nlo_bcast_nw_param
  13130. {
  13131. A_UINT32 valid;
  13132. /* If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value should be true/false
  13133. Otherwise EPNO is enabled. bcast_nw_type would be used as a bit flag contains WMI_ENLO_FLAG_XXX */
  13134. A_UINT32 bcast_nw_type;
  13135. } wmi_nlo_bcast_nw_param;
  13136. /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
  13137. typedef struct wmi_nlo_rssi_param
  13138. {
  13139. A_UINT32 valid;
  13140. A_INT32 rssi;
  13141. } wmi_nlo_rssi_param;
  13142. typedef struct nlo_configured_parameters {
  13143. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
  13144. wmi_nlo_ssid_param ssid;
  13145. wmi_nlo_enc_param enc_type;
  13146. wmi_nlo_auth_param auth_type;
  13147. wmi_nlo_rssi_param rssi_cond;
  13148. wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
  13149. } nlo_configured_parameters;
  13150. /* Support channel prediction for PNO scan after scanning top_k_num channels
  13151. * if stationary_threshold is met.
  13152. */
  13153. typedef struct nlo_channel_prediction_cfg {
  13154. A_UINT32 tlv_header;
  13155. /* Enable or disable this feature. */
  13156. A_UINT32 enable;
  13157. /* Top K channels will be scanned before deciding whether to further scan
  13158. * or stop. Minimum value is 3 and maximum is 5. */
  13159. A_UINT32 top_k_num;
  13160. /* Preconfigured stationary threshold.
  13161. * Lesser value means more conservative. Bigger value means more aggressive.
  13162. * Maximum is 100 and mininum is 0. */
  13163. A_UINT32 stationary_threshold;
  13164. /* Periodic full channel scan in milliseconds unit.
  13165. * After full_scan_period_ms since last full scan, channel prediction
  13166. * scan is suppressed and will do full scan.
  13167. * This is to help detecting sudden AP power-on or -off. Value 0 means no
  13168. * full scan at all (not recommended).
  13169. */
  13170. A_UINT32 full_scan_period_ms;
  13171. } nlo_channel_prediction_cfg;
  13172. typedef struct enlo_candidate_score_params_t {
  13173. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param */
  13174. A_INT32 min5GHz_rssi; /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
  13175. A_INT32 min24GHz_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
  13176. A_UINT32 initial_score_max; /* the maximum score that a network can have before bonuses */
  13177. /* current_connection_bonus:
  13178. * only report when there is a network's score this much higher
  13179. * than the current connection
  13180. */
  13181. A_UINT32 current_connection_bonus;
  13182. A_UINT32 same_network_bonus; /* score bonus for all networks with the same network flag */
  13183. A_UINT32 secure_bonus; /* score bonus for networks that are not open */
  13184. A_UINT32 band5GHz_bonus; /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
  13185. } enlo_candidate_score_params;
  13186. typedef struct connected_nlo_bss_band_rssi_pref_t {
  13187. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_bss_band_rssi_pref */
  13188. /** band which needs to get preference over other band - see wmi_set_vdev_ie_band enum */
  13189. A_UINT32 band;
  13190. /* Amount of RSSI preference (in dB) that can be given to band (mentioned above) over other band */
  13191. A_INT32 rssi_pref;
  13192. } connected_nlo_bss_band_rssi_pref;
  13193. typedef struct connected_nlo_rssi_params_t {
  13194. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_rssi_params */
  13195. /* Relative rssi threshold (in dB) by which new BSS should have better rssi than
  13196. * the current connected BSS.
  13197. */
  13198. A_INT32 relative_rssi;
  13199. /* The amount of rssi preference (in dB) that can be given to a 5G BSS over 2.4G BSS. */
  13200. A_INT32 relative_rssi_5g_pref;
  13201. } connected_nlo_rssi_params;
  13202. typedef struct wmi_nlo_config {
  13203. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
  13204. A_UINT32 flags;
  13205. A_UINT32 vdev_id;
  13206. A_UINT32 fast_scan_max_cycles;
  13207. A_UINT32 active_dwell_time;
  13208. A_UINT32 passive_dwell_time; /* PDT in msecs */
  13209. A_UINT32 probe_bundle_size;
  13210. A_UINT32 rest_time; /* ART = IRT */
  13211. A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
  13212. A_UINT32 scan_backoff_multiplier; /* SBM */
  13213. A_UINT32 fast_scan_period; /* SCBM */
  13214. A_UINT32 slow_scan_period; /* specific to windows */
  13215. A_UINT32 no_of_ssids;
  13216. A_UINT32 num_of_channels;
  13217. A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
  13218. /** MAC Address to use in Probe Req as SA **/
  13219. wmi_mac_addr mac_addr;
  13220. /** Mask on which MAC has to be randomized **/
  13221. wmi_mac_addr mac_mask;
  13222. /** IE bitmap to use in Probe Req **/
  13223. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  13224. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  13225. A_UINT32 num_vendor_oui;
  13226. /** Number of connected NLO band preferences **/
  13227. A_UINT32 num_cnlo_band_pref;
  13228. /* The TLVs will follow.
  13229. * nlo_configured_parameters nlo_list[];
  13230. * A_UINT32 channel_list[num_of_channels]; // in MHz
  13231. * nlo_channel_prediction_cfg ch_prediction_cfg;
  13232. * enlo_candidate_score_params candidate_score_params;
  13233. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  13234. * connected_nlo_rssi_params cnlo_rssi_params;
  13235. * connected_nlo_bss_band_rssi_pref cnlo_bss_band_rssi_pref[num_cnlo_band_pref];
  13236. */
  13237. } wmi_nlo_config_cmd_fixed_param;
  13238. typedef struct wmi_nlo_event
  13239. {
  13240. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
  13241. A_UINT32 vdev_id;
  13242. } wmi_nlo_event;
  13243. /* WMI_PASSPOINT_CONFIG_SET
  13244. * Sets a list for passpoint networks for PNO purposes;
  13245. * it should be matched against any passpoint networks found
  13246. * during regular PNO scan.
  13247. */
  13248. #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
  13249. /* WMI_PASSPOINT_CONFIG_RESET
  13250. * Reset passpoint network list -
  13251. * no Passpoint networks should be matched after this.
  13252. */
  13253. #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
  13254. #define PASSPOINT_REALM_LEN 256
  13255. #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
  13256. #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  13257. #define PASSPOINT_PLMN_ID_LEN 3
  13258. #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
  13259. (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
  13260. /*
  13261. * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
  13262. * A_UINT8 realm[PASSPOINT_REALM_LEN]
  13263. * array will end on a 4-byte boundary.
  13264. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  13265. */
  13266. A_COMPILE_TIME_ASSERT(
  13267. check_passpoint_realm_size,
  13268. (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
  13269. /*
  13270. * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
  13271. * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
  13272. * roaming_consortium_ids array below will end on a 4-byte boundary.
  13273. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  13274. */
  13275. A_COMPILE_TIME_ASSERT(
  13276. check_passpoint_roaming_consortium_ids_size,
  13277. ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
  13278. /* wildcard ID to allow an action (reset) to apply to all networks */
  13279. #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
  13280. typedef struct wmi_passpoint_config {
  13281. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
  13282. /* (network) id
  13283. * identifier of the matched network, report this in event
  13284. * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
  13285. * that indicates the action should be applied to all networks.
  13286. * Currently, the only action that is applied to all networks is "reset".
  13287. * If a non-wildcard ID is specified, that particular network is configured.
  13288. * If a wildcard ID is specified, all networks are reset.
  13289. */
  13290. A_UINT32 id;
  13291. A_UINT32 req_id;
  13292. A_UINT8 realm[PASSPOINT_REALM_LEN]; /*null terminated UTF8 encoded realm, 0 if unspecified*/
  13293. A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; /*roaming consortium ids to match, 0s if unspecified*/
  13294. /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
  13295. A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
  13296. } wmi_passpoint_config_cmd_fixed_param;
  13297. typedef struct {
  13298. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_event_hdr */
  13299. A_UINT32 id; /* identifier of the matched network */
  13300. A_UINT32 vdev_id;
  13301. A_UINT32 timestamp; /* time since boot (in microsecond) when the result was retrieved*/
  13302. wmi_ssid ssid;
  13303. wmi_mac_addr bssid; /* bssid of the network */
  13304. A_UINT32 channel_mhz; /* channel frequency in MHz */
  13305. A_UINT32 rssi; /* rssi value */
  13306. A_UINT32 rtt; /* timestamp in nanoseconds*/
  13307. A_UINT32 rtt_sd; /* standard deviation in rtt */
  13308. A_UINT32 beacon_period; /* beacon advertised in the beacon */
  13309. A_UINT32 capability; /* capabilities advertised in the beacon */
  13310. A_UINT32 ie_length; /* size of the ie_data blob */
  13311. A_UINT32 anqp_length; /* length of ANQP blob */
  13312. /* Following this structure is the byte stream of ie data of length ie_buf_len:
  13313. * A_UINT8 ie_data[]; <-- length in byte given by field ie_length, blob of ie data in beacon
  13314. * A_UINT8 anqp_ie[]; <-- length in byte given by field anqp_len, blob of anqp data of IE
  13315. * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes stream of each ie should be same as BEACON/Action-frm by 802.11 spec.
  13316. */
  13317. } wmi_passpoint_event_hdr;
  13318. #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
  13319. /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
  13320. #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
  13321. /** Disable GTK offload */
  13322. #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
  13323. /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
  13324. #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
  13325. enum wmi_chatter_mode {
  13326. /* Chatter enter/exit happens
  13327. * automatically based on preset
  13328. * params
  13329. */
  13330. WMI_CHATTER_MODE_AUTO,
  13331. /* Chatter enter is triggered
  13332. * manually by the user
  13333. */
  13334. WMI_CHATTER_MODE_MANUAL_ENTER,
  13335. /* Chatter exit is triggered
  13336. * manually by the user
  13337. */
  13338. WMI_CHATTER_MODE_MANUAL_EXIT,
  13339. /* Placeholder max value, always last*/
  13340. WMI_CHATTER_MODE_MAX
  13341. };
  13342. enum wmi_chatter_query_type {
  13343. /*query coalescing filter match counter*/
  13344. WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
  13345. WMI_CHATTER_QUERY_MAX
  13346. };
  13347. typedef struct {
  13348. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
  13349. A_UINT32 chatter_mode;
  13350. } wmi_chatter_set_mode_cmd_fixed_param;
  13351. /** maximum number of filter supported*/
  13352. #define CHATTER_MAX_COALESCING_RULES 11
  13353. /** maximum number of field tests per filter*/
  13354. #define CHATTER_MAX_FIELD_TEST 5
  13355. /** maximum field length in number of DWORDS*/
  13356. #define CHATTER_MAX_TEST_FIELD_LEN32 2
  13357. /** field test kinds*/
  13358. #define CHATTER_COALESCING_TEST_EQUAL 1
  13359. #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
  13360. #define CHATTER_COALESCING_TEST_NOT_EQUAL 3
  13361. /** packet type*/
  13362. #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
  13363. #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
  13364. #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
  13365. /** coalescing field test*/
  13366. typedef struct _chatter_pkt_coalescing_hdr_test {
  13367. /** offset from start of mac header, for windows native wifi host driver
  13368. * should assume standard 802.11 frame format without QoS info and address4
  13369. * FW would account for any non-stand fields for final offset value.
  13370. */
  13371. A_UINT32 offset;
  13372. A_UINT32 length; /* length of test field*/
  13373. A_UINT32 test; /*equal, not equal or masked equal*/
  13374. A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream*/
  13375. A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream*/
  13376. } chatter_pkt_coalescing_hdr_test;
  13377. /** packet coalescing filter*/
  13378. typedef struct _chatter_pkt_coalescing_filter {
  13379. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
  13380. A_UINT32 filter_id; /*unique id assigned by OS*/
  13381. A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold*/
  13382. A_UINT32 pkt_type; /*unicast/multicast/broadcast*/
  13383. A_UINT32 num_of_test_field; /*number of field test in table*/
  13384. chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl*/
  13385. } chatter_pkt_coalescing_filter;
  13386. /** packet coalescing filter add command*/
  13387. typedef struct {
  13388. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
  13389. A_UINT32 num_of_filters;
  13390. /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
  13391. chatter_pkt_coalescing_filter rx_filter[1];*/
  13392. } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
  13393. /** packet coalescing filter delete command*/
  13394. typedef struct {
  13395. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
  13396. A_UINT32 filter_id; /*filter id which will be deleted*/
  13397. } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
  13398. /** packet coalescing query command*/
  13399. typedef struct {
  13400. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
  13401. A_UINT32 type; /*type of query*/
  13402. } wmi_chatter_coalescing_query_cmd_fixed_param;
  13403. /** chatter query reply event*/
  13404. typedef struct {
  13405. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
  13406. A_UINT32 type; /*query type*/
  13407. A_UINT32 filter_match_cnt; /*coalescing filter match counter*/
  13408. } wmi_chatter_query_reply_event_fixed_param;
  13409. /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
  13410. * cannot be changed without breaking WMI compatibility. */
  13411. #define GTK_OFFLOAD_KEK_BYTES 16
  13412. #define GTK_OFFLOAD_KCK_BYTES 16
  13413. /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
  13414. #define GTK_REPLAY_COUNTER_BYTES 8
  13415. #define WMI_MAX_KEY_LEN 32
  13416. #define IGTK_PN_SIZE 6
  13417. typedef struct {
  13418. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
  13419. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  13420. A_UINT32 flags; /* status flags */
  13421. A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
  13422. /*
  13423. * As with all WMI messages, this message uses little-endian byte
  13424. * ordering within each A_UINT32 field.
  13425. * If a big-endian host is using automatic swapping of the bytes within
  13426. * each 4-byte A_UINT32 to automatically correct the endianness of the
  13427. * A_UINT32 fields as the message is uploaded from target --> host, the
  13428. * big-endian host will have to undo the automatic byte swapping for the
  13429. * below A_UINT8 fields, to restore them to their original order.
  13430. */
  13431. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
  13432. A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  13433. A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  13434. A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  13435. A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  13436. A_UINT8 gtk_keyIndex; /* GTK key index */
  13437. A_UINT8 gtk_keyLength; /* GTK key length */
  13438. A_UINT8 gtk_keyRSC[GTK_REPLAY_COUNTER_BYTES]; /* GTK key replay sequence counter */
  13439. A_UINT8 gtk_key[WMI_MAX_KEY_LEN]; /* GTK key data */
  13440. } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
  13441. typedef struct {
  13442. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
  13443. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  13444. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  13445. /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
  13446. A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
  13447. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  13448. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  13449. } WMI_GTK_OFFLOAD_CMD_fixed_param;
  13450. typedef struct {
  13451. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_offload_extended_tlv_param */
  13452. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  13453. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  13454. A_UINT32 kek_len;
  13455. A_UINT8 KEK[GTK_OFFLOAD_KEK_EXTENDED_BYTES]; /* key encryption key */
  13456. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  13457. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  13458. } wmi_gtk_offload_fils_tlv_param;
  13459. typedef struct {
  13460. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param */
  13461. A_UINT32 vdev_id;
  13462. A_UINT32 sa_query_retry_interval; /* in msec */
  13463. A_UINT32 sa_query_max_retry_count;
  13464. } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
  13465. typedef enum {
  13466. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
  13467. WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
  13468. WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
  13469. WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
  13470. } WMI_STA_KEEPALIVE_METHOD;
  13471. typedef struct {
  13472. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
  13473. WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
  13474. WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
  13475. wmi_mac_addr dest_mac_addr; /* destination MAC address */
  13476. } WMI_STA_KEEPALVE_ARP_RESPONSE;
  13477. typedef struct {
  13478. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
  13479. A_UINT32 vdev_id;
  13480. A_UINT32 enable; /* 1 - Enable, 0 - disable */
  13481. A_UINT32 method; /* keep alive method */
  13482. A_UINT32 interval; /* time interval in seconds */
  13483. /*
  13484. * NOTE: following this structure is the TLV for ARP Resonse:
  13485. * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; <-- ARP response
  13486. */
  13487. } WMI_STA_KEEPALIVE_CMD_fixed_param;
  13488. typedef struct {
  13489. A_UINT32 tlv_header;
  13490. A_UINT32 vdev_id;
  13491. A_UINT32 action;
  13492. } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
  13493. typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
  13494. typedef struct {
  13495. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
  13496. A_UINT32 vdev_id;
  13497. A_UINT32 keepaliveInterval; /* seconds */
  13498. A_UINT32 keepaliveMethod;
  13499. } wmi_vdev_set_keepalive_cmd_fixed_param;
  13500. typedef struct {
  13501. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
  13502. A_UINT32 vdev_id;
  13503. } wmi_vdev_get_keepalive_cmd_fixed_param;
  13504. typedef struct {
  13505. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
  13506. A_UINT32 vdev_id;
  13507. A_UINT32 keepaliveInterval; /* seconds */
  13508. A_UINT32 keepaliveMethod; /* seconds */
  13509. } wmi_vdev_get_keepalive_event_fixed_param;
  13510. typedef enum {
  13511. WMI_CLEAR_ARP_STATS_COLLECTED = 0x0,
  13512. WMI_START_ARP_STATS_COLLECTION,
  13513. } WMI_ARP_STATS_ACTION;
  13514. typedef enum {
  13515. WMI_ARP_STATS_RX_PKT_TYPE_ARP = 0x1,
  13516. } WMI_ARP_STATS_RX_PKT_TYPE;
  13517. typedef enum {
  13518. WMI_BA_SESSION_ESTABLISHMENT_STATUS_SUCCESS = 0x0,
  13519. WMI_BA_SESSION_ESTABLISHMENT_STATUS_FAILURE,
  13520. } WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS;
  13521. typedef enum {
  13522. WMI_CONNECTION_STATUS_FAILURE = 0x0,
  13523. WMI_CONNECTION_STATUS_SUCCESS,
  13524. } WMI_ARP_STATS_CONNECTION_STATUS;
  13525. /* ARP stats set (configure) req */
  13526. typedef struct {
  13527. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param */
  13528. A_UINT32 vdev_id;
  13529. A_UINT32 set_clr; /* WMI_ARP_STATS_ACTION */
  13530. A_UINT32 pkt_type; /* WMI_ARP_STATS_RX_PKT_TYPE */
  13531. A_UINT32 ipv4; /* target will maintain ARP stats (only) for frames containing this IP address */
  13532. } wmi_vdev_set_arp_stats_cmd_fixed_param;
  13533. /* ARP stats get req */
  13534. typedef struct {
  13535. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param */
  13536. A_UINT32 vdev_id;
  13537. } wmi_vdev_get_arp_stats_cmd_fixed_param;
  13538. /* per vdev based ARP stats */
  13539. typedef struct {
  13540. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param */
  13541. A_UINT32 vdev_id;
  13542. A_UINT32 arp_req_enqueue;
  13543. A_UINT32 arp_req_tx_success;
  13544. A_UINT32 arp_req_tx_failure; /* number of times a tx MPDU containing a unicast ARP request went unacked */
  13545. A_UINT32 arp_rsp_recvd;
  13546. A_UINT32 out_of_order_arp_rsp_drop_cnt;
  13547. A_UINT32 dad_detected; /* duplicate address detection */
  13548. A_UINT32 connect_status; /* WMI_ARP_STATS_CONNECTION_STATUS */
  13549. A_UINT32 ba_session_establishment_status; /* WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS */
  13550. } wmi_vdev_get_arp_stats_event_fixed_param;
  13551. typedef struct {
  13552. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_connectivity_check_stats */
  13553. A_UINT32 pkt_type_bitmap; /* WMI_IP_CONNECTIVITY_STATS_RX_PKT_TYPE_BITMAP - only for DNS, TCP and ICMP */
  13554. A_UINT32 tcp_src_port; /* target will maintain TCP stats (only) for frames with this src port */
  13555. A_UINT32 tcp_dst_port; /* target will maintain TCP stats (only) for frames with this dst port */
  13556. A_UINT32 icmp_ipv4; /* target will maintain ICMPv4 stats (only) for frames containing this IP address */
  13557. } wmi_vdev_set_connectivity_check_stats;
  13558. /* per vdev dns/icmp/tcp based stats*/
  13559. typedef struct {
  13560. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_connectivity_check_stats */
  13561. A_UINT32 tcp_ack_recvd; /* number of tcp syn ack's received by FW */
  13562. A_UINT32 icmpv4_rsp_recvd; /* number of icmpv4 responses received by FW */
  13563. } wmi_vdev_get_connectivity_check_stats;
  13564. typedef struct {
  13565. A_UINT32 tlv_header;
  13566. A_UINT32 vdev_id;
  13567. #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
  13568. #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
  13569. A_UINT32 action;
  13570. } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
  13571. typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
  13572. typedef struct {
  13573. A_UINT32 tlv_header;
  13574. A_UINT32 vdev_id;
  13575. A_UINT32 mcc_tbttmode;
  13576. wmi_mac_addr mcc_bssid;
  13577. } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
  13578. #define WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION 10
  13579. #define WMI_MAX_VENDOR_OUI_DATA_LENGTH 20
  13580. typedef enum
  13581. {
  13582. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1 = 0, /* Connect in 1X1 only */
  13583. WMI_VENDOR_OUI_ACTION_ITO_EXTENSION = 1, /* Extend the Immediate Time-Out (ITO) if data is not received from AP after beacon with TIM bit set */
  13584. WMI_VENDOR_OUI_ACTION_CCKM_1X1 = 2, /* TX (only) CCKM rates with 1 chain only */
  13585. WMI_VENDOR_OUI_ACTION_ALT_ITO = 3, /* inactivity time-out */
  13586. WMI_VENDOR_OUI_ACTION_SWITCH_TO_11N_MODE = 4, /* Switch from 11ac to 11n mode to avoid IOT issues with ONM frame */
  13587. /* WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1
  13588. * Connect in 1x1 only and Use only one chain for both Tx and Rx
  13589. * to avoid IOT issues due to change in number of Tx and Rx chains
  13590. */
  13591. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1 = 5,
  13592. /* Disable burst and assist, and restrict A-MPDU size to 32 */
  13593. WMI_VENDOR_OUI_ACTION_DISABLE_AGGRESSIVE_TX = 6,
  13594. /* Add any action before this line */
  13595. WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID
  13596. } wmi_vendor_oui_action_id;
  13597. typedef struct {
  13598. A_UINT32 tlv_header;
  13599. /** vendor OUI actions */
  13600. A_UINT32 action_id; /* enum wmi_vendor_oui_action_id */
  13601. A_UINT32 total_num_vendor_oui; /* total number of OUI present in ini for all actions.
  13602. ** For first command, this value will be used for allocating memory in FW accordingly */
  13603. A_UINT32 num_vendor_oui_ext; /* the number of wmi_vendor_oui_ext for action_id */
  13604. /* followed by TLVs, an array of structure of type wmi_vendor_oui_ext
  13605. ** wmi_vendor_oui_ext vendor_oui_ext[num_vendor_oui_ext];
  13606. */
  13607. /* followed by A_UINT8 data[] of concatenated data for each vendor_oui_ext[] element
  13608. ** first byte contains the index i of structure vendor_oui_ext[]
  13609. ** for which data is coming and length of the data is extracted as
  13610. ** wmi_vendor_oui_ext[i].buf_data_length. No padding between data of
  13611. ** N th OUI and (N+1) th OUI.
  13612. ** For example, if vendor_oui_ext[0].buf_data_length is 18, then
  13613. ** data[0] will hold the index value 0, data[1] through data[17]
  13614. ** will hold the OUI data for this first OUI, data[18] will hold
  13615. ** the index value 1, and the OUI data for the second OUI will
  13616. ** begin at data[19].
  13617. */
  13618. } wmi_pdev_config_vendor_oui_action_fixed_param;
  13619. typedef struct {
  13620. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param */
  13621. /** pdev_id for identifying the MAC
  13622. * See macros starting with WMI_PDEV_ID_ for values.
  13623. */
  13624. A_UINT32 pdev_id;
  13625. /** AC number */
  13626. A_UINT32 ac; /* refer to wmi_traffic_ac */
  13627. /**
  13628. * Enable/disable tx queue optimizations (such as dropping stale tx frms)
  13629. * for the specified AC.
  13630. */
  13631. A_UINT32 ac_tx_queue_optimize_enable;
  13632. } wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param;
  13633. typedef struct {
  13634. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param */
  13635. /** pdev_id for identifying the MAC
  13636. * See macros starting with WMI_PDEV_ID_ for values.
  13637. */
  13638. A_UINT32 pdev_id;
  13639. /** Enable/disable rx filter promiscuous */
  13640. A_UINT32 rx_filter_promiscuous_enable;
  13641. } wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param;
  13642. typedef enum {
  13643. WMI_BEACON_INFO_PRESENCE_OUI_EXT = 1 << 0,
  13644. WMI_BEACON_INFO_PRESENCE_MAC_ADDRESS = 1 << 1,
  13645. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_NSS = 1 << 2,
  13646. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_HT = 1 << 3,
  13647. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_VHT = 1 << 4,
  13648. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_BAND = 1 << 5,
  13649. } wmi_beacon_info_presence_items;
  13650. typedef struct _wmi_vendor_oui_ext {
  13651. A_UINT32 tlv_header;
  13652. A_UINT32 buf_data_length; /* length of data in bytes for this OUI including index byte */
  13653. A_UINT32 info_presence_bit_mask; /* see enum wmi_beacon_info_presence_items */
  13654. A_UINT32 oui_header_length; /* either 3 or 5 bytes */
  13655. A_UINT32 oui_data_length; /* length of oui_data to compare in beacon which follows OUI header. Max length is capped to WMI_MAX_VENDOR_OUI_DATA_LENGTH bytes */
  13656. A_UINT32 mac_address_length; /* MAC address length in bytes
  13657. ** (This value will always be 6,
  13658. ** but is explicitly specified for sake
  13659. ** of uniformity and completeness).
  13660. */
  13661. A_UINT32 capability_data_length; /* length of capability in bytes */
  13662. } wmi_vendor_oui_ext;
  13663. #define WMI_INFO_CAPABILITY_NSS_MASK 0x0f
  13664. #define WMI_INFO_CAPABILITY_NSS_OFFSET 0
  13665. #define WMI_INFO_CAPABILITY_HT_ENABLE_MASK 0x10
  13666. #define WMI_INFO_CAPABILITY_HT_ENABLE_OFFSET 4
  13667. #define WMI_INFO_CAPABILITY_VHT_ENABLE_MASK 0x20
  13668. #define WMI_INFO_CAPABILITY_VHT_ENABLE_OFFSET 5
  13669. #define WMI_INFO_CAPABILITY_BAND_MASK 0xc0
  13670. #define WMI_INFO_CAPABILITY_BAND_OFFSET 6
  13671. /* definition of WMI_INFO_CAPABILITY_NSS_MASK */
  13672. #define WMI_INFO_CAPABILITY_NSS_1X1 1
  13673. #define WMI_INFO_CAPABILITY_NSS_2X2 2
  13674. #define WMI_INFO_CAPABILITY_NSS_3X3 3
  13675. #define WMI_INFO_CAPABILITY_NSS_4X4 4
  13676. /* definition of WMI_INFO_CAPABILITY_BAND_MASK */
  13677. #define WMI_INFO_CAPABILITY_2G_BAND_MASK (1 << 0)
  13678. #define WMI_INFO_CAPABILITY_5G_BAND_MASK (1 << 1)
  13679. typedef struct {
  13680. A_UINT32 tlv_header;
  13681. A_UINT32 vdev_id; /* home vdev id */
  13682. A_UINT32 meas_token; /* from measure request frame */
  13683. A_UINT32 dialog_token;
  13684. A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
  13685. A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst*/
  13686. A_UINT32 burst_cycle; /* times cycle through within one burst */
  13687. A_UINT32 tx_power; /* for path frame */
  13688. A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
  13689. wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
  13690. A_UINT32 num_chans;
  13691. /*
  13692. * This fixed_param TLV is followed by other TLVs:
  13693. * A_UINT32 channel_list[num_chans]; // in MHz
  13694. */
  13695. } wmi_vdev_plmreq_start_cmd_fixed_param;
  13696. typedef struct {
  13697. A_UINT32 tlv_header;
  13698. A_UINT32 vdev_id;
  13699. A_UINT32 meas_token; /* same value from req*/
  13700. } wmi_vdev_plmreq_stop_cmd_fixed_param;
  13701. typedef struct {
  13702. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
  13703. A_UINT32 tlv_header;
  13704. /* unique id identifying the VDEV, generated by the caller */
  13705. A_UINT32 vdev_id;
  13706. /* enable/disable NoA */
  13707. A_UINT32 enable;
  13708. /** number of NoA desc. In the TLV noa_descriptor[] */
  13709. A_UINT32 num_noa;
  13710. /**
  13711. * TLV (tag length value) paramerters follow the pattern structure.
  13712. * TLV contain NoA desc with num of num_noa
  13713. */
  13714. } wmi_p2p_set_noa_cmd_fixed_param;
  13715. typedef struct {
  13716. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
  13717. A_UINT32 tlv_header;
  13718. /* unique id identifying the VDEV, generated by the caller */
  13719. A_UINT32 vdev_id;
  13720. /* Identify the wlan module */
  13721. A_UINT32 module_id;
  13722. /* Num of test arguments passed */
  13723. A_UINT32 num_args;
  13724. /* unique id identifying the unit test cmd, generated by the caller */
  13725. A_UINT32 diag_token;
  13726. /**
  13727. * TLV (tag length value) parameters follow the wmi_unit_test_cmd_fixed_param
  13728. * structure. The TLV's are:
  13729. * A_UINT32 args[];
  13730. **/
  13731. } wmi_unit_test_cmd_fixed_param;
  13732. /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
  13733. * after it received WMI_ROAM_SYNCH_EVENTID.
  13734. */
  13735. typedef struct {
  13736. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
  13737. /** unique id identifying the VDEV, generated by the caller */
  13738. A_UINT32 vdev_id;
  13739. } wmi_roam_synch_complete_fixed_param;
  13740. typedef enum {
  13741. RECOVERY_SIM_ASSERT = 0x01,
  13742. RECOVERY_SIM_NO_DETECT = 0x02,
  13743. RECOVERY_SIM_CTR_EP_FULL = 0x03,
  13744. RECOVERY_SIM_EMPTY_POINT = 0x04,
  13745. RECOVERY_SIM_STACK_OV = 0x05,
  13746. RECOVERY_SIM_INFINITE_LOOP = 0x06,
  13747. RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
  13748. RECOVERY_SIM_SELF_RECOVERY = 0x08,
  13749. } RECOVERY_SIM_TYPE;
  13750. /* WMI_FORCE_FW_HANG_CMDID */
  13751. typedef struct {
  13752. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
  13753. A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:...*/
  13754. A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
  13755. } WMI_FORCE_FW_HANG_CMD_fixed_param;
  13756. typedef enum {
  13757. WMI_MCAST_FILTER_SET = 1,
  13758. WMI_MCAST_FILTER_DELETE
  13759. } WMI_SET_SINGLE_MCAST_FILTER_OP;
  13760. typedef struct {
  13761. A_UINT32 tlv_header;
  13762. A_UINT32 vdev_id;
  13763. A_UINT32 index;
  13764. A_UINT32 action;
  13765. wmi_mac_addr mcastbdcastaddr;
  13766. } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
  13767. typedef enum {
  13768. WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
  13769. WMI_MULTIPLE_MCAST_FILTER_SET, /* clear all previous mc list, and set new list */
  13770. WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
  13771. WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
  13772. } WMI_MULTIPLE_MCAST_FILTER_OP;
  13773. typedef struct {
  13774. A_UINT32 tlv_header;
  13775. A_UINT32 vdev_id;
  13776. A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
  13777. A_UINT32 num_mcastaddrs; /* number of elements in the subsequent mcast addr list */
  13778. /**
  13779. * TLV (tag length value) parameters follow the
  13780. * structure. The TLV's are:
  13781. * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
  13782. */
  13783. } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
  13784. /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
  13785. typedef enum {
  13786. WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
  13787. WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
  13788. } WMI_TIME_STAMP_SYNC_MODE;
  13789. typedef struct {
  13790. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param */
  13791. A_UINT32 mode; /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
  13792. A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
  13793. A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
  13794. } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
  13795. /* GPIO Command and Event data structures */
  13796. /* WMI_GPIO_CONFIG_CMDID */
  13797. enum {
  13798. WMI_GPIO_PULL_NONE,
  13799. WMI_GPIO_PULL_UP,
  13800. WMI_GPIO_PULL_DOWN,
  13801. };
  13802. enum {
  13803. WMI_GPIO_INTTYPE_DISABLE,
  13804. WMI_GPIO_INTTYPE_RISING_EDGE,
  13805. WMI_GPIO_INTTYPE_FALLING_EDGE,
  13806. WMI_GPIO_INTTYPE_BOTH_EDGE,
  13807. WMI_GPIO_INTTYPE_LEVEL_LOW,
  13808. WMI_GPIO_INTTYPE_LEVEL_HIGH
  13809. };
  13810. typedef struct {
  13811. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
  13812. A_UINT32 gpio_num; /* GPIO number to be setup */
  13813. A_UINT32 input; /* 0 - Output/ 1 - Input */
  13814. A_UINT32 pull_type; /* Pull type defined above */
  13815. A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
  13816. /* mux_config_val - configure pin MUX
  13817. * A value of 0x0 for this field means to use the default MUX configuration.
  13818. * Valid non-zero values are as follows:
  13819. * Rome:
  13820. * 0x4 - use the pin as GPIO (rather than UART)
  13821. */
  13822. A_UINT32 mux_config_val;
  13823. } wmi_gpio_config_cmd_fixed_param;
  13824. /* WMI_GPIO_OUTPUT_CMDID */
  13825. typedef struct {
  13826. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
  13827. A_UINT32 gpio_num; /* GPIO number to be setup */
  13828. A_UINT32 set; /* Set the GPIO pin*/
  13829. } wmi_gpio_output_cmd_fixed_param;
  13830. /* WMI_GPIO_INPUT_EVENTID */
  13831. typedef struct {
  13832. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
  13833. A_UINT32 gpio_num; /* GPIO number which changed state */
  13834. } wmi_gpio_input_event_fixed_param;
  13835. /* WMI_P2P_DISC_EVENTID */
  13836. enum {
  13837. P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
  13838. P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
  13839. };
  13840. enum {
  13841. P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload*/
  13842. P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload*/
  13843. P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload*/
  13844. };
  13845. enum {
  13846. P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
  13847. P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
  13848. };
  13849. typedef struct {
  13850. A_UINT32 vdev_id;
  13851. A_UINT32 reason; /* P2P DISC wake up reason*/
  13852. } wmi_p2p_disc_event;
  13853. typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param WOW_EVENT_INFO_SECTION_GTKIGTK;
  13854. typedef enum {
  13855. WMI_FAKE_TXBFER_SEND_NDPA,
  13856. WMI_FAKE_TXBFER_SEND_MU,
  13857. WMI_FAKE_TXBFER_NDPA_FBTYPE,
  13858. WMI_FAKE_TXBFER_NDPA_NCIDX,
  13859. WMI_FAKE_TXBFER_NDPA_POLL,
  13860. WMI_FAKE_TXBFER_NDPA_BW,
  13861. WMI_FAKE_TXBFER_NDPA_PREAMBLE,
  13862. WMI_FAKE_TXBFER_NDPA_RATE,
  13863. WMI_FAKE_TXBFER_NDP_BW,
  13864. WMI_FAKE_TXBFER_NDP_NSS,
  13865. WMI_TXBFEE_ENABLE_UPLOAD_H,
  13866. WMI_TXBFEE_ENABLE_CAPTURE_H,
  13867. WMI_TXBFEE_SET_CBF_TBL,
  13868. WMI_TXBFEE_CBF_TBL_LSIG,
  13869. WMI_TXBFEE_CBF_TBL_SIGA1,
  13870. WMI_TXBFEE_CBF_TBL_SIGA2,
  13871. WMI_TXBFEE_CBF_TBL_SIGB,
  13872. WMI_TXBFEE_CBF_TBL_PAD,
  13873. WMI_TXBFEE_CBF_TBL_DUR,
  13874. WMI_TXBFEE_SU_NCIDX,
  13875. WMI_TXBFEE_CBIDX,
  13876. WMI_TXBFEE_NGIDX,
  13877. } WMI_TXBF_PARAM_ID;
  13878. typedef struct {
  13879. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
  13880. /** parameter id */
  13881. A_UINT32 param_id;
  13882. /** parameter value */
  13883. A_UINT32 param_value;
  13884. } wmi_txbf_cmd_fixed_param;
  13885. typedef struct {
  13886. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
  13887. A_UINT32 h_length;
  13888. A_UINT32 cv_length;
  13889. /* This TLV is followed by array of bytes:
  13890. * A_UINT8 bufp[]; <-- h_cv info buffer
  13891. */
  13892. } wmi_upload_h_hdr;
  13893. typedef struct {
  13894. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
  13895. A_UINT32 svd_num;
  13896. A_UINT32 tone_num;
  13897. A_UINT32 reserved;
  13898. } wmi_capture_h_event_hdr;
  13899. typedef struct {
  13900. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
  13901. A_UINT32 start_freq; /* start frequency, not channel center freq */
  13902. A_UINT32 end_freq; /* end frequency */
  13903. } wmi_avoid_freq_range_desc;
  13904. typedef struct {
  13905. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
  13906. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  13907. A_UINT32 num_freq_ranges;
  13908. /* The TLVs will follow.
  13909. * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
  13910. * wmi_avoid_freq_range_desc avd_freq_range[]; <-- message buffer, NULL terminated
  13911. */
  13912. } wmi_avoid_freq_ranges_event_fixed_param;
  13913. enum {
  13914. WMI_SAR2_SUCCESS = 0,
  13915. WMI_SAR2_INVALID_ANTENNA_INDEX = 1,
  13916. WMI_SAR2_INVALID_TABLE_INDEX = 2,
  13917. WMI_SAR2_STATE_ERROR = 4,
  13918. WMI_SAR2_BDF_NO_TABLE = 8,
  13919. };
  13920. typedef struct {
  13921. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param */
  13922. A_UINT32 result; /* refer to the above WMI_SAR2_ result definitions */
  13923. } wmi_sar2_result_event_fixed_param;
  13924. typedef struct {
  13925. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
  13926. /** Reserved for future use */
  13927. A_UINT32 reserved0;
  13928. A_UINT32 vdev_id;
  13929. } wmi_gtk_rekey_fail_event_fixed_param;
  13930. typedef enum WLAN_COEX_EVENT {
  13931. WLAN_COEX_EVENT_BT_NONE = 0,
  13932. WLAN_COEX_EVENT_BT_A2DP_PROFILE_ADD = 1,
  13933. WLAN_COEX_EVENT_BT_A2DP_PROFILE_REMOVE = 2,
  13934. WLAN_COEX_EVENT_BT_VOICE_PROFILE_ADD = 3,
  13935. WLAN_COEX_EVENT_BT_VOICE_PROFILE_REMOVE = 4,
  13936. WLAN_COEX_EVENT_BT_SCAN_START = 5,
  13937. WLAN_COEX_EVENT_BT_SCAN_STOP = 6,
  13938. }WLAN_COEX_EVENT;
  13939. typedef struct {
  13940. A_UINT32 tlv_header;
  13941. A_UINT32 coex_profile_evt; //uses the enum values form WLAN_COEX_EVENT
  13942. } wmi_coex_bt_activity_event_fixed_param;
  13943. enum wmm_ac_downgrade_policy {
  13944. WMM_AC_DOWNGRADE_DEPRIO,
  13945. WMM_AC_DOWNGRADE_DROP,
  13946. WMM_AC_DOWNGRADE_INVALID,
  13947. };
  13948. /* WMM EDCA Params type */
  13949. #define WMM_PARAM_TYPE_LEGACY 0
  13950. /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
  13951. #define WMM_PARAM_TYPE_11AX_EDCA 1
  13952. typedef struct {
  13953. A_UINT32 tlv_header;
  13954. A_UINT32 cwmin;
  13955. A_UINT32 cwmax;
  13956. A_UINT32 aifs;
  13957. union {
  13958. A_UINT32 txoplimit;
  13959. A_UINT32 mu_edca_timer;
  13960. };
  13961. A_UINT32 acm;
  13962. A_UINT32 no_ack;
  13963. } wmi_wmm_vparams;
  13964. typedef struct {
  13965. A_UINT32 tlv_header;
  13966. A_UINT32 vdev_id;
  13967. wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
  13968. A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
  13969. } wmi_vdev_set_wmm_params_cmd_fixed_param;
  13970. typedef struct {
  13971. A_UINT32 tlv_header;
  13972. A_UINT32 vdev_id;
  13973. A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
  13974. A_UINT32 userGtxMask; /* host request for GTX mask */
  13975. A_UINT32 gtxPERThreshold; /* default: 10% */
  13976. A_UINT32 gtxPERMargin; /* default: 2% */
  13977. A_UINT32 gtxTPCstep; /* default: 1 */
  13978. A_UINT32 gtxTPCMin; /* default: 5 */
  13979. A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
  13980. } wmi_vdev_set_gtx_params_cmd_fixed_param;
  13981. typedef struct
  13982. {
  13983. A_UINT32 tlv_header;
  13984. A_UINT32 vdev_id;
  13985. A_UINT32 ac;
  13986. A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
  13987. A_UINT32 downgrade_type;
  13988. } wmi_vdev_wmm_addts_cmd_fixed_param;
  13989. typedef struct
  13990. {
  13991. A_UINT32 tlv_header;
  13992. A_UINT32 vdev_id;
  13993. A_UINT32 ac;
  13994. } wmi_vdev_wmm_delts_cmd_fixed_param;
  13995. /* DEPRECATED */
  13996. typedef struct {
  13997. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
  13998. /** Reserved for future use */
  13999. A_UINT32 reserved0;
  14000. } wmi_pdev_dfs_enable_cmd_fixed_param;
  14001. /* DEPRECATED */
  14002. typedef struct {
  14003. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
  14004. /** pdev_id for identifying the MAC
  14005. * See macros starting with WMI_PDEV_ID_ for values.
  14006. */
  14007. A_UINT32 pdev_id;
  14008. } wmi_pdev_dfs_disable_cmd_fixed_param;
  14009. typedef struct {
  14010. /** TLV tag and len; tag equals
  14011. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
  14012. */
  14013. A_UINT32 tlv_header;
  14014. /** pdev_id for identifying the MAC
  14015. * See macros starting with WMI_PDEV_ID_ for values.
  14016. */
  14017. A_UINT32 pdev_id;
  14018. } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
  14019. typedef struct {
  14020. /** TLV tag and len; tag equals
  14021. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
  14022. */
  14023. A_UINT32 tlv_header;
  14024. /** pdev_id for identifying the MAC
  14025. * See macros starting with WMI_PDEV_ID_ for values.
  14026. */
  14027. A_UINT32 pdev_id;
  14028. } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
  14029. typedef struct {
  14030. A_UINT32 tlv_header;
  14031. A_UINT32 pdev_id;
  14032. } wmi_pdev_dfs_phyerr_offload_enable_cmd_fixed_param;
  14033. typedef struct {
  14034. A_UINT32 tlv_header;
  14035. A_UINT32 pdev_id;
  14036. } wmi_pdev_dfs_phyerr_offload_disable_cmd_fixed_param;
  14037. typedef enum {
  14038. QUICK_OCAC = 0,
  14039. EXTENSIVE_OCAC,
  14040. } WMI_ADFS_OCAC_MODE;
  14041. typedef struct {
  14042. A_UINT32 tlv_header;
  14043. A_UINT32 vdev_id;
  14044. A_UINT32 ocac_mode; /* WMI_ADFS_OCAC_MODE */
  14045. A_UINT32 min_duration_ms; /* in milliseconds */
  14046. A_UINT32 max_duration_ms; /* in milliseconds */
  14047. A_UINT32 chan_freq; /* in MHz */
  14048. A_UINT32 chan_width; /* in MHz */
  14049. A_UINT32 center_freq; /* in MHz */
  14050. } wmi_vdev_adfs_ch_cfg_cmd_fixed_param;
  14051. typedef struct {
  14052. A_UINT32 tlv_header;
  14053. A_UINT32 vdev_id;
  14054. } wmi_vdev_adfs_ocac_abort_cmd_fixed_param;
  14055. typedef enum {
  14056. IN_SERVICE_MODE = 0,
  14057. OCAC_MODE,
  14058. } WMI_DFS_RADAR_DETECTION_MODE;
  14059. typedef struct {
  14060. A_UINT32 tlv_header;
  14061. A_UINT32 pdev_id;
  14062. /* In-service mode or O-CAC mode */
  14063. A_UINT32 detection_mode; /* WMI_DFS_RADAR_DETECTION_MODE */
  14064. A_UINT32 chan_freq; /* in MHz */
  14065. A_UINT32 chan_width; /* in MHz */
  14066. A_UINT32 detector_id;
  14067. A_UINT32 segment_id;
  14068. A_UINT32 timestamp;
  14069. A_UINT32 is_chirp;
  14070. A_INT32 freq_offset; /* in MHz */
  14071. A_INT32 sidx; /* segment index (where was the radar within the channel) */
  14072. } wmi_pdev_dfs_radar_detection_event_fixed_param;
  14073. typedef enum {
  14074. OCAC_COMPLETE = 0,
  14075. OCAC_ABORT,
  14076. } WMI_VDEV_OCAC_COMPLETE_STATUS;
  14077. typedef struct {
  14078. A_UINT32 tlv_header;
  14079. A_UINT32 vdev_id;
  14080. A_UINT32 chan_freq; /* in MHz */
  14081. A_UINT32 chan_width; /* in MHz */
  14082. A_UINT32 center_freq; /* in MHz */
  14083. A_UINT32 status; /* WMI_VDEV_OCAC_COMPLETE_STATUS */
  14084. } wmi_vdev_adfs_ocac_complete_event_fixed_param;
  14085. typedef struct {
  14086. A_UINT32 tlv_header;
  14087. A_UINT32 vdev_id;
  14088. } wmi_vdev_dfs_cac_complete_event_fixed_param;
  14089. /** TDLS COMMANDS */
  14090. /* WMI_TDLS_SET_STATE_CMDID */
  14091. /* TDLS State */
  14092. enum wmi_tdls_state {
  14093. /** TDLS disable */
  14094. WMI_TDLS_DISABLE,
  14095. /** TDLS enabled - no firmware connection tracking/notifications */
  14096. WMI_TDLS_ENABLE_PASSIVE,
  14097. /** TDLS enabled - with firmware connection tracking/notifications */
  14098. WMI_TDLS_ENABLE_ACTIVE,
  14099. /** TDLS enabled - firmware waits for peer mac for connection tracking */
  14100. WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
  14101. /** TDLS enabled - TDLS connection tracking is done in host */
  14102. WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
  14103. };
  14104. /* TDLS Options */
  14105. #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
  14106. #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
  14107. #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
  14108. typedef struct {
  14109. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
  14110. A_UINT32 tlv_header;
  14111. /** unique id identifying the VDEV */
  14112. A_UINT32 vdev_id;
  14113. /** Enable/Disable TDLS (wmi_tdls_state) */
  14114. A_UINT32 state;
  14115. /** Duration (in ms) over which to calculate tx/rx threshold to trigger TDLS Discovery */
  14116. A_UINT32 notification_interval_ms;
  14117. /** number of packets OVER which notify/suggest TDLS Discovery:
  14118. * if current tx pps counter / notification interval >= threshold
  14119. * then a notification will be sent to host to advise TDLS Discovery */
  14120. A_UINT32 tx_discovery_threshold;
  14121. /** number of packets UNDER which notify/suggest TDLS Teardown:
  14122. * if current tx pps counter / notification interval < threshold
  14123. * then a notification will be sent to host to advise TDLS Tear down */
  14124. A_UINT32 tx_teardown_threshold;
  14125. /** Absolute RSSI value under which notify/suggest TDLS Teardown */
  14126. A_INT32 rssi_teardown_threshold;
  14127. /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
  14128. A_INT32 rssi_delta;
  14129. /** TDLS Option Control
  14130. * Off-Channel, Buffer STA, (later)Sleep STA support */
  14131. A_UINT32 tdls_options;
  14132. /* Buffering time in number of beacon intervals */
  14133. A_UINT32 tdls_peer_traffic_ind_window;
  14134. /* Wait time for PTR frame */
  14135. A_UINT32 tdls_peer_traffic_response_timeout_ms;
  14136. /* Self PUAPSD mask */
  14137. A_UINT32 tdls_puapsd_mask;
  14138. /* Inactivity timeout */
  14139. A_UINT32 tdls_puapsd_inactivity_time_ms;
  14140. /* Max of rx frame during SP */
  14141. A_UINT32 tdls_puapsd_rx_frame_threshold;
  14142. /**Duration (in ms) over which to check whether TDLS link needs to be torn down */
  14143. A_UINT32 teardown_notification_ms;
  14144. /** STA kickout threshold for TDLS peer */
  14145. A_UINT32 tdls_peer_kickout_threshold;
  14146. /* TDLS discovery WAKE timeout in ms.
  14147. * DUT will wake until this timeout to receive TDLS discovery response
  14148. * from peer.
  14149. * If tdls_discovery_wake_timeout is 0x0, the DUT will choose autonomously
  14150. * what wake timeout value to use.
  14151. */
  14152. A_UINT32 tdls_discovery_wake_timeout;
  14153. } wmi_tdls_set_state_cmd_fixed_param;
  14154. /* WMI_TDLS_PEER_UPDATE_CMDID */
  14155. enum wmi_tdls_peer_state {
  14156. /** tx peer TDLS link setup now starting, traffic to DA should be
  14157. * paused (except TDLS frames) until state is moved to CONNECTED (or
  14158. * TEARDOWN on setup failure) */
  14159. WMI_TDLS_PEER_STATE_PEERING,
  14160. /** tx peer TDLS link established, running (all traffic to DA unpaused) */
  14161. WMI_TDLS_PEER_STATE_CONNECTED,
  14162. /** tx peer TDLS link tear down started (link paused, any frames
  14163. * queued for DA will be requeued back through the AP)*/
  14164. WMI_TDLS_PEER_STATE_TEARDOWN,
  14165. /** Add peer mac into connection table */
  14166. WMI_TDLS_PEER_ADD_MAC_ADDR,
  14167. /** Remove peer mac from connection table */
  14168. WMI_TDLS_PEER_REMOVE_MAC_ADDR,
  14169. };
  14170. /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
  14171. #define WMI_TDLS_MAX_SUPP_CHANNELS 128
  14172. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  14173. typedef struct {
  14174. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
  14175. A_UINT32 tlv_header;
  14176. /* Peer's QoS Info - for U-APSD */
  14177. /* AC FLAGS - accessed through macros below */
  14178. /* Ack, SP, More Data Ack - accessed through macros below */
  14179. A_UINT32 peer_qos;
  14180. /*TDLS Peer's U-APSD Buffer STA Support*/
  14181. A_UINT32 buff_sta_support;
  14182. /*TDLS off channel related params */
  14183. A_UINT32 off_chan_support;
  14184. A_UINT32 peer_curr_operclass;
  14185. A_UINT32 self_curr_operclass;
  14186. /* Number of channels available for off channel operation */
  14187. A_UINT32 peer_chan_len;
  14188. A_UINT32 peer_operclass_len;
  14189. A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  14190. /* Is peer initiator or responder of TDLS setup request */
  14191. A_UINT32 is_peer_responder;
  14192. /* Preferred off channel number as configured by user */
  14193. A_UINT32 pref_offchan_num;
  14194. /* Preferred off channel bandwidth as configured by user */
  14195. A_UINT32 pref_offchan_bw;
  14196. /* Preferred off channel frequency in MHz as configured by user */
  14197. A_UINT32 pref_offchan_freq;
  14198. /** Followed by the variable length TLV peer_chan_list:
  14199. * wmi_channel peer_chan_list[].
  14200. * Array size would be peer_chan_len.
  14201. * This array is intersected channels which is supported by both peer
  14202. * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
  14203. * FW shall compute BW for an offchan based on peer's ht/vht cap
  14204. * received in peer_assoc cmd during change STA operation
  14205. */
  14206. } wmi_tdls_peer_capabilities;
  14207. #define WMI_TDLS_QOS_VO_FLAG 0
  14208. #define WMI_TDLS_QOS_VI_FLAG 1
  14209. #define WMI_TDLS_QOS_BK_FLAG 2
  14210. #define WMI_TDLS_QOS_BE_FLAG 3
  14211. #define WMI_TDLS_QOS_ACK_FLAG 4
  14212. #define WMI_TDLS_QOS_SP_FLAG 5
  14213. #define WMI_TDLS_QOS_MOREDATA_FLAG 7
  14214. #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \
  14215. (ppeer_caps)->peer_qos |= (1 << flag); \
  14216. } while (0)
  14217. #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag) \
  14218. (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
  14219. #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  14220. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  14221. #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  14222. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  14223. #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  14224. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  14225. #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  14226. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  14227. #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  14228. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  14229. #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  14230. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  14231. #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  14232. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  14233. #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  14234. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  14235. #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  14236. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  14237. #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  14238. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  14239. /* SP has 2 bits */
  14240. #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \
  14241. (ppeer_caps)->peer_qos |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  14242. } while (0)
  14243. #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
  14244. (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  14245. #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  14246. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  14247. #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  14248. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  14249. #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \
  14250. (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
  14251. } while (0)
  14252. #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag) \
  14253. (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
  14254. #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  14255. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  14256. #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  14257. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  14258. #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  14259. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  14260. #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  14261. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  14262. #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
  14263. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  14264. #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
  14265. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  14266. #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  14267. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  14268. #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  14269. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  14270. #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  14271. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  14272. #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  14273. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  14274. /* SP has 2 bits */
  14275. #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \
  14276. (pset_cmd)->tdls_puapsd_mask |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  14277. } while (0)
  14278. #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
  14279. (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  14280. #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  14281. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  14282. #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  14283. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  14284. typedef struct {
  14285. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
  14286. A_UINT32 tlv_header;
  14287. /** unique id identifying the VDEV */
  14288. A_UINT32 vdev_id;
  14289. /** peer MAC address */
  14290. wmi_mac_addr peer_macaddr;
  14291. /** new TDLS state for peer (wmi_tdls_peer_state) */
  14292. A_UINT32 peer_state;
  14293. /* The TLV for wmi_tdls_peer_capabilities will follow.
  14294. * wmi_tdls_peer_capabilities peer_caps;
  14295. */
  14296. /** Followed by the variable length TLV chan_info:
  14297. * wmi_channel chan_info[] */
  14298. } wmi_tdls_peer_update_cmd_fixed_param;
  14299. /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
  14300. /* bitmap 20, 40, 80 or 160 MHz wide channel */
  14301. #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
  14302. #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
  14303. #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
  14304. #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
  14305. enum wmi_tdls_offchan_mode {
  14306. WMI_TDLS_ENABLE_OFFCHANNEL,
  14307. WMI_TDLS_DISABLE_OFFCHANNEL
  14308. };
  14309. typedef struct {
  14310. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
  14311. A_UINT32 tlv_header;
  14312. /** unique id identifying the VDEV */
  14313. A_UINT32 vdev_id;
  14314. /** Enable/Disable TDLS offchannel */
  14315. A_UINT32 offchan_mode;
  14316. /** peer MAC address */
  14317. wmi_mac_addr peer_macaddr;
  14318. /* Is peer initiator or responder of TDLS setup request */
  14319. A_UINT32 is_peer_responder;
  14320. /* off channel number*/
  14321. A_UINT32 offchan_num;
  14322. /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
  14323. A_UINT32 offchan_bw_bitmap;
  14324. /* operating class for offchan */
  14325. A_UINT32 offchan_oper_class;
  14326. /* off channel frequency in MHz */
  14327. A_UINT32 offchan_freq;
  14328. } wmi_tdls_set_offchan_mode_cmd_fixed_param;
  14329. /** TDLS EVENTS */
  14330. enum wmi_tdls_peer_notification {
  14331. /** tdls discovery recommended for peer (based
  14332. * on tx bytes per second > tx_discover threshold) */
  14333. WMI_TDLS_SHOULD_DISCOVER,
  14334. /** tdls link tear down recommended for peer
  14335. * due to tx bytes per second below tx_teardown_threshold
  14336. * NB: this notification sent once */
  14337. WMI_TDLS_SHOULD_TEARDOWN,
  14338. /** tx peer TDLS link tear down complete */
  14339. WMI_TDLS_PEER_DISCONNECTED,
  14340. /** TDLS/BT role change notification for connection tracker */
  14341. WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
  14342. };
  14343. enum wmi_tdls_peer_reason {
  14344. /** tdls teardown recommended due to low transmits */
  14345. WMI_TDLS_TEARDOWN_REASON_TX,
  14346. /** tdls link tear down recommended due to poor RSSI */
  14347. WMI_TDLS_TEARDOWN_REASON_RSSI,
  14348. /** tdls link tear down recommended due to offchannel scan */
  14349. WMI_TDLS_TEARDOWN_REASON_SCAN,
  14350. /** tdls peer disconnected due to peer deletion */
  14351. WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
  14352. /** tdls peer disconnected due to PTR timeout */
  14353. WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
  14354. /** tdls peer disconnected due wrong PTR format */
  14355. WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
  14356. /** tdls peer not responding */
  14357. WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
  14358. /** tdls entered buffer STA role, TDLS connection tracker needs to handle this */
  14359. WMI_TDLS_ENTER_BUF_STA,
  14360. /** tdls exited buffer STA role, TDLS connection tracker needs to handle this */
  14361. WMI_TDLS_EXIT_BUF_STA,
  14362. /** BT entered busy mode, TDLS connection tracker needs to handle this */
  14363. WMI_TDLS_ENTER_BT_BUSY_MODE,
  14364. /** BT exited busy mode, TDLS connection tracker needs to handle this */
  14365. WMI_TDLS_EXIT_BT_BUSY_MODE,
  14366. /** TDLS module received a scan start event, TDLS connection tracker needs to handle this */
  14367. WMI_TDLS_SCAN_STARTED_EVENT,
  14368. /** TDLS module received a scan complete event, TDLS connection tracker needs to handle this */
  14369. WMI_TDLS_SCAN_COMPLETED_EVENT,
  14370. };
  14371. /* WMI_TDLS_PEER_EVENTID */
  14372. typedef struct {
  14373. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
  14374. A_UINT32 tlv_header;
  14375. /** peer MAC address */
  14376. wmi_mac_addr peer_macaddr;
  14377. /** TDLS peer status (wmi_tdls_peer_notification)*/
  14378. A_UINT32 peer_status;
  14379. /** TDLS peer reason (wmi_tdls_peer_reason) */
  14380. A_UINT32 peer_reason;
  14381. /** unique id identifying the VDEV */
  14382. A_UINT32 vdev_id;
  14383. } wmi_tdls_peer_event_fixed_param;
  14384. /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
  14385. don't use this for any new implementations */
  14386. typedef struct {
  14387. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
  14388. /** unique id identifying the VDEV, generated by the caller */
  14389. A_UINT32 vdev_id;
  14390. /* New beacon interval to be used for the specified VDEV suggested by firmware */
  14391. A_UINT32 new_bcn_intvl;
  14392. } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
  14393. /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
  14394. typedef struct {
  14395. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
  14396. A_UINT32 tlv_header;
  14397. /** 1: enable fw based adaptive ocs,
  14398. * 0: disable fw based adaptive ocs
  14399. */
  14400. A_UINT32 enable;
  14401. /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
  14402. union {
  14403. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  14404. /** pdev_id for identifying the MAC
  14405. * See macros starting with WMI_PDEV_ID_ for values.
  14406. */
  14407. A_UINT32 pdev_id;
  14408. };
  14409. } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
  14410. /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
  14411. typedef struct {
  14412. /* Frequency of the channel for which the quota is set */
  14413. A_UINT32 chan_mhz;
  14414. /* Requested channel time quota expressed as percentage */
  14415. A_UINT32 channel_time_quota;
  14416. } wmi_resmgr_chan_time_quota;
  14417. typedef struct {
  14418. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
  14419. A_UINT32 tlv_header;
  14420. /** number of channel time quota command structures
  14421. * (wmi_resmgr_chan_time_quota) 1 or 2
  14422. */
  14423. A_UINT32 num_chans;
  14424. /* This TLV is followed by another TLV of array of bytes
  14425. * A_UINT8 data[];
  14426. * This data array contains
  14427. * num_chans * size of(struct wmi_resmgr_chan_time_quota)
  14428. */
  14429. } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
  14430. /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
  14431. typedef struct {
  14432. /* Frequency of the channel for which the latency is set */
  14433. A_UINT32 chan_mhz;
  14434. /* Requested channel latency in milliseconds */
  14435. A_UINT32 latency;
  14436. } wmi_resmgr_chan_latency;
  14437. typedef struct {
  14438. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
  14439. A_UINT32 tlv_header;
  14440. /** number of channel latency command structures
  14441. * (wmi_resmgr_chan_latency) 1 or 2
  14442. */
  14443. A_UINT32 num_chans;
  14444. /* This TLV is followed by another TLV of array of bytes
  14445. * A_UINT8 data[];
  14446. * This data array contains
  14447. * num_chans * size of(struct wmi_resmgr_chan_latency)
  14448. */
  14449. } wmi_resmgr_set_chan_latency_cmd_fixed_param;
  14450. /* WMI_STA_SMPS_FORCE_MODE_CMDID */
  14451. /** STA SMPS Forced Mode */
  14452. typedef enum {
  14453. WMI_SMPS_FORCED_MODE_NONE = 0,
  14454. WMI_SMPS_FORCED_MODE_DISABLED,
  14455. WMI_SMPS_FORCED_MODE_STATIC,
  14456. WMI_SMPS_FORCED_MODE_DYNAMIC
  14457. } wmi_sta_smps_forced_mode;
  14458. typedef struct {
  14459. /** TLV tag and len; tag equals
  14460. * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
  14461. A_UINT32 tlv_header;
  14462. /** Unique id identifying the VDEV */
  14463. A_UINT32 vdev_id;
  14464. /** The mode of SMPS that is to be forced in the FW. */
  14465. A_UINT32 forced_mode;
  14466. } wmi_sta_smps_force_mode_cmd_fixed_param;
  14467. /** wlan HB commands */
  14468. #define WMI_WLAN_HB_ITEM_UDP 0x1
  14469. #define WMI_WLAN_HB_ITEM_TCP 0x2
  14470. #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE,
  14471. must be a multiple of 4 bytes */
  14472. typedef struct {
  14473. /** TLV tag and len; tag equals
  14474. * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
  14475. A_UINT32 tlv_header; /** TLV header*/
  14476. A_UINT32 vdev_id; /** Vdev ID */
  14477. A_UINT32 enable; /** 1: Enable, 0: Disable`*/
  14478. A_UINT32 item; /** 1: UDP, 2: TCP */
  14479. A_UINT32 session; /** Session ID from HOST */
  14480. } wmi_hb_set_enable_cmd_fixed_param;
  14481. typedef struct {
  14482. /** TLV tag and len; tag equals
  14483. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
  14484. A_UINT32 tlv_header; /** TLV header*/
  14485. A_UINT32 vdev_id; /** Vdev ID */
  14486. A_UINT32 srv_ip; /** Server IP address (IPv4) */
  14487. A_UINT32 dev_ip; /** Device IP address (IPv4) */
  14488. A_UINT32 seq; /** TCP Sequence no */
  14489. A_UINT32 src_port; /** Source port */
  14490. A_UINT32 dst_port; /** Destination port */
  14491. A_UINT32 interval; /** Keep alive interval */
  14492. A_UINT32 timeout; /** Timeout if keep alive fails */
  14493. A_UINT32 session; /** Session ID from HOST */
  14494. wmi_mac_addr gateway_mac; /** Server Mac Address */
  14495. } wmi_hb_set_tcp_params_cmd_fixed_param;
  14496. typedef struct {
  14497. /** TLV tag and len; tag equals
  14498. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
  14499. A_UINT32 tlv_header;
  14500. A_UINT32 vdev_id;
  14501. A_UINT32 length;
  14502. A_UINT32 offset;
  14503. A_UINT32 session;
  14504. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  14505. } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
  14506. typedef struct {
  14507. /** TLV tag and len; tag equals
  14508. * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
  14509. A_UINT32 tlv_header;
  14510. A_UINT32 vdev_id;
  14511. A_UINT32 srv_ip;
  14512. A_UINT32 dev_ip;
  14513. A_UINT32 src_port;
  14514. A_UINT32 dst_port;
  14515. A_UINT32 interval;
  14516. A_UINT32 timeout;
  14517. A_UINT32 session;
  14518. wmi_mac_addr gateway_mac;
  14519. } wmi_hb_set_udp_params_cmd_fixed_param;
  14520. typedef struct {
  14521. /** TLV tag and len; tag equals
  14522. * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
  14523. A_UINT32 tlv_header;
  14524. A_UINT32 vdev_id;
  14525. A_UINT32 length;
  14526. A_UINT32 offset;
  14527. A_UINT32 session;
  14528. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  14529. } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
  14530. /** wlan HB events */
  14531. typedef enum {
  14532. WMI_WLAN_HB_REASON_UNKNOWN = 0,
  14533. WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
  14534. WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
  14535. } WMI_HB_WAKEUP_REASON;
  14536. typedef struct {
  14537. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
  14538. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  14539. A_UINT32 session; /** Session ID from HOST */
  14540. A_UINT32 reason; /** wakeup reason */
  14541. } wmi_hb_ind_event_fixed_param;
  14542. typedef struct {
  14543. /** TLV tag and len; tag equals
  14544. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  14545. A_UINT32 tlv_header; /** TLV Header */
  14546. A_UINT32 vdev_id; /** Vdev ID */
  14547. A_UINT32 session; /** Session number from the HOST */
  14548. A_UINT32 srv_ip; /** IPv4 address of the OCF server */
  14549. A_UINT32 dev_ip; /** IPv4 address of the device */
  14550. A_UINT32 tcp_tx_seq; /** TCP sequence number */
  14551. A_UINT32 src_port; /** Source port */
  14552. A_UINT32 dst_port; /** Destination port */
  14553. A_UINT32 protocol; /** Protocol used: TCP:0, UDP:1 */
  14554. A_UINT32 wlan_hb_session; /** Linked WLAN HB session. If a keepalive is configured for the TCP session, the session ID of the TCP keepalive */
  14555. A_UINT32 timeout_retries; /** timeout[31:16]: TCP ACK timeout, time to wait for a TCP ACK in ms
  14556. retries[15:0]: Number of TCP level retries of OIC ping request */
  14557. wmi_mac_addr peer_macaddr; /** MAC address of the OCF server */
  14558. A_UINT32 oic_ping_pkt0; /** OIC ping packet content [Byte03:Byte00] */
  14559. A_UINT32 oic_ping_pkt1; /** OIC ping packet content [Byte07:Byte04] */
  14560. A_UINT32 oic_ping_pkt2; /** OIC ping packet content [Byte11:Byte08] */
  14561. A_UINT32 oic_ping_pkt3; /** OIC ping packet content [Byte15:Byte12] */
  14562. A_UINT32 tls_cipher_suite_version; /** Cipher suite [31:16] as defined in https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml
  14563. TLS version [15:00] */
  14564. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  14565. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  14566. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  14567. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  14568. A_UINT32 tls_tx_key0; /** client_write_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  14569. A_UINT32 tls_tx_key1; /** client_write_key[Byte07:Byte04] */
  14570. A_UINT32 tls_tx_key2; /** client_write_key[Byte11:Byte08] */
  14571. A_UINT32 tls_tx_key3; /** client_write_key[Byte15:Byte12] */
  14572. A_UINT32 tls_rx_key0; /** server_write_key[Byte03:Byte00] */
  14573. A_UINT32 tls_rx_key1; /** server_write_key[Byte07:Byte04] */
  14574. A_UINT32 tls_rx_key2; /** server_write_key[Byte11:Byte08] */
  14575. A_UINT32 tls_rx_key3; /** server_write_key[Byte15:Byte12] */
  14576. A_UINT32 tls_MAC_write_key0; /** client_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  14577. A_UINT32 tls_MAC_write_key1; /** client_write_MAC_key[Byte07:Byte04] */
  14578. A_UINT32 tls_MAC_write_key2; /** client_write_MAC_key[Byte11:Byte08] */
  14579. A_UINT32 tls_MAC_write_key3; /** client_write_MAC_key[Byte15:Byte12] */
  14580. A_UINT32 tls_MAC_write_key4; /** client_write_MAC_key[Byte19:Byte16] */
  14581. A_UINT32 tls_MAC_write_key5; /** client_write_MAC_key[Byte23:Byte20] */
  14582. A_UINT32 tls_MAC_write_key6; /** client_write_MAC_key[Byte27:Byte24] */
  14583. A_UINT32 tls_MAC_write_key7; /** client_write_MAC_key[Byte31:Byte28] */
  14584. A_UINT32 tls_MAC_read_key0; /** server_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  14585. A_UINT32 tls_MAC_read_key1; /** server_write_MAC_key[Byte07:Byte04] */
  14586. A_UINT32 tls_MAC_read_key2; /** server_write_MAC_key[Byte11:Byte08] */
  14587. A_UINT32 tls_MAC_read_key3; /** server_write_MAC_key[Byte15:Byte12] */
  14588. A_UINT32 tls_MAC_read_key4; /** server_write_MAC_key[Byte19:Byte16] */
  14589. A_UINT32 tls_MAC_read_key5; /** server_write_MAC_key[Byte23:Byte20] */
  14590. A_UINT32 tls_MAC_read_key6; /** server_write_MAC_key[Byte27:Byte24] */
  14591. A_UINT32 tls_MAC_read_key7; /** server_write_MAC_key[Byte31:Byte28] */
  14592. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  14593. GCM Mode: GCMNonce.salt [Byte03:Byte00] refer Section 3 of RFC 5288 */
  14594. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  14595. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  14596. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  14597. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  14598. GCM Mode: GCMNonce.salt [Byte4: Byte0] refer Section 3 of RFC 5288 */
  14599. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  14600. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  14601. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  14602. } wmi_oic_ping_offload_params_cmd_fixed_param;
  14603. typedef struct {
  14604. /** TLV tag and len; tag equals
  14605. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  14606. A_UINT32 tlv_header; /** TLV Header*/
  14607. A_UINT32 vdev_id; /** Interface number */
  14608. A_UINT32 session; /** Session ID*/
  14609. A_UINT32 enable; /** 1: Enable , 0: Disable */
  14610. } wmi_oic_ping_offload_set_enable_cmd_fixed_param;
  14611. /** wlan OIC events */
  14612. typedef enum {
  14613. WMI_WLAN_OIC_REASON_UNKNOWN = 0, /** Unknown */
  14614. WMI_WLAN_OIC_REASON_HOST_WAKE = 1, /** No error , but host is woken up due to other reasons */
  14615. WMI_WLAN_OIC_REASON_TCP_TIMEOUT = 2, /** TCP Timeout */
  14616. WMI_WLAN_OIC_REASON_PING_TIMEOUT = 3, /** OIC Ping resposnse timeout */
  14617. WMI_WLAN_OIC_REASON_TLS_ERROR = 4, /** TLS decryption error */
  14618. } WMI_OIC_WAKEUP_REASON;
  14619. typedef struct {
  14620. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oic_ind_event_fixed_param */
  14621. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  14622. A_UINT32 session; /** Session ID from driver */
  14623. A_UINT32 reason; /** wakeup reason as per WMI_OIC_WAKEUP_REASON */
  14624. A_UINT32 tcp_tx_seq; /** Current TCP sequence number */
  14625. A_UINT32 tcp_ack_num; /** Current TCP Acknowledgement number */
  14626. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  14627. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  14628. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  14629. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  14630. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  14631. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  14632. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  14633. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  14634. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  14635. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  14636. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  14637. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  14638. } wmi_oic_ping_handoff_event;
  14639. typedef struct {
  14640. /** TLV tag and len; tag equals
  14641. * WMITLV_TAG_STRUC_wmi_dhcp_lease_renew_offload_fixed_param */
  14642. A_UINT32 tlv_header; /** TLV Header*/
  14643. A_UINT32 vdev_id; /** Vdev ID */
  14644. A_UINT32 enable; /** 1: Enable 0: Disable*/
  14645. A_UINT32 srv_ip; /** DHCP Server IP address (IPv4) */
  14646. A_UINT32 client_ip; /** Device IP address (IPv4) */
  14647. wmi_mac_addr srv_mac; /** DHCP Server MAC address */
  14648. A_UINT32 parameter_list; /** Optional Parameter list. RFC 1533 gives the complete set of options defined for use with DHCP */
  14649. } wmi_dhcp_lease_renew_offload_cmd_fixed_param;
  14650. /** WLAN DHCP Lease Renew Events */
  14651. typedef enum {
  14652. WMI_WLAN_DHCP_RENEW_REASON_UNKNOWN = 0, /** Unknown */
  14653. WMI_WLAN_DHCP_RENEW_REASON_ACK_TIMEOUT = 1, /** DHCP ACK Timeout */
  14654. WMI_WLAN_DHCP_RENEW_REASON_NACK = 2, /** DHCP error */
  14655. } WMI_DHCP_RENEW_WAKEUP_REASON;
  14656. typedef struct {
  14657. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dhcp_renew_ind_event_fixed_param */
  14658. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  14659. A_UINT32 reason; /** wakeup reason as per enum WMI_DHCP_RENEW_WAKEUP_REASON*/
  14660. } wmi_dhcp_lease_renew_event;
  14661. /** WMI_STA_SMPS_PARAM_CMDID */
  14662. typedef enum {
  14663. /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
  14664. WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
  14665. /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
  14666. * to enter D-SMPS mode from Stalled-D-SMPS mode */
  14667. WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
  14668. /** RSSI threshold to disable SMPS modes */
  14669. WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
  14670. /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
  14671. WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
  14672. /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
  14673. WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
  14674. /** Enable/Disable DTIM 1chRx feature */
  14675. WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
  14676. } wmi_sta_smps_param;
  14677. typedef struct {
  14678. /** TLV tag and len; tag equals
  14679. * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
  14680. A_UINT32 tlv_header;
  14681. /** Unique id identifying the VDEV */
  14682. A_UINT32 vdev_id;
  14683. /** SMPS parameter (see wmi_sta_smps_param) */
  14684. A_UINT32 param;
  14685. /** Value of SMPS parameter */
  14686. A_UINT32 value;
  14687. } wmi_sta_smps_param_cmd_fixed_param;
  14688. typedef struct {
  14689. /** TLV tag and len; tag equals
  14690. * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
  14691. A_UINT32 tlv_header;
  14692. /* TX stats */
  14693. A_UINT32 txBytesPushed;
  14694. A_UINT32 txPacketsPushed;
  14695. /* RX stats */
  14696. A_UINT32 rxBytesRcvd;
  14697. A_UINT32 rxPacketsRcvd;
  14698. A_UINT32 rxTimeTotal;
  14699. /** peer MAC address */
  14700. wmi_mac_addr peer_macaddr;
  14701. } wmi_mcc_sched_sta_traffic_stats;
  14702. typedef struct {
  14703. /** TLV tag and len; tag equals
  14704. * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
  14705. A_UINT32 tlv_header;
  14706. /** Duration over which the host stats were collected */
  14707. A_UINT32 duration;
  14708. /** Number of stations filled in following stats array */
  14709. A_UINT32 num_sta;
  14710. /* Following this struct are the TLVs:
  14711. * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
  14712. */
  14713. } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
  14714. typedef struct
  14715. {
  14716. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
  14717. /* unique id identifying the VDEV, generated by the caller */
  14718. A_UINT32 vdev_id;
  14719. /*Batch scan enable command parameters*/
  14720. A_UINT32 scanInterval;
  14721. A_UINT32 numScan2Batch;
  14722. A_UINT32 bestNetworks;
  14723. A_UINT32 rfBand;
  14724. A_UINT32 rtt;
  14725. } wmi_batch_scan_enable_cmd_fixed_param;
  14726. typedef struct
  14727. {
  14728. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
  14729. A_UINT32 supportedMscan;
  14730. } wmi_batch_scan_enabled_event_fixed_param;
  14731. typedef struct
  14732. {
  14733. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
  14734. /* unique id identifying the VDEV, generated by the caller */
  14735. A_UINT32 vdev_id;
  14736. A_UINT32 param;
  14737. } wmi_batch_scan_disable_cmd_fixed_param;
  14738. typedef struct
  14739. {
  14740. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
  14741. /** unique id identifying the VDEV, generated by the caller */
  14742. A_UINT32 vdev_id;
  14743. A_UINT32 param;
  14744. } wmi_batch_scan_trigger_result_cmd_fixed_param;
  14745. typedef struct
  14746. {
  14747. A_UINT32 tlv_header;
  14748. wmi_mac_addr bssid; /* BSSID */
  14749. wmi_ssid ssid; /* SSID */
  14750. A_UINT32 ch; /* Channel number */
  14751. A_UINT32 rssi; /* RSSI or Level */
  14752. /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
  14753. A_UINT32 timestamp;
  14754. A_UINT32 ch_freq; /* Channel frequency in MHz */
  14755. } wmi_batch_scan_result_network_info;
  14756. typedef struct
  14757. {
  14758. A_UINT32 tlv_header;
  14759. A_UINT32 scanId; /* Scan List ID. */
  14760. /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
  14761. A_UINT32 numNetworksInScanList;
  14762. A_UINT32 netWorkStartIndex; /* indicate the start index of network info*/
  14763. } wmi_batch_scan_result_scan_list;
  14764. #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. */
  14765. #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /* send true or false based on scan response frame being a Probe Rsp or not */
  14766. #define LPI_IE_BITMAP_SSID 0x00000004 /* send ssid from received scan response frame */
  14767. #define LPI_IE_BITMAP_RSSI 0x00000008 /* send RSSI value reported by HW for the received scan response after adjusting with noise floor */
  14768. #define LPI_IE_BITMAP_CHAN 0x00000010 /* send channel number from the received scan response */
  14769. #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* send Tx power from TPC IE of scan rsp */
  14770. #define LPI_IE_BITMAP_TX_RATE 0x00000040 /* send rate of the received frame as reported by HW. */
  14771. #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. */
  14772. #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /* send timestamp reported in the received scan rsp frame. */
  14773. #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. */
  14774. /*
  14775. * TEMPORARY alias of incorrect old name the correct name.
  14776. * This alias will be removed once all references to the old name have been fixed.
  14777. */
  14778. #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
  14779. #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false. */
  14780. #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP */
  14781. #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled */
  14782. #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device. */
  14783. #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel */
  14784. #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received. */
  14785. #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz */
  14786. #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above */
  14787. #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations */
  14788. #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan */
  14789. #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. */
  14790. #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 */
  14791. #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 */
  14792. #define LPI_IE_BITMAP_REPORT_CONTEXT_HUB 0x00800000 /* extscan will use this field to indicate to LOWI LP whether to report result to context hub or not. */
  14793. #define LPI_IE_BITMAP_CHRE_RADIO_CHAIN 0x01000000 /* include radio chain and rssi per chain information if this bit is set - for CHRE */
  14794. /* 0x02000000, 0x04000000, and 0x08000000 are unused / available */
  14795. #define LPI_IE_BITMAP_CHRE_ESS 0x10000000 /* ESS capability info for CHRE */
  14796. #define LPI_IE_BITMAP_CHRE_SEC_MODE 0x20000000 /* Security capability info for CHRE */
  14797. #define LPI_IE_BITMAP_CHRE_SUPPORTED_RATE 0x40000000 /* Highest MCS corresponding NCC for TX and RX */
  14798. #define LPI_IE_BITMAP_ALL 0xFFFFFFFF
  14799. typedef struct {
  14800. A_UINT32 tlv_header;
  14801. /**A_BOOL indicates LPI mgmt snooping enable/disable*/
  14802. A_UINT32 enable;
  14803. /**LPI snooping mode*/
  14804. A_UINT32 snooping_mode;
  14805. /** LPI interested IEs in snooping context */
  14806. A_UINT32 ie_bitmap;
  14807. } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
  14808. typedef struct {
  14809. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  14810. /** Scan ID */
  14811. A_UINT32 scan_id;
  14812. /** Scan requestor ID */
  14813. A_UINT32 scan_req_id;
  14814. /** VDEV id(interface) that is requesting scan */
  14815. A_UINT32 vdev_id;
  14816. /** LPI interested IEs in scan context */
  14817. A_UINT32 ie_bitmap;
  14818. /** Scan Priority, input to scan scheduler */
  14819. A_UINT32 scan_priority;
  14820. /** dwell time in msec on active channels */
  14821. A_UINT32 dwell_time_active;
  14822. /** dwell time in msec on passive channels */
  14823. A_UINT32 dwell_time_passive;
  14824. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  14825. A_UINT32 min_rest_time;
  14826. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  14827. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  14828. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  14829. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  14830. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  14831. * irrespective of activity. activity is determined by the idle_time parameter.
  14832. */
  14833. A_UINT32 max_rest_time;
  14834. /** time before sending next set of probe requests.
  14835. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  14836. * The number of probe requests specified depends on the ssid_list and bssid_list
  14837. */
  14838. A_UINT32 repeat_probe_time;
  14839. /** time in msec between 2 consequetive probe requests with in a set. */
  14840. A_UINT32 probe_spacing_time;
  14841. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  14842. A_UINT32 idle_time;
  14843. /** maximum time in msec allowed for scan */
  14844. A_UINT32 max_scan_time;
  14845. /** delay in msec before sending first probe request after switching to a channel */
  14846. A_UINT32 probe_delay;
  14847. /** Scan control flags */
  14848. A_UINT32 scan_ctrl_flags;
  14849. /** Burst duration time in msec*/
  14850. A_UINT32 burst_duration;
  14851. /** # if channels to scan. In the TLV channel_list[] */
  14852. A_UINT32 num_chan;
  14853. /** number of bssids. In the TLV bssid_list[] */
  14854. A_UINT32 num_bssid;
  14855. /** number of ssid. In the TLV ssid_list[] */
  14856. A_UINT32 num_ssids;
  14857. /** number of bytes in ie data. In the TLV ie_data[] */
  14858. A_UINT32 ie_len;
  14859. /** Scan control flags extended (see WMI_SCAN_FLAG_EXT_xxx) */
  14860. A_UINT32 scan_ctrl_flags_ext;
  14861. /**
  14862. * TLV (tag length value) parameters follow the scan_cmd
  14863. * structure. The TLV's are:
  14864. * A_UINT32 channel_list[]; // in MHz
  14865. * wmi_ssid ssid_list[];
  14866. * wmi_mac_addr bssid_list[];
  14867. * A_UINT8 ie_data[];
  14868. */
  14869. } wmi_lpi_start_scan_cmd_fixed_param;
  14870. typedef struct {
  14871. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  14872. /** Scan requestor ID */
  14873. A_UINT32 scan_req_id;
  14874. /** Scan ID */
  14875. A_UINT32 scan_id;
  14876. /**
  14877. * Req Type
  14878. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  14879. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  14880. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  14881. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  14882. */
  14883. A_UINT32 req_type;
  14884. /**
  14885. * vDev ID
  14886. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  14887. */
  14888. A_UINT32 vdev_id;
  14889. } wmi_lpi_stop_scan_cmd_fixed_param;
  14890. typedef enum {
  14891. WMI_LPI_DEVICE_TYPE_AP = 1,
  14892. WMI_LPI_DEVICE_TYPE_P2P = 2,
  14893. WMI_LPI_DEVICE_TYPE_NAN = 3,
  14894. } wmi_lpi_device_type;
  14895. typedef struct
  14896. {
  14897. A_UINT32 tlv_header;
  14898. /** Scan requestor ID */
  14899. A_UINT32 scan_req_id;
  14900. A_UINT32 ie_bitmap;
  14901. A_UINT32 data_len;
  14902. } wmi_lpi_result_event_fixed_param;
  14903. typedef enum {
  14904. /** User scan Request completed */
  14905. WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
  14906. /** User Request was never serviced */
  14907. WMI_LPI_STATUS_DROPPED_REQ = 1,
  14908. /** Illegal channel Req */
  14909. WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
  14910. /** Illegal Operation Req */
  14911. WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
  14912. /** Request Aborted */
  14913. WMI_LPI_STATUS_REQ_ABORTED = 4,
  14914. /** Request Timed Out */
  14915. WMI_LPI_STATUS_REQ_TIME_OUT = 5,
  14916. /** Medium Busy, already there
  14917. * is a scan is going on */
  14918. WMI_LPI_STATUS_MEDIUM_BUSY = 6,
  14919. /** Extscan is the scan client whose scan complete event is triggered */
  14920. WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
  14921. } wmi_lpi_staus;
  14922. typedef struct
  14923. {
  14924. A_UINT32 tlv_header;
  14925. wmi_lpi_staus status;
  14926. /** Scan requestor ID */
  14927. A_UINT32 scan_req_id;
  14928. } wmi_lpi_status_event_fixed_param;
  14929. typedef struct
  14930. {
  14931. A_UINT32 tlv_header;
  14932. wmi_mac_addr bssid;
  14933. wmi_ssid ssid;
  14934. A_UINT32 freq;
  14935. A_UINT32 rssi;
  14936. A_UINT32 vdev_id;
  14937. } wmi_lpi_handoff_event_fixed_param;
  14938. typedef struct
  14939. {
  14940. A_UINT32 tlv_header;
  14941. A_UINT32 timestamp; /*timestamp of batch scan event*/
  14942. A_UINT32 numScanLists; /*number of scan in this event*/
  14943. A_UINT32 isLastResult; /*is this event a last event of the whole batch scan*/
  14944. } wmi_batch_scan_result_event_fixed_param;
  14945. typedef struct {
  14946. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
  14947. A_UINT32 vdev_id;
  14948. /* This TLV is followed by p2p_noa_info for vdev :
  14949. * wmi_p2p_noa_info p2p_noa_info;
  14950. */
  14951. } wmi_p2p_noa_event_fixed_param;
  14952. #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
  14953. #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
  14954. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
  14955. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
  14956. #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
  14957. #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
  14958. typedef struct {
  14959. /** TLV tag and len; tag equals
  14960. * */
  14961. A_UINT32 tlv_header;
  14962. /** gpip pin number */
  14963. A_UINT32 gpio_pin_num;
  14964. /** gpio interupt type */
  14965. A_UINT32 int_type;
  14966. /** RF radio status */
  14967. A_UINT32 radio_state;
  14968. } wmi_rfkill_mode_param;
  14969. typedef enum {
  14970. WMI_SET_LED_SYS_POWEROFF,
  14971. WMI_SET_LED_SYS_S3_SUSPEND,
  14972. WMI_SET_LED_SYS_S4_S5,
  14973. WMI_SET_LED_SYS_DRIVER_DISABLE,
  14974. WMI_SET_LED_SYS_WAKEUP,
  14975. WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
  14976. WMI_SET_LED_SYS_POWERON,
  14977. } wmi_led_sys_state_param;
  14978. typedef enum {
  14979. WMI_CONFIG_LED_TO_VDD = 0,
  14980. WMI_CONFIG_LED_TO_GND = 1,
  14981. } wmi_config_led_connect_type;
  14982. typedef enum {
  14983. WMI_CONFIG_LED_NOT_WITH_BT = 0,
  14984. WMI_CONFIG_LED_WITH_BT = 1,
  14985. } wmi_config_led_with_bt_flag;
  14986. typedef enum {
  14987. WMI_CONFIG_LED_DISABLE = 0,
  14988. WMI_CONFIG_LED_ENABLE = 1,
  14989. } wmi_config_led_enable_flag;
  14990. typedef enum {
  14991. WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
  14992. WMI_CONFIG_LED_HIGH_OFF = 1,
  14993. WMI_CONFIG_LED_HIGH_ON = 2,
  14994. } wmi_config_led_on_flag;
  14995. typedef enum {
  14996. WMI_CONFIG_LED_UNSPECIFIED = 0,
  14997. WMI_CONFIG_LED_ON = 1,
  14998. WMI_CONFIG_LED_OFF = 2,
  14999. WMI_CONFIG_LED_DIM = 3,
  15000. WMI_CONFIG_LED_BLINK = 4,
  15001. WMI_CONFIG_LED_TXRX = 5,
  15002. } wmi_config_led_operation_type;
  15003. typedef struct {
  15004. /** TLV tag and len; tag equals
  15005. * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
  15006. A_UINT32 tlv_header;
  15007. /* Set GPIO pin */
  15008. A_UINT32 led_gpio_pin;
  15009. /* Set connect type defined in wmi_config_led_connect_type */
  15010. A_UINT32 connect_type;
  15011. /* Set flag defined in wmi_config_led_with_bt_flag*/
  15012. A_UINT32 with_bt;
  15013. /* Set LED enablement defined in wmi_config_led_enable_flag */
  15014. A_UINT32 led_enable;
  15015. /** pdev_id for identifying the MAC
  15016. * See macros starting with WMI_PDEV_ID_ for values.
  15017. */
  15018. A_UINT32 pdev_id;
  15019. /* see wmi_config_led_operation_type enum */
  15020. A_UINT32 led_operation_type;
  15021. /* see wmi_config_led_on_flag enum */
  15022. A_UINT32 led_on_flag; /* configure high/low on/off sense */
  15023. A_UINT32 led_on_interval; /* for blink function; unit: ms */
  15024. A_UINT32 led_off_interval; /* for blink function; unit: ms */
  15025. A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
  15026. } wmi_pdev_set_led_config_cmd_fixed_param;
  15027. #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
  15028. #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
  15029. /** WMI_PEER_INFO_REQ_CMDID
  15030. * Request FW to provide peer info */
  15031. typedef struct {
  15032. /** TLV tag and len; tag equals
  15033. * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
  15034. A_UINT32 tlv_header;
  15035. /** In order to get the peer info for a single peer, host shall
  15036. * issue the peer_mac_address of that peer. For getting the
  15037. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  15038. * address. The firmware will return the peer info for all the
  15039. * peers on the specified vdev_id */
  15040. wmi_mac_addr peer_mac_address;
  15041. /** vdev id */
  15042. A_UINT32 vdev_id;
  15043. } wmi_peer_info_req_cmd_fixed_param;
  15044. typedef struct {
  15045. /** TLV tag and len; tag equals
  15046. * WMITLV_TAG_STRUC_wmi_peer_info */
  15047. A_UINT32 tlv_header;
  15048. /** mac addr of the peer */
  15049. wmi_mac_addr peer_mac_address;
  15050. /** data_rate of the peer */
  15051. A_UINT32 data_rate;
  15052. /** rssi of the peer */
  15053. A_UINT32 rssi;
  15054. /** tx fail count */
  15055. A_UINT32 tx_fail_cnt;
  15056. } wmi_peer_info;
  15057. /** FW response with the peer info */
  15058. typedef struct {
  15059. /** TLV tag and len; tag equals
  15060. * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
  15061. A_UINT32 tlv_header;
  15062. /** number of peers in peer_info */
  15063. A_UINT32 num_peers;
  15064. /* Set to 1 only if vdev_id field is valid */
  15065. A_UINT32 valid_vdev_id;
  15066. /* VDEV to which the peer belongs to */
  15067. A_UINT32 vdev_id;
  15068. /* This TLV is followed by another TLV of array of structs
  15069. * wmi_peer_info peer_info[];
  15070. */
  15071. } wmi_peer_info_event_fixed_param;
  15072. /** WMI_PEER_ANTDIV_INFO_REQ_CMDID
  15073. * Request FW to provide peer info */
  15074. typedef struct {
  15075. /** TLV tag and len; tag equals
  15076. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param */
  15077. A_UINT32 tlv_header;
  15078. /** In order to get the peer antdiv info for a single peer, host shall
  15079. * issue the peer_mac_address of that peer. For getting the
  15080. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  15081. * address. The firmware will return the peer info for all the
  15082. * peers on the specified vdev_id */
  15083. wmi_mac_addr peer_mac_address;
  15084. /** vdev id */
  15085. A_UINT32 vdev_id;
  15086. } wmi_peer_antdiv_info_req_cmd_fixed_param;
  15087. /** FW response with the peer antdiv info */
  15088. typedef struct {
  15089. /** TLV tag and len; tag equals
  15090. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param */
  15091. A_UINT32 tlv_header;
  15092. /** number of peers in peer_info */
  15093. A_UINT32 num_peers;
  15094. /* VDEV to which the peer belongs to */
  15095. A_UINT32 vdev_id;
  15096. /* This TLV is followed by another TLV of array of structs
  15097. * wmi_peer_antdiv_info peer_antdiv_info[];
  15098. */
  15099. } wmi_peer_antdiv_info_event_fixed_param;
  15100. typedef struct {
  15101. /** TLV tag and len; tag equals
  15102. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info */
  15103. A_UINT32 tlv_header;
  15104. /** mac addr of the peer */
  15105. wmi_mac_addr peer_mac_address;
  15106. /** per chain rssi of the peer, for up to 8 chains.
  15107. * Each chain's entry reports the RSSI for different bandwidths:
  15108. * bits 7:0 -> primary 20 MHz
  15109. * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
  15110. * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
  15111. * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
  15112. * Each of these 8-bit RSSI reports is in dB units, with respect to
  15113. * the noise floor.
  15114. * 0x80 means invalid.
  15115. * All unused bytes within used chain_rssi indices shall be set to 0x80.
  15116. * All unused chain_rssi indices shall be set to 0x80808080.
  15117. */
  15118. A_INT32 chain_rssi[8];
  15119. } wmi_peer_antdiv_info;
  15120. typedef struct {
  15121. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_msduq_qdepth_thresh_update */
  15122. /** tid_number */
  15123. A_UINT32 tid_num;
  15124. /** msduq_mask to set the value
  15125. * bit 0 - HI-PRI msdu flowq qdepth threshold need to update if set
  15126. * bit 1 - LOW-PRI msdu flowq qdepth threshold need to update if set
  15127. * bit 2 - UDP msdu flowq qdepth threshold need to update if set
  15128. * bit 3 - NON-UDP msdu flowq qdepth threshold need to update if set
  15129. * rest of bits are reserved and set to 0.
  15130. */
  15131. A_UINT32 msduq_update_mask;
  15132. /** Qdepth threshold value
  15133. * If number of msdus in a queue excess over qdepth_thresh_value value
  15134. * while queuing msdu's then we drop new msdus.
  15135. * (Though dropping older (stale) data rather than newer data might be
  15136. * preferable, the dropping is performed by MAC HW, and theres no option
  15137. * to configure the HW to do head dropping rather than tail dropping.)
  15138. */
  15139. A_UINT32 qdepth_thresh_value;
  15140. } wmi_msduq_qdepth_thresh_update;
  15141. /** WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID
  15142. * Request FW to update msduq qdepth threshold per TID per peer */
  15143. typedef struct {
  15144. /** TLV tag and len; tag equals
  15145. * WMITLV_TAG_STRUC_wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param
  15146. */
  15147. A_UINT32 tlv_header;
  15148. /** pdev id
  15149. * The pdev_id can be determined from the vdev_id, but the pdev_id
  15150. * is explicitly provided so it can be used for sanity checking.
  15151. */
  15152. A_UINT32 pdev_id;
  15153. /** vdev id */
  15154. A_UINT32 vdev_id;
  15155. /**
  15156. * To set the peer msduq qdepth threshold update for a single peer,
  15157. * the host shall send mac address for which peer need to be updated.
  15158. */
  15159. wmi_mac_addr peer_mac_address;
  15160. /** number of payload update tlvs */
  15161. A_UINT32 num_of_msduq_updates;
  15162. /** Followed by the variable length TLV msduq_qdepth_updates:
  15163. * wmi_msduq_qdepth_th_update msduq_qdepth_thshd_update_list[]
  15164. */
  15165. } wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param;
  15166. /**
  15167. * ACK policy to be followed for the TID
  15168. */
  15169. typedef enum {
  15170. /** Used when the host does not want to configure the ACK policy */
  15171. WMI_PEER_TID_CONFIG_ACK_POLICY_IGNORE,
  15172. /** Allow ACK for the TID */
  15173. WMI_PEER_TID_CONFIG_ACK,
  15174. /** Do not expect ACK for the TID */
  15175. WMI_PEER_TID_CONFIG_NOACK,
  15176. } WMI_PEER_TID_CONFIG_ACK_POLICY;
  15177. /**
  15178. * Aggregation control policy for the TID
  15179. */
  15180. typedef enum {
  15181. /** Used when the host does not want to configure the aggregation policy */
  15182. WMI_PEER_TID_CONFIG_AGGR_CONTROL_IGNORE,
  15183. /** Enable aggregation for the TID */
  15184. WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE,
  15185. /** Disable aggregation for the TID */
  15186. WMI_PEER_TID_CONFIG_AGGR_CONTROL_DISABLE,
  15187. } WMI_PEER_TID_CONFIG_AGGR_CONTROL;
  15188. /**
  15189. * Rate control policy for the TID
  15190. */
  15191. typedef enum {
  15192. /** Used when the host does not want to configure the rate control policy */
  15193. WMI_PEER_TID_CONFIG_RATE_CONTROL_IGNORE,
  15194. /** Auto rate control */
  15195. WMI_PEER_TID_CONFIG_RATE_CONTROL_AUTO,
  15196. /** Fixed rate control */
  15197. WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE,
  15198. /** Set the Default lowest rate (6Mbps in 5GHZ and 1Mbps in 2GHZ) */
  15199. WMI_PEER_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE,
  15200. /**
  15201. * Set the highest rate cap allowed for this TID.
  15202. * Rate cap is specified in rate code format,
  15203. * i.e. NSS and MCS combined as shown below:
  15204. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  15205. * b'3-b'0 indicate the MCS
  15206. */
  15207. WMI_PEER_TID_CONFIG_RATE_UPPER_CAP,
  15208. } WMI_PEER_TID_CONFIG_RATE_CONTROL;
  15209. /**
  15210. * SW retry threshold for the TID
  15211. */
  15212. typedef enum {
  15213. /** Used when the host does not want to configure the SW retry threshold */
  15214. WMI_PEER_TID_SW_RETRY_IGNORE = 0,
  15215. WMI_PEER_TID_SW_RETRY_MIN = 1,
  15216. WMI_PEER_TID_SW_RETRY_MAX = 30,
  15217. /** No SW retry for the TID */
  15218. WMI_PEER_TID_SW_RETRY_NO_RETRY = 0xFFFFFFFF,
  15219. } WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD;
  15220. /*
  15221. * values for tid_config_supported_bitmap field,
  15222. * in wmi_peer_tid_configurations_cmd structure.
  15223. */
  15224. typedef enum {
  15225. /* Used to indicate that disable_rts_cts field is valid */
  15226. WMI_PEER_TID_DISABLE_RTS_CTS_VALID = 0x00000001,
  15227. } WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP;
  15228. /**
  15229. * Command format for the TID configuration
  15230. */
  15231. typedef struct {
  15232. /** TLV tag and len; tag equals
  15233. * WMITLV_TAG_STRUC_wmi_peer_tid_configurations_cmd_fixed_param
  15234. */
  15235. A_UINT32 tlv_header;
  15236. /** vdev id */
  15237. A_UINT32 vdev_id;
  15238. /** peer MAC address */
  15239. wmi_mac_addr peer_mac_address;
  15240. /** TID number, generated by the caller.
  15241. * Valid range for QoS TID : 0-15
  15242. * Valid range for non QOS/Mgmt TID: 16-19
  15243. * Any other TID number is invalid.
  15244. */
  15245. A_UINT32 tid_num;
  15246. /** ACK policy - of type WMI_PEER_TID_CONFIG_ACK_POLICY */
  15247. A_UINT32 ack_policy;
  15248. /** Aggregation control - of type WMI_PEER_TID_CONFIG_AGGR_CONTROL */
  15249. A_UINT32 aggr_control;
  15250. /** Rate control - of type WMI_PEER_TID_CONFIG_RATE_CONTROL */
  15251. A_UINT32 rate_control;
  15252. /** Fixed rate control parameters - of type WMI_PEER_PARAM_FIXED_RATE.
  15253. * This is applicable only when rate_control is
  15254. * WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE
  15255. */
  15256. A_UINT32 rcode_rcflags;
  15257. /** MPDU SW retry threshold - of type WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD
  15258. * This SW retry threshold limits the total number of retransmits of
  15259. * nacked or unacked MPDUs, but it is up to the FW to decide what
  15260. * tx rate to use during each retransmission.
  15261. */
  15262. A_UINT32 sw_retry_threshold;
  15263. /*--- Start of extended structure ---*/
  15264. /* Bitmap to indicate which fields in the extended structure are valid.
  15265. * Bitmap values correspond to enum WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP
  15266. */
  15267. A_UINT32 tid_config_supported_bitmap;
  15268. /* Knob to enable/disable RTS/CTS per TID */
  15269. A_UINT32 disable_rts_cts;
  15270. } wmi_peer_tid_configurations_cmd_fixed_param;
  15271. /* The below enable/disable macros are used for both per peer CFR capture
  15272. * control (as in wmi_peer_cfr_capture_cmd) and control of the entire periodic
  15273. * CFR capture feature (as in WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE)
  15274. */
  15275. #define WMI_PEER_CFR_CAPTURE_ENABLE 1
  15276. #define WMI_PEER_CFR_CAPTURE_DISABLE 0
  15277. #define WMI_PEER_CFR_ONE_SHOT_REQUEST 0
  15278. #define WMI_PEER_CFR_PERIODICITY_MIN 10 /* 10ms */
  15279. #define WMI_PEER_CFR_PERIODICITY_MAX 10*60*1000 /* 10 minutes */
  15280. /* Bandwidth of peer CFR captures */
  15281. typedef enum {
  15282. WMI_PEER_CFR_CAPTURE_BW_20MHZ = 0,
  15283. WMI_PEER_CFR_CAPTURE_BW_40MHZ = 1,
  15284. WMI_PEER_CFR_CAPTURE_BW_80MHZ = 2,
  15285. WMI_PEER_CFR_CAPTURE_BW_160MHZ = 3,
  15286. WMI_PEER_CFR_CAPTURE_BW_80_80MHZ = 4,
  15287. WMI_PEER_CFR_CAPTURE_BW_MAX,
  15288. } WMI_PEER_CFR_CAPTURE_BW;
  15289. /* Peer CFR capture method */
  15290. typedef enum {
  15291. /* Send null frame on the requested bw and capture CFR on ACK */
  15292. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME = 0,
  15293. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME_WITH_PHASE = 1,
  15294. WMI_PEER_CFR_CAPTURE_METHOD_PROBE_RESP = 2,
  15295. /* New methods to be added here */
  15296. WMI_PEER_CFR_CAPTURE_METHOD_MAX,
  15297. } WMI_PEER_CFR_CAPTURE_METHOD;
  15298. /*
  15299. * Peer command structure to configure the CFR capture
  15300. */
  15301. typedef struct {
  15302. /** TLV tag and len; tag equals
  15303. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_cmd_fixed_param
  15304. */
  15305. A_UINT32 tlv_header;
  15306. /* WMI_PEER_CFR_CAPTURE_ENABLE: Enable CFR capture for the peer
  15307. * WMI_PEER_CFR_CAPTURE_DISABLE: Disable CFR capture for the peer
  15308. */
  15309. A_UINT32 request;
  15310. /* Peer MAC address. In AP mode, this is the address of the connected peer
  15311. * for which CFR capture is needed. In case of STA mode, this is the address
  15312. * of the AP to which the STA is connected
  15313. */
  15314. wmi_mac_addr mac_addr;
  15315. /* vdev id */
  15316. A_UINT32 vdev_id;
  15317. /* Periodicity of measurement in ms.
  15318. * WMI_PEER_CFR_ONE_SHOT_REQUEST: One-shot request i.e., Only one CFR
  15319. * capture for the request and no periodic CFR captures.
  15320. * The min value is WMI_PEER_CFR_PERIODICITY_MIN
  15321. * The max value is WMI_PEER_CFR_PERIODICITY_MAX
  15322. */
  15323. A_UINT32 periodicity;
  15324. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  15325. A_UINT32 bandwidth;
  15326. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  15327. A_UINT32 capture_method;
  15328. } wmi_peer_cfr_capture_cmd_fixed_param;
  15329. typedef enum {
  15330. WMI_PEER_IND_SMPS = 0x0, /* spatial multiplexing power save */
  15331. WMI_PEER_IND_OMN, /* operating mode notification */
  15332. WMI_PEER_IND_OMI, /* operating mode indication */
  15333. } WMI_PEER_OPER_MODE_IND;
  15334. typedef struct {
  15335. /** TLV tag and len; tag equals
  15336. * WMITLV_TAG_STRUC_wmi_peer_oper_mode_change */
  15337. A_UINT32 tlv_header;
  15338. /** mac addr of the peer */
  15339. wmi_mac_addr peer_mac_address;
  15340. /** Peer type indication WMI_PEER_OPER_MODE_IND. */
  15341. A_UINT32 ind_type;
  15342. /** new_rxnss valid for all peer_operating mode ind. */
  15343. A_UINT32 new_rxnss;
  15344. /** new_bw valid for peer_operating mode ind. OMN/OMI
  15345. * value of this bw is as per 11ax/ac standard:
  15346. * 0 = 20MHz,1 = 40MHz, 2= 80MHz, 3 = 160MHz
  15347. */
  15348. A_UINT32 new_bw;
  15349. /** new_txnss valid for peer_operating mode ind. OMI */
  15350. A_UINT32 new_txnss;
  15351. /** new_disablemu: disable mu mode
  15352. * valid for peer_operating mode ind. OMI
  15353. */
  15354. A_UINT32 new_disablemu;
  15355. } wmi_peer_oper_mode_change_event_fixed_param;
  15356. /** FW response when tx failure count has reached threshold
  15357. * for a peer */
  15358. typedef struct {
  15359. /** TLV tag and len; tag equals
  15360. * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
  15361. A_UINT32 tlv_header;
  15362. /** vdev id*/
  15363. A_UINT32 vdev_id;
  15364. /** mac address */
  15365. wmi_mac_addr peer_mac_address;
  15366. /** tx failure count - will eventually be removed and not used */
  15367. A_UINT32 tx_fail_cnt;
  15368. /** seq number of the nth tx_fail_event */
  15369. A_UINT32 seq_no;
  15370. } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
  15371. enum wmi_rmc_mode {
  15372. /** Disable RMC */
  15373. WMI_RMC_MODE_DISABLED = 0,
  15374. /** Enable RMC */
  15375. WMI_RMC_MODE_ENABLED = 1,
  15376. };
  15377. /** Enable RMC transmitter functionality. Upon
  15378. * receiving this, the FW shall mutlicast frames with
  15379. * reliablity. This is a vendor
  15380. * proprietary feature. */
  15381. typedef struct {
  15382. /** TLV tag and len; tag equals
  15383. * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
  15384. A_UINT32 tlv_header;
  15385. /** vdev id*/
  15386. A_UINT32 vdev_id;
  15387. /** enable_rmc contains values from enum wmi_rmc_mode;
  15388. * Default value: 0 (disabled) */
  15389. A_UINT32 enable_rmc;
  15390. } wmi_rmc_set_mode_cmd_fixed_param;
  15391. /** Configure transmission periodicity of action frames in a
  15392. * RMC network for the multicast transmitter */
  15393. typedef struct {
  15394. /** TLV tag and len; tag equals
  15395. * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
  15396. A_UINT32 tlv_header;
  15397. /** vdev id */
  15398. A_UINT32 vdev_id;
  15399. /** time period in milliseconds. Default: 300 ms.
  15400. An action frame indicating the current leader is transmitted by the
  15401. RMC transmitter once every 'periodity_msec' */
  15402. A_UINT32 periodicity_msec;
  15403. } wmi_rmc_set_action_period_cmd_fixed_param;
  15404. /** Optimise Leader selection process in RMC functionality. For
  15405. * Enhancement/Debug purposes only */
  15406. typedef struct {
  15407. /** TLV tag and len; tag equals
  15408. * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
  15409. A_UINT32 tlv_header;
  15410. /** vdev id */
  15411. A_UINT32 vdev_id;
  15412. /** flags ::
  15413. * 0x0001 - Enable beacon averaging
  15414. * 0x0002 - Force leader selection
  15415. * 0x0004 - Enable Timer based leader switch
  15416. * 0x0008 - Use qos/NULL based for multicast reliability */
  15417. A_UINT32 flags;
  15418. /** control leader change timeperiod (in seconds) */
  15419. A_UINT32 peridocity_leader_switch;
  15420. /** control activity timeout value for data rx (in seconds) */
  15421. A_UINT32 data_activity_timeout;
  15422. /** mac address of leader */
  15423. wmi_mac_addr forced_leader_mac_addr;
  15424. } wmi_rmc_config_cmd_fixed_param;
  15425. /** MHF is generally implemented in
  15426. * the kernel. To decrease system power consumption, the
  15427. * driver can enable offloading this to the chipset. In
  15428. * order for the offload, the firmware needs the routing table.
  15429. * The host shall plumb the routing table into FW. The firmware
  15430. * shall perform an IP address lookup and forward the packet to
  15431. * the next hop using next hop's mac address. This is a vendor
  15432. * proprietary feature. */
  15433. enum wmi_mhf_ofl_mode {
  15434. /** Disable MHF offload */
  15435. WMI_MHF_OFL_MODE_DISABLED = 0,
  15436. /** Enable MHF offload */
  15437. WMI_MHF_OFL_MODE_ENABLED = 1,
  15438. };
  15439. typedef struct {
  15440. /** TLV tag and len; tag equals
  15441. * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
  15442. A_UINT32 tlv_header;
  15443. /** vdev id*/
  15444. A_UINT32 vdev_id;
  15445. /** enable_mhf_ofl contains values from enum
  15446. * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
  15447. A_UINT32 enable_mhf_ofl;
  15448. } wmi_mhf_offload_set_mode_cmd_fixed_param;
  15449. enum wmi_mhf_ofl_table_action {
  15450. /** Create MHF offload table in FW */
  15451. WMI_MHF_OFL_TBL_CREATE = 0,
  15452. /** Append to existing MHF offload table */
  15453. WMI_MHF_OFL_TBL_APPEND = 1,
  15454. /** Flush entire MHF offload table in FW */
  15455. WMI_MHF_OFL_TBL_FLUSH = 2,
  15456. };
  15457. typedef struct {
  15458. /** TLV tag and len; tag equals
  15459. * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
  15460. A_UINT32 tlv_header;
  15461. /** vdev id*/
  15462. A_UINT32 vdev_id;
  15463. /** action corresponds to values from enum
  15464. * wmi_mhf_ofl_table_action */
  15465. A_UINT32 action;
  15466. /** number of entries in the table */
  15467. A_UINT32 num_entries;
  15468. /** Followed by the variable length TLV
  15469. * wmi_mhf_offload_routing_table_entry entries[] */
  15470. } wmi_mhf_offload_plumb_routing_table_cmd;
  15471. typedef struct {
  15472. /** TLV tag and len; tag equals
  15473. * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
  15474. A_UINT32 tlv_header;
  15475. /** Destination node's IP address */
  15476. WMI_IPV4_ADDR dest_ipv4_addr;
  15477. /** Next hop node's MAC address */
  15478. wmi_mac_addr next_hop_mac_addr;
  15479. } wmi_mhf_offload_routing_table_entry;
  15480. enum {
  15481. WMI_DFS_RADAR_PULSE_FLAG_MASK_PSIDX_DIFF_VALID = 0x00000001,
  15482. };
  15483. typedef struct {
  15484. /** tlv tag and len, tag equals
  15485. * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
  15486. A_UINT32 tlv_header;
  15487. /** full 64 tsf timestamp get from MAC tsf timer indicates
  15488. * the time that the radar event uploading to host, split
  15489. * it to high 32 bit and lower 32 bit in fulltsf_high and
  15490. * full_tsf_low
  15491. */
  15492. A_UINT32 upload_fullts_low;
  15493. A_UINT32 upload_fullts_high;
  15494. /** timestamp indicates the time when DFS pulse is detected
  15495. * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
  15496. */
  15497. A_UINT32 pulse_detect_ts;
  15498. /** the duaration of the pulse in us */
  15499. A_UINT32 pulse_duration;
  15500. /** the center frequency of the radar pulse detected, KHz */
  15501. A_UINT32 pulse_center_freq;
  15502. /** bandwidth of current DFS channel, MHz */
  15503. A_UINT32 ch_bandwidth;
  15504. /** center channel frequency1 of current DFS channel, MHz */
  15505. A_UINT16 ch_center_freq1;
  15506. /** center channel frequency2 of current DFS channel, MHz,
  15507. * reserved for 160 BW mode
  15508. */
  15509. A_UINT16 ch_center_freq2;
  15510. /** flag to indicate if this pulse is chirp */
  15511. A_UINT8 pulse_is_chirp;
  15512. /** RSSI recorded in the ppdu */
  15513. A_UINT8 rssi;
  15514. /** extened RSSI info */
  15515. A_UINT8 rssi_ext;
  15516. union {
  15517. A_UINT8 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  15518. /** pdev_id for identifying the MAC
  15519. * See macros starting with WMI_PDEV_ID_ for values.
  15520. */
  15521. A_UINT8 pdev_id;
  15522. };
  15523. /** index of peak magnitude bin (signed) */
  15524. A_INT32 peak_sidx;
  15525. /** Max pulse chirp velocity in delta bins over chirp FFT interval */
  15526. A_INT32 pulse_delta_peak;
  15527. /** Max pulse chirp velocity variance in delta bins */
  15528. A_INT32 pulse_delta_diff;
  15529. /** the difference in the FFT peak index between short FFT and the first long FFT
  15530. * psidx_diff = (first_long_fft_psidx - 4*first_short_fft_psidx),
  15531. */
  15532. A_INT32 psidx_diff;
  15533. /** pulse_flags: see WMI_DFS_RADAR_PULSE_FLAG_MASK enum values
  15534. * 0x0001 - set if psidx_diff is valid
  15535. */
  15536. A_UINT32 pulse_flags;
  15537. } wmi_dfs_radar_event_fixed_param;
  15538. enum {
  15539. /* DEFAULT - target chooses what action to take, based on its thermal
  15540. * management policy
  15541. * Targets which throttle tx (and potentially rx) based on thermal
  15542. * management thresholds specified by the host will shut down tx
  15543. * if the temperature exceeds upper_thresh_degreeC.
  15544. * Targets which simply inform the host about threshold breaches will
  15545. * send a notification message to the host if the temperature exceeds
  15546. * upper_thresh_degreeC.
  15547. * Conversely, if the temperature was above upper_thresh_degreeC but
  15548. * then drops to below lower_threshold_degreeC, the target will either
  15549. * resume tx, or notify the host.
  15550. */
  15551. WMI_THERMAL_MGMT_ACTION_DEFAULT = 0,
  15552. /* HALT_TRAFFIC -
  15553. * If the temperature rises above upper_thresh_degreeC, the target will
  15554. * halt tx.
  15555. * If the temperature falls back below lower_thresh_degreeC, the target
  15556. * will resume tx.
  15557. */
  15558. WMI_THERMAL_MGMT_ACTION_HALT_TRAFFIC = 1,
  15559. /* NOTIFY_HOST - the target will notify the host if the temperature
  15560. * either rises above upper_thresh_degreeC or falls below
  15561. * lower_thresh_degreeC.
  15562. */
  15563. WMI_THERMAL_MGMT_ACTION_NOTIFY_HOST = 2,
  15564. };
  15565. typedef struct {
  15566. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
  15567. /*Thermal thresholds*/
  15568. A_UINT32 lower_thresh_degreeC; /* in degree C*/
  15569. A_UINT32 upper_thresh_degreeC; /* in degree C*/
  15570. /*Enable/Disable Thermal Monitoring for Mitigation*/
  15571. A_UINT32 enable;
  15572. /* action: what the target should do when a thermal upper/lower threshold
  15573. * is crossed.
  15574. * Refer to the WMI_THERMAL_MGMT_ACTION enum.
  15575. */
  15576. A_UINT32 action;
  15577. A_UINT32 threshold_warning_degreeC;
  15578. A_UINT32 sample_rate_ms;
  15579. } wmi_thermal_mgmt_cmd_fixed_param;
  15580. typedef struct {
  15581. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
  15582. A_UINT32 temperature_degreeC;/* temperature in degree C*/
  15583. } wmi_thermal_mgmt_event_fixed_param;
  15584. /**
  15585. * This command is sent from WLAN host driver to firmware to
  15586. * request firmware to configure auto shutdown timer in fw
  15587. * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
  15588. */
  15589. typedef struct {
  15590. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
  15591. A_UINT32 timer_value; /** timer value; 0=disable */
  15592. } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
  15593. enum wmi_host_auto_shutdown_reason {
  15594. WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
  15595. WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
  15596. WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
  15597. };
  15598. /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
  15599. typedef struct{
  15600. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
  15601. A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
  15602. } wmi_host_auto_shutdown_event_fixed_param;
  15603. /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
  15604. * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
  15605. * This command is only used by some customer for verification test. It is not for end-user.
  15606. *
  15607. * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
  15608. *
  15609. * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
  15610. * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
  15611. * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
  15612. * <channel, ack_offset> pair is unique.
  15613. *
  15614. * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
  15615. * called basic_config_info by bitmap
  15616. * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
  15617. *
  15618. * '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
  15619. * is ignored.
  15620. * disable will remove preious conditions from FW.
  15621. * conditions from the later command will over write conditions stored from a previous command.
  15622. *
  15623. */
  15624. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
  15625. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
  15626. #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
  15627. #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
  15628. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
  15629. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
  15630. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
  15631. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
  15632. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
  15633. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
  15634. #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
  15635. #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
  15636. #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
  15637. #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
  15638. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
  15639. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
  15640. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
  15641. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
  15642. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
  15643. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
  15644. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
  15645. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
  15646. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
  15647. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
  15648. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
  15649. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
  15650. #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
  15651. #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
  15652. /** Bit map definition for basic_config_info starts */
  15653. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
  15654. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
  15655. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  15656. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z) WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  15657. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
  15658. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
  15659. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  15660. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  15661. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
  15662. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
  15663. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  15664. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  15665. #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
  15666. #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
  15667. #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT)
  15668. #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
  15669. #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
  15670. #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
  15671. #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC)
  15672. #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
  15673. #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
  15674. #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
  15675. #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND)
  15676. #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
  15677. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
  15678. #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
  15679. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM)
  15680. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
  15681. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
  15682. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
  15683. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  15684. #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z) WMI_F_RMW(x, (z) & 0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  15685. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
  15686. /*
  15687. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
  15688. * is temporarily maintained as an alias for the correct name
  15689. * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  15690. */
  15691. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
  15692. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
  15693. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  15694. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  15695. #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
  15696. /*
  15697. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
  15698. * is temporarily maintained as an alias for the correct name
  15699. * (WMI_TPC_CHAINMASK_CONFIG_RATE)
  15700. */
  15701. #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
  15702. #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
  15703. #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
  15704. #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
  15705. /** Bit map definition for basic_config_info ends */
  15706. typedef struct{
  15707. A_UINT32 tlv_header;
  15708. /** Basic condition defined as bit map above, bitmap is chosen to save memory.
  15709. * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
  15710. * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
  15711. * 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
  15712. * 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
  15713. * 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
  15714. * Bit16 : band condition b'0: 2G, b'1: 5G
  15715. * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
  15716. * 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
  15717. * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
  15718. * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
  15719. * Bit23 ~ Bit31: reserved
  15720. */
  15721. A_UINT32 basic_config_info;
  15722. /** channel mapping bit rule: The lower bit corresponds with smaller channel.
  15723. * it depends on Bit14 of basic_config_info
  15724. * Total 24 channels for 5G
  15725. * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
  15726. * Total 14 channels for 2G
  15727. * 1 ~ 14
  15728. */
  15729. A_UINT32 channel;
  15730. /** rate mapping bit rule: The lower bit corresponds with lower rate.
  15731. * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
  15732. * Legacy rates , 11b, 11g, 11A
  15733. * 11n one stream (ht20, ht40) 8+8
  15734. * 11n two streams (ht20, ht40) 8+8
  15735. * 11ac one stream (vht20, vht40, vht80) 10+10+10
  15736. * 11ac two streams (vht20, vht40, vht80) 10+10+10
  15737. */
  15738. A_UINT32 rate0;
  15739. /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
  15740. * 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
  15741. */
  15742. /** 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
  15743. */
  15744. A_UINT32 rate1;
  15745. } wmi_tpc_chainmask_config;
  15746. #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
  15747. #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
  15748. typedef struct{
  15749. A_UINT32 tlv_header;
  15750. A_UINT32 enable; /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
  15751. A_UINT32 num_tpc_chainmask_configs;
  15752. /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
  15753. } wmi_tpc_chainmask_config_cmd_fixed_param;
  15754. typedef struct {
  15755. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_req_fixed_param */
  15756. A_UINT32 pdev_id;
  15757. /**
  15758. * Bits 31:0: base address of ring [31:0]
  15759. */
  15760. A_UINT32 base_addr_lo;
  15761. /**
  15762. * Bits 3:0: base address of ring [35:32]
  15763. * Bits 31:4: reserved
  15764. */
  15765. A_UINT32 base_addr_hi;
  15766. /**
  15767. * Bits 31:0: address of head index [31:0]
  15768. */
  15769. A_UINT32 head_idx_addr_lo;
  15770. /**
  15771. * Bits 3:0: address of head index [35:32]
  15772. * Bits 31:4: reserved
  15773. */
  15774. A_UINT32 head_idx_addr_hi;
  15775. /**
  15776. * Bits 31:0: address of tail index [31:0]
  15777. */
  15778. A_UINT32 tail_idx_addr_lo;
  15779. /**
  15780. * Bits 3:0: address of tail index [35:32]
  15781. * Bits 31:4: reserved
  15782. */
  15783. A_UINT32 tail_idx_addr_hi;
  15784. A_UINT32 num_ptr; /** Number of pointers in the ring */
  15785. } wmi_oem_dma_ring_cfg_req_fixed_param;
  15786. #define WMI_OEM_DMA_RING_ADDR_LO_S 0
  15787. #define WMI_OEM_DMA_RING_ADDR_LO 0xffffffff
  15788. #define WMI_OEM_DMA_RING_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_LO)
  15789. #define WMI_OEM_DMA_RING_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_LO)
  15790. #define WMI_OEM_DMA_RING_ADDR_HI_S 0
  15791. #define WMI_OEM_DMA_RING_ADDR_HI 0xf
  15792. #define WMI_OEM_DMA_RING_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_HI)
  15793. #define WMI_OEM_DMA_RING_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_HI)
  15794. typedef struct {
  15795. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_rsp_fixed_param */
  15796. A_UINT32 pdev_id;
  15797. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  15798. } wmi_oem_dma_ring_cfg_rsp_fixed_param;
  15799. typedef struct {
  15800. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_indirect_data */
  15801. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  15802. /**
  15803. * Bits 31:0: address of data [31:0]
  15804. */
  15805. A_UINT32 addr_lo;
  15806. /**
  15807. * Bits 3:0: address of data [35:32]
  15808. * Bits 11:4: reserved
  15809. * Bits 31:12: opaque host context data [19:0]
  15810. */
  15811. A_UINT32 addr_hi;
  15812. A_UINT32 len; /** Length of data in bytes */
  15813. } wmi_oem_indirect_data;
  15814. #define WMI_OEM_DMA_DATA_ADDR_LO_S 0
  15815. #define WMI_OEM_DMA_DATA_ADDR_LO 0xffffffff
  15816. #define WMI_OEM_DMA_DATA_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_LO)
  15817. #define WMI_OEM_DMA_DATA_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_LO)
  15818. #define WMI_OEM_DMA_DATA_ADDR_HI_S 0
  15819. #define WMI_OEM_DMA_DATA_ADDR_HI 0xf
  15820. #define WMI_OEM_DMA_DATA_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI)
  15821. #define WMI_OEM_DMA_DATA_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI)
  15822. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_S 12
  15823. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA 0xfffff
  15824. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
  15825. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
  15826. typedef struct {
  15827. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_buf_release_hdr */
  15828. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  15829. } wmi_oem_dma_buf_release_fixed_param;
  15830. typedef struct {
  15831. /**
  15832. * Bits 31:0: address of data [31:0]
  15833. */
  15834. A_UINT32 addr_lo;
  15835. /**
  15836. * Bits 3:0: address of data [35:32]
  15837. * Bits 11:4: reserved
  15838. * Bits 31:12: host context data [19:0]
  15839. */
  15840. A_UINT32 addr_hi;
  15841. } wmi_oem_dma_buf_release_entry;
  15842. typedef struct {
  15843. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_cmd_fixed_param */
  15844. A_UINT32 tlv_header;
  15845. /** Unique id identifying the VDEV */
  15846. A_UINT32 vdev_id;
  15847. /** Actual length in byte of data[]. */
  15848. A_UINT32 data_len;
  15849. /** This structure is used to send OEM DATA binary blobs from
  15850. * application/service to firmware where Host driver is pass through.
  15851. * The OEM-specific commands from OEM-specific userspace applications
  15852. * are passed to OEM-specific feature handlers in firmware as OEM DATA
  15853. * binary blobs. The format of the data is per agreement between FW and
  15854. * userspace applications, with the binary blob beginning with a header
  15855. * that identifies to the FW the nature of the remaining data within the
  15856. * blob.
  15857. *
  15858. * Following this structure is the TLV:
  15859. * A_UINT8 data[]; <-- actual length in byte given by field data_len.
  15860. */
  15861. } wmi_oem_data_cmd_fixed_param;
  15862. typedef struct {
  15863. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
  15864. A_UINT32 data_len; /** length in byte of data[]. */
  15865. /* This structure is used to send REQ binary blobs
  15866. * from application/service to firmware where Host drv is pass through .
  15867. * Following this structure is the TLV:
  15868. * A_UINT8 data[]; <-- length in byte given by field data_len.
  15869. */
  15870. } wmi_nan_cmd_param;
  15871. typedef struct {
  15872. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_host_config_param */
  15873. A_UINT32 nan_2g_disc_disable:1; /** This bit when set to 1 indicate NAN 2G discovery should be disabled */
  15874. A_UINT32 nan_5g_disc_disable:1; /** This bit when set to 1 indicate NAN 5G discovery should be disabled */
  15875. A_UINT32 reserved:30;
  15876. } wmi_nan_host_config_param_PROTOTYPE;
  15877. #define wmi_nan_host_config_param wmi_nan_host_config_param_PROTOTYPE
  15878. typedef struct {
  15879. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
  15880. A_UINT32 data_len; /** length in byte of data[]. */
  15881. /* This structure is used to send REQ binary blobs
  15882. * from firmware to application/service where Host drv is pass through .
  15883. * Following this structure is the TLV:
  15884. * A_UINT8 data[]; <-- length in byte given by field data_len.
  15885. */
  15886. } wmi_nan_event_hdr;
  15887. typedef struct {
  15888. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_info */
  15889. A_UINT32 mac_id; /* MAC ID associated with NAN primary discovery channel; Valid only for NAN enable resp message identified by NAN_MSG_ID_ENABLE_RSP */
  15890. A_UINT32 status:1; /** This bit when set to 0 indicates status is successful; Valid only for NAN enable resp message identified by NAN_MSG_ID_ENABLE_RSP */
  15891. A_UINT32 reserved:31;
  15892. } wmi_nan_event_info_PROTOTYPE;
  15893. #define wmi_nan_event_info wmi_nan_event_info_PROTOTYPE
  15894. /**
  15895. * Event to indicate NAN discovery interface created
  15896. */
  15897. typedef struct {
  15898. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param */
  15899. A_UINT32 tlv_header;
  15900. /** Unique id identifying the VDEV */
  15901. A_UINT32 vdev_id;
  15902. /** NAN interface MAC address */
  15903. wmi_mac_addr nan_interface_macaddr;
  15904. } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
  15905. #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
  15906. /**
  15907. * Event to indicate NAN discovery interface deleted
  15908. */
  15909. typedef struct {
  15910. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param */
  15911. A_UINT32 tlv_header;
  15912. /** Unique id identifying the VDEV */
  15913. A_UINT32 vdev_id;
  15914. } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
  15915. #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
  15916. /**
  15917. * Event to indicate NAN device started new cluster
  15918. */
  15919. typedef struct {
  15920. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param */
  15921. A_UINT32 tlv_header;
  15922. /** Unique id identifying the VDEV */
  15923. A_UINT32 vdev_id;
  15924. /** NAN Cluster ID */
  15925. A_UINT32 nan_cluster_id;
  15926. } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
  15927. #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
  15928. /**
  15929. * Event to indicate NAN device joined to cluster
  15930. */
  15931. typedef struct {
  15932. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param */
  15933. A_UINT32 tlv_header;
  15934. /** Unique id identifying the VDEV */
  15935. A_UINT32 vdev_id;
  15936. /** NAN Cluster ID */
  15937. A_UINT32 nan_cluster_id;
  15938. } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
  15939. #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
  15940. /** NAN DATA CMD's */
  15941. /**
  15942. * NAN Data get capabilities req
  15943. */
  15944. typedef struct {
  15945. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param */
  15946. A_UINT32 tlv_header;
  15947. /** unique id generated in upper layer for the transaction */
  15948. A_UINT32 transaction_id;
  15949. } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
  15950. #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
  15951. /**
  15952. * NDP Response code
  15953. */
  15954. typedef enum {
  15955. NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
  15956. NDP_RSP_CODE_REQUEST_REJECT = 0x01,
  15957. NDP_RSP_CODE_REQUEST_DEFER = 0x02,
  15958. } wmi_ndp_rsp_code_PROTOTYPE;
  15959. #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
  15960. /**
  15961. * NDP Channel configuration type
  15962. */
  15963. typedef enum {
  15964. WMI_NDP_CHANNEL_NOT_REQUESTED = 0, /* Channel will not configured */
  15965. WMI_NDP_REQUEST_CHANNEL_SETUP = 1, /* Channel will be provided and is optional/hint */
  15966. WMI_NDP_FORCE_CHANNEL_SETUP = 2/* NDP must start on the provided channel */
  15967. } wmi_ndp_channel_cfg_PROTOTYPE;
  15968. /*
  15969. * The WMI_NDP_IPV6_INTF_ADDR_LEN macro cannot be changed without breaking
  15970. * WMI compatibility.
  15971. */
  15972. #define WMI_NDP_IPV6_INTF_ADDR_LEN 16
  15973. typedef struct {
  15974. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_transport_ip_param */
  15975. /* Presence of ipv6_intf_addr */
  15976. A_UINT32 ipv6_addr_present;
  15977. /* Presence of transport Port */
  15978. A_UINT32 trans_port_present;
  15979. /* Presence of transport Protocol */
  15980. A_UINT32 trans_proto_present;
  15981. /* ipv6 Interface address */
  15982. A_UINT8 ipv6_intf_addr[WMI_NDP_IPV6_INTF_ADDR_LEN];
  15983. /* Transport Port */
  15984. A_UINT32 transport_port;
  15985. /* Transport Protocol */
  15986. A_UINT32 transport_protocol;
  15987. } wmi_ndp_transport_ip_param;
  15988. #define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
  15989. typedef struct {
  15990. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_channel_info */
  15991. A_UINT32 mac_id; /* mac_id associated with ndp channel at same index */
  15992. } wmi_ndp_channel_info_PROTOTYPE;
  15993. #define wmi_ndp_channel_info wmi_ndp_channel_info_PROTOTYPE
  15994. typedef struct {
  15995. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_event_param */
  15996. A_UINT32 vdev_id; /* NDI VDEV ID */
  15997. A_UINT32 ndp_termination_in_progress:1; /** This bit when set to 1 indicates to termination of all NDPs associated with NDI vdev ID is started */
  15998. A_UINT32 reserved:31;
  15999. } wmi_ndp_event_param_PROTOTYPE;
  16000. #define wmi_ndp_event_param wmi_ndp_event_param_PROTOTYPE
  16001. /**
  16002. * NDP Initiator requesting a data session
  16003. */
  16004. typedef struct {
  16005. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param */
  16006. A_UINT32 tlv_header;
  16007. /** Unique id identifying the VDEV */
  16008. A_UINT32 vdev_id;
  16009. /** unique id generated in upper layer for the transaction */
  16010. A_UINT32 transaction_id;
  16011. /** Unique Instance Id identifying the Responder's service */
  16012. A_UINT32 service_instance_id;
  16013. /** Discovery MAC addr of the publisher/peer */
  16014. wmi_mac_addr peer_discovery_mac_addr;
  16015. /** Actual number of bytes in TLV ndp_cfg */
  16016. A_UINT32 ndp_cfg_len;
  16017. /** Actual number of bytes in TLV ndp_app_info */
  16018. A_UINT32 ndp_app_info_len;
  16019. /** NDP channel configuration type defined in wmi_ndp_channel_cfg */
  16020. A_UINT32 ndp_channel_cfg;
  16021. /** NAN Cipher Suite Shared Key */
  16022. A_UINT32 nan_csid;
  16023. /** Actual number of bytes in TLV ndp_pmk */
  16024. A_UINT32 nan_pmk_len;
  16025. /** Actual number of bytes in TLV ndp_passphrase */
  16026. A_UINT32 nan_passphrase_len;
  16027. /** Actual number of bytes in TLV nan_servicename */
  16028. A_UINT32 nan_servicename_len;
  16029. /**
  16030. * TLV (tag length value) parameters follow the ndp_initiator_req
  16031. * structure. The TLV's are:
  16032. * wmi_channel channel;
  16033. * A_UINT8 ndp_cfg[];
  16034. * A_UINT8 ndp_app_info[];
  16035. * A_UINT8 ndp_pmk[];
  16036. * A_INT8 ndp_passphrase[];
  16037. * A_INT8 nan_servicename[];
  16038. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  16039. */
  16040. } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
  16041. #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
  16042. /**
  16043. * Initiate a data response on the responder side
  16044. * for data request indication from the peer
  16045. */
  16046. typedef struct {
  16047. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param */
  16048. A_UINT32 tlv_header;
  16049. /** Unique id identifying the VDEV */
  16050. A_UINT32 vdev_id;
  16051. /** unique id generated in upper layer for the transaction */
  16052. A_UINT32 transaction_id;
  16053. /**
  16054. * Unique token Id generated on the initiator/responder
  16055. * side used for a NDP session between two NAN devices
  16056. */
  16057. A_UINT32 ndp_instance_id;
  16058. /** Response Code defined in wmi_ndp_rsp_code */
  16059. A_UINT32 rsp_code;
  16060. /** Number of bytes in TLV ndp_cfg */
  16061. A_UINT32 ndp_cfg_len;
  16062. /** Number of bytes in TLV ndp_app_info */
  16063. A_UINT32 ndp_app_info_len;
  16064. /** NAN Cipher Suite Shared Key */
  16065. A_UINT32 nan_csid;
  16066. /** Actual number of bytes in TLV ndp_pmk */
  16067. A_UINT32 nan_pmk_len;
  16068. /** Actual number of bytes in TLV ndp_passphrase */
  16069. A_UINT32 nan_passphrase_len;
  16070. /** Actual number of bytes in TLV nan_servicename */
  16071. A_UINT32 nan_servicename_len;
  16072. /**
  16073. * TLV (tag length value) parameters follow the ndp_responder_req
  16074. * structure. The TLV's are:
  16075. * A_UINT8 ndp_cfg[];
  16076. * A_UINT8 ndp_app_info[];
  16077. * A_UINT8 ndp_pmk[];
  16078. * A_INT8 ndp_passphrase[];
  16079. * A_INT8 nan_servicename[];
  16080. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  16081. */
  16082. } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
  16083. #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
  16084. /**
  16085. * NDP end type
  16086. */
  16087. typedef enum {
  16088. WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
  16089. WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
  16090. WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
  16091. } wmi_ndp_end_type_PROTOTYPE;
  16092. #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
  16093. /**
  16094. * NDP end reason code
  16095. */
  16096. typedef enum {
  16097. WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
  16098. WMI_NDP_END_REASON_INACTIVITY = 0x01,
  16099. WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
  16100. } wmi_ndp_end_reason_code_PROTOTYPE;
  16101. #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
  16102. /**
  16103. * NDP end request
  16104. */
  16105. typedef struct {
  16106. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
  16107. A_UINT32 tlv_header;
  16108. /** NDP instance id */
  16109. A_UINT32 ndp_instance_id;
  16110. } wmi_ndp_end_req_PROTOTYPE;
  16111. #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
  16112. typedef struct {
  16113. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_cmd_param */
  16114. A_UINT32 vdev_id; /* NDI VDEV ID */
  16115. A_UINT32 ndp_disable:1; /** This bit when set to 1 indicates to terminate all NDPs associated with NDI vdev ID */
  16116. A_UINT32 reserved:31;
  16117. } wmi_ndp_cmd_param_PROTOTYPE;
  16118. #define wmi_ndp_cmd_param wmi_ndp_cmd_param_PROTOTYPE
  16119. /**
  16120. * NDP End request
  16121. */
  16122. typedef struct {
  16123. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param */
  16124. A_UINT32 tlv_header;
  16125. /** unique id generated in upper layer for the transaction */
  16126. A_UINT32 transaction_id;
  16127. /**
  16128. * TLV (tag length value) parameters follow the ndp_end_req
  16129. * structure. The TLV's are:
  16130. * wmi_ndp_end_req ndp_end_req_list[];
  16131. */
  16132. } wmi_ndp_end_req_fixed_param_PROTOTYPE;
  16133. #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
  16134. /* NAN DATA RSP EVENTS */
  16135. /**
  16136. * Event to indicate NAN Data Interface capabilities cmd
  16137. */
  16138. typedef struct {
  16139. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param */
  16140. A_UINT32 tlv_header;
  16141. /** Copy of transaction_id received in wmi_ndi_get_cap_req */
  16142. A_UINT32 transaction_id;
  16143. /** Max ndi interface support */
  16144. A_UINT32 max_ndi_interfaces;
  16145. /** Max ndp sessions can support */
  16146. A_UINT32 max_ndp_sessions;
  16147. /** Max number of peer's per ndi */
  16148. A_UINT32 max_peers_per_ndi;
  16149. /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
  16150. A_UINT32 nan_data_supported_bands;
  16151. } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
  16152. #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
  16153. /**
  16154. * NDP command response code
  16155. */
  16156. typedef enum {
  16157. NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
  16158. NDP_CMD_RSP_STATUS_ERROR = 0x01,
  16159. } wmi_ndp_cmd_rsp_status_PROTOTYPE;
  16160. #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
  16161. /**
  16162. * Event response for wmi_ndp_initiator_req
  16163. */
  16164. typedef struct {
  16165. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param */
  16166. A_UINT32 tlv_header;
  16167. /** Unique id identifying the VDEV */
  16168. A_UINT32 vdev_id;
  16169. /** Copy of transaction_id received in wmi_ndp_initiator_req */
  16170. A_UINT32 transaction_id;
  16171. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  16172. A_UINT32 rsp_status;
  16173. A_UINT32 reason_code;
  16174. /**
  16175. * Unique token Id generated on the initiator/responder
  16176. * side used for a NDP session between two NAN devices
  16177. */
  16178. A_UINT32 ndp_instance_id;
  16179. } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
  16180. #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
  16181. /**
  16182. * Event response for wmi_ndp_responder_req cmd
  16183. */
  16184. typedef struct {
  16185. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param */
  16186. A_UINT32 tlv_header;
  16187. /** Unique id identifying the VDEV */
  16188. A_UINT32 vdev_id;
  16189. /** Copy of transaction_id received in wmi_ndp_responder_req */
  16190. A_UINT32 transaction_id;
  16191. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  16192. A_UINT32 rsp_status;
  16193. A_UINT32 reason_code;
  16194. /**
  16195. * Unique token Id generated on the initiator/responder
  16196. * side used for a NDP session between two NAN devices
  16197. */
  16198. A_UINT32 ndp_instance_id;
  16199. /** NDI mac address of the peer */
  16200. wmi_mac_addr peer_ndi_mac_addr;
  16201. /** Host can create peer if this entry is TRUE */
  16202. A_UINT32 create_peer;
  16203. } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
  16204. #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
  16205. /**
  16206. * Active ndp instance id
  16207. */
  16208. typedef struct {
  16209. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_active_ndp_instance_id */
  16210. A_UINT32 tlv_header;
  16211. /** NDP instance id */
  16212. A_UINT32 ndp_instance_id;
  16213. } wmi_active_ndp_instance_id_PROTOTYPE;
  16214. #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
  16215. /**
  16216. * NDP end response per ndi
  16217. */
  16218. typedef struct {
  16219. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi */
  16220. A_UINT32 tlv_header;
  16221. /** Unique id identifying the VDEV */
  16222. A_UINT32 vdev_id;
  16223. /** Peer MAC addr */
  16224. wmi_mac_addr peer_mac_addr;
  16225. /** Number of active ndps on this ndi */
  16226. A_UINT32 num_active_ndps_on_ndi;
  16227. } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
  16228. #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
  16229. /**
  16230. * Event response for wmi_ndp_end_req cmd
  16231. */
  16232. typedef struct {
  16233. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param */
  16234. A_UINT32 tlv_header;
  16235. /** Copy of transaction_id received in wmi_ndp_end_req */
  16236. A_UINT32 transaction_id;
  16237. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  16238. A_UINT32 rsp_status;
  16239. A_UINT32 reason_code;
  16240. /**
  16241. * TLV (tag length value) parameters follow the ndp_end_rsp
  16242. * structure. The TLV's are:
  16243. * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
  16244. * wmi_active_ndp_instance_id active_ndp_instances_id[];
  16245. */
  16246. } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
  16247. #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
  16248. /** NAN DATA EVENTS */
  16249. /**
  16250. * NDP self role
  16251. */
  16252. typedef enum {
  16253. WMI_NDP_INITIATOR_ROLE,
  16254. WMI_NDP_RESPONDER_ROLE,
  16255. } wmi_ndp_self_role_PROTOTYPE;
  16256. #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
  16257. /**
  16258. * NDP accept policy
  16259. */
  16260. typedef enum {
  16261. WMI_NDP_ACCEPT_POLICY_NONE,
  16262. WMI_NDP_ACCEPT_POLICY_ALL,
  16263. } wmi_ndp_accept_policy_PROTOTYPE;
  16264. #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
  16265. /**
  16266. * Event indication received on the responder side when a NDP Initiator request/
  16267. * NDP session is initiated on the Initiator side (self role will be NDP_RESPONDER_ROLE)
  16268. *
  16269. * Event indication received on the initiator side when a
  16270. * NDP responder request on the Initiator side (self role will be NDP_INITIATOR_ROLE)
  16271. */
  16272. typedef struct {
  16273. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param */
  16274. A_UINT32 tlv_header;
  16275. /** Unique id identifying the VDEV */
  16276. A_UINT32 vdev_id;
  16277. /** Self NDP Role defined in wmi_ndp_self_role */
  16278. A_UINT32 self_ndp_role;
  16279. /** Accept policy defined in wmi_ndp_accept_policy */
  16280. A_UINT32 accept_policy;
  16281. /** Unique Instance Id corresponding to a service/session. */
  16282. A_UINT32 service_instance_id;
  16283. /** Discovery MAC addr of the peer/initiator */
  16284. wmi_mac_addr peer_discovery_mac_addr;
  16285. /** NDI mac address of the peer */
  16286. wmi_mac_addr peer_ndi_mac_addr;
  16287. /**
  16288. * Unique token Id generated on the initiator/responder
  16289. * side used for a NDP session between two NAN devices
  16290. */
  16291. A_UINT32 ndp_instance_id;
  16292. /** Number of bytes in TLV wmi_ndp_cfg */
  16293. A_UINT32 ndp_cfg_len;
  16294. /** Number of bytes in TLV wmi_ndp_app_info */
  16295. A_UINT32 ndp_app_info_len;
  16296. /** Peer NAN Cipher Suite Shared Key */
  16297. A_UINT32 nan_csid;
  16298. /** Actual number of bytes in TLV nan_scid */
  16299. A_UINT32 nan_scid_len;
  16300. /** Self NDI mac address */
  16301. wmi_mac_addr self_ndi_mac_addr;
  16302. /**
  16303. * TLV (tag length value) parameters follow the ndp_indication
  16304. * structure. The TLV's are:
  16305. * A_UINT8 ndp_cfg[];
  16306. * A_UINT8 ndp_app_info[];
  16307. * A_UINT8 nan_scid[];
  16308. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  16309. */
  16310. } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
  16311. #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
  16312. /**
  16313. * Event indication of data confirm is received on both
  16314. * initiator and responder side confirming a NDP session
  16315. */
  16316. typedef struct {
  16317. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param */
  16318. A_UINT32 tlv_header;
  16319. /** Unique id identifying the VDEV */
  16320. A_UINT32 vdev_id;
  16321. /**
  16322. * Unique token Id generated on the initiator/responder
  16323. * side used for a NDP session between two NAN devices
  16324. */
  16325. A_UINT32 ndp_instance_id;
  16326. /** NDI mac address of the peer (required to derive target ipv6 address) */
  16327. wmi_mac_addr peer_ndi_mac_addr;
  16328. /** Response Code defined in wmi_ndp_rsp_code */
  16329. A_UINT32 rsp_code;
  16330. /** Number of bytes in TLV wmi_ndp_cfg */
  16331. A_UINT32 ndp_cfg_len;
  16332. /** Number of bytes in TLV wmi_ndp_app_info */
  16333. A_UINT32 ndp_app_info_len;
  16334. /** Reason Code */
  16335. A_UINT32 reason_code;
  16336. /** Number of active ndps on this peer */
  16337. A_UINT32 num_active_ndps_on_peer;
  16338. /** Number of channels on this peer */
  16339. A_UINT32 num_ndp_channels;
  16340. /**
  16341. * TLV (tag length value) parameters follow the ndp_confirm
  16342. * structure. The TLV's are:
  16343. * A_UINT8 ndp_cfg[];
  16344. * A_UINT8 ndp_app_info[];
  16345. * wmi_channel ndp_channel_list[];
  16346. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  16347. * // since Nss is associated with the channel
  16348. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  16349. */
  16350. } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
  16351. #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
  16352. /**
  16353. * Event indication received on the initiator/responder side terminating a NDP session
  16354. */
  16355. typedef struct {
  16356. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_indication */
  16357. A_UINT32 tlv_header;
  16358. /** type defined in wmi_ndp_end_type */
  16359. A_UINT32 type;
  16360. /** Unique id identifying the VDEV */
  16361. A_UINT32 vdev_id;
  16362. /** reason_code defined in wmi_ndp_end_reason_code */
  16363. A_UINT32 reason_code;
  16364. /** NDP instance id */
  16365. A_UINT32 ndp_instance_id;
  16366. /** NDI MAC addr of the peer */
  16367. wmi_mac_addr peer_ndi_mac_addr;
  16368. /** Number of active ndps on this peer */
  16369. A_UINT32 num_active_ndps_on_peer;
  16370. } wmi_ndp_end_indication_PROTOTYPE;
  16371. #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
  16372. typedef struct
  16373. {
  16374. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndl_schedule_update_fixed_param */
  16375. /** Unique id identifying the VDEV */
  16376. A_UINT32 vdev_id;
  16377. /** peer MAC address */
  16378. wmi_mac_addr peer_macaddr;
  16379. /** Flags:
  16380. * Bit 0 -> Nss updated
  16381. * Bit 1 -> channel list updated
  16382. * Bits 2-31 -> Reserved
  16383. */
  16384. A_UINT32 flags;
  16385. /** num of channels */
  16386. A_UINT32 num_channels;
  16387. /** num of ndp instances */
  16388. A_UINT32 num_ndp_instances;
  16389. /**
  16390. * TLV (tag length value) parameters follow the ndl_schedule_update
  16391. * structure. The TLV's are:
  16392. * A_UINT32 ndp_instance_list[];
  16393. * wmi_channel ndl_channel_list[];
  16394. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  16395. * // since Nss is associate with a channel
  16396. */
  16397. } wmi_ndl_schedule_update_fixed_param_PROTOTYPE;
  16398. #define wmi_ndl_schedule_update_fixed_param wmi_ndl_schedule_update_fixed_param_PROTOTYPE
  16399. typedef struct {
  16400. A_UINT32 tlv_header;
  16401. A_UINT32 num_data;
  16402. /* followed by WMITLV_TAG_ARRAY_BYTE */
  16403. } wmi_diag_data_container_event_fixed_param;
  16404. enum {
  16405. WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
  16406. WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
  16407. WMI_PDEV_PARAM_TXPOWER_REASON_MAX
  16408. };
  16409. #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
  16410. #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
  16411. #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
  16412. #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
  16413. #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
  16414. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
  16415. #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
  16416. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
  16417. #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
  16418. (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
  16419. #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
  16420. (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
  16421. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK 0x00000001
  16422. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT 0
  16423. #define SET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param, value) \
  16424. do { \
  16425. (param) &= ~PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK; \
  16426. (param) |= (value) << PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT; \
  16427. } while (0)
  16428. #define GET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param) \
  16429. (((param) & PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK) >> PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT)
  16430. /**
  16431. * This command is sent from WLAN host driver to firmware to
  16432. * notify the current modem power state. Host would receive a
  16433. * message from modem when modem is powered on. Host driver
  16434. * would then send this command to firmware. Firmware would then
  16435. * power on WCI-2 (UART) interface for LTE/MWS Coex.
  16436. *
  16437. * This command is only applicable for APQ platform which has
  16438. * modem on the platform. If firmware doesn't support MWS Coex,
  16439. * this command can be dropped by firmware.
  16440. *
  16441. * This is a requirement from modem team that WCN can't toggle
  16442. * UART before modem is powered on.
  16443. */
  16444. typedef struct {
  16445. /** TLV tag and len; tag equals
  16446. * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
  16447. A_UINT32 tlv_header;
  16448. /** Modem power state parameter */
  16449. A_UINT32 modem_power_state;
  16450. } wmi_modem_power_state_cmd_param;
  16451. enum {
  16452. WMI_MODEM_STATE_OFF = 0,
  16453. WMI_MODEM_STATE_ON
  16454. };
  16455. /**
  16456. * This command is sent from WLAN host driver to firmware to
  16457. * notify the updated Specific Absorption Rate (SAR) limits.
  16458. * A critical regulation for FCC compliance, OEMs require methods to set
  16459. * limits on TX power of WLAN/WWAN.
  16460. * Host would receive instructions on what to set the limits per
  16461. * band/chain/modulation to, it would then interpret and send the limits
  16462. * to FW using this WMI message.
  16463. * Since it is possible to have too many commands to fit into one message,
  16464. * FW will keep receiving the messages, until it finds one with
  16465. * commit_limits = 1, at which point it will apply all the received
  16466. * specifications.
  16467. */
  16468. typedef struct {
  16469. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
  16470. A_UINT32 tlv_header;
  16471. /** when set to WMI_SAR_FEATURE_ON_*, enable SAR feature
  16472. * with BDF (SET_0 to 4) or WMI
  16473. * if set to WMI_SAR_FEATURE_OFF, disable feature;
  16474. * if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
  16475. */
  16476. A_UINT32 sar_enable;
  16477. /** number of items in sar_limits[] */
  16478. A_UINT32 num_limit_rows;
  16479. /** once received and is set to 1, FW will calculate the power limits
  16480. * and send set_power command to apply them.
  16481. * Otherwise just update local values stored in FW until a future msg
  16482. * with commit_limits=1 arrives.
  16483. */
  16484. A_UINT32 commit_limits;
  16485. /**
  16486. * TLV (tag length value) parameters follow the sar_limit_cmd_row
  16487. * structure. The TLV's are:
  16488. * wmi_sar_limit_cmd_row sar_limits[];
  16489. */
  16490. } wmi_sar_limits_cmd_fixed_param;
  16491. enum wmi_sar_feature_state_flags {
  16492. WMI_SAR_FEATURE_OFF = 0,
  16493. WMI_SAR_FEATURE_ON_SET_0,
  16494. WMI_SAR_FEATURE_ON_SET_1,
  16495. WMI_SAR_FEATURE_ON_SET_2,
  16496. WMI_SAR_FEATURE_ON_SET_3,
  16497. WMI_SAR_FEATURE_ON_SET_4,
  16498. WMI_SAR_FEATURE_NO_CHANGE,
  16499. WMI_SAR_FEATURE_ON_USER_DEFINED,
  16500. WMI_SAR_FEATURE_ON_SAR_V2_0,
  16501. WMI_SAR_FEATURE_ON_SAR_V3,
  16502. };
  16503. typedef struct {
  16504. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
  16505. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  16506. * new band_id values .
  16507. */
  16508. A_UINT32 band_id;
  16509. A_UINT32 chain_id;
  16510. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  16511. A_UINT32 mod_id;
  16512. /**
  16513. * To be backwards-compatible with older code use a union with
  16514. * limit_value & limit_index as alternate names / interpretations
  16515. * of the same message information element.
  16516. * The older code still uses limit_value, while the new code will
  16517. * use limit_index.
  16518. * The interpretation of the field as value or index depends on
  16519. * WMI_SAR_FEATURE_ON_*
  16520. * WMI_SAR_FEATURE_ON_SAR_V2_0 will use it as index, other case
  16521. * still use it as value.
  16522. */
  16523. union {
  16524. /** actual power limit value, in steps of 0.5 dBm */
  16525. A_UINT32 limit_value;
  16526. A_UINT32 limit_index;
  16527. };
  16528. /** in case the OEM doesn't care about one of the qualifiers from above,
  16529. * the bit for that qualifier within the validity_bitmap can be set to 0
  16530. * so that limit is applied to all possible cases of this qualifier
  16531. * (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
  16532. * treated as a wildcard).
  16533. * Current masks:
  16534. * WMI_SAR_BAND_ID_VALID_MASK
  16535. * WMI_SAR_CHAIN_ID_VALID_MASK
  16536. * WMI_SAR_MOD_ID_VALID_MASK
  16537. * Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
  16538. * it means apply same limit_value to both WMI_SAR_MOD_CCK and
  16539. * WMI_SAR_MOD_OFDM cases.
  16540. */
  16541. A_UINT32 validity_bitmap;
  16542. } wmi_sar_limit_cmd_row;
  16543. enum wmi_sar_band_id_flags {
  16544. WMI_SAR_2G_ID = 0,
  16545. WMI_SAR_5G_ID
  16546. };
  16547. enum wmi_sar_mod_id_flags {
  16548. WMI_SAR_MOD_CCK = 0,
  16549. WMI_SAR_MOD_OFDM
  16550. };
  16551. /**
  16552. * This message is sent from FW to WLAN host to inform the host of the
  16553. * updated Specific Absorption Rate (SAR) limits currently in use.
  16554. */
  16555. typedef struct {
  16556. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_event_param */
  16557. A_UINT32 tlv_header;
  16558. /** when set to WMI_SAR_FEATURE_ON_*, SAR feature is enabled
  16559. * with BDF (SET_0 to 4) or WMI
  16560. * if set to WMI_SAR_FEATURE_OFF, feature is disabled;
  16561. */
  16562. A_UINT32 sar_enable;
  16563. /**
  16564. * number of items in sar_limits[].
  16565. * used when sar_enable == WMI_SAR_FEATURE_ON_USER_DEFINED.
  16566. * Should be zero if any of the BDF sets is activated.
  16567. */
  16568. A_UINT32 num_limit_rows;
  16569. /**
  16570. * TLV (tag length value) parameters follow the sar_get_limit_event_row
  16571. * structure. The TLV's are:
  16572. * wmi_sar_get_limit_event_row sar_limits[num_limit_rows];
  16573. */
  16574. } wmi_sar_get_limits_event_fixed_param;
  16575. typedef struct {
  16576. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limit_event_row */
  16577. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  16578. * new band_id values .
  16579. */
  16580. A_UINT32 band_id;
  16581. A_UINT32 chain_id;
  16582. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  16583. A_UINT32 mod_id;
  16584. /** actual power limit value, in steps of 0.5 dBm */
  16585. A_UINT32 limit_value;
  16586. } wmi_sar_get_limit_event_row;
  16587. #define WMI_SAR_BAND_ID_VALID_MASK (0x1)
  16588. #define WMI_SAR_CHAIN_ID_VALID_MASK (0x2)
  16589. #define WMI_SAR_MOD_ID_VALID_MASK (0x4)
  16590. #define WMI_SET_SAR_BAND_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
  16591. #define WMI_SET_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
  16592. #define WMI_SET_SAR_MOD_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
  16593. #define WMI_IS_SAR_BAND_ID_VALID(bitmap) ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
  16594. #define WMI_IS_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
  16595. #define WMI_IS_SAR_MOD_ID_VALID(bitmap) ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
  16596. /**
  16597. * This command is sent from WLAN host driver to firmware to
  16598. * get current Specific Absorption Rate (SAR) limits status from firmware.
  16599. * The command does not require any parameters as of now.
  16600. */
  16601. typedef struct {
  16602. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_cmd_param */
  16603. A_UINT32 tlv_header;
  16604. /** currently no parameters are required. Reserved bit field for future use added */
  16605. /* All bits need to be set to 0 while it is a reserved field. */
  16606. A_UINT32 reserved;
  16607. } wmi_sar_get_limits_cmd_fixed_param;
  16608. #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
  16609. #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
  16610. /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
  16611. generated whenever firmware roamed to new AP silently and
  16612. (a) If the host is awake, FW sends the event to the host immediately .
  16613. (b) If host is in sleep then either
  16614. (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
  16615. command to FW (part of host wake up sequence from low power mode) before sending the event host.
  16616. (2) data/mgmt frame is received from roamed AP, which needs to return to host
  16617. */
  16618. #define GTK_OFFLOAD_KCK_EXTENDED_BYTES 32
  16619. typedef struct {
  16620. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
  16621. A_UINT32 tlv_header;
  16622. A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
  16623. A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
  16624. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
  16625. } wmi_key_material;
  16626. typedef struct {
  16627. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material_ext */
  16628. A_UINT32 tlv_header;
  16629. /*
  16630. * key_buffer contains kck,kck2,kek,kek2,replay counter, in order
  16631. * The split between kck vs. kek should be known to host based on akmp.
  16632. */
  16633. A_UINT8 key_buffer[GTK_OFFLOAD_KEK_EXTENDED_BYTES+GTK_OFFLOAD_KCK_EXTENDED_BYTES+GTK_REPLAY_COUNTER_BYTES];
  16634. } wmi_key_material_ext;
  16635. typedef struct {
  16636. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
  16637. /** Unique id identifying the VDEV on which roaming is done by firmware */
  16638. A_UINT32 vdev_id;
  16639. /** auth_status: connected or authorized */
  16640. A_UINT32 auth_status;
  16641. /** roam_reason:
  16642. * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
  16643. * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
  16644. * bit 6 for HW mode status, set 1 to indicate host to schedule
  16645. * HW mode change, see WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE.
  16646. */
  16647. A_UINT32 roam_reason;
  16648. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
  16649. A_UINT32 rssi;
  16650. /** MAC address of roamed AP */
  16651. wmi_mac_addr bssid; /* BSSID */
  16652. /** whether the frame is beacon or probe rsp */
  16653. A_UINT32 is_beacon;
  16654. /** the length of beacon/probe rsp */
  16655. A_UINT32 bcn_probe_rsp_len;
  16656. /** the length of reassoc rsp */
  16657. A_UINT32 reassoc_rsp_len;
  16658. /** the length of reassoc req */
  16659. A_UINT32 reassoc_req_len;
  16660. /**
  16661. * TLV (tag length value) parameters follows roam_synch_event
  16662. * The TLV's are:
  16663. * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
  16664. * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
  16665. * wmi_channel chan;
  16666. * wmi_key_material key;
  16667. * A_UINT32 status; subnet changed status not being used currently.
  16668. * will pass the information using roam_status.
  16669. * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
  16670. * wmi_key_material_ext key_ext
  16671. **/
  16672. } wmi_roam_synch_event_fixed_param;
  16673. /**
  16674. * The WMI_ROAM_SYNCH_FRAME_EVENTID message is used in conjunction with the
  16675. * WMI_ROAM_SYNCH_EVENTID message. The former will be sent 1st followed by
  16676. * the latter for cases where the WMI_ROAM_SYNCH_EVENTID message size would
  16677. * exceed 2K. The more_frag field in the WMI_ROAM_SYNCH_FRAME_EVENTID informs
  16678. * the host whether more WMI_ROAM_SYNCH_FRAME_EVENTID messages would follow;
  16679. * after the WMI_ROAM_SYNCH_FRAME_EVENTID messages the target sends the
  16680. * WMI_ROAM_SYNCH_EVENTID with bcn_probe_rsp_len, reassoc_rsp_len, and
  16681. * reassoc_rsp_len set to 0.
  16682. */
  16683. typedef struct {
  16684. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_frame_event_fixed_param */
  16685. /** Unique id identifying the VDEV on which roaming is done by firmware */
  16686. A_UINT32 vdev_id;
  16687. /** More frags to follow? */
  16688. A_UINT32 more_frag;
  16689. /** whether the frame is beacon or probe rsp */
  16690. A_UINT32 is_beacon;
  16691. /** the length of beacon/probe rsp */
  16692. A_UINT32 bcn_probe_rsp_len;
  16693. /** the length of reassoc rsp */
  16694. A_UINT32 reassoc_rsp_len;
  16695. /** the length of reassoc req */
  16696. A_UINT32 reassoc_req_len;
  16697. /**
  16698. * TLV (tag length value) parameters follows roam_synch_event
  16699. * The TLV's are:
  16700. * A_UINT8 bcn_probe_rsp_frame[bcn_probe_rsp_len];
  16701. * A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
  16702. * A_UINT8 reassoc_req_frame[reassoc_req_len];
  16703. */
  16704. } wmi_roam_synch_frame_event_fixed_param;
  16705. #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
  16706. typedef struct {
  16707. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
  16708. A_UINT32 tlv_header;
  16709. /** MAC address of the peer for which the estimated link speed is required. */
  16710. wmi_mac_addr peer_macaddr;
  16711. /* Set to 1 only if vdev_id field is valid */
  16712. A_UINT32 valid_vdev_id;
  16713. /* VDEV to which the peer belongs to */
  16714. A_UINT32 vdev_id;
  16715. } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
  16716. typedef struct {
  16717. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
  16718. A_UINT32 tlv_header;
  16719. /** MAC address of the peer for which the estimated link speed is required.
  16720. */
  16721. wmi_mac_addr peer_macaddr;
  16722. /* Estimated link speed in kbps.
  16723. * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
  16724. */
  16725. A_UINT32 est_linkspeed_kbps;
  16726. /* Set to 1 only if vdev_id field is valid */
  16727. A_UINT32 valid_vdev_id;
  16728. /* VDEV to which the peer belongs to */
  16729. A_UINT32 vdev_id;
  16730. } wmi_peer_estimated_linkspeed_event_fixed_param;
  16731. typedef struct {
  16732. A_UINT32 tlv_header; /* TLV tag and len; tag equals */
  16733. /* vdev ID */
  16734. A_UINT32 vdev_id;
  16735. A_UINT32 data_len; /** length in byte of data[]. */
  16736. /* This structure is used to send REQ binary blobs
  16737. * from application/service to firmware where Host drv is pass through .
  16738. * Following this structure is the TLV:
  16739. * A_UINT8 data[]; <-- length in byte given by field data_len.
  16740. */
  16741. } wmi_req_stats_ext_cmd_fixed_param;
  16742. typedef struct {
  16743. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
  16744. A_UINT32 vdev_id; /** vdev ID */
  16745. A_UINT32 data_len; /** length in byte of data[]. */
  16746. /* This structure is used to send REQ binary blobs
  16747. * from firmware to application/service where Host drv is pass through .
  16748. * Following this structure is the TLV:
  16749. * A_UINT8 data[]; <-- length in byte given by field data_len.
  16750. */
  16751. } wmi_stats_ext_event_fixed_param;
  16752. typedef struct {
  16753. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
  16754. /** unique id identifying the VDEV, generated by the caller */
  16755. A_UINT32 vdev_id;
  16756. /** peer MAC address */
  16757. wmi_mac_addr peer_macaddr;
  16758. } wmi_peer_delete_resp_event_fixed_param;
  16759. typedef struct {
  16760. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_all_peer_resp_event_fixed_param */
  16761. /** unique id identifying the VDEV, generated by the caller */
  16762. A_UINT32 vdev_id;
  16763. /* Status of peer delete all command */
  16764. /*
  16765. * Values for Status:
  16766. * 0 - OK; command successful
  16767. * 1 - EINVAL; Requested invalid vdev_id
  16768. * 2 - EFAILED; Delete all peer failed
  16769. */
  16770. A_UINT32 status;
  16771. } wmi_vdev_delete_all_peer_resp_event_fixed_param;
  16772. typedef struct {
  16773. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
  16774. A_UINT32 tlv_header;
  16775. A_UINT32 vdev_id; /* vdev ID */
  16776. /* MAC address of the peer for which the estimated link speed is required.*/
  16777. wmi_mac_addr peer_macaddr;
  16778. A_UINT32 state; /* peer state */
  16779. } wmi_peer_state_event_fixed_param;
  16780. typedef struct {
  16781. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param */
  16782. A_UINT32 tlv_header;
  16783. /* unique id identifying the VDEV, generated by the caller */
  16784. A_UINT32 vdev_id;
  16785. /* peer MAC address */
  16786. wmi_mac_addr peer_macaddr;
  16787. } wmi_peer_assoc_conf_event_fixed_param;
  16788. enum {
  16789. WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, /** scan_type: passive */
  16790. WMI_2G4_HT40_OBSS_SCAN_ACTIVE, /** scan_type: active */
  16791. };
  16792. typedef struct {
  16793. /**
  16794. * TLV tag and len;
  16795. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
  16796. */
  16797. A_UINT32 tlv_header;
  16798. A_UINT32 vdev_id;
  16799. /**
  16800. * active or passive. if active all the channels are actively scanned.
  16801. * if passive then all the channels are passively scanned
  16802. */
  16803. A_UINT32 scan_type;
  16804. /**
  16805. * FW can perform multiple scans with in a OBSS scan interval.
  16806. * For each scan,
  16807. * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
  16808. * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
  16809. * The unit for these 2 parameters is TUs.
  16810. */
  16811. A_UINT32 obss_scan_passive_dwell;
  16812. A_UINT32 obss_scan_active_dwell;
  16813. /**
  16814. * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
  16815. * both min and total per channel dwell time requirement
  16816. */
  16817. A_UINT32 bss_channel_width_trigger_scan_interval;
  16818. /**
  16819. * FW can perform multiple scans with in a OBSS scan interval.
  16820. * For each scan,
  16821. * the total per channel dwell time across all scans with in OBSS scan interval should be
  16822. * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
  16823. * for active scans and ,
  16824. * The unit for these 2 parameters is TUs.
  16825. */
  16826. A_UINT32 obss_scan_passive_total_per_channel;
  16827. A_UINT32 obss_scan_active_total_per_channel;
  16828. A_UINT32 bss_width_channel_transition_delay_factor; /** parameter to check exemption from scan */
  16829. A_UINT32 obss_scan_activity_threshold; /** parameter to check exemption from scan */
  16830. /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
  16831. A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */
  16832. A_UINT32 current_operating_class; /** STA current operating class */
  16833. /** length of 2.4GHz channel list to scan at, channel number list in tlv->channels[] */
  16834. A_UINT32 channel_len;
  16835. /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
  16836. A_UINT32 ie_len;
  16837. /**
  16838. * TLV (tag length value) parameters following the fixed param structure
  16839. * A_UINT8 channels[channel_len]; // channel numbers
  16840. * A_UINT8 ie_field[ie_len];
  16841. * A_UINT32 chan_freqs[channel_len] // in MHz
  16842. */
  16843. } wmi_obss_scan_enable_cmd_fixed_param;
  16844. typedef struct {
  16845. /**
  16846. * TLV tag and len;
  16847. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
  16848. */
  16849. A_UINT32 tlv_header;
  16850. A_UINT32 vdev_id;
  16851. } wmi_obss_scan_disable_cmd_fixed_param;
  16852. typedef struct {
  16853. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
  16854. A_UINT32 tlv_header;
  16855. /** unique id identifying the VDEV */
  16856. A_UINT32 vdev_id;
  16857. /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
  16858. A_UINT32 tx_status;
  16859. } wmi_offload_prb_rsp_tx_status_event_fixed_param;
  16860. typedef enum {
  16861. WMI_FRAME_TX_OK, /* frame tx ok */
  16862. WMI_FRAME_TX_XRETRY, /* excessivley retried */
  16863. WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
  16864. WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
  16865. } WMI_FRAME_TX_STATUS;
  16866. /**
  16867. * This command is sent from WLAN host driver to firmware to
  16868. * request firmware to send the latest channel avoidance range
  16869. * to host.
  16870. *
  16871. * This command is only applicable for APQ platform which has
  16872. * modem on the platform. If firmware doesn't support MWS Coex,
  16873. * this command can be dropped by firmware.
  16874. *
  16875. * Host would send this command to firmware to request a channel
  16876. * avoidance information update.
  16877. */
  16878. typedef struct {
  16879. /** TLV tag and len; tag equals
  16880. * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
  16881. A_UINT32 tlv_header;
  16882. } wmi_chan_avoid_update_cmd_param;
  16883. /* ExtScan operation mode */
  16884. typedef enum {
  16885. WMI_EXTSCAN_MODE_NONE = 0x0000,
  16886. WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
  16887. WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
  16888. WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
  16889. } wmi_extscan_operation_mode;
  16890. /* Channel Mask */
  16891. typedef enum {
  16892. WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
  16893. WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
  16894. WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
  16895. WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
  16896. } wmi_channel_band_mask;
  16897. typedef enum {
  16898. WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
  16899. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
  16900. WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
  16901. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
  16902. WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
  16903. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
  16904. WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
  16905. WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
  16906. WMI_EXTSCAN_EVENT_MAX = 0x8000
  16907. } wmi_extscan_event_type;
  16908. #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
  16909. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
  16910. #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
  16911. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
  16912. WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
  16913. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
  16914. typedef enum {
  16915. WMI_EXTSCAN_NO_FORWARDING = 0x0000,
  16916. WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
  16917. } wmi_extscan_forwarding_flags;
  16918. typedef enum {
  16919. WMI_EXTSCAN_USE_MSD = 0x0001, /* Use Motion Sensor Detection */
  16920. WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, /* Extscan LPASS extended batching feature is supported and enabled */
  16921. } wmi_extscan_configuration_flags;
  16922. typedef enum {
  16923. WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, /* Cache the results of bucket whose configuration flags has this bit set */
  16924. WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002, /* Report ext scan results to context hub or not. */
  16925. } wmi_extscan_bucket_configuration_flags;
  16926. typedef enum {
  16927. WMI_EXTSCAN_STATUS_OK = 0,
  16928. WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
  16929. WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
  16930. WMI_EXTSCAN_STATUS_INTERNAL_ERROR
  16931. } wmi_extscan_start_stop_status;
  16932. typedef struct {
  16933. /** Request ID - to identify command. Cannot be 0 */
  16934. A_UINT32 request_id;
  16935. /** Requestor ID - client requesting ExtScan */
  16936. A_UINT32 requestor_id;
  16937. /** VDEV id(interface) that is requesting scan */
  16938. A_UINT32 vdev_id;
  16939. } wmi_extscan_command_id;
  16940. typedef struct {
  16941. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  16942. /** channel in MHz */
  16943. A_UINT32 channel;
  16944. /** dwell time in msec - use defaults if 0 */
  16945. A_UINT32 min_dwell_time;
  16946. A_UINT32 max_dwell_time;
  16947. /** passive/active channel and other flags */
  16948. A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
  16949. } wmi_extscan_bucket_channel;
  16950. /* Scan Bucket specification */
  16951. typedef struct {
  16952. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  16953. /** Bucket ID - 0-based */
  16954. A_UINT32 bucket_id;
  16955. /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
  16956. A_UINT32 notify_extscan_events;
  16957. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  16958. A_UINT32 forwarding_flags;
  16959. /** ExtScan configuration flags - wmi_extscan_bucket_configuration_flags */
  16960. A_UINT32 configuration_flags;
  16961. /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
  16962. A_UINT32 base_period_multiplier;
  16963. /** dwell time in msec on active channels - use defaults if 0 */
  16964. A_UINT32 min_dwell_time_active;
  16965. A_UINT32 max_dwell_time_active;
  16966. /** dwell time in msec on passive channels - use defaults if 0 */
  16967. A_UINT32 min_dwell_time_passive;
  16968. A_UINT32 max_dwell_time_passive;
  16969. /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
  16970. A_UINT32 channel_band;
  16971. /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
  16972. A_UINT32 num_channels;
  16973. /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
  16974. A_UINT32 min_period;
  16975. /** period above which exponent is not applied anymore */
  16976. A_UINT32 max_period;
  16977. /** back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
  16978. * new_bucket_period = last_bucket_period + last_exponent_period * exp_backoff
  16979. */
  16980. A_UINT32 exp_backoff;
  16981. /** number of scans performed at a given periodicity after which exponential back off value is
  16982. * applied to current periodicity to obtain a newer one
  16983. */
  16984. A_UINT32 exp_max_step_count;
  16985. /** Followed by the variable length TLV chan_list:
  16986. * wmi_extscan_bucket_channel chan_list[] */
  16987. } wmi_extscan_bucket;
  16988. typedef struct {
  16989. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
  16990. /** Request ID - to identify command. Cannot be 0 */
  16991. A_UINT32 request_id;
  16992. /** Requestor ID - client requesting ExtScan */
  16993. A_UINT32 requestor_id;
  16994. /** VDEV id(interface) that is requesting scan */
  16995. A_UINT32 vdev_id;
  16996. /** table ID - to allow support for multiple simultaneous requests */
  16997. A_UINT32 table_id;
  16998. /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
  16999. A_UINT32 base_period;
  17000. /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
  17001. A_UINT32 max_iterations;
  17002. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  17003. A_UINT32 forwarding_flags;
  17004. /** ExtScan configuration flags - wmi_extscan_configuration_flags */
  17005. A_UINT32 configuration_flags;
  17006. /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
  17007. A_UINT32 notify_extscan_events;
  17008. /** Scan Priority, input to scan scheduler */
  17009. A_UINT32 scan_priority;
  17010. /** Maximum number of BSSIDs to cache on each scan cycle */
  17011. A_UINT32 max_bssids_per_scan_cycle;
  17012. /** Minimum RSSI value to report */
  17013. A_UINT32 min_rssi;
  17014. /** Maximum table usage in percentage */
  17015. A_UINT32 max_table_usage;
  17016. /** default dwell time in msec on active channels */
  17017. A_UINT32 min_dwell_time_active;
  17018. A_UINT32 max_dwell_time_active;
  17019. /** default dwell time in msec on passive channels */
  17020. A_UINT32 min_dwell_time_passive;
  17021. A_UINT32 max_dwell_time_passive;
  17022. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  17023. A_UINT32 min_rest_time;
  17024. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  17025. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  17026. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  17027. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  17028. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  17029. * irrespective of activity. activity is determined by the idle_time parameter.
  17030. */
  17031. A_UINT32 max_rest_time;
  17032. /** time before sending next set of probe requests.
  17033. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  17034. * The number of probe requests specified depends on the ssid_list and bssid_list
  17035. */
  17036. /** Max number of probes to be sent */
  17037. A_UINT32 n_probes;
  17038. /** time in msec between 2 sets of probe requests. */
  17039. A_UINT32 repeat_probe_time;
  17040. /** time in msec between 2 consequetive probe requests with in a set. */
  17041. A_UINT32 probe_spacing_time;
  17042. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  17043. A_UINT32 idle_time;
  17044. /** maximum time in msec allowed for scan */
  17045. A_UINT32 max_scan_time;
  17046. /** delay in msec before sending first probe request after switching to a channel */
  17047. A_UINT32 probe_delay;
  17048. /** Scan control flags */
  17049. A_UINT32 scan_ctrl_flags;
  17050. /** Burst duration time in msec*/
  17051. A_UINT32 burst_duration;
  17052. /** number of bssids in the TLV bssid_list[] */
  17053. A_UINT32 num_bssid;
  17054. /** number of ssid in the TLV ssid_list[] */
  17055. A_UINT32 num_ssids;
  17056. /** number of bytes in TLV ie_data[] */
  17057. A_UINT32 ie_len;
  17058. /** number of buckets in the TLV bucket_list[] */
  17059. A_UINT32 num_buckets;
  17060. /** in number of scans, send notifications to host after these many scans */
  17061. A_UINT32 report_threshold_num_scans;
  17062. /** number of channels in channel_list[] determined by the
  17063. sum of wmi_extscan_bucket.num_channels in array */
  17064. /**
  17065. * TLV (tag length value) parameters follow the extscan_cmd
  17066. * structure. The TLV's are:
  17067. * wmi_ssid ssid_list[];
  17068. * wmi_mac_addr bssid_list[];
  17069. * A_UINT8 ie_data[];
  17070. * wmi_extscan_bucket bucket_list[];
  17071. * wmi_extscan_bucket_channel channel_list[];
  17072. */
  17073. } wmi_extscan_start_cmd_fixed_param;
  17074. typedef struct {
  17075. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
  17076. /** Request ID - to match running command. 0 matches any request */
  17077. A_UINT32 request_id;
  17078. /** Requestor ID - client requesting stop */
  17079. A_UINT32 requestor_id;
  17080. /** VDEV id(interface) that is requesting scan */
  17081. A_UINT32 vdev_id;
  17082. /** table ID - to allow support for multiple simultaneous requests */
  17083. A_UINT32 table_id;
  17084. } wmi_extscan_stop_cmd_fixed_param;
  17085. enum wmi_extscan_get_cached_results_flags {
  17086. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
  17087. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
  17088. };
  17089. typedef struct {
  17090. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
  17091. /** request ID - used to correlate command with events */
  17092. A_UINT32 request_id;
  17093. /** Requestor ID - client that requested results */
  17094. A_UINT32 requestor_id;
  17095. /** VDEV id(interface) that is requesting scan */
  17096. A_UINT32 vdev_id;
  17097. /** table ID - to allow support for multiple simultaneous requests */
  17098. A_UINT32 table_id;
  17099. /** maximum number of results to be returned */
  17100. A_UINT32 max_results;
  17101. /** flush BSSID list - wmi_extscan_get_cached_results_flags */
  17102. A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
  17103. } wmi_extscan_get_cached_results_cmd_fixed_param;
  17104. typedef struct {
  17105. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
  17106. /** request ID - used to correlate command with events */
  17107. A_UINT32 request_id;
  17108. /** Requestor ID - client that requested results */
  17109. A_UINT32 requestor_id;
  17110. /** VDEV id(interface) that is requesting scan */
  17111. A_UINT32 vdev_id;
  17112. /** table ID - to allow support for multiple simultaneous requests */
  17113. A_UINT32 table_id;
  17114. } wmi_extscan_get_wlan_change_results_cmd_fixed_param;
  17115. typedef struct {
  17116. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17117. /** bssid */
  17118. wmi_mac_addr bssid;
  17119. /** channel in MHz */
  17120. A_UINT32 channel;
  17121. /** upper RSSI limit */
  17122. A_UINT32 upper_rssi_limit;
  17123. /** lower RSSI limit */
  17124. A_UINT32 lower_rssi_limit;
  17125. } wmi_extscan_wlan_change_bssid_param;
  17126. typedef struct {
  17127. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
  17128. /** Request ID - to identify command. Cannot be 0 */
  17129. A_UINT32 request_id;
  17130. /** Requestor ID - client requesting wlan change monitoring */
  17131. A_UINT32 requestor_id;
  17132. /** VDEV id(interface) that is requesting scan */
  17133. A_UINT32 vdev_id;
  17134. /** table ID - to allow support for multiple simultaneous tables */
  17135. A_UINT32 table_id;
  17136. /** operation mode: start/stop */
  17137. A_UINT32 mode; /* wmi_extscan_operation_mode */
  17138. /** number of rssi samples to store */
  17139. A_UINT32 max_rssi_samples;
  17140. /** number of samples to use to calculate RSSI average */
  17141. A_UINT32 rssi_averaging_samples;
  17142. /** number of scans to confirm loss of contact with RSSI */
  17143. A_UINT32 lost_ap_scan_count;
  17144. /** number of out-of-range BSSIDs necessary to send event */
  17145. A_UINT32 max_out_of_range_count;
  17146. /** total number of bssid signal descriptors (in all pages) */
  17147. A_UINT32 total_entries;
  17148. /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
  17149. A_UINT32 first_entry_index;
  17150. /** number of bssid signal descriptors in this page */
  17151. A_UINT32 num_entries_in_page;
  17152. /* Following this structure is the TLV:
  17153. * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[];
  17154. * (number of elements given by field num_page_entries)
  17155. */
  17156. } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
  17157. typedef struct {
  17158. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17159. /** bssid */
  17160. wmi_mac_addr bssid;
  17161. /** RSSI min threshold for reporting */
  17162. A_UINT32 min_rssi;
  17163. /** Deprecated entry - channel in MHz */
  17164. A_UINT32 channel;
  17165. /** RSSI max threshold for reporting */
  17166. A_UINT32 max_rssi;
  17167. } wmi_extscan_hotlist_entry;
  17168. typedef struct {
  17169. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
  17170. /** Request ID - to identify command. Cannot be 0 */
  17171. A_UINT32 request_id;
  17172. /** Requestor ID - client requesting hotlist monitoring */
  17173. A_UINT32 requestor_id;
  17174. /** VDEV id(interface) that is requesting scan */
  17175. A_UINT32 vdev_id;
  17176. /** table ID - to allow support for multiple simultaneous tables */
  17177. A_UINT32 table_id;
  17178. /** operation mode: start/stop */
  17179. A_UINT32 mode; /* wmi_extscan_operation_mode */
  17180. /** total number of bssids (in all pages) */
  17181. A_UINT32 total_entries;
  17182. /** index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry */
  17183. A_UINT32 first_entry_index;
  17184. /** number of bssids in this page */
  17185. A_UINT32 num_entries_in_page;
  17186. /** number of consecutive scans to confirm loss of contact with AP */
  17187. A_UINT32 lost_ap_scan_count;
  17188. /* Following this structure is the TLV:
  17189. * wmi_extscan_hotlist_entry hotlist[]; <-- number of elements given by field num_page_entries.
  17190. */
  17191. } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
  17192. typedef struct {
  17193. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17194. /**ssid */
  17195. wmi_ssid ssid;
  17196. /**band */
  17197. A_UINT32 band;
  17198. /**RSSI threshold for reporting */
  17199. A_UINT32 min_rssi;
  17200. A_UINT32 max_rssi;
  17201. } wmi_extscan_hotlist_ssid_entry;
  17202. typedef struct {
  17203. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param */
  17204. /** Request ID - to identify command. Cannot be 0 */
  17205. A_UINT32 request_id;
  17206. /** Requestor ID - client requesting hotlist ssid monitoring */
  17207. A_UINT32 requestor_id;
  17208. /** VDEV id(interface) that is requesting scan */
  17209. A_UINT32 vdev_id;
  17210. /** table ID - to allow support for multiple simultaneous tables */
  17211. A_UINT32 table_id;
  17212. /** operation mode: start/stop */
  17213. A_UINT32 mode; /* wmi_extscan_operation_mode */
  17214. /**total number of ssids (in all pages) */
  17215. A_UINT32 total_entries;
  17216. /**index of the first ssid entry found in the TLV wmi_extscan_hotlist_ssid_entry*/
  17217. A_UINT32 first_entry_index;
  17218. /**number of ssids in this page */
  17219. A_UINT32 num_entries_in_page;
  17220. /** number of consecutive scans to confirm loss of an ssid **/
  17221. A_UINT32 lost_ap_scan_count;
  17222. /* Following this structure is the TLV:
  17223. * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; <-- number of elements given by field num_page_entries.
  17224. */
  17225. } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
  17226. typedef struct {
  17227. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17228. /** table ID - to allow support for multiple simultaneous tables */
  17229. A_UINT32 table_id;
  17230. /** size in bytes of scan cache entry */
  17231. A_UINT32 scan_cache_entry_size;
  17232. /** maximum number of scan cache entries */
  17233. A_UINT32 max_scan_cache_entries;
  17234. /** maximum number of buckets per extscan request */
  17235. A_UINT32 max_buckets;
  17236. /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
  17237. A_UINT32 max_bssid_per_scan;
  17238. /** table usage level at which indication must be sent to host */
  17239. A_UINT32 max_table_usage_threshold;
  17240. } wmi_extscan_cache_capabilities;
  17241. typedef struct {
  17242. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17243. /** table ID - to allow support for multiple simultaneous tables */
  17244. A_UINT32 table_id;
  17245. /** size in bytes of wlan change entry */
  17246. A_UINT32 wlan_change_entry_size;
  17247. /** maximum number of entries in wlan change table */
  17248. A_UINT32 max_wlan_change_entries;
  17249. /** number of RSSI samples used for averaging RSSI */
  17250. A_UINT32 max_rssi_averaging_samples;
  17251. /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
  17252. A_UINT32 max_rssi_history_entries;
  17253. } wmi_extscan_wlan_change_monitor_capabilities;
  17254. typedef struct {
  17255. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17256. /** table ID - to allow support for multiple simultaneous tables */
  17257. A_UINT32 table_id;
  17258. /** size in bytes of hotlist entry */
  17259. A_UINT32 wlan_hotlist_entry_size;
  17260. /** maximum number of entries in wlan change table */
  17261. A_UINT32 max_hotlist_entries;
  17262. } wmi_extscan_hotlist_monitor_capabilities;
  17263. typedef struct {
  17264. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
  17265. /** Request ID - matches request ID used to start hot list monitoring */
  17266. A_UINT32 request_id;
  17267. /** Requestor ID - client requesting stop */
  17268. A_UINT32 requestor_id;
  17269. /** number of extscan caches */
  17270. A_UINT32 num_extscan_cache_tables;
  17271. /** number of wlan change lists */
  17272. A_UINT32 num_wlan_change_monitor_tables;
  17273. /** number of hotlists */
  17274. A_UINT32 num_hotlist_monitor_tables;
  17275. /** if one sided rtt data collection is supported */
  17276. A_UINT32 rtt_one_sided_supported;
  17277. /** if 11v data collection is supported */
  17278. A_UINT32 rtt_11v_supported;
  17279. /** if 11mc data collection is supported */
  17280. A_UINT32 rtt_ftm_supported;
  17281. /** number of extscan cache capabilities (one per table) */
  17282. A_UINT32 num_extscan_cache_capabilities;
  17283. /** number of wlan change capabilities (one per table) */
  17284. A_UINT32 num_extscan_wlan_change_capabilities;
  17285. /** number of extscan hotlist capabilities (one per table) */
  17286. A_UINT32 num_extscan_hotlist_capabilities;
  17287. /* Following this structure is the TLV:
  17288. * wmi_extscan_cache_capabilities extscan_cache_capabilities; <-- number of capabilities given by num_extscan_caches
  17289. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; <-- number of capabilities given by num_wlan_change_monitor_tables
  17290. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; <-- number of capabilities given by num_hotlist_monitor_tables
  17291. */
  17292. } wmi_extscan_set_capabilities_cmd_fixed_param;
  17293. typedef struct {
  17294. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
  17295. /** Request ID - matches request ID used to start hot list monitoring */
  17296. A_UINT32 request_id;
  17297. /** Requestor ID - client requesting capabilities */
  17298. A_UINT32 requestor_id;
  17299. } wmi_extscan_get_capabilities_cmd_fixed_param;
  17300. typedef struct {
  17301. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
  17302. /** Request ID of the operation that was started/stopped */
  17303. A_UINT32 request_id;
  17304. /** Requestor ID of the operation that was started/stopped */
  17305. A_UINT32 requestor_id;
  17306. /** VDEV id(interface) of the operation that was started/stopped */
  17307. A_UINT32 vdev_id;
  17308. /** extscan WMI command */
  17309. A_UINT32 command;
  17310. /** operation mode: start/stop */
  17311. A_UINT32 mode; /* wmi_extscan_operation_mode */
  17312. /**success/failure */
  17313. A_UINT32 status; /* enum wmi_extscan_start_stop_status */
  17314. /** table ID - to allow support for multiple simultaneous requests */
  17315. A_UINT32 table_id;
  17316. } wmi_extscan_start_stop_event_fixed_param;
  17317. typedef struct {
  17318. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
  17319. /** Request ID of the extscan operation that is currently running */
  17320. A_UINT32 request_id;
  17321. /** Requestor ID of the extscan operation that is currently running */
  17322. A_UINT32 requestor_id;
  17323. /** VDEV id(interface) of the extscan operation that is currently running */
  17324. A_UINT32 vdev_id;
  17325. /** scan event (wmi_scan_event_type) */
  17326. A_UINT32 event; /* wmi_extscan_event_type */
  17327. /** table ID - to allow support for multiple simultaneous requests */
  17328. A_UINT32 table_id;
  17329. /**number of buckets */
  17330. A_UINT32 num_buckets;
  17331. /* Following this structure is the TLV:
  17332. * A_UINT32 bucket_id[]; <-- number of elements given by field num_buckets.
  17333. */
  17334. } wmi_extscan_operation_event_fixed_param;
  17335. /* Types of extscan tables */
  17336. typedef enum {
  17337. EXTSCAN_TABLE_NONE = 0,
  17338. EXTSCAN_TABLE_BSSID = 1,
  17339. EXTSCAN_TABLE_RSSI = 2,
  17340. } wmi_extscan_table_type;
  17341. typedef struct {
  17342. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
  17343. /** Request ID of the extscan operation that is currently running */
  17344. A_UINT32 request_id;
  17345. /** Requestor ID of the extscan operation that is currently running */
  17346. A_UINT32 requestor_id;
  17347. /** VDEV id(interface) of the extscan operation that is currently running */
  17348. A_UINT32 vdev_id;
  17349. /** table ID - to allow support for multiple simultaneous tables */
  17350. A_UINT32 table_id;
  17351. /**see wmi_extscan_table_type for table reporting usage */
  17352. A_UINT32 table_type;
  17353. /**number of entries in use */
  17354. A_UINT32 entries_in_use;
  17355. /**maximum number of entries in table */
  17356. A_UINT32 maximum_entries;
  17357. } wmi_extscan_table_usage_event_fixed_param;
  17358. typedef enum {
  17359. WMI_SCAN_STATUS_INTERRUPTED = 1 /* Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
  17360. this can be used to discard scan results */
  17361. } wmi_scan_status_flags;
  17362. typedef struct {
  17363. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17364. /** RSSI */
  17365. A_UINT32 rssi;
  17366. /** time stamp in milliseconds */
  17367. A_UINT32 tstamp;
  17368. /** Extscan cycle during which this entry was scanned */
  17369. A_UINT32 scan_cycle_id;
  17370. /** flag to indicate if the given result was obtained as part of interrupted (aborted/large time gap preempted) scan */
  17371. A_UINT32 flags;
  17372. /** Bitmask of buckets (i.e. sets of channels) scanned */
  17373. A_UINT32 buckets_scanned;
  17374. } wmi_extscan_rssi_info;
  17375. typedef struct {
  17376. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17377. /** bssid */
  17378. wmi_mac_addr bssid;
  17379. /** ssid */
  17380. wmi_ssid ssid;
  17381. /** channel in MHz */
  17382. A_UINT32 channel;
  17383. /** capabilities */
  17384. A_UINT32 capabilities;
  17385. /** beacon interval in TUs */
  17386. A_UINT32 beacon_interval;
  17387. /** time stamp in milliseconds - time last seen */
  17388. A_UINT32 tstamp;
  17389. /** flags - _tExtScanEntryFlags */
  17390. A_UINT32 flags;
  17391. /** RTT in ns */
  17392. A_UINT32 rtt;
  17393. /** rtt standard deviation */
  17394. A_UINT32 rtt_sd;
  17395. /** rssi information */
  17396. A_UINT32 number_rssi_samples;
  17397. /** IE length */
  17398. A_UINT32 ie_length; /* length of IE data */
  17399. } wmi_extscan_wlan_descriptor;
  17400. typedef struct {
  17401. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
  17402. /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  17403. A_UINT32 request_id;
  17404. /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  17405. A_UINT32 requestor_id;
  17406. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  17407. A_UINT32 vdev_id;
  17408. /** Request ID of the extscan operation that is currently running */
  17409. A_UINT32 extscan_request_id;
  17410. /** Requestor ID of the extscan operation that is currently running */
  17411. A_UINT32 extscan_requestor_id;
  17412. /** VDEV id(interface) of the extscan operation that is currently running */
  17413. A_UINT32 extscan_vdev_id;
  17414. /** table ID - to allow support for multiple simultaneous tables */
  17415. A_UINT32 table_id;
  17416. /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
  17417. A_UINT32 current_tstamp;
  17418. /**total number of bssids (in all pages) */
  17419. A_UINT32 total_entries;
  17420. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  17421. A_UINT32 first_entry_index;
  17422. /**number of bssids in this page */
  17423. A_UINT32 num_entries_in_page;
  17424. /** number of buckets scanned**/
  17425. A_UINT32 buckets_scanned;
  17426. /* Followed by the variable length TLVs
  17427. * wmi_extscan_wlan_descriptor bssid_list[]
  17428. * wmi_extscan_rssi_info rssi_list[]
  17429. * A_UINT8 ie_list[]
  17430. */
  17431. } wmi_extscan_cached_results_event_fixed_param;
  17432. typedef enum {
  17433. EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
  17434. EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
  17435. EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
  17436. } wmi_extscan_wlan_change_flags;
  17437. typedef struct {
  17438. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17439. /**bssid */
  17440. wmi_mac_addr bssid;
  17441. /**time stamp in milliseconds */
  17442. A_UINT32 tstamp;
  17443. /**upper RSSI limit */
  17444. A_UINT32 upper_rssi_limit;
  17445. /**lower RSSI limit */
  17446. A_UINT32 lower_rssi_limit;
  17447. /** channel */
  17448. A_UINT32 channel; /* in MHz */
  17449. /**current RSSI average */
  17450. A_UINT32 rssi_average;
  17451. /**flags - wmi_extscan_wlan_change_flags */
  17452. A_UINT32 flags;
  17453. /**legnth of RSSI history to follow (number of values) */
  17454. A_UINT32 num_rssi_samples;
  17455. } wmi_extscan_wlan_change_result_bssid;
  17456. typedef struct {
  17457. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
  17458. /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  17459. A_UINT32 request_id;
  17460. /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  17461. A_UINT32 requestor_id;
  17462. /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  17463. A_UINT32 vdev_id;
  17464. /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  17465. A_UINT32 config_request_id;
  17466. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  17467. A_UINT32 config_requestor_id;
  17468. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  17469. A_UINT32 config_vdev_id;
  17470. /** table ID - to allow support for multiple simultaneous tables */
  17471. A_UINT32 table_id;
  17472. /**number of entries with RSSI out of range or BSSID not detected */
  17473. A_UINT32 change_count;
  17474. /**total number of bssid signal descriptors (in all pages) */
  17475. A_UINT32 total_entries;
  17476. /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
  17477. A_UINT32 first_entry_index;
  17478. /**number of bssids signal descriptors in this page */
  17479. A_UINT32 num_entries_in_page;
  17480. /* Following this structure is the TLV:
  17481. * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[];
  17482. * (number of descriptors given by field num_entries_in_page)
  17483. * Following this structure is the list of RSSI values (each is an A_UINT8):
  17484. * A_UINT8 rssi_list[]; <-- last N RSSI values.
  17485. */
  17486. } wmi_extscan_wlan_change_results_event_fixed_param;
  17487. enum _tExtScanEntryFlags
  17488. {
  17489. WMI_HOTLIST_FLAG_NONE = 0x00,
  17490. WMI_HOTLIST_FLAG_PRESENCE = 0x01,
  17491. WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
  17492. };
  17493. typedef struct {
  17494. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  17495. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  17496. A_UINT32 config_request_id;
  17497. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  17498. A_UINT32 config_requestor_id;
  17499. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  17500. A_UINT32 config_vdev_id;
  17501. /** table ID - to allow support for multiple simultaneous tables */
  17502. A_UINT32 table_id;
  17503. /**total number of bssids (in all pages) */
  17504. A_UINT32 total_entries;
  17505. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  17506. A_UINT32 first_entry_index;
  17507. /**number of bssids in this page */
  17508. A_UINT32 num_entries_in_page;
  17509. /* Following this structure is the TLV:
  17510. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  17511. */
  17512. } wmi_extscan_hotlist_match_event_fixed_param;
  17513. typedef struct {
  17514. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  17515. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  17516. A_UINT32 config_request_id;
  17517. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  17518. A_UINT32 config_requestor_id;
  17519. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  17520. A_UINT32 config_vdev_id;
  17521. /** table ID - to allow support for multiple simultaneous tables */
  17522. A_UINT32 table_id;
  17523. /**total number of ssids (in all pages) */
  17524. A_UINT32 total_entries;
  17525. /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  17526. A_UINT32 first_entry_index;
  17527. /**number of ssids in this page */
  17528. A_UINT32 num_entries_in_page;
  17529. /* Following this structure is the TLV:
  17530. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  17531. */
  17532. } wmi_extscan_hotlist_ssid_match_event_fixed_param;
  17533. typedef struct {
  17534. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
  17535. /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  17536. A_UINT32 request_id;
  17537. /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  17538. A_UINT32 requestor_id;
  17539. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  17540. A_UINT32 vdev_id;
  17541. /** number of extscan caches */
  17542. A_UINT32 num_extscan_cache_tables;
  17543. /** number of wlan change lists */
  17544. A_UINT32 num_wlan_change_monitor_tables;
  17545. /** number of hotlists */
  17546. A_UINT32 num_hotlist_monitor_tables;
  17547. /** if one sided rtt data collection is supported */
  17548. A_UINT32 rtt_one_sided_supported;
  17549. /** if 11v data collection is supported */
  17550. A_UINT32 rtt_11v_supported;
  17551. /** if 11mc data collection is supported */
  17552. A_UINT32 rtt_ftm_supported;
  17553. /** number of extscan cache capabilities (one per table) */
  17554. A_UINT32 num_extscan_cache_capabilities;
  17555. /** number of wlan change capabilities (one per table) */
  17556. A_UINT32 num_extscan_wlan_change_capabilities;
  17557. /** number of extscan hotlist capabilities (one per table) */
  17558. A_UINT32 num_extscan_hotlist_capabilities;
  17559. /* max number of roaming ssid whitelist firmware can support */
  17560. A_UINT32 num_roam_ssid_whitelist;
  17561. /* max number of blacklist bssid firmware can support */
  17562. A_UINT32 num_roam_bssid_blacklist;
  17563. /* max number of preferred list firmware can support */
  17564. A_UINT32 num_roam_bssid_preferred_list;
  17565. /* max number of hotlist ssids firmware can support */
  17566. A_UINT32 num_extscan_hotlist_ssid;
  17567. /* max number of epno networks firmware can support */
  17568. A_UINT32 num_epno_networks;
  17569. /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
  17570. * supports multiple lists of each type.
  17571. *
  17572. * wmi_extscan_cache_capabilities extscan_cache_capabilities[] <-- capabilities of extscan cache (BSSID/RSSI lists)
  17573. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] <-- capabilities of wlan_change_monitor_tables
  17574. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] <-- capabilities of hotlist_monitor_tables
  17575. */
  17576. } wmi_extscan_capabilities_event_fixed_param;
  17577. /* WMI_D0_WOW_DISABLE_ACK_EVENTID */
  17578. typedef struct{
  17579. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
  17580. A_UINT32 reserved0; /* for future need */
  17581. } wmi_d0_wow_disable_ack_event_fixed_param;
  17582. /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
  17583. typedef struct {
  17584. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */
  17585. /** pdev_id for identifying the MAC
  17586. * See macros starting with WMI_PDEV_ID_ for values.
  17587. */
  17588. A_UINT32 pdev_id;
  17589. } wmi_pdev_resume_event_fixed_param;
  17590. /** value representing all modules */
  17591. #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
  17592. /* param definitions */
  17593. /**
  17594. * Log level for a given module. Value contains both module id and log level.
  17595. * here is the bitmap definition for value.
  17596. * module Id : 16
  17597. * Flags : reserved
  17598. * Level : 8
  17599. * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
  17600. * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
  17601. */
  17602. #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
  17603. #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \
  17604. (val) |= (lvl & 0xff); \
  17605. } while (0)
  17606. #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
  17607. #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \
  17608. (val) |= ((mid & 0xffff) << 16); \
  17609. } while (0)
  17610. #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
  17611. /**
  17612. * Enable the debug log for a given vdev. Value is vdev id
  17613. */
  17614. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
  17615. /**
  17616. * Disable the debug log for a given vdev. Value is vdev id
  17617. * All the log level for a given VDEV is disabled except the ERROR log messages
  17618. */
  17619. #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
  17620. /**
  17621. * set vdev enable bitmap. value is the vden enable bitmap
  17622. */
  17623. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
  17624. /**
  17625. * set a given log level to all the modules specified in the module bitmap.
  17626. * and set the log levle for all other modules to DBGLOG_ERR.
  17627. * value: log levelt to be set.
  17628. * module_id_bitmap : identifies the modules for which the log level should be set and
  17629. * modules for which the log level should be reset to DBGLOG_ERR.
  17630. */
  17631. #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
  17632. #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
  17633. #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \
  17634. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
  17635. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
  17636. #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id) \
  17637. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
  17638. (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
  17639. #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \
  17640. (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
  17641. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
  17642. #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
  17643. typedef struct {
  17644. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
  17645. A_UINT32 dbg_log_param; /** param types are defined above */
  17646. A_UINT32 value;
  17647. /* The below array will follow this tlv ->fixed length module_id_bitmap[]
  17648. A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
  17649. */
  17650. } wmi_debug_log_config_cmd_fixed_param;
  17651. typedef struct {
  17652. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
  17653. A_UINT32 param; /* Reserved for future use */
  17654. /** pdev_id for identifying the MAC
  17655. * See macros starting with WMI_PDEV_ID_ for values.
  17656. */
  17657. A_UINT32 pdev_id;
  17658. } wmi_pdev_get_temperature_cmd_fixed_param;
  17659. typedef struct {
  17660. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
  17661. A_INT32 value; /* temprature value in Celcius degree */
  17662. /** pdev_id for identifying the MAC
  17663. * See macros starting with WMI_PDEV_ID_ for values.
  17664. */
  17665. A_UINT32 pdev_id;
  17666. } wmi_pdev_temperature_event_fixed_param;
  17667. typedef enum {
  17668. ANTDIV_HW_CFG_STATUS,
  17669. ANTDIV_SW_CFG_STATUS,
  17670. ANTDIV_MAX_STATUS_TYPE_NUM
  17671. } ANTDIV_STATUS_TYPE;
  17672. typedef struct {
  17673. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param */
  17674. A_UINT32 status_event_id; /* Status event ID - see ANTDIV_STATUS_TYPE */
  17675. /** pdev_id for identifying the MAC
  17676. * See macros starting with WMI_PDEV_ID_ for values.
  17677. */
  17678. A_UINT32 pdev_id;
  17679. } wmi_pdev_get_antdiv_status_cmd_fixed_param;
  17680. typedef struct {
  17681. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param */
  17682. A_UINT32 support; /* ANT DIV feature enabled or not */
  17683. A_UINT32 chain_num; /* how many chain supported */
  17684. A_UINT32 ant_num; /* how many ANT supported, 32 max */
  17685. /*
  17686. * Each entry is for a tx/rx chain, and contains a bitmap identifying
  17687. * the antennas attached to that tx/rx chain.
  17688. */
  17689. A_UINT32 selectable_ant_mask[8];
  17690. /** pdev_id for identifying the MAC
  17691. * See macros starting with WMI_PDEV_ID_ for values.
  17692. */
  17693. A_UINT32 pdev_id;
  17694. } wmi_pdev_antdiv_status_event_fixed_param;
  17695. typedef struct {
  17696. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
  17697. A_UINT32 vdev_id;
  17698. A_UINT32 enable;
  17699. A_UINT32 srv_ipv4; /* server IP */
  17700. A_UINT32 start_lsb; /* starting address assigned to client */
  17701. A_UINT32 num_client; /* number of clients we support */
  17702. } wmi_set_dhcp_server_offload_cmd_fixed_param;
  17703. typedef enum {
  17704. AP_RX_DATA_OFFLOAD = 0x00,
  17705. STA_RX_DATA_OFFLOAD = 0x01,
  17706. } wmi_ipa_offload_types;
  17707. /**
  17708. * This command is sent from WLAN host driver to firmware for
  17709. * enabling/disabling IPA data-path offload features.
  17710. *
  17711. *
  17712. * Enabling data path offload to IPA(based on host INI configuration), example:
  17713. * when STA interface comes up,
  17714. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  17715. * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  17716. *
  17717. * Disabling data path offload to IPA, example:
  17718. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  17719. * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  17720. *
  17721. *
  17722. * This command is applicable only on the PCIE LL systems
  17723. *
  17724. */
  17725. typedef struct {
  17726. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
  17727. A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
  17728. A_UINT32 vdev_id;
  17729. A_UINT32 enable; /* 1 == enable, 0 == disable */
  17730. } wmi_ipa_offload_enable_disable_cmd_fixed_param;
  17731. typedef enum {
  17732. WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
  17733. WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
  17734. WMI_LED_FLASHING_PATTERN_RESERVED = 2,
  17735. } wmi_set_led_flashing_type;
  17736. /**
  17737. 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.
  17738. Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
  17739. remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
  17740. 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
  17741. pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
  17742. High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
  17743. Zero is reached, it is skipped and moves on to the next interval.
  17744. */
  17745. typedef struct{
  17746. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
  17747. A_UINT32 pattern_id; /* pattern identifier */
  17748. A_UINT32 led_x0; /* led flashing parameter0 */
  17749. A_UINT32 led_x1; /* led flashing parameter1 */
  17750. A_UINT32 gpio_num; /* GPIO number */
  17751. } wmi_set_led_flashing_cmd_fixed_param;
  17752. /**
  17753. * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
  17754. * within small networks that do not include a local name server.
  17755. * It utilizes essentially the same programming interfaces, packet formats and operating semantics
  17756. * as the unicast DNS, and the advantage is zero configuration service while no need for central or
  17757. * global server.
  17758. * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
  17759. * by type in a specified domain using standard DNS queries.
  17760. * Here, we provide the ability to advertise the available services by responding to mDNS queries.
  17761. */
  17762. typedef struct {
  17763. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
  17764. A_UINT32 vdev_id;
  17765. A_UINT32 enable;
  17766. } wmi_mdns_offload_cmd_fixed_param;
  17767. #define WMI_MAX_MDNS_FQDN_LEN 64
  17768. #define WMI_MAX_MDNS_RESP_LEN 512
  17769. #define WMI_MDNS_FQDN_TYPE_GENERAL 0
  17770. #define WMI_MDNS_FQDN_TYPE_UNIQUE 1
  17771. typedef struct {
  17772. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
  17773. A_UINT32 vdev_id;
  17774. /** type of fqdn, general or unique */
  17775. A_UINT32 type;
  17776. /** length of fqdn */
  17777. A_UINT32 fqdn_len;
  17778. /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
  17779. * A_UINT8 fqdn_data[]; <-- fully-qualified domain name to check if match with the received queries
  17780. */
  17781. } wmi_mdns_set_fqdn_cmd_fixed_param;
  17782. typedef struct {
  17783. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
  17784. A_UINT32 vdev_id;
  17785. /** Answer Resource Record count */
  17786. A_UINT32 AR_count;
  17787. /** length of response */
  17788. A_UINT32 resp_len;
  17789. /* Following this structure is the TLV byte stream of resp data of length resp_len
  17790. * A_UINT8 resp_data[]; <-- responses consisits of Resource Records
  17791. */
  17792. } wmi_mdns_set_resp_cmd_fixed_param;
  17793. typedef struct {
  17794. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
  17795. A_UINT32 vdev_id;
  17796. } wmi_mdns_get_stats_cmd_fixed_param;
  17797. typedef struct {
  17798. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
  17799. A_UINT32 vdev_id;
  17800. /** curTimestamp in milliseconds */
  17801. A_UINT32 curTimestamp;
  17802. /** last received Query in milliseconds */
  17803. A_UINT32 lastQueryTimestamp;
  17804. /** last sent Response in milliseconds */
  17805. A_UINT32 lastResponseTimestamp;
  17806. /** stats of received queries */
  17807. A_UINT32 totalQueries;
  17808. /** stats of macth queries */
  17809. A_UINT32 totalMatches;
  17810. /** stats of responses */
  17811. A_UINT32 totalResponses;
  17812. /** indicate the current status of mDNS offload */
  17813. A_UINT32 status;
  17814. } wmi_mdns_stats_event_fixed_param;
  17815. /**
  17816. * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
  17817. * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
  17818. * request and create/remove connection even host is suspended.
  17819. * 3 major components are offloaded:
  17820. * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
  17821. * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
  17822. * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
  17823. * Current implementation only supports WPA2 CCMP.
  17824. */
  17825. typedef struct {
  17826. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
  17827. /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
  17828. A_UINT32 vdev_id;
  17829. /** enable/disable sap auth offload */
  17830. A_UINT32 enable;
  17831. /** sap ssid */
  17832. wmi_ssid ap_ssid;
  17833. /** authentication mode (defined above) */
  17834. A_UINT32 rsn_authmode;
  17835. /** unicast cipher set */
  17836. A_UINT32 rsn_ucastcipherset;
  17837. /** mcast/group cipher set */
  17838. A_UINT32 rsn_mcastcipherset;
  17839. /** mcast/group management frames cipher set */
  17840. A_UINT32 rsn_mcastmgmtcipherset;
  17841. /** sap channel */
  17842. A_UINT32 channel;
  17843. /** length of psk */
  17844. A_UINT32 psk_len;
  17845. /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
  17846. * A_UINT8 psk[];
  17847. */
  17848. } wmi_sap_ofl_enable_cmd_fixed_param;
  17849. typedef struct {
  17850. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
  17851. /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
  17852. A_UINT32 vdev_id;
  17853. /** aid (association id) of this station */
  17854. A_UINT32 assoc_id;
  17855. /** peer station's mac addr */
  17856. wmi_mac_addr peer_macaddr;
  17857. /** length of association request frame */
  17858. A_UINT32 data_len;
  17859. /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
  17860. * A_UINT8 bufp[];
  17861. */
  17862. } wmi_sap_ofl_add_sta_event_fixed_param;
  17863. typedef enum {
  17864. SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
  17865. SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
  17866. } wmi_sap_ofl_del_sta_flags;
  17867. typedef struct {
  17868. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
  17869. /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
  17870. A_UINT32 vdev_id;
  17871. /** aid (association id) of this station */
  17872. A_UINT32 assoc_id;
  17873. /** peer station's mac addr */
  17874. wmi_mac_addr peer_macaddr;
  17875. /** disassociation reason */
  17876. A_UINT32 reason;
  17877. /** flags - wmi_sap_ofl_del_sta_flags */
  17878. A_UINT32 flags;
  17879. } wmi_sap_ofl_del_sta_event_fixed_param;
  17880. typedef struct {
  17881. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param */
  17882. A_UINT32 vdev_id;
  17883. /* Number of client failure connection attempt */
  17884. A_UINT32 num_retry;
  17885. /* Time in milliseconds to record the client's failure connection attempts */
  17886. A_UINT32 retry_allow_time_ms;
  17887. /* Time in milliseconds to drop the connection request if client is blacklisted */
  17888. A_UINT32 blackout_time_ms;
  17889. } wmi_sap_set_blacklist_param_cmd_fixed_param;
  17890. typedef struct {
  17891. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
  17892. A_UINT32 data_len; /** length in byte of data[]. */
  17893. /** This structure is used to send REQ binary blobs
  17894. * from application/service to firmware where Host drv is pass through .
  17895. * Following this structure is the TLV:
  17896. * A_UINT8 data[]; <-- length in byte given by field data_len.
  17897. */
  17898. } wmi_apfind_cmd_param;
  17899. typedef enum apfind_event_type_e {
  17900. APFIND_MATCH_EVENT = 0,
  17901. APFIND_WAKEUP_EVENT,
  17902. } APFIND_EVENT_TYPE;
  17903. typedef struct {
  17904. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
  17905. A_UINT32 event_type; /** APFIND_EVENT_TYPE */
  17906. A_UINT32 data_len; /** length in byte of data[]. */
  17907. /** This structure is used to send event binary blobs
  17908. * from firmware to application/service and Host drv.
  17909. * Following this structure is the TLV:
  17910. * A_UINT8 data[]; <-- length in byte given by field data_len.
  17911. */
  17912. } wmi_apfind_event_hdr;
  17913. /* SAP obss detection offload types */
  17914. typedef enum {
  17915. WMI_SAP_OBSS_DETECTION_MODE_DISABLED = 0, /* fw to disable the detection */
  17916. WMI_SAP_OBSS_DETECTION_MODE_PRESENT_NOTIFY = 1, /* if the matching beacon is present, notify host immediately */
  17917. WMI_SAP_OBSS_DETECTION_MODE_ABSENT_TIMEOUT_NOTIFY = 2,/* if the matching beacon is absent for the timeout period, notify host */
  17918. } WMI_SAP_OBSS_DETECTION_MODE;
  17919. typedef struct wmi_sap_obss_detection_cfg_cmd_s {
  17920. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_cfg_cmd_fixed_param */
  17921. A_UINT32 vdev_id;
  17922. A_UINT32 detect_period_ms;
  17923. /* detect whether there is 11b ap/ibss */
  17924. A_UINT32 b_ap_detect_mode; /* refer WMI_SAP_OBSS_DETECTION_MODE */
  17925. /* detect whether there is 11b sta connected with other APs */
  17926. A_UINT32 b_sta_detect_mode;
  17927. /* detect whether there is 11g AP */
  17928. A_UINT32 g_ap_detect_mode;
  17929. /* detect whether there is legacy 11a traffic */
  17930. A_UINT32 a_detect_mode;
  17931. /* detect whether there is ap which is ht legacy mode */
  17932. A_UINT32 ht_legacy_detect_mode;
  17933. /* detect whether there is ap which is ht mixed mode : has 11b/11g sta */
  17934. A_UINT32 ht_mixed_detect_mode;
  17935. /* detect whether there is ap which has 20M only station */
  17936. A_UINT32 ht_20mhz_detect_mode;
  17937. } wmi_sap_obss_detection_cfg_cmd_fixed_param;
  17938. typedef enum {
  17939. WMI_SAP_OBSS_DETECTION_EVENT_REASON_NOT_SUPPORT = 0,
  17940. WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY,
  17941. WMI_SAP_OBSS_DETECTION_EVENT_REASON_ABSENT_TIMEOUT,
  17942. } WMI_SAP_OBSS_DETECTION_EVENT_REASON;
  17943. /* WMI_SAP_OBSS_DETECTION_MATCH_MASK is one or more of the following shift bits */
  17944. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_AP_S 0
  17945. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_STA_S 1
  17946. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11G_AP_S 2
  17947. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11A_S 3
  17948. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_LEGACY_S 4
  17949. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_MIXED_S 5
  17950. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_20MHZ_S 6
  17951. typedef struct wmi_sap_obss_detection_info_evt_s {
  17952. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_info_evt_fixed_param */
  17953. A_UINT32 vdev_id;
  17954. A_UINT32 reason; /* refer WMI_SAP_OBSS_DETECTION_EVENT_REASON */
  17955. A_UINT32 matched_detection_masks; /* bit(s) from WMI_SAP_OBSS_DETECTION_MATCH_MASK */
  17956. wmi_mac_addr matched_bssid_addr; /* valid when reason is WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY */
  17957. } wmi_sap_obss_detection_info_evt_fixed_param;
  17958. /** WMI command to enable STA FW handle bss color change notification from AP */
  17959. typedef struct {
  17960. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_bss_color_change_enable_fixed_param */
  17961. A_UINT32 vdev_id;
  17962. A_UINT32 enable;
  17963. } wmi_bss_color_change_enable_fixed_param;
  17964. typedef enum {
  17965. WMI_BSS_COLOR_COLLISION_DISABLE = 0,
  17966. WMI_BSS_COLOR_COLLISION_DETECTION,
  17967. WMI_BSS_COLOR_FREE_SLOT_TIMER_EXPIRY,
  17968. WMI_BSS_COLOR_FREE_SLOT_AVAILABLE,
  17969. } WMI_BSS_COLOR_COLLISION_EVT_TYPE;
  17970. /** Command to enable OBSS Color collision detection for both STA and AP mode */
  17971. typedef struct {
  17972. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_det_config_fixed_param */
  17973. A_UINT32 vdev_id;
  17974. A_UINT32 flags; /* proposed for future use cases */
  17975. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  17976. A_UINT32 current_bss_color;
  17977. A_UINT32 detection_period_ms; /* scan interval for both AP and STA mode */
  17978. A_UINT32 scan_period_ms; /* scan period for passive scan to detect collision */
  17979. A_UINT32 free_slot_expiry_time_ms; /* FW to notify host at timer expiry after which Host disables bss color */
  17980. } wmi_obss_color_collision_det_config_fixed_param;
  17981. /** WMI event to notify host on OBSS Color collision detection, free slot available for AP mode */
  17982. typedef struct {
  17983. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_evt_fixed_param */
  17984. A_UINT32 vdev_id;
  17985. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  17986. A_UINT32 bss_color_bitmap_bit0to31; /* Bit set indicating BSS color present */
  17987. A_UINT32 bss_color_bitmap_bit32to63; /* Bit set indicating BSS color present */
  17988. } wmi_obss_color_collision_evt_fixed_param;
  17989. /**
  17990. * OCB DCC types and structures.
  17991. */
  17992. /**
  17993. * DCC types as described in ETSI TS 102 687
  17994. * Type Format stepSize referenceValue numBits
  17995. * -------------------------------------------------------------------------
  17996. * ndlType_acPrio INTEGER (0...7) 1 number 3
  17997. * ndlType_controlLoop INTEGER (0...7) 1 0 3
  17998. * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
  17999. * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
  18000. * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
  18001. * ndlType_datarate INTEGER (0..7) Table 8 3
  18002. * ndlType_distance INTEGER (0..4095) 1 m 0 12
  18003. * ndlType_numberElements INTEGER (0..63) number 6
  18004. * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
  18005. * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
  18006. * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
  18007. * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
  18008. * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
  18009. * ndlType_timing INTEGER (0..4095) 10 ms 0 12
  18010. * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
  18011. * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
  18012. * ndlType_exponent INTEGER (0..100) 0.1 0 7
  18013. * ndlType_queueStatus Enumeration Table A.2 1
  18014. * ndlType_dccMechanism Bitset Table A.2 6
  18015. *
  18016. * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
  18017. * cannot be changed without breaking WMI compatibility.
  18018. *
  18019. * NOTE: For each of the types, one additional bit is allocated. This
  18020. * leftmost bit is used to indicate that the value is invalid. */
  18021. #define SIZE_NDLTYPE_ACPRIO (1 + 3)
  18022. #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
  18023. #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
  18024. #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
  18025. #define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
  18026. #define SIZE_NDLTYPE_DATARATE (1 + 3)
  18027. #define SIZE_NDLTYPE_DISTANCE (1 + 12)
  18028. #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
  18029. #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
  18030. #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
  18031. #define SIZE_NDLTYPE_PATHLOSS (1 + 5)
  18032. #define SIZE_NDLTYPE_RXPOWER (1 + 7)
  18033. #define SIZE_NDLTYPE_SNR (1 + 7)
  18034. #define SIZE_NDLTYPE_TIMING (1 + 12)
  18035. #define SIZE_NDLTYPE_TXPOWER (1 + 7)
  18036. #define SIZE_NDLTYPE_RATIO (1 + 7)
  18037. #define SIZE_NDLTYPE_EXPONENT (1 + 7)
  18038. #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
  18039. #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
  18040. #define SIZE_BYTE (8)
  18041. #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
  18042. #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
  18043. #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
  18044. #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
  18045. #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
  18046. #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
  18047. #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
  18048. #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
  18049. #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
  18050. #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
  18051. #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
  18052. #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
  18053. #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
  18054. #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
  18055. #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
  18056. #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
  18057. #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
  18058. #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
  18059. #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
  18060. /** The MCS_COUNT macro cannot be modified without breaking
  18061. * WMI compatibility. */
  18062. #define MCS_COUNT (8)
  18063. /** Flags for ndlType_dccMechanism. */
  18064. typedef enum {
  18065. DCC_MECHANISM_TPC = 1,
  18066. DCC_MECHANISM_TRC = 2,
  18067. DCC_MECHANISM_TDC = 4,
  18068. DCC_MECHANISM_DSC = 8,
  18069. DCC_MECHANISM_TAC = 16,
  18070. DCC_MECHANISM_RESERVED = 32,
  18071. DCC_MECHANISM_ALL = 0x3f,
  18072. } wmi_dcc_ndl_type_dcc_mechanism;
  18073. /** Values for ndlType_queueStatus. */
  18074. typedef enum {
  18075. DCC_QUEUE_CLOSED = 0,
  18076. DCC_QUEUE_OPEN = 1,
  18077. } wmi_dcc_ndl_type_queue_status;
  18078. /** For ndlType_acPrio, use the values in wmi_traffic_ac. */
  18079. /** Values for ndlType_datarate */
  18080. typedef enum {
  18081. DCC_DATARATE_3_MBPS = 0,
  18082. DCC_DATARATE_4_5_MBPS = 1,
  18083. DCC_DATARATE_6_MBPS = 2,
  18084. DCC_DATARATE_9_MBPS = 3,
  18085. DCC_DATARATE_12_MBPS = 4,
  18086. DCC_DATARATE_18_MBPS = 5,
  18087. DCC_DATARATE_24_MBPS = 6,
  18088. DCC_DATARATE_27_MBPS = 7,
  18089. } wmi_dcc_ndl_type_datarate;
  18090. /** Data structure for active state configuration. */
  18091. typedef struct {
  18092. /** TLV tag and len; tag equals
  18093. * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config */
  18094. A_UINT32 tlv_header;
  18095. /**
  18096. * NDL_asStateId, ndlType_numberElements, 1+6 bits.
  18097. * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
  18098. */
  18099. A_UINT32 state_info;
  18100. /**
  18101. * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
  18102. * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
  18103. * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
  18104. * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
  18105. */
  18106. A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
  18107. /**
  18108. * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  18109. * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  18110. * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  18111. * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  18112. */
  18113. A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  18114. /**
  18115. * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  18116. * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  18117. * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  18118. * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  18119. */
  18120. A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
  18121. /**
  18122. * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  18123. * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  18124. * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  18125. * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  18126. */
  18127. A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
  18128. /**
  18129. * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
  18130. * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
  18131. * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
  18132. * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
  18133. */
  18134. A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
  18135. } wmi_dcc_ndl_active_state_config;
  18136. #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
  18137. #define WMI_NDL_AS_STATE_ID_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
  18138. #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
  18139. #define WMI_NDL_AS_CHAN_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
  18140. #define WMI_NDL_AS_DCC_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
  18141. #define WMI_NDL_AS_DCC_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
  18142. #define WMI_NDL_AS_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  18143. #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)
  18144. #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  18145. #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)
  18146. #define WMI_NDL_AS_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  18147. #define WMI_NDL_AS_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  18148. #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
  18149. #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)
  18150. /** Data structure for EDCA/QOS parameters. */
  18151. typedef struct
  18152. {
  18153. /** TLV tag and len; tag equals
  18154. * WMITLV_TAG_STRUC_wmi_qos_parameter */
  18155. A_UINT32 tlv_header;
  18156. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  18157. A_UINT32 aifsn;
  18158. /** Contention Window minimum. Range: 1 - 10 */
  18159. A_UINT32 cwmin;
  18160. /** Contention Window maximum. Range: 1 - 10 */
  18161. A_UINT32 cwmax;
  18162. } wmi_qos_parameter;
  18163. /** Data structure for information specific to a channel. */
  18164. typedef struct {
  18165. /** TLV tag and len; tag equals
  18166. * WMITLV_TAG_STRUC_wmi_ocb_channel */
  18167. A_UINT32 tlv_header;
  18168. A_UINT32 bandwidth; /* MHz units */
  18169. wmi_mac_addr mac_address;
  18170. } wmi_ocb_channel;
  18171. /** Data structure for an element of the schedule array. */
  18172. typedef struct {
  18173. /** TLV tag and len; tag equals
  18174. * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
  18175. A_UINT32 tlv_header;
  18176. A_UINT32 channel_freq; /* MHz units */
  18177. A_UINT32 total_duration; /* ms units */
  18178. A_UINT32 guard_interval; /* ms units */
  18179. } wmi_ocb_schedule_element;
  18180. /** Data structure for OCB configuration. */
  18181. typedef struct {
  18182. /** TLV tag and len; tag equals
  18183. * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
  18184. A_UINT32 tlv_header;
  18185. /** VDEV id(interface) that is being configured */
  18186. A_UINT32 vdev_id;
  18187. A_UINT32 channel_count;
  18188. A_UINT32 schedule_size;
  18189. A_UINT32 flags;
  18190. A_UINT32 ta_max_duration; /* Max duration of continuing multichannel operation without receiving a TA frame (units = seconds) */
  18191. /** This is followed by a TLV array of wmi_channel. */
  18192. /** This is followed by a TLV array of wmi_ocb_channel. */
  18193. /** This is followed by a TLV array of wmi_qos_parameter. */
  18194. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  18195. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  18196. /** This is followed by a TLV array of wmi_ocb_schedule_element. */
  18197. } wmi_ocb_set_config_cmd_fixed_param;
  18198. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
  18199. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
  18200. #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
  18201. /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
  18202. typedef struct {
  18203. /** TLV tag and len; tag equals
  18204. * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param */
  18205. A_UINT32 tlv_header;
  18206. /* VDEV identifier */
  18207. A_UINT32 vdev_id;
  18208. A_UINT32 status;
  18209. } wmi_ocb_set_config_resp_event_fixed_param;
  18210. /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
  18211. WMI compatibility. */
  18212. #define SIZE_UTC_TIME (10) /* The size of the utc time in bytes. */
  18213. #define SIZE_UTC_TIME_ERROR (5) /* The size of the utc time error in bytes. */
  18214. /** Data structure to set the UTC time. */
  18215. typedef struct {
  18216. /** TLV tag and len; tag equals
  18217. * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
  18218. A_UINT32 tlv_header;
  18219. /* VDEV identifier */
  18220. A_UINT32 vdev_id;
  18221. /** 10 bytes of the utc time. */
  18222. A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME,SIZE_BYTE)];
  18223. /** 5 bytes of the time error. */
  18224. A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR,SIZE_BYTE)];
  18225. } wmi_ocb_set_utc_time_cmd_fixed_param;
  18226. #define WMI_UTC_TIME_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
  18227. #define WMI_UTC_TIME_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
  18228. #define WMI_TIME_ERROR_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
  18229. #define WMI_TIME_ERROR_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
  18230. /** Data structure start the timing advertisement. The template for the
  18231. * timing advertisement frame follows this structure in the WMI command.
  18232. */
  18233. typedef struct {
  18234. /** TLV tag and len; tag equals
  18235. * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
  18236. A_UINT32 tlv_header;
  18237. /* VDEV identifier */
  18238. A_UINT32 vdev_id;
  18239. /** Number of times the TA is sent every 5 seconds. */
  18240. A_UINT32 repeat_rate;
  18241. /** The frequency on which to transmit. */
  18242. A_UINT32 channel_freq; /* MHz units */
  18243. /** The offset into the template of the timestamp. */
  18244. A_UINT32 timestamp_offset;
  18245. /** The offset into the template of the time value. */
  18246. A_UINT32 time_value_offset;
  18247. /** The length of the timing advertisement template. The
  18248. * template is in the TLV data. */
  18249. A_UINT32 timing_advert_template_length;
  18250. /** This is followed by a binary array containing the TA template. */
  18251. } wmi_ocb_start_timing_advert_cmd_fixed_param;
  18252. /** Data structure to stop the timing advertisement. */
  18253. typedef struct {
  18254. /** TLV tag and len; tag equals
  18255. * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
  18256. A_UINT32 tlv_header;
  18257. /* VDEV identifier */
  18258. A_UINT32 vdev_id;
  18259. A_UINT32 channel_freq; /* MHz units */
  18260. } wmi_ocb_stop_timing_advert_cmd_fixed_param;
  18261. /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
  18262. typedef struct {
  18263. /** TLV tag and len; tag equals
  18264. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
  18265. A_UINT32 tlv_header;
  18266. /* VDEV identifier */
  18267. A_UINT32 vdev_id;
  18268. A_UINT32 reserved;
  18269. } wmi_ocb_get_tsf_timer_cmd_fixed_param;
  18270. /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
  18271. typedef struct {
  18272. /** TLV tag and len; tag equals
  18273. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
  18274. A_UINT32 tlv_header;
  18275. /* VDEV identifier */
  18276. A_UINT32 vdev_id;
  18277. A_UINT32 tsf_timer_high;
  18278. A_UINT32 tsf_timer_low;
  18279. } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
  18280. /** Data structure for DCC stats configuration per channel. */
  18281. typedef struct {
  18282. /** TLV tag and len; tag equals
  18283. * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
  18284. A_UINT32 tlv_header;
  18285. /** The channel for which this applies, 16 bits. */
  18286. /** The dcc_stats_bitmap, 8 bits. */
  18287. A_UINT32 chan_info;
  18288. /** Demodulation model parameters. */
  18289. /**
  18290. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  18291. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  18292. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  18293. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  18294. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  18295. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  18296. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  18297. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  18298. */
  18299. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  18300. /** Communication ranges. */
  18301. /**
  18302. * tx_power, ndlType_txPower, 1+7 bits.
  18303. * datarate, ndlType_datarate, 1+3 bits.
  18304. */
  18305. A_UINT32 tx_power_datarate;
  18306. /**
  18307. * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
  18308. * NDL_estCommRange, ndlType_distance, 1+12 bits.
  18309. */
  18310. A_UINT32 carrier_sense_est_comm_range;
  18311. /** Channel load measures. */
  18312. /**
  18313. * dccSensitivity, ndlType_rxPower, 1+7 bits.
  18314. * carrierSense, ndlType_rxPower, 1+7 bits.
  18315. * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
  18316. */
  18317. A_UINT32 dcc_stats;
  18318. /**
  18319. * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
  18320. * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
  18321. */
  18322. A_UINT32 packet_stats;
  18323. /**
  18324. * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
  18325. */
  18326. A_UINT32 channel_busy_time;
  18327. /** Transmit packet statistics. */
  18328. /**
  18329. * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  18330. * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  18331. * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  18332. * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  18333. */
  18334. A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_ARRIVALRATE)];
  18335. /**
  18336. * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  18337. * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  18338. * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  18339. * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  18340. */
  18341. A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  18342. /**
  18343. * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  18344. * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  18345. * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  18346. * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  18347. */
  18348. A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_CHANNELUSE)];
  18349. /**
  18350. * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  18351. * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  18352. * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  18353. * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  18354. */
  18355. A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  18356. } wmi_dcc_ndl_stats_per_channel;
  18357. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  18358. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  18359. #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  18360. #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  18361. #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
  18362. #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
  18363. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  18364. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  18365. #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
  18366. #define WMI_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
  18367. #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
  18368. #define WMI_TX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
  18369. #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
  18370. #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
  18371. #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
  18372. #define WMI_NDL_EST_COMM_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
  18373. #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
  18374. #define WMI_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
  18375. #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
  18376. #define WMI_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
  18377. #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
  18378. #define WMI_NDL_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
  18379. #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
  18380. #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
  18381. #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
  18382. #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
  18383. #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
  18384. #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr,val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
  18385. #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)
  18386. #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)
  18387. #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)
  18388. #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)
  18389. #define WMI_NDL_TX_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  18390. #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)
  18391. #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)
  18392. #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)
  18393. /** Bitmap for DCC stats. */
  18394. typedef enum {
  18395. DCC_STATS_DEMODULATION_MODEL = 1,
  18396. DCC_STATS_COMMUNICATION_RANGES = 2,
  18397. DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
  18398. DCC_STATS_TRANSMIT_PACKET_STATS = 8,
  18399. DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
  18400. DCC_STATS_ALL = 0xff,
  18401. } wmi_dcc_stats_bitmap;
  18402. /** Data structure for getting the DCC stats. */
  18403. typedef struct {
  18404. /** TLV tag and len; tag equals
  18405. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param */
  18406. A_UINT32 tlv_header;
  18407. /* VDEV identifier */
  18408. A_UINT32 vdev_id;
  18409. /** The number of channels for which stats are being requested. */
  18410. A_UINT32 num_channels;
  18411. /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
  18412. } wmi_dcc_get_stats_cmd_fixed_param;
  18413. typedef struct {
  18414. /** TLV tag and len; tag equals
  18415. * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request */
  18416. A_UINT32 tlv_header;
  18417. /** The channel for which this applies. */
  18418. A_UINT32 chan_freq; /* MHz units */
  18419. /** The DCC stats being requested. */
  18420. A_UINT32 dcc_stats_bitmap;
  18421. } wmi_dcc_channel_stats_request;
  18422. /** Data structure for the response with the DCC stats. */
  18423. typedef struct {
  18424. /** TLV tag and len; tag equals
  18425. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param */
  18426. A_UINT32 tlv_header;
  18427. /* VDEV identifier */
  18428. A_UINT32 vdev_id;
  18429. /** Number of channels in the response. */
  18430. A_UINT32 num_channels;
  18431. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  18432. } wmi_dcc_get_stats_resp_event_fixed_param;
  18433. /** Data structure for clearing the DCC stats. */
  18434. typedef struct {
  18435. /** TLV tag and len; tag equals
  18436. * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param */
  18437. A_UINT32 tlv_header;
  18438. /* VDEV identifier */
  18439. A_UINT32 vdev_id;
  18440. A_UINT32 dcc_stats_bitmap;
  18441. } wmi_dcc_clear_stats_cmd_fixed_param;
  18442. /** Data structure for the pushed DCC stats */
  18443. typedef struct {
  18444. /** TLV tag and len; tag equals
  18445. * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param */
  18446. A_UINT32 tlv_header;
  18447. /* VDEV identifier */
  18448. A_UINT32 vdev_id;
  18449. /** The number of channels in the response. */
  18450. A_UINT32 num_channels;
  18451. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  18452. } wmi_dcc_stats_event_fixed_param;
  18453. /** Data structure for updating NDL per channel. */
  18454. typedef struct {
  18455. /** TLV tag and len; tag equals
  18456. * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan */
  18457. A_UINT32 tlv_header;
  18458. /**
  18459. * Channel frequency, 16 bits
  18460. * NDL_numActiveState, ndlType_numberElements, 1+6 bits
  18461. */
  18462. A_UINT32 chan_info;
  18463. /**
  18464. * NDL_minDccSampling, 10 bits.
  18465. * Maximum time interval between subsequent checks of the DCC rules.
  18466. */
  18467. A_UINT32 ndl_min_dcc_sampling;
  18468. /**
  18469. * dcc_enable, 1 bit.
  18470. * dcc_stats_enable, 1 bit.
  18471. * dcc_stats_interval, 16 bits.
  18472. */
  18473. A_UINT32 dcc_flags;
  18474. /** General DCC configuration. */
  18475. /**
  18476. * NDL_timeUp, ndlType_timing, 1+12 bits.
  18477. * NDL_timeDown, ndlType_timing, 1+12 bits.
  18478. */
  18479. A_UINT32 general_config;
  18480. /** Transmit power thresholds. */
  18481. /**
  18482. * NDL_minTxPower, ndlType_txPower, 1+7 bits.
  18483. * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
  18484. */
  18485. A_UINT32 min_max_tx_power; /* see "ETSI TS 102 687" table above for units */
  18486. /**
  18487. * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  18488. * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  18489. * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  18490. * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  18491. */
  18492. /* see "ETSI TS 102 687" table above for units */
  18493. A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  18494. /** Packet timing thresholds. */
  18495. /**
  18496. * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  18497. * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  18498. * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  18499. * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  18500. */
  18501. A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  18502. /**
  18503. * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
  18504. * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
  18505. */
  18506. A_UINT32 min_max_packet_interval;
  18507. /**
  18508. * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  18509. * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  18510. * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  18511. * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  18512. */
  18513. A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETINTERVAL)];
  18514. /** Packet datarate thresholds. */
  18515. /**
  18516. * NDL_minDatarate, ndlType_datarate, 1+3 bits.
  18517. * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
  18518. */
  18519. A_UINT32 min_max_datarate;
  18520. /**
  18521. * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  18522. * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  18523. * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  18524. * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  18525. */
  18526. A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_DATARATE)];
  18527. /** Receive signal thresholds. */
  18528. /**
  18529. * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
  18530. * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
  18531. * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
  18532. */
  18533. A_UINT32 min_max_def_carrier_sense;
  18534. /** Receive model parameter. */
  18535. /**
  18536. * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
  18537. * NDL_maxCsRange, ndlType_distance, 1+12 bits.
  18538. * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
  18539. */
  18540. A_UINT32 receive_model_parameter;
  18541. /**
  18542. * NDL_minSNR, ndlType_snr, 1+7 bits.
  18543. */
  18544. A_UINT32 receive_model_parameter_2;
  18545. /** Demodulation model parameters. */
  18546. /**
  18547. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  18548. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  18549. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  18550. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  18551. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  18552. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  18553. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  18554. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  18555. */
  18556. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  18557. /** Transmit model parameters. */
  18558. /**
  18559. * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  18560. * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  18561. * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  18562. * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  18563. */
  18564. A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
  18565. /**
  18566. * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  18567. * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  18568. * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  18569. * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  18570. */
  18571. A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  18572. /**
  18573. * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  18574. * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  18575. * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  18576. * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  18577. */
  18578. A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  18579. /**
  18580. * NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits.
  18581. */
  18582. A_UINT32 tm_max_channel_use;
  18583. /**
  18584. * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  18585. * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  18586. * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  18587. * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  18588. */
  18589. A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
  18590. /** Channel load thresholds. */
  18591. /**
  18592. * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
  18593. * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
  18594. */
  18595. A_UINT32 min_max_channel_load;
  18596. /** Transmit queue parameters. */
  18597. /**
  18598. * NDL_numQueue, ndlType_acPrio, 1+3 bits.
  18599. * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
  18600. * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
  18601. * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
  18602. * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
  18603. */
  18604. A_UINT32 transmit_queue_parameters;
  18605. /**
  18606. * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
  18607. * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
  18608. * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
  18609. * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
  18610. */
  18611. A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
  18612. } wmi_dcc_ndl_chan;
  18613. #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  18614. #define WMI_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  18615. #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
  18616. #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
  18617. #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
  18618. #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
  18619. #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
  18620. #define WMI_NDL_MEASURE_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
  18621. #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
  18622. #define WMI_NDL_DCC_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
  18623. #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
  18624. #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
  18625. #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
  18626. #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
  18627. #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
  18628. #define WMI_NDL_TIME_UP_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
  18629. #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
  18630. #define WMI_NDL_TIME_DOWN_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
  18631. #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
  18632. #define WMI_NDL_MIN_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
  18633. #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
  18634. #define WMI_NDL_MAX_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
  18635. #define WMI_NDL_DEF_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  18636. #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)
  18637. #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  18638. #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)
  18639. #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
  18640. #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
  18641. #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
  18642. #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
  18643. #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  18644. #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)
  18645. #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
  18646. #define WMI_NDL_MIN_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
  18647. #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
  18648. #define WMI_NDL_MAX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
  18649. #define WMI_NDL_DEF_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  18650. #define WMI_NDL_DEF_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  18651. #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
  18652. #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
  18653. #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
  18654. #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
  18655. #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
  18656. #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
  18657. #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
  18658. #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
  18659. #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
  18660. #define WMI_NDL_MAX_CS_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
  18661. #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
  18662. #define WMI_NDL_REF_PATH_LOSS_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
  18663. #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
  18664. #define WMI_NDL_MIN_SNR_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
  18665. #define WMI_NDL_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  18666. #define WMI_NDL_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  18667. #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)
  18668. #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)
  18669. #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)
  18670. #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)
  18671. #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)
  18672. #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)
  18673. #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
  18674. #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr,val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
  18675. #define WMI_NDL_TM_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  18676. #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)
  18677. #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
  18678. #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
  18679. #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
  18680. #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
  18681. #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
  18682. #define WMI_NDL_NUM_QUEUE_SET(ptr,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
  18683. #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr,acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
  18684. #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr,acprio,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
  18685. #define WMI_NDL_REF_QUEUE_LEN_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
  18686. #define WMI_NDL_REF_QUEUE_LEN_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
  18687. /** Data structure for updating the NDL. */
  18688. typedef struct {
  18689. /** TLV tag and len; tag equals
  18690. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
  18691. A_UINT32 tlv_header;
  18692. /* VDEV identifier */
  18693. A_UINT32 vdev_id;
  18694. /** The number of channels in the request. */
  18695. A_UINT32 num_channel;
  18696. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  18697. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  18698. } wmi_dcc_update_ndl_cmd_fixed_param;
  18699. typedef struct {
  18700. /** TLV tag and len; tag equals
  18701. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param */
  18702. A_UINT32 tlv_header;
  18703. /* VDEV identifier */
  18704. A_UINT32 vdev_id;
  18705. A_UINT32 status;
  18706. } wmi_dcc_update_ndl_resp_event_fixed_param;
  18707. /* Actions for TSF timestamp */
  18708. typedef enum {
  18709. TSF_TSTAMP_CAPTURE_REQ = 1,
  18710. TSF_TSTAMP_CAPTURE_RESET = 2,
  18711. TSF_TSTAMP_READ_VALUE = 3,
  18712. TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
  18713. } wmi_tsf_tstamp_action;
  18714. typedef struct {
  18715. /** TLV tag and len; tag equals
  18716. * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
  18717. A_UINT32 tlv_header;
  18718. /** unique id identifying the VDEV, generated by the caller */
  18719. A_UINT32 vdev_id;
  18720. /* action type, refer to wmi_tsf_tstamp_action */
  18721. A_UINT32 tsf_action;
  18722. } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
  18723. typedef struct {
  18724. /* TLV tag and len; tag equals
  18725. * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
  18726. A_UINT32 tlv_header;
  18727. /* VDEV identifier */
  18728. A_UINT32 vdev_id;
  18729. /* low 32bit of tsf */
  18730. A_UINT32 tsf_low;
  18731. /* high 32 bit of tsf */
  18732. A_UINT32 tsf_high;
  18733. /* low 32 bits of qtimer */
  18734. A_UINT32 qtimer_low;
  18735. /* high 32 bits of qtimer */
  18736. A_UINT32 qtimer_high;
  18737. /*
  18738. * tsf_id: TSF ID for the current vdev
  18739. * This field should be ignored unless the tsf_id_valid flag is set.
  18740. */
  18741. A_UINT32 tsf_id;
  18742. A_UINT32 tsf_id_valid;
  18743. /*
  18744. * mac_id: MAC identifier
  18745. * This field should be ignored unless the mac_id_valid flag is set.
  18746. */
  18747. A_UINT32 mac_id;
  18748. A_UINT32 mac_id_valid;
  18749. /* low 32 bits of wlan global tsf */
  18750. A_UINT32 wlan_global_tsf_low;
  18751. /* high 32 bits of wlan global tsf */
  18752. A_UINT32 wlan_global_tsf_high;
  18753. } wmi_vdev_tsf_report_event_fixed_param;
  18754. /* ie_id values:
  18755. * 0 to 255 are used for individual IEEE802.11 Information Element types
  18756. */
  18757. #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
  18758. /* source values: */
  18759. #define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
  18760. /* band values: */
  18761. typedef enum {
  18762. WMI_SET_VDEV_IE_BAND_ALL = 0,
  18763. WMI_SET_VDEV_IE_BAND_2_4GHZ,
  18764. WMI_SET_VDEV_IE_BAND_5GHZ,
  18765. } wmi_set_vdev_ie_band;
  18766. typedef struct {
  18767. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
  18768. A_UINT32 tlv_header;
  18769. /** unique id identifying the VDEV, generated by the caller */
  18770. A_UINT32 vdev_id;
  18771. /** unique id to identify the ie_data as defined by ieee 802.11 spec */
  18772. A_UINT32 ie_id;
  18773. /** ie_len corresponds to num of bytes in ie_data[] */
  18774. A_UINT32 ie_len;
  18775. /** source of this command */
  18776. A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
  18777. /** band for this IE - se wmi_set_vdev_ie_band enum */
  18778. A_UINT32 band;
  18779. /**
  18780. * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  18781. * A_UINT8 ie_data[];
  18782. *
  18783. */
  18784. } wmi_vdev_set_ie_cmd_fixed_param;
  18785. /* DISA feature related data structures */
  18786. #define MAX_MAC_HEADER_LEN 32
  18787. typedef enum {
  18788. WMI_ENCRYPT_DECRYPT_FLAG_INVALID,
  18789. WMI_ENCRYPT = 1,
  18790. WMI_DECRYPT = 2,
  18791. } WMI_ENCRYPT_DECRYPT_FLAG;
  18792. typedef struct {
  18793. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param */
  18794. /** unique id identifying the VDEV, generated by the caller */
  18795. A_UINT32 vdev_id;
  18796. A_UINT32 key_flag; /* WMI_ENCRYPT_DECRYPT_FLAG */
  18797. A_UINT32 key_idx;
  18798. A_UINT32 key_cipher;
  18799. A_UINT32 key_len; /* units = bytes */
  18800. A_UINT32 key_txmic_len; /* units = bytes */
  18801. A_UINT32 key_rxmic_len; /* units = bytes */
  18802. /** Key: This array needs to be provided in little-endian order */
  18803. A_UINT8 key_data[WMI_MAX_KEY_LEN];
  18804. /** Packet number: This array needs to be provided in little-endian order.
  18805. * If the PN is less than 8 bytes, the PN data shall be placed into this
  18806. * pn[] array starting at byte 0, leaving the MSBs empty.
  18807. */
  18808. A_UINT8 pn[8];
  18809. /** 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
  18810. * This array needs to be provided in little-endian order.
  18811. */
  18812. A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
  18813. A_UINT32 data_len; /** Payload length, units = bytes */
  18814. /*
  18815. * Following this struct are this TLV:
  18816. * A_UINT8 data[]; <-- actual data to be encrypted,
  18817. * needs to be provided in little-endian order
  18818. */
  18819. } wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
  18820. /* This event is generated in response to WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
  18821. * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
  18822. * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
  18823. * then on receiving the tx completion for the DISA frame this WMI event
  18824. * will be delivered to HOST with the encrypted frame.
  18825. */
  18826. typedef struct {
  18827. /** TLV tag and len; tag equals
  18828. * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param */
  18829. A_UINT32 tlv_header;
  18830. /* VDEV identifier */
  18831. A_UINT32 vdev_id;
  18832. A_INT32 status; /* 0: success, -1: Failure, */
  18833. /* 802.11 header length + encrypted payload length (units = bytes) */
  18834. A_UINT32 data_length;
  18835. /*
  18836. * Following this struct is this TLV:
  18837. * A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
  18838. * 802.11 header + encrypted payload,
  18839. * provided in little-endian order
  18840. */
  18841. } wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
  18842. /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
  18843. typedef struct {
  18844. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
  18845. /** Set Preferred Channel List **/
  18846. /** # of channels to scan */
  18847. A_UINT32 num_chan;
  18848. /**
  18849. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  18850. * structure. The TLV's are:
  18851. * A_UINT32 channel_list[];
  18852. **/
  18853. } wmi_soc_set_pcl_cmd_fixed_param;
  18854. /* Values for channel_weight */
  18855. typedef enum {
  18856. WMI_PCL_WEIGHT_DISALLOW = 0,
  18857. WMI_PCL_WEIGHT_LOW = 1,
  18858. WMI_PCL_WEIGHT_MEDIUM = 2,
  18859. WMI_PCL_WEIGHT_HIGH = 3,
  18860. WMI_PCL_WEIGHT_VERY_HIGH = 4,
  18861. } wmi_pcl_chan_weight;
  18862. typedef struct {
  18863. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param */
  18864. /** Set Preferred Channel List **/
  18865. /** pdev_id for identifying the MAC
  18866. * See macros starting with WMI_PDEV_ID_ for values.
  18867. */
  18868. A_UINT32 pdev_id;
  18869. /** # of channels to scan */
  18870. A_UINT32 num_chan;
  18871. /**
  18872. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  18873. * structure. The TLV's are:
  18874. * A_UINT32 channel_weight[]; channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  18875. **/
  18876. } wmi_pdev_set_pcl_cmd_fixed_param;
  18877. /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
  18878. typedef struct {
  18879. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
  18880. /** Set Hardware Mode **/
  18881. /* Hardware Mode Index */
  18882. A_UINT32 hw_mode_index;
  18883. } wmi_soc_set_hw_mode_cmd_fixed_param;
  18884. typedef struct {
  18885. A_UINT32 tlv_header; /* TLV tag and len tag equals WMITLV_TAG_STRUC_wmi_pdev_band_to_mac */
  18886. /** pdev_id for identifying the MAC
  18887. * See macros starting with WMI_PDEV_ID_ for values.
  18888. */
  18889. A_UINT32 pdev_id;
  18890. /* start frequency in MHz */
  18891. A_UINT32 start_freq;
  18892. /* end frequency in MHz */
  18893. A_UINT32 end_freq;
  18894. } wmi_pdev_band_to_mac;
  18895. typedef struct {
  18896. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param */
  18897. /** Set Hardware Mode **/
  18898. /** pdev_id for identifying the MAC
  18899. * See macros starting with WMI_PDEV_ID_ for values.
  18900. */
  18901. A_UINT32 pdev_id;
  18902. /* Hardware Mode Index */
  18903. A_UINT32 hw_mode_index;
  18904. /* Number of band to mac TLVs */
  18905. A_UINT32 num_band_to_mac;
  18906. /* Followed by TLVs of type
  18907. * num_band_to_mac * wmi_pdev_band_to_mac.
  18908. */
  18909. } wmi_pdev_set_hw_mode_cmd_fixed_param;
  18910. /* DEPRECATED - use wmi_pdev_set_dual_mac_config_cmd_fixed_param instead */
  18911. typedef struct {
  18912. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param */
  18913. /** Set Dual MAC Firmware Configuration **/
  18914. /* Concurrent scan configuration bits */
  18915. A_UINT32 concurrent_scan_config_bits;
  18916. /* Firmware mode configuration bits */
  18917. A_UINT32 fw_mode_config_bits;
  18918. } wmi_soc_set_dual_mac_config_cmd_fixed_param;
  18919. typedef struct {
  18920. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param */
  18921. /** Set Dual MAC Firmware Configuration **/
  18922. /** pdev_id for identifying the MAC
  18923. * See macros starting with WMI_PDEV_ID_ for values.
  18924. */
  18925. A_UINT32 pdev_id;
  18926. /* Concurrent scan configuration bits */
  18927. A_UINT32 concurrent_scan_config_bits;
  18928. /* Firmware mode configuration bits */
  18929. A_UINT32 fw_mode_config_bits;
  18930. } wmi_pdev_set_mac_config_cmd_fixed_param;
  18931. typedef struct { /* DEPRECATED */
  18932. A_UINT32 num_tx_chains;
  18933. A_UINT32 num_rx_chains;
  18934. A_UINT32 reserved[2];
  18935. } soc_num_tx_rx_chains;
  18936. typedef struct {
  18937. A_UINT32 num_tx_chains_2g;
  18938. A_UINT32 num_rx_chains_2g;
  18939. A_UINT32 num_tx_chains_5g;
  18940. A_UINT32 num_rx_chains_5g;
  18941. } band_num_tx_rx_chains;
  18942. typedef union { /* DEPRECATED */
  18943. soc_num_tx_rx_chains soc_txrx_chain_setting;
  18944. band_num_tx_rx_chains band_txrx_chain_setting;
  18945. } antenna_num_tx_rx_chains;
  18946. typedef enum {
  18947. ANTENNA_MODE_DISABLED = 0x0,
  18948. ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
  18949. /* reserved */
  18950. } antenna_mode_reason;
  18951. /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
  18952. typedef struct {
  18953. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param */
  18954. /* the reason for setting antenna mode, refer antenna_mode_reason */
  18955. A_UINT32 reason;
  18956. /*
  18957. * The above reason parameter will select whether the following union
  18958. * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
  18959. */
  18960. antenna_num_tx_rx_chains num_txrx_chains_setting;
  18961. } wmi_soc_set_antenna_mode_cmd_fixed_param;
  18962. typedef struct {
  18963. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param */
  18964. /** pdev_id for identifying the MAC
  18965. * See macros starting with WMI_PDEV_ID_ for values.
  18966. */
  18967. A_UINT32 pdev_id;
  18968. /* Bits 0-15 is the number of RX chains and 16-31 is the number of TX chains */
  18969. A_UINT32 num_txrx_chains;
  18970. } wmi_pdev_set_antenna_mode_cmd_fixed_param;
  18971. /** Data structure for information specific to a VDEV to MAC mapping. */
  18972. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
  18973. typedef struct {
  18974. /** TLV tag and len; tag equals
  18975. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
  18976. A_UINT32 tlv_header;
  18977. A_UINT32 vdev_id; /* VDEV ID */
  18978. A_UINT32 mac_id; /* MAC ID */
  18979. } wmi_soc_set_hw_mode_response_vdev_mac_entry;
  18980. /** Data structure for information specific to a VDEV to MAC mapping. */
  18981. typedef struct {
  18982. /** TLV tag and len; tag equals
  18983. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
  18984. A_UINT32 tlv_header;
  18985. /** pdev_id for identifying the MAC
  18986. * See macros starting with WMI_PDEV_ID_ for values.
  18987. */
  18988. A_UINT32 pdev_id;
  18989. A_UINT32 vdev_id;
  18990. } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
  18991. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
  18992. typedef struct {
  18993. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
  18994. /** Set Hardware Mode Response Event **/
  18995. /* Status of set_hw_mode command */
  18996. /*
  18997. * Values for Status:
  18998. * 0 - OK; command successful
  18999. * 1 - EINVAL; Requested invalid hw_mode
  19000. * 2 - ECANCELED; HW mode change canceled
  19001. * 3 - ENOTSUP; HW mode not supported
  19002. * 4 - EHARDWARE; HW mode change prevented by hardware
  19003. * 5 - EPENDING; HW mode change is pending
  19004. * 6 - ECOEX; HW mode change conflict with Coex
  19005. */
  19006. A_UINT32 status;
  19007. /* Configured Hardware Mode */
  19008. A_UINT32 cfgd_hw_mode_index;
  19009. /* Number of Vdev to Mac entries */
  19010. A_UINT32 num_vdev_mac_entries;
  19011. /**
  19012. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  19013. * structure. The TLV's are:
  19014. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  19015. */
  19016. } wmi_soc_set_hw_mode_response_event_fixed_param;
  19017. typedef struct {
  19018. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param */
  19019. /** Set Hardware Mode Response Event **/
  19020. /** pdev_id for identifying the MAC
  19021. * See macros starting with WMI_PDEV_ID_ for values.
  19022. */
  19023. A_UINT32 pdev_id;
  19024. /* Status of set_hw_mode command */
  19025. /*
  19026. * Values for Status:
  19027. * 0 - OK; command successful
  19028. * 1 - EINVAL; Requested invalid hw_mode
  19029. * 2 - ECANCELED; HW mode change canceled
  19030. * 3 - ENOTSUP; HW mode not supported
  19031. * 4 - EHARDWARE; HW mode change prevented by hardware
  19032. * 5 - EPENDING; HW mode change is pending
  19033. * 6 - ECOEX; HW mode change conflict with Coex
  19034. */
  19035. A_UINT32 status;
  19036. /* Configured Hardware Mode */
  19037. A_UINT32 cfgd_hw_mode_index;
  19038. /* Number of Vdev to Mac entries */
  19039. A_UINT32 num_vdev_mac_entries;
  19040. /**
  19041. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  19042. * structure. The TLV's are:
  19043. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  19044. */
  19045. } wmi_pdev_set_hw_mode_response_event_fixed_param;
  19046. /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
  19047. typedef struct {
  19048. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
  19049. /** Hardware Mode Transition Event **/
  19050. /* Original or old Hardware mode */
  19051. A_UINT32 old_hw_mode_index;
  19052. /* New Hardware Mode */
  19053. A_UINT32 new_hw_mode_index;
  19054. /* Number of Vdev to Mac entries */
  19055. A_UINT32 num_vdev_mac_entries;
  19056. /**
  19057. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  19058. * structure. The TLV's are:
  19059. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  19060. */
  19061. } wmi_soc_hw_mode_transition_event_fixed_param;
  19062. typedef struct {
  19063. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param */
  19064. /** Hardware Mode Transition Event **/
  19065. /** pdev_id for identifying the MAC
  19066. * See macros starting with WMI_PDEV_ID_ for values.
  19067. */
  19068. A_UINT32 pdev_id;
  19069. /* Original or old Hardware mode */
  19070. A_UINT32 old_hw_mode_index;
  19071. /* New Hardware Mode */
  19072. A_UINT32 new_hw_mode_index;
  19073. /* Number of Vdev to Mac entries */
  19074. A_UINT32 num_vdev_mac_entries;
  19075. /**
  19076. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  19077. * structure. The TLV's are:
  19078. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  19079. */
  19080. } wmi_pdev_hw_mode_transition_event_fixed_param;
  19081. /**
  19082. * This command is sent from WLAN host driver to firmware for
  19083. * plugging in reorder queue desc to lithium hw.
  19084. *
  19085. * Example: plug-in queue desc for TID 5
  19086. * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  19087. * (vdev_id = PEER vdev id,
  19088. * peer_macaddr = PEER mac addr,
  19089. * tid = 5,
  19090. * queue_ptr_lo = queue desc addr lower 32 bits,
  19091. * queue_ptr_hi = queue desc addr higher 32 bits,
  19092. * queue_no = 16-bit number assigned by host for queue,
  19093. * stored in bits 15:0 of queue_no field)
  19094. */
  19095. typedef struct {
  19096. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param */
  19097. A_UINT32 vdev_id;
  19098. wmi_mac_addr peer_macaddr; /* peer mac address */
  19099. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  19100. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc adddress */
  19101. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc adddress */
  19102. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  19103. stored in bits 15:0 of queue_no field */
  19104. A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
  19105. * 0 = Invalid, 1 = Valid */
  19106. A_UINT32 ba_window_size; /* Valid values: 0 to 256
  19107. * Host sends the message when BA session is
  19108. * established or terminated for the TID. */
  19109. } wmi_peer_reorder_queue_setup_cmd_fixed_param;
  19110. /**
  19111. * This command is sent from WLAN host driver to firmware for
  19112. * removing one or more reorder queue desc to lithium hw.
  19113. *
  19114. * Example: remove queue desc for all TIDs
  19115. * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
  19116. * (vdev_id = PEER vdev id,
  19117. * peer_macaddr = PEER mac addr,
  19118. * tid = 0x1FFFF,
  19119. */
  19120. typedef struct {
  19121. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param */
  19122. A_UINT32 vdev_id;
  19123. wmi_mac_addr peer_macaddr; /* peer mac address */
  19124. A_UINT32 tid_mask; /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
  19125. } wmi_peer_reorder_queue_remove_cmd_fixed_param;
  19126. /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param instead */
  19127. typedef struct {
  19128. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param */
  19129. /** Set Dual MAC Config Response Event **/
  19130. /* Status for set_dual_mac_config command */
  19131. /*
  19132. * Values for Status:
  19133. * 0 - OK; command successful
  19134. * 1 - EINVAL; Requested invalid hw_mode
  19135. * 3 - ENOTSUP; HW mode not supported
  19136. * 4 - EHARDWARE; HW mode change prevented by hardware
  19137. * 6 - ECOEX; HW mode change conflict with Coex
  19138. */
  19139. A_UINT32 status;
  19140. } wmi_soc_set_dual_mac_config_response_event_fixed_param;
  19141. typedef struct {
  19142. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param */
  19143. /** Set Dual MAC Config Response Event **/
  19144. /** pdev_id for identifying the MAC
  19145. * See macros starting with WMI_PDEV_ID_ for values.
  19146. */
  19147. A_UINT32 pdev_id;
  19148. /* Status for set_dual_mac_config command */
  19149. /*
  19150. * Values for Status:
  19151. * 0 - OK; command successful
  19152. * 1 - EINVAL; Requested invalid hw_mode
  19153. * 3 - ENOTSUP; HW mode not supported
  19154. * 4 - EHARDWARE; HW mode change prevented by hardware
  19155. * 6 - ECOEX; HW mode change conflict with Coex
  19156. */
  19157. A_UINT32 status;
  19158. } wmi_pdev_set_mac_config_response_event_fixed_param;
  19159. typedef enum {
  19160. MAWC_MOTION_STATE_UNKNOWN,
  19161. MAWC_MOTION_STATE_STATIONARY,
  19162. MAWC_MOTION_STATE_WALK,
  19163. MAWC_MOTION_STATE_TRANSIT,
  19164. } MAWC_MOTION_STATE;
  19165. typedef enum {
  19166. MAWC_SENSOR_STATUS_OK,
  19167. MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
  19168. MAWC_SENSOR_STATUS_SHUTDOWN,
  19169. } MAWC_SENSOR_STATUS;
  19170. typedef struct {
  19171. /* TLV tag and len; tag equals
  19172. * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
  19173. A_UINT32 tlv_header;
  19174. /** new motion state, MAWC_MOTION_STATE */
  19175. A_UINT32 motion_state;
  19176. /** status code of sensor, MAWC_SENSOR_STATUS */
  19177. A_UINT32 sensor_status;
  19178. } wmi_mawc_sensor_report_ind_cmd_fixed_param;
  19179. /* MBO flag field definition */
  19180. /* Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
  19181. * 1 - Allow to connect to MBO AP only
  19182. * Bit 1-31 : reserved.
  19183. */
  19184. #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
  19185. typedef struct {
  19186. /* TLV tag and len; tag equals
  19187. * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param */
  19188. A_UINT32 tlv_header;
  19189. /** vdev id */
  19190. A_UINT32 vdev_id;
  19191. /** enable or disable MBO */
  19192. A_UINT32 enable;
  19193. /** MBO flags, refer to definition of MBO flags*/
  19194. A_UINT32 flags;
  19195. } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
  19196. typedef struct {
  19197. /* TLV tag and len; tag equals
  19198. * WMITLV_TAG_ARRAY_STRUC */
  19199. A_UINT32 tlv_header;
  19200. /** Current operating class number */
  19201. A_UINT32 cur_op_class;
  19202. /** Country string of current reg domain,
  19203. * the expected value should be same as country str defined
  19204. * in country IE.
  19205. * 3 octets (COUNTRY_STR) + 1 octet (always 0)
  19206. * The ordering of this array must be maintained,
  19207. * even when a big-endian host's WMI messages undergo
  19208. * automatic byte reordering for conversion to the
  19209. * little-endian ordering required by the target.
  19210. * On big-endian hosts, this array may need to be byte-swapped
  19211. * by the host, so the subsequent automatic byte-swap
  19212. * will result in the correct final byte order.
  19213. * global operating class: set country_str[0]=0
  19214. */
  19215. A_UINT8 country_str[4];
  19216. /** Supported operating class number in current regdomain */
  19217. A_UINT32 supp_op_class_num;
  19218. /* The TLVs will follow. */
  19219. /* A_UINT32 supp_op_class_list[] */
  19220. } wmi_supported_operating_class_param;
  19221. typedef struct {
  19222. /* TLV tag and len; tag equals
  19223. * WMITLV_TAG_ARRAY_STRUC */
  19224. A_UINT32 tlv_header;
  19225. /** non preferred channel attribute length */
  19226. A_UINT32 non_prefer_ch_attr_len;
  19227. /* The TLVs will follow. */
  19228. /** A_UINT8 non_prefer_ch_attr[];*/
  19229. } wmi_mbo_non_preferred_channel_report_param;
  19230. typedef struct {
  19231. /* TLV tag and len; tag equals
  19232. * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
  19233. A_UINT32 tlv_header;
  19234. /* enable(1) or disable(0) */
  19235. A_UINT32 enable;
  19236. } wmi_mawc_enable_sensor_event_fixed_param;
  19237. typedef struct {
  19238. /* TLV tag and len; tag equals
  19239. * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
  19240. A_UINT32 tlv_header;
  19241. /* Unique id identifying the VDEV */
  19242. A_UINT32 vdev_id;
  19243. /* enable(1) or disable(0) MAWC */
  19244. A_UINT32 enable;
  19245. /* ratio of skipping suppressing scan, skip one out of x */
  19246. A_UINT32 suppress_ratio;
  19247. } wmi_extscan_configure_mawc_cmd_fixed_param;
  19248. typedef struct {
  19249. /* TLV tag and len; tag equals
  19250. * WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param */
  19251. A_UINT32 tlv_header;
  19252. /* Unique id identifying the VDEV */
  19253. A_UINT32 vdev_id;
  19254. /* enable(1) or disable(0) packet error rate trigger for roaming */
  19255. A_UINT32 enable;
  19256. /* high_rate_thresh, low_rate_thresh, pkt_err_rate_thresh_pct:
  19257. * If PER monitoring as a trigger for roaming is enabled,
  19258. * it is controlled by high_rate_thresh, low_rate_thresh, and
  19259. * pkt_err_rate_thresh_pct.
  19260. * PER monitoring is performed only when the time-averaged throughput
  19261. * is less than high_rate_thresh.
  19262. * During PER monitoring, the target keeps track of the PHY rate for
  19263. * each of the first N PPDUs within a time window.
  19264. * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
  19265. * N * pkt_err_rate_thresh_pct / 100, roaming will be triggered.
  19266. *
  19267. * This PER monitoring as a trigger for roaming is performed
  19268. * concurrently but independently for rx and tx.
  19269. */
  19270. A_UINT32 high_rate_thresh; /* units = Kbps */
  19271. A_UINT32 low_rate_thresh; /* units = Kbps */
  19272. A_UINT32 pkt_err_rate_thresh_pct;
  19273. /*
  19274. * rest time after associating to a new AP before
  19275. * starting to monitor PER as a roaming trigger,
  19276. * (units are seconds)
  19277. */
  19278. A_UINT32 per_rest_time;
  19279. /* This is the total time for which PER monitoring will be run.
  19280. * After completion of time windows, the average PER over the window
  19281. * will be computed.
  19282. * The parameter value stores specifications for both TX and RX
  19283. * monitor times.
  19284. * The two least-significant bytes (0 & 1) hold the RX monitor time;
  19285. * the two most-significant bytes (2 & 3) hold the TX monitor time.
  19286. */
  19287. A_UINT32 pkt_err_rate_mon_time; /* units = seconds */
  19288. /* Minimum roamable AP RSSI for candidate selection for PER based roam */
  19289. A_INT32 min_candidate_rssi; /* units = dBm */
  19290. } wmi_roam_per_config_fixed_param;
  19291. typedef struct {
  19292. /* TLV tag and len; tag equals
  19293. * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
  19294. A_UINT32 tlv_header;
  19295. /* Unique id identifying the VDEV */
  19296. A_UINT32 vdev_id;
  19297. /* enable(1) or disable(0) MAWC */
  19298. A_UINT32 enable;
  19299. /* ratio of exponential backoff, next = current + current*ratio/100 */
  19300. A_UINT32 exp_backoff_ratio;
  19301. /* initial scan interval(msec) */
  19302. A_UINT32 init_scan_interval;
  19303. /* max scan interval(msec) */
  19304. A_UINT32 max_scan_interval;
  19305. } wmi_nlo_configure_mawc_cmd_fixed_param;
  19306. typedef struct {
  19307. /* TLV tag and len; tag equals
  19308. * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
  19309. A_UINT32 tlv_header;
  19310. /* Unique id identifying the VDEV */
  19311. A_UINT32 vdev_id;
  19312. /* enable(1) or disable(0) MAWC */
  19313. A_UINT32 enable;
  19314. /* data traffic load (kBps) to register CMC */
  19315. A_UINT32 traffic_load_threshold;
  19316. /* RSSI threshold (dBm) to scan for Best AP */
  19317. A_UINT32 best_ap_rssi_threshold;
  19318. /* high RSSI threshold adjustment in Stationary to suppress scan */
  19319. A_UINT32 rssi_stationary_high_adjust;
  19320. /* low RSSI threshold adjustment in Stationary to suppress scan */
  19321. A_UINT32 rssi_stationary_low_adjust;
  19322. } wmi_roam_configure_mawc_cmd_fixed_param;
  19323. #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
  19324. #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
  19325. typedef enum {
  19326. PACKET_FILTER_TYPE_INVALID = 0,
  19327. PACKET_FILTER_TYPE_FILTER_PKT,
  19328. PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
  19329. PACKET_FILTER_TYPE_MAX_ENUM_SIZE
  19330. } WMI_PACKET_FILTER_FILTER_TYPE;
  19331. typedef enum {
  19332. PACKET_FILTER_PROTO_TYPE_INVALID = 0,
  19333. /* L2 header */
  19334. PACKET_FILTER_PROTO_TYPE_MAC,
  19335. PACKET_FILTER_PROTO_TYPE_SNAP,
  19336. /* L3 header (EtherType) */
  19337. PACKET_FILTER_PROTO_TYPE_IPV4,
  19338. PACKET_FILTER_PROTO_TYPE_IPV6,
  19339. /* L4 header (IP protocol) */
  19340. PACKET_FILTER_PROTO_TYPE_UDP,
  19341. PACKET_FILTER_PROTO_TYPE_TCP,
  19342. PACKET_FILTER_PROTO_TYPE_ICMPV6,
  19343. PACKET_FILTER_PROTO_TYPE_MAX
  19344. } WMI_PACKET_FILTER_PROTO_TYPE;
  19345. typedef enum {
  19346. PACKET_FILTER_CMP_TYPE_INVALID = 0,
  19347. PACKET_FILTER_CMP_TYPE_EQUAL,
  19348. PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
  19349. PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
  19350. PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  19351. PACKET_FILTER_CMP_TYPE_ADDRTYPE,
  19352. PACKET_FILTER_CMP_TYPE_MAX
  19353. } WMI_PACKET_FILTER_CMP_TYPE;
  19354. typedef enum {
  19355. PACKET_FILTER_SET_INACTIVE = 0,
  19356. PACKET_FILTER_SET_ACTIVE
  19357. } WMI_PACKET_FILTER_ACTION;
  19358. typedef enum {
  19359. PACKET_FILTER_SET_DISABLE = 0,
  19360. PACKET_FILTER_SET_ENABLE
  19361. } WMI_PACKET_FILTER_RUNTIME_ENABLE;
  19362. typedef struct {
  19363. A_UINT32 proto_type;
  19364. A_UINT32 cmp_type;
  19365. A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
  19366. A_UINT32 data_offset; /* from start of the respective frame header (units = bytes) */
  19367. A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
  19368. A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
  19369. } WMI_PACKET_FILTER_PARAMS_TYPE;
  19370. typedef struct {
  19371. A_UINT32 tlv_header;
  19372. A_UINT32 vdev_id;
  19373. A_UINT32 filter_id;
  19374. A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
  19375. A_UINT32 filter_type;
  19376. A_UINT32 num_params; /* how many entries in paramsData are valid */
  19377. A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
  19378. WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
  19379. /* deprecated0:
  19380. * This field simply provides filler space to retain the original message
  19381. * format while reducing WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER
  19382. * from 10 to 5.
  19383. */
  19384. WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
  19385. } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
  19386. /* enable / disable all filters within the specified vdev */
  19387. typedef struct {
  19388. A_UINT32 tlv_header;
  19389. A_UINT32 vdev_id;
  19390. A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
  19391. } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
  19392. #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
  19393. #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
  19394. #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
  19395. WMI_SET_BITS(tcp_flag_u32, \
  19396. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  19397. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
  19398. tcp_flag_values)
  19399. #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
  19400. WMI_GET_BITS(tcp_flag_u32, \
  19401. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  19402. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
  19403. #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
  19404. #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
  19405. #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
  19406. WMI_SET_BITS(tcp_flag_u32, \
  19407. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  19408. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
  19409. tcp_flags_mask)
  19410. #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
  19411. WMI_GET_BITS(tcp_flag_u32, \
  19412. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  19413. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
  19414. typedef struct {
  19415. A_UINT32 tlv_header;
  19416. /**
  19417. * @brief lro_enable - indicates whether lro is enabled
  19418. * [0] LRO Enable
  19419. */
  19420. A_UINT32 lro_enable;
  19421. /**
  19422. * @brief tcp_flag_u32 - mask of which TCP flags to check and
  19423. * values to check for
  19424. * [8:0] TCP flag values - If the TCP flags from the packet do not match
  19425. * the values in this field after masking with TCP flags mask below,
  19426. * LRO eligible will not be set
  19427. * [17:9] TCP flags mask - Mask field for comparing the TCP values
  19428. * provided above with the TCP flags field in the received packet
  19429. * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
  19430. * macros to isolate the mask field and values field that are packed
  19431. * into this u32 "word".
  19432. */
  19433. A_UINT32 tcp_flag_u32;
  19434. /**
  19435. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  19436. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  19437. * bytes 0 to 3
  19438. *
  19439. * In this and all the below toeplitz_hash fields, the bytes are
  19440. * specified in little-endian order. For example:
  19441. * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
  19442. * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
  19443. * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
  19444. * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
  19445. */
  19446. A_UINT32 toeplitz_hash_ipv4_0_3;
  19447. /**
  19448. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  19449. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  19450. * bytes 4 to 7
  19451. */
  19452. A_UINT32 toeplitz_hash_ipv4_4_7;
  19453. /**
  19454. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  19455. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  19456. * bytes 8 to 11
  19457. */
  19458. A_UINT32 toeplitz_hash_ipv4_8_11;
  19459. /**
  19460. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  19461. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  19462. * bytes 12 to 15
  19463. */
  19464. A_UINT32 toeplitz_hash_ipv4_12_15;
  19465. /**
  19466. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  19467. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  19468. * byte 16
  19469. */
  19470. A_UINT32 toeplitz_hash_ipv4_16;
  19471. /**
  19472. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19473. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19474. * bytes 0 to 3
  19475. */
  19476. A_UINT32 toeplitz_hash_ipv6_0_3;
  19477. /**
  19478. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19479. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19480. * bytes 4 to 7
  19481. */
  19482. A_UINT32 toeplitz_hash_ipv6_4_7;
  19483. /**
  19484. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19485. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19486. * bytes 8 to 11
  19487. */
  19488. A_UINT32 toeplitz_hash_ipv6_8_11;
  19489. /**
  19490. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19491. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19492. * bytes 12 to 15
  19493. */
  19494. A_UINT32 toeplitz_hash_ipv6_12_15;
  19495. /**
  19496. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19497. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19498. * bytes 16 to 19
  19499. */
  19500. A_UINT32 toeplitz_hash_ipv6_16_19;
  19501. /**
  19502. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19503. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19504. * bytes 20 to 22
  19505. */
  19506. A_UINT32 toeplitz_hash_ipv6_20_23;
  19507. /**
  19508. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19509. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19510. * bytes 24 to 27
  19511. */
  19512. A_UINT32 toeplitz_hash_ipv6_24_27;
  19513. /**
  19514. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19515. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19516. * bytes 28 to 31
  19517. */
  19518. A_UINT32 toeplitz_hash_ipv6_28_31;
  19519. /**
  19520. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19521. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19522. * bytes 32 to 35
  19523. */
  19524. A_UINT32 toeplitz_hash_ipv6_32_35;
  19525. /**
  19526. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19527. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19528. * bytes 36 to 39
  19529. */
  19530. A_UINT32 toeplitz_hash_ipv6_36_39;
  19531. /**
  19532. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19533. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19534. * byte 40
  19535. */
  19536. A_UINT32 toeplitz_hash_ipv6_40;
  19537. /**
  19538. * @brief pdev_id - identifies the MAC
  19539. * See macros starting with WMI_PDEV_ID_ for values.
  19540. */
  19541. A_UINT32 pdev_id;
  19542. } wmi_lro_info_cmd_fixed_param;
  19543. typedef struct {
  19544. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param */
  19545. A_UINT32 offset; /* flash offset to write, starting from 0 */
  19546. A_UINT32 length; /* vaild data length in buffer, unit: byte */
  19547. } wmi_transfer_data_to_flash_cmd_fixed_param;
  19548. typedef struct {
  19549. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param */
  19550. /** Return status. 0 for success, non-zero otherwise */
  19551. A_UINT32 status;
  19552. } wmi_transfer_data_to_flash_complete_event_fixed_param;
  19553. typedef struct {
  19554. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param */
  19555. A_UINT32 offset; /* flash offset to read, starting from 0 */
  19556. A_UINT32 length; /* data length to read, unit: byte */
  19557. } wmi_read_data_from_flash_cmd_fixed_param;
  19558. typedef struct {
  19559. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param */
  19560. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  19561. A_UINT32 offset; /* flash offset reading from, starting from 0 */
  19562. A_UINT32 length; /* length of data being reported, unit: byte */
  19563. } wmi_read_data_from_flash_event_fixed_param;
  19564. typedef enum {
  19565. ENHANCED_MCAST_FILTER_DISABLED,
  19566. ENHANCED_MCAST_FILTER_ENABLED
  19567. } ENHANCED_MCAST_FILTER_CONFIG;
  19568. /*
  19569. * Command to enable/disable filtering of multicast IP with unicast mac
  19570. */
  19571. typedef struct {
  19572. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param */
  19573. /* Unique id identifying the VDEV */
  19574. A_UINT32 vdev_id;
  19575. /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
  19576. A_UINT32 enable;
  19577. } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
  19578. typedef struct {
  19579. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param */
  19580. A_UINT32 tlv_header;
  19581. /** unique id identifying the VDEV, generated by the caller */
  19582. A_UINT32 vdev_id;
  19583. /** WISA enable / disable mode */
  19584. A_UINT32 wisa_mode;
  19585. } wmi_vdev_wisa_cmd_fixed_param;
  19586. /*
  19587. * This structure is used to report SMPS force mode set complete to host.
  19588. */
  19589. typedef struct {
  19590. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param */
  19591. /* Unique id identifying the VDEV */
  19592. A_UINT32 vdev_id;
  19593. /* Return status. 0 for success, non-zero otherwise */
  19594. A_UINT32 status;
  19595. } wmi_sta_smps_force_mode_complete_event_fixed_param;
  19596. /*
  19597. * This structure is used to report SCPC calibrated data to host.
  19598. */
  19599. typedef struct {
  19600. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param */
  19601. /** number of BDF patches. Each patch contains offset, length and data */
  19602. A_UINT32 num_patch;
  19603. /* This TLV is followed by another TLV of array of bytes
  19604. * A_UINT8 data[];
  19605. * This data array contains, for example
  19606. * patch1 offset(byte3~0), patch1 data length(byte7~4), patch1 data(byte11~8)
  19607. * patch2 offset(byte15~12), patch2 data length(byte19~16), patch2 data(byte47~20)
  19608. *
  19609. */
  19610. } wmi_scpc_event_fixed_param;
  19611. typedef enum {
  19612. FW_ACTIVE_BPF_MODE_DISABLE = (1 << 1),
  19613. FW_ACTIVE_BPF_MODE_FORCE_ENABLE = (1 << 2),
  19614. FW_ACTIVE_BPF_MODE_ADAPTIVE_ENABLE = (1 << 3),
  19615. } FW_ACTIVE_BPF_MODE;
  19616. /* bpf interface structure */
  19617. typedef struct wmi_bpf_get_capability_cmd_s {
  19618. A_UINT32 tlv_header;
  19619. A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
  19620. } wmi_bpf_get_capability_cmd_fixed_param;
  19621. typedef struct wmi_bpf_capability_info_evt_s {
  19622. A_UINT32 tlv_header;
  19623. A_UINT32 bpf_version; /* fw's implement version */
  19624. A_UINT32 max_bpf_filters; /* max filters that fw supports */
  19625. A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
  19626. A_UINT32 fw_active_bpf_support_mcbc_modes; /* multicast/broadcast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  19627. A_UINT32 fw_active_bpf_support_uc_modes; /* unicast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  19628. } wmi_bpf_capability_info_evt_fixed_param;
  19629. /* bit 0 of flags: report counters */
  19630. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
  19631. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
  19632. typedef struct wmi_bpf_get_vdev_stats_cmd_s {
  19633. A_UINT32 tlv_header;
  19634. A_UINT32 flags;
  19635. A_UINT32 vdev_id;
  19636. } wmi_bpf_get_vdev_stats_cmd_fixed_param;
  19637. typedef struct wmi_bpf_vdev_stats_info_evt_s {
  19638. A_UINT32 tlv_header;
  19639. A_UINT32 vdev_id;
  19640. A_UINT32 num_filters;
  19641. A_UINT32 num_checked_pkts;
  19642. A_UINT32 num_dropped_pkts;
  19643. } wmi_bpf_vdev_stats_info_evt_fixed_param;
  19644. typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
  19645. A_UINT32 tlv_header;
  19646. A_UINT32 vdev_id;
  19647. A_UINT32 filter_id;
  19648. A_UINT32 bpf_version; /* host bpf version */
  19649. A_UINT32 total_length;
  19650. A_UINT32 current_offset;
  19651. A_UINT32 current_length;
  19652. /*
  19653. * The TLV follows:
  19654. * A_UINT8 buf_inst[]; <-- Variable length buffer for the instuctions
  19655. */
  19656. } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
  19657. #define BPF_FILTER_ID_ALL 0xFFFFFFFF
  19658. typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
  19659. A_UINT32 tlv_header;
  19660. A_UINT32 vdev_id;
  19661. A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
  19662. } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
  19663. typedef struct wmi_bpf_set_vdev_active_mode_cmd_s {
  19664. A_UINT32 tlv_header;
  19665. A_UINT32 vdev_id;
  19666. A_UINT32 mcbc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  19667. A_UINT32 uc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  19668. } wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
  19669. typedef struct wmi_bpf_set_vdev_enable_cmd_s {
  19670. A_UINT32 tlv_header;
  19671. A_UINT32 vdev_id;
  19672. A_UINT32 is_enabled; /* fw assume host default enables */
  19673. } wmi_bpf_set_vdev_enable_cmd_fixed_param;
  19674. typedef struct wmi_bpf_set_vdev_work_memory_cmd_s {
  19675. A_UINT32 tlv_header;
  19676. A_UINT32 vdev_id;
  19677. A_UINT32 bpf_version; /* bpf instruction version */
  19678. A_UINT32 program_len; /* the program length may be changed by this command */
  19679. A_UINT32 addr_offset; /* start writing addr in the working memory */
  19680. A_UINT32 length; /* the writing size of this command (byte units) */
  19681. /*
  19682. * The TLV follows:
  19683. * A_UINT8 buf_inst[]; <-- Variable length buffer with the data to write
  19684. */
  19685. } wmi_bpf_set_vdev_work_memory_cmd_fixed_param;
  19686. typedef struct wmi_bpf_get_vdev_work_memory_cmd_s {
  19687. A_UINT32 tlv_header;
  19688. A_UINT32 vdev_id;
  19689. A_UINT32 addr_offset; /* start reading addr in the working memory */
  19690. A_UINT32 length; /* reading size from addr (byte units) */
  19691. } wmi_bpf_get_vdev_work_memory_cmd_fixed_param;
  19692. typedef struct wmi_bpf_get_vdev_work_memory_resp_evt_s {
  19693. A_UINT32 tlv_header;
  19694. A_UINT32 vdev_id;
  19695. A_UINT32 offset; /* read memory offset from start_addr */
  19696. A_UINT32 length; /* read memory length of this command */
  19697. A_UINT32 fragment; /* 1 means more data will come, 0 means last fragment */
  19698. /*
  19699. * The TLV follows:
  19700. * A_UINT8 buf_inst[]; <-- Variable length buffer containing the read data
  19701. */
  19702. } wmi_bpf_get_vdev_work_memory_resp_evt_fixed_param;
  19703. #define AES_BLOCK_LEN 16 /* in bytes */
  19704. #define FIPS_KEY_LENGTH_128 16 /* in bytes */
  19705. #define FIPS_KEY_LENGTH_256 32 /* in bytes */
  19706. #define FIPS_ENCRYPT_CMD 0
  19707. #define FIPS_DECRYPT_CMD 1
  19708. #define FIPS_ENGINE_AES_CTR 0
  19709. #define FIPS_ENGINE_AES_MIC 1
  19710. #define FIPS_ERROR_OPER_TIMEOUT 1
  19711. /* WMI_PDEV_FIPS_CMDID */
  19712. typedef struct {
  19713. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param */
  19714. union {
  19715. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19716. /** pdev_id for identifying the MAC
  19717. * See macros starting with WMI_PDEV_ID_ for values.
  19718. */
  19719. A_UINT32 pdev_id;
  19720. };
  19721. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  19722. A_UINT32 mode; /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
  19723. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
  19724. A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
  19725. A_UINT32 data_len; /* data length */
  19726. /*
  19727. * Following this structure is the TLV:
  19728. * A_UINT32 data[1]; <-- In Data (keep this in the end)
  19729. */
  19730. } wmi_pdev_fips_cmd_fixed_param;
  19731. typedef struct {
  19732. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param */
  19733. union {
  19734. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19735. /** pdev_id for identifying the MAC
  19736. * See macros starting with WMI_PDEV_ID_ for values.
  19737. */
  19738. A_UINT32 pdev_id;
  19739. };
  19740. A_UINT32 enable; /* 1:enable, 0:disable */
  19741. A_UINT32 mode; /* 1:GPIO parallel mode, 0:GPIO serial mode */
  19742. A_UINT32 rx_antenna; /* rx antenna */
  19743. A_UINT32 tx_default_antenna; /* tx default antenna */
  19744. /*
  19745. * Following this structure is the TLV:
  19746. * wmi_pdev_smart_ant_gpio_handle
  19747. */
  19748. } wmi_pdev_smart_ant_enable_cmd_fixed_param;
  19749. /** GPIO pins/function values to control antennas */
  19750. typedef struct {
  19751. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle */
  19752. A_UINT32 gpio_pin; /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
  19753. A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
  19754. /** pdev_id for identifying the MAC
  19755. * See macros starting with WMI_PDEV_ID_ for values.
  19756. */
  19757. A_UINT32 pdev_id;
  19758. } wmi_pdev_smart_ant_gpio_handle;
  19759. typedef struct {
  19760. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param */
  19761. union {
  19762. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19763. /** pdev_id for identifying the MAC
  19764. * See macros starting with WMI_PDEV_ID_ for values.
  19765. */
  19766. A_UINT32 pdev_id;
  19767. };
  19768. A_UINT32 rx_antenna;
  19769. } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
  19770. typedef struct {
  19771. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param */
  19772. /** unique id identifying the vdev, generated by the caller */
  19773. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  19774. /** peer MAC address */
  19775. wmi_mac_addr peer_macaddr;
  19776. /*
  19777. * Following this structure is the TLV:
  19778. * wmi_peer_smart_ant_set_tx_antenna_series
  19779. */
  19780. } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
  19781. typedef struct {
  19782. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series */
  19783. /* antenna array */
  19784. A_UINT32 antenna_series;
  19785. } wmi_peer_smart_ant_set_tx_antenna_series;
  19786. typedef struct {
  19787. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */
  19788. /* rate array */
  19789. union {
  19790. /* train_rate_series:
  19791. * original name, used for 8-bit rate-code implementations
  19792. */
  19793. A_UINT32 train_rate_series;
  19794. /* train_rate_series_lo:
  19795. * Contains the lower 32 bits of rate array, for larger rate-code
  19796. * implementations. This field is paired with train_rate_series_hi.
  19797. */
  19798. A_UINT32 train_rate_series_lo;
  19799. };
  19800. /* antenna array */
  19801. A_UINT32 train_antenna_series;
  19802. /* Rate flags */
  19803. /* TODO: For future use? */
  19804. A_UINT32 rc_flags;
  19805. /* rate array -- continued */
  19806. A_UINT32 train_rate_series_hi; /* Higher 32 bits of rate array */
  19807. } wmi_peer_smart_ant_set_train_antenna_param;
  19808. typedef struct {
  19809. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param */
  19810. /** unique id identifying the VDEV, generated by the caller */
  19811. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  19812. /** peer MAC address */
  19813. wmi_mac_addr peer_macaddr;
  19814. /* num packets; 0-stop training */
  19815. A_UINT32 num_pkts;
  19816. /*
  19817. * Following this structure is the TLV:
  19818. * wmi_peer_smart_ant_set_train_antenna_param
  19819. */
  19820. } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
  19821. typedef struct {
  19822. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param */
  19823. /** unique id identifying the vdev, generated by the caller */
  19824. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  19825. /** peer MAC address */
  19826. wmi_mac_addr peer_macaddr;
  19827. /* command id*/
  19828. A_UINT32 cmd_id;
  19829. /* number of arguments passed */
  19830. A_UINT32 args_count;
  19831. /*
  19832. * Following this structure is the TLV:
  19833. * A_UINT32 args[]; <-- argument list
  19834. */
  19835. } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
  19836. typedef struct {
  19837. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain */
  19838. A_UINT32 antCtrlChain;
  19839. /** pdev_id for identifying the MAC
  19840. * See macros starting with WMI_PDEV_ID_ for values.
  19841. */
  19842. A_UINT32 pdev_id;
  19843. } wmi_pdev_set_ant_ctrl_chain;
  19844. typedef struct {
  19845. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param */
  19846. A_UINT32 mac_id; /* MAC ID */
  19847. A_UINT32 antCtrlCommon1;
  19848. A_UINT32 antCtrlCommon2;
  19849. /*
  19850. * Following this structure is the TLV:
  19851. * wmi_pdev_set_ant_ctrl_chain
  19852. */
  19853. } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
  19854. typedef struct {
  19855. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param */
  19856. union {
  19857. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19858. /** pdev_id for identifying the MAC
  19859. * See macros starting with WMI_PDEV_ID_ for values.
  19860. */
  19861. A_UINT32 pdev_id;
  19862. };
  19863. /** len of CTL info */
  19864. A_UINT32 ctl_len;
  19865. /* ctl array (len adjusted to number of words).
  19866. * Following this structure is the TLV:
  19867. * A_UINT32 ctl_info[1];
  19868. */
  19869. } wmi_pdev_set_ctl_table_cmd_fixed_param;
  19870. typedef struct {
  19871. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param */
  19872. union {
  19873. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19874. /** pdev_id for identifying the MAC
  19875. * See macros starting with WMI_PDEV_ID_ for values.
  19876. */
  19877. A_UINT32 pdev_id;
  19878. };
  19879. A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
  19880. /*
  19881. * Bit 7:0 len of array gain table
  19882. * Bit 8 bypass multi chain gain or not
  19883. */
  19884. /* array gain table(s) (len adjusted to number of words).
  19885. * Following this structure is the TLV:
  19886. * A_UINT32 arraygain_tbl[1];
  19887. */
  19888. } wmi_pdev_set_mimogain_table_cmd_fixed_param;
  19889. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
  19890. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
  19891. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  19892. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  19893. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
  19894. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
  19895. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  19896. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  19897. typedef struct {
  19898. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param */
  19899. /** parameter id */
  19900. A_UINT32 param_id;
  19901. /** parameter value */
  19902. A_UINT32 param_value;
  19903. } wmi_fwtest_set_param_cmd_fixed_param;
  19904. #define WMI_ATF_DENOMINATION 1000 /* Expressed in 1 part in 1000 (permille) */
  19905. #define WMI_ATF_SSID_FAIR_SCHED 0 /** fair ATF scheduling for vdev */
  19906. #define WMI_ATF_SSID_STRICT_SCHED 1 /** strict ATF scheduling for vdev */
  19907. typedef struct {
  19908. /** TLV tag and len; tag equals
  19909. * WMITLV_TAG_STRUC_wmi_atf_peer_info */
  19910. A_UINT32 tlv_header;
  19911. wmi_mac_addr peer_macaddr;
  19912. A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
  19913. A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
  19914. A_UINT32 atf_units_reserved; /* Peer congestion threshold for future use */
  19915. A_UINT32 vdev_id;
  19916. A_UINT32 pdev_id;
  19917. } wmi_atf_peer_info;
  19918. typedef struct {
  19919. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */
  19920. A_UINT32 num_peers;
  19921. /*
  19922. * Following this structure is the TLV:
  19923. * struct wmi_atf_peer_info peer_info[num_peers];
  19924. */
  19925. } wmi_peer_atf_request_fixed_param;
  19926. /* Structure for Bandwidth Fairness peer information */
  19927. typedef struct {
  19928. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bwf_peer_info */
  19929. A_UINT32 tlv_header;
  19930. wmi_mac_addr peer_macaddr;
  19931. A_UINT32 bwf_guaranteed_bandwidth; /* BWF guaranteed_bandwidth for the peers in mbps */
  19932. A_UINT32 bwf_max_airtime; /* BWF Maximum airtime percentage that can be allocated to the peer to meet the guaranteed_bandwidth */
  19933. A_UINT32 bwf_peer_priority; /* BWF priority of the peer to allocate the tokens dynamically */
  19934. A_UINT32 vdev_id;
  19935. A_UINT32 pdev_id;
  19936. } wmi_bwf_peer_info;
  19937. /* Structure for Bandwidth Fairness peer request */
  19938. typedef struct {
  19939. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param */
  19940. A_UINT32 num_peers;
  19941. /*
  19942. * Following this structure is the TLV:
  19943. * struct wmi_bwf_peer_info peer_info[num_peers];
  19944. */
  19945. } wmi_peer_bwf_request_fixed_param;
  19946. /* Equal distribution of ATF air time within an VDEV. */
  19947. typedef struct {
  19948. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param */
  19949. A_UINT32 vdev_id;
  19950. A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
  19951. A_UINT32 pdev_id;
  19952. } wmi_vdev_atf_request_fixed_param;
  19953. typedef struct {
  19954. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param */
  19955. /** pdev_id for identifying the MAC
  19956. * See macros starting with WMI_PDEV_ID_ for values.
  19957. */
  19958. A_UINT32 pdev_id;
  19959. /** parameter */
  19960. A_UINT32 param;
  19961. } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
  19962. typedef struct {
  19963. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param */
  19964. /** pdev_id for identifying the MAC
  19965. * See macros starting with WMI_PDEV_ID_ for values.
  19966. */
  19967. A_UINT32 pdev_id;
  19968. /** parameter */
  19969. A_UINT32 param;
  19970. } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
  19971. typedef struct {
  19972. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param */
  19973. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  19974. A_UINT32 qb_enable;
  19975. wmi_mac_addr peer_macaddr;
  19976. } WMI_QBOOST_CFG_CMD_fixed_param;
  19977. #define WMI_INST_STATS_INVALID_RSSI 0
  19978. typedef struct {
  19979. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */
  19980. A_UINT32 iRSSI; /* dB above the noise floor */
  19981. /* peer MAC address */
  19982. wmi_mac_addr peer_macaddr;
  19983. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  19984. } wmi_inst_rssi_stats_resp_fixed_param;
  19985. typedef struct {
  19986. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info */
  19987. A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
  19988. } wmi_peer_cck_ofdm_rate_info;
  19989. typedef struct {
  19990. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info */
  19991. A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
  19992. A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
  19993. A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
  19994. } wmi_peer_mcs_rate_info;
  19995. typedef struct {
  19996. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param */
  19997. wmi_mac_addr peer_macaddr;
  19998. A_UINT32 ratecount; /* Max Rate count for each mode */
  19999. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  20000. A_UINT32 pdev_id; /* ID of the pdev this peer belongs to */
  20001. /*
  20002. * Following this structure are the TLV:
  20003. * struct wmi_peer_cck_ofdm_rate_info;
  20004. * struct wmi_peer_mcs_rate_info;
  20005. */
  20006. } wmi_peer_ratecode_list_event_fixed_param;
  20007. typedef struct wmi_wds_addr_event {
  20008. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param */
  20009. A_UINT32 event_type[4];
  20010. wmi_mac_addr peer_mac;
  20011. wmi_mac_addr dest_mac;
  20012. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  20013. } wmi_wds_addr_event_fixed_param;
  20014. typedef struct {
  20015. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param */
  20016. wmi_mac_addr peer_macaddr;
  20017. A_UINT32 peer_ps_state;
  20018. } wmi_peer_sta_ps_statechange_event_fixed_param;
  20019. /* WMI_PDEV_FIPS_EVENTID */
  20020. typedef struct {
  20021. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  20022. union {
  20023. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  20024. /** pdev_id for identifying the MAC
  20025. * See macros starting with WMI_PDEV_ID_ for values.
  20026. */
  20027. A_UINT32 pdev_id;
  20028. };
  20029. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  20030. A_UINT32 data_len; /* Data length */
  20031. /*
  20032. * Following this structure is the TLV:
  20033. * A_UINT32 data[1]; <-- Out Data (keep this in the end)
  20034. */
  20035. } wmi_pdev_fips_event_fixed_param;
  20036. typedef struct {
  20037. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param */
  20038. union {
  20039. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  20040. /** pdev_id for identifying the MAC
  20041. * See macros starting with WMI_PDEV_ID_ for values.
  20042. */
  20043. A_UINT32 pdev_id;
  20044. };
  20045. /* Noise threshold iterations with high values */
  20046. A_UINT32 noise_floor_report_iter;
  20047. /* Total noise threshold iterations */
  20048. A_UINT32 noise_floor_total_iter;
  20049. } wmi_pdev_channel_hopping_event_fixed_param;
  20050. enum {
  20051. WMI_PDEV_RESERVE_AST_ENTRY_OK,
  20052. WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
  20053. WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
  20054. };
  20055. typedef struct {
  20056. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param */
  20057. union {
  20058. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  20059. /** pdev_id for identifying the MAC
  20060. * See macros starting with WMI_PDEV_ID_ for values.
  20061. */
  20062. A_UINT32 pdev_id;
  20063. };
  20064. A_UINT32 rate_flags;
  20065. /**
  20066. * FLAG_ONE_CHAIN 0x00000001 - one chain mask
  20067. * FLAG_TWO_CHAIN 0x00000003 - two chain mask
  20068. * FLAG_THREE_CHAIN 0x00000007 - three chain mask
  20069. * FLAG_FOUR_CHAIN 0x0000000F - four chain mask
  20070. * FLAG_FIVE_CHAIN 0x0000001F - five chain mask
  20071. * FLAG_SIX_CHAIN 0x0000003F - six chain mask
  20072. * FLAG_SEVEN_CHAIN 0x0000007F - seven chain mask
  20073. * FLAG_EIGHT_CHAIN 0x000000FF - eight chain mask
  20074. * FLAG_STBC 0x00000100 - STBC is set
  20075. * FLAG_40MHZ 0x00000200 - bits 9-10 used for BW:
  20076. * FLAG_80MHZ 0x00000400 (bw >> 9) & 3 will give
  20077. * FLAG_160MHZ 0x00000600 1 -> 40 MHz, 2 -> 80 MHz, 3 -> 160 MHz
  20078. * FLAG_TXBF 0x00000800 - Tx Bf enabled
  20079. * FLAG_RTSENA 0x00001000 - RTS enabled
  20080. * FLAG_CTSENA 0x00002000 - CTS enabled
  20081. * FLAG_LDPC 0x00004000 - LDPC set
  20082. * FLAG_SGI 0x00008000 - Short gaurd interval
  20083. * (0x00010000-0x00080000 unused)
  20084. *------------------
  20085. * 0x00100000-0x00700000 used for SU/MU/OFDMA tx mode
  20086. * FLAG_SU 0x00100000 - SU Data
  20087. * FLAG_DL_MU_MIMO_AC 0x00200000 - DL AC MU data
  20088. * FLAG_DL_MU_MIMO_AX 0x00300000 - DL AX MU data
  20089. * FLAG_DL_OFDMA 0x00400000 - DL OFDMA data
  20090. * FLAG_UL_OFDMA 0x00500000 - UL OFDMA data
  20091. * FLAG_UL_MU_MIMO 0x00600000 - UL MU data
  20092. *------------------
  20093. * */
  20094. A_UINT32 nss;
  20095. /**
  20096. * NSS 0x0 - 0x7
  20097. * */
  20098. A_UINT32 preamble;
  20099. /**
  20100. * PREAM_OFDM - 0x0
  20101. * PREAM_CCK - 0x1
  20102. * PREAM_HT - 0x2
  20103. * PREAM_VHT - 0x3
  20104. * PREAM_HE - 0x4
  20105. * */
  20106. A_UINT32 hw_rate;
  20107. /**
  20108. * *** HW_OFDM_RATE ***
  20109. * OFDM_48_MBPS - 0x0
  20110. * OFDM_24_MBPS - 0x1
  20111. * OFDM_12_MBPS - 0x2
  20112. * OFDM_6_MBPS - 0x3
  20113. * OFDM_54_MBPS - 0x4
  20114. * OFDM_36_MBPS - 0x5
  20115. * OFDM_18_MBPS - 0x6
  20116. * OFDM_9_MBPS - 0x7
  20117. *
  20118. * *** HW_CCK_RATE ***
  20119. * CCK_11_LONG_MBPS - 0x0
  20120. * CCK_5_5_LONG_MBPS - 0x1
  20121. * CCK_2_LONG_MBPS - 0x2
  20122. * CCK_1_LONG_MBPS - 0x3
  20123. * CCK_11_SHORT_MBPS - 0x4
  20124. * CCK_5_5_SHORT_MBPS - 0x5
  20125. * CCK_2_SHORT_MBPS - 0x6
  20126. *
  20127. * *** HW_HT / VHT_RATE ***
  20128. * MCS 0x0 - 0xb
  20129. * */
  20130. } wmi_pdev_get_tpc_cmd_fixed_param;
  20131. typedef struct {
  20132. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
  20133. /** pdev_id for identifying the MAC
  20134. * See macros starting with WMI_PDEV_ID_ for values.
  20135. */
  20136. A_UINT32 pdev_id;
  20137. } wmi_pdev_get_chip_power_stats_cmd_fixed_param;
  20138. typedef struct {
  20139. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_bcn_recv_stats_cmd_fixed_param */
  20140. /** VDEV identifier */
  20141. A_UINT32 vdev_id;
  20142. } wmi_vdev_get_bcn_recv_stats_cmd_fixed_param;
  20143. /*
  20144. * wmi mws-coex command IDs
  20145. */
  20146. typedef enum {
  20147. WMI_MWS_COEX_STATE = 0x01,
  20148. WMI_MWS_COEX_DPWB_STATE,
  20149. WMI_MWS_COEX_TDM_STATE,
  20150. WMI_MWS_COEX_IDRX_STATE,
  20151. WMI_MWS_COEX_ANTENNA_SHARING_STATE,
  20152. } wmi_mws_coex_cmd_id;
  20153. typedef struct {
  20154. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_cmd_fixed_param */
  20155. /** VDEV identifier */
  20156. A_UINT32 vdev_id;
  20157. /** Command ID (type: wmi_mws_coex_cmd_id) */
  20158. A_UINT32 cmd_id;
  20159. } wmi_vdev_get_mws_coex_info_cmd_fixed_param;
  20160. typedef struct {
  20161. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
  20162. /** pdev_id for identifying the MAC
  20163. * See macros starting with WMI_PDEV_ID_ for values.
  20164. */
  20165. A_UINT32 pdev_id;
  20166. /*
  20167. * Following this structure is the TLV:
  20168. * A_UINT32 tpc[2];
  20169. * tpc[0] - maximum power per rate
  20170. * tpc[1] - minimum power per rate
  20171. * Currently this event only provides max and min power limits
  20172. * for a single rate. In the future this event may be expanded
  20173. * to provide the information for multiple rates.
  20174. * At that time, the format of the data will be provided.
  20175. */
  20176. } wmi_pdev_tpc_event_fixed_param;
  20177. typedef struct {
  20178. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param */
  20179. union {
  20180. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  20181. /** pdev_id for identifying the MAC
  20182. * See macros starting with WMI_PDEV_ID_ for values.
  20183. */
  20184. A_UINT32 pdev_id;
  20185. };
  20186. A_UINT32 nfdBr_len;
  20187. A_UINT32 nfdBm_len;
  20188. A_UINT32 freqNum_len;
  20189. /*
  20190. * Following this structure is the TLV:
  20191. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
  20192. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
  20193. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
  20194. */
  20195. } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
  20196. typedef struct {
  20197. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr */
  20198. A_UINT32 nfdBr;
  20199. } wmi_pdev_nfcal_power_all_channels_nfdBr;
  20200. typedef struct {
  20201. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm */
  20202. A_UINT32 nfdBm;
  20203. } wmi_pdev_nfcal_power_all_channels_nfdBm;
  20204. typedef struct {
  20205. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum */
  20206. A_UINT32 freqNum;
  20207. } wmi_pdev_nfcal_power_all_channels_freqNum;
  20208. typedef struct {
  20209. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param */
  20210. A_UINT32 cck_level;
  20211. } wmi_ani_cck_event_fixed_param;
  20212. typedef enum wmi_power_debug_reg_fmt_type {
  20213. /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
  20214. * SOC_SYSTEM_SLEEP
  20215. * WLAN_SYSTEM_SLEEP
  20216. * RTC_SYNC_FORCE_WAKE
  20217. * MAC_DMA_ISR
  20218. * MAC_DMA_TXRX_ISR
  20219. * MAC_DMA_ISR_S1
  20220. * MAC_DMA_ISR_S2
  20221. * MAC_DMA_ISR_S3
  20222. * MAC_DMA_ISR_S4
  20223. * MAC_DMA_ISR_S5
  20224. * MAC_DMA_ISR_S6
  20225. * MAC_DMA_ISR_S7
  20226. */
  20227. WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
  20228. WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
  20229. } WMI_POWER_DEBUG_REG_FMT_TYPE;
  20230. typedef struct {
  20231. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
  20232. A_UINT32 cumulative_sleep_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  20233. A_UINT32 cumulative_total_on_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  20234. A_UINT32 deep_sleep_enter_counter; /* count of number of times chip enterred deep sleep */
  20235. A_UINT32 last_deep_sleep_enter_tstamp_ms; /* Last Timestamp when Chip went to deep sleep */
  20236. A_UINT32 debug_register_fmt; /* WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers being dumped as part of the event */
  20237. A_UINT32 num_debug_register; /* number of debug registers being sent to host */
  20238. /*
  20239. * Following this structure is the TLV:
  20240. * A_UINT32 debug_registers[num_debug_registers];
  20241. */
  20242. } wmi_pdev_chip_power_stats_event_fixed_param;
  20243. typedef struct {
  20244. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_bcn_recv_stats_fixed_param */
  20245. A_UINT32 vdev_id;
  20246. /* total_bcn_cnt
  20247. * total beacon count (tbtt instances)
  20248. * After this value reaches 255 it saturates and stays at 255.
  20249. * This field is used to determine which of the 256 bits in the
  20250. * bmiss_bitmap field are valid.
  20251. */
  20252. A_UINT32 total_bcn_cnt;
  20253. /* total_bmiss_cnt
  20254. * Total beacon miss count in last 255 beacons, max value is 255.
  20255. * This value is the number of bits set within bmiss_bitmap.
  20256. */
  20257. A_UINT32 total_bmiss_cnt;
  20258. /* bmiss_bitmap
  20259. * This bitmap indicates the status of the last 255 beacons.
  20260. * If a bit is set, that means the corresponding beacon was missed.
  20261. * Bit 0 of bmiss_bitmap[0] represents the most recent beacon.
  20262. * The total_bcn_cnt field indicates how many bits within bmiss_bitmap
  20263. * are valid.
  20264. */
  20265. A_UINT32 bmiss_bitmap[8];
  20266. } wmi_vdev_bcn_recv_stats_fixed_param;
  20267. typedef struct {
  20268. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param */
  20269. A_UINT32 vdev_id;
  20270. /* LTE-WLAN coexistence scheme bitmap
  20271. * Indicates the final schemes applied for the currrent Coex scenario.
  20272. * Bit 0 - TDM policy
  20273. * Bit 1 - Forced TDM policy
  20274. * Bit 2 - Dynamic Power Back-off policy
  20275. * Bit 3 - Channel Avoidance policy
  20276. * Bit 4 - Static Power Back-off policy
  20277. */
  20278. A_UINT32 coex_scheme_bitmap;
  20279. /* Active conflict count
  20280. * Indicates the number of Active conflicts for the current WLAN and LTE frequency combinations.
  20281. */
  20282. A_UINT32 active_conflict_count;
  20283. /* Potential conflict count
  20284. * Indicates the number of Potential conflicts for the current WLAN and LTE frequency combinations.
  20285. */
  20286. A_UINT32 potential_conflict_count;
  20287. /* Bitmap of the group-0 WLAN channels to be avoided during LTE-WLAN coex operation.
  20288. * Indicates the WLAN channels to be avoided in b/w WLAN CH-1 and WLAN CH-14.
  20289. */
  20290. A_UINT32 chavd_group0_bitmap;
  20291. /* Bitmap of the group-1 WLAN channels to be avoided during LTE-WLAN coex operation.
  20292. * Indicates the WLAN channels to be avoided in b/w WLAN CH-36 and WLAN CH-64.
  20293. */
  20294. A_UINT32 chavd_group1_bitmap;
  20295. /* Bitmap of the group-2 WLAN channels to be avoided during LTE-WLAN coex operation.
  20296. * Indicates the WLAN channels to be avoided in b/w WLAN CH-100 and WLAN CH-140.
  20297. */
  20298. A_UINT32 chavd_group2_bitmap;
  20299. /* Bitmap of the group-3 WLAN channels to be avoided during LTE-WLAN coex operation.
  20300. * Indicates the WLAN channels to be avoided in b/w WLAN CH-149 and WLAN CH-165.
  20301. */
  20302. A_UINT32 chavd_group3_bitmap;
  20303. } wmi_vdev_get_mws_coex_state_fixed_param;
  20304. typedef struct {
  20305. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param */
  20306. A_UINT32 vdev_id;
  20307. /* Current state of the Dynamic Power Back-off state machine
  20308. * MWSCOEX_PWB_UNINIT_STATE = 0, PWB state machine is in un-intialized state.
  20309. * MWSCOEX_PWB_WLAN_ON_SINR_START_STATE = 1, SINR measurement starts when WLAN is on
  20310. * MWSCOEX_PWB_WLAN_ON_WAIT_RESP_STATE = 2, Waiting for SINR response when WLAN is on
  20311. * MWSCOEX_PWB_WLAN_OFF_AWAIT_STATE = 3, WLAN off state for buffer between SINR on/off measurement.
  20312. * MWSCOEX_PWB_WLAN_OFF_SINR_START_STATE = 4, SINR measurement starts when WLAN is off
  20313. * MWSCOEX_PWB_WLAN_OFF_WAIT_RESP_STATE = 5, Waiting for SINR response when WLAN is off
  20314. * MWSCOEX_PWB_WLAN_OFF_SINR_STOP_STATE = 6, SINR measurement stops when WLAN is off
  20315. * MWSCOEX_PWB_FORCED_TDM_STATE = 7, Entered Forced TDM state.
  20316. * MWSCOEX_PWB_HALTED_STATE = 8, Power back-off algorithm halted.
  20317. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_START_STATE = 9, SINR measurement starts in WLAN always on state.
  20318. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_STOP_STATE = 10, SINR measurement stops in WLAN always on state.
  20319. */
  20320. A_UINT32 current_dpwb_state;
  20321. /* P(N+1) value in dBm i.e. Tx power to be applied in the next Dynamic Power Back-off cycle,
  20322. * where P(N) is the power applied during current cycle.
  20323. * ranges from 3dBm to 21 dBM
  20324. */
  20325. A_INT32 pnp1_value;
  20326. /* Indicates the duty cycle of current LTE frame.
  20327. * Duty cycle: Number of UL slots with uplink data and allocated RBs.
  20328. */
  20329. A_UINT32 lte_dutycycle;
  20330. /* LTE SINR value in dB, when WLAN is ON. */
  20331. A_INT32 sinr_wlan_on;
  20332. /* LTE SINR value in dB, when WLAN is OFF. */
  20333. A_INT32 sinr_wlan_off;
  20334. /* LTE blocks with error for the current bler report.
  20335. * Number of LTE blocks with error for a given number (block_count) of LTE blocks.
  20336. */
  20337. A_UINT32 bler_count;
  20338. /* Number of LTE blocks considered for bler count report.
  20339. * Bler repot will be generated after the reception of every "block_count" number of blocks.
  20340. */
  20341. A_UINT32 block_count;
  20342. /* WLAN RSSI level
  20343. * WLAN RSSI is devided in to 3 levels i.e. Good/Moderate/Low (configurable inside f/w)
  20344. * 0-Good, 1-Moderate, 2-Low
  20345. */
  20346. A_UINT32 wlan_rssi_level;
  20347. /* WLAN RSSI value in dBm considered in Dynamic Power back-off algorithm
  20348. * Dynamic power back-off algorithm considers either Rx data frame RSSI/Beacon RSSI based on some constraints.
  20349. */
  20350. A_INT32 wlan_rssi;
  20351. /* Indicates whether any TDM policy triggered from Dynamic power back-off policy.
  20352. * 1 - TDM triggered.
  20353. * 0 - TDM not triggered.
  20354. */
  20355. A_UINT32 is_tdm_running;
  20356. } wmi_vdev_get_mws_coex_dpwb_state_fixed_param;
  20357. typedef struct {
  20358. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param */
  20359. A_UINT32 vdev_id;
  20360. /* Time Division Multiplexing (TDM) LTE-Coex Policy type.
  20361. * There are totally 4 types of TDM policies(1-SINR TDM, 2-RSSI TDM, 3-LOW RX RATE TDM, 4-STICKY TDM)
  20362. * Bit 0 - SINR TDM policy.
  20363. * Bit 1 - RSSI TDM policy.
  20364. * Bit 2 - Low Rx rate TDM policy
  20365. * Bit 3 - Sticky TDM policy
  20366. */
  20367. A_UINT32 tdm_policy_bitmap;
  20368. /* TDM LTE/WLAN sub-frame bitmap
  20369. * Indicates the bitmap of LTE/WLAN sub-frames.
  20370. * value 0: WLAN slot.
  20371. * value 1: LTE slot.
  20372. */
  20373. A_UINT32 tdm_sf_bitmap;
  20374. } wmi_vdev_get_mws_coex_tdm_state_fixed_param;
  20375. typedef struct {
  20376. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param */
  20377. A_UINT32 vdev_id;
  20378. /* SUB0 LTE-coex tech.
  20379. *------------------------
  20380. * TECH TECH_ID
  20381. *------------------------
  20382. * LTE 0
  20383. * TDSCDMA 1
  20384. * GSM1 2
  20385. * ONEX 3
  20386. * HDR 4
  20387. * WCDMA 5
  20388. * GSM2 6
  20389. * GSM3 7
  20390. * WCDMA2 8
  20391. * LTE2 9
  20392. * Indicates the type of WWAN technology used as SUB0 i.e. SIM slot 1
  20393. */
  20394. A_UINT32 sub0_techid;
  20395. /* SUB0 mitigation policy.
  20396. * Indicates the mitigation policy used to coexist with WLAN.
  20397. * 1 - Tx blanking
  20398. * 2 - Static power back-off
  20399. */
  20400. A_UINT32 sub0_policy;
  20401. /* Set if SUB0 is in link critical state.
  20402. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  20403. */
  20404. A_UINT32 sub0_is_link_critical;
  20405. /* LTE SUB0 imposed static power applied to WLAN due to LTE-WLAN coex.
  20406. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  20407. */
  20408. A_INT32 sub0_static_power;
  20409. /* LTE SUB0 RSSI value in dBm */
  20410. A_INT32 sub0_rssi;
  20411. /* SUB1 LTE-coex tech.
  20412. *------------------------
  20413. * TECH TECH_ID
  20414. *------------------------
  20415. * LTE 0
  20416. * TDSCDMA 1
  20417. * GSM1 2
  20418. * ONEX 3
  20419. * HDR 4
  20420. * WCDMA 5
  20421. * GSM2 6
  20422. * GSM3 7
  20423. * WCDMA2 8
  20424. * LTE2 9
  20425. * Indicates the type of WWAN technology used as SUB1 i.e. SIM slot 2
  20426. */
  20427. A_UINT32 sub1_techid;
  20428. /* SUB1 mitigation policy.
  20429. * Indicates the mitigation policy used to coexist with WLAN.
  20430. * 1 - Tx blanking
  20431. * 2 - Static power back-off
  20432. */
  20433. A_UINT32 sub1_policy;
  20434. /* Set if SUB1 is in link critical state.
  20435. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  20436. */
  20437. A_UINT32 sub1_is_link_critical;
  20438. /* LTE SUB1 imposed static power applied to WLAN due to LTE-WLAN coex.
  20439. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  20440. */
  20441. A_INT32 sub1_static_power;
  20442. /* LTE SUB1 RSSI value in dBm */
  20443. A_INT32 sub1_rssi;
  20444. } wmi_vdev_get_mws_coex_idrx_state_fixed_param;
  20445. typedef struct {
  20446. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param */
  20447. A_UINT32 vdev_id;
  20448. /* BDF values of Coex flags.
  20449. * coexflag 0x1 = MWS Coex enabled
  20450. * coexflag 0x3 = MWS Coex enabled + Antenna sharing enabled for WLAN operating in 2.4GHz band.
  20451. */
  20452. A_UINT32 coex_flags;
  20453. /* BDF values of Coex Antenna sharing config
  20454. * coex_config 0x0 = no Antenna sharing
  20455. * coexconfig 0x1 = switched based Antenna sharing
  20456. * coexconfig 0x2 = splitter based Antenna sharing
  20457. */
  20458. A_UINT32 coex_config;
  20459. /* Tx Chain mask value
  20460. * Bit 0: Tx chain-0
  20461. * Bit 1: Tx Chain-1
  20462. * value: 0x1 - Operating in 1X1
  20463. * value: 0x3 - Operating in 2X2
  20464. */
  20465. A_UINT32 tx_chain_mask;
  20466. /* Rx Chain mask value
  20467. * Bit 0: Rx chain-0
  20468. * Bit 1: Rx Chain-1
  20469. * value: 0x1 - Operating in 1X1
  20470. * value: 0x3 - Operating in 2X2
  20471. */
  20472. A_UINT32 rx_chain_mask;
  20473. /* Currently active Rx Spatial streams
  20474. * Bit 0: Rx Spatial Stream-0
  20475. * Bit 1: Rx Spatial Stream-1
  20476. */
  20477. A_UINT32 rx_nss;
  20478. /* Forced MRC policy type
  20479. * BTC_FORCED (0x01)
  20480. * RSSI_FORCED (0x02)
  20481. * MODEM_ACQ_FORCED (0x04)
  20482. */
  20483. A_UINT32 force_mrc;
  20484. /* RSSI value considered for MRC
  20485. * 1: Data RSSI
  20486. * 2: Beacon RSSI
  20487. */
  20488. A_UINT32 rssi_type;
  20489. /* RSSI value measured at Chain-0 in dBm */
  20490. A_INT32 chain0_rssi;
  20491. /* RSSI value measured at Chain-1 in dBm */
  20492. A_INT32 chain1_rssi;
  20493. /* RSSI value of two chains combined in dBm */
  20494. A_INT32 combined_rssi;
  20495. /* Absolute imbalance between two Rx chains in dB */
  20496. A_UINT32 imbalance;
  20497. /* RSSI threshold defined for the above imbalance value in dBm.
  20498. * Based on the degree of imbalance between the rx chains, different
  20499. * RSSI thresholds are used to determine whether MRC (Maximum-Ratio
  20500. * Combining) use of multiple rx chains is suitable.
  20501. * This field shows the RSSI threshold below which MRC is used.
  20502. */
  20503. A_INT32 mrc_threshold;
  20504. /* Antenna grant duration to WLAN, in milliseconds */
  20505. A_UINT32 grant_duration;
  20506. } wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param;
  20507. typedef enum wmi_chip_power_save_failure_reason_code_type {
  20508. WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON,
  20509. WMI_HW_POWER_SAVE_FAILURE_REASON,
  20510. WMI_CSS_LOCKED_POWER_FAILURE_REASON,
  20511. WMI_MAC0_LOCKED_POWER_FAILURE_REASON,
  20512. WMI_MAC1_LOCKED_POWER_FAILURE_REASON,
  20513. WMI_POWER_SAVE_FAILURE_REASON_MAX = 0xf,
  20514. } WMI_POWER_SAVE_FAILURE_REASON_TYPE;
  20515. typedef struct {
  20516. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_save_failure_detected_fixed_param */
  20517. A_UINT32 power_save_failure_reason_code; /* Chip power save failuire reason as defined in WMI_POWER_SAVE_FAILURE_REASON_TYPE */
  20518. A_UINT32 protocol_wake_lock_bitmap[4]; /* bitmap with bits set for modules (from WLAN_MODULE_ID enum) voting against sleep for prolonged duration */
  20519. } wmi_chip_power_save_failure_detected_fixed_param;
  20520. typedef struct {
  20521. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param */
  20522. A_UINT32 ofdm_level;
  20523. } wmi_ani_ofdm_event_fixed_param;
  20524. /* When a bit is set it specifies the particular WLAN traffic type is high priority.
  20525. * BT low priority traffic has higher priority than WLAN low priority traffic and has
  20526. * lower priority when compared to WLAN high priority traffic.
  20527. * BT high priority traffic has higher priority than WLAN low/high priority traffic.
  20528. */
  20529. #define WMI_PDEV_BE_PRIORITY_BIT (1<<0)
  20530. #define WMI_PDEV_BK_PRIORITY_BIT (1<<1)
  20531. #define WMI_PDEV_VI_PRIORITY_BIT (1<<2)
  20532. #define WMI_PDEV_VO_PRIORITY_BIT (1<<3)
  20533. #define WMI_PDEV_BEACON_PRIORITY_BIT (1<<4)
  20534. #define WMI_PDEV_MGMT_PRIORITY_BIT (1<<5)
  20535. #define WMI_PDEV_IS_BE_PRIORITY_SET(val) ((val) & WMI_PDEV_BE_PRIORITY_BIT)
  20536. #define WMI_PDEV_IS_BK_PRIORITY_SET(val) ((val) & WMI_PDEV_BK_PRIORITY_BIT)
  20537. #define WMI_PDEV_IS_VI_PRIORITY_SET(val) ((val) & WMI_PDEV_VI_PRIORITY_BIT)
  20538. #define WMI_PDEV_IS_VO_PRIORITY_SET(val) ((val) & WMI_PDEV_VO_PRIORITY_BIT)
  20539. #define WMI_PDEV_IS_BEACON_PRIORITY_SET(val) ((val) & WMI_PDEV_BEACON_PRIORITY_BIT)
  20540. #define WMI_PDEV_IS_MGMT_PRIORITY_SET(val) ((val) & WMI_PDEV_MGMT_PRIORITY_BIT)
  20541. typedef enum wmi_coex_algo_type {
  20542. WMI_COEX_ALGO_UNCONS_FREERUN = 0,
  20543. WMI_COEX_ALGO_FREERUN = 1,
  20544. WMI_COEX_ALGO_OCS = 2,
  20545. } WMI_COEX_ALGO_TYPE;
  20546. typedef enum wmi_coex_config_type {
  20547. WMI_COEX_CONFIG_PAGE_P2P_TDM = 1, /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
  20548. WMI_COEX_CONFIG_PAGE_STA_TDM = 2, /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
  20549. WMI_COEX_CONFIG_PAGE_SAP_TDM = 3, /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
  20550. WMI_COEX_CONFIG_DURING_WLAN_CONN = 4, /* config during WLAN connection */
  20551. WMI_COEX_CONFIG_BTC_ENABLE = 5, /* config to enable/disable BTC */
  20552. WMI_COEX_CONFIG_COEX_DBG = 6, /* config of COEX debug setting */
  20553. WMI_COEX_CONFIG_PAGE_P2P_STA_TDM = 7, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + PAGE */
  20554. WMI_COEX_CONFIG_INQUIRY_P2P_TDM = 8, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + INQUIRY */
  20555. WMI_COEX_CONFIG_INQUIRY_STA_TDM = 9, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + INQUIRY */
  20556. WMI_COEX_CONFIG_INQUIRY_SAP_TDM = 10, /* config interval (ms units) (arg1 BT, arg2 WLAN) for SAP + INQUIRY */
  20557. WMI_COEX_CONFIG_INQUIRY_P2P_STA_TDM = 11, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + INQUIRY */
  20558. WMI_COEX_CONFIG_TX_POWER = 12, /* config wlan total tx power when bt coex (arg1 is wlan_tx_power_limit, in 0.5dbm units) */
  20559. WMI_COEX_CONFIG_PTA_CONFIG = 13, /* config whether enable PTA and GPIO number (arg1 is pta_enable, arg2 is GPIO number used as /BT_ACTIVE/BT_PRIORITY/WLAN_DENY,8 bit for each) */
  20560. WMI_COEX_CONFIG_AP_TDM = 14, /* config interval (arg1 duty cycle in ms, arg2 WLAN duration in ms) for AP */
  20561. WMI_COEX_CONFIG_WLAN_SCAN_PRIORITY = 15, /* config to set WLAN priority during Off Channel Scan */
  20562. WMI_COEX_CONFIG_WLAN_PKT_PRIORITY = 16, /* config to set WLAN priority for BE/BK/VO/VI/Beacon/Management frame */
  20563. WMI_COEX_CONFIG_PTA_INTERFACE = 17, /* config PTA interface,
  20564. arg1 PTA num,
  20565. arg2 mode (2-wire/3-wire/PTA),
  20566. arg3 first slot time in microsec,
  20567. arg4 BT priority time in microsec,
  20568. arg5 PTA algorithm (WMI_COEX_ALGO_TYPE),
  20569. arg6 PTA priority */
  20570. WMI_COEX_CONFIG_BTC_DUTYCYCLE = 18, /* config interval (ms units) (arg1 WLAN pause duration, arg2 WLAN unpause duration) for WLAN UL + BT Rx */
  20571. WMI_COEX_CONFIG_HANDOVER_RSSI = 19, /* config to set WLAN RSSI (dBm units) at which device switches from Hybrid to TDD coex mode */
  20572. WMI_COEX_CONFIG_PTA_BT_INFO = 20, /* get BT information,
  20573. arg1 BT info type: WMI_COEX_PTA_BT_INFO_TYPE_T, scan/advertise/connection info,
  20574. arg2-arg5: BT information parameters */
  20575. WMI_COEX_CONFIG_SINK_WLAN_TDM = 21, /* config interval (ms units) (arg1 BT, arg2 WLAN) for A2DP SINK + WLAN */
  20576. WMI_COEX_CONFIG_COEX_ENABLE_MCC_TDM = 22, /* config disable/enable COEX TDM for MCC */
  20577. WMI_COEX_CONFIG_LOWRSSI_A2DPOPP_TDM = 23, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + A2dp + OPP + LOWRSSI */
  20578. WMI_COEX_CONFIG_BTC_MODE = 24, /* config BTC mode, arg1 mode: 0 TDD/1 FDD/2 Hybrid*/
  20579. WMI_COEX_CONFIG_ANTENNA_ISOLATION = 25, /* config isolation between BT and WLAN chains
  20580. * The arguments are interpreted differently
  20581. * depending on whether the target suppports
  20582. * WMI_SERVICE_COEX_SUPPORT_UNEQUAL_ISOLATION
  20583. * If (not COEX_SUPPORT_UNEQUAL_ISOLATION) or arg2 == 0:
  20584. * arg1 => isolation between BT and WLAN chains,
  20585. * dB units,
  20586. * same isolation for all chains
  20587. * Else:
  20588. * arg1 bits 7:0 - chain 0 isolation, in dB
  20589. * arg1 bits 15:8 - chain 1 isolation, in dB
  20590. * arg1 bits 23:16 - chain 2 isolation, in dB
  20591. * arg1 bits 31:24 - chain 3 isolation, in dB
  20592. * arg2 - 0 => Equal isolation b/w BT and each WLAN chain (default)
  20593. * 1 => Different isolation b/w BT and each WLAN chain
  20594. */
  20595. WMI_COEX_CONFIG_BT_LOW_RSSI_THRESHOLD = 26,/*config BT low rssi threshold (dbm units)*/
  20596. WMI_COEX_CONFIG_BT_INTERFERENCE_LEVEL = 27,/*config bt interference level (dbm units)
  20597. arg1 low - lower limit
  20598. arg2 low - upper limit
  20599. arg3 medium - lower limit
  20600. arg4 medium - upper limit
  20601. arg5 high - lower limit
  20602. arg6 high - upper limit */
  20603. WMI_COEX_CONFIG_WLAN_OVER_ZBLOW = 28, /* config to boost WiFi traffic over 15.4 Low prio traffic */
  20604. WMI_COEX_CONFIG_WLAN_MGMT_OVER_BT_A2DP = 29, /* config to raise WLAN priority higher than BT in coex scenario of SAP + BT or 15.4 */
  20605. WMI_COEX_CONFIG_WLAN_CONN_OVER_LE = 30, /* config to elevate Wifi priority over BLE during WLAN association */
  20606. WMI_COEX_CONFIG_LE_OVER_WLAN_TRAFFIC = 31, /* config to elevate BLE traffic over WiFi traffic */
  20607. WMI_COEX_CONFIG_THREE_WAY_COEX_RESET = 32, /* config to reset the weights to default */
  20608. /* WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA
  20609. * config to T_PRIO T_DELAY parameter for each case
  20610. * arg1 - wlan/bt state
  20611. * 0: beacon tx
  20612. * 1: wlan connecting
  20613. * 2: wlan in dhcp
  20614. * 3: a2dp critical
  20615. * 4: eSCO
  20616. * arg2 - t_prio for low priority traffic (microsecond units)
  20617. * arg3 - t_delay for low priority traffic (microsecond units)
  20618. * arg4 - t_prio for high priority traffic (microsecond units)
  20619. * arg5 - t_delay for high priority traffic (microsecond units)
  20620. */
  20621. WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA = 33,
  20622. /* WMI_COEX_CONFIG_THREE_WAY_COEX_START
  20623. * config to set coex parameters from WLAN host to adjust priorities
  20624. * among wlan/bt/zb
  20625. * arg1 - priority level 1, the serialized coex scenorio ID will be put here
  20626. * arg2 - priority level 2, same parameters rules as arg1
  20627. * arg3 - priority level 3, same parameters rules as arg1
  20628. * arg4 - priority level 4, same parameters rules as arg1
  20629. */
  20630. WMI_COEX_CONFIG_THREE_WAY_COEX_START = 34,
  20631. /* WMI_COEX_CONFIG_MPTA_HELPER_ENABLE
  20632. * config to enable(1)/disable(0) mpta-helper function
  20633. */
  20634. WMI_COEX_CONFIG_MPTA_HELPER_ENABLE = 35,
  20635. /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE
  20636. * config zigbee state
  20637. * arg1: zigbee state
  20638. * (idle form-network wait-join join-network network-up HMI)
  20639. */
  20640. WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE = 36,
  20641. /* WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS
  20642. * config ocs wlan/nonwlan params after MPTA interrupt fired
  20643. * arg1: wlan duration (ms units) in Shape-OCS
  20644. * arg2: nonwlan duration (ms units) in Shape-OCS
  20645. */
  20646. WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS = 37,
  20647. /* WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS
  20648. * config ocs wlan/nonwlan params during monitor period after
  20649. * interrupt period finished
  20650. * arg1: wlan duration (ms units) in Shape-OCS
  20651. * arg2: nonwlan duration (ms units) in Shape-OCS
  20652. */
  20653. WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS = 38,
  20654. /* WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION
  20655. * config ocs duration in interrupt period and monitor period
  20656. * arg1: duration (ms units) in interrupt period
  20657. * arg2: duration (ms units) in monitor period
  20658. */
  20659. WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION = 39,
  20660. /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL
  20661. * config zigbee channel 11 - 26
  20662. */
  20663. WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL = 40,
  20664. /* WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION
  20665. * config msw mute duration (ms units) after MPTA interrupt fired
  20666. */
  20667. WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION = 41,
  20668. /* WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN
  20669. * allow WLAN scan on 2.4G channel when BT SCO connectivity is alive
  20670. */
  20671. WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN = 42,
  20672. /* WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR
  20673. * config to enable(1)/disable(0) WAR of BT 2nd harmonic issue function
  20674. */
  20675. WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR = 43,
  20676. /* WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE
  20677. * config BTC separate chain mode or shared mode
  20678. */
  20679. WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE = 44,
  20680. } WMI_COEX_CONFIG_TYPE;
  20681. typedef struct {
  20682. A_UINT32 tlv_header;
  20683. A_UINT32 vdev_id;
  20684. A_UINT32 config_type; /* wmi_coex_config_type enum */
  20685. A_UINT32 config_arg1;
  20686. A_UINT32 config_arg2;
  20687. A_UINT32 config_arg3;
  20688. A_UINT32 config_arg4;
  20689. A_UINT32 config_arg5;
  20690. A_UINT32 config_arg6;
  20691. } WMI_COEX_CONFIG_CMD_fixed_param;
  20692. /**
  20693. * This command is sent from WLAN host driver to firmware to
  20694. * request firmware to enable/disable channel avoidance report
  20695. * to host.
  20696. *
  20697. */
  20698. enum {
  20699. WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
  20700. WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
  20701. };
  20702. typedef struct {
  20703. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param */
  20704. /** Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
  20705. A_UINT32 rpt_allow;
  20706. } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
  20707. /*
  20708. * Periodic channel stats WMI command structure
  20709. * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
  20710. */
  20711. typedef struct {
  20712. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param */
  20713. /** 1 = enable, 0 = disable */
  20714. A_UINT32 enable;
  20715. /** periodic stats duration (units are milliseconds) */
  20716. A_UINT32 stats_period;
  20717. /** pdev_id for identifying the MAC
  20718. * See macros starting with WMI_PDEV_ID_ for values.
  20719. */
  20720. A_UINT32 pdev_id;
  20721. } wmi_set_periodic_channel_stats_config_fixed_param;
  20722. typedef struct {
  20723. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param */
  20724. /** pdev_id for identifying the MAC
  20725. * See macros starting with WMI_PDEV_ID_ for values.
  20726. */
  20727. A_UINT32 pdev_id;
  20728. /* Identify the wlan module */
  20729. A_UINT32 module_id;
  20730. /* Num of elements in the following args[] array */
  20731. A_UINT32 num_args;
  20732. /**
  20733. * Following this structure are the TLVs:
  20734. * A_UINT32 args[];
  20735. **/
  20736. } wmi_pdev_wal_power_debug_cmd_fixed_param;
  20737. typedef struct {
  20738. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param */
  20739. /**
  20740. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  20741. * @details
  20742. * Each WMM access category (voice, video, best-effort, background)
  20743. * will have its own timeout value to dictate how long to wait for
  20744. * missing rx MPDUs to arrive before releasing subsequent MPDUs that
  20745. * have already been received.
  20746. * This parameter specifies the timeout in milliseconds for each
  20747. * access category.
  20748. * The array elements are indexed by the WMI_AC enum to identify
  20749. * which array element corresponds to which AC / traffic type.
  20750. */
  20751. A_UINT32 rx_timeout_pri[WMI_AC_MAX];
  20752. } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
  20753. /**
  20754. * wlan stats shall be understood as per period.
  20755. * Generally, it is reported periodically based on the period specified by host.
  20756. * But if the variation of one stats of compared to the
  20757. * pervious notification exceeds a threshold,
  20758. * FW will report the wlan stats immediately.
  20759. * The values of the stats becomes the new reference to compute variations.
  20760. * This threshold can be a global setting or per category.
  20761. * Host can enable/disable the mechanism for any stats per bitmap.
  20762. * TX/RX thresholds (percentage value) are shared across ACs,
  20763. * and TX/RX stats comprisons are processed per AC of each peer.
  20764. * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
  20765. * and the detailed tx_mpdus threshold value is set to 10%,
  20766. * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
  20767. * and it reaches 110 during the second period,
  20768. * FW will generate and send out a wlan stats event immediately.
  20769. */
  20770. typedef struct {
  20771. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
  20772. /** Indicate if threshold mechnism is enabled or disabled.
  20773. * It is disabled by default.
  20774. * Host can enable and disable it dynamically.
  20775. */
  20776. A_UINT32 enable_thresh;
  20777. /** use_thresh_bitmap equals 0 means gbl_thresh is used.
  20778. * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
  20779. */
  20780. A_UINT32 use_thresh_bitmap;
  20781. /** global threshold, valid when use_thresh_bitmap equals 0.
  20782. * It takes effect for all counters.
  20783. * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
  20784. */
  20785. A_UINT32 gbl_thresh;
  20786. /** Enable/disable bitmap for threshold mechanism of CCA stats */
  20787. A_UINT32 cca_thresh_enable_bitmap;
  20788. /** Enable/disable bitmap for threshold mechanism of signal stats */
  20789. A_UINT32 signal_thresh_enable_bitmap;
  20790. /** Enable/disable bitmap for threshold mechanism of TX stats */
  20791. A_UINT32 tx_thresh_enable_bitmap;
  20792. /** Enable/disable bitmap for threshold mechanism of RX stats */
  20793. A_UINT32 rx_thresh_enable_bitmap;
  20794. /* This TLV is followed by TLVs below:
  20795. * wmi_chan_cca_stats_thresh cca_thresh;
  20796. * wmi_peer_signal_stats_thresh signal_thresh;
  20797. * wmi_tx_stats_thresh tx_thresh;
  20798. * wmi_rx_stats_thresh rx_thresh;
  20799. */
  20800. } wmi_pdev_set_stats_threshold_cmd_fixed_param;
  20801. typedef enum {
  20802. WMI_REQUEST_WLAN_TX_STAT = 0x01,
  20803. WMI_REQUEST_WLAN_RX_STAT = 0x02,
  20804. WMI_REQUEST_WLAN_CCA_STAT = 0x04,
  20805. WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
  20806. } wmi_wlan_stats_id;
  20807. typedef struct {
  20808. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
  20809. wmi_wlan_stats_id stats_id;
  20810. } wmi_request_wlan_stats_cmd_fixed_param;
  20811. typedef enum {
  20812. WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01, /* request stats of one specified peer */
  20813. WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02, /* request stats of all peers belong to specified VDEV */
  20814. } wmi_peer_stats_info_request_type;
  20815. /** It is required to issue WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE
  20816. * (with a non-zero value) before issuing the first REQUEST_PEER_STATS_INFO.
  20817. */
  20818. typedef struct {
  20819. /** TLV tag and len; tag equals
  20820. * WMITLV_TAG_STRUC_wmi_request_peer_stats_info_cmd_fixed_param */
  20821. A_UINT32 tlv_header;
  20822. /** request_type to indicate if only stats of
  20823. * one peer or all peers of the VDEV are requested,
  20824. * see wmi_peer_stats_info_request_type.
  20825. */
  20826. A_UINT32 request_type;
  20827. /** VDEV identifier */
  20828. A_UINT32 vdev_id;
  20829. /** this peer_macaddr is only used if request_type == ONE_PEER_STATS_INFO */
  20830. wmi_mac_addr peer_macaddr;
  20831. /** flag to indicate if FW needs to reset requested peers stats */
  20832. A_UINT32 reset_after_request;
  20833. } wmi_request_peer_stats_info_cmd_fixed_param;
  20834. typedef enum {
  20835. WMI_REQUEST_ONE_RADIO_CHAN_STATS = 0x01, /* request stats of one specified channel */
  20836. WMI_REQUEST_ALL_RADIO_CHAN_STATS = 0x02, /* request stats of all channels */
  20837. } wmi_radio_chan_stats_request_type;
  20838. /** It is required to issue WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE
  20839. * (with a non-zero value) before issuing the first REQUEST_RADIO_CHAN_STATS.
  20840. */
  20841. typedef struct {
  20842. /** TLV tag and len; tag equals
  20843. * WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param */
  20844. A_UINT32 tlv_header;
  20845. /** request_type to indicate if only stats of
  20846. * one channel or all channels are requested,
  20847. * see wmi_radio_chan_stats_request_type.
  20848. */
  20849. A_UINT32 request_type;
  20850. /** Frequency of channel whose stats is requested,
  20851. * only used when request_type == WMI_REQUEST_ONE_RADIO_CHAN_STATS
  20852. */
  20853. A_UINT32 chan_mhz;
  20854. /** flag to indicate if FW needs to reset requested stats of specified channel/channels */
  20855. A_UINT32 reset_after_request;
  20856. } wmi_request_radio_chan_stats_cmd_fixed_param;
  20857. typedef struct {
  20858. /** TLV tag and len; tag equals
  20859. * WMITLV_TAG_STRUC_wmi_rmc_set_leader_cmd_fixed_param */
  20860. A_UINT32 tlv_header;
  20861. /* VDEV identifier */
  20862. A_UINT32 vdev_id;
  20863. /* Leader's mac address */
  20864. wmi_mac_addr leader_mac_addr;
  20865. } wmi_rmc_set_leader_cmd_fixed_param;
  20866. typedef struct {
  20867. /** TLV tag and len; tag equals
  20868. * WMITLV_TAG_STRUC_wmi_rmc_manual_leader_event_fixed_param */
  20869. A_UINT32 tlv_header;
  20870. /* VDEV identifier */
  20871. A_UINT32 vdev_id;
  20872. /* 0: success
  20873. * 1: selected leader not found in network, able to find using auto selection
  20874. * -1: error
  20875. * non zero value should be return to userspace in case of failure */
  20876. A_INT32 status;
  20877. /* bssid of new leader */
  20878. wmi_mac_addr leader_mac_addr;
  20879. } wmi_rmc_manual_leader_event_fixed_param;
  20880. typedef enum {
  20881. WLAN_2G_CAPABILITY = 0x1,
  20882. WLAN_5G_CAPABILITY = 0x2,
  20883. } WLAN_BAND_CAPABILITY;
  20884. typedef enum wmi_hw_mode_config_type {
  20885. WMI_HW_MODE_SINGLE = 0, /* Only one PHY is active. */
  20886. WMI_HW_MODE_DBS = 1, /* Both PHYs are active in different bands, one in 2G and another in 5G. */
  20887. WMI_HW_MODE_SBS_PASSIVE = 2, /* Both PHYs are in passive mode (only rx) in same band; no tx allowed. */
  20888. WMI_HW_MODE_SBS = 3, /* Both PHYs are active in the same band.
  20889. * Support for both PHYs within one band is planned for 5G only
  20890. * (as indicated in WMI_MAC_PHY_CAPABILITIES),
  20891. * but could be extended to other bands in the future.
  20892. * The separation of the band between the two PHYs needs to be communicated separately.
  20893. */
  20894. WMI_HW_MODE_DBS_SBS = 4, /* 3 PHYs, with 2 on the same band doing SBS
  20895. * as in WMI_HW_MODE_SBS, and 3rd on the other band
  20896. */
  20897. WMI_HW_MODE_DBS_OR_SBS = 5, /* One PHY is on 5G and the other PHY can be in 2G or 5G. */
  20898. } WMI_HW_MODE_CONFIG_TYPE;
  20899. #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
  20900. #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  20901. #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
  20902. #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  20903. #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
  20904. #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  20905. #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
  20906. #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  20907. #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
  20908. #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  20909. #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
  20910. #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  20911. #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
  20912. #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
  20913. typedef struct {
  20914. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES */
  20915. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  20916. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  20917. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  20918. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  20919. * though in practice the elements may always be ordered by hw_mode_id */
  20920. A_UINT32 hw_mode_id;
  20921. /* pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1 */
  20922. A_UINT32 pdev_id;
  20923. /* phy id. Starts with 0 */
  20924. A_UINT32 phy_id;
  20925. /* supported modulations and number of MU beamformees */
  20926. union {
  20927. struct {
  20928. A_UINT32 supports_11b:1,
  20929. supports_11g:1,
  20930. supports_11a:1,
  20931. supports_11n:1,
  20932. supports_11ac:1,
  20933. supports_11ax:1,
  20934. unused: 22,
  20935. max_mubfee: 4; /* max MU beamformees supported per MAC */
  20936. };
  20937. A_UINT32 supported_flags;
  20938. };
  20939. /* supported bands, enum WLAN_BAND_CAPABILITY */
  20940. A_UINT32 supported_bands;
  20941. /* ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
  20942. * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us */
  20943. A_UINT32 ampdu_density;
  20944. /* max bw supported 2G, enum wmi_channel_width */
  20945. A_UINT32 max_bw_supported_2G;
  20946. /* WMI HT Capability, WMI_HT_CAP defines */
  20947. A_UINT32 ht_cap_info_2G;
  20948. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  20949. A_UINT32 vht_cap_info_2G;
  20950. /* VHT Supported MCS Set field Rx/Tx same
  20951. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  20952. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  20953. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  20954. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  20955. * - 3 indicates that n spatial streams is not supported
  20956. * - bit [15:0] Each NSS takes 2 bit.
  20957. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  20958. * n spatial streams
  20959. * - bit 16 - for NSS 1
  20960. * - bit 17 - for NSS 2
  20961. * - .
  20962. * - .
  20963. * - bit 23 - for NSS 8
  20964. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  20965. * are valid
  20966. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  20967. */
  20968. A_UINT32 vht_supp_mcs_2G;
  20969. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  20970. A_UINT32 he_cap_info_2G;
  20971. /* HE Supported MCS Set field Rx/Tx same
  20972. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  20973. * bit 2-0 indicating max HE MCS of NSS1
  20974. * bit 5-3 indicating max HE MCS of NSS2 and so on
  20975. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  20976. * HE BW less than or equal to 80MHZ is encoded as follows
  20977. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  20978. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  20979. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  20980. * - 3 indicates that n spatial streams is not supported
  20981. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  20982. */
  20983. A_UINT32 he_supp_mcs_2G;
  20984. /* Valid Transmit chain mask */
  20985. A_UINT32 tx_chain_mask_2G;
  20986. /* Valid Receive chain mask */
  20987. A_UINT32 rx_chain_mask_2G;
  20988. /* max bw supported 5G, enum wmi_channel_width */
  20989. A_UINT32 max_bw_supported_5G;
  20990. /* WMI HT Capability, WMI_HT_CAP defines */
  20991. A_UINT32 ht_cap_info_5G;
  20992. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  20993. A_UINT32 vht_cap_info_5G;
  20994. /* VHT Supported MCS Set field Rx/Tx same
  20995. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  20996. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  20997. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  20998. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  20999. * - 3 indicates that n spatial streams is not supported
  21000. * - bit [15:0] Each NSS takes 2 bit.
  21001. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  21002. * n spatial streams
  21003. * - bit 16 - for NSS 1
  21004. * - bit 17 - for NSS 2
  21005. * - .
  21006. * - .
  21007. * - bit 23 - for NSS 8
  21008. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  21009. * are valid
  21010. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  21011. */
  21012. A_UINT32 vht_supp_mcs_5G;
  21013. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  21014. A_UINT32 he_cap_info_5G;
  21015. /* HE Supported MCS Set field Rx/Tx same
  21016. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  21017. * bit 2-0 indicating max HE MCS of NSS1
  21018. * bit 5-3 indicating max HE MCS of NSS2 and so on
  21019. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  21020. * HE BW less than or equal to 80MHZ is encoded as follows
  21021. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  21022. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  21023. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  21024. * - 3 indicates that n spatial streams is not supported
  21025. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  21026. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  21027. * HE BW equal to 80+80 or 160 MHZ encoding is same as above just the
  21028. * lower 16 bits are used for lower 80MHz NSS-MCS supported combo and
  21029. * upper 16 bits are used for upper 80MHz NSS-MCS supported combo
  21030. */
  21031. A_UINT32 he_supp_mcs_5G;
  21032. /* Valid Transmit chain mask */
  21033. A_UINT32 tx_chain_mask_5G;
  21034. /* Valid Receive chain mask */
  21035. A_UINT32 rx_chain_mask_5G;
  21036. /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
  21037. A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
  21038. A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
  21039. wmi_ppe_threshold he_ppet2G;
  21040. wmi_ppe_threshold he_ppet5G;
  21041. /* chainmask table to be used for the MAC */
  21042. A_UINT32 chainmask_table_id;
  21043. /* PDEV ID to LMAC ID mapping */
  21044. A_UINT32 lmac_id;
  21045. /* 2nd DWORD of HE capability info field of 802.11ax, support Draft 3+ */
  21046. A_UINT32 he_cap_info_2G_ext;
  21047. A_UINT32 he_cap_info_5G_ext;
  21048. /*
  21049. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  21050. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  21051. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  21052. * bit[31:3] : Reserved
  21053. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  21054. */
  21055. A_UINT32 he_cap_info_internal;
  21056. A_UINT32 wireless_modes; /* REGDMN MODE, see REGDMN_MODE_ enum */
  21057. A_UINT32 low_2ghz_chan_freq; /* units = MHz */
  21058. A_UINT32 high_2ghz_chan_freq; /* units = MHz */
  21059. A_UINT32 low_5ghz_chan_freq; /* units = MHz */
  21060. A_UINT32 high_5ghz_chan_freq; /* units = MHz */
  21061. } WMI_MAC_PHY_CAPABILITIES;
  21062. typedef struct {
  21063. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES */
  21064. /* hw_mode_id - identify a particular set of HW characteristics,
  21065. * as specified by the subsequent fields */
  21066. A_UINT32 hw_mode_id;
  21067. /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
  21068. * number of bits set in phy_id_map represents number of WMI_MAC_PHY_CAPABILITIES TLV's
  21069. * one for each active PHY for current HW mode identified by hw_mode_id. For example for
  21070. * DBS/SBS mode there will be 2 WMI_MAC_PHY_CAPABILITIES TLVs and for single MAC modes it
  21071. * will be 1 WMI_MAC_PHY_CAPABILITIES TLVs */
  21072. A_UINT32 phy_id_map;
  21073. /* hw_mode_config_type
  21074. * Identify a particular type of HW mode such as SBS, DBS etc.
  21075. * Refer to WMI_HW_MODE_CONFIG_TYPE values.
  21076. */
  21077. A_UINT32 hw_mode_config_type;
  21078. } WMI_HW_MODE_CAPABILITIES;
  21079. /*
  21080. * The following macros are for the bitfields witihin the supported flags field
  21081. * of WMI_MAC_PHY_CHAINMASK_CAPABILITY:
  21082. * Capabilities for the chainmask
  21083. */
  21084. #define WMI_SUPPORT_CHAN_WIDTH_20_GET(flags) WMI_GET_BITS(flags, 0, 1)
  21085. #define WMI_SUPPORT_CHAN_WIDTH_20_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  21086. #define WMI_SUPPORT_CHAN_WIDTH_40_GET(flags) WMI_GET_BITS(flags, 1, 1)
  21087. #define WMI_SUPPORT_CHAN_WIDTH_40_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  21088. #define WMI_SUPPORT_CHAN_WIDTH_80_GET(flags) WMI_GET_BITS(flags, 2, 1)
  21089. #define WMI_SUPPORT_CHAN_WIDTH_80_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  21090. #define WMI_SUPPORT_CHAN_WIDTH_160_GET(flags) WMI_GET_BITS(flags, 3, 1)
  21091. #define WMI_SUPPORT_CHAN_WIDTH_160_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  21092. #define WMI_SUPPORT_CHAN_WIDTH_80P80_GET(flags) WMI_GET_BITS(flags, 4, 1)
  21093. #define WMI_SUPPORT_CHAN_WIDTH_80P80_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  21094. #define WMI_SUPPORT_CHAIN_MASK_2G_GET(flags) WMI_GET_BITS(flags, 27, 1)
  21095. #define WMI_SUPPORT_CHAIN_MASK_2G_SET(flags, value) WMI_SET_BITS(flags, 27, 1, value)
  21096. #define WMI_SUPPORT_CHAIN_MASK_5G_GET(flags) WMI_GET_BITS(flags, 28, 1)
  21097. #define WMI_SUPPORT_CHAIN_MASK_5G_SET(flags, value) WMI_SET_BITS(flags, 28, 1, value)
  21098. #define WMI_SUPPORT_CHAIN_MASK_TX_GET(flags) WMI_GET_BITS(flags, 29, 1)
  21099. #define WMI_SUPPORT_CHAIN_MASK_TX_SET(flags, value) WMI_SET_BITS(flags, 29, 1, value)
  21100. #define WMI_SUPPORT_CHAIN_MASK_RX_GET(flags) WMI_GET_BITS(flags, 30, 1)
  21101. #define WMI_SUPPORT_CHAIN_MASK_RX_SET(flags, value) WMI_SET_BITS(flags, 30, 1, value)
  21102. #define WMI_SUPPORT_CHAIN_MASK_ADFS_GET(flags) WMI_GET_BITS(flags, 31, 1)
  21103. #define WMI_SUPPORT_CHAIN_MASK_ADFS_SET(flags, value) WMI_SET_BITS(flags, 31, 1, value)
  21104. /** Definition of valid chainmask and associated capabilities */
  21105. typedef struct {
  21106. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_CAPABILITY */
  21107. /* supported flags: Capabilities for this chianmask*/
  21108. union {
  21109. struct {
  21110. A_UINT32 supports_chan_width_20:1,
  21111. supports_chan_width_40:1,
  21112. supports_chan_width_80:1,
  21113. supports_chan_width_160:1,
  21114. supports_chan_width_80P80:1,
  21115. reserved:22, /* bits 26:5 */
  21116. chain_mask_2G:1,
  21117. chain_mask_5G:1,
  21118. chain_mask_tx:1,
  21119. chain_mask_rx:1,
  21120. supports_aDFS:1; /* agile DFS */
  21121. };
  21122. A_UINT32 supported_flags;
  21123. };
  21124. A_UINT32 chainmask;
  21125. } WMI_MAC_PHY_CHAINMASK_CAPABILITY;
  21126. typedef struct {
  21127. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_COMBO */
  21128. A_UINT32 chainmask_table_id;
  21129. /* Number of vaild Chainmask in the table */
  21130. A_UINT32 num_valid_chainmask;
  21131. /*
  21132. * This TLV is followed by the below TLVs:
  21133. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask]
  21134. */
  21135. } WMI_MAC_PHY_CHAINMASK_COMBO;
  21136. typedef struct {
  21137. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS */
  21138. /* num HW modes */
  21139. A_UINT32 num_hw_modes;
  21140. /* number of unique chainmask combo tables */
  21141. A_UINT32 num_chainmask_tables;
  21142. /*
  21143. * This TLV is followed by the below TLVs:
  21144. *
  21145. * WMI_HW_MODE_CAPABILITIES soc_hw_mode_caps[num_hw_modes]
  21146. *
  21147. * (intervening TLVs, e.g. HW_MODE_CAPS, MAC_PHY_CAPS, HAL_REG_CAPS)
  21148. *
  21149. * WMI_MAC_PHY_CHAINMASK_COMBO mac_phy_chainmask_combo[num_chainmask_tables]
  21150. * // number of chainmasks specified in mac_phy_chainmask_combo[0]
  21151. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask0]
  21152. * // number of chainmasks specified in mac_phy_chainmask_combo[1]
  21153. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask1]
  21154. * // number of chainmasks specified in mac_phy_chainmask_combo[2]
  21155. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask2]
  21156. * etc.
  21157. */
  21158. } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
  21159. /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
  21160. typedef struct {
  21161. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT */
  21162. /* phy id */
  21163. A_UINT32 phy_id;
  21164. /* regdomain value specified in EEPROM */
  21165. A_UINT32 eeprom_reg_domain;
  21166. /* regdomain */
  21167. A_UINT32 eeprom_reg_domain_ext;
  21168. /* CAP1 capabilities bit map, see REGDMN_CAP1_ defines */
  21169. A_UINT32 regcap1;
  21170. /* REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines */
  21171. A_UINT32 regcap2;
  21172. /* REGDMN MODE, see REGDMN_MODE_ enum */
  21173. A_UINT32 wireless_modes;
  21174. A_UINT32 low_2ghz_chan; /* freq in MHz */
  21175. A_UINT32 high_2ghz_chan; /* freq in MHz */
  21176. A_UINT32 low_5ghz_chan; /* freq in MHz */
  21177. A_UINT32 high_5ghz_chan; /* freq in MHz */
  21178. } WMI_HAL_REG_CAPABILITIES_EXT;
  21179. typedef struct {
  21180. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES */
  21181. A_UINT32 num_phy;
  21182. /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
  21183. } WMI_SOC_HAL_REG_CAPABILITIES;
  21184. typedef struct {
  21185. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_OEM_DMA_RING_CAPABILITIES */
  21186. A_UINT32 pdev_id;
  21187. A_UINT32 min_num_ptr;
  21188. /* Minimum number of pointers in the OEM DMA ring for this pdev */
  21189. A_UINT32 min_buf_size;
  21190. /* Minimum size in bytes of each buffer in the OEM DMA ring */
  21191. A_UINT32 min_buf_align;
  21192. /* Minimum alignment in bytes of each buffer in the OEM DMA ring */
  21193. } WMI_OEM_DMA_RING_CAPABILITIES;
  21194. typedef struct {
  21195. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES*/
  21196. /* sar version in bdf */
  21197. A_UINT32 active_version;
  21198. } WMI_SAR_CAPABILITIES;
  21199. typedef struct {
  21200. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */
  21201. /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */
  21202. A_UINT32 default_adaptive_dwell_mode;
  21203. /** the weight to calculate the average low pass filter for channel congestion. 0-100 */
  21204. A_UINT32 adapative_lpf_weight;
  21205. /** interval to monitor passive scan in msec */
  21206. A_UINT32 passive_monitor_interval_ms;
  21207. /** % of wifi activity to switch from passive to active 0-100 */
  21208. A_UINT32 wifi_activity_threshold_pct;
  21209. } wmi_scan_adaptive_dwell_parameters_tlv;
  21210. typedef struct {
  21211. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param */
  21212. /* globally enable/disable adaptive dwell */
  21213. A_UINT32 enable;
  21214. /** pdev_id for identifying the MAC
  21215. * See macros starting with WMI_PDEV_ID_ for values.
  21216. * In non-DBDC case host should set it to 0
  21217. */
  21218. A_UINT32 pdev_id;
  21219. /**
  21220. * followed by TLV (tag length value) parameters array
  21221. * The TLV's are:
  21222. * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
  21223. */
  21224. } wmi_scan_adaptive_dwell_config_fixed_param;
  21225. typedef struct {
  21226. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_param_tlv */
  21227. /** module_id **/
  21228. A_UINT32 module_id;
  21229. /** number of dbs scans */
  21230. A_UINT32 num_dbs_scans;
  21231. /** number of non-dbs scans */
  21232. A_UINT32 num_non_dbs_scans;
  21233. } wmi_scan_dbs_duty_cycle_tlv_param;
  21234. typedef struct {
  21235. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_fixed_param */
  21236. /* number of scan client dutycycle param elements */
  21237. A_UINT32 num_clients;
  21238. /** pdev_id for identifying the MAC
  21239. * See macros starting with WMI_PDEV_ID_ for values.
  21240. * In non-DBDC case host should set it to 0
  21241. */
  21242. A_UINT32 pdev_id;
  21243. /**
  21244. * followed by TLV (tag length value) parameters array
  21245. * The TLV's are:
  21246. * wmi_scan_selection_duty_cycle_tlv_param[num_clients];
  21247. */
  21248. } wmi_scan_dbs_duty_cycle_fixed_param;
  21249. typedef struct {
  21250. /** TLV tag and len; tag equals
  21251. * WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info */
  21252. A_UINT32 tlv_header;
  21253. /**
  21254. * temperature sensor value in celsius when to exit to lower zone,
  21255. * this value can be lower than HWM of lower zone as zone overlapping
  21256. * is permitted by design to provide hysteresis
  21257. */
  21258. A_UINT32 temp_lwm;
  21259. /**
  21260. * temperature sensor value in celsius when to exit to higher zone,
  21261. * this value can be higher than LWM of higher zone as zone overlapping
  21262. * is permitted by design to provide hysteresis
  21263. */
  21264. A_UINT32 temp_hwm;
  21265. A_UINT32 dc_off_percent; /* duty cycle off percent 0-100. 0 means no off, 100 means no on (shutdown the phy) */
  21266. /** Disable only the transmit queues in firmware that have lower priority than value defined by prio
  21267. * Prioritization:
  21268. * 0 = disable all data tx queues, No Prioritization defined
  21269. * 1 = disable BK tx queue
  21270. * 2 = disable BK+BE tx queues
  21271. * 3 = disable BK+BE+VI tx queues
  21272. */
  21273. A_UINT32 prio;
  21274. } wmi_therm_throt_level_config_info;
  21275. typedef struct {
  21276. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param */
  21277. A_UINT32 pdev_id; /* config for each pdev */
  21278. A_UINT32 enable; /* 0:disable, 1:enable */
  21279. A_UINT32 dc; /* duty cycle in ms */
  21280. A_UINT32 dc_per_event; /* how often (after how many duty cycles) the FW sends stats to host */
  21281. A_UINT32 therm_throt_levels; /* Indicates the number of thermal zone configuration */
  21282. /*
  21283. * Following this structure is the TLV:
  21284. * struct wmi_therm_throt_level_config_info therm_throt_level_config_info[therm_throt_levels];
  21285. */
  21286. } wmi_therm_throt_config_request_fixed_param;
  21287. /** FW response with the stats event id for every pdev and zones */
  21288. typedef struct {
  21289. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param */
  21290. A_UINT32 tlv_header;
  21291. A_UINT32 pdev_id; /* stats for corresponding pdev*/
  21292. A_UINT32 temp; /* Temperature reading in celsius */
  21293. A_UINT32 level; /* current thermal throttling level */
  21294. A_UINT32 therm_throt_levels; /* number of levels in therm_throt_level_stats_info */
  21295. /* This TLV is followed by another TLV of array of structs
  21296. * wmi_therm_throt_level_stats_info therm_throt_level_stats_info[therm_throt_levels];
  21297. */
  21298. } wmi_therm_throt_stats_event_fixed_param;
  21299. typedef struct {
  21300. /** TLV tag and len; tag equals
  21301. * WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info */
  21302. A_UINT32 tlv_header;
  21303. A_UINT32 level_count; /* count of each time thermal throttling entered this state */
  21304. A_UINT32 dc_count; /* total number of duty cycles spent in this state. */
  21305. /* this number increments by one each time we are in this state and we finish one full duty cycle. */
  21306. } wmi_therm_throt_level_stats_info;
  21307. typedef enum {
  21308. WMI_REG_EXT_FCC_MIDBAND = 0,
  21309. WMI_REG_EXT_JAPAN_MIDBAND = 1,
  21310. WMI_REG_EXT_FCC_DFS_HT40 = 2,
  21311. WMI_REG_EXT_JAPAN_NONDFS_HT40 = 3,
  21312. WMI_REG_EXT_JAPAN_DFS_HT40 = 4,
  21313. WMI_REG_EXT_FCC_CH_144 = 5,
  21314. } WMI_REG_EXT_BITMAP;
  21315. #ifdef WMI_CMD_STRINGS
  21316. static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
  21317. {
  21318. switch (wmi_command) {
  21319. /* initialize the wlan sub system */
  21320. WMI_RETURN_STRING(WMI_INIT_CMDID);
  21321. /* Scan specific commands */
  21322. /* start scan request to FW */
  21323. WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
  21324. /* stop scan request to FW */
  21325. WMI_RETURN_STRING(WMI_STOP_SCAN_CMDID);
  21326. /* full list of channels as defined by the regulatory
  21327. * that will be used by scanner */
  21328. WMI_RETURN_STRING(WMI_SCAN_CHAN_LIST_CMDID);
  21329. /* overwrite default priority table in scan scheduler */
  21330. WMI_RETURN_STRING(WMI_SCAN_SCH_PRIO_TBL_CMDID);
  21331. /* This command to adjust the priority and min.max_rest_time
  21332. * of an on ongoing scan request.
  21333. */
  21334. WMI_RETURN_STRING(WMI_SCAN_UPDATE_REQUEST_CMDID);
  21335. /* PDEV(physical device) specific commands */
  21336. /* set regulatorty ctl id used by FW to determine the exact
  21337. * ctl power limits */
  21338. WMI_RETURN_STRING(WMI_PDEV_SET_REGDOMAIN_CMDID);
  21339. /* set channel. mainly used for supporting monitor mode */
  21340. WMI_RETURN_STRING(WMI_PDEV_SET_CHANNEL_CMDID);
  21341. /* set pdev specific parameters */
  21342. WMI_RETURN_STRING(WMI_PDEV_SET_PARAM_CMDID);
  21343. /* enable packet log */
  21344. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_ENABLE_CMDID);
  21345. /* disable packet log*/
  21346. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_DISABLE_CMDID);
  21347. /* set wmm parameters */
  21348. WMI_RETURN_STRING(WMI_PDEV_SET_WMM_PARAMS_CMDID);
  21349. /* set HT cap ie that needs to be carried probe requests
  21350. * HT/VHT channels */
  21351. WMI_RETURN_STRING(WMI_PDEV_SET_HT_CAP_IE_CMDID);
  21352. /* set VHT cap ie that needs to be carried on probe
  21353. * requests on VHT channels */
  21354. WMI_RETURN_STRING(WMI_PDEV_SET_VHT_CAP_IE_CMDID);
  21355. /* Command to send the DSCP-to-TID map to the target */
  21356. WMI_RETURN_STRING(WMI_PDEV_SET_DSCP_TID_MAP_CMDID);
  21357. /* set quiet ie parameters. primarily used in AP mode */
  21358. WMI_RETURN_STRING(WMI_PDEV_SET_QUIET_MODE_CMDID);
  21359. /* Enable/Disable Green AP Power Save */
  21360. WMI_RETURN_STRING(WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID);
  21361. /* get TPC config for the current operating channel */
  21362. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CONFIG_CMDID);
  21363. /* set the base MAC address for the physical device before
  21364. * a VDEV is created. For firmware that does not support
  21365. * this feature and this command, the pdev MAC address will
  21366. * not be changed. */
  21367. WMI_RETURN_STRING(WMI_PDEV_SET_BASE_MACADDR_CMDID);
  21368. /* eeprom content dump , the same to bdboard data */
  21369. WMI_RETURN_STRING(WMI_PDEV_DUMP_CMDID);
  21370. /* VDEV(virtual device) specific commands */
  21371. /* vdev create */
  21372. WMI_RETURN_STRING(WMI_VDEV_CREATE_CMDID);
  21373. /* vdev delete */
  21374. WMI_RETURN_STRING(WMI_VDEV_DELETE_CMDID);
  21375. /* vdev start request */
  21376. WMI_RETURN_STRING(WMI_VDEV_START_REQUEST_CMDID);
  21377. /* vdev restart request (RX only, NO TX, used for CAC period)*/
  21378. WMI_RETURN_STRING(WMI_VDEV_RESTART_REQUEST_CMDID);
  21379. /* vdev up request */
  21380. WMI_RETURN_STRING(WMI_VDEV_UP_CMDID);
  21381. /* vdev stop request */
  21382. WMI_RETURN_STRING(WMI_VDEV_STOP_CMDID);
  21383. /* vdev down request */
  21384. WMI_RETURN_STRING(WMI_VDEV_DOWN_CMDID);
  21385. /* set a vdev param */
  21386. WMI_RETURN_STRING(WMI_VDEV_SET_PARAM_CMDID);
  21387. /* set a key (used for setting per peer unicast
  21388. * and per vdev multicast) */
  21389. WMI_RETURN_STRING(WMI_VDEV_INSTALL_KEY_CMDID);
  21390. /* wnm sleep mode command */
  21391. WMI_RETURN_STRING(WMI_VDEV_WNM_SLEEPMODE_CMDID);
  21392. WMI_RETURN_STRING(WMI_VDEV_WMM_ADDTS_CMDID);
  21393. WMI_RETURN_STRING(WMI_VDEV_WMM_DELTS_CMDID);
  21394. WMI_RETURN_STRING(WMI_VDEV_SET_WMM_PARAMS_CMDID);
  21395. WMI_RETURN_STRING(WMI_VDEV_SET_GTX_PARAMS_CMDID);
  21396. WMI_RETURN_STRING(WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID);
  21397. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_START_CMDID);
  21398. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_STOP_CMDID);
  21399. WMI_RETURN_STRING(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
  21400. WMI_RETURN_STRING(WMI_VDEV_SET_IE_CMDID);
  21401. /* peer specific commands */
  21402. /** create a peer */
  21403. WMI_RETURN_STRING(WMI_PEER_CREATE_CMDID);
  21404. /** delete a peer */
  21405. WMI_RETURN_STRING(WMI_PEER_DELETE_CMDID);
  21406. /** delete all peer (excluding bss peer) */
  21407. WMI_RETURN_STRING(WMI_VDEV_DELETE_ALL_PEER_CMDID);
  21408. /** flush specific tid queues of a peer */
  21409. WMI_RETURN_STRING(WMI_PEER_FLUSH_TIDS_CMDID);
  21410. /** set a parameter of a peer */
  21411. WMI_RETURN_STRING(WMI_PEER_SET_PARAM_CMDID);
  21412. /* set peer to associated state. will cary all parameters
  21413. * determined during assocication time */
  21414. WMI_RETURN_STRING(WMI_PEER_ASSOC_CMDID);
  21415. /* add a wds (4 address ) entry. used only for testing
  21416. * WDS feature on AP products */
  21417. WMI_RETURN_STRING(WMI_PEER_ADD_WDS_ENTRY_CMDID);
  21418. /* remove wds (4 address ) entry. used only for testing WDS
  21419. * feature on AP products */
  21420. WMI_RETURN_STRING(WMI_PEER_REMOVE_WDS_ENTRY_CMDID);
  21421. /* set up mcast info for multicast to unicast conversion */
  21422. WMI_RETURN_STRING(WMI_PEER_MCAST_GROUP_CMDID);
  21423. /* request peer info from FW to get PEER_INFO_EVENTID */
  21424. WMI_RETURN_STRING(WMI_PEER_INFO_REQ_CMDID);
  21425. /* unmap response for a peer */
  21426. WMI_RETURN_STRING(WMI_PEER_UNMAP_RESPONSE_CMDID);
  21427. /* beacon/management specific commands */
  21428. /* transmit beacon by reference. used for transmitting beacon
  21429. * on low latency interface like pcie */
  21430. WMI_RETURN_STRING(WMI_BCN_TX_CMDID);
  21431. /* transmit beacon by value */
  21432. WMI_RETURN_STRING(WMI_PDEV_SEND_BCN_CMDID);
  21433. /* set the beacon template. used in beacon offload mode to setup
  21434. * the common beacon template with the FW to be used by FW to
  21435. * generate beacons */
  21436. WMI_RETURN_STRING(WMI_BCN_TMPL_CMDID);
  21437. /* set beacon filter with FW */
  21438. WMI_RETURN_STRING(WMI_BCN_FILTER_RX_CMDID);
  21439. /* enable/disable filtering of probe requests in the firmware */
  21440. WMI_RETURN_STRING(WMI_PRB_REQ_FILTER_RX_CMDID);
  21441. /* transmit management frame by value. will be deprecated */
  21442. WMI_RETURN_STRING(WMI_MGMT_TX_CMDID);
  21443. /* set the probe response template. used in beacon offload mode
  21444. * to setup the common probe response template with the FW to
  21445. * be used by FW to generate probe responses */
  21446. WMI_RETURN_STRING(WMI_PRB_TMPL_CMDID);
  21447. /** set FILS Discovery frame template for FW to generate FD frames */
  21448. WMI_RETURN_STRING(WMI_FD_TMPL_CMDID);
  21449. /* commands to directly control ba negotiation directly from
  21450. * host. only used in test mode */
  21451. /* turn off FW Auto addba mode and let host control addba */
  21452. WMI_RETURN_STRING(WMI_ADDBA_CLEAR_RESP_CMDID);
  21453. /* send add ba request */
  21454. WMI_RETURN_STRING(WMI_ADDBA_SEND_CMDID);
  21455. WMI_RETURN_STRING(WMI_ADDBA_STATUS_CMDID);
  21456. /* send del ba */
  21457. WMI_RETURN_STRING(WMI_DELBA_SEND_CMDID);
  21458. /* set add ba response will be used by FW to generate
  21459. * addba response*/
  21460. WMI_RETURN_STRING(WMI_ADDBA_SET_RESP_CMDID);
  21461. /* send single VHT MPDU with AMSDU */
  21462. WMI_RETURN_STRING(WMI_SEND_SINGLEAMSDU_CMDID);
  21463. /* Station power save specific config */
  21464. /* enable/disable station powersave */
  21465. WMI_RETURN_STRING(WMI_STA_POWERSAVE_MODE_CMDID);
  21466. /* set station power save specific parameter */
  21467. WMI_RETURN_STRING(WMI_STA_POWERSAVE_PARAM_CMDID);
  21468. /* set station mimo powersave mode */
  21469. WMI_RETURN_STRING(WMI_STA_MIMO_PS_MODE_CMDID);
  21470. /* DFS-specific commands */
  21471. /* enable DFS (radar detection)*/
  21472. WMI_RETURN_STRING(WMI_PDEV_DFS_ENABLE_CMDID);
  21473. /* disable DFS (radar detection)*/
  21474. WMI_RETURN_STRING(WMI_PDEV_DFS_DISABLE_CMDID);
  21475. /* enable DFS phyerr/parse filter offload */
  21476. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_ENA_CMDID);
  21477. /* enable DFS phyerr/parse filter offload */
  21478. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_DIS_CMDID);
  21479. /* Roaming specific commands */
  21480. /* set roam scan mode */
  21481. WMI_RETURN_STRING(WMI_ROAM_SCAN_MODE);
  21482. /* set roam scan rssi threshold below which roam
  21483. * scan is enabled */
  21484. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_THRESHOLD);
  21485. /* set roam scan period for periodic roam scan mode */
  21486. WMI_RETURN_STRING(WMI_ROAM_SCAN_PERIOD);
  21487. /* set roam scan trigger rssi change threshold */
  21488. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
  21489. /* set roam AP profile */
  21490. WMI_RETURN_STRING(WMI_ROAM_AP_PROFILE);
  21491. /* set channel list for roam scans */
  21492. WMI_RETURN_STRING(WMI_ROAM_CHAN_LIST);
  21493. /* offload scan specific commands */
  21494. /* set offload scan AP profile */
  21495. WMI_RETURN_STRING(WMI_OFL_SCAN_ADD_AP_PROFILE);
  21496. /* remove offload scan AP profile */
  21497. WMI_RETURN_STRING(WMI_OFL_SCAN_REMOVE_AP_PROFILE);
  21498. /* set offload scan period */
  21499. WMI_RETURN_STRING(WMI_OFL_SCAN_PERIOD);
  21500. /* P2P specific commands */
  21501. /* set P2P device info. FW will used by FW to create P2P IE
  21502. * to be carried in probe response generated during p2p listen
  21503. * and for p2p discoverability */
  21504. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DEVICE_INFO);
  21505. /* enable/disable p2p discoverability on STA/AP VDEVs */
  21506. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DISCOVERABILITY);
  21507. /* set p2p ie to be carried in beacons generated by FW for GO */
  21508. WMI_RETURN_STRING(WMI_P2P_GO_SET_BEACON_IE);
  21509. /* set p2p ie to be carried in probe response frames generated
  21510. * by FW for GO */
  21511. WMI_RETURN_STRING(WMI_P2P_GO_SET_PROBE_RESP_IE);
  21512. /* set the vendor specific p2p ie data.
  21513. * FW will use this to parse the P2P NoA
  21514. * attribute in the beacons/probe responses received.
  21515. */
  21516. WMI_RETURN_STRING(WMI_P2P_SET_VENDOR_IE_DATA_CMDID);
  21517. /* set the configure of p2p find offload */
  21518. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID);
  21519. /* set the vendor specific p2p ie data for p2p find offload */
  21520. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_APPIE_CMDID);
  21521. /* set the BSSID/device name pattern of p2p find offload */
  21522. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID);
  21523. /* set OppPS related parameters **/
  21524. WMI_RETURN_STRING(WMI_P2P_SET_OPPPS_PARAM_CMDID);
  21525. /* AP power save specific config
  21526. * set AP power save specific param */
  21527. WMI_RETURN_STRING(WMI_AP_PS_PEER_PARAM_CMDID);
  21528. /* set AP UAPSD coex specific param */
  21529. WMI_RETURN_STRING(WMI_AP_PS_PEER_UAPSD_COEX_CMDID);
  21530. /* Rate-control specific commands */
  21531. WMI_RETURN_STRING(WMI_PEER_RATE_RETRY_SCHED_CMDID);
  21532. /* WLAN Profiling commands. */
  21533. WMI_RETURN_STRING(WMI_WLAN_PROFILE_TRIGGER_CMDID);
  21534. WMI_RETURN_STRING(WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID);
  21535. WMI_RETURN_STRING(WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID);
  21536. WMI_RETURN_STRING(WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID);
  21537. WMI_RETURN_STRING(WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID);
  21538. /* Suspend resume command Ids */
  21539. WMI_RETURN_STRING(WMI_PDEV_SUSPEND_CMDID);
  21540. WMI_RETURN_STRING(WMI_PDEV_RESUME_CMDID);
  21541. /* Beacon filter commands */
  21542. /* add a beacon filter */
  21543. WMI_RETURN_STRING(WMI_ADD_BCN_FILTER_CMDID);
  21544. /* remove a beacon filter */
  21545. WMI_RETURN_STRING(WMI_RMV_BCN_FILTER_CMDID);
  21546. /* WOW Specific WMI commands */
  21547. /* add pattern for awake */
  21548. WMI_RETURN_STRING(WMI_WOW_ADD_WAKE_PATTERN_CMDID);
  21549. /* deleta a wake pattern */
  21550. WMI_RETURN_STRING(WMI_WOW_DEL_WAKE_PATTERN_CMDID);
  21551. /* enable/deisable wake event */
  21552. WMI_RETURN_STRING(WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID);
  21553. /* enable WOW */
  21554. WMI_RETURN_STRING(WMI_WOW_ENABLE_CMDID);
  21555. /* host woke up from sleep event to FW. Generated in response
  21556. * to WOW Hardware event */
  21557. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
  21558. /* RTT measurement related cmd */
  21559. /* reques to make an RTT measurement */
  21560. WMI_RETURN_STRING(WMI_RTT_MEASREQ_CMDID);
  21561. /* reques to report a tsf measurement */
  21562. WMI_RETURN_STRING(WMI_RTT_TSF_CMDID);
  21563. /* spectral scan command */
  21564. /* configure spectral scan */
  21565. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID);
  21566. /* enable/disable spectral scan and trigger */
  21567. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
  21568. /* F/W stats */
  21569. /* one time request for stats */
  21570. WMI_RETURN_STRING(WMI_REQUEST_STATS_CMDID);
  21571. /* Push MCC Adaptive Scheduler Stats to Firmware */
  21572. WMI_RETURN_STRING(WMI_MCC_SCHED_TRAFFIC_STATS_CMDID);
  21573. /* ARP OFFLOAD REQUEST*/
  21574. WMI_RETURN_STRING(WMI_SET_ARP_NS_OFFLOAD_CMDID);
  21575. /* Proactive ARP Response Add Pattern Command*/
  21576. WMI_RETURN_STRING(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  21577. /* Proactive ARP Response Del Pattern Command*/
  21578. WMI_RETURN_STRING(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  21579. /* NS offload confid*/
  21580. WMI_RETURN_STRING(WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID);
  21581. /* GTK offload Specific WMI commands */
  21582. WMI_RETURN_STRING(WMI_GTK_OFFLOAD_CMDID);
  21583. /* CSA offload Specific WMI commands */
  21584. /* csa offload enable */
  21585. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_ENABLE_CMDID);
  21586. /* chan switch command */
  21587. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_CHANSWITCH_CMDID);
  21588. /* Chatter commands */
  21589. /* Change chatter mode of operation */
  21590. WMI_RETURN_STRING(WMI_CHATTER_SET_MODE_CMDID);
  21591. /* chatter add coalescing filter command */
  21592. WMI_RETURN_STRING(WMI_CHATTER_ADD_COALESCING_FILTER_CMDID);
  21593. /* chatter delete coalescing filter command */
  21594. WMI_RETURN_STRING(WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID);
  21595. /* chatter coalecing query command */
  21596. WMI_RETURN_STRING(WMI_CHATTER_COALESCING_QUERY_CMDID);
  21597. /* addba specific commands */
  21598. /* start the aggregation on this TID */
  21599. WMI_RETURN_STRING(WMI_PEER_TID_ADDBA_CMDID);
  21600. /* stop the aggregation on this TID */
  21601. WMI_RETURN_STRING(WMI_PEER_TID_DELBA_CMDID);
  21602. /* set station mimo powersave method */
  21603. WMI_RETURN_STRING(WMI_STA_DTIM_PS_METHOD_CMDID);
  21604. /* Configure the Station UAPSD AC Auto Trigger Parameters */
  21605. WMI_RETURN_STRING(WMI_STA_UAPSD_AUTO_TRIG_CMDID);
  21606. /* Configure the Keep Alive Parameters */
  21607. WMI_RETURN_STRING(WMI_STA_KEEPALIVE_CMDID);
  21608. /* Request ssn from target for a sta/tid pair */
  21609. WMI_RETURN_STRING(WMI_BA_REQ_SSN_CMDID);
  21610. /* misc command group */
  21611. /* echo command mainly used for testing */
  21612. WMI_RETURN_STRING(WMI_ECHO_CMDID);
  21613. /* !!IMPORTANT!!
  21614. * If you need to add a new WMI command to the
  21615. * WMI_RETURN_STRING(WMI_GRP_MISC) sub-group,
  21616. * please make sure you add it BEHIND
  21617. * WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  21618. * as we MUST have a fixed value here to maintain compatibility between
  21619. * UTF and the ART2 driver
  21620. */
  21621. /* UTF WMI commands */
  21622. WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  21623. /* set debug log config */
  21624. WMI_RETURN_STRING(WMI_DBGLOG_CFG_CMDID);
  21625. /* QVIT specific command id */
  21626. WMI_RETURN_STRING(WMI_PDEV_QVIT_CMDID);
  21627. /* Factory Testing Mode request command
  21628. * used for integrated chipsets */
  21629. WMI_RETURN_STRING(WMI_PDEV_FTM_INTG_CMDID);
  21630. /* set and get keepalive parameters command */
  21631. WMI_RETURN_STRING(WMI_VDEV_SET_KEEPALIVE_CMDID);
  21632. WMI_RETURN_STRING(WMI_VDEV_GET_KEEPALIVE_CMDID);
  21633. /* For fw recovery test command */
  21634. WMI_RETURN_STRING(WMI_FORCE_FW_HANG_CMDID);
  21635. /* Set Mcast/Bdcast filter */
  21636. WMI_RETURN_STRING(WMI_SET_MCASTBCAST_FILTER_CMDID);
  21637. /* set thermal management params */
  21638. WMI_RETURN_STRING(WMI_THERMAL_MGMT_CMDID);
  21639. WMI_RETURN_STRING(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
  21640. WMI_RETURN_STRING(WMI_LRO_CONFIG_CMDID);
  21641. WMI_RETURN_STRING(WMI_TRANSFER_DATA_TO_FLASH_CMDID);
  21642. WMI_RETURN_STRING(WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID);
  21643. WMI_RETURN_STRING(WMI_VDEV_WISA_CMDID);
  21644. WMI_RETURN_STRING(WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID);
  21645. WMI_RETURN_STRING(WMI_WOW_SET_ACTION_WAKE_UP_CMDID);
  21646. WMI_RETURN_STRING(WMI_MAWC_SENSOR_REPORT_IND_CMDID);
  21647. WMI_RETURN_STRING(WMI_ROAM_CONFIGURE_MAWC_CMDID);
  21648. WMI_RETURN_STRING(WMI_NLO_CONFIGURE_MAWC_CMDID);
  21649. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_MAWC_CMDID);
  21650. /* GPIO Configuration */
  21651. WMI_RETURN_STRING(WMI_GPIO_CONFIG_CMDID);
  21652. WMI_RETURN_STRING(WMI_GPIO_OUTPUT_CMDID);
  21653. /* Txbf configuration command */
  21654. WMI_RETURN_STRING(WMI_TXBF_CMDID);
  21655. /* FWTEST Commands */
  21656. WMI_RETURN_STRING(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
  21657. /* set NoA descs */
  21658. WMI_RETURN_STRING(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
  21659. /* TDLS Configuration */
  21660. /* enable/disable TDLS */
  21661. WMI_RETURN_STRING(WMI_TDLS_SET_STATE_CMDID);
  21662. /* set tdls peer state */
  21663. WMI_RETURN_STRING(WMI_TDLS_PEER_UPDATE_CMDID);
  21664. /* Resmgr Configuration */
  21665. /* Adaptive OCS is enabled by default in the FW.
  21666. * This command is used to disable FW based adaptive OCS.
  21667. */
  21668. WMI_RETURN_STRING
  21669. (WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
  21670. /* set the requested channel time quota for the home channels */
  21671. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
  21672. /* set the requested latency for the home channels */
  21673. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
  21674. /* STA SMPS Configuration */
  21675. /* force SMPS mode */
  21676. WMI_RETURN_STRING(WMI_STA_SMPS_FORCE_MODE_CMDID);
  21677. /* set SMPS parameters */
  21678. WMI_RETURN_STRING(WMI_STA_SMPS_PARAM_CMDID);
  21679. /* Wlan HB commands */
  21680. /* enalbe/disable wlan HB */
  21681. WMI_RETURN_STRING(WMI_HB_SET_ENABLE_CMDID);
  21682. /* set tcp parameters for wlan HB */
  21683. WMI_RETURN_STRING(WMI_HB_SET_TCP_PARAMS_CMDID);
  21684. /* set tcp pkt filter for wlan HB */
  21685. WMI_RETURN_STRING(WMI_HB_SET_TCP_PKT_FILTER_CMDID);
  21686. /* set udp parameters for wlan HB */
  21687. WMI_RETURN_STRING(WMI_HB_SET_UDP_PARAMS_CMDID);
  21688. /* set udp pkt filter for wlan HB */
  21689. WMI_RETURN_STRING(WMI_HB_SET_UDP_PKT_FILTER_CMDID);
  21690. /* Wlan RMC commands*/
  21691. /* enable/disable RMC */
  21692. WMI_RETURN_STRING(WMI_RMC_SET_MODE_CMDID);
  21693. /* configure action frame period */
  21694. WMI_RETURN_STRING(WMI_RMC_SET_ACTION_PERIOD_CMDID);
  21695. /* For debug/future enhancement purposes only,
  21696. * configures/finetunes RMC algorithms */
  21697. WMI_RETURN_STRING(WMI_RMC_CONFIG_CMDID);
  21698. /* WLAN MHF offload commands */
  21699. /* enable/disable MHF offload */
  21700. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_SET_MODE_CMDID);
  21701. /* Plumb routing table for MHF offload */
  21702. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID);
  21703. /* location scan commands */
  21704. /* start batch scan */
  21705. WMI_RETURN_STRING(WMI_BATCH_SCAN_ENABLE_CMDID);
  21706. /* stop batch scan */
  21707. WMI_RETURN_STRING(WMI_BATCH_SCAN_DISABLE_CMDID);
  21708. /* get batch scan result */
  21709. WMI_RETURN_STRING(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID);
  21710. /* OEM related cmd */
  21711. WMI_RETURN_STRING(WMI_OEM_REQ_CMDID);
  21712. WMI_RETURN_STRING(WMI_OEM_REQUEST_CMDID);
  21713. /* NAN request cmd */
  21714. WMI_RETURN_STRING(WMI_NAN_CMDID);
  21715. /* Modem power state cmd */
  21716. WMI_RETURN_STRING(WMI_MODEM_POWER_STATE_CMDID);
  21717. WMI_RETURN_STRING(WMI_REQUEST_STATS_EXT_CMDID);
  21718. WMI_RETURN_STRING(WMI_OBSS_SCAN_ENABLE_CMDID);
  21719. WMI_RETURN_STRING(WMI_OBSS_SCAN_DISABLE_CMDID);
  21720. WMI_RETURN_STRING(WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID);
  21721. WMI_RETURN_STRING(WMI_ROAM_SCAN_CMD);
  21722. WMI_RETURN_STRING(WMI_PDEV_SET_LED_CONFIG_CMDID);
  21723. WMI_RETURN_STRING(WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID);
  21724. WMI_RETURN_STRING(WMI_CHAN_AVOID_UPDATE_CMDID);
  21725. WMI_RETURN_STRING(WMI_COEX_CONFIG_CMDID);
  21726. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID);
  21727. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID);
  21728. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID);
  21729. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID);
  21730. WMI_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID);
  21731. WMI_RETURN_STRING(WMI_START_LINK_STATS_CMDID);
  21732. WMI_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID);
  21733. WMI_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID);
  21734. WMI_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID);
  21735. WMI_RETURN_STRING(WMI_LPI_START_SCAN_CMDID);
  21736. WMI_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID);
  21737. WMI_RETURN_STRING(WMI_EXTSCAN_START_CMDID);
  21738. WMI_RETURN_STRING(WMI_EXTSCAN_STOP_CMDID);
  21739. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID);
  21740. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID);
  21741. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID);
  21742. WMI_RETURN_STRING(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID);
  21743. WMI_RETURN_STRING(WMI_EXTSCAN_SET_CAPABILITIES_CMDID);
  21744. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CAPABILITIES_CMDID);
  21745. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID);
  21746. WMI_RETURN_STRING(WMI_ROAM_SYNCH_COMPLETE);
  21747. WMI_RETURN_STRING(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
  21748. WMI_RETURN_STRING(WMI_EXTWOW_ENABLE_CMDID);
  21749. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
  21750. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
  21751. WMI_RETURN_STRING(WMI_UNIT_TEST_CMDID);
  21752. WMI_RETURN_STRING(WMI_ROAM_SET_RIC_REQUEST_CMDID);
  21753. WMI_RETURN_STRING(WMI_PDEV_GET_TEMPERATURE_CMDID);
  21754. WMI_RETURN_STRING(WMI_SET_DHCP_SERVER_OFFLOAD_CMDID);
  21755. WMI_RETURN_STRING(WMI_TPC_CHAINMASK_CONFIG_CMDID);
  21756. WMI_RETURN_STRING(WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID);
  21757. WMI_RETURN_STRING(WMI_SCAN_PROB_REQ_OUI_CMDID);
  21758. WMI_RETURN_STRING(WMI_TDLS_SET_OFFCHAN_MODE_CMDID);
  21759. WMI_RETURN_STRING(WMI_PDEV_SET_LED_FLASHING_CMDID);
  21760. WMI_RETURN_STRING(WMI_MDNS_OFFLOAD_ENABLE_CMDID);
  21761. WMI_RETURN_STRING(WMI_MDNS_SET_FQDN_CMDID);
  21762. WMI_RETURN_STRING(WMI_MDNS_SET_RESPONSE_CMDID);
  21763. WMI_RETURN_STRING(WMI_MDNS_GET_STATS_CMDID);
  21764. WMI_RETURN_STRING(WMI_ROAM_INVOKE_CMDID);
  21765. WMI_RETURN_STRING(WMI_SET_ANTENNA_DIVERSITY_CMDID);
  21766. WMI_RETURN_STRING(WMI_SAP_OFL_ENABLE_CMDID);
  21767. WMI_RETURN_STRING(WMI_APFIND_CMDID);
  21768. WMI_RETURN_STRING(WMI_PASSPOINT_LIST_CONFIG_CMDID);
  21769. WMI_RETURN_STRING(WMI_OCB_SET_SCHED_CMDID);
  21770. WMI_RETURN_STRING(WMI_OCB_SET_CONFIG_CMDID);
  21771. WMI_RETURN_STRING(WMI_OCB_SET_UTC_TIME_CMDID);
  21772. WMI_RETURN_STRING(WMI_OCB_START_TIMING_ADVERT_CMDID);
  21773. WMI_RETURN_STRING(WMI_OCB_STOP_TIMING_ADVERT_CMDID);
  21774. WMI_RETURN_STRING(WMI_OCB_GET_TSF_TIMER_CMDID);
  21775. WMI_RETURN_STRING(WMI_DCC_GET_STATS_CMDID);
  21776. WMI_RETURN_STRING(WMI_DCC_CLEAR_STATS_CMDID);
  21777. WMI_RETURN_STRING(WMI_DCC_UPDATE_NDL_CMDID);
  21778. WMI_RETURN_STRING(WMI_ROAM_FILTER_CMDID);
  21779. WMI_RETURN_STRING(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
  21780. WMI_RETURN_STRING(WMI_DEBUG_MESG_FLUSH_CMDID);
  21781. WMI_RETURN_STRING(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
  21782. WMI_RETURN_STRING(WMI_SOC_SET_PCL_CMDID);
  21783. WMI_RETURN_STRING(WMI_SOC_SET_HW_MODE_CMDID);
  21784. WMI_RETURN_STRING(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID);
  21785. WMI_RETURN_STRING(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID);
  21786. WMI_RETURN_STRING(WMI_DIAG_EVENT_LOG_CONFIG_CMDID);
  21787. WMI_RETURN_STRING(WMI_PACKET_FILTER_CONFIG_CMDID);
  21788. WMI_RETURN_STRING(WMI_PACKET_FILTER_ENABLE_CMDID);
  21789. WMI_RETURN_STRING(WMI_SAP_SET_BLACKLIST_PARAM_CMDID);
  21790. WMI_RETURN_STRING(WMI_WOW_UDP_SVC_OFLD_CMDID);
  21791. WMI_RETURN_STRING(WMI_MGMT_TX_SEND_CMDID);
  21792. WMI_RETURN_STRING(WMI_SOC_SET_ANTENNA_MODE_CMDID);
  21793. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID);
  21794. WMI_RETURN_STRING(WMI_AP_PS_EGAP_PARAM_CMDID);
  21795. WMI_RETURN_STRING(WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID);
  21796. WMI_RETURN_STRING(WMI_BPF_GET_CAPABILITY_CMDID);
  21797. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_STATS_CMDID);
  21798. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID);
  21799. WMI_RETURN_STRING(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID);
  21800. WMI_RETURN_STRING(WMI_NDI_GET_CAP_REQ_CMDID);
  21801. WMI_RETURN_STRING(WMI_NDP_INITIATOR_REQ_CMDID);
  21802. WMI_RETURN_STRING(WMI_NDP_RESPONDER_REQ_CMDID);
  21803. WMI_RETURN_STRING(WMI_NDP_END_REQ_CMDID);
  21804. WMI_RETURN_STRING(WMI_PEER_UPDATE_WDS_ENTRY_CMDID);
  21805. WMI_RETURN_STRING(WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID);
  21806. WMI_RETURN_STRING(WMI_PDEV_FIPS_CMDID);
  21807. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_ENABLE_CMDID);
  21808. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID);
  21809. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID);
  21810. WMI_RETURN_STRING(WMI_PDEV_SET_CTL_TABLE_CMDID);
  21811. WMI_RETURN_STRING(WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID);
  21812. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CMDID);
  21813. WMI_RETURN_STRING(WMI_MIB_STATS_ENABLE_CMDID);
  21814. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID);
  21815. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID);
  21816. WMI_RETURN_STRING(WMI_VDEV_RATEMASK_CMDID);
  21817. WMI_RETURN_STRING(WMI_VDEV_ATF_REQUEST_CMDID);
  21818. WMI_RETURN_STRING(WMI_VDEV_SET_DSCP_TID_MAP_CMDID);
  21819. WMI_RETURN_STRING(WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID);
  21820. WMI_RETURN_STRING(WMI_VDEV_SET_QUIET_MODE_CMDID);
  21821. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID);
  21822. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID);
  21823. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID);
  21824. WMI_RETURN_STRING(WMI_PEER_ATF_REQUEST_CMDID);
  21825. WMI_RETURN_STRING(WMI_FWTEST_CMDID);
  21826. WMI_RETURN_STRING(WMI_QBOOST_CFG_CMDID);
  21827. WMI_RETURN_STRING(WMI_PDEV_GET_NFCAL_POWER_CMDID);
  21828. WMI_RETURN_STRING(WMI_PDEV_SET_PCL_CMDID);
  21829. WMI_RETURN_STRING(WMI_PDEV_SET_HW_MODE_CMDID);
  21830. WMI_RETURN_STRING(WMI_PDEV_SET_MAC_CONFIG_CMDID);
  21831. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_MODE_CMDID);
  21832. WMI_RETURN_STRING(WMI_ROAM_SET_MBO_PARAM_CMDID);
  21833. WMI_RETURN_STRING(WMI_CHAN_AVOID_RPT_ALLOW_CMDID);
  21834. WMI_RETURN_STRING(WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID);
  21835. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID);
  21836. WMI_RETURN_STRING(WMI_PDEV_WAL_POWER_DEBUG_CMDID);
  21837. WMI_RETURN_STRING(WMI_PEER_BWF_REQUEST_CMDID);
  21838. WMI_RETURN_STRING(WMI_DBGLOG_TIME_STAMP_SYNC_CMDID);
  21839. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_START_CMDID);
  21840. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID);
  21841. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_SETUP_CMDID);
  21842. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_REMOVE_CMDID);
  21843. WMI_RETURN_STRING(WMI_SET_MULTIPLE_MCAST_FILTER_CMDID);
  21844. WMI_RETURN_STRING(WMI_READ_DATA_FROM_FLASH_CMDID);
  21845. WMI_RETURN_STRING(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID);
  21846. WMI_RETURN_STRING(WMI_PEER_SET_RX_BLOCKSIZE_CMDID);
  21847. WMI_RETURN_STRING(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID);
  21848. WMI_RETURN_STRING(WMI_PDEV_GET_ANTDIV_STATUS_CMDID);
  21849. WMI_RETURN_STRING(WMI_PEER_ANTDIV_INFO_REQ_CMDID);
  21850. WMI_RETURN_STRING(WMI_MNT_FILTER_CMDID);
  21851. WMI_RETURN_STRING(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID);
  21852. WMI_RETURN_STRING(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID);
  21853. WMI_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID);
  21854. WMI_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID);
  21855. WMI_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
  21856. WMI_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID);
  21857. WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
  21858. WMI_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID);
  21859. WMI_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
  21860. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
  21861. WMI_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID);
  21862. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID);
  21863. WMI_RETURN_STRING(WMI_LPI_OEM_REQ_CMDID);
  21864. WMI_RETURN_STRING(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID);
  21865. WMI_RETURN_STRING(WMI_PDEV_CHECK_CAL_VERSION_CMDID);
  21866. WMI_RETURN_STRING(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID);
  21867. WMI_RETURN_STRING(WMI_VDEV_SET_ARP_STAT_CMDID);
  21868. WMI_RETURN_STRING(WMI_VDEV_GET_ARP_STAT_CMDID);
  21869. WMI_RETURN_STRING(WMI_VDEV_GET_TX_POWER_CMDID);
  21870. WMI_RETURN_STRING(WMI_OFFCHAN_DATA_TX_SEND_CMDID);
  21871. WMI_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID);
  21872. WMI_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID);
  21873. WMI_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID);
  21874. WMI_RETURN_STRING(WMI_OEM_DMA_RING_CFG_REQ_CMDID);
  21875. WMI_RETURN_STRING(WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID);
  21876. WMI_RETURN_STRING(WMI_VDEV_LIMIT_OFFCHAN_CMDID);
  21877. WMI_RETURN_STRING(WMI_ROAM_BTM_CONFIG_CMDID);
  21878. WMI_RETURN_STRING(WMI_WLM_CONFIG_CMDID);
  21879. WMI_RETURN_STRING(WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID);
  21880. WMI_RETURN_STRING(WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID);
  21881. WMI_RETURN_STRING(WMI_PDEV_SEND_FD_CMDID);
  21882. WMI_RETURN_STRING(WMI_ENABLE_FILS_CMDID);
  21883. WMI_RETURN_STRING(WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID);
  21884. WMI_RETURN_STRING(WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID);
  21885. WMI_RETURN_STRING(WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID);
  21886. WMI_RETURN_STRING(WMI_SAP_OBSS_DETECTION_CFG_CMDID);
  21887. WMI_RETURN_STRING(WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
  21888. WMI_RETURN_STRING(WMI_11K_OFFLOAD_REPORT_CMDID);
  21889. WMI_RETURN_STRING(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
  21890. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ENABLE_CMDID);
  21891. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID);
  21892. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID);
  21893. WMI_RETURN_STRING(WMI_BSS_COLOR_CHANGE_ENABLE_CMDID);
  21894. WMI_RETURN_STRING(WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID);
  21895. WMI_RETURN_STRING(WMI_RUNTIME_DPD_RECAL_CMDID);
  21896. WMI_RETURN_STRING(WMI_TWT_ENABLE_CMDID);
  21897. WMI_RETURN_STRING(WMI_TWT_DISABLE_CMDID);
  21898. WMI_RETURN_STRING(WMI_TWT_ADD_DIALOG_CMDID);
  21899. WMI_RETURN_STRING(WMI_TWT_DEL_DIALOG_CMDID);
  21900. WMI_RETURN_STRING(WMI_TWT_PAUSE_DIALOG_CMDID);
  21901. WMI_RETURN_STRING(WMI_TWT_RESUME_DIALOG_CMDID);
  21902. WMI_RETURN_STRING(WMI_REQUEST_ROAM_SCAN_STATS_CMDID);
  21903. WMI_RETURN_STRING(WMI_PEER_TID_CONFIGURATIONS_CMDID);
  21904. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID);
  21905. WMI_RETURN_STRING(WMI_GET_TPC_POWER_CMDID);
  21906. WMI_RETURN_STRING(WMI_MOTION_DET_CONFIG_PARAM_CMDID);
  21907. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID);
  21908. WMI_RETURN_STRING(WMI_MOTION_DET_START_STOP_CMDID);
  21909. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID);
  21910. WMI_RETURN_STRING(WMI_SAR_LIMITS_CMDID);
  21911. WMI_RETURN_STRING(WMI_SAR_GET_LIMITS_CMDID);
  21912. WMI_RETURN_STRING(WMI_PEER_CHAN_WIDTH_SWITCH_CMDID);
  21913. WMI_RETURN_STRING(WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID);
  21914. WMI_RETURN_STRING(WMI_PDEV_HE_TB_ACTION_FRM_CMDID);
  21915. WMI_RETURN_STRING(WMI_HPCS_PULSE_START_CMDID);
  21916. WMI_RETURN_STRING(WMI_VDEV_CHAINMASK_CONFIG_CMDID);
  21917. WMI_RETURN_STRING(WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID);
  21918. WMI_RETURN_STRING(WMI_NDP_CMDID);
  21919. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_FILTER_CMDID);
  21920. WMI_RETURN_STRING(WMI_SET_CURRENT_COUNTRY_CMDID);
  21921. WMI_RETURN_STRING(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID);
  21922. WMI_RETURN_STRING(WMI_PEER_TX_PN_REQUEST_CMDID);
  21923. WMI_RETURN_STRING(WMI_ROAM_BSS_LOAD_CONFIG_CMDID);
  21924. WMI_RETURN_STRING(WMI_VDEV_GET_MWS_COEX_INFO_CMDID);
  21925. WMI_RETURN_STRING(WMI_REQUEST_WLM_STATS_CMDID);
  21926. WMI_RETURN_STRING(WMI_PDEV_SET_RAP_CONFIG_CMDID);
  21927. WMI_RETURN_STRING(WMI_STA_TDCC_CONFIG_CMDID);
  21928. WMI_RETURN_STRING(WMI_ROAM_DEAUTH_CONFIG_CMDID);
  21929. WMI_RETURN_STRING(WMI_ROAM_IDLE_CONFIG_CMDID);
  21930. WMI_RETURN_STRING(WMI_IDLE_TRIGGER_MONITOR_CMDID);
  21931. WMI_RETURN_STRING(WMI_PDEV_DSM_FILTER_CMDID);
  21932. WMI_RETURN_STRING(WMI_TWT_BTWT_INVITE_STA_CMDID);
  21933. WMI_RETURN_STRING(WMI_TWT_BTWT_REMOVE_STA_CMDID);
  21934. WMI_RETURN_STRING(WMI_OEM_DATA_CMDID);
  21935. WMI_RETURN_STRING(WMI_ROAM_PREAUTH_STATUS_CMDID);
  21936. WMI_RETURN_STRING(WMI_SET_ELNA_BYPASS_CMDID);
  21937. WMI_RETURN_STRING(WMI_GET_ELNA_BYPASS_CMDID);
  21938. WMI_RETURN_STRING(WMI_AUDIO_AGGR_ENABLE_CMDID);
  21939. WMI_RETURN_STRING(WMI_AUDIO_AGGR_ADD_GROUP_CMDID);
  21940. WMI_RETURN_STRING(WMI_AUDIO_AGGR_DEL_GROUP_CMDID);
  21941. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID);
  21942. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID);
  21943. WMI_RETURN_STRING(WMI_CFR_CAPTURE_FILTER_CMDID);
  21944. }
  21945. return "Invalid WMI cmd";
  21946. }
  21947. #endif /* WMI_CMD_STRINGS */
  21948. /** WMI commands/events for the regulatory offload */
  21949. /** Host indicating current country code to FW */
  21950. typedef struct {
  21951. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param */
  21952. A_UINT32 pdev_id;
  21953. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  21954. } wmi_set_current_country_cmd_fixed_param;
  21955. typedef enum {
  21956. WMI_COUNTRYCODE_ALPHA2,
  21957. WMI_COUNTRYCODE_COUNTRY_ID,
  21958. WMI_COUNTRYCODE_DOMAIN_CODE,
  21959. } WMI_COUNTRYCODE_TYPE;
  21960. typedef struct {
  21961. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_init_country_cmd_fixed_param */
  21962. A_UINT32 pdev_id;
  21963. A_UINT32 countrycode_type; /* WMI_COUNTRYCODE_TYPE */
  21964. union {
  21965. struct {
  21966. /* Three character for alpha2. The first two is ISO name for country the last one
  21967. present if it is indoor and out door. First char in bits 7:0 and second char in bits 15:8 ... */
  21968. A_UINT32 alpha2:24,
  21969. unused:8;
  21970. };
  21971. A_UINT32 country_id; /* Country ID */
  21972. A_UINT32 domain_code; /* Domain code */
  21973. } country_code;
  21974. } wmi_set_init_country_cmd_fixed_param;
  21975. /* Freq units in MHz */
  21976. #define WMI_REG_RULE_START_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  21977. #define WMI_REG_RULE_START_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  21978. #define WMI_REG_RULE_END_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 16, 16)
  21979. #define WMI_REG_RULE_END_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 16, value)
  21980. /* BW in MHz */
  21981. #define WMI_REG_RULE_MAX_BW_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 0, 16)
  21982. #define WMI_REG_RULE_MAX_BW_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 0, 16, value)
  21983. /* regpower in dBm */
  21984. #define WMI_REG_RULE_REG_POWER_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 16, 8)
  21985. #define WMI_REG_RULE_REG_POWER_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 16, 8, value)
  21986. /* antenna gain */
  21987. #define WMI_REG_RULE_ANTENNA_GAIN_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 24, 8)
  21988. #define WMI_REG_RULE_ANTENNA_GAIN_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 24, 8, value)
  21989. typedef enum {
  21990. WMI_REG_FLAG_CHAN_NO_IR = 0x0001, /* passive channel */
  21991. WMI_REG_FLAG_CHAN_RADAR = 0x0002, /* dfs channel */
  21992. WMI_REG_FLAG_CHAN_NO_OFDM = 0x0004, /* no ofdm channel */
  21993. WMI_REG_FLAG_CHAN_INDOOR_ONLY = 0x0008, /* indoor only channel */
  21994. } WMI_REGULATORY_FLAGS;
  21995. #define WMI_REG_RULE_FLAGS_GET(flag_info) WMI_GET_BITS(flag_info, 0, 16)
  21996. #define WMI_REG_RULE_FLAGS_SET(flag_info, value) WMI_SET_BITS(flag_info, 0, 16, value)
  21997. typedef struct {
  21998. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_struct */
  21999. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  22000. * bits 31:16 = u16 end_freq
  22001. * (both in MHz units) */
  22002. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  22003. bits 23:16 = u8 reg_power (dBm units),
  22004. bits 31:24 = u8 ant_gain (dB units) */
  22005. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  22006. bits 31:16 reserved */
  22007. } wmi_regulatory_rule_struct;
  22008. typedef enum {
  22009. WMI_REG_DFS_UNINIT_REGION = 0,
  22010. WMI_REG_DFS_FCC_REGION = 1,
  22011. WMI_REG_DFS_ETSI_REGION = 2,
  22012. WMI_REG_DFS_MKK_REGION = 3,
  22013. WMI_REG_DFS_CN_REGION = 4,
  22014. WMI_REG_DFS_KR_REGION = 5,
  22015. /* Add new items above */
  22016. WMI_REG_DFS_UNDEF_REGION = 0xFFFF,
  22017. } WMI_REG_DFS_REGION;
  22018. typedef enum {
  22019. WMI_REGULATORY_PHYMODE_NO11A = 0x0001, /* NO 11A */
  22020. WMI_REGULATORY_PHYMODE_NO11B = 0x0002, /* NO 11B */
  22021. WMI_REGULATORY_PHYMODE_NO11G = 0x0004, /* NO 11G */
  22022. WMI_REGULATORY_PHYMODE_NO11N = 0x0008, /* NO 11N */
  22023. WMI_REGULATORY_PHYMODE_NO11AC = 0x0010, /* NO 11AC */
  22024. WMI_REGULATORY_PHYMODE_NO11AX = 0x0020, /* NO 11AX */
  22025. } WMI_REGULATORY_PHYBITMAP;
  22026. typedef enum {
  22027. WMI_REG_SET_CC_STATUS_PASS = 0,
  22028. WMI_REG_CURRENT_ALPHA2_NOT_FOUND = 1,
  22029. WMI_REG_INIT_ALPHA2_NOT_FOUND = 2,
  22030. WMI_REG_SET_CC_CHANGE_NOT_ALLOWED = 3,
  22031. WMI_REG_SET_CC_STATUS_NO_MEMORY = 4,
  22032. WMI_REG_SET_CC_STATUS_FAIL = 5,
  22033. } WMI_REG_SET_CC_STATUS_CODE;
  22034. typedef struct {
  22035. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param */
  22036. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  22037. A_UINT32 phy_id;
  22038. A_UINT32 alpha2;
  22039. A_UINT32 num_phy;
  22040. A_UINT32 country_id;
  22041. A_UINT32 domain_code;
  22042. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  22043. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  22044. A_UINT32 min_bw_2g; /* BW in MHz */
  22045. A_UINT32 max_bw_2g; /* BW in MHz */
  22046. A_UINT32 min_bw_5g; /* BW in MHz */
  22047. A_UINT32 max_bw_5g; /* BW in MHz */
  22048. A_UINT32 num_2g_reg_rules;
  22049. A_UINT32 num_5g_reg_rules;
  22050. /* followed by wmi_regulatory_rule_struct TLV array. First 2G and then 5G */
  22051. } wmi_reg_chan_list_cc_event_fixed_param;
  22052. typedef struct {
  22053. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param */
  22054. A_UINT32 vdev_id;
  22055. A_UINT32 scan_period_msec; /** scan duration in milli-seconds */
  22056. A_UINT32 start_interval_msec; /** offset duration to start the scan in milli-seconds */
  22057. } wmi_11d_scan_start_cmd_fixed_param;
  22058. typedef struct {
  22059. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param */
  22060. A_UINT32 vdev_id;
  22061. } wmi_11d_scan_stop_cmd_fixed_param;
  22062. /** FW indicating new current country code to Host */
  22063. typedef struct {
  22064. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param */
  22065. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  22066. } wmi_11d_new_country_event_fixed_param;
  22067. typedef struct {
  22068. /** TLV tag and len; tag equals
  22069. * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
  22070. A_UINT32 tlv_header;
  22071. /* Currently there are no parameters for this message. */
  22072. } wmi_coex_get_antenna_isolation_cmd_fixed_param;
  22073. typedef struct {
  22074. /** TLV tag and len; tag equals
  22075. * WMITLV_TAG_STRUC_wmi_pdev_get_nfcal_power_fixed_param */
  22076. A_UINT32 tlv_header;
  22077. /** pdev_id for identifying the MAC
  22078. * See macros starting with WMI_PDEV_ID_ for values.
  22079. */
  22080. A_UINT32 pdev_id;
  22081. } wmi_pdev_get_nfcal_power_fixed_param;
  22082. typedef struct {
  22083. /** TLV tag and len; tag equals
  22084. * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
  22085. A_UINT32 tlv_header;
  22086. /** 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.
  22087. * Currently the HW descriptor only supports 4 chains at most.
  22088. * Further isolation_chainX elements can be added in the future
  22089. * for additional chains, if needed.
  22090. */
  22091. A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
  22092. isolation_chain1:8, /* [15:8], isolation value for chain 1 */
  22093. isolation_chain2:8, /* [23:16], isolation value for chain 2 */
  22094. isolation_chain3:8; /* [31:24], isolation value for chain 3 */
  22095. } wmi_coex_report_isolation_event_fixed_param;
  22096. typedef enum {
  22097. WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT = 1,
  22098. WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA = 2,
  22099. WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT = 3,
  22100. WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA = 4,
  22101. } wmi_rcpi_measurement_type;
  22102. typedef struct {
  22103. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param */
  22104. A_UINT32 tlv_header;
  22105. /* VDEV identifier */
  22106. A_UINT32 vdev_id;
  22107. /* peer MAC address */
  22108. wmi_mac_addr peer_macaddr;
  22109. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  22110. A_UINT32 measurement_type;
  22111. } wmi_request_rcpi_cmd_fixed_param;
  22112. typedef struct {
  22113. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_rcpi_event_fixed_param */
  22114. A_UINT32 tlv_header;
  22115. /* VDEV identifier */
  22116. A_UINT32 vdev_id;
  22117. /* peer MAC address */
  22118. wmi_mac_addr peer_macaddr;
  22119. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  22120. A_UINT32 measurement_type;
  22121. /* Measured RCPI in dBm of the peer requested by host */
  22122. A_INT32 rcpi;
  22123. /** status
  22124. * 0 - Requested peer RCPI available
  22125. * 1 - Requested peer RCPI not available
  22126. */
  22127. A_UINT32 status;
  22128. } wmi_update_rcpi_event_fixed_param;
  22129. /* Definition of mask for various package id */
  22130. #define WMI_PKGID_MASK_AUTO 0x00000080
  22131. typedef struct {
  22132. /** TLV tag and len; tag equals*/
  22133. A_UINT32 tlv_header;
  22134. /**
  22135. * The value field is filled with WMI_PKGID_MASK values.
  22136. * Currently, the only flag used within values is
  22137. * WMI_PKGID_MASK_AUTO, where bit7=1 for automotive systems.
  22138. */
  22139. A_UINT32 value;
  22140. } wmi_pkgid_event_fixed_param;
  22141. typedef struct {
  22142. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_params */
  22143. A_UINT32 vdev_id; /* vdev id whose mac to be randomized */
  22144. /* enable is set to 1 if mac randomization to be enabled */
  22145. A_UINT32 enable;
  22146. /* randomization mac address if randomization is enabled */
  22147. wmi_mac_addr mac_addr;
  22148. /* To get the PMAC from freq param */
  22149. A_UINT32 freq; /* units in MHz */
  22150. } wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param;
  22151. typedef struct {
  22152. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_event_fixed_params */
  22153. A_UINT32 vdev_id; /* vdev of id whose mac address was randomized */
  22154. A_UINT32 status; /* status is 1 if success and 0 if failed */
  22155. } wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param;
  22156. /* Definition of HW data filtering */
  22157. typedef enum {
  22158. WMI_HW_DATA_FILTER_DROP_NON_ARP_BC = 0x01,
  22159. WMI_HW_DATA_FILTER_DROP_NON_ICMPV6_MC = 0x02,
  22160. } WMI_HW_DATA_FILTER_BITMAP_TYPE;
  22161. typedef struct {
  22162. A_UINT32 tlv_header;
  22163. A_UINT32 vdev_id;
  22164. A_UINT32 enable; /* 1 . enable, 0- disable */
  22165. A_UINT32 hw_filter_bitmap; /* see WMI_HW_DATA_FILTER_BITMAP_TYPE */
  22166. } wmi_hw_data_filter_cmd_fixed_param;
  22167. /* This command is used whenever host wants to restart multiple
  22168. * VDEVs using single command and the VDEV that are restarted will
  22169. * need to have same properties they had before restart except for the
  22170. * operating channel
  22171. */
  22172. typedef struct {
  22173. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param */
  22174. /** pdev_id for identifying the MAC
  22175. * See macros starting with WMI_PDEV_ID_ for values.
  22176. * In non-DBDC case host should set it to 0
  22177. */
  22178. A_UINT32 pdev_id;
  22179. /** unique id identifying the module, generated by the caller */
  22180. A_UINT32 requestor_id;
  22181. /** Disable H/W ack.
  22182. * During CAC, Our HW shouldn't ack directed frames
  22183. */
  22184. A_UINT32 disable_hw_ack;
  22185. /* Determine the duration of CAC on the given channel 'chan' */
  22186. A_UINT32 cac_duration_ms;
  22187. A_UINT32 num_vdevs;
  22188. /* The TLVs follows this structure:
  22189. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  22190. * wmi_channel chan; <------ WMI channel
  22191. */
  22192. } wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param;
  22193. typedef struct {
  22194. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csa_switch_count_status_event_fixed_param */
  22195. A_UINT32 tlv_header;
  22196. /** pdev_id for identifying the MAC
  22197. * See macros starting with WMI_PDEV_ID_ for values.
  22198. * In non-DBDC case host should set it to 0
  22199. */
  22200. A_UINT32 pdev_id;
  22201. /** CSA switch count value in the last transmitted beacon */
  22202. A_UINT32 current_switch_count;
  22203. A_UINT32 num_vdevs;
  22204. /* The TLVs follows this structure:
  22205. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  22206. */
  22207. } wmi_pdev_csa_switch_count_status_event_fixed_param;
  22208. typedef struct {
  22209. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csc_vdev_list */
  22210. A_UINT32 vdev_id;
  22211. A_UINT32 current_switch_count; /** CSC switch count value in the last transmitted beacon */
  22212. } wmi_csc_vdev_list;
  22213. typedef struct {
  22214. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param */
  22215. A_UINT32 tlv_header;
  22216. /** pdev_id for identifying the MAC
  22217. * See macros starting with WMI_PDEV_ID_ for values.
  22218. * In non-DBDC case host should set it to 0
  22219. */
  22220. A_UINT32 pdev_id;
  22221. /** CSC switch count value in the last transmitted beacon */
  22222. A_UINT32 current_switch_count;
  22223. /* The TLVs follows this structure:
  22224. * struct wmi_csc_vdev_list vdev_info[]; // IDs of vdevs and their current switch countdown values
  22225. */
  22226. } wmi_pdev_csc_switch_count_status_event_fixed_param;
  22227. /* Operation types for packet routing command */
  22228. typedef enum {
  22229. WMI_PDEV_ADD_PKT_ROUTING,
  22230. WMI_PDEV_DEL_PKT_ROUTING,
  22231. } wmi_pdev_pkt_routing_op_code;
  22232. /* Packet routing types based on specific data types */
  22233. typedef enum {
  22234. WMI_PDEV_ROUTING_TYPE_ARP_IPV4,
  22235. WMI_PDEV_ROUTING_TYPE_NS_IPV6,
  22236. WMI_PDEV_ROUTING_TYPE_IGMP_IPV4,
  22237. WMI_PDEV_ROUTING_TYPE_MLD_IPV6,
  22238. WMI_PDEV_ROUTING_TYPE_DHCP_IPV4,
  22239. WMI_PDEV_ROUTING_TYPE_DHCP_IPV6,
  22240. WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV4,
  22241. WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV6,
  22242. WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV4,
  22243. WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV6,
  22244. WMI_PDEV_ROUTING_TYPE_ICMP_IPV4,
  22245. WMI_PDEV_ROUTING_TYPE_ICMP_IPV6,
  22246. WMI_PDEV_ROUTING_TYPE_TCP_IPV4,
  22247. WMI_PDEV_ROUTING_TYPE_TCP_IPV6,
  22248. WMI_PDEV_ROUTING_TYPE_UDP_IPV4,
  22249. WMI_PDEV_ROUTING_TYPE_UDP_IPV6,
  22250. WMI_PDEV_ROUTING_TYPE_IPV4,
  22251. WMI_PDEV_ROUTING_TYPE_IPV6,
  22252. WMI_PDEV_ROUTING_TYPE_EAP,
  22253. } wmi_pdev_pkt_routing_type;
  22254. typedef enum {
  22255. WMI_PDEV_WIFIRXCCE_USE_CCE_E = 0,
  22256. WMI_PDEV_WIFIRXCCE_USE_ASPT_E = 1,
  22257. WMI_PDEV_WIFIRXCCE_USE_FT_E = 2,
  22258. WMI_PDEV_WIFIRXCCE_USE_CCE2_E = 3,
  22259. } wmi_pdev_dest_ring_handler_type;
  22260. /* This command shall be sent only when no VDEV is up. If the command is sent after any VDEV is up, target will ignore the command */
  22261. typedef struct {
  22262. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pkt_routing_cmd_fixed_param */
  22263. A_UINT32 tlv_header;
  22264. /** Identifies pdev on which routing needs to be applied */
  22265. A_UINT32 pdev_id;
  22266. /** Indicates the routing operation type: add/delete */
  22267. A_UINT32 op_code; /* wmi_pdev_pkt_routing_op_code */
  22268. /** Bitmap of multiple pkt routing types for a given destination ring and meta data */
  22269. A_UINT32 routing_type_bitmap; /* see wmi_pdev_pkt_routing_type */
  22270. /** 5 bits [4:0] are used to specify the destination ring where the CCE matched
  22271. * packet needs to be routed.
  22272. */
  22273. A_UINT32 dest_ring;
  22274. /** 16 bits [15:0] meta data can be passed to CCE. When the superrule matches,
  22275. * CCE copies this back in RX_MSDU_END_TLV.
  22276. */
  22277. A_UINT32 meta_data;
  22278. /**
  22279. * Indicates the dest ring handler type: CCE, APST, FT, CCE2
  22280. * Refer to wmi_pdev_dest_ring_handler_type / WMI_PDEV_WIFIRXCCE_USE_xxx
  22281. */
  22282. A_UINT32 dest_ring_handler;
  22283. } wmi_pdev_update_pkt_routing_cmd_fixed_param;
  22284. typedef enum {
  22285. WMI_CALIBRATION_NO_FEATURE = 0, /* The board was calibrated with a meta which did not have this feature */
  22286. WMI_CALIBRATION_OK, /* The calibration status is OK */
  22287. WMI_CALIBRATION_NOT_OK, /* The calibration status is NOT OK */
  22288. } WMI_CALIBRATION_STATUS;
  22289. #define WMI_BOARD_MCN_STRING_MAX_SIZE 19
  22290. /**
  22291. * WMI_BOARD_MCN_STRING_BUF_SIZE : represents the number of elements in board_mcn_detail.
  22292. * Since board_mcn_detail is of type A_UINT8, the value of WMI_BOARD_MCN_STRING_BUF_SIZE
  22293. * should be multiple of 4 for alignement reason. And the last byte byte is reserved for
  22294. * null-terminator
  22295. */
  22296. #define WMI_BOARD_MCN_STRING_BUF_SIZE (WMI_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
  22297. typedef struct {
  22298. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param */
  22299. A_UINT32 software_cal_version; /* Current software level calibration data version */
  22300. A_UINT32 board_cal_version; /* Calibration data version programmed on chip */
  22301. A_UINT32 cal_status; /* filled with WMI_CALIBRATION_STATUS enum value */
  22302. /* board_mcn_detail:
  22303. * Provides board's MCN (Material Control Number) information for the host
  22304. * to display. This is used to track the Hardware level revisions/versions.
  22305. * This array carries the ASCII values of the MCN to the host. And host
  22306. * would just print this in a string format whenever user requests.
  22307. * Note: On a big-endian host, the 4 bytes within each A_UINT32 portion
  22308. * of a WMI message will be automatically byteswapped by the copy engine
  22309. * as the messages are transferred between host and target, to convert
  22310. * between the target's little-endianness and the host's big-endianness.
  22311. * Consequently, a big-endian host will have to manually unswap the bytes
  22312. * within the board_mcn_detail string buffer to get the bytes back into
  22313. * the desired natural order.
  22314. */
  22315. A_UINT8 board_mcn_detail[WMI_BOARD_MCN_STRING_BUF_SIZE];
  22316. /** pdev_id for identifying the MAC
  22317. * See macros starting with WMI_PDEV_ID_ for values.
  22318. */
  22319. A_UINT32 pdev_id;
  22320. } wmi_pdev_check_cal_version_event_fixed_param;
  22321. typedef struct {
  22322. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_cmd_fixed_param */
  22323. /** pdev_id for identifying the MAC
  22324. * See macros starting with WMI_PDEV_ID_ for values.
  22325. */
  22326. A_UINT32 pdev_id;
  22327. } wmi_pdev_check_cal_version_cmd_fixed_param;
  22328. typedef struct {
  22329. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_diversity_gain_cmd_fixed_param */
  22330. /** Identifies pdev on which diversity gain to be applied */
  22331. A_UINT32 pdev_id;
  22332. /** The number of spatial stream */
  22333. A_UINT32 nss;
  22334. /** The number of gains */
  22335. A_UINT32 num_gains;
  22336. /*
  22337. * This fixed_param TLV is followed by other TLVs:
  22338. * A_UINT8 diversity_gains[num_gains]; (gain is in dB units)
  22339. */
  22340. } wmi_pdev_set_diversity_gain_cmd_fixed_param;
  22341. /* flags for unit_test_event */
  22342. #define WMI_UNIT_TEST_EVENT_FLAG_STATUS 0 /* 0 = success, 1 = fail */
  22343. #define WMI_UNIT_TEST_EVENT_FLAG_DONE 1 /* 0 = not done, 1 = done */
  22344. /* from bit 2 to bit 31 are reserved */
  22345. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_SUCCESS(flag) do { \
  22346. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  22347. } while (0)
  22348. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_FAIL(flag) do { \
  22349. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  22350. } while (0)
  22351. #define WMI_GET_UNIT_TEST_EVENT_FLAG_STSTUS(flag) \
  22352. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS))
  22353. #define WMI_SET_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  22354. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  22355. } while (0)
  22356. #define WMI_CLR_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  22357. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  22358. } while (0)
  22359. #define WMI_GET_UNIT_TEST_EVENT_FLAG_DONE(flag) \
  22360. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE))
  22361. typedef struct {
  22362. /* TLV tag and len; tag equals WMI_UNIT_TEST_EVENTID */
  22363. A_UINT32 tlv_header;
  22364. /* unique id identifying the VDEV, generated by the caller */
  22365. A_UINT32 vdev_id;
  22366. /* Identify the wlan module */
  22367. A_UINT32 module_id;
  22368. /* unique id identifying the unit test cmd, generated by the caller */
  22369. A_UINT32 diag_token;
  22370. /* flag for the status of the unit_test_cmd */
  22371. A_UINT32 flag;
  22372. /* data length number of bytes for current dump */
  22373. A_UINT32 payload_len;
  22374. /* TLV/Payload after this structure is sent in little endian
  22375. * format for the length mentioned in this structure.
  22376. * A_UINT8 payload[1];
  22377. */
  22378. } wmi_unit_test_event_fixed_param;
  22379. /* Definition of latency levels */
  22380. typedef enum {
  22381. WMI_WLM_LL_NORMAL = 0x0,
  22382. WMI_WLM_LL_MODERATE = 0x1,
  22383. WMI_WLM_LL_LOW = 0x2,
  22384. WMI_WLM_LL_ULTRA_LOW = 0x3,
  22385. } WMI_WLM_LATENCY_LEVEL;
  22386. /*
  22387. * Lay out of flags in wmi_wlm_config_cmd_fixed_param
  22388. *
  22389. * |31 19| 18 | 17|16 14| 13 | 12| 11 | 10 | 9 | 8 |7 6|5 4|3 2| 1 | 0 |
  22390. * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
  22391. * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
  22392. * +------------------------------+---------------+---------+-----------------+
  22393. * | WAL | PS | Roam | Scan |
  22394. *
  22395. * Flag values:
  22396. * TRY: (1) enable short limit for retrying unacked tx, where the limit is
  22397. * based on the traffic's latency level
  22398. * (0) default tx retry behavior
  22399. * EDCA: (1) Apply VO parameters on BE
  22400. * (0) default behavior
  22401. * NSS: (0) no Nss limits, other than those negotiatied during association
  22402. * (1) during 2-chain operation, tx only a single spatial stream
  22403. * (2) - (7) reserved / invalid
  22404. * RTS: (0) default protection
  22405. * (1) always enable RTS/CTS protection
  22406. * SRATE: (0) default secondary rate policy
  22407. * (1) disable secondary rate
  22408. */
  22409. /* bit 0-3 of flags is used for scan operation */
  22410. /* bit 0: WLM_FLAGS_SCAN_SUPPRESS, suppress all scan and other bits would be ignored if bit is set */
  22411. #define WLM_FLAGS_SCAN_SUPPRESS 1 /* suppress all scan request */
  22412. /* bit 1: WLM_FLAGS_SCAN_SKIP_DFS, skip dfs channel if bit is set */
  22413. #define WLM_FLAGS_SCAN_SKIP_DFS 1 /* skip dfs channel operation */
  22414. /* bit 2-3: define policy of dwell time/duration of each foreign channel
  22415. (b3 b2)
  22416. (0 0 ): Default dwell time
  22417. (0 1 ): WLM_FLAGS_STICK_SCAN_DWELL_TIME : Stick to original active/passive dwell time, but split
  22418. foreign channel dwell times into fitting into min (dl_latency, ul_latency). Note it can increase
  22419. overall scan duration.
  22420. (1 0 ): WLM_FLAGS_SHRINK_SCAN_DWELL_TIME: Shrink active/passive dwell time to
  22421. min(dl_latency, ul_latency, dwell_time). It may reduce overall scan duration, but it may decrease
  22422. the accuracy of scan result.
  22423. (1 1 ): reserved
  22424. */
  22425. #define WLM_FLAGS_DEFAULT_SCAN_DWELL_TIME 0 /* Default scan dwell time */
  22426. #define WLM_FLAGS_STICK_SCAN_DWELL_TIME 1 /* Shrink off channel time but extend overall scan duration */
  22427. #define WLM_FLAGS_SHRINK_SCAN_DWELL_TIME 2 /* Shrink scan off channel time */
  22428. /* bit 4-5: reserved for scan */
  22429. /* bit 6-7 of flags is used for roaming operation */
  22430. /* bit 6-7: define roaming policy:
  22431. (b7 b6)
  22432. (0 0 ): WLM_FLAGS_ROAM_ALLOW: Default behavior, allow roaming in all scenarios
  22433. (0 1 ): WLM_FLAGS_ROAM_SUPPRESS: Disallow all roaming
  22434. (1 0 ): WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM: Allow final bmiss roaming only
  22435. (1 1 ): reserved
  22436. */
  22437. #define WLM_FLAGS_ROAM_ALLOW 0
  22438. #define WLM_FLAGS_ROAM_SUPPRESS 1
  22439. #define WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM 2
  22440. /* bit 8: reserved for roaming */
  22441. /* bit 9-11 of flags is used for powersave operation */
  22442. /* bit 9: WLM_FLAGS_PS_DISABLE_BMPS, disable BMPS if bit is set */
  22443. #define WLM_FLAGS_PS_DISABLE_BMPS 1 /* disable BMPS */
  22444. /* bit 10: WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE, disable css power collapse if bit is set */
  22445. #define WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE 1 /* disable css power collapse */
  22446. /* bit 11: WLM_FLAGS_PS_DISABLE_SYS_SLEEP, disable sys sleep if bit is set */
  22447. #define WLM_FLAGS_PS_DISABLE_SYS_SLEEP 1 /* disable sys sleep */
  22448. /* bit 17-31 of flags is reserved for powersave and WAL */
  22449. #define WLM_FLAGS_SCAN_IS_SUPPRESS(flag) WMI_GET_BITS(flag, 0, 1)
  22450. #define WLM_FLAGS_SCAN_SET_SUPPRESS(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  22451. #define WLM_FLAGS_SCAN_IS_SKIP_DFS(flag) WMI_GET_BITS(flag, 1, 1)
  22452. #define WLM_FLAGS_SCAN_SET_SKIP_DFS(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  22453. #define WLM_FLAGS_SCAN_GET_DWELL_TIME_POLICY(flag) WMI_GET_BITS(flag, 2, 2)
  22454. #define WLM_FLAGS_SCAN_SET_DWELL_TIME_POLICY(flag, val) WMI_SET_BITS(flag, 2, 2, val)
  22455. #define WLM_FLAGS_ROAM_GET_POLICY(flag) WMI_GET_BITS(flag, 6, 2)
  22456. #define WLM_FLAGS_ROAM_SET_POLICY(flag, val) WMI_SET_BITS(flag, 6, 2, val)
  22457. #define WLM_FLAGS_PS_IS_BMPS_DISABLED(flag) WMI_GET_BITS(flag, 9, 1)
  22458. #define WLM_FLAGS_PS_IS_CSS_CLPS_DISABLED(flag) WMI_GET_BITS(flag, 10, 1)
  22459. #define WLM_FLAGS_PS_SET_CSS_CLPS_DISABLE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  22460. #define WLM_FLAGS_PS_IS_SYS_SLP_DISABLED(flag) WMI_GET_BITS(flag, 11, 1)
  22461. #define WLM_FLAGS_PS_SET_SYS_SLP_DISABLE(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  22462. #define WLM_FLAGS_WAL_LIMIT_TRY_ENABLED(flag) WMI_GET_BITS(flag, 12, 1)
  22463. #define WLM_FLAGS_WAL_LIMIT_TRY_SET(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  22464. #define WLM_FLAGS_WAL_ADJUST_EDCA_ENABLED(flag) WMI_GET_BITS(flag, 13, 1)
  22465. #define WLM_FLAGS_WAL_ADJUST_EDCA_SET(flag, val) WMI_SET_BITS(flag, 13, 1, val)
  22466. #define WLM_FLAGS_WAL_1NSS_ENABLED(flag) (WMI_GET_BITS(flag, 14, 3) & 0x1)
  22467. #define WLM_FLAGS_WAL_NSS_SET(flag, val) WMI_SET_BITS(flag, 14, 3, val)
  22468. #define WLM_FLAGS_WAL_ALWAYS_RTS_PROTECTION(flag) WMI_GET_BITS(flag, 17, 1)
  22469. #define WLM_FLAGS_WAL_RTS_PROTECTION_SET(flag, val) WMI_SET_BITS(flag, 17, 1, val)
  22470. #define WLM_FLAGS_WAL_DISABLE_SECONDARY_RATE(flag) WMI_GET_BITS(flag, 18, 1)
  22471. #define WLM_FLAGS_WAL_SECONDARY_RATE_SET(flag, val) WMI_SET_BITS(flag, 18, 1, val)
  22472. typedef struct {
  22473. /** TLV tag and len; tag equals
  22474. * WMI_WLM_CONFIG_CMD_fixed_param */
  22475. A_UINT32 tlv_header;
  22476. /* VDEV identifier */
  22477. A_UINT32 vdev_id;
  22478. /* Refer to WMI_WLM_LATENCY_LEVEL
  22479. * Once latency change detected, WLM will notify modules e.g. STAPS or SCAN/ROAM,
  22480. * who subscribed this event. And subscribers, like SCAN, may disable/cutoff offchan
  22481. * operation to support lower latency of WLAN.
  22482. */
  22483. A_UINT32 latency_level;
  22484. /* represent uplink latency in ms
  22485. * This parameter will be used by STAPS module to decide timing parameters, like
  22486. * ITO or SPEC wakeup interval. For SCAN/ROAM, it may used to calculate offchan
  22487. * durations.
  22488. */
  22489. A_UINT32 ul_latency;
  22490. /* represent downlink latency in ms
  22491. * Similar usage as ul_latency
  22492. */
  22493. A_UINT32 dl_latency;
  22494. /* flags for each client of WLM, refer to WLM_FLAGS_ definitions above */
  22495. A_UINT32 flags;
  22496. } wmi_wlm_config_cmd_fixed_param;
  22497. /* Broadcast TWT enable/disable */
  22498. #define TWT_EN_DIS_FLAGS_GET_BTWT(flag) WMI_GET_BITS(flag, 0, 1)
  22499. #define TWT_EN_DIS_FLAGS_SET_BTWT(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  22500. /* legacy MBSSID enable/disable */
  22501. #define TWT_EN_DIS_FLAGS_GET_L_MBSSID(flag) WMI_GET_BITS(flag, 1, 1)
  22502. #define TWT_EN_DIS_FLAGS_SET_L_MBSSID(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  22503. /* 11ax MBSSID enable/disable */
  22504. #define TWT_EN_DIS_FLAGS_GET_AX_MBSSID(flag) WMI_GET_BITS(flag, 2, 1)
  22505. #define TWT_EN_DIS_FLAGS_SET_AX_MBSSID(flag, val) WMI_SET_BITS(flag, 2, 1, val)
  22506. typedef struct {
  22507. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_cmd_fixed_param */
  22508. /** pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0
  22509. */
  22510. A_UINT32 pdev_id;
  22511. A_UINT32 sta_cong_timer_ms; /* STA TWT congestion timer TO value in terms of ms */
  22512. A_UINT32 mbss_support; /* Reserved */
  22513. A_UINT32 default_slot_size; /* This is the default value for the TWT slot setup by AP (units = microseconds) */
  22514. A_UINT32 congestion_thresh_setup; /* Minimum congestion required to start setting up TWT sessions */
  22515. /*
  22516. * The congestion parameters below are in percent of occupied airtime.
  22517. */
  22518. A_UINT32 congestion_thresh_teardown; /* Minimum congestion below which TWT will be torn down */
  22519. A_UINT32 congestion_thresh_critical; /* Threshold above which TWT will not be active */
  22520. /*
  22521. * The interference parameters below use an abstract method of evaluating
  22522. * interference. The parameters are in percent, ranging from 0 for no
  22523. * interference, to 100 for interference extreme enough to completely
  22524. * block the signal of interest.
  22525. */
  22526. A_UINT32 interference_thresh_teardown; /* Minimum interference above that TWT will not be active */
  22527. A_UINT32 interference_thresh_setup; /* Minimum interference below that TWT session can be setup */
  22528. A_UINT32 min_no_sta_setup; /* Minimum no of STA required to start TWT setup */
  22529. A_UINT32 min_no_sta_teardown; /* Minimum no of STA below which TWT will be torn down */
  22530. A_UINT32 no_of_bcast_mcast_slots; /* Number of default slot sizes reserved for BCAST/MCAST delivery */
  22531. A_UINT32 min_no_twt_slots; /* Minimum no of available slots for TWT to be operational */
  22532. A_UINT32 max_no_sta_twt; /* Max no of STA with which TWT is possible (must be <= the wmi_resource_config's twt_ap_sta_count value) */
  22533. /*
  22534. * The below interval parameters have units of milliseconds.
  22535. */
  22536. A_UINT32 mode_check_interval; /* Interval between two successive check to decide the mode of TWT */
  22537. A_UINT32 add_sta_slot_interval; /* Interval between decisions making to create TWT slots for STAs */
  22538. A_UINT32 remove_sta_slot_interval; /* Interval between decisions making to remove TWT slot of STAs */
  22539. A_UINT32 flags; /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
  22540. } wmi_twt_enable_cmd_fixed_param;
  22541. /* status code of enabling TWT */
  22542. typedef enum _WMI_ENABLE_TWT_STATUS_T {
  22543. WMI_ENABLE_TWT_STATUS_OK, /* enabling TWT successfully completed */
  22544. WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED, /* TWT already enabled */
  22545. WMI_ENABLE_TWT_STATUS_NOT_READY, /* FW not ready for enabling TWT */
  22546. WMI_ENABLE_TWT_INVALID_PARAM, /* invalid parameters */
  22547. WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR, /* enabling TWT failed with an unknown reason */
  22548. } WMI_ENABLE_TWT_STATUS_T;
  22549. typedef struct {
  22550. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_complete_event_fixed_param */
  22551. /** pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0 */
  22552. A_UINT32 pdev_id;
  22553. A_UINT32 status; /* WMI_ENABLE_TWT_STATUS_T */
  22554. } wmi_twt_enable_complete_event_fixed_param;
  22555. typedef struct {
  22556. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_cmd_fixed_param */
  22557. /** pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0 */
  22558. A_UINT32 pdev_id; /* host should never set it to WMI_PDEV_ID_SOC */
  22559. A_UINT32 flags; /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
  22560. } wmi_twt_disable_cmd_fixed_param;
  22561. typedef struct {
  22562. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_complete_event_fixed_param */
  22563. A_UINT32 reserved0; /* unused right now */
  22564. } wmi_twt_disable_complete_event_fixed_param;
  22565. /* from IEEE 802.11ah section 9.4.2.200 */
  22566. typedef enum _WMI_TWT_COMMAND_T {
  22567. WMI_TWT_COMMAND_REQUEST_TWT = 0,
  22568. WMI_TWT_COMMAND_SUGGEST_TWT = 1,
  22569. WMI_TWT_COMMAND_DEMAND_TWT = 2,
  22570. WMI_TWT_COMMAND_TWT_GROUPING = 3,
  22571. WMI_TWT_COMMAND_ACCEPT_TWT = 4,
  22572. WMI_TWT_COMMAND_ALTERNATE_TWT = 5,
  22573. WMI_TWT_COMMAND_DICTATE_TWT = 6,
  22574. WMI_TWT_COMMAND_REJECT_TWT = 7,
  22575. } WMI_TWT_COMMAND_T;
  22576. /* TWT command, refer to WMI_TWT_COMMAND_T */
  22577. #define TWT_FLAGS_GET_CMD(flag) WMI_GET_BITS(flag, 0, 8)
  22578. #define TWT_FLAGS_SET_CMD(flag, val) WMI_SET_BITS(flag, 0, 8, val)
  22579. /* 0 means Individual TWT, 1 means Broadcast TWT */
  22580. #define TWT_FLAGS_GET_BROADCAST(flag) WMI_GET_BITS(flag, 8, 1)
  22581. #define TWT_FLAGS_SET_BROADCAST(flag, val) WMI_SET_BITS(flag, 8, 1, val)
  22582. /* 0 means non-Trigger-enabled TWT, 1 means means Trigger-enabled TWT */
  22583. #define TWT_FLAGS_GET_TRIGGER(flag) WMI_GET_BITS(flag, 9, 1)
  22584. #define TWT_FLAGS_SET_TRIGGER(flag, val) WMI_SET_BITS(flag, 9, 1, val)
  22585. /* flow type 0 means announced TWT, 1 means un-announced TWT */
  22586. #define TWT_FLAGS_GET_FLOW_TYPE(flag) WMI_GET_BITS(flag, 10, 1)
  22587. #define TWT_FLAGS_SET_FLOW_TYPE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  22588. /* 0 means TWT protection is required, 1 means TWT protection is not required */
  22589. #define TWT_FLAGS_GET_PROTECTION(flag) WMI_GET_BITS(flag, 11, 1)
  22590. #define TWT_FLAGS_SET_PROTECTION(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  22591. /* B-TWT ID 0: 0 means non-0 B-TWT ID or I-TWT, 1 means B-TWT ID 0 */
  22592. #define TWT_FLAGS_GET_BTWT_ID0(flag) WMI_GET_BITS(flag, 12, 1)
  22593. #define TWT_FLAGS_SET_BTWT_ID0(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  22594. typedef struct {
  22595. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_cmd_fixed_param */
  22596. A_UINT32 vdev_id; /* VDEV identifier */
  22597. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22598. A_UINT32 dialog_id; /* TWT dialog_id (< 0xFF) is per peer, I-TWT & B-TWT use different diaglog ID */
  22599. /* 1. wake_intvl_mantis must be <= 0xFFFF
  22600. * 2. wake_intvl_us must be divided evenly by wake_intvl_mantis,
  22601. * i.e., wake_intvl_us % wake_intvl_mantis == 0
  22602. * 3. the quotient of wake_intvl_us/wake_intvl_mantis must be 2 to N-th(0<=N<=31) power,
  22603. * i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
  22604. */
  22605. A_UINT32 wake_intvl_us; /* TWT Wake Interval in units of us */
  22606. A_UINT32 wake_intvl_mantis; /* TWT Wake Interval Mantissa */
  22607. /* wake_dura_us must be divided evenly by 256, i.e., wake_dura_us % 256 == 0 */
  22608. A_UINT32 wake_dura_us; /* TWT Wake Duration in units of us, must be <= 65280 (0xFF00) */
  22609. A_UINT32 sp_offset_us; /* this long time after TWT setup the 1st SP will start */
  22610. A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
  22611. /* Broadcast TWT(B-TWT) Persistence, when used in Add/update Dialog,
  22612. * indicates for how long(in units of TBTTs) current B-TWT session
  22613. * parameters will not be changed.
  22614. * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
  22615. */
  22616. A_UINT32 b_twt_persistence;
  22617. /* Broadcast TWT(B-TWT) Recommendation, refer to section
  22618. * "9.4.2.199 TWT element" of latest 11ax draft
  22619. */
  22620. A_UINT32 b_twt_recommendation;
  22621. } wmi_twt_add_dialog_cmd_fixed_param;
  22622. /* status code of adding TWT dialog */
  22623. typedef enum _WMI_ADD_TWT_STATUS_T {
  22624. WMI_ADD_TWT_STATUS_OK, /* adding TWT dialog successfully completed */
  22625. WMI_ADD_TWT_STATUS_TWT_NOT_ENABLED, /* TWT not enabled */
  22626. WMI_ADD_TWT_STATUS_USED_DIALOG_ID, /* TWT dialog ID is already used */
  22627. WMI_ADD_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  22628. WMI_ADD_TWT_STATUS_NOT_READY, /* FW not ready */
  22629. WMI_ADD_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  22630. WMI_ADD_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  22631. WMI_ADD_TWT_STATUS_NO_RESPONSE, /* peer AP did not send the response frame */
  22632. WMI_ADD_TWT_STATUS_DENIED, /* AP did not accept the request */
  22633. WMI_ADD_TWT_STATUS_UNKNOWN_ERROR, /* adding TWT dialog failed with an unknown reason */
  22634. } WMI_ADD_TWT_STATUS_T;
  22635. typedef struct {
  22636. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_complete_event_fixed_param */
  22637. A_UINT32 vdev_id; /* VDEV identifier */
  22638. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22639. A_UINT32 dialog_id; /* TWT dialog ID */
  22640. A_UINT32 status; /* refer to WMI_ADD_TWT_STATUS_T */
  22641. } wmi_twt_add_dialog_complete_event_fixed_param;
  22642. typedef struct {
  22643. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_cmd_fixed_param */
  22644. A_UINT32 vdev_id; /* VDEV identifier */
  22645. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22646. A_UINT32 dialog_id; /* TWT dialog ID */
  22647. /* Broadcast TWT(B-TWT) Persistence, when used in Del Dialog,
  22648. * indicates for how long(in units of TBTTs) current B-TWT session
  22649. * parameters will be present.
  22650. * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
  22651. */
  22652. A_UINT32 b_twt_persistence;
  22653. } wmi_twt_del_dialog_cmd_fixed_param;
  22654. /* status code of deleting TWT dialog */
  22655. typedef enum _WMI_DEL_TWT_STATUS_T {
  22656. WMI_DEL_TWT_STATUS_OK, /* deleting TWT dialog successfully completed */
  22657. WMI_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  22658. WMI_DEL_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  22659. WMI_DEL_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  22660. WMI_DEL_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  22661. WMI_DEL_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  22662. WMI_DEL_TWT_STATUS_UNKNOWN_ERROR, /* deleting TWT dialog failed with an unknown reason */
  22663. } WMI_DEL_TWT_STATUS_T;
  22664. typedef struct {
  22665. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_complete_event_fixed_param */
  22666. A_UINT32 vdev_id; /* VDEV identifier */
  22667. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22668. A_UINT32 dialog_id; /* TWT dialog ID */
  22669. A_UINT32 status; /* refer to WMI_DEL_TWT_STATUS_T */
  22670. } wmi_twt_del_dialog_complete_event_fixed_param;
  22671. typedef struct {
  22672. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_cmd_fixed_param */
  22673. A_UINT32 vdev_id; /* VDEV identifier */
  22674. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22675. A_UINT32 dialog_id; /* TWT dialog ID */
  22676. } wmi_twt_pause_dialog_cmd_fixed_param;
  22677. /* status code of pausing TWT dialog */
  22678. typedef enum _WMI_PAUSE_TWT_STATUS_T {
  22679. WMI_PAUSE_TWT_STATUS_OK, /* pausing TWT dialog successfully completed */
  22680. WMI_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  22681. WMI_PAUSE_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  22682. WMI_PAUSE_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  22683. WMI_PAUSE_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  22684. WMI_PAUSE_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  22685. WMI_PAUSE_TWT_STATUS_UNKNOWN_ERROR, /* pausing TWT dialog failed with an unknown reason */
  22686. } WMI_PAUSE_TWT_STATUS_T;
  22687. typedef struct {
  22688. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_complete_event_fixed_param */
  22689. A_UINT32 vdev_id; /* VDEV identifier */
  22690. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22691. A_UINT32 dialog_id; /* TWT dialog ID */
  22692. A_UINT32 status; /* refer to WMI_PAUSE_TWT_STATUS_T */
  22693. } wmi_twt_pause_dialog_complete_event_fixed_param;
  22694. typedef struct {
  22695. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_cmd_fixed_param */
  22696. A_UINT32 vdev_id; /* VDEV identifier */
  22697. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22698. A_UINT32 dialog_id; /* TWT dialog ID */
  22699. A_UINT32 sp_offset_us; /* this long time after TWT resumed the 1st SP will start */
  22700. A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax sectin "9.4.1.60 TWT Information field" */
  22701. } wmi_twt_resume_dialog_cmd_fixed_param;
  22702. /* status code of resuming TWT dialog */
  22703. typedef enum _WMI_RESUME_TWT_STATUS_T {
  22704. WMI_RESUME_TWT_STATUS_OK, /* resuming TWT dialog successfully completed */
  22705. WMI_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  22706. WMI_RESUME_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  22707. WMI_RESUME_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  22708. WMI_RESUME_TWT_STATUS_NOT_PAUSED, /* dialog not paused currently */
  22709. WMI_RESUME_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  22710. WMI_RESUME_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  22711. WMI_RESUME_TWT_STATUS_UNKNOWN_ERROR, /* resuming TWT dialog failed with an unknown reason */
  22712. } WMI_RESUME_TWT_STATUS_T;
  22713. typedef struct {
  22714. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param */
  22715. A_UINT32 vdev_id; /* VDEV identifier */
  22716. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22717. A_UINT32 dialog_id; /* TWT dialog ID */
  22718. A_UINT32 status; /* refer to WMI_RESUME_TWT_STATUS_T */
  22719. } wmi_twt_resume_dialog_complete_event_fixed_param;
  22720. typedef struct {
  22721. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_btwt_invite_sta_cmd_fixed_param */
  22722. A_UINT32 vdev_id; /* VDEV identifier */
  22723. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22724. A_UINT32 dialog_id; /* TWT dialog ID */
  22725. } wmi_twt_btwt_invite_sta_cmd_fixed_param;
  22726. /* status code of inviting STA to B-TWT dialog */
  22727. typedef enum _WMI_TWT_BTWT_INVITE_STA_STATUS_T {
  22728. WMI_TWT_BTWT_INVITE_STA_STATUS_OK, /* inviting STA to B-TWT successfully completed */
  22729. WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  22730. WMI_TWT_BTWT_INVITE_STA_STATUS_INVALID_PARAM, /* invalid parameters */
  22731. WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  22732. WMI_TWT_BTWT_INVITE_STA_STATUS_ALREADY_JOINED, /* peer STA already joined the session */
  22733. WMI_TWT_BTWT_INVITE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */
  22734. WMI_TWT_BTWT_INVITE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */
  22735. WMI_TWT_BTWT_INVITE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */
  22736. } WMI_TWT_BTWT_INVITE_STA_STATUS_T;
  22737. typedef struct {
  22738. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_invite_sta_complete_event_fixed_param */
  22739. A_UINT32 vdev_id; /* VDEV identifier */
  22740. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22741. A_UINT32 dialog_id; /* TWT dialog ID */
  22742. A_UINT32 status; /* refer to WMI_TWT_BTWT_INVITE_STA_STATUS_T */
  22743. } wmi_twt_btwt_invite_sta_complete_event_fixed_param;
  22744. typedef struct {
  22745. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_cmd_fixed_param */
  22746. A_UINT32 vdev_id; /* VDEV identifier */
  22747. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22748. A_UINT32 dialog_id; /* TWT dialog ID */
  22749. } wmi_twt_btwt_remove_sta_cmd_fixed_param;
  22750. /* status code of removing STA from B-TWT dialog */
  22751. typedef enum _WMI_TWT_BTWT_REMOVE_STA_STATUS_T {
  22752. WMI_TWT_BTWT_REMOVE_STA_STATUS_OK, /* removing STA from B-TWT successfully completed */
  22753. WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  22754. WMI_TWT_BTWT_REMOVE_STA_STATUS_INVALID_PARAM, /* invalid parameters */
  22755. WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  22756. WMI_TWT_BTWT_REMOVE_STA_STATUS_NOT_JOINED, /* peer STA not joined yet */
  22757. WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */
  22758. WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */
  22759. WMI_TWT_BTWT_REMOVE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */
  22760. } WMI_TWT_BTWT_REMOVE_STA_STATUS_T;
  22761. typedef struct {
  22762. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_complete_event_fixed_param */
  22763. A_UINT32 vdev_id; /* VDEV identifier */
  22764. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22765. A_UINT32 dialog_id; /* TWT dialog ID */
  22766. A_UINT32 status; /* refer to WMI_TWT_BTWT_REMOVE_STA_STATUS_T */
  22767. } wmi_twt_btwt_remove_sta_complete_event_fixed_param;
  22768. typedef enum {
  22769. WMI_DMA_RING_CONFIG_MODULE_SPECTRAL,
  22770. WMI_DMA_RING_CONFIG_MODULE_RTT,
  22771. } WMI_DMA_RING_SUPPORTED_MODULE;
  22772. typedef struct {
  22773. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_DMA_RING_CAPABILITIES */
  22774. A_UINT32 pdev_id;
  22775. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  22776. A_UINT32 ring_elems_min; /* minimum spaces in the DMA ring for this pdev */
  22777. A_UINT32 min_buf_size; /* minimum size in bytes of each buffer in the DMA ring */
  22778. A_UINT32 min_buf_align; /* minimum alignment in bytes of each buffer in the DMA ring */
  22779. } WMI_DMA_RING_CAPABILITIES;
  22780. typedef struct {
  22781. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_ wmi_chan_rf_characterization_info */
  22782. /**
  22783. * [7:0] : channel metric - 0 = unusable, 1 = worst, 100 = best
  22784. * [11:8] : channel BW - This bit-field uses values compatible with
  22785. * enum definitions used internally within the target's
  22786. * halphy code. This bit field uses wmi_channel_width.
  22787. * [15:12]: Reserved
  22788. * [31:16]: Frequency - Center frequency of the channel for which
  22789. * the RF characterisation info applies (MHz)
  22790. */
  22791. A_UINT32 freq_info;
  22792. } WMI_CHAN_RF_CHARACTERIZATION_INFO;
  22793. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC 0x000000ff
  22794. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC_S 0
  22795. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW 0x00000f00
  22796. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S 8
  22797. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ 0xffff0000
  22798. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ_S 16
  22799. #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_SET(dword,val) \
  22800. WMI_F_RMW((dword)->freq_info,(val), \
  22801. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
  22802. #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_GET(dword) \
  22803. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
  22804. #define WMI_CHAN_RF_CHARACTERIZATION_BW_SET(dword, val) \
  22805. WMI_F_RMW((dword)->freq_info,(val), \
  22806. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
  22807. #define WMI_CHAN_RF_CHARACTERIZATION_BW_GET(dword) \
  22808. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
  22809. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_SET(dword, val) \
  22810. WMI_F_RMW((dword)->freq_info,(val), \
  22811. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
  22812. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_GET(dword) \
  22813. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
  22814. #define WMI_DMA_RING_PADDR_LO_S 0
  22815. #define WMI_DMA_RING_PADDR_LO 0xffffffff
  22816. #define WMI_DMA_RING_BASE_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  22817. #define WMI_DMA_RING_BASE_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  22818. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  22819. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  22820. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  22821. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  22822. #define WMI_DMA_RING_PADDR_HI_S 0
  22823. #define WMI_DMA_RING_PADDR_HI 0xffff
  22824. #define WMI_DMA_RING_BASE_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  22825. #define WMI_DMA_RING_BASE_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  22826. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  22827. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  22828. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  22829. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  22830. typedef struct {
  22831. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_req_fixed_param */
  22832. A_UINT32 pdev_id;
  22833. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  22834. /**
  22835. * Bits 31:0: base address of ring [31:0]
  22836. */
  22837. A_UINT32 base_paddr_lo;
  22838. /**
  22839. * Bits 15:0: base address of ring [47:32]
  22840. * Bits 31:16: reserved (set to 0x0)
  22841. */
  22842. A_UINT32 base_paddr_hi;
  22843. /**
  22844. * Bits 31:0: address of head index [31:0]
  22845. */
  22846. A_UINT32 head_idx_paddr_lo;
  22847. /**
  22848. * Bits 15:0: address of head index [47:32]
  22849. * Bits 31:16: reserved (set to 0x0)
  22850. */
  22851. A_UINT32 head_idx_paddr_hi;
  22852. /**
  22853. * Bits 31:0: address of tail index [31:0]
  22854. */
  22855. A_UINT32 tail_idx_paddr_lo;
  22856. /**
  22857. * Bits 15:0: address of tail index [47:32]
  22858. * Bits 31:16: reserved (set to 0x0)
  22859. */
  22860. A_UINT32 tail_idx_paddr_hi;
  22861. A_UINT32 num_elems; /** Number of elems in the ring */
  22862. A_UINT32 buf_size; /** size of allocated buffer in bytes */
  22863. A_UINT32 num_resp_per_event; /** Number of wmi_dma_buf_release_entry packed together */
  22864. /**
  22865. * This parameter specifies the timeout in milliseconds.
  22866. * Target should timeout and send whatever resp it has if this time expires.
  22867. */
  22868. A_UINT32 event_timeout_ms;
  22869. } wmi_dma_ring_cfg_req_fixed_param;
  22870. typedef struct {
  22871. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_rsp_fixed_param */
  22872. A_UINT32 pdev_id;
  22873. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  22874. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  22875. } wmi_dma_ring_cfg_rsp_fixed_param;
  22876. typedef struct {
  22877. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_fixed_param */
  22878. A_UINT32 pdev_id; /** ID of pdev whose DMA ring produced the data */
  22879. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  22880. A_UINT32 num_buf_release_entry;
  22881. A_UINT32 num_meta_data_entry;
  22882. /* This TLV is followed by another TLV of array of structs.
  22883. * wmi_dma_buf_release_entry entries[num_buf_release_entry];
  22884. * wmi_dma_buf_release_spectral_meta_data meta_datat[num_meta_data_entry];
  22885. */
  22886. } wmi_dma_buf_release_fixed_param;
  22887. typedef struct {
  22888. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_entry */
  22889. /**
  22890. * Bits 31:0: address of data [31:0]
  22891. */
  22892. A_UINT32 paddr_lo;
  22893. /**
  22894. * Bits 11:0: address of data [43:32]
  22895. * Bits 31:12: host context data [19:0]
  22896. */
  22897. A_UINT32 paddr_hi;
  22898. } wmi_dma_buf_release_entry;
  22899. typedef struct {
  22900. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_spectral_meta_data */
  22901. /**
  22902. * meta data information.
  22903. * Host uses the noise floor values as one of the major parameter
  22904. * to classify the spectral data.
  22905. * This information will not be provided by ucode unlike the fft reports
  22906. * which gets DMAed to DDR buffer.
  22907. * Hence sending the NF values in dBm units as meta data information.
  22908. */
  22909. A_INT32 noise_floor[WMI_MAX_CHAINS];
  22910. /**
  22911. * The time taken by target in micro seconds to complete the reset routine
  22912. * and re-initiate the spectral scan.
  22913. * If the delay is 0, the WAR to bookkeep the timestamp wont be exercised
  22914. * in HOST.
  22915. */
  22916. A_UINT32 reset_delay;
  22917. /**
  22918. * Current center freq1 (MHz units)
  22919. */
  22920. A_UINT32 freq1;
  22921. /**
  22922. * Current center freq2 (MHz units)
  22923. */
  22924. A_UINT32 freq2;
  22925. /**
  22926. * Channel Width (MHz units)
  22927. */
  22928. A_UINT32 ch_width;
  22929. } wmi_dma_buf_release_spectral_meta_data;
  22930. typedef enum {
  22931. NO_SCALING = 0, /* No bin scaling*/
  22932. /**
  22933. * scaled_bin_mag = bin_mag *
  22934. * sqrt(10^(max(legacy_max_gain - default_agc_max_gain + low_level_offset - RSSI_corr,
  22935. * (agc_total_gain_db < default_agc_max_gain) * high_level_offset)/10)) *
  22936. * 2^(DET{0,1,2}_SPECTRAL_SCAN_BIN_SCALE - legacy_spectral_scan_bin_scale)
  22937. */
  22938. AGC_GAIN_RSSI_CORR_BASED = 1,
  22939. } WMI_SPECTRAL_SCALING_FORMULA_ID;
  22940. typedef struct {
  22941. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_bin_scaling_params */
  22942. A_UINT32 pdev_id; /* ID of pdev to which the scaling parameters are to be applied */
  22943. WMI_SPECTRAL_SCALING_FORMULA_ID formula_id; /* Represets the formula to be used */
  22944. A_UINT32 low_level_offset; /* low level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  22945. A_UINT32 high_level_offset; /* high level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  22946. A_UINT32 rssi_thr; /* RSSI threshold to be used to adjust the inband power of the given spectral report */
  22947. A_UINT32 default_agc_max_gain;/* DEFAULT AGC MAX GAIN used. Fetched from register RXTD_RADAR_SBS_CTRL_1_L bits20:13 */
  22948. } wmi_spectral_bin_scaling_params;
  22949. typedef struct {
  22950. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_ctl_failsafe_event_params */
  22951. A_UINT32 pdev_id; /* ID of pdev to which ctl failsafe status is sent */
  22952. A_UINT32 ctl_FailsafeStatus; /* To indicate if Failsafe value is imposed on CTL. 0- Success, 1- Failsafe imposed */
  22953. } wmi_pdev_ctl_failsafe_check_fixed_param;
  22954. typedef struct {
  22955. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_runtime_dpd_recal_cmd_fixed_param */
  22956. A_UINT32 enable; /* Enable/disable */
  22957. /* Thermal Thresholds,
  22958. * DPD recalibration will be triggered, when current temperature is
  22959. * either greater than (tmpt_base_c + dlt_tmpt_c_h),
  22960. * or less than (tmpt_base_c + dlt_tmpt_c_l).
  22961. * Here tmpt_base_c is the temperature in centigrade when first run dpd calibration.
  22962. */
  22963. A_UINT32 dlt_tmpt_c_h;
  22964. A_UINT32 dlt_tmpt_c_l;
  22965. /* cooling_time_ms
  22966. * The time (in milliseconds) expected to be needed for the unit
  22967. * to cool from dlt_tmpt_c_h to dlt_tmpt_c_l.
  22968. */
  22969. A_UINT32 cooling_time_ms;
  22970. /* Max duration for dpd re-cal. Unit: ms */
  22971. A_UINT32 dpd_dur_max_ms;
  22972. } wmi_runtime_dpd_recal_cmd_fixed_param;
  22973. typedef enum {
  22974. WMI_ROAM_TRIGGER_REASON_NONE = 0,
  22975. WMI_ROAM_TRIGGER_REASON_PER,
  22976. WMI_ROAM_TRIGGER_REASON_BMISS,
  22977. WMI_ROAM_TRIGGER_REASON_LOW_RSSI,
  22978. WMI_ROAM_TRIGGER_REASON_HIGH_RSSI,
  22979. WMI_ROAM_TRIGGER_REASON_PERIODIC,
  22980. WMI_ROAM_TRIGGER_REASON_MAWC,
  22981. WMI_ROAM_TRIGGER_REASON_DENSE,
  22982. WMI_ROAM_TRIGGER_REASON_BACKGROUND,
  22983. WMI_ROAM_TRIGGER_REASON_FORCED,
  22984. WMI_ROAM_TRIGGER_REASON_BTM,
  22985. WMI_ROAM_TRIGGER_REASON_UNIT_TEST,
  22986. WMI_ROAM_TRIGGER_REASON_BSS_LOAD,
  22987. WMI_ROAM_TRIGGER_REASON_DEAUTH,
  22988. WMI_ROAM_TRIGGER_REASON_IDLE,
  22989. WMI_ROAM_TRIGGER_REASON_MAX,
  22990. } WMI_ROAM_TRIGGER_REASON_ID;
  22991. /* value for DENSE roam trigger */
  22992. #define WMI_RX_TRAFFIC_ABOVE_THRESHOLD 0x1
  22993. #define WMI_TX_TRAFFIC_ABOVE_THRESHOLD 0x2
  22994. typedef struct {
  22995. A_UINT32 trigger_id; /* id from WMI_ROAM_TRIGGER_REASON_ID */
  22996. /* interpretation of trigger value is as follows, for different trigger IDs
  22997. * ID = PER -> value = PER percentage
  22998. * ID = LOW_RSSI -> value = rssi in dB wrt noise floor,
  22999. * ID = HIGH_RSSI -> value = rssi in dB wrt to noise floor,
  23000. * ID = DENSE -> value = specification if it is tx or rx traffic threshold,
  23001. * (see WMI_[RX,TX]_TRAFFIC_ABOVE_THRESHOLD)
  23002. * ID = PERIODIC -> value = periodicity in ms
  23003. *
  23004. * for other IDs trigger_value would be 0 (invalid)
  23005. */
  23006. A_UINT32 trigger_value;
  23007. } wmi_roam_scan_trigger_reason;
  23008. typedef struct {
  23009. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param */
  23010. A_UINT32 vdev_id;
  23011. } wmi_request_roam_scan_stats_cmd_fixed_param;
  23012. /** BSS load configuration parameters for roam trigger */
  23013. typedef struct {
  23014. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_load_cmd_fixed_param */
  23015. A_UINT32 vdev_id;
  23016. /** Minimum number of beacons to be consider for calculating average AP BSS load within time monitor_time_window */
  23017. A_UINT32 beacons_min_count;
  23018. /** Monitor time window in seconds */
  23019. A_UINT32 monitor_time_window;
  23020. /** BSS load threshold after which roam scan should trigger */
  23021. A_UINT32 bss_load_threshold;
  23022. /** rssi_2g_threshold
  23023. * If connected AP is in 2.4Ghz, then consider bss load roam triggered
  23024. * only if load % > bss_load_threshold && connected AP rssi is worse
  23025. * than rssi_2g_threshold.
  23026. */
  23027. A_INT32 rssi_2g_threshold; /* units = dbm */
  23028. /** rssi_5g_threshold
  23029. * If connected AP is in 5Ghz, then consider bss load roam triggered
  23030. * only if load % > bss_load_threshold && connected AP rssi is worse
  23031. * than rssi_5g_threshold.
  23032. */
  23033. A_INT32 rssi_5g_threshold; /* units = dbm */
  23034. } wmi_roam_bss_load_config_cmd_fixed_param;
  23035. /** Deauth roam trigger parameters */
  23036. typedef struct {
  23037. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_deauth_config_cmd_fixed_param */
  23038. A_UINT32 vdev_id;
  23039. /* 1-Enable, 0-Disable */
  23040. A_UINT32 enable;
  23041. } wmi_roam_deauth_config_cmd_fixed_param;
  23042. /** IDLE roam trigger parameters */
  23043. typedef struct {
  23044. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_idle_config_cmd_fixed_param */
  23045. A_UINT32 vdev_id;
  23046. /* 1-Enable, 0-Disable */
  23047. A_UINT32 enable;
  23048. /* Connected AP band. 0 - Any Band, 1 - 2.4Ghz Band, 2 - 5Ghz Band */
  23049. A_UINT32 band;
  23050. /* Trigger Idle roaming only if rssi change of connected AP is within rssi_delta during idle time */
  23051. A_UINT32 rssi_delta; /* units = dB */
  23052. /* Trigger idle roam only if connected RSSI is better than min_rssi */
  23053. A_INT32 min_rssi; /* units = dBm */
  23054. /* Inactive/Idle time duration
  23055. * After screen is OFF (or whatever condition is suitable in a given
  23056. * system as an indication that the system is likely idle)
  23057. * and if below conditions are met then idle roaming will be triggered.
  23058. * 1. Connected AP band is matching with band value configured
  23059. * 2. No TX/RX data for more than idle_time configured
  23060. * or TX/RX data packets count is less than data_packet_count
  23061. * during idle_time
  23062. * 3. Connected AP rssi change is not more than rssi_delta
  23063. * 4. Connected AP rssi is better than min_rssi.
  23064. * The purpose of this trigger for idle scan is to issue the scan
  23065. * even if (moreover, particularly if) the connection to the
  23066. * existing AP is still good, to keep the STA from getting locked
  23067. * onto the current good AP and thus missing out on an available
  23068. * even better AP. This min_rssi threshold can be used to adjust
  23069. * the connection quality level at which the STA considers doing an
  23070. * idle scan.
  23071. */
  23072. A_UINT32 idle_time; /* units = seconds */
  23073. /* Maximum allowed data packets count during idle time */
  23074. A_UINT32 data_packet_count;
  23075. } wmi_roam_idle_config_cmd_fixed_param;
  23076. /** trigger to start/stop monitoring if system is idle command parameters */
  23077. typedef struct {
  23078. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_idle_trigger_monitor_cmd_fixed_param */
  23079. /* idle_trigger_monitor values are from WMI_IDLE_TRIGGER_MONITOR_ID */
  23080. A_UINT32 idle_trigger_monitor;
  23081. } wmi_idle_trigger_monitor_cmd_fixed_param;
  23082. typedef enum {
  23083. WMI_IDLE_TRIGGER_MONITOR_NONE = 0, /* no-op */
  23084. /* IDLE_TRIGGER_MONITOR_ON
  23085. * The host's screen has turned off (or some other event indicating that
  23086. * the system is likely idle) -
  23087. * start monitoring to check if the system is idle.
  23088. */
  23089. WMI_IDLE_TRIGGER_MONITOR_ON,
  23090. /* IDLE_TRIGGER_MONITOR_OFF
  23091. * The host's screen has turned on (or some other event indicating that
  23092. * the system is not idle)
  23093. */
  23094. WMI_IDLE_TRIGGER_MONITOR_OFF,
  23095. } WMI_SCREEN_STATUS_NOTIFY_ID;
  23096. typedef struct {
  23097. /** TLV tag and len; tag equals wmi_pdev_dsm_filter_fixed_param */
  23098. A_UINT32 tlv_header;
  23099. /**
  23100. * TLV (tag length value) parameter's following pdev_dsm_filter_cmd are,
  23101. *
  23102. * wmi_pdev_bssid_disallow_list_config_param bssid_disallow_list[];
  23103. * i.e array containing all disallow AP filter lists including
  23104. * the new DSM lists (avoidlist / driver_blacklist) and existing
  23105. * lists (supplicant_blacklist / rssi_rejectlist etc.)
  23106. */
  23107. } wmi_pdev_dsm_filter_fixed_param;
  23108. typedef struct {
  23109. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_bssid_disallow_list_config_param */
  23110. A_UINT32 tlv_header;
  23111. /** bssid type i.e whether bssid falls in avoid list or driver_blacklist etc.
  23112. see WMI_BSSID_DISALLOW_LIST_TYPE **/
  23113. A_UINT32 bssid_type;
  23114. /** mac address of disallow BSSID */
  23115. wmi_mac_addr bssid;
  23116. /** Disallow AP for certain duration, in units of milliseconds */
  23117. A_UINT32 remaining_disallow_duration;
  23118. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  23119. A_INT32 expected_rssi;
  23120. } wmi_pdev_bssid_disallow_list_config_param;
  23121. typedef enum {
  23122. /* USER_SPACE_BLACK_LIST
  23123. * Black Listed AP's by host's user space
  23124. */
  23125. WMI_BSSID_DISALLOW_USER_SPACE_BLACK_LIST = 1,
  23126. /* DRIVER_BLACK_LIST
  23127. * Black Listed AP's by host driver
  23128. * used for data stall migitation
  23129. */
  23130. WMI_BSSID_DISALLOW_DRIVER_BLACK_LIST,
  23131. /* USER_SPACE_AVOID_LIST
  23132. * Avoid List AP's by host's user space
  23133. * used for data stall migitation
  23134. */
  23135. WMI_BSSID_DISALLOW_USER_SPACE_AVOID_LIST,
  23136. /* DRIVER_AVOID_LIST
  23137. * Avoid List AP's by host driver
  23138. * used for data stall migitation
  23139. */
  23140. WMI_BSSID_DISALLOW_DRIVER_AVOID_LIST,
  23141. /* RSSI_REJECT_LIST
  23142. * OCE AP's
  23143. */
  23144. WMI_BSSID_DISALLOW_RSSI_REJECT_LIST,
  23145. } WMI_BSSID_DISALLOW_LIST_TYPE;
  23146. /* WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST:
  23147. * Maximum number of BSSID disallow entries which host is allowed to send
  23148. * to firmware within the WMI_PDEV_DSM_FILTER_CMDID message.
  23149. */
  23150. #define WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST 28
  23151. /** Roam Pre-Authentication completion status */
  23152. typedef struct {
  23153. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_status_cmd_fixed_param */
  23154. A_UINT32 vdev_id;
  23155. /* preauth_status, 0 - Success, Non Zero - Failure
  23156. * Refer to IEEE Std 802.11-2016 Table 9-46 for meaning of status values.
  23157. */
  23158. A_UINT32 preauth_status;
  23159. /* AP BSSID for which pre-authentication is completed */
  23160. wmi_mac_addr candidate_ap_bssid;
  23161. /**
  23162. * This fixed_param TLV is followed by the below TLVs:
  23163. *
  23164. * PMKID computed after successful pre-authentication. This is valid only if preauth_status is success
  23165. * A_UINT8 pmkid[];
  23166. *
  23167. * PMK computed after successful pre-authentication. This is valid only if preauth_status is success
  23168. * A_UINT8 pmk[];
  23169. */
  23170. } wmi_roam_preauth_status_cmd_fixed_param;
  23171. /** Roam Pre-Authentication start event */
  23172. typedef struct {
  23173. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_start_event_fixed_param */
  23174. A_UINT32 vdev_id;
  23175. /* AP BSSID for which host needs to start pre-authentication */
  23176. wmi_mac_addr candidate_ap_bssid;
  23177. } wmi_roam_preauth_start_event_fixed_param;
  23178. typedef struct {
  23179. /*
  23180. * The timestamp is in units of ticks of a 19.2MHz clock.
  23181. * The timestamp is taken at roam scan start.
  23182. */
  23183. A_UINT32 lower32bit;
  23184. A_UINT32 upper32bit;
  23185. } wmi_roaming_timestamp;
  23186. typedef struct {
  23187. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param */
  23188. A_UINT32 vdev_id;
  23189. /* number of roam scans */
  23190. A_UINT32 num_roam_scans;
  23191. /* This TLV is followed by TLV's:
  23192. * A_UINT32 client_id[num_roam_scans]; based on WMI_SCAN_CLIENT_ID
  23193. * wmi_roaming_timestamp timestamp[num_roam_scans]; clock ticks at the time of scan start
  23194. * A_UINT32 num_channels[num_roam_scans]; number of channels that are scanned
  23195. * A_UINT32 chan_info[]; channel frequencies (MHz) in each scan
  23196. * The num_channels[] elements specify how many elements there are
  23197. * within chan_info[] for each scan.
  23198. * For example, if num_channels = [2, 3] then chan_info will have 5
  23199. * elements, with the first 2 elements from the first scan, and
  23200. * the last 3 elements from the second scan.
  23201. * wmi_mac_addr old_bssid[num_roam_scans]; bssid we are connected to at the time of roaming
  23202. * A_UINT32 is_roaming_success[num_roam_scans]; value is 1 if roaming is successful, 0 if roaming failed
  23203. * wmi_mac_addr new_bssid[num_roam_scans]; bssid after roaming
  23204. * A_UINT32 num_of_roam_candidates[num_roam_scans]; number of candidates found in each roam scan
  23205. * roam_scan_trigger_reason roam_reason[num_roam_scans]; reason for each roam scan
  23206. * wmi_mac_addr bssid[]; bssids of candidates in each roam scan
  23207. * The num_of_roam_candidates[] elements specify how many elements
  23208. * there are within bssid[] for each scan.
  23209. * For example, if num_of_roam_candidates = [2, 3] then bssid will
  23210. * have 5 elements, with the first 2 elements from the first scan,
  23211. * and the last 3 elements from the second scan.
  23212. * A_UINT32 score[]; score of candidates in each roam scan
  23213. * The num_of_roam_candidates[] elements specify how many elements
  23214. * there are within score[] for each scan.
  23215. * For example, if num_of_roam_candidates = [2, 3] then score will
  23216. * have 5 elements, with the first 2 elements from the first scan,
  23217. * and the last 3 elements from the second scan.
  23218. * A_UINT32 channel[]; channel frequency (MHz) of candidates in each roam scan
  23219. * The num_of_roam_candidates[] elements specify how many elements
  23220. * there are within channel[] for each scan.
  23221. * For example, if num_of_roam_candidates = [2, 3] then channel will
  23222. * have 5 elements, with the first 2 elements from the first scan,
  23223. * and the last 3 elements from the second scan.
  23224. * A_UINT32 rssi[]; rssi in dB w.r.t. noise floor of candidates
  23225. * in each roam scan.
  23226. * The num_of_roam_candidates[] elements specify how many elements
  23227. * there are within rssi[] for each scan.
  23228. * For example, if num_of_roam_candidates = [2, 3] then rssi will
  23229. * have 5 elements, with the first 2 elements from the first scan,
  23230. * and the last 3 elements from the second scan.
  23231. */
  23232. } wmi_roam_scan_stats_event_fixed_param;
  23233. typedef struct {
  23234. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_txpower_query_cmd_fixed_param */
  23235. A_UINT32 request_id; /* unique request ID to distinguish the command / event set */
  23236. /* The mode value has the following meaning :
  23237. * 0 : 11a
  23238. * 1 : 11bg
  23239. * 2 : 11b
  23240. * 3 : 11g only
  23241. * 4 : 11a HT20
  23242. * 5 : 11g HT20
  23243. * 6 : 11a HT40
  23244. * 7 : 11g HT40
  23245. * 8 : 11a VHT20
  23246. * 9 : 11a VHT40
  23247. * 10 : 11a VHT80
  23248. * 11 : 11g VHT20
  23249. * 12 : 11g VHT40
  23250. * 13 : 11g VHT80
  23251. * 14 : unknown
  23252. */
  23253. A_UINT32 mode;
  23254. A_UINT32 rate; /* rate index */
  23255. A_UINT32 nss; /* number of spatial stream */
  23256. A_UINT32 beamforming; /* beamforming parameter 0:disabled, 1:enabled */
  23257. A_UINT32 chain_mask; /* mask for the antenna set to get power */
  23258. A_UINT32 chain_index; /* index for the antenna */
  23259. } wmi_get_tpc_power_cmd_fixed_param;
  23260. typedef struct {
  23261. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_tpc_power_evt_fixed_param */
  23262. A_UINT32 request_id; /* request ID set by the command */
  23263. A_INT32 tx_power; /* TX power for the specified HALPHY parameters in half dBm unit */
  23264. } wmi_get_tpc_power_evt_fixed_param;
  23265. /* below structures are related to Motion Detection. */
  23266. typedef struct {
  23267. /** TLV tag and len; tag equals
  23268. * WMITLV_TAG_STRUC_wmi_motion_det_config_params_cmd_fixed_param */
  23269. A_UINT32 tlv_header; /** TLV Header */
  23270. A_UINT32 vdev_id; /** Vdev ID */
  23271. A_UINT32 time_t1; /** Time gap of successive bursts of
  23272. * measurement frames during coarse
  23273. * motion detection (in ms) */
  23274. A_UINT32 time_t2; /** Time gap of successive bursts of
  23275. * measurement frames during fine
  23276. * motion detection (in ms) */
  23277. A_UINT32 n1; /** number of measurement frames in one
  23278. * burst, for coarse detection */
  23279. A_UINT32 n2; /** number of measurement frames in one
  23280. * burst, for fine detection */
  23281. A_UINT32 time_t1_gap; /** gap between measurement frames in
  23282. * course detection (in ms) */
  23283. A_UINT32 time_t2_gap; /** gap between measurement frames in
  23284. * fine detection (in ms) */
  23285. A_UINT32 coarse_K; /** number of times motion detection has to
  23286. * be performed for coarse detection */
  23287. A_UINT32 fine_K; /** number of times motion detection has to
  23288. * be performed for fine detection */
  23289. A_UINT32 coarse_Q; /** number of times motion is expected
  23290. * to be detected for success case in
  23291. * coarse detection */
  23292. A_UINT32 fine_Q; /** number of times motion is expected
  23293. * to be detected for success case in
  23294. * fine detection */
  23295. A_UINT32 md_coarse_thr_high; /** higher threshold value (in percent)
  23296. * from host to FW, which will be used in
  23297. * coarse detection phase of motion detection.
  23298. * This is the threshold for the correlation
  23299. * of the old RF local-scattering environment
  23300. * with the current RF local-scattering
  23301. * environment. A value of 100(%) indicates
  23302. * that neither the transceiver nor any
  23303. * nearby objects have changed position. */
  23304. A_UINT32 md_fine_thr_high; /** higher threshold value (in percent)
  23305. * from host to FW, which will be used in
  23306. * fine detection phase of motion detection.
  23307. * This is the threshold for correlation
  23308. * between the old and current RF environments,
  23309. * as explained above. */
  23310. A_UINT32 md_coarse_thr_low; /** lower threshold value (in percent)
  23311. * for immediate detection of motion in
  23312. * coarse detection phase.
  23313. * This is the threshold for correlation
  23314. * between the old and current RF environments,
  23315. * as explained above. */
  23316. A_UINT32 md_fine_thr_low; /** lower threshold value (in percent)
  23317. * for immediate detection of motion in
  23318. * fine detection phase.
  23319. * This is the threshold for correlation
  23320. * between the old and current RF environments,
  23321. * as explained above. */
  23322. } wmi_motion_det_config_params_cmd_fixed_param;
  23323. typedef struct {
  23324. /** TLV tag and len; tag equals
  23325. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_config_params_cmd_fixed_param */
  23326. A_UINT32 tlv_header; /** TLV Header */
  23327. A_UINT32 vdev_id; /** Vdev ID */
  23328. A_UINT32 bl_time_t; /** time T for baseline (in ms)
  23329. * Every bl_time_t, bl_n packets are sent */
  23330. A_UINT32 bl_packet_gap; /** gap between measurement frames for baseline
  23331. * (in ms) */
  23332. A_UINT32 bl_n; /** number of measurement frames to be sent
  23333. * during one baseline */
  23334. A_UINT32 bl_num_meas; /** number of times the baseline measurement
  23335. * to be done */
  23336. } wmi_motion_det_base_line_config_params_cmd_fixed_param;
  23337. typedef struct {
  23338. /** TLV tag and len; tag equals
  23339. * WMITLV_TAG_STRUC_wmi_motion_det_start_stop_cmd_fixed_param */
  23340. A_UINT32 tlv_header; /** TLV Header */
  23341. A_UINT32 vdev_id; /** Vdev ID */
  23342. A_UINT32 enable; /** start = 1, stop =0 */
  23343. } wmi_motion_det_start_stop_cmd_fixed_param;
  23344. typedef struct {
  23345. /** TLV tag and len; tag equals
  23346. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_start_stop_cmd_fixed_param */
  23347. A_UINT32 tlv_header; /** TLV Header */
  23348. A_UINT32 vdev_id; /** Vdev ID */
  23349. A_UINT32 enable; /** start = 1, stop =0 */
  23350. } wmi_motion_det_base_line_start_stop_cmd_fixed_param;
  23351. typedef struct {
  23352. /** TLV tag and len; tag equals
  23353. * WMITLV_TAG_STRUC_wmi_motion_det_event */
  23354. A_UINT32 tlv_header; /** TLV Header */
  23355. A_UINT32 vdev_id; /** Vdev ID */
  23356. A_UINT32 status; /** status = 1 -> motion detected */
  23357. } wmi_motion_det_event;
  23358. typedef struct {
  23359. /** TLV tag and len; tag equals
  23360. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_event */
  23361. A_UINT32 tlv_header; /** TLV Header */
  23362. A_UINT32 vdev_id; /** Vdev ID */
  23363. A_UINT32 bl_baseline_value; /** baseline correlation value calculated
  23364. * during baselining phase (in %) */
  23365. A_UINT32 bl_max_corr_reserved; /** max corr value obtained during baselining
  23366. * phase (in %); reserved for future */
  23367. A_UINT32 bl_min_corr_reserved; /** min corr value obtained during baselining
  23368. * phase (in %); reserved for future */
  23369. } wmi_motion_det_base_line_event;
  23370. /* Below structures are related to OBSS_PD_SPATIAL Reuse */
  23371. typedef struct {
  23372. /** TLV tag and len; tag equals
  23373. * WMITLV_TAG_STRUC_wmi_obss_set_cmd_fixed_param */
  23374. A_UINT32 tlv_header;
  23375. /** Enable/Disable Spatial Reuse */
  23376. A_UINT32 enable;
  23377. /*
  23378. * In the below fields, "OBSS level" refers to the power of the
  23379. * signals received from "Other BSS".
  23380. * Spatial reuse will only be permitted if the Other BSS's signal power
  23381. * is witin the min to max range specified by the below fields.
  23382. */
  23383. /** Minimum OBSS level to use */
  23384. A_INT32 obss_min; /* RSSI in dBm */
  23385. /** Maximum OBSS level to use */
  23386. A_INT32 obss_max; /* RSSI in dBm */
  23387. /** Vdev id*/
  23388. A_UINT32 vdev_id;
  23389. } wmi_obss_spatial_reuse_set_cmd_fixed_param;
  23390. /*
  23391. * Below structure is related to WMI CMD that configures the default
  23392. * mimimum (OBSS_MIN) and maximum (OBSS_MAX) Other BSS levels (RSSI in dbm)
  23393. * for VDEV of a give type (STA or AP). These thresholds are configured
  23394. * within the Host and passed down to the FW. FW will use these
  23395. * default OBSS_MIN and OBSS_MAX values during roaming if the assoc response
  23396. * from the AP does not include spatial reuse parameter set Info Element.
  23397. */
  23398. typedef struct {
  23399. /** TLV tag and len; tag equals
  23400. * WMITLV_TAG_STRUC_wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param
  23401. */
  23402. A_UINT32 tlv_header;
  23403. /*
  23404. * In the below fields, "OBSS level" refers to the power of the
  23405. * signals received from "Other BSS".
  23406. * Spatial reuse will only be permitted if the Other BSS's signal power
  23407. * is witin the min to max range specified by the below fields.
  23408. */
  23409. /** Minimum OBSS level to use */
  23410. A_INT32 obss_min; /* RSSI in dBm */
  23411. /** Maximum OBSS level to use */
  23412. A_INT32 obss_max; /* RSSI in dBm */
  23413. /** Type of VDEV for which these threshold are applicable.
  23414. * vdev_type should be one of WMI_VDEV_TYPE_STA or WMI_VDEV_TYPE_AP
  23415. */
  23416. A_UINT32 vdev_type;
  23417. } wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param;
  23418. typedef struct {
  23419. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_chan_width_peer_list */
  23420. wmi_mac_addr peer_macaddr;
  23421. A_UINT32 chan_width; /* wmi_channel_width */
  23422. } wmi_chan_width_peer_list;
  23423. typedef struct {
  23424. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_chan_width_switch_cmd_fixed_param */
  23425. A_UINT32 num_peers;
  23426. /*
  23427. * Following this structure is the TLV:
  23428. * struct wmi_chan_width_peer_list chan_width_peer_info[num_peers];
  23429. */
  23430. } wmi_peer_chan_width_switch_cmd_fixed_param;
  23431. typedef struct {
  23432. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_he_tb_action_frm_cmd_fixed_param */
  23433. A_UINT32 tlv_header;
  23434. /* enable or disable HE TB Action frame */
  23435. A_UINT32 enable;
  23436. /* length of action frame body in bytes */
  23437. A_UINT32 data_len;
  23438. /* This TLV is followed by another TLV of array of bytes
  23439. * A_UINT8 data[];
  23440. * This data array contains the action frame raw data
  23441. */
  23442. } wmi_pdev_he_tb_action_frm_cmd_fixed_param;
  23443. typedef struct {
  23444. /** TLV tag and len; tag equals
  23445. * WMITLV_TAG_STRUC_wmi_hpcs_pulse_start_cmd_fixed_param */
  23446. A_UINT32 tlv_header; /** TLV Header */
  23447. A_UINT32 vdev_id; /** Vdev ID */
  23448. A_UINT32 start; /** Start/Stop */
  23449. A_UINT32 sync_time; /** Lower 32-bit of the TSF at which the
  23450. * pulse should be synced. */
  23451. A_UINT32 pulse_interval; /** Periodicity of pulses in micro seconds */
  23452. A_UINT32 active_sync_period; /** Number of beacons to sync before generating
  23453. * pulse in units of beacon interval.
  23454. * Valid for clock slaves only. */
  23455. A_UINT32 gpio_pin; /** GPIO Pin number to be used */
  23456. A_UINT32 pulse_width; /** Duration of pulse in micro seconds */
  23457. } wmi_hpcs_pulse_start_cmd_fixed_param;
  23458. typedef struct {
  23459. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_muedca_params_config_event_fixed_param */
  23460. A_UINT32 tlv_header; /** TLV Header */
  23461. A_UINT32 pdev_id;
  23462. /*
  23463. * The following per-AC arrays are indexed using the
  23464. * WMI_AC_xxx / wmi_traffic_ac enum values.
  23465. */
  23466. /* aifsn
  23467. * Arbitration inter frame spacing number (AIFSN)
  23468. * Values are integers used for back off computation.
  23469. */
  23470. A_UINT32 aifsn[WMI_AC_MAX];
  23471. /* ecwmin
  23472. * Exponent form of ContentionWindow min (ECWmin)
  23473. * Values are integers used for back off computation.
  23474. */
  23475. A_UINT32 ecwmin[WMI_AC_MAX];
  23476. /* ecwmax
  23477. * Exponent form of ContentionWindow max (ECWmax)
  23478. * Values are integers used for back off computation.
  23479. */
  23480. A_UINT32 ecwmax[WMI_AC_MAX];
  23481. /* muedca_expiration_time
  23482. * MU EDCA Expiration time refers to the length of time after the most
  23483. * recent UL trigger time. The MU EDCA Timer field indicates the time
  23484. * limit, in units of 8 TUs
  23485. */
  23486. A_UINT32 muedca_expiration_time[WMI_AC_MAX];
  23487. } wmi_muedca_params_config_event_fixed_param;
  23488. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  23489. #define WMI_HEOPS_DEFPE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 0, 3)
  23490. #define WMI_HEOPS_DEFPE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 0, 3, value)
  23491. /* TWT required */
  23492. #define WMI_HEOPS_TWT_REQUIRED_GET_D3(he_ops) WMI_GET_BITS(he_ops, 3, 1)
  23493. #define WMI_HEOPS_TWT_REQUIRED_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 3, 1, value)
  23494. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  23495. #define WMI_HEOPS_RTSTHLD_GET_D3(he_ops) WMI_GET_BITS(he_ops, 4, 10)
  23496. #define WMI_HEOPS_RTSTHLD_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 4, 10, value)
  23497. /* VHT Operation Information Present */
  23498. #define WMI_HEOPS_VHTOPSPRSNT_GET_D3(he_ops) WMI_GET_BITS(he_ops, 14, 1)
  23499. #define WMI_HEOPS_VHTOPSPRSNT_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 14, 1, value)
  23500. /* Co-Located BSS */
  23501. #define WMI_HEOPS_COLOCBSS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 15, 1)
  23502. #define WMI_HEOPS_COLOCBSS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 15, 1, value)
  23503. /* ER SU Disable */
  23504. #define WMI_HEOPS_ERSUDIS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 16, 1)
  23505. #define WMI_HEOPS_ERSUDIS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 16, 1, value)
  23506. /* bit17 - bit23 are reserved */
  23507. /* BSS color */
  23508. #define WMI_HEOPS_COLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 24, 6)
  23509. #define WMI_HEOPS_COLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 24, 6, value)
  23510. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  23511. #define WMI_HEOPS_PARTBSSCOLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  23512. #define WMI_HEOPS_PARTBSSCOLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  23513. /* when set to 1 disables use of BSS color */
  23514. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 31, 1)
  23515. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 31, 1, value)
  23516. /* PHY Capabilities Information field */
  23517. /* bit 0 reserved */
  23518. /*
  23519. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  23520. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  23521. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  23522. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  23523. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  23524. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  23525. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  23526. * 242-tone RU mapping in 40 MHz and 80
  23527. * MHz channel width in 5 GHz. Otherwise Reserved.
  23528. * B6: Reserved
  23529. */
  23530. #define WMI_HECAP_PHY_CBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  23531. #define WMI_HECAP_PHY_CBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  23532. /*
  23533. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  23534. * where in the preamble only the secondary 20 MHz is punctured
  23535. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  23536. * where in the preamble only one of the two 20 MHz sub-channels in the
  23537. * secondary 40 MHz is punctured
  23538. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  23539. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  23540. * secondary 20 MHz is punctured
  23541. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  23542. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  23543. * primary 40 MHz is present
  23544. */
  23545. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  23546. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  23547. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  23548. #define WMI_HECAP_PHY_COD_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  23549. #define WMI_HECAP_PHY_COD_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  23550. /* Indicates support of transmission and reception of LDPC encoded packets */
  23551. #define WMI_HECAP_PHY_LDPC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  23552. #define WMI_HECAP_PHY_LDPC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  23553. /*
  23554. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  23555. */
  23556. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  23557. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  23558. /*
  23559. * If the Doppler Rx subfield is 1, indicates the maximum number of space-time streams supported for reception
  23560. * when a midamble is present in the Data field.
  23561. * If the Doppler Tx subfield is 1, indicates the maximum number of space-time streams supported for transmission
  23562. * when a midamble is present in the Data field.
  23563. * If both Doppler Rx and Doppler Tx subfields are 1, indicates the maximum number of space-time streams
  23564. * supported for transmission and reception when a midamble is present in the Data field.
  23565. */
  23566. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  23567. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  23568. /*
  23569. * B0: For a transmitting STA acting as beamformee, it indicates support of
  23570. * NDP reception using 4x LTF and 3.2 us guard interval duration
  23571. */
  23572. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  23573. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  23574. /*
  23575. * indicates support for the transmission of an HE TB PPDU that has a
  23576. * bandwidth less than or equal to 80 MHz and is using STBC and with
  23577. * one spatial stream
  23578. */
  23579. #define WMI_HECAP_PHY_TXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  23580. #define WMI_HECAP_PHY_TXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  23581. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx */
  23582. #define WMI_HECAP_PHY_RXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  23583. #define WMI_HECAP_PHY_RXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  23584. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  23585. #define WMI_HECAP_PHY_TXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  23586. #define WMI_HECAP_PHY_TXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  23587. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  23588. #define WMI_HECAP_PHY_RXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  23589. #define WMI_HECAP_PHY_RXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  23590. /*
  23591. * If the transmitting STA is an AP:
  23592. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  23593. * transmission.
  23594. * If the transmitting STA is a non-AP STA:
  23595. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  23596. * transmission.
  23597. */
  23598. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  23599. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  23600. /*
  23601. * If the transmitting STA is an AP:
  23602. * indicates STA supports of reception of UL MUMIMO transmission on an
  23603. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  23604. * If the transmitting STA is a non-AP STA:
  23605. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  23606. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  23607. */
  23608. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  23609. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  23610. /* Tx DCM
  23611. * B0:B1
  23612. * 00: Does not support DCM
  23613. * 01: BPSK
  23614. * 10: QPSK
  23615. * 11: 16-QAM
  23616. * B2 signals maximum number of spatial streams with DCM
  23617. * 0: 1 spatial stream
  23618. * 1: 2 spatial streams
  23619. */
  23620. #define WMI_HECAP_PHY_DCMTX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  23621. #define WMI_HECAP_PHY_DCMTX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  23622. /* Rx DCM
  23623. * B0:B1
  23624. * 00: Does not support DCM
  23625. * 01: BPSK
  23626. * 10: QPSK
  23627. * 11: 16-QAM
  23628. * B2 signals maximum number of spatial streams with DCM
  23629. * 0: 1 spatial stream
  23630. * 1: 2 spatial streams
  23631. */
  23632. #define WMI_HECAP_PHY_DCMRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  23633. #define WMI_HECAP_PHY_DCMRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  23634. /*
  23635. * Indicates that the STA supports the reception of an HE MU PPDU payload
  23636. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  23637. */
  23638. #define WMI_HECAP_PHY_ULHEMU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  23639. #define WMI_HECAP_PHY_ULHEMU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  23640. /* Indicates support for operation as an SU beamformer */
  23641. #define WMI_HECAP_PHY_SUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  23642. #define WMI_HECAP_PHY_SUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  23643. /* Indicates support for operation as an SU beamformee */
  23644. #define WMI_HECAP_PHY_SUBFME_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  23645. #define WMI_HECAP_PHY_SUBFME_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  23646. /* Indicates support for operation as an MU Beamformer */
  23647. #define WMI_HECAP_PHY_MUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  23648. #define WMI_HECAP_PHY_MUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  23649. /*
  23650. * Num STS -1 for <= 80MHz (min val 3)
  23651. * The maximum number of space-time streams minus 1 that the STA can
  23652. * receive in an HE NDP
  23653. */
  23654. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  23655. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  23656. /*
  23657. * Num STS -1 for > 80MHz (min val 3)
  23658. * The maximum number of space-time streams minus 1 that the STA can
  23659. * receive in an HE NDP
  23660. */
  23661. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  23662. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  23663. /*
  23664. * Number Of Sounding Dimensions For <= 80 MHz
  23665. * If SU beamformer capable, set to the maximum supported value of the
  23666. * TXVECTOR parameter NUM_STS minus 1.
  23667. * Otherwise, reserved.
  23668. */
  23669. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  23670. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  23671. /*
  23672. * Number Of Sounding Dimensions For > 80 MHz
  23673. * If SU beamformer capable, set to the maximum supported value of the
  23674. * TXVECTOR parameter NUM_STS minus 1.
  23675. * Otherwise, reserved.
  23676. */
  23677. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  23678. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  23679. /*
  23680. * Indicates if the HE beamformee is capable of feedback with tone
  23681. * grouping of 16 in the HE Compressed Beamforming Report field for
  23682. * a SU-type feedback.
  23683. */
  23684. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  23685. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  23686. /*
  23687. * Indicates if the HE beamformee is capable of feedback with tone
  23688. * grouping of 16 in the HE Compressed Beamforming Report field for
  23689. * a MU-type feedback.
  23690. */
  23691. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  23692. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  23693. /*
  23694. * Indicates if HE beamformee is capable of feedback with codebook
  23695. * size {4, 2} in the HECompressed Beamforming Report field for
  23696. * a SU-type feedback.
  23697. */
  23698. #define WMI_HECAP_PHY_CODBK42SU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  23699. #define WMI_HECAP_PHY_CODBK42SU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  23700. /*
  23701. * Indicates if HE beamformee is capable of feedback with codebook
  23702. * size {7, 5} in the HE Compressed Beamforming Report field for
  23703. * a MU-type feedback.
  23704. */
  23705. #define WMI_HECAP_PHY_CODBK75MU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  23706. #define WMI_HECAP_PHY_CODBK75MU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  23707. /*
  23708. * Beamforming Feedback With Trigger Frame
  23709. * If the transmitting STA is an AP STA:
  23710. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  23711. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  23712. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  23713. * If the transmitting STA is a non-AP STA:
  23714. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  23715. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  23716. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  23717. */
  23718. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  23719. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  23720. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  23721. * over the right 106-tone RU or partial BW ER
  23722. */
  23723. #define WMI_HECAP_PHY_HEERSU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  23724. #define WMI_HECAP_PHY_HEERSU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  23725. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  23726. * where the RU does not span the entire PPDU bandwidth.
  23727. */
  23728. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  23729. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  23730. /* Indicates whether or not the PPE Threshold field is present */
  23731. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  23732. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  23733. /* Indicates that the STA supports SRP-based SR operation */
  23734. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  23735. #define WMI_HECAP_PHY_SRPPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  23736. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  23737. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  23738. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  23739. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  23740. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  23741. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  23742. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  23743. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  23744. * minus 1. Otherwise, reserved.
  23745. */
  23746. #define WMI_HECAP_PHY_MAXNC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  23747. #define WMI_HECAP_PHY_MAXNC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  23748. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  23749. * STBC with one spatial stream
  23750. */
  23751. #define WMI_HECAP_PHY_STBCTXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  23752. #define WMI_HECAP_PHY_STBCTXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  23753. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  23754. * STBC with one spatial stream
  23755. */
  23756. #define WMI_HECAP_PHY_STBCRXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  23757. #define WMI_HECAP_PHY_STBCRXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  23758. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  23759. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  23760. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  23761. /*
  23762. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  23763. * receiver of a 40 MHz HE MU PPDU in 2.4 GHz band, or the transmitter of a 40 MHz HE TB PPDU in 2.4GHz band.
  23764. */
  23765. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  23766. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  23767. /*
  23768. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  23769. * receiver of a 80+80 MHz or a 160 MHz HE MU PPDU, or the transmitter of a 80+80 MHz or 160 MHz HE TB PPDU.
  23770. */
  23771. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  23772. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  23773. /*
  23774. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  23775. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  23776. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  23777. * 160 MHz HE TB PPDU.
  23778. */
  23779. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  23780. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  23781. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  23782. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  23783. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  23784. /*
  23785. * If the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF in
  23786. * HE SU PPDU if the HE SU PPDU With 1x HE-LTF And 0.8 s GI subfield is set to 1, and 1x HE-LTF in
  23787. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  23788. *
  23789. * If the Doppler Tx subfield is 1, indicates support for transmitting midambles with 2x HE-LTF, 1x HE-LTF
  23790. * in HE TB PPDU when allowed.
  23791. * If both the Doppler Rx and Doppler Tx subfields are 1, indicates support for receiving midambles with 2x HELTF,
  23792. * 1x HE-LTF in HE SU PPDU if the HE SU PPDU With 1x HE-LTF And 0.8 s GI subfield is set to 1, and
  23793. * 1x HE-LTF in HE ER SU PPDU if the HE ER SU PPDU With 1x HE-LTF And 0.8 s GI subfield is set
  23794. * to 1; and also support for transmitting midambles with 2x HE-LTF, 1x HE-LTF in HE TB PPDU when allowed.
  23795. */
  23796. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  23797. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  23798. /*
  23799. * If the DCM Max Constellation Tx subfield is greater than 0, then the DCM Max BW subfield indicates the
  23800. * maximum bandwidth of a PPDU that the STA might transmit with DCM applied.
  23801. *
  23802. * If the DCM Max Constellation Rx subfield is greater than 0, then the DCM Max BW subfield indicates the
  23803. * maximum bandwidth of a PPDU with DCM applied that the STA can receive.
  23804. *
  23805. * If both the DCM Max Constellation Tx subfield and DCM Max Constellation Rx subfield are 0, then this
  23806. * subfield is reserved.
  23807. *
  23808. * 0=20MHz, 1=40Mhz, 2=80Mhz, 3=160Mhz or 80+80Mhz
  23809. */
  23810. #define WMI_HECAP_PHY_DCMMAXBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 6, 2)
  23811. #define WMI_HECAP_PHY_DCMMAXBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 6, 2, value)
  23812. /*
  23813. * For a non-AP STA, indicates support for receiving a DL HE MU PPDU where the number of OFDM symbols
  23814. * in the HE SIG-B field is greater than 16.
  23815. */
  23816. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 8, 1)
  23817. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 8, 1, value)
  23818. /*
  23819. * For an AP, indicates support for the reception of full bandwidth non-triggered CQI-only feedback.
  23820. * For a non-AP STA, indicates support for the transmission of full bandwidth non-triggered CQI-only feedback.
  23821. */
  23822. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 9, 1)
  23823. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 9, 1, value)
  23824. /*
  23825. * For a non-AP STA, indicates support for the transmission of 1024-QAM on a 26-, 52-, and 106-tone RU.
  23826. * Reserved for an AP.
  23827. */
  23828. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 10, 1)
  23829. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 10, 1, value)
  23830. /*
  23831. * Indicates support for the reception of 1024-QAM on a 26-, 52-, and 106-tone RU.
  23832. */
  23833. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 11, 1)
  23834. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 11, 1, value)
  23835. /*
  23836. * Indicates support for reception of an HE MU PPDU with an RU spanning the entire PPDU bandwidth and a
  23837. * compressed HE-SIG-B format.
  23838. */
  23839. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 12, 1)
  23840. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 12, 1, value)
  23841. /*
  23842. * Indicates support for reception of an HE MU PPDU with a bandwidth less than or equal to 80 MHz, an RU
  23843. * spanning the entire PPDU bandwidth and a non-compressed HE-SIG-B format.
  23844. */
  23845. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 13, 1)
  23846. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 13, 1, value)
  23847. /* HE MAC Capabilities Information field format */
  23848. /* HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field */
  23849. #define WMI_HECAP_MAC_HECTRL_GET_D3(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  23850. #define WMI_HECAP_MAC_HECTRL_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  23851. /* set to 1 to for TWT Requestor support */
  23852. #define WMI_HECAP_MAC_TWTREQ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  23853. #define WMI_HECAP_MAC_TWTREQ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  23854. /* set to 1 to for TWT Responder support */
  23855. #define WMI_HECAP_MAC_TWTRSP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  23856. #define WMI_HECAP_MAC_TWTRSP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  23857. /* Level of frag support
  23858. Set to 0 for no support for dynamic fragmentation.
  23859. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  23860. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  23861. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  23862. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  23863. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  23864. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  23865. */
  23866. #define WMI_HECAP_MAC_HEFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  23867. #define WMI_HECAP_MAC_HEFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  23868. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs */
  23869. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  23870. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  23871. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  23872. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  23873. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  23874. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  23875. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  23876. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  23877. /* Indicates the number of TIDs of QoS Data frames that an HE STA can receive in a multi-TID AMPDU */
  23878. #define WMI_HECAP_MAC_MTID_RX_GET_D3(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  23879. #define WMI_HECAP_MAC_MTID_RX_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  23880. /* Indicates support for link adaptation using the HLA Control subfield. */
  23881. #define WMI_HECAP_MAC_HELINK_ADPT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 15, 2)
  23882. #define WMI_HECAP_MAC_HELINK_ADPT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 15, 2, value)
  23883. /* Set to 1 for reception of AllAck support */
  23884. #define WMI_HECAP_MAC_AACK_GET_D3(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  23885. #define WMI_HECAP_MAC_AACK_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  23886. /* Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field */
  23887. #define WMI_HECAP_MAC_TRS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  23888. #define WMI_HECAP_MAC_TRS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  23889. /* Set to 1 if the STA supports the BSR A-Control field functionality.*/
  23890. #define WMI_HECAP_MAC_BSR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  23891. #define WMI_HECAP_MAC_BSR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  23892. /* Set to 1 when the STA supports broadcast TWT functionality.*/
  23893. #define WMI_HECAP_MAC_BCSTTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  23894. #define WMI_HECAP_MAC_BCSTTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  23895. /* Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap */
  23896. #define WMI_HECAP_MAC_32BITBA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  23897. #define WMI_HECAP_MAC_32BITBA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  23898. /* Set to 1 if the STA supports MU cascading operation */
  23899. #define WMI_HECAP_MAC_MUCASCADE_GET_D3(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  23900. #define WMI_HECAP_MAC_MUCASCADE_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  23901. /* Set to 1 when the STA supports reception of this multi-TID A-MPDU format */
  23902. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  23903. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  23904. /* bit 24 - reserved */
  23905. /* Set to 1 if the STA supports reception of the OMI A-Control field */
  23906. #define WMI_HECAP_MAC_OMI_GET_D3(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  23907. #define WMI_HECAP_MAC_OMI_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  23908. /*1 if OFDMA Random Access Supported */
  23909. #define WMI_HECAP_MAC_OFDMARA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  23910. #define WMI_HECAP_MAC_OFDMARA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  23911. /* Maximum AMPDU Length Exponent.
  23912. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  23913. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  23914. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  23915. * padding is not included in this limit.
  23916. */
  23917. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  23918. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  23919. /* A-MSDU Fragmentation Support */
  23920. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  23921. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  23922. /* Flexible TWT Schedule Support */
  23923. #define WMI_HECAP_MAC_FLEXTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  23924. #define WMI_HECAP_MAC_FLEXTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  23925. /* Rx Control Frame to MultiBSS */
  23926. #define WMI_HECAP_MAC_MBSS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  23927. #define WMI_HECAP_MAC_MBSS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  23928. /* 2nd DWORD of HE MAC Capabilities */
  23929. /* BSRP A-MPDU Aggregation
  23930. * maintaining compatability since we dont support this now so not wasting memory
  23931. */
  23932. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 0, 1)
  23933. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 0, 1, value)
  23934. /* Quiet Time Period (QTP) operation
  23935. * maintaining compatability since we dont support this now so not wasting memory
  23936. */
  23937. #define WMI_HECAP_MAC_QTP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 1, 1)
  23938. #define WMI_HECAP_MAC_QTP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 1, 1, value)
  23939. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  23940. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  23941. * that contains a BQR in the A-Control subfield
  23942. * maintaining compatability since we dont support this now so not wasting memory
  23943. */
  23944. #define WMI_HECAP_MAC_ABQR_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 2, 1)
  23945. #define WMI_HECAP_MAC_ABQR_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 2, 1, value)
  23946. /* Indicates support by the STA for the role of SRP Responder.*/
  23947. #define WMI_HECAP_MAC_SRPRESP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 3, 1)
  23948. #define WMI_HECAP_MAC_SRPRESP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 3, 1, value)
  23949. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  23950. * the NDP Feedback Report Poll Trigger frame.
  23951. */
  23952. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 4, 1)
  23953. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 4, 1, value)
  23954. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  23955. * frames or TIM frames as described in AP operation for opportunistic power save.
  23956. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  23957. */
  23958. #define WMI_HECAP_MAC_OPS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 5, 1)
  23959. #define WMI_HECAP_MAC_OPS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 5, 1, value)
  23960. /* Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  23961. * a QoS Data frame for which no block ack agreement exists.
  23962. */
  23963. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 6, 1)
  23964. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 6, 1, value)
  23965. /* Indicates the number of TIDs of QoS Data frames that an HE STA can transmit in a multi-TID AMPDU */
  23966. #define WMI_HECAP_MAC_MTID_TX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 7, 3)
  23967. #define WMI_HECAP_MAC_MTID_TX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 7, 3, value)
  23968. /* Indicates whether an HE STA supports an HE subchannel selective transmission operation */
  23969. #define WMI_HECAP_MAC_SUBCHANSELTX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 10, 1)
  23970. #define WMI_HECAP_MAC_SUBCHANSELTX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 10, 1, value)
  23971. /* Indicates support by a STA to receive a TRS Control subfield or a Trigger frame with a User Info
  23972. * field addressed to the STA with the RU Allocation subfield of the TRS Control subfield or the User
  23973. * Info field indicating 2x996-tone.
  23974. */
  23975. #define WMI_HECAP_MAC_UL2X996RU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 11, 1)
  23976. #define WMI_HECAP_MAC_UL2X996RU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 11, 1, value)
  23977. /* Indicates whether an AP supports interpretation of the UL MU Data Disable subfield of the OM Control subfield */
  23978. #define WMI_HECAP_MAC_OMCULMUDDIS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 12, 1)
  23979. #define WMI_HECAP_MAC_OMCULMUDDIS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 12, 1, value)
  23980. /* Indicates the spatial multiplexing power save mode after receiving a
  23981. * Trigger frame that is in operation immediately after (re)association.
  23982. */
  23983. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 13, 1)
  23984. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 13, 1, value)
  23985. /* Indicates support for Punctured Sounding */
  23986. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 14, 1)
  23987. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 14, 1, value)
  23988. /* Indicates support for receiving a Trigger frame in an HT PPDU and
  23989. * receiving a Trigger frame in a VHT PPDU
  23990. */
  23991. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 15, 1)
  23992. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 15, 1, value)
  23993. /*
  23994. * The following conditionally-defined macros can be used in systems
  23995. * which only support either 802.11ax draft 2 or 802.11ax draft 3,
  23996. * but not both, and which make this D2 vs. D3 selection at build time.
  23997. */
  23998. #ifdef SUPPORT_11AX_D3
  23999. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D3
  24000. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D3
  24001. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D3
  24002. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D3
  24003. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D3
  24004. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D3
  24005. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_REQUIRED_GET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET */
  24006. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_REQUIRED_SET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET */
  24007. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D3
  24008. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D3
  24009. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D3
  24010. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D3
  24011. #define WMI_HEOPS_COLOCBSS_GET WMI_HEOPS_COLOCBSS_GET_D3
  24012. #define WMI_HEOPS_COLOCBSS_SET WMI_HEOPS_COLOCBSS_SET_D3
  24013. #define WMI_HEOPS_VHTOPSPRSNT_GET WMI_HEOPS_VHTOPSPRSNT_GET_D3
  24014. #define WMI_HEOPS_VHTOPSPRSNT_SET WMI_HEOPS_VHTOPSPRSNT_SET_D3
  24015. #define WMI_HEOPS_ERSUDIS_GET WMI_HEOPS_ERSUDIS_GET_D3
  24016. #define WMI_HEOPS_ERSUDIS_SET WMI_HEOPS_ERSUDIS_SET_D3
  24017. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D3
  24018. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D3
  24019. #define WMI_HEOPS_TXBSSID_GET(he_ops) (0) /* DEPRECATED - DO NOT USE */
  24020. #define WMI_HEOPS_TXBSSID_SET(he_ops, value) /* DEPRECATED - DO NOT USE */
  24021. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D3
  24022. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D3
  24023. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3
  24024. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3
  24025. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D3
  24026. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D3
  24027. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D3
  24028. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D3
  24029. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  24030. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  24031. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  24032. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  24033. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D3
  24034. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D3
  24035. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3
  24036. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3
  24037. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D3
  24038. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D3
  24039. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D3
  24040. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D3
  24041. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D3
  24042. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D3
  24043. #define WMI_HECAP_PHY_TXDOPPLER WMI_HECAP_PHY_TXDOPPLER_GET_D3
  24044. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D3
  24045. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D3
  24046. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D3
  24047. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D3
  24048. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D3
  24049. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3
  24050. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3
  24051. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D3
  24052. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D3
  24053. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D3
  24054. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D3
  24055. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  24056. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCMRX_GET_D3
  24057. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCMRX_SET_D3
  24058. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D3
  24059. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D3
  24060. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D3
  24061. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D3
  24062. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D3
  24063. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D3
  24064. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D3
  24065. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D3
  24066. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  24067. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  24068. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  24069. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  24070. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  24071. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  24072. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  24073. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  24074. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3
  24075. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3
  24076. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3
  24077. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3
  24078. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3
  24079. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3
  24080. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3
  24081. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3
  24082. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D3
  24083. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D3
  24084. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D3
  24085. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D3
  24086. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3
  24087. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3
  24088. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D3
  24089. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D3
  24090. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3
  24091. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3
  24092. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D3
  24093. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D3
  24094. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D3
  24095. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D3
  24096. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D3
  24097. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D3
  24098. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3
  24099. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3
  24100. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D3
  24101. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D3
  24102. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D3
  24103. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D3
  24104. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D3
  24105. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D3
  24106. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3
  24107. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3
  24108. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3
  24109. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3
  24110. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3
  24111. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3
  24112. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3
  24113. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3
  24114. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3
  24115. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3
  24116. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3
  24117. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3
  24118. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET /* DEPRECATED */
  24119. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET /* DEPRECATED */
  24120. #define WMI_HECAP_PHY_DCMMAXBW_GET WMI_HECAP_PHY_DCMMAXBW_GET_D3
  24121. #define WMI_HECAP_PHY_DCMMAXBW_SET WMI_HECAP_PHY_DCMMAXBW_SET_D3
  24122. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3
  24123. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3
  24124. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3
  24125. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3
  24126. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3
  24127. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3
  24128. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3
  24129. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3
  24130. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3
  24131. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3
  24132. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3
  24133. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3
  24134. #define WMI_HECAP_PHY_DB_GET(he_phy_cap) (0) /* DEPRECATED - DO NOT USE */
  24135. #define WMI_HECAP_PHY_DB_SET(he_phy_cap, value) /* DEPRECATED - DO NOT USE */
  24136. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D3
  24137. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D3
  24138. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D3
  24139. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D3
  24140. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D3
  24141. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D3
  24142. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D3
  24143. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D3
  24144. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3
  24145. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3
  24146. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D3
  24147. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D3
  24148. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D3
  24149. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D3
  24150. #define WMI_HECAP_MAC_MTID_RX_GET WMI_HECAP_MAC_MTID_RX_GET_D3
  24151. #define WMI_HECAP_MAC_MTID_RX_SET WMI_HECAP_MAC_MTID_RX_SET_D3
  24152. #define WMI_HECAP_MAC_HELINK_ADPT_GET WMI_HECAP_MAC_HELINK_ADPT_GET_D3
  24153. #define WMI_HECAP_MAC_HELINK_ADPT_SET WMI_HECAP_MAC_HELINK_ADPT_SET_D3
  24154. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D3
  24155. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D3
  24156. #define WMI_HECAP_MAC_TRS_GET WMI_HECAP_MAC_TRS_GET_D3
  24157. #define WMI_HECAP_MAC_TRS_SET WMI_HECAP_MAC_TRS_SET_D3
  24158. #define WMI_HECAP_MAC_ULMURSP_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  24159. #define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  24160. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D3
  24161. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D3
  24162. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D3
  24163. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D3
  24164. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D3
  24165. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D3
  24166. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D3
  24167. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D3
  24168. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3
  24169. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3
  24170. #define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  24171. #define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  24172. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D3
  24173. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D3
  24174. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D3
  24175. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D3
  24176. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3
  24177. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3
  24178. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D3
  24179. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D3
  24180. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D3
  24181. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D3
  24182. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D3
  24183. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D3
  24184. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D3
  24185. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D3
  24186. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D3
  24187. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D3
  24188. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D3
  24189. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D3
  24190. #define WMI_HECAP_MAC_SRPRESP_GET WMI_HECAP_MAC_SRPRESP_GET_D3
  24191. #define WMI_HECAP_MAC_SRPRESP_SET WMI_HECAP_MAC_SRPRESP_SET_D3
  24192. #define WMI_HECAP_MAC_SRRESP_GET(he_cap2) (0) /* DEPRECATED, DO NOT USE */
  24193. #define WMI_HECAP_MAC_SRRESP_SET(he_cap2, value) /* DEPRECATED, DO NOT USE */
  24194. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D3
  24195. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D3
  24196. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D3
  24197. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D3
  24198. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3
  24199. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3
  24200. #define WMI_HECAP_MAC_MTID_TX_GET WMI_HECAP_MAC_MTID_TX_GET_D3
  24201. #define WMI_HECAP_MAC_MTID_TX_SET WMI_HECAP_MAC_MTID_TX_SET_D3
  24202. #define WMI_HECAP_MAC_SUBCHANSELTX_GET WMI_HECAP_MAC_SUBCHANSELTX_GET_D3
  24203. #define WMI_HECAP_MAC_SUBCHANSELTX_SET WMI_HECAP_MAC_SUBCHANSELTX_SET_D3
  24204. #define WMI_HECAP_MAC_UL2X996RU_GET WMI_HECAP_MAC_UL2X996RU_GET_D3
  24205. #define WMI_HECAP_MAC_UL2X996RU_SET WMI_HECAP_MAC_UL2X996RU_SET_D3
  24206. #define WMI_HECAP_MAC_OMCULMUDDIS_GET WMI_HECAP_MAC_OMCULMUDDIS_GET_D3
  24207. #define WMI_HECAP_MAC_OMCULMUDDIS_SET WMI_HECAP_MAC_OMCULMUDDIS_SET_D3
  24208. #define WMI_HECAP_MAC_HELKAD_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  24209. #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  24210. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3 /* DEPRECATED - DO NOT USE */
  24211. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3 /* DEPRECATED - DO NOT USE */
  24212. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3
  24213. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3
  24214. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D3
  24215. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D3
  24216. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3
  24217. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3
  24218. #else /* SUPPORT_11AX_D3 vs. D2 */
  24219. /* D2 and D2- */
  24220. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D2
  24221. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D2
  24222. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D2
  24223. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D2
  24224. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D2
  24225. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D2
  24226. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_GET_D2 /* Deprecated */
  24227. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_SET_D2 /* Deprecated */
  24228. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D2
  24229. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D2
  24230. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D2
  24231. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D2
  24232. #define WMI_HEOPS_MAXBSSID_GET WMI_HEOPS_MAXBSSID_GET_D2
  24233. #define WMI_HEOPS_MAXBSSID_SET WMI_HEOPS_MAXBSSID_SET_D2
  24234. #define WMI_HEOPS_TXBSSID_GET WMI_HEOPS_TXBSSID_GET_D2
  24235. #define WMI_HEOPS_TXBSSID_SET WMI_HEOPS_TXBSSID_SET_D2
  24236. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D2
  24237. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D2
  24238. #define WMI_HEOPS_DUALBEACON_GET WMI_HEOPS_DUALBEACON_GET_D2
  24239. #define WMI_HEOPS_DUALBEACON_SET WMI_HEOPS_DUALBEACON_SET_D2
  24240. #define WMI_HECAP_PHY_DB_GET WMI_HECAP_PHY_DB_GET_D2
  24241. #define WMI_HECAP_PHY_DB_SET WMI_HECAP_PHY_DB_SET_D2
  24242. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D2
  24243. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D2
  24244. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2
  24245. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2
  24246. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D2
  24247. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D2
  24248. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D2
  24249. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D2
  24250. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_TXLDPC_GET_D2
  24251. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_TXLDPC_SET_D2
  24252. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_RXLDPC_GET_D2
  24253. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_RXLDPC_SET_D2
  24254. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D2
  24255. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D2
  24256. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2
  24257. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2
  24258. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D2
  24259. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D2
  24260. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D2
  24261. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D2
  24262. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D2
  24263. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D2
  24264. #define WMI_HECAP_PHY_TXDOPPLER_GET WMI_HECAP_PHY_TXDOPPLER_GET_D2
  24265. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D2
  24266. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D2
  24267. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D2
  24268. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D2
  24269. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D2
  24270. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  24271. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  24272. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D2
  24273. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D2
  24274. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D2
  24275. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D2
  24276. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D2
  24277. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D2
  24278. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D2
  24279. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D2
  24280. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D2
  24281. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D2
  24282. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D2
  24283. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D2
  24284. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2
  24285. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2
  24286. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2
  24287. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2
  24288. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2
  24289. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2
  24290. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2
  24291. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2
  24292. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2
  24293. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2
  24294. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2
  24295. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2
  24296. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D2
  24297. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D2
  24298. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D2
  24299. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D2
  24300. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2
  24301. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2
  24302. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D2
  24303. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D2
  24304. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2
  24305. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2
  24306. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D2
  24307. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D2
  24308. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D2
  24309. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D2
  24310. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D2
  24311. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D2
  24312. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2
  24313. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2
  24314. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D2
  24315. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D2
  24316. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D2
  24317. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D2
  24318. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D2
  24319. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D2
  24320. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2
  24321. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2
  24322. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2
  24323. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2
  24324. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2
  24325. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2
  24326. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2
  24327. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2
  24328. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2
  24329. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2
  24330. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2
  24331. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2
  24332. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D2
  24333. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D2
  24334. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D2
  24335. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D2
  24336. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D2
  24337. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D2
  24338. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D2
  24339. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D2
  24340. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2
  24341. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2
  24342. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D2
  24343. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D2
  24344. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D2
  24345. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D2
  24346. #define WMI_HECAP_MAC_MTID_GET WMI_HECAP_MAC_MTID_GET_D2
  24347. #define WMI_HECAP_MAC_MTID_SET WMI_HECAP_MAC_MTID_SET_D2
  24348. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2
  24349. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2
  24350. #define WMI_HECAP_MAC_HELKAD_GET WMI_HECAP_MAC_HELKAD_GET_D2
  24351. #define WMI_HECAP_MAC_HELKAD_SET WMI_HECAP_MAC_HELKAD_SET_D2
  24352. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D2
  24353. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D2
  24354. #define WMI_HECAP_MAC_ULMURSP_GET WMI_HECAP_MAC_ULMURSP_GET_D2
  24355. #define WMI_HECAP_MAC_ULMURSP_SET WMI_HECAP_MAC_ULMURSP_SET_D2
  24356. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D2
  24357. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D2
  24358. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D2
  24359. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D2
  24360. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D2
  24361. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D2
  24362. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D2
  24363. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D2
  24364. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2
  24365. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2
  24366. #define WMI_HECAP_MAC_GROUPMSTABA_GET WMI_HECAP_MAC_GROUPMSTABA_GET_D2
  24367. #define WMI_HECAP_MAC_GROUPMSTABA_SET WMI_HECAP_MAC_GROUPMSTABA_SET_D2
  24368. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D2
  24369. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D2
  24370. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D2
  24371. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D2
  24372. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2
  24373. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2
  24374. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D2
  24375. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D2
  24376. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D2
  24377. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D2
  24378. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D2
  24379. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D2
  24380. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D2
  24381. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D2
  24382. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D2
  24383. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D2
  24384. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D2
  24385. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D2
  24386. #define WMI_HECAP_MAC_SRRESP_GET WMI_HECAP_MAC_SRRESP_GET_D2
  24387. #define WMI_HECAP_MAC_SRRESP_SET WMI_HECAP_MAC_SRRESP_SET_D2
  24388. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D2
  24389. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D2
  24390. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D2
  24391. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D2
  24392. #define WMI_HECAP_MAC_MBAHECTRL_GET WMI_HECAP_MAC_MBAHECTRL_GET_D2
  24393. #define WMI_HECAP_MAC_MBAHECTRL_SET WMI_HECAP_MAC_MBAHECTRL_SET_D2
  24394. #define WMI_HECAP_MAC_MURTS_GET WMI_HECAP_MAC_MURTS_GET_D2
  24395. #define WMI_HECAP_MAC_MURTS_SET WMI_HECAP_MAC_MURTS_SET_D2
  24396. #define WMI_HECAP_PHY_CBMODE_GET WMI_HECAP_PHY_CBMODE_GET_D2
  24397. #define WMI_HECAP_PHY_CBMODE_SET WMI_HECAP_PHY_CBMODE_SET_D2
  24398. #define WMI_HECAP_PHY_OLTF_GET WMI_HECAP_PHY_OLTF_GET_D2
  24399. #define WMI_HECAP_PHY_OLTF_SET WMI_HECAP_PHY_OLTF_SET_D2
  24400. #define WMI_HECAP_PHY_SUBFMESTS_GET WMI_HECAP_PHY_SUBFMESTS_GET_D2
  24401. #define WMI_HECAP_PHY_SUBFMESTS_SET WMI_HECAP_PHY_SUBFMESTS_SET_D2
  24402. #define WMI_HECAP_PHY_PADDING_GET WMI_HECAP_PHY_PADDING_GET_D2
  24403. #define WMI_HECAP_PHY_PADDING_SET WMI_HECAP_PHY_PADDING_SET_D2
  24404. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2
  24405. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2
  24406. #define WMI_HECAP_PHY_32GI_GET WMI_HECAP_PHY_32GI_GET_D2
  24407. #define WMI_HECAP_PHY_32GI_SET WMI_HECAP_PHY_32GI_SET_D2
  24408. #define WMI_HECAP_PHY_NOSUNDIMENS_GET WMI_HECAP_PHY_NOSUNDIMENS_GET_D2
  24409. #define WMI_HECAP_PHY_NOSUNDIMENS_SET WMI_HECAP_PHY_NOSUNDIMENS_SET_D2
  24410. #define WMI_HECAP_PHY_40MHZNSS_GET WMI_HECAP_PHY_40MHZNSS_GET_D2
  24411. #define WMI_HECAP_PHY_40MHZNSS_SET WMI_HECAP_PHY_40MHZNSS_SET_D2
  24412. #define WMI_HECAP_PHY_ULOFDMA_GET WMI_HECAP_PHY_ULOFDMA_GET_D2
  24413. #define WMI_HECAP_PHY_ULOFDMA_SET WMI_HECAP_PHY_ULOFDMA_SET_D2
  24414. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCM_GET_D2
  24415. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCM_SET_D2
  24416. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2
  24417. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2
  24418. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2
  24419. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2
  24420. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2
  24421. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2
  24422. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D2
  24423. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D2
  24424. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2
  24425. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2
  24426. #endif /* SUPPORT_11AX_D3 */
  24427. typedef struct {
  24428. /** TLV tag and len; tag equals
  24429. * WMITLV_TAG_STRUC_wmi_cfr_capture_event_fixed_param */
  24430. A_UINT32 tlv_header;
  24431. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  24432. A_UINT32 capture_method;
  24433. /* VDEV identifier */
  24434. A_UINT32 vdev_id;
  24435. /* Peer MAC address. In AP mode, this is the address of the connected peer
  24436. * for which CFR capture is needed. In case of STA mode, this is the address
  24437. * of the AP to which the STA is connected
  24438. */
  24439. wmi_mac_addr mac_addr;
  24440. /* primary 20 MHz channel frequency in mhz */
  24441. A_UINT32 chan_mhz;
  24442. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  24443. A_UINT32 bandwidth;
  24444. /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h*/
  24445. A_UINT32 phy_mode;
  24446. /* Center frequency 1 in MHz*/
  24447. A_UINT32 band_center_freq1;
  24448. /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  24449. A_UINT32 band_center_freq2;
  24450. /* Number of spatial streams */
  24451. A_UINT32 sts_count;
  24452. /* Bits 31:0: address of data from wmi_dma_buf_release_entry [31:0] */
  24453. A_UINT32 correlation_info_1;
  24454. /* Bits 11:0: address of data from wmi_dma_buf_release_entry [43:32]
  24455. * Bits 15:12: reserved (set to 0x0)
  24456. * Bits 31:16: hardware PPDU ID [15:0]
  24457. */
  24458. A_UINT32 correlation_info_2;
  24459. /* Bits 1:0: TX status (if any); values defined in enum
  24460. * WMI_FRAME_TX_STATUS
  24461. * Bits 30:2: reserved (set to 0x0)
  24462. * Bit 31: Status of the CFR capture of the peer
  24463. * 1 (True) - Successful; 0 (False) - Not successful
  24464. */
  24465. A_UINT32 status;
  24466. /* Timestamp in microseconds at which the CFR was captured in the hardware.
  24467. * The clock used for this timestamp is private to the target and
  24468. * is not visible to the host i.e., Host can interpret only the
  24469. * relative timestamp deltas from one message to the next,
  24470. * but can't interpret the absolute timestamp from a single message.
  24471. */
  24472. A_UINT32 timestamp_us;
  24473. /*
  24474. * Count of the current CFR capture from FW.
  24475. * This is helpful to identify any drops in FW.
  24476. */
  24477. A_UINT32 counter;
  24478. /* Per chain RSSI of the peer, for up to WMI_MAX_CHAINS.
  24479. * Each chain's entry reports the RSSI for different bands in dBm units.
  24480. * Use WMI_UNIFIED_CHAIN_RSSI_GET to extract the value for a particular
  24481. * band.
  24482. * A band value of 0x80 (-128) is invalid.
  24483. */
  24484. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  24485. } wmi_peer_cfr_capture_event_fixed_param;
  24486. #define WMI_UNIFIED_CHAIN_PHASE_MASK 0x0000ffff
  24487. #define WMI_UNIFIED_CHAIN_PHASE_GET(tlv, chain_idx) \
  24488. ((A_UINT16) ((tlv)->chain_phase[chain_idx] & WMI_UNIFIED_CHAIN_PHASE_MASK))
  24489. #define WMI_UNIFIED_CHAIN_PHASE_SET(tlv, chain_idx, value) \
  24490. (tlv)->chain_phase[chain_idx] = (WMI_UNIFIED_CHAIN_PHASE_MASK & (value))
  24491. typedef struct {
  24492. /** TLV tag and len; tag equals
  24493. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param */
  24494. A_UINT32 tlv_header;
  24495. /* Per chain AoA phase data of the Peer, for up to WMI_MAX_CHAINS.
  24496. * USE WMI_UNIFIED_CHAIN_PHASE_GET to extract the phase value for
  24497. * a particular chain.
  24498. * Only lower 2 bytes will contain phase data for a particular chain.
  24499. * The values in phase data will be from 0 1023 as mapping of
  24500. * 0-359 degrees using the formula -
  24501. * phase data = phase in degrees * 1024 / 360
  24502. *
  24503. * Target will set 0xFFFF for all invalid chains.
  24504. *
  24505. * The WMI_UNIFIED_CHAIN_PHASE_GET/SET macros can be used to access
  24506. * the valid portion of the 4-byte word containing the chain phase data.
  24507. */
  24508. A_UINT32 chain_phase[WMI_MAX_CHAINS];
  24509. } wmi_peer_cfr_capture_event_phase_fixed_param;
  24510. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK 0x80000000
  24511. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK_S 31
  24512. /* Failed to capture CFR as peer is in power save mode */
  24513. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED 0x40000000
  24514. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED_S 30
  24515. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX 0x00000003
  24516. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX_S 0
  24517. /**
  24518. * wmi_cold_boot_cal_data config flags
  24519. * BIT 0 : 1 means more data will come, 0 means last event
  24520. * BIT 1-31 : Reserved
  24521. */
  24522. #define WMI_COLD_BOOT_CAL_DATA_SET_IS_MORE_DATA(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  24523. #define WMI_COLD_BOOT_CAL_DATA_GET_IS_MORE_DATA(flags) WMI_GET_BITS(flags, 0, 1)
  24524. typedef struct {
  24525. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_cold_boot_cal_data_fixed_param */
  24526. A_UINT32 data_len; /** length in byte of data[]. */
  24527. A_UINT32 flags; /** config flags : Only 0th bit is used, bit 1-31 are reserved */
  24528. /* Following this structure is the TLV:
  24529. * A_UINT8 data[]; <-- length in byte given by field data_len.
  24530. * This data array contains cold boot data calibration raw data.
  24531. */
  24532. } wmi_cold_boot_cal_data_fixed_param;
  24533. typedef struct {
  24534. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_rap_info_event_fixed_param */
  24535. /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
  24536. * See macros starting with WMI_PDEV_ID_ for values.
  24537. */
  24538. A_UINT32 pdev_id;
  24539. A_UINT32 type; /** type of the rogue ap, see WMI_ROGUE_AP_TYPE */
  24540. wmi_mac_addr bssid; /** bssid of the rogue ap */
  24541. } wmi_pdev_rap_info_event_fixed_param;
  24542. /*
  24543. * WMI API for Firmware to indicate iface combinations which Firmware
  24544. * support to Host
  24545. */
  24546. typedef struct {
  24547. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_cmb_ind_event_fixed_param */
  24548. /* common part */
  24549. /* Consider DBS/DBDC for this new implementation */
  24550. A_UINT32 pdev_n;
  24551. /* iface combinations part -
  24552. * Use subsequent TLV arrays to list supported combinations of interfaces.
  24553. */
  24554. /*
  24555. * The TLVs listing interface combinations, will follow this TLV.
  24556. * The number of combinations can be calculated by dividing the
  24557. * TLV array length by the TLV array element length.
  24558. *
  24559. * The fixed_param TLV is directly followed by a list of
  24560. * wlanfw_iface_combination elements:
  24561. * wlanfw_iface_combination combinations[0];
  24562. * wlanfw_iface_combination combinations[1];
  24563. * ...
  24564. * wlanfw_iface_combination combinations[N];
  24565. *
  24566. * After the list of wlanfw_iface_combinations is a list of interface limits.
  24567. * The cmb_limits field of each wlanfw_iface_combination show which of the
  24568. * limits within the "wlanfw_ifact_limit limits" list belong to that
  24569. * iface_combination:
  24570. * limits[0] <- cmb 0, limit 0
  24571. * ...
  24572. * limits[cmb[0].cmb_limits-1] <- cmb 0, limit N
  24573. * limits[cmb[0].cmb_limits] <- cmb 1, limit 0
  24574. * ...
  24575. * limits[cmb[0].cmb_limits+cmb[1].cmb_limits-1] <- cmb 1, limit N
  24576. * limits[cmb[0].cmb_limits+cmb[1].cmb_limits] <- cmb 2, limit 0
  24577. * ...
  24578. */
  24579. } wmi_wlanfw_iface_cmb_ind_event_fixed_param;
  24580. typedef struct {
  24581. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_limit_param */
  24582. /*
  24583. * How many vdevs can work as below vdev_type/vdev_subtype
  24584. * in one combination.
  24585. */
  24586. A_UINT32 vdev_limit_n;
  24587. /*
  24588. * Indicate what role above vdevs can work as.
  24589. * Refer to "WMI_VDEV_TYPE_xx, WMI_UNIFIED_VDEV_SUBTYPE_xx"
  24590. * for roles definition.
  24591. */
  24592. A_UINT32 vdev_type;
  24593. A_UINT32 vdev_subtype;
  24594. } wlanfw_iface_limit;
  24595. /**
  24596. * @brief specific configuration of valid_fields for host.
  24597. * These flags are used for indicating which fields in wlanfw_iface_combination
  24598. * contains valid value for Host Driver.
  24599. * 0: Host can ignore this field
  24600. * 1: field contains valid value for Host Driver
  24601. */
  24602. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_S 0
  24603. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_M 0x1
  24604. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_S 1
  24605. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_M 0x2
  24606. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_S 2
  24607. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_M 0x4
  24608. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_S 3
  24609. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_M 0x8
  24610. #define WMI_CMB_VALID_FIELDS_FLAG_SET(word32, flag, value) \
  24611. do { \
  24612. (word32) &= ~WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
  24613. (word32) |= ((value) << WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S) & \
  24614. WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
  24615. } while (0)
  24616. #define WMI_CMB_VALID_FIELDS_FLAG_GET(word32, flag) \
  24617. (((word32) & WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M) >> \
  24618. WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S)
  24619. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_SET(word32, value) \
  24620. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), PEER_MAX, (value))
  24621. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_GET(word32) \
  24622. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), PEER_MAX)
  24623. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_SET(word32, value) \
  24624. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), STA_AP_BCN_INT_MATCH, (value))
  24625. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_GET(word32) \
  24626. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), STA_AP_BCN_INT_MATCH)
  24627. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_SET(word32, value) \
  24628. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_MIN, (value))
  24629. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_GET(word32) \
  24630. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_MIN)
  24631. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_SET(word32, value) \
  24632. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_N, (value))
  24633. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_GET(word32) \
  24634. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_N)
  24635. typedef struct {
  24636. A_UINT32 tlv_header;
  24637. /*
  24638. * Max num Peers can be supported in this combination.
  24639. * It excludes the self-peers associated with each vdev.
  24640. * It's the number of real remote peers.
  24641. * eg: when working as AP mode, indicating how many clients can be
  24642. * supported to connect with this AP.
  24643. */
  24644. A_UINT32 peer_max;
  24645. /* Home Channels supported on one single phy concurrently */
  24646. A_UINT32 channel_n;
  24647. /*
  24648. * The number of "wlanfw_iface_limit" for a specified combination.
  24649. * eg: there is 2 vdev, including 1 AP vdev and 1 STA vdev, then this
  24650. * cmb_limits will be 2 for this combination.
  24651. */
  24652. A_UINT32 cmb_limits;
  24653. /*
  24654. * Beacon intervals for STA and AP types need to be match or not.
  24655. * 1: need to be match
  24656. * 0: not need
  24657. */
  24658. A_UINT32 sta_ap_bcn_int_match;
  24659. /*
  24660. * This combination supports different beacon intervals or not.
  24661. * 0: Beacon interval is same for all interface
  24662. * !0: STA Beacon interval AND GCD of AP Beacon intervals
  24663. * should be greater or equal to this value.
  24664. */
  24665. A_UINT32 bcn_int_min;
  24666. /*
  24667. * Number of different Beacon intervals
  24668. */
  24669. A_UINT32 bcn_int_n;
  24670. /*
  24671. * This indicates which field in this struct
  24672. * contains valid value for Host Driver.
  24673. * Refer to definitions for "WMI_CMB_VALID_FIELDS_FLAG_xx".
  24674. */
  24675. A_UINT32 valid_fields;
  24676. } wlanfw_iface_combination;
  24677. typedef struct {
  24678. /** TLV tag and len; tag equals
  24679. * WMITLV_TAG_STRUC_wmi_set_elna_bypass_cmd_fixed_param */
  24680. A_UINT32 tlv_header;
  24681. /* VDEV identifier */
  24682. A_UINT32 vdev_id;
  24683. /** 1-Enable, 0-Disable */
  24684. A_UINT32 en_dis;
  24685. } wmi_set_elna_bypass_cmd_fixed_param;
  24686. typedef struct {
  24687. /** TLV tag and len; tag equals
  24688. * WMITLV_TAG_STRUC_wmi_get_elna_bypass_cmd_fixed_param */
  24689. A_UINT32 tlv_header;
  24690. /* VDEV identifier */
  24691. A_UINT32 vdev_id;
  24692. } wmi_get_elna_bypass_cmd_fixed_param;
  24693. typedef struct {
  24694. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_elna_bypass_event_fixed_param */
  24695. /* VDEV identifier */
  24696. A_UINT32 vdev_id;
  24697. /** 1-Enable, 0-Disable */
  24698. A_UINT32 en_dis;
  24699. } wmi_get_elna_bypass_event_fixed_param;
  24700. /* This command is to specify to enable/disable audio frame aggr */
  24701. typedef struct {
  24702. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_enable_cmd_fixed_param */
  24703. A_UINT32 aggr_enable; /* enable aggregation for audio frame */
  24704. A_UINT32 tbd_enable; /* enable time_based discarding for audio frame */
  24705. } wmi_audio_aggr_enable_cmd_fixed_param;
  24706. typedef struct wmi_audio_aggr_rate_set_s {
  24707. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_audio_aggr_rate_set */
  24708. A_UINT32 mcs;
  24709. A_UINT32 bandwidth; /* 0 for 20M, 1 for 40M and 2 for 80M, etc. */
  24710. } WMI_AUDIO_AGGR_RATE_SET_T;
  24711. typedef struct {
  24712. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_add_group */
  24713. A_UINT32 group_id; /* id of audio group */
  24714. wmi_mac_addr multicast_addr; /* multicast address of audio group */
  24715. } wmi_audio_aggr_add_group_cmd_fixed_param;
  24716. typedef struct {
  24717. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_del_group */
  24718. A_UINT32 group_id;
  24719. } wmi_audio_aggr_del_group_cmd_fixed_param;
  24720. typedef struct {
  24721. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_rate */
  24722. A_UINT32 group_id;
  24723. /**
  24724. * TLV (tag length value) parameters follow the
  24725. * structure. The TLV's are:
  24726. * WMI_AUDIO_AGGR_RATE_SET_T rate_set[];
  24727. **/
  24728. } wmi_audio_aggr_set_group_rate_cmd_fixed_param;
  24729. typedef struct {
  24730. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_retry */
  24731. A_UINT32 group_id;
  24732. A_UINT32 retry_thresh;
  24733. } wmi_audio_aggr_set_group_retry_cmd_fixed_param;
  24734. #define WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS 0
  24735. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS 1
  24736. #define WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS 2
  24737. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS 3
  24738. #define WMI_CFR_GROUP_BW_VALID_BIT_POS 4
  24739. #define WMI_CFR_GROUP_NSS_VALID_BIT_POS 5
  24740. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS 6
  24741. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS 7
  24742. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS 8
  24743. /* The bits in this mask mapped to WMI_PEER_CFR_CAPTURE_BW enum */
  24744. #define WMI_CFR_GROUP_BW_MASK_NUM_BITS 5
  24745. #define WMI_CFR_GROUP_BW_BIT_POS 0
  24746. /* The bits in this mask correspond to the values as below
  24747. * bit 0 -> Nss 1
  24748. * bit 1 -> Nss 2
  24749. * ...
  24750. * bit 7 -> Nss 8
  24751. */
  24752. #define WMI_CFR_GROUP_NSS_MASK_NUM_BITS 8
  24753. #define WMI_CFR_GROUP_NSS_BIT_POS 16
  24754. #define WMI_CFR_GROUP_TA_ADDR_VALID_SET(param, value) \
  24755. WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1, value)
  24756. #define WMI_CFR_GROUP_TA_ADDR_VALID_GET(param) \
  24757. WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1)
  24758. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_SET(param, value) \
  24759. WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1, value)
  24760. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_GET(param) \
  24761. WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1)
  24762. #define WMI_CFR_GROUP_RA_ADDR_VALID_SET(param, value) \
  24763. WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1, value)
  24764. #define WMI_CFR_GROUP_RA_ADDR_VALID_GET(param) \
  24765. WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1)
  24766. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_SET(param, value) \
  24767. WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1, value)
  24768. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_GET(param) \
  24769. WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1)
  24770. #define WMI_CFR_GROUP_BW_VALID_SET(param, value) \
  24771. WMI_SET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1, value)
  24772. #define WMI_CFR_GROUP_BW_VALID_GET(param) \
  24773. WMI_GET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1)
  24774. #define WMI_CFR_GROUP_NSS_VALID_SET(param, value) \
  24775. WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1, value)
  24776. #define WMI_CFR_GROUP_NSS_VALID_GET(param) \
  24777. WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1)
  24778. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_SET(param, value) \
  24779. WMI_SET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1, value)
  24780. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_GET(param) \
  24781. WMI_GET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1)
  24782. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_SET(param, value) \
  24783. WMI_SET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1, value)
  24784. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_GET(param) \
  24785. WMI_GET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1)
  24786. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_SET(param, value) \
  24787. WMI_SET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1, value)
  24788. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_GET(param) \
  24789. WMI_GET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1)
  24790. #define WMI_CFR_GROUP_BW_SET(param, value) \
  24791. WMI_SET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS, value)
  24792. #define WMI_CFR_GROUP_BW_GET(param) \
  24793. WMI_GET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS)
  24794. #define WMI_CFR_GROUP_NSS_SET(param, value) \
  24795. WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS, value)
  24796. #define WMI_CFR_GROUP_NSS_GET(param) \
  24797. WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS)
  24798. typedef struct {
  24799. /* Filter group number for which the below filters needs to be applied */
  24800. A_UINT32 filter_group_id;
  24801. /* Indicates which of the below filter's value is valid
  24802. * Bit 0: Ta_addr is valid if set
  24803. * Bit 1: Ta_addr_mask is valid if set
  24804. * Bit 2: Ra_addr is valid if set
  24805. * Bit 3: Ra_addr_mask is valid if set
  24806. * Bit 4: Bandwidth is valid if set
  24807. * Bit 5: NSS is valid if set
  24808. * Bit 6: Mgmt_subtype is valid if set
  24809. * Bit 7: Ctrl_subtype is valid if set
  24810. * Bit 8: Data_subtype is valid if set
  24811. * Bits 31:9 Reserved for future use
  24812. */
  24813. A_UINT32 filter_set_valid_mask;
  24814. /* ta_addr:
  24815. * Packets matching the TA_mac addr will be filtered in by MAC
  24816. * for CFR capture.
  24817. */
  24818. wmi_mac_addr ta_addr;
  24819. /* ta_addr_mask:
  24820. * Packets matching the TA_mac addr Mask will be filtered in by MAC
  24821. * for CFR capture.
  24822. */
  24823. wmi_mac_addr ta_addr_mask;
  24824. /* ra_addr:
  24825. * Packets matching the RA_mac addr will be filtered in by MAC
  24826. * for CFR capture.
  24827. */
  24828. wmi_mac_addr ra_addr;
  24829. /* ra_addr_mask:
  24830. * Packets matching the RA_mac addr Mask will be filtered in by MAC
  24831. * for CFR capture.
  24832. */
  24833. wmi_mac_addr ra_addr_mask;
  24834. /* bw_nss_filter:
  24835. * Indicates which bw and nss packets will be filtered for CFR capture
  24836. * Bits 4:0 CFR capture will be done for packets matching the bandwidths
  24837. * specified within this bitmask
  24838. * Bits 15:5 Reserved for future
  24839. * Bits 23:16 CFR capture will be done for packets matching the Nss
  24840. * specified within this bitmask
  24841. * Bits 31:24 Reserved for future
  24842. */
  24843. A_UINT32 bw_nss_filter;
  24844. /* mgmt_subtype_filter:
  24845. * Managments Packets matching the subtype filter categories will be
  24846. * filtered in by MAC for CFR capture.
  24847. * This is a bitmask, in which each bit represents the corresponding
  24848. * mgmt subtype value as per ieee80211_defs.h
  24849. */
  24850. A_UINT32 mgmt_subtype_filter;
  24851. /* ctrl_subtype_filter:
  24852. * Control Packets matching the subtype filter category will be
  24853. * filtered in by MAC for CFR capture.
  24854. * This is a bitmask, in which each bit represents the corresponding
  24855. * ctrl subtype value as per ieee80211_defs.h
  24856. */
  24857. A_UINT32 ctrl_subtype_filter;
  24858. /* data_subtype_filter:
  24859. * Data Packets matching the subtype filter category will be
  24860. * filtered in by MAC for CFR capture.
  24861. * This is a bitmask, in which each bit represents the corresponding
  24862. * data subtype value as per ieee80211_defs.h
  24863. */
  24864. A_UINT32 data_subtype_filter;
  24865. } wmi_cfr_filter_group_config;
  24866. #define WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS 0
  24867. #define WMI_CFR_ALL_FTM_ACK_EN_BIT_POS 1
  24868. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS 2
  24869. #define WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS 3
  24870. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS 4
  24871. #define WMI_CFR_ALL_PACKET_EN_BIT_POS 5
  24872. #define WMI_CFR_CAPTURE_INTERVAL_NUM_BITS 24
  24873. #define WMI_CFR_CAPTURE_INTERVAL_BIT_POS 0
  24874. #define WMI_CFR_CAPTURE_DURATION_NUM_BITS 24
  24875. #define WMI_CFR_CAPTURE_DURATION_BIT_POS 0
  24876. #define WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS 16
  24877. #define WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS 0
  24878. #define WMI_CFR_UL_MU_USER_UPPER_NUM_BITS 5
  24879. #define WMI_CFR_UL_MU_USER_UPPER_BIT_POS 0
  24880. #define WMI_CFR_FREEZE_DELAY_CNT_EN_MASK 1
  24881. #define WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS 0
  24882. #define WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS 8
  24883. #define WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS 1
  24884. #define WMI_CFR_DIRECTED_FTM_ACK_EN_SET(param, value) \
  24885. WMI_SET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1, value)
  24886. #define WMI_CFR_DIRECTED_FTM_ACK_EN_GET(param) \
  24887. WMI_GET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1)
  24888. #define WMI_CFR_ALL_FTM_ACK_EN_SET(param, value) \
  24889. WMI_SET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1, value)
  24890. #define WMI_CFR_ALL_FTM_ACK_EN_GET(param) \
  24891. WMI_GET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1)
  24892. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_SET(param, value) \
  24893. WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1, value)
  24894. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_GET(param) \
  24895. WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1)
  24896. #define WMI_CFR_NDPA_NDP_ALL_EN_SET(param, value) \
  24897. WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1, value)
  24898. #define WWMI_CFR_NDPA_NDP_ALL_EN_GET(param) \
  24899. WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1)
  24900. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_SET(param, value) \
  24901. WMI_SET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1, value)
  24902. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_GET(param) \
  24903. WMI_GET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1)
  24904. #define WWMI_CFR_ALL_PACKET_EN_SET(param, value) \
  24905. WMI_SET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1, value)
  24906. #define WMI_CFR_ALL_PACKET_EN_GET(param) \
  24907. WMI_GET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1)
  24908. #define WMI_CFR_CAPTURE_INTERVAL_SET(param, value) \
  24909. WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS, value)
  24910. #define WMI_CFR_CAPTURE_INTERVAL_GET(param) \
  24911. WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS)
  24912. #define WMI_CFR_CAPTURE_DURATION_SET(param, value) \
  24913. WMI_SET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS, value)
  24914. #define WMI_CFR_CAPTURE_DURATION_GET(param) \
  24915. WMI_GET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS)
  24916. #define WMI_CFR_FILTER_GROUP_BITMAP_SET(param, value) \
  24917. WMI_SET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS, value)
  24918. #define WMI_CFR_FILTER_GROUP_BITMAP_GET(param) \
  24919. WMI_GET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS)
  24920. #define WMI_CFR_UL_MU_USER_UPPER_SET(param, value) \
  24921. WMI_SET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS, value)
  24922. #define WMI_CFR_UL_MU_USER_UPPER_GET(param) \
  24923. WMI_GET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS)
  24924. #define WMI_CFR_FREEZE_DELAY_CNT_EN_SET(param, value) \
  24925. WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK, value)
  24926. #define WMI_CFR_FREEZE_DELAY_CNT_EN_GET(param) \
  24927. WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK)
  24928. #define WMI_CFR_FREEZE_DELAY_CNT_THR_SET(param, value) \
  24929. WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS, value)
  24930. #define WMI_CFR_FREEZE_DELAY_CNT_THR_GET(param) \
  24931. WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS)
  24932. typedef struct {
  24933. /** TLV tag and len; tag equals
  24934. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_filter_cmd_fixed_param */
  24935. A_UINT32 tlv_header;
  24936. /** pdev_id for identifying the MAC
  24937. * See macros starting with WMI_PDEV_ID_ for values.
  24938. * In non-DBDC case host should set it to 0
  24939. */
  24940. A_UINT32 pdev_id;
  24941. /* filter_type:
  24942. * Indicates the type of filter to be enabled
  24943. * Bit 0: Filter Directed FTM ACK frames for CFR capture
  24944. * Bit 1: Filter All FTM ACK frames for CFR capture
  24945. * Bit 2: Filter NDPA NDP Directed Frames for CFR capture
  24946. * Bit 3: Filter Frames based on TA/RA/Subtype as provided
  24947. * in CFR Group config
  24948. * Bit 4: Filter in All packets for CFR Capture
  24949. * Bits 31:5 Reserved for future use
  24950. */
  24951. A_UINT32 filter_type;
  24952. /* capture_interval:
  24953. * Capture interval field which is time in between consecutive
  24954. * CFR capture, in microsecond units
  24955. * Bits 23:0 Capture interval
  24956. * Bits 31:24 Reserved for future use
  24957. */
  24958. A_UINT32 capture_interval;
  24959. /* capture_duration:
  24960. * Capture Duration field for which CFR capture has to happen,
  24961. * in microsecond units
  24962. * Bits 23:0 Capture Duration
  24963. * Bits 31:24 Reserved for future use
  24964. */
  24965. A_UINT32 capture_duration;
  24966. /* Bitfields set indicates which of the CFR group config is enabled
  24967. * Bits 15:0 Filter Group enable Bits
  24968. * Bits 31:16 Reserved for future use
  24969. * If Bit 0 is set, then CFR filter group 0 alone is enabled and so on
  24970. */
  24971. A_UINT32 filter_group_bitmap;
  24972. /* ul_mu_user_mask_lower:
  24973. * Bitfields indicates which of the users in the current UL MU
  24974. * tranmission are enabled for CFR capture.
  24975. * Bits 31 to 0 indicates user indexes for 32 users in a UL MU transmission.
  24976. * If bit 0 is set, then the CFR capture will happen for user index 0
  24977. * in the current UL MU Transmission.
  24978. * If bits 0,2 are set, then CFR capture for UL MU TX corresponds to
  24979. * user indices 0 and 2.
  24980. */
  24981. A_UINT32 ul_mu_user_mask_lower;
  24982. /* ul_mu_user_mask_upper:
  24983. * This is contiuation of the above lower mask.
  24984. * Bits 4:0 Bitfields indicates user indices from 33 to 37 users.
  24985. * Bits 31:5 Reserved for future use
  24986. * If bit 0 is set, then CFR capture is enabled for user index 33
  24987. * in a UL MU transmission.
  24988. */
  24989. A_UINT32 ul_mu_user_mask_upper;
  24990. /* freeze_tlv_delay_cnt
  24991. * Indicates the number of consecutive Rx packets to be skipped
  24992. * before CFR capture is enabled again.
  24993. * Bits 8:0 Freeze Delay Count value
  24994. * Bits 31:9 Reserved for future use
  24995. */
  24996. A_UINT32 freeze_tlv_delay_cnt;
  24997. /*
  24998. * A variable-length TLV array of wmi_cfr_filter_group_config will
  24999. * follow this fixed_param TLV
  25000. * wmi_cfr_filter_group_config filter_group_config[];
  25001. */
  25002. } wmi_cfr_capture_filter_cmd_fixed_param;
  25003. /* ADD NEW DEFS HERE */
  25004. /*****************************************************************************
  25005. * The following structures are deprecated. DO NOT USE THEM!
  25006. */
  25007. /** Max number of channels in the schedule. */
  25008. #define OCB_CHANNEL_MAX (5)
  25009. /* NOTE: Make sure these data structures are identical to those
  25010. * defined in sirApi.h */
  25011. typedef struct
  25012. {
  25013. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  25014. A_UINT32 aifsn;
  25015. /** Contention Window minimum. Range: 1 - 10 */
  25016. A_UINT32 cwmin;
  25017. /** Contention Window maximum. Range: 1 - 10 */
  25018. A_UINT32 cwmax;
  25019. } wmi_qos_params_t;
  25020. typedef struct
  25021. {
  25022. /** Channel frequency in MHz */
  25023. A_UINT32 chan_freq;
  25024. /** Channel duration in ms */
  25025. A_UINT32 duration;
  25026. /** Start guard interval in ms */
  25027. A_UINT32 start_guard_interval;
  25028. /** End guard interval in ms */
  25029. A_UINT32 end_guard_interval;
  25030. /** Transmit power in dBm, range 0 - 23 */
  25031. A_UINT32 tx_power;
  25032. /** Transmit datarate in Mbps */
  25033. A_UINT32 tx_rate;
  25034. /** QoS parameters for each AC */
  25035. wmi_qos_params_t qos_params[WLAN_MAX_AC];
  25036. /** 1 to enable RX stats for this channel, 0 otherwise */
  25037. A_UINT32 rx_stats;
  25038. } wmi_ocb_channel_t;
  25039. typedef struct {
  25040. /** TLV tag and len; tag equals
  25041. * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
  25042. A_UINT32 tlv_header;
  25043. /* VDEV identifier */
  25044. A_UINT32 vdev_id;
  25045. /** Number of valid channels in the channels array */
  25046. A_UINT32 num_channels;
  25047. /** The array of channels */
  25048. wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
  25049. /** 1 to allow off-channel tx, 0 otherwise */
  25050. A_UINT32 off_channel_tx; /* Not supported */
  25051. } wmi_ocb_set_sched_cmd_fixed_param;
  25052. typedef struct {
  25053. /** Return status. 0 for success, non-zero otherwise */
  25054. A_UINT32 status;
  25055. } wmi_ocb_set_sched_event_fixed_param;
  25056. /*****************************************************************************
  25057. * END DEPRECATED
  25058. */
  25059. /* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
  25060. #ifdef __cplusplus
  25061. }
  25062. #endif
  25063. #endif /*_WMI_UNIFIED_H_*/
  25064. /**@}*/