wmi_unified.h 2.0 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811488124881348814488154881648817488184881948820488214882248823488244882548826488274882848829488304883148832488334883448835488364883748838488394884048841488424884348844488454884648847488484884948850488514885248853488544885548856488574885848859488604886148862488634886448865488664886748868488694887048871488724887348874488754887648877488784887948880488814888248883488844888548886488874888848889488904889148892488934889448895488964889748898488994890048901489024890348904489054890648907489084890948910489114891248913489144891548916489174891848919489204892148922489234892448925489264892748928489294893048931489324893348934489354893648937489384893948940489414894248943489444894548946489474894848949489504895148952489534895448955489564895748958489594896048961489624896348964489654896648967489684896948970489714897248973
  1. /*
  2. * Copyright (c) 2010-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  6. *
  7. *
  8. * Permission to use, copy, modify, and/or distribute this software for
  9. * any purpose with or without fee is hereby granted, provided that the
  10. * above copyright notice and this permission notice appear in all
  11. * copies.
  12. *
  13. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  14. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  15. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  16. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  17. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  18. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  19. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  20. * PERFORMANCE OF THIS SOFTWARE.
  21. */
  22. /*
  23. * This file was originally distributed by Qualcomm Atheros, Inc.
  24. * under proprietary terms before Copyright ownership was assigned
  25. * to the Linux Foundation.
  26. */
  27. /**
  28. * @addtogroup WMIAPI
  29. *@{
  30. */
  31. /** @file
  32. * This file specifies the WMI interface for the Software Architecture.
  33. *
  34. * It includes definitions of all the commands and events. Commands are messages
  35. * from the host to the target. Events and Replies are messages from the target
  36. * to the host.
  37. *
  38. * Ownership of correctness in regards to WMI commands
  39. * belongs to the host driver and the target is not required to validate
  40. * parameters for value, proper range, or any other checking.
  41. *
  42. * Guidelines for extending this interface are below.
  43. *
  44. * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
  45. * 2. Use ONLY A_UINT32 type for defining member variables within WMI command/event
  46. * structures. Do not use A_UINT8, A_UINT16, A_BOOL or enum types within these structures.
  47. * 3. DO NOT define bit fields within structures. Implement bit fields using masks
  48. * if necessary. Do not use the programming language's bit field definition.
  49. * 4. Define macros for encode/decode of A_UINT8, A_UINT16 fields within the A_UINT32
  50. * variables. Use these macros for set/get of these fields. Try to use this to
  51. * optimize the structure without bloating it with A_UINT32 variables for every lower
  52. * sized field.
  53. * 5. Do not use PACK/UNPACK attributes for the structures as each member variable is
  54. * already 4-byte aligned by virtue of being a A_UINT32 type.
  55. * 6. Comment each parameter part of the WMI command/event structure by using the
  56. * 2 stars at the beginning of C comment instead of one star to enable HTML document
  57. * generation using Doxygen.
  58. *
  59. */
  60. #ifndef _WMI_UNIFIED_H_
  61. #define _WMI_UNIFIED_H_
  62. #ifdef __cplusplus
  63. extern "C" {
  64. #endif
  65. #include <wlan_defs.h>
  66. #include <wmi_services.h>
  67. /*
  68. * Include the defs of vendor-specific messages (or possibly dummy defs
  69. * if there are no actual vendor-specific message defs).
  70. */
  71. #include <wmi_unified_vendor.h>
  72. /* WMI_VAR_LEN_ARRAY1:
  73. * This macro is for converting the definition of existing variable-length
  74. * arrays within TLV structs of the form "type name[1];" to use the form
  75. * "type name[];" while ensuring that the length of the TLV struct is
  76. * unmodified by the conversion.
  77. * In general, any new variable-length structs should simply use
  78. * "type name[];" directly, rather than using WMI_VAR_LEN_ARRAY1.
  79. * However, if there's a legitimate reason to make the new variable-length
  80. * struct appear to not have a variable length, WMI_VAR_LEN_ARRAY1 can be
  81. * used for this purpose.
  82. */
  83. #if !defined(__KERNEL__)
  84. #define WMI_DUMMY_ZERO_LEN_FIELD A_UINT32 dummy_zero_len_field[0]
  85. #else
  86. /*
  87. * Certain build settings of the Linux kernel don't allow zero-element
  88. * arrays, and C++ doesn't allow zero-length empty structs.
  89. * Confirm that there's no build that combines kernel with C++.
  90. */
  91. #ifdef __cplusplus
  92. #error unsupported combination of kernel and C plus plus
  93. #endif
  94. #define WMI_DUMMY_ZERO_LEN_FIELD struct {} dummy_zero_len_field
  95. #endif
  96. #if defined(__WINDOWS__)
  97. #define WMI_VAR_LEN_ARRAY1(type, name) type name[1]
  98. #else
  99. #define WMI_VAR_LEN_ARRAY1(type, name) \
  100. union { \
  101. type name ## __first_elem; \
  102. struct { \
  103. WMI_DUMMY_ZERO_LEN_FIELD; \
  104. type name[]; \
  105. }; \
  106. }
  107. #endif
  108. #define ATH_MAC_LEN 6 /**< length of MAC in bytes */
  109. #define WMI_EVENT_STATUS_SUCCESS 0 /* Success return status to host */
  110. #define WMI_EVENT_STATUS_FAILURE 1 /* Failure return status to host */
  111. #define MAX_TX_RATE_VALUES 10 /*Max Tx Rates*/
  112. #define MAX_RSSI_VALUES 10 /*Max Rssi values*/
  113. #define WMI_MAX_CHAINS 8
  114. #define WMI_MAX_CHAINS_FOR_AOA_RCC 2
  115. #define WMI_MAX_ADDRESS_SPACE 10
  116. #define MAX_AOA_PHASEDELTA 31 /* 62 gain values */
  117. #define MAX_20MHZ_SEGMENTS 16 /* 320 MHz / 20 MHz = 16 (20 MHz subbands) */
  118. /* The WLAN_MAX_AC macro cannot be changed without breaking
  119. WMI compatibility. */
  120. /* The maximum value of access category */
  121. #define WLAN_MAX_AC 4
  122. #define WMI_MAX_PN_LEN 8
  123. #define MAX_NUM_CQI_USERS_IN_STANDALONE_SND 3
  124. /*
  125. * These don't necessarily belong here; but as the MS/SM macros require
  126. * ar6000_internal.h to be included, it may not be defined as yet.
  127. */
  128. #define WMI_F_MS(_v, _f) \
  129. (((_v) & (_f)) >> (_f##_S))
  130. /*
  131. * This breaks the "good macro practice" of only referencing each
  132. * macro field once (to avoid things like field++ from causing issues.)
  133. */
  134. #define WMI_F_RMW(_var, _v, _f) \
  135. do { \
  136. (_var) &= ~(_f); \
  137. (_var) |= (((_v) << (_f##_S)) & (_f)); \
  138. } while (0)
  139. #define WMI_GET_BITS(_val,_index,_num_bits) \
  140. (((_val) >> (_index)) & (((A_UINT32) 1 << (_num_bits)) - 1))
  141. #define WMI_SET_BITS(_var,_index,_num_bits,_val) do { \
  142. (_var) &= ~((((A_UINT32) 1 << (_num_bits)) - 1) << (_index)); \
  143. (_var) |= (((_val) & (((A_UINT32) 1 << (_num_bits)) - 1)) << (_index)); \
  144. } while (0)
  145. #define WMI_APPEND_TWO_SET_BITS(var, lsb_index, lsb_num_bits, msb_index, msb_num_bits, val) \
  146. do { \
  147. WMI_SET_BITS(var, lsb_index, lsb_num_bits, val); \
  148. WMI_SET_BITS(var, msb_index, msb_num_bits, (val >> lsb_num_bits)); \
  149. } while(0)
  150. #define WMI_APPEND_TWO_GET_BITS(var, lsb_index, lsb_num_bits, msb_index, msb_num_bits, val) \
  151. do { \
  152. (var) = WMI_GET_BITS(val, lsb_index, lsb_num_bits); \
  153. (var) |= (WMI_GET_BITS(val, msb_index, msb_num_bits) << lsb_num_bits); \
  154. } while(0)
  155. /*
  156. * Below GET/SET BITS_ARRAY_LEN32_BYTES macros can be used when
  157. * reading/writing bits which are spread across array_len32 entries.
  158. * These can be used to GET/SET maximum of 32 bits only,
  159. * also array_len32 length should be limited to maximum of 32.
  160. */
  161. #define WMI_GET_BITS_ARRAY_LEN32_BYTES(var, _arrayp, _index, _num_bits) \
  162. do { \
  163. A_UINT8 i; \
  164. for (i = 0; i < _num_bits; i++) { \
  165. (var) |= (WMI_GET_BITS(_arrayp[(_index+i) / 32], ((_index+i) % 32), 1) << i); \
  166. } \
  167. } while(0)
  168. #define WMI_SET_BITS_ARRAY_LEN32_BYTES(_arrayp, _index, _num_bits, val) \
  169. do { \
  170. A_UINT8 i; \
  171. for (i = 0; i < _num_bits; i++) { \
  172. WMI_SET_BITS(_arrayp[(_index+i) / 32], ((_index+i) % 32), 1, (val >> i)); \
  173. } \
  174. } while(0)
  175. /**
  176. * A packed array is an array where each entry in the array is less than
  177. * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array.
  178. * For example, if each entry in the array is 11 bits, then you can stuff
  179. * an array of 4 11-bit values into an array of 2 A_UINT32 values.
  180. * The first 2 11-bit values will be stored in the first A_UINT32,
  181. * and the last 2 11-bit values will be stored in the second A_UINT32.
  182. */
  183. #define WMI_PACKED_ARR_SIZE(num_entries,bits_per_entry) \
  184. (((num_entries) / (32 / (bits_per_entry))) + \
  185. (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
  186. #define WMI_RETURN_STRING(str) case ((str)): return (A_UINT8 *)(# str);
  187. static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
  188. A_UINT32 entry_index, A_UINT32 bits_per_entry)
  189. {
  190. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  191. A_UINT32 uint_index = (entry_index / entries_per_uint);
  192. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  193. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  194. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  195. return (arr[uint_index] >> start_bit_in_uint) &
  196. (((A_UINT32) 1 << bits_per_entry) - 1);
  197. }
  198. static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
  199. A_UINT32 bits_per_entry, A_UINT32 val)
  200. {
  201. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  202. A_UINT32 uint_index = (entry_index / entries_per_uint);
  203. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  204. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  205. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  206. arr[uint_index] &=
  207. ~((((A_UINT32) 1 << bits_per_entry) - 1) << start_bit_in_uint);
  208. arr[uint_index] |=
  209. ((val & (((A_UINT32) 1 << bits_per_entry) - 1)) << start_bit_in_uint);
  210. }
  211. /** macro to convert MAC address from WMI word format to char array */
  212. #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr,c_macaddr) do { \
  213. (c_macaddr)[0] = (((pwmi_mac_addr)->mac_addr31to0) >> 0) & 0xff; \
  214. (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
  215. (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
  216. (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
  217. (c_macaddr)[4] = (((pwmi_mac_addr)->mac_addr47to32) >> 0) & 0xff; \
  218. (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
  219. } while (0)
  220. /** macro to convert MAC address from char array to WMI word format */
  221. #define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr,pwmi_mac_addr) do { \
  222. (pwmi_mac_addr)->mac_addr31to0 = \
  223. (((A_UINT32)(c_macaddr)[0] << 0) | \
  224. ((A_UINT32)(c_macaddr)[1] << 8) | \
  225. ((A_UINT32)(c_macaddr)[2] << 16) | \
  226. ((A_UINT32)(c_macaddr)[3] << 24)); \
  227. (pwmi_mac_addr)->mac_addr47to32 = ((c_macaddr)[4] | ((c_macaddr)[5] << 8));\
  228. } while (0)
  229. /** macro to convert generic hash of 6 bytes from WMI word format to char array */
  230. #define WMI_GENERIC_HASH_TO_CHAR_ARRAY(pwmi_generic_hash,c_generic_hash) do { \
  231. (c_generic_hash)[0] = (((pwmi_generic_hash)->generic_hash31to0) >> 0) & 0xff; \
  232. (c_generic_hash)[1] = (((pwmi_generic_hash)->generic_hash31to0) >> 8) & 0xff; \
  233. (c_generic_hash)[2] = (((pwmi_generic_hash)->generic_hash31to0) >> 16) & 0xff; \
  234. (c_generic_hash)[3] = (((pwmi_generic_hash)->generic_hash31to0) >> 24) & 0xff; \
  235. (c_generic_hash)[4] = (((pwmi_generic_hash)->generic_hash47to32) >> 0) & 0xff; \
  236. (c_generic_hash)[5] = (((pwmi_generic_hash)->generic_hash47to32) >> 8) & 0xff; \
  237. } while (0)
  238. /** macro to convert generic hash from char array to WMI word format */
  239. #define WMI_CHAR_ARRAY_TO_GENERIC_HASH(c_generic_hash,pwmi_generic_hash) do { \
  240. (pwmi_generic_hash)->generic_hash31to0 = \
  241. (((A_UINT32)(c_generic_hash)[0] << 0) | \
  242. ((A_UINT32)(c_generic_hash)[1] << 8) | \
  243. ((A_UINT32)(c_generic_hash)[2] << 16) | \
  244. ((A_UINT32)(c_generic_hash)[3] << 24)); \
  245. (pwmi_generic_hash)->generic_hash47to32 = \
  246. ((c_generic_hash)[4] | ((c_generic_hash)[5] << 8)); \
  247. } while (0)
  248. /*
  249. * The below function declarations are for implementations on some
  250. * platforms of the above macros, but in function form, to save code
  251. * memory by avoiding macro-inlining of a non-trivial amount of code.
  252. * These function versions of the above macros may not be available
  253. * on all host and target platforms.
  254. */
  255. void wmi_mac_addr_to_char_array(wmi_mac_addr *pwmi_mac_addr, A_UINT8 *c_macaddr);
  256. void wmi_char_array_to_mac_addr(A_UINT8 *c_macaddr, wmi_mac_addr *pwmi_mac_addr);
  257. /*
  258. * wmi command groups.
  259. */
  260. typedef enum {
  261. /* 0 to 2 are reserved */
  262. WMI_GRP_START = 0x3,
  263. WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
  264. WMI_GRP_PDEV, /* 0x4 */
  265. WMI_GRP_VDEV, /* 0x5 */
  266. WMI_GRP_PEER, /* 0x6 */
  267. WMI_GRP_MGMT, /* 0x7 */
  268. WMI_GRP_BA_NEG, /* 0x8 */
  269. WMI_GRP_STA_PS, /* 0x9 */
  270. WMI_GRP_DFS, /* 0xa */
  271. WMI_GRP_ROAM, /* 0xb */
  272. WMI_GRP_OFL_SCAN, /* 0xc */
  273. WMI_GRP_P2P, /* 0xd */
  274. WMI_GRP_AP_PS, /* 0xe */
  275. WMI_GRP_RATE_CTRL, /* 0xf */
  276. WMI_GRP_PROFILE, /* 0x10 */
  277. WMI_GRP_SUSPEND, /* 0x11 */
  278. WMI_GRP_BCN_FILTER, /* 0x12 */
  279. WMI_GRP_WOW, /* 0x13 */
  280. WMI_GRP_RTT, /* 0x14 */
  281. WMI_GRP_SPECTRAL, /* 0x15 */
  282. WMI_GRP_STATS, /* 0x16 */
  283. WMI_GRP_ARP_NS_OFL, /* 0x17 */
  284. WMI_GRP_NLO_OFL, /* 0x18 */
  285. WMI_GRP_GTK_OFL, /* 0x19 */
  286. WMI_GRP_CSA_OFL, /* 0x1a */
  287. WMI_GRP_CHATTER, /* 0x1b */
  288. WMI_GRP_TID_ADDBA, /* 0x1c */
  289. WMI_GRP_MISC, /* 0x1d */
  290. WMI_GRP_GPIO, /* 0x1e */
  291. WMI_GRP_FWTEST, /* 0x1f */
  292. WMI_GRP_TDLS, /* 0x20 */
  293. WMI_GRP_RESMGR, /* 0x21 */
  294. WMI_GRP_STA_SMPS, /* 0x22 */
  295. WMI_GRP_WLAN_HB, /* 0x23 */
  296. WMI_GRP_RMC, /* 0x24 */
  297. WMI_GRP_MHF_OFL, /* 0x25 */
  298. WMI_GRP_LOCATION_SCAN, /* 0x26 */
  299. WMI_GRP_OEM, /* 0x27 */
  300. WMI_GRP_NAN, /* 0x28 */
  301. WMI_GRP_COEX, /* 0x29 */
  302. WMI_GRP_OBSS_OFL, /* 0x2a */
  303. WMI_GRP_LPI, /* 0x2b */
  304. WMI_GRP_EXTSCAN, /* 0x2c */
  305. WMI_GRP_DHCP_OFL, /* 0x2d */
  306. WMI_GRP_IPA, /* 0x2e */
  307. WMI_GRP_MDNS_OFL, /* 0x2f */
  308. WMI_GRP_SAP_OFL, /* 0x30 */
  309. WMI_GRP_OCB, /* 0x31 */
  310. WMI_GRP_SOC, /* 0x32 */
  311. WMI_GRP_PKT_FILTER, /* 0x33 */
  312. WMI_GRP_MAWC, /* 0x34 */
  313. WMI_GRP_PMF_OFFLOAD, /* 0x35 */
  314. WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
  315. WMI_GRP_NAN_DATA, /* 0x37 */
  316. WMI_GRP_PROTOTYPE, /* 0x38 */
  317. WMI_GRP_MONITOR, /* 0x39 */
  318. WMI_GRP_REGULATORY, /* 0x3a */
  319. WMI_GRP_HW_DATA_FILTER, /* 0x3b */
  320. WMI_GRP_WLM, /* 0x3c WLAN Latency Manager */
  321. WMI_GRP_11K_OFFLOAD, /* 0x3d */
  322. WMI_GRP_TWT, /* 0x3e TWT (Target Wake Time) for STA and AP */
  323. WMI_GRP_MOTION_DET, /* 0x3f */
  324. WMI_GRP_SPATIAL_REUSE, /* 0x40 */
  325. WMI_GRP_ESP, /* 0x41 Estimate Service Parameters (802.11mc) */
  326. WMI_GRP_HPCS_PULSE, /* 0x42 */
  327. WMI_GRP_AUDIO, /* 0x43 */
  328. WMI_GRP_CFR_CAPTURE, /* 0x44 */
  329. WMI_GRP_ATM, /* 0x45 ATM (Air Time Management group) */
  330. WMI_GRP_VENDOR, /* 0x46 vendor specific group */
  331. WMI_GRP_LATENCY, /* 0x47 TID/AC level latency config */
  332. WMI_GRP_MLO, /* 0x48 MLO(Multiple Link Operation) management */
  333. WMI_GRP_SAWF, /* 0x49 SAWF (Service Aware WiFi) */
  334. WMI_GRP_QUIET_OFL, /* 0x4a Quiet offloads */
  335. WMI_GRP_ODD, /* 0x4b ODD */
  336. WMI_GRP_TDMA, /* 0x4c TDMA */
  337. WMI_GRP_MANUAL_UL_TRIG /* 0x4d Manual UL OFDMA Trigger */
  338. } WMI_GRP_ID;
  339. #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  340. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  341. /**
  342. * Command IDs and commange events
  343. */
  344. typedef enum {
  345. /** initialize the wlan sub system */
  346. WMI_INIT_CMDID = 0x1,
  347. /* Scan specific commands */
  348. /** start scan request to FW */
  349. WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
  350. /** stop scan request to FW */
  351. WMI_STOP_SCAN_CMDID,
  352. /** full list of channels as defined by the regulatory that will be used by scanner */
  353. WMI_SCAN_CHAN_LIST_CMDID,
  354. /** overwrite default priority table in scan scheduler */
  355. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  356. /** This command to adjust the priority and min.max_rest_time
  357. * of an on ongoing scan request.
  358. */
  359. WMI_SCAN_UPDATE_REQUEST_CMDID,
  360. /** set OUI to be used in probe request if enabled */
  361. WMI_SCAN_PROB_REQ_OUI_CMDID,
  362. /** config adaptive dwell scan */
  363. WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
  364. /** Only applicable to DBS capable product */
  365. WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID,
  366. /* PDEV(physical device) specific commands */
  367. /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
  368. WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
  369. /** set channel. mainly used for supporting monitor mode */
  370. WMI_PDEV_SET_CHANNEL_CMDID,
  371. /** set pdev specific parameters */
  372. WMI_PDEV_SET_PARAM_CMDID,
  373. /** enable packet log */
  374. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  375. /** disable packet log*/
  376. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  377. /** set wmm parameters */
  378. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  379. /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
  380. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  381. /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
  382. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  383. /** Command to send the DSCP-to-TID map to the target */
  384. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  385. /** set quiet ie parameters. primarily used in AP mode */
  386. WMI_PDEV_SET_QUIET_MODE_CMDID,
  387. /** Enable/Disable Green AP Power Save */
  388. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  389. /** get TPC config for the current operating channel */
  390. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  391. /** set the base MAC address for the physical device before a VDEV is created.
  392. * For firmware that doesn't support this feature and this command, the pdev
  393. * MAC address will not be changed. */
  394. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  395. /* eeprom content dump , the same to bdboard data */
  396. WMI_PDEV_DUMP_CMDID,
  397. /* set LED configuration */
  398. WMI_PDEV_SET_LED_CONFIG_CMDID,
  399. /* Get Current temperature of chip in Celcius degree*/
  400. WMI_PDEV_GET_TEMPERATURE_CMDID,
  401. /* Set LED flashing behavior */
  402. WMI_PDEV_SET_LED_FLASHING_CMDID,
  403. /** Enable/Disable Smart Antenna */
  404. WMI_PDEV_SMART_ANT_ENABLE_CMDID,
  405. /** Set Smart Antenna RX antenna*/
  406. WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  407. /** Override the antenna switch table */
  408. WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  409. /** Override the CTL table */
  410. WMI_PDEV_SET_CTL_TABLE_CMDID,
  411. /** Override the array gain table */
  412. WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  413. /** FIPS test mode command */
  414. WMI_PDEV_FIPS_CMDID,
  415. /** get CCK ANI level */
  416. WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
  417. /** get OFDM ANI level */
  418. WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
  419. /** NF Cal Power dBr/dBm */
  420. WMI_PDEV_GET_NFCAL_POWER_CMDID,
  421. /** TxPPDU TPC */
  422. WMI_PDEV_GET_TPC_CMDID,
  423. /** Set to enable MIB stats collection */
  424. WMI_MIB_STATS_ENABLE_CMDID,
  425. /** Set preferred channel list for DBS Mgr */
  426. WMI_PDEV_SET_PCL_CMDID,
  427. /** Set HW mode. Eg: single MAC, DBS & SBS, see soc_hw_mode_t for values */
  428. WMI_PDEV_SET_HW_MODE_CMDID,
  429. /** Set DFS, SCAN modes and other FW configurations */
  430. WMI_PDEV_SET_MAC_CONFIG_CMDID,
  431. /** Set per band and per pdev antenna chains */
  432. WMI_PDEV_SET_ANTENNA_MODE_CMDID,
  433. /** Periodic channel stats request command */
  434. WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
  435. /** WMI command for power debug framework */
  436. WMI_PDEV_WAL_POWER_DEBUG_CMDID,
  437. /** set per-AC rx reorder timeouts */
  438. WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
  439. /** WMI command for WOW gpio and type */
  440. WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
  441. /* Get current ANT's per chain's RSSI info */
  442. WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
  443. /** WMI command for getting Chip Power Stats */
  444. WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
  445. /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
  446. WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
  447. /** vdev restart request for multiple vdevs */
  448. WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID,
  449. /** Pdev update packet routing command */
  450. WMI_PDEV_UPDATE_PKT_ROUTING_CMDID,
  451. /** Get Calibration data version details */
  452. WMI_PDEV_CHECK_CAL_VERSION_CMDID,
  453. /** Set Diversity Gain */
  454. WMI_PDEV_SET_DIVERSITY_GAIN_CMDID,
  455. /** Get chain RSSI and antena index command */
  456. WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID,
  457. /** get bss chan info */
  458. WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
  459. /** update pmk cache info */
  460. WMI_PDEV_UPDATE_PMK_CACHE_CMDID,
  461. /** update fils HLP */
  462. WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID,
  463. /** update ctltable request **/
  464. WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID,
  465. /** Command to set beacon OUI **/
  466. WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID,
  467. /** enable/disable per-AC tx queue optimizations */
  468. WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID,
  469. /** enable/disable rx promiscuous mode */
  470. WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID,
  471. /* set a generic direct DMA ring config */
  472. WMI_PDEV_DMA_RING_CFG_REQ_CMDID,
  473. /* enable/disable Action frame response as HE TB PPDU */
  474. WMI_PDEV_HE_TB_ACTION_FRM_CMDID,
  475. /** filter packet log based on MAC address */
  476. WMI_PDEV_PKTLOG_FILTER_CMDID,
  477. /** wmi command for setting rogue ap configuration */
  478. WMI_PDEV_SET_RAP_CONFIG_CMDID,
  479. /** Specify DSM filters along with disallow bssid filters */
  480. WMI_PDEV_DSM_FILTER_CMDID,
  481. /** enable/disable periodic frame injection */
  482. WMI_PDEV_FRAME_INJECT_CMDID,
  483. /*
  484. * Pdev level command to:
  485. * a) solicit @WMI_TBTTOFFSET_EXT_UPDATE_EVENTID having TBTT in qtime
  486. * domain for all active vdevs or
  487. * b) update one pdevs tbtt offset to another pdev for use in
  488. * RNR TBTT offset calculation.
  489. */
  490. WMI_PDEV_TBTT_OFFSET_SYNC_CMDID,
  491. /** Bss color bitmap for SRG based spatial reuse feature */
  492. WMI_PDEV_SET_SRG_BSS_COLOR_BITMAP_CMDID,
  493. /** Partial BSSID bitmap for SRG based spatial reuse feature */
  494. WMI_PDEV_SET_SRG_PARTIAL_BSSID_BITMAP_CMDID,
  495. /** OBSS color enable bitmap for SRG based spatial reuse feature */
  496. WMI_PDEV_SET_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID,
  497. /** OBSS BSSID enable bitmap for SRG based spatial reuse feature */
  498. WMI_PDEV_SET_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID,
  499. /** OBSS color enable bitmap for NON_SRG based spatial reuse feature */
  500. WMI_PDEV_SET_NON_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID,
  501. /** OBSS BSSID enable bitmap for NON_SRG based spatial reuse feature */
  502. WMI_PDEV_SET_NON_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID,
  503. /** TPC stats display command */
  504. WMI_PDEV_GET_TPC_STATS_CMDID,
  505. /** ENABLE/DISABLE Duration based tx mode selection */
  506. WMI_PDEV_ENABLE_DURATION_BASED_TX_MODE_SELECTION_CMDID,
  507. /* Get DPD status from HALPHY */
  508. WMI_PDEV_GET_DPD_STATUS_CMDID,
  509. /* Set bios sar table */
  510. WMI_PDEV_SET_BIOS_SAR_TABLE_CMDID,
  511. /* Set bios geo table */
  512. WMI_PDEV_SET_BIOS_GEO_TABLE_CMDID,
  513. /* Get Calibration status from HALPHY */
  514. WMI_PDEV_GET_HALPHY_CAL_STATUS_CMDID,
  515. /* Set HALPHY CAL bitmap */
  516. WMI_PDEV_SET_HALPHY_CAL_BMAP_CMDID,
  517. /* WMI cmd to set a single vdev param for multiple vdevs */
  518. WMI_PDEV_MULTIPLE_VDEV_SET_PARAM_CMDID,
  519. /* Configure MEC AGING TIMER */
  520. WMI_PDEV_MEC_AGING_TIMER_CONFIG_CMDID,
  521. /* Set bios interface table */
  522. WMI_PDEV_SET_BIOS_INTERFACE_CMDID,
  523. WMI_PDEV_FIPS_EXTEND_CMDID,
  524. WMI_PDEV_FIPS_MODE_SET_CMDID,
  525. WMI_PDEV_FEATURESET_CMDID,
  526. /** tag as Filter Pass category and the filters set for FP mode */
  527. WMI_PDEV_MESH_RX_FILTER_ENABLE_CMDID,
  528. /* WMI cmd to set Target rate to power table */
  529. WMI_PDEV_SET_TGTR2P_TABLE_CMDID,
  530. /* WMI cmd to set RF path for PHY */
  531. WMI_PDEV_SET_RF_PATH_CMDID,
  532. /** WSI stats info WMI command */
  533. WMI_PDEV_WSI_STATS_INFO_CMDID,
  534. /*
  535. * WMI cmd to Enable LED blink based on Tx+Rx Data Rate
  536. * and download LED ON/OFF Rate table
  537. */
  538. WMI_PDEV_ENABLE_LED_BLINK_DOWNLOAD_TABLE_CMDID,
  539. /** WMI Command to enable wifi radar */
  540. WMI_PDEV_ENABLE_WIFI_RADAR_CMDID,
  541. /* WMI Command to enable xLNA */
  542. WMI_PDEV_ENABLE_XLNA_CMDID,
  543. /**
  544. * WMI cmd to set custom TX power backoff value per band/chain/MCS to PHY.
  545. */
  546. WMI_PDEV_SET_CUSTOM_TX_POWER_PER_MCS_CMDID,
  547. /* VDEV (virtual device) specific commands */
  548. /** vdev create */
  549. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
  550. /** vdev delete */
  551. WMI_VDEV_DELETE_CMDID,
  552. /** vdev start request */
  553. WMI_VDEV_START_REQUEST_CMDID,
  554. /** vdev restart request (RX only, NO TX, used for CAC period)*/
  555. WMI_VDEV_RESTART_REQUEST_CMDID,
  556. /** vdev up request */
  557. WMI_VDEV_UP_CMDID,
  558. /** vdev stop request */
  559. WMI_VDEV_STOP_CMDID,
  560. /** vdev down request */
  561. WMI_VDEV_DOWN_CMDID,
  562. /* set a vdev param */
  563. WMI_VDEV_SET_PARAM_CMDID,
  564. /* set a key (used for setting per peer unicast and per vdev multicast) */
  565. WMI_VDEV_INSTALL_KEY_CMDID,
  566. /* wnm sleep mode command */
  567. WMI_VDEV_WNM_SLEEPMODE_CMDID,
  568. WMI_VDEV_WMM_ADDTS_CMDID,
  569. WMI_VDEV_WMM_DELTS_CMDID,
  570. WMI_VDEV_SET_WMM_PARAMS_CMDID,
  571. WMI_VDEV_SET_GTX_PARAMS_CMDID,
  572. WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
  573. WMI_VDEV_PLMREQ_START_CMDID,
  574. WMI_VDEV_PLMREQ_STOP_CMDID,
  575. /* TSF timestamp action for specified vdev */
  576. WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
  577. /** set the additional IEs in probe requests for scan or
  578. * assoc req etc for frames FW locally generates */
  579. WMI_VDEV_SET_IE_CMDID,
  580. WMI_VDEV_RATEMASK_CMDID,
  581. /** ATF VDEV REQUEST commands. */
  582. WMI_VDEV_ATF_REQUEST_CMDID,
  583. /** Command to send the DSCP-to-TID map to the target for VAP */
  584. WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
  585. /* Configure filter for Neighbor Rx Pkt (smart mesh selective listening) */
  586. WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
  587. /** set quiet ie parameters. primarily used in AP mode */
  588. WMI_VDEV_SET_QUIET_MODE_CMDID,
  589. /** To set custom aggregation size for per vdev */
  590. WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
  591. /* DISA feature: Encrypt-decrypt data request */
  592. WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID,
  593. /** Command to enable mac randomizaton **/
  594. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID,
  595. /** WMI commands related to dbg arp stats */
  596. WMI_VDEV_SET_ARP_STAT_CMDID,
  597. WMI_VDEV_GET_ARP_STAT_CMDID,
  598. /** get tx power for the current vdev */
  599. WMI_VDEV_GET_TX_POWER_CMDID,
  600. /* limit STA offchannel activity */
  601. WMI_VDEV_LIMIT_OFFCHAN_CMDID,
  602. /** To set custom software retries per-AC for vdev */
  603. WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID,
  604. /** To set chainmask configuration for vdev */
  605. WMI_VDEV_CHAINMASK_CONFIG_CMDID,
  606. WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID,
  607. /* request LTE-Coex info */
  608. WMI_VDEV_GET_MWS_COEX_INFO_CMDID,
  609. /** delete all peer (excluding bss peer) */
  610. WMI_VDEV_DELETE_ALL_PEER_CMDID,
  611. /* To set bss max idle time related parameters */
  612. WMI_VDEV_BSS_MAX_IDLE_TIME_CMDID,
  613. /** Indicates FW to trigger Audio sync */
  614. WMI_VDEV_AUDIO_SYNC_TRIGGER_CMDID,
  615. /** Gives Qtimer value to FW */
  616. WMI_VDEV_AUDIO_SYNC_QTIMER_CMDID,
  617. /** Preferred channel list for each vdev */
  618. WMI_VDEV_SET_PCL_CMDID,
  619. /** VDEV_GET_BIG_DATA_CMD IS DEPRECATED - DO NOT USE */
  620. WMI_VDEV_GET_BIG_DATA_CMDID,
  621. /** Get per vdev BIG DATA stats phase 2 */
  622. WMI_VDEV_GET_BIG_DATA_P2_CMDID,
  623. /** set TPC PSD/non-PSD power */
  624. WMI_VDEV_SET_TPC_POWER_CMDID,
  625. /** IGMP OFFLOAD */
  626. WMI_VDEV_IGMP_OFFLOAD_CMDID,
  627. /** Enable/Disable Intra Bss for each vdev */
  628. WMI_VDEV_ENABLE_DISABLE_INTRA_BSS_CMDID,
  629. /* set vdev mu sniffer param */
  630. WMI_VDEV_SET_MU_SNIF_CMDID,
  631. /** ICMP OFFLOAD */
  632. WMI_VDEV_ICMP_OFFLOAD_CMDID,
  633. /** Update vdev mac address */
  634. WMI_VDEV_UPDATE_MAC_ADDR_CMDID,
  635. /* WMI cmd to perform operation on multiple peer based on subcmd type */
  636. WMI_VDEV_MULTIPLE_PEER_GROUP_CMDID,
  637. /** Set LTF key seed which will be further used to derive LTF keys */
  638. WMI_VDEV_SET_LTF_KEY_SEED_CMDID,
  639. WMI_VDEV_PN_MGMT_RX_FILTER_CMDID,
  640. /** Enable SR prohibit feature for TIDs of vdev */
  641. WMI_VDEV_PARAM_ENABLE_SR_PROHIBIT_CMDID,
  642. /** pause vdev's Tx, Rx, or both for a specific duration */
  643. WMI_VDEV_PAUSE_CMDID,
  644. /** WMI Command to set status of CSA event from HOST */
  645. WMI_CSA_EVENT_STATUS_INDICATION_CMDID,
  646. /** Request to firmware to probe scheduler modes */
  647. WMI_VDEV_SCHED_MODE_PROBE_REQ_CMDID,
  648. /** Connect request on the vdev */
  649. WMI_VDEV_OOB_CONNECTION_REQ_CMDID,
  650. /**
  651. * WMI command to inform the target of the AP's operating bandwidth
  652. * (only applicable for STA vdev)
  653. */
  654. WMI_VDEV_REPORT_AP_OPER_BW_CMDID,
  655. /* peer specific commands */
  656. /** create a peer */
  657. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
  658. /** delete a peer */
  659. WMI_PEER_DELETE_CMDID,
  660. /** flush specific tid queues of a peer */
  661. WMI_PEER_FLUSH_TIDS_CMDID,
  662. /** set a parameter of a peer */
  663. WMI_PEER_SET_PARAM_CMDID,
  664. /** set peer to associated state. will cary all parameters determined during assocication time */
  665. WMI_PEER_ASSOC_CMDID,
  666. /**add a wds (4 address) entry. used only for testing WDS feature on AP products */
  667. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  668. /**remove wds (4 address) entry. used only for testing WDS feature on AP products */
  669. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  670. /** set up mcast group info for multicast to unicast conversion */
  671. WMI_PEER_MCAST_GROUP_CMDID,
  672. /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
  673. WMI_PEER_INFO_REQ_CMDID,
  674. /** request the estimated link speed for the peer. FW shall respond with
  675. * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
  676. */
  677. WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
  678. /** Set the conditions to report peer justified rate to driver
  679. * The justified rate means the user-rate is justified by PER.
  680. */
  681. WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
  682. /** update a wds (4 address) entry */
  683. WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
  684. /** add a proxy sta entry */
  685. WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
  686. /** Set Smart Antenna TX antenna */
  687. WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  688. /** Set Smart Antenna TX train info */
  689. WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  690. /** Set SA node config options */
  691. WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  692. /** ATF PEER REQUEST commands */
  693. WMI_PEER_ATF_REQUEST_CMDID,
  694. /** bandwidth fairness (BWF) peer configuration request command */
  695. WMI_PEER_BWF_REQUEST_CMDID,
  696. /** rx reorder queue setup for peer/tid */
  697. WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  698. /** rx reorder queue remove for peer/tid */
  699. WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
  700. /** specify a limit for rx A-MPDU block size */
  701. WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
  702. /** request peer antdiv info from FW. FW shall respond with PEER_ANTDIV_INFO_EVENTID */
  703. WMI_PEER_ANTDIV_INFO_REQ_CMDID,
  704. /*
  705. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def was originally mistakenly
  706. * placed here, amongst the CMDID defs.
  707. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def has been moved to the
  708. * EVENTID section, but to preserve backwards compatibility, the value
  709. * here that had been used for WMI_PEER_OPER_MODE_CHANGE_EVENTID
  710. * is kept reserved/deprecated.
  711. *
  712. * This WMI_PEER_RESERVED0_CMDID value can be replaced with an actual
  713. * WMI peer event message ID, though it will be simpler to instead add
  714. * new WMI_PEER CMDID defs at the end of the WMI_GRP_PEER WMI_CMD_GRP.
  715. */
  716. WMI_PEER_RESERVED0_CMDID,
  717. /** Peer/Tid/Msduq threshold update */
  718. WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID,
  719. /** TID specific configurations per peer of type
  720. * wmi_peer_tid_configurations_cmd_fixed_param
  721. */
  722. WMI_PEER_TID_CONFIGURATIONS_CMDID,
  723. /** Peer configuration for Channel Frequency Response (CFR) capture
  724. * of type wmi_peer_cfr_capture_cmd.
  725. *
  726. * On targets that do not use the direct DMA framework,
  727. * completion of the CFR capture is communicated through
  728. * HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND.
  729. * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_MSG_TYPE_1
  730. * in WMI Service Ready.
  731. *
  732. * On targets that use direct DMA, completion of CFR capture is
  733. * communicated through WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID
  734. * using module ID WMI_DMA_RING_CONFIG_MODULE_RTT.
  735. * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_EVT_TYPE_1
  736. * in WMI Service Ready and enumerate WMI_DMA_RING_CONFIG_MODULE_RTT
  737. * in the dma_ring_caps entry of WMI_SERVICE_READY_EXT_EVENTID.
  738. * Additional MAC metadata is provided in WMI_PEER_CFR_CAPTURE_EVENTID.
  739. */
  740. WMI_PEER_CFR_CAPTURE_CMDID,
  741. /** WMI command related to AP channel width switching */
  742. WMI_PEER_CHAN_WIDTH_SWITCH_CMDID,
  743. /** WMI command to fetch current tx PN for the peer */
  744. WMI_PEER_TX_PN_REQUEST_CMDID,
  745. /** unmap response with peer ids */
  746. WMI_PEER_UNMAP_RESPONSE_CMDID,
  747. /** WMI command for per-peer configuration of VLAN header operations
  748. * during TX and RX
  749. */
  750. WMI_PEER_CONFIG_VLAN_CMDID,
  751. /** WMI command for per-peer configuration of PPE DS */
  752. WMI_PEER_CONFIG_PPE_DS_CMDID,
  753. /** Enable/Disable Intra Bss for the peer */
  754. WMI_PEER_ENABLE_DISABLE_INTRA_BSS_CMDID,
  755. WMI_PEER_RX_PN_REQUEST_CMDID,
  756. /* Mac addr based filtering*/
  757. WMI_PEER_TX_FILTER_CMDID,
  758. /** flush specific tid queues of a peer */
  759. WMI_PEER_FLUSH_POLICY_CMDID,
  760. /* Set disabled scheduler modes for one or more peers */
  761. WMI_PEER_SCHED_MODE_DISABLE_CMDID,
  762. /* Group SET cmd for PEERS */
  763. WMI_PEER_BULK_SET_CMDID,
  764. /* WMI command to setup reorder queue for multiple TIDs */
  765. WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID,
  766. /* beacon/management specific commands */
  767. /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
  768. WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
  769. /** transmit beacon by value */
  770. WMI_PDEV_SEND_BCN_CMDID,
  771. /** set the beacon template. used in beacon offload mode to setup the
  772. * the common beacon template with the FW to be used by FW to generate beacons */
  773. WMI_BCN_TMPL_CMDID,
  774. /** set beacon filter with FW */
  775. WMI_BCN_FILTER_RX_CMDID,
  776. /* enable/disable filtering of probe requests in the firmware */
  777. WMI_PRB_REQ_FILTER_RX_CMDID,
  778. /** transmit management frame by value. will be deprecated */
  779. WMI_MGMT_TX_CMDID,
  780. /** set the probe response template. used in beacon offload mode to setup the
  781. * the common probe response template with the FW to be used by FW to generate
  782. * probe responses */
  783. WMI_PRB_TMPL_CMDID,
  784. /** Transmit Mgmt frame by reference */
  785. WMI_MGMT_TX_SEND_CMDID,
  786. /** Transmit data frame by reference */
  787. WMI_OFFCHAN_DATA_TX_SEND_CMDID,
  788. /** transmit FILS Discovery frame by value */
  789. WMI_PDEV_SEND_FD_CMDID,
  790. /** Cmd to enable/disable offloaded beacons */
  791. WMI_BCN_OFFLOAD_CTRL_CMDID,
  792. /** Cmd to enable FW handling BSS color change notification from AP. */
  793. WMI_BSS_COLOR_CHANGE_ENABLE_CMDID,
  794. /** To configure Beacon offload quiet-ie params */
  795. WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID,
  796. /** set FILS Discovery frame template for FW to generate FD frames */
  797. WMI_FD_TMPL_CMDID,
  798. /** Transmit QoS null Frame over wmi interface */
  799. WMI_QOS_NULL_FRAME_TX_SEND_CMDID,
  800. /** WMI CMD to receive the management filter criteria from the host for RX REO */
  801. WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID,
  802. /** commands to directly control ba negotiation directly from host. only used in test mode */
  803. /** turn off FW Auto addba mode and let host control addba */
  804. WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
  805. /** send add ba request */
  806. WMI_ADDBA_SEND_CMDID,
  807. WMI_ADDBA_STATUS_CMDID,
  808. /** send del ba */
  809. WMI_DELBA_SEND_CMDID,
  810. /** set add ba response will be used by FW to generate addba response*/
  811. WMI_ADDBA_SET_RESP_CMDID,
  812. /** send single VHT MPDU with AMSDU */
  813. WMI_SEND_SINGLEAMSDU_CMDID,
  814. /** Station power save specific config */
  815. /** enable/disable station powersave */
  816. WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
  817. /** set station power save specific parameter */
  818. WMI_STA_POWERSAVE_PARAM_CMDID,
  819. /** set station mimo powersave mode */
  820. WMI_STA_MIMO_PS_MODE_CMDID,
  821. /** config station TX cycle percentage in a beacon interval */
  822. WMI_STA_TDCC_CONFIG_CMDID,
  823. /** DFS-specific commands */
  824. /** enable DFS (radar detection)*/
  825. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
  826. /** disable DFS (radar detection)*/
  827. WMI_PDEV_DFS_DISABLE_CMDID,
  828. /** enable DFS phyerr/parse filter offload */
  829. WMI_DFS_PHYERR_FILTER_ENA_CMDID,
  830. /** enable DFS phyerr/parse filter offload */
  831. WMI_DFS_PHYERR_FILTER_DIS_CMDID,
  832. /** enable DFS phyerr processing offload */
  833. WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID,
  834. /** disable DFS phyerr processing offload */
  835. WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID,
  836. /** set ADFS channel config */
  837. WMI_VDEV_ADFS_CH_CFG_CMDID,
  838. /** abort ADFS off-channel-availability-check currently in progress */
  839. WMI_VDEV_ADFS_OCAC_ABORT_CMDID,
  840. /* Roaming specific commands */
  841. /** set roam scan mode */
  842. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
  843. /** set roam scan RSSI threshold below which roam scan is enabled */
  844. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  845. /** set roam scan period for periodic roam scan mode */
  846. WMI_ROAM_SCAN_PERIOD,
  847. /** set roam scan trigger RSSI change threshold */
  848. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  849. /** set roam AP profile */
  850. WMI_ROAM_AP_PROFILE,
  851. /** set channel list for roam scans */
  852. WMI_ROAM_CHAN_LIST,
  853. /** Stop scan command */
  854. WMI_ROAM_SCAN_CMD,
  855. /** roaming sme offload sync complete */
  856. WMI_ROAM_SYNCH_COMPLETE,
  857. /** set ric request element for 11r roaming */
  858. WMI_ROAM_SET_RIC_REQUEST_CMDID,
  859. /** Invoke roaming forcefully */
  860. WMI_ROAM_INVOKE_CMDID,
  861. /** roaming filter cmd to allow further filtering of roaming candidate */
  862. WMI_ROAM_FILTER_CMDID,
  863. /** set gateway ip, mac and retries for subnet change detection */
  864. WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
  865. /** configure thresholds for MAWC */
  866. WMI_ROAM_CONFIGURE_MAWC_CMDID,
  867. /** configure MultiBand Operation(refer WFA MBO spec) parameter */
  868. WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
  869. /** configure packet error rate threshold for triggering roaming */
  870. WMI_ROAM_PER_CONFIG_CMDID,
  871. /** configure BSS Transition Management (BTM) offload for roaming */
  872. WMI_ROAM_BTM_CONFIG_CMDID,
  873. /** Enable or Disable Fast Initial Link Setup (FILS) feature */
  874. WMI_ENABLE_FILS_CMDID,
  875. /** Request for roam scan stats */
  876. WMI_REQUEST_ROAM_SCAN_STATS_CMDID,
  877. /** Configure BSS load parameters for roam trigger */
  878. WMI_ROAM_BSS_LOAD_CONFIG_CMDID,
  879. /** Configure deauth roam trigger parameters */
  880. WMI_ROAM_DEAUTH_CONFIG_CMDID,
  881. /** Configure idle roam trigger parameters */
  882. WMI_ROAM_IDLE_CONFIG_CMDID,
  883. /**
  884. * WMI_ROAM_DSM_FILTER_CMDID is deprecated and should be unused,
  885. * but leave it reserved just to be safe.
  886. */
  887. DEPRECATED__WMI_ROAM_DSM_FILTER_CMDID,
  888. /** Enable or disable roaming triggers */
  889. WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID,
  890. /** Pre-Authentication completion status command */
  891. WMI_ROAM_PREAUTH_STATUS_CMDID,
  892. /** Command to get roam scan channels list */
  893. WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID,
  894. /** configure MLO parameters for roaming */
  895. WMI_ROAM_MLO_CONFIG_CMDID,
  896. /** set roam params **/
  897. WMI_ROAM_SET_PARAM_CMDID,
  898. /** Enable or Disable roam vendor control */
  899. WMI_ROAM_ENABLE_VENDOR_CONTROL_CMDID,
  900. /** Get firmware ini value */
  901. WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID,
  902. /** offload scan specific commands */
  903. /** set offload scan AP profile */
  904. WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
  905. /** remove offload scan AP profile */
  906. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  907. /** set offload scan period */
  908. WMI_OFL_SCAN_PERIOD,
  909. /* P2P specific commands */
  910. /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
  911. * generated during p2p listen and for p2p discoverability */
  912. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
  913. /** enable/disable p2p discoverability on STA/AP VDEVs */
  914. WMI_P2P_DEV_SET_DISCOVERABILITY,
  915. /** set p2p ie to be carried in beacons generated by FW for GO */
  916. WMI_P2P_GO_SET_BEACON_IE,
  917. /** set p2p ie to be carried in probe response frames generated by FW for GO */
  918. WMI_P2P_GO_SET_PROBE_RESP_IE,
  919. /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
  920. * attribute in the beacons/probe responses received.
  921. * Note: This command is currently used only for Apple P2P implementation.
  922. */
  923. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  924. /** set the configure of p2p find offload */
  925. WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
  926. /** set the vendor specific p2p ie data for p2p find offload using */
  927. WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
  928. /** set the BSSID/device name pattern of p2p find offload */
  929. WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
  930. /** set OppPS related parameters **/
  931. WMI_P2P_SET_OPPPS_PARAM_CMDID,
  932. /** set listen offload start related parameters */
  933. WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
  934. /** set listen offload stop related parameters */
  935. WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
  936. /** set DFS master AP configuration */
  937. WMI_P2P_GO_DFS_AP_CONFIG_CMDID,
  938. /** AP power save specific config */
  939. /** set AP power save specific param */
  940. WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
  941. /** set AP UAPSD coex specific param */
  942. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  943. /** set Enhanced Green AP param */
  944. WMI_AP_PS_EGAP_PARAM_CMDID,
  945. /** Rate-control specific commands */
  946. WMI_PEER_RATE_RETRY_SCHED_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
  947. /** WLAN Profiling commands. */
  948. WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
  949. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  950. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  951. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  952. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  953. /** Suspend resume command Ids */
  954. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
  955. WMI_PDEV_RESUME_CMDID,
  956. /* Beacon filter commands */
  957. /** add a beacon filter */
  958. WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
  959. /** remove a beacon filter */
  960. WMI_RMV_BCN_FILTER_CMDID,
  961. /* WOW Specific WMI commands*/
  962. /** add pattern for awake */
  963. WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
  964. /** deleta a wake pattern */
  965. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  966. /** enable/deisable wake event */
  967. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  968. /** enable WOW */
  969. WMI_WOW_ENABLE_CMDID,
  970. /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
  971. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  972. /* IOAC add keep alive cmd. */
  973. WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
  974. /* IOAC del keep alive cmd. */
  975. WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
  976. /* IOAC add pattern for awake */
  977. WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
  978. /* IOAC deleta a wake pattern */
  979. WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
  980. /* D0-WOW enable or disable cmd */
  981. WMI_D0_WOW_ENABLE_DISABLE_CMDID,
  982. /* enable extend WoW */
  983. WMI_EXTWOW_ENABLE_CMDID,
  984. /* Extend WoW command to configure app type1 parameter */
  985. WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
  986. /* Extend WoW command to configure app type2 parameter */
  987. WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
  988. /* enable ICMPv6 Network advertisement filtering */
  989. WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
  990. /*
  991. * Set a pattern to match UDP packet in WOW mode.
  992. * If match, construct a tx frame in a local buffer
  993. * to send through the peer AP to the entity in the
  994. * IP network that sent the UDP packet to this STA.
  995. */
  996. WMI_WOW_UDP_SVC_OFLD_CMDID,
  997. /* configure WOW host wakeup PIN pattern */
  998. WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
  999. /* Set which action category should wake the host from suspend */
  1000. WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
  1001. /*
  1002. * Set a pattern to match broadcast CoAP packet in WoW mode.
  1003. * If match and verify pass, cache the packet and then reply
  1004. * a unicast response in local with pre-configured packet.
  1005. */
  1006. WMI_WOW_COAP_ADD_PATTERN_CMDID,
  1007. /* Delete a pattern match broadcast CoAP packet */
  1008. WMI_WOW_COAP_DEL_PATTERN_CMDID,
  1009. /*
  1010. * Add a CoAP keepalive pattern to send a CoAP broadcast packet
  1011. * when configured timeout occurred.
  1012. */
  1013. WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID,
  1014. /* Delete a CoAP keepalive pattern */
  1015. WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID,
  1016. /* Host read the cached CoAP packets after resume */
  1017. WMI_WOW_COAP_GET_BUF_INFO_CMDID,
  1018. /* RTT measurement related cmd */
  1019. /** request to make an RTT measurement */
  1020. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
  1021. /** request to report a tsf measurement */
  1022. WMI_RTT_TSF_CMDID,
  1023. /** RTT 11az PASN authentication status */
  1024. WMI_RTT_PASN_AUTH_STATUS_CMD,
  1025. /** RTT 11az PASN deauthentication cmd */
  1026. WMI_RTT_PASN_DEAUTH_CMD,
  1027. /** spectral scan command */
  1028. /** configure spectral scan */
  1029. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
  1030. /** enable/disable spectral scan and trigger */
  1031. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  1032. /* F/W stats */
  1033. /** one time request for stats */
  1034. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
  1035. /** Push MCC Adaptive Scheduler Stats to Firmware */
  1036. WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
  1037. /** one time request for txrx stats */
  1038. WMI_REQUEST_STATS_EXT_CMDID,
  1039. /* Link Layer stats */
  1040. /** Request for link layer stats */
  1041. WMI_REQUEST_LINK_STATS_CMDID,
  1042. /** Request for setting params to link layer stats */
  1043. WMI_START_LINK_STATS_CMDID,
  1044. /** Request to clear stats*/
  1045. WMI_CLEAR_LINK_STATS_CMDID,
  1046. /** Request for getting the Firmware Memory Dump */
  1047. WMI_GET_FW_MEM_DUMP_CMDID,
  1048. /** Request to flush of the buffered debug messages */
  1049. WMI_DEBUG_MESG_FLUSH_CMDID,
  1050. /** Cmd to configure the verbose level */
  1051. WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
  1052. /** One time request for wlan stats */
  1053. WMI_REQUEST_WLAN_STATS_CMDID,
  1054. /** Request for getting RCPI of peer */
  1055. WMI_REQUEST_RCPI_CMDID,
  1056. /** One time request for peer stats info */
  1057. WMI_REQUEST_PEER_STATS_INFO_CMDID,
  1058. /** One time request for radio channel stats */
  1059. WMI_REQUEST_RADIO_CHAN_STATS_CMDID,
  1060. /** request for WLM (wlan latency manager) stats */
  1061. WMI_REQUEST_WLM_STATS_CMDID,
  1062. /** request for control path stats */
  1063. WMI_REQUEST_CTRL_PATH_STATS_CMDID,
  1064. /** unified request for LL stats and get station cmds */
  1065. WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID,
  1066. /** request for thermal stats */
  1067. WMI_REQUEST_THERMAL_STATS_CMDID,
  1068. /** request for HALPHY stats through ctrl path */
  1069. WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID,
  1070. /** ARP OFFLOAD REQUEST*/
  1071. WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
  1072. /** Proactive ARP Response Add Pattern Command*/
  1073. WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  1074. /** Proactive ARP Response Del Pattern Command*/
  1075. WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  1076. /** NS offload confid*/
  1077. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
  1078. /** APFIND Config */
  1079. WMI_APFIND_CMDID,
  1080. /** Passpoint list config */
  1081. WMI_PASSPOINT_LIST_CONFIG_CMDID,
  1082. /** configure suppressing parameters for MAWC */
  1083. WMI_NLO_CONFIGURE_MAWC_CMDID,
  1084. /* GTK offload Specific WMI commands*/
  1085. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
  1086. /* CSA offload Specific WMI commands*/
  1087. /** csa offload enable */
  1088. WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
  1089. /** chan switch command */
  1090. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  1091. /* Chatter commands*/
  1092. /* Change chatter mode of operation */
  1093. WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
  1094. /** chatter add coalescing filter command */
  1095. WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
  1096. /** chatter delete coalescing filter command */
  1097. WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
  1098. /** chatter coalecing query command */
  1099. WMI_CHATTER_COALESCING_QUERY_CMDID,
  1100. /**addba specific commands */
  1101. /** start the aggregation on this TID */
  1102. WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
  1103. /** stop the aggregation on this TID */
  1104. WMI_PEER_TID_DELBA_CMDID,
  1105. /** set station mimo powersave method */
  1106. WMI_STA_DTIM_PS_METHOD_CMDID,
  1107. /** Configure the Station UAPSD AC Auto Trigger Parameters */
  1108. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  1109. /** Configure the Keep Alive Parameters */
  1110. WMI_STA_KEEPALIVE_CMDID,
  1111. /* Request ssn from target for a sta/tid pair */
  1112. WMI_BA_REQ_SSN_CMDID,
  1113. /* misc command group */
  1114. /** echo command mainly used for testing */
  1115. WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
  1116. /* !!IMPORTANT!!
  1117. * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
  1118. * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
  1119. * as we MUST have a fixed value here to maintain compatibility between
  1120. * UTF and the ART2 driver
  1121. */
  1122. /** UTF WMI commands */
  1123. WMI_PDEV_UTF_CMDID,
  1124. /** set debug log config */
  1125. WMI_DBGLOG_CFG_CMDID,
  1126. /* QVIT specific command id */
  1127. WMI_PDEV_QVIT_CMDID,
  1128. /* Factory Testing Mode request command
  1129. * used for integrated chipsets */
  1130. WMI_PDEV_FTM_INTG_CMDID,
  1131. /* set and get keepalive parameters command */
  1132. WMI_VDEV_SET_KEEPALIVE_CMDID,
  1133. WMI_VDEV_GET_KEEPALIVE_CMDID,
  1134. /* For fw recovery test command */
  1135. WMI_FORCE_FW_HANG_CMDID,
  1136. /* Set Mcast/Bdcast filter */
  1137. WMI_SET_MCASTBCAST_FILTER_CMDID,
  1138. /** set thermal management params **/
  1139. WMI_THERMAL_MGMT_CMDID,
  1140. /** set host auto shutdown params **/
  1141. WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
  1142. /** set tpc chainmask config command */
  1143. WMI_TPC_CHAINMASK_CONFIG_CMDID,
  1144. /** set Antenna diversity command */
  1145. WMI_SET_ANTENNA_DIVERSITY_CMDID,
  1146. /** Set OCB Sched Request, deprecated */
  1147. WMI_OCB_SET_SCHED_CMDID,
  1148. /** Set RSSI monitoring config command */
  1149. WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
  1150. /** Enable/disable Large Receive Offload processing; provide cfg params */
  1151. WMI_LRO_CONFIG_CMDID,
  1152. /** transfer data from host to firmware to write flash */
  1153. WMI_TRANSFER_DATA_TO_FLASH_CMDID,
  1154. /** Command to enable/disable filtering of multicast IP with unicast mac */
  1155. WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
  1156. /** Command to control WISA mode */
  1157. WMI_VDEV_WISA_CMDID,
  1158. /** set debug log time stamp sync up with host */
  1159. WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
  1160. /** Command for host to set/delete multiple mcast filters */
  1161. WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
  1162. /** upload a requested section of data from firmware flash to host */
  1163. WMI_READ_DATA_FROM_FLASH_CMDID,
  1164. /* Thermal Throttling SET CONF commands */
  1165. WMI_THERM_THROT_SET_CONF_CMDID,
  1166. /* set runtime dpd recalibration params */
  1167. WMI_RUNTIME_DPD_RECAL_CMDID,
  1168. /* get TX power for input HALPHY parameters */
  1169. WMI_GET_TPC_POWER_CMDID,
  1170. /* Specify when to start monitoring for idle state */
  1171. WMI_IDLE_TRIGGER_MONITOR_CMDID,
  1172. /** set ELNA BYPASS status */
  1173. WMI_SET_ELNA_BYPASS_CMDID,
  1174. /** get ELNA BYPASS status */
  1175. WMI_GET_ELNA_BYPASS_CMDID,
  1176. /** get ANI level of the channels */
  1177. WMI_GET_CHANNEL_ANI_CMDID,
  1178. /** set OCL (One Chain Listen) mode */
  1179. WMI_SET_OCL_CMDID,
  1180. /** Consolidated params for pdev/vdev:
  1181. * Set multiple parameters at once for one pdev or vdev.
  1182. */
  1183. WMI_SET_MULTIPLE_PDEV_VDEV_PARAM_CMDID,
  1184. /* WMI cmd used to allocate HW scratch registers */
  1185. WMI_PMM_SCRATCH_REG_ALLOCATION_CMDID,
  1186. /* WMI cmd used to start/stop XGAP (XPAN Green AP) */
  1187. WMI_XGAP_ENABLE_CMDID,
  1188. /* H2T HPA message */
  1189. WMI_HPA_CMDID,
  1190. /* WMI comamnd for standalone sounding */
  1191. WMI_VDEV_STANDALONE_SOUND_CMDID,
  1192. /* WMI cmd used by host to send the switch response status to FW */
  1193. WMI_AUDIO_TRANSPORT_SWITCH_RESP_STATUS_CMDID,
  1194. /** WMI command to set active traffic type bitmap for a peer */
  1195. WMI_PEER_ACTIVE_TRAFFIC_MAP_CMDID,
  1196. /** WMI command to Request Opportunistic Power Mgmt (OPM) stats */
  1197. WMI_REQUEST_OPM_STATS_CMDID,
  1198. /** WMI command to Request SAP suspend/resume */
  1199. WMI_SET_AP_SUSPEND_RESUME_CMDID,
  1200. /** Unsynchronized Service Discovery */
  1201. WMI_USD_SERVICE_CMDID,
  1202. /* Offload 11k related requests */
  1203. WMI_11K_OFFLOAD_REPORT_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_11K_OFFLOAD),
  1204. /* invoke neighbor report from FW */
  1205. WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID,
  1206. /* GPIO Configuration */
  1207. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
  1208. WMI_GPIO_OUTPUT_CMDID,
  1209. /* Txbf configuration command */
  1210. WMI_TXBF_CMDID,
  1211. /* Antenna Controller, connected to wlan debug uart/GPIO. */
  1212. WMI_ANT_CONTROLLER_CMDID,
  1213. WMI_GPIO_STATE_REQ_CMDID,
  1214. /* FWTEST Commands */
  1215. WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
  1216. /** set NoA descs **/
  1217. WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
  1218. /* UNIT Tests */
  1219. WMI_UNIT_TEST_CMDID,
  1220. /* set debug and tuning parameters */
  1221. WMI_FWTEST_CMDID,
  1222. /* Q-Boost configuration test commands */
  1223. WMI_QBOOST_CFG_CMDID,
  1224. /* Simulation Test command */
  1225. WMI_SIMULATION_TEST_CMDID,
  1226. /* WFA test config command */
  1227. WMI_WFA_CONFIG_CMDID,
  1228. /** TDLS Configuration */
  1229. /** enable/disable TDLS */
  1230. WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
  1231. /** set tdls peer state */
  1232. WMI_TDLS_PEER_UPDATE_CMDID,
  1233. /** TDLS Offchannel control */
  1234. WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
  1235. /** Resmgr Configuration */
  1236. /** Adaptive OCS is enabled by default in the FW. This command is used to
  1237. * disable FW based adaptive OCS.
  1238. */
  1239. WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
  1240. /** set the requested channel time quota for the home channels */
  1241. WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
  1242. /** set the requested latency for the home channels */
  1243. WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
  1244. /** STA SMPS Configuration */
  1245. /** force SMPS mode */
  1246. WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
  1247. /** set SMPS parameters */
  1248. WMI_STA_SMPS_PARAM_CMDID,
  1249. /* Wlan HB commands*/
  1250. /* enable/disable wlan HB */
  1251. WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
  1252. /* set tcp parameters for wlan HB */
  1253. WMI_HB_SET_TCP_PARAMS_CMDID,
  1254. /* set tcp pkt filter for wlan HB */
  1255. WMI_HB_SET_TCP_PKT_FILTER_CMDID,
  1256. /* set udp parameters for wlan HB */
  1257. WMI_HB_SET_UDP_PARAMS_CMDID,
  1258. /* set udp pkt filter for wlan HB */
  1259. WMI_HB_SET_UDP_PKT_FILTER_CMDID,
  1260. /* OIC ping keep alive */
  1261. WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID,
  1262. WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID,
  1263. /* WMI commands related to DHCP Lease Renew Offload **/
  1264. WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID,
  1265. /** Wlan RMC commands*/
  1266. /** enable/disable RMC */
  1267. WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
  1268. /** configure action frame period */
  1269. WMI_RMC_SET_ACTION_PERIOD_CMDID,
  1270. /** For debug/future enhancement purposes only,
  1271. * configures/finetunes RMC algorithms */
  1272. WMI_RMC_CONFIG_CMDID,
  1273. /** select manual leader */
  1274. WMI_RMC_SET_MANUAL_LEADER_CMDID,
  1275. /** WLAN MHF offload commands */
  1276. /** enable/disable MHF offload */
  1277. WMI_MHF_OFFLOAD_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
  1278. /** Plumb routing table for MHF offload */
  1279. WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
  1280. /*location scan commands*/
  1281. /*start batch scan*/
  1282. WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  1283. /*stop batch scan*/
  1284. WMI_BATCH_SCAN_DISABLE_CMDID,
  1285. /*get batch scan result*/
  1286. WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
  1287. /* OEM related cmd */
  1288. WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
  1289. WMI_OEM_REQUEST_CMDID, /* UNUSED */
  1290. /* OEM related cmd used for Low Power ranging */
  1291. WMI_LPI_OEM_REQ_CMDID,
  1292. WMI_OEM_DMA_RING_CFG_REQ_CMDID,
  1293. /** Command to handle OEM's opaque data */
  1294. WMI_OEM_DATA_CMDID,
  1295. /** Nan Request */
  1296. WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
  1297. /** Command to handle OEM's NAN specific opaque data */
  1298. WMI_NAN_OEM_DATA_CMDID,
  1299. /** Modem power state command */
  1300. WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
  1301. WMI_CHAN_AVOID_UPDATE_CMDID,
  1302. WMI_COEX_CONFIG_CMDID,
  1303. WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
  1304. WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
  1305. WMI_SAR_LIMITS_CMDID,
  1306. WMI_SAR_GET_LIMITS_CMDID,
  1307. /** Dedicated BT Antenna Mode (DBAM) command */
  1308. WMI_COEX_DBAM_CMDID,
  1309. WMI_TAS_POWER_HISTORY_CMDID,
  1310. WMI_ESL_EGID_CMDID,
  1311. WMI_COEX_MULTIPLE_CONFIG_CMDID,
  1312. /**
  1313. * OBSS scan offload enable/disable commands
  1314. * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
  1315. * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
  1316. * 2. STA connect to a 2.4 GHz ht20/ht40 AP,
  1317. * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
  1318. * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
  1319. * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
  1320. */
  1321. WMI_OBSS_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
  1322. WMI_OBSS_SCAN_DISABLE_CMDID,
  1323. WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID,
  1324. /** LPI commands */
  1325. /** LPI mgmt snooping config command */
  1326. WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
  1327. /** LPI scan start command */
  1328. WMI_LPI_START_SCAN_CMDID,
  1329. /** LPI scan stop command */
  1330. WMI_LPI_STOP_SCAN_CMDID,
  1331. /** ExtScan commands */
  1332. WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
  1333. WMI_EXTSCAN_STOP_CMDID,
  1334. WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
  1335. WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
  1336. WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
  1337. WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
  1338. WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
  1339. WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
  1340. WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
  1341. WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
  1342. /** DHCP server offload commands */
  1343. WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
  1344. /** IPA Offload features related commands */
  1345. WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
  1346. /** mDNS responder offload commands */
  1347. WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1348. WMI_MDNS_SET_FQDN_CMDID,
  1349. WMI_MDNS_SET_RESPONSE_CMDID,
  1350. WMI_MDNS_GET_STATS_CMDID,
  1351. WMI_MDNS_SET_STAIP_CMDID,
  1352. /* enable/disable AP Authentication offload */
  1353. WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
  1354. WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
  1355. WMI_SAP_OBSS_DETECTION_CFG_CMDID,
  1356. /** Out-of-context-of-BSS (OCB) commands */
  1357. WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
  1358. WMI_OCB_SET_UTC_TIME_CMDID,
  1359. WMI_OCB_START_TIMING_ADVERT_CMDID,
  1360. WMI_OCB_STOP_TIMING_ADVERT_CMDID,
  1361. WMI_OCB_GET_TSF_TIMER_CMDID,
  1362. WMI_DCC_GET_STATS_CMDID,
  1363. WMI_DCC_CLEAR_STATS_CMDID,
  1364. WMI_DCC_UPDATE_NDL_CMDID,
  1365. /* System-On-Chip commands */
  1366. WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
  1367. WMI_SOC_SET_HW_MODE_CMDID,
  1368. WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
  1369. WMI_SOC_SET_ANTENNA_MODE_CMDID,
  1370. /** enable/disable TQM reset (SOC level) feature */
  1371. WMI_SOC_TQM_RESET_ENABLE_DISABLE_CMDID,
  1372. /*
  1373. * WMI Command to enable custom classification of packets in Tx path
  1374. * and specifiy packets of interest for classification.
  1375. */
  1376. WMI_SOC_TX_PACKET_CUSTOM_CLASSIFY_CMDID,
  1377. /* packet filter commands */
  1378. WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
  1379. WMI_PACKET_FILTER_ENABLE_CMDID,
  1380. /** Motion Aided WiFi Connectivity (MAWC) commands */
  1381. WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
  1382. /** WMI commands related to PMF 11w Offload */
  1383. WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
  1384. /** WMI commands related to pkt filter (BPF) offload */
  1385. WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1386. WMI_BPF_GET_VDEV_STATS_CMDID,
  1387. WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
  1388. WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
  1389. WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID,
  1390. WMI_BPF_SET_VDEV_ENABLE_CMDID,
  1391. WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID,
  1392. WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID,
  1393. /** WMI commands related to monitor mode. */
  1394. WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
  1395. /** WMI commands related to regulatory offload */
  1396. WMI_SET_CURRENT_COUNTRY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_REGULATORY),
  1397. WMI_11D_SCAN_START_CMDID,
  1398. WMI_11D_SCAN_STOP_CMDID,
  1399. WMI_SET_INIT_COUNTRY_CMDID,
  1400. WMI_AFC_CMDID,
  1401. /**
  1402. * Nan Data commands
  1403. * NDI - NAN Data Interface
  1404. * NDP - NAN Data Path
  1405. */
  1406. /* Commands in prototyping phase */
  1407. WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1408. WMI_NDP_INITIATOR_REQ_CMDID,
  1409. WMI_NDP_RESPONDER_REQ_CMDID,
  1410. WMI_NDP_END_REQ_CMDID,
  1411. WMI_NDP_CMDID,
  1412. /** WMI commands related to HW data filtering **/
  1413. WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
  1414. /** WMI commands related to WLAN latency module **/
  1415. WMI_WLM_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLM),
  1416. /** WMI commands related to STA & AP TWT module **/
  1417. WMI_TWT_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TWT),
  1418. WMI_TWT_DISABLE_CMDID,
  1419. WMI_TWT_ADD_DIALOG_CMDID,
  1420. WMI_TWT_DEL_DIALOG_CMDID,
  1421. WMI_TWT_PAUSE_DIALOG_CMDID,
  1422. WMI_TWT_RESUME_DIALOG_CMDID,
  1423. WMI_TWT_BTWT_INVITE_STA_CMDID,
  1424. WMI_TWT_BTWT_REMOVE_STA_CMDID,
  1425. WMI_TWT_NUDGE_DIALOG_CMDID,
  1426. WMI_VDEV_SET_TWT_EDCA_PARAMS_CMDID, /* XPAN TWT */
  1427. WMI_VDEV_GET_TWT_SESSION_STATS_INFO_CMDID,
  1428. WMI_TWT_VDEV_CONFIG_CMDID,
  1429. /** WMI commands related to motion detection **/
  1430. WMI_MOTION_DET_CONFIG_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MOTION_DET),
  1431. WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID,
  1432. WMI_MOTION_DET_START_STOP_CMDID,
  1433. WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID,
  1434. /** WMI commands related to OBSS PD Spatial Reuse **/
  1435. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPATIAL_REUSE),
  1436. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID,
  1437. /** WMI commands related to High Precision Clock Synchronization feature **/
  1438. WMI_HPCS_PULSE_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HPCS_PULSE),
  1439. /** WMI commands related to Audio Frame aggregation feature **/
  1440. WMI_AUDIO_AGGR_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AUDIO),
  1441. WMI_AUDIO_AGGR_ADD_GROUP_CMDID,
  1442. WMI_AUDIO_AGGR_DEL_GROUP_CMDID,
  1443. WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID,
  1444. WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID,
  1445. WMI_AUDIO_AGGR_SET_GROUP_AUTO_RATE_CMDID,
  1446. WMI_AUDIO_AGGR_SET_GROUP_PROBE_CMDID,
  1447. WMI_AUDIO_AGGR_UPDATE_STA_GROUP_INFO_CMDID,
  1448. WMI_AUDIO_AGGR_GET_STATISTICS_CMDID,
  1449. WMI_AUDIO_AGGR_RESET_STATISTICS_CMDID,
  1450. WMI_AUDIO_AGGR_SET_RTSCTS_CONFIG_CMDID,
  1451. WMI_AUDIO_AGGR_SET_SCHED_METHOD_CMDID,
  1452. WMI_AUDIO_AGGR_GET_SCHED_METHOD_CMDID,
  1453. /** WMI commands related to Channel Frequency Response Capture **/
  1454. WMI_CFR_CAPTURE_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CFR_CAPTURE),
  1455. /** WMI commands related to Air Time Management feature **/
  1456. /** ATF SSID GROUPING REQUEST command */
  1457. WMI_ATF_SSID_GROUPING_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ATM),
  1458. /** WMM ATF Configuration for groups */
  1459. WMI_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID,
  1460. /** ATF Peer Extended Request command */
  1461. WMI_PEER_ATF_EXT_REQUEST_CMDID,
  1462. /** Vendor Defined WMI commands **/
  1463. WMI_VENDOR_PDEV_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VENDOR),
  1464. WMI_VENDOR_VDEV_CMDID,
  1465. WMI_VENDOR_PEER_CMDID,
  1466. /** Further vendor cmd IDs can be added below **/
  1467. /** WMI commands specific to Tid level Latency config **/
  1468. /** VDEV Latency Config command */
  1469. WMI_VDEV_TID_LATENCY_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LATENCY),
  1470. /** TID Latency Request command */
  1471. WMI_PEER_TID_LATENCY_CONFIG_CMDID,
  1472. /** WMI commands specific to MLO **/
  1473. /** MLO link active / inactive Request command */
  1474. WMI_MLO_LINK_SET_ACTIVE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MLO),
  1475. /** WMI cmd used to indicate hw_links part of MLO */
  1476. WMI_MLO_SETUP_CMDID,
  1477. /** WMI cmd used for init synchronization of hw_links part of MLO */
  1478. WMI_MLO_READY_CMDID,
  1479. /** WMI cmd used for tearing down a hw_link part of MLO */
  1480. WMI_MLO_TEARDOWN_CMDID,
  1481. /** WMI cmd used to setup Tid to Link Mapping for a MLO Peer */
  1482. WMI_MLO_PEER_TID_TO_LINK_MAP_CMDID,
  1483. /** WMI cmd for dynamically deleting a link from a MLD VAP */
  1484. WMI_MLO_LINK_REMOVAL_CMDID,
  1485. /** WMI cmd used to setup Tid to Link Mapping for a MLO VAP */
  1486. WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID,
  1487. /** WMI cmd used to get mlo link information */
  1488. WMI_MLO_VDEV_GET_LINK_INFO_CMDID,
  1489. /** WMI cmd used to set link BSS parameters */
  1490. WMI_MLO_LINK_SET_BSS_PARAMS_CMDID,
  1491. /** WMI cmd to confirm the status of link switch request handling */
  1492. WMI_MLO_LINK_SWITCH_CONF_CMDID,
  1493. /** WMI cmd to migrate the primary link peer */
  1494. WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID,
  1495. /** WMI cmd to recommand preferred link */
  1496. WMI_MLO_LINK_RECOMMENDATION_CMDID,
  1497. /** WMI commands specific to Service Aware WiFi (SAWF) */
  1498. /** configure or reconfigure the parameters for a service class */
  1499. WMI_SAWF_SVC_CLASS_CFG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAWF),
  1500. /** disable a service class */
  1501. WMI_SAWF_SVC_CLASS_DISABLE_CMDID,
  1502. /* WMI commands specific to ODD */
  1503. WMI_ODD_LIVEDUMP_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ODD),
  1504. /* WMI commands specific to TDMA */
  1505. WMI_TDMA_SCHEDULE_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDMA),
  1506. /* WMI commands specific to manually-triggered UL */
  1507. /** WMI Command to set Manual SU UL OFDMA trigger parameters */
  1508. WMI_VDEV_SET_ULOFDMA_MANUAL_SU_TRIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MANUAL_UL_TRIG),
  1509. /** WMI Command to set Manual MU UL OFDMA trigger parameters */
  1510. WMI_VDEV_SET_ULOFDMA_MANUAL_MU_TRIG_CMDID,
  1511. } WMI_CMD_ID;
  1512. typedef enum {
  1513. /** WMI service is ready; after this event WMI messages can be sent/received */
  1514. WMI_SERVICE_READY_EVENTID = 0x1,
  1515. /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
  1516. WMI_READY_EVENTID,
  1517. /** Specify what WMI services the target supports (for services beyond
  1518. * what fits in the WMI_SERVICE_READY_EVENT message's wmi_service_bitmap)
  1519. */
  1520. WMI_SERVICE_AVAILABLE_EVENTID,
  1521. /** Specify what numbers and kinds of interfaces (a.k.a. vdevs)
  1522. * the target supports
  1523. */
  1524. WMI_IFACE_COMBINATION_IND_EVENTID,
  1525. /** Scan specific events */
  1526. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  1527. /** Spectral scan FW params to host */
  1528. WMI_PDEV_SSCAN_FW_PARAM_EVENTID,
  1529. /** Spectral scan related event start/stop trigger to host */
  1530. WMI_SSCAN_EVT_MESSAGE_EVENTID,
  1531. /** Spectral scan capabilities advertisement */
  1532. WMI_SPECTRAL_CAPABILITIES_EVENTID,
  1533. /* PDEV specific events */
  1534. /** TPC config for the current operating channel */
  1535. WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  1536. /** Channel stats event */
  1537. WMI_CHAN_INFO_EVENTID,
  1538. /** PHY Error specific WMI event */
  1539. WMI_PHYERR_EVENTID,
  1540. /** eeprom dump event */
  1541. WMI_PDEV_DUMP_EVENTID,
  1542. /** traffic pause event */
  1543. WMI_TX_PAUSE_EVENTID,
  1544. /** DFS radar event */
  1545. WMI_DFS_RADAR_EVENTID,
  1546. /** track L1SS entry and residency event */
  1547. WMI_PDEV_L1SS_TRACK_EVENTID,
  1548. /** Report current temperature of the chip in Celcius degree */
  1549. WMI_PDEV_TEMPERATURE_EVENTID,
  1550. /** Extension of WMI_SERVICE_READY msg with extra target capability info */
  1551. WMI_SERVICE_READY_EXT_EVENTID,
  1552. /** FIPS test mode event */
  1553. WMI_PDEV_FIPS_EVENTID,
  1554. /** Channel hopping avoidance */
  1555. WMI_PDEV_CHANNEL_HOPPING_EVENTID,
  1556. /** CCK ANI level event */
  1557. WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
  1558. /** OFDM ANI level event */
  1559. WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
  1560. /** Tx PPDU params */
  1561. WMI_PDEV_TPC_EVENTID,
  1562. /** NF Cal Power in DBR/DBM for all channels */
  1563. WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
  1564. /** SOC/PDEV events */
  1565. WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
  1566. WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
  1567. WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
  1568. /** Report ANT DIV feature's status */
  1569. WMI_PDEV_ANTDIV_STATUS_EVENTID,
  1570. /** Chip level Power stats */
  1571. WMI_PDEV_CHIP_POWER_STATS_EVENTID,
  1572. /** Power Save Failure Detected */
  1573. WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID,
  1574. /* Event to report the switch count in csa of one or more VDEVs */
  1575. WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID,
  1576. /** Report the caldata version to host */
  1577. WMI_PDEV_CHECK_CAL_VERSION_EVENTID,
  1578. /** Report chain RSSI and antenna index to host */
  1579. WMI_PDEV_DIV_RSSI_ANTID_EVENTID,
  1580. /** provide noise floor and cycle counts for a channel */
  1581. WMI_PDEV_BSS_CHAN_INFO_EVENTID,
  1582. /** Response received the ctl table to host */
  1583. WMI_PDEV_UPDATE_CTLTABLE_EVENTID,
  1584. WMI_PDEV_DMA_RING_CFG_RSP_EVENTID,
  1585. WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID,
  1586. /** WMI Event to deliver CTL Failsafe application */
  1587. WMI_PDEV_CTL_FAILSAFE_CHECK_EVENTID,
  1588. /* Event to report the switch count in BSS color of one or more VDEVs */
  1589. WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID,
  1590. /* Event to send cold boot calibration data */
  1591. WMI_PDEV_COLD_BOOT_CAL_DATA_EVENTID,
  1592. /* Event to report a rogue ap info that is detected in fw */
  1593. WMI_PDEV_RAP_INFO_EVENTID,
  1594. WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENTID,
  1595. /** 2nd extension of SERVICE_READY msg with extra target capability info */
  1596. WMI_SERVICE_READY_EXT2_EVENTID,
  1597. /**
  1598. * vdev restart response for multiple vdevs in response to
  1599. * MULTIPLE_VDEV_RESTART_REQUEST
  1600. */
  1601. WMI_PDEV_MULTIPLE_VDEV_RESTART_RESP_EVENTID,
  1602. /** WMI event in response to TPC STATS command */
  1603. WMI_PDEV_GET_TPC_STATS_EVENTID,
  1604. /* Event to get DPD status from HALPHY */
  1605. WMI_PDEV_GET_DPD_STATUS_EVENTID,
  1606. /* Event to get Calibration status from HALPHY */
  1607. WMI_PDEV_GET_HALPHY_CAL_STATUS_EVENTID,
  1608. /* Event to set halphy cal bitmap */
  1609. WMI_PDEV_SET_HALPHY_CAL_BMAP_EVENTID,
  1610. /* Event to get AOA phasedelta values from HALPHY */
  1611. WMI_PDEV_AOA_PHASEDELTA_EVENTID,
  1612. WMI_PDEV_FIPS_EXTEND_EVENTID,
  1613. /* Event to send packet log decode information */
  1614. WMI_PDEV_PKTLOG_DECODE_INFO_EVENTID,
  1615. /**
  1616. * RSSI dB to dBm conversion params info event
  1617. * sent to host after channel/bw/chainmask change per pdev.
  1618. */
  1619. WMI_PDEV_RSSI_DBM_CONVERSION_PARAMS_INFO_EVENTID,
  1620. /* Event to indicate Schedule tid queue suspended info */
  1621. WMI_PDEV_SCHED_TIDQ_SUSP_INFO_EVENTID,
  1622. /* Event to send target rate to power table update status */
  1623. WMI_PDEV_SET_TGTR2P_TABLE_EVENTID,
  1624. /* Event to indicate completion on RF path */
  1625. WMI_PDEV_SET_RF_PATH_RESP_EVENTID,
  1626. /* Event to get AOA phasedelta values for all gain tables from HALPHY */
  1627. WMI_PDEV_ENHANCED_AOA_PHASEDELTA_EVENTID,
  1628. /* Event to indicate the status of WiFi Radar calibration */
  1629. WMI_PDEV_WIFI_RADAR_CAL_COMPLETION_STATUS_EVENTID,
  1630. /* Event to indicate xLNA is enabled */
  1631. WMI_PDEV_ENABLE_XLNA_EVENTID,
  1632. /* VDEV specific events */
  1633. /** VDEV started event in response to VDEV_START request */
  1634. WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  1635. /** vdev stopped event , generated in response to VDEV_STOP request */
  1636. WMI_VDEV_STOPPED_EVENTID,
  1637. /* Indicate the set key (used for setting per
  1638. * peer unicast and per vdev multicast)
  1639. * operation has completed */
  1640. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  1641. /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
  1642. don't use this for any new implementations */
  1643. /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
  1644. This request is valid only for vdevs operating in soft AP or P2P GO mode */
  1645. WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
  1646. /* Return the TSF timestamp of specified vdev */
  1647. WMI_VDEV_TSF_REPORT_EVENTID,
  1648. /* FW response to Host for vdev delete cmdid */
  1649. WMI_VDEV_DELETE_RESP_EVENTID,
  1650. /* DISA feature: FW response to Host with encrypted/decrypted 802.11 DISA frame */
  1651. WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
  1652. /** event to report mac randomization success **/
  1653. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID,
  1654. /* event for ARP stats collection */
  1655. WMI_VDEV_GET_ARP_STAT_EVENTID,
  1656. /** get tx power event in response to VDEV_GET_TX_POWER request */
  1657. WMI_VDEV_GET_TX_POWER_EVENTID,
  1658. WMI_VDEV_BCN_RECEPTION_STATS_EVENTID,
  1659. /* provide LTE-Coex state */
  1660. WMI_VDEV_GET_MWS_COEX_STATE_EVENTID,
  1661. /* provide LTE-Coex Dynamic Power Back-off info */
  1662. WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID,
  1663. /* provide LTE-Coex TDM info */
  1664. WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID,
  1665. /* provide LTE-Coex IDRx info */
  1666. WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID,
  1667. /* provide LTE-Coex antenna sharing info */
  1668. WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID,
  1669. /* Event to handle FW offloaded mgmt packets */
  1670. WMI_VDEV_MGMT_OFFLOAD_EVENTID,
  1671. /* FW response to Host for delete all peer cmdid */
  1672. WMI_VDEV_DELETE_ALL_PEER_RESP_EVENTID,
  1673. /** Indicates host to start/stop strobing for QTIMER periodically */
  1674. WMI_VDEV_AUDIO_SYNC_START_STOP_EVENTID,
  1675. /** Sends the final offset in the QTIMERs of both master and slave */
  1676. WMI_VDEV_AUDIO_SYNC_Q_MASTER_SLAVE_OFFSET_EVENTID,
  1677. /** VDEV_SEND_BIG_DATA_EVENT IS DEPRECATED - DO NOT USE */
  1678. WMI_VDEV_SEND_BIG_DATA_EVENTID,
  1679. /** send BIG DATA stats to host phase 2 */
  1680. WMI_VDEV_SEND_BIG_DATA_P2_EVENTID,
  1681. /** Latency related information received from beacon IE */
  1682. WMI_VDEV_BCN_LATENCY_EVENTID,
  1683. /** Disconnect request from FW */
  1684. WMI_VDEV_DISCONNECT_EVENTID,
  1685. /** Send Smart Monitor related params to host */
  1686. WMI_VDEV_SMART_MONITOR_EVENTID,
  1687. /** Send status of vdev mac address update request to host */
  1688. WMI_VDEV_UPDATE_MAC_ADDR_CONF_EVENTID,
  1689. /** event to report latency level honored by FW */
  1690. WMI_VDEV_LATENCY_LEVEL_EVENTID,
  1691. /** Result from firmware about completed scheduler probing */
  1692. WMI_VDEV_SCHED_MODE_PROBE_RESP_EVENTID,
  1693. /** Connect response */
  1694. WMI_VDEV_OOB_CONNECTION_RESP_EVENTID,
  1695. /* peer specific events */
  1696. /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
  1697. WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  1698. /** Peer Info Event with data_rate, RSSI, tx_fail_cnt etc */
  1699. WMI_PEER_INFO_EVENTID,
  1700. /** Event indicating that TX fail count reaching threshold */
  1701. WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
  1702. /* Return the estimate link speed for the Peer specified in the
  1703. * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
  1704. */
  1705. WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
  1706. /* Return the peer state
  1707. * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
  1708. */
  1709. WMI_PEER_STATE_EVENTID,
  1710. /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
  1711. * After that, host will send Mx message.
  1712. * Otherwise, host will pause any Mx(STA:M2/M4) message
  1713. */
  1714. WMI_PEER_ASSOC_CONF_EVENTID,
  1715. /* FW response to Host for peer delete cmdid */
  1716. WMI_PEER_DELETE_RESP_EVENTID,
  1717. /** Valid rate code list for peer */
  1718. WMI_PEER_RATECODE_LIST_EVENTID,
  1719. WMI_WDS_PEER_EVENTID,
  1720. WMI_PEER_STA_PS_STATECHG_EVENTID,
  1721. /** Peer Ant Div Info Event with RSSI per chain, etc */
  1722. WMI_PEER_ANTDIV_INFO_EVENTID,
  1723. /*
  1724. * WMI_PEER_RESERVED_EVENTID
  1725. * These values are used for placeholders, to allow the subsequent
  1726. * WMI_PEER_OPER_MODE_CHANGE_EVENTID constant to have the same value
  1727. * as it had in its original location, when it was mistakenly placed
  1728. * amongst the WMI_PEER CMDID defs.
  1729. *
  1730. * These WMI_PEER_RESERVED values can be replaced with actual WMI peer
  1731. * event message IDs, though it will be simpler to instead add new
  1732. * WMI_PEER EVENTID defs at the end of the WMI_GRP_PEER WMI_EVT_GRP.
  1733. */
  1734. WMI_PEER_RESERVED0_EVENTID,
  1735. WMI_PEER_RESERVED1_EVENTID,
  1736. WMI_PEER_RESERVED2_EVENTID,
  1737. WMI_PEER_RESERVED3_EVENTID,
  1738. WMI_PEER_RESERVED4_EVENTID,
  1739. WMI_PEER_RESERVED5_EVENTID,
  1740. WMI_PEER_RESERVED6_EVENTID,
  1741. WMI_PEER_RESERVED7_EVENTID,
  1742. WMI_PEER_RESERVED8_EVENTID,
  1743. WMI_PEER_RESERVED9_EVENTID,
  1744. WMI_PEER_RESERVED10_EVENTID,
  1745. /** Peer operating mode change indication sent to host to update stats */
  1746. WMI_PEER_OPER_MODE_CHANGE_EVENTID,
  1747. /** report the current tx PN for the peer */
  1748. WMI_PEER_TX_PN_RESPONSE_EVENTID,
  1749. WMI_PEER_CFR_CAPTURE_EVENTID,
  1750. /* Peer Create Conf event to confirm fw had received WMI_PEER_CREATE_CMDID
  1751. * and status of WMI_PEER_CREATE_CMDID.
  1752. */
  1753. WMI_PEER_CREATE_CONF_EVENTID,
  1754. WMI_PEER_RX_PN_RESPONSE_EVENTID,
  1755. /* beacon/mgmt specific events */
  1756. /** RX management frame. the entire frame is carried along with the event. */
  1757. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  1758. /** software beacon alert event to Host requesting host to Queue a beacon for transmission
  1759. use only in host beacon mode */
  1760. WMI_HOST_SWBA_EVENTID,
  1761. /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theoretical value.
  1762. tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
  1763. staggered beacon transmission mode */
  1764. WMI_TBTTOFFSET_UPDATE_EVENTID,
  1765. /** event after the first beacon is transmitted following
  1766. a change in the template.*/
  1767. WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
  1768. /** event after the first probe response is transmitted following
  1769. a change in the template.*/
  1770. WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
  1771. /** Event for Mgmt TX completion event */
  1772. WMI_MGMT_TX_COMPLETION_EVENTID,
  1773. /** Event for Mgmt TX bundle completion event */
  1774. WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
  1775. /** vdev_map used in WMI_TBTTOFFSET_UPDATE_EVENTID supports max 32 vdevs.
  1776. * Use this event if number of vdevs > 32.
  1777. */
  1778. WMI_TBTTOFFSET_EXT_UPDATE_EVENTID,
  1779. /** Event for offchan data TX completion event */
  1780. WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID,
  1781. /** software FILS Discovery Frame alert event to Host, requesting host to Queue an FD frame for transmission */
  1782. WMI_HOST_SWFDA_EVENTID,
  1783. /** software beacon alert event to Host requesting host to Queue a beacon for transmission.
  1784. * Used only in host beacon mode. */
  1785. WMI_HOST_SWBA_V2_EVENTID,
  1786. /** Event for QoS null frame TX completion */
  1787. WMI_QOS_NULL_FRAME_TX_COMPLETION_EVENTID,
  1788. /** WMI event for Firmware Consumed/Dropped Rx management frames indication */
  1789. WMI_MGMT_RX_FW_CONSUMED_EVENTID,
  1790. /** WMI event for indication to Host to reap the MGMT SRNG */
  1791. WMI_MGMT_SRNG_REAP_EVENTID,
  1792. /* ADDBA Related WMI Events*/
  1793. /** Indication the completion of the prior
  1794. WMI_PEER_TID_DELBA_CMDID(initiator) */
  1795. WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  1796. /** Indication the completion of the prior
  1797. *WMI_PEER_TID_ADDBA_CMDID(initiator) */
  1798. WMI_TX_ADDBA_COMPLETE_EVENTID,
  1799. /* Seq num returned from hw for a sta/tid pair */
  1800. WMI_BA_RSP_SSN_EVENTID,
  1801. /* Aggregation state requested by BTC */
  1802. WMI_AGGR_STATE_TRIG_EVENTID,
  1803. /** Roam event to trigger roaming on host */
  1804. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  1805. /** matching AP found from list of profiles */
  1806. WMI_PROFILE_MATCH,
  1807. /** roam synch event */
  1808. WMI_ROAM_SYNCH_EVENTID,
  1809. /** roam synch frame event */
  1810. WMI_ROAM_SYNCH_FRAME_EVENTID,
  1811. /** various roam scan stats */
  1812. WMI_ROAM_SCAN_STATS_EVENTID,
  1813. /** Blacklisted AP information event */
  1814. WMI_ROAM_BLACKLIST_EVENTID,
  1815. /** Roam Pre-Authentication start event */
  1816. WMI_ROAM_PREAUTH_START_EVENTID,
  1817. /** Roaming PMKID request event */
  1818. WMI_ROAM_PMKID_REQUEST_EVENTID,
  1819. /** roam stats */
  1820. WMI_ROAM_STATS_EVENTID,
  1821. /** Roam scan channels list */
  1822. WMI_ROAM_SCAN_CHANNEL_LIST_EVENTID,
  1823. /** Firmware roam capability information */
  1824. WMI_ROAM_CAPABILITY_REPORT_EVENTID,
  1825. /** Send AP frame content like beacon/probe resp etc.. */
  1826. WMI_ROAM_FRAME_EVENTID,
  1827. /** Send firmware ini value corresponding to param_id */
  1828. WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID,
  1829. /** roam synch key event */
  1830. WMI_ROAM_SYNCH_KEY_EVENTID,
  1831. /** P2P disc found */
  1832. WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
  1833. /** send noa info to host when noa is changed for beacon tx offload enable */
  1834. WMI_P2P_NOA_EVENTID,
  1835. /** send p2p listen offload stopped event with different reason */
  1836. WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
  1837. /** send event to AP assisted P2P GO to change current DFS channel */
  1838. WMI_P2P_CLI_DFS_AP_BMISS_DETECTED_EVENTID,
  1839. /** Send EGAP Info to host */
  1840. WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
  1841. /* send pdev resume event to host after pdev resume. */
  1842. WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
  1843. /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
  1844. will cary wake reason */
  1845. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  1846. WMI_D0_WOW_DISABLE_ACK_EVENTID,
  1847. WMI_WOW_INITIAL_WAKEUP_EVENTID,
  1848. WMI_WOW_COAP_BUF_INFO_EVENTID,
  1849. /* RTT related event ID */
  1850. /** RTT measurement report */
  1851. WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  1852. /** TSF measurement report */
  1853. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  1854. /** RTT error report */
  1855. WMI_RTT_ERROR_REPORT_EVENTID,
  1856. /** RTT 11az PASN peer create request */
  1857. WMI_RTT_PASN_PEER_CREATE_REQ_EVENTID,
  1858. /** RTT 11az PASN peer delete event */
  1859. WMI_RTT_PASN_PEER_DELETE_EVENTID,
  1860. /*STATS specific events*/
  1861. /** txrx stats event requested by host */
  1862. WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
  1863. /** FW iface link stats Event */
  1864. WMI_IFACE_LINK_STATS_EVENTID,
  1865. /** FW iface peer link stats Event */
  1866. WMI_PEER_LINK_STATS_EVENTID,
  1867. /** FW Update radio stats Event */
  1868. WMI_RADIO_LINK_STATS_EVENTID,
  1869. /** Firmware memory dump Complete event*/
  1870. WMI_UPDATE_FW_MEM_DUMP_EVENTID,
  1871. /** Event indicating the DIAG logs/events supported by FW */
  1872. WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
  1873. /** Instantaneous RSSI event */
  1874. WMI_INST_RSSI_STATS_EVENTID,
  1875. /** FW update tx power levels event */
  1876. WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
  1877. /** This event is used to report wlan stats to host.
  1878. * It is triggered under 3 conditions:
  1879. * (a) Periodic timer timed out, based on the period specified
  1880. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  1881. * (b) Whenever any of the (enabled) stats thresholds specified
  1882. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  1883. * within the current stats period.
  1884. * (c) In response to the one-time wlan stats request of
  1885. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  1886. *
  1887. * If this event is triggered by condition a or b,
  1888. * the stats counters are cleared at the start of each period.
  1889. * But if it is triggered by condition c, stats counters won't be cleared.
  1890. */
  1891. WMI_REPORT_STATS_EVENTID,
  1892. /** Event indicating RCPI of the peer requested by host in the WMI_REQUEST_RCPI_CMDID */
  1893. WMI_UPDATE_RCPI_EVENTID,
  1894. /** This event is used to respond to WMI_REQUEST_PEER_STATS_INFO_CMDID
  1895. * and report peer stats info to host */
  1896. WMI_PEER_STATS_INFO_EVENTID,
  1897. /** This event is used to respond to WMI_REQUEST_RADIO_CHAN_STATS_CMDID
  1898. * and report radio channel stats to host */
  1899. WMI_RADIO_CHAN_STATS_EVENTID,
  1900. /** This event is used to respond to WMI_REQUEST_WLM_STATS_CMDID
  1901. * and report WLM (WLAN latency manager) stats info to host */
  1902. WMI_WLM_STATS_EVENTID,
  1903. /** This event is used to respond to WMI_REQUEST_CTRL_PATH_STATS_CMDID
  1904. * and report stats info to host */
  1905. WMI_CTRL_PATH_STATS_EVENTID,
  1906. /** This event is used to respond to
  1907. * WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID and report stats info to host
  1908. */
  1909. WMI_HALPHY_CTRL_PATH_STATS_EVENTID,
  1910. /** FW IPA link stats Event */
  1911. WMI_IPA_LINK_STATS_EVENTID,
  1912. /* NLO specific events */
  1913. /** NLO match event after the first match */
  1914. WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
  1915. /** NLO scan complete event */
  1916. WMI_NLO_SCAN_COMPLETE_EVENTID,
  1917. /** APFIND specific events */
  1918. WMI_APFIND_EVENTID,
  1919. /** passpoint network match event */
  1920. WMI_PASSPOINT_MATCH_EVENTID,
  1921. /** GTK offload stautus event requested by host */
  1922. WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  1923. /** GTK offload failed to rekey event */
  1924. WMI_GTK_REKEY_FAIL_EVENTID,
  1925. /* CSA handling event */
  1926. WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  1927. /* CSA IE received event */
  1928. WMI_CSA_IE_RECEIVED_EVENTID,
  1929. /*chatter query reply event*/
  1930. WMI_CHATTER_PC_QUERY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
  1931. /** DFS related events */
  1932. WMI_PDEV_DFS_RADAR_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_DFS),
  1933. /** Indicate channel-availability-check completion event to host */
  1934. WMI_VDEV_DFS_CAC_COMPLETE_EVENTID,
  1935. /** Indicate off-channel-availability-check completion event to host */
  1936. WMI_VDEV_ADFS_OCAC_COMPLETE_EVENTID,
  1937. /** echo event in response to echo command */
  1938. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  1939. /* !!IMPORTANT!!
  1940. * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
  1941. * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
  1942. * as we MUST have a fixed value here to maintain compatibility between
  1943. * UTF and the ART2 driver
  1944. */
  1945. /** UTF specific WMI event */
  1946. WMI_PDEV_UTF_EVENTID,
  1947. /** event carries buffered debug messages */
  1948. WMI_DEBUG_MESG_EVENTID,
  1949. /** FW stats(periodic or on shot) */
  1950. WMI_UPDATE_STATS_EVENTID,
  1951. /** debug print message used for tracing FW code while debugging */
  1952. WMI_DEBUG_PRINT_EVENTID,
  1953. /** DCS wlan or non-wlan interference event
  1954. */
  1955. WMI_DCS_INTERFERENCE_EVENTID,
  1956. /** VI spoecific event */
  1957. WMI_PDEV_QVIT_EVENTID,
  1958. /** FW code profile data in response to profile request */
  1959. WMI_WLAN_PROFILE_DATA_EVENTID,
  1960. /* Factory Testing Mode request event
  1961. * used for integrated chipsets */
  1962. WMI_PDEV_FTM_INTG_EVENTID,
  1963. /* avoid list of frequencies .
  1964. */
  1965. WMI_WLAN_FREQ_AVOID_EVENTID,
  1966. /* Indicate the keepalive parameters */
  1967. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  1968. /*Thermal Management event*/
  1969. WMI_THERMAL_MGMT_EVENTID,
  1970. /* Container for DIAG event and log data */
  1971. WMI_DIAG_DATA_CONTAINER_EVENTID,
  1972. /* host auto shutdown event */
  1973. WMI_HOST_AUTO_SHUTDOWN_EVENTID,
  1974. /*update mib counters together with WMI_UPDATE_STATS_EVENTID*/
  1975. WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
  1976. /*update ht/vht info based on vdev (rx and tx NSS and preamble)*/
  1977. WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
  1978. WMI_DIAG_EVENTID,
  1979. /** Set OCB Sched Response, deprecated */
  1980. WMI_OCB_SET_SCHED_EVENTID,
  1981. /** event to indicate the flush of the buffered debug messages is complete*/
  1982. WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
  1983. /** event to report mix/max RSSI breach events */
  1984. WMI_RSSI_BREACH_EVENTID,
  1985. /** event to report completion of data storage into flash memory */
  1986. WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
  1987. /** event to report SCPC calibrated data to host */
  1988. WMI_PDEV_UTF_SCPC_EVENTID,
  1989. /** event to provide requested data from the target's flash memory */
  1990. WMI_READ_DATA_FROM_FLASH_EVENTID,
  1991. /** event to report rx aggregation failure frame information */
  1992. WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
  1993. /** event to upload a PKGID to host to identify chip for various products */
  1994. WMI_PKGID_EVENTID,
  1995. /* Thermal Throttling stats event id for every pdev and zones, etc */
  1996. WMI_THERM_THROT_STATS_EVENTID,
  1997. /* WMI UNIT TEST event */
  1998. WMI_UNIT_TEST_EVENTID,
  1999. /** event to report result of host configure SAR2 */
  2000. WMI_SAR2_RESULT_EVENTID,
  2001. /** event to get TX power per input HALPHY parameters */
  2002. WMI_GET_TPC_POWER_EVENTID,
  2003. /** event to provide MU-EDCA Parameters (to update host's beacon config) */
  2004. WMI_MUEDCA_PARAMS_CONFIG_EVENTID,
  2005. /** event to get ELNA BYPASS status */
  2006. WMI_GET_ELNA_BYPASS_EVENTID,
  2007. /** event to report ANI level of the channels */
  2008. WMI_GET_CHANNEL_ANI_EVENTID,
  2009. /* WMI event to available scratch registers */
  2010. WMI_PMM_AVAILABLE_SCRATCH_REG_EVENTID,
  2011. /* WMI event to scratch registers allocation */
  2012. WMI_PMM_SCRATCH_REG_ALLOCATION_COMPLETE_EVENTID,
  2013. /* WMI event to indicate Helath Monitor Infra init done */
  2014. WMI_HEALTH_MON_INIT_DONE_EVENTID,
  2015. /* WMI XGAP enable command response event ID */
  2016. WMI_XGAP_ENABLE_COMPLETE_EVENTID,
  2017. /* T2H HPA message */
  2018. WMI_HPA_EVENTID,
  2019. /* WMI standalone command complete Event */
  2020. WMI_VDEV_STANDALONE_SOUND_COMPLETE_EVENTID,
  2021. /* WMI evt to indicate switch type either to WLAN(XPAN) or non_WLAN(BLE) */
  2022. WMI_AUDIO_TRANSPORT_SWITCH_TYPE_EVENTID,
  2023. /** Usynchronized Service Discovery:
  2024. * Send USD event with USD mode status as success or fail.
  2025. */
  2026. WMI_USD_SERVICE_EVENTID,
  2027. /* GPIO Event */
  2028. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  2029. /** upload H_CV info WMI event
  2030. * to indicate uploaded H_CV info to host
  2031. */
  2032. WMI_UPLOADH_EVENTID,
  2033. /** capture H info WMI event
  2034. * to indicate captured H info to host
  2035. */
  2036. WMI_CAPTUREH_EVENTID,
  2037. /* hw RFkill */
  2038. WMI_RFKILL_STATE_CHANGE_EVENTID,
  2039. /* Smart Antenna Controller status */
  2040. WMI_SMARTANT_STATE_CHANGE_EVENTID,
  2041. WMI_GPIO_STATE_RES_EVENTID,
  2042. /* TDLS Event */
  2043. WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
  2044. /* Resmgr Event */
  2045. /* deliver the new channel time quota for home channels */
  2046. WMI_RESMGR_CHAN_TIME_QUOTA_CHANGED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RESMGR),
  2047. /** STA SMPS Event */
  2048. /** force SMPS mode */
  2049. WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
  2050. /*location scan event*/
  2051. /*report the firmware's capability of batch scan*/
  2052. WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  2053. /*batch scan result*/
  2054. WMI_BATCH_SCAN_RESULT_EVENTID,
  2055. /* OEM Event */
  2056. WMI_OEM_CAPABILITY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OEM), /*DEPRECATED*/
  2057. WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
  2058. WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
  2059. WMI_OEM_RESPONSE_EVENTID,
  2060. WMI_OEM_DMA_RING_CFG_RSP_EVENTID,
  2061. WMI_OEM_DMA_BUF_RELEASE_EVENTID,
  2062. WMI_OEM_DATA_EVENTID,
  2063. /* NAN Event */
  2064. WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
  2065. WMI_NAN_DISC_IFACE_CREATED_EVENTID,
  2066. WMI_NAN_DISC_IFACE_DELETED_EVENTID,
  2067. WMI_NAN_STARTED_CLUSTER_EVENTID,
  2068. WMI_NAN_JOINED_CLUSTER_EVENTID,
  2069. WMI_NAN_DMESG_EVENTID,
  2070. /** Event to deliver OEM's NAN specific opaque data */
  2071. WMI_NAN_OEM_DATA_EVENTID,
  2072. /* Coex Event */
  2073. WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
  2074. WMI_SAR_GET_LIMITS_EVENTID,
  2075. /** Dedicated BT Antenna Mode (DBAM) complete event */
  2076. WMI_COEX_DBAM_COMPLETE_EVENTID,
  2077. WMI_TAS_POWER_HISTORY_EVENTID,
  2078. /* LPI Event */
  2079. WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
  2080. WMI_LPI_STATUS_EVENTID,
  2081. WMI_LPI_HANDOFF_EVENTID,
  2082. /* ExtScan events */
  2083. WMI_EXTSCAN_START_STOP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
  2084. WMI_EXTSCAN_OPERATION_EVENTID,
  2085. WMI_EXTSCAN_TABLE_USAGE_EVENTID,
  2086. WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
  2087. WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
  2088. WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
  2089. WMI_EXTSCAN_CAPABILITIES_EVENTID,
  2090. WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
  2091. /* mDNS offload events */
  2092. WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
  2093. /* SAP Authentication offload events */
  2094. WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
  2095. WMI_SAP_OFL_DEL_STA_EVENTID,
  2096. WMI_SAP_OBSS_DETECTION_REPORT_EVENTID,
  2097. /* OBSS Offloads events */
  2098. WMI_OBSS_COLOR_COLLISION_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OBSS_OFL),
  2099. /** Out-of-context-of-bss (OCB) events */
  2100. WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
  2101. WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
  2102. WMI_DCC_GET_STATS_RESP_EVENTID,
  2103. WMI_DCC_UPDATE_NDL_RESP_EVENTID,
  2104. WMI_DCC_STATS_EVENTID,
  2105. /* System-On-Chip events */
  2106. WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
  2107. WMI_SOC_HW_MODE_TRANSITION_EVENTID,
  2108. WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
  2109. /** Motion Aided WiFi Connectivity (MAWC) events */
  2110. WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
  2111. /** pkt filter (BPF) offload relevant events */
  2112. WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  2113. WMI_BPF_VDEV_STATS_INFO_EVENTID,
  2114. WMI_BPF_GET_VDEV_WORK_MEMORY_RESP_EVENTID,
  2115. /* RMC specific event */
  2116. /* RMC manual leader selected event */
  2117. WMI_RMC_NEW_LEADER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
  2118. /** WMI events related to regulatory offload */
  2119. WMI_REG_CHAN_LIST_CC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_REGULATORY),
  2120. WMI_11D_NEW_COUNTRY_EVENTID,
  2121. WMI_REG_CHAN_LIST_CC_EXT_EVENTID,
  2122. WMI_AFC_EVENTID,
  2123. WMI_REG_CHAN_LIST_CC_EXT2_EVENTID, /* DEPRECATED */
  2124. /** Events for TWT(Target Wake Time) of STA and AP */
  2125. WMI_TWT_ENABLE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TWT),
  2126. WMI_TWT_DISABLE_COMPLETE_EVENTID,
  2127. WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID,
  2128. WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID,
  2129. WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID,
  2130. WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID,
  2131. WMI_TWT_BTWT_INVITE_STA_COMPLETE_EVENTID,
  2132. WMI_TWT_BTWT_REMOVE_STA_COMPLETE_EVENTID,
  2133. WMI_TWT_SESSION_STATS_EVENTID,
  2134. WMI_TWT_NUDGE_DIALOG_COMPLETE_EVENTID,
  2135. WMI_TWT_NOTIFY_EVENTID,
  2136. WMI_TWT_ACK_EVENTID,
  2137. /** Events in Prototyping phase */
  2138. WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
  2139. WMI_NDP_INITIATOR_RSP_EVENTID,
  2140. WMI_NDP_RESPONDER_RSP_EVENTID,
  2141. WMI_NDP_END_RSP_EVENTID,
  2142. WMI_NDP_INDICATION_EVENTID,
  2143. WMI_NDP_CONFIRM_EVENTID,
  2144. WMI_NDP_END_INDICATION_EVENTID,
  2145. WMI_WLAN_COEX_BT_ACTIVITY_EVENTID,
  2146. WMI_NDL_SCHEDULE_UPDATE_EVENTID,
  2147. WMI_NDP_EVENTID,
  2148. /** WMI events related to motion detection */
  2149. WMI_MOTION_DET_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MOTION_DET),
  2150. WMI_MOTION_DET_BASE_LINE_HOST_EVENTID,
  2151. /** WMI events related to Estimation of Service Parameters (802.11mc) */
  2152. WMI_ESP_ESTIMATE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ESP),
  2153. /** WMI events related to Audio Frame aggregation feature **/
  2154. WMI_AUDIO_AGGR_REPORT_STATISTICS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AUDIO),
  2155. WMI_AUDIO_AGGR_SCHED_METHOD_EVENTID,
  2156. /** Vendor defined WMI events **/
  2157. WMI_VENDOR_PDEV_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VENDOR),
  2158. WMI_VENDOR_VDEV_EVENTID,
  2159. WMI_VENDOR_PEER_EVENTID,
  2160. /** Further vendor event IDs can be added below **/
  2161. /** WMI event specific to MLO **/
  2162. /** MLO link active / inactive response event */
  2163. WMI_MLO_LINK_SET_ACTIVE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MLO),
  2164. /* Response event for MLO setup cmd */
  2165. WMI_MLO_SETUP_COMPLETE_EVENTID,
  2166. /* Response event for MLO teardown cmd */
  2167. WMI_MLO_TEARDOWN_COMPLETE_EVENTID,
  2168. /* Response event for Link Removal Cmd */
  2169. WMI_MLO_LINK_REMOVAL_EVENTID,
  2170. /* Response event for WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID */
  2171. WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_EVENTID,
  2172. /* Response event for WMI_MLO_VDEV_GET_LINK_INFO_CMDID */
  2173. WMI_MLO_VDEV_LINK_INFO_EVENTID,
  2174. /** request host to do T2LM neg to the un-disabled link */
  2175. WMI_MLO_LINK_DISABLE_REQUEST_EVENTID,
  2176. /** request host to switch to new link for specified vdev */
  2177. WMI_MLO_LINK_SWITCH_REQUEST_EVENTID,
  2178. /** Response event for WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID */
  2179. WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_EVENTID,
  2180. /** WMI Event to spcify reason for link state switch */
  2181. WMI_MLO_LINK_STATE_SWITCH_EVENTID,
  2182. /** WMI Event to sync link info to host */
  2183. WMI_MLO_LINK_INFO_SYNC_EVENTID,
  2184. /** WMI Event to announce host about the TLT update for TID */
  2185. WMI_MLO_TLT_SELECTION_FOR_TID_SPRAY_EVENTID,
  2186. /** WMI Event to send the status of T2LM configured */
  2187. WMI_MLO_PEER_TID_TO_LINK_MAP_EVENTID,
  2188. /* WMI event specific to Quiet handling */
  2189. WMI_QUIET_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_QUIET_OFL),
  2190. /* ODD events */
  2191. WMI_ODD_LIVEDUMP_RESPONSE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ODD),
  2192. /** WMI events specific to manually-triggered UL */
  2193. /**
  2194. * WMI Event to send Manual UL OFDMA Trigger frame status feedback to Host
  2195. */
  2196. WMI_MANUAL_UL_OFDMA_TRIG_FEEDBACK_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MANUAL_UL_TRIG),
  2197. /**
  2198. * WMI Event to send Manual UL OFDMA Trigger frame RX PPDU info to Host
  2199. */
  2200. WMI_MANUAL_UL_OFDMA_TRIG_RX_PEER_USERINFO_EVENTID,
  2201. } WMI_EVT_ID;
  2202. /* defines for OEM message sub-types */
  2203. #define WMI_OEM_CAPABILITY_REQ 0x01
  2204. #define WMI_OEM_CAPABILITY_RSP 0x02
  2205. #define WMI_OEM_MEASUREMENT_REQ 0x03
  2206. #define WMI_OEM_MEASUREMENT_RSP 0x04
  2207. #define WMI_OEM_ERROR_REPORT_RSP 0x05
  2208. #define WMI_OEM_NAN_MEAS_REQ 0x06
  2209. #define WMI_OEM_NAN_MEAS_RSP 0x07
  2210. #define WMI_OEM_NAN_PEER_INFO 0x08
  2211. #define WMI_OEM_CONFIGURE_LCR 0x09
  2212. #define WMI_OEM_CONFIGURE_LCI 0x0A
  2213. #define WMI_CHAN_LIST_TAG 0x1
  2214. #define WMI_SSID_LIST_TAG 0x2
  2215. #define WMI_BSSID_LIST_TAG 0x3
  2216. #define WMI_IE_TAG 0x4
  2217. #define WMI_SCAN_START_OFFSET_TAG 0x5
  2218. typedef struct {
  2219. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  2220. /** primary 20 MHz channel frequency in mhz */
  2221. A_UINT32 mhz;
  2222. /** Center frequency 1 in MHz*/
  2223. A_UINT32 band_center_freq1;
  2224. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  2225. A_UINT32 band_center_freq2;
  2226. /** channel info described below */
  2227. A_UINT32 info;
  2228. /** contains min power, max power, reg power and reg class id. */
  2229. A_UINT32 reg_info_1;
  2230. /** contains antennamax, max bandwidth */
  2231. A_UINT32 reg_info_2;
  2232. } wmi_channel;
  2233. typedef enum {
  2234. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  2235. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  2236. } wmi_channel_change_cause;
  2237. /** channel info consists of 6 bits of channel mode */
  2238. #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \
  2239. (pwmi_channel)->info &= 0xffffffc0; \
  2240. (pwmi_channel)->info |= (val); \
  2241. } while (0)
  2242. #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
  2243. #define WMI_CHAN_FLAG_HT40_PLUS 6
  2244. #define WMI_CHAN_FLAG_PASSIVE 7
  2245. #define WMI_CHAN_ADHOC_ALLOWED 8
  2246. #define WMI_CHAN_AP_DISABLED 9
  2247. #define WMI_CHAN_FLAG_DFS 10
  2248. #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
  2249. #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
  2250. #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
  2251. #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
  2252. #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
  2253. #define WMI_CHAN_FLAG_DFS_CFREQ2 16 /* Enable radar event reporting for sec80 in VHT80p80 */
  2254. #define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
  2255. #define WMI_CHAN_FLAG_PSC 18 /* Indicate it is a PSC (preferred scanning channel) */
  2256. #define WMI_CHAN_FLAG_NAN_DISABLED 19 /* Indicates that NAN operations are disabled on this channel */
  2257. #define WMI_CHAN_FLAG_STA_DFS 20 /* Indicates if STA should process radar signals */
  2258. #define WMI_CHAN_FLAG_ALLOW_EHT 21 /* EHT (11be) is allowed on this channel */
  2259. #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
  2260. (pwmi_channel)->info |= ((A_UINT32) 1 << flag); \
  2261. } while (0)
  2262. #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag) \
  2263. (((pwmi_channel)->info & ((A_UINT32) 1 << flag)) >> flag)
  2264. #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
  2265. (pwmi_channel)->reg_info_1 &= 0xffffff00; \
  2266. (pwmi_channel)->reg_info_1 |= (val & 0xff); \
  2267. } while (0)
  2268. #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
  2269. #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \
  2270. (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
  2271. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 8); \
  2272. } while (0)
  2273. #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
  2274. #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \
  2275. (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
  2276. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 16); \
  2277. } while (0)
  2278. #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
  2279. #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \
  2280. (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
  2281. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 24); \
  2282. } while (0)
  2283. #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
  2284. #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \
  2285. (pwmi_channel)->reg_info_2 &= 0xffffff00; \
  2286. (pwmi_channel)->reg_info_2 |= (val & 0xff); \
  2287. } while (0)
  2288. #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
  2289. /* max tx power is in 1 dBm units */
  2290. #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
  2291. (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
  2292. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 8); \
  2293. } while (0)
  2294. #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
  2295. /* max bw supported for each channel, enum wmi_channel_width as value */
  2296. #define WMI_SET_CHANNEL_MAX_BANDWIDTH(pwmi_channel,val) do { \
  2297. (pwmi_channel)->reg_info_2 &= 0xff00ffff; \
  2298. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 16); \
  2299. } while (0)
  2300. #define WMI_GET_CHANNEL_MAX_BANDWIDTH(pwmi_channel) ((((pwmi_channel)->reg_info_2) >> 16) & 0xff)
  2301. /** HT Capabilities*/
  2302. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  2303. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  2304. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  2305. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  2306. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  2307. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  2308. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  2309. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  2310. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  2311. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  2312. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  2313. #define WMI_HT_CAP_HT40_SGI 0x0800
  2314. #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
  2315. #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
  2316. /* These macros should be used when we wish to advertise STBC support for
  2317. * only 1SS or 2SS or 3SS. */
  2318. #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  2319. #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  2320. #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  2321. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  2322. WMI_HT_CAP_HT20_SGI | \
  2323. WMI_HT_CAP_HT40_SGI | \
  2324. WMI_HT_CAP_TX_STBC | \
  2325. WMI_HT_CAP_RX_STBC | \
  2326. WMI_HT_CAP_LDPC | \
  2327. WMI_HT_CAP_TX_LDPC | \
  2328. WMI_HT_CAP_RX_LDPC)
  2329. /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  2330. field. The fields not defined here are not supported, or reserved.
  2331. Do not change these masks and if you have to add new one follow the
  2332. bitmask as specified by 802.11ac draft.
  2333. */
  2334. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  2335. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  2336. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  2337. #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
  2338. #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
  2339. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  2340. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  2341. #define WMI_VHT_CAP_SGI_160MHZ 0x00000040
  2342. #define WMI_VHT_CAP_TX_STBC 0x00000080
  2343. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  2344. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  2345. #define WMI_VHT_CAP_SU_BFORMER 0x00000800
  2346. #define WMI_VHT_CAP_SU_BFORMEE 0x00001000
  2347. #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  2348. #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  2349. #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  2350. #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  2351. #define WMI_VHT_CAP_MU_BFORMER 0x00080000
  2352. #define WMI_VHT_CAP_MU_BFORMEE 0x00100000
  2353. #define WMI_VHT_CAP_TXOP_PS 0x00200000
  2354. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  2355. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  2356. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  2357. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  2358. #define WMI_VHT_EXTENDED_NSS_BW_MASK 0xC0000000
  2359. #define WMI_VHT_EXTENDED_NSS_BW_MASK_SHIFT 30
  2360. /* TEMPORARY:
  2361. * Preserve the incorrect old name as an alias for the correct new name
  2362. * until all references to the old name have been removed from all hosts
  2363. * and targets.
  2364. */
  2365. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
  2366. /* These macros should be used when we wish to advertise STBC support for
  2367. * only 1SS or 2SS or 3SS. */
  2368. #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
  2369. #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
  2370. #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
  2371. /* TEMPORARY:
  2372. * Preserve the incorrect old name as an alias for the correct new name
  2373. * until all references to the old name have been removed from all hosts
  2374. * and targets.
  2375. */
  2376. #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
  2377. /* TEMPORARY:
  2378. * Spec does not have VHT TX LDPC capability bit. To Maintain backward
  2379. * compatibility due to previous incorrect definition, the value is moved
  2380. * from 0x4 to 0x0. No new use of WMI_VHT_CAP_TX_LDPC should be added.
  2381. */
  2382. #define WMI_VHT_CAP_TX_LDPC 0x0
  2383. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  2384. WMI_VHT_CAP_SGI_80MHZ | \
  2385. WMI_VHT_CAP_TX_STBC | \
  2386. WMI_VHT_CAP_RX_STBC_MASK | \
  2387. WMI_VHT_CAP_RX_LDPC | \
  2388. WMI_VHT_CAP_TX_LDPC | \
  2389. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  2390. WMI_VHT_CAP_RX_FIXED_ANT | \
  2391. WMI_VHT_CAP_TX_FIXED_ANT)
  2392. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  2393. 802.11ac
  2394. */
  2395. #define WMI_VHT_MAX_MCS_EXT_SS_GET(vht_mcs_map, index) WMI_GET_BITS(vht_mcs_map, 16 + index, 1)
  2396. #define WMI_VHT_MAX_MCS_EXT_SS_SET(vht_mcs_map, index, value) WMI_SET_BITS(vht_mcs_map, 16 + index, 1, value)
  2397. /* Notification bit for Ext MCS 10/11 support */
  2398. #define WMI_VHT_MCS_NOTIFY_EXT_SS_GET(vht_mcs_map) WMI_GET_BITS(vht_mcs_map, 24, 1)
  2399. #define WMI_VHT_MCS_NOTIFY_EXT_SS_SET(vht_mcs_map, value) WMI_SET_BITS(vht_mcs_map, 24, 1, value)
  2400. #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  2401. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  2402. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  2403. /** 11ax capabilities */
  2404. #define WMI_HE_CAP_PPE_PRESENT 0x00000001
  2405. #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
  2406. #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
  2407. #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
  2408. #define WMI_HE_FRAG_SUPPORT_SHIFT 3
  2409. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT 0x00000001
  2410. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT 0x00000002
  2411. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT 0x00000004
  2412. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT 0x00000018
  2413. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT 0x00000030
  2414. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  2415. WMI_GET_BITS(he_cap_info_dword1, 0, 1)
  2416. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  2417. WMI_SET_BITS(he_cap_info_dword1, 0, 1, value)
  2418. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  2419. WMI_GET_BITS(he_cap_info_dword1, 1, 1)
  2420. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  2421. WMI_SET_BITS(he_cap_info_dword1, 1, 1, value)
  2422. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_GET(he_cap_info_dword1) \
  2423. WMI_GET_BITS(he_cap_info_dword1, 2, 1)
  2424. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_SET(he_cap_info_dword1, value) \
  2425. WMI_SET_BITS(he_cap_info_dword1, 2, 1, value)
  2426. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_GET(he_cap_info_dword1) \
  2427. WMI_GET_BITS(he_cap_info_dword1, 3, 2)
  2428. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_SET(he_cap_info_dword1, value) \
  2429. WMI_SET_BITS(he_cap_info_dword1, 3, 2, value)
  2430. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_GET(he_cap_info_dword1) \
  2431. WMI_GET_BITS(he_cap_info_dword1, 5, 2)
  2432. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_SET(he_cap_info_dword1, value) \
  2433. WMI_SET_BITS(he_cap_info_dword1, 5, 2, value)
  2434. /* Interested readers refer to Rx/Tx MCS Map definition as defined in 802.11ax
  2435. */
  2436. #define WMI_HE_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  2437. /*
  2438. * index ranges from 0 to 15, and is used for checking if MCS 12/13 is enabled
  2439. * for a particular NSS.
  2440. * The lower 8 bits (indices 0-7) within the 16 bits indicate MCS 12/13
  2441. * enablement for BW <= 80MHz; the upper 8 bits (indices 8-15) within
  2442. * the 16 bits indicate MCS 12/13 enablement for BW > 80MHz.
  2443. * The 16 bits for the index values are within the upper bits (bits 31:16)
  2444. * of a 32-bit word.
  2445. */
  2446. #define WMI_HE_EXTRA_MCS_SS_GET(he_mcs_map_ext, index) \
  2447. WMI_GET_BITS(he_mcs_map_ext, 16 + index, 1)
  2448. #define WMI_HE_EXTRA_MCS_SS_SET(he_mcs_map_ext, index, value) \
  2449. WMI_SET_BITS(he_mcs_map_ext, 16 + index, 1, value)
  2450. /* fragmentation support field value */
  2451. enum {
  2452. WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
  2453. WMI_HE_FRAG_SUPPORT_LEVEL1, /* support for fragments within a VHT single MPDU, no support for fragments within AMPDU */
  2454. WMI_HE_FRAG_SUPPORT_LEVEL2, /* support for up to 1 fragment per MSDU within a single A-MPDU */
  2455. WMI_HE_FRAG_SUPPORT_LEVEL3, /* support for multiple fragments per MSDU within an A-MPDU */
  2456. };
  2457. enum {
  2458. WMI_HE_RX_DL_OFDMA_SUPPORT_DEFAULT, /* Default */
  2459. WMI_HE_RX_DL_OFDMA_SUPPORT_DISABLE, /* RX DL OFDMA Support Disabled */
  2460. WMI_HE_RX_DL_OFDMA_SUPPORT_ENABLE, /* RX DL OFDMA Support Enabled */
  2461. WMI_HE_RX_DL_OFDMA_SUPPORT_INVALID, /* INVALID */
  2462. };
  2463. enum {
  2464. WMI_HE_RX_DL_MUMIMO_SUPPORT_DEFAULT, /* Default */
  2465. WMI_HE_RX_DL_MUMIMO_SUPPORT_DISABLE, /* RX DL MU-MIMO Support Disabled */
  2466. WMI_HE_RX_DL_MUMIMO_SUPPORT_ENABLE, /* RX DL MU-MIMO Support Enabled */
  2467. WMI_HE_RX_DL_MUMIMO_SUPPORT_INVALID, /* INVALID */
  2468. };
  2469. /** NOTE: This defs cannot be changed in the future without breaking WMI compatibility */
  2470. #define WMI_MAX_NUM_SS MAX_HE_NSS
  2471. #define WMI_MAX_NUM_RU MAX_HE_RU
  2472. /*
  2473. * Figure 8 554ae: -PPE Threshold Info field format
  2474. * we pack PPET16 and PPT8 for four RU's in one element of array.
  2475. *
  2476. * ppet16_ppet8_ru3_ru0 array element 0 holds:
  2477. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  2478. *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
  2479. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  2480. *
  2481. * ppet16_ppet8_ru3_ru0 array element 1 holds:
  2482. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  2483. *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
  2484. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  2485. *
  2486. * etc.
  2487. */
  2488. /*
  2489. * Note that in these macros, "ru" is one-based, not zero-based, while
  2490. * nssm1 is zero-based.
  2491. */
  2492. #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  2493. do { \
  2494. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6)); \
  2495. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet & 7) << (((ru-1) & 3) * 6)); \
  2496. } while (0)
  2497. #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  2498. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6)) & 7)
  2499. #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  2500. do { \
  2501. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6 + 3)); \
  2502. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1) & 3) * 6 + 3)); \
  2503. } while (0)
  2504. #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  2505. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6 + 3)) & 7)
  2506. typedef struct _wmi_ppe_threshold {
  2507. A_UINT32 numss_m1; /** NSS - 1*/
  2508. union {
  2509. A_UINT32 ru_count; /** RU COUNT OBSOLETE to be removed after few versions */
  2510. A_UINT32 ru_mask; /** RU index mask */
  2511. };
  2512. A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; /** ppet8 and ppet16 for max num ss */
  2513. /**************************************************
  2514. * As this struct is embedded inside other structs,
  2515. * it cannot be expanded without breaking backwards
  2516. * compatibility. Do not add new fields here.
  2517. **************************************************/
  2518. } wmi_ppe_threshold;
  2519. #define WMI_MAX_EHTCAP_MAC_SIZE 2
  2520. #define WMI_MAX_EHTCAP_PHY_SIZE 3
  2521. /*
  2522. * 0 – index indicated EHT-MCS map for 20Mhz only sta (4 bytes valid)
  2523. * 1 – index for <= 80MHz bw (only 3 bytes are valid and other is reserved)
  2524. * 2 – index for == 160Mhz bw (only 3 bytes are valid and other is reserved)
  2525. * 3 – index for == 320Mhz bw (only 3 bytes are valid and other is reserved)
  2526. */
  2527. enum {
  2528. WMI_EHT_SUPP_MCS_20MHZ_ONLY,
  2529. WMI_EHT_SUPP_MCS_LE_80MHZ,
  2530. WMI_EHT_SUPP_MCS_160MHZ,
  2531. WMI_EHT_SUPP_MCS_320MHZ,
  2532. };
  2533. #define WMI_MAX_EHT_SUPP_MCS_2G_SIZE 2
  2534. #define WMI_MAX_EHT_SUPP_MCS_5G_SIZE 4
  2535. /* WMI_SYS_CAPS_* refer to the capabilities that system support
  2536. */
  2537. #define WMI_SYS_CAP_ENABLE 0x00000001
  2538. #define WMI_SYS_CAP_TXPOWER 0x00000002
  2539. /*
  2540. * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
  2541. * Bits 5:0 are reserved
  2542. */
  2543. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
  2544. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
  2545. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
  2546. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
  2547. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
  2548. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
  2549. #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
  2550. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
  2551. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  2552. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  2553. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  2554. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  2555. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  2556. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  2557. #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  2558. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  2559. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
  2560. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
  2561. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
  2562. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
  2563. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
  2564. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
  2565. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
  2566. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
  2567. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
  2568. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
  2569. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
  2570. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
  2571. #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
  2572. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
  2573. #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
  2574. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
  2575. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
  2576. ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  2577. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
  2578. ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  2579. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
  2580. ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  2581. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
  2582. ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  2583. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
  2584. ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  2585. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
  2586. ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  2587. #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
  2588. ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  2589. #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
  2590. ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  2591. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
  2592. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
  2593. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
  2594. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS (28)
  2595. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS (27)
  2596. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  2597. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  2598. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  2599. #define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  2600. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  2601. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
  2602. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
  2603. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
  2604. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
  2605. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
  2606. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
  2607. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_SET(scan_cfg, value) \
  2608. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS, 1, value)
  2609. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_SET(scan_cfg, value) \
  2610. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS, 1, value)
  2611. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
  2612. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  2613. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
  2614. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  2615. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
  2616. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  2617. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_GET(scan_cfg) \
  2618. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  2619. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_GET(scan_cfg) \
  2620. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  2621. #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
  2622. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
  2623. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS (29)
  2624. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS (28)
  2625. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS (27)
  2626. #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS (26)
  2627. #define WMI_DBS_FW_MODE_CFG_DBS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  2628. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  2629. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  2630. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  2631. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  2632. #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS)
  2633. #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
  2634. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
  2635. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
  2636. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
  2637. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_SET(fw_mode, value) \
  2638. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS, 1, value)
  2639. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_SET(fw_mode, value) \
  2640. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS, 1, value)
  2641. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_SET(fw_mode, value) \
  2642. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS, 1, value)
  2643. #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_SET(fw_mode, value) \
  2644. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS, 1, value)
  2645. #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
  2646. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  2647. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
  2648. ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  2649. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_GET(fw_mode) \
  2650. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  2651. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_GET(fw_mode) \
  2652. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  2653. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_GET(fw_mode) \
  2654. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  2655. #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_GET(fw_mode) \
  2656. ((fw_mode & WMI_DBS_FW_MODE_CFG_ASYNC_SBS_MASK) >> WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS)
  2657. /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
  2658. typedef struct _wmi_abi_version {
  2659. A_UINT32 abi_version_0; /** WMI Major and Minor versions */
  2660. A_UINT32 abi_version_1; /** WMI change revision */
  2661. A_UINT32 abi_version_ns_0; /** ABI version namespace first four dwords */
  2662. A_UINT32 abi_version_ns_1; /** ABI version namespace second four dwords */
  2663. A_UINT32 abi_version_ns_2; /** ABI version namespace third four dwords */
  2664. A_UINT32 abi_version_ns_3; /** ABI version namespace fourth four dwords */
  2665. } wmi_abi_version;
  2666. /*
  2667. * maximum number of memory requests allowed from FW.
  2668. */
  2669. #define WMI_MAX_MEM_REQS 16
  2670. /* !!NOTE!!:
  2671. * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
  2672. * Please don't change it.
  2673. */
  2674. #define HW_BD_INFO_SIZE 5
  2675. /**
  2676. * PDEV ID to identify the physical device,
  2677. * value 0 reserved for SOC level commands/event
  2678. */
  2679. #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
  2680. #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
  2681. #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
  2682. #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
  2683. /*
  2684. * Enum regarding which BDF elements are provided in which elements of the
  2685. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  2686. */
  2687. typedef enum {
  2688. BDF_VERSION = 0,
  2689. REF_DESIGN_ID = 1,
  2690. CUSTOMER_ID = 2,
  2691. PROJECT_ID = 3,
  2692. BOARD_DATA_REV = 4,
  2693. } wmi_hw_bd_info_e;
  2694. /*
  2695. * Macros to get/set BDF details within the
  2696. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  2697. */
  2698. #define WMI_GET_BDF_VERSION(hw_bd_info) ((hw_bd_info)[BDF_VERSION])
  2699. #define WMI_GET_REF_DESIGN(hw_bd_info) ((hw_bd_info)[REF_DESIGN_ID])
  2700. #define WMI_GET_CUSTOMER_ID(hw_bd_info) ((hw_bd_info)[CUSTOMER_ID])
  2701. #define WMI_GET_PROJECT_ID(hw_bd_info) ((hw_bd_info)[PROJECT_ID])
  2702. #define WMI_GET_BOARD_DATA_REV(hw_bd_info) ((hw_bd_info)[BOARD_DATA_REV])
  2703. #define WMI_SET_BDF_VERSION(hw_bd_info, val) ((hw_bd_info)[BDF_VERSION] = (val))
  2704. #define WMI_SET_REF_DESIGN(hw_bd_info, val) ((hw_bd_info)[REF_DESIGN_ID] = (val))
  2705. #define WMI_SET_CUSTOMER_ID(hw_bd_info, val) ((hw_bd_info)[CUSTOMER_ID] = (val))
  2706. #define WMI_SET_PROJECT_ID(hw_bd_info, val) ((hw_bd_info)[PROJECT_ID] = (val))
  2707. #define WMI_SET_BOARD_DATA_REV(hw_bd_info, val) ((hw_bd_info)[BOARD_DATA_REV] = (val))
  2708. /*
  2709. * Enum to indicate which Tx power capability is provided in which element of
  2710. * hw_tx_power_signed
  2711. */
  2712. typedef enum {
  2713. WMI_HW_MIN_TX_POWER_SIGNED = 0,
  2714. WMI_HW_MAX_TX_POWER_SIGNED = 1,
  2715. WMI_HW_TX_POWER_CAPS_MAX,
  2716. } wmi_hw_tx_power_caps;
  2717. /**
  2718. * The following struct holds optional payload for
  2719. * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
  2720. * device capability to the host.
  2721. */
  2722. typedef struct {
  2723. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
  2724. A_UINT32 fw_build_vers; /* firmware build number */
  2725. wmi_abi_version fw_abi_vers;
  2726. A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
  2727. A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
  2728. A_UINT32 num_rf_chains;
  2729. /* The following field is only valid for service type WMI_SERVICE_11AC */
  2730. A_UINT32 ht_cap_info; /* WMI HT Capability */
  2731. A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
  2732. A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  2733. A_UINT32 hw_min_tx_power;
  2734. A_UINT32 hw_max_tx_power;
  2735. /* sys_cap_info:
  2736. * bits 1:0 - RXTX LED + RFKILL enable flags (see WMI_LEDRFKILL_FLAGS)
  2737. * bits 31:2 - reserved (must be set to zero)
  2738. */
  2739. A_UINT32 sys_cap_info;
  2740. A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  2741. /** Max beacon and Probe Response IE offload size (includes
  2742. * optional P2P IEs) */
  2743. A_UINT32 max_bcn_ie_size;
  2744. /*
  2745. * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
  2746. * FW uses this as FW extesnsion memory for saving its data structures. Only valid
  2747. * for low latency interfaces like PCIE where FW can access this memory directly (or)
  2748. * by DMA.
  2749. */
  2750. A_UINT32 num_mem_reqs;
  2751. /* Max No. scan channels target can support
  2752. * If FW is too old and doesn't indicate this number, host side value will default to
  2753. * 0, and host will take the original compatible value (62) for future scan channel
  2754. * setup.
  2755. */
  2756. A_UINT32 max_num_scan_channels;
  2757. /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
  2758. * Default 0 means that hw_bd_info[] is invalid (legacy board).
  2759. */
  2760. A_UINT32 hw_bd_id;
  2761. A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
  2762. /*
  2763. * Number of MACs supported, i.e. a DBS-capable device will return 2
  2764. */
  2765. A_UINT32 max_supported_macs;
  2766. /*
  2767. * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
  2768. */
  2769. A_UINT32 wmi_fw_sub_feat_caps; /* values from enum WMI_FW_SUB_FEAT_CAPS */
  2770. /*
  2771. * Number of Dual Band Simultaneous (DBS) hardware modes
  2772. */
  2773. A_UINT32 num_dbs_hw_modes;
  2774. /*
  2775. * txrx_chainmask
  2776. * [7:0] - 2G band tx chain mask
  2777. * [15:8] - 2G band rx chain mask
  2778. * [23:16] - 5G band tx chain mask
  2779. * [31:24] - 5G band rx chain mask
  2780. *
  2781. */
  2782. A_UINT32 txrx_chainmask;
  2783. /*
  2784. * default Dual Band Simultaneous (DBS) hardware mode
  2785. */
  2786. A_UINT32 default_dbs_hw_mode_index;
  2787. /*
  2788. * Number of msdu descriptors target would use
  2789. */
  2790. A_UINT32 num_msdu_desc;
  2791. /* This ready_event_fixed_param TLV is followed by the below TLVs:
  2792. * HAL_REG_CAPABILITIES hal_reg_capabilities;
  2793. * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  2794. * wlan_host_mem_req mem_reqs[];
  2795. * A_UINT32 wlan_dbs_hw_mode_list[];
  2796. */
  2797. } wmi_service_ready_event_fixed_param;
  2798. typedef enum {
  2799. WMI_RXTX_LED_ENABLE = 0x00000001,
  2800. WMI_RFKILL_ENABLE = 0x00000002,
  2801. } WMI_LEDRFKILL_FLAGS;
  2802. #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
  2803. typedef struct {
  2804. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param */
  2805. /*
  2806. * The wmi_service_segment offset field specifies the position within the
  2807. * logical bitmap of WMI service flags at which the WMI service flags
  2808. * specified within this message begin.
  2809. * Since the first 128 WMI service flags are specified within the
  2810. * wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT message,
  2811. * the wmi_service_segment_offset value is expected to be 128 or more.
  2812. */
  2813. A_UINT32 wmi_service_segment_offset;
  2814. A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
  2815. /*
  2816. * This TLV is followed by the below TLVs:
  2817. * A_UINT32 wmi_service_ext_bitmap[]
  2818. * The wmi_service_ext_bitmap covers WMI service flags at the offset where
  2819. * wmi_service_available_event_fixed_param.wmi_service_segment_bitmap
  2820. * leaves off.
  2821. * For example, if
  2822. * wmi_service_available_event_fixed_param.wmi_service_segment_offset
  2823. * is 128, then
  2824. * wmi_service_available_event_fixed_param.wmi_service_segment_bitmap
  2825. * will cover WMI service flags
  2826. * 128 to (128 + WMI_SERVICE_SEGMENT_BM_SIZE32 * 32) = 128 to 256
  2827. * and wmi_service_ext_bitmap will cover WMI service flags starting at 256.
  2828. */
  2829. } wmi_service_available_event_fixed_param;
  2830. /*
  2831. * HDL version GET/SET APIs
  2832. */
  2833. #define WMI_HDL_VERSION_BITPOS 0
  2834. #define WMI_HDL_VERSION_NUM_BITS 10
  2835. #define WMI_HDL_VERSION_GET(dword) WMI_GET_BITS(dword, WMI_HDL_VERSION_BITPOS, WMI_HDL_VERSION_NUM_BITS)
  2836. #define WMI_HDL_VERSION_SET(dword, value) WMI_SET_BITS(dword, WMI_HDL_VERSION_BITPOS, WMI_HDL_VERSION_NUM_BITS, value)
  2837. typedef struct {
  2838. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT */
  2839. /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
  2840. A_UINT32 default_conc_scan_config_bits;
  2841. /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
  2842. A_UINT32 default_fw_config_bits;
  2843. wmi_ppe_threshold ppet;
  2844. A_UINT32 he_cap_info; /* see section 8.4.2.213 from draft r8 of 802.11ax; see WMI_HE_FRAG_SUPPORT enum */
  2845. /*
  2846. * An HT STA shall not allow transmission of more than one MPDU start
  2847. * within the time limit described in the MPDU maximum density field.
  2848. */
  2849. A_UINT32 mpdu_density; /* units are microseconds */
  2850. /*
  2851. * Maximum no of BSSID based RX filters host can program
  2852. * Value 0 means FW hasn't given any limit to host.
  2853. */
  2854. A_UINT32 max_bssid_rx_filters;
  2855. /*
  2856. * Extended FW build version information:
  2857. * bits 9:0 -> HDL version info
  2858. * bits 12:10 -> CRM sub ID MSbs (refer to WMI_SVC_RDY_CRM_SUB_ID_GET/SET)
  2859. * bits 27:13 -> reserved
  2860. * bits 31:28 -> CRM sub ID LSbs (refer to WMI_SVC_RDY_CRM_SUB_ID_GET/SET)
  2861. */
  2862. A_UINT32 fw_build_vers_ext;
  2863. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  2864. * This limit is the maximum number of SSIDs that can be configured in the
  2865. * target for Network List Offload (i.e. scanning for a preferred network).
  2866. * If this value is 0x0, the target supports WMI_NLO_MAX_SSIDS (16).
  2867. * If this value is non-zero, the host should send back in the
  2868. * WMI_INIT message's wmi_resource_config.max_nlo_ssids a value that
  2869. * is equal to or less than the target capability limit reported here.
  2870. */
  2871. A_UINT32 max_nlo_ssids;
  2872. /* ref to section 8.4.2.48 Multiple BSSID element
  2873. * The Max BSSID Indicator field contains a value assigned to n,
  2874. * where 2^n is the maximum number of BSSIDs
  2875. */
  2876. A_UINT32 max_bssid_indicator;
  2877. /* 2nd DWORD of HE MAC Capabilities */
  2878. A_UINT32 he_cap_info_ext;
  2879. /**************************************************************************
  2880. * DON'T ADD ANY FURTHER FIELDS HERE -
  2881. * It would cause the size of the READY_EXT message within some targets
  2882. * to exceed the size of the buffer used for the message.
  2883. **************************************************************************/
  2884. /*
  2885. * A variable-length TLV array of wmi_chan_rf_characterization_info will
  2886. * follow this fixed_param TLV, containing rx characterization info for
  2887. * primary channels.
  2888. * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
  2889. */
  2890. } wmi_service_ready_ext_event_fixed_param;
  2891. #define WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX 28
  2892. #define WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS 4
  2893. #define WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX 10
  2894. #define WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS 3
  2895. #define WMI_SVC_RDY_CRM_SUB_ID_GET(var, val) \
  2896. WMI_APPEND_TWO_GET_BITS( \
  2897. var, \
  2898. WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX, \
  2899. WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS, \
  2900. WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX, \
  2901. WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS, \
  2902. val)
  2903. #define WMI_SVC_RDY_CRM_SUB_ID_SET(var, val) \
  2904. WMI_APPEND_TWO_SET_BITS( \
  2905. var, \
  2906. WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX, \
  2907. WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS, \
  2908. WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX, \
  2909. WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS, \
  2910. val)
  2911. /*
  2912. * regdb version GET/SET APIs
  2913. */
  2914. #define WMI_REG_DB_VERSION_MAJOR_BITPOS 0
  2915. #define WMI_REG_DB_VERSION_MINOR_BITPOS 8
  2916. #define WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS 16
  2917. #define WMI_BDF_REG_DB_VERSION_MINOR_BITPOS 24
  2918. #define WMI_REG_DB_VERSION_NUM_BITS 8
  2919. #define WMI_REG_DB_VERSION_MAJOR_GET(dword) \
  2920. WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2921. #define WMI_REG_DB_VERSION_MAJOR_SET(dword, value) \
  2922. WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2923. #define WMI_REG_DB_VERSION_MINOR_GET(dword) \
  2924. WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2925. #define WMI_REG_DB_VERSION_MINOR_SET(dword, value) \
  2926. WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2927. #define WMI_BDF_REG_DB_VERSION_MAJOR_GET(dword) \
  2928. WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2929. #define WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, value) \
  2930. WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2931. #define WMI_BDF_REG_DB_VERSION_MINOR_GET(dword) \
  2932. WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2933. #define WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, value) \
  2934. WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2935. #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) \
  2936. do { \
  2937. WMI_REG_DB_VERSION_MAJOR_SET(dword, reg_db_ver_major); \
  2938. WMI_REG_DB_VERSION_MINOR_SET(dword, reg_db_ver_minor); \
  2939. WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, bdf_reg_db_ver_major); \
  2940. WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, bdf_reg_db_ver_minor); \
  2941. } while (0)
  2942. #define WMI_HW_MIN_TX_POWER_BITPOS 0
  2943. #define WMI_HW_MAX_TX_POWER_BITPOS 16
  2944. #define WMI_HW_MIN_TX_POWER_GET(dword) \
  2945. ((A_INT16) WMI_GET_BITS(dword, WMI_HW_MIN_TX_POWER_BITPOS, 16))
  2946. #define WMI_HW_MIN_TX_POWER_SET(dword, value) \
  2947. WMI_SET_BITS(dword, WMI_HW_MIN_TX_POWER_BITPOS, 16, value)
  2948. #define WMI_HW_MAX_TX_POWER_GET(dword) \
  2949. ((A_INT16) WMI_GET_BITS(dword, WMI_HW_MAX_TX_POWER_BITPOS, 16))
  2950. #define WMI_HW_MAX_TX_POWER_SET(dword, value) \
  2951. WMI_SET_BITS(dword, WMI_HW_MAX_TX_POWER_BITPOS, 16, value)
  2952. #define WMI_MAX_USER_PER_PPDU_UL_OFDMA_GET(dword) \
  2953. WMI_GET_BITS(dword, 0, 16)
  2954. #define WMI_MAX_USER_PER_PPDU_UL_OFDMA_SET(dword, value) \
  2955. WMI_SET_BITS(dword, 0, 16, value)
  2956. #define WMI_MAX_USER_PER_PPDU_DL_OFDMA_GET(dword) \
  2957. WMI_GET_BITS(dword, 16, 16)
  2958. #define WMI_MAX_USER_PER_PPDU_DL_OFDMA_SET(dword, value) \
  2959. WMI_SET_BITS(dword, 16, 16, value)
  2960. #define WMI_MAX_USER_PER_PPDU_UL_MUMIMO_GET(dword) \
  2961. WMI_GET_BITS(dword, 0, 16)
  2962. #define WMI_MAX_USER_PER_PPDU_UL_MUMIMO_SET(dword, value) \
  2963. WMI_SET_BITS(dword, 0, 16, value)
  2964. #define WMI_MAX_USER_PER_PPDU_DL_MUMIMO_GET(dword) \
  2965. WMI_GET_BITS(dword, 16, 16)
  2966. #define WMI_MAX_USER_PER_PPDU_DL_MUMIMO_SET(dword, value) \
  2967. WMI_SET_BITS(dword, 16, 16, value)
  2968. #define WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_GET(target_cap_flags) \
  2969. WMI_GET_BITS(target_cap_flags, 0, 2)
  2970. #define WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_SET(target_cap_flags, value) \
  2971. WMI_SET_BITS(target_cap_flags, 0, 2, value)
  2972. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_2GHZ_GET(target_cap_flags) \
  2973. WMI_GET_BITS(target_cap_flags, 2, 1)
  2974. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_2GHZ_SET(target_cap_flags, value) \
  2975. WMI_SET_BITS(target_cap_flags, 2, 1, value)
  2976. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_2GHZ_GET(target_cap_flags) \
  2977. WMI_GET_BITS(target_cap_flags, 3, 1)
  2978. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_2GHZ_SET(target_cap_flags, value) \
  2979. WMI_SET_BITS(target_cap_flags, 3, 1, value)
  2980. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_5GHZ_GET(target_cap_flags) \
  2981. WMI_GET_BITS(target_cap_flags, 4, 1)
  2982. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_5GHZ_SET(target_cap_flags, value) \
  2983. WMI_SET_BITS(target_cap_flags, 4, 1, value)
  2984. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_5GHZ_GET(target_cap_flags) \
  2985. WMI_GET_BITS(target_cap_flags, 5, 1)
  2986. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_5GHZ_SET(target_cap_flags, value) \
  2987. WMI_SET_BITS(target_cap_flags, 5, 1, value)
  2988. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_6GHZ_GET(target_cap_flags) \
  2989. WMI_GET_BITS(target_cap_flags, 6, 1)
  2990. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_6GHZ_SET(target_cap_flags, value) \
  2991. WMI_SET_BITS(target_cap_flags, 6, 1, value)
  2992. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_6GHZ_GET(target_cap_flags) \
  2993. WMI_GET_BITS(target_cap_flags, 7, 1)
  2994. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_6GHZ_SET(target_cap_flags, value) \
  2995. WMI_SET_BITS(target_cap_flags, 7, 1, value)
  2996. #define WMI_TARGET_CAP_MAX_ML_BSS_NUM_GET(target_cap_flags) \
  2997. WMI_GET_BITS(target_cap_flags, 8, 3)
  2998. #define WMI_TARGET_CAP_MAX_ML_BSS_NUM_SET(target_cap_flags, value) \
  2999. WMI_SET_BITS(target_cap_flags, 8, 3, value)
  3000. #define WMI_TARGET_CAP_CONCURRENCE_SUPPORT_GET(target_cap_flags) \
  3001. WMI_GET_BITS(target_cap_flags, 11, 2)
  3002. #define WMI_TARGET_CAP_CONCURRENCE_SUPPORT_SET(target_cap_flags, value) \
  3003. WMI_SET_BITS(target_cap_flags, 11, 2, value)
  3004. #define WMI_TARGET_CAP_MULTIPASS_SAP_SUPPORT_GET(target_cap_flags) \
  3005. WMI_GET_BITS(target_cap_flags, 13, 1)
  3006. #define WMI_TARGET_CAP_MULTIPASS_SAP_SUPPORT_SET(target_cap_flags, value) \
  3007. WMI_SET_BITS(target_cap_flags, 13, 1, value)
  3008. /* ML FULL monitor mode */
  3009. #define WMI_TARGET_CAP_ML_MONITOR_MODE_SUPPORT_GET(target_cap_flags) \
  3010. WMI_GET_BITS(target_cap_flags, 14, 1)
  3011. #define WMI_TARGET_CAP_ML_MONITOR_MODE_SUPPORT_SET(target_cap_flags, value) \
  3012. WMI_SET_BITS(target_cap_flags, 14, 1, value)
  3013. #define WMI_TARGET_CAP_QDATA_TX_LCE_FILTER_SUPPORT_GET(target_cap_flags) \
  3014. WMI_GET_BITS(target_cap_flags, 15, 1)
  3015. #define WMI_TARGET_CAP_QDATA_TX_LCE_FILTER_SUPPORT_SET(target_cap_flags, value)\
  3016. WMI_SET_BITS(target_cap_flags, 15, 1, value)
  3017. /*
  3018. * wmi_htt_msdu_idx_to_htt_msdu_qtype GET/SET APIs
  3019. */
  3020. #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_INDEX_GET(index_and_type) \
  3021. WMI_GET_BITS(index_and_type, 0, 8)
  3022. #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_INDEX_SET(index_and_type, value) \
  3023. WMI_SET_BITS(index_and_type, 0, 8, value)
  3024. #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_TYPE_GET(index_and_type) \
  3025. WMI_GET_BITS(index_and_type, 8, 8)
  3026. #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_TYPE_SET(index_and_type, value) \
  3027. WMI_SET_BITS(index_and_type, 8, 8, value)
  3028. typedef struct {
  3029. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_htt_msdu_idx_to_htt_msdu_qtype.*/
  3030. /**
  3031. * index_and_type
  3032. *
  3033. * [7:0] : htt_msduq_index
  3034. * [15:8] : htt_msduq_type
  3035. * [31:16] : reserved
  3036. */
  3037. A_UINT32 index_and_type;
  3038. } wmi_htt_msdu_idx_to_htt_msdu_qtype;
  3039. typedef enum {
  3040. WMI_AFC_FEATURE_6G_DEPLOYMENT_UNSPECIFIED = 0,
  3041. WMI_AFC_FEATURE_6G_DEPLOYMENT_INDOOR_ONLY = 1,
  3042. WMI_AFC_FEATURE_6G_DEPLOYMENT_OUTDOOR_ONLY = 2,
  3043. } WMI_AFC_FEATURE_6G_DEPLOYMENT_TYPE;
  3044. typedef enum {
  3045. WMI_BDF_VERSION_CHECK_DISABLED = 0,
  3046. /* WMI_BDF_VERSION_CHECK_GOOD:
  3047. * BDF version is matched with FW.
  3048. */
  3049. WMI_BDF_VERSION_CHECK_GOOD = 1,
  3050. /* WMI_BDF_VERSION_TEMPLATE_TOO_OLD:
  3051. * BDF template version is older than the oldest version supported by FW.
  3052. */
  3053. WMI_BDF_VERSION_TEMPLATE_TOO_OLD = 2,
  3054. /* WMI_BDF_VERSION_TEMPLATE_TOO_NEW:
  3055. * BDF template version is newer than the newest version supported by FW.
  3056. */
  3057. WMI_BDF_VERSION_TEMPLATE_TOO_NEW = 3,
  3058. /* WMI_BDF_VERSION_FW_TOO_OLD:
  3059. * FW version is older than the major version supported by BDF.
  3060. */
  3061. WMI_BDF_VERSION_FW_TOO_OLD = 4,
  3062. /* WMI_BDF_VERSION_FW_TOO_NEW:
  3063. * FW version is newer than the minor version supported by BDF.
  3064. */
  3065. WMI_BDF_VERSION_FW_TOO_NEW = 5,
  3066. } wmi_bdf_version_status_type;
  3067. typedef struct {
  3068. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_ready_ext2_event_fixed_param.*/
  3069. /*
  3070. * regDB Version to be sent to Host on WMI service ready ext2 event.
  3071. * [7:0] - regDbVersionMajor
  3072. * [15:8] - regDbVersionMinor
  3073. * [23:16] - bdfRegDbVersionMajor
  3074. * [31:24] - bdfRegDbVersionMinor
  3075. * The WMI_*REG_DB_VERSION_[MAJOR,MINOR]_[SET,GET] macros are used to
  3076. * access these bitfields.
  3077. */
  3078. A_UINT32 reg_db_version;
  3079. /* Min & Max Tx power (in dBm) supported in 2.4 GHz band
  3080. * [15:0] - Min Tx Power in 2.4 GHz band
  3081. * [31:16] - Max Tx Power in 2.4 GHz band
  3082. * WMI_HW_[MIN,MAX]_TX_POWER_[GET,SET] macros are used to access
  3083. * these bitfields.
  3084. * If Min Tx Power = Max Tx Power = 0 means Min Tx Power & Max Tx Power
  3085. * are not specified.
  3086. */
  3087. A_UINT32 hw_min_max_tx_power_2g;
  3088. /* Min & Max Tx power (in dBm) supported in 5 GHz band
  3089. * [15:0] - Min Tx Power in 5 GHz band
  3090. * [31:16] - Max Tx Power in 5 GHz band
  3091. * WMI_HW_[MIN,MAX]_TX_POWER_[GET,SET] macros are used to access
  3092. * these bitfields.
  3093. * If Min Tx Power = Max Tx Power = 0 means Min Tx Power & Max Tx Power
  3094. * are not specified.
  3095. */
  3096. A_UINT32 hw_min_max_tx_power_5g;
  3097. /*
  3098. * Number of peers supported per WMI_PEER_CHAN_WIDTH_SWITCH_CMDID
  3099. * 0 - not enabled
  3100. */
  3101. A_UINT32 chwidth_num_peer_caps;
  3102. /*
  3103. * Whether preamble puncturing is supported by FW, and if so, for which
  3104. * bandwidths. The possible values for this field are listed below.
  3105. * 0: preamble puncturing is not supported
  3106. * 80: puncturing supported within channels of at least 80 MHz bandwidth
  3107. * 160: puncturing supported within channels of at least 160 MHz bandwidth
  3108. * 320: puncturing supported within 320 MHz channels
  3109. */
  3110. A_UINT32 preamble_puncture_bw;
  3111. /*
  3112. * [15:0] - ULOFDMA Refer WMI_MAX_USER_PER_PPDU_UL_OFDMA_GET & SET
  3113. * [31:16] - DLOFDMA Refer WMI_MAX_USER_PER_PPDU_DL_OFDMA_GET & SET
  3114. * If max_user_per_ppdu_ofdma == 0 the UL/DL max users are unspecified.
  3115. */
  3116. A_UINT32 max_user_per_ppdu_ofdma;
  3117. /*
  3118. * [15:0] - ULMUMIMO Refer WMI_MAX_USER_PER_PPDU_UL_MUMIMO_GET & SET
  3119. * [31:16] - DLMUMIMO Refer WMI_MAX_USER_PER_PPDU_DL_MUMIMO_GET & SET
  3120. * If max_user_per_ppdu_mumimo == 0 the UL/DL max users are unspecified.
  3121. */
  3122. A_UINT32 max_user_per_ppdu_mumimo;
  3123. /**
  3124. * @brief target_cap_flags - flags containing information about target capabilities.
  3125. * Bits 1:0
  3126. * Rx peer metadata version number used by target
  3127. * 0-> legacy case
  3128. * 1-> MLO support
  3129. * 2,3-> reserved
  3130. * Refer to WMI_TARGET_CAP_FLAGS_PEER_METADATA_VERSION macros.
  3131. * Bit 2 - UL MUMIMO Rx support on 2.4 GHz (AP Mode)
  3132. * Bit 3 - UL MUMIMO Tx support on 2.4 GHz (STA Mode)
  3133. * Bit 4 - UL MUMIMO Rx support on 5 GHz (AP Mode)
  3134. * Bit 5 - UL MUMIMO Tx support on 5 GHz (STA Mode)
  3135. * Bit 6 - UL MUMIMO Rx support on 6 GHz (AP Mode)
  3136. * Bit 7 - UL MUMIMO Tx support on 6 GHz (STA Mode)
  3137. * Bits 10:8 - max ML BSS number supported, range [0-7]
  3138. * Bits 12:11 concurrence support capability
  3139. * Bit11 - [ML-STA + SL-STA] 0: not supported; 1:supported
  3140. * Bit12 - [ML-STA + SL-SAP] 0: not supported; 1:supported
  3141. * Bit 13 - Support for multipass SAP
  3142. * Bit 14 - Support for ML monitor mode
  3143. * Bit 15 - Support for Qdata Tx LCE filter installation
  3144. * Bits 31:16 - Reserved
  3145. */
  3146. A_UINT32 target_cap_flags;
  3147. /* EHT MAC Capabilities: total WMI_MAX_EHTCAP_MAC_SIZE*A_UINT32 bits
  3148. * those bits actually are max mac capabilities = cap_mac_2g | cap_mac_5g
  3149. * The actual cap mac info per mac (2g/5g) in the TLV -- WMI_MAC_PHY_CAPABILITIES_EXT
  3150. */
  3151. A_UINT32 eht_cap_mac_info[WMI_MAX_EHTCAP_MAC_SIZE];
  3152. /* Following this struct are the TLV's:
  3153. * WMI_DMA_RING_CAPABILITIES;
  3154. * wmi_spectral_bin_scaling_params;
  3155. * WMI_MAC_PHY_CAPABILITIES_EXT; <-- EHT mac capabilities and phy capabilities info
  3156. * WMI_HAL_REG_CAPABILITIES_EXT2;
  3157. * wmi_nan_capabilities;
  3158. * WMI_SCAN_RADIO_CAPABILITIES_EXT2;
  3159. */
  3160. /*
  3161. * Max number of LinkView peers supported by target
  3162. */
  3163. A_UINT32 max_num_linkview_peers;
  3164. /*
  3165. * Max number of msduq's per TID per peer supported by target,
  3166. * defines LinkView peers number
  3167. */
  3168. A_UINT32 max_num_msduq_supported_per_tid;
  3169. /*
  3170. * Number of peers support default flowqs
  3171. */
  3172. A_UINT32 default_num_msduq_supported_per_tid;
  3173. /*
  3174. * Indoor/Outdoor specification for AFC support -
  3175. * refer to WMI_AFC_FEATURE_6G_DEPLOYMENT_TYPE enum
  3176. */
  3177. A_UINT32 afc_deployment_type;
  3178. /*
  3179. * Board data check report. Please see wmi_hw_bd_status_type enum values.
  3180. */
  3181. A_UINT32 hw_bd_status;
  3182. /*
  3183. * max block ack window size FW supports for tx.
  3184. */
  3185. A_UINT32 tx_aggr_ba_win_size_max;
  3186. /*
  3187. * max block ack window size FW supports for rx.
  3188. */
  3189. A_UINT32 rx_aggr_ba_win_size_max;
  3190. /*
  3191. * max link number per STA MLD FW supports.
  3192. */
  3193. A_UINT32 num_max_mlo_link_per_ml_bss_supp;
  3194. /*
  3195. * max link number per SAP MLD FW supports.
  3196. */
  3197. A_UINT32 num_max_mlo_link_per_ml_sap_supp;
  3198. /* Followed by next TLVs:
  3199. * WMI_DMA_RING_CAPABILITIES dma_ring_caps[];
  3200. * wmi_spectral_bin_scaling_params wmi_bin_scaling_params[];
  3201. * WMI_MAC_PHY_CAPABILITIES_EXT mac_phy_caps[];
  3202. * WMI_HAL_REG_CAPABILITIES_EXT2 hal_reg_caps[];
  3203. * wmi_nan_capabilities nan_cap;
  3204. * WMI_SCAN_RADIO_CAPABILITIES_EXT2 wmi_scan_radio_caps[];
  3205. * wmi_htt_msdu_idx_to_htt_msdu_qtype htt_msdu_idx_to_qtype_map[];
  3206. * wmi_dbs_or_sbs_cap_ext dbs_or_sbs_cap_ext;
  3207. * A_INT32 hw_tx_power_signed[WMI_HW_TX_POWER_CAPS_MAX];
  3208. * wmi_aux_dev_capabilities aux_dev_caps[];
  3209. */
  3210. } wmi_service_ready_ext2_event_fixed_param;
  3211. typedef struct {
  3212. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_rf_characterization_info_event_fixed_param */
  3213. /*
  3214. * A variable-length TLV array of wmi_chan_rf_characterization_info will
  3215. * follow this fixed_param TLV, containing rx characterization info for
  3216. * primary channels.
  3217. * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
  3218. */
  3219. } wmi_chan_rf_characterization_info_event_fixed_param;
  3220. typedef enum {
  3221. WMI_FW_STA_RTT_INITR = 0x00000001,
  3222. WMI_FW_STA_RTT_RESPR = 0x00000002,
  3223. WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
  3224. WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
  3225. WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
  3226. WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
  3227. WMI_FW_AP_RTT_INITR = 0x00000040,
  3228. WMI_FW_AP_RTT_RESPR = 0x00000080,
  3229. WMI_FW_NAN_RTT_INITR = 0x00000100,
  3230. WMI_FW_NAN_RTT_RESPR = 0x00000200,
  3231. WMI_FW_SCAN_DBS_POLICY = 0x00000400,
  3232. /*
  3233. * New fw sub feature capabilities before
  3234. * WMI_FW_MAX_SUB_FEAT_CAP
  3235. */
  3236. WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
  3237. } WMI_FW_SUB_FEAT_CAPS;
  3238. typedef enum {
  3239. WMI_HWBD_NONE = 0, /* No hw board information is given */
  3240. WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
  3241. WMI_HWBD_QCA2582 = 2, /* Killer 1525*/
  3242. } WMI_HWBD_ID;
  3243. #define ATH_BD_DATA_REV_MASK 0x000000FF
  3244. #define ATH_BD_DATA_REV_SHIFT 0
  3245. #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
  3246. #define ATH_BD_DATA_PROJ_ID_SHIFT 8
  3247. #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
  3248. #define ATH_BD_DATA_CUST_ID_SHIFT 16
  3249. #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
  3250. #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
  3251. #define SET_BD_DATA_REV(bd_data_ver, value) \
  3252. ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
  3253. #define GET_BD_DATA_REV(bd_data_ver) \
  3254. (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
  3255. #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
  3256. ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
  3257. #define GET_BD_DATA_PROJ_ID(bd_data_ver) \
  3258. (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
  3259. #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
  3260. ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
  3261. #define GET_BD_DATA_CUST_ID(bd_data_ver) \
  3262. (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
  3263. #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
  3264. ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
  3265. #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
  3266. (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
  3267. #ifdef ROME_LTE_COEX_FREQ_AVOID
  3268. typedef struct {
  3269. A_UINT32 start_freq; /* start frequency, not channel center freq */
  3270. A_UINT32 end_freq; /* end frequency */
  3271. } avoid_freq_range_desc;
  3272. typedef struct {
  3273. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  3274. A_UINT32 num_freq_ranges;
  3275. /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
  3276. avoid_freq_range_desc avd_freq_range[];
  3277. } wmi_wlan_avoid_freq_ranges_event;
  3278. #endif
  3279. /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that returned status */
  3280. #define WLAN_INIT_STATUS_SUCCESS 0x0
  3281. #define WLAN_INIT_STATUS_GEN_FAILED 0x1
  3282. #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  3283. #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  3284. typedef A_UINT32 WLAN_INIT_STATUS;
  3285. typedef struct {
  3286. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
  3287. wmi_abi_version fw_abi_vers;
  3288. /*
  3289. * mac_addr is always filled; in addition, there can be a mac_addr_list
  3290. * TLV following this fixed_param TLV to specify additional MAC addresses,
  3291. * for cases where the target specifies one MAC address per pdev
  3292. * (so the host can treat the pdevs within the target as separately
  3293. * as possible) rather than one MAC address for the whole SOC.
  3294. */
  3295. wmi_mac_addr mac_addr;
  3296. A_UINT32 status;
  3297. A_UINT32 num_dscp_table;
  3298. /* num_extra_mac_addr -
  3299. * how many additional MAC addresses besides the above mac_addr
  3300. * are provided in the subsequent mac_addr_list TLV
  3301. */
  3302. A_UINT32 num_extra_mac_addr;
  3303. /*
  3304. * Total number of "real" peers (remote peers of an AP vdev,
  3305. * BSS peer of a STA vdev, TDLS peer of a STA vdev) that FW supports.
  3306. * If 0, then Host can use param_tlv->resource_config->num_peers as
  3307. * total number of peers.
  3308. */
  3309. A_UINT32 num_total_peers;
  3310. /*
  3311. * Number of extra peers that Firmware adds.
  3312. * These are self peers and/or other FW only peers that don't represent
  3313. * a 802.11 transceiver, but instead are used for convenience, e.g. to
  3314. * provide a pseudo-peer object for an AP vdev's bcast/mcast tx queues,
  3315. * to allow each tx queue to belong to a peer object.
  3316. * Peer ID can be up to num_total_peers + num_extra_peers.
  3317. */
  3318. A_UINT32 num_extra_peers;
  3319. /*
  3320. * max_ast_index - max AST index that Firmware can generate
  3321. * max_ast_index = (ast_table_size-1), ast_table_size is dynamically chosen
  3322. * based on num_peers configuration from Host. Hence Host needs to know the
  3323. * max_ast_index that Firmware can generate.
  3324. * A 0x0 value for max_ast_index means the target has not specified a limit.
  3325. */
  3326. A_UINT32 max_ast_index;
  3327. /* pktlog_defs_checksum:
  3328. * checksum computed from the definitions of the enums and structs
  3329. * used within pktlog traces.
  3330. * This pktlog defs checksum needs to be embedded into pktlog trace files
  3331. * (specifically in ath_pktlog_bufhdr.version).
  3332. *
  3333. * If pktlog_defs_checksum is zero then it is invalid; it should be ignored
  3334. * and ath_pktlog_bufhdr.magic_num needs to be PKTLOG_MAGIC_NUM_LEGACY
  3335. * (i.e. 7735225).
  3336. *
  3337. * If pktlog_defs_checksum is non-zero then it is valid, and the host
  3338. * should put it into the pktlog trace file header and set
  3339. * ath_pktlog_bufhdr.magic_num as PKTLOG_MAGIC_NUM_VERSION_IS_CHECKSUM
  3340. * (i.e. 2453506), to indicate that the file header version field contains
  3341. * a checksum.
  3342. */
  3343. A_UINT32 pktlog_defs_checksum;
  3344. /*
  3345. * max_onchip_ast_index - max AST index that Firmware can generate
  3346. * max_onchip_ast_index = (ast_table_size-1), where ast_table_size is
  3347. * dynamically chosen based on num_peers configuration from Host.
  3348. * Hence Host needs to know the max_onchip_ast_index that Firmware can
  3349. * generate.
  3350. * A 0x0 value for max_onchip_ast_index means the target has not specified
  3351. * a limit.
  3352. */
  3353. A_UINT32 max_onchip_ast_index;
  3354. /*
  3355. * The maximum number of LinkView peers can be supported onsite of target,
  3356. * based on proposed by the host configuration,
  3357. * total number of available resources, configured peers number,
  3358. * number of MSDUQs per LinkView peer's TID.
  3359. * Target can reduce proposed by WMI_INIT_CMDID number, depending on
  3360. * the target's resources availability.
  3361. */
  3362. A_UINT32 num_of_linkview_peers;
  3363. /* Total number of "real" max_active_vdevs that FW supports. */
  3364. A_UINT32 num_max_active_vdevs;
  3365. /*
  3366. * This fixed_param TLV is followed by these additional TLVs:
  3367. * mac_addr_list[num_extra_mac_addr];
  3368. */
  3369. } wmi_ready_event_fixed_param;
  3370. typedef struct {
  3371. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
  3372. /**
  3373. * @brief num_vdev - number of virtual devices (VAPs) to support
  3374. */
  3375. A_UINT32 num_vdevs;
  3376. /**
  3377. * @brief num_peers - number of peer nodes to support
  3378. */
  3379. A_UINT32 num_peers;
  3380. /*
  3381. * @brief In offload mode target supports features like WOW, chatter and other
  3382. * protocol offloads. In order to support them some functionalities like
  3383. * reorder buffering, PN checking need to be done in target. This determines
  3384. * maximum number of peers supported by target in offload mode
  3385. */
  3386. A_UINT32 num_offload_peers;
  3387. /* @brief Number of reorder buffers available for doing target based reorder
  3388. * Rx reorder buffering
  3389. */
  3390. A_UINT32 num_offload_reorder_buffs;
  3391. /**
  3392. * @brief num_peer_keys - number of keys per peer
  3393. */
  3394. A_UINT32 num_peer_keys;
  3395. /**
  3396. * @brief num_peer_tids - number of TIDs to provide storage for per peer.
  3397. */
  3398. A_UINT32 num_tids;
  3399. /**
  3400. * @brief ast_skid_limit - max skid for resolving hash collisions
  3401. * @details
  3402. * The address search table is sparse, so that if two MAC addresses
  3403. * result in the same hash value, the second of these conflicting
  3404. * entries can slide to the next index in the address search table,
  3405. * and use it, if it is unoccupied. This ast_skid_limit parameter
  3406. * specifies the upper bound on how many subsequent indices to search
  3407. * over to find an unoccupied space.
  3408. */
  3409. A_UINT32 ast_skid_limit;
  3410. /**
  3411. * @brief tx_chain_mask - the nominal chain mask for transmit
  3412. * @details
  3413. * The chain mask may be modified dynamically, e.g. to operate AP tx with
  3414. * a reduced number of chains if no clients are associated.
  3415. * This configuration parameter specifies the nominal chain-mask that
  3416. * should be used when not operating with a reduced set of tx chains.
  3417. */
  3418. A_UINT32 tx_chain_mask;
  3419. /**
  3420. * @brief rx_chain_mask - the nominal chain mask for receive
  3421. * @details
  3422. * The chain mask may be modified dynamically, e.g. for a client to use
  3423. * a reduced number of chains for receive if the traffic to the client
  3424. * is low enough that it doesn't require downlink MIMO or antenna
  3425. * diversity.
  3426. * This configuration parameter specifies the nominal chain-mask that
  3427. * should be used when not operating with a reduced set of rx chains.
  3428. */
  3429. A_UINT32 rx_chain_mask;
  3430. /**
  3431. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  3432. * @details
  3433. * Each WMM access class (voice, video, best-effort, background) will
  3434. * have its own timeout value to dictate how long to wait for missing
  3435. * rx MPDUs to arrive before flushing subsequent MPDUs that have already
  3436. * been received.
  3437. * This parameter specifies the timeout in milliseconds for each class .
  3438. * NOTE: the number of class (defined as 4) cannot be
  3439. * changed in the future without breaking WMI compatibility.
  3440. */
  3441. A_UINT32 rx_timeout_pri[4];
  3442. /**
  3443. * @brief rx_decap mode - what mode the rx should decap packets to
  3444. * @details
  3445. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  3446. * THis setting also determines the default TX behavior, however TX
  3447. * behavior can be modified on a per VAP basis during VAP init
  3448. */
  3449. A_UINT32 rx_decap_mode;
  3450. /**
  3451. * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
  3452. */
  3453. A_UINT32 scan_max_pending_req;
  3454. /**
  3455. * @brief maximum VDEV that could use BMISS offload
  3456. */
  3457. A_UINT32 bmiss_offload_max_vdev;
  3458. /**
  3459. * @brief maximum VDEV that could use offload roaming
  3460. */
  3461. A_UINT32 roam_offload_max_vdev;
  3462. /**
  3463. * @brief maximum AP profiles that would push to offload roaming
  3464. */
  3465. A_UINT32 roam_offload_max_ap_profiles;
  3466. /**
  3467. * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
  3468. * @details
  3469. * The target's WAL maintains a table to hold information regarding which
  3470. * peers belong to a given multicast group, so that if multicast->unicast
  3471. * conversion is enabled, the target can convert multicast tx frames to a
  3472. * series of unicast tx frames, to each peer within the multicast group.
  3473. * This num_mcast_groups configuration parameter tells the target how
  3474. * many multicast groups to provide storage for within its multicast
  3475. * group membership table.
  3476. */
  3477. A_UINT32 num_mcast_groups;
  3478. /**
  3479. * @brief num_mcast_table_elems - size to alloc for the mcast membership table
  3480. * @details
  3481. * This num_mcast_table_elems configuration parameter tells the target
  3482. * how many peer elements it needs to provide storage for in its
  3483. * multicast group membership table.
  3484. * These multicast group membership table elements are shared by the
  3485. * multicast groups stored within the table.
  3486. */
  3487. A_UINT32 num_mcast_table_elems;
  3488. /**
  3489. * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
  3490. * @details
  3491. * This configuration parameter specifies whether the target should
  3492. * perform multicast --> unicast conversion on transmit, and if so,
  3493. * what to do if it finds no entries in its multicast group membership
  3494. * table for the multicast IP address in the tx frame.
  3495. * Configuration value:
  3496. * 0 -> Do not perform multicast to unicast conversion.
  3497. * 1 -> Convert multicast frames to unicast, if the IP multicast address
  3498. * from the tx frame is found in the multicast group membership
  3499. * table. If the IP multicast address is not found, drop the frame.
  3500. * 2 -> Convert multicast frames to unicast, if the IP multicast address
  3501. * from the tx frame is found in the multicast group membership
  3502. * table. If the IP multicast address is not found, transmit the
  3503. * frame as multicast.
  3504. */
  3505. A_UINT32 mcast2ucast_mode;
  3506. /**
  3507. * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
  3508. * @details
  3509. * This parameter controls how much memory the target will allocate to
  3510. * store a log of tx PPDU meta-information (how large the PPDU was,
  3511. * when it was sent, whether it was successful, etc.)
  3512. */
  3513. A_UINT32 tx_dbg_log_size;
  3514. /**
  3515. * @brief num_wds_entries - how many AST entries to be allocated for WDS
  3516. */
  3517. A_UINT32 num_wds_entries;
  3518. /**
  3519. * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
  3520. * this limit can be 0 -default, 1 256B
  3521. */
  3522. A_UINT32 dma_burst_size;
  3523. /**
  3524. * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
  3525. * to account for interface latency to avoid underrun.
  3526. */
  3527. A_UINT32 mac_aggr_delim;
  3528. /**
  3529. * @brief rx_skip_defrag_timeout_dup_detection_check
  3530. * @details
  3531. * determine whether target is responsible for detecting duplicate
  3532. * non-aggregate MPDU and timing out stale fragments.
  3533. *
  3534. * A-MPDU reordering is always performed on the target.
  3535. *
  3536. * 0: target responsible for frag timeout and dup checking
  3537. * 1: host responsible for frag timeout and dup checking
  3538. */
  3539. A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
  3540. /**
  3541. * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
  3542. * and Max no of descriptors for each Video link (node).
  3543. */
  3544. A_UINT32 vow_config;
  3545. /**
  3546. * @brief maximum VDEV that could use GTK offload
  3547. */
  3548. A_UINT32 gtk_offload_max_vdev;
  3549. /**
  3550. * @brief num_msdu_desc - Number of msdu descriptors target should use
  3551. */
  3552. A_UINT32 num_msdu_desc; /* Number of msdu desc */
  3553. /**
  3554. * @brief max_frag_entry - Max. number of Tx fragments per MSDU
  3555. * @details
  3556. * This parameter controls the max number of Tx fragments per MSDU.
  3557. * This is sent by the target as part of the WMI_SERVICE_READY event
  3558. * and is overridden by the OS shim as required.
  3559. */
  3560. A_UINT32 max_frag_entries;
  3561. /**
  3562. * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
  3563. * @brief num_msdu_desc - Number of vdev that can support beacon offload
  3564. */
  3565. A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
  3566. /**
  3567. * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
  3568. * @details
  3569. * Each TDLS enabled vdev can track outgoing transmits/RSSI/rates to/of
  3570. * peers in a connection tracking table for possible TDLS link creation
  3571. * or deletion. This controls the number of tracked peers per vdev.
  3572. */
  3573. A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
  3574. /**
  3575. * @brief beacon_tx_offload_max_vdev - Number of maximum beaconing vaps at any time.
  3576. */
  3577. A_UINT32 beacon_tx_offload_max_vdev;
  3578. A_UINT32 num_multicast_filter_entries;
  3579. A_UINT32 num_wow_filters; /*host can configure the number of wow filters*/
  3580. /**
  3581. * @brief num_keep_alive_pattern - Num of keep alive patterns configured
  3582. * from host.
  3583. */
  3584. A_UINT32 num_keep_alive_pattern;
  3585. /**
  3586. * @brief keep_alive_pattern_size - keep alive pattern size.
  3587. */
  3588. A_UINT32 keep_alive_pattern_size;
  3589. /**
  3590. * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
  3591. * @details
  3592. * Each TDLS STA can become a sleep STA independently. This parameter
  3593. * mentions how many such sleep STAs can be supported concurrently.
  3594. */
  3595. A_UINT32 max_tdls_concurrent_sleep_sta;
  3596. /**
  3597. * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
  3598. * @details
  3599. * Each TDLS STA can become a buffer STA independently. This parameter
  3600. * mentions how many such buffer STAs can be supported concurrently.
  3601. */
  3602. A_UINT32 max_tdls_concurrent_buffer_sta;
  3603. /**
  3604. * @brief wmi_send_separate - host configures fw to send the wmi separately
  3605. */
  3606. A_UINT32 wmi_send_separate;
  3607. /**
  3608. * @brief num_ocb_vdevs - Number of vdevs used for OCB support
  3609. */
  3610. A_UINT32 num_ocb_vdevs;
  3611. /**
  3612. * @brief num_ocb_channels - The supported number of simultaneous OCB channels
  3613. */
  3614. A_UINT32 num_ocb_channels;
  3615. /**
  3616. * @brief num_ocb_schedules - The supported number of OCB schedule segments
  3617. */
  3618. A_UINT32 num_ocb_schedules;
  3619. /**
  3620. * @brief specific configuration from host, such as per platform configuration
  3621. */
  3622. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
  3623. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
  3624. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
  3625. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
  3626. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
  3627. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
  3628. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
  3629. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
  3630. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
  3631. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
  3632. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
  3633. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
  3634. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
  3635. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
  3636. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
  3637. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
  3638. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
  3639. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
  3640. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
  3641. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
  3642. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_S 10
  3643. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_M 0x400
  3644. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_S 11
  3645. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_M 0x800
  3646. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_S 12
  3647. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_M 0x1000
  3648. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_S 13
  3649. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_M 0x2000
  3650. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_S 14
  3651. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_M 0x4000
  3652. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_S 15
  3653. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_M 0x8000
  3654. /*
  3655. * If the AC override valid bit is set then this field will specify the
  3656. * access category to use for EAPOL frames
  3657. * 0 - WMM_AC_BE
  3658. * 1 - WMM_AC_BK
  3659. * 2 - WMM_AC_VI
  3660. * 3 - WMM_AC_VO
  3661. */
  3662. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_S 16
  3663. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_M 0x30000
  3664. /*
  3665. * If TX_ACK_RSSI is set, then the target should populate the ack_rssi
  3666. * field within the WMI_MGMT_TX_COMPLETION_EVENT message, the ack_rssi
  3667. * TLV within the WMI_MGMT_TX_BUNDLE_COMPLETION_EVENT message, and the
  3668. * "MSDU ACK RSSI" array within the HTT_T2H TX_COMPL_IND message.
  3669. */
  3670. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_S 18
  3671. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_M 0x40000
  3672. /*
  3673. * If HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN is set, the host will not
  3674. * include the HTC header length in the payload length for all HTT_H2T
  3675. * messages.
  3676. * Otherwise, only when sending HTT_H2T_MSG_TYPE_TX_FRM message,
  3677. * payload length includes HTC header length. Other HTT_H2T messages'
  3678. * payload length does not include HTC header length.
  3679. * The host will only set this HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN flag
  3680. * if the target has set the WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN
  3681. * flag to indicate its support for this option.
  3682. */
  3683. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_S 19
  3684. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_M 0x80000
  3685. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_S 20
  3686. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_M 0x100000
  3687. /*
  3688. * If this HTT_PEER_STATS is set, then the target should use the
  3689. * the HTT_T2H_MSG_TYPE_PEER_STATS_IND message to upload peer stats;
  3690. * else the target should avoid sending the PEER_STATS_IND message.
  3691. */
  3692. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_S 21
  3693. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_M 0x200000
  3694. /*
  3695. * If this BIT is set, then the target should use peer_tid_ext to analyze
  3696. * per peer per tid extended configurations
  3697. */
  3698. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_S 22
  3699. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_M 0x400000
  3700. /*
  3701. * If the VIDEO_OVER_WIFI_ENABLE flag is set, the target will use a
  3702. * series of algorithmic adjustments to optimize Video performance
  3703. * by reducing latency, reducing latency jitter, and minimizing
  3704. * dropped packets.
  3705. */
  3706. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_S 23
  3707. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_M 0x800000
  3708. /*
  3709. * If the THREE_WAY_COEX_CONFIG_LEGACY flag is set, the target will use
  3710. * the configuration parameters given by Host driver to WLAN FW and
  3711. * apply them along with the existing CoEx Weights Override logic to
  3712. * prioritize the WLAN-BT-Zigbee packets accordingly.
  3713. *
  3714. * The host shall only set the THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT
  3715. * RSRC_CFG flag if the target has set the WMI_SERVICE
  3716. * THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT flag.
  3717. *
  3718. * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
  3719. */
  3720. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_S 24
  3721. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_M 0x1000000
  3722. /*
  3723. * If the THREE_WAY_COEX_CONFIG_OVERRIDE flag is set, the target will use
  3724. * the configuration parameters given by Host driver to WLAN FW and
  3725. * apply them by OVERRIDing the existing CoEx Weights Override logic to
  3726. * prioritize the WLAN-BT-Zigbee packets accordingly.
  3727. *
  3728. * The host shall only set the THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT
  3729. * RSRC_CFG flag if the target has set the WMI_SERVICE
  3730. * THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT flag.
  3731. *
  3732. * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
  3733. */
  3734. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_S 25
  3735. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_M 0x2000000
  3736. /*
  3737. * If the TX_COMPLETION_TX_TSF64 flag is set, the target should
  3738. * populate the htt_tx_compl_ind_append_tx_tsf64 array within the
  3739. * HTT_T2H TX_COMPL_IND message.
  3740. */
  3741. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_S 26
  3742. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_M 0x4000000
  3743. /*
  3744. * If this BIT is set, then the target should support Packet capture(SMART MU FR)
  3745. */
  3746. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_S 27
  3747. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_M 0x8000000
  3748. /*
  3749. * If this BIT is set, then target should support BSS Max Idle period.
  3750. */
  3751. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_S 28
  3752. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_M 0x10000000
  3753. /*
  3754. * If this bit is set, then target should use the audio sync feature.
  3755. * Host should only set this bit if the target has indicated via the
  3756. * WMI_SERVICE_AUDIO_SYNC_SUPPORT flag that it supports audio sync.
  3757. */
  3758. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_S 29
  3759. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_M 0x20000000
  3760. /*
  3761. * If this BIT is set, then the target should disable IPA
  3762. */
  3763. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_S 30
  3764. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_M 0x40000000
  3765. /*
  3766. * If this bit is set, target should use the PCIe GEN switching feature.
  3767. */
  3768. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_S 31
  3769. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_M 0x80000000
  3770. A_UINT32 flag1;
  3771. /** @brief smart_ant_cap - Smart Antenna capabilities information
  3772. * @details
  3773. * 1 - Smart antenna is enabled.
  3774. * 0 - Smart antenna is disabled.
  3775. * In future this can contain smart antenna specific capabilities.
  3776. */
  3777. A_UINT32 smart_ant_cap;
  3778. /**
  3779. * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
  3780. * during init
  3781. */
  3782. A_UINT32 BK_Minfree;
  3783. A_UINT32 BE_Minfree;
  3784. A_UINT32 VI_Minfree;
  3785. A_UINT32 VO_Minfree;
  3786. /**
  3787. * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
  3788. * descriptor memory allocation.
  3789. * 1 - Allocate fragment descriptor memory for data packet in firmware.
  3790. * If host wants to transmit data packet at its desired rate,
  3791. * this field must be set.
  3792. * 0 - Don't allocate fragment descriptor for data packet.
  3793. */
  3794. A_UINT32 alloc_frag_desc_for_data_pkt;
  3795. /** how much space to allocate for NDP NS (neighbor solicitation) specs */
  3796. A_UINT32 num_ns_ext_tuples_cfg;
  3797. /**
  3798. * size (in bytes) of the buffer the FW shall allocate per vdev
  3799. * firmware can dynamic allocate memory (or disable)
  3800. * packet filtering feature.
  3801. * 0 - fw chooses its default value
  3802. * -1 (0XFFFFFFFF) - disable APF
  3803. */
  3804. A_UINT32 bpf_instruction_size;
  3805. /**
  3806. * Maximum no of BSSID based RX filters host would program
  3807. * Value 0 means host doesn't given any limit to FW.
  3808. */
  3809. A_UINT32 max_bssid_rx_filters;
  3810. /**
  3811. * Use PDEV ID instead of MAC ID, added for backward compatibility with older host
  3812. * which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
  3813. */
  3814. A_UINT32 use_pdev_id;
  3815. /** Maximum number of scan clients whose DBS scan duty cycle can be configured */
  3816. A_UINT32 max_num_dbs_scan_duty_cycle;
  3817. /** Maximum number of Multi group key to support */
  3818. A_UINT32 max_num_group_keys;
  3819. union {
  3820. A_UINT32 peer_map_unmap_v2_support; /* old name */
  3821. /**
  3822. * HTT peer map/unmap format support (map 4bits and unmap 4bits)
  3823. * 0x00 -> host use default map/unmap only.
  3824. * 0x01 -> legacy value that is interpreted the same as 0x22.
  3825. * 0x22 -> host supports HTT peer map/unmap v2 format; the target is
  3826. * allowed but not required to use peer map/unmap v2 format.
  3827. * 0x32 -> host supports HTT peer map v3 format; the target is
  3828. * allowed but not required to use peer map v3 format and
  3829. * peer unmap v2 format.
  3830. */
  3831. A_UINT32 peer_map_unmap_versions;
  3832. };
  3833. /** Sched config params for all pdevs
  3834. * These tx scheduling configuration parameters are currently only
  3835. * used for internal testing purposes; therefore the non-default
  3836. * values for this field are not currently documented.
  3837. * For regular use, this field should be set to 0x0.
  3838. */
  3839. A_UINT32 sched_params;
  3840. /* Number of MAC on which AP TWT feature is supported */
  3841. A_UINT32 twt_ap_pdev_count;
  3842. /* Max no of STA with which TWT sessions can be formed by the AP */
  3843. A_UINT32 twt_ap_sta_count;
  3844. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  3845. * This parameter provides the final specification for the maximum number
  3846. * of SSIDs for the target to support for Network List Offload's scanning
  3847. * for preferred networks.
  3848. * This wmi_resource_config.max_nlo_ssids must be <= the max_nlo_ssids
  3849. * field from the target's WMI_SERVICE_READY_EXT_EVENT message.
  3850. * (If the target didn't provide a max_nlo_ssids field in the
  3851. * WMI_SERVICE_READY_EXT message, or if the SERVICE_READY_EXT msg's
  3852. * max_nlo_ssids value was 0x0, the target doesn't support dynamic
  3853. * negotiation of max NLO SSIDs, and WMI_NLO_MAX_SSIDS (=16) applies.)
  3854. * If this wmi_resource_config.max_nlo_ssids field is absent or 0x0,
  3855. * the host does not support dynamic negotiation of max NLO SSIDs.
  3856. * In such a case, the target will respond as follows:
  3857. * If the target supports at least WMI_NLO_MAX_SSIDS, the target will
  3858. * use the statically-configured WMI_NLO_MAX_SSIDS value.
  3859. * If the target supports less than WMI_NLO_MAX_SSIDS, the target will
  3860. * abort its boot-up, due to receiving an invalid/unsupported
  3861. * configuration specification.
  3862. */
  3863. A_UINT32 max_nlo_ssids;
  3864. /**
  3865. * num_packet_filters: the num that host requests fw to support for
  3866. * pktfilter in total, then firmware can dynamic allocate
  3867. * memory(or disable) pktfilter feature.
  3868. *
  3869. * 0 - fw chooses its default value.
  3870. * -1(0XFFFFFFFF)- disable pktfilter.
  3871. */
  3872. A_UINT32 num_packet_filters;
  3873. /**
  3874. * num_max_sta_vdevs: the max num for the sta vdevs
  3875. * fw will use it to config the memory of offload features that
  3876. * are only for sta vdevs.
  3877. * p2p client should be included.
  3878. *
  3879. * 0 - fw chooses its default value: 'num_vdevs' of this structure.
  3880. */
  3881. A_UINT32 num_max_sta_vdevs;
  3882. /* ref to section 8.4.2.48 Multiple BSSID element
  3883. * The Max BSSID Indicator field contains a value assigned to n,
  3884. * where 2^n is the maximum number of BSSIDs
  3885. */
  3886. A_UINT32 max_bssid_indicator;
  3887. /** @brief ul_resp_config - Configures the 11ax uplink ofdma feature on STA.
  3888. * I.e. sending uplink response to a trigger frame sent by AP.
  3889. * @details
  3890. * 0 - fw default behavior, based on chipset
  3891. * 1 - UL_RESP is disabled.
  3892. * 2 - UL_RESP is enabled.
  3893. * other - reserved.
  3894. */
  3895. A_UINT32 ul_resp_config;
  3896. /* msdu_flow_override_config0 - contains AST enable bitmask
  3897. * AST0 is unconditionally enabled, unless the MSDU flow override feature
  3898. * is entirely disabled.
  3899. * AST1 through AST3 are conditionally enabled, based on bits 0-2 in
  3900. * msdu_flow_override_config0.
  3901. * If all three bits are 0, no msdu flow override feature at all in FW.
  3902. *
  3903. * The WMI_MSDU_FLOW_AST_ENABLE_GET and WMI_MSDU_FLOW_AST_ENABLE_SET
  3904. * macros are used to read and write these bitfields.
  3905. */
  3906. A_UINT32 msdu_flow_override_config0;
  3907. /* msdu_flow_override_config1:
  3908. * Bits 3:0 - AST0_FLOW_MASK(4)
  3909. * Bits 7:4 - AST1_FLOW_MASK(4)
  3910. * Bits 11:8 - AST2_FLOW_MASK(4)
  3911. * Bits 15:12 - AST3_FLOW_MASK(4)
  3912. * Bits 23:16 - TID_VALID_HI_PRI (8)
  3913. * Bits 31:24 - TID_VALID_LOW_PRI (8)
  3914. *
  3915. * The macros
  3916. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET
  3917. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET
  3918. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET
  3919. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET
  3920. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET
  3921. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET
  3922. * are used to read and write these bitfields.
  3923. */
  3924. A_UINT32 msdu_flow_override_config1;
  3925. /** @brief flags2 - contains flags used for the following purposes:
  3926. * Configure 11ax uplink ofdma/MU-MIMO feature in FW, when chipsets
  3927. * are brought up in Repeater/STA mode.
  3928. *
  3929. * @details
  3930. * Bits 3:0
  3931. * Enable UL MU-OFDMA/MIMO for PDEVs WIFI0, WIFI1, WIFI2
  3932. * This flags should only be set when a pdev has STA VAP
  3933. * in repeater/self-organizing-network modes.
  3934. * E.g. to enable UL RESP for 5G and 2G radios, value shall be
  3935. * 0b00000000000000000000000000000011 = 0x3.
  3936. * Host shall use UCI config for a radio to populate this value,
  3937. * each radio entry shall have "config re_ul_resp 1" value set.
  3938. * Hence this can be configured dynamically.
  3939. *
  3940. * Refer to the below WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_GET/SET
  3941. * macros.
  3942. * Bits 5:4
  3943. * HTT rx peer metadata version number that host supports.
  3944. * Firmware initially sends the target supported version number
  3945. * as part of service_ready_ext2 message.
  3946. * Host can ack the version number that it is using as part of
  3947. * this message.
  3948. * 0-> legacy case
  3949. * 1-> MLO support
  3950. * 2-3-> Reserved
  3951. * Refer to the WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION macros.
  3952. * Bit 6 - is_sap_connected_d3wow_enabled
  3953. * Enable D3WoW for SAP w/ clients connected
  3954. * 0-> disable the feature
  3955. * 1-> enable the feature
  3956. * Refer to the WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED
  3957. * GET/SET macros.
  3958. * Bit 7 - is_go_connected_d3wow_enabled
  3959. * Enable D3WoW for GO w/ clients connected
  3960. * 0-> disable the feature
  3961. * 1-> enable the feature
  3962. * Refer to the WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED
  3963. * GET/SET macros.
  3964. * Bit 8 - enable_dynamic_pcie_gen_speed_switch
  3965. * enable dynamic pcie gen speed switch
  3966. * 0-> disable the feature
  3967. * 1-> enable the feature
  3968. * Refer to the WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED
  3969. * GET/SET macros.
  3970. * Bit 9 - calc_next_dtim_count
  3971. * 0 -> disable calculation of DTIM count for MBSSID_NON_TX_VAP
  3972. * 1 -> Used by some hosts to indicate calculation of DTIM count
  3973. * for MBSSID_NON_TX_VAP
  3974. * Refer to WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_GET/SET macros.
  3975. *
  3976. * Bit 10 - arp_ac_override_valid
  3977. * 0 -> arp_ac_override field is invalid
  3978. * 1 -> arp_ac_override field is valid
  3979. * Refer to WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_GET/SET macros.
  3980. * Bit 12:11 - arp_ac_override
  3981. * If the AC override valid bit is set then this field will specify the
  3982. * access category to use for ARP frames
  3983. * 0 - WMM_AC_BE
  3984. * 1 - WMM_AC_BK
  3985. * 2 - WMM_AC_VI
  3986. * 3 - WMM_AC_VO
  3987. * Refer to WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_GET/SET macros.
  3988. * Bit 13 - sawf_sched
  3989. * SAWF feature flag for scheduler
  3990. * 0 -> disable SAWF based scheduling
  3991. * 1 -> enable SAWF based scheduling
  3992. * Refer to WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_GET/SET macros.
  3993. * Bit 14 - notify_frame_support
  3994. * Flag to enable notify_frame_support from host.
  3995. * 0 -> disable notify_frame_support feature
  3996. * 1 -> enable_notify_frame_support feature
  3997. * Refer to WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_GET/SET
  3998. * macros.
  3999. * Bit 15 - disable_wds_mec_intrabss
  4000. * Flag to disable wds learning, MEC, intrabss offload.
  4001. * By default, it is enabled.
  4002. * 0 -> enable wds_mec_intrabss offload
  4003. * 1 -> disable wds_mec_intrabss offload
  4004. * Refer to WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_GET /
  4005. * SET macros.
  4006. * Bit 16 - latency_flowq_support
  4007. * Flag to indicate whether host supports latency tolerant queue.
  4008. * By default, it is disabled.
  4009. * 0 -> disable latency_flowq_support
  4010. * 1 -> enable latency_flowq_support
  4011. * Refer to WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_GET/SET macros.
  4012. * Bit 17 - rf_path_mode
  4013. * Flag to indicate overlapping_freq_mode
  4014. * By default, it will be primary mode (0)
  4015. * 0 - Primary
  4016. * 1 - Secondary
  4017. * Refer to WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_GET/SET macros.
  4018. * Bit 18 - disable_wds_peer_map_unmap_event
  4019. * Flag to indicate whether the WDS peer map/unmap event should be
  4020. * processed or ignored.
  4021. * 0 - leave the WDS peer map/unmap event enabled
  4022. * 1 - disable the WDS peer map/unmap event
  4023. * This flag shall only be set if the target has set the
  4024. * WMI_SERVICE_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_SUPPORT flag.
  4025. * Refer to WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_GET
  4026. * and _SET macros.
  4027. * Bit 19 - show whether the host supports 128 or 256 service classes
  4028. * This bit will be set when host supports for 256 service classes
  4029. * 0 -> host supports 128 service classes
  4030. * 1 -> host supports 255 [0-254] valid service classes,
  4031. * and 255 indicates an invalid service class
  4032. * Refer to WMI_RSRC_CFG_FLAGS2_SAWF_255_SVC_CLASS_SUPPORT_GET/SET
  4033. * macros.
  4034. * Bit 20 - enable feature EPM (Enhanced Power Management)
  4035. * 0 -> disable the feature
  4036. * 1 -> enable the feature
  4037. * Refer to the below WMI_RSRC_CFG_FLAGS2_EPM_GET/SET macros.
  4038. * Bit 21 - enable new MGMT SRNG for beacons and probe responses.
  4039. * 0 -> disable the feature
  4040. * 1 -> enable the feature
  4041. * Refer to the below WMI_RSRC_CFG_FLAGS2_IS_MGMT_SRNG_ENABLED_GET/SET
  4042. * macros.
  4043. * Bit 22 - enable 4address WDS support
  4044. * 0 -> disable the feature
  4045. * 1 -> enable the feature
  4046. * Refer to below WMI_RSRC_CFG_FLAGS2_ENABLE_WDS_NULL_FRAME_SUPPORT
  4047. *
  4048. * Bits 31:23 - Reserved
  4049. */
  4050. A_UINT32 flags2;
  4051. /** @brief host_service_flags - can be used by Host to indicate
  4052. * services that host can support.
  4053. *
  4054. * @details
  4055. * Bit 0
  4056. * The bit will be set when Host HDD supports separate iface creation
  4057. * for NAN. More specifically Host can support creation of NAN vdev
  4058. * in firmware.
  4059. *
  4060. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_GET/SET
  4061. * macros defined below.
  4062. * Bit 1
  4063. * The bit will be set when HOST is capable of processing multiple
  4064. * radio events per radio. More specifically whenever Firmware is
  4065. * sending multiple radio events (WMI_RADIO_LINK_STATS_EVENTID
  4066. * = 0x16004) for a single radio,
  4067. * Through this flag Firmware will know that HOST is able to support
  4068. * delivery of RADIO_LINK_STATS across multiple event messages,
  4069. * and Firmware can send multiple radio events.
  4070. *
  4071. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_GET/SET
  4072. * macros defined below.
  4073. * Bit 2
  4074. * This bit will be set when host is able to handle split AST feature.
  4075. * Refer to the below definitions of the
  4076. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_GET
  4077. * and _SET macros.
  4078. * Bit 3
  4079. * This bit will be set when host is able to enable EAPOL offload to
  4080. * FW for SAE roaming feature.
  4081. * Refer to the below definitions of the
  4082. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_GET
  4083. * and _SET macros.
  4084. * Bit 4
  4085. * This bit will be set when host is able to process the
  4086. * WMI_REG_CC_EXT_EVENT.
  4087. * Refer to the below definitions of the
  4088. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_GET
  4089. * and _SET macros.
  4090. * Bit 5
  4091. * This bit will be set when the host supports NAN channels.
  4092. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_GET/SET
  4093. * Bit 6
  4094. * This bit will be set when the host supports synchronous TWT events.
  4095. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_GET
  4096. * and _SET.
  4097. * Bit 7
  4098. * This bit will be set when host supports both LPI and SP mode.
  4099. * when this bit is set to 0 - Indicate LPI only mode
  4100. * when set to 1 - Indicate both SP mode and LPI mode
  4101. * both are supported
  4102. * Refer to the below definitions of the
  4103. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_GET
  4104. * and _SET macros.
  4105. * Bit 8
  4106. * This bit will be set when host wants to disable timer check in
  4107. * reg for AFC.
  4108. * when set to 1 - Disable timer check
  4109. * Refer to the below definitions of the
  4110. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_TIMER_CHECK_GET
  4111. * and _SET macros.
  4112. * Bit 9
  4113. * This bit will be set when host host wants to disable request id
  4114. * check in reg for AFC.
  4115. * when set to 1 - Disable Request ID check
  4116. * Refer to the below definitions of the
  4117. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_REQ_ID_CHECK_GET
  4118. * and _SET macros.
  4119. * Bit 10
  4120. * This bit will be set when host wants to enable indoor for AFC
  4121. * when this bit is set to 0 indoor mode not enabled
  4122. * when this bit is set to 1 indoor mode is enabled
  4123. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_GET
  4124. * and SET macros
  4125. * Bit 11
  4126. * This bit will be set when host wants to enable outdoor for AFC
  4127. * when this bit is set to 0 outdoor mode not enabled
  4128. * when this bit is set to 1 outdoor mode is enabled
  4129. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_GET
  4130. * and SET macros.
  4131. * Bit 12
  4132. * This bit will be set when host host wants to enable/disable
  4133. * REO QREF feature
  4134. * when set to 1 - Enable the REO QREF feature
  4135. * when set to 0 - Disable the REO QREF feature
  4136. * Refer to the below definitions of the
  4137. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_GET
  4138. * and _SET macros.
  4139. * Bit 13
  4140. * This bit will be set when host host wants to enable/disable
  4141. * bang radar 320M support feature
  4142. * when set to 1 - Enable the bang radar 320M support
  4143. * when set to 0 - Disable the bang radar 320M support
  4144. * Refer to the below definitions of the
  4145. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_GET
  4146. * and _SET macros.
  4147. * Bit 14
  4148. * This bit will be set when host wants to enable/disable
  4149. * full BW NOL feature.
  4150. * When set to 1: Enable full BW NOL feature.
  4151. * When set to 0: Disable the full BW NOL feature.
  4152. * Refer to the below definitions of the
  4153. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_GET
  4154. * and _SET macros.
  4155. * Bit 15
  4156. * This bit will be set if the host has smem_mailbox support enabled.
  4157. * Refer to the below definitions of the
  4158. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET
  4159. * and _SET macros.
  4160. * Bit 16
  4161. * ML FULL monitor mode
  4162. * This bit will be set by host to enable ML_FULL_MONITOR_MODE
  4163. * Refer to the below definitions of the
  4164. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_GET
  4165. * and _SET macros
  4166. * Bit 17
  4167. * This bit will set by host to inform FW that rx buffer refilling
  4168. * is supported by the host in Qdata feature (tx LCE consent pkt),
  4169. * So FW will start refilling the buffers.
  4170. * Refer to the below definitions of WMI_RSRC_CFG_HOST_SERVICE_FLAG
  4171. * OPT_DP_CTRL_REPLENISH_REFILL_RX_BUFFER_SUPPORT_GET and _SET macros.
  4172. * Bits 31:18 - Reserved
  4173. */
  4174. A_UINT32 host_service_flags;
  4175. /** @brief max_rnr_neighbours -
  4176. * The Maximum number of neighbour RNR's from other SoC.
  4177. * This limits the field @num_bss in @wmi_pdev_tbtt_offset_sync_cmd_fixed_param.
  4178. * Value of 0 means cross SoC TBTT offset synchronization not required and
  4179. * @PDEV_TBTT_OFFSET_SYNC_CMD wouldn't be used.
  4180. */
  4181. A_UINT32 max_rnr_neighbours;
  4182. /** @brief ema_max_vap_cnt - number of maximum EMA Tx vaps (VAPs having both
  4183. * VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set) at any instance
  4184. * of time across SOC. Legacy MBSS Vaps are not accounted in this field.
  4185. */
  4186. A_UINT32 ema_max_vap_cnt;
  4187. /** @brief ema_max_profile_period - maximum profile periodicity
  4188. * (maximum number of beacons after which VAP profiles repeat)
  4189. * for any EMA VAP on any pdev.
  4190. */
  4191. A_UINT32 ema_max_profile_period;
  4192. /** @brief max_ndp_sessions
  4193. * This is the max ndp sessions sent by the host which is the minimum
  4194. * of the value requested within the host's ini configurations and
  4195. * the max ndp sessions supported by the firmware (as reported in the
  4196. * SERVICE_READY_EXT2_EVENT message).
  4197. */
  4198. A_UINT32 max_ndp_sessions;
  4199. /** @brief max_ndi_supported
  4200. * This is the max ndi interfaces sent by the host based on the value
  4201. * specified by the host's ini configuration.
  4202. */
  4203. A_UINT32 max_ndi_interfaces;
  4204. /** @brief max_ap_vaps
  4205. * Maximum number of AP mode vdevs created at any time.
  4206. * This value is minimum of the number of AP vdevs supported by
  4207. * the target and host.
  4208. */
  4209. A_UINT32 max_ap_vaps;
  4210. /** @brief cbc_flow_ena
  4211. * When cbc_flow_ena is se, halphy will do Cold Boot Calibration flow.
  4212. * Otherwise, halphy will do normal flow.
  4213. */
  4214. A_UINT32 cbc_flow_ena;
  4215. /** @brief ema_init_config - can be used by Host to indicate beacon size
  4216. * @details
  4217. * Bit 0 : 15 - Size of beacon, currently it can be sent as
  4218. * 1500 or 2500 or 4000 bytes
  4219. * Bit 16 : 31 - Reserved
  4220. * In case of Backward compatibility, if this variable is 0 then
  4221. * default beacon size (1500) is used.
  4222. */
  4223. A_UINT32 ema_init_config;
  4224. /** @brief carrier_config
  4225. * Carrier profile configuration
  4226. * BIT 0 -> enable/disable charter configurations
  4227. * BIT 1 : 31 Reserved
  4228. */
  4229. A_UINT32 carrier_config;
  4230. /** @brief num_of_linkview_peers - proposed by the host value of
  4231. * the peers with the num_of_linkview_msduqs_per_tid allocation
  4232. * @details
  4233. * Host can request what the number of 'num_peers' should use
  4234. * num_of_linkview_msduqs_per_tid. All other peers will use
  4235. * default number of MSDUQs allocated.
  4236. */
  4237. A_UINT32 num_of_linkview_peers;
  4238. /** @brief num_of_linkview_msduqs_per_tid - proposed by the host value of
  4239. * MSDUQs per each LinkView peer's TID
  4240. * @details
  4241. * Host sends the number of MSDUQs per each LinkView peer's TID.
  4242. * This number will be used during resources allocation for
  4243. * LinkView peer in the target.
  4244. */
  4245. A_UINT32 num_of_linkview_msduqs_per_tid;
  4246. /**
  4247. * @brief num_max_active_vdevs -
  4248. * number of max active virtual devices (VAPs) to support
  4249. */
  4250. A_UINT32 num_max_active_vdevs;
  4251. /**
  4252. * @brief num_max_mlo_link_per_ml_bss
  4253. * number of max partner links of a ML BSS
  4254. */
  4255. A_UINT32 num_max_mlo_link_per_ml_bss;
  4256. /**
  4257. * @brief num_max_active_mlo_link_per_ml_bss
  4258. * number of max active partner links of a ML BSS
  4259. */
  4260. A_UINT32 num_max_active_mlo_link_per_ml_bss;
  4261. } wmi_resource_config;
  4262. #define WMI_MSDU_FLOW_AST_ENABLE_GET(msdu_flow_config0, ast_x) \
  4263. (((ast_x) == 0) ? 1 : ((msdu_flow_config0) & (1 << ((ast_x) - 1))))
  4264. #define WMI_MSDU_FLOW_AST_ENABLE_SET(msdu_flow_config0, ast_x, enable) \
  4265. do { \
  4266. if ((ast_x) == 0) break; \
  4267. if ((enable)) { \
  4268. (msdu_flow_config0) |= (1 << ((ast_x) - 1)); \
  4269. } else { \
  4270. (msdu_flow_config0) &= ~(1 << ((ast_x) - 1)); \
  4271. } \
  4272. } while(0)
  4273. #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x) \
  4274. (((msdu_flow_config1) & (0x0f << ((ast_x) * 4))) >> ((ast_x) * 4))
  4275. #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET( \
  4276. msdu_flow_config1, ast_x, mask) \
  4277. do { \
  4278. (msdu_flow_config1) &= ~(0xF << ((ast_x) * 4)); \
  4279. (msdu_flow_config1) |= ((mask) << ((ast_x) * 4)); \
  4280. } while(0)
  4281. #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1) \
  4282. (((msdu_flow_config1) & 0xff0000) >> 16)
  4283. #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask) \
  4284. do { \
  4285. (msdu_flow_config1) &= ~0xff0000; \
  4286. (msdu_flow_config1) |= ((mask) << 16); \
  4287. } while(0)
  4288. #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1) \
  4289. ((msdu_flow_config1 & 0xff000000) >> 24)
  4290. #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask) \
  4291. do { \
  4292. (msdu_flow_config1) &= ~0xff000000; \
  4293. (msdu_flow_config1) |= ((mask) << 24); \
  4294. } while(0)
  4295. #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
  4296. do { \
  4297. (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  4298. (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
  4299. WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  4300. } while (0)
  4301. #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
  4302. (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
  4303. WMI_RSRC_CFG_FLAG_ ## flag ## _S)
  4304. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
  4305. WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
  4306. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
  4307. WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
  4308. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
  4309. WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
  4310. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
  4311. WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
  4312. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
  4313. WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
  4314. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
  4315. WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
  4316. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
  4317. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
  4318. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
  4319. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
  4320. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
  4321. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
  4322. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
  4323. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
  4324. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
  4325. WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
  4326. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
  4327. WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
  4328. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
  4329. WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
  4330. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
  4331. WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
  4332. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
  4333. WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
  4334. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
  4335. WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
  4336. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
  4337. WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
  4338. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
  4339. WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
  4340. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
  4341. WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
  4342. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
  4343. WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
  4344. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_SET(word32, value) \
  4345. WMI_RSRC_CFG_FLAG_SET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT, (value))
  4346. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_GET(word32) \
  4347. WMI_RSRC_CFG_FLAG_GET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT)
  4348. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_SET(word32, value) \
  4349. WMI_RSRC_CFG_FLAG_SET((word32), TCL_CCE_DISABLE, (value))
  4350. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_GET(word32) \
  4351. WMI_RSRC_CFG_FLAG_GET((word32), TCL_CCE_DISABLE)
  4352. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_SET(word32, value) \
  4353. WMI_RSRC_CFG_FLAG_SET((word32), TIM_V2_SUPPORT_ENABLE, (value))
  4354. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_GET(word32) \
  4355. WMI_RSRC_CFG_FLAG_GET((word32), TIM_V2_SUPPORT_ENABLE)
  4356. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_SET(word32, value) \
  4357. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE, (value))
  4358. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_GET(word32) \
  4359. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE)
  4360. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_SET(word32, value) \
  4361. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE_VALID, (value))
  4362. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_GET(word32) \
  4363. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE_VALID)
  4364. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_SET(word32, value) \
  4365. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE, (value))
  4366. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_GET(word32) \
  4367. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE)
  4368. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_SET(word32, value) \
  4369. WMI_RSRC_CFG_FLAG_SET((word32), TX_ACK_RSSI, (value))
  4370. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_GET(word32) \
  4371. WMI_RSRC_CFG_FLAG_GET((word32), TX_ACK_RSSI)
  4372. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_SET(word32, value) \
  4373. WMI_RSRC_CFG_FLAG_SET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN, (value))
  4374. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_GET(word32) \
  4375. WMI_RSRC_CFG_FLAG_GET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN)
  4376. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_SET(word32, value) \
  4377. WMI_RSRC_CFG_FLAG_SET((word32), PEER_UNMAP_RESPONSE_SUPPORT, (value))
  4378. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_GET(word32) \
  4379. WMI_RSRC_CFG_FLAG_GET((word32), PEER_UNMAP_RESPONSE_SUPPORT)
  4380. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_SET(word32, value) \
  4381. WMI_RSRC_CFG_FLAG_SET((word32), HTT_PEER_STATS, (value))
  4382. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_GET(word32) \
  4383. WMI_RSRC_CFG_FLAG_GET((word32), HTT_PEER_STATS)
  4384. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_SET(word32, value) \
  4385. WMI_RSRC_CFG_FLAG_SET((word32), PEER_TID_EXT, (value))
  4386. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_GET(word32) \
  4387. WMI_RSRC_CFG_FLAG_GET((word32), PEER_TID_EXT)
  4388. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_SET(word32, value) \
  4389. WMI_RSRC_CFG_FLAG_SET((word32), VIDEO_OVER_WIFI_ENABLE, (value))
  4390. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_GET(word32) \
  4391. WMI_RSRC_CFG_FLAG_GET((word32), VIDEO_OVER_WIFI_ENABLE)
  4392. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_SET(word32, value) \
  4393. WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT, (value))
  4394. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_GET(word32) \
  4395. WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT)
  4396. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_SET(word32, value) \
  4397. WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT, (value))
  4398. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_GET(word32) \
  4399. WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT)
  4400. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_SET(word32, value) \
  4401. WMI_RSRC_CFG_FLAG_SET((word32), TX_COMPLETION_TX_TSF64_ENABLE, (value))
  4402. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_GET(word32) \
  4403. WMI_RSRC_CFG_FLAG_GET((word32), TX_COMPLETION_TX_TSF64_ENABLE)
  4404. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_SET(word32, value) \
  4405. WMI_RSRC_CFG_FLAG_SET((word32), PACKET_CAPTURE_SUPPORT, (value))
  4406. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_GET(word32) \
  4407. WMI_RSRC_CFG_FLAG_GET((word32), PACKET_CAPTURE_SUPPORT)
  4408. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_SET(word32, value) \
  4409. WMI_RSRC_CFG_FLAG_SET((word32), BSS_MAX_IDLE_TIME_SUPPORT, (value))
  4410. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_GET(word32) \
  4411. WMI_RSRC_CFG_FLAG_GET((word32), BSS_MAX_IDLE_TIME_SUPPORT)
  4412. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_SET(word32, value) \
  4413. WMI_RSRC_CFG_FLAG_SET((word32), AUDIO_SYNC_SUPPORT, (value))
  4414. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_GET(word32) \
  4415. WMI_RSRC_CFG_FLAG_GET((word32), AUDIO_SYNC_SUPPORT)
  4416. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_SET(word32, value) \
  4417. WMI_RSRC_CFG_FLAG_SET((word32), IPA_DISABLE, (value))
  4418. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_GET(word32) \
  4419. WMI_RSRC_CFG_FLAG_GET((word32), IPA_DISABLE)
  4420. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_SET(word32, value) \
  4421. WMI_RSRC_CFG_FLAG_SET((word32), PCIE_GEN_SWITCH_CAPABLITY, (value))
  4422. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_GET(word32) \
  4423. WMI_RSRC_CFG_FLAG_GET((word32), PCIE_GEN_SWITCH_CAPABLITY)
  4424. #define WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_GET(flags2, pdev_id) \
  4425. WMI_GET_BITS(flags2, pdev_id, 1)
  4426. #define WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_SET(flags2, pdev_id, value) \
  4427. WMI_SET_BITS(flags2, pdev_id, 1, value)
  4428. #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_GET(flags2) \
  4429. WMI_GET_BITS(flags2, 4, 2)
  4430. #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_SET(flags2, value) \
  4431. WMI_SET_BITS(flags2, 4, 2, value)
  4432. #define WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED_GET(flags2) \
  4433. WMI_GET_BITS(flags2, 6, 1)
  4434. #define WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED_SET(flags2, value) \
  4435. WMI_SET_BITS(flags2, 6, 1, value)
  4436. #define WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED_GET(flags2) \
  4437. WMI_GET_BITS(flags2, 7, 1)
  4438. #define WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED_SET(flags2, value) \
  4439. WMI_SET_BITS(flags2, 7, 1, value)
  4440. #define WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED_GET(flags2) \
  4441. WMI_GET_BITS(flags2, 8, 1)
  4442. #define WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED_SET(flags2, value) \
  4443. WMI_SET_BITS(flags2, 8, 1, value)
  4444. #define WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_GET(flags2) \
  4445. WMI_GET_BITS(flags2, 9, 1)
  4446. #define WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_SET(flags2, value) \
  4447. WMI_SET_BITS(flags2, 9, 1, value)
  4448. #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_GET(flags2) \
  4449. WMI_GET_BITS(flags2, 10, 1)
  4450. #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_SET(flags2, value) \
  4451. WMI_SET_BITS(flags2, 10, 1, value)
  4452. #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_GET(flags2) \
  4453. WMI_GET_BITS(flags2, 11, 2)
  4454. #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_SET(flags2, value) \
  4455. WMI_SET_BITS(flags2, 11, 2, value)
  4456. #define WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_GET(flags2) \
  4457. WMI_GET_BITS(flags2, 13, 1)
  4458. #define WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_SET(flags2, value) \
  4459. WMI_SET_BITS(flags2, 13, 1, value)
  4460. #define WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_GET(flags2) \
  4461. WMI_GET_BITS(flags2, 14, 1)
  4462. #define WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_SET(flags2, value) \
  4463. WMI_SET_BITS(flags2, 14, 1, value)
  4464. #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_GET(flags2) \
  4465. WMI_GET_BITS(flags2, 15, 1)
  4466. #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_SET(flags2, value) \
  4467. WMI_SET_BITS(flags2, 15, 1, value)
  4468. #define WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_GET(flags2) \
  4469. WMI_GET_BITS(flags2, 16, 1)
  4470. #define WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_SET(flags2, value) \
  4471. WMI_SET_BITS(flags2, 16, 1, value)
  4472. #define WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_GET(flags2) \
  4473. WMI_GET_BITS(flags2, 17, 1)
  4474. #define WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_SET(flags2, value) \
  4475. WMI_SET_BITS(flags2, 17, 1, value)
  4476. #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_GET(flags2) \
  4477. WMI_GET_BITS(flags2, 18, 1)
  4478. #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_SET(flags2, value) \
  4479. WMI_SET_BITS(flags2, 18, 1, value)
  4480. #define WMI_RSRC_CFG_FLAGS2_SAWF_255_SVC_CLASS_SUPPORT_GET(flags2) \
  4481. WMI_GET_BITS(flags2, 19, 1)
  4482. #define WMI_RSRC_CFG_FLAGS2_SAWF_255_SVC_CLASS_SUPPORT_SET(flags2, value) \
  4483. WMI_SET_BITS(flags2, 19, 1, value)
  4484. #define WMI_RSRC_CFG_FLAGS2_EPM_GET(flags2) \
  4485. WMI_GET_BITS(flags2, 20, 1)
  4486. #define WMI_RSRC_CFG_FLAGS2_EPM_SET(flags2, value) \
  4487. WMI_SET_BITS(flags2, 20, 1, value)
  4488. #define WMI_RSRC_CFG_FLAGS2_IS_MGMT_SRNG_ENABLED_GET(flags2) \
  4489. WMI_GET_BITS(flags2, 21, 1)
  4490. #define WMI_RSRC_CFG_FLAGS2_IS_MGMT_SRNG_ENABLED_SET(flags2, value) \
  4491. WMI_SET_BITS(flags2, 21, 1, value)
  4492. #define WMI_RSRC_CFG_FLAGS2_ENABLE_WDS_NULL_FRAME_SUPPORT_GET(flags2) \
  4493. WMI_GET_BITS(flags2, 22, 1)
  4494. #define WMI_RSRC_CFG_FLAGS2_ENABLE_WDS_NULL_FRAME_SUPPORT_SET(flags2, value) \
  4495. WMI_SET_BITS(flags2, 22, 1, value)
  4496. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_GET(host_service_flags) \
  4497. WMI_GET_BITS(host_service_flags, 0, 1)
  4498. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_SET(host_service_flags, val) \
  4499. WMI_SET_BITS(host_service_flags, 0, 1, val)
  4500. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_GET(host_service_flags) \
  4501. WMI_GET_BITS(host_service_flags, 1, 1)
  4502. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_SET(host_service_flags, val) \
  4503. WMI_SET_BITS(host_service_flags, 1, 1, val)
  4504. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_GET(host_service_flags) \
  4505. WMI_GET_BITS(host_service_flags, 2, 1)
  4506. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_SET(host_service_flags, val) \
  4507. WMI_SET_BITS(host_service_flags, 2, 1, val)
  4508. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_GET(host_service_flags) \
  4509. WMI_GET_BITS(host_service_flags, 3, 1)
  4510. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_SET(host_service_flags, val) \
  4511. WMI_SET_BITS(host_service_flags, 3, 1, val)
  4512. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_GET(host_service_flags) \
  4513. WMI_GET_BITS(host_service_flags, 4, 1)
  4514. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_SET(host_service_flags, val) \
  4515. WMI_SET_BITS(host_service_flags, 4, 1, val)
  4516. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_GET(host_service_flags) \
  4517. WMI_GET_BITS(host_service_flags, 5, 1)
  4518. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_SET(host_service_flags, val) \
  4519. WMI_SET_BITS(host_service_flags, 5, 1, val)
  4520. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_GET(host_service_flags) \
  4521. WMI_GET_BITS(host_service_flags, 6, 1)
  4522. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_SET(host_service_flags, val) \
  4523. WMI_SET_BITS(host_service_flags, 6, 1, val)
  4524. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_GET(host_service_flags) \
  4525. WMI_GET_BITS(host_service_flags, 7, 1)
  4526. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_SET(host_service_flags, val) \
  4527. WMI_SET_BITS(host_service_flags, 7, 1, val)
  4528. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_TIMER_CHECK_GET(host_service_flags) \
  4529. WMI_GET_BITS(host_service_flags, 8, 1)
  4530. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_TIMER_CHECK_SET(host_service_flags, val) \
  4531. WMI_SET_BITS(host_service_flags, 8, 1, val)
  4532. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_REQ_ID_CHECK_GET(host_service_flags) \
  4533. WMI_GET_BITS(host_service_flags, 9, 1)
  4534. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_REQ_ID_CHECK_SET(host_service_flags, val) \
  4535. WMI_SET_BITS(host_service_flags, 9, 1, val)
  4536. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_GET(host_service_flags) \
  4537. WMI_GET_BITS(host_service_flags, 10, 1)
  4538. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_SET(host_service_flags, val) \
  4539. WMI_SET_BITS(host_service_flags, 10, 1, val)
  4540. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_GET(host_service_flags) \
  4541. WMI_GET_BITS(host_service_flags, 11, 1)
  4542. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_SET(host_service_flags, val) \
  4543. WMI_SET_BITS(host_service_flags, 11, 1, val)
  4544. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_GET(host_service_flags) \
  4545. WMI_GET_BITS(host_service_flags, 12, 1)
  4546. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_SET(host_service_flags, val) \
  4547. WMI_SET_BITS(host_service_flags, 12, 1, val)
  4548. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_GET(host_service_flags) \
  4549. WMI_GET_BITS(host_service_flags, 13, 1)
  4550. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_SET(host_service_flags, val) \
  4551. WMI_SET_BITS(host_service_flags, 13, 1, val)
  4552. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_GET(host_service_flags) \
  4553. WMI_GET_BITS(host_service_flags, 14, 1)
  4554. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_SET(host_service_flags, val) \
  4555. WMI_SET_BITS(host_service_flags, 14, 1, val)
  4556. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET(host_service_flags) \
  4557. WMI_GET_BITS(host_service_flags, 15, 1)
  4558. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_SET(host_service_flags, val) \
  4559. WMI_SET_BITS(host_service_flags, 15, 1, val)
  4560. /*
  4561. * Temporarily retain deprecated old "QMS_DLKM" macro names as aliases
  4562. * for the new "SMEM_MAILBOX" macro names.
  4563. */
  4564. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_QMS_DLKM_SUPPORT_GET(host_service_flags) /* DEPRECATED */ \
  4565. WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET(host_service_flags)
  4566. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_QMS_DLKM_SUPPORT_SET(host_service_flags, val) /* DEPRECATED */ \
  4567. WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_SET(host_service_flags, val)
  4568. /* ML FULL monitor mode */
  4569. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_GET(host_service_flags) \
  4570. WMI_GET_BITS(host_service_flags, 16, 1)
  4571. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_SET(host_service_flags, val) \
  4572. WMI_SET_BITS(host_service_flags, 16, 1, val)
  4573. /* This bit is used to inform FW to provide refill buffers in Qdata feature */
  4574. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_OPT_DP_CTRL_REPLENISH_REFILL_RX_BUFFER_SUPPORT_GET(host_service_flags) \
  4575. WMI_GET_BITS(host_service_flags, 17, 1)
  4576. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_OPT_DP_CTRL_REPLENISH_REFILL_RX_BUFFER_SUPPORT_SET(host_service_flags, val) \
  4577. WMI_SET_BITS(host_service_flags, 17, 1, val)
  4578. #define WMI_RSRC_CFG_CARRIER_CFG_CHARTER_ENABLE_GET(carrier_config) \
  4579. WMI_GET_BITS(carrier_config, 0, 1)
  4580. #define WMI_RSRC_CFG_CARRIER_CFG_CHARTER_ENABLE_SET(carrier_config, val) \
  4581. WMI_SET_BITS(carrier_config, 0, 1, val)
  4582. /** Top nibble can be used to diff between HE and EHT: 0xVXXXXXXX
  4583. * If V == 0b0000: format is HE.
  4584. * If V == 0b0001: format is EHT.
  4585. */
  4586. #define WMI_RSRC_CFG_IS_EHT_GET(param_value) \
  4587. WMI_GET_BITS(param_value, 28, 4)
  4588. #define WMI_RSRC_CFG_IS_EHT_SET(param_value, val) \
  4589. WMI_SET_BITS(param_value, 28, 4, val)
  4590. /* Used along with the above macro to set the value. */
  4591. #define WMI_RSRC_CFG_PARAM_VALUE_GET(param_value) \
  4592. WMI_GET_BITS(param_value, 0, 28)
  4593. #define WMI_RSRC_CFG_PARAM_VALUE_SET(param_value, val) \
  4594. WMI_SET_BITS(param_value, 0, 28, val)
  4595. typedef struct {
  4596. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
  4597. /** The following indicate the WMI versions to be supported by
  4598. * the host driver. Note that the host driver decide to
  4599. * "downgrade" its WMI version support and this may not be the
  4600. * native version of the host driver. */
  4601. wmi_abi_version host_abi_vers;
  4602. A_UINT32 num_host_mem_chunks; /** size of array host_mem_chunks[] */
  4603. /* This init_cmd_fixed_param TLV is followed by the below TLVs:
  4604. * wmi_resource_config resource_config;
  4605. * wlan_host_memory_chunk host_mem_chunks[];
  4606. * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
  4607. * Note that the hw_mode_config, in spite of its "pdev" name,
  4608. * applies to the entire target rather than for a single pdev
  4609. * within the target.
  4610. * To avoid specifying a HW mode for the target, the host should
  4611. * fill hw_mode_config's fields with 0x0.
  4612. * wmi_pdev_band_to_mac band_to_mac[];
  4613. * wmi_htt_msdu_idx_to_htt_msdu_qtype htt_msdu_idx_to_qtype_map[];
  4614. */
  4615. } wmi_init_cmd_fixed_param;
  4616. typedef enum {
  4617. WMI_WIFI_STANDARD_4 = 0,
  4618. WMI_WIFI_STANDARD_5 = 1,
  4619. WMI_WIFI_STANDARD_6 = 2,
  4620. WMI_WIFI_STANDARD_6E = 3,
  4621. WMI_WIFI_STANDARD_7 = 4,
  4622. } WMI_WIFI_STANDARD;
  4623. typedef enum {
  4624. WMI_HOST_NONE = 0, /* No concurrency mode supported */
  4625. WMI_HOST_DBS = 1, /* When 2.4G + 5G & 2.4G + 6G if 6G is supported */
  4626. WMI_HOST_DBS_SBS = 2, /* When 2.4G + 5G, 2.4G + 6G, 5G + 6G & 5G + 5G is supported */
  4627. } WMI_BAND_CONCURRENCY;
  4628. typedef enum {
  4629. WMI_SISO = 1, /* When 1x1 is supported */
  4630. WMI_MIMO_2X2 = 2, /* When 2x2 MIMO is supported */
  4631. } WMI_NUM_ANTENNAS;
  4632. typedef enum {
  4633. WMI_VENDOR1_REQ1_VERSION_3_00 = 0,
  4634. WMI_VENDOR1_REQ1_VERSION_3_01 = 1,
  4635. WMI_VENDOR1_REQ1_VERSION_3_20 = 2,
  4636. WMI_VENDOR1_REQ1_VERSION_3_30 = 3,
  4637. WMI_VENDOR1_REQ1_VERSION_3_40 = 4,
  4638. WMI_VENDOR1_REQ1_VERSION_4_00 = 5,
  4639. WMI_VENDOR1_REQ1_VERSION_4_10 = 6,
  4640. } WMI_VENDOR1_REQ1_VERSION;
  4641. typedef enum {
  4642. WMI_VENDOR1_REQ2_VERSION_3_00 = 0,
  4643. WMI_VENDOR1_REQ2_VERSION_3_01 = 1,
  4644. WMI_VENDOR1_REQ2_VERSION_3_20 = 2,
  4645. WMI_VENDOR1_REQ2_VERSION_3_50 = 3,
  4646. } WMI_VENDOR1_REQ2_VERSION;
  4647. typedef enum {
  4648. WMI_HOST_BAND_CAP_2GHZ = 0x01,
  4649. WMI_HOST_BAND_CAP_5GHZ = 0x02,
  4650. WMI_HOST_BAND_CAP_6GHZ = 0x04,
  4651. } WMI_HOST_BAND_CAP;
  4652. /* HW features supported info */
  4653. /* enum WMI_WIFI_STANDARD are possible values for WiFi standard bitfield */
  4654. #define WMI_GET_WIFI_STANDARD(var, feature_bitmap) \
  4655. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 0, 4)
  4656. #define WMI_SET_WIFI_STANDARD(feature_bitmap, val) \
  4657. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 0, 4, val)
  4658. /* enum WMI_BAND_CONCURRENCY are possible values for band concurrency support bitfield */
  4659. #define WMI_GET_BAND_CONCURRENCY_SUPPORT(var, feature_bitmap) \
  4660. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 4, 3)
  4661. #define WMI_SET_BAND_CONCURRENCY_SUPPORT(feature_bitmap, val) \
  4662. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 4, 3, val)
  4663. /* PNO feature supported info */
  4664. #define WMI_GET_PNO_SCAN_IN_UNASSOC_STATE(var, feature_bitmap) \
  4665. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 7, 1)
  4666. #define WMI_SET_PNO_SCAN_IN_UNASSOC_STATE(feature_bitmap, val) \
  4667. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 7, 1, val)
  4668. #define WMI_GET_PNO_SCAN_IN_ASSOC_STATE(var, feature_bitmap) \
  4669. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 8, 1)
  4670. #define WMI_SET_PNO_SCAN_IN_ASSOC_STATE(feature_bitmap, val) \
  4671. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 8, 1, val)
  4672. /* TWT feature supported info */
  4673. #define WMI_GET_TWT_FEATURE_SUPPORT(var, feature_bitmap) \
  4674. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 9, 1)
  4675. #define WMI_SET_TWT_FEATURE_SUPPORT(feature_bitmap, val) \
  4676. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 9, 1, val)
  4677. #define WMI_GET_TWT_REQUESTOR(var, feature_bitmap) \
  4678. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 10, 1)
  4679. #define WMI_SET_TWT_REQUESTER(feature_bitmap, val) \
  4680. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 10, 1, val)
  4681. #define WMI_GET_TWT_BROADCAST(var, feature_bitmap) \
  4682. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 11, 1)
  4683. #define WMI_SET_TWT_BROADCAST(feature_bitmap, val) \
  4684. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 11, 1, val)
  4685. #define WMI_GET_TWT_FLEXIBLE(var, feature_bitmap) \
  4686. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 12, 1)
  4687. #define WMI_SET_TWT_FLEXIBLE(feature_bitmap, val) \
  4688. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 12, 1, val)
  4689. /* WIFI optimizer feature supported info */
  4690. #define WMI_GET_WIFI_OPT_FEATURE_SUPPORT(var, feature_bitmap) \
  4691. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 13, 1)
  4692. #define WMI_SET_WIFI_OPT_FEATURE_SUPPORT(feature_bitmap, val) \
  4693. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 13, 1, val)
  4694. /* RFC8325 feature supported info */
  4695. #define WMI_GET_RFC8325_FEATURE_SUPPORT(var, feature_bitmap) \
  4696. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 14, 1)
  4697. #define WMI_SET_RFC8325_FEATURE_SUPPORT(feature_bitmap, val) \
  4698. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 14, 1, val)
  4699. /* MHS feature supported info */
  4700. #define WMI_GET_MHS_5G_SUPPORT(var, feature_bitmap) \
  4701. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 15, 1)
  4702. #define WMI_SET_MHS_5G_SUPPORT(feature_bitmap, val) \
  4703. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 15, 1, val)
  4704. #define WMI_GET_MHS_6G_SUPPORT(var, feature_bitmap) \
  4705. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 16, 1)
  4706. #define WMI_SET_MHS_6G_SUPPORT(feature_bitmap, val) \
  4707. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 16, 1, val)
  4708. #define WMI_GET_MHS_MAX_CLIENTS_SUPPORT(var, feature_bitmap) \
  4709. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 17, 8)
  4710. #define WMI_SET_MHS_MAX_CLIENTS_SUPPORT(feature_bitmap, val) \
  4711. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 17, 8, val)
  4712. #define WMI_GET_MHS_SET_COUNTRY_CODE_HAL_SUPPORT(var, feature_bitmap) \
  4713. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 25, 1)
  4714. #define WMI_SET_MHS_SET_COUNTRY_CODE_HAL_SUPPORT(feature_bitmap, val) \
  4715. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 25, 1, val)
  4716. #define WMI_GET_MHS_GETVALID_CHANNELS_SUPPORT(var, feature_bitmap) \
  4717. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 26, 1)
  4718. #define WMI_SET_MHS_GETVALID_CHANNELS_SUPPORT(feature_bitmap, val) \
  4719. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 26, 1, val)
  4720. /* enum WMI_WIFI_STANDARD are possible values for MHS DOT11 mode support bitfield */
  4721. #define WMI_GET_MHS_DOT11_MODE_SUPPORT(var, feature_bitmap) \
  4722. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 27, 4)
  4723. #define WMI_SET_MHS_DOT11_MODE_SUPPORT(feature_bitmap, val) \
  4724. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 27, 4, val)
  4725. #define WMI_GET_MHS_WPA3_SUPPORT(var, feature_bitmap) \
  4726. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 31, 1)
  4727. #define WMI_SET_MHS_WPA3_SUPPORT(feature_bitmap, val) \
  4728. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 31, 1, val)
  4729. /* Vendor requirement1 supported version info */
  4730. /* enum's WMI_VENDORxx_REQxx_VERSION are the possible vaues for below bitfield*/
  4731. #define WMI_GET_VENDOR_REQ_1_VERSION(var, feature_bitmap) \
  4732. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 32, 8)
  4733. #define WMI_SET_VENDOR_REQ_1_VERSION(feature_bitmap, val) \
  4734. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 32, 8, val)
  4735. /* Roaming feature supported info */
  4736. #define WMI_GET_ROAMING_HIGH_CU_ROAM_TRIGGER(var, feature_bitmap) \
  4737. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 40, 1)
  4738. #define WMI_SET_ROAMING_HIGH_CU_ROAM_TRIGGER(feature_bitmap, val) \
  4739. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 40, 1, val)
  4740. #define WMI_GET_ROAMING_EMERGENCY_TRIGGER(var, feature_bitmap) \
  4741. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 41, 1)
  4742. #define WMI_SET_ROAMING_EMERGENCY_TRIGGER(feature_bitmap, val) \
  4743. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 41, 1, val)
  4744. #define WMI_GET_ROAMING_BTM_TRIGGER(var, feature_bitmap) \
  4745. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 42, 1)
  4746. #define WMI_SET_ROAMING_BTM_TRIGGER(feature_bitmap, val) \
  4747. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 42, 1, val)
  4748. #define WMI_GET_ROAMING_IDLE_TRIGGER(var, feature_bitmap) \
  4749. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 43, 1)
  4750. #define WMI_SET_ROAMING_IDLE_TRIGGER(feature_bitmap, val) \
  4751. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 43, 1, val)
  4752. #define WMI_GET_ROAMING_WTC_TRIGGER(var, feature_bitmap) \
  4753. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 44, 1)
  4754. #define WMI_SET_ROAMING_WTC_TRIGGER(feature_bitmap, val) \
  4755. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 44, 1, val)
  4756. #define WMI_GET_ROAMING_BTCOEX_TRIGGER(var, feature_bitmap) \
  4757. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 45, 1)
  4758. #define WMI_SET_ROAMING_BTCOEX_TRIGGER(feature_bitmap, val) \
  4759. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 45, 1, val)
  4760. #define WMI_GET_ROAMING_BTW_WPA_WPA2(var, feature_bitmap) \
  4761. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 46, 1)
  4762. #define WMI_SET_ROAMING_BTW_WPA_WPA2(feature_bitmap, val) \
  4763. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 46, 1, val)
  4764. #define WMI_GET_ROAMING_MANAGE_CHAN_LIST_API(var, feature_bitmap) \
  4765. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 47, 1)
  4766. #define WMI_SET_ROAMING_MANAGE_CHAN_LIST_API(feature_bitmap, val) \
  4767. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 47, 1, val)
  4768. #define WMI_GET_ROAMING_ADAPTIVE_11R(var, feature_bitmap) \
  4769. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 48, 1)
  4770. #define WMI_SET_ROAMING_ADAPTIVE_11R(feature_bitmap, val) \
  4771. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 48, 1, val)
  4772. #define WMI_GET_ROAMING_CTRL_API_GET_SET(var, feature_bitmap) \
  4773. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 49, 1)
  4774. #define WMI_SET_ROAMING_CTRL_API_GET_SET(feature_bitmap, val) \
  4775. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 49, 1, val)
  4776. #define WMI_GET_ROAMING_CTRL_API_REASSOC(var, feature_bitmap) \
  4777. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 50, 1)
  4778. #define WMI_SET_ROAMING_CTRL_API_REASSOC(feature_bitmap, val) \
  4779. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 50, 1, val)
  4780. #define WMI_GET_ROAMING_CTRL_GET_CU(var, feature_bitmap) \
  4781. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 51, 1)
  4782. #define WMI_SET_ROAMING_CTRL_GET_CU(feature_bitmap, val) \
  4783. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 51, 1, val)
  4784. /* Vendor requirement2 supported version info */
  4785. /* enum's WMI_VENDORxx_REQxx_VERSION are the possible vaues for below bitfield*/
  4786. #define WMI_GET_VENDOR_REQ_2_VERSION(var, feature_bitmap) \
  4787. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 52, 8)
  4788. #define WMI_SET_VENDOR_REQ_2_VERSION(feature_bitmap, val) \
  4789. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 52, 8, val)
  4790. #define WMI_GET_ASSURANCE_DISCONNECT_REASON_API(var, feature_bitmap) \
  4791. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 60, 1)
  4792. #define WMI_SET_ASSURANCE_DISCONNECT_REASON_API(feature_bitmap, val) \
  4793. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 60, 1, val)
  4794. /* Frame pcap logging */
  4795. #define WMI_GET_FRAME_PCAP_LOG_MGMT(var, feature_bitmap) \
  4796. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 61, 1)
  4797. #define WMI_SET_FRAME_PCAP_LOG_MGMT(feature_bitmap, val) \
  4798. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 61, 1, val)
  4799. #define WMI_GET_FRAME_PCAP_LOG_CTRL(var, feature_bitmap) \
  4800. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 62, 1)
  4801. #define WMI_SET_FRAME_PCAP_LOG_CTRL(feature_bitmap, val) \
  4802. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 62, 1, val)
  4803. #define WMI_GET_FRAME_PCAP_LOG_DATA(var, feature_bitmap) \
  4804. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 63, 1)
  4805. #define WMI_SET_FRAME_PCAP_LOG_DATA(feature_bitmap, val) \
  4806. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 63, 1, val)
  4807. /* Security features supported info */
  4808. #define WMI_GET_SECURITY_WPA3_SAE_H2E(var, feature_bitmap) \
  4809. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 64, 1)
  4810. #define WMI_SET_SECURITY_WPA3_SAE_H2E(feature_bitmap, val) \
  4811. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 64, 1, val)
  4812. #define WMI_GET_SECURITY_WPA3_SAE_FT(var, feature_bitmap) \
  4813. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 65, 1)
  4814. #define WMI_SET_SECURITY_WPA3_SAE_FT(feature_bitmap, val) \
  4815. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 65, 1, val)
  4816. #define WMI_GET_SECURITY_WPA3_ENTERP_SUITEB(var, feature_bitmap) \
  4817. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 66, 1)
  4818. #define WMI_SET_SECURITY_WPA3_ENTERP_SUITEB(feature_bitmap, val) \
  4819. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 66, 1, val)
  4820. #define WMI_GET_SECURITY_WPA3_ENTERP_SUITEB_192bit(var, feature_bitmap) \
  4821. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 67, 1)
  4822. #define WMI_SET_SECURITY_WPA3_ENTERP_SUITEB_192bit(feature_bitmap, val) \
  4823. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 67, 1, val)
  4824. #define WMI_GET_SECURITY_FILS_SHA256(var, feature_bitmap) \
  4825. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 68, 1)
  4826. #define WMI_SET_SECURITY_FILS_SHA256(feature_bitmap, val) \
  4827. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 68, 1, val)
  4828. #define WMI_GET_SECURITY_FILS_SHA384(var, feature_bitmap) \
  4829. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 69, 1)
  4830. #define WMI_SET_SECURITY_FILS_SHA384(feature_bitmap, val) \
  4831. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 69, 1, val)
  4832. #define WMI_GET_SECURITY_FILS_SHA256_FT(var, feature_bitmap) \
  4833. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 70, 1)
  4834. #define WMI_SET_SECURITY_FILS_SHA256_FT(feature_bitmap, val) \
  4835. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 70, 1, val)
  4836. #define WMI_GET_SECURITY_FILS_SHA384_FT(var, feature_bitmap) \
  4837. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 71, 1)
  4838. #define WMI_SET_SECURITY_FILS_SHA384_FT(feature_bitmap, val) \
  4839. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 71, 1, val)
  4840. #define WMI_GET_SECURITY_ENCHANCED_OPEN(var, feature_bitmap) \
  4841. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 72, 1)
  4842. #define WMI_SET_SECURITY_ENCHANCED_OPEN(feature_bitmap, val) \
  4843. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 72, 1, val)
  4844. /* Peer protocol features supported info */
  4845. #define WMI_GET_NAN_SUPPORT(var, feature_bitmap) \
  4846. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 73, 1)
  4847. #define WMI_SET_NAN_SUPPORT(feature_bitmap, val) \
  4848. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 73, 1, val)
  4849. #define WMI_GET_TDLS_SUPPORT(var, feature_bitmap) \
  4850. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 74, 1)
  4851. #define WMI_SET_TDLS_SUPPORT(feature_bitmap, val) \
  4852. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 74, 1, val)
  4853. #define WMI_GET_P2P6E_SUPPORT(var, feature_bitmap) \
  4854. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 75, 1)
  4855. #define WMI_SET_P2P6E_SUPPORT(feature_bitmap, val) \
  4856. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 75, 1, val)
  4857. #define WMI_GET_TDLS_OFFCHAN_SUPPORT(var, feature_bitmap) \
  4858. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 76, 1)
  4859. #define WMI_SET_TDLS_OFFCHAN_SUPPORT(feature_bitmap, val) \
  4860. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 76, 1, val)
  4861. #define WMI_GET_TDLS_CAP_ENHANCE(var, feature_bitmap) \
  4862. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 77, 1)
  4863. #define WMI_SET_TDLS_CAP_ENHANCE(feature_bitmap, val) \
  4864. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 77, 1, val)
  4865. #define WMI_GET_MAX_TDLS_PEERS_SUPPORT(var, feature_bitmap) \
  4866. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 78, 4)
  4867. #define WMI_SET_MAX_TDLS_PEERS_SUPPORT(feature_bitmap, val) \
  4868. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 78, 4, val)
  4869. #define WMI_GET_STA_DUAL_P2P_SUPPORT(var, feature_bitmap) \
  4870. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 82, 1)
  4871. #define WMI_SET_STA_DUAL_P2P_SUPPORT(feature_bitmap, val) \
  4872. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 82, 1, val)
  4873. /* Big data feature supported info */
  4874. #define WMI_GET_PEER_BIGDATA_GETBSSINFO_API_SUPPORT(var, feature_bitmap) \
  4875. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 83, 1)
  4876. #define WMI_SET_PEER_BIGDATA_GETBSSINFO_API_SUPPORT(feature_bitmap, val) \
  4877. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 83, 1, val)
  4878. #define WMI_GET_PEER_BIGDATA_GETASSOCREJECTINFO_API_SUPPORT(var, feature_bitmap) \
  4879. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 84, 1)
  4880. #define WMI_SET_PEER_BIGDATA_GETASSOCREJECTINFO_API_SUPPORT(feature_bitmap, val) \
  4881. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 84, 1, val)
  4882. #define WMI_GET_PEER_BIGDATA_GETSTAINFO_API_SUPPORT(var, feature_bitmap) \
  4883. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 85, 1)
  4884. #define WMI_SET_PEER_BIGDATA_GETSTAINFO_API_SUPPORT(feature_bitmap, val) \
  4885. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 85, 1, val)
  4886. /* Feature set requirement supported version info */
  4887. #define WMI_GET_FEATURE_SET_VERSION(var, feature_bitmap) \
  4888. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 86, 16)
  4889. #define WMI_SET_FEATURE_SET_VERSION(feature_bitmap, val) \
  4890. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 86, 16, val)
  4891. /*
  4892. * enum WMI_NUM_ANTENNAS are possible values for number of antennas supported bitfield.
  4893. * Bitfield value 0 means invalid, 1 means SISO, 2 means MIMO, and values 3+ are reserved.
  4894. */
  4895. #define WMI_GET_NUM_ANTENNAS(var, feature_bitmap) \
  4896. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 102, 4)
  4897. #define WMI_SET_NUM_ANTENNAS(feature_bitmap, val) \
  4898. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 102, 4, val)
  4899. /* enum WMI_HOST_BAND_CAP are possible values for below bitfield */
  4900. #define WMI_GET_HOST_BAND_CAP(var, feature_bitmap) \
  4901. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 106, 6)
  4902. #define WMI_SET_HOST_BAND_CAP(feature_bitmap, val) \
  4903. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 106, 6, val)
  4904. #define WMI_GET_STA_DUMP_SUPPORT(var, feature_bitmap) \
  4905. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 112, 1)
  4906. #define WMI_SET_STA_DUMP_SUPPORT(feature_bitmap, val) \
  4907. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 112, 1, val)
  4908. /* Peer protocol features supported info (contd) */
  4909. #define WMI_GET_STA_P2P_SUPPORT(var, feature_bitmap) \
  4910. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 113, 1)
  4911. #define WMI_SET_STA_P2P_SUPPORT(feature_bitmap, val) \
  4912. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 113, 1, val)
  4913. #define WMI_GET_STA_SAP_SUPPORT(var, feature_bitmap) \
  4914. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 114, 1)
  4915. #define WMI_SET_STA_SAP_SUPPORT(feature_bitmap, val) \
  4916. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 114, 1, val)
  4917. #define WMI_GET_STA_NAN_SUPPORT(var, feature_bitmap) \
  4918. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 115, 1)
  4919. #define WMI_SET_STA_NAN_SUPPORT(feature_bitmap, val) \
  4920. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 115, 1, val)
  4921. #define WMI_GET_STA_TDLS_SUPPORT(var, feature_bitmap) \
  4922. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 116, 1)
  4923. #define WMI_SET_STA_TDLS_SUPPORT(feature_bitmap, val) \
  4924. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 116, 1, val)
  4925. /* Reserving 16 bits for accomodating other 2 port concurrencies later */
  4926. #define WMI_GET_STA_SAP_P2P_SUPPORT(var, feature_bitmap) \
  4927. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 133, 1)
  4928. #define WMI_SET_STA_SAP_P2P_SUPPORT(feature_bitmap, val) \
  4929. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 133, 1, val)
  4930. #define WMI_GET_STA_SAP_NAN_SUPPORT(var, feature_bitmap) \
  4931. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 134, 1)
  4932. #define WMI_SET_STA_SAP_NAN_SUPPORT(feature_bitmap, val) \
  4933. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 134, 1, val)
  4934. #define WMI_GET_STA_P2P_NAN_SUPPORT(var, feature_bitmap) \
  4935. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 135, 1)
  4936. #define WMI_SET_STA_P2P_NAN_SUPPORT(feature_bitmap, val) \
  4937. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 135, 1, val)
  4938. #define WMI_GET_STA_P2P_TDLS_SUPPORT(var, feature_bitmap) \
  4939. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 136, 1)
  4940. #define WMI_SET_STA_P2P_TDLS_SUPPORT(feature_bitmap, val) \
  4941. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 136, 1, val)
  4942. #define WMI_GET_STA_SAP_TDLS_SUPPORT(var, feature_bitmap) \
  4943. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 137, 1)
  4944. #define WMI_SET_STA_SAP_TDLS_SUPPORT(feature_bitmap, val) \
  4945. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 137, 1, val)
  4946. #define WMI_GET_STA_NAN_TDLS_SUPPORT(var, feature_bitmap) \
  4947. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 138, 1)
  4948. #define WMI_SET_STA_NAN_TDLS_SUPPORT(feature_bitmap, val) \
  4949. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 138, 1, val)
  4950. /* Reserving 16 bits for accomodating other 3 port concurrencies later */
  4951. #define WMI_GET_STA_SAP_P2P_TDLS_SUPPORT(var, feature_bitmap) \
  4952. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 155, 1)
  4953. #define WMI_SET_STA_SAP_P2P_TDLS_SUPPORT(feature_bitmap, val) \
  4954. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 155, 1, val)
  4955. #define WMI_GET_STA_SAP_NAN_TDLS_SUPPORT(var, feature_bitmap) \
  4956. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 156, 1)
  4957. #define WMI_SET_STA_SAP_NAN_TDLS_SUPPORT(feature_bitmap, val) \
  4958. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 156, 1, val)
  4959. #define WMI_GET_STA_P2P_P2P_TDLS_SUPPORT(var, feature_bitmap) \
  4960. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 157, 1)
  4961. #define WMI_SET_STA_P2P_P2P_TDLS_SUPPORT(feature_bitmap, val) \
  4962. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 157, 1, val)
  4963. #define WMI_GET_STA_P2P_NAN_TDLS_SUPPORT(var, feature_bitmap) \
  4964. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 158, 1)
  4965. #define WMI_SET_STA_P2P_NAN_TDLS_SUPPORT(feature_bitmap, val) \
  4966. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 158, 1, val)
  4967. /* NAN EHT supported info */
  4968. #define WMI_GET_NAN_EHT_SUPPORT(var, feature_bitmap) \
  4969. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 159, 1)
  4970. #define WMI_SET_NAN_EHT_SUPPORT(feature_bitmap, val) \
  4971. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 159, 1, val)
  4972. /*
  4973. * Specify how many A_UINT32 words are needed to hold the feature bitmap flags.
  4974. * This value may change over time.
  4975. * It is not directly used in any WMI message definition.
  4976. * It is provided simply as a convenience for the feature_set_bitmap sender to
  4977. * know how many 32-bit words to allocate for the bitmap.
  4978. */
  4979. #define WMI_FEATURE_SET_BITMAP_ARRAY_LEN32 6
  4980. /**
  4981. * TLV for channel list
  4982. */
  4983. typedef struct {
  4984. /** WMI_CHAN_LIST_TAG */
  4985. A_UINT32 tag;
  4986. /** # of channels to scan */
  4987. A_UINT32 num_chan;
  4988. /** channels in Mhz */
  4989. WMI_VAR_LEN_ARRAY1(A_UINT32, channel_list);
  4990. } wmi_chan_list;
  4991. /**
  4992. * TLV for bssid list
  4993. */
  4994. typedef struct {
  4995. /** WMI_BSSID_LIST_TAG */
  4996. A_UINT32 tag;
  4997. /** number of bssids */
  4998. A_UINT32 num_bssid;
  4999. /** bssid list */
  5000. WMI_VAR_LEN_ARRAY1(wmi_mac_addr, bssid_list);
  5001. } wmi_bssid_list;
  5002. /**
  5003. * TLV for ie data.
  5004. */
  5005. typedef struct {
  5006. /** WMI_IE_TAG */
  5007. A_UINT32 tag;
  5008. /** number of bytes in ie data */
  5009. A_UINT32 ie_len;
  5010. /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4) */
  5011. WMI_VAR_LEN_ARRAY1(A_UINT32, ie_data);
  5012. } wmi_ie_data;
  5013. /**
  5014. * TLV used for length/buffer
  5015. */
  5016. typedef struct {
  5017. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_buf_len_param */
  5018. A_UINT32 buf_len; /** Length of buf */
  5019. /**
  5020. * Following this structure is the TLV byte stream of buf of length buf_len:
  5021. * A_UINT8 buf[];
  5022. *
  5023. */
  5024. } wmi_tlv_buf_len_param;
  5025. /**
  5026. * TLV used for specifying the dimensions of a multi-dimensional array
  5027. * that has been stored in a flat buffer
  5028. */
  5029. typedef struct {
  5030. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_arrays_len_param */
  5031. /**
  5032. * d1_len, d2_len, d3_len, and d4_len are the lengths of each dimension
  5033. * for a multi-dimensional array.
  5034. * If the length of outer dimension is not 1, the inner dimension
  5035. * shouldn't be 1.
  5036. * If the multi-dimensional array has less than 4 dimensions, the outer
  5037. * dimensions' lengths should be 1. For example, a buf[3][4] array
  5038. * would have d1_len = 4, d2_len = 3, d3_len = 1, d4_len = 1.
  5039. * The outermost dimension of the array can be inferred from the array
  5040. * length; thus, this struct supports up to 5-D arrays. For a 5-D array,
  5041. * the outermost (5th) dimension would be
  5042. * array length / (d1_len * d2_len * d3_len * d4_len)
  5043. *
  5044. * For security (to ensure no out-of-bounds memory access),
  5045. * the receiver shall validate that the product of all dimensions
  5046. * is equal to (or less than) the array length.
  5047. */
  5048. A_UINT32 d1_len; /* the length of 1st (innermost) dimension array */
  5049. A_UINT32 d2_len; /* the length of 2nd dimension array */
  5050. A_UINT32 d3_len; /* the length of 3rd dimension array */
  5051. A_UINT32 d4_len; /* the length of 4th dimension array */
  5052. /**
  5053. * Following this structure is the TLV multi-dimension array buffer:
  5054. * <type> buf[L1*L2*L3*L4];
  5055. * where, L1, L2, L3, and L4 are the values of
  5056. * d1_len, d2_len, d3_len and d4_len.
  5057. * To access the 4-D element a[i][j][k][l], the buf[] array would be
  5058. * indexed as buf[i*L3*L2*L1 + j*L2*L1 + k*L1 + l].
  5059. */
  5060. } wmi_tlv_arrays_len_param;
  5061. typedef struct {
  5062. /** Len of the SSID */
  5063. A_UINT32 ssid_len;
  5064. /** SSID */
  5065. A_UINT32 ssid[8];
  5066. } wmi_ssid;
  5067. typedef struct {
  5068. /** WMI_SSID_LIST_TAG */
  5069. A_UINT32 tag;
  5070. A_UINT32 num_ssids;
  5071. WMI_VAR_LEN_ARRAY1(wmi_ssid, ssids);
  5072. } wmi_ssid_list;
  5073. typedef struct {
  5074. /** WMI_SCAN_START_OFFSET_TAG */
  5075. A_UINT32 tag;
  5076. /** Number of start TSF offsets */
  5077. A_UINT32 num_offset;
  5078. /** Array of start TSF offsets provided in milliseconds */
  5079. WMI_VAR_LEN_ARRAY1(A_UINT32, start_tsf_offset);
  5080. } wmi_scan_start_offset;
  5081. /**
  5082. * WLAN_SCAN_CHAN_MODE Macros defined for A_UINT8 phymode_list[]
  5083. */
  5084. /** enum WLAN_PHY_MODE _mode starts from 0, but the WMI message requires
  5085. * 0 to be used to represent unspecified / don't care / default values.
  5086. * Therefore, WMI phy mode = WLAN phy mode + 1.
  5087. */
  5088. /** If the received WMI phy mode is 0 then it is ignored by the FW,
  5089. * and the FW will use any mode as long as the frequency matches.
  5090. */
  5091. /** The number of phy_mode's (BW+mode) passed in the TLV phymode_list[] must
  5092. * be equal to num_chan. (Unless the host does not specify phymode_list values
  5093. * at all, in which case the number of phymode_list elements will be zero.)
  5094. * The indexing of the phymode_list[] array corresponds to same index of
  5095. * the chan_list[] array.
  5096. */
  5097. #define WMI_SCAN_CHAN_SET_MODE(_c) ((_c) + 1)
  5098. #define WMI_SCAN_CHAN_GET_MODE(_c) ((_c) - 1)
  5099. #define WMI_SCAN_CHAN_MODE_IS_SET(_c) (_c)
  5100. typedef struct {
  5101. /*
  5102. * freq unit: MHz (upper 16bits -- value)
  5103. * flags (lower 16bits -- bitfield): valid for the freq short ssid
  5104. * The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
  5105. */
  5106. A_UINT32 freq_flags;
  5107. /* per spec, only 4 bytes*/
  5108. A_UINT32 short_ssid;
  5109. } wmi_hint_freq_short_ssid;
  5110. /** following bssid mac address same as wmi_mac_addr
  5111. * one example: freq -- 5980(0x175c), flags -- 0x1, mac -- 00:03:7f:12:34:56
  5112. * freq_flags will be: 0x175c0001
  5113. * macaddr31to00 will be: 0x127f0300
  5114. * macaddr47to32 will be: 0x00005634
  5115. */
  5116. typedef struct {
  5117. /*
  5118. * freq unit: MHz (upper 16bits -- value)
  5119. * flags (lower 16bits -- bitfield): valid for the freq bssid
  5120. * The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
  5121. */
  5122. A_UINT32 freq_flags;
  5123. /* legacy bssid addr, use same macro to convert: WMI_MAC_ADDR_TO_CHAR_ARRAY, WMI_CHAR_ARRAY_TO_MAC_ADDR */
  5124. wmi_mac_addr bssid;
  5125. } wmi_hint_freq_bssid;
  5126. /** macro to get freq and corresponding flags from wmi_hint_freq_short_ssid */
  5127. #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)
  5128. #define WMI_GET_FLAGS_FROM_HINT_FREQ_SHORT_SSID(pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) & 0xffff)
  5129. /** macro to set freq and corresponding flags in wmi_hint_freq_short_ssid */
  5130. #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))
  5131. #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))
  5132. /** macro to get freq and corresponding flags from wmi_hint_freq_bssid */
  5133. #define WMI_GET_FREQ_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) ((((pwmi_hint_freq_bssid_addr)->freq_flags) >> 16) & 0xffff)
  5134. #define WMI_GET_FLAGS_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) & 0xffff)
  5135. /** macro to set freq and corresponding flags in wmi_hint_freq_bssid */
  5136. #define WMI_SET_FREQ_IN_HINT_FREQ_BSSID(freq, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= ((freq) << 16))
  5137. #define WMI_SET_FLAGS_IN_HINT_FREQ_BSSID(flags, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= (flags))
  5138. /** other macro for 6 GHZ, TU (time unit), 20TU normally it is 20ms */
  5139. #define MAX_NUM_20TU_EACH_CH 6
  5140. #define MAX_NUM_S_SSID_EACH_20TU 1
  5141. #define MAX_NUM_BSSID_EACH_20TU 3
  5142. /* prefix used by scan requestor ids on the host */
  5143. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  5144. /* prefix used by scan request ids generated on the host */
  5145. /* host cycles through the lower 12 bits to generate ids */
  5146. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  5147. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  5148. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  5149. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
  5150. /* NOTE: This constant cannot be changed without breaking WMI compatibility */
  5151. #define WMI_IE_BITMAP_SIZE 8
  5152. #define WMI_SCAN_MLD_PARAM_MLD_ID_GET(mld_param) WMI_GET_BITS(mld_param, 0, 8)
  5153. #define WMI_SCAN_MLD_PARAM_MLD_ID_SET(mld_param, val) WMI_SET_BITS(mld_param, 0, 8, val)
  5154. typedef struct {
  5155. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  5156. /** Scan ID (lower 16 bits) MSB 4 bits is used to identify scan client based on enum WMI_SCAN_CLIENT_ID */
  5157. A_UINT32 scan_id;
  5158. /** Scan requestor ID (lower 16 bits) is used by scan client to classify the scan source, reason, ...etc */
  5159. A_UINT32 scan_req_id;
  5160. /** VDEV id(interface) that is requesting scan */
  5161. A_UINT32 vdev_id;
  5162. /** Scan Priority, input to scan scheduler */
  5163. A_UINT32 scan_priority;
  5164. /** Scan events subscription */
  5165. A_UINT32 notify_scan_events;
  5166. /** dwell time in msec on active channels */
  5167. A_UINT32 dwell_time_active;
  5168. /** dwell time in msec on passive channels */
  5169. A_UINT32 dwell_time_passive;
  5170. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  5171. A_UINT32 min_rest_time;
  5172. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  5173. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  5174. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  5175. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  5176. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  5177. * irrespective of activity. activity is determined by the idle_time parameter.
  5178. */
  5179. A_UINT32 max_rest_time;
  5180. /** time before sending next set of probe requests.
  5181. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  5182. * The number of probe requests specified depends on the ssid_list and bssid_list
  5183. */
  5184. A_UINT32 repeat_probe_time;
  5185. /** time in msec between 2 consecutive probe requests with in a set. */
  5186. A_UINT32 probe_spacing_time;
  5187. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  5188. A_UINT32 idle_time;
  5189. /** maximum time in msec allowed for scan */
  5190. A_UINT32 max_scan_time;
  5191. /** delay in msec before sending first probe request after switching to a channel */
  5192. A_UINT32 probe_delay;
  5193. /** Scan control flags */
  5194. A_UINT32 scan_ctrl_flags;
  5195. /** Burst duration time in msec*/
  5196. A_UINT32 burst_duration;
  5197. /** # if channels to scan. In the TLV channel_list[] */
  5198. A_UINT32 num_chan;
  5199. /** number of bssids. In the TLV bssid_list[] */
  5200. A_UINT32 num_bssid;
  5201. /** number of ssid. In the TLV ssid_list[] */
  5202. A_UINT32 num_ssids;
  5203. /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
  5204. A_UINT32 ie_len;
  5205. /** Max number of probes to be sent */
  5206. A_UINT32 n_probes;
  5207. /** MAC Address to use in Probe Req as SA **/
  5208. wmi_mac_addr mac_addr;
  5209. /** Mask on which MAC has to be randomized **/
  5210. wmi_mac_addr mac_mask;
  5211. /** ie bitmap to use in probe req **/
  5212. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  5213. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  5214. A_UINT32 num_vendor_oui;
  5215. /** Scan control flags extended **/
  5216. A_UINT32 scan_ctrl_flags_ext;
  5217. /** dwell time in msec on active 2G channels, if it's not zero */
  5218. A_UINT32 dwell_time_active_2g;
  5219. /**
  5220. * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
  5221. * as an active channel
  5222. */
  5223. A_UINT32 dwell_time_active_6ghz;
  5224. /**
  5225. * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
  5226. * as a passive channel
  5227. */
  5228. A_UINT32 dwell_time_passive_6ghz;
  5229. /**
  5230. * Offset time is in milliseconds per channel.
  5231. */
  5232. A_UINT32 scan_start_offset;
  5233. /**
  5234. * minimum dwell time in msec for 6 GHz channel
  5235. * We'll listen for this time on the channel; if no beacon /
  5236. * probe response / FILS frame are received during this time
  5237. * we'll move to next channel.
  5238. */
  5239. A_UINT32 min_dwell_time_6ghz;
  5240. /**
  5241. * dwell time in msec for 6 GHz channel of spectral scan channel list
  5242. */
  5243. A_UINT32 dwell_time_spectral_ch;
  5244. /**
  5245. * B0-B7: mld id to be inserted in ML probe request
  5246. * B8-B31: reserved
  5247. */
  5248. A_UINT32 mld_parameter;
  5249. /**
  5250. * TLV (tag length value) parameters follow the scan_cmd
  5251. * structure. The TLV's are:
  5252. * channel_list:
  5253. * If FW supports WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL,
  5254. * then channel_list may fill the upper 12 bits with channel flags,
  5255. * while using only the lower 20 bits for channel frequency.
  5256. * Check WMI_SCAN_CHANNEL_FLAG macros for the channel flags
  5257. * If FW doesn't support WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL,
  5258. * then channel_list only holds the frequency value
  5259. * Use WMI_SCAN_CHANNEL_FREQ_MASK & WMI_SCAN_CHANNEL_FLAGS_MASK
  5260. * A_UINT32 channel_list[num_chan]; // in MHz
  5261. * wmi_ssid ssid_list[num_ssids];
  5262. * wmi_mac_addr bssid_list[num_bssid];
  5263. * A_UINT8 ie_data[ie_len];
  5264. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  5265. * A_UINT8 phymode_list[0 or num_chan]; // see WMI_SCAN_CHAN_MODE macros
  5266. * wmi_hint_freq_short_ssid hint_freq_short_ssid[num]; // the num can be calculated by TLV len
  5267. * wmi_hint_freq_bssid hint_freq_bssid[num]; // the num can be calculated by TLV len
  5268. * A_UINT32 spectral_chan_list[num]; // in MHz, the num can be calculated by TLV len
  5269. * *** NOTE:
  5270. * *** Use caution when using further TLVs, in case the additional
  5271. * *** TLVs cause the message size to exceed the of the buffer to
  5272. * *** hold the message.
  5273. */
  5274. } wmi_start_scan_cmd_fixed_param;
  5275. /**
  5276. * scan control flags.
  5277. */
  5278. /** passively scan all channels including active channels */
  5279. #define WMI_SCAN_FLAG_PASSIVE 0x1
  5280. /** add wild card ssid probe request even though ssid_list is specified. */
  5281. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  5282. /** add cck rates to rates/xrate ie for the generated probe request */
  5283. #define WMI_SCAN_ADD_CCK_RATES 0x4
  5284. /** add ofdm rates to rates/xrate ie for the generated probe request */
  5285. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  5286. /** To enable indication of Chan load and Noise floor to host */
  5287. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  5288. /** Filter Probe request frames */
  5289. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  5290. /**When set, not to scan DFS channels*/
  5291. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  5292. /**When set, certain errors are ignored and scan continues.
  5293. * Different FW scan engine may use its own logic to decide what errors to ignore*/
  5294. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  5295. /** Enable promiscuous mode for CCXv4 */
  5296. #define WMI_SCAN_FILTER_PROMISCOUS 0x100
  5297. /** allow to send probe req on DFS channel */
  5298. #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
  5299. /** add TPC content in probe req frame */
  5300. #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
  5301. /** add DS content in probe req frame */
  5302. #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
  5303. /** use random mac address for TA for probe request frame and add
  5304. * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
  5305. * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
  5306. #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
  5307. /** allow mgmt transmission during off channel scan */
  5308. #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
  5309. /** allow data transmission during off channel scan */
  5310. #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
  5311. /** allow capture ppdu with phy errors */
  5312. #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
  5313. /** always do passive scan on passive channels */
  5314. #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x10000
  5315. /** set HALF (10MHz) rate support */
  5316. #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
  5317. /** set Quarter (5MHz) rate support */
  5318. #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
  5319. #define WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ 0x80000
  5320. #define WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ 0x100000
  5321. /** pause home channel when scan channel is same as home channel */
  5322. #define WMI_SCAN_FLAG_PAUSE_HOME_CHANNEL 0x200000
  5323. /**
  5324. * report CCA busy for each possible 20Mhz subbands of the wideband scan channel
  5325. */
  5326. #define WMI_SCAN_FLAG_REPORT_CCA_BUSY_FOREACH_20MHZ 0x400000
  5327. /** for adaptive scan mode using 3 bits (21 - 23 bits) */
  5328. #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
  5329. #define WMI_SCAN_DWELL_MODE_SHIFT 21
  5330. typedef enum {
  5331. WMI_SCAN_DWELL_MODE_DEFAULT = 0,
  5332. WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
  5333. WMI_SCAN_DWELL_MODE_MODERATE = 2,
  5334. WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
  5335. WMI_SCAN_DWELL_MODE_STATIC = 4,
  5336. } WMI_SCAN_DWELL_MODE;
  5337. #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
  5338. do { \
  5339. (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
  5340. WMI_SCAN_DWELL_MODE_MASK); \
  5341. } while (0)
  5342. #define WMI_SCAN_GET_DWELL_MODE(flag) \
  5343. (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
  5344. /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  5345. #define WMI_SCAN_CLASS_MASK 0xFF000000
  5346. /*
  5347. * Masks identifying types/ID of scans
  5348. * Scan_Stop macros should be the same value as below defined in UMAC
  5349. * #define IEEE80211_SPECIFIC_SCAN 0x00000000
  5350. * #define IEEE80211_VAP_SCAN 0x01000000
  5351. * #define IEEE80211_ALL_SCANS 0x04000000
  5352. */
  5353. /* WMI_SCAN_STOP_ONE:
  5354. * Stop one scan which matches with scan_id provided in scan stop command.
  5355. */
  5356. #define WMI_SCAN_STOP_ONE 0x00000000
  5357. /* WMI_SCN_STOP_VAP_ALL:
  5358. * Stop all scans (host scans and FW internal scans) on provided vdev.
  5359. */
  5360. #define WMI_SCN_STOP_VAP_ALL 0x01000000
  5361. /* WMI_SCN_STOP_HOST_VAP_ALL:
  5362. * Stop all host scans on provided vdev.
  5363. */
  5364. #define WMI_SCN_STOP_HOST_VAP_ALL 0x02000000
  5365. /* WMI_SCAN_STOP_ALL:
  5366. * Stop all scans (host scans and FW internal scans) on all vdevs.
  5367. */
  5368. #define WMI_SCAN_STOP_ALL 0x04000000
  5369. /** extended Scan ctrl flags **/
  5370. #define WMI_SCAN_FLAG_EXT_DBS_SCAN_POLICY_MASK 0x00000003 /* Bit 0-1 reserved for DBS scan selection policy.*/
  5371. #define WMI_SCAN_DBS_POLICY_DEFAULT 0x0 /** Select duty cycle if configured, else fall back to whatever
  5372. policy scan manager computes */
  5373. #define WMI_SCAN_DBS_POLICY_FORCE_NONDBS 0x1 /** Force to select Non-DBS scan */
  5374. #define WMI_SCAN_DBS_POLICY_IGNORE_DUTY 0x2 /** Ignore duty cycle even if configured and fall back to whatever
  5375. policy scan manager computes*/
  5376. #define WMI_SCAN_DBS_POLICY_RESERVED 0x3
  5377. #define WMI_SCAN_DBS_POLICY_MAX 0x3
  5378. /* Enable Reception of Public Action frame with this flag */
  5379. #define WMI_SCAN_FLAG_EXT_FILTER_PUBLIC_ACTION_FRAME 0x00000004
  5380. /* Indicate to scan all PSC channel */
  5381. #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_PSC_CH 0x00000008
  5382. /* Indicate to scan all NON-PSC channel */
  5383. #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_NON_PSC_CH 0x00000010
  5384. /* Indicate to save scan result matching hint from scan client */
  5385. #define WMI_SCAN_FLAG_EXT_6GHZ_MATCH_HINT 0x00000020
  5386. /* Skip any ch on which no any RNR had been received */
  5387. #define WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH 0x00000040
  5388. /* Indicate client hint req is high priority than fw rnr or FILS disc */
  5389. #define WMI_SCAN_FLAG_EXT_6GHZ_CLIENT_HIGH_PRIORITY 0x00000080
  5390. /* Force all 6 GHz scan channels to active channel */
  5391. #define WMI_SCAN_FLAG_EXT_6GHZ_FORCE_CHAN_ACTIVE 0x00000100
  5392. /* Force broadcast address in RA even though specified bssid */
  5393. #define WMI_SCAN_FLAG_EXT_FORCE_BRCAST_RA 0x00000200
  5394. /* Extend 6 GHz channel measure time */
  5395. #define WMI_SCAN_FLAG_EXT_6GHZ_EXTEND_MEASURE_TIME 0x00000400
  5396. /**
  5397. * Currently passive scan has higher priority than beacon and
  5398. * beacon miss would happen irrespective of dwell time.
  5399. * Below flag ensures there would not be beacon miss if the dwell
  5400. * time is lesser than beacon interval - channel switch time combined.
  5401. * For dwell time greater than beacon interval, bmiss is expected.
  5402. */
  5403. #define WMI_SCAN_FLAG_EXT_PASSIVE_SCAN_START_TIME_ENHANCE 0x00000800
  5404. /* Force unicast address in RA */
  5405. #define WMI_SCAN_FLAG_EXT_FORCE_UNICAST_RA 0x00001000
  5406. /**
  5407. * Indicate to add 10 Mhz offset to spectral scan center frequencies
  5408. * sent by Host when checking against support channel list in FW
  5409. */
  5410. #define WMI_SCAN_FLAG_EXT_SPECTRAL_CFREQ_PLUS_10MHZ_IN_SUPP_CH_LIST 0x00002000
  5411. /* Include MLO IE in Probe req */
  5412. #define WMI_SCAN_FLAG_EXT_INCL_MLIE_PRB_REQ 0x00004000
  5413. #define WMI_SCAN_FLAG_EXT_LOW_LATENCY_SCAN 0x00008000
  5414. #define WMI_SCAN_FLAG_EXT_RELIABLE_SCAN 0x00010000
  5415. #define WMI_SCAN_FLAG_EXT_FAST_SCAN 0x00020000
  5416. #define WMI_SCAN_FLAG_EXT_LOW_POWER_SCAN 0x00040000
  5417. #define WMI_SCAN_FLAG_EXT_STOP_IF_BSSID_FOUND 0x00080000
  5418. #define WMI_SCAN_FLAG_EXT_P2P_SCAN 0x00100000
  5419. /**
  5420. * new 6 GHz flags per chan (short ssid or bssid) in struct
  5421. * wmi_hint_freq_short_ssid or wmi_hint_freq_bssid
  5422. */
  5423. /* Indicate not to send probe req for short_ssid or bssid on that channel */
  5424. #define WMI_SCAN_HINT_FLAG_SKIP_TX_PROBE_REQ 0x00000001
  5425. /* Force channel in WMI hint to active channel */
  5426. #define WMI_SCAN_HINT_FLAG_FORCE_CHAN_ACTIVE 0x00000002
  5427. /* Combine short SSID with legacy bssid list */
  5428. #define WMI_SCAN_HINT_FLAG_COMBINE_BSSID_LIST 0x00000004
  5429. #define WMI_SCAN_CHANNEL_FREQ_MASK 0x000FFFFF
  5430. #define WMI_SCAN_CHANNEL_FLAGS_MASK 0xFFF00000
  5431. /**
  5432. * Per channel configuration flags
  5433. */
  5434. /**
  5435. * WMI_SCAN_CHANNEL_FLAG_SCAN_ONLY_IF_RNR_FOUND:
  5436. * If this flag is set, then scan only if the corresponding channel
  5437. * is found via RNR IE during 2g/5g scan.
  5438. * If this flag is not set, then FW always scans the channel
  5439. * irrespective of RNR and also FW ignores
  5440. * WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH flag
  5441. */
  5442. #define WMI_SCAN_CHANNEL_FLAG_SCAN_ONLY_IF_RNR_FOUND 0x001
  5443. typedef struct {
  5444. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  5445. /** requestor requesting cancel */
  5446. A_UINT32 requestor;
  5447. /** Scan ID */
  5448. A_UINT32 scan_id;
  5449. /**
  5450. * Req Type
  5451. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  5452. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id (on a specific pdev in DBDC)
  5453. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  5454. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine (on a specific pdev in DBDC)
  5455. */
  5456. A_UINT32 req_type;
  5457. /**
  5458. * vDev ID
  5459. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  5460. */
  5461. A_UINT32 vdev_id;
  5462. /** pdev_id for identifying the MAC
  5463. * See macros starting with WMI_PDEV_ID_ for values.
  5464. * In non-DBDC case host should set it to 0
  5465. */
  5466. A_UINT32 pdev_id;
  5467. } wmi_stop_scan_cmd_fixed_param;
  5468. #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
  5469. #define WMI_APPEND_TO_EXISTING_CHAN_LIST 0x1
  5470. #define WMI_CHANNEL_MAX_BANDWIDTH_VALID 0x2
  5471. #define WMI_HONOR_HOST_6GHZ_CHANNEL_PASSIVE 0x4
  5472. /*
  5473. * To preserve backwards compatibility, retain old names (without WMI_ prefix)
  5474. * as aliases for the corrected names (with WMI_ prefix).
  5475. */
  5476. #define APPEND_TO_EXISTING_CHAN_LIST WMI_APPEND_TO_EXISTING_CHAN_LIST
  5477. #define CHANNEL_MAX_BANDWIDTH_VALID WMI_CHANNEL_MAX_BANDWIDTH_VALID
  5478. typedef struct {
  5479. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
  5480. A_UINT32 num_scan_chans; /** no of elements in chan_info[] */
  5481. A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
  5482. 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. */
  5483. /** Followed by the variable length TLV chan_info:
  5484. * wmi_channel chan_info[] */
  5485. } wmi_scan_chan_list_cmd_fixed_param;
  5486. /*
  5487. * Priority numbers must be sequential, starting with 0.
  5488. */
  5489. /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
  5490. typedef enum {
  5491. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  5492. WMI_SCAN_PRIORITY_LOW,
  5493. WMI_SCAN_PRIORITY_MEDIUM,
  5494. WMI_SCAN_PRIORITY_HIGH,
  5495. WMI_SCAN_PRIORITY_VERY_HIGH,
  5496. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  5497. } wmi_scan_priority;
  5498. /* Five Levels for Requested Priority */
  5499. /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
  5500. typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
  5501. /**
  5502. * 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
  5503. * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
  5504. * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
  5505. */
  5506. typedef struct {
  5507. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
  5508. /**
  5509. * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
  5510. * 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
  5511. */
  5512. A_UINT32 vdev_type;
  5513. /**
  5514. * number of rows in mapping_table for a specific vdev
  5515. * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
  5516. */
  5517. A_UINT32 number_rows;
  5518. /**
  5519. * pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values.
  5520. * In non-DBDC case host should set it to 0
  5521. */
  5522. A_UINT32 pdev_id;
  5523. /** mapping_table for a specific vdev follows this TLV
  5524. * WLAN_PRIORITY_MAPPING mapping_table[]; */
  5525. } wmi_scan_sch_priority_table_cmd_fixed_param;
  5526. /** update flags */
  5527. #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
  5528. #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
  5529. #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
  5530. typedef struct {
  5531. A_UINT32 tlv_header;
  5532. /** requestor requesting update scan request */
  5533. A_UINT32 requestor;
  5534. /** Scan ID of the scan request that need to be update */
  5535. A_UINT32 scan_id;
  5536. /** update flags, indicating which of the following fields are valid and need to be updated*/
  5537. A_UINT32 scan_update_flags;
  5538. /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
  5539. A_UINT32 scan_priority;
  5540. /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
  5541. A_UINT32 min_rest_time;
  5542. /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
  5543. A_UINT32 max_rest_time;
  5544. /** 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 */
  5545. A_UINT32 pdev_id;
  5546. } wmi_scan_update_request_cmd_fixed_param;
  5547. #define WMI_SCAN_PROBE_OUI_SPOOFED_MAC_IN_PROBE_REQ 0x1
  5548. #define WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ 0x2
  5549. #define WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ 0x4
  5550. typedef struct _wmi_vendor_oui {
  5551. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_oui */
  5552. A_UINT32 oui_type_subtype; /** Vendor OUI type and subtype, lower 3 bytes is type and highest byte is subtype**/
  5553. }wmi_vendor_oui;
  5554. typedef struct {
  5555. A_UINT32 tlv_header;
  5556. /** oui to be used in probe request frame when random mac addresss is
  5557. * requested part of scan parameters. this is applied to both FW internal scans and
  5558. * host initated scans. host can request for random mac address with
  5559. * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
  5560. A_UINT32 prob_req_oui;
  5561. A_UINT32 vdev_id;
  5562. /** Control Flags **/
  5563. A_UINT32 flags;
  5564. /** ie bitmap to use in probe req **/
  5565. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  5566. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  5567. A_UINT32 num_vendor_oui;
  5568. /** 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 */
  5569. A_UINT32 pdev_id;
  5570. /* Following this tlv, there comes an array of structure of type wmi_vendor_oui
  5571. wmi_vendor_oui vendor_oui[];*/
  5572. } wmi_scan_prob_req_oui_cmd_fixed_param;
  5573. enum wmi_scan_event_type {
  5574. WMI_SCAN_EVENT_STARTED = 0x1,
  5575. WMI_SCAN_EVENT_COMPLETED = 0x2,
  5576. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  5577. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  5578. WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
  5579. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
  5580. WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
  5581. WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
  5582. WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  5583. WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
  5584. WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
  5585. WMI_SCAN_EVENT_MAX = 0x8000
  5586. };
  5587. enum wmi_scan_completion_reason {
  5588. /** scan related events */
  5589. WMI_SCAN_REASON_NONE = 0xFF,
  5590. WMI_SCAN_REASON_COMPLETED = 0,
  5591. WMI_SCAN_REASON_CANCELLED = 1,
  5592. WMI_SCAN_REASON_PREEMPTED = 2,
  5593. WMI_SCAN_REASON_TIMEDOUT = 3,
  5594. WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
  5595. WMI_SCAN_REASON_SUSPENDED = 5,
  5596. WMI_SCAN_REASON_DFS_VIOLATION = 6, /* Failure when tried to SCAN channel in NOL list */
  5597. WMI_SCAN_REASON_MAX,
  5598. };
  5599. #define WMI_SCAN_EVT_IS_SCAN_TYPE_P2P_FLAG_SET(flag, value) \
  5600. WMI_SET_BITS(flag, 0, 1, value)
  5601. #define WMI_SCAN_EVT_IS_SCAN_TYPE_P2P_FLAG_GET(flag) \
  5602. WMI_GET_BITS(flag, 0, 1)
  5603. typedef struct {
  5604. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
  5605. /** scan event (wmi_scan_event_type) */
  5606. A_UINT32 event;
  5607. /** status of the scan completion event */
  5608. A_UINT32 reason;
  5609. /** channel freq , only valid for FOREIGN channel event*/
  5610. A_UINT32 channel_freq;
  5611. /**id of the requestor whose scan is in progress */
  5612. A_UINT32 requestor;
  5613. /**id of the scan that is in progress */
  5614. A_UINT32 scan_id;
  5615. /**id of VDEV that requested the scan */
  5616. A_UINT32 vdev_id;
  5617. /** TSF Timestamp when the scan event (wmi_scan_event_type) is completed
  5618. * In case of AP it is TSF of the AP vdev
  5619. * In case of STA connected state this is the TSF of the AP
  5620. * In case of STA not connected it will be the free running HW timer
  5621. */
  5622. A_UINT32 tsf_timestamp;
  5623. /** flags:
  5624. * Bit[0] - indicate if scan type is for p2p
  5625. * Bit[1:31] - reserved
  5626. */
  5627. A_UINT32 flags;
  5628. } wmi_scan_event_fixed_param;
  5629. /* WMI Diag event */
  5630. typedef struct {
  5631. A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
  5632. A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
  5633. A_UINT32 count; /* Number of diag frames added to current event */
  5634. A_UINT32 dropped;
  5635. /* followed by WMITLV_TAG_ARRAY_BYTE */
  5636. } wmi_diag_event_fixed_param;
  5637. #define WMI_11K_OFFLOAD_BITMAP_NEIGHBOR_REPORT_REQ 0x1
  5638. typedef struct {
  5639. A_UINT32 time_offset; /* positive offset in secs from the time 11k offload command has been received, 0xFFFFFFFF if offset is not valid */
  5640. 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 */
  5641. A_UINT32 bmiss_count_trigger; /* value 1 is to send neighbor report at 1st BMISS, 0xFFFFFFFF if input is not valid */
  5642. A_UINT32 per_threshold_offset; /* percentage offset from the current per_threshold, 0xFFFFFFFF if input is not valid */
  5643. 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 */
  5644. 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
  5645. * neighbor report requests that will be sent by FW after every roam */
  5646. wmi_ssid ssid; /* ssid of current connected AP FW might choose to use this SSID in the neighbor report req frame if it is
  5647. * interested in candidate of the same SSID */
  5648. } wmi_neighbor_report_offload;
  5649. typedef struct {
  5650. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param */
  5651. A_UINT32 vdev_id;
  5652. A_UINT32 offload_11k; /* bitmask to indicate to FW what all 11k features are offloaded */
  5653. } wmi_11k_offload_report_fixed_param;
  5654. typedef struct {
  5655. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_neighbor_report_offload_tlv_param */
  5656. wmi_neighbor_report_offload neighbor_rep_ofld_params;
  5657. } wmi_neighbor_report_11k_offload_tlv_param;
  5658. #define WMI_INVOKE_NEIGHBOR_REPORT_FLAGS_SEND_RESP_TO_HOST 0x1
  5659. typedef struct {
  5660. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param */
  5661. A_UINT32 vdev_id;
  5662. A_UINT32 flags;
  5663. wmi_ssid ssid; /* if ssid.len == 0, firmware doesn't include ssid sub-element.
  5664. * In that case AP gives all the candidates in ESS without SSID filter
  5665. * If host wants to insert ssid subelement in the neighbor report request frame, then it can specify the ssid here */
  5666. } wmi_11k_offload_invoke_neighbor_report_fixed_param;
  5667. #define WMI_MAX_PMKID_LEN 16
  5668. #define WMI_MAX_PMK_LEN 64
  5669. #define WMI_PMK_CACHE_CAT_FLAG_BSSID 0x1
  5670. #define WMI_PMK_CACHE_CAT_FLAG_SSID_CACHE_ID 0x2
  5671. #define WMI_PMK_CACHE_ACTION_FLAG_ADD_ENTRY 0x1
  5672. #define WMI_PMK_CACHE_ACTION_FLAG_DEL_ENTRY 0x2
  5673. typedef struct {
  5674. A_UINT32 tlv_header;
  5675. A_UINT32 pmk_len;
  5676. 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,
  5677. in spite of the automatic byte-swap applied to WMI messages during download*/
  5678. A_UINT32 pmkid_len;
  5679. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  5680. wmi_mac_addr bssid;
  5681. wmi_ssid ssid;
  5682. A_UINT32 cache_id;
  5683. A_UINT32 cat_flag; // whether (bssid) or (ssid,cache_id) is valid
  5684. A_UINT32 action_flag; // add/delete the entry
  5685. } wmi_pmk_cache;
  5686. #define WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL 0x1
  5687. typedef struct {
  5688. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pmk_cache_cmd_fixed_param */
  5689. A_UINT32 op_flag; //option to flush all the cache at once
  5690. A_UINT32 vdev_id;
  5691. A_UINT32 num_cache;
  5692. /**
  5693. * TLV (tag length value) parameters follow the update_pmk_cache cmd
  5694. * structure. The TLV's are:
  5695. * wmi_pmk_cache cache_list[];
  5696. */
  5697. } wmi_pdev_update_pmk_cache_cmd_fixed_param;
  5698. #define WMI_FILS_MAX_USERNAME_LEN 16
  5699. #define WMI_FILS_MAX_REALM_LEN 256
  5700. #define WMI_FILS_MAX_RRK_LEN 64
  5701. #define WMI_FILS_MAX_RIK_LEN 64
  5702. /* for big-endian hosts, manual endian conversion will be needed to keep the array values in their original order,
  5703. in spite of the automatic byte-swap applied to WMI messages during download*/
  5704. typedef struct {
  5705. A_UINT8 username[WMI_FILS_MAX_USERNAME_LEN];
  5706. A_UINT32 username_length;
  5707. A_UINT32 next_erp_seq_num;
  5708. A_UINT8 rRk[WMI_FILS_MAX_RRK_LEN];
  5709. A_UINT32 rRk_length;
  5710. A_UINT8 rIk[WMI_FILS_MAX_RIK_LEN];
  5711. A_UINT32 rIk_length;
  5712. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  5713. A_UINT32 realm_len;
  5714. } wmi_erp_info;
  5715. enum wmi_fils_hlp_pkt_type {
  5716. WMI_FILS_HLP_PKT_TYPE_DHCP_DISCOVER = 1,
  5717. };
  5718. typedef struct {
  5719. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_offload_tlv_param */
  5720. A_UINT32 flags;
  5721. wmi_erp_info vdev_erp_info;
  5722. } wmi_roam_fils_offload_tlv_param;
  5723. typedef struct {
  5724. A_UINT32 tlv_header; /** tag WMITLV_TAG_STRUC_wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param**/
  5725. A_UINT32 flags;
  5726. A_UINT32 vdev_id;
  5727. A_UINT32 size;
  5728. A_UINT32 pkt_type; // filled using enum wmi_fils_hlp_pkt_type
  5729. // A_UINT8 fils_hlp_pkt[];
  5730. } wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param;
  5731. #define WMI_MAX_KEK_LEN 64
  5732. #define GTK_OFFLOAD_KEK_EXTENDED_BYTES WMI_MAX_KEK_LEN /*KEK len has been increased to 64 to support FILS security.
  5733. To not break backward compatibility, new GTK_OFFLOAD_KEK_EXTENDED_BYTES has been defined without modifying old GTK_OFFLOAD_KEK_BYTES */
  5734. typedef struct {
  5735. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_synch_tlv_param */
  5736. A_UINT32 update_erp_next_seq_num;// Boolean denoting whether next erp_seq_num changed or not.
  5737. A_UINT32 next_erp_seq_num;
  5738. A_UINT32 kek_len;
  5739. A_UINT8 kek[WMI_MAX_KEK_LEN];
  5740. A_UINT32 pmk_len;
  5741. A_UINT8 pmk[WMI_MAX_PMK_LEN];
  5742. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  5743. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  5744. A_UINT32 realm_len;
  5745. } wmi_roam_fils_synch_tlv_param;
  5746. /*
  5747. * FW sends PMK cache of roamed candidate to host to sync pmk cache with host
  5748. */
  5749. typedef struct {
  5750. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmk_cache_synch_tlv_param */
  5751. A_UINT32 pmk_len;
  5752. A_UINT8 pmk[WMI_MAX_PMK_LEN];
  5753. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  5754. } wmi_roam_pmk_cache_synch_tlv_param;
  5755. /**
  5756. * WMI_ROAM_LINK_FLAG_XXX definition:
  5757. */
  5758. #define WMI_ROAM_LINK_FLAG_DISABLE 0x1 /* link is disabled, host can overwrite it later. */
  5759. typedef struct {
  5760. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ml_setup_links_param */
  5761. A_UINT32 vdev_id; /* when vdev_id is 0xffffffff, means the link_id hasn't attached to vdev */
  5762. A_UINT32 link_id; /* link id defined as in 802.11 BE spec. */
  5763. wmi_channel channel; /* link primary channel */
  5764. /**
  5765. * link flags: refer WMI_ROAM_LINK_FLAG_XXX.
  5766. */
  5767. A_UINT32 flags;
  5768. wmi_mac_addr link_addr; /* link address */
  5769. wmi_mac_addr self_link_addr; /* self-link address */
  5770. } wmi_roam_ml_setup_links_param;
  5771. /*
  5772. * If FW has multiple active channels due to MCC(multi channel concurrency),
  5773. * then these stats are combined stats for all the active channels.
  5774. */
  5775. typedef struct {
  5776. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
  5777. /** ack count, it is an incremental number, not accumulated number */
  5778. A_UINT32 ackRcvBad;
  5779. /** bad rts count, it is an incremental number, not accumulated number */
  5780. A_UINT32 rtsBad;
  5781. /** good rts, it is an incremental number, not accumulated number */
  5782. A_UINT32 rtsGood;
  5783. /** fcs count, it is an incremental number, not accumulated number */
  5784. A_UINT32 fcsBad;
  5785. /** beacon count, it is an incremental number, not accumulated number */
  5786. A_UINT32 noBeacons;
  5787. } wmi_update_whal_mib_stats_event_fixed_param;
  5788. /*
  5789. * This defines how much headroom is kept in the
  5790. * receive frame between the descriptor and the
  5791. * payload, in order for the WMI PHY error and
  5792. * management handler to insert header contents.
  5793. *
  5794. * This is in bytes.
  5795. */
  5796. #define WMI_MGMT_RX_HDR_HEADROOM (sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr))
  5797. /** This event will be used for sending scan results
  5798. * as well as rx mgmt frames to the host. The rx buffer
  5799. * will be sent as part of this WMI event. It would be a
  5800. * good idea to pass all the fields in the RX status
  5801. * descriptor up to the host.
  5802. */
  5803. /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
  5804. #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
  5805. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
  5806. #define WMI_MGMT_RX_HDR_EXTSCAN 0x01
  5807. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of matched network by FW ENLO */
  5808. #define WMI_MGMT_RX_HDR_ENLO 0x02
  5809. #define MAX_ANTENNA_EIGHT 8
  5810. /** Helper macro for params GET/SET of MGMT_RX_FW_CONSUMED_EVENTID */
  5811. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_PEER_ID_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 0, 16)
  5812. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_PEER_ID_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 0, 16, value)
  5813. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_IEEE_LINK_ID_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 16, 3)
  5814. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_IEEE_LINK_ID_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 16, 3, value)
  5815. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_SUBTYPE_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 28, 4)
  5816. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_SUBTYPE_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 28, 4, value)
  5817. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_MGMT_PKT_CTR_VALID_GET(mgmt_pkt_ctr_info) WMI_GET_BITS(mgmt_pkt_ctr_info, 15, 1)
  5818. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_MGMT_PKT_CTR_VALID_SET(mgmt_pkt_ctr_info, value) WMI_SET_BITS(mgmt_pkt_ctr_info, 15, 1, value)
  5819. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_MGMT_PKT_CTR_GET(mgmt_pkt_ctr_info) WMI_GET_BITS(mgmt_pkt_ctr_info, 16, 16)
  5820. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_MGMT_PKT_CTR_SET(mgmt_pkt_ctr_info, value) WMI_SET_BITS(mgmt_pkt_ctr_info, 16, 16, value)
  5821. typedef struct {
  5822. A_UINT32 tlv_header; /* WMITLV_TAG_STRUCT_wmi_mgmt_rx_fw_consumed_hdr */
  5823. A_UINT32 rx_tsf_l32; /* h/w assigned timestamp of the rx frame in micro sec */
  5824. A_UINT32 rx_tsf_u32 ;/* h/w assigned timestamp of the rx frame in micro sec */
  5825. A_UINT32 pdev_id; /* pdev_id for identifying the MAC the rx mgmt frame was received by */
  5826. /**
  5827. * peer_info_subtype
  5828. *
  5829. * [15:0]: ml_peer_id, ML peer_id unique across chips
  5830. * [18:16]: ieee_link_id, protocol link id on which the rx frame is received
  5831. * [27:19]: reserved
  5832. * [31:28]: subtype, subtype of the received MGMT frame
  5833. */
  5834. A_UINT32 peer_info_subtype;
  5835. A_UINT32 chan_freq; /* frequency in MHz of the channel on which this frame was received */
  5836. /* Timestamp (in micro sec) of the last fw consumed/dropped mgmt. frame, same across chips */
  5837. A_UINT32 global_timestamp;
  5838. /**
  5839. * mgmt_pkt_ctr_info
  5840. *
  5841. * [14:0]: reserved
  5842. * [15]: mgmt_pkt_ctr_valid
  5843. * [31:16]: mgmt_pkt_ctr, Sequence number of the last fw consumed mgmt frame
  5844. */
  5845. A_UINT32 mgmt_pkt_ctr_info;
  5846. A_UINT32 rx_ppdu_duration_us; /* receive duration in us */
  5847. A_UINT32 mpdu_end_timestamp; /* mpdu end timestamp in us (based on HWMLO timer) */
  5848. } wmi_mgmt_rx_fw_consumed_hdr;
  5849. /** Helper macro for param GET/SET of mgmt_rx_reo_params */
  5850. #define WMI_MGMT_RX_REO_PARAM_IEEE_LINK_ID_GET(mgmt_pkt_ctr_link_info) WMI_GET_BITS(mgmt_pkt_ctr_link_info, 12, 3)
  5851. #define WMI_MGMT_RX_REO_PARAM_IEEE_LINK_ID_SET(mgmt_pkt_ctr_link_info, value) WMI_SET_BITS(mgmt_pkt_ctr_link_info, 12, 3, value)
  5852. #define WMI_MGMT_RX_REO_PARAM_MGMT_PKT_CTR_VALID_GET(mgmt_pkt_ctr_link_info) WMI_GET_BITS(mgmt_pkt_ctr_link_info, 15, 1)
  5853. #define WMI_MGMT_RX_REO_PARAM_MGMT_PKT_CTR_VALID_SET(mgmt_pkt_ctr_link_info, value) WMI_SET_BITS(mgmt_pkt_ctr_link_info, 15, 1, value)
  5854. #define WMI_MGMT_RX_REO_PARAM_MGMT_PKT_CTR_GET(mgmt_pkt_ctr_link_info) WMI_GET_BITS(mgmt_pkt_ctr_link_info, 16, 16)
  5855. #define WMI_MGMT_RX_REO_PARAM_MGMT_PKT_CTR_SET(mgmt_pkt_ctr_link_info, value) WMI_SET_BITS(mgmt_pkt_ctr_link_info, 16, 16, value)
  5856. /** Data structure of the TLV to add in RX EVENTID for providing REO params
  5857. * like global_timestamp and mgmt_pkt_ctr
  5858. */
  5859. typedef struct {
  5860. A_UINT32 tlv_header; /*TLV WMITLV_TAG_STRUC_wmi_mgmt_rx_reo_params*/
  5861. /* Timestamp (in micro sec) of the last fw forwarded mgmt. frame, same across chips */
  5862. A_UINT32 global_timestamp;
  5863. /**
  5864. * mgmt_pkt_ctr_link_info
  5865. *
  5866. * [11:0]: reserved
  5867. * [14:12]: ieee_link_id, protocol link id on which the rx frame is received
  5868. * [15]: mgmt_pkt_ctr_valid
  5869. * [31:16]: mgmt_pkt_ctr, Sequence number of the last fw forwarded mgmt frame
  5870. */
  5871. A_UINT32 mgmt_pkt_ctr_link_info;
  5872. A_UINT32 rx_ppdu_duration_us; /* receive duration in us */
  5873. A_UINT32 mpdu_end_timestamp; /* mpdu end timestamp in us (based on HWMLO timer) */
  5874. } wmi_mgmt_rx_reo_params;
  5875. /** Helper macro for param GET/SET */
  5876. #define WMI_RX_PARAM_EXT_META_ID_GET(mgmt_rx_params_ext_dword0) WMI_GET_BITS(mgmt_rx_params_ext_dword0, 0, 3)
  5877. #define WMI_RX_PARAM_EXT_META_ID_SET(mgmt_rx_params_ext_dword0, value) WMI_SET_BITS(mgmt_rx_params_ext_dword0, 0, 3, value)
  5878. #define WMI_RX_PARAM_EXT_BA_WIN_SIZE_GET(mgmt_rx_params_ext_dword1) WMI_GET_BITS(mgmt_rx_params_ext_dword1, 0, 16)
  5879. #define WMI_RX_PARAM_EXT_BA_WIN_SIZE_SET(mgmt_rx_params_ext_dword1, value) WMI_SET_BITS(mgmt_rx_params_ext_dword1, 0, 16, value)
  5880. #define WMI_RX_PARAM_EXT_REO_WIN_SIZE_GET(mgmt_rx_params_ext_dword1) WMI_GET_BITS(mgmt_rx_params_ext_dword1, 16, 16)
  5881. #define WMI_RX_PARAM_EXT_REO_WIN_SIZE_SET(mgmt_rx_params_ext_dword1, value) WMI_SET_BITS(mgmt_rx_params_ext_dword1, 16, 16, value)
  5882. typedef enum {
  5883. WMI_RX_PARAMS_EXT_META_ADDBA = 0x0,
  5884. WMI_RX_PARAMS_EXT_META_TWT = 0x1,
  5885. } wmi_mgmt_rx_params_ext_meta_t;
  5886. typedef struct {
  5887. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_mgmt_rx_params_ext) and len */
  5888. union {
  5889. struct {
  5890. A_UINT32
  5891. /* Describes the representation of the data in rx_param_ext_dword1
  5892. * Full set shown in wmi_mgmt_rx_params_ext_meta_t */
  5893. meta_id : 3,
  5894. /* Dedicated for commonly used parameters only */
  5895. reserved_0 : 29;
  5896. };
  5897. A_UINT32 mgmt_rx_params_ext_dword0;
  5898. };
  5899. union {
  5900. struct {
  5901. /* WMI_RX_PARAMS_EXT_META_ADDBA */
  5902. A_UINT32
  5903. ba_win_size :16, /* negotiated BA window size */
  5904. reo_win_size :16; /* 2x the negotiated BA window size to handle any latency across MLO */
  5905. };
  5906. A_UINT32 mgmt_rx_params_ext_dword1;
  5907. };
  5908. union {
  5909. struct {
  5910. /* WMI_RX_PARAMS_EXT_META_TWT */
  5911. A_UINT32 twt_ie_buf_len; /* IE length */
  5912. /* Following this structure is the TLV byte stream of IE data
  5913. * of length twt_ie_buf_len:
  5914. * A_UINT8 ie_data[]; <-- length in bytes given by field
  5915. * twt_ie_buf_len.
  5916. * This ie_data[] would contain only the TWT IE information
  5917. * when twt_ie_buf_len is non zero.
  5918. */
  5919. };
  5920. A_UINT32 mgmt_rx_params_ext_dword2;
  5921. };
  5922. } wmi_mgmt_rx_params_ext;
  5923. typedef struct {
  5924. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
  5925. /** channel on which this frame is received (channel number) */
  5926. A_UINT32 channel;
  5927. /** snr information used to cal RSSI */
  5928. A_UINT32 snr;
  5929. /** Rate kbps */
  5930. A_UINT32 rate;
  5931. /** rx phy mode WLAN_PHY_MODE */
  5932. A_UINT32 phy_mode;
  5933. /** length of the frame */
  5934. A_UINT32 buf_len;
  5935. /** rx status */
  5936. A_UINT32 status; /* capture mode indication */
  5937. /** RSSI of PRI 20MHz for each chain. */
  5938. A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
  5939. /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
  5940. A_UINT32 flags;
  5941. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  5942. A_INT32 rssi;
  5943. /** delta between local TSF(TSF timestamp when frame was RXd)
  5944. * and remote TSF(TSF timestamp in the IE for mgmt frame -
  5945. * beacon,proberesp for e.g). If remote TSF is not available,
  5946. * delta set to 0.
  5947. * Although tsf_delta is stored as A_UINT32, it can be negative,
  5948. * and thus would need to be sign-extended if added to a value
  5949. * larger than 32 bits.
  5950. */
  5951. A_UINT32 tsf_delta;
  5952. /* The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
  5953. * TSF timestamp in the RX MAC descriptor provided by HW.
  5954. */
  5955. A_UINT32 rx_tsf_l32;
  5956. /* The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
  5957. * after the packet is received.
  5958. */
  5959. A_UINT32 rx_tsf_u32;
  5960. /** pdev_id for identifying the MAC the rx mgmt frame was received by
  5961. * See macros starting with WMI_PDEV_ID_ for values.
  5962. */
  5963. A_UINT32 pdev_id;
  5964. /** freq in MHz of the channel on which this frame was received */
  5965. A_UINT32 chan_freq;
  5966. /* This TLV is followed by array of bytes:
  5967. * A_UINT8 bufp[]; <-- management frame buffer
  5968. */
  5969. /* This TLV is optionally followed by array of struct:
  5970. * wmi_rssi_ctl_ext rssi_ctl_ext;
  5971. */
  5972. /*
  5973. * This TLV is followed by struct:
  5974. * wmi_mgmt_rx_reo_params reo_params;// MGMT rx REO params
  5975. */
  5976. /*
  5977. * This TLV is optionally followed by struct:
  5978. * wmi_mgmt_rx_params_ext mgmt_rx_params_ext[0 or 1];
  5979. */
  5980. } wmi_mgmt_rx_hdr;
  5981. /* WMI CMD to receive the management filter criteria from the host */
  5982. typedef struct {
  5983. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_mgmt_reo_filter_cmd_fixed_param */
  5984. A_UINT32 pdev_id; /* pdev_id for identifying the MAC */
  5985. /* filter:
  5986. * Each bit represents the possible combination of frame type (2 bits)
  5987. * and subtype (4 bits)
  5988. * There would be 64 such combinations as per the 802.11 standard
  5989. * For Exp : We have beacon frame, we will take the type and subtype
  5990. * of this frame and concatenate the bits, it will give 6 bits
  5991. * number. We need to go to that bit position in the below
  5992. * 2 filter_low and filter_high bitmap and set the bit.
  5993. */
  5994. A_UINT32 filter_low;
  5995. A_UINT32 filter_high;
  5996. } wmi_mgmt_rx_reo_filter_configuration_cmd_fixed_param;
  5997. typedef struct {
  5998. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_frame_pn_params) and len */
  5999. A_UINT8 cur_pn[WMI_MAX_PN_LEN];
  6000. A_UINT8 prev_pn[WMI_MAX_PN_LEN];
  6001. } wmi_frame_pn_params;
  6002. typedef struct {
  6003. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_is_my_frame) */
  6004. A_UINT32 mgmt_frm_sub_type; /* to indicate which sub-type of MGMT frame */
  6005. A_UINT32 is_my_frame; /* to indicate frame is sent to this BSSID */
  6006. } wmi_is_my_mgmt_frame;
  6007. typedef struct {
  6008. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_ml_info */
  6009. /**
  6010. * CU vdev map to initmate about the on-going Critical update
  6011. * per-link contains 16 VAPs at max.
  6012. */
  6013. /*
  6014. * bits : 0-15 | 16-31
  6015. * link-id : 0 | 1
  6016. */
  6017. A_UINT32 cu_vdev_map_1;
  6018. /*
  6019. * bits : 0-15 | 16-31
  6020. * link-id : 2 | 3
  6021. */
  6022. A_UINT32 cu_vdev_map_2;
  6023. /*
  6024. * bits : 0-15 | 16-31
  6025. * link-id : 4 | 5
  6026. */
  6027. A_UINT32 cu_vdev_map_3;
  6028. /*
  6029. * bits : 0-15 | 16-31
  6030. * link-id : 6 | 7
  6031. */
  6032. A_UINT32 cu_vdev_map_4; /* bits 63:32 */
  6033. /**
  6034. * This is followed by byte array that contains BPCC value per MLO VAP.
  6035. * There will be 16 byte entries for each link corresponding to VAP-ID.
  6036. * So number of byte entries will be (num of max links supported by AP * 16)
  6037. * Note: num of max links supported = 8
  6038. */
  6039. } wmi_mgmt_ml_info;
  6040. #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET(_var) WMI_GET_BITS(_var, 0, 8)
  6041. #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET(_var, _val) WMI_SET_BITS(_var, 0, 8, _val)
  6042. #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_EXP_DUR_GET(_var) WMI_GET_BITS(_var, 8, 24)
  6043. #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_EXP_DUR_SET(_var, _val) WMI_SET_BITS(_var, 8, 24, _val)
  6044. typedef struct {
  6045. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_bcast_t2lm_info */
  6046. /*
  6047. * Vdev_id for MLO vap
  6048. * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET /
  6049. * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET
  6050. * vdev_id :8
  6051. *
  6052. * Duration time for MLO Vap
  6053. * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET /
  6054. * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET
  6055. * expected_duration :24
  6056. */
  6057. A_UINT32 vdev_id_expec_dur;
  6058. } wmi_mlo_bcast_t2lm_info;
  6059. typedef enum {
  6060. PKT_CAPTURE_MODE_DISABLE = 0,
  6061. PKT_CAPTURE_MODE_MGMT_ONLY,
  6062. PKT_CAPTURE_MODE_DATA_ONLY,
  6063. PKT_CAPTURE_MODE_DATA_MGMT,
  6064. } WMI_PKT_CAPTURE_MODE_CONFIG;
  6065. /* This information sending to host during offloaded MGMT local TX and host TX */
  6066. typedef struct {
  6067. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_hdr */
  6068. /* channel frequency in MHz */
  6069. A_UINT32 chan_freq;
  6070. /** snr information used to cal RSSI in dB */
  6071. A_UINT32 snr;
  6072. /** Rate kbps */
  6073. A_UINT32 rate_kbps;
  6074. /** phy mode WLAN_PHY_MODE */
  6075. A_UINT32 phy_mode;
  6076. /** length of the frame in bytes */
  6077. A_UINT32 buf_len;
  6078. /** status:
  6079. * 0x00: CRC ERR
  6080. * 0x08: DECRYPT ERR
  6081. * 0x10: MIC ERR
  6082. * 0x20: KEY CACHE MISS
  6083. */
  6084. A_UINT32 status;
  6085. /** flags:
  6086. * Information about the management frame e.g. can give a scan source
  6087. * for a scan result mgmt frame
  6088. * Refer to WMI_MGMT_RX_HDR_ definitions.
  6089. * ex: WMI_MGMT_RX_HDR_EXTSCAN,WMI_MGMT_RX_HDR_ENLO
  6090. */
  6091. A_UINT32 flags;
  6092. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  6093. A_INT32 rssi;
  6094. /** delta between local TSF (TSF timestamp when frame was RXd)
  6095. * and remote TSF (TSF timestamp in the IE for mgmt frame -
  6096. * beacon, proberesp for example). If remote TSF is not available,
  6097. * delta is set to 0.
  6098. * Although tsf_delta is stored as A_UINT32, it can be negative,
  6099. * and thus would need to be sign-extended if added to a value
  6100. * larger than 32 bits.
  6101. */
  6102. A_UINT32 tsf_delta;
  6103. /* The lower 32 bits of the TSF (tsf_l32) is copied by FW from
  6104. * TSF timestamp in the TX MAC descriptor provided by HW.
  6105. */
  6106. A_UINT32 tsf_l32;
  6107. /* The upper 32 bits of the TSF (tsf_u32) is copied by FW from
  6108. * TSF timestamp in the TX MAC descriptor provided by HW.
  6109. */
  6110. A_UINT32 tsf_u32;
  6111. /** pdev_id for identifying the MAC the tx mgmt frame transmitted.
  6112. * See macros starting with WMI_PDEV_ID_ for values.
  6113. */
  6114. A_UINT32 pdev_id;
  6115. A_UINT32 direction; /* tx:0,rx:1*/
  6116. /** tx_status:
  6117. * 0: xmit ok
  6118. * 1: excessive retries
  6119. * 2: blocked by tx filtering
  6120. * 4: fifo underrun
  6121. * 8: swabort
  6122. */
  6123. A_UINT32 tx_status;
  6124. A_UINT32
  6125. /* tx_retry_cnt:
  6126. * Indicates retry count of offloaded/local & host mgmt tx frames.
  6127. * The WMI_MGMT_HDR_TX_RETRY_[SET,GET] macros can be used to access
  6128. * this bitfield in a portable manner.
  6129. */
  6130. tx_retry_cnt:6, /* [5:0] */
  6131. reserved_1:26; /* [31:6] */
  6132. /* This TLV may be followed by array of bytes:
  6133. * A_UINT8 bufp[]; <-- management frame buffer
  6134. */
  6135. } wmi_mgmt_hdr;
  6136. /* Tx retry cnt set & get bits*/
  6137. #define WMI_MGMT_HDR_TX_RETRY_CNT_SET(tx_retry_cnt, value) \
  6138. WMI_SET_BITS(tx_retry_cnt, 0, 6, value)
  6139. #define WMI_MGMT_HDR_TX_RETRY_CNT_GET(tx_retry_cnt) \
  6140. WMI_GET_BITS(tx_retry_cnt, 0, 6)
  6141. /*
  6142. * Instead of universally increasing the RX_HDR_HEADROOM size which may cause problems for older targets,
  6143. * this new ext_hdr can be used for extending the header and will be only applicable for new targets.
  6144. */
  6145. typedef struct
  6146. {
  6147. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_rssi_ctl_ext */
  6148. /** RSSI of PRI 20MHz for each chain, in dB w.r.t. noise floor */
  6149. A_UINT32 rssi_ctl_ext[MAX_ANTENNA_EIGHT - ATH_MAX_ANTENNA];
  6150. } wmi_rssi_ctl_ext;
  6151. typedef struct {
  6152. /** TSF timestamp */
  6153. A_UINT32 tsf_timestamp;
  6154. /**
  6155. * Current freq1, freq2
  6156. *
  6157. * [7:0]: freq1[lo]
  6158. * [15:8] : freq1[hi]
  6159. * [23:16]: freq2[lo]
  6160. * [31:24]: freq2[hi]
  6161. */
  6162. A_UINT32 freq_info_1;
  6163. /**
  6164. * Combined RSSI over all chains and channel width for this PHY error
  6165. *
  6166. * [7:0]: RSSI combined
  6167. * [15:8]: Channel width (MHz)
  6168. * [23:16]: PHY error code
  6169. * [24:16]: reserved (future use)
  6170. */
  6171. A_UINT32 freq_info_2;
  6172. /**
  6173. * RSSI on chain 0 through 3
  6174. *
  6175. * This is formatted the same as the PPDU_START RX descriptor
  6176. * field:
  6177. *
  6178. * [7:0]: pri20
  6179. * [15:8]: sec20
  6180. * [23:16]: sec40
  6181. * [31:24]: sec80
  6182. */
  6183. A_UINT32 rssi_chain0;
  6184. A_UINT32 rssi_chain1;
  6185. A_UINT32 rssi_chain2;
  6186. A_UINT32 rssi_chain3;
  6187. /**
  6188. * Last calibrated NF value for chain 0 through 3
  6189. *
  6190. * nf_list_1:
  6191. *
  6192. * + [15:0] - chain 0
  6193. * + [31:16] - chain 1
  6194. *
  6195. * nf_list_2:
  6196. *
  6197. * + [15:0] - chain 2
  6198. * + [31:16] - chain 3
  6199. */
  6200. A_UINT32 nf_list_1;
  6201. A_UINT32 nf_list_2;
  6202. /** Length of the frame */
  6203. A_UINT32 buf_len;
  6204. } wmi_single_phyerr_rx_hdr;
  6205. typedef struct {
  6206. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_single_phyerr_ext_rx_hdr */
  6207. /**
  6208. * RSSI on chain 4 through 7 in dB w.r.t noise floor.
  6209. *
  6210. * This is formatted the same as the PPDU_START RX descriptor
  6211. * field:
  6212. *
  6213. * [7:0]: pri20
  6214. * [15:8]: sec20
  6215. * [23:16]: sec40
  6216. * [31:24]: sec80
  6217. */
  6218. A_UINT32 rssi_chain4;
  6219. A_UINT32 rssi_chain5;
  6220. A_UINT32 rssi_chain6;
  6221. A_UINT32 rssi_chain7;
  6222. /**
  6223. * Last calibrated NF value for chain 4 through 7 in dBm
  6224. *
  6225. * nf_list_3:
  6226. * + [15:0] - chain 4
  6227. * + [31:16] - chain 5
  6228. *
  6229. * nf_list_4:
  6230. * + [15:0] - chain 6
  6231. * + [31:16] - chain 7
  6232. *
  6233. * Each chain's noise floor is stored as a sign-extended (negative)
  6234. * value in dBm units.
  6235. */
  6236. A_UINT32 nf_list_3;
  6237. A_UINT32 nf_list_4;
  6238. } wmi_single_phyerr_ext_rx_hdr;
  6239. #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
  6240. #define WMI_UNIFIED_FREQINFO_1_LO_S 0
  6241. #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
  6242. #define WMI_UNIFIED_FREQINFO_1_HI_S 8
  6243. #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
  6244. #define WMI_UNIFIED_FREQINFO_2_LO_S 16
  6245. #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
  6246. #define WMI_UNIFIED_FREQINFO_2_HI_S 24
  6247. /*
  6248. * Please keep in mind that these _SET macros break macro side effect
  6249. * assumptions; don't be clever with them.
  6250. */
  6251. #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
  6252. (WMI_F_MS((hdr)->freq_info_1, \
  6253. WMI_UNIFIED_FREQINFO_##f##_LO) \
  6254. | (WMI_F_MS((hdr)->freq_info_1, \
  6255. WMI_UNIFIED_FREQINFO_##f##_HI) << 8))
  6256. #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
  6257. do { \
  6258. WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
  6259. WMI_UNIFIED_FREQINFO_##f##_LO); \
  6260. WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
  6261. WMI_UNIFIED_FREQINFO_##f##_HI); \
  6262. } while (0)
  6263. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
  6264. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
  6265. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
  6266. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
  6267. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
  6268. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
  6269. #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
  6270. ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
  6271. WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
  6272. #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
  6273. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  6274. WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
  6275. #define WMI_UNIFIED_CHWIDTH_GET(hdr) \
  6276. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
  6277. #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
  6278. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  6279. WMI_UNIFIED_FREQINFO_2_CHWIDTH);
  6280. #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
  6281. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
  6282. #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
  6283. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  6284. WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
  6285. #define WMI_UNIFIED_CHAIN_0 0x0000ffff
  6286. #define WMI_UNIFIED_CHAIN_0_S 0
  6287. #define WMI_UNIFIED_CHAIN_1 0xffff0000
  6288. #define WMI_UNIFIED_CHAIN_1_S 16
  6289. #define WMI_UNIFIED_CHAIN_2 0x0000ffff
  6290. #define WMI_UNIFIED_CHAIN_2_S 0
  6291. #define WMI_UNIFIED_CHAIN_3 0xffff0000
  6292. #define WMI_UNIFIED_CHAIN_3_S 16
  6293. #define WMI_UNIFIED_CHAIN_4 0x0000ffff
  6294. #define WMI_UNIFIED_CHAIN_4_S 0
  6295. #define WMI_UNIFIED_CHAIN_5 0xffff0000
  6296. #define WMI_UNIFIED_CHAIN_5_S 16
  6297. #define WMI_UNIFIED_CHAIN_6 0x0000ffff
  6298. #define WMI_UNIFIED_CHAIN_6_S 0
  6299. #define WMI_UNIFIED_CHAIN_7 0xffff0000
  6300. #define WMI_UNIFIED_CHAIN_7_S 16
  6301. #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
  6302. #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
  6303. #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
  6304. #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
  6305. #define WMI_UNIFIED_CHAIN_4_FIELD nf_list_3
  6306. #define WMI_UNIFIED_CHAIN_5_FIELD nf_list_3
  6307. #define WMI_UNIFIED_CHAIN_6_FIELD nf_list_4
  6308. #define WMI_UNIFIED_CHAIN_7_FIELD nf_list_4
  6309. #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
  6310. ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, \
  6311. WMI_UNIFIED_CHAIN_##c)))
  6312. #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
  6313. WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, (nf) & 0xffff, \
  6314. WMI_UNIFIED_CHAIN_##c);
  6315. /*
  6316. * For now, this matches what the underlying hardware is doing.
  6317. * Update ar6000ProcRxDesc() to use these macros when populating
  6318. * the rx descriptor and then we can just copy the field over
  6319. * to the WMI PHY notification without worrying about breaking
  6320. * things.
  6321. */
  6322. #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
  6323. #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
  6324. #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
  6325. #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
  6326. #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
  6327. #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
  6328. #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
  6329. #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
  6330. #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
  6331. WMI_F_RMW((hdr)->rssi_chain##c, (rssi) & 0xff, \
  6332. WMI_UNIFIED_RSSI_CHAN_##ch);
  6333. #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
  6334. ((int8_t) (WMI_F_MS((hdr)->rssi_chain##c, \
  6335. WMI_UNIFIED_RSSI_CHAN_##ch)))
  6336. #define WMI_UNIFIED_CHAIN_RSSI_GET(tlv, chain_idx, band) \
  6337. ((A_INT8) WMI_F_MS((tlv)->chain_rssi[chain_idx], WMI_UNIFIED_RSSI_CHAN_ ## band))
  6338. typedef struct {
  6339. /** Phy error event header */
  6340. wmi_single_phyerr_rx_hdr hdr;
  6341. /** frame buffer */
  6342. WMI_VAR_LEN_ARRAY1(A_UINT8, bufp);
  6343. } wmi_single_phyerr_rx_event;
  6344. /* PHY ERROR MASK 0 */
  6345. /* bits 1:0 defined but not published */
  6346. #define WMI_PHY_ERROR_MASK0_RADAR (1 << 2)
  6347. /* bits 23:3 defined but not published */
  6348. #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1 << 24)
  6349. /* bits 25:24 defined but not published */
  6350. #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1 << 26)
  6351. /* bits 31:27 defined but not published */
  6352. /* PHY ERROR MASK 1 */
  6353. /* bits 13:0 defined but not published */
  6354. /* bits 31:14 reserved */
  6355. /* PHY ERROR MASK 2 */
  6356. /* bits 31:0 reserved */
  6357. typedef struct {
  6358. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
  6359. /** Phy error phy error count */
  6360. A_UINT32 num_phyerr_events;
  6361. A_UINT32 tsf_l32;
  6362. A_UINT32 tsf_u32;
  6363. A_UINT32 buf_len;
  6364. union {
  6365. A_UINT32 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  6366. /** pdev_id for identifying the MAC
  6367. * See macros starting with WMI_PDEV_ID_ for values.
  6368. */
  6369. A_UINT32 pdev_id;
  6370. };
  6371. A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
  6372. A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
  6373. A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
  6374. /* This TLV is followed by array of bytes:
  6375. * frame buffer - contains multiple payloads in the order:
  6376. * header - payload, header - payload...
  6377. * (The header is of type: wmi_single_phyerr_rx_hdr)
  6378. * A_UINT8 bufp[];
  6379. * The extension hdr will repeat num_phyerr_events of times
  6380. * and will have 1:1 mapping with above header. i.e the 1st
  6381. * ext_rx_hdr will belong to 1st phyerr_rx_hdr and so on.
  6382. * wmi_single_phyerr_ext_rx_hdr single_phyerr_ext;
  6383. */
  6384. } wmi_comb_phyerr_rx_hdr;
  6385. /* WMI MGMT TX */
  6386. typedef struct {
  6387. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
  6388. /** unique id identifying the VDEV, generated by the caller */
  6389. A_UINT32 vdev_id;
  6390. /** peer MAC address */
  6391. wmi_mac_addr peer_macaddr;
  6392. /** xmit rate */
  6393. A_UINT32 tx_rate;
  6394. /** xmit power */
  6395. A_UINT32 tx_power;
  6396. /** Buffer length in bytes */
  6397. A_UINT32 buf_len;
  6398. /* This TLV is followed by array of bytes:
  6399. * A_UINT8 bufp[]; <-- management frame buffer
  6400. */
  6401. } wmi_mgmt_tx_hdr;
  6402. #define WMI_TX_SEND_PARAM_EXT_META_ID_GET(tx_param_ext_dword0) WMI_GET_BITS(tx_param_dword0, 0, 3)
  6403. #define WMI_TX_SEND_PARAM_EXT_META_ID_SET(tx_param_ext_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 3, value)
  6404. #define WMI_TX_SEND_PARAM_EXT_WIN_SIZE_GET(tx_param_ext_dword1) WMI_GET_BITS(tx_param_dword1, 0, 16)
  6405. #define WMI_TX_SEND_PARAM_EXT_WIN_SIZE_SET(tx_param_ext_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 16, value)
  6406. typedef enum {
  6407. WMI_TX_SEND_PARAMS_EXT_META_ADDBA = 0x0,
  6408. WMI_TX_SEND_PARAMS_EXT_META_DELBA = 0x1,
  6409. } wmi_tx_send_params_ext_meta_t;
  6410. typedef struct {
  6411. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_tx_send_params_ext) and len */
  6412. union {
  6413. struct {
  6414. A_UINT32 meta_id : 3, /* Describes the representation of the data in tx_param_ext_dword1 Full set shown in wmi_tx_send_params_ext_meta_t */
  6415. reserved_0 : 29; /* Dedicated for commonly used parameters only */
  6416. };
  6417. A_UINT32 tx_param_ext_dword0;
  6418. };
  6419. union {
  6420. struct {
  6421. /* WMI_TX_SEND_PARAMS_EXT_META_ADDBA */
  6422. A_UINT32 win_size : 16,
  6423. reserved_1 : 16;
  6424. };
  6425. A_UINT32 tx_param_ext_dword1;
  6426. };
  6427. } wmi_tx_send_params_ext;
  6428. #define WMI_TX_SEND_PARAM_PWR_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 0, 8)
  6429. #define WMI_TX_SEND_PARAM_PWR_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 8, value)
  6430. #define WMI_TX_SEND_PARAM_MCS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 8, 12)
  6431. #define WMI_TX_SEND_PARAM_MCS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 8, 12, value)
  6432. #define WMI_TX_SEND_PARAM_NSS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 20, 8)
  6433. #define WMI_TX_SEND_PARAM_NSS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 20, 8, value)
  6434. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 28, 4)
  6435. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 28, 4, value)
  6436. #define WMI_TX_SEND_PARAM_CHAIN_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 0, 8)
  6437. #define WMI_TX_SEND_PARAM_CHAIN_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 8, value)
  6438. #define WMI_TX_SEND_PARAM_BW_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 8, 7)
  6439. #define WMI_TX_SEND_PARAM_BW_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 8, 7, value)
  6440. #define WMI_TX_SEND_PARAM_PREAMBLE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 15, 5)
  6441. #define WMI_TX_SEND_PARAM_PREAMBLE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 15, 5, value)
  6442. #define WMI_TX_SEND_PARAM_FRAME_TYPE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 20, 1)
  6443. #define WMI_TX_SEND_PARAM_FRAME_TYPE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 20, 1, value)
  6444. #define WMI_TX_SEND_PARAM_CFR_CAPTURE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 21, 1)
  6445. #define WMI_TX_SEND_PARAM_CFR_CAPTURE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 21, 1, value)
  6446. #define WMI_TX_SEND_PARAM_BEAMFORM_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 22, 1)
  6447. #define WMI_TX_SEND_PARAM_BEAMFORM_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 22, 1, value)
  6448. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_EXT_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 23, 3)
  6449. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_EXT_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 23, 3, value)
  6450. /* TX_SEND flags:
  6451. * Bit 0: set wrong txkey
  6452. * There is one special WFA test case in STA or AP, setting wrong txkey
  6453. * in disassoc or deauth with PMF enabled to verify if peer disconnected
  6454. * Bit 1: set ps buffering for SA query frame
  6455. */
  6456. #define WMI_TX_SEND_FLAG_SET_WRONG_KEY 0x00000001
  6457. #define WMI_TX_SEND_FLAG_SET_WRONG_KEY_GET(tx_flags) WMI_GET_BITS(tx_flags, 0, 1)
  6458. #define WMI_TX_SEND_FLAG_SET_WRONG_KEY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 0, 1, value)
  6459. #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY 0x00000002
  6460. #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY_GET(tx_flags) WMI_GET_BITS(tx_flags, 1, 1)
  6461. #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 1, 1, value)
  6462. #define WMI_TX_SEND_FLAG_SET_IS_SA_QUERY 0x00000004
  6463. #define WMI_TX_SEND_FLAG_SET_IS_SA_QUERY_GET(tx_flags) WMI_GET_BITS(tx_flags, 2, 1)
  6464. #define WMI_TX_SEND_FLAG_SET_IS_SA_QUERY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 2, 1, value)
  6465. #define WMI_TX_SEND_FLAG_SET_P2P_FRAME_ON_STA_VDEV 0x00000008
  6466. #define WMI_TX_SEND_FLAG_SET_P2P_FRAME_ON_STA_VDEV_GET(tx_flags) WMI_GET_BITS(tx_flags, 3, 1)
  6467. #define WMI_TX_SEND_FLAG_SET_P2P_FRAME_ON_STA_VDEV_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 3, 1, value)
  6468. typedef struct {
  6469. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_send_params */
  6470. union {
  6471. struct {
  6472. /* DWORD 0: tx power, tx rate, retry_limit */
  6473. A_UINT32
  6474. /* pwr -
  6475. * Specify what power the tx frame needs to be transmitted at.
  6476. * The power a signed (two's complement) value is in units of 0.5 dBm.
  6477. * The value needs to be appropriately sign-extended when extracting
  6478. * the value from the message and storing it in a variable that is
  6479. * larger than A_INT8. (fw automatically handles this sign-extension.)
  6480. * If the transmission uses multiple tx chains, this power spec is
  6481. * the total transmit power, assuming incoherent combination of
  6482. * per-chain power to produce the total power.
  6483. */
  6484. pwr: 8,
  6485. /* mcs_mask -
  6486. * Specify the allowable values for MCS index (modulation and coding)
  6487. * to use for transmitting the frame.
  6488. *
  6489. * For HT / VHT preamble types, this mask directly corresponds to
  6490. * the HT or VHT MCS indices that are allowed. For each bit N set
  6491. * within the mask, MCS index N is allowed for transmitting the frame.
  6492. * For legacy CCK and OFDM rates, separate bits are provided for CCK
  6493. * rates versus OFDM rates, so the host has the option of specifying
  6494. * that the target must transmit the frame with CCK or OFDM rates
  6495. * (not HT or VHT), but leaving the decision to the target whether
  6496. * to use CCK or OFDM.
  6497. *
  6498. * For CCK and OFDM, the bits within this mask are interpreted as
  6499. * follows:
  6500. * bit 0 -> CCK 1 Mbps rate is allowed
  6501. * bit 1 -> CCK 2 Mbps rate is allowed
  6502. * bit 2 -> CCK 5.5 Mbps rate is allowed
  6503. * bit 3 -> CCK 11 Mbps rate is allowed
  6504. * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
  6505. * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
  6506. * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
  6507. * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
  6508. * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
  6509. * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
  6510. * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
  6511. * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
  6512. *
  6513. * The MCS index specification needs to be compatible with the
  6514. * bandwidth mask specification. For example, a MCS index == 9
  6515. * specification is inconsistent with a preamble type == VHT,
  6516. * Nss == 1, and channel bandwidth == 20 MHz.
  6517. *
  6518. * Furthermore, the host has only a limited ability to specify to
  6519. * the target to select from HT + legacy rates, or VHT + legacy rates,
  6520. * since this mcs_mask can specify either HT/VHT rates or legacy rates.
  6521. * If no bits are set, target can choose what MCS type to use.
  6522. */
  6523. mcs_mask: 12,
  6524. /* nss_mask -
  6525. * Specify which numbers of spatial streams (MIMO factor) are permitted.
  6526. * Each bit in this mask corresponds to a Nss value:
  6527. * bit 0: if set, Nss = 1 (non-MIMO) is permitted
  6528. * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
  6529. * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
  6530. * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
  6531. * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
  6532. * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
  6533. * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
  6534. * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
  6535. * The values in the Nss mask must be suitable for the recipient, e.g.
  6536. * a value of 0x4 (Nss = 3) cannot be specified for a tx frame to a
  6537. * recipient which only supports 2x2 MIMO.
  6538. * If no bits are set, target can choose what NSS type to use.
  6539. */
  6540. nss_mask: 8,
  6541. /* retry_limit -
  6542. * Specify the maximum number of transmissions, including the
  6543. * initial transmission, to attempt before giving up if no ack
  6544. * is received.
  6545. * If the tx rate is specified, then all retries shall use the
  6546. * same rate as the initial transmission.
  6547. * If no tx rate is specified, the target can choose whether to
  6548. * retain the original rate during the retransmissions, or to
  6549. * fall back to a more robust rate.
  6550. */
  6551. retry_limit: 4;
  6552. };
  6553. A_UINT32 tx_param_dword0;
  6554. };
  6555. union {
  6556. struct {
  6557. /* DWORD 1: tx chain mask, preamble_type, tx BW */
  6558. A_UINT32
  6559. /* chain_mask - specify which chains to transmit from
  6560. * If not set, target will choose what chain_mask to use.
  6561. */
  6562. chain_mask: 8,
  6563. /* The bits in this mask correspond to the values as below
  6564. * bit 0 -> 5MHz
  6565. * bit 1 -> 10MHz
  6566. * bit 2 -> 20MHz
  6567. * bit 3 -> 40MHz
  6568. * bit 4 -> 80MHz
  6569. * bit 5 -> 160MHz
  6570. * bit 6 -> 80_80MHz
  6571. * If no bits are set, target can choose what BW to use.
  6572. */
  6573. bw_mask: 7,
  6574. /* preamble_type_mask -
  6575. * Specify which preamble types (CCK, OFDM, HT, VHT) the target
  6576. * may choose from for transmitting this frame.
  6577. * Each bit in this mask corresponds to a preamble_type value:
  6578. * bit 0: if set, OFDM
  6579. * bit 1: if set, CCK
  6580. * bit 2: if set, HT
  6581. * bit 3: if set, VHT
  6582. * bit 4: if set, HE
  6583. * If no bits are set, target can choose what preamble type to use.
  6584. */
  6585. preamble_type: 5,
  6586. /* Data:1 Mgmt:0 */
  6587. frame_type: 1,
  6588. /* Capture CFR when bit is set */
  6589. cfr_capture: 1,
  6590. /* Enables Beamforming when bit is set */
  6591. en_beamforming: 1,
  6592. /*
  6593. * Extra 3 bits of retry limit defined in tx_param_dword0,
  6594. * to allow maximum 127 retries for specific frames.
  6595. */
  6596. retry_limit_ext: 3,
  6597. reserved1_31_26: 6;
  6598. };
  6599. A_UINT32 tx_param_dword1;
  6600. };
  6601. } wmi_tx_send_params;
  6602. #define WMI_MLO_MGMT_TID 0xFFFFFFFF
  6603. typedef struct {
  6604. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_mlo_tx_send_params) and len */
  6605. A_UINT32 hw_link_id; /** Unique link id across SOCs, provided by QMI handshake.
  6606. * If WMI_MLO_MGMT_TID then the frame will be queued in the MLO queue
  6607. * If valid hw_link_id
  6608. */
  6609. } wmi_mlo_tx_send_params;
  6610. typedef struct {
  6611. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param */
  6612. A_UINT32 vdev_id;
  6613. A_UINT32 desc_id; /* echoed in tx_compl_event */
  6614. A_UINT32 chanfreq; /* MHz units */
  6615. /* WMI_MGMT_TX_SEND_CMDID is used for both pass by value and
  6616. * pass by reference WMI management frames.
  6617. *
  6618. * a) If the command is for pass by reference,
  6619. * paddr_lo and padd_hi will hold the address of remote/host buffer
  6620. * b) If the command is for pass by value,
  6621. * paddr_lo and paddr_hi will be NULL.
  6622. */
  6623. A_UINT32 paddr_lo;
  6624. A_UINT32 paddr_hi;
  6625. A_UINT32 frame_len;
  6626. A_UINT32 buf_len; /** Buffer length in bytes */
  6627. /*
  6628. * The frame which will have tx_params_valid set will be always be RAW
  6629. * frame, as it will be tx'ed on non-pause tid
  6630. */
  6631. A_UINT32 tx_params_valid;
  6632. /* tx_flags:
  6633. * Extra flags when tx_params_valid is 0.
  6634. * Refer to WMI_TX_SEND_FLAG_xxx defs regarding the meaning of the
  6635. * bits within this field.
  6636. */
  6637. A_UINT32 tx_flags;
  6638. /* peer_rssi:
  6639. * If non-zero, indicates saved peer beacon/probe resp RSSI (dBm units)
  6640. * ONLY for init connection auth/assoc pkt.
  6641. */
  6642. A_INT32 peer_rssi;
  6643. /* This TLV is followed by array of bytes: First 64 bytes of management frame
  6644. * A_UINT8 bufp[];
  6645. */
  6646. /* This TLV is followed by wmi_tx_send_params
  6647. * wmi_tx_send_params tx_send_params;
  6648. * wmi_mlo_tx_send_params mlo_tx_send_params[];
  6649. * Note: WMI_MLO_MGMT_TID path validated for specific scenario
  6650. * (BTM Usecase). Full support is not available.
  6651. * wmi_tx_send_params_ext tx_send_params_ext[0 or 1];
  6652. */
  6653. } wmi_mgmt_tx_send_cmd_fixed_param;
  6654. typedef struct {
  6655. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_send_cmd_fixed_param */
  6656. A_UINT32 vdev_id;
  6657. A_UINT32 desc_id; /* echoed in tx_compl_event */
  6658. A_UINT32 chanfreq; /* MHz units */
  6659. A_UINT32 paddr_lo;
  6660. A_UINT32 paddr_hi;
  6661. A_UINT32 frame_len;
  6662. A_UINT32 buf_len; /** Buffer length in bytes */
  6663. /* The frame which will have tx_params_valid set will be always be RAW
  6664. * frame, as it will be tx'ed on non-pause tid
  6665. */
  6666. A_UINT32 tx_params_valid;
  6667. /* This TLV is followed by array of bytes: First 64 bytes of frame
  6668. * A_UINT8 bufp[];
  6669. */
  6670. /* This TLV is followed by wmi_tx_send_params
  6671. * wmi_tx_send_params tx_send_params;
  6672. */
  6673. } wmi_offchan_data_tx_send_cmd_fixed_param;
  6674. typedef struct {
  6675. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_qos_null_frame_tx_send_cmd_fixed_param */
  6676. A_UINT32 vdev_id;
  6677. A_UINT32 desc_id; /* echoed in tx_compl_event */
  6678. A_UINT32 paddr_lo; /* paddr_lo and padd_hi will hold the address of remote/host buffer, which is physical address of frame */
  6679. A_UINT32 paddr_hi;
  6680. A_UINT32 frame_len; /* Actual length of frame in bytes*/
  6681. A_UINT32 buf_len; /** Buffer length in bytes, length of data DMA'ed to FW from host */
  6682. /* This fixed_param TLV is followed by the TLVs listed below:
  6683. * 1. ARRAY_BYTE TLV: First buf_len (expected to be 64) bytes of frame
  6684. * A_UINT8 bufp[];
  6685. * 2. wmi_tx_send_params tx_send_params;
  6686. */
  6687. } wmi_qos_null_frame_tx_send_cmd_fixed_param;
  6688. typedef struct {
  6689. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
  6690. A_UINT32 value;
  6691. } wmi_echo_event_fixed_param;
  6692. typedef struct {
  6693. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
  6694. A_UINT32 value;
  6695. } wmi_echo_cmd_fixed_param;
  6696. typedef struct {
  6697. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to WMITLV_TAG_STRUC_wmi_mlo_link_disable_request_event_fixed_param */
  6698. /** AP MLD address request to be disabled some set of link */
  6699. wmi_mac_addr mld_addr;
  6700. /** Request link id set to disable */
  6701. A_UINT32 linkid_bitmap;
  6702. } wmi_mlo_link_disable_request_event_fixed_param;
  6703. typedef enum {
  6704. /**
  6705. * Projects support to offload regulatory database by default.
  6706. * If don`t offload regulatory database, host can set this bit.
  6707. */
  6708. WMI_REGDOMAIN_DATABASE_NO_OFFLOAD_BITMASK = 0x00000001,
  6709. } WMI_REGDOMAIN_BITMASK;
  6710. typedef struct {
  6711. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
  6712. /** pdev_id for identifying the MAC
  6713. * See macros starting with WMI_PDEV_ID_ for values.
  6714. */
  6715. A_UINT32 pdev_id;
  6716. /** reg domain code */
  6717. A_UINT32 reg_domain;
  6718. A_UINT32 reg_domain_2G; /* fulfil 2G domain ID */
  6719. A_UINT32 reg_domain_5G; /* fulfil 5G domain ID */
  6720. A_UINT32 conformance_test_limit_2G; /* 2G whole band CTL index */
  6721. A_UINT32 conformance_test_limit_5G; /* 5G whole band CTL index */
  6722. A_UINT32 dfs_domain;
  6723. /**
  6724. * The below conformance_test_limit index fields are for supporting the
  6725. * 5G sub-band CTL feature.
  6726. * Conformance test limits (CTLs) are the product-specific
  6727. * regulatory-compliant powers stored in the board data file (BDF).
  6728. * These CTLs within the BDF are identified by CTL index values.
  6729. * For example, the BDF file is expected to contain CTL data for
  6730. * FCC (CTL index = 0x10), ETSI (CTL index = 0x30),
  6731. * Japan/MKK (CTL index = 0x40), Korea (CTL index = 0x50),
  6732. * and China (CTL index = 0x60) CTL regions.
  6733. * The target FW will use the CTL indices specified in this message to
  6734. * find a BDF CTL entry with a matching CTL index value, and then use
  6735. * that CTL as one of the inputs into the tx power limit computation.
  6736. * A CTL index value of 0x0 is invalid, and will be ignored by the FW.
  6737. */
  6738. A_UINT32 conformance_test_limit_5G_subband_UNII1;
  6739. A_UINT32 conformance_test_limit_5G_subband_UNII2a;
  6740. A_UINT32 conformance_test_limit_5G_subband_UNII2c;
  6741. A_UINT32 conformance_test_limit_5G_subband_UNII3;
  6742. A_UINT32 conformance_test_limit_5G_subband_UNII4;
  6743. /**
  6744. * The below conformance_test_limit index fields are like the above,
  6745. * but are for supporting the 6G sub-band CTL feature.
  6746. */
  6747. A_UINT32 conformance_test_limit_6G_subband_UNII5;
  6748. A_UINT32 conformance_test_limit_6G_subband_UNII6;
  6749. A_UINT32 conformance_test_limit_6G_subband_UNII7;
  6750. A_UINT32 conformance_test_limit_6G_subband_UNII8;
  6751. /**
  6752. * In 6G sub-band CTL, fulfil 6G domain id and whole band CTL index firstly.
  6753. * Unlike 5G sub-band CTL index fields, role ap and role client have
  6754. * different indices.
  6755. * Each role has 3 sub-band indices due to different power_mode type.
  6756. * Below 3 represent for power_mode types: 0-LPI, 1-SP, 2-VLP
  6757. * Below 2 represent for client_max: 0-default, 1-subordinate
  6758. */
  6759. A_UINT32 reg_domain_6G; /* fulfil 6G domain id */
  6760. A_UINT32 conformance_test_limit_6G; /* 6G whole band CTL index */
  6761. A_UINT32 conformance_test_limit_6G_subband_UNII5_ap[3];
  6762. A_UINT32 conformance_test_limit_6G_subband_UNII6_ap[3];
  6763. A_UINT32 conformance_test_limit_6G_subband_UNII7_ap[3];
  6764. A_UINT32 conformance_test_limit_6G_subband_UNII8_ap[3];
  6765. A_UINT32 conformance_test_limit_6G_subband_UNII5_client[3][2];
  6766. A_UINT32 conformance_test_limit_6G_subband_UNII6_client[3][2];
  6767. A_UINT32 conformance_test_limit_6G_subband_UNII7_client[3][2];
  6768. A_UINT32 conformance_test_limit_6G_subband_UNII8_client[3][2];
  6769. /** reg domain bitmap */
  6770. A_UINT32 regdomain_bitmap;
  6771. } wmi_pdev_set_regdomain_cmd_fixed_param;
  6772. typedef struct {
  6773. /** TRUE for scan start and flase for scan end */
  6774. A_UINT32 scan_start;
  6775. } wmi_pdev_scan_cmd;
  6776. /* WMI support for setting ratemask in target */
  6777. typedef struct {
  6778. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param */
  6779. A_UINT32 vdev_id;
  6780. /*
  6781. * 0 - cck/ofdm
  6782. * 1 - HT
  6783. * 2 - VHT
  6784. * 3 - HE
  6785. * 4 - EHT
  6786. *
  6787. * Rate Bit mask format:
  6788. * <MCS in NSS MAX> ...
  6789. * <MCS MAX, ..., 2, 1, 0 : NSS2>
  6790. * <MCS MAX, ..., 2, 1, 0 : NSS1>
  6791. * EHT Rate Bit Mask format:
  6792. * <MCS in NSS MAX> ...
  6793. * <MCS MAX, ... 2, 1, 0, -1, -2 : NSS2>
  6794. * <MCS MAX, ..., 2, 1, 0, -1(DCM), -2(EHT Dup) : NSS1>
  6795. */
  6796. A_UINT32 type;
  6797. A_UINT32 mask_lower32;
  6798. A_UINT32 mask_higher32;
  6799. A_UINT32 mask_lower32_2;
  6800. A_UINT32 mask_higher32_2;
  6801. } wmi_vdev_config_ratemask_cmd_fixed_param;
  6802. /* nrp action - Filter Neighbor Rx Packets - add/remove filter */
  6803. enum {
  6804. WMI_FILTER_NRP_ACTION_ADD = 0x1,
  6805. WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
  6806. WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
  6807. }; /* nrp - Neighbor Rx Packets */
  6808. /* nrp type - Filter Neighbor Rx Packets - ap/client addr */
  6809. enum {
  6810. WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
  6811. WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
  6812. };
  6813. /* nrp flag - Filter Neighbor Rx Packets
  6814. * (capture flag, 2 & 3 not initially supported)
  6815. */
  6816. enum {
  6817. WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
  6818. WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
  6819. WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
  6820. };
  6821. typedef struct {
  6822. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param */
  6823. A_UINT32 vdev_id;
  6824. /* AP Bssid or Client Mac-addr */
  6825. wmi_mac_addr addr;
  6826. /* Add/Remove NRF Filter */
  6827. A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
  6828. /* client/ap filter */
  6829. A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
  6830. /* optional - tx/rx capture */
  6831. A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
  6832. /* BSSID index - index of the BSSID register */
  6833. A_UINT32 bssid_idx;
  6834. } wmi_vdev_filter_nrp_config_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  6835. /* tx peer filter action - Filter Tx Packets - add/remove filter */
  6836. enum {
  6837. WMI_PEER_TX_FILTER_ACTION_ADD = 1,
  6838. WMI_PEER_TX_FILTER_ACTION_REMOVE = 2,
  6839. WMI_PEER_TX_FILTER_ACTION_ADD_AND_ENABLE_FILTERING = 3,
  6840. WMI_PEER_TX_FILTER_ACTION_REMOVE_AND_CLEAR_FILTERING = 4,
  6841. };
  6842. typedef struct {
  6843. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tx_filter_cmd_fixed_param */
  6844. A_UINT32 vdev_id;
  6845. /* Client MAC addr */
  6846. wmi_mac_addr addr;
  6847. /* Add/Remove monitor_sta Filter */
  6848. A_UINT32 action; /* WMI_PEER_TX_FILTER_ACTION enum */
  6849. } wmi_peer_tx_filter_cmd_fixed_param; /* Filter for TX Packets */
  6850. /* Command to set/unset chip in quiet mode */
  6851. typedef struct {
  6852. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
  6853. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  6854. A_UINT32 period; /*period in TUs*/
  6855. A_UINT32 duration; /*duration in TUs*/
  6856. A_UINT32 next_start; /*offset in TUs*/
  6857. A_UINT32 enabled; /*enable/disable*/
  6858. } wmi_pdev_set_quiet_cmd_fixed_param;
  6859. typedef struct {
  6860. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param */
  6861. A_UINT32 vdev_id; /* Virtual interface ID */
  6862. A_UINT32 period; /* period in TUs */
  6863. A_UINT32 duration; /* duration in TUs */
  6864. A_UINT32 next_start; /* offset in TUs */
  6865. A_UINT32 enabled; /* enable/disable */
  6866. } wmi_vdev_set_quiet_cmd_fixed_param;
  6867. /*
  6868. * START_STOP flag value: 1 - Start, 0 - Stop
  6869. */
  6870. #define WMI_OFFLOAD_QUIET_FLAG_START_STOP 0x00000001
  6871. /*
  6872. * ONE_SHOT flag value: 1 - One shot, 0 - Repeat
  6873. * This flag is only relevant if the START_STOP flag == 1 (start).
  6874. */
  6875. #define WMI_OFFLOAD_QUIET_FLAG_ONE_SHOT 0x00000002
  6876. /*
  6877. * Enable/Disable sending Quiet IE info in SWBA event from the target
  6878. * 0 - Don't include Quiet IE in WMI SWBA Event
  6879. * 1 - Include Quiet IE in WMI SWBA Event
  6880. */
  6881. #define WMI_OFFLOAD_QUIET_FLAG_INFO_IN_SWBA_START_STOP 0x00000004
  6882. typedef struct {
  6883. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_ml_quiet_config_params */
  6884. A_UINT32 vdev_id; /* partner vdev_id */
  6885. A_UINT32 hw_link_id; /* hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
  6886. A_UINT32 beacon_interval; /* beacon interval in TU from received beacon of the partner link */
  6887. A_UINT32 period; /* period in TUs */
  6888. A_UINT32 duration; /* duration in TUs */
  6889. A_UINT32 next_start; /* offset in TUs from beacon */
  6890. A_UINT32 flags; /* STOP or START (and single vs. repeated) Quiet IE
  6891. * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
  6892. */
  6893. } wmi_vdev_bcn_offload_ml_quiet_config_params;
  6894. typedef struct {
  6895. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param */
  6896. A_UINT32 vdev_id; /* Virtual interface ID */
  6897. A_UINT32 period; /* period in TUs */
  6898. A_UINT32 duration; /* duration in TUs */
  6899. A_UINT32 next_start; /* offset in TUs from beacon */
  6900. A_UINT32 flags; /* STOP or START (and single vs. repeated) Quiet IE
  6901. * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
  6902. */
  6903. /*
  6904. * This TLV is optionally followed by array of wmi_vdev_bcn_offload_ml_quiet_config_params struct
  6905. * wmi_vdev_bcn_offload_ml_quiet_config_params will have multiple instances equal to num of links in an AP MLD
  6906. * wmi_vdev_bcn_offload_ml_quiet_config_params ml_quiet_param[];
  6907. */
  6908. } wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param;
  6909. typedef struct {
  6910. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
  6911. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom aggregation size will be applied. */
  6912. /* Size for tx aggregation for the vdev mentioned in vdev id
  6913. * (max MPDUs per A-MPDU or max MSDUs per A-MSDU based on aggr_type field)
  6914. */
  6915. A_UINT32 tx_aggr_size;
  6916. A_UINT32 rx_aggr_size; /* Size for rx aggregation (block ack window size limit) for the vdev mentioned in vdev id */
  6917. /*
  6918. * To set TX aggregation size limits per VDEV per AC
  6919. * bits 1:0 (ac):
  6920. * Access Category (0x0=BE, 0x1=BK, 0x2=VI, 0x3=VO)
  6921. * If tx_ac_enable bit is not set, tx_aggr_size is applied
  6922. * for all Access Categories
  6923. * bit 2 (aggr_type): TX Aggregation Type (0=A-MPDU, 1=A-MSDU)
  6924. * bit 3 (tx_aggr_size_disable): If set tx_aggr_size is invalid
  6925. * bit 4 (rx_aggr_size_disable): If set rx_aggr_size is invalid
  6926. * bit 5 (tx_ac_enable): If set, above ac bitmap is valid.
  6927. * bit 6 (256 BA support enable) If set, Default 256 BA size is expected
  6928. * from host
  6929. * bit 7 (1024 BA support enable) If set, Default 1024 BA size is expected
  6930. * from host
  6931. * bits 31:8: Reserved bits. should be set to zero.
  6932. */
  6933. A_UINT32 enable_bitmap;
  6934. } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
  6935. typedef enum {
  6936. WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU = 0,
  6937. WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU = 1,
  6938. WMI_VDEV_CUSTOM_AGGR_TYPE_MAX,
  6939. } wmi_vdev_custom_aggr_type_t;
  6940. #define WMI_VDEV_CUSTOM_AGGR_AC_BITPOS 0
  6941. #define WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS 2
  6942. #define WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS 2
  6943. #define WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS 1
  6944. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS 3
  6945. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS 1
  6946. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS 4
  6947. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS 1
  6948. #define WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS 5
  6949. #define WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS 1
  6950. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS 6
  6951. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS 1
  6952. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS 7
  6953. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS 1
  6954. #define WMI_VDEV_CUSTOM_AGGR_AC_SET(param, value) \
  6955. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  6956. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS, value)
  6957. #define WMI_VDEV_CUSTOM_AGGR_AC_GET(param) \
  6958. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  6959. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS)
  6960. #define WMI_VDEV_CUSTOM_AGGR_TYPE_SET(param, value) \
  6961. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  6962. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS, value)
  6963. #define WMI_VDEV_CUSTOM_AGGR_TYPE_GET(param) \
  6964. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  6965. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS)
  6966. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_SET(param, value) \
  6967. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  6968. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS, value)
  6969. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_GET(param) \
  6970. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  6971. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS)
  6972. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_SET(param, value) \
  6973. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  6974. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS, value)
  6975. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_GET(param) \
  6976. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  6977. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS)
  6978. #define WMI_VDEV_CUSTOM_TX_AC_EN_SET(param, value) \
  6979. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  6980. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS, value)
  6981. #define WMI_VDEV_CUSTOM_TX_AC_EN_GET(param) \
  6982. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  6983. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS)
  6984. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_SET(param, value) \
  6985. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS, \
  6986. WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS, value)
  6987. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_GET(param) \
  6988. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS, \
  6989. WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS)
  6990. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_SET(param, value) \
  6991. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS, \
  6992. WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS, value)
  6993. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_GET(param) \
  6994. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS, \
  6995. WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS)
  6996. typedef enum {
  6997. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_NONAGGR = 0,
  6998. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR = 1,
  6999. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_MAX,
  7000. } wmi_vdev_custom_sw_retry_type_t;
  7001. typedef struct {
  7002. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param */
  7003. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom software retries will be applied. */
  7004. A_UINT32 ac_type; /* access category (VI, VO, BE, BK) enum wmi_traffic_ac */
  7005. A_UINT32 sw_retry_type; /* 0 = non-aggr retry, 1 = aggr retry (wmi_vdev_custom_sw_retry_type_t enum) */
  7006. A_UINT32 sw_retry_th; /* max retry count per AC base on ac_type for the vdev mentioned in vdev id*/
  7007. } wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param;
  7008. typedef struct {
  7009. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_chainmask_config_cmd_fixed_param */
  7010. A_UINT32 tlv_header;
  7011. /* vdev id indicating to which the vdev, this chainmask configuration will be applied. */
  7012. A_UINT32 vdev_id;
  7013. /* number of chains to use for transmissions in 2.4 GHz band
  7014. * If vdev is MLO vdev, below 2g params apply to all 2.4 GHz band links
  7015. * If vdev is MLO vdev, below 5g params apply to all 5/6 GHz band links
  7016. */
  7017. A_UINT32 num_tx_chains_2g;
  7018. /* number of chains to use for reception in 2.4 GHz band */
  7019. A_UINT32 num_rx_chains_2g;
  7020. /* nss to use for transmissions in 2.4 GHz band */
  7021. A_UINT32 tx_nss_2g;
  7022. /* nss to use for reception in 2.4 GHz band */
  7023. A_UINT32 rx_nss_2g;
  7024. /* number of chains to use for 11b transmissions. Valid only in 2.4 GHz */
  7025. A_UINT32 num_tx_chains_b;
  7026. /* number of chains to use for 11g transmissions. Valid only in 2.4 GHz */
  7027. A_UINT32 num_tx_chains_g;
  7028. /* number of chains to use for transmissions in 5 GHz band */
  7029. A_UINT32 num_tx_chains_5g;
  7030. /* number of chains to use for reception in 5 GHz band */
  7031. A_UINT32 num_rx_chains_5g;
  7032. /* nss to use for transmissions in 5 GHz band */
  7033. A_UINT32 tx_nss_5g;
  7034. /* nss to use for reception in 5 GHz band */
  7035. A_UINT32 rx_nss_5g;
  7036. /* number of chains to use for 11a transmissions. Valid only in 5 GHz */
  7037. A_UINT32 num_tx_chains_a;
  7038. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 2.4 GHz */
  7039. A_UINT32 disable_tx_mrc_2g;
  7040. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 2.4 GHz */
  7041. A_UINT32 disable_rx_mrc_2g;
  7042. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 5 GHz */
  7043. A_UINT32 disable_tx_mrc_5g;
  7044. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 5 GHz */
  7045. A_UINT32 disable_rx_mrc_5g;
  7046. /* Whether fast chain selection is needed when TX chain num is 1 */
  7047. A_UINT32 fast_chain_selection;
  7048. /* RSSI delta threshold to determine better chain, units: dB */
  7049. A_UINT32 better_chain_rssi_threshold;
  7050. } wmi_vdev_chainmask_config_cmd_fixed_param;
  7051. /*
  7052. * Command to enable/disable Green AP Power Save.
  7053. * This helps conserve power during AP operation. When the AP has no
  7054. * stations associated with it, the host can enable Green AP Power Save
  7055. * to request the firmware to shut down all but one transmit and receive
  7056. * chains.
  7057. */
  7058. typedef struct {
  7059. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
  7060. /** pdev_id for identifying the MAC
  7061. * See macros starting with WMI_PDEV_ID_ for values.
  7062. */
  7063. A_UINT32 pdev_id;
  7064. A_UINT32 enable; /*1:enable, 0:disable*/
  7065. } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
  7066. #define MAX_HT_IE_LEN 32
  7067. /* DEPRECATED */
  7068. typedef struct {
  7069. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
  7070. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  7071. A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
  7072. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  7073. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  7074. /** The TLV for the HT IE follows:
  7075. * A_UINT32 ie_data[];
  7076. */
  7077. } wmi_pdev_set_ht_ie_cmd_fixed_param;
  7078. #define MAX_VHT_IE_LEN 32
  7079. /* DEPRECATED */
  7080. typedef struct {
  7081. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
  7082. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  7083. A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
  7084. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  7085. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  7086. /** The TLV for the VHT IE follows:
  7087. * A_UINT32 ie_data[];
  7088. */
  7089. } wmi_pdev_set_vht_ie_cmd_fixed_param;
  7090. typedef struct {
  7091. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
  7092. /** pdev_id for identifying the MAC
  7093. * See macros starting with WMI_PDEV_ID_ for values.
  7094. */
  7095. A_UINT32 pdev_id;
  7096. wmi_mac_addr base_macaddr;
  7097. } wmi_pdev_set_base_macaddr_cmd_fixed_param;
  7098. enum wmi_spectral_scan_mode {
  7099. WMI_SPECTRAL_SCAN_NORMAL_MODE,
  7100. WMI_SPECTRAL_SCAN_AGILE_MODE,
  7101. WMI_SPECTRAL_SCAN_MAX_MODE /* keep this last */
  7102. };
  7103. /*
  7104. * For now, the spectral configuration is global rather than
  7105. * per-vdev. The vdev is a placeholder and will be ignored
  7106. * by the firmware.
  7107. */
  7108. typedef struct {
  7109. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
  7110. A_UINT32 vdev_id;
  7111. A_UINT32 spectral_scan_count;
  7112. A_UINT32 spectral_scan_period;
  7113. A_UINT32 spectral_scan_priority;
  7114. A_UINT32 spectral_scan_fft_size;
  7115. A_UINT32 spectral_scan_gc_ena;
  7116. A_UINT32 spectral_scan_restart_ena;
  7117. A_UINT32 spectral_scan_noise_floor_ref;
  7118. A_UINT32 spectral_scan_init_delay;
  7119. A_UINT32 spectral_scan_nb_tone_thr;
  7120. A_UINT32 spectral_scan_str_bin_thr;
  7121. A_UINT32 spectral_scan_wb_rpt_mode;
  7122. A_UINT32 spectral_scan_rssi_rpt_mode;
  7123. A_UINT32 spectral_scan_rssi_thr;
  7124. A_UINT32 spectral_scan_pwr_format;
  7125. A_UINT32 spectral_scan_rpt_mode;
  7126. A_UINT32 spectral_scan_bin_scale;
  7127. A_UINT32 spectral_scan_dBm_adj;
  7128. A_UINT32 spectral_scan_chn_mask;
  7129. /* See enum wmi_spectral_scan_mode */
  7130. A_UINT32 spectral_scan_mode;
  7131. union {
  7132. /**
  7133. * Two center frequencies are required for agile channel switch
  7134. * supporting True 160 and Restricted 160 ((80+80) or 165) MHz.
  7135. * This parameter specifies the center frequency for cases with a
  7136. * contiguous channel, and the center frequency of the primary
  7137. * portion of a non-contiguous (80+80 or 165 MHz) channel.
  7138. */
  7139. A_UINT32 spectral_scan_center_freq;
  7140. A_UINT32 spectral_scan_center_freq1;
  7141. };
  7142. /* agile span primary channel frequency (MHz), 0 for normal scan*/
  7143. A_UINT32 spectral_scan_chan_freq;
  7144. /* agile scan bandwidth (20, 40, 80, 80+80, 160), enum wmi_channel_width */
  7145. A_UINT32 spectral_scan_chan_width;
  7146. /**
  7147. * Adding freq2 to support True 160 and restricted 160 ((80+80) or 165) MHz.
  7148. * agile span center frequency2 (MHz), 0 for normal scan.
  7149. */
  7150. A_UINT32 spectral_scan_center_freq2;
  7151. /**
  7152. * Flag to enable re-capture of FFT sample if the previous sample has
  7153. * AGC gain change bit set.
  7154. * Re-capture will be enabled only if scan period is greater than 50us.
  7155. */
  7156. A_UINT32 recapture_sample_on_gain_change;
  7157. } wmi_vdev_spectral_configure_cmd_fixed_param;
  7158. /*
  7159. * Enabling, disabling and triggering the spectral scan
  7160. * is a per-vdev operation. That is, it will set channel
  7161. * flags per vdev rather than globally; so concurrent scan/run
  7162. * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
  7163. */
  7164. typedef struct {
  7165. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
  7166. A_UINT32 vdev_id;
  7167. /* 0 - ignore; 1 - trigger, 2 - clear trigger */
  7168. A_UINT32 trigger_cmd;
  7169. /* 0 - ignore; 1 - enable, 2 - disable */
  7170. A_UINT32 enable_cmd;
  7171. /* See enum wmi_spectral_scan_mode */
  7172. A_UINT32 spectral_scan_mode;
  7173. } wmi_vdev_spectral_enable_cmd_fixed_param;
  7174. typedef struct {
  7175. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_tx_power_cmd_fixed_param */
  7176. A_UINT32 vdev_id;
  7177. } wmi_vdev_get_tx_power_cmd_fixed_param;
  7178. /* Primary 80 bin values */
  7179. #define WMI_SSCAN_PRI80_START_BIN_GET(pri80_bins) WMI_GET_BITS(pri80_bins, 0, 16)
  7180. #define WMI_SSCAN_PRI80_START_BIN_SET(pri80_bins, value) WMI_SET_BITS(pri80_bins, 0, 16, value)
  7181. #define WMI_SSCAN_PRI80_END_BIN_GET(pri80_bins) WMI_GET_BITS(pri80_bins, 16, 16)
  7182. #define WMI_SSCAN_PRI80_END_BIN_SET(pri80_bins, value) WMI_SET_BITS(pri80_bins, 16, 16, value)
  7183. /* Secondary 80 bin values */
  7184. #define WMI_SSCAN_SEC80_START_BIN_GET(sec80_bins) WMI_GET_BITS(sec80_bins, 0, 16)
  7185. #define WMI_SSCAN_SEC80_START_BIN_SET(sec80_bins, value) WMI_SET_BITS(sec80_bins, 0, 16, value)
  7186. #define WMI_SSCAN_SEC80_END_BIN_GET(sec80_bins) WMI_GET_BITS(sec80_bins, 16, 16)
  7187. #define WMI_SSCAN_SEC80_END_BIN_SET(sec80_bins, value) WMI_SET_BITS(sec80_bins, 16, 16, value)
  7188. /* 5MHz bin values */
  7189. #define WMI_SSCAN_MID_5MHZ_START_BIN_GET(mid_5mhz_bins) WMI_GET_BITS(mid_5mhz_bins, 0, 16)
  7190. #define WMI_SSCAN_MID_5MHZ_START_BIN_SET(mid_5mhz_bins, value) WMI_SET_BITS(mid_5mhz_bins, 0, 16, value)
  7191. #define WMI_SSCAN_MID_5MHZ_END_BIN_GET(mid_5mhz_bins) WMI_GET_BITS(mid_5mhz_bins, 16, 16)
  7192. #define WMI_SSCAN_MID_5MHZ_END_BIN_SET(mid_5mhz_bins, value) WMI_SET_BITS(mid_5mhz_bins, 16, 16, value)
  7193. typedef struct {
  7194. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_fw_cmd_fixed_param */
  7195. A_UINT32 pdev_id;
  7196. /* See enum wmi_spectral_scan_mode */
  7197. A_UINT32 spectral_scan_mode;
  7198. /**
  7199. * This fixed_param TLV is followed by the below TLVs:
  7200. *
  7201. * wmi_pdev_sscan_fft_bin_index fft_bin_index[]; // array len = 0 or 1
  7202. * If present (array length is 1) this TLV specifies the primary
  7203. * and secondary channels FFT bin indices for True 160 and
  7204. * Restricted 160 (80+80 or 165) MHz BW cases.
  7205. */
  7206. } wmi_pdev_sscan_fw_cmd_fixed_param;
  7207. /**
  7208. * The below structure is used only to send the FFT bin numbers for
  7209. * True 160 and Restricted 160(80+80 or 165) MHz from FW to HOST
  7210. */
  7211. typedef struct {
  7212. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_fft_bin_index */
  7213. /**
  7214. * Bit 15 - 0 : primary 80 start bin number
  7215. * Bit 31 - 16 : primary 80 end bin number
  7216. * Refer to WMI_SSCAN_PRI80_[START,END]_BIN_[GET,SET] macros.
  7217. * Only for True 160 and Restricted 160(80+80 or 165) MHz this
  7218. * will be filled.
  7219. */
  7220. A_UINT32 pri80_bins;
  7221. /**
  7222. * Bit 15 - 0 : secondary 80 start bin number
  7223. * Bit 31 - 16 : secondary 80 end bin number
  7224. * Refer to WMI_SSCAN_SEC80_[START,END]_BIN_[GET,SET] macros.
  7225. * Only for True 160 and Restricted 160(80+80 or 165) MHz this
  7226. * will be filled.
  7227. */
  7228. A_UINT32 sec80_bins;
  7229. /**
  7230. * Bit 15 - 0 : 5Mhz start bin number
  7231. * Bit 31 - 16 : 5Mhz end bin number
  7232. * Refer to WMI_SSCAN_MID_5MHZ_[START,END]_BIN_[GET,SET] macros.
  7233. * Only for Restricted 160(80+80 or 165), otherwise 0.
  7234. */
  7235. A_UINT32 mid_5mhz_bins;
  7236. } wmi_pdev_sscan_fft_bin_index;
  7237. #define WMI_SPECTRAL_CHAN_PUNCTURE_BMAP_GET(puncture_bmap) WMI_GET_BITS(puncture_bmap, 0, 16)
  7238. #define WMI_SPECTRAL_CHAN_PUNCTURE_BMAP_SET(puncture_bmap, value) WMI_SET_BITS(puncture_bmap, 0 , 16, value)
  7239. typedef struct {
  7240. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_chan_info */
  7241. /*
  7242. * For contiguous channels, cfreq1 should be represent the center of the entire span and
  7243. * cfreq2 should be 0 whereas for non-contiguous channels, cfreq1 should represent the
  7244. * center of primary segment whereas cfreq2 should represent the center of secondary segment
  7245. */
  7246. /* Information corresponding to operating channel */
  7247. A_UINT32 operating_pri20_freq; /* In MHz */
  7248. A_UINT32 operating_cfreq1; /* In MHz */
  7249. A_UINT32 operating_cfreq2; /* In MHz */
  7250. A_UINT32 operating_bw; /* as per enum wmi_channel_width */
  7251. /*
  7252. * bits [15:0] are used to represent puncture modes where each bit indicates
  7253. * whether that 20MHz channel is punctured.
  7254. * bits [31:16] are reserved.
  7255. */
  7256. A_UINT32 operating_puncture_20mhz_bitmap;
  7257. /* Information corresponding to channel in which spectral scan is done */
  7258. A_UINT32 sscan_cfreq1; /* In MHz */
  7259. A_UINT32 sscan_cfreq2; /* In MHz */
  7260. A_UINT32 sscan_bw; /* as per enum wmi_channel_width */
  7261. /*
  7262. * bits [15:0] are used to represent puncture modes where each bit indicates
  7263. * whether that 20MHz channel is punctured.
  7264. * bits [31:16] are reserved.
  7265. */
  7266. A_UINT32 sscan_puncture_20mhz_bitmap;
  7267. } wmi_pdev_sscan_chan_info;
  7268. typedef struct
  7269. {
  7270. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_per_detector_info */
  7271. A_UINT32 detector_id; /** ID of the detector involved in the spectral scan */
  7272. /*
  7273. * Start/End frequency (in MHz) to indicate the frequency range to which the detector is listening
  7274. */
  7275. A_UINT32 start_freq; /* in MHz */
  7276. A_UINT32 end_freq; /* in MHz */
  7277. } wmi_pdev_sscan_per_detector_info;
  7278. typedef enum {
  7279. /** Enum to indicate bmsk of spectral scan stop evt on scan count max out */
  7280. WMI_SSCAN_EVT_BMSK_SCAN_STOP_SCOUNT = 0X00000001,
  7281. /** Add more event code bmsks above this */
  7282. WMI_SSCAN_EVT_BMSK_MAX = 0Xffffffff,
  7283. } wmi_sscan_evt_message_code;
  7284. /**
  7285. * The below structure is used to send the start/stop triggers
  7286. * for events related to spectral scan activity from
  7287. * FW to host
  7288. */
  7289. typedef struct {
  7290. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sscan_evt_message_fixed_param */
  7291. A_UINT32 pdev_id;
  7292. /** Refer Enum wmi_sscan_evt_message_code */
  7293. A_UINT32 sscan_evt_code;
  7294. } wmi_sscan_evt_message_fixed_param;
  7295. #define WMI_BEACON_CTRL_TX_DISABLE 0
  7296. #define WMI_BEACON_CTRL_TX_ENABLE 1
  7297. #define WMI_BEACON_CTRL_SWBA_EVENT_DISABLE 2
  7298. #define WMI_BEACON_CTRL_SWBA_EVENT_ENABLE 3
  7299. typedef struct {
  7300. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_offload_ctrl_cmd_fixed_param */
  7301. /** unique id identifying the VDEV, generated by the caller */
  7302. A_UINT32 vdev_id;
  7303. A_UINT32 bcn_ctrl_op; /* fw default 1 (see WMI_BEACON_CTRL defs) */
  7304. } wmi_bcn_offload_ctrl_cmd_fixed_param;
  7305. /** common structure used for wmi_vedv_get_tx_power_event */
  7306. typedef struct {
  7307. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tx_power_event_fixed_param */
  7308. A_UINT32 tx_power; /** units: 0.5 dBm, per-chain tx power */
  7309. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  7310. } wmi_vdev_get_tx_power_event_fixed_param;
  7311. typedef enum {
  7312. /** Limit the offchannel duration */
  7313. WMI_VDEV_LIMIT_OFFCHAN_ENABLE = 0x1,
  7314. /** Skip DFS channels from Scan channel list.
  7315. * valid for both host scans and FW scans */
  7316. WMI_VDEV_LIMIT_OFFCHAN_SKIP_DFS = 0x2,
  7317. } wmi_vdev_limit_offchan_flags;
  7318. typedef struct {
  7319. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_limit_offchan_cmd_fixed_param */
  7320. /** Limit the duration of offchannel events requested by the vdev corresponding to the specified vdev_id */
  7321. A_UINT32 vdev_id;
  7322. /** see enum wmi_vdev_limit_offchan_flags */
  7323. A_UINT32 flags;
  7324. /** max offchannel time allowed in msec when WMI_VDEV_LIMIT_OFFCHAN_ENABLE flag is set */
  7325. A_UINT32 max_offchan_time;
  7326. /** rest time in msec on the BSS channel */
  7327. A_UINT32 rest_time;
  7328. } wmi_vdev_limit_offchan_cmd_fixed_param;
  7329. #define WMI_CSA_EVENT_QSBW_ISE_ID_MASK 0x000000FF /* information sub element id for QSBW, expected value is 0x02 */
  7330. #define WMI_CSA_EVENT_QSBW_ISE_LEN_MASK 0x0000FF00 /* length of QSBW ISE data, expected value is 0x02 */
  7331. #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) */
  7332. #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) */
  7333. #define WMI_CSA_EVENT_QSBW_ISE_ID 0x02
  7334. #define WMI_CSA_EVENT_QSBW_ISE_LEN 0x02
  7335. #define WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK 0x01
  7336. #define WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK 0x02
  7337. #define WMI_CSA_EVENT_QSBW_ISE_CAP_5M(qsbw_ise) \
  7338. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  7339. #define WMI_CSA_EVENT_QSBW_ISE_CAP_10M(qsbw_ise) \
  7340. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  7341. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_5M(qsbw_ise) \
  7342. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  7343. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \
  7344. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  7345. typedef enum {
  7346. WMI_CSA_IE_PRESENT = 0x00000001,
  7347. WMI_XCSA_IE_PRESENT = 0x00000002,
  7348. WMI_WBW_IE_PRESENT = 0x00000004,
  7349. WMI_CSWRAP_IE_PRESENT = 0x00000008,
  7350. WMI_CSWARP_IE_PRESENT = WMI_CSWRAP_IE_PRESENT, /* deprecated: typo */
  7351. WMI_QSBW_ISE_PRESENT = 0x00000010,
  7352. WMI_CSWRAP_IE_EXTENDED_PRESENT = 0x00000020, /* Added bitmask to verify if the additional information is filled in */
  7353. WMI_CSWRAP_IE_EXT_VER_2_PRESENT = 0x00000040 /* Added bitmask to see if additional info is present in CS wrap IE */
  7354. } WMI_CSA_EVENT_IES_PRESENT_FLAG;
  7355. /* wmi CSA receive event from beacon frame */
  7356. typedef struct {
  7357. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
  7358. A_UINT32 i_fc_dur; /* Bit 0-15: FC, Bit 16-31: DUR */
  7359. wmi_mac_addr i_addr1;
  7360. wmi_mac_addr i_addr2;
  7361. /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
  7362. * changed in the future without breaking WMI compatibility */
  7363. A_UINT32 csa_ie[2];
  7364. A_UINT32 xcsa_ie[2];
  7365. A_UINT32 wb_ie[2];
  7366. union {
  7367. A_UINT32 cswrap_ie; /* use this */
  7368. A_UINT32 cswarp_ie; /* deprecated (typo) */
  7369. };
  7370. A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
  7371. A_UINT32 qsbw_ise;
  7372. /* cswrap_ie_extended:
  7373. * Stores full IEEE80211_ELEMID_CHAN_SWITCH_WRAP information element.
  7374. * The first two octets host the Element ID and Length fields.
  7375. * The IE comprises New Country Subelement (optional and max length 6),
  7376. * Wide Bandwidth Channel Subelement (optional and max length 5) and
  7377. * New Transmit Power Envelope subelement (optional and max length 7)
  7378. * The 4-byte words within cswrap_ie_extended[] use little endian ordering;
  7379. * the first octect of the IE resides in bits 7:0 of cswrap_ie_extended[0],
  7380. * the second octet resides in bits 15:8 of cswrap_ie_extended[0] and so on.
  7381. */
  7382. A_UINT32 cswrap_ie_extended[5];
  7383. /* num_bytes_valid_in_cswrap_ie_ext_ver2:
  7384. * This fixed_param TLV can be followed by a VAR length TLV
  7385. * variable-length byte-array TLV for CS WRAP IE.
  7386. * Since the variable-length byte-array TLVs are always padded, if needed,
  7387. * to contain a multiple of 4 bytes, this field shows how many of the bytes
  7388. * contain valid data, versus how many are only for alignment padding.
  7389. */
  7390. A_UINT32 num_bytes_valid_in_cswrap_ie_ext_ver2;
  7391. /*
  7392. * Add link id, mld address and link address
  7393. * fields for N link CSA support
  7394. */
  7395. A_UINT32 link_id; /* Link id associated with AP */
  7396. wmi_mac_addr mld_mac_address; /* AP mld mac address */
  7397. wmi_mac_addr link_mac_address; /* AP link mac address */
  7398. A_UINT32 mld_mac_address_present :1,
  7399. link_mac_address_present :1,
  7400. link_id_present :1,
  7401. reserved :29;
  7402. /*
  7403. * This initial fixed_param TLV may be followed by the below TLVs:
  7404. * - cs_wrap_ie variable-length byte-array TLV
  7405. */
  7406. } wmi_csa_event_fixed_param;
  7407. #define WMI_GET_MLD_MAC_ADDRESS_PRESENT(mld_mac_address_present) \
  7408. WMI_GET_BITS(mld_mac_address_present, 0, 1)
  7409. #define WMI_SET_MLD_MAC_ADDRESS_PRESENT(mld_mac_address_present, value) \
  7410. WMI_SET_BITS(mld_mac_address_present, 0, 1, value)
  7411. #define WMI_GET_LINK_ADDRESS_PRESENT(link_mac_address_present) \
  7412. WMI_GET_BITS(link_mac_address_present, 1, 1)
  7413. #define WMI_SET_LINK_ADDRESS_PRESENT(link_mac_address_present, value) \
  7414. WMI_SET_BITS(link_mac_address_present, 1, 1, value)
  7415. #define WMI_GET_LINK_ID_PRESENT(link_id_present) \
  7416. WMI_GET_BITS(link_id_present, 2, 1)
  7417. #define WMI_SET_LINK_ID_PRESENT(link_id_present, value) \
  7418. WMI_SET_BITS(link_id_present, 2, 1, value)
  7419. typedef enum {
  7420. WMI_QUIET_EVENT_START = 0,
  7421. WMI_QUIET_EVENT_STOP = 1,
  7422. } WMI_QUIET_EVENT_FLAG;
  7423. /* WMI Quiet receive event from beacon frame */
  7424. typedef struct {
  7425. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_event_fixed_param */
  7426. wmi_mac_addr mld_mac_address; /* AP mld mac address */
  7427. wmi_mac_addr link_mac_address; /* AP link mac address */
  7428. A_UINT32 linkid; /* Link id associated with AP */
  7429. A_UINT32 mld_mac_address_present :1,
  7430. link_mac_address_present :1,
  7431. linkid_present :1,
  7432. reserved :29;
  7433. A_UINT32 quiet_status; /* WMI_QUIET_EVENT_FLAG: quiet start or stop */
  7434. } wmi_quiet_event_fixed_param;
  7435. typedef enum {
  7436. WAL_PEER_MCAST2UCAST_DISABLED = 0,
  7437. WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1, /* Drop the frames if match is not found */
  7438. WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, /* Send as mcast if match is not found */
  7439. } WMI_PEER_MCAST2UCAST_MODE;
  7440. typedef enum {
  7441. PKT_PWR_SAVE_NAP_ENABLE = 0x00000001,
  7442. PKT_PWR_SAVE_LS_ENABLE = 0x00000002,
  7443. PKT_PWR_SAVE_DS_ENABLE = 0x00000004,
  7444. PKT_PWR_SAVE_BTCOEX_ENABLE = 0x00000008,
  7445. PKT_PWR_SAVE_FSM_ENABLE = 0x80000000,
  7446. } WMI_PDEV_PKT_PWR_SAVE_LEVEL;
  7447. /** MACROs to get user setting for enabling/disabling Secondary Rate Feature set
  7448. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  7449. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  7450. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  7451. * Bit 3-5 : "Xretry threshold" to use
  7452. * Bit 6~31 : reserved for future use.
  7453. */
  7454. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT_S 0
  7455. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT 0x00000001
  7456. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT_S 1
  7457. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT 0x00000002
  7458. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION_S 2
  7459. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION 0x00000004
  7460. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD_S 3
  7461. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD 0x00000038
  7462. #define WMI_PDEV_PARAM_IS_SECONDARY_RATE_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT)
  7463. #define WMI_PDEV_PARAM_IS_RTS_BL_WL_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT)
  7464. #define WMI_PDEV_PARAM_IS_HIGHER_MCS_XRETRY_RESTRICTION_SET(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION)
  7465. #define WMI_PDEV_PARAM_GET_XRETRY_THRESHOLD(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_XRETRY_THRESHOLD)
  7466. /*
  7467. * The WMI_SCHED_MODE_FLAGS enum is used by the following WMI commands:
  7468. *
  7469. * WMI_VDEV_PARAM_SET_DISABLED_SCHED_MODES
  7470. * WMI_PDEV_PARAM_SET_DISABLED_SCHED_MODES
  7471. * WMI_PEER_SCHED_MODE_DISABLE_CMDID
  7472. * WMI_SAWF_SVC_CLASS_CFG_CMDID
  7473. */
  7474. typedef enum {
  7475. WMI_SCHED_MODE_DL_MU_MIMO = 0x00000001,
  7476. WMI_SCHED_MODE_UL_MU_MIMO = 0x00000002,
  7477. WMI_SCHED_MODE_DL_OFDMA = 0x00000004,
  7478. WMI_SCHED_MODE_UL_OFDMA = 0x00000008,
  7479. } WMI_SCHED_MODE_FLAGS;
  7480. typedef enum {
  7481. /** TX chain mask */
  7482. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  7483. /** RX chain mask */
  7484. WMI_PDEV_PARAM_RX_CHAIN_MASK, /* 0x2 */
  7485. /** TX power limit for 2G Radio */
  7486. WMI_PDEV_PARAM_TXPOWER_LIMIT2G, /* 0x3 */
  7487. /** TX power limit for 5G Radio */
  7488. WMI_PDEV_PARAM_TXPOWER_LIMIT5G, /* 0x4 */
  7489. /** TX power scale */
  7490. WMI_PDEV_PARAM_TXPOWER_SCALE, /* 0x5 */
  7491. /** Beacon generation mode . 0: host, 1: target */
  7492. WMI_PDEV_PARAM_BEACON_GEN_MODE, /* 0x6 */
  7493. /** Beacon generation mode . 0: staggered 1: bursted */
  7494. WMI_PDEV_PARAM_BEACON_TX_MODE, /* 0x7 */
  7495. /** Resource manager off chan mode .
  7496. * 0: turn off off chan mode. 1: turn on offchan mode
  7497. */
  7498. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, /* 0x8 */
  7499. /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
  7500. WMI_PDEV_PARAM_PROTECTION_MODE, /* 0x9 */
  7501. /** Dynamic bandwidth 0: disable 1: enable */
  7502. WMI_PDEV_PARAM_DYNAMIC_BW, /* 0xa */
  7503. /** Non aggregrate/ 11g sw retry threshold.0-disable */
  7504. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0xb */
  7505. /** aggregrate sw retry threshold. 0-disable*/
  7506. WMI_PDEV_PARAM_AGG_SW_RETRY_TH, /* 0xc */
  7507. /** Station kickout threshold (non of consecutive failures).0-disable */
  7508. WMI_PDEV_PARAM_STA_KICKOUT_TH, /* 0xd */
  7509. /** Aggerate size scaling configuration per AC */
  7510. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, /* 0xe */
  7511. /** LTR enable */
  7512. WMI_PDEV_PARAM_LTR_ENABLE, /* 0xf */
  7513. /** LTR latency for BE, in us */
  7514. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, /* 0x10 */
  7515. /** LTR latency for BK, in us */
  7516. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, /* 0x11 */
  7517. /** LTR latency for VI, in us */
  7518. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, /* 0x12 */
  7519. /** LTR latency for VO, in us */
  7520. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, /* 0x13 */
  7521. /** LTR AC latency timeout, in ms */
  7522. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, /* 0x14 */
  7523. /** LTR platform latency override, in us */
  7524. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, /* 0x15 */
  7525. /** LTR-M override, in us */
  7526. WMI_PDEV_PARAM_LTR_RX_OVERRIDE, /* 0x16 */
  7527. /** Tx activity timeout for LTR, in us */
  7528. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, /* 0x17 */
  7529. /** L1SS state machine enable */
  7530. WMI_PDEV_PARAM_L1SS_ENABLE, /* 0x18 */
  7531. /** Deep sleep state machine enable */
  7532. WMI_PDEV_PARAM_DSLEEP_ENABLE, /* 0x19 */
  7533. /** RX buffering flush enable */
  7534. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, /* 0x1a */
  7535. /** RX buffering matermark */
  7536. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, /* 0x1b */
  7537. /** RX buffering timeout enable */
  7538. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, /* 0x1c */
  7539. /** RX buffering timeout value */
  7540. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, /* 0x1d */
  7541. /** pdev level stats update period in ms */
  7542. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, /* 0x1e */
  7543. /** vdev level stats update period in ms */
  7544. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, /* 0x1f */
  7545. /** peer level stats update period in ms */
  7546. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, /* 0x20 */
  7547. /** beacon filter status update period */
  7548. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, /* 0x21 */
  7549. /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  7550. WMI_PDEV_PARAM_PMF_QOS, /* 0x22 */
  7551. /** Access category on which ARP frames are sent */
  7552. WMI_PDEV_PARAM_ARP_AC_OVERRIDE, /* 0x23 */
  7553. /** DCS configuration */
  7554. WMI_PDEV_PARAM_DCS, /* 0x24 */
  7555. /** Enable/Disable ANI on target */
  7556. WMI_PDEV_PARAM_ANI_ENABLE, /* 0x25 */
  7557. /** configure the ANI polling period */
  7558. WMI_PDEV_PARAM_ANI_POLL_PERIOD, /* 0x26 */
  7559. /** configure the ANI listening period */
  7560. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, /* 0x27 */
  7561. /** configure OFDM immunity level */
  7562. WMI_PDEV_PARAM_ANI_OFDM_LEVEL, /* 0x28 */
  7563. /** configure CCK immunity level */
  7564. WMI_PDEV_PARAM_ANI_CCK_LEVEL, /* 0x29 */
  7565. /** Enable/Disable CDD for 1x1 STAs in rate control module */
  7566. WMI_PDEV_PARAM_DYNTXCHAIN, /* 0x2a */
  7567. /** Enable/Disable proxy STA */
  7568. WMI_PDEV_PARAM_PROXY_STA, /* 0x2b */
  7569. /** Enable/Disable low power state when all VDEVs are inactive/idle. */
  7570. WMI_PDEV_PARAM_IDLE_PS_CONFIG, /* 0x2c */
  7571. /** Enable/Disable power gating sleep */
  7572. WMI_PDEV_PARAM_POWER_GATING_SLEEP, /* 0x2d */
  7573. /** Enable/Disable Rfkill */
  7574. WMI_PDEV_PARAM_RFKILL_ENABLE, /* 0x2e */
  7575. /** Set Bursting DUR */
  7576. WMI_PDEV_PARAM_BURST_DUR, /* 0x2f */
  7577. /** Set Bursting ENABLE */
  7578. WMI_PDEV_PARAM_BURST_ENABLE, /* 0x30 */
  7579. /** HW rfkill config */
  7580. WMI_PDEV_PARAM_HW_RFKILL_CONFIG, /* 0x31 */
  7581. /** Enable radio low power features */
  7582. WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE, /* 0x32 */
  7583. /** L1SS entry and residency time track */
  7584. WMI_PDEV_PARAM_L1SS_TRACK, /* 0x33 */
  7585. /** set hyst at runtime, requirement from SS */
  7586. WMI_PDEV_PARAM_HYST_EN, /* 0x34 */
  7587. /** Enable/ Disable POWER COLLAPSE */
  7588. WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE, /* 0x35 */
  7589. /** configure LED system state */
  7590. WMI_PDEV_PARAM_LED_SYS_STATE, /* 0x36 */
  7591. /** Enable/Disable LED */
  7592. WMI_PDEV_PARAM_LED_ENABLE, /* 0x37 */
  7593. /** set DIRECT AUDIO time latency */
  7594. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */ /* 0x38 */
  7595. /** set DIRECT AUDIO Feature ENABLE */
  7596. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */ /* 0x39 */
  7597. /** pdev level whal mib stats update enable */
  7598. WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE, /* 0x3a */
  7599. /** ht/vht info based on vdev */
  7600. WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD, /* 0x3b */
  7601. /** Set CTS channel BW for dynamic BW adjustment feature */
  7602. WMI_PDEV_PARAM_CTS_CBW, /* 0x3c */
  7603. /** Set GPIO pin info used by WNTS */
  7604. WMI_PDEV_PARAM_WNTS_CONFIG, /* 0x3d */
  7605. /** Enable/Disable hardware adaptive early rx feature */
  7606. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE, /* 0x3e */
  7607. /** The minimum early rx duration, to ensure early rx duration is non-zero */
  7608. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP, /* 0x3f */
  7609. /** Increasing/decreasing step used by hardware */
  7610. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP, /* 0x40 */
  7611. /** The fixed early rx duration when adaptive early rx is disabled */
  7612. WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP, /* 0x41 */
  7613. /** Enable/Disable bmiss based adaptive beacon timeout feature */
  7614. WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE, /* 0x42 */
  7615. /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
  7616. WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT, /* 0x43 */
  7617. /** Increasing/decreasing step used by hardware */
  7618. WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP, /* 0x44 */
  7619. /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
  7620. WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT, /* 0x45 */
  7621. /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
  7622. WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE, /* 0x46 */
  7623. /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
  7624. WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE, /* 0x47 */
  7625. /** 2G TX chain mask */
  7626. WMI_PDEV_PARAM_TX_CHAIN_MASK_2G, /* 0x48 */
  7627. /** 2G RX chain mask */
  7628. WMI_PDEV_PARAM_RX_CHAIN_MASK_2G, /* 0x49 */
  7629. /** 5G TX chain mask */
  7630. WMI_PDEV_PARAM_TX_CHAIN_MASK_5G, /* 0x4a */
  7631. /** 5G RX chain mask */
  7632. WMI_PDEV_PARAM_RX_CHAIN_MASK_5G, /* 0x4b */
  7633. /* Set tx chain mask for CCK rates */
  7634. WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK, /* 0x4c */
  7635. /* Set tx chain mask for 1SS stream */
  7636. WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS, /* 0x4d */
  7637. /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected */
  7638. WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG, /* 0x4e */
  7639. /** TX power backoff in dB: tx power -= param value
  7640. * Host passes values(DB) to Halphy, Halphy reduces the power table by
  7641. * the values. Safety check will happen in Halphy
  7642. */
  7643. WMI_PDEV_PARAM_TXPOWER_DECR_DB, /* 0x4f */
  7644. /** enable and disable aggregate burst along with duration */
  7645. WMI_PDEV_PARAM_AGGR_BURST, /* 0x50 */
  7646. /** Set the global RX decap mode */
  7647. WMI_PDEV_PARAM_RX_DECAP_MODE, /* 0x51 */
  7648. /** Enable/Disable Fast channel reset */
  7649. WMI_PDEV_PARAM_FAST_CHANNEL_RESET, /* 0x52 */
  7650. /** Default antenna for Smart antenna */
  7651. WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, /* 0x53 */
  7652. /** Set the user-specified antenna gain */
  7653. WMI_PDEV_PARAM_ANTENNA_GAIN, /* 0x54 */
  7654. /** Set the user-specified RX filter */
  7655. WMI_PDEV_PARAM_RX_FILTER, /* 0x55 */
  7656. /** configure the user-specified MCAST tid for managed mcast feature
  7657. * 0-15 is the valid range. 0xff will clear the tid setting */
  7658. WMI_PDEV_SET_MCAST_TO_UCAST_TID, /* 0x56 */
  7659. /** Enable/Disable Proxy sta mode */
  7660. WMI_PDEV_PARAM_PROXY_STA_MODE, /* 0x57 */
  7661. /** configure the mcast2ucast mode for the pdev->peer_mcast.
  7662. * See WMI_PEER_MCAST2UCAST_MODE for possible values */
  7663. WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE, /* 0x58 */
  7664. /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
  7665. WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, /* 0x59 */
  7666. /** Remove the Mcast buffers added by host */
  7667. WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, /* 0x5a */
  7668. /** En/disable station power save state indication */
  7669. WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE, /* 0x5b */
  7670. /** Access category on which ARP frames are sent */
  7671. WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE, /* 0x5c */
  7672. /** allow or disallow interbss frame forwarding */
  7673. WMI_PDEV_PARAM_BLOCK_INTERBSS, /* 0x5d */
  7674. /** Enable/Disable reset */
  7675. WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID, /* 0x5e */
  7676. /** Enable/Disable/Set MSDU_TTL in milliseconds. */
  7677. WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID, /* 0x5f */
  7678. /** Set global PPDU duration limit (usec). */
  7679. WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID, /* 0x60 */
  7680. /** set txbf sounding period of vap in milliseconds */
  7681. WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID, /* 0x61 */
  7682. /** Set promiscuous mode */
  7683. WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID, /* 0x62 */
  7684. /** Set burst mode */
  7685. WMI_PDEV_PARAM_SET_BURST_MODE_CMDID, /* 0x63 */
  7686. /** enable enhanced stats */
  7687. WMI_PDEV_PARAM_EN_STATS, /* 0x64 */
  7688. /** Set mu-grouping policy */
  7689. WMI_PDEV_PARAM_MU_GROUP_POLICY, /* 0x65 */
  7690. /** Channel Hopping Enable */
  7691. WMI_PDEV_PARAM_NOISE_DETECTION, /* 0x66 */
  7692. /** Set Channel Hopping NF threshold in dBm */
  7693. WMI_PDEV_PARAM_NOISE_THRESHOLD, /* 0x67 */
  7694. /** Set PAPRD policy */
  7695. WMI_PDEV_PARAM_DPD_ENABLE, /* 0x68 */
  7696. /** Enable/disable mcast/bcast echo, used by ProxySTA */
  7697. WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO, /* 0x69 */
  7698. /** ATF enable/disable strict schedule */
  7699. WMI_PDEV_PARAM_ATF_STRICT_SCH, /* 0x6a */
  7700. /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
  7701. WMI_PDEV_PARAM_ATF_SCHED_DURATION, /* 0x6b */
  7702. /** Default antenna polarization */
  7703. WMI_PDEV_PARAM_ANT_PLZN, /* 0x6c */
  7704. /** Set mgmt retry limit */
  7705. WMI_PDEV_PARAM_MGMT_RETRY_LIMIT, /* 0x6d */
  7706. /** Set CCA sensitivity level in dBm */
  7707. WMI_PDEV_PARAM_SENSITIVITY_LEVEL, /* 0x6e */
  7708. /** Set 2G positive and negative Tx power in 0.5dBm units */
  7709. WMI_PDEV_PARAM_SIGNED_TXPOWER_2G, /* 0x6f */
  7710. /** Set 5G positive and negative Tx power in 0.5dBm
  7711. * units */
  7712. WMI_PDEV_PARAM_SIGNED_TXPOWER_5G, /* 0x70 */
  7713. /** Enable/disable AMSDU for tids */
  7714. WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU, /* 0x71 */
  7715. /** Enable/disable AMPDU for tids */
  7716. WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU, /* 0x72 */
  7717. /** Set CCA threshold in dBm */
  7718. WMI_PDEV_PARAM_CCA_THRESHOLD, /* 0x73 */
  7719. /** RTS Fixed rate setting */
  7720. WMI_PDEV_PARAM_RTS_FIXED_RATE, /* 0x74 */
  7721. /** Pdev reset */
  7722. WMI_PDEV_PARAM_PDEV_RESET, /* 0x75 */
  7723. /** wapi mbssid offset **/
  7724. WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET, /* 0x76 */
  7725. /** ARP DEBUG source address*/
  7726. WMI_PDEV_PARAM_ARP_DBG_SRCADDR, /* 0x77 */
  7727. /** ARP DEBUG destination address*/
  7728. WMI_PDEV_PARAM_ARP_DBG_DSTADDR, /* 0x78 */
  7729. /** ATF enable/disable obss noise scheduling */
  7730. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH, /* 0x79 */
  7731. /** ATF obss noise scaling factor */
  7732. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR, /* 0x7a */
  7733. /**
  7734. * TX power reduction scaling exponent - final tx power is the
  7735. * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
  7736. * 2^(scale exponent). For example:
  7737. * If this scale exponent is 0, the power is unchanged (divided by 2^0)
  7738. * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
  7739. * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
  7740. * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
  7741. */
  7742. WMI_PDEV_PARAM_CUST_TXPOWER_SCALE, /* 0x7b */
  7743. /** ATF enabe/disable dynamically */
  7744. WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE, /* 0x7c */
  7745. /** Set tx retry limit for control frames. 0 = disable, 31 = max */
  7746. WMI_PDEV_PARAM_CTRL_RETRY_LIMIT, /* 0x7d */
  7747. /** Set propagation delay for 2G / 5G band.
  7748. * The propagation delay is fundamentally a per-peer property, but
  7749. * the target may not support per-peer settings for ack timeouts.
  7750. * This pdev parameter allows the MAC-level ack timeout to be set to
  7751. * a value suitable for the worst-case propagation delay of any peer
  7752. * within that pdev.
  7753. * Units are microseconds.
  7754. */
  7755. WMI_PDEV_PARAM_PROPAGATION_DELAY, /* 0x7e */
  7756. /**
  7757. * Host can enable/disable ANT DIV feature
  7758. * if it's been enabled in BDF
  7759. */
  7760. WMI_PDEV_PARAM_ENA_ANT_DIV, /* 0x7f */
  7761. /** Host can force one chain to select a specific ANT */
  7762. WMI_PDEV_PARAM_FORCE_CHAIN_ANT, /* 0x80 */
  7763. /**
  7764. * Start a cycle ANT self test periodically.
  7765. * In the test, the FW would select each ANT pair
  7766. * one by one, the cycle time could be configured
  7767. * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
  7768. */
  7769. WMI_PDEV_PARAM_ANT_DIV_SELFTEST, /* 0x81 */
  7770. /**
  7771. * Configure the cycle time of ANT self test,
  7772. * the unit is micro second. Per the timer
  7773. * limitation, too small value could be not so
  7774. * accurate.
  7775. */
  7776. WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL, /* 0x82 */
  7777. /**
  7778. * wlan stats observation period, the unit is millisecond.
  7779. * The value of 0 is used to turn off periodic stats report.
  7780. */
  7781. WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD, /* 0x83 */
  7782. /**
  7783. * Set tx_ppdu_delay[] bin size to specify how many
  7784. * milliseconds each bin of the wmi_tx_stats.tx_ppdu_delay[]
  7785. * histogram represents.
  7786. */
  7787. WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS, /* 0x84 */
  7788. /** set wmi_tx_stats.tx_ppdu_delay[] array length */
  7789. WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN, /* 0x85 */
  7790. /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
  7791. WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN, /* 0x86 */
  7792. /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
  7793. WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN, /* 0x87 */
  7794. /** Set TX delay value in TX sch module, unit is microseconds */
  7795. WMI_PDEV_PARAM_TX_SCH_DELAY, /* 0x88 */
  7796. /** Set RTS enable for SIFS bursting */
  7797. WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING, /* 0x89 */
  7798. /** Set Maximum number of MPDUs in an AMPDU*/
  7799. WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU, /* 0x8a */
  7800. /** Enable/disable peer stats info mechanism
  7801. * A zero value disables; a non-zero value enables.
  7802. */
  7803. WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE, /* 0x8b */
  7804. /** Configure Fast PWR Transition mode
  7805. * 0x0 -> inidcates Fast PWR transition disabled
  7806. * 0x1 -> indicates Static mode enabled
  7807. * 0x2 -> indicates Dynamic mode enabled
  7808. */
  7809. WMI_PDEV_PARAM_FAST_PWR_TRANSITION, /* 0x8c */
  7810. /** Enable/disable radio channel stats mechanism
  7811. * A zero value disables; a non-zero value enables.
  7812. */
  7813. WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE, /* 0x8d */
  7814. /** Enable/disable radio diagnosis feature
  7815. * which allows retrieving the status of radio.
  7816. * A zero value disables; a non-zero value enables.
  7817. */
  7818. WMI_PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE, /* 0x8e */
  7819. /** Enable/Disable mesh mcast traffic
  7820. * 1 - Allow mesh mcast traffic
  7821. * 0 - Disallow mesh mcast traffic
  7822. */
  7823. WMI_PDEV_PARAM_MESH_MCAST_ENABLE, /* 0x8f */
  7824. /** Enable/Disable smart chainmask scheme
  7825. * 1 - Enable smart chainmask scheme
  7826. * 0 - Disable smart chainmask scheme
  7827. */
  7828. WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME, /* 0x90 */
  7829. /** Enable/Disable alternate chainmask scheme
  7830. * 1 - Enable alternate chainmask scheme
  7831. * 0 - Disable alternate chainmask scheme
  7832. */
  7833. WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME, /* 0x91 */
  7834. /** User configured parameters for antenna diversity algorithm
  7835. * BIT[25..13]: Probe period (milliseconds units)
  7836. * BIT[12..0]: Stay period (milliseconds units)
  7837. */
  7838. WMI_PDEV_PARAM_ANT_DIV_USRCFG, /* 0x92 */
  7839. /** pdev packet power save levels,
  7840. * refer to WMI_PDEV_PKT_PWR_SAVE_LEVEL
  7841. */
  7842. WMI_PDEV_PARAM_PACKET_POWER_SAVE_LEVEL, /* 0x93 */
  7843. /** Define IOT pattern to be enabled/disabled
  7844. * bit values: 0 - disable, 1 - enable
  7845. * BIT[0..31]: each bit represents an IOT pattern
  7846. * -----
  7847. * Bit 0 - avoid SMPS with certain APs
  7848. * Bits 31:1 - reserved
  7849. */
  7850. WMI_PDEV_PARAM_SET_IOT_PATTERN, /* 0x94 */
  7851. /** ACK timeout - change wireless packet ack timeout configuration,
  7852. * units are microseconds
  7853. */
  7854. WMI_PDEV_PARAM_ACK_TIMEOUT, /* 0x95 */
  7855. /** Number of TX chains to use for a/b/g rates.
  7856. * bit 0~15 : 11b mode TX chain number.
  7857. * bit 16~31 : 11ag mode TX chain number.
  7858. */
  7859. WMI_PDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x96 */
  7860. /** Enable/Disable cck txfir override
  7861. * bit 0 - enable (1) or disable (0) CCK tx FIR
  7862. * bits 31:1 - unused / reserved (set to 0)
  7863. */
  7864. WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE, /* 0x97 */
  7865. /** Enable/Disable DTIM Synth
  7866. * 1- Enable DTIM Synth
  7867. * 0- Disable DTIM Synth
  7868. */
  7869. WMI_PDEV_PARAM_DTIM_SYNTH, /* 0x98 */
  7870. /** Configure auto detect power failure feature.
  7871. * 0 - FW will trigger crash if power failure happens.
  7872. * 1 - FW will send a failure notification to host, and the host
  7873. * framework determines how to respond to the power failure
  7874. * 2 - Silently rejuvenate if power failure occurs.
  7875. * 3 - Feature disabled.
  7876. */
  7877. WMI_PDEV_AUTO_DETECT_POWER_FAILURE, /* 0x99 */
  7878. /** Configure operating voltage corner mode based on phymode and bw.
  7879. * bit 0-1 - operating voltage corner mode for 11a/b.
  7880. * bit 2-3 - operating voltage corner mode for 11g.
  7881. * bit 4-5 - operating voltage corner mode for 11n, 20MHz, 1x1.
  7882. * bit 6-7 - operating voltage corner mode for 11n, 20MHz, 2x2.
  7883. * bit 8-9 - operating voltage corner mode for 11n, 40MHz, 1x1.
  7884. * bit 10-11 - operating voltage corner mode for 11n, 40MHz, 2x2.
  7885. * bit 12-13 - operating voltage corner mode for 11ac, 20MHz, 1x1.
  7886. * bit 14-15 - operating voltage corner mode for 11ac, 20MHz, 2x2.
  7887. * bit 16-17 - operating voltage corner mode for 11ac, 40MHz, 1x1.
  7888. * bit 18-19 - operating voltage corner mode for 11ac, 40MHz, 2x2.
  7889. * bit 20-21 - operating voltage corner mode for 11ac, 80MHz, 1x1.
  7890. * bit 22-23 - operating voltage corner mode for 11ac, 80MHz, 2x2.
  7891. * bit 24-25 - operating voltage corner mode for 11ac, 160MHz, 1x1.
  7892. * bit 26-27 - operating voltage corner mode for 11ac, 160MHz, 2x2.
  7893. * ---------------------------------------------
  7894. * 00 - Static voltage corner SVS
  7895. * 01 - static voltage corner LOW SVS
  7896. * 10 - Dynamic voltage corner selection based on TPUT
  7897. * 11 - Dynamic voltage corner selection based on TPUT and Tx Flush counters
  7898. */
  7899. WMI_PDEV_UPDATE_WDCVS_ALGO, /* 0x9a */
  7900. /* Enable/Disable data stall detection */
  7901. WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE, /* 0x9b */
  7902. /* GCMP Support indication to FW */
  7903. WMI_PDEV_PARAM_GCMP_SUPPORT_ENABLE, /* 0x9c */
  7904. /** Enable/Disable chain selection optimization for one chain dtim
  7905. * non-zero - Enable optimization and use this non-zero value as the
  7906. * chain imbalance threshold for optimization to kick in
  7907. * (units = dB)
  7908. * 0- Disable optimization
  7909. */
  7910. WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION,/* 0x9d */
  7911. /*
  7912. * Override default FW behavior and explicitly enable / disable
  7913. * the use of CCK for PPDU transmissions.
  7914. *
  7915. * When CCK transmissions are disabled, the default OFDM legacy
  7916. * rate will be used instead.
  7917. */
  7918. WMI_PDEV_PARAM_CCK_TX_ENABLE, /* 0x9e */
  7919. /*
  7920. * Set the user-specified antenna gain, but in 0.5 dB units.
  7921. * This is a finer-granularity version of WMI_PDEV_PARAM_ANTENNA_GAIN.
  7922. * E.g. to set a gain of 15.5 dB, a value of 31 could be provided as the
  7923. * value accompanying the PDEV_PARAM_ANTENNA_GAIN_HALF_DB parameter type.
  7924. */
  7925. WMI_PDEV_PARAM_ANTENNA_GAIN_HALF_DB, /* 0x9f */
  7926. /*
  7927. * Global Enable/Disable control for Secondary Retry Feature Set
  7928. *
  7929. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  7930. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  7931. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  7932. * Bit 3-5: "Xretry threshold" to use
  7933. */
  7934. WMI_PDEV_PARAM_SECONDARY_RETRY_ENABLE, /* 0xA0 */
  7935. /** Set global uplink triggered PPDU duration limit (usec). */
  7936. WMI_PDEV_PARAM_SET_UL_PPDU_DURATION, /* 0xA1 */
  7937. /** Set target buffer status report trigger interval (ms) */
  7938. WMI_PDEV_PARAM_SET_UL_BSR_TRIG_INTERVAL, /* 0xA2 */
  7939. /** Use simplified equal RU allocation for DL and UL OFDMA */
  7940. WMI_PDEV_PARAM_EQUAL_RU_ALLOCATION_ENABLE, /* 0xA3 */
  7941. /** Enable/disable MWS-COEX 4G (LTE) Quick FTDM.
  7942. * 0 - Don't allow quick FTDM Policy (Default)
  7943. * 1 - Allow quick FTDM policy.
  7944. */
  7945. WMI_PDEV_PARAM_MWSCOEX_4G_ALLOW_QUICK_FTDM, /* 0xA4 */
  7946. /** Set MWS-COEX 5G-NR power limit.
  7947. * 0: Don't apply user specific power limit,
  7948. * use internal power limit (Default)
  7949. * 1-2: invalid value (ignored)
  7950. * 3-21: apply the specified value as the external power limit, in dBm
  7951. * >21: invalid value (ignored)
  7952. */
  7953. WMI_PDEV_PARAM_MWSCOEX_SET_5GNR_PWR_LIMIT, /* 0xA5 */
  7954. /** Set max msdus available for cong ctrl in target */
  7955. WMI_PDEV_PARAM_SET_CONG_CTRL_MAX_MSDUS, /* 0xA6 */
  7956. /*
  7957. * Configures the Estimated Throughput Calculation indication (802.11mc) settings.
  7958. * The accompanying A_UINT32 parameter, in units of seconds, specifies how often FW needs to send the ESP estimation indication to the host.
  7959. * Value 0: Disable this feature
  7960. * Non zero Value: Periodicity (seconds)
  7961. */
  7962. WMI_PDEV_PARAM_ESP_INDICATION_PERIOD, /* 0xA7 */
  7963. /*
  7964. * Enable/Disable periodic peer CFR capture
  7965. * WMI_PEER_CFR_CAPTURE_ENABLE - Enable per peer periodic CFR capture
  7966. * WMI_PEER_CFR_CAPTURE_DISABLE - Disable per peer periodic CFR capture
  7967. */
  7968. WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE,
  7969. /*
  7970. * Set the base timer for the periodic CFR capture. By default this is 10ms.
  7971. * The period ('periodicity' param in wmi_peer_cfr_capture_cmd) of
  7972. * CFR measurement of other peers will be in multiples of this base timer.
  7973. * The unit is in milliseconds.
  7974. */
  7975. WMI_PDEV_PARAM_PERIODIC_CFR_BASE_TIMER,
  7976. /*
  7977. * Once the periodic capture is enabled using
  7978. * WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE, the timer starts running in
  7979. * the target. This parameter will ensure that the timer stops if there are
  7980. * no active peers in the capture list. Once the peers are added again to
  7981. * the capture list, the timer will not start again. The timer has to be
  7982. * started again using WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE.
  7983. * Value 1: Enable this feature
  7984. * Value 0: Disable this feature
  7985. */
  7986. WMI_PDEV_PARAM_ENABLE_OPTIMIZED_PERIODIC_CFR_TIMER,
  7987. /*
  7988. * Configures a portion of the Estimated Service Params indication
  7989. * (802.11mc) settings, which together specify estimated throughput.
  7990. * The accompanying A_UINT32 parameter is the ESP BA WINDOW size advertised
  7991. * Value 0: Disable this feature
  7992. * Non zero Value: ESP BA WINDOW size
  7993. */
  7994. WMI_PDEV_PARAM_ESP_BA_WINDOW,
  7995. /*
  7996. * Configures a portion of the Estimated Service Params indication
  7997. * (802.11mc) settings, which together specify estimated throughput.
  7998. * The accompanying A_UINT32 parameter is the air time fraction to be
  7999. * advertised in the ESP IE
  8000. * Value 0: Disable this feature
  8001. * Non zero Value: Air time fraction in percentage
  8002. */
  8003. WMI_PDEV_PARAM_ESP_AIRTIME_FRACTION,
  8004. /*
  8005. * Configures a portion of the Estimated Service Params indication
  8006. * (802.11mc) settings, which together specify estimated throughput.
  8007. * The accompanying A_UINT32 parameter specifies PPDU duration in units
  8008. * of milliseconds.
  8009. * Value 0: Disable this feature
  8010. * Non zero Value: PPDU duration in milliseconds
  8011. */
  8012. WMI_PDEV_PARAM_ESP_PPDU_DURATION,
  8013. /*
  8014. * Enable/Disable NOL(Non Occupancy list) in firmware
  8015. * 1- Use NOL in firmware
  8016. * 0- Don't use NOL in firmware
  8017. */
  8018. WMI_PDEV_PARAM_USE_NOL,
  8019. /*
  8020. * Allow / Not Allow RU26 in any user's RU allocation field in UL OFDMA
  8021. * trigger frames sent by AP
  8022. * 1 - Allow RU26
  8023. * 0 - Do not allow RU26
  8024. */
  8025. WMI_PDEV_PARAM_UL_RU26_ALLOWED,
  8026. /*
  8027. * Enable/Disable sub channel marking
  8028. * 1 - Enable sub channel marking
  8029. * 0 - Disable sub channel marking (default value)
  8030. */
  8031. WMI_PDEV_PARAM_SUB_CHANNEL_MARKING,
  8032. /*
  8033. * Enable/Disable/Set MGMT_TTL in milliseconds.
  8034. * non_zero - Enable, with the specified value
  8035. * 0 - Disable
  8036. */
  8037. WMI_PDEV_PARAM_SET_MGMT_TTL,
  8038. /*
  8039. * Enable/Disable/Set PROBE_RESP_TTL in milliseconds.
  8040. * non_zero - Enable, with the specified value
  8041. * 0 - Disable
  8042. */
  8043. WMI_PDEV_PARAM_SET_PROBE_RESP_TTL,
  8044. /*
  8045. * TBTT_CTRL_CFG
  8046. * BITS 0 - 2 (refer to WMI_TBTT_CTRL_CFG enum)
  8047. * 0 - DEFAULT -> HW_TBTT
  8048. * 1 - SW_TBTT -> HW_TBTT disabled,
  8049. * software would truncate BURST near TBTT
  8050. * 2 - IGNORE_TBTT
  8051. *
  8052. * BITS 3 - 31 Reserved, must be set to 0x0
  8053. */
  8054. WMI_PDEV_PARAM_SET_TBTT_CTRL,
  8055. /*
  8056. * BITS0 ~1 (refer to enum)
  8057. * 0 - default --> always update
  8058. * 1 - ignore to update
  8059. * 2 - update if larger than threshould
  8060. * 3 - update if less or equal than threshould
  8061. *
  8062. * BITS 2 ~ 31 Threshould
  8063. */
  8064. WMI_PDEV_PARAM_NAV_OVERRIDE_CONFIG,
  8065. /* Set global MU PPDU duration for DL (usec units) */
  8066. WMI_PDEV_PARAM_SET_MU_PPDU_DURATION,
  8067. /*
  8068. * Enable / disable test mode configuration.
  8069. * By default FW will always send triggers dynamically (mix of BSR/Basic).
  8070. * The below testmode are only used for certain tests.
  8071. * A value of 1 in a given bit enables corresponding test mode.
  8072. * bit | test mode
  8073. * ---------------
  8074. * 0 | FW only sends BSR triggers.
  8075. * 1 | FW only sends Basic triggers.
  8076. * 2 | If set, FW enables MU-RTS trigger.
  8077. * | If cleared, FW uses implementation-specific internal default setting.
  8078. * 3 | FW enables unicast embedded trigger in HE MU PPDU.
  8079. * 4-31| reserved.
  8080. */
  8081. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_TYPE_ENABLE,
  8082. /*
  8083. * Configure test command to set LSIG len.
  8084. * Value 0: Dynamic LSIG based on STA's qdepth.
  8085. * Non zero Value: LSIG length to be configured
  8086. * as part of trigger frame.
  8087. * bit |
  8088. * ---------------
  8089. * 0 - 30 | Bits storing the host supplied <value>.
  8090. * 31 | If set: The legitimate value closest to the value specified in
  8091. * | in bits 30:0 is directly set in UL len in trigger frame.
  8092. * | The FW performs calculations to determine which legitimate
  8093. * | value is closest to the specified value, if the specified
  8094. * | value is not already legitimate.
  8095. * | If not set: The value in lower bits is the duration (in ms),
  8096. * | from which the UL len is derived.
  8097. * | Example: if host sets 2000 (2ms), then UL Len in trigger
  8098. * | will be derived to accommodate the given duration.
  8099. */
  8100. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_LSIG_LEN,
  8101. /*
  8102. * Configure test cmd for fixed rate setting used for UL Trigger
  8103. * (only Basic/BSR triggers).
  8104. * The top nibble is used to select which format to use for encoding
  8105. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  8106. * format.
  8107. * If V == 0b0001: format is: 0x1000RRRR.
  8108. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  8109. *
  8110. */
  8111. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_FIXED_RATE,
  8112. /*
  8113. * Configure test command to set the mac padding duration.
  8114. * 0 - FW set Mac Padding to 0us
  8115. * 1 - FW set Mac Padding to 8us
  8116. * 2 - FW set Mac Padding to 16us
  8117. */
  8118. WMI_PDEV_PARAM_SET_TEST_CMD_UL_MAC_PADDING,
  8119. /*
  8120. * Configure test command to set the fc duration in BSR trigger frame.
  8121. * value 0 - FW calculates the duration (default).
  8122. * Non zero Value: Duration to be configured.
  8123. */
  8124. WMI_PDEV_PARAM_SET_TEST_CMD_UL_BSR_FC_DURATION,
  8125. /* Parameter used for configuring TWT scheduling properties
  8126. * bit | config_mode
  8127. * -----------------
  8128. * 0 | Disables DL MU for TWT peers within TWT SP
  8129. * 1 | Disables UL MU for TWT peers within TWT SP
  8130. * 2 | Disables scheduling from WMM sched context for TWT peers
  8131. * 3 | If set, FW only sends Basic triggers in TWT SP.
  8132. * 4-31| reserved.
  8133. */
  8134. WMI_PDEV_PARAM_SET_TEST_CMD_TWT_SCHED_CONFIG,
  8135. /* Parameter used to configure OBSS Packet Detect threshold
  8136. * for Non-SRG / SRG based Spatial Reuse feature.
  8137. * (SRG = Spatial Reuse Group)
  8138. * The accepted values are in between 0x00 and 0xFF, inclusive.
  8139. * The parameter value is programmed into the appropriate spatial reuse
  8140. * register, to specify how low the background signal strength from
  8141. * neighboring BSS cells must be, for this AP to employ spatial reuse.
  8142. *
  8143. * The value of the parameter is compared against the OBSS RSSI in dB.
  8144. * It is a 8-bit value whose
  8145. * range is -128 to 127 (after two's complement operation).
  8146. * For example, if the parameter value is 0xF5, the target will
  8147. * allow spatial reuse if the RSSI detected from other BSS
  8148. * is below -10 dB.
  8149. * Similarly, if the parameter value is 0x0A, the target will
  8150. * allow spatial reuse only if the RSSI detected from neighboring
  8151. * BSS cells is no more than 10 dB.
  8152. *
  8153. * If Bit 29 is set, then input value will be in dBm. This is used
  8154. * for chipsets that uses dBm for comparison across MAC/Phy blocks.
  8155. * Older chipsets support input in dB units. For newer chipsets, dBm
  8156. * units will be used.
  8157. * The host will use the WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT
  8158. * service ready bit to differentiate between providing input as dB or dBm.
  8159. *
  8160. * bit | purpose
  8161. * -----------------
  8162. * 0 - 7 | Param Value for non-SRG based Spatial Reuse
  8163. * 8 - 15| Param value for SRG based Spatial Reuse
  8164. * 16 - 28| Reserved
  8165. * 29 | Param value is in dBm units rather than dB units
  8166. * 30 | Enable/Disable SRG based spatial reuse.
  8167. * | If set to 0, ignore bits 8-15.
  8168. * 31 | Enable/Disable Non-SRG based spatial reuse.
  8169. * | If set to 0, ignore bits 0-7.
  8170. */
  8171. WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD,
  8172. /* Parameter used for enabling/disabling non wlan coex from boot */
  8173. WMI_PDEV_PARAM_ENABLE_NON_WLAN_COEX_FROM_BOOT,
  8174. /* Parameter used to configure OBSS Packet Detection per Access Category
  8175. * for SRP based and OBSS_PD based spatial reuse feature.
  8176. * (SRP = Spatial Reuse Parameter)
  8177. * Based on the bits set, the corresponding Access Category Queues will have
  8178. * spatial reuse enabled / disabled.
  8179. * bit | AC
  8180. * ------------
  8181. * 0 | BK for SRG/Non-SRG
  8182. * 1 | BE for SRG/Non-SRG
  8183. * 2 | VI for SRG/Non-SRG
  8184. * 3 | VO for SRG/Non-SRG
  8185. * 4 - 15 | Reserved
  8186. * 16 | BK for SRP
  8187. * 17 | BE for SRP
  8188. * 18 | VI for SRP
  8189. * 19 | VO for SRP
  8190. * 20 - 31 | Reserved
  8191. */
  8192. WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC,
  8193. /*
  8194. * Parameter used to enable/disable FW control of MU-EDCA and AP back-off
  8195. * parameters.
  8196. * If set to zero, FW mode is disabled; if set to 1, FW mode is enabled.
  8197. * Default setting is to have it enabled, and user can disable it in
  8198. * favor of manual mode or host control mode.
  8199. */
  8200. WMI_PDEV_PARAM_ENABLE_FW_DYNAMIC_HE_EDCA,
  8201. /*
  8202. * Parameter used to set default 6 GHz rate.
  8203. * Applies to all non data transmissions in 6 GHz unless
  8204. * overwritten by respective VDEV params.
  8205. */
  8206. WMI_PDEV_PARAM_DEFAULT_6GHZ_RATE,
  8207. /*
  8208. * Configures the duration (in seconds) to delay the channel avoidance
  8209. * indication at WLAN firmware before indicating it to WLAN host,
  8210. * when WWAN (LTE/5GNR) PCC is in conflict due to WWAN-WLAN coexistence.
  8211. * Default value is 60 seconds.
  8212. * If set to zero, FW sends channel avoidance indcation immediately to Host.
  8213. */
  8214. WMI_PDEV_PARAM_MWSCOEX_PCC_CHAVD_DELAY,
  8215. /*
  8216. * Configures the duration (in seconds) to delay the channel avoidance
  8217. * indication at WLAN firmware before indicating it to WLAN host,
  8218. * when WWAN (LTE/5GNR) SCC is in conflict due to WWAN-WLAN coexistence.
  8219. * Default value is 120 seconds.
  8220. * If set to zero, FW sends channel avoidance indcation immediately to Host.
  8221. */
  8222. WMI_PDEV_PARAM_MWSCOEX_SCC_CHAVD_DELAY,
  8223. /*
  8224. * Parameter used to set ageout timer value from host (units = seconds).
  8225. * If not set, FW use default value 2 seconds.
  8226. * ageout time: the time upto which DFS channel information such as
  8227. * beacon found is remembered
  8228. */
  8229. WMI_PDEV_PARAM_SET_DFS_CHAN_AGEOUT_TIME,
  8230. /* Parameter used for enabling/disabling xlna bypass for SAP mode*/
  8231. WMI_PDEV_PARAM_SET_SAP_XLNA_BYPASS,
  8232. /* Parameter used to enable/disable SRP feature */
  8233. WMI_PDEV_PARAM_ENABLE_SRP,
  8234. /* Parameter used to enable/disable SR prohibit feature */
  8235. WMI_PDEV_PARAM_ENABLE_SR_PROHIBIT,
  8236. /*
  8237. * Parameter used to enable/disable UL OFDMA mBSSID support for
  8238. * trigger frames. It is disabled by default.
  8239. * bit | config_mode
  8240. * -----------------
  8241. * 0 | Enable/Disable mBSSID trigger support for basic triggers.
  8242. * 1 | Enable/Disable mBSSID trigger support for BSR triggers.
  8243. * 2 | Enable/Disable mBSSID trigger support for MU RTS.
  8244. * 3 | Enable/Disable mBSSID trigger support for UL MUMIMO triggers.
  8245. */
  8246. WMI_PDEV_PARAM_ENABLE_MBSSID_CTRL_FRAME,
  8247. /*
  8248. * Parameter to set preamble punctured band as a bitmask, i.e.
  8249. * which 20MHz in the 80MHz bandwidth or 40MHz in 160MHz bandwidth.
  8250. * E.g. if first 20MHz is the primary and preamble puncturing is
  8251. * desired for 3rd 20Mhz, then the host will send 0x0100.
  8252. * FW doesn't expect the primary 20MHz to be punctured.
  8253. * This param is required only for 11ax release.
  8254. */
  8255. WMI_PDEV_PARAM_SET_PREAM_PUNCT_BW,
  8256. /*
  8257. * Parameter used to set the Margin dB value to be included for calculating
  8258. * the spatial reuse value in common info field of the UL Trigger frame.
  8259. * Accepted value as per Spec are 0 to 5 dB (inclusive).
  8260. */
  8261. WMI_PDEV_PARAM_SR_TRIGGER_MARGIN,
  8262. /* Param to enable/disable PCIE HW ILP */
  8263. WMI_PDEV_PARAM_PCIE_HW_ILP,
  8264. /*
  8265. * Configure the TXTD_START_TIMESTAMP parameters
  8266. * The timestamp units are nanoseconds.
  8267. * This parameter can be used to adjust at what point the TXTD module
  8268. * will start operating after the STA connects to an AP.
  8269. */
  8270. WMI_PDEV_PARAM_SET_TXTD_START_TIMESTAMP,
  8271. /*
  8272. * Parameter to configure and enable/disable features for mesh usecases
  8273. * bit | config_mode
  8274. * -----------------
  8275. * 0 | Set to 1 to disable BSSID based spatial reuse.
  8276. * 1-31 | Reserved.
  8277. */
  8278. WMI_PDEV_PARAM_SET_MESH_PARAMS,
  8279. /* Param to enable low latency mode */
  8280. WMI_PDEV_PARAM_LOW_LATENCY_SCHED_MODE,
  8281. /* Param to enable per USERPD SSR - for MultiPD enabled chips */
  8282. WMI_PDEV_PARAM_MPD_USERPD_SSR,
  8283. /*
  8284. * Param to disable Hardware Assist feature,
  8285. * i.e. Disables HW feature that reconstructs the PPDU
  8286. * by picking failing MPDUs from prior FES attempt.
  8287. */
  8288. WMI_PDEV_PARAM_DISABLE_HW_ASSIST,
  8289. /*
  8290. * Param to Enable/Disable Tx on DFS for Scan Radio RDP
  8291. * Send MGMT frames on the DFS channel before Tx on the said channel
  8292. * when in monitor mode.
  8293. * Scan Radio RDP should do Tx on DFS channel based on available
  8294. * Tx frame on DFS without doing CAC.
  8295. * Host should ensure to send this param only for Scan Radio RDP.
  8296. * This param used to inform Scan Radio Supports Tx on DFS channel.
  8297. */
  8298. WMI_PDEV_PARAM_SCAN_RADIO_TX_ON_DFS,
  8299. /*
  8300. * Param to configure Minimum OBSS ppdu time below which
  8301. * spatial reuse will not happen over the TXOP duration of the OBSS frame.
  8302. * If the incoming OBSS frame ppdu duration is greater then the value
  8303. * configured, then spatial reuse can happen over the OBSS PPDU.
  8304. * The value is configured in microseconds.
  8305. */
  8306. WMI_PDEV_PARAM_OBSS_MIN_DURATION_CHECK_FOR_SR,
  8307. /*
  8308. * Param to Enable/Disable Truncate SR feature.
  8309. * PPDUs transmitted using SR opportunity will be truncated at the end
  8310. * of OBSS frame duration and will not extend beyond.
  8311. */
  8312. WMI_PDEV_PARAM_TRUNCATE_SR,
  8313. /* Parameter used to configure separate NON_SRG/SRG OBSS PD threshold for
  8314. * for Control Frame.
  8315. * (SRG = Spatial Reuse Group)
  8316. * The accepted values are in between 0x00 and 0xFF, inclusive.
  8317. * The parameter value is checked against the RSSI of the OBSS Control
  8318. * frame. If RSSI is below the parameter value, then the Control frame is
  8319. * aborted and NAV is ignored. Separate OBSS PD threshold for Control frame
  8320. * is added to account for the higher TX power used for such control frames
  8321. * when compared with data frames.
  8322. *
  8323. * The input value will be interpreted as a signed value in dBm units.
  8324. *
  8325. * The values will be reflected in the registers only if
  8326. * SRG / non-srg based spatial reuse is enabled via
  8327. * WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD cmd.
  8328. * bit | purpose
  8329. * -----------------
  8330. * 0 - 7 | Param Value for non-srg OBSS PD threshold for non-SRG
  8331. * | control frames
  8332. * 8 - 15| Param Value for srg OBSS PD threshold for SRG control frames
  8333. * 16 - 29| Reserved
  8334. * 30 | Enable/Disable separate SRG based spatial reuse for OBSS
  8335. * | control frames.
  8336. * | If set to 0, ignore bits 8-15.
  8337. * 31 | Enable/Disable separate non-SRG based spatial reuse for OBSS
  8338. * | control frames.
  8339. * | If set to 0, ignore bits 0-7.
  8340. */
  8341. WMI_PDEV_PARAM_CTRL_FRAME_OBSS_PD_THRESHOLD,
  8342. /* Param to configure the access category for the TWT queue */
  8343. WMI_PDEV_PARAM_TWT_AC_CONFIG,
  8344. /*
  8345. * TX xretry extension parameter to allow product specific adjustment.
  8346. * I.e. multiply the xretry counter by N% for a requirement from framework.
  8347. */
  8348. WMI_PDEV_PARAM_PDEV_STATS_TX_XRETRY_EXT,
  8349. /*
  8350. * Per PDEV level, set the highest rate cap allowed.
  8351. * The accepted input values NSS are between 1-8, inclusive.
  8352. * The accepted input values MCS are between 0-15, inclusive.
  8353. * FW will use the input values as is.
  8354. * The rate cap is specified in NSS, MCS format each 4bits.
  8355. * i.e., NSS and MCS combined as shown below:
  8356. * b'0-b'7 indicate the NSS (NSS value can be from 1-8)
  8357. * b'8-b'15 indicate the MCS (MCS value can be from 0-15)
  8358. * b'16 Enable or disable nss cap
  8359. * b'17 Enable or disable mcs cap
  8360. * b'18 To determine the direction for caping DL_direction
  8361. * b'19 To determine the direction for caping UL_direction
  8362. *
  8363. * For backwards compatibility, if bits 18+19 are both
  8364. * cleared, then the rate cap applies to both DL and UL.
  8365. * To summarize:
  8366. * bit 19 | bit 18 | rate cap applied
  8367. * -------+--------+------------------
  8368. * 0 | 0 | cap rates only for DL
  8369. * 0 | 1 | cap rates only for DL
  8370. * 1 | 0 | cap rates only for UL
  8371. * 1 | 1 | cap rates for both UL and DL
  8372. */
  8373. WMI_PDEV_PARAM_RATE_UPPER_CAP,
  8374. /*
  8375. * Per PDEV level, set number of MCS to be dropped based
  8376. * on configured retries.
  8377. * bit | config_mode
  8378. * -----------------
  8379. * 0-7 | param value for number MCS to be dropped
  8380. * 8-15| param value for excess retries
  8381. * 16 | If set to 0, number of MCS to be dropped is disabled, i.e.
  8382. * | fall back to default mode.
  8383. * | The default value of MCS to be dropped is 1.
  8384. * 17 | if set to 0, retries is disabled/use default retries.
  8385. * | The default value of retries is 3.
  8386. */
  8387. WMI_PDEV_PARAM_SET_RATE_DROP_DOWN_RETRY_THRESH,
  8388. /*
  8389. * Param value to configure min/max probe interval for MCS of current NSS.
  8390. * If probe interval expired, ratectrl will probe for MCS of current NSS.
  8391. * If probe was successful, rate control updates the probe time with a
  8392. * min of probe interval.
  8393. * If probe failed for MCS of current NSS, rate control updates the probe
  8394. * time by multiplying the probe period with 2, which is not greater than
  8395. * max probe interval.
  8396. * units = milliseconds
  8397. * bits | config_mode
  8398. * 0-15 | minimum probe time for MCS
  8399. * 16-31| maximum probe time for MCS
  8400. */
  8401. WMI_PDEV_PARAM_MIN_MAX_MCS_PROBE_INTERVAL,
  8402. /* Param value to configure min/max probe interval for NSS.
  8403. * Rate control will probe for alternate NSS if probe time is expired.
  8404. * If probe for an alternate NSS was successful, rate control updates
  8405. * the probe time with a min of probe interval.
  8406. * If probe failed for alternate NSS, rate control updates the probe time
  8407. * by multiplying the probe period with 2, which is not greater than
  8408. * max probe interval.
  8409. * units = milliseconds
  8410. * bits | config_mode
  8411. * 0-15 | minimum probe time for alternate NSS
  8412. * 16-32| maximum probe time for alternate NSS
  8413. */
  8414. WMI_PDEV_PARAM_MIN_MAX_NSS_PROBE_INTERVAL,
  8415. /* Param to enable/disable probing on all BW */
  8416. WMI_PDEV_PARAM_EN_PROBE_ALL_BW,
  8417. /* Param to enable/disable updating scrambler seed feature */
  8418. WMI_PDEV_PARAM_EN_UPDATE_SCRAM_SEED,
  8419. /*
  8420. * Param to set the GPIO Drive Configuration value for
  8421. * Smart Antenna Parallel Mode
  8422. */
  8423. WMI_PDEV_PARAM_SA_PARALLEL_MODE_GPIO_DRIVE_CFG,
  8424. /*
  8425. * Param to disable LPI antenna optimizations
  8426. * In 6G LPI mode, additional antenna optimizations are done to
  8427. * improve range. Param is provided to disable the added
  8428. * optimizations.
  8429. */
  8430. WMI_PDEV_PARAM_DISABLE_LPI_ANT_OPTIMIZATION,
  8431. /*
  8432. * Param to configure exclusive RSID range for 11az TB ranging.
  8433. * RSID's are subset of total AID space and must not be used
  8434. * for any other purpose by Host. FW uses these IDs for trigger
  8435. * based ranging.
  8436. */
  8437. WMI_PDEV_PARAM_RTT_11AZ_RSID_RANGE,
  8438. /*
  8439. * Disable the indicated DL and UL scheduler for the PDEV.
  8440. *
  8441. * This command is not supported in STA mode.
  8442. *
  8443. * A value of 1 in a given bit position disables the corresponding mode,
  8444. * and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS enum defines
  8445. * the bit positions for each mode.
  8446. *
  8447. * A single 32 bit value is used to store the following configuration
  8448. * bitmap.
  8449. *
  8450. * This command differs from WMI_VDEV_PARAM_SET_HEMU_MODE and
  8451. * WMI_VDEV_PARAM_SET_EHT_MU_MODE in that it is intended for use during
  8452. * normal AP operation, and will never cause a VAP restart or other
  8453. * capability bit modification. It simply controls the scheduler
  8454. * behavior.
  8455. *
  8456. * bit | sched mode
  8457. * ---------------
  8458. * 0 | DL MU-MIMO
  8459. * 1 | UL MU-MIMO
  8460. * 2 | DL OFDMA
  8461. * 3 | UL OFDMA
  8462. * 4..31 | RESERVED
  8463. */
  8464. WMI_PDEV_PARAM_SET_DISABLED_SCHED_MODES,
  8465. /*
  8466. * Override default FW behavior and explicitly enable / disable
  8467. * to allow frames without encryption when no encryption is set.
  8468. *
  8469. */
  8470. WMI_PDEV_PARAM_BYPASS_ENCRYPTION,
  8471. /*
  8472. * Param to Enable/Disable scan blanking feature on the Scan Radio
  8473. * Host should ensure to send this param only for Scan Radio
  8474. * The WMI_SCAN_BLANKING_MODE enum specifies the possible values for this parameter.
  8475. * Based on the received input, the scan blanking feature will be carried out as explained in the enum WMI_SCAN_BLANKING_MODE
  8476. */
  8477. WMI_PDEV_PARAM_SET_SCAN_BLANKING_MODE,
  8478. /*
  8479. * Parameter to enable/disable Multi-Channel Concurrency low latency mode
  8480. * bit | config_mode
  8481. * -----------------
  8482. * 0 | 0:disable, 1:enable.
  8483. * 1-31 | Reserved.
  8484. */
  8485. WMI_PDEV_PARAM_SET_CONC_LOW_LATENCY_MODE,
  8486. /*
  8487. * Parameter to enable/disable low power listen mode
  8488. * bit | config_mode
  8489. * -----------------
  8490. * 0 | 0:disable, 1:enable.
  8491. * 1-31 | Reserved.
  8492. */
  8493. WMI_PDEV_PARAM_LPL_SETTING,
  8494. /** Set Probe Resp retry limit */
  8495. WMI_PDEV_PARAM_PROBE_RESP_RETRY_LIMIT,
  8496. /*
  8497. * Parameter for configure PCIE
  8498. *
  8499. * 0 - Default Value(FW Control).
  8500. * 1 - Force PCIE Gen Speed and Lane Width to maximum supported value.
  8501. */
  8502. WMI_PDEV_PARAM_PCIE_CONFIG,
  8503. /** CTS timeout - change wireless packet cts timeout configuration,
  8504. * units are microseconds
  8505. */
  8506. WMI_PDEV_PARAM_CTS_TIMEOUT,
  8507. /** Slot time - change wireless packet slot time value dynamically,
  8508. * units are microseconds
  8509. */
  8510. WMI_PDEV_PARAM_SLOT_TIME,
  8511. /** VO dedicated time -
  8512. * allocate dedicated time slots for VO access category across all
  8513. * ATF groups in a pdev.
  8514. * Note :
  8515. * 1. Per AC airtime per group is already available through
  8516. * ATF WMM WMI commands
  8517. * 2. The dedicated time slot is applicable per second
  8518. * 3. Units are in milli-seconds
  8519. */
  8520. WMI_PDEV_PARAM_ATF_VO_DEDICATED_TIME,
  8521. /** VI dedicated time -
  8522. * allocate dedicated time slots for VI access category across all
  8523. * ATF groups in a pdev.
  8524. * Note :
  8525. * 1. Per AC airtime per group is already given through ATF WMM WMI cmds
  8526. * 2. The dedicated time slot is applicable per second
  8527. * 3. Units are in milli-seconds
  8528. */
  8529. WMI_PDEV_PARAM_ATF_VI_DEDICATED_TIME,
  8530. /** Parameter used for enabling/disabling RFA toggle for SAP mode */
  8531. WMI_PDEV_PARAM_SET_SAP_RFA_TOGGLE,
  8532. /** Parameter to set PDEV level UL OFDMA RTD */
  8533. WMI_PDEV_PARAM_UL_OFDMA_RTD,
  8534. /** Parameter to enable/disable tid0 and tid3 mapping to work 3 Link MLO */
  8535. WMI_PDEV_PARAM_TID_MAPPING_3LINK_MLO,
  8536. /** Parameter to enable/disable small OFDMA M-RUs **/
  8537. WMI_PDEV_PARAM_ENABLE_SMALL_MRU,
  8538. /** Parameter to enable/disable large OFDMA M-RUs **/
  8539. WMI_PDEV_PARAM_ENABLE_LARGE_MRU,
  8540. /** Parameter to enable/disable delayed LMR feedback.
  8541. * Note: Delayed LMR feedback is supported only up to two ranging peers to
  8542. * enable Location certification
  8543. * 0 - Immediate LMR feedback is enabled for all ranging peers.
  8544. * 1 (non zero) - delayed LMR feedback is enabled. Third peer onward will
  8545. * default to immediate LMR feedback.
  8546. **/
  8547. WMI_PDEV_PARAM_ENABLE_DELAYED_LMR_FEEDBACK,
  8548. /* DFS_RADAR_MASK: Radar mask setting programmed in HW registers.
  8549. * bit | config_mode
  8550. * -----------------------
  8551. * 0 - 15 | Each bit represents a 20 MHz portion of the channel.
  8552. * | 0-Unmasked 1-Masked
  8553. * 16 - 31 | Reserved.
  8554. * Bit 0 represents the highest 20 MHz portion within the channel.
  8555. * For example...
  8556. * For a 80 MHz channel, bit0 = highest 20 MHz, bit3 = lowest 20 MHz
  8557. * For a 320 MHz channel, bit0 = highest 20 MHz, bit15 = lowest 20 MHz
  8558. */
  8559. WMI_PDEV_PARAM_DFS_RADAR_MASK,
  8560. /** PWR_REDUCTION_IN_QUARTER_DB:
  8561. * Reduce final Tx power (derived after all considerations)
  8562. * by specified value in units of 0.25 dB.
  8563. * E.g. a value of 4 will result in a 1.0 dB tx power reduction.
  8564. */
  8565. WMI_PDEV_PARAM_PWR_REDUCTION_IN_QUARTER_DB,
  8566. WMI_PDEV_PARAM_ENABLE_CHIPSET_LOGGING,
  8567. /** SCAN MODE:
  8568. * bit | scan_mode
  8569. * -----------------
  8570. * 0 | SISO SCAN - 1x1 scan
  8571. * | If this bit is 0, then use default scan (NxN).
  8572. * 1-31 | Reserved.
  8573. */
  8574. WMI_PDEV_PARAM_SCAN_MODE,
  8575. /** configure datastall consecutive no ack interval (units = ms) */
  8576. WMI_PDEV_PARAM_DSTALL_CONSECUTIVE_TX_NO_ACK_INTERVAL,
  8577. /** configure datastall consecutive no ack threshold */
  8578. WMI_PDEV_PARAM_DSTALL_CONSECUTIVE_TX_NO_ACK_THRESHOLD,
  8579. WMI_PDEV_PARAM_MGMT_SRNG_REAP_EVENT_THRESHOLD,
  8580. } WMI_PDEV_PARAM;
  8581. #define WMI_PDEV_ONLY_BSR_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 0, 1)
  8582. #define WMI_PDEV_ONLY_BSR_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 1)
  8583. #define WMI_PDEV_ONLY_BSR_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 0)
  8584. #define WMI_PDEV_ONLY_BASIC_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 1, 1)
  8585. #define WMI_PDEV_ONLY_BASIC_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 1)
  8586. #define WMI_PDEV_ONLY_BASIC_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 0)
  8587. #define WMI_PDEV_MU_RTS_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 2, 1)
  8588. #define WMI_PDEV_MU_RTS_ENABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 1)
  8589. #define WMI_PDEV_MU_RTS_DISABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 0)
  8590. #define WMI_PDEV_EMBEDDED_TRIGGER_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 3, 1)
  8591. #define WMI_PDEV_EMBEDDED_TRIGGER_ENABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 1)
  8592. #define WMI_PDEV_EMBEDDED_TRIGGER_DISABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 0)
  8593. #define WMI_PDEV_TWT_SCHED_CFG_IS_DL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 0, 1)
  8594. #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 1)
  8595. #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 0)
  8596. #define WMI_PDEV_TWT_SCHED_CFG_IS_UL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 1, 1)
  8597. #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 1)
  8598. #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 0)
  8599. #define WMI_PDEV_TWT_SCHED_CFG_IS_WMM_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 2, 1)
  8600. #define WMI_PDEV_TWT_SCHED_CFG_WMM_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 1)
  8601. #define WMI_PDEV_TWT_SCHED_CFG_WMM_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 0)
  8602. #define WMI_PDEV_TWT_SCHED_CFG_IS_USE_ONLY_BASIC_TRIGGER_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 3, 1)
  8603. #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 1)
  8604. #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 0)
  8605. #define WMI_PDEV_LSIG_LEN_DURATION_ENABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 1)
  8606. #define WMI_PDEV_LSIG_LEN_DURATION_DISABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 0)
  8607. #define WMI_PDEV_LSIG_LEN_DURATION_GET(lsig_len) WMI_GET_BITS(lsig_len, 0, 30)
  8608. #define WMI_PDEV_LSIG_LEN_DURATION_SET(lsig_len, value) WMI_SET_BITS(lsig_len, 0, 30, value)
  8609. #define WMI_PDEV_IS_NON_SRG_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 31, 1)
  8610. #define WMI_PDEV_NON_SRG_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 1)
  8611. #define WMI_PDEV_NON_SRG_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 0)
  8612. #define WMI_PDEV_NON_SRG_PD_THRESHOLD_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 0, 8, value)
  8613. #define WMI_PDEV_NON_SRG_PD_THRESHOLD_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 0, 8)
  8614. #define WMI_PDEV_IS_SRG_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 30, 1)
  8615. #define WMI_PDEV_SRG_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 1)
  8616. #define WMI_PDEV_SRG_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 0)
  8617. #define WMI_PDEV_SRG_PD_THRESHOLD_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 8, 8, value)
  8618. #define WMI_PDEV_SRG_PD_THRESHOLD_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 8, 8)
  8619. #define WMI_PDEV_IS_PD_THRESHOLD_IN_DBM(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 29, 1)
  8620. #define WMI_PDEV_SET_PD_THRESHOLD_IN_DBM(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 29, 1, 1)
  8621. #define WMI_PDEV_OBSS_PD_ENABLE_PER_AC_SET(per_ac_cfg, value) WMI_SET_BITS(per_ac_cfg, 0, 4, value)
  8622. #define WMI_PDEV_OBSS_PD_ENABLE_PER_AC_GET(per_ac_cfg) WMI_GET_BITS(per_ac_cfg, 0, 4)
  8623. #define WMI_PDEV_SRP_ENABLE_PER_AC_SET(per_ac_cfg, value) WMI_SET_BITS(per_ac_cfg, 16, 4, value)
  8624. #define WMI_PDEV_SRP_ENABLE_PER_AC_GET(per_ac_cfg) WMI_GET_BITS(per_ac_cfg, 16, 4)
  8625. #define WMI_PDEV_IS_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 31, 1)
  8626. #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 1)
  8627. #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 0)
  8628. #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 0, 8, value)
  8629. #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 0, 8)
  8630. #define WMI_PDEV_IS_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 30, 1)
  8631. #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 1)
  8632. #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 0)
  8633. #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 8, 8, value)
  8634. #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 8, 8)
  8635. #define WMI_PDEV_UPPER_CAP_NSS_GET(value) WMI_GET_BITS(value, 0, 8)
  8636. #define WMI_PDEV_UPPER_CAP_NSS_SET(_value, value) WMI_SET_BITS(_value, 0, 8, value)
  8637. #define WMI_PDEV_UPPER_CAP_MCS_GET(value) WMI_GET_BITS(value, 8, 8)
  8638. #define WMI_PDEV_UPPER_CAP_MCS_SET(_value, value) WMI_SET_BITS(_value, 8, 8, value)
  8639. #define WMI_PDEV_UPPER_CAP_NSS_VALID_GET(value) WMI_GET_BITS(value, 16, 1)
  8640. #define WMI_PDEV_UPPER_CAP_NSS_VALID_SET(_value, value) WMI_SET_BITS(_value, 16, 1, value)
  8641. #define WMI_PDEV_UPPER_CAP_MCS_VALID_GET(value) WMI_GET_BITS(value, 17, 1)
  8642. #define WMI_PDEV_UPPER_CAP_MCS_VALID_SET(_value, value) WMI_SET_BITS(_value, 17, 1, value)
  8643. #define WMI_PDEV_UPPER_CAP_DL_DIR_GET(value) WMI_GET_BITS(value, 18, 1)
  8644. #define WMI_PDEV_UPPER_CAP_DL_DIR_SET(_value, value) WMI_SET_BITS(_value, 18, 1, value)
  8645. #define WMI_PDEV_UPPER_CAP_UL_DIR_GET(value) WMI_GET_BITS(value, 19, 1)
  8646. #define WMI_PDEV_UPPER_CAP_UL_DIR_SET(_value, value) WMI_SET_BITS(_value, 19, 1, value)
  8647. #define WMI_PDEV_RATE_DROP_NUM_MCS_GET(value) WMI_GET_BITS(value, 0, 8)
  8648. #define WMI_PDEV_RATE_DROP_NUM_MCS_SET(_value, value) WMI_SET_BITS(_value, 0, 8, value)
  8649. #define WMI_PDEV_RATE_DROP_RETRY_THRSH_GET(value) WMI_GET_BITS(value, 8, 8)
  8650. #define WMI_PDEV_RATE_DROP_RETRY_THRSH_SET(_value, value) WMI_SET_BITS(_value, 8, 8, value)
  8651. #define WMI_PDEV_RATE_DROP_NUM_MCS_VALID_GET(value) WMI_GET_BITS(value, 16, 1)
  8652. #define WMI_PDEV_RATE_DROP_NUM_MCS_VALID_SET(_value, value) WMI_SET_BITS(_value, 16, 1, value)
  8653. #define WMI_PDEV_RATE_DROP_RETRY_THRSH_VALID_GET(value) WMI_GET_BITS(value, 17, 1)
  8654. #define WMI_PDEV_RATE_DROP_RETRY_THRSH_VALID_SET(_value, value) WMI_SET_BITS(_value, 17, 1, value)
  8655. #define WMI_PDEV_RATE_MIN_MCS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 0, 16)
  8656. #define WMI_PDEV_RATE_MIN_MCS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 0, 16, value)
  8657. #define WMI_PDEV_RATE_MAX_MCS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 16, 16)
  8658. #define WMI_PDEV_RATE_MAX_MCS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 16, 16, value)
  8659. #define WMI_PDEV_RATE_MIN_NSS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 0, 16)
  8660. #define WMI_PDEV_RATE_MIN_NSS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 0, 16, value)
  8661. #define WMI_PDEV_RATE_MAX_NSS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 16, 16)
  8662. #define WMI_PDEV_RATE_MAX_NSS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 16, 16, value)
  8663. #define WMI_MBSSID_CTRL_FRAME_BASIC_TRIGGER ((A_UINT32) 1 << 0)
  8664. #define WMI_MBSSID_CTRL_FRAME_BSR_TRIGGER ((A_UINT32) 1 << 1)
  8665. #define WMI_MBSSID_CTRL_FRAME_MU_RTS_TRIGGER ((A_UINT32) 1 << 2)
  8666. #define WMI_MBSSID_CTRL_FRAME_UL_MU_MIMO_TRIGGER ((A_UINT32) 1 << 3)
  8667. typedef struct {
  8668. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
  8669. /** pdev_id for identifying the MAC
  8670. * See macros starting with WMI_PDEV_ID_ for values.
  8671. */
  8672. A_UINT32 pdev_id;
  8673. /** parameter id */
  8674. A_UINT32 param_id; /* WMI_PDEV_PARAM */
  8675. /** parameter value */
  8676. A_UINT32 param_value;
  8677. } wmi_pdev_set_param_cmd_fixed_param;
  8678. /* param values for WMI_PDEV_PARAM_SET_TBTT_CTRL's TBTT_CTRL_CFG bit-field */
  8679. typedef enum {
  8680. WMI_TBTT_CTRL_HW_TRUNCATE = 0,
  8681. WMI_TBTT_CTRL_SW_TRUNCATE,
  8682. WMI_TBTT_CTRL_IGNORE_TBTT,
  8683. WMI_TBTT_CTRL_MAX = 0x7,
  8684. } WMI_TBTT_CTRL_CFG;
  8685. /** MACRO to set / get TBTT_CTRL_CFG bit-field within
  8686. * WMI_PDEV_PARAM_SET_TBTT_CTRL:
  8687. * bits 0~2 : TBTT_CTRL_CFG
  8688. * bits 3~31: Reserved (set to 0x0)
  8689. */
  8690. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG_S 0
  8691. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG 0x00000007
  8692. #define WMI_PDEV_PARAM_GET_TBTT_CTRL_CFG(word32) \
  8693. WMI_F_MS(word32, WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  8694. #define WMI_PDEV_PARAM_SET_TBTT_CTRL_CFG(word32, value) \
  8695. WMI_F_RMW(word32,value,WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  8696. /** MACRO define to set / get 11b and 11ag mode TX chain number:
  8697. * bit 0~15 : 11b mode TX chain number.
  8698. * bit 16~31: 11ag mode TX chain number.
  8699. */
  8700. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM_S 0
  8701. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM 0x0000FFFF
  8702. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM_S 16
  8703. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM 0xFFFF0000
  8704. #define WMI_PDEV_PARAM_GET_11B_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  8705. #define WMI_PDEV_PARAM_SET_11B_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  8706. #define WMI_PDEV_PARAM_GET_11AG_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  8707. #define WMI_PDEV_PARAM_SET_11AG_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  8708. /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
  8709. typedef enum {
  8710. WMI_CTS_CBW_INVALID = 0,
  8711. WMI_CTS_CBW_20,
  8712. WMI_CTS_CBW_40,
  8713. WMI_CTS_CBW_80,
  8714. WMI_CTS_CBW_80_80,
  8715. WMI_CTS_CBW_160,
  8716. } WMI_CTS_CBW;
  8717. typedef struct {
  8718. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
  8719. /** pdev_id for identifying the MAC
  8720. * See macros starting with WMI_PDEV_ID_ for values.
  8721. */
  8722. A_UINT32 pdev_id;
  8723. /** parameter */
  8724. A_UINT32 param;
  8725. } wmi_pdev_get_tpc_config_cmd_fixed_param;
  8726. typedef struct {
  8727. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_div_get_rssi_antid_fixed_param */
  8728. /** pdev_id for identifying the MAC */
  8729. A_UINT32 pdev_id;
  8730. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  8731. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  8732. /** index of the last-used antenna for each chain */
  8733. A_UINT32 ant_id[WMI_MAX_CHAINS];
  8734. /** mac address of diversity peer */
  8735. wmi_mac_addr macaddr;
  8736. } wmi_pdev_div_get_rssi_antid_fixed_param;
  8737. typedef enum {
  8738. WMI_TPC_STATS_EVENT_SEND_REG = 0x00000001,
  8739. WMI_TPC_STATS_EVENT_SEND_RATE = 0x00000002,
  8740. WMI_TPC_STATS_EVENT_SEND_CTL = 0x00000004,
  8741. WMI_TPC_STATS_EVENT_SEND_REG_RATE_CTL = 0x00000007, /* REG | RATE | CTL */
  8742. } WMI_PDEV_TPC_STATS_PARAMS;
  8743. typedef enum {
  8744. WMI_HALPHY_TPC_STATS_SUPPORT_160 = 0,
  8745. WMI_HALPHY_TPC_STATS_SUPPORT_320,
  8746. WMI_HALPHY_TPC_STATS_SUPPORT_AX,
  8747. WMI_HALPHY_TPC_STATS_SUPPORT_AX_EXTRA_MCS,
  8748. WMI_HALPHY_TPC_STATS_SUPPORT_BE,
  8749. WMI_HALPHY_TPC_STATS_SUPPORT_BE_PUNC,
  8750. WMI_HALPHY_TPC_STATS_SUPPORT_CTL_DESIGN_1,
  8751. } WMI_HALPHY_TPC_STATS_SUPPORT_BITF; /* support bit fields */
  8752. typedef struct {
  8753. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_stats_cmd_fixed_param */
  8754. /** pdev_id for identifying the MAC
  8755. * See macros starting with WMI_PDEV_ID_ for values.
  8756. */
  8757. A_UINT32 pdev_id;
  8758. /** parameter -
  8759. * This is to specify whether we want only the target power
  8760. * information (rates array) or the CTL power or the regulatory
  8761. * power information. At present, we send all of them.
  8762. */
  8763. A_UINT32 param; /* Currently expect WMI_TPC_STATS_EVENT_SEND_REG_RATE_CTL
  8764. * as a host specification that rates array, regulatory
  8765. * power array, and ctl power array are all to be sent.
  8766. * See WMI_PDEV_TPC_STATS_PARAMS.
  8767. */
  8768. } wmi_pdev_get_tpc_stats_cmd_fixed_param;
  8769. typedef struct {
  8770. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_stats_event_fixed_param */
  8771. A_UINT32 pdev_id; /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values */
  8772. A_UINT32 end_of_event; /* The total response to the WMI command will be split into multiple event chunks to fit into the WMI svc msg size limit: 0 indicates more events to follow: 1 indicates end of event */
  8773. A_UINT32 event_count; /* Incremented for every event chunk for Host to know the sequence */
  8774. /* wmi_tpc_configs TLV to optionally follow */
  8775. /* wmi_max_reg_power_allowed TLVs to optionally follow */
  8776. /* wmi_tpc_rates_array TLVs to optionally follow */
  8777. /* wmi_tpc_ctl_pwr_table TLVs to optionally follow */
  8778. } wmi_pdev_get_tpc_stats_event_fixed_param;
  8779. typedef struct {
  8780. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_configs */
  8781. A_UINT32 regDomain;
  8782. A_UINT32 chanFreq; /* current channel in MHz */
  8783. A_UINT32 phyMode; /* current phy mode - See WLAN_PHY_MODE for the different phy modes */
  8784. A_UINT32 maxAntennaGain; /* Maximum antenna gain for the current regulatory in 0.25 dBm steps */
  8785. A_UINT32 twiceMaxRDPower; /* Maximum transmit power allowed in the regulatory domain in 0.25 dBm steps */
  8786. A_INT32 userAntennaGain; /* User specified antenna gain in 0.25 dBm steps */
  8787. A_UINT32 powerLimit; /* The overall power limit in 0.25 dBm steps */
  8788. A_UINT32 rateMax; /* The total number of rates supported */
  8789. A_UINT32 numTxChain; /* The total number of active chains */
  8790. A_UINT32 ctl; /* See CONFORMANCE_TEST_LIMITS enumeration */
  8791. A_UINT32 flags; /* See WMI_TPC_CONFIG_EVENT_FLAG */
  8792. /* support_bits:
  8793. * Tells info about BE, HE, HE_EXTRA_MCS, 160, 320, 11BE PUNC.
  8794. * Refer to enum WMI_HALPHY_TPC_STATS_SUPPORT_BITF.
  8795. */
  8796. A_UINT32 support_bits;
  8797. A_UINT32 nss; /* target specific NUM_SPATIAL_STREAM flag */
  8798. } wmi_tpc_configs;
  8799. typedef struct {
  8800. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_max_reg_power_allowed */
  8801. A_UINT32 reg_power_type; /* 0: maxRegAllowedPower (1D array),
  8802. * 1: maxRegAllowedPowerAGCDD (2D array),
  8803. * 2: maxRegAllowedPowerAGSTBC (2D array),
  8804. * 3: maxRegAllowedPowerAGTXBF (2D array)
  8805. */
  8806. A_UINT32 reg_power_array_len; /* Length of the regulatory power array being sent in bytes */
  8807. A_UINT32 d1; /* the length of 1st (innermost) dimension array */
  8808. A_UINT32 d2; /* the length of 2nd dimension array */
  8809. A_UINT32 d3; /* the length of 3rd dimension array (for future use) */
  8810. A_UINT32 d4; /* the length of 4th dimension array (for future use) */
  8811. /*
  8812. * This TLV is followed by an A_INT16 TLV-array that will carry
  8813. * one of the four types of regulatory power arrays.
  8814. *
  8815. * The multi-dimensional regulatory power array will be communicated
  8816. * as a flat array: Host to stitch it back as 2D array.
  8817. * For an array[a][b][c][d], d1 = d, d2 = c, d3 = b, d4 = a
  8818. * For a 2D array, array[a][b], d1 = b, d2 = a, d3 = 1, d4 = 1
  8819. * The possible types of following A_INT16 TLV arrays are
  8820. * 1. A_INT16 maxRegAllowedPower[WHAL_TPC_TX_NUM_CHAIN];
  8821. * 2. A_INT16 maxRegAllowedPowerAGCDD[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
  8822. * 3. A_INT16 maxRegAllowedPowerAGSTBC[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
  8823. * 4. A_INT16 maxRegAllowedPowerAGTXBF[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
  8824. * where WHAL_TPC_TX_NUM_CHAIN=2 for CYP and 8 for HK.
  8825. */
  8826. } wmi_max_reg_power_allowed;
  8827. typedef struct {
  8828. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_rates_array */
  8829. A_UINT32 rate_array_type; /* 0: ratesArray,
  8830. * 1: ratesArray2 (for chain > 4),
  8831. * 2: dl_ofdma rate array
  8832. */
  8833. A_UINT32 rate_array_len;
  8834. /* This TLV will be followed by an A_UINT16 TLV array that will
  8835. * carry one of the types of TPC rate arrays.
  8836. * All the rates arrays are 1D arrays.
  8837. * The possible types of following A_UINT16 TLV arrays are
  8838. * 1. A_UINT16 ratesArray[WHAL_TPC_RATE_MAX];
  8839. * This array has to be referred when number of active chains is < 4
  8840. * 2. A_UINT16 ratesArray2[WHAL_TPC_RATE_MAX];
  8841. * This array has to be referred when number of active chains is > 4
  8842. * 3. A_UINT16 ratesArray_DL_OFDMA[72];
  8843. * WHAL_TPC_RATE_MAX is 748 for HK (considering PHY A0 8x8)
  8844. * WHAL_TPC_RATE_MAX is 188 for CYP (considering PHY A0 2x2)
  8845. * Each 16 bit value in the rates array carries both SU and MU
  8846. * target power information.
  8847. * Bits 0:7 contained the SU target power (signed value, 0.25 dBm units),
  8848. * bits 8:15 denote the MU target power (signed value, 0.25 dBm units).
  8849. */
  8850. } wmi_tpc_rates_array;
  8851. typedef struct {
  8852. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_ctl_pwr_table */
  8853. A_UINT32 ctl_array_type; /* 0: ctl_array,
  8854. * 1: ctl_160 array,
  8855. * 2: ctl_dlOfdma array,
  8856. * 3: ctl_ulOfdma array
  8857. */
  8858. A_UINT32 ctl_array_len; /* Length of the CTL array being sent in bytes */
  8859. A_UINT32 end_of_ctl_pwr; /* Message MAY be split into smaller chunks
  8860. * to fit in the WMI svc msg size limit:
  8861. * 0 indicates more chunks of CTL info to follow,
  8862. * 1 indicates end of CTL info.
  8863. */
  8864. A_UINT32 ctl_pwr_count; /* Incremented for every CTL info chunk
  8865. * for Host to know the sequence.
  8866. */
  8867. A_UINT32 d1; /* the length of 1st (innermost) dimension array */
  8868. A_UINT32 d2; /* the length of 2nd dimension array */
  8869. A_UINT32 d3; /* the length of 3rd dimension array */
  8870. A_UINT32 d4; /* the length of 4th dimension array */
  8871. /* This TLV will be followed by an A_INT8 TLV-array that will
  8872. * carry one the types of CTL power arrays.
  8873. * The CTL array will be multi-dimensional, but will be communicated as
  8874. * a flat array; the host has to stitch it back into a 4D array.
  8875. * The possible types of following A_INT8 arrays are
  8876. * 1. A_INT8 ctlEdgePwrBF[WHAL_MAX_NUM_CHAINS][2][10][8];
  8877. * 2. A_INT8 ctlEdgePwr160[WHAL_MAX_NUM_CHAINS/2][2][2][4];
  8878. * 3. A_INT8 ctlEdgePwrBF_dlOFDMA[WHAL_MAX_NUM_CHAINS][2][3][8];
  8879. * For e.g., in ctlEdgePwrBF
  8880. * D4 = WHAL_MAX_NUM_CHAINS = 8 for HK, 2 for CYP, 4 for Pine
  8881. * D3 = BF on/off = 2
  8882. * D2 = 10 which the number of different tx modes,
  8883. * like cck, legacy, HT20, HT40, VHT80, etc.
  8884. * D1 = NSS = 8, number of spatial streams
  8885. * Total number of elements = D4*D3*D2*D1
  8886. * The same will apply for ctl_dlOfdma array, except that the values
  8887. * of d1,d2,d3,d4 will be different.
  8888. */
  8889. } wmi_tpc_ctl_pwr_table;
  8890. typedef struct {
  8891. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_request_fixed_param */
  8892. A_UINT32 param; /* 1 = read only, 2= read and clear */
  8893. A_UINT32 pdev_id; /* pdev_id for identifying mac */
  8894. } wmi_pdev_bss_chan_info_request_fixed_param;
  8895. typedef struct {
  8896. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_request_fixed_param */
  8897. A_UINT32 total_len; /* the total number of ctl table bytes to be transferred */
  8898. A_UINT32 len; /* the number of ctltable bytes in current payload */
  8899. A_UINT32 seq; /* the number of current transfers */
  8900. /*
  8901. * This TLV is followed by the following additional TLVs:
  8902. * ARRAY_BYTE TLV of ctltable_data
  8903. */
  8904. } wmi_pdev_update_ctltable_request_fixed_param;
  8905. #define WMI_ESP_ESTIMATE_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  8906. #define WMI_ESP_ESTIMATE_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  8907. #define WMI_ESP_ESTIMATE_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  8908. #define WMI_ESP_ESTIMATE_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  8909. #define WMI_ESP_ESTIMATE_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  8910. #define WMI_ESP_ESTIMATE_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  8911. #define WMI_ESP_ESTIMATE_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  8912. #define WMI_ESP_ESTIMATE_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  8913. typedef struct {
  8914. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_esp_estimate_event_fixed_param */
  8915. /** pdev_id for identifying the MAC
  8916. * See macros starting with WMI_PDEV_ID_ for values.
  8917. * In non-DBDC case host should set it to 0
  8918. */
  8919. A_UINT32 pdev_id;
  8920. /*
  8921. * Percentage of air time available for each AC
  8922. * BIT[0-7] : AC_BE
  8923. * BIT[8-15] : AC_BK
  8924. * BIT[16-23] : AC_VI
  8925. * BIT[24-31] : AC_VO
  8926. */
  8927. A_UINT32 ac_airtime_percentage;
  8928. } wmi_esp_estimate_event_fixed_param;
  8929. #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
  8930. #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
  8931. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
  8932. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  8933. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
  8934. (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  8935. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
  8936. do { \
  8937. (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  8938. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
  8939. WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  8940. } while (0)
  8941. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
  8942. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  8943. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
  8944. (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  8945. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
  8946. do { \
  8947. (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  8948. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
  8949. WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  8950. } while (0)
  8951. typedef struct {
  8952. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
  8953. union {
  8954. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  8955. /** pdev_id for identifying the MAC
  8956. * See macros starting with WMI_PDEV_ID_ for values.
  8957. */
  8958. A_UINT32 pdev_id;
  8959. };
  8960. /**
  8961. * The following "value" field is divided into bit fields as follows:
  8962. * bits | purpose
  8963. * -----+---------------------------------------
  8964. * 0 | enable/disable FAST diversity
  8965. * 1 | enable/disable SLOW diversity
  8966. * 5:2 | chain0 slow-diversity weighting factor
  8967. * 9:6 | chain1 slow-diversity weighting factor
  8968. * 31:10| currently unused (set to 0x0)
  8969. * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
  8970. */
  8971. A_UINT32 value;
  8972. } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
  8973. #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
  8974. typedef struct {
  8975. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
  8976. A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
  8977. A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
  8978. A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
  8979. A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
  8980. A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
  8981. 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] */
  8982. 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] */
  8983. A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event */
  8984. A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
  8985. } wmi_rssi_breach_monitor_config_fixed_param;
  8986. typedef struct {
  8987. /** parameter */
  8988. A_UINT32 param;
  8989. } wmi_pdev_dump_cmd;
  8990. typedef enum {
  8991. PAUSE_TYPE_CHOP = 0x1, /** for MCC (switch channel), only vdev_map is valid */
  8992. PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
  8993. PAUSE_TYPE_UAPSD = 0x3, /** for uapsd, only peer_id and tid_map are valid. */
  8994. PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, /** only vdev_map is valid, actually only one vdev id is set at one time */
  8995. PAUSE_TYPE_P2P_GO_PS = 0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
  8996. PAUSE_TYPE_STA_ADD_BA = 0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
  8997. PAUSE_TYPE_AP_PS = 0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
  8998. PAUSE_TYPE_IBSS_PS = 0x8, /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
  8999. PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, /** for TDLS offchannel MCC (switch channel), only vdev_map is valid, TDLS connection tracker needs to be notified */
  9000. PAUSE_TYPE_HOST = 0x15, /* host is requesting vdev pause */
  9001. } wmi_tx_pause_type;
  9002. typedef enum {
  9003. ACTION_PAUSE = 0x0,
  9004. ACTION_UNPAUSE = 0x1,
  9005. } wmi_tx_pause_action;
  9006. typedef struct {
  9007. A_UINT32 tlv_header;
  9008. A_UINT32 pause_type;
  9009. A_UINT32 action;
  9010. A_UINT32 vdev_map;
  9011. A_UINT32 peer_id;
  9012. A_UINT32 tid_map;
  9013. } wmi_tx_pause_event_fixed_param;
  9014. typedef enum {
  9015. WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
  9016. WMI_MGMT_TX_COMP_TYPE_DISCARD,
  9017. WMI_MGMT_TX_COMP_TYPE_INSPECT,
  9018. WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
  9019. WMI_MGMT_TX_COMP_TYPE_MAX,
  9020. } WMI_MGMT_TX_COMP_STATUS_TYPE;
  9021. #define WMI_VDEV_ID_VALID_FROM_INFO_GET(info) \
  9022. WMI_GET_BITS(info, 3, 1)
  9023. #define WMI_VDEV_ID_VALID_FROM_INFO_SET(info,val) \
  9024. WMI_SET_BITS(info, 3, 1, val)
  9025. #define WMI_VDEV_ID_FROM_INFO_GET(info) \
  9026. WMI_GET_BITS(info, 4, 8)
  9027. #define WMI_VDEV_ID_FROM_INFO_SET(info,val) \
  9028. WMI_SET_BITS(info, 4, 8, val)
  9029. typedef struct {
  9030. A_UINT32 tlv_header;
  9031. A_UINT32 desc_id; /* from tx_send_cmd */
  9032. A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
  9033. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  9034. * See macros starting with WMI_PDEV_ID_ for values.
  9035. */
  9036. A_UINT32 pdev_id;
  9037. /* ppdu_id
  9038. * Hardware PPDU ID for tracking the completion stats
  9039. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  9040. */
  9041. A_UINT32 ppdu_id;
  9042. /* ack_rssi
  9043. * TX mgmt ack RSSI report to host.
  9044. * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
  9045. * ACK RSSI is reported as SNR dB, i.e. how many dB the RSSI is above
  9046. * the noise floor.
  9047. */
  9048. A_UINT32 ack_rssi;
  9049. /* xmit rate in kbps */
  9050. A_UINT32 tx_rate;
  9051. /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h */
  9052. A_UINT32 peer_phymode;
  9053. A_UINT32 retries_count;
  9054. /* current 64 bit TSF timestamp */
  9055. A_UINT32 tx_tsf_l32;
  9056. A_UINT32 tx_tsf_u32;
  9057. /* info:
  9058. * Bit[0:2] - band on which frame is sent, band value will be
  9059. * one of the wmi_mlo_band_info_t enum constants.
  9060. * Macros WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET,SET
  9061. * can be reused for setting mlo band info.
  9062. * Bit[3] - set when vdev_id_info is populated in Bit[4:11]
  9063. * macros WMI_VDEV_ID_VALID_FROM_INFO_GET,SET can be used
  9064. * Bit[4:11] - vdev_id on which frame is sent,
  9065. * Macros WMI_VDEV_ID_FROM_INFO_GET,SET can be used
  9066. * Bit[12:31] - reserved
  9067. */
  9068. A_UINT32 info;
  9069. } wmi_mgmt_tx_compl_event_fixed_param;
  9070. typedef struct {
  9071. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_compl_event_fixed_param */
  9072. A_UINT32 desc_id; /* from tx_send_cmd */
  9073. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  9074. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  9075. * See macros starting with WMI_PDEV_ID_ for values.
  9076. */
  9077. A_UINT32 pdev_id;
  9078. /* ppdu_id
  9079. * Hardware PPDU ID for tracking the completion stats
  9080. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  9081. */
  9082. A_UINT32 ppdu_id;
  9083. } wmi_offchan_data_tx_compl_event_fixed_param;
  9084. typedef struct {
  9085. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_qos_null_frame_tx_compl_event_fixed_param */
  9086. A_UINT32 desc_id; /* echoed from tx_send_cmd */
  9087. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  9088. /** pdev_id for identifying the MAC that transmitted the QoS NULL frame
  9089. * See macros starting with WMI_PDEV_ID_ for values.
  9090. */
  9091. A_UINT32 pdev_id;
  9092. /* ppdu_id
  9093. * Hardware PPDU ID for tracking the completion stats
  9094. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  9095. */
  9096. A_UINT32 ppdu_id;
  9097. /* ack_rssi
  9098. * TX mgmt ack RSSI report to host.
  9099. * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
  9100. * ack_rssi is reported in dBm.
  9101. */
  9102. A_INT32 ack_rssi;
  9103. } wmi_qos_null_frame_tx_compl_event_fixed_param;
  9104. typedef struct {
  9105. A_UINT32 tlv_header;
  9106. A_UINT32 num_reports;
  9107. /* tlv for completion
  9108. * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
  9109. * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
  9110. * A_UINT32 ppdu_id[num_reports]; <- list of PPDU IDs
  9111. * A_UINT32 ack_rssi[num_reports]; <- list of ack RSSI
  9112. * RSSI units = dB w.r.t. noise floor
  9113. */
  9114. } wmi_mgmt_tx_compl_bundle_event_fixed_param;
  9115. #define WMI_TPC_RATE_MAX 160
  9116. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  9117. #define WMI_TPC_TX_NUM_CHAIN 4
  9118. typedef enum {
  9119. /* bits 0-7 for table flags */
  9120. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  9121. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  9122. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  9123. /* bits 8-11 for interface version flags */
  9124. WMI_TPC_CONFIG_EVENT_FLAG_IF_MASK = 0x0F00,
  9125. WMI_TPC_CONFIG_EVENT_FLAG_IF_V1 = 0x0100,
  9126. } WMI_TPC_CONFIG_EVENT_FLAG;
  9127. typedef struct {
  9128. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */
  9129. A_UINT32 regDomain;
  9130. A_UINT32 chanFreq;
  9131. A_UINT32 phyMode;
  9132. A_UINT32 twiceAntennaReduction;
  9133. A_UINT32 twiceMaxRDPower;
  9134. A_INT32 twiceAntennaGain;
  9135. A_UINT32 powerLimit;
  9136. A_UINT32 rateMax;
  9137. A_UINT32 numTxChain;
  9138. A_UINT32 ctl;
  9139. A_UINT32 flags;
  9140. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  9141. A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
  9142. A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  9143. A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  9144. A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  9145. /** pdev_id for identifying the MAC
  9146. * See macros starting with WMI_PDEV_ID_ for values.
  9147. */
  9148. A_UINT32 pdev_id;
  9149. /* This TLV is followed by further TLVs:
  9150. * 1. byte array:
  9151. * A_UINT8 ratesArray[];
  9152. * 2a. multi-dimensional array dimension spec:
  9153. * wmi_tlv_arrays_len_param ctlPwrTbl_param[0 or 1]
  9154. *
  9155. * 2b. ctl power table
  9156. * A_UINT8 ctlPwrTbl_buf[bf][modes][nss], i.e.
  9157. * A_UINT8 ctlPwrTbl_buf[d3_len * d2_len * d1_len]
  9158. * bf is [0 or 1] for [on or off].
  9159. * For 2G, modes is [0, 1, 2, or 3] for
  9160. * [cck, legacy, (v)ht20, or (v)ht40]
  9161. * For 5G, modes is [0, 1, 2, or 3] for
  9162. * [legacy, (v)ht20, (v)ht40, or vht80]
  9163. * nss is [0, 1, 2, or 3] for the number of streams 1~4.
  9164. */
  9165. } wmi_pdev_tpc_config_event_fixed_param;
  9166. typedef struct {
  9167. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_div_rssi_antid_event_fixed_param */
  9168. A_UINT32 tlv_header;
  9169. /** how many elements in the MAX_CHAINS arrays below contain valid info */
  9170. A_UINT32 num_chains_valid;
  9171. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  9172. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  9173. /** index of the last-used antenna for each chain */
  9174. A_UINT32 ant_id[WMI_MAX_CHAINS];
  9175. /** mac address of diversity peer */
  9176. wmi_mac_addr macaddr;
  9177. /* EVM value for stream0 and stream1 20Mhz, dB units */
  9178. A_INT32 chain_evm[WMI_MAX_CHAINS];
  9179. } wmi_pdev_div_rssi_antid_event_fixed_param;
  9180. typedef struct {
  9181. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_event_fixed_param */
  9182. A_UINT32 freq; /* Units in MHz */
  9183. A_INT32 noise_floor; /* units are dBm */
  9184. /* rx clear - how often the channel was unused */
  9185. A_UINT32 rx_clear_count_low; /* low 31 bits of rx_clear cnt in 64bits format */
  9186. A_UINT32 rx_clear_count_high; /* high 31 bits of rx_clear cnt in 64bits format */
  9187. /* cycle count - elapsed time during the measured period, in clock ticks */
  9188. A_UINT32 cycle_count_low; /* low 31 bits of cycle cnt in 64bits format */
  9189. A_UINT32 cycle_count_high; /* high 31 bits of cycle cnt in 64bits format */
  9190. /* tx cycle count - elapsed time spent in tx, in clock ticks */
  9191. A_UINT32 tx_cycle_count_low; /* low 31 bits of tx_cycle cnt in 64bits format */
  9192. A_UINT32 tx_cycle_count_high; /* high 31 bits of tx_cycle cnt in 64bits format */
  9193. /* rx cycle count - elapsed time spent in rx, in clock ticks */
  9194. A_UINT32 rx_cycle_count_low; /* low 31 bits of rx_cycle cnt in 64bits format */
  9195. A_UINT32 rx_cycle_count_high; /* high 31 bits of rx_cycle cnt in 64bits format */
  9196. A_UINT32 rx_bss_cycle_count_low; /* low 31 bits of rx cycle cnt for my bss in 64bits format */
  9197. A_UINT32 rx_bss_cycle_count_high; /* high 31 bits of rx_cycle cnt for my bss in 64bits format */
  9198. A_UINT32 pdev_id; /* pdev_id for identifying the MAC */
  9199. } wmi_pdev_bss_chan_info_event_fixed_param;
  9200. typedef struct {
  9201. /* WMI event response update ctltable request to host */
  9202. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_event_fixed_param */
  9203. A_UINT32 total_len; /* the total number of bytes to be transferred */
  9204. A_UINT32 len; /* the number of FW received bytes from host */
  9205. A_UINT32 seq; /* the number of current transfers */
  9206. } wmi_pdev_update_ctltable_event_fixed_param;
  9207. typedef struct {
  9208. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
  9209. A_UINT32 periodCnt;
  9210. A_UINT32 L1Cnt;
  9211. A_UINT32 L11Cnt;
  9212. A_UINT32 L12Cnt;
  9213. A_UINT32 L1Entry;
  9214. A_UINT32 L11Entry;
  9215. A_UINT32 L12Entry;
  9216. /** pdev_id for identifying the MAC
  9217. * See macros starting with WMI_PDEV_ID_ for values.
  9218. */
  9219. A_UINT32 pdev_id;
  9220. } wmi_pdev_l1ss_track_event_fixed_param;
  9221. typedef struct {
  9222. A_UINT32 len;
  9223. A_UINT32 msgref;
  9224. A_UINT32 segmentInfo;
  9225. } wmi_pdev_seg_hdr_info;
  9226. /*
  9227. * Transmit power scale factor.
  9228. *
  9229. */
  9230. typedef enum {
  9231. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  9232. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  9233. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  9234. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  9235. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  9236. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  9237. } WMI_TP_SCALE;
  9238. #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
  9239. typedef struct {
  9240. /** message buffer, NULL terminated */
  9241. char bufp[WMI_MAX_DEBUG_MESG];
  9242. } wmi_debug_mesg_event;
  9243. enum {
  9244. /** P2P device */
  9245. VDEV_SUBTYPE_P2PDEV = 0,
  9246. /** P2P client */
  9247. VDEV_SUBTYPE_P2PCLI,
  9248. /** P2P GO */
  9249. VDEV_SUBTYPE_P2PGO,
  9250. /** BT3.0 HS */
  9251. VDEV_SUBTYPE_BT,
  9252. };
  9253. typedef struct {
  9254. /** idnore power , only use flags , mode and freq */
  9255. wmi_channel chan;
  9256. } wmi_pdev_set_channel_cmd;
  9257. typedef struct {
  9258. A_UINT32 tlv_header;
  9259. /* DBW puncture bitmap */
  9260. A_UINT32 dbw_puncture_20mhz_bitmap;
  9261. } wmi_dbw_chan_info;
  9262. typedef enum {
  9263. WMI_PKTLOG_EVENT_RX = 0x00000001,
  9264. WMI_PKTLOG_EVENT_TX = 0x00000002,
  9265. WMI_PKTLOG_EVENT_RCF = 0x00000004, /* Rate Control Find */
  9266. WMI_PKTLOG_EVENT_RCU = 0x00000008, /* Rate Control Update */
  9267. /* 0x10 used by deprecated DBG_PRINT */
  9268. WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x00000020, /* To support Smart Antenna */
  9269. WMI_PKTLOG_EVENT_SW = 0x00000040, /* To support SW defined events */
  9270. WMI_PKTLOG_EVENT_PHY = 0x00000080, /* To support PHY stats */
  9271. WMI_PKTLOG_EVENT_CBF = 0x00000100, /* To support CBF's filter in */
  9272. /* To support hybrid of events from FW and tx monitor status ring */
  9273. WMI_PKTLOG_EVENT_HYBRID_TX = 0x00000200,
  9274. } WMI_PKTLOG_EVENT;
  9275. typedef enum {
  9276. WMI_PKTLOG_ENABLE_AUTO = 0, /* (default) FW will decide under what conditions to enable pktlog */
  9277. WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
  9278. } WMI_PKTLOG_ENABLE;
  9279. typedef enum {
  9280. WMI_PKTLOG_FILTER_IN = 0, /* capture only for the MAC addresses in pktlog_mac_addr_list*/
  9281. WMI_PKTLOG_FILTER_OUT = 1, /* capture for all MAC addresses except those in pktlog_mac_addr_list */
  9282. } WMI_PKTLOG_FILTER_TYPE;
  9283. typedef struct {
  9284. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
  9285. /** pdev_id for identifying the MAC
  9286. * See macros starting with WMI_PDEV_ID_ for values.
  9287. */
  9288. A_UINT32 pdev_id;
  9289. A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
  9290. A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
  9291. } wmi_pdev_pktlog_enable_cmd_fixed_param;
  9292. typedef struct {
  9293. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
  9294. /** pdev_id for identifying the MAC
  9295. * See macros starting with WMI_PDEV_ID_ for values.
  9296. */
  9297. A_UINT32 pdev_id;
  9298. } wmi_pdev_pktlog_disable_cmd_fixed_param;
  9299. typedef struct {
  9300. /** TLV tag and len; tag equals
  9301. * WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_info */
  9302. A_UINT32 tlv_header;
  9303. /** mac addr of the peer to be filtered */
  9304. wmi_mac_addr peer_mac_address;
  9305. } wmi_pdev_pktlog_filter_info;
  9306. typedef struct {
  9307. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_cmd_fixed_param */
  9308. /** pdev_id for identifying the MAC
  9309. * See macros starting with WMI_PDEV_ID_ for values.
  9310. */
  9311. A_UINT32 pdev_id;
  9312. /** 0 - disable filtering, 1 - enable filtering */
  9313. A_UINT32 enable;
  9314. A_UINT32 filter_type; /* WMI_PKTLOG_FILTER_TYPE */
  9315. A_UINT32 num_of_mac_addresses;
  9316. /* This TLV is followed by another TLV of array of structs
  9317. * wmi_pdev_pktlog_filter_info pdev_pktlog_filter_info[];
  9318. */
  9319. } wmi_pdev_pktlog_filter_cmd_fixed_param;
  9320. /**
  9321. * WMI event to send packet log decode information to Host.
  9322. * This sends the metadata which will be embedded by Host in the file-level
  9323. * header of the pktlog trace file (i.e. the ath_pktlog_bufhdr struct).
  9324. * This will be later used by the pktlog post-processing scripts to get
  9325. * prerequisite pktlog_defs*.JSON files for decoding the trace.
  9326. */
  9327. typedef struct {
  9328. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_decode_info_evt_fixed_param */
  9329. /** pdev_id for identifying the MAC
  9330. * See macros starting with WMI_PDEV_ID_ for values.
  9331. */
  9332. A_UINT32 pdev_id;
  9333. /** Forty byte field for storing software image as null terminated string */
  9334. A_UINT8 software_image[40];
  9335. /** Forty byte field for storing chip info as null terminated string */
  9336. A_UINT8 chip_info[40];
  9337. /** Four byte field for storing JSON version */
  9338. A_UINT32 pktlog_defs_json_version;
  9339. } wmi_pdev_pktlog_decode_info_evt_fixed_param;
  9340. typedef enum {
  9341. WMI_ROGUE_AP_ON_STA_PS = 1, /* rogue ap on sta ps module */
  9342. } WMI_ROGUE_AP_TYPE;
  9343. typedef struct {
  9344. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_fixed_param */
  9345. /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
  9346. * See macros starting with WMI_PDEV_ID_ for values.
  9347. */
  9348. A_UINT32 pdev_id;
  9349. /** rogue ap type, see WMI_ROGUE_AP_TYPE */
  9350. A_UINT32 type;
  9351. /** Enable detection of rogue ap in the ps module
  9352. *
  9353. * 0 -> disabled
  9354. * 1 -> enabled (default)
  9355. */
  9356. A_UINT32 sta_ps_detection_enabled;
  9357. /* This TLV is followed by rap_param for each rogue ap:
  9358. * wmi_pdev_set_rap_config_on_sta_ps_tlv_param rap_param[];
  9359. */
  9360. } wmi_pdev_set_rap_config_fixed_param;
  9361. typedef struct {
  9362. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_on_sta_ps_tlv_param */
  9363. /** bssid of rogue ap */
  9364. wmi_mac_addr bssid;
  9365. } wmi_pdev_set_rap_config_on_sta_ps_tlv_param;
  9366. typedef struct {
  9367. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
  9368. /** pdev_id for identifying the MAC
  9369. * See macros starting with WMI_PDEV_ID_ for values.
  9370. */
  9371. A_UINT32 pdev_id;
  9372. A_UINT32 enable_Mib; /** enable for mib stats collection. Stats are delivered to host in wmi_mib_stats structure.
  9373. * If enable_Mib=1, stats collection is enabled. If enable_Mib=0, stats collection does not happen */
  9374. } wmi_mib_stats_enable_cmd_fixed_param;
  9375. /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
  9376. * NOTE: This constant cannot be changed without breaking
  9377. * WMI Compatibility. */
  9378. #define WMI_DSCP_MAP_MAX (64)
  9379. /*
  9380. * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
  9381. * @details
  9382. * Create an API for sending the custom DSCP-to-TID map to the target
  9383. * If this is a request from the user space or from above the UMAC
  9384. * then the best place to implement this is in the umac_if_offload of the OL path.
  9385. * Provide a place holder for this API in the ieee80211com (ic).
  9386. *
  9387. * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
  9388. * in the target should be directed to the function pointer in the ic.
  9389. *
  9390. * Implementation details of the API to send the map to the target are as described-
  9391. *
  9392. * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
  9393. * DSCP-to-TID map is a one dimensional u_int32_t array of length 64 to
  9394. * accommodate 64 TID values for 2^6 (64) DSCP ids.
  9395. * Example:
  9396. * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
  9397. * 0, 0, 0, 0, 0, 0, 0, 0,
  9398. * 1, 1, 1, 1, 1, 1, 1, 1,
  9399. * 2, 2, 2, 2, 2, 2, 2, 2,
  9400. * 3, 3, 3, 3, 3, 3, 3, 3,
  9401. * 4, 4, 4, 4, 4, 4, 4, 4,
  9402. * 5, 5, 5, 5, 5, 5, 5, 5,
  9403. * 6, 6, 6, 6, 6, 6, 6, 6,
  9404. * 7, 7, 7, 7, 7, 7, 7, 7,
  9405. * };
  9406. *
  9407. * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
  9408. *
  9409. * 3. Copy the DSCP-to-TID map into the WMI buffer.
  9410. *
  9411. * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
  9412. * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
  9413. * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
  9414. * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
  9415. *
  9416. */
  9417. /* DEPRECATED - use VDEV level command instead
  9418. * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
  9419. */
  9420. typedef struct {
  9421. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
  9422. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  9423. /* map indicating DSCP to TID conversion */
  9424. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  9425. } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
  9426. typedef struct {
  9427. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param */
  9428. A_UINT32 vdev_id;
  9429. /** map indicating DSCP to TID conversion */
  9430. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  9431. A_UINT32 enable_override;
  9432. } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
  9433. enum WMI_WAKE_GPIO_TYPE {
  9434. WMI_WAKE_GPIO_LOW = 1,
  9435. WMI_WAKE_GPIO_HIGH = 2,
  9436. WMI_WAKE_GPIO_RISING_EDGE = 3,
  9437. WMI_WAKE_GPIO_FALLING_EDGE = 4,
  9438. };
  9439. /**
  9440. * Set GPIO numbers used to wakeup host and wakeup target.
  9441. */
  9442. typedef struct {
  9443. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param */
  9444. A_UINT32 host_wakeup_gpio; /* gpio num used to wakeup host, 0xff disable wakeup gpio */
  9445. A_UINT32 host_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  9446. A_UINT32 target_wakeup_gpio; /* gpio num used to wakeup target, 0xff disable wakeup gpio */
  9447. A_UINT32 target_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  9448. } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
  9449. /** Fixed rate (rate-code) for broadcast/ multicast data frames */
  9450. /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
  9451. * @details
  9452. * Create an API for setting the custom rate for the MCAST and BCAST frames
  9453. * in the target. If this is a request from the user space or from above the UMAC
  9454. * then the best place to implement this is in the umac_if_offload of the OL path.
  9455. * Provide a place holder for this API in the ieee80211com (ic).
  9456. *
  9457. * Implementation details of the API to set custom rates for MCAST and BCAST in
  9458. * the target are as described-
  9459. *
  9460. * 1. The function will have 3 arguments-
  9461. * vap structure,
  9462. * MCAST/ BCAST identifier code,
  9463. * 8 bit rate code
  9464. *
  9465. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  9466. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  9467. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  9468. * b'3-b'0 indicate the rate, which is indicated as follows:
  9469. * OFDM : 0: OFDM 48 Mbps
  9470. * 1: OFDM 24 Mbps
  9471. * 2: OFDM 12 Mbps
  9472. * 3: OFDM 6 Mbps
  9473. * 4: OFDM 54 Mbps
  9474. * 5: OFDM 36 Mbps
  9475. * 6: OFDM 18 Mbps
  9476. * 7: OFDM 9 Mbps
  9477. * CCK (pream == 1)
  9478. * 0: CCK 11 Mbps Long
  9479. * 1: CCK 5.5 Mbps Long
  9480. * 2: CCK 2 Mbps Long
  9481. * 3: CCK 1 Mbps Long
  9482. * 4: CCK 11 Mbps Short
  9483. * 5: CCK 5.5 Mbps Short
  9484. * 6: CCK 2 Mbps Short
  9485. * HT/VHT (pream == 2/3)
  9486. * 0..7: MCS0..MCS7 (HT)
  9487. * 0..9: MCS0..MCS9 (VHT)
  9488. *
  9489. * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
  9490. * to the target.
  9491. * Arguments to the API are-
  9492. * wmi handle,
  9493. * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
  9494. * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
  9495. * rate value.
  9496. */
  9497. typedef enum {
  9498. WMI_SET_MCAST_RATE,
  9499. WMI_SET_BCAST_RATE
  9500. } MCAST_BCAST_RATE_ID;
  9501. typedef struct {
  9502. MCAST_BCAST_RATE_ID rate_id;
  9503. A_UINT32 rate;
  9504. } mcast_bcast_rate;
  9505. typedef struct {
  9506. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
  9507. A_UINT32 cwmin;
  9508. A_UINT32 cwmax;
  9509. A_UINT32 aifs;
  9510. A_UINT32 txoplimit;
  9511. A_UINT32 acm;
  9512. A_UINT32 no_ack;
  9513. } wmi_wmm_params;
  9514. /* DEPRECATED - use VDEV level command instead
  9515. * (wmi_vdev_set_wmm_params_cmd_fixed_param)
  9516. */
  9517. typedef struct {
  9518. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
  9519. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  9520. A_UINT32 dg_type;
  9521. /* The TLVs for the 4 AC follows:
  9522. * wmi_wmm_params wmm_params_ac_be;
  9523. * wmi_wmm_params wmm_params_ac_bk;
  9524. * wmi_wmm_params wmm_params_ac_vi;
  9525. * wmi_wmm_params wmm_params_ac_vo;
  9526. */
  9527. } wmi_pdev_set_wmm_params_cmd_fixed_param;
  9528. typedef struct {
  9529. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pifs_params */
  9530. /* The unit of this offset is PIFS slot time */
  9531. A_UINT32 sap_pifs_offset;
  9532. A_UINT32 leb_pifs_offset;
  9533. A_UINT32 reb_pifs_offset;
  9534. } wmi_pifs_params;
  9535. typedef enum {
  9536. WMI_EDCA_PARAM_TYPE_AGGRESSIVE = 0,
  9537. WMI_EDCA_PARAM_TYPE_PIFS = 1,
  9538. } WMI_EDCA_PARAM_TYPE;
  9539. typedef struct {
  9540. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_twt_edca_params_cmd_fixed_param */
  9541. A_UINT32 tlv_header;
  9542. A_UINT32 vdev_id;
  9543. A_UINT32 type; /* contains a WMI_EDCA_PARAM_TYPE value */
  9544. /*
  9545. * This TLV is (optionally) followed by other TLVs as below:
  9546. * wmi_wmm_params wmm_params[0/1];
  9547. * present if type is WMI_EDCA_PARAM_TYPE_AGGRESSIVE
  9548. * wmi_pifs_params pifs_params[0/1];
  9549. * present if type is WMI_EDCA_PARAM_TYPE_PIFS
  9550. */
  9551. } wmi_vdev_set_twt_edca_params_cmd_fixed_param;
  9552. typedef struct {
  9553. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_twt_session_stats_info_cmd_fixed_param */
  9554. A_UINT32 tlv_header;
  9555. A_UINT32 vdev_id;
  9556. } wmi_vdev_get_twt_session_stats_info_cmd_fixed_param;
  9557. typedef enum {
  9558. WMI_REQUEST_PEER_STAT = 0x00001,
  9559. WMI_REQUEST_AP_STAT = 0x00002,
  9560. WMI_REQUEST_PDEV_STAT = 0x00004,
  9561. WMI_REQUEST_VDEV_STAT = 0x00008,
  9562. WMI_REQUEST_BCNFLT_STAT = 0x00010,
  9563. WMI_REQUEST_VDEV_RATE_STAT = 0x00020,
  9564. WMI_REQUEST_INST_STAT = 0x00040,
  9565. WMI_REQUEST_MIB_STAT = 0x00080,
  9566. WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x00100,
  9567. WMI_REQUEST_CONGESTION_STAT = 0x00200,
  9568. WMI_REQUEST_PEER_EXTD_STAT = 0x00400,
  9569. WMI_REQUEST_BCN_STAT = 0x00800,
  9570. WMI_REQUEST_BCN_STAT_RESET = 0x01000,
  9571. WMI_REQUEST_PEER_EXTD2_STAT = 0x02000,
  9572. WMI_REQUEST_MIB_EXTD_STAT = 0x04000,
  9573. WMI_REQUEST_PMF_BCN_PROTECT_STAT = 0x08000,
  9574. WMI_REQUEST_VDEV_EXTD_STAT = 0x10000,
  9575. WMI_REQUEST_PDEV_EXTD_STAT = 0x20000,
  9576. WMI_REQUEST_PDEV_TELEMETRY_STAT = 0x40000,
  9577. } wmi_stats_id;
  9578. /*
  9579. * cfg_retry_count is set to max number of times the AP should try sending
  9580. * QoS Null frames to the STA for measuring the instantaneous RSSI
  9581. *
  9582. * retry_count is used to maintain the number of times the AP has tried sending
  9583. * QoS Null frames to the STA for measuring the instantaneous RSSI
  9584. */
  9585. typedef struct {
  9586. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_sub_struc_param */
  9587. A_UINT32 cfg_retry_count;
  9588. A_UINT32 retry_count;
  9589. } wmi_inst_rssi_stats_params;
  9590. typedef struct {
  9591. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
  9592. wmi_stats_id stats_id;
  9593. /** unique id identifying the VDEV, generated by the caller */
  9594. A_UINT32 vdev_id;
  9595. /** peer MAC address */
  9596. wmi_mac_addr peer_macaddr;
  9597. 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. */
  9598. /*
  9599. * This TLV is (optionally) followed by other TLVs:
  9600. * wmi_inst_rssi_stats_params inst_rssi_params;
  9601. * A_UINT32 vdev_id_bitmap[];
  9602. * This array is present and non-zero length in MLO case, stats should
  9603. * only be provided from the vdev_id_bitmap in the bitmap when it is
  9604. * present.
  9605. * wmi_mac_addr mld_macaddr[];
  9606. * This array is present and non-zero length in MLO case, stats should
  9607. * only be provided from the peers with the MLD MAC addresses specified
  9608. * in the array.
  9609. */
  9610. } wmi_request_stats_cmd_fixed_param;
  9611. /* stats type bitmap */
  9612. #define WMI_LINK_STATS_RADIO 0x00000001
  9613. #define WMI_LINK_STATS_IFACE 0x00000002
  9614. #define WMI_LINK_STATS_ALL_PEER 0x00000004
  9615. #define WMI_LINK_STATS_PER_PEER 0x00000008
  9616. #define WMI_LINK_STATS_IPA 0x00000010
  9617. /* wifi clear statistics bitmap */
  9618. #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
  9619. #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
  9620. #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
  9621. #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
  9622. #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
  9623. #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
  9624. #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
  9625. #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
  9626. #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
  9627. #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
  9628. /** Default value for stats if the stats collection has not started */
  9629. #define WMI_STATS_VALUE_INVALID 0xffffffff
  9630. #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
  9631. #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
  9632. #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
  9633. #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
  9634. #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  9635. #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  9636. typedef struct {
  9637. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
  9638. A_UINT32 num_of_diag_events_logs;
  9639. /* The TLVs will follow.
  9640. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  9641. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  9642. * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
  9643. */
  9644. } wmi_diag_event_log_config_fixed_param;
  9645. #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  9646. #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  9647. #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
  9648. #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
  9649. typedef struct {
  9650. A_UINT32 tlv_header;
  9651. A_UINT32 num_of_diag_events_logs;
  9652. /* The TLVs will follow.
  9653. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  9654. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  9655. * Bit 17 - Frequency of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
  9656. * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
  9657. */
  9658. } wmi_diag_event_log_supported_event_fixed_params;
  9659. typedef struct {
  9660. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
  9661. A_UINT32 reserved0; /** placeholder for future */
  9662. } wmi_debug_mesg_flush_fixed_param;
  9663. typedef struct {
  9664. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_data_stall_param */
  9665. A_UINT32 vdev_id_bitmap; /** bitmap representation for vdev_id's where data stall happened */
  9666. A_UINT32 data_stall_type; /** wlan_dbg_data_stall_type_e */
  9667. /** reason_code1:
  9668. * The information stored in reason_code1 varies based on the data stally
  9669. * type values:
  9670. * data_stall_type | reason_code1
  9671. * -----------------------------------------------------
  9672. * HWSCHED_CMD_FLUSH | flush req reason (0-40)
  9673. * RX_REFILL_FAILED | ring_id (0-7)
  9674. * RX_FCS_LEN_ERROR | exact error type
  9675. */
  9676. A_UINT32 reason_code1;
  9677. A_UINT32 reason_code2; /** on which tid/hwq stall happened */
  9678. A_UINT32 recovery_type; /** wlan_dbg_data_stall_recovery_type_e */
  9679. } wmi_debug_mesg_fw_data_stall_param;
  9680. typedef struct {
  9681. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_cal_failure_param */
  9682. A_UINT32 tlv_header;
  9683. /* wmi_ctrl_path_stats_cal_type_ids enum defines possible cal type IDs */
  9684. A_UINT32 cal_type;
  9685. /* wmi_cal_failure_reason_code enum defines possible failure reason codes */
  9686. A_UINT32 cal_failure_reason_code;
  9687. } wmi_debug_mesg_fw_cal_failure_param;
  9688. typedef struct {
  9689. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
  9690. A_UINT32 reserved0; /** placeholder for future */
  9691. } wmi_debug_mesg_flush_complete_fixed_param;
  9692. typedef struct {
  9693. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
  9694. /* vdev_id, where RSSI breach event occurred */
  9695. A_UINT32 vdev_id;
  9696. /* request id */
  9697. A_UINT32 request_id;
  9698. /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
  9699. A_UINT32 event_bitmap;
  9700. /* rssi at the time of RSSI breach. Unit dBm */
  9701. A_UINT32 rssi;
  9702. /* bssid of the monitored AP's */
  9703. wmi_mac_addr bssid;
  9704. } wmi_rssi_breach_event_fixed_param;
  9705. typedef struct {
  9706. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
  9707. /** unique id identifying the segment */
  9708. A_UINT32 seg_id;
  9709. /** Start address of the segment to be read */
  9710. A_UINT32 seg_start_addr_lo;
  9711. A_UINT32 seg_start_addr_hi;
  9712. /** Length of the segment to be read */
  9713. A_UINT32 seg_length;
  9714. /** Host bufeer address to which the segment will be read and dumped */
  9715. A_UINT32 dest_addr_lo;
  9716. A_UINT32 dest_addr_hi;
  9717. } wmi_fw_mem_dump;
  9718. /* Command to get firmware memory dump*/
  9719. typedef struct {
  9720. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
  9721. /** unique id identifying the request */
  9722. A_UINT32 request_id;
  9723. /** number of memory dump segments */
  9724. A_UINT32 num_fw_mem_dump_segs;
  9725. /**
  9726. * This TLV is followed by another TLV
  9727. * wmi_fw_mem_dump fw_mem_dump[];
  9728. */
  9729. } wmi_get_fw_mem_dump_fixed_param;
  9730. /** Event to indicate the completion of fw mem dump */
  9731. typedef struct {
  9732. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
  9733. /** unique id identifying the request, given in the request stats command */
  9734. A_UINT32 request_id;
  9735. /*In case of Firmware memory dump */
  9736. A_UINT32 fw_mem_dump_complete;
  9737. } wmi_update_fw_mem_dump_fixed_param;
  9738. typedef enum {
  9739. WMI_ROAMING_IDLE = 0,
  9740. WMI_ROAMING_ACTIVE = 1,
  9741. } wmi_roam_state;
  9742. /* access categories */
  9743. typedef enum {
  9744. WMI_AC_VO = 0,
  9745. WMI_AC_VI = 1,
  9746. WMI_AC_BE = 2,
  9747. WMI_AC_BK = 3,
  9748. WMI_AC_MAX = 4,
  9749. } wmi_traffic_ac;
  9750. typedef enum {
  9751. WMI_STA_STATS = 0,
  9752. WMI_SOFTAP_STATS = 1,
  9753. WMI_IBSS_STATS = 2,
  9754. WMI_P2P_CLIENT_STATS = 3,
  9755. WMI_P2P_GO_STATS = 4,
  9756. WMI_NAN_STATS = 5,
  9757. WMI_MESH_STATS = 6,
  9758. } wmi_link_iface_type;
  9759. /* channel operating width */
  9760. typedef enum {
  9761. WMI_CHAN_WIDTH_20 = 0,
  9762. WMI_CHAN_WIDTH_40 = 1,
  9763. WMI_CHAN_WIDTH_80 = 2,
  9764. WMI_CHAN_WIDTH_160 = 3,
  9765. WMI_CHAN_WIDTH_80P80 = 4,
  9766. WMI_CHAN_WIDTH_5 = 5,
  9767. WMI_CHAN_WIDTH_10 = 6,
  9768. WMI_CHAN_WIDTH_165 = 7,
  9769. WMI_CHAN_WIDTH_160P160 = 8,
  9770. WMI_CHAN_WIDTH_320 = 9,
  9771. WMI_CHAN_WIDTH_MAX,
  9772. } wmi_channel_width;
  9773. /* Clear stats */
  9774. typedef struct {
  9775. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
  9776. /** unique id identifying the VDEV, generated by the caller */
  9777. A_UINT32 vdev_id;
  9778. /** stop_stats_collection_req = 1 will imply stop the statistics collection */
  9779. A_UINT32 stop_stats_collection_req;
  9780. /** identifies what stats to be cleared */
  9781. A_UINT32 stats_clear_req_mask;
  9782. /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
  9783. wmi_mac_addr peer_macaddr;
  9784. /*
  9785. * This TLV is (optionally) followed by other TLVs:
  9786. * A_UINT32 vdev_id_bitmap[];
  9787. * This array is present and non-zero length in MLO case, stats should
  9788. * only be cleared for the VDEVs in vdev_id_bitmap in the bitmap when
  9789. * it is present.
  9790. * wmi_mac_addr mld_macaddr[];
  9791. * This array is present and non-zero length in MLO case, stats should
  9792. * only be cleared for the peers with the MLD MAC addresses specified
  9793. * in the array.
  9794. */
  9795. } wmi_clear_link_stats_cmd_fixed_param;
  9796. /* Link Stats configuration params. Trigger the link layer statistics collection*/
  9797. typedef struct {
  9798. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
  9799. /** threshold to classify the pkts as short or long */
  9800. A_UINT32 mpdu_size_threshold;
  9801. /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
  9802. A_UINT32 aggressive_statistics_gathering;
  9803. } wmi_start_link_stats_cmd_fixed_param;
  9804. typedef struct {
  9805. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
  9806. /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  9807. A_UINT32 stats_type;
  9808. /** unique id identifying the VDEV, generated by the caller */
  9809. A_UINT32 vdev_id;
  9810. /** unique id identifying the request, generated by the caller */
  9811. A_UINT32 request_id;
  9812. /** peer MAC address */
  9813. wmi_mac_addr peer_macaddr;
  9814. /*
  9815. * This TLV is (optionally) followed by other TLVs:
  9816. * A_UINT32 vdev_id_bitmap[];
  9817. * This array is present and non-zero length in MLO case, stats should only
  9818. * be provided from the vdev_id_bitmap in the bitmap when it is present.
  9819. * wmi_mac_addr mld_macaddr[];
  9820. * This array is present and non-zero length in MLO case, stats should only
  9821. * be provided from the peers with the MLD MAC addresses specified
  9822. * in the array.
  9823. */
  9824. } wmi_request_link_stats_cmd_fixed_param;
  9825. typedef struct {
  9826. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unified_request_ll_get_sta_cmd_fixed_param */
  9827. /** Type of stats required. This is a bitmask of WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  9828. A_UINT32 link_stats_type;
  9829. /** unique id identifying the VDEV, generated by the caller */
  9830. A_UINT32 vdev_id;
  9831. /** unique id identifying the request, generated by the caller */
  9832. A_UINT32 request_id;
  9833. /** peer MAC address */
  9834. wmi_mac_addr peer_macaddr;
  9835. /** Type of stats required for get station cmd (see wmi_stats_id enum) */
  9836. A_UINT32 get_sta_stats_id;
  9837. /** 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. */
  9838. A_UINT32 pdev_id;
  9839. /*
  9840. * This TLV is (optionally) followed by other TLVs:
  9841. * A_UINT32 vdev_id_bitmap[];
  9842. * This array is present and non-zero length in MLO case, stats should only
  9843. * be provided from the vdev_id_bitmap in the bitmap when it is present.
  9844. * wmi_mac_addr mld_macaddr[];
  9845. * This array is present and non-zero length in MLO case, stats should only
  9846. * be provided from the peers with the MLD MAC addresses specified
  9847. * in the array.
  9848. */
  9849. } wmi_request_unified_ll_get_sta_cmd_fixed_param;
  9850. #define WLM_STATS_REQ_LINK 0x00000001
  9851. typedef struct {
  9852. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param */
  9853. /** unique id identifying the VDEV, generated by the caller */
  9854. A_UINT32 vdev_id;
  9855. /** WLM event request bitmask
  9856. * Used by host to customize the wlm stats report.
  9857. * Filled with a combination of WLM_STATS_xxx values.
  9858. */
  9859. A_UINT32 request_bitmask;
  9860. } wmi_request_wlm_stats_cmd_fixed_param;
  9861. /* channel statistics */
  9862. typedef struct {
  9863. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
  9864. /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
  9865. A_UINT32 channel_width;
  9866. /** Primary 20 MHz channel */
  9867. A_UINT32 center_freq;
  9868. /** center frequency (MHz) first segment */
  9869. A_UINT32 center_freq0;
  9870. /** center frequency (MHz) second segment */
  9871. A_UINT32 center_freq1;
  9872. /** msecs the radio is awake (32 bits number accruing over time) */
  9873. A_UINT32 radio_awake_time;
  9874. /** msecs the CCA register is busy (32 bits number accruing over time)
  9875. * Includes rx_time but not tx_time.
  9876. */
  9877. A_UINT32 cca_busy_time;
  9878. /** msecs the radio is transmitting (32 bits number accruing over time) */
  9879. A_UINT32 tx_time;
  9880. /** msecs the radio is in active receive (32 bits number accruing over time) */
  9881. A_UINT32 rx_time;
  9882. /*** NOTE ***
  9883. * Be cautious about adding new fields in wmi_channel_stats.
  9884. * STA-centric targets may instantiate many instances of per-channel
  9885. * stats, and consequently may consume a non-trivial amount of on-chip
  9886. * memory for storing the channel stats.
  9887. */
  9888. } wmi_channel_stats;
  9889. /* this structure used for pass vdev id in stats events */
  9890. typedef struct {
  9891. union {
  9892. struct {
  9893. A_UINT32 id : 31, /* the vdev ID */
  9894. validate: 1; /* validate bit, the vdev ID is only valid if this bit set as 1 */
  9895. };
  9896. A_UINT32 vdev_id;
  9897. };
  9898. } wmi_vdev_id_info;
  9899. #define WMI_VDEV_ID_INFO_GET_VDEV_ID(vdev_id_info) WMI_GET_BITS(vdev_id_info, 0, 31)
  9900. #define WMI_VDEV_ID_INFO_SET_VDEV_ID(vdev_id_info, value) WMI_SET_BITS(vdev_id_info, 0, 31, value)
  9901. #define WMI_VDEV_ID_INFO_GET_VALIDATE(vdev_id_info) WMI_GET_BITS(vdev_id_info, 31, 1)
  9902. #define WMI_VDEV_ID_INFO_SET_VALIDATE(vdev_id_info, value) WMI_SET_BITS(vdev_id_info, 31, 1, value)
  9903. typedef struct {
  9904. union {
  9905. struct {
  9906. A_UINT32
  9907. id: 8, /* the vdev ID */
  9908. /* validate:
  9909. * validate bit, the vdev ID (id and link_status) is only valid
  9910. * if this bit set as 1.
  9911. */
  9912. validate: 1,
  9913. /* link_status:
  9914. * 0 -> link inactive
  9915. * 1 -> link active
  9916. */
  9917. link_status: 1,
  9918. reserved:22;
  9919. };
  9920. A_UINT32 vdev_info_word0;
  9921. };
  9922. } wmi_vdev_id_info_v2;
  9923. #define WMI_VDEV_ID_INFO_V2_GET_VDEV_ID(vdev_id_info_v2) WMI_GET_BITS(vdev_id_info_v2, 0, 8)
  9924. #define WMI_VDEV_ID_INFO_V2_SET_VDEV_ID(vdev_id_info_v2, value) WMI_SET_BITS(vdev_id_info_v2, 0, 8, value)
  9925. #define WMI_VDEV_ID_INFO_V2_GET_VALIDATE(vdev_id_info_v2) WMI_GET_BITS(vdev_id_info_v2, 8, 1)
  9926. #define WMI_VDEV_ID_INFO_V2_SET_VALIDATE(vdev_id_info_v2, value) WMI_SET_BITS(vdev_id_info_v2, 8, 1, value)
  9927. #define WMI_VDEV_ID_INFO_V2_GET_LINK_STATUS(vdev_id_info_v2) WMI_GET_BITS(vdev_id_info_v2, 9, 1)
  9928. #define WMI_VDEV_ID_INFO_V2_SET_LINK_STATUS(vdev_id_info_v2, value) WMI_SET_BITS(vdev_id_info_v2, 9, 1, value)
  9929. /*
  9930. * Each step represents 0.5 dB. The starting value is 0 dBm.
  9931. * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
  9932. */
  9933. #define MAX_TPC_LEVELS 64
  9934. /* radio statistics */
  9935. typedef struct {
  9936. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
  9937. /** Wifi radio (if multiple radio supported) */
  9938. A_UINT32 radio_id;
  9939. /** msecs the radio is awake (32 bits number accruing over time) */
  9940. A_UINT32 on_time;
  9941. /** msecs the radio is transmitting (32 bits number accruing over time) */
  9942. A_UINT32 tx_time;
  9943. /** msecs the radio is in active receive (32 bits number accruing over time) */
  9944. A_UINT32 rx_time;
  9945. /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
  9946. A_UINT32 on_time_scan;
  9947. /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
  9948. A_UINT32 on_time_nbd;
  9949. /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
  9950. A_UINT32 on_time_gscan;
  9951. /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
  9952. A_UINT32 on_time_roam_scan;
  9953. /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
  9954. A_UINT32 on_time_pno_scan;
  9955. /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
  9956. A_UINT32 on_time_hs20;
  9957. /** number of channels */
  9958. A_UINT32 num_channels;
  9959. /** tx time per TPC level - DEPRECATED
  9960. * This field is deprecated.
  9961. * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID message.
  9962. */
  9963. A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
  9964. /** msecs the radio is awake due to Host initiated scan (accruing over time) */
  9965. A_UINT32 on_time_host_scan;
  9966. /** msecs the radio is awake due to LPI scan (accruing over time) */
  9967. A_UINT32 on_time_lpi_scan;
  9968. } wmi_radio_link_stats;
  9969. /** tx time per power level statistics */
  9970. typedef struct {
  9971. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */
  9972. /** total number of tx power levels */
  9973. A_UINT32 total_num_tx_power_levels;
  9974. /** number of tx power levels that are carried in this event */
  9975. A_UINT32 num_tx_power_levels;
  9976. /** offset of current stats
  9977. * If ((num_tx_power_levels + power_level_offset)) ==
  9978. * total_num_tx_power_levels)
  9979. * this message completes the report of tx time per power levels.
  9980. * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID messages
  9981. * will be sent by the target to deliver the remainder of the tx time
  9982. * per power level stats.
  9983. */
  9984. A_UINT32 power_level_offset;
  9985. /* radio id for this tx time per power level statistics (if multiple radio supported) */
  9986. A_UINT32 radio_id;
  9987. /** Indicates the vdev id of the stats for MLO stats query */
  9988. wmi_vdev_id_info vdev_id_info;
  9989. /*
  9990. * This TLV will be followed by a TLV containing a variable-length array of
  9991. * A_UINT32 with tx time per power level data
  9992. * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
  9993. * The tx time is in units of milliseconds.
  9994. * The power levels are board-specific values; a board-specific translation
  9995. * has to be applied to determine what actual power corresponds to each
  9996. * power level.
  9997. * Just as the host has a BDF file available, the host should also have
  9998. * a data file available that provides the power level to power translations.
  9999. */
  10000. } wmi_tx_power_level_stats_evt_fixed_param;
  10001. /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
  10002. typedef struct {
  10003. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats_event_fixed_param */
  10004. /** unique id identifying the request, given in the request stats command */
  10005. A_UINT32 request_id;
  10006. /** Number of radios*/
  10007. A_UINT32 num_radio;
  10008. /** more_data will be set depending on the number of radios */
  10009. A_UINT32 more_radio_events;
  10010. /*
  10011. * For the event WMI_RADIO_LINK_STATS_EVENTID = 0x16004,
  10012. * FW may not be able to send all the channels (2 GHz, 5 GHz & 6 GHz)
  10013. * together in one event message, due to buffer size limitations.
  10014. * To avoid this limitation, FW will send multiple events to HOST
  10015. * depending upon the number of channels.
  10016. * If more_channels is set to 0 means FW has indicated all the
  10017. * channels for this radio.
  10018. * If more_channels is set to 1, it indicates FW will send another
  10019. * event having additional channels for the same radio.
  10020. */
  10021. A_UINT32 more_channels;
  10022. /** Indicates the vdev id of the stats for MLO stats query */
  10023. wmi_vdev_id_info vdev_id_info;
  10024. /*
  10025. * This TLV is followed by another TLV of array of bytes
  10026. * size of(struct wmi_radio_link_stats);
  10027. *
  10028. * This TLV is followed by another TLV of array of bytes
  10029. * num_channels * size of(struct wmi_channel_stats)
  10030. */
  10031. } wmi_radio_link_stats_event_fixed_param;
  10032. /* per rate statistics */
  10033. typedef struct {
  10034. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
  10035. /** rate information
  10036. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  10037. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  10038. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  10039. * b'3-b'0 indicate the rate, which is indicated as follows:
  10040. * OFDM : 0: OFDM 48 Mbps
  10041. * 1: OFDM 24 Mbps
  10042. * 2: OFDM 12 Mbps
  10043. * 3: OFDM 6 Mbps
  10044. * 4: OFDM 54 Mbps
  10045. * 5: OFDM 36 Mbps
  10046. * 6: OFDM 18 Mbps
  10047. * 7: OFDM 9 Mbps
  10048. * CCK (pream == 1)
  10049. * 0: CCK 11 Mbps Long
  10050. * 1: CCK 5.5 Mbps Long
  10051. * 2: CCK 2 Mbps Long
  10052. * 3: CCK 1 Mbps Long
  10053. * 4: CCK 11 Mbps Short
  10054. * 5: CCK 5.5 Mbps Short
  10055. * 6: CCK 2 Mbps Short
  10056. * HT/VHT (pream == 2/3)
  10057. * 0..7: MCS0..MCS7 (HT)
  10058. * 0..9: MCS0..MCS9 (VHT)
  10059. */
  10060. A_UINT32 rate;
  10061. /** units of 100 Kbps */
  10062. A_UINT32 bitrate;
  10063. /** number of successfully transmitted data pkts (ACK rcvd) */
  10064. A_UINT32 tx_mpdu;
  10065. /** number of received data pkts */
  10066. A_UINT32 rx_mpdu;
  10067. /** number of data packet losses (no ACK) */
  10068. A_UINT32 mpdu_lost;
  10069. /** total number of data pkt retries */
  10070. A_UINT32 retries;
  10071. /** number of short data pkt retries */
  10072. A_UINT32 retries_short;
  10073. /** number of long data pkt retries */
  10074. A_UINT32 retries_long;
  10075. } wmi_rate_stats;
  10076. typedef struct {
  10077. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
  10078. /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
  10079. A_UINT32 peer_type;
  10080. /** mac address */
  10081. wmi_mac_addr peer_mac_address;
  10082. /** peer wmi_CAPABILITY_XXX */
  10083. A_UINT32 capabilities;
  10084. /** number of rates */
  10085. A_UINT32 num_rates;
  10086. } wmi_peer_link_stats;
  10087. /** PEER statistics (once started) reset and start afresh after each connection */
  10088. typedef struct {
  10089. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
  10090. /** unique id identifying the request, given in the request stats command */
  10091. A_UINT32 request_id;
  10092. /** number of peers accomidated in this particular event */
  10093. A_UINT32 num_peers;
  10094. /** Indicates the fragment number */
  10095. A_UINT32 peer_event_number;
  10096. /** Indicates if there are more peers which will be sent as separate peer_stats event */
  10097. A_UINT32 more_data;
  10098. /** Indicates the vdev id of the stats for MLO stats query */
  10099. wmi_vdev_id_info vdev_id_info;
  10100. /**
  10101. * This TLV is followed by another TLV
  10102. * num_peers * size of(struct wmi_peer_stats)
  10103. * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
  10104. */
  10105. } wmi_peer_stats_event_fixed_param;
  10106. /* per access category statistics */
  10107. typedef struct {
  10108. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
  10109. /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
  10110. A_UINT32 ac_type;
  10111. /** number of successfully transmitted unicast data pkts (ACK rcvd) */
  10112. A_UINT32 tx_mpdu;
  10113. /** number of received unicast mpdus */
  10114. A_UINT32 rx_mpdu;
  10115. /** number of successfully transmitted multicast data packets */
  10116. /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
  10117. A_UINT32 tx_mcast;
  10118. /** number of received multicast data packets */
  10119. A_UINT32 rx_mcast;
  10120. /** number of received unicast a-mpdus */
  10121. A_UINT32 rx_ampdu;
  10122. /** number of transmitted unicast a-mpdus */
  10123. A_UINT32 tx_ampdu;
  10124. /** number of data pkt losses (no ACK) */
  10125. A_UINT32 mpdu_lost;
  10126. /** total number of data pkt retries */
  10127. A_UINT32 retries;
  10128. /** number of short data pkt retries */
  10129. A_UINT32 retries_short;
  10130. /** number of long data pkt retries */
  10131. A_UINT32 retries_long;
  10132. /** data pkt min contention time (usecs) */
  10133. A_UINT32 contention_time_min;
  10134. /** data pkt max contention time (usecs) */
  10135. A_UINT32 contention_time_max;
  10136. /** data pkt avg contention time (usecs) */
  10137. A_UINT32 contention_time_avg;
  10138. /** num of data pkts used for contention statistics */
  10139. A_UINT32 contention_num_samples;
  10140. /** number of pending pkts */
  10141. A_UINT32 tx_pending_msdu;
  10142. } wmi_wmm_ac_stats;
  10143. /* interface statistics */
  10144. typedef struct {
  10145. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
  10146. /** access point beacon received count from connected AP */
  10147. A_UINT32 beacon_rx;
  10148. /** access point mgmt frames received count from connected AP (including Beacon) */
  10149. A_UINT32 mgmt_rx;
  10150. /** action frames received count */
  10151. A_UINT32 mgmt_action_rx;
  10152. /** action frames transmit count */
  10153. A_UINT32 mgmt_action_tx;
  10154. /** access Point Beacon and Management frames RSSI (averaged) */
  10155. A_UINT32 rssi_mgmt;
  10156. /** access Point Data Frames RSSI (averaged) from connected AP */
  10157. A_UINT32 rssi_data;
  10158. /** access Point ACK RSSI (averaged) from connected AP */
  10159. A_UINT32 rssi_ack;
  10160. /** number of peers */
  10161. A_UINT32 num_peers;
  10162. /** Indicates how many peer_stats events will be sent depending on the num_peers. */
  10163. A_UINT32 num_peer_events;
  10164. /** number of ac */
  10165. A_UINT32 num_ac;
  10166. /** Roaming Stat */
  10167. A_UINT32 roam_state;
  10168. /** Average Beacon spread offset is the averaged time delay between TBTT and beacon TSF */
  10169. /** Upper 32 bits of averaged 64 bit beacon spread offset */
  10170. A_UINT32 avg_bcn_spread_offset_high;
  10171. /** Lower 32 bits of averaged 64 bit beacon spread offset */
  10172. A_UINT32 avg_bcn_spread_offset_low;
  10173. /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
  10174. A_UINT32 is_leaky_ap;
  10175. /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
  10176. A_UINT32 avg_rx_frms_leaked;
  10177. /** Rx leak watch window currently in force to minimize data loss because of leaky AP. Rx leak window is the
  10178. time driver waits before shutting down the radio or switching the channel and after receiving an ACK for
  10179. a data frame with PM bit set) */
  10180. A_UINT32 rx_leak_window;
  10181. A_UINT32 tx_rts_succ_cnt;
  10182. A_UINT32 tx_rts_fail_cnt;
  10183. A_UINT32 tx_ppdu_succ_cnt;
  10184. A_UINT32 tx_ppdu_fail_cnt;
  10185. /** msecs the interface is in Connected state (accruing over time) */
  10186. A_UINT32 connected_duration;
  10187. /** msecs the interface is in DisConnected state (accruing over time) */
  10188. A_UINT32 disconnected_duration;
  10189. /** msecs the interface is doing RTT ranging (accruing over time) */
  10190. A_UINT32 rtt_ranging_duration;
  10191. /** msecs the interface is in RTT responder mode (accruing over time) */
  10192. A_UINT32 rtt_responder_duration;
  10193. /** Number of Probes (Tx) sent on the interface (accruing over time) */
  10194. A_UINT32 num_probes_tx;
  10195. /** Number of Beacon misses on this interface (accruing over time) */
  10196. A_UINT32 num_beacon_miss;
  10197. /** time slice duty cycle percentage of this interface */
  10198. A_UINT32 time_slice_duty_cycle;
  10199. /**
  10200. * Current home channel noise floor value report to host
  10201. * Units are dBm, values 0x0000ffff and 0x0 are invalid.
  10202. */
  10203. A_INT32 nf_cal_val;
  10204. } wmi_iface_link_stats;
  10205. typedef enum {
  10206. WMI_OFFLOAD_STATS_TYPE_SOC_BCAST = 0,
  10207. WMI_OFFLOAD_STATS_TYPE_SOC_MCAST = 1,
  10208. WMI_OFFLOAD_STATS_TYPE_SOC_UCAST = 2,
  10209. WMI_OFFLOAD_STATS_TYPE_ARP = 3,
  10210. WMI_OFFLOAD_STATS_TYPE_NS = 4,
  10211. WMI_OFFLOAD_STATS_TYPE_APF_BCAST = 5,
  10212. WMI_OFFLOAD_STATS_TYPE_APF_MCAST = 6,
  10213. WMI_OFFLOAD_STATS_TYPE_APF_UCAST = 7,
  10214. /* Add New offload stat type here */
  10215. WMI_OFFLOAD_STATS_TYPE_MAX,
  10216. } wmi_offload_stats_type;
  10217. typedef struct {
  10218. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_offload_stats */
  10219. /** Type of offload stat. enum wmi_offload_stats_type **/
  10220. A_UINT32 type;
  10221. /** Number of (MSDUs) frames Received **/
  10222. A_UINT32 rx_count;
  10223. /** Number of frames Dropped **/
  10224. A_UINT32 drp_count;
  10225. /** Number of frames for which FW Responded (Valid for ARP and NS only). (or)
  10226. * Number of frames forwarded to Host (Valid for stats type except ARP and NS). **/
  10227. A_UINT32 fwd_count;
  10228. } wmi_iface_offload_stats;
  10229. typedef struct {
  10230. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_powersave_stats */
  10231. /** Total TIM beacon event that wlan ps received **/
  10232. A_UINT32 tot_tim_bcn;
  10233. /** Total error TIM beacon found by wlan ps including no rx in TIM wakeup and TIM event in active state **/
  10234. A_UINT32 tot_err_tim_bcn;
  10235. } wmi_iface_powersave_stats;
  10236. typedef struct {
  10237. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_link_stats */
  10238. /** IPA tx channel 0 buffer hp/tp */
  10239. A_UINT32 wbm2sw_ring_ch0_hp;
  10240. A_UINT32 wbm2sw_ring_ch0_tp;
  10241. /** IPA tx channel 1 buffer hp/tp */
  10242. A_UINT32 wbm2sw_ring_ch1_hp;
  10243. A_UINT32 wbm2sw_ring_ch1_tp;
  10244. /** IPA rx channel 0 buffer hp/tp */
  10245. A_UINT32 reo2sw_ring_ch0_hp;
  10246. A_UINT32 reo2sw_ring_ch0_tp;
  10247. /** IPA rx channel 1 buffer hp/tp */
  10248. A_UINT32 reo2sw_ring_ch1_hp;
  10249. A_UINT32 reo2sw_ring_ch1_tp;
  10250. /** IPA rx channel 0 ring full counter */
  10251. A_UINT32 reo2sw_ch0_producer_full_cnt;
  10252. /** IPA rx channel 1 ring full counter */
  10253. A_UINT32 reo2sw_ch1_producer_full_cnt;
  10254. /** IPA rx path drop feature enable */
  10255. A_UINT32 ipa_drop_enabled;
  10256. /** Counter for IPA rx path switch to drop-enabled state */
  10257. A_UINT32 ipa_switch_to_drop_cnt;
  10258. /** Counter for IPA rx path switch from drop-enabled state to normal state */
  10259. A_UINT32 ipa_switch_from_drop_cnt;
  10260. } wmi_ipa_link_stats;
  10261. typedef struct {
  10262. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_per_mac_stats */
  10263. /** TCL total enqueued packet number */
  10264. A_UINT32 tcl_enqueue_packets;
  10265. /** TCL total discarded packet number during enqueue */
  10266. A_UINT32 tcl_enqueue_discard;
  10267. /** Total tx duration time, usec */
  10268. A_UINT32 total_ppdu_duration_us;
  10269. /** IPA rx no resource debug counter */
  10270. A_UINT32 wmac_no_resource_drop_ppdu_cnt_ix0;
  10271. A_UINT32 wmac_no_resource_drop_ppdu_cnt_ix1;
  10272. A_UINT32 wmac_no_resource_drop_mpdu_cnt_ix0;
  10273. A_UINT32 wmac_no_resource_drop_mpdu_cnt_ix1;
  10274. A_UINT32 wmac_rxdma2reo_producer_full_cnt;
  10275. } wmi_ipa_per_mac_stats;
  10276. /** IPA statistics (once started) reset and start afresh after each connection */
  10277. typedef struct {
  10278. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_link_stats_event_fixed_param */
  10279. /** unique id identifying the request, given in the request stats command */
  10280. A_UINT32 request_id;
  10281. /** number of MACs */
  10282. A_UINT32 num_macs;
  10283. /*
  10284. * This TLV is followed by other TLVs:
  10285. * wmi_ipa_link_stats ipa_link_stats;
  10286. * wmi_ipa_per_mac_stats ipa_per_mac_stats[num_macs];
  10287. */
  10288. } wmi_ipa_link_stats_event_fixed_param;
  10289. /** Interface statistics (once started) reset and start afresh after each connection */
  10290. typedef struct {
  10291. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
  10292. /** unique id identifying the request, given in the request stats command */
  10293. A_UINT32 request_id;
  10294. /** unique id identifying the VDEV, generated by the caller */
  10295. A_UINT32 vdev_id;
  10296. /** Number of offload stats **/
  10297. A_UINT32 num_offload_stats;
  10298. /*
  10299. * This TLV is followed by other TLVs:
  10300. * wmi_iface_link_stats iface_link_stats;
  10301. * num_ac * size of(struct wmi_wmm_ac_stats)
  10302. * wmi_iface_offload_stats iface_offload_stats[num_offload_stats]
  10303. * wmi_iface_powersave_stats iface_powersave_stats[]
  10304. */
  10305. } wmi_iface_link_stats_event_fixed_param;
  10306. typedef struct {
  10307. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param */
  10308. /** bitmask listing which WLM stats are provided.
  10309. * Copied from wlm_stats_cmd_fixed_param.
  10310. * (This field is provided for convenience rather than necessity, since
  10311. * the recipient can directly check which TLV arrays have non-zero length.)
  10312. */
  10313. A_UINT32 request_bitmask;
  10314. /** unique id identifying the VDEV, generated by the caller */
  10315. A_UINT32 vdev_id;
  10316. /**
  10317. * timestamp of event report, in microseconds units
  10318. * This timestamp is for debugging purposes only.
  10319. * It can be used to correlate this WLM stats event data with
  10320. * other WLM information uploaded through other means.
  10321. */
  10322. A_UINT32 timestamp;
  10323. /**
  10324. * Interval between two consecutive WLM stats query requests,
  10325. * in microseconds units.
  10326. * This interval is used for converting the scan_period and pwr_on_period
  10327. * values from within wmi_wlm_link_stats from percentage units to time
  10328. * units.
  10329. */
  10330. A_UINT32 req_interval;
  10331. /*
  10332. * This TLV is followed by an A_UINT32 array TLV carrying an opaque payload.
  10333. */
  10334. } wmi_wlm_stats_event_fixed_param;
  10335. /** Suspend option */
  10336. enum {
  10337. WMI_PDEV_SUSPEND, /* suspend */
  10338. WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
  10339. };
  10340. typedef struct {
  10341. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
  10342. /* suspend option sent to target */
  10343. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  10344. A_UINT32 suspend_opt;
  10345. } wmi_pdev_suspend_cmd_fixed_param;
  10346. typedef struct {
  10347. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
  10348. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  10349. } wmi_pdev_resume_cmd_fixed_param;
  10350. typedef struct {
  10351. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
  10352. A_UINT32 num_vdev_stats; /* number of vdevs */
  10353. } wmi_vdev_rate_stats_event_fixed_param;
  10354. typedef struct {
  10355. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info*/
  10356. A_UINT32 vdevid; /* Id of the wlan vdev*/
  10357. A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted*/
  10358. A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above*/
  10359. A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
  10360. A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
  10361. } wmi_vdev_rate_ht_info;
  10362. typedef struct {
  10363. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param */
  10364. A_UINT32 num_failure_info; /* How many holes on rx aggregation */
  10365. } wmi_rx_aggr_failure_event_fixed_param;
  10366. typedef struct {
  10367. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_wmi_rx_aggr_failure_info */
  10368. A_UINT32 start_seq; /* start sequence number of the hole */
  10369. A_UINT32 end_seq; /* end sequence number of the hole */
  10370. } wmi_rx_aggr_failure_info;
  10371. typedef struct {
  10372. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_request_cmd_fixed_param */
  10373. /** unique id identifying the VDEV, generated by the caller */
  10374. A_UINT32 vdev_id;
  10375. /** peer MAC address */
  10376. wmi_mac_addr peer_macaddr;
  10377. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  10378. /** key index **/
  10379. A_UINT32 key_ix;
  10380. } wmi_peer_tx_pn_request_cmd_fixed_param;
  10381. typedef struct {
  10382. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_pn_request_cmd_fixed_param */
  10383. /** unique id identifying the VDEV, generated by the caller */
  10384. A_UINT32 vdev_id;
  10385. /** peer MAC address */
  10386. wmi_mac_addr peer_macaddr;
  10387. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  10388. /** key index **/
  10389. A_UINT32 key_ix;
  10390. } wmi_peer_rx_pn_request_cmd_fixed_param;
  10391. typedef struct {
  10392. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_response_event_fixed_param */
  10393. /** unique id identifying the VDEV, generated by the caller */
  10394. A_UINT32 vdev_id;
  10395. /** peer MAC address */
  10396. wmi_mac_addr peer_macaddr;
  10397. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  10398. /** Packet Number
  10399. * The PN is provided in little endian order, with bits 7:0 of the PN
  10400. * residing in pn[0].
  10401. * The key_type indirectly specifies the packet number length, and thus
  10402. * how many bytes within pn[] are filled with valid data.
  10403. */
  10404. A_UINT8 pn[16];
  10405. /** key index **/
  10406. A_UINT32 key_ix;
  10407. } wmi_peer_tx_pn_response_event_fixed_param;
  10408. typedef struct {
  10409. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_pn_response_event_fixed_param */
  10410. /** unique id identifying the VDEV, generated by the caller */
  10411. A_UINT32 vdev_id;
  10412. /** peer MAC address */
  10413. wmi_mac_addr peer_macaddr;
  10414. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  10415. A_UINT32 key_idx;
  10416. /** Packet Number
  10417. * The PN is provided in little endian order, with bits 7:0 of the PN
  10418. * residing in pn[0].
  10419. * The key_type indirectly specifies the packet number length, and thus
  10420. * how many bytes within pn[] are filled with valid data.
  10421. */
  10422. A_UINT8 pn[WMI_MAX_PN_LEN];
  10423. } wmi_peer_rx_pn_response_event_fixed_param;
  10424. typedef struct {
  10425. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  10426. wmi_stats_id stats_id;
  10427. /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
  10428. A_UINT32 num_pdev_stats;
  10429. /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
  10430. A_UINT32 num_vdev_stats;
  10431. /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
  10432. A_UINT32 num_peer_stats;
  10433. A_UINT32 num_bcnflt_stats;
  10434. /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
  10435. A_UINT32 num_chan_stats;
  10436. /** number of MIB stats event structures (wmi_mib_stats) */
  10437. A_UINT32 num_mib_stats;
  10438. 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. */
  10439. /** number of beacon stats event structures (wmi_bcn_stats) */
  10440. A_UINT32 num_bcn_stats;
  10441. /** number of extended peer stats event structures (wmi_peer_extd_stats) */
  10442. A_UINT32 num_peer_extd_stats;
  10443. /** number of extd2 peer stats event structures (wmi_peer_extd2_stats) */
  10444. A_UINT32 num_peer_extd2_stats;
  10445. /** last_event
  10446. * The most significant bit is set to 1 to indicate whether the last_event
  10447. * field contains valid data. The least significant bit is set to 1 to
  10448. * indicate this is the final WMI_STATS_EVENT in a series.
  10449. */
  10450. A_UINT32 last_event;
  10451. /** number of extended MIB stats event structures (wmi_mib_extd_stats) */
  10452. A_UINT32 num_mib_extd_stats;
  10453. /** Indicates the vdev id of the stats for MLO stats query */
  10454. wmi_vdev_id_info vdev_id_info;
  10455. /** Indicates the vdev id of the stats for MLO stats query v2 */
  10456. wmi_vdev_id_info_v2 vdev_id_info_v2;
  10457. /* This TLV is followed by another TLV of array of bytes
  10458. * A_UINT8 data[];
  10459. * This data array contains
  10460. * num_pdev_stats * size of(struct wmi_pdev_stats)
  10461. * num_vdev_stats * size of(struct wmi_vdev_stats)
  10462. * num_peer_stats * size of(struct wmi_peer_stats)
  10463. * num_bcnflt_stats * size_of()
  10464. * num_chan_stats * size of(struct wmi_chan_stats)
  10465. * num_mib_stats * size of(struct wmi_mib_stats)
  10466. * num_bcn_stats * size of(struct wmi_bcn_stats)
  10467. */
  10468. /* If WMI_REQUEST_PEER_EXTD_STAT is set in stats_id,
  10469. * the data[] array also contains num_peer_stats * size of wmi_peer_extd_stats
  10470. * following the information elements listed above.
  10471. */
  10472. /* If WMI_REQUEST_MIB_EXTD_STAT is set in stats_id,
  10473. * the data[] array also contains
  10474. * num_mib_extd_stats * size of(struct wmi_mib_extd_stats)
  10475. * following the information elements listed above.
  10476. */
  10477. /* If WMI_REQUEST_PMF_BCN_PROTECT_STAT is set in stats_id, then TLV
  10478. * wmi_pmf_bcn_protect_stats pmf_bcn_protect_stats[]
  10479. * follows the other TLVs
  10480. */
  10481. /* If WMI_REQUEST_VDEV_EXTD_STAT is set in stats_id, then TLV
  10482. * wmi_vdev_extd_stats wmi_vdev_extd_stats[]
  10483. * follows the other TLVs
  10484. */
  10485. /* If WMI_REQUEST_PDEV_EXTD_STAT is set in stats_id, then TLV
  10486. * wmi_pdev_extd_stats wmi_pdev_extd_stats[]
  10487. * follows the other TLVs
  10488. */
  10489. /* If WMI_REQUEST_PDEV_TELEMETRY_STAT is set in stats_id, then TLV
  10490. * wmi_pdev_telemetry_stats wmi_pdev_telemetry_stats[]
  10491. * follows the other TLVs
  10492. */
  10493. } wmi_stats_event_fixed_param;
  10494. /* WLAN channel CCA stats bitmap */
  10495. #define WLAN_STATS_IDLE_TIME_SHIFT 0
  10496. #define WLAN_STATS_IDLE_TIME_TIME 0x00000001
  10497. #define WLAN_STATS_TX_TIME_SHIFT 1
  10498. #define WLAN_STATS_TX_TIME_MASK 0x00000002
  10499. #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
  10500. #define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
  10501. #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
  10502. #define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
  10503. #define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
  10504. #define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
  10505. #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
  10506. #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
  10507. #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
  10508. #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
  10509. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
  10510. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
  10511. /* WLAN peer signal stats bitmap */
  10512. #define WLAN_STATS_PER_CHAIN_SNR_SHIFT 0
  10513. #define WLAN_STATS_PER_CHAIN_SNR_MASK 0x00000001
  10514. #define WLAN_STATS_PER_CHAIN_NF_SHIFT 1
  10515. #define WLAN_STATS_PER_CHAIN_NF_MASK 0x00000002
  10516. /* WLAN TX stats bitmap */
  10517. #define WLAN_STATS_TX_MSDU_CNT_SHIFT 0
  10518. #define WLAN_STATS_TX_MSDU_CNT_MASK 0x00000001
  10519. #define WLAN_STATS_TX_MPDU_CNT_SHIFT 1
  10520. #define WLAN_STATS_TX_MPDU_CNT_MASK 0x00000002
  10521. #define WLAN_STATS_TX_PPDU_CNT_SHIFT 2
  10522. #define WLAN_STATS_TX_PPDU_CNT_MASK 0x00000004
  10523. #define WLAN_STATS_TX_BYTES_SHIFT 3
  10524. #define WLAN_STATS_TX_BYTES_MASK 0x00000008
  10525. #define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT 4
  10526. #define WLAN_STATS_TX_MSDU_DROP_CNT_MASK 0x00000010
  10527. #define WLAN_STATS_TX_DROP_BYTES_SHIFT 5
  10528. #define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000020
  10529. #define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT 6
  10530. #define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK 0x00000040
  10531. #define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT 7
  10532. #define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK 0x00000080
  10533. #define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT 8
  10534. #define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK 0x00000100
  10535. #define WLAN_STATS_TX_MPDU_AGGR_SHIFT 9
  10536. #define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000200
  10537. #define WLAN_STATS_TX_SUCC_MCS_SHIFT 10
  10538. #define WLAN_STATS_TX_SUCC_MCS_MASK 0x00000400
  10539. #define WLAN_STATS_TX_FAIL_MCS_SHIFT 11
  10540. #define WLAN_STATS_TX_FAIL_MCS_MASK 0x00000800
  10541. #define WLAN_STATS_TX_PPDU_DELAY_SHIFT 12
  10542. #define WLAN_STATS_TX_PPDU_DELAY_MASK 0x00001000
  10543. /* WLAN RX stats bitmap */
  10544. #define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT 0
  10545. #define WLAN_STATS_MAC_RX_MPDU_CNT_MASK 0x00000001
  10546. #define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
  10547. #define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
  10548. #define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT 2
  10549. #define WLAN_STATS_PHY_RX_PPDU_CNT_MASK 0x00000004
  10550. #define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
  10551. #define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
  10552. #define WLAN_STATS_RX_DISORDER_CNT_SHIFT 4
  10553. #define WLAN_STATS_RX_DISORDER_CNT_MASK 0x00000010
  10554. #define WLAN_STATS_RX_MPDU_RETRY_CNT_SHIFT 5
  10555. #define WLAN_STATS_RX_MPDU_RETRY_CNT_MASK 0x00000020
  10556. #define WLAN_STATS_RX_MPDU_DUP_CNT_SHIFT 6
  10557. #define WLAN_STATS_RX_MPDU_DUP_CNT_MASK 0x00000040
  10558. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_SHIFT 7
  10559. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_MASK 0x00000080
  10560. #define WLAN_STATS_RX_MPDU_AGGR_SHIFT 8
  10561. #define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00000100
  10562. #define WLAN_STATS_RX_MCS_SHIFT 9
  10563. #define WLAN_STATS_RX_MCS_MASK 0x00000200
  10564. #define WLAN_STATS_STA_PS_INDS_SHIFT 10
  10565. #define WLAN_STATS_STA_PS_INDS_MASK 0x00000400
  10566. #define WLAN_STATS_STA_PS_DURS_SHIFT 11
  10567. #define WLAN_STATS_STA_PS_DURS_MASK 0x00000800
  10568. #define WLAN_STATS_RX_PROBE_REQS_SHIFT 12
  10569. #define WLAN_STATS_RX_PROBE_REQS_MASK 0x00001000
  10570. #define WLAN_STATS_RX_OTH_MGMTS_SHIFT 13
  10571. #define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00002000
  10572. typedef struct
  10573. {
  10574. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
  10575. A_UINT32 vdev_id;
  10576. /** Percentage of idle time, no TX, no RX, no interference */
  10577. A_UINT32 idle_time;
  10578. /** Percentage of time transmitting packets */
  10579. A_UINT32 tx_time;
  10580. /** Percentage of time receiving packets in current BSSs */
  10581. A_UINT32 rx_in_bss_time;
  10582. /** Percentage of time receiving packets not in current BSSs */
  10583. A_UINT32 rx_out_bss_time;
  10584. /** Percentage of time interference detected. */
  10585. A_UINT32 rx_busy_time;
  10586. /** Percentage of time receiving packets with errors
  10587. * or packets flagged as retransmission or seqnum discontinued. */
  10588. A_UINT32 rx_in_bad_cond_time;
  10589. /** Percentage of time the device transmitted packets that haven't been ACKed. */
  10590. A_UINT32 tx_in_bad_cond_time;
  10591. /** Percentage of time the chip is unable to work in normal conditions. */
  10592. A_UINT32 wlan_not_avail_time;
  10593. } wmi_chan_cca_stats;
  10594. /** Thresholds of cca stats, stands for percentages of stats variation.
  10595. * Check wmi_chan_cca_stats for each stats's meaning.
  10596. */
  10597. typedef struct
  10598. {
  10599. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
  10600. A_UINT32 idle_time; /* units = percent */
  10601. A_UINT32 tx_time; /* units = percent */
  10602. A_UINT32 rx_in_bss_time; /* units = percent */
  10603. A_UINT32 rx_out_bss_time; /* units = percent */
  10604. A_UINT32 rx_busy_time; /* units = percent */
  10605. A_UINT32 rx_in_bad_cond_time; /* units = percent */
  10606. A_UINT32 tx_in_bad_cond_time; /* units = percent */
  10607. A_UINT32 wlan_not_avail_time; /* units = percent */
  10608. } wmi_chan_cca_stats_thresh;
  10609. typedef struct
  10610. {
  10611. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
  10612. A_UINT32 vdev_id;
  10613. A_UINT32 peer_id;
  10614. /** per chain SNR in current bss, units are dB */
  10615. A_INT32 per_chain_snr[WMI_MAX_CHAINS];
  10616. /** per chain background noise, units are dBm */
  10617. A_INT32 per_chain_nf[WMI_MAX_CHAINS];
  10618. /** per antenna rx MPDUs */
  10619. A_UINT32 per_antenna_rx_mpdus[WMI_MAX_CHAINS];
  10620. /** per antenna tx MPDUs */
  10621. A_UINT32 per_antenna_tx_mpdus[WMI_MAX_CHAINS];
  10622. /** num of valid chains for per antenna rx/tx MPDU cnts*/
  10623. A_UINT32 num_chains_valid;
  10624. } wmi_peer_signal_stats;
  10625. /** Thresholds of signal stats, stand for percentage of stats variation.
  10626. * Check wmi_peer_signal_stats for each stats's meaning.
  10627. */
  10628. typedef struct
  10629. {
  10630. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh */
  10631. A_UINT32 per_chain_snr; /* units = dB */
  10632. A_UINT32 per_chain_nf; /* units = dBm */
  10633. } wmi_peer_signal_stats_thresh;
  10634. typedef struct
  10635. {
  10636. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
  10637. /** Number of total TX MSDUs on MAC layer in the period */
  10638. A_UINT32 tx_msdu_cnt;
  10639. /** Number of total TX MPDUs on MAC layer in the period */
  10640. A_UINT32 tx_mpdu_cnt;
  10641. /** Number of total TX PPDUs on MAC layer in the period */
  10642. A_UINT32 tx_ppdu_cnt;
  10643. /** Bytes of tx data on MAC layer in the period */
  10644. A_UINT32 tx_bytes;
  10645. /** Number of TX MSDUs cancelled due to any reason in the period,
  10646. * such as WMM limitation/bandwidth limitation/radio congestion */
  10647. A_UINT32 tx_msdu_drop_cnt;
  10648. /** Bytes of dropped TX packets in the period */
  10649. A_UINT32 tx_drop_bytes;
  10650. /** Number of unacked transmissions of MPDUs */
  10651. A_UINT32 tx_mpdu_retry_cnt;
  10652. /** Number of MPDUs have not been ACKed despite retried */
  10653. A_UINT32 tx_mpdu_fail_cnt;
  10654. /** Number of PPDUs which received no block ack */
  10655. A_UINT32 tx_ppdu_fail_cnt;
  10656. /* This TLV is followed by TLVs below: :
  10657. * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
  10658. * A_UINT32 tx_succ_mcs[tx_succ_mcs_array_len];
  10659. * A_UINT32 tx_fail_mcs[tx_fail_mcs_array_len];
  10660. * A_UINT32 tx_ppdu_delay[tx_ppdu_delay_array_len];
  10661. */
  10662. } wmi_tx_stats;
  10663. /** Thresholds of tx stats, stand for percentage of stats variation.
  10664. * Check wmi_tx_stats for each stats's meaning.
  10665. */
  10666. typedef struct
  10667. {
  10668. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
  10669. A_UINT32 tx_msdu_cnt;
  10670. A_UINT32 tx_mpdu_cnt;
  10671. A_UINT32 tx_ppdu_cnt;
  10672. A_UINT32 tx_bytes;
  10673. A_UINT32 tx_msdu_drop_cnt;
  10674. A_UINT32 tx_drop_bytes;
  10675. A_UINT32 tx_mpdu_retry_cnt;
  10676. A_UINT32 tx_mpdu_fail_cnt;
  10677. A_UINT32 tx_ppdu_fail_cnt;
  10678. A_UINT32 tx_mpdu_aggr;
  10679. A_UINT32 tx_succ_mcs;
  10680. A_UINT32 tx_fail_mcs;
  10681. A_UINT32 tx_ppdu_delay;
  10682. } wmi_tx_stats_thresh;
  10683. typedef struct
  10684. {
  10685. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
  10686. A_UINT32 vdev_id;
  10687. A_UINT32 peer_id;
  10688. /* The TLVs for the 4 AC follows:
  10689. * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
  10690. */
  10691. } wmi_peer_ac_tx_stats;
  10692. typedef struct
  10693. {
  10694. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
  10695. /** Number of RX MPDUs on MAC layer */
  10696. A_UINT32 mac_rx_mpdu_cnt;
  10697. /** Bytes of RX packets on MAC layer */
  10698. A_UINT32 mac_rx_bytes;
  10699. /** Number of RX PPDU on PHY layer */
  10700. A_UINT32 phy_rx_ppdu_cnt;
  10701. /** Bytes of RX packets on PHY layer */
  10702. A_UINT32 phy_rx_bytes;
  10703. /** Number of discontinuity in seqnum */
  10704. A_UINT32 rx_disorder_cnt;
  10705. /** Number of RX MPDUs flagged as retransmissions */
  10706. A_UINT32 rx_mpdu_retry_cnt;
  10707. /** Number of RX MPDUs identified as duplicates */
  10708. A_UINT32 rx_mpdu_dup_cnt;
  10709. /** Number of RX MPDUs discarded */
  10710. A_UINT32 rx_mpdu_discard_cnt;
  10711. /* This TLV is followed by TLVs below:
  10712. * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
  10713. * A_UINT32 rx_mcs[rx_mcs_array_len];
  10714. */
  10715. } wmi_rx_stats;
  10716. /** Thresholds of rx stats, stands for percentage of stats variation.
  10717. * Check wmi_rx_stats for each stats's meaning.
  10718. */
  10719. typedef struct
  10720. {
  10721. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
  10722. A_UINT32 mac_rx_mpdu_cnt;
  10723. A_UINT32 mac_rx_bytes;
  10724. A_UINT32 phy_rx_ppdu_cnt;
  10725. A_UINT32 phy_rx_bytes;
  10726. A_UINT32 rx_disorder_cnt;
  10727. A_UINT32 rx_mpdu_retry_cnt;
  10728. A_UINT32 rx_mpdu_dup_cnt;
  10729. A_UINT32 rx_mpdu_discard_cnt;
  10730. A_UINT32 rx_mpdu_aggr;
  10731. A_UINT32 rx_mcs;
  10732. A_UINT32 sta_ps_inds;
  10733. A_UINT32 sta_ps_durs;
  10734. A_UINT32 rx_probe_reqs;
  10735. A_UINT32 rx_oth_mgmts;
  10736. } wmi_rx_stats_thresh;
  10737. typedef struct
  10738. {
  10739. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
  10740. A_UINT32 vdev_id;
  10741. A_UINT32 peer_id;
  10742. /** How many times STAs go to sleep */
  10743. A_UINT32 sta_ps_inds;
  10744. /** Total sleep time of STAs, milliseconds units */
  10745. A_UINT32 sta_ps_durs;
  10746. /** Number of probe requests received */
  10747. A_UINT32 rx_probe_reqs;
  10748. /** Number of other management frames received, not including probe requests */
  10749. A_UINT32 rx_oth_mgmts;
  10750. /* The TLVs for the 4 AC follows:
  10751. * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
  10752. */
  10753. } wmi_peer_ac_rx_stats;
  10754. typedef struct
  10755. {
  10756. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_period */
  10757. /*
  10758. * This struct provides the timestamps from a low-frequency timer
  10759. * for the start and end of a stats period.
  10760. * Each timestamp is reported twice, with different units.
  10761. * The _msec timestamp is in millisecond units.
  10762. * The _count timestamp is in clock tick units.
  10763. * The timestamp is reported in clock ticks as well as in milliseconds
  10764. * so that if the stats start and end times fall within the same
  10765. * millisecond, the clock tick timestamps can still be used to
  10766. * determine what fraction of a millisecond the stats period occupied.
  10767. */
  10768. A_UINT32 start_low_freq_msec;
  10769. A_UINT32 start_low_freq_count;
  10770. A_UINT32 end_low_freq_msec;
  10771. A_UINT32 end_low_freq_count;
  10772. } wmi_stats_period;
  10773. typedef enum {
  10774. /** Periodic timer timed out, based on the period specified
  10775. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  10776. */
  10777. TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
  10778. /** Any of the (enabled) stats thresholds specified
  10779. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  10780. * within the current stats period.
  10781. */
  10782. TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
  10783. /** In Response to the one-time wlan stats request of
  10784. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  10785. */
  10786. TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
  10787. } wmi_report_stats_event_trigger_cond_id;
  10788. typedef struct
  10789. {
  10790. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_interference */
  10791. /** For cases where a single rx chain has options to be connected to
  10792. * different rx antennas, show which rx antennas were in use during
  10793. * receipt of a given PPDU.
  10794. * This sa_ant_matrix provides a bitmask of the antennas used while
  10795. * receiving this frame.
  10796. */
  10797. A_UINT32 sa_ant_matrix;
  10798. /** Count how many times the hal_rxerr_phy is marked, in this time period.
  10799. * The counter value is reset each period. The host specifies the period
  10800. * via WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD.
  10801. */
  10802. A_UINT32 phyerr_count;
  10803. /** The timestamp at which the WMI event is reported.
  10804. * In targets that have a WBTIMER_1 timer, this timestamp is taken
  10805. * from WBTIMER_1.
  10806. */
  10807. A_UINT32 timestamp;
  10808. } wmi_stats_interference;
  10809. typedef struct {
  10810. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
  10811. /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
  10812. A_UINT32 trigger_cond_id;
  10813. /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
  10814. A_UINT32 cca_chgd_bitmap;
  10815. /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
  10816. A_UINT32 sig_chgd_bitmap;
  10817. /** Bitmap to indicate changed TX counters which exceeded the thresholds */
  10818. A_UINT32 tx_chgd_bitmap;
  10819. /** Bitmap to indicate changed RX counters which exceeded the thresholds */
  10820. A_UINT32 rx_chgd_bitmap;
  10821. /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
  10822. A_UINT32 num_chan_cca_stats;
  10823. /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
  10824. A_UINT32 num_peer_signal_stats;
  10825. /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
  10826. A_UINT32 num_peer_ac_tx_stats;
  10827. /** Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  10828. * The array indicates number of MPDUs sent on specified aggregation size
  10829. * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
  10830. * Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN */
  10831. A_UINT32 tx_mpdu_aggr_array_len;
  10832. /** Array length of tx_succ_mcs[] which is histogram of encoding rate.
  10833. * The array indicates number of acked PPDUs sent at a specific rate */
  10834. A_UINT32 tx_succ_mcs_array_len;
  10835. /** Array length of tx_fail_mcs[] which is histogram of encoding rate.
  10836. * The array indicates number of unacked PPDUs sent at a specific rate */
  10837. A_UINT32 tx_fail_mcs_array_len;
  10838. /** tx_ppdu_delay[]is a histogram of delays on MAC layer.
  10839. * The array counts numbers of PPDUs encountering different TX time delays.
  10840. * TX delay here means time interval between the time a PPDU is queued
  10841. * to the MAC HW for transmission and the time the lower layers of
  10842. * tx FW return a tx status.
  10843. *
  10844. * The bin size tx_ppdu_delay_bin_size_ms specifies how many milliseconds
  10845. * each bin of the tx_ppdu_delay histogram represents.
  10846. * By default the bin size is 10ms.
  10847. * tx_ppdu_delay[0] -> delays between 0-9 ms
  10848. * tx_ppdu_delay[1] -> delays between 10-19 ms
  10849. * ...
  10850. * tx_ppdu_delay[9] -> delays between 90-99 ms
  10851. * tx_ppdu_delay[10] -> delays >= 100 ms
  10852. * Bin size can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS.
  10853. */
  10854. A_UINT32 tx_ppdu_delay_bin_size_ms;
  10855. /** Array length of tx_ppdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN */
  10856. A_UINT32 tx_ppdu_delay_array_len;
  10857. /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
  10858. A_UINT32 num_peer_ac_rx_stats;
  10859. /** Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  10860. * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN */
  10861. A_UINT32 rx_mpdu_aggr_array_len;
  10862. /** Array size of rx_mcs[] which is histogram of encoding rate.
  10863. * The array indicates number of PPDUs received at a specific rate */
  10864. A_UINT32 rx_mcs_array_len;
  10865. /** Array size of stats_period[] which contains several stats periods. */
  10866. A_UINT32 stats_period_array_len;
  10867. /** Indicates the vdev id for MLO case */
  10868. wmi_vdev_id_info vdev_id_info;
  10869. /**
  10870. * This TLV is followed by TLVs below:
  10871. * wmi_chan_cca_stats chan_cca_stats[]; Array length is specified by num_chan_cca_stats
  10872. * wmi_peer_signal_stats peer_signal_stats[]; Array length is specified by num_peer_signal_stats
  10873. * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array length is specified by num_peer_ac_tx_stats
  10874. * 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)
  10875. * A_UINT32 tx_mpdu_aggr[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
  10876. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
  10877. * A_UINT32 tx_succ_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
  10878. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
  10879. * A_UINT32 tx_fail_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
  10880. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
  10881. * A_UINT32 tx_ppdu_delay[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_ppdu_delay_array_len,
  10882. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_ppdu_delay_array_len + tx delay index
  10883. * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array length is specified by num_peer_ac_rx_stats
  10884. * 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)
  10885. * A_UINT32 rx_mpdu_aggr[][][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
  10886. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
  10887. * A_UINT32 rx_mcs[][][]; Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
  10888. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
  10889. * wmi_stats_period stats_period[]; Array length is specified by stats_period_array_len
  10890. * 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.
  10891. **/
  10892. } wmi_report_stats_event_fixed_param;
  10893. typedef struct {
  10894. /** TLV tag and len; tag equals
  10895. * WMITLV_TAG_STRUC_wmi_peer_stats_info */
  10896. A_UINT32 tlv_header;
  10897. /** peer MAC address */
  10898. wmi_mac_addr peer_macaddr;
  10899. /** bytes (size of MPDUs) transmitted to this peer */
  10900. struct {
  10901. /* lower 32 bits of the tx_bytes value */
  10902. A_UINT32 low_32;
  10903. /* upper 32 bits of the tx_bytes value */
  10904. A_UINT32 high_32;
  10905. } tx_bytes;
  10906. /** packets (MSDUs) transmitted to this peer */
  10907. struct {
  10908. /* lower 32 bits of the tx_packets value */
  10909. A_UINT32 low_32;
  10910. /* upper 32 bits of the tx_packets value */
  10911. A_UINT32 high_32;
  10912. } tx_packets;
  10913. /** bytes (size of MPDUs) received from this peer */
  10914. struct {
  10915. /* lower 32 bits of the rx_bytes value */
  10916. A_UINT32 low_32;
  10917. /* upper 32 bits of the rx_bytes value */
  10918. A_UINT32 high_32;
  10919. } rx_bytes;
  10920. /** packets (MSDUs) received from this peer */
  10921. struct {
  10922. /* lower 32 bits of the rx_packets value */
  10923. A_UINT32 low_32;
  10924. /* upper 32 bits of the rx_packets value */
  10925. A_UINT32 high_32;
  10926. } rx_packets;
  10927. /** cumulative retry counts (MPDUs) */
  10928. A_UINT32 tx_retries;
  10929. /** number of failed transmissions (MPDUs) (retries exceeded, no ACK) */
  10930. A_UINT32 tx_failed;
  10931. /** rate information, it is output of WMI_ASSEMBLE_RATECODE_V1
  10932. * (in format of 0x1000RRRR)
  10933. * The rate-code is a 4-bytes field in which,
  10934. * for given rate, nss and preamble
  10935. *
  10936. * b'31-b'29 unused / reserved
  10937. * b'28 indicate the version of rate-code (1 = RATECODE_V1)
  10938. * b'27-b'11 unused / reserved
  10939. * b'10-b'8 indicate the preamble (0 OFDM, 1 CCK, 2 HT, 3 VHT)
  10940. * b'7-b'5 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  10941. * b'4-b'0 indicate the rate, which is indicated as follows:
  10942. * OFDM : 0: OFDM 48 Mbps
  10943. * 1: OFDM 24 Mbps
  10944. * 2: OFDM 12 Mbps
  10945. * 3: OFDM 6 Mbps
  10946. * 4: OFDM 54 Mbps
  10947. * 5: OFDM 36 Mbps
  10948. * 6: OFDM 18 Mbps
  10949. * 7: OFDM 9 Mbps
  10950. * CCK (pream == 1)
  10951. * 0: CCK 11 Mbps Long
  10952. * 1: CCK 5.5 Mbps Long
  10953. * 2: CCK 2 Mbps Long
  10954. * 3: CCK 1 Mbps Long
  10955. * 4: CCK 11 Mbps Short
  10956. * 5: CCK 5.5 Mbps Short
  10957. * 6: CCK 2 Mbps Short
  10958. * HT/VHT (pream == 2/3)
  10959. * 0..7: MCS0..MCS7 (HT)
  10960. * 0..9: MCS0..MCS9 (11AC VHT)
  10961. * 0..11: MCS0..MCS11 (11AX VHT)
  10962. */
  10963. /** rate-code of the last transmission */
  10964. A_UINT32 last_tx_rate_code;
  10965. /** rate-code of the last received PPDU */
  10966. A_UINT32 last_rx_rate_code;
  10967. /** bitrate of the last transmission, in units of kbps */
  10968. A_UINT32 last_tx_bitrate_kbps;
  10969. /** bitrate of the last received PPDU, in units of kbps */
  10970. A_UINT32 last_rx_bitrate_kbps;
  10971. /** combined RSSI of the last received PPDU, in unit of dBm */
  10972. A_INT32 peer_rssi;
  10973. /** number of succeed transmissions (MPDUs) (ACK) */
  10974. A_UINT32 tx_succeed;
  10975. /**
  10976. * The RSSI values are in dBm units, and are exponentially time-averaged.
  10977. * The averaging is performed on the dB values (rather than the linear
  10978. * values).
  10979. */
  10980. A_INT32 peer_rssi_per_chain[WMI_MAX_CHAINS];
  10981. /* show how many elements in the tx_rate_counts array belong to this peer */
  10982. A_UINT32 num_tx_rate_counts;
  10983. /* show how many elements in the rx_rate_counts array belong to this peer */
  10984. A_UINT32 num_rx_rate_counts;
  10985. /* This TLV array is followed by other TLVs:
  10986. * A_UINT32 tx_rate_counts[sum(num_tx_rate_counts)];
  10987. * The above num_tx_rate_counts field shows which elements
  10988. * within the tx_rate_counts array belong to a given peer.
  10989. * Elements tx_rate_counts[0] to tx_rate_counts[N0-1] belong to
  10990. * peer 0, where N0 = peer_stats_info[0].num_tx_rate_counts.
  10991. * Elements tx_rate_counts[N0] to tx_rate_counts[N0+N1-1] belong to
  10992. * peer 1, where N1 = peer_stats_info[1].num_tx_rate_counts.
  10993. * etc.
  10994. * A_UINT32 rx_rate_counts[sum(num_rx_rate_counts)];
  10995. * The above num_rx_rate_counts field shows which elements
  10996. * within the rx_rate_counts array belong to a given peer.
  10997. * Elements rx_rate_counts[0] to rx_rate_counts[N0-1] belong to
  10998. * peer 0, where N0 = peer_stats_info[0].num_rx_rate_counts.
  10999. * Elements rx_rate_counts[N0] to rx_rate_counts[N0+N1-1] belong to
  11000. * peer 1, where N1 = peer_stats_info[1].num_rx_rate_counts.
  11001. * etc.
  11002. */
  11003. } wmi_peer_stats_info;
  11004. typedef struct {
  11005. /** TLV tag and len; tag equals
  11006. * WMITLV_TAG_STRUC_wmi_peer_stats_info_event_fixed_param */
  11007. A_UINT32 tlv_header;
  11008. /** VDEV to which the peers belong to */
  11009. A_UINT32 vdev_id;
  11010. /** number of peers in peer_stats_info[] */
  11011. A_UINT32 num_peers;
  11012. /** flag to indicate if there are more peers which will
  11013. * be sent a following separate peer_stats_info event */
  11014. A_UINT32 more_data;
  11015. /* This TLV is followed by another TLV of array of structs
  11016. * wmi_peer_stats_info peer_stats_info[];
  11017. */
  11018. } wmi_peer_stats_info_event_fixed_param;
  11019. /**
  11020. * WMI arrays of length WMI_MGMT_FRAME_SUBTYPE_MAX use the
  11021. * IEEE802.11 standard's enumeration of mgmt frame subtypes:
  11022. * 0 -> IEEE80211_FC0_SUBTYPE_ASSOC_REQ
  11023. * 1 -> IEEE80211_FC0_SUBTYPE_ASSOC_RESP
  11024. * 2 -> IEEE80211_FC0_SUBTYPE_REASSOC_REQ
  11025. * 3 -> IEEE80211_FC0_SUBTYPE_REASSOC_RESP
  11026. * 4 -> IEEE80211_FC0_SUBTYPE_PROBE_REQ
  11027. * 5 -> IEEE80211_FC0_SUBTYPE_PROBE_RESP
  11028. * 6 -> Reserved
  11029. * 7 -> Reserved
  11030. * 8 -> IEEE80211_FC0_SUBTYPE_BEACON
  11031. * 9 -> IEEE80211_FC0_SUBTYPE_ATIM
  11032. * 10 -> IEEE80211_FC0_SUBTYPE_DISASSOC
  11033. * 11 -> IEEE80211_FC0_SUBTYPE_AUTH
  11034. * 12 -> IEEE80211_FC0_SUBTYPE_DEAUTH
  11035. * 13 -> IEEE80211_FCO_SUBTYPE_ACTION
  11036. * 14 -> IEEE80211_FC0_SUBTYPE_ACTION_NOACK
  11037. * 15 -> IEEE80211_FC0_SUBTYPE_RESERVED
  11038. */
  11039. #define WMI_MGMT_FRAME_SUBTYPE_MAX 16
  11040. typedef struct {
  11041. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_pdev_stats_struct*/
  11042. A_UINT32 tlv_header;
  11043. /** pdev_id for identifying the MAC */
  11044. A_UINT32 pdev_id;
  11045. /** counter of how many times this pdev has
  11046. * transmitted each management frame sub-type */
  11047. A_UINT32 tx_mgmt_subtype[WMI_MGMT_FRAME_SUBTYPE_MAX];
  11048. /** counter of how many times this pdev has
  11049. * received each management frame sub-type */
  11050. A_UINT32 rx_mgmt_subtype[WMI_MGMT_FRAME_SUBTYPE_MAX];
  11051. /** scan fail dfs violation time in ms */
  11052. A_UINT32 scan_fail_dfs_violation_time_ms;
  11053. /** NOL check failed latest channel frequency in MHz */
  11054. A_UINT32 nol_check_fail_last_chan_freq;
  11055. /** NOL check failed timestamp in ms */
  11056. A_UINT32 nol_check_fail_time_stamp_ms;
  11057. /** total peer create count */
  11058. A_UINT32 total_peer_create_cnt;
  11059. /** total peer delete count */
  11060. A_UINT32 total_peer_delete_cnt;
  11061. /** total peer delete response count */
  11062. A_UINT32 total_peer_delete_resp_cnt;
  11063. /** sched algo FIFO full count */
  11064. A_UINT32 vdev_pause_fail_rt_to_sched_algo_fifo_full_cnt;
  11065. /** total number of qos null tx frame queued over WMI */
  11066. A_UINT32 qos_null_tx_over_wmi;
  11067. /** total qos null tx frame completion received count */
  11068. A_UINT32 qos_null_tx_send_compl_over_wmi;
  11069. /** total event alloc failure count for qos null tx send */
  11070. A_UINT32 qos_null_tx_send_event_alloc_failed;
  11071. /** wlan_pdev fields num_macs, vdev_up_count and vdev_active_count
  11072. * num_macs_phy_vdev_up_active:
  11073. * This word contains the following bitfields:
  11074. * number of macs from wlan_pdev
  11075. * (WMI_PDEV_STATS_NUM_MACS_SET,GET)
  11076. * number of vdev up count
  11077. * (WMI_PDEV_STATS_VDEV_UP_CNT_SET,GET)
  11078. * number of vdev active count
  11079. * (WMI_PDEV_STATS_VDEV_UP_CNT_SET,GET)
  11080. */
  11081. A_UINT32 opaque_debug_num_macs_phy_vdev_up_active;
  11082. /** refer wlan_pdev ic flags */
  11083. A_UINT32 opaque_debug_ic_flags;
  11084. /** vdev_id that are paused per pdev */
  11085. A_UINT32 opaque_debug_paused_ap_vdev_bitmap;
  11086. /** opaque_debug_flags:
  11087. * refer to WLAN_PS_DESC_BIN_HWM_HIT or WLAN_PS_DESC_BIN_LWM_HIT
  11088. */
  11089. A_UINT32 opaque_debug_flags;
  11090. /** wlan_pdev fields remote_peer_cnt, max_rf_chains_2G and max_rf_chains_5G
  11091. * remote_peer_cnt_max_rf_chains_2G_5G:
  11092. * This word contains the following bitfields:
  11093. * max chains supported in the 2.4 GHz band
  11094. * (WMI_PDEV_STATS_MAX_RF_CHAIN_2G_SET,GET)
  11095. * max chains supported in the 5 GHz band,
  11096. * (WMI_PDEV_STATS_MAX_RF_CHAIN_5G_SET,GET)
  11097. * number of remote peers
  11098. * (WMI_PDEV_STATS_REMOTE_PEER_CNT_SET,GET)
  11099. */
  11100. A_UINT32 opaque_debug_remote_peer_cnt_max_rf_chains_2G_5G;
  11101. /** wlan_pdev max HT Capability info, WMI_HT_CAP defines */
  11102. A_UINT32 opaque_debug_max_ht_cap_info;
  11103. /** wlan_pdev max VHT capability info, WMI_VHT_CAP defines */
  11104. A_UINT32 opaque_debug_max_vht_cap_info;
  11105. /** opaque_debug_max_vht_supp_mcs:
  11106. * wlan_pdev max VHT Supported MCS which is
  11107. * vht_supp_mcs_2G or vht_supp_mcs_5G
  11108. */
  11109. A_UINT32 opaque_debug_max_vht_supp_mcs;
  11110. /** wlan_pdev max HE capability info, WMI_HE_CAP defines */
  11111. A_UINT32 opaque_debug_max_he_cap_info;
  11112. A_UINT32 opaque_debug_max_he_cap_info_ext;
  11113. /** the nominal chain mask for transmit */
  11114. A_UINT32 opaque_debug_tx_chain_mask;
  11115. /** the nominal chain mask for receive */
  11116. A_UINT32 opaque_debug_rx_chain_mask;
  11117. /** opaque_debug_ema_flags:
  11118. * This word contains the following bitfields:
  11119. * ema_flags: ema_max_vap_cnt and ema_max_profile_period from wlan_pdev
  11120. * ema_max_vap_cnt- number of maximum EMA Tx vaps (VAPs having both
  11121. * VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set)
  11122. * (WMI_PDEV_STATS_EMA_MAX_VAP_CNT_SET,GET)
  11123. * ema_max_profile_period - maximum profile periodicity
  11124. * (maximum number of beacons after which VAP profiles repeat)
  11125. * for any EMA VAP on any pdev.
  11126. * (WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_SET,GET)
  11127. */
  11128. A_UINT32 opaque_debug_ema_flags;
  11129. /** wlan_pdev - maximum ML peers supported */
  11130. A_UINT32 opaque_debug_num_ml_peer_entries;
  11131. /** This word contains the following bitfields:
  11132. * wlan_pdev fields - num_max_hw_links, current_chip_id and max_num_chips
  11133. * (related to MLO)
  11134. * Max number of HW links
  11135. * (WMI_PDEV_STATS_NUM_MAX_HW_LINKS_SET,GET)
  11136. * Current Chip Id
  11137. * (WMI_PDEV_STATS_CURRENT_CHIP_ID_SET,GET)
  11138. * Max number of chips
  11139. * (WMI_PDEV_STATS_MAX_NUM_CHIPS_SET,GET)
  11140. */
  11141. A_UINT32 opaque_debug_mlo_flags;
  11142. /** Indicate beacon size in bytes */
  11143. A_UINT32 opaque_debug_large_bcn_size;
  11144. /** proposed by the host value of MSDUQs per each LinkView peer's TID */
  11145. A_UINT32 opaque_debug_num_of_linkview_msduqs_per_tid;
  11146. /** bcn_filter_context variables */
  11147. A_UINT32 opaque_debug_bcns_dropped;
  11148. A_UINT32 opaque_debug_bcns_recvd;
  11149. A_UINT32 opaque_debug_bcns_delivered;
  11150. /** Tids that are paused/unpaused based on module_id */
  11151. A_UINT32 opaque_debug_vdev_all_tid_pause_bitmap;
  11152. /** Tids that are blocked/unblocked based on module_id */
  11153. A_UINT32 opaque_debug_vdev_all_tid_block_bitmap;
  11154. /** wal_pdev rx filter, WAL_RX_FILTER_FLAGS defines */
  11155. A_UINT32 opaque_debug_rx_filter;
  11156. /** This word contains the following bitfields:
  11157. * aggr_nonaggr_retry_th:
  11158. * wal_pdev fields - agg_retry_th and non_agg_retry_th
  11159. * This value holds max retry threshold up to which a Data packet
  11160. * will be retried when ack is not received.
  11161. * agg_retry_th - Threshold value used when aggregation is enabled
  11162. * (WMI_PDEV_STATS_AGG_RETRY_TH_SET,GET)
  11163. * non_agg_retry_th - Threshold value used for non-aggregation.
  11164. * (WMI_PDEV_STATS_NON_AGG_RETRY_TH_SET)
  11165. */
  11166. A_UINT32 opaque_debug_aggr_nonaggr_retry_th;
  11167. /** This word contains the following bitfields:
  11168. * num_max_rx_ba_sessions:
  11169. * Number of rx BA session establised
  11170. * (WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_SET,GET)
  11171. * Max number of rx BA session from wal_pdev
  11172. * (WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_SET,GET)
  11173. */
  11174. A_UINT32 opaque_debug_num_max_rx_ba_sessions;
  11175. /** It holds WHAL_CHANNEL_SWITCH_FLAGS values */
  11176. A_UINT32 opaque_debug_chan_switch_flags;
  11177. /** reset_cause holds PDEV_RESET_CONSEC_FAILURE or PDEV_RESET_TXQ_TIMEOUT */
  11178. A_UINT32 opaque_debug_consecutive_failure_reset_cause;
  11179. /** PPDU duration limit, in us */
  11180. A_UINT32 opaque_debug_mu_ppdu_dur_limit_us;
  11181. /** pdev reset in progress */
  11182. A_UINT32 opaque_debug_reset_in_progress;
  11183. /** wal_dev - vdev_migrate_state refer to WAL_VDEV_MIGRATE_STATE */
  11184. A_UINT32 opaque_debug_vdev_migrate_state;
  11185. /** opaque_debug_rts_rc_flag:
  11186. * wal_pdev rts ratecode - this value reflects whatever
  11187. * WMI_PDEV_PARAM_RTS_FIXED_RATE value the host has specified for the pdev.
  11188. */
  11189. A_UINT32 opaque_debug_rts_rc_flag;
  11190. /* Num of peer delete in progress */
  11191. A_UINT32 opaque_debug_num_of_peer_delete_in_progress;
  11192. /** wal_pdev total number of active vdev count */
  11193. A_UINT32 opaque_debug_total_active_vdev_cnt;
  11194. /** wal_pdev - max number of vdevs per pdev */
  11195. A_UINT32 opaque_debug_max_vdevs;
  11196. /* NonOccupancyList(NOL) context */
  11197. A_UINT32 opaque_debug_dfs_nol_count;
  11198. /** NOL timeout in seconds */
  11199. A_UINT32 opaque_debug_dfs_nol_timeout;
  11200. A_UINT32 opaque_debug_dfs_use_nol;
  11201. /** channel availability check mode, refer enum WMI_ADFS_OCAC_MODE */
  11202. A_UINT32 opaque_debug_cac_mode;
  11203. A_UINT32 opaque_debug_dyn_ppdu_dur; /* in ms */
  11204. /** This word contains the following bitfields:
  11205. * wal_pdev home channel info
  11206. * home_chan_mhz_flags:
  11207. * primary channel frequency in mhz
  11208. * (WMI_PDEV_STATS_HOME_CHAN_MHZ_SET,GET)
  11209. * flags to specify other channel attributes
  11210. * (WMI_PDEV_STATS_HOME_CHAN_FLAGS_SET, GET)
  11211. */
  11212. A_UINT32 opaque_debug_home_chan_mhz_flags;
  11213. /** home channel center frequency in MHz */
  11214. A_UINT32 opaque_debug_home_band_center_freq;
  11215. /** home channel phy_mode, refer enum WLAN_PHY_MODE */
  11216. A_UINT32 opaque_debug_home_phy_mode;
  11217. /** This word contains the following bitfields:
  11218. * wal_pdev current channel info
  11219. * cur_chan_mhz_flags:
  11220. * primary channel frequency in mhz
  11221. * (WMI_PDEV_STATS_CUR_CHAN_MHZ_SET,GET)
  11222. * flags to specify other channel attributes
  11223. * (WMI_PDEV_STATS_CUR_CHAN_FLAGS_SET,GET)
  11224. */
  11225. A_UINT32 opaque_debug_cur_chan_mhz_flags;
  11226. /** current channel center frequency in MHz */
  11227. A_UINT32 opaque_debug_cur_band_center_freq;
  11228. /** current channel phy_mode, refer enum WLAN_PHY_MODE */
  11229. A_UINT32 opaque_debug_cur_phy_mode;
  11230. /* Beacon context info */
  11231. A_UINT32 opaque_debug_bcn_q_num_bcns_queued_to_hw;
  11232. /** beacon queue AIFS */
  11233. A_UINT32 opaque_debug_aifs;
  11234. /** beacon queue cwmin */
  11235. A_UINT32 opaque_debug_cwmin;
  11236. /** beacon queue cwmax */
  11237. A_UINT32 opaque_debug_cwmax;
  11238. /** FILS discovery period in TU */
  11239. A_UINT32 opaque_debug_fils_period;
  11240. /** Beacon interval in TU */
  11241. A_UINT32 opaque_debug_beacon_period;
  11242. A_UINT32 opaque_debug_staggered_beacon_intvl;
  11243. /** wal_pdev tx context, refer enum WAL_TX_CTXT_FLAGS */
  11244. A_UINT32 opaque_debug_tx_ctxt_flags;
  11245. /** opaque_debug_burst_mode_pending_isr
  11246. * wal_pdev tx_ctxt fields - burst_mode refer enum WAL_TX_BURST_MODE
  11247. * and pending_isr_status count
  11248. */
  11249. A_UINT32 opaque_debug_burst_mode_pending_isr;
  11250. /** max burst duration from ppdu duration in us */
  11251. A_UINT32 opaque_debug_burst_dur;
  11252. /** counter for tx hw stuck */
  11253. A_UINT32 opaque_debug_tx_hw_stuck_cnt;
  11254. /** counter for tx consecutive lifetime expiry */
  11255. A_UINT32 opaque_debug_consecutive_lifetime_expiries;
  11256. /** wal_pdev rx context, refer enum WAL_RX_CTXT_FLAGS */
  11257. A_UINT32 opaque_debug_rx_ctxt_flags;
  11258. /** wal_pdev fields in rx context for rx_suspend or resume count */
  11259. A_UINT32 opaque_debug_rx_suspend_cnt;
  11260. A_UINT32 opaque_debug_rx_resume_cnt;
  11261. A_UINT32 opaque_debug_rx_pcie_suspend_cnt;
  11262. A_UINT32 opaque_debug_rx_pcie_resume_cnt;
  11263. /** This word contains the following bitfields:
  11264. * wal_pdev fields
  11265. * pdev paused - WMI_PDEV_STATS_PAUSED_SET,GET
  11266. * pdev suspend - WMI_PDEV_STATS_SUSPENDED_SET,GET
  11267. * cac_enabed - MI_PDEV_STATS_CAC_ENABLED_SET,GET
  11268. * monitor VAP present - WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_SET,GET
  11269. * beacon tx mode - WMI_PDEV_STATS_BCN_TX_MODE_SET,GET
  11270. * isTXsuspended - WMI_PDEV_STATS_IS_TXSUSPENDED_SET,GET
  11271. * isSCHEDsuspended - WMI_PDEV_STATS_IS_SCHEDSUSPENDED_SET,GET
  11272. * sched_algo_resume_needed -
  11273. * WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_SET,GET
  11274. * abort_reason - WMI_PDEV_STATS_ABORT_REASON_SET,GET
  11275. * atf_cfg - WMI_PDEV_STATS_ATF_CONFIG_SET,GET
  11276. * Green AP TX chainmask valid - WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_SET,GET
  11277. * Green AP RX chainmask valid - WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_SET,GET
  11278. * Green AP Phy mode valid - WMI_PDEV_STATS_GAP_PHY_MODE_VALID_SET,GET
  11279. * burst_enable - WMI_PDEV_STATS_BURST_ENABLE_SET,GET
  11280. */
  11281. A_UINT32 opaque_debug_wal_pdev_bitfield;
  11282. /** This word contains the following bitfields:
  11283. * gap_phy_mode_freq:
  11284. * When GreenAP is enabled, phy_mode (WMI_PDEV_STATS_GAP_PHY_MODE_SET,GET)
  11285. * and center freq(MHz) (WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_SET,GET)
  11286. * in GAP context is displayed
  11287. */
  11288. A_UINT32 opaque_debug_gap_phy_mode_freq;
  11289. /**
  11290. * The following 5 opaque_debug_reserved_field variables are provided
  11291. * purely for debugging by technicians who have outside knowledge of
  11292. * what kind of values the target has placed into these fields.
  11293. */
  11294. A_UINT32 opaque_debug_reserved_field_1;
  11295. A_UINT32 opaque_debug_reserved_field_2;
  11296. A_UINT32 opaque_debug_reserved_field_3;
  11297. A_UINT32 opaque_debug_reserved_field_4;
  11298. A_UINT32 opaque_debug_reserved_field_5;
  11299. } wmi_ctrl_path_pdev_stats_struct;
  11300. #define WMI_PDEV_STATS_NUM_MACS_GET(flag) \
  11301. WMI_GET_BITS(flag, 0, 8)
  11302. #define WMI_PDEV_STATS_NUM_MACS_SET(flag, val) \
  11303. WMI_SET_BITS(flag, 0, 8, val)
  11304. #define WMI_PDEV_STATS_NUM_PHY_GET(flag) \
  11305. WMI_GET_BITS(flag, 8, 8)
  11306. #define WMI_PDEV_STATS_NUM_PHY_SET(flag, val) \
  11307. WMI_SET_BITS(flag, 8, 8, val)
  11308. #define WMI_PDEV_STATS_VDEV_UP_CNT_GET(flag) \
  11309. WMI_GET_BITS(flag, 16, 8)
  11310. #define WMI_PDEV_STATS_VDEV_UP_CNT_SET(flag, val) \
  11311. WMI_SET_BITS(flag, 16, 8, val)
  11312. #define WMI_PDEV_STATS_VDEV_ACTIVE_CNT_GET(flag) \
  11313. WMI_GET_BITS(flag, 24, 8)
  11314. #define WMI_PDEV_STATS_VDEV_ACTIVE_CNT_SET(flag, val) \
  11315. WMI_SET_BITS(flag, 24, 8, val)
  11316. #define WMI_PDEV_STATS_REMOTE_PEER_CNT_GET(flag) \
  11317. WMI_GET_BITS(flag, 0, 16)
  11318. #define WMI_PDEV_STATS_REMOTE_PEER_CNT_SET(flag, val) \
  11319. WMI_SET_BITS(flag, 0, 16, val)
  11320. #define WMI_PDEV_STATS_MAX_RF_CHAIN_2G_GET(flag) \
  11321. WMI_GET_BITS(flag, 16, 8)
  11322. #define WMI_PDEV_STATS_MAX_RF_CHAIN_2G_SET(flag, val) \
  11323. WMI_SET_BITS(flag, 16, 8, val)
  11324. #define WMI_PDEV_STATS_MAX_RF_CHAIN_5G_GET(flag) \
  11325. WMI_GET_BITS(flag, 24, 8)
  11326. #define WMI_PDEV_STATS_MAX_RF_CHAIN_5G_SET(flag, val) \
  11327. WMI_SET_BITS(flag, 24, 8, val)
  11328. #define WMI_PDEV_STATS_EMA_MAX_VAP_CNT_GET(flag) \
  11329. WMI_GET_BITS(flag, 0, 8 )
  11330. #define WMI_PDEV_STATS_EMA_MAX_VAP_CNT_SET(flag, val) \
  11331. WMI_SET_BITS(flag, 0, 8 , val)
  11332. #define WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_GET(flag) \
  11333. WMI_GET_BITS(flag, 8, 8)
  11334. #define WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_SET(flag, val) \
  11335. WMI_SET_BITS(flag, 8, 8, val)
  11336. #define WMI_PDEV_STATS_NUM_SELF_PEERS_GET(flag) \
  11337. WMI_GET_BITS(flag, 16, 8)
  11338. #define WMI_PDEV_STATS_NUM_SELF_PEERS_SET(flag, val) \
  11339. WMI_SET_BITS(flag, 16, 8, val)
  11340. #define WMI_PDEV_STATS_MAX_ACTIVE_VDEVS_GET(flag) \
  11341. WMI_GET_BITS(flag, 24, 8)
  11342. #define WMI_PDEV_STATS_MAX_ACTIVE_VDEVS_SET(flag, val) \
  11343. WMI_SET_BITS(flag, 24, 8, val)
  11344. #define WMI_PDEV_STATS_NUM_MAX_HW_LINKS_GET(flag) \
  11345. WMI_GET_BITS(flag, 0, 8)
  11346. #define WMI_PDEV_STATS_NUM_MAX_HW_LINKS_SET(flag, val) \
  11347. WMI_SET_BITS(flag, 0, 8, val)
  11348. #define WMI_PDEV_STATS_CURRENT_CHIP_ID_GET(flag) \
  11349. WMI_GET_BITS(flag, 8, 8)
  11350. #define WMI_PDEV_STATS_CURRENT_CHIP_ID_SET(flag, val) \
  11351. WMI_SET_BITS(flag, 8, 8, val)
  11352. #define WMI_PDEV_STATS_MAX_NUM_CHIPS_GET(flag) \
  11353. WMI_GET_BITS(flag, 16, 8)
  11354. #define WMI_PDEV_STATS_MAX_NUM_CHIPS_SET(flag, val) \
  11355. WMI_SET_BITS(flag, 16, 8, val)
  11356. #define WMI_PDEV_STATS_NUM_HOME_CHANS_GET(flag) \
  11357. WMI_GET_BITS(flag, 24, 8)
  11358. #define WMI_PDEV_STATS_NUM_HOME_CHANS_SET(flag, val) \
  11359. WMI_SET_BITS(flag, 24, 8, val)
  11360. #define WMI_PDEV_STATS_AGG_RETRY_TH_GET(flag) \
  11361. WMI_GET_BITS(flag, 0, 8)
  11362. #define WMI_PDEV_STATS_AGG_RETRY_TH_SET(flag, val) \
  11363. WMI_SET_BITS(flag, 0, 8, val)
  11364. #define WMI_PDEV_STATS_NON_AGG_RETRY_TH_GET(flag) \
  11365. WMI_GET_BITS(flag, 8, 8)
  11366. #define WMI_PDEV_STATS_NON_AGG_RETRY_TH_SET(flag, val) \
  11367. WMI_SET_BITS(flag, 8, 8, val)
  11368. #define WMI_PDEV_STATS_MAX_NON_DATA_RETRY_TH_GET(flag) \
  11369. WMI_GET_BITS(flag, 16, 8)
  11370. #define WMI_PDEV_STATS_MAX_NON_DATA_RETRY_TH_SET(flag, val) \
  11371. WMI_SET_BITS(flag, 16, 8, val)
  11372. #define WMI_PDEV_STATS_NUM_CONSECUTIVE_BCN_TX_FILT_GET(flag) \
  11373. WMI_GET_BITS(flag, 24, 8)
  11374. #define WMI_PDEV_STATS_NUM_CONSECUTIVE_BCN_TX_FILT_SET(flag, val) \
  11375. WMI_SET_BITS(flag, 24, 8, val)
  11376. #define WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_GET(flag) \
  11377. WMI_GET_BITS(flag, 0, 16)
  11378. #define WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_SET(flag, val) \
  11379. WMI_SET_BITS(flag, 0, 16, val)
  11380. #define WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_GET(flag) \
  11381. WMI_GET_BITS(flag, 16, 16)
  11382. #define WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_SET(flag, val) \
  11383. WMI_SET_BITS(flag, 16, 16, val)
  11384. #define WMI_PDEV_STATS_PPDU_DUR_LIMIT_US_GET(flag) \
  11385. WMI_GET_BITS(flag, 0, 16)
  11386. #define WMI_PDEV_STATS_PPDU_DUR_LIMIT_US_SET(flag, val) \
  11387. WMI_SET_BITS(flag, 0, 16, val)
  11388. #define WMI_PDEV_STATS_MU_PPDU_DUR_LIMIT_US_GET(flag) \
  11389. WMI_GET_BITS(flag, 16, 16)
  11390. #define WMI_PDEV_STATS_MU_PPDU_DUR_LIMIT_US_SET(flag, val) \
  11391. WMI_SET_BITS(flag, 16, 16, val)
  11392. #define WMI_PDEV_STATS_RTS_RC_FLAGS_GET(flag) \
  11393. WMI_GET_BITS(flag, 0, 8)
  11394. #define WMI_PDEV_STATS_RTS_RC_FLAGS_SET(flag, val) \
  11395. WMI_SET_BITS(flag, 0, 8, val)
  11396. #define WMI_PDEV_STATS_RTS_RC_SET(flag, val) \
  11397. WMI_SET_BITS(flag, 8, 8, val)
  11398. #define WMI_PDEV_STATS_RTS_RC_GET(flag) \
  11399. WMI_GET_BITS(flag, 8, 8)
  11400. #define WMI_PDEV_STATS_GAP_TX_CH_MASK_SET(flag, val) \
  11401. WMI_SET_BITS(flag, 16, 8, val)
  11402. #define WMI_PDEV_STATS_GAP_TX_CH_MASK_GET(flag) \
  11403. WMI_GET_BITS(flag, 16, 8)
  11404. #define WMI_PDEV_STATS_GAP_RX_CH_MASK_SET(flag, val) \
  11405. WMI_SET_BITS(flag, 24, 8, val)
  11406. #define WMI_PDEV_STATS_GAP_RX_CH_MASK_GET(flag) \
  11407. WMI_GET_BITS(flag, 24, 8)
  11408. #define WMI_PDEV_STATS_GAP_PHY_MODE_SET(flag, val) \
  11409. WMI_SET_BITS(flag, 0, 16, val)
  11410. #define WMI_PDEV_STATS_GAP_PHY_MODE_GET(flag) \
  11411. WMI_GET_BITS(flag, 0, 16)
  11412. #define WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_SET(flag, val) \
  11413. WMI_SET_BITS(flag, 16, 16, val)
  11414. #define WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_GET(flag) \
  11415. WMI_GET_BITS(flag, 16, 16)
  11416. #define WMI_PDEV_STATS_CONSECUTIVE_FAILURE_SET(flag, val) \
  11417. WMI_SET_BITS(flag, 0, 16, val)
  11418. #define WMI_PDEV_STATS_CONSECUTIVE_FAILURE_GET(flag) \
  11419. WMI_GET_BITS(flag, 0, 16)
  11420. #define WMI_PDEV_STATS_NUM_FILS_DISC_ENQD_GET(flag) \
  11421. WMI_GET_BITS(flag, 24, 8)
  11422. #define WMI_PDEV_STATS_NUM_FILS_DISC_ENQD_SET(flag, val) \
  11423. WMI_SET_BITS(flag, 24, 8, val)
  11424. #define WMI_PDEV_STATS_RESET_CAUSE_BITMAP_GET(flag) \
  11425. WMI_GET_BITS(flag, 16, 8)
  11426. #define WMI_PDEV_STATS_RESET_CAUSE_BITMAP_SET(flag, val) \
  11427. WMI_SET_BITS(flag, 16, 8, val)
  11428. #define WMI_PDEV_STATS_SWBA_NUM_OF_VDEVS_GET(flag) \
  11429. WMI_GET_BITS(flag, 24, 8)
  11430. #define WMI_PDEV_STATS_SWBA_NUM_OF_VDEVS_SET(flag, val) \
  11431. WMI_SET_BITS(flag, 24, 8, val)
  11432. #define WMI_PDEV_STATS_HOME_CHAN_MHZ_GET(flag) \
  11433. WMI_GET_BITS(flag, 0, 16)
  11434. #define WMI_PDEV_STATS_HOME_CHAN_MHZ_SET(flag, val) \
  11435. WMI_SET_BITS(flag, 0, 16, val)
  11436. #define WMI_PDEV_STATS_HOME_CHAN_FLAGS_GET(flag) \
  11437. WMI_GET_BITS(flag, 16, 16)
  11438. #define WMI_PDEV_STATS_HOME_CHAN_FLAGS_SET(flag, val) \
  11439. WMI_SET_BITS(flag, 16, 16, val)
  11440. #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_1_GET(flag) \
  11441. WMI_GET_BITS(flag, 0, 16)
  11442. #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_1_SET(flag,val) \
  11443. WMI_SET_BITS(flag, 0, 16, val)
  11444. #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_2_GET(flag) \
  11445. WMI_GET_BITS(flag, 16, 16)
  11446. #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_2_SET(flag, val) \
  11447. WMI_SET_BITS(flag, 16, 16, val)
  11448. #define WMI_PDEV_STATS_CUR_CHAN_MHZ_GET(flag) \
  11449. WMI_GET_BITS(flag, 0, 16)
  11450. #define WMI_PDEV_STATS_CUR_CHAN_MHZ_SET(flag, val) \
  11451. WMI_SET_BITS(flag, 0, 16, val)
  11452. #define WMI_PDEV_STATS_CUR_CHAN_FLAGS_GET(flag) \
  11453. WMI_GET_BITS(flag, 16, 16)
  11454. #define WMI_PDEV_STATS_CUR_CHAN_FLAGS_SET(flag, val) \
  11455. WMI_SET_BITS(flag, 16, 16, val)
  11456. #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_1_GET(flag) \
  11457. WMI_GET_BITS(flag, 0, 16)
  11458. #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_1_SET(flag,val) \
  11459. WMI_SET_BITS(flag, 0, 16, val)
  11460. #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_2_GET(flag) \
  11461. WMI_GET_BITS(flag, 16, 16)
  11462. #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_2_SET(flag, val) \
  11463. WMI_SET_BITS(flag, 16, 16, val)
  11464. #define WMI_PDEV_STATS_BURST_MODE_GET(flag) \
  11465. WMI_GET_BITS(flag, 0, 8)
  11466. #define WMI_PDEV_STATS_BURST_MODE_SET(flag, val) \
  11467. WMI_SET_BITS(flag, 0, 8, val)
  11468. #define WMI_PDEV_STATS_PENDING_ISR_STATUS_GET(flag) \
  11469. WMI_GET_BITS(flag, 8, 16)
  11470. #define WMI_PDEV_STATS_PENDING_ISR_STATUS_SET(flag, val) \
  11471. WMI_SET_BITS(flag, 8, 16, val)
  11472. #define WMI_PDEV_STATS_BCN_Q_NUM_GET(flag) \
  11473. WMI_GET_BITS(flag, 0, 8)
  11474. #define WMI_PDEV_STATS_BCN_Q_NUM_SET(flag, val) \
  11475. WMI_SET_BITS(flag, 0, 8, val)
  11476. #define WMI_PDEV_STATS_NUM_BCNS_QUEUED_TO_HW_GET(flag) \
  11477. WMI_GET_BITS(flag, 8, 8)
  11478. #define WMI_PDEV_STATS_NUM_BCNS_QUEUED_TO_HW_SET(flag, val) \
  11479. WMI_SET_BITS(flag, 8, 8, val)
  11480. #define WMI_PDEV_STATS_SWFDA_VDEV_ID_GET(flag) \
  11481. WMI_GET_BITS(flag, 16, 8)
  11482. #define WMI_PDEV_STATS_SWFDA_VDEV_ID_SET(flag, val) \
  11483. WMI_SET_BITS(flag, 16, 8, val)
  11484. #define WMI_PDEV_STATS_ABORT_RESULT_GET(flag) \
  11485. WMI_GET_BITS(flag, 0, 1)
  11486. #define WMI_PDEV_STATS_ABORT_RESULT_SET(flag, val) \
  11487. WMI_SET_BITS(flag, 0, 1, val)
  11488. #define WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_GET(flag) \
  11489. WMI_GET_BITS(flag, 1, 1)
  11490. #define WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_SET(flag, val) \
  11491. WMI_SET_BITS(flag, 1, 1, val)
  11492. #define WMI_PDEV_STATS_ABORT_REASON_GET(flag) \
  11493. WMI_GET_BITS(flag, 2, 3)
  11494. #define WMI_PDEV_STATS_ABORT_REASON_SET(flag, val) \
  11495. WMI_SET_BITS(flag, 2, 3, val)
  11496. #define WMI_PDEV_STATS_IS_TXSUSPENDED_GET(flag) \
  11497. WMI_GET_BITS(flag, 5, 1)
  11498. #define WMI_PDEV_STATS_IS_TXSUSPENDED_SET(flag, val) \
  11499. WMI_SET_BITS(flag, 5, 1, val)
  11500. #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_GET(flag) \
  11501. WMI_GET_BITS(flag, 6, 1)
  11502. #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_SET(flag, val) \
  11503. WMI_SET_BITS(flag, 6, 1, val)
  11504. #define WMI_PDEV_STATS_IS_TXSUSPENDED_WITH_AFC_GET(flag) \
  11505. WMI_GET_BITS(flag, 7, 1)
  11506. #define WMI_PDEV_STATS_IS_TXSUSPENDED_WITH_AFC_SET(flag, val) \
  11507. WMI_SET_BITS(flag, 7, 1, val)
  11508. #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_WITH_AFC_GET(flag) \
  11509. WMI_GET_BITS(flag, 8, 1)
  11510. #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_WITH_AFC_SET(flag, val) \
  11511. WMI_SET_BITS(flag, 8, 1, val)
  11512. #define WMI_PDEV_STATS_SW_RETRY_MPDU_COUNT_TH_GET(flag) \
  11513. WMI_GET_BITS(flag, 9, 1)
  11514. #define WMI_PDEV_STATS_SW_RETRY_MPDU_COUNT_TH_SET(flag, val) \
  11515. WMI_SET_BITS(flag, 9, 1, val)
  11516. #define WMI_PDEV_STATS_SENDBAR_COMPL_IN_PROGRESS_GET(flag) \
  11517. WMI_GET_BITS(flag, 10, 1)
  11518. #define WMI_PDEV_STATS_SENDBAR_COMPL_IN_PROGRESS_SET(flag, val) \
  11519. WMI_SET_BITS(flag, 10, 1, val)
  11520. #define WMI_PDEV_STATS_CAC_ENABLED_GET(flag) \
  11521. WMI_GET_BITS(flag, 11, 1)
  11522. #define WMI_PDEV_STATS_CAC_ENABLED_SET(flag, val) \
  11523. WMI_SET_BITS(flag, 11, 1, val)
  11524. #define WMI_PDEV_STATS_PAUSED_GET(flag) \
  11525. WMI_GET_BITS(flag, 12, 1)
  11526. #define WMI_PDEV_STATS_PAUSED_SET(flag, val) \
  11527. WMI_SET_BITS(flag, 12, 1, val)
  11528. #define WMI_PDEV_STATS_SUSPENDED_GET(flag) \
  11529. WMI_GET_BITS(flag, 13, 1)
  11530. #define WMI_PDEV_STATS_SUSPENDED_SET(flag, val) \
  11531. WMI_SET_BITS(flag, 13, 1, val)
  11532. #define WMI_PDEV_STATS_MAC_COLD_RESET_GET(flag) \
  11533. WMI_GET_BITS(flag, 14, 1)
  11534. #define WMI_PDEV_STATS_MAC_COLD_RESET_SET(flag, val) \
  11535. WMI_SET_BITS(flag, 14, 1, val)
  11536. #define WMI_PDEV_STATS_SAFE_TO_ACCESS_HW_GET(flag) \
  11537. WMI_GET_BITS(flag, 15, 1)
  11538. #define WMI_PDEV_STATS_SAFE_TO_ACCESS_HW_SET(flag, val) \
  11539. WMI_SET_BITS(flag, 15, 1, val)
  11540. #define WMI_PDEV_STATS_STA_PS_STATECHG_ENABLE_GET(flag) \
  11541. WMI_GET_BITS(flag, 16, 1)
  11542. #define WMI_PDEV_STATS_STA_PS_STATECHG_ENABLE_SET(flag, val) \
  11543. WMI_SET_BITS(flag, 16, 1, val)
  11544. #define WMI_PDEV_STATS_WAL_HOST_SCAN_IN_PROGRESS_GET(flag) \
  11545. WMI_GET_BITS(flag, 17, 1)
  11546. #define WMI_PDEV_STATS_WAL_HOST_SCAN_IN_PROGRESS_SET(flag, val) \
  11547. WMI_SET_BITS(flag, 17, 1, val)
  11548. #define WMI_PDEV_STATS_ATF_CONFIG_GET(flag) \
  11549. WMI_GET_BITS(flag, 18, 1)
  11550. #define WMI_PDEV_STATS_ATF_CONFIG_SET(flag, val) \
  11551. WMI_SET_BITS(flag, 18, 1, val)
  11552. #define WMI_PDEV_STATS_EAPOL_AC_OVERRIDE_GET(flag) \
  11553. WMI_GET_BITS(flag, 19, 1)
  11554. #define WMI_PDEV_STATS_EAPOL_AC_OVERRIDE_SET(flag, val) \
  11555. WMI_SET_BITS(flag, 19, 1, val)
  11556. #define WMI_PDEV_STATS_CALC_NEXT_DTIM_CNT_GET(flag) \
  11557. WMI_GET_BITS(flag, 20, 1)
  11558. #define WMI_PDEV_STATS_CALC_NEXT_DTIM_CNT_SET(flag, val) \
  11559. WMI_SET_BITS(flag, 20, 1, val)
  11560. #define WMI_PDEV_STATS_ATF_STRICT_SCH_GET(flag) \
  11561. WMI_GET_BITS(flag, 21, 1)
  11562. #define WMI_PDEV_STATS_ATF_STRICT_SCH_SET(flag, val) \
  11563. WMI_SET_BITS(flag, 21, 1, val)
  11564. #define WMI_PDEV_STATS_BCN_TX_MODE_GET(flag) \
  11565. WMI_GET_BITS(flag, 22, 2)
  11566. #define WMI_PDEV_STATS_BCN_TX_MODE_SET(flag, val) \
  11567. WMI_SET_BITS(flag, 22, 2, val)
  11568. #define WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_GET(flag) \
  11569. WMI_GET_BITS(flag, 24, 1)
  11570. #define WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_SET(flag, val) \
  11571. WMI_SET_BITS(flag, 24, 1, val)
  11572. #define WMI_PDEV_STATS_DYN_BW_GET(flag) \
  11573. WMI_GET_BITS(flag, 25, 1)
  11574. #define WMI_PDEV_STATS_DYN_BW_SET(flag, val) \
  11575. WMI_SET_BITS(flag, 25, 1, val)
  11576. #define WMI_PDEV_STATS_IS_MLO_SUPPORTED_GET(flag) \
  11577. WMI_GET_BITS(flag, 26, 1)
  11578. #define WMI_PDEV_STATS_IS_MLO_SUPPORTED_SET(flag, val) \
  11579. WMI_SET_BITS(flag, 26, 1, val)
  11580. #define WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_GET(flag) \
  11581. WMI_GET_BITS(flag, 27, 1)
  11582. #define WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_SET(flag, val) \
  11583. WMI_SET_BITS(flag, 27, 1, val)
  11584. #define WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_GET(flag) \
  11585. WMI_GET_BITS(flag, 28, 1)
  11586. #define WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_SET(flag, val) \
  11587. WMI_SET_BITS(flag, 28, 1, val)
  11588. #define WMI_PDEV_STATS_GAP_PHY_MODE_VALID_GET(flag) \
  11589. WMI_GET_BITS(flag, 29, 1)
  11590. #define WMI_PDEV_STATS_GAP_PHY_MODE_VALID_SET(flag, val) \
  11591. WMI_SET_BITS(flag, 29, 1, val)
  11592. #define WMI_PDEV_STATS_GAP_CLKGATE_VALID_GET(flag) \
  11593. WMI_GET_BITS(flag, 30, 1)
  11594. #define WMI_PDEV_STATS_GAP_CLKGATE_VALID_SET(flag, val) \
  11595. WMI_SET_BITS(flag, 30, 1, val)
  11596. #define WMI_PDEV_STATS_BURST_ENABLE_GET(flag) \
  11597. WMI_GET_BITS(flag, 31, 1)
  11598. #define WMI_PDEV_STATS_BURST_ENABLE_SET(flag, val) \
  11599. WMI_SET_BITS(flag, 31, 1, val)
  11600. typedef struct {
  11601. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_btcoex_stats_struct*/
  11602. A_UINT32 tlv_header;
  11603. /** pdev_id for identifying the MAC */
  11604. A_UINT32 pdev_id;
  11605. /** Counts the number of BT TX requests */
  11606. A_UINT32 bt_tx_req_cntr;
  11607. /** Counts the number of BT RX requests */
  11608. A_UINT32 bt_rx_req_cntr;
  11609. /** Counts the number of BT requests that got NACKed */
  11610. A_UINT32 bt_req_nack_cntr;
  11611. /** Counts the number of WLAN TX request denied due to scheduled BT activity */
  11612. A_UINT32 wl_tx_req_nack_schd_bt_reason_cntr;
  11613. /** Counts the number of WLAN TX request denied due to current BT activity */
  11614. A_UINT32 wl_tx_req_nack_current_bt_reason_cntr;
  11615. /** Counts the number of WLAN TX request denied due to other WLAN in TX reason */
  11616. A_UINT32 wl_tx_req_nack_other_wlan_tx_reason_cntr;
  11617. /** Counts the number of times the WLAN in TX is aborted after getting ACKed */
  11618. A_UINT32 wl_in_tx_abort_cntr;
  11619. /** Counts the number of Auto Response WLAN TX requests */
  11620. A_UINT32 wl_tx_auto_resp_req_cntr;
  11621. /** Counts the number of ACKed WLAN TX requests */
  11622. A_UINT32 wl_tx_req_ack_cntr;
  11623. /** Counts the number of WLAN TX requests */
  11624. A_UINT32 wl_tx_req_cntr;
  11625. } wmi_ctrl_path_btcoex_stats_struct;
  11626. /* Send diag event based on trigger reasons */
  11627. typedef enum {
  11628. WMI_DIAG_TRIGGER_MIN = 0x1000,
  11629. WMI_DIAG_TRIGGER_HOST_REQUESTED = WMI_DIAG_TRIGGER_MIN,
  11630. WMI_DIAG_TRIGGER_BEACON_MISS,
  11631. WMI_DIAG_TRIGGER_SCAN_FAIL,
  11632. WMI_DIAG_TRIGGER_DISCONNECT,
  11633. WMI_DIAG_TRIGGER_ENTER_BMPS_IMPS_FAIL,
  11634. WMI_DIAG_TRIGGER_BUFFER_FULL,
  11635. WMI_DIAG_TRIGGER_DATA_STALL,
  11636. WMI_DIAG_TRIGGER_TIMER_TRIGGERED,
  11637. WMI_DIAG_TRIGGER_REMOTE_COPY,
  11638. WMI_DIAG_TRIGGER_CAL_FAILURE,
  11639. WMI_DIAG_TRIGGER_FES_BKPRESS_DEV_RESET_IND,
  11640. WMI_DIAG_TRIGGER_MAX,
  11641. } wmi_diag_trigger_e;
  11642. typedef enum {
  11643. WMI_CTRL_PATH_STATS_ARENA_HRAM,
  11644. WMI_CTRL_PATH_STATS_ARENA_HCRAM,
  11645. WMI_CTRL_PATH_STATS_ARENA_HREMOTE,
  11646. WMI_CTRL_PATH_STATS_ARENA_HCREMOTE,
  11647. WMI_CTRL_PATH_STATS_ARENA_REMOTE,
  11648. WMI_CTRL_PATH_STATS_ARENA_SRAM,
  11649. WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX,
  11650. WMI_CTRL_PATH_STATS_ARENA_PAGEABLE,
  11651. WMI_CTRL_PATH_STATS_ARENA_CMEM,
  11652. WMI_CTRL_PATH_STATS_ARENA_TRAM,
  11653. WMI_CTRL_PATH_STATS_ARENA_HWIO,
  11654. WMI_CTRL_PATH_STATS_ARENA_CALDB,
  11655. WMI_CTRL_PATH_STATS_ARENA_M3,
  11656. WMI_CTRL_PATH_STATS_ARENA_ETMREMOTE,
  11657. WMI_CTRL_PATH_STATS_ARENA_M3_DUMP,
  11658. WMI_CTRL_PATH_STATS_ARENA_EMUPHY,
  11659. WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM,
  11660. WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM_AUX,
  11661. WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX_OVERFLOW,
  11662. WMI_CTRL_PATH_STATS_ARENA_AMSS,
  11663. WMI_CTRL_PATH_STATS_ARENA_MLO_SHMEM,
  11664. WMI_CTRL_PATH_STATS_ARENA_MLO_H_SHMEM,
  11665. WMI_CTRL_PATH_STATS_ARENA_MLO_HC_SHMEM,
  11666. WMI_CTRL_PATH_STATS_ARENA_RRI_CMD,
  11667. WMI_CTRL_PATH_STATS_ARENA_SRAM_CLADE,
  11668. WMI_CTRL_PATH_STATS_ARENA_MAX,
  11669. } wmi_ctrl_path_fw_arena_ids;
  11670. /*
  11671. * Used by some hosts to print names of arenas, based on
  11672. * wmi_ctrl_path_fw_arena_ids values specified in
  11673. * wmi_ctrl_path_mem_stats_struct in ctrl_path_stats event msg.
  11674. */
  11675. static INLINE A_UINT8 *wmi_ctrl_path_fw_arena_id_to_name(A_UINT32 arena_id)
  11676. {
  11677. switch(arena_id)
  11678. {
  11679. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HRAM);
  11680. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HCRAM);
  11681. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HREMOTE);
  11682. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HCREMOTE);
  11683. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_REMOTE);
  11684. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM);
  11685. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX);
  11686. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_PAGEABLE);
  11687. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_CMEM);
  11688. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_TRAM);
  11689. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HWIO);
  11690. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_CALDB);
  11691. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_M3);
  11692. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_ETMREMOTE);
  11693. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_M3_DUMP);
  11694. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_EMUPHY);
  11695. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM);
  11696. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM_AUX);
  11697. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX_OVERFLOW);
  11698. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_AMSS);
  11699. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_SHMEM);
  11700. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_H_SHMEM);
  11701. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_HC_SHMEM);
  11702. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_RRI_CMD);
  11703. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_CLADE);
  11704. }
  11705. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_ARENA_UNKNOWN";
  11706. }
  11707. typedef struct {
  11708. /** TLV tag and len; tag equals
  11709. * WMITLV_TAG_STRUC_wmi_ctrl_path_mem_stats_struct */
  11710. A_UINT32 tlv_header;
  11711. A_UINT32 arena_id; /* see wmi_ctrl_path_fw_arena_ids */
  11712. A_UINT32 total_bytes; /* total bytes in each arena */
  11713. A_UINT32 allocated_bytes; /* allocated bytes in each arena */
  11714. } wmi_ctrl_path_mem_stats_struct;
  11715. /* status code of Get stats TWT dialog */
  11716. typedef enum _WMI_GET_STATS_TWT_STATUS_T {
  11717. WMI_GET_STATS_TWT_STATUS_OK, /* Get status TWT dialog successfully completed */
  11718. WMI_GET_STATS_TWT_STATUS_DIALOG_ID_NOT_EXIST,/* TWT dialog ID does not exist */
  11719. WMI_GET_STATS_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  11720. } WMI_GET_STATS_TWT_STATUS_T;
  11721. /* Resp type of ODD command operation */
  11722. typedef enum _WMI_ODD_ADDR_READ_OPTION_TYPE_T {
  11723. WMI_ODD_ADDR_READ_OPTION_TYPE_ADD_ADDR_COMMAND, /* Resp for the command to add/configure address space */
  11724. WMI_ODD_ADDR_READ_OPTION_TYPE_DEL_ADDR_COMMAND, /* Resp for the command to del/reset address space */
  11725. WMI_ODD_ADDR_READ_OPTION_TYPE_DISP_ADDR_COMMAND, /* Resp for the command to display address space */
  11726. WMI_ODD_ADDR_READ_OPTION_TYPE_DISP_VAL_COMMAND, /* Resp for the command to display value at address space */
  11727. } WMI_ODD_ADDR_READ_OPTION_TYPE_T;
  11728. typedef struct {
  11729. /** TLV tag and len; tag equals
  11730. * WMITLV_TAG_STRUC_wmi_ctrl_path_twt_stats_struct */
  11731. A_UINT32 tlv_header;
  11732. A_UINT32 dialog_id; /* TWT dialog ID */
  11733. A_UINT32 status; /* refer to WMI_GET_STATS_TWT_STATUS_T */
  11734. A_UINT32 num_sp_cycles; /* Number of TWT SP's*/
  11735. A_UINT32 avg_sp_dur_us; /* Average SP time */
  11736. A_UINT32 min_sp_dur_us; /* Minimum SP time */
  11737. A_UINT32 max_sp_dur_us; /* Maximum SP time */
  11738. A_UINT32 tx_mpdu_per_sp; /* Average pkts tx per SP */
  11739. A_UINT32 rx_mpdu_per_sp; /* Average pkts rx per SP */
  11740. A_UINT32 tx_bytes_per_sp; /* Average tx bytes per SP */
  11741. A_UINT32 rx_bytes_per_sp; /* Average rx bytes per SP */
  11742. } wmi_ctrl_path_twt_stats_struct;
  11743. #define BMISS_STATS_RSSI_SAMPLE_MAX 10
  11744. typedef struct {
  11745. A_INT32 rssi; /* dBm units */
  11746. A_UINT32 sample_time; /* timestamp from host/target shared qtimer */
  11747. } bmiss_stats_rssi_samples_t;
  11748. typedef struct {
  11749. A_UINT32 num_of_bmiss_sequences; /* number of consecutive bmiss > 2 */
  11750. A_UINT32 num_bitmask_wraparound; /* number of times bitmask wrapped around */
  11751. A_UINT32 num_bcn_hist_lost; /* number of beacons history we have lost */
  11752. } consecutive_bmiss_stats_t;
  11753. typedef struct {
  11754. /** TLV tag and len; tag equals
  11755. * WMITLV_TAG_STRUC_wmi_ctrl_path_bmiss_stats_struct */
  11756. A_UINT32 tlv_header;
  11757. A_UINT32 num_pre_bmiss; /* number of pre_bmiss */
  11758. bmiss_stats_rssi_samples_t rssi_samples[BMISS_STATS_RSSI_SAMPLE_MAX]; /* RSSI samples at pre bmiss*/
  11759. /* rssi_sample_curr_index:
  11760. * index of the element in rssi_samples array containing the oldest sample
  11761. */
  11762. A_UINT32 rssi_sample_curr_index;
  11763. A_UINT32 num_first_bmiss; /* number of first bmiss */
  11764. A_UINT32 num_final_bmiss; /* number of final bmiss */
  11765. A_UINT32 num_null_sent_in_first_bmiss; /* number of null frames sent in first bmiss */
  11766. A_UINT32 num_null_failed_in_first_bmiss; /* number of failed null frames in first bmiss */
  11767. A_UINT32 num_null_sent_in_final_bmiss; /* number of null frames sent in final bmiss */
  11768. A_UINT32 num_null_failed_in_final_bmiss; /* number of failed null frames in final bmiss */
  11769. consecutive_bmiss_stats_t cons_bmiss_stats;
  11770. } wmi_ctrl_path_bmiss_stats_struct;
  11771. typedef enum {
  11772. WMI_CTRL_PATH_STATS_CAL_PROFILE_COLD_BOOT_CAL = 0x0,
  11773. WMI_CTRL_PATH_STATS_CAL_PROFILE_FULL_CHAN_SWITCH = 0x1,
  11774. WMI_CTRL_PATH_STATS_CAL_PROFILE_SCAN_CHAN_SWITCH = 0x2,
  11775. WMI_CTRL_PATH_STATS_CAL_PROFILE_DPD_SPLIT_CAL = 0x3,
  11776. WMI_CTRL_PATH_STATS_CAL_PROFILE_TEMP_TRIGEER_CAL = 0x4,
  11777. WMI_CTRL_PATH_STATS_CAL_PROFILE_POWER_SAVE_WAKE_UP = 0x5,
  11778. WMI_CTRL_PATH_STATS_CAL_PROFILE_TIMER_TRIGGER_CAL = 0x6,
  11779. WMI_CTRL_PATH_STATS_CAL_PROFILE_FTM_TRIGGER_CAL = 0x7,
  11780. WMI_CTRL_PATH_STATS_CAL_PROFILE_AGILE_OR_POWER_DOWN_DTIM = 0x8,
  11781. WMI_CTRL_PATH_STATS_CAL_PROFILE_NOISY_ENV_RXDO = 0x9,
  11782. /* add new cal profiles above this line */
  11783. WMI_CTRL_PATH_STATS_CAL_PROFILE_INVALID = 0x1F
  11784. } wmi_ctrl_path_stats_cal_profile_ids;
  11785. typedef enum {
  11786. WMI_CTRL_PATH_STATS_CAL_TYPE_ADC = 0x0,
  11787. WMI_CTRL_PATH_STATS_CAL_TYPE_DAC = 0x1,
  11788. WMI_CTRL_PATH_STATS_CAL_TYPE_PROCESS = 0x2,
  11789. WMI_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR = 0x3,
  11790. WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO = 0x4,
  11791. WMI_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ = 0x5,
  11792. WMI_CTRL_PATH_STATS_CAL_TYPE_TXLO = 0x6,
  11793. WMI_CTRL_PATH_STATS_CAL_TYPE_TXIQ = 0x7,
  11794. WMI_CTRL_PATH_STATS_CAL_TYPE_RXIQ = 0x8,
  11795. WMI_CTRL_PATH_STATS_CAL_TYPE_IM2 = 0x9,
  11796. WMI_CTRL_PATH_STATS_CAL_TYPE_LNA = 0xa,
  11797. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO = 0xb,
  11798. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ = 0xc,
  11799. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS = 0xd,
  11800. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY = 0xe,
  11801. WMI_CTRL_PATH_STATS_CAL_TYPE_IBF = 0xf,
  11802. WMI_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL = 0x10,
  11803. WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ = 0x11,
  11804. WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM = 0x12,
  11805. WMI_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL = 0x13,
  11806. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ = 0x14,
  11807. WMI_CTRL_PATH_STATS_CAL_TYPE_BWFILTER = 0x15,
  11808. WMI_CTRL_PATH_STATS_CAL_TYPE_PEF = 0x16,
  11809. WMI_CTRL_PATH_STATS_CAL_TYPE_PADROOP = 0x17,
  11810. WMI_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC = 0x18,
  11811. WMI_CTRL_PATH_STATS_CAL_TYPE_RXSPUR = 0x19,
  11812. /* add new cal types above this line */
  11813. WMI_CTRL_PATH_STATS_CAL_TYPE_INVALID = 0xFF
  11814. } wmi_ctrl_path_stats_cal_type_ids;
  11815. typedef enum {
  11816. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_NOISE_FLOOR = 0x0,
  11817. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORYLESS = 0x1,
  11818. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORY = 0x2,
  11819. /* add new periodic cal types above this line */
  11820. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_INVALID = 0xFF
  11821. } wmi_ctrl_path_stats_periodic_cal_type_ids;
  11822. typedef enum {
  11823. WMI_CAL_FAILURE_REASON_ERROR_MIN = 0x0,
  11824. /* DPD failure reasons */
  11825. WMI_CAL_FAILURE_REASON_DPD_NMSE_FAIL = 0x1,
  11826. WMI_CAL_FAILURE_REASON_DPD_SQ_FAIL = 0x2,
  11827. WMI_CAL_FAILURE_REASON_DPD_HW_FAIL = 0x3,
  11828. WMI_CAL_FAILURE_REASON_DPD_EXCESSIVE_RETRY = 0x4,
  11829. /* RXDCO failure reasons */
  11830. WMI_CAL_FAILURE_REASON_RXDCO_HW_CAL_EXCESSIVE_RETRY = 0x5,
  11831. WMI_CAL_FAILURE_REASON_RXDCO_INVALID_HW_CAL = 0x6,
  11832. WMI_CAL_FAILURE_REASON_RXDCO_HW_AND_SWPP_FAILURE = 0x7,
  11833. /* ADC failure reasons */
  11834. WMI_CAL_FAILURE_REASON_TIADC_INVALID_BAND = 0x8,
  11835. /* BWFILTER failure reasons */
  11836. WMI_CAL_FAILURE_REASON_TXBBF = 0x9,
  11837. WMI_CAL_FAILURE_REASON_RXBBF = 0xa,
  11838. /* PKDET failure reasons */
  11839. WMI_CAL_FAILURE_REASON_PKDET = 0xb,
  11840. /* COMBCAL failure reasons */
  11841. WMI_CAL_FAILURE_REASON_COMB = 0xc,
  11842. /* add new cal failure error reasons above this line */
  11843. WMI_CAL_FAILURE_REASON_ERROR_MAX = 0xff,
  11844. } wmi_cal_failure_reason_code;
  11845. /*
  11846. * Used by some hosts to print names of cal profile, based on
  11847. * wmi_ctrl_path_cal_profile_ids values specified in
  11848. * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  11849. */
  11850. static INLINE
  11851. A_UINT8 *wmi_ctrl_path_cal_profile_id_to_name(A_UINT32 cal_profile_id)
  11852. {
  11853. switch (cal_profile_id)
  11854. {
  11855. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_COLD_BOOT_CAL);
  11856. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_FULL_CHAN_SWITCH);
  11857. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_SCAN_CHAN_SWITCH);
  11858. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_DPD_SPLIT_CAL);
  11859. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_TEMP_TRIGEER_CAL);
  11860. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_POWER_SAVE_WAKE_UP);
  11861. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_TIMER_TRIGGER_CAL);
  11862. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_FTM_TRIGGER_CAL);
  11863. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_AGILE_OR_POWER_DOWN_DTIM);
  11864. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_NOISY_ENV_RXDO);
  11865. }
  11866. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_CAL_PROFILE_UNKNOWN";
  11867. }
  11868. /*
  11869. * Used by some hosts to print names of cal type, based on
  11870. * wmi_ctrl_path_cal_type_ids values specified in
  11871. * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  11872. */
  11873. static INLINE A_UINT8 *wmi_ctrl_path_cal_type_id_to_name(A_UINT32 cal_type_id)
  11874. {
  11875. switch (cal_type_id)
  11876. {
  11877. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_ADC);
  11878. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DAC);
  11879. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PROCESS);
  11880. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR);
  11881. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO);
  11882. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ);
  11883. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TXLO);
  11884. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TXIQ);
  11885. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXIQ);
  11886. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_IM2);
  11887. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_LNA);
  11888. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO);
  11889. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ);
  11890. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS);
  11891. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY);
  11892. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_IBF);
  11893. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL);
  11894. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ);
  11895. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM);
  11896. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL);
  11897. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ);
  11898. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_BWFILTER);
  11899. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PEF);
  11900. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PADROOP);
  11901. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC);
  11902. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXSPUR);
  11903. }
  11904. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_CAL_TYPE_UNKNOWN";
  11905. }
  11906. /*
  11907. * Used by some hosts to print names of peridodic cal type, based on
  11908. * wmi_ctrl_path_periodic_cal_type_ids values specified in
  11909. * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  11910. */
  11911. static INLINE A_UINT8 *wmi_ctrl_path_periodic_cal_type_id_to_name(A_UINT32 periodic_cal_type_id)
  11912. {
  11913. switch (periodic_cal_type_id)
  11914. {
  11915. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_NOISE_FLOOR);
  11916. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORYLESS);
  11917. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORY);
  11918. }
  11919. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_UNKNOWN";
  11920. }
  11921. /*
  11922. * Used by some hosts to print names of cal failure reason code, based on
  11923. * wmi_ctrl_path_cal_failure_reason_codes values specified in cal fail event msg
  11924. */
  11925. static INLINE A_UINT8 *wmi_cal_failure_reason_code_to_name(A_UINT32 cal_failure_reason_code)
  11926. {
  11927. switch (cal_failure_reason_code)
  11928. {
  11929. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_ERROR_MIN);
  11930. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_NMSE_FAIL);
  11931. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_SQ_FAIL);
  11932. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_HW_FAIL);
  11933. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_EXCESSIVE_RETRY);
  11934. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_HW_CAL_EXCESSIVE_RETRY);
  11935. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_INVALID_HW_CAL);
  11936. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_HW_AND_SWPP_FAILURE);
  11937. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_TIADC_INVALID_BAND);
  11938. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_TXBBF);
  11939. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXBBF);
  11940. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_PKDET);
  11941. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_COMB);
  11942. }
  11943. return (A_UINT8 *) "WMI_CAL_FAILURE_REASON_UNKNOWN";
  11944. }
  11945. typedef struct {
  11946. /** TLV tag and len; tag equals
  11947. * WMITLV_TAG_STRUC_wmi_ctrl_path_calibration_stats_struct*/
  11948. A_UINT32 tlv_header;
  11949. /** pdev_id for identifying the MAC/PHY */
  11950. A_UINT32 pdev_id;
  11951. /** Bit 0 - 7 : cal type / periodic cal type
  11952. * These bits hold either a wmi_ctrl_path_stats_cal_type_ids
  11953. * value for generic cal (if bit 13 is cleared) or a
  11954. * wmi_ctrl_path_stats_periodic_cal_type_ids value for
  11955. * periodic cal (if bit 13 is set).
  11956. * Signifies the type of calibration
  11957. * cal_type : 8
  11958. * Bit 8 - 12 : These bits hold a wmi_ctrl_path_stats_cal_profile_ids value.
  11959. * Signifies the type of cal profile
  11960. * cal_profile : 5
  11961. * Bit 13 : Signifies whether stats is for generic cal or periodic cal
  11962. * is_cal_periodic : 1
  11963. * 0 -> generic cal
  11964. * 1 -> periodic cal
  11965. * Bit 14 - 31: Reserved for future
  11966. */
  11967. A_UINT32 cal_info;
  11968. A_UINT32 cal_triggered_cnt; /* Count of number of times calibration triggered */
  11969. A_UINT32 cal_fail_cnt; /* Count of number of times calibration failed */
  11970. A_UINT32 cal_fcs_cnt; /* Count of number of times FCS done for cal */
  11971. A_UINT32 cal_fcs_fail_cnt; /* Count of number of times FCS failed for cal */
  11972. } wmi_ctrl_path_calibration_stats_struct;
  11973. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_GET(cal_info) WMI_GET_BITS(cal_info, 0, 8)
  11974. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_SET(cal_info, cal_type) WMI_SET_BITS(cal_info, 0, 8, cal_type)
  11975. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_PROFILE_GET(cal_info) WMI_GET_BITS(cal_info, 8, 5)
  11976. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_PROFILE_SET(cal_info, cal_profile) WMI_SET_BITS(cal_info, 8, 5, cal_profile)
  11977. #define WMI_CTRL_PATH_CALIBRATION_STATS_IS_PERIODIC_CAL_GET(cal_info) WMI_GET_BITS(cal_info, 13, 1)
  11978. #define WMI_CTRL_PATH_CALIBRATION_STATS_IS_PERIODIC_CAL_SET(cal_info, is_periodic) WMI_SET_BITS(cal_info, 13, 1, is_periodic)
  11979. /* 0=20MHz, 1=40MHz, 2=80MHz, 3=160MHz, 4=240MHz, 5=320MHz */
  11980. #define WMI_AWGN_MAX_BW 6
  11981. typedef struct {
  11982. /* TLV tag and len; tag equals
  11983. * WMITLV_TAG_STRUC_wmi_ctrl_path_awgn_stats_struct
  11984. * For 6G FCC test we have to monitor channel interference and switch
  11985. * to non-interference channel.
  11986. * Additive White Gaussian Noise (AWGN) interference detection logic
  11987. * is used to detect interference based upon CCA / BW drop / packet drop.
  11988. * Once AWGN interference is detected, the target sends
  11989. * WMI_DCS_INTERFERENCE_EVENTID to host for channel change/BW change.
  11990. * This stats struct is used to get info about how many times these
  11991. * CCA_Interference/BW_Drop/Pkt_Drop indicators of AWGN occur.
  11992. */
  11993. A_UINT32 tlv_header;
  11994. /*
  11995. * AWGN WMI event sent count
  11996. * This is used to inform how many WMI_DCS_INTERFERENCE_EVENTID have been
  11997. * sent to the host.
  11998. * WMI_DCS_INTERFERENCE_EVENTID is sent whenever one or more of
  11999. * CCA_Int/BW_Drop/Channel_Change(Pkt_Drop) happen.
  12000. */
  12001. A_UINT32 awgn_send_evt_cnt;
  12002. /* AWGN primary int count */
  12003. A_UINT32 awgn_pri_int_cnt;
  12004. /* AWGN secondary int count */
  12005. A_UINT32 awgn_sec_int_cnt;
  12006. /*
  12007. * AWGN pkt drop trigger count
  12008. * This shows how many times the presence of interference on the
  12009. * primary BW has been inferred due to pkt drops.
  12010. * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is
  12011. * interference on Primary Channel.
  12012. */
  12013. A_UINT32 awgn_pkt_drop_trigger_cnt;
  12014. /* awgn pkt drop trigger reset count */
  12015. A_UINT32 awgn_pkt_drop_trigger_reset_cnt;
  12016. /*
  12017. * AWGN bandwidth drop count
  12018. * This is used to inform count for any frame transmitted on lower BW
  12019. * than configured BW.
  12020. * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is BW drop.
  12021. */
  12022. A_UINT32 awgn_bw_drop_cnt;
  12023. /* AWGN bandwidth drop reset count */
  12024. A_UINT32 awgn_bw_drop_reset_cnt;
  12025. /*
  12026. * AWGN CCA int count
  12027. * This is used to inform the interference based on CCA registers.
  12028. * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is CCA
  12029. * interference.
  12030. */
  12031. A_UINT32 awgn_cca_int_cnt;
  12032. /* AWGN cca int reset count */
  12033. A_UINT32 awgn_cca_int_reset_cnt;
  12034. /* AWGN cca ack blk count */
  12035. A_UINT32 awgn_cca_ack_blk_cnt;
  12036. /* AWGN cca ack blk reset count */
  12037. A_UINT32 awgn_cca_ack_reset_cnt;
  12038. /*
  12039. * AWGN int BW cnt used to store interference occurred at 20/40/80/160MHz
  12040. * awgn_int_bw_cnt[0] counts interference detections in 20 MHz BW,
  12041. * awgn_int_bw_cnt[1] counts interference detections in 40 MHz BW,
  12042. * awgn_int_bw_cnt[2] counts interference detections in 80 MHz BW,
  12043. * awgn_int_bw_cnt[3] counts interference detections in 160 MHz BW,
  12044. * awgn_int_bw_cnt[4] is reserved for 240 MHz BW,
  12045. * awgn_int_bw_cnt[5] counts interference detections in 320 MHz BW.
  12046. */
  12047. A_UINT32 awgn_int_bw_cnt[WMI_AWGN_MAX_BW];
  12048. /* Number of OBSS interference occurred */
  12049. A_UINT32 obss_int_cnt;
  12050. /* Number of OBSS interference Sent to host */
  12051. A_UINT32 obss_int_evt_sent_host_cnt;
  12052. /* Number of OBSS interference skiped due to AWGN as high priority */
  12053. A_UINT32 obss_int_evt_skip_awgn_cnt;
  12054. /* Number of OBSS interference skiped due to duplicate OBSS interference */
  12055. A_UINT32 obss_int_evt_skip_dup_cnt;
  12056. /* Current OBSS interference segment details
  12057. * chan_bw_interference_bitmap:
  12058. * Indicates which 20MHz segments contain interference
  12059. * 320 MHz: bits 0-15
  12060. * 160 MHz: bits 0-7
  12061. * 80 MHz: bits 0-3
  12062. * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
  12063. * second lowest 20Mhz and so on.
  12064. * Each bit position will indicate 20MHz in which interference is seen.
  12065. * (Valid 16 bits out of 32 bit integer)
  12066. */
  12067. A_UINT32 obss_int_cur_int_seg;
  12068. /* Previous OBSS Int Segment details
  12069. * chan_bw_interference_bitmap:
  12070. * Indicates which 20MHz segments contain interference
  12071. * 320 MHz: bits 0-15
  12072. * 160 MHz: bits 0-7
  12073. * 80 MHz: bits 0-3
  12074. * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
  12075. * second lowest 20Mhz and so on.
  12076. * Each bit position will indicate 20MHz in which interference is seen.
  12077. * (Valid 16 bits out of 32 bit integer)
  12078. */
  12079. A_UINT32 obss_int_prv_int_seg;
  12080. /*
  12081. * OBSS int BW cnt used to store interference occurred at 20/40/80/160MHz
  12082. * obss_int_bw_cnt[0] counts interference detections in 20 MHz BW,
  12083. * obss_int_bw_cnt[1] counts interference detections in 40 MHz BW,
  12084. * obss_int_bw_cnt[2] counts interference detections in 80 MHz BW,
  12085. * obss_int_bw_cnt[3] counts interference detections in 160 MHz BW,
  12086. * obss_int_bw_cnt[4] counts interference detections in 240 MHz BW,
  12087. * obss_int_bw_cnt[5] counts interference detections in 320 MHz BW,
  12088. */
  12089. A_UINT32 obss_int_bw_cnt[WMI_AWGN_MAX_BW];
  12090. } wmi_ctrl_path_awgn_stats_struct;
  12091. typedef struct {
  12092. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_dfs_channel_stats_struct*/
  12093. A_UINT32 tlv_header;
  12094. /** pdev_id for identifying the PHY */
  12095. A_UINT32 pdev_id;
  12096. /** nol element num */
  12097. A_UINT32 nol;
  12098. /** Channel in MHz */
  12099. A_UINT32 channel;
  12100. /** Channel width in MHz */
  12101. A_UINT32 chwidth;
  12102. /** Time left for the channel to remain in NOL list (in seconds) */
  12103. A_UINT32 timeleft;
  12104. } wmi_ctrl_path_dfs_channel_stats_struct;
  12105. typedef struct {
  12106. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_odd_addr_read_struct*/
  12107. A_UINT32 tlv_header;
  12108. /* resp_type:
  12109. * Response type for each sub option:
  12110. * Add address space, display address, display data, delete address space.
  12111. * Refer to WMI_ODD_ADDR_READ_OPTION_TYPE_T.
  12112. */
  12113. A_UINT32 resp_type;
  12114. /* User configured Entry id */
  12115. A_UINT32 entry_id;
  12116. /* address:
  12117. * User configured Address Space.
  12118. * Any unused elements will be filled with 0x0.
  12119. */
  12120. A_UINT32 address[WMI_MAX_ADDRESS_SPACE];
  12121. /* data
  12122. * Data/Value at the User configured Address Space.
  12123. * Any unused elements will be filled with 0x0.
  12124. */
  12125. A_UINT32 data[WMI_MAX_ADDRESS_SPACE];
  12126. /* Status of the operation performed: 0 = failure, 1 = success */
  12127. A_UINT32 is_success;
  12128. } wmi_ctrl_path_odd_addr_read_struct;
  12129. /*
  12130. * The wmi_ctrl_path_afc_stats_struct is used to send AFC stats within
  12131. * the WMI_CTRL_PATH_STATS_EVENT message, in response to a
  12132. * WMI_REQUEST_CTRL_PATH_STATS_CMD message for the stat type
  12133. * WMI_REQUEST_CTRL_PATH_AFC_STAT.
  12134. */
  12135. typedef struct {
  12136. /* TLV tag and len; tag equals
  12137. * WMITLV_TAG_STRUC_wmi_ctrl_path_afc_stats_struct */
  12138. A_UINT32 tlv_header;
  12139. A_UINT32 pdev_id; /* pdev_id for identifying the MAC/PHY */
  12140. /* Count of new request ID every time it is generated */
  12141. A_UINT32 request_id_count;
  12142. /* Count of total number of AFC payload received */
  12143. A_UINT32 response_count;
  12144. /* Count of total number of invalid AFC response */
  12145. A_UINT32 invalid_response_count;
  12146. /* Count of total number of AFC resets received */
  12147. A_UINT32 reset_count;
  12148. /* AFC Response error counters*/
  12149. /*
  12150. * Count of total number of incorrect payload received due to
  12151. * request ID and response
  12152. * Increments when request ID doesn't match with response.
  12153. */
  12154. A_UINT32 id_mismatch_count;
  12155. /*
  12156. * Count of total number of "local_error_code" success event
  12157. * received as part of the AFC response payload in the below struct
  12158. * "afc_spectrum_inquiry_resp_bin_type"
  12159. */
  12160. A_UINT32 local_err_code_success;
  12161. /*
  12162. * Count of total number of "local_error_code" failure event
  12163. * received as part of the AFC response payload in the below struct
  12164. * "afc_spectrum_inquiry_resp_bin_type"
  12165. */
  12166. A_UINT32 local_err_code_failure;
  12167. /*
  12168. * The below fields are used to denote the count of
  12169. * different server response code received in "afc_serv_resp_code"
  12170. * received as part of "afc_spectrum_inquiry_resp_bin_type"
  12171. * These resp codes are as per the WFA spec
  12172. */
  12173. /* afc_serv_resp_code = version not supported */
  12174. A_UINT32 serv_resp_code_100;
  12175. /* afc_serv_resp_code = Device disallowed */
  12176. A_UINT32 serv_resp_code_101;
  12177. /* afc_serv_resp_code = Missing param */
  12178. A_UINT32 serv_resp_code_102;
  12179. /* afc_serv_resp_code = invalid value */
  12180. A_UINT32 serv_resp_code_103;
  12181. /* afc_serv_resp_code = unexpected param */
  12182. A_UINT32 serv_resp_code_106;
  12183. /* afc_serv_resp_code = unsupported spectrum */
  12184. A_UINT32 serv_resp_code_300;
  12185. /*
  12186. * AFC Compliance tracker
  12187. */
  12188. /* proxy_standalone_0
  12189. * This field displays the value of Request ID check disable received
  12190. * as part of the INI knob
  12191. */
  12192. A_UINT32 proxy_standalone_0;
  12193. /* proxy_standalone_1
  12194. * This field displays the value of Timer check disable received
  12195. * as part of the INI knob
  12196. */
  12197. A_UINT32 proxy_standalone_1;
  12198. /* Count of successful power events sent to host */
  12199. A_UINT32 power_event_counter;
  12200. /* Count of total force LPI power mode switch when grace count expires */
  12201. A_UINT32 force_LPI_counter;
  12202. /*
  12203. * Count of total number of successful host set
  12204. * TPC command received within the compliance timer
  12205. */
  12206. A_UINT32 tpc_wmi_success_count;
  12207. /*
  12208. * Count of total number of failed host set
  12209. * TPC command. This is incremented when compliance timer expires
  12210. */
  12211. A_UINT32 tpc_wmi_failure_count;
  12212. /*
  12213. * These counters are incremented as part of the
  12214. * Regulatory Compliance check done on the AFC payload
  12215. * received from server
  12216. */
  12217. /* Incorrect PSD value received in freq Obj */
  12218. A_UINT32 psd_failure_count;
  12219. /* Incorrect End freq received in freq Obj */
  12220. A_UINT32 psd_end_freq_failure_count;
  12221. /* Incorrect Start freq received in freq Obj */
  12222. A_UINT32 psd_start_freq_failure_count;
  12223. /* Incorrect EIRP received in channel obj */
  12224. A_UINT32 eirp_failure_count;
  12225. /* Incorrect centre freq channel received in channel obj */
  12226. A_UINT32 cfreq_failure_count;
  12227. /*
  12228. * AFC Current status
  12229. */
  12230. /* Current Request ID */
  12231. A_UINT32 request_id;
  12232. /* grace_timer_count
  12233. * This grace counter increments only after TTL expiry.
  12234. * Cleared to zero once valid payload is received.
  12235. */
  12236. A_UINT32 grace_timer_count;
  12237. /* Current TTL Time in seconds from last valid payload response */
  12238. A_UINT32 cur_ttl_timer;
  12239. /* deployment_mode
  12240. * 6G AP deployment mode denoting indoor or outdoor
  12241. * Indoor = 1, Outdoor = 2
  12242. */
  12243. A_UINT32 deployment_mode;
  12244. /*
  12245. * Proxy mode AFC-Response payload clear count
  12246. */
  12247. A_UINT32 payload_clear_count;
  12248. } wmi_ctrl_path_afc_stats_struct;
  12249. /* AT - Airtime */
  12250. /* AA - Available Airtime */
  12251. #define WMI_PMLO_UL_DL_INBSS_AT_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  12252. #define WMI_PMLO_UL_DL_INBSS_AT_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  12253. #define WMI_PMLO_UL_DL_INBSS_AT_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  12254. #define WMI_PMLO_UL_DL_INBSS_AT_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  12255. #define WMI_PMLO_UL_DL_INBSS_AT_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  12256. #define WMI_PMLO_UL_DL_INBSS_AT_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  12257. #define WMI_PMLO_UL_DL_INBSS_AT_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  12258. #define WMI_PMLO_UL_DL_INBSS_AT_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  12259. #define WMI_PMLO_LINK_OBSS_AT_GET(airtime) WMI_GET_BITS(airtime, 0, 8)
  12260. #define WMI_PMLO_LINK_OBSS_AT_SET(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  12261. #define WMI_PMLO_LINK_AA_GET(airtime) WMI_GET_BITS(airtime, 8, 8)
  12262. #define WMI_PMLO_LINK_AA_SET(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  12263. #define WMI_PMLO_UL_AIRTIME_NON_AC_GET(airtime) WMI_GET_BITS(airtime, 16, 8)
  12264. #define WMI_PMLO_UL_AIRTIME_NON_AC_SET(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  12265. #define WMI_PMLO_DL_AIRTIME_NON_AC_GET(airtime) WMI_GET_BITS(airtime, 24, 8)
  12266. #define WMI_PMLO_DL_AIRTIME_NON_AC_SET(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  12267. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  12268. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  12269. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  12270. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  12271. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  12272. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  12273. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  12274. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  12275. /** Traffic condition used in estimating the available airtime value */
  12276. typedef enum {
  12277. WMI_PDEV_TRAFFIC_LIGHT = 0,
  12278. WMI_PDEV_TRAFFIC_MEDIUM = 1,
  12279. WMI_PDEV_TRAFFIC_HEAVY = 2,
  12280. WMI_PDEV_TRAFFIC_SATURATION = 3,
  12281. WMI_PDEV_TRAFFIC_MEDIUM_AND_OBSS = 4,
  12282. } wmi_pdev_traffic_condition;
  12283. /*
  12284. * The wmi_ctrl_path_pmlo_stats_struct is used to send Provisional MLO stats
  12285. * the WMI_CTRL_PATH_STATS_EVENT message, in response to a
  12286. * WMI_REQUEST_CTRL_PATH_STATS_CMD message for the stat type
  12287. * WMI_REQUEST_CTRL_PATH_PMLO_STAT.
  12288. */
  12289. typedef struct {
  12290. /* TLV tag and len; tag equals
  12291. * WMITLV_TAG_STRUC_wmi_ctrl_path_pmlo_stats_struct */
  12292. A_UINT32 tlv_header;
  12293. /** pdev_id for identifying the PHY */
  12294. A_UINT32 pdev_id;
  12295. /*
  12296. * Percentage of downlink air time used in each access category
  12297. * calculated InBSS, units in percentage.
  12298. * BIT[0-7] : AC_BE
  12299. * BIT[8-15] : AC_BK
  12300. * BIT[16-23] : AC_VI
  12301. * BIT[24-31] : AC_VO
  12302. * Please refer to WMI_PMLO_UL_DL_INBSS_AT_* macros
  12303. * to retrieve values for each access category in dl_inbss_airtime_per_ac.
  12304. */
  12305. union {
  12306. struct {
  12307. A_UINT32
  12308. dl_inbss_airtime_ac_be: 8,
  12309. dl_inbss_airtime_ac_bk: 8,
  12310. dl_inbss_airtime_ac_vi: 8,
  12311. dl_inbss_airtime_ac_vo: 8;
  12312. };
  12313. A_UINT32 dl_inbss_airtime_per_ac;
  12314. };
  12315. /*
  12316. * Percentage of uplink air time used in each access category
  12317. * calculated InBSS, units in percentage.
  12318. * BIT[0-7] : AC_BE
  12319. * BIT[8-15] : AC_BK
  12320. * BIT[16-23] : AC_VI
  12321. * BIT[24-31] : AC_VO
  12322. * Please refer to WMI_PMLO_UL_DL_INBSS_AT_* macros
  12323. * to set/get values for each access category in ul_inbss_airtime_per_ac.
  12324. */
  12325. union {
  12326. struct {
  12327. A_UINT32
  12328. ul_inbss_airtime_ac_be: 8,
  12329. ul_inbss_airtime_ac_bk: 8,
  12330. ul_inbss_airtime_ac_vi: 8,
  12331. ul_inbss_airtime_ac_vo: 8;
  12332. };
  12333. A_UINT32 ul_inbss_airtime_per_ac;
  12334. };
  12335. /*
  12336. * Percentage of air time available for each AC, units in percentage.
  12337. * BIT[0-7] : AC_BE
  12338. * BIT[8-15] : AC_BK
  12339. * BIT[16-23] : AC_VI
  12340. * BIT[24-31] : AC_VO
  12341. * Please refer to WMI_ESP_ESTIMATE_GET_* and WMI_ESP_ESTIMATE_SET_* macros
  12342. * to retrieve values for each access category in estimated_air_time_per_ac.
  12343. */
  12344. union {
  12345. struct {
  12346. A_UINT32
  12347. estimated_air_time_ac_be: 8,
  12348. estimated_air_time_ac_bk: 8,
  12349. estimated_air_time_ac_vi: 8,
  12350. estimated_air_time_ac_vo: 8;
  12351. };
  12352. A_UINT32 estimated_air_time_per_ac;
  12353. };
  12354. /*
  12355. * Average channel latency per AC, units in micro seconds.
  12356. * avg_chan_lat_per_ac[0] : AC_VO
  12357. * avg_chan_lat_per_ac[1] : AC_VI
  12358. * avg_chan_lat_per_ac[2] : AC_BE
  12359. * avg_chan_lat_per_ac[3] : AC_BK
  12360. */
  12361. A_UINT32 avg_chan_lat_per_ac[WMI_AC_MAX];
  12362. /*
  12363. * link_obss_airtime: Percentage of OBSS used air time per link,
  12364. * units in percentage.
  12365. * Refer to WMI_PMLO_LINK_OBSS_AT_* Macro to set/get values.
  12366. * link_idle_airtime: Idle/free airtime per link, units in percentage.
  12367. * Refer to WMI_PMLO_LINK_AA_* macro to set/get values.
  12368. * ul_inbss_airtime_non_ac: ul inBSS airtime occupied by non-AC traffic,
  12369. * units in percentage.
  12370. * Refer to WMI_PMLO_UL_AIRTIME_NON_AC_* macro to set/get values.
  12371. * dl_inbss_airtime_non_ac: dl inBSS airtime occupied by non-AC traffic,
  12372. * units in percentage.
  12373. * Refer to WMI_PMLO_DL_AIRTIME_NON_AC_* macro to set/get values.
  12374. */
  12375. union {
  12376. struct {
  12377. A_UINT32 link_obss_airtime: 8,
  12378. link_idle_airtime: 8,
  12379. ul_inbss_airtime_non_ac: 8,
  12380. dl_inbss_airtime_non_ac: 8;
  12381. };
  12382. A_UINT32 ul_dl_obss_free_aa_word32;
  12383. };
  12384. /*
  12385. * Traffic condition used in estimating the available airtime value.
  12386. * Refer to enum wmi_pdev_traffic_condition
  12387. * traffic_condition_used_per_ac[0] : AC_VO
  12388. * traffic_condition_used_per_ac[1] : AC_VI
  12389. * traffic_condition_used_per_ac[2] : AC_BE
  12390. * traffic_condition_used_per_ac[3] : AC_BK
  12391. * Saturation Traffic condition is evaluated to true when the number
  12392. * of associated stations and the number of active TIDs per access
  12393. * category crosses a threshold.
  12394. * Light Traffic condition is evaluated to true when the obss_rx_airtime
  12395. * is less than a threshold and the free channel is greater than the sum
  12396. * of DL and UL airtime per client.
  12397. * Heavy Traffic condition is evaluated to true when the free channel is
  12398. * less than a particular threshold and the number of active TIDs per
  12399. * access category crosses a threshold.
  12400. * OBSS (Medium) Traffic condition is evaluated to true when the
  12401. * obss_rx_airtime crosses a threshold.
  12402. * Medium Traffic case is carried out if all the above mentioned
  12403. * conditions evaluate to false.
  12404. */
  12405. A_UINT32 traffic_condition_used_per_ac[WMI_AC_MAX];
  12406. /*
  12407. * Every PPDU has an associated txop overhead value in its PPDU duration.
  12408. * In order to consider only the duration taken to transfer the actual
  12409. * data, we estimate the payload ratio.
  12410. * The packet overhead is accumulated for each PPDU, where it is recorded
  12411. * for each access category separately.
  12412. * The payload_ratio_dl values indicate the percentage of actual data
  12413. * packets' duration in the entire TX duration by omitting the overhead
  12414. * (units are percentage).
  12415. * By estimating the payload ratio, we would be able to further measure
  12416. * the free channel with increased accuracy.
  12417. *
  12418. * BIT[0-7] : AC_BE
  12419. * BIT[8-15] : AC_BK
  12420. * BIT[16-23] : AC_VI
  12421. * BIT[24-31] : AC_VO
  12422. * Please refer to WMI_PMLO_UL_DL_PAYLOAD_RATIO_* macros
  12423. * to retrieve values for each access category in payload_ratio_dl_per_ac.
  12424. */
  12425. union {
  12426. struct {
  12427. A_UINT32
  12428. payload_ratio_dl_ac_be: 8,
  12429. payload_ratio_dl_ac_bk: 8,
  12430. payload_ratio_dl_ac_vi: 8,
  12431. payload_ratio_dl_ac_vo: 8;
  12432. };
  12433. A_UINT32 payload_ratio_dl_per_ac;
  12434. };
  12435. /*
  12436. * Every PPDU has an associated txop overhead value in its PPDU duration.
  12437. * In order to consider only the duration taken to transfer the actual
  12438. * data, we estimate the payload ratio.
  12439. * The packet overhead is accumulated for each PPDU, where it is recorded
  12440. * for each access category separately.
  12441. * The payload_ratio_ul values indicate the percentage of actual data
  12442. * packets' duration in the entire RX duration by omitting the overhead
  12443. * (Units are percentage).
  12444. * By estimating the payload ratio, we would be able to further measure
  12445. * the free channel with increased accuracy.
  12446. *
  12447. * BIT[0-7] : AC_BE
  12448. * BIT[8-15] : AC_BK
  12449. * BIT[16-23] : AC_VI
  12450. * BIT[24-31] : AC_VO
  12451. * Please refer to WMI_PMLO_UL_DL_PAYLOAD_RATIO_* macros
  12452. * to retrieve values for each access category in payload_ratio_ul_per_ac.
  12453. */
  12454. union {
  12455. struct {
  12456. A_UINT32
  12457. payload_ratio_ul_ac_be: 8,
  12458. payload_ratio_ul_ac_bk: 8,
  12459. payload_ratio_ul_ac_vi: 8,
  12460. payload_ratio_ul_ac_vo: 8;
  12461. };
  12462. A_UINT32 payload_ratio_ul_per_ac;
  12463. };
  12464. /*
  12465. * Error margin of the estimated available airtime per AC,
  12466. * units are percentage.
  12467. * error_margin_per_ac[0] : AC_VO
  12468. * error_margin_per_ac[1] : AC_VI
  12469. * error_margin_per_ac[2] : AC_BE
  12470. * error_margin_per_ac[3] : AC_BK
  12471. */
  12472. A_UINT32 error_margin_per_ac[WMI_AC_MAX];
  12473. /*
  12474. * This parameter indicates the number of clients which would be
  12475. * considered to estimate the available airtime value during
  12476. * imbalanced traffic scenarios
  12477. * Value 0 indicates that we do not have imbalanced traffic.
  12478. * num_of_ul/dl_asymmetric_clients_per_ac[0] : AC_VO
  12479. * num_of_ul/dl_asymmetric_clients_per_ac[1] : AC_VI
  12480. * num_of_ul/dl_asymmetric_clients_per_ac[2] : AC_BE
  12481. * num_of_ul/dl_asymmetric_clients_per_ac[3] : AC_BK
  12482. */
  12483. A_UINT32 num_of_ul_asymmetric_clients_per_ac[WMI_AC_MAX];
  12484. A_UINT32 num_of_dl_asymmetric_clients_per_ac[WMI_AC_MAX];
  12485. } wmi_ctrl_path_pmlo_stats_struct;
  12486. typedef struct {
  12487. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_cfr_stats_struct */
  12488. A_UINT32 tlv_header;
  12489. /*
  12490. * This index is used for formatting the printout of this stats TLV.
  12491. * A stats header is added when the index=0.
  12492. */
  12493. A_UINT32 index;
  12494. wmi_mac_addr cfr_peer_mac_addr;
  12495. A_UINT32 peer_in_use;
  12496. A_UINT32 capture_in_progress;
  12497. /* capture_method: 0 means oneshot request, otherwise periodic request */
  12498. A_UINT32 capture_method;
  12499. A_UINT32 periodicity; /* Time in ms */
  12500. A_UINT32 latest_req_timestamp; /* Time in ms */
  12501. A_UINT32 latest_resp_timestamp; /* Time in ms */
  12502. A_UINT32 cfr_req_count;
  12503. A_UINT32 cfr_resp_success_count;
  12504. A_UINT32 cfr_resp_failure_count;
  12505. } wmi_ctrl_path_cfr_stats_struct;
  12506. #define WMI_MAX_MLO_LINKS 5
  12507. #define WMI_HE_MAP_COUNT 3
  12508. #define WMI_EHT_MAP_COUNT 3
  12509. typedef struct {
  12510. /* TLV tag and len; tag equals
  12511. * WMITLV_TAG_STRUC_wmi_ctrl_path_peer_stats_struct
  12512. */
  12513. A_UINT32 tlv_header;
  12514. /* mac address - part of wlan_peer */
  12515. wmi_mac_addr mac_addr;
  12516. /* wlan_peer flags - refer to IEEE80211_NODE_* flags in wlan_peer.h */
  12517. A_UINT32 opaque_debug_flags;
  12518. /* opaque_debug_vht_caps:
  12519. * Negotiated VHT capabilities in the wlan_peer struct
  12520. * Refer to ieee80211_defs.h.
  12521. */
  12522. A_UINT32 opaque_debug_vht_caps;
  12523. /* opaque_debug_flags_ext:
  12524. * Extended flags in the wlan_peer struct
  12525. * Refer to IEEE80211_NODE_* flags in wlan_peer.h.
  12526. */
  12527. A_UINT32 opaque_debug_flags_ext;
  12528. /* TID queues marked for TWT flush, present in wlan_peer */
  12529. A_UINT32 opaque_debug_twt_flush_tidmap;
  12530. /* Number of TWT SPs to be expired, present in wlan_peer */
  12531. A_UINT32 opaque_debug_n_TWT_SPs_to_expire;
  12532. /* opaque_debug_rc_flags:
  12533. * Peer rate information, part of struct rate_node
  12534. * Refer to whal_rate_api.h for complete RC_FLAGS details.
  12535. */
  12536. A_UINT32 opaque_debug_rc_flags;
  12537. /* opaque_debug_sm_event_mask_eosp_cnt:
  12538. * This word contains the following bitfields:
  12539. * - Power save state machine event mask,
  12540. * part of wal_ps_buf_peer_handle_t.
  12541. * Refer to enum wal_ps_buf_peer_reg_ev_handlers.
  12542. * Use WMI_PEER_STATS_SM_MASK_SET,GET macros.
  12543. * - End of service period (EOSP) sent retry counter,
  12544. * part of wal_ps_buf_peer_handle_t.
  12545. * Use WMI_PEER_STATS_EOSP_RETRY_CNT_SET,GET macros.
  12546. */
  12547. A_UINT32 opaque_debug_sm_event_mask_eosp_cnt;
  12548. /* opaque_debug_ps_buf_peer_flag1:
  12549. * Power save related send_n, ps_poll, unscheduled service period
  12550. * related fields;
  12551. * Part of wal_ps_buf_peer_handle_t.
  12552. * Refer to wal_ps_buf_peer_ctx struct definition.
  12553. */
  12554. A_UINT32 opaque_debug_ps_buf_peer_flag1;
  12555. /* opaque_debug_ps_buf_peer_flag2:
  12556. * Power save related trigger/delivery tid related fields.
  12557. * part of wal_ps_buf_peer_handle_t.
  12558. * Refer to wal_ps_buf_peer_ctx struct definition.
  12559. */
  12560. A_UINT32 opaque_debug_ps_buf_peer_flag2;
  12561. /* opaque_debug_ps_buf_peer_flag3:
  12562. * Power save related last trigger related information,
  12563. * part of wal_ps_buf_peer_handle_t.
  12564. * Refer to wal_ps_buf_peer_ctx struct definition.
  12565. */
  12566. A_UINT32 opaque_debug_ps_buf_peer_flag3;
  12567. /* opaque_debug_last_rx_trigger_time:
  12568. * Time of the most recently received uplink trigger frame,
  12569. * part of wal_ps_buf_peer_handle_t - in microseconds units.
  12570. */
  12571. A_UINT32 opaque_debug_last_rx_trigger_time;
  12572. /* opaque_debug_last_poll_time:
  12573. * TSF of the most recently received uplink PS-Poll,
  12574. * part of wal_ps_buf_peer_handle_t - in TU
  12575. */
  12576. A_UINT32 opaque_debug_last_poll_time;
  12577. /* opaque_debug_oldest_tx_buffered_waiting_ms:
  12578. * Enqueue time of most recent MSDU that AP has buffered for
  12579. * sleeping station, part of wal_ps_buf_peer_handle_t, in ms units.
  12580. */
  12581. A_UINT32 opaque_debug_oldest_tx_buffered_waiting_ms;
  12582. /* opaque_debug_last_rxtx_activity:
  12583. * The last time when there was a rx or tx traffic from a client,
  12584. * part of wal_ps_buf_peer_handle_t, in ms units.
  12585. */
  12586. A_UINT32 opaque_debug_last_rxtx_activity;
  12587. /* opaque_debug_twt_flush_expiry_timestamp:
  12588. * Peer's TWT flush expiry timestamp in us,
  12589. * part of peer_twt_flush struct.
  12590. */
  12591. A_UINT32 opaque_debug_twt_flush_expiry_timestamp;
  12592. /* opaque_debug_hw_link_id:
  12593. * Unique link id across SOCs, determined during QMI handshake,
  12594. * part of wlan_peer_ml_info_t.
  12595. */
  12596. A_UINT32 opaque_debug_hw_link_id;
  12597. /* opaque_debug_ml_partner_hw_link_id_bitmap:
  12598. * Hardware link id of the of partner links that are to be cleaned up.
  12599. * This is filled by host during peer delete cmd.
  12600. * It it part of wlan_peer_ml_info_t.
  12601. */
  12602. A_UINT32 opaque_debug_ml_partner_hw_link_id_bitmap;
  12603. /* opaque_debug_link_flags:
  12604. * MLO link flags: related to assoc, anchor, master and primary UMAC links.
  12605. * Refer to resmgr_mlo_link_flags.
  12606. * Part of wlan_peer_ml_info_t.
  12607. */
  12608. A_UINT32 opaque_debug_link_flags;
  12609. /* MLO peer id - part of wlan_ml_peer_t */
  12610. A_UINT32 opaque_debug_ml_peer_id;
  12611. /* MLD mac address - part of wlan_ml_peer_t */
  12612. wmi_mac_addr opaque_debug_mld_mac_addr;
  12613. /* opaque_debug_assoc_id_usage_cnt:
  12614. * Part of wlan_peer.
  12615. * This word contains the following bitfields:
  12616. * - assoc id of the peer
  12617. * Use WMI_PEER_STATS_ASSOCIATE_ID_SET,GET macros.
  12618. * - peer usage count to track if peer alloc command is sent
  12619. * for new or existing peer,
  12620. * Use WMI_PEER_STATS_USAGE_CNT_SET,GET macros.
  12621. */
  12622. A_UINT32 opaque_debug_assoc_id_usage_cnt;
  12623. /* opaque_debug_default_ht_caps:
  12624. * Part of wlan_peer.
  12625. * This word contains the following bitfields:
  12626. * - default peer capabilities of the peer - refer ieee80211_defs.h
  12627. * Use WMI_PEER_STATS_DEF_CAPS_SET,GET macros.
  12628. * - HT capabilities of the peer - refer ieee80211_defs.h
  12629. * Use WMI_PEER_STATS_HT_CAPS_SET,GET macros.
  12630. */
  12631. A_UINT32 opaque_debug_default_ht_caps;
  12632. /* opaque_debug_inact_gen:
  12633. * Part of wlan_peer.
  12634. * This word contains the following bitfields:
  12635. * - Overall tx/rx inactivity time of the peer in seconds
  12636. * Use WMI_PEER_STATS_INACT_GEN_SET,GET macros.
  12637. * - Data tx/rx inactivity time of the peer in seconds.
  12638. * Use WMI_PEER_STATS_DATA_INACT_GEN_SET,GET macros.
  12639. */
  12640. A_UINT32 opaque_debug_inact_gen;
  12641. /* opaque_debug_id_type:
  12642. * Part of wlan_peer.
  12643. * This word contains the following bitfields:
  12644. * - Type of peer whether it is bss,self or remote peer.
  12645. * Refer to enum wmi_peer_type.
  12646. * Use WMI_PEER_STATS_TYPE_SET,GET macros.
  12647. * - MAC ID that the peer belongs to
  12648. * Use WMI_PEER_STATS_MAC_ID_SET,GET macros.
  12649. * - sw peer id of the peer
  12650. * Use WMI_PEER_STATS_ID_SET,GET macros.
  12651. */
  12652. A_UINT32 opaque_debug_id_type;
  12653. /* Deleted tids bitmask within the peer - part of wal_peer */
  12654. A_UINT32 opaque_debug_deleted_tidmask;
  12655. /* number of local pending frames for completions - part of wal_peer */
  12656. A_UINT32 opaque_debug_num_of_local_frames_pending;
  12657. /* flags part of wal_peer - refer to wal_peer_flags_t */
  12658. A_UINT32 opaque_debug_wal_peer_flags;
  12659. /* opaque_debug_keyid0_ast_index:
  12660. * The AST index for key id 0 which is always allocated,
  12661. * part of wal_peer.
  12662. */
  12663. A_UINT32 opaque_debug_keyid0_ast_index;
  12664. /* opaque_debug_all_tids_block_module_bitmap:
  12665. * Bitmap of block IDs requesting block of all TIDs,
  12666. * part of wal_peer.
  12667. * Refer to enum WLAN_PAUSE_ID.
  12668. * This block/pause ID can be mapped to a WLAN_MODULE_ID module ID.
  12669. */
  12670. A_UINT32 opaque_debug_all_tids_block_module_bitmap;
  12671. /* opaque_debug_all_tids_pause_module_bitmap:
  12672. * Bitmap of pause IDs requesting block of all TIDs,
  12673. * part of wal_peer.
  12674. * Refer to enum WLAN_PAUSE_ID.
  12675. * This pause ID can be mapped to a WLAN_MODULE_ID module ID.
  12676. */
  12677. A_UINT32 opaque_debug_all_tids_pause_module_bitmap;
  12678. /* opaque_debug_data_tids_block_module_bitmap:
  12679. * Bitmap of block ids requesting block of data tids,
  12680. * part of wal_peer.
  12681. * Refer to enum WLAN_PAUSE_ID.
  12682. * This block/pause ID can be mapped to a WLAN_MODULE_ID module ID.
  12683. */
  12684. A_UINT32 opaque_debug_data_tids_block_module_bitmap;
  12685. /* opaque_debug_data_tids_pause_module_bitmap:
  12686. * Bitmap of pause ids requesting block of data tids,
  12687. * part of wal_peer.
  12688. * Refer to enum WLAN_PAUSE_ID.
  12689. * This pause ID can be mapped to a WLAN_MODULE_ID module ID.
  12690. */
  12691. A_UINT32 opaque_debug_data_tids_pause_module_bitmap;
  12692. /* The time stamp when first ppdu fails in us, part of wal_peer */
  12693. A_UINT32 opaque_debug_ppdu_fail_time;
  12694. /* opaque_debug_rate_params:
  12695. * This word contains the following bitfields:
  12696. * - Non data rate code of the peer - part of wal_peer
  12697. * Use WMI_PEER_STATS_BSS_NON_DATA_RC_SET,GET macros.
  12698. * - channel bandwidth supported by the peer, part of wal_peer.
  12699. * The mapping is as follows:
  12700. * 0 = 20 MHz, 1 = 40 MHz, 2 = 80 MHz, 3 = 160 MHz, 4 = 320 MHz
  12701. * Use WMI_PEER_STATS_CH_WIDTH_SET,GET macros.
  12702. * - MCS used for the last PPDU received from the peer, part of wal_peer
  12703. * Use WMI_PEER_STATS_RX_MCS_SET,GET macros.
  12704. */
  12705. A_UINT32 opaque_debug_rate_params;
  12706. /* consecutive QOS null frame tx fail count, part of wal_peer */
  12707. A_UINT32 opaque_debug_consecutive_null_failure;
  12708. /* peer delete state refer enum PEER_DELETE_SM_STATE, part of wal_peer */
  12709. A_UINT32 opaque_debug_peer_delete_sm_state;
  12710. /* opaque_debug_cache_rate_info_low32,_high32:
  12711. * Lower/upper 32 bits respectively of cached rate info variable
  12712. * updated by the HTT metadata.
  12713. * This rate_info is based on the values from struct
  12714. * htt_tx_msdu_desc_ext2_t .
  12715. * If htt_tx_desc_ext2->update_peer_cache is set to 1 and
  12716. * HTT_TX_TCL_METADATA_PEER_ID_GET(tcl_cmd_num) returns valid peer ID
  12717. * then rate_info cache of the peer is updated.
  12718. * Part of wal_peer.
  12719. */
  12720. A_UINT32 opaque_debug_cache_rate_info_low32;
  12721. A_UINT32 opaque_debug_cache_rate_info_high32;
  12722. /* opaque_debug_peer_delete_rc4_rekey:
  12723. * This word contains the following bitfields:
  12724. * - Flag that denotes if Peer delete all is in progress or not,
  12725. * part of wal_peer.
  12726. * Use WMI_PEER_STATS_DELETE_ALL_FLAG_SET,GET macros.
  12727. * - RC4 rekey counter, part of wal_peer.
  12728. * Use WMI_PEER_STATS_RC4_REKEY_CNT_SET,GET macros.
  12729. */
  12730. A_UINT32 opaque_debug_peer_delete_rc4_rekey;
  12731. /* opaque_debug_mcbc_tids_pause_bitmap:
  12732. * Bitmap containing Multicast and broadcast tids that are paused,
  12733. * part of wal_peer.
  12734. */
  12735. A_UINT32 opaque_debug_mcbc_tids_pause_bitmap;
  12736. /* opaque_debug_next_to_last_pn_low32,_high32:
  12737. * Lower/upper 32 bits respectively of last used PN value received,
  12738. * part of wal_peer.
  12739. */
  12740. A_UINT32 opaque_debug_next_to_last_pn_low32;
  12741. A_UINT32 opaque_debug_next_to_last_pn_high32;
  12742. /* opaque_debug_last_pn_low32,_high32:
  12743. * Lower/upper 32 bits respectively of current PN value received,
  12744. * part of wal_peer.
  12745. */
  12746. A_UINT32 opaque_debug_last_pn_low32;
  12747. A_UINT32 opaque_debug_last_pn_high32;
  12748. /* opaque_debug_twt_ap_peer_ctx_flags:
  12749. * This word contains the following bitfields:
  12750. * - TWT AP peer's context flags, part of twt_ap_peer_handle_t struct.
  12751. * Refer twt_ap_twt_session_t definition.
  12752. * Use WMI_PEER_STATS_TWT_AP_FLAGS_SET,GET macros.
  12753. * - TWT session counter, part of twt_ap_peer_handle_t struct.
  12754. * Use WMI_PEER_STATS_TWT_AP_SESSION_CNT_SET,GET macros.
  12755. * - TWT frame retry counter, part of twt_ap_peer_handle_t struct.
  12756. * Use WMI_PEER_STATS_TWT_FRM_RETRY_SET,GET macros.
  12757. */
  12758. A_UINT32 opaque_debug_twt_ap_peer_ctx_flags;
  12759. /* opaque_debug_twt_ap_counters:
  12760. * This word contains the following bitfields:
  12761. * - TWT UL trigger counter, part of twt_ap_peer_handle_t struct.
  12762. * Use WMI_PEER_STATS_TWT_UL_TRIGGER_SET,GET macros.
  12763. * - TWT Broadcast session counter, part of twt_ap_peer_handle_t struct.
  12764. * Use WMI_PEER_STATS_TWT_BC_SESSION_SET,GET macros.
  12765. * - TWT pending report counter, part of twt_ap_peer_handle_t struct.
  12766. * Use WMI_PEER_STATS_TWT_PENDING_REPORT_SET,GET macros.
  12767. * - TWT flow IDs, part of twt_ap_peer_handle_t struct.
  12768. * Use WMI_PEER_STATS_TWT_FLOW_IDS_SET,GET macros.
  12769. */
  12770. A_UINT32 opaque_debug_twt_ap_counters;
  12771. /* opaque_debug_tx_state_bmap_low32,_high32:
  12772. * Lower/upper 32 bits respectively of list of currently running
  12773. * BA Tx states for tids in this peer, part of wal_ba_peer_handle_t.
  12774. */
  12775. A_UINT32 opaque_debug_tx_state_bmap_low32;
  12776. A_UINT32 opaque_debug_tx_state_bmap_high32;
  12777. /* opaque_debug_addba_mode:
  12778. * This word contains the following bitfields:
  12779. * - ADDBA mode whether its automatic or manual,
  12780. * WAL_BA_ADDBA_MODE_AUTO = 0 and WAL_BA_ADDBA_MODE_MANUAL = 1
  12781. * Part of wal_ba_peer_handle_t.
  12782. * Use WMI_PEER_STATS_ADDBBA_TX_MODE_SET,GET macros.
  12783. * - ADDBA request's response code, part of wal_ba_peer_handle_t.
  12784. * Use WMI_PEER_STATS_ADDBBA_RESP_MODE_SET,GET macros.
  12785. */
  12786. A_UINT32 opaque_debug_addba_mode;
  12787. /* opaque_debug_tx_retry_bmap:
  12788. * Bitmap of tids and their TX BlockAck retry counters.
  12789. * Each TID uses 2 bits for its BA retry counter.
  12790. * Part of wal_ba_peer_handle_t.
  12791. */
  12792. A_UINT32 opaque_debug_tx_retry_bmap;
  12793. /* opaque_debug_rx_state_bmap:
  12794. * Bitmap of tids and their RX BlockAck retry counters.
  12795. * 00 - BA not setup
  12796. * 01 - BA in progress
  12797. * 10 - reserved
  12798. * 11 - BA setup.
  12799. * Each TID uses 2 bits for its BA RX state;
  12800. * for instance TID 0's BA info occupies bits 1:0 and so on.
  12801. * Part of wal_ba_peer_handle_t.
  12802. */
  12803. A_UINT32 opaque_debug_rx_state_bmap;
  12804. /* opaque_debug_tx_pending_delba_tid_bmap:
  12805. * TID bitmap containaing information DELBA tx pending,
  12806. * part of wal_ba_peer_handle_t.
  12807. */
  12808. A_UINT32 opaque_debug_tx_pending_delba_tid_bmap;
  12809. /* opaque_debug_link_monitor_tid_num:
  12810. * link monitor tid num in bss_peer ba_peer_handle,
  12811. * part of wal_ba_peer_handle_t.
  12812. */
  12813. A_UINT32 opaque_debug_link_monitor_tid_num;
  12814. /* opaque_debug_rc4_eapol_key_complete:
  12815. * Flag that denotes rc4 eapol key exchange is complete,
  12816. * part of wal_peer_ext.
  12817. */
  12818. A_UINT32 opaque_debug_rc4_eapol_key_complete;
  12819. /* qcache peer flags, refer to qpeer_flags_t */
  12820. A_UINT32 opaque_debug_qpeer_flags;
  12821. /* bitmap of TIDs requested for flush, part of wal_qcache_peer */
  12822. A_UINT32 opaque_debug_delete_requested_tidmask;
  12823. /* bitmap of created TIDs, part of wal_qcache_peer */
  12824. A_UINT32 opaque_debug_tid_created_tidmask;
  12825. /* opaque_debug_qpeer_rt_flags0,_flags1,_flags2:
  12826. * RT thread related fields in qpeer, refer to _wal_qcache_peer.
  12827. */
  12828. A_UINT32 opaque_debug_qpeer_rt_flags0;
  12829. A_UINT32 opaque_debug_qpeer_rt_flags1;
  12830. A_UINT32 opaque_debug_qpeer_rt_flags2;
  12831. /* opaque_debug_qpeer_sa_flags0,_flags1:
  12832. * SA thread related fields in qpeer, refer to _wal_qcache_peer.
  12833. */
  12834. A_UINT32 opaque_debug_qpeer_sa_flags0;
  12835. A_UINT32 opaque_debug_qpeer_sa_flags1;
  12836. /* BE thread related fields in qpeer, refer to _wal_qcache_peer */
  12837. A_UINT32 opaque_debug_qpeer_be_flags;
  12838. /* qpeer event bitmap, refer to wal_peer_event_type */
  12839. A_UINT32 opaque_debug_event_bitmap;
  12840. /* tx fail count for a peer, part of dcache peer */
  12841. A_UINT32 opaque_debug_seq_no_tx_fail_cnt;
  12842. /* Last transmission rate in kbps for a peer, part of dcache peer */
  12843. A_UINT32 opaque_debug_last_tx_rate_kbps;
  12844. /* opaque_debug_amsdu_size:
  12845. * This word contains the following bitfields:
  12846. * - MAX AMSDU size of the peer, part of dcache peer.
  12847. * Use WMI_PEER_STATS_MAX_AMSDU_SIZE_SET,GET macros.
  12848. */
  12849. A_UINT32 opaque_debug_amsdu_size;
  12850. /* opaque_debug_fake_sleep_time:
  12851. * Time elapsed in ms after entering into fake sleep after xretry failure,
  12852. * part of dcache peer.
  12853. */
  12854. A_UINT32 opaque_debug_fake_sleep_time;
  12855. /* opaque_debug_tx_frame_qos_ctrl:
  12856. * This word contains the following bitfields:
  12857. * - Tx frame control FC flags in ieee80211_defs.h, part of dcache peer.
  12858. * Use WMI_PEER_STATS_TX_FRAME_CTRL_SET,GET macros.
  12859. * - Tx QOS control FC flags in ieee80211_defs.h, part of dcache peer.
  12860. * Use WMI_PEER_STATS_TX_QOS_CTRL_SET,GET macros.
  12861. */
  12862. A_UINT32 opaque_debug_tx_frame_qos_ctrl;
  12863. /* opaque_debug_consec_fail_subfrm_sz:
  12864. * This word contains the following bitfields:
  12865. * - Consecutive tx fail count for the peer, part of dcache peer.
  12866. * Use WMI_PEER_STATS_CONSEC_FAIL_SET,GET macros.
  12867. * - subframe size configured for the peer, part of dcache peer.
  12868. * Use WMI_PEER_STATS_SUBFRAME_SIZE_SET,GET macros.
  12869. */
  12870. A_UINT32 opaque_debug_consec_fail_subfrm_sz;
  12871. /* opaque_debug_tx_fail_partial_aid:
  12872. * This word contains the following bitfields:
  12873. * - tx fail count for the peer, part of dcache peer.
  12874. * Use WMI_PEER_STATS_TX_FAIL_CNT_SET,GET macros.
  12875. * - Partial AID of the peer, part of dcache peer.
  12876. * Use WMI_PEER_STATS_TX_PARTIAL_AID_SET,GET macros.
  12877. */
  12878. A_UINT32 opaque_debug_tx_fail_partial_aid;
  12879. /* opaque_debug_max_nss:
  12880. * Part of dcache peer.
  12881. * This word contains the following bitfields:
  12882. * - Peer NSS value sent by host during WMI_PEER_ASSOC cmd.
  12883. * Use WMI_PEER_STATS_MAX_NSS_SET,GET macros.
  12884. */
  12885. A_UINT32 opaque_debug_max_nss;
  12886. /* opaque_debug_he_cap_info:
  12887. * Peer HE capabilities info sent during peer assoc cmd.
  12888. * Refer to WMI_HECAP_* macros in wmi_unified.h.
  12889. * Part of dcache peer.
  12890. */
  12891. A_UINT32 opaque_debug_he_cap_info;
  12892. /* opaque_debug_he_cap_info_ext:
  12893. * Peer extended HE capabilities info sent during peer assoc cmd.
  12894. * Refer to WMI_HECAP_* macros in wmi_unified.h.
  12895. * Part of dcache peer.
  12896. */
  12897. A_UINT32 opaque_debug_he_cap_info_ext;
  12898. /* opaque_debug_eht_cap_info:
  12899. * Peer EHT capabilities info.
  12900. * Refer to ieee80211_defs.h, part of dcache peer.
  12901. */
  12902. A_UINT32 opaque_debug_eht_cap_info;
  12903. /* TAC thread related fields in dcache peer refer wal_dcache_peer_t */
  12904. A_UINT32 opaque_debug_dcache_tac_flags;
  12905. /* RT thread related fields in dcache peer refer wal_dcache_peer_t */
  12906. A_UINT32 opaque_debug_dcache_rt_flags;
  12907. /* Supported RC modes for the peer refer enum RC_MODE, part of dcache */
  12908. A_UINT32 opaque_debug_rc_mode_supported_mask;
  12909. /* opaque_debug_wlan_peer_bitfield_mask:
  12910. * Part of wlan peer. This word contains the following bitfields:
  12911. * - Flag that denotes whether peer delete response is being sent
  12912. * to host or not.
  12913. * Use WMI_PEER_STATS_DEL_RESP_TO_HOST_SET,GET macros.
  12914. * - Flag that denotes if peer delete is in progress or not.
  12915. * Use WMI_PEER_STATS_DELETE_IN_PROGRESS_SET,GET macros.
  12916. * - Flag that denotes if peer migration is in progress or not.
  12917. * Use WMI_PEER_STATS_MIGRATION_IN_PROGRESS_SET,GET macros.
  12918. * - Flag that denotes peer's connection/authorized state.
  12919. * Refer WAL_PEER_STATE_* macros in wal_peer.h.
  12920. * Use WMI_PEER_STATS_CONN_STATE_SET,GET macros.
  12921. * - TX chain mask at 160MHz of the peer set during peer assoc command.
  12922. * Use WMI_PEER_STATS_TX_CHAIN_MASK_160_SET,GET macros.
  12923. * - Tx chain mask set during peer assoc command.
  12924. * Use WMI_PEER_STATS_TX_CHAIN_MASK_SET,GET macros.
  12925. * - copy of tx chain mask of peer saved for AP MIMO PS.
  12926. * Use WMI_PEER_STATS_ASSOC_CHAIN_MASK_SET,GET macros.
  12927. */
  12928. A_UINT32 opaque_debug_wlan_peer_bitfield_mask;
  12929. /* opaque_debug_wal_peer_bitfields:
  12930. * Part of wal_peer. This word contains the following bitfields:
  12931. * - Flag that denotes if QOS null is sent over WMI or not.
  12932. * Use WMI_PEER_STATS_QOS_NULL_OVER_WMI_SET,GET macros.
  12933. * - Flag that denotes whether peer assoc is received
  12934. * for the first time or not.
  12935. * Use WMI_PEER_STATS_NEW_ASSOC_SET,GET macros.
  12936. * - Flag that denotes whether TWT filter is enabled or not.
  12937. * Use WMI_PEER_STATS_TWT_FILT_FLAG_SET,GET macros.
  12938. * - Flag that denotes whether TWT is registered or not.
  12939. * Use WMI_PEER_STATS_TWT_REG_FLAG_SET,GET macros.
  12940. * - Flag that denotes whether WMM txQ uplink trigger is disabled or not.
  12941. * Use WMI_PEER_STATS_WMM_UL_TRIG_FLAG_SET,GET macros.
  12942. * - Number of active TIDs that do not have BA setup.
  12943. * Use WMI_PEER_STATS_ACTIVE_NOT_BA_TID_SET,GET macros.
  12944. */
  12945. A_UINT32 opaque_debug_wal_peer_bitfields;
  12946. /* flags in RT context refer wal_peer_ext_t */
  12947. A_UINT32 opaque_debug_wal_peer_rt_flags;
  12948. /* opaque_debug_ml_attributes:
  12949. * Part of wal_ml_peer. This word contains the following bitfields:
  12950. * - Num of MLO links
  12951. * Use WMI_PEER_STATS_NUM_LINKS_SET,GET macros.
  12952. * - ML peer id
  12953. * Use WMI_PEER_STATS_ML_PEER_ID_SET,GET macros.
  12954. * - Primary link ID
  12955. * Use WMI_PEER_STATS_PRI_LINK_ID_SET,GET macros.
  12956. * - Primary chip ID
  12957. * Use WMI_PEER_STATS_PRI_CHIP_ID_SET,GET macros.
  12958. * - Initial link count
  12959. * Use WMI_PEER_STATS_LINK_INIT_CNT_SET,GET macros.
  12960. * - Number of local links
  12961. * Use WMI_PEER_STATS_NUM_LOCAL_LINKS_SET,GET macros.
  12962. * - Bitmap of participating chips
  12963. * Use WMI_PEER_STATS_CHIPS_BITMAP_SET,GET macros.
  12964. */
  12965. A_UINT32 opaque_debug_ml_attributes;
  12966. /* wal peer MLO flags refer ml_peer_flags_t */
  12967. A_UINT32 opaque_debug_ml_flags;
  12968. /* opaque_debug_ml_link_info_flags:
  12969. * Part of link_info in wlan_peer_ml_info_t.
  12970. * This word contains the following bitfields:
  12971. * - flag denoting if MLO-link is valid or not
  12972. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_SET,GET macros.
  12973. * - flag denoting if MLO-link is active or not
  12974. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_SET,GET macros.
  12975. * - flag denoting if MLO-link is primary or not
  12976. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_SET,GET macros.
  12977. * - flag denoting if MLO-link is assoc link or not
  12978. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_SET,GET macros.
  12979. * - Chip ID of the MLO-link
  12980. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_SET,GET macros.
  12981. * - IEEE link ID of the MLO-link
  12982. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_SET,GET macros.
  12983. * - HW link ID of the MLO-link
  12984. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_SET,GET macros.
  12985. * - logical link ID of the MLO-link
  12986. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_SET,GET macros.
  12987. * - flag denoting if MLO-link is master link or not
  12988. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_SET,GET macros.
  12989. * - flag denoting if MLO-link is anchor link or not
  12990. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_SET,GET macros.
  12991. * - flag denoting if MLO-link is initialized or not
  12992. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_SET,GET macros.
  12993. */
  12994. A_UINT32 opaque_debug_ml_link_info_flags[WMI_MAX_MLO_LINKS];
  12995. /* opaque_debug_ml_link_info_id:
  12996. * Part of link_info in wlan_peer_ml_info_t.
  12997. * This word contains the following bitfields:
  12998. * - sw_peer_id corresponding to the link
  12999. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_SET,GET macros.
  13000. * - vdev id corresponding to the link
  13001. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_SET,GET macros.
  13002. */
  13003. A_UINT32 opaque_debug_ml_link_info_id[WMI_MAX_MLO_LINKS];
  13004. /* MLO link info primary tid mask, part of link_info in wlan_peer_ml_info_t */
  13005. A_UINT32 opaque_debug_ml_link_info_pri_tidmask[WMI_MAX_MLO_LINKS];
  13006. /* opaque_debug_rc_node_params:
  13007. * Part of struct TX_PEER_PARAMS.
  13008. * This word contains the following bitfields:
  13009. * - NSS of the peer in 160MHZ
  13010. * Use WMI_PEER_STATS_NSS_160_SET,GET macros.
  13011. * - phymode of the peer - refer enum WLAN_PHY_MODE
  13012. * Use WMI_PEER_STATS_RC_PHYMODE_SET,GET macros.
  13013. * - legacy rate set for the peer
  13014. * Use WMI_PEER_STATS_LEGACY_RATE_SET,GET macros.
  13015. */
  13016. A_UINT32 opaque_debug_rc_node_params;
  13017. /* opaque_debug_rc_vht_mcs_set:
  13018. * Rate node param - negotiated VHT MCS map,
  13019. * part of struct TX_PEER_PARAMS
  13020. */
  13021. A_UINT32 opaque_debug_rc_vht_mcs_set;
  13022. /* opaque_debug_rc_node_params1:
  13023. * Part of link_info in wlan_peer_ml_info_t.
  13024. * This word contains the following bitfields:
  13025. * - Minimum data rate set for the peer in Mbps
  13026. * Use WMI_PEER_STATS_MIN_DATA_RATE_SET,GET macros.
  13027. * - Max VHT rate set for the peer
  13028. * Use WMI_PEER_STATS_VHT_MAX_RATE_SET,GET macros.
  13029. * - Max VHT streams set for the peer
  13030. * Use WMI_PEER_STATS_VHT_MAX_STREAMS_SET,GET macros.
  13031. * - BSS - Channel frequency set for the peer in MHz
  13032. * Use WMI_PEER_STATS_RC_CHAN_FREQ_SET,GET macros.
  13033. */
  13034. A_UINT32 opaque_debug_rc_node_params1;
  13035. /* opaque_debug_he_mcs_nss_set_tx,_rx:
  13036. * Rate node param - negotiated HE MCS tx+rx maps,
  13037. * part of struct TX_PEER_PARAMS.
  13038. * The lower 8 bits (bits 23:16) within the upper 16 bits indicate
  13039. * MCS 12/13 enablement for BW <= 80MHz; the upper 8 bits (bits 31:24)
  13040. * within the 16 bits indicate MCS 12/13 enablement for BW > 80MHz.
  13041. * The 16 bits for the index values are within the upper bits (bits 31:16)
  13042. * of a 32-bit word. and WMI_HE_MAP_COUNT is based on HE_MCS_MAP_CNT
  13043. * in ieee80211_defs.h.
  13044. */
  13045. A_UINT32 opaque_debug_he_mcs_nss_set_tx[WMI_HE_MAP_COUNT];
  13046. A_UINT32 opaque_debug_he_mcs_nss_set_rx[WMI_HE_MAP_COUNT];
  13047. /* opaque_debug_eht_mcs_nss_set_tx,_rx:
  13048. * Rate node param - negotiated EHT MCS tx+rx maps,
  13049. * part of struct TX_PEER_PARAMS.
  13050. * B0-B3 indicates max NSS that supports mcs 0-7
  13051. * B4-B7 indicates max NSS that supports mcs 8-9
  13052. * B8-B11 indicates max NSS that supports mcs 10-11
  13053. * B12-B15 indicates max NSS that supports mcs 12-13
  13054. * B16-B31 reserved.
  13055. * WMI_EHT_MAP_COUNT is based on EHT_MCS_MAP_CNT in ieee80211_defs.h.
  13056. */
  13057. A_UINT32 opaque_debug_eht_mcs_nss_set_tx[WMI_EHT_MAP_COUNT];
  13058. A_UINT32 opaque_debug_eht_mcs_nss_set_rx[WMI_EHT_MAP_COUNT];
  13059. /* opaque_debug_rc_user_start_mcs_rate:
  13060. * Rate node user_start_rate is MCS value set based on phymode.
  13061. * For possible values refer "INITIAL_" macros in ratectrl.h.
  13062. * Part of struct TX_PEER_PARAMS.
  13063. * This is the starting value of MCS that was used by rate control
  13064. * for the first transmissions to the peer, until PER information
  13065. * from the peer allowed the rate control algorithm to determine
  13066. * the suitable MCS.
  13067. */
  13068. A_UINT32 opaque_debug_rc_user_start_mcs_rate;
  13069. /*
  13070. * The following 4 opaque_debug_field variables are provided purely
  13071. * for debugging by technicians who have outside knowledge of what
  13072. * kind of values the target has placed into these fields.
  13073. * They are not to be interpreted by the host driver in any manner.
  13074. */
  13075. A_UINT32 opaque_debug_field_1;
  13076. A_UINT32 opaque_debug_field_2;
  13077. A_UINT32 opaque_debug_field_3;
  13078. A_UINT32 opaque_debug_field_4;
  13079. } wmi_ctrl_path_peer_stats_struct;
  13080. #define WMI_PEER_STATS_SM_MASK_SET(flag, val) \
  13081. WMI_SET_BITS(flag, 0, 16, val)
  13082. #define WMI_PEER_STATS_SM_MASK_GET(flag) \
  13083. WMI_GET_BITS(flag, 0, 16)
  13084. #define WMI_PEER_STATS_EOSP_RETRY_CNT_SET(flag, val) \
  13085. WMI_SET_BITS(flag, 16, 8, val)
  13086. #define WMI_PEER_STATS_EOSP_RETRY_CNT_GET(flag) \
  13087. WMI_GET_BITS(flag, 16, 8)
  13088. /* bits 31:24 unused/reserved */
  13089. #define WMI_PEER_STATS_ASSOCIATE_ID_SET(flag, val) \
  13090. WMI_SET_BITS(flag, 0, 16, val)
  13091. #define WMI_PEER_STATS_ASSOCIATE_ID_GET(flag) \
  13092. WMI_GET_BITS(flag, 0, 16)
  13093. #define WMI_PEER_STATS_USAGE_CNT_SET(flag, val) \
  13094. WMI_SET_BITS(flag, 16, 16, val)
  13095. #define WMI_PEER_STATS_USAGE_CNT_GET(flag) \
  13096. WMI_GET_BITS(flag, 16, 16)
  13097. #define WMI_PEER_STATS_DEF_CAPS_SET(flag, val) \
  13098. WMI_SET_BITS(flag, 0, 16, val)
  13099. #define WMI_PEER_STATS_DEF_CAPS_GET(flag) \
  13100. WMI_GET_BITS(flag, 0, 16)
  13101. #define WMI_PEER_STATS_HT_CAPS_SET(flag, val) \
  13102. WMI_SET_BITS(flag, 16, 16, val)
  13103. #define WMI_PEER_STATS_HT_CAPS_GET(flag) \
  13104. WMI_GET_BITS(flag, 16, 16)
  13105. #define WMI_PEER_STATS_INACT_GEN_SET(flag, val) \
  13106. WMI_SET_BITS(flag, 0, 16, val)
  13107. #define WMI_PEER_STATS_INACT_GEN_GET(flag) \
  13108. WMI_GET_BITS(flag, 0, 16)
  13109. #define WMI_PEER_STATS_DATA_INACT_GEN_SET(flag, val) \
  13110. WMI_SET_BITS(flag, 16, 16, val)
  13111. #define WMI_PEER_STATS_DATA_INACT_GEN_GET(flag) \
  13112. WMI_GET_BITS(flag, 16, 16)
  13113. #define WMI_PEER_STATS_PEER_TYPE_SET(flag, val) \
  13114. WMI_SET_BITS(flag, 0, 8, val)
  13115. #define WMI_PEER_STATS_PEER_TYPE_GET(flag) \
  13116. WMI_GET_BITS(flag, 0, 8)
  13117. #define WMI_PEER_STATS_MAC_ID_SET(flag, val) \
  13118. WMI_SET_BITS(flag, 8, 8, val)
  13119. #define WMI_PEER_STATS_MAC_ID_GET(flag) \
  13120. WMI_GET_BITS(flag, 8, 8)
  13121. #define WMI_PEER_STATS_PEER_ID_SET(flag, val) \
  13122. WMI_SET_BITS(flag, 16, 16, val)
  13123. #define WMI_PEER_STATS_PEER_ID_GET(flag) \
  13124. WMI_GET_BITS(flag, 16, 16)
  13125. #define WMI_PEER_STATS_BSS_NON_DATA_RC_SET(flag, val) \
  13126. WMI_SET_BITS(flag, 0, 8, val)
  13127. #define WMI_PEER_STATS_BSS_NON_DATA_RC_GET(flag) \
  13128. WMI_GET_BITS(flag, 0, 8)
  13129. #define WMI_PEER_STATS_CH_WIDTH_SET(flag, val) \
  13130. WMI_SET_BITS(flag, 8, 8, val)
  13131. #define WMI_PEER_STATS_CH_WIDTH_GET(flag) \
  13132. WMI_GET_BITS(flag, 8, 8)
  13133. #define WMI_PEER_STATS_RX_MCS_SET(flag, val) \
  13134. WMI_SET_BITS(flag, 16, 8, val)
  13135. #define WMI_PEER_STATS_RX_MCS_GET(flag) \
  13136. WMI_GET_BITS(flag, 16, 8)
  13137. /* bits 31:24 unused/reserved */
  13138. #define WMI_PEER_STATS_DELETE_ALL_FLAG_SET(flag, val) \
  13139. WMI_SET_BITS(flag, 0, 8, val)
  13140. #define WMI_PEER_STATS_DELETE_ALL_FLAG_GET(flag) \
  13141. WMI_GET_BITS(flag, 0, 8)
  13142. #define WMI_PEER_STATS_RC4_REKEY_CNT_SET(flag, val) \
  13143. WMI_SET_BITS(flag, 8, 8, val)
  13144. #define WMI_PEER_STATS_RC4_REKEY_CNT_GET(flag) \
  13145. WMI_GET_BITS(flag, 8, 8)
  13146. /* bits 31:16 unused/reserved */
  13147. #define WMI_PEER_STATS_TWT_AP_FLAGS_SET(flag, val) \
  13148. WMI_SET_BITS(flag, 0, 16, val)
  13149. #define WMI_PEER_STATS_TWT_AP_FLAGS_GET(flag) \
  13150. WMI_GET_BITS(flag, 0, 16)
  13151. #define WMI_PEER_STATS_TWT_AP_SESSION_CNT_SET(flag, val) \
  13152. WMI_SET_BITS(flag, 16, 8, val)
  13153. #define WMI_PEER_STATS_TWT_AP_SESSION_CNT_GET(flag) \
  13154. WMI_GET_BITS(flag, 16, 8)
  13155. #define WMI_PEER_STATS_TWT_FRM_RETRY_SET(flag, val) \
  13156. WMI_SET_BITS(flag, 24, 8, val)
  13157. #define WMI_PEER_STATS_TWT_FRM_RETRY_GET(flag) \
  13158. WMI_GET_BITS(flag, 24, 8)
  13159. #define WMI_PEER_STATS_TWT_UL_TRIGGER_SET(flag, val) \
  13160. WMI_SET_BITS(flag, 0, 8, val)
  13161. #define WMI_PEER_STATS_TWT_UL_TRIGGER_GET(flag) \
  13162. WMI_GET_BITS(flag, 0, 8)
  13163. #define WMI_PEER_STATS_TWT_BC_SESSION_SET(flag, val) \
  13164. WMI_SET_BITS(flag, 8, 8, val)
  13165. #define WMI_PEER_STATS_TWT_BC_SESSION_GET(flag) \
  13166. WMI_GET_BITS(flag, 8, 8)
  13167. #define WMI_PEER_STATS_TWT_PENDING_REPORT_SET(flag, val) \
  13168. WMI_SET_BITS(flag, 16, 8, val)
  13169. #define WMI_PEER_STATS_TWT_PENDING_REPORT_GET(flag) \
  13170. WMI_GET_BITS(flag, 16, 8)
  13171. #define WMI_PEER_STATS_TWT_FLOW_IDS_SET(flag, val) \
  13172. WMI_SET_BITS(flag, 24, 8, val)
  13173. #define WMI_PEER_STATS_TWT_FLOW_IDS_GET(flag) \
  13174. WMI_GET_BITS(flag, 24, 8)
  13175. #define WMI_PEER_STATS_ADDBBA_TX_MODE_SET(flag, val) \
  13176. WMI_SET_BITS(flag, 0, 16, val)
  13177. #define WMI_PEER_STATS_ADDBBA_TX_MODE_GET(flag) \
  13178. WMI_GET_BITS(flag, 0, 16)
  13179. #define WMI_PEER_STATS_ADDBBA_RESP_MODE_SET(flag, val) \
  13180. WMI_SET_BITS(flag, 16, 16, val)
  13181. #define WMI_PEER_STATS_ADDBBA_RESP_MODE_GET(flag) \
  13182. WMI_GET_BITS(flag, 16, 16)
  13183. #define WMI_PEER_STATS_MAX_AMSDU_SIZE_SET(flag, val) \
  13184. WMI_SET_BITS(flag, 0, 16, val)
  13185. #define WMI_PEER_STATS_MAX_AMSDU_SIZE_GET(flag) \
  13186. WMI_GET_BITS(flag, 0, 16)
  13187. /* bits 31:16 unused/reserved */
  13188. #define WMI_PEER_STATS_TX_FRAME_CTRL_SET(flag, val) \
  13189. WMI_SET_BITS(flag, 0, 16, val)
  13190. #define WMI_PEER_STATS_TX_FRAME_CTRL_GET(flag) \
  13191. WMI_GET_BITS(flag, 0, 16)
  13192. #define WMI_PEER_STATS_TX_QOS_CTRL_SET(flag, val) \
  13193. WMI_SET_BITS(flag, 16, 16, val)
  13194. #define WMI_PEER_STATS_TX_QOS_CTRL_GET(flag) \
  13195. WMI_GET_BITS(flag, 16, 16)
  13196. #define WMI_PEER_STATS_CONSEC_FAIL_SET(flag, val) \
  13197. WMI_SET_BITS(flag, 0, 16, val)
  13198. #define WMI_PEER_STATS_CONSEC_FAIL_GET(flag) \
  13199. WMI_GET_BITS(flag, 0, 16)
  13200. #define WMI_PEER_STATS_SUBFRAME_SIZE_SET(flag, val) \
  13201. WMI_SET_BITS(flag, 16, 16, val)
  13202. #define WMI_PEER_STATS_SUBFRAME_SIZE_GET(flag) \
  13203. WMI_GET_BITS(flag, 16, 16)
  13204. #define WMI_PEER_STATS_TX_FAIL_CNT_SET(flag, val) \
  13205. WMI_SET_BITS(flag, 0, 16, val)
  13206. #define WMI_PEER_STATS_TX_FAIL_CNT_GET(flag) \
  13207. WMI_GET_BITS(flag, 0, 16)
  13208. #define WMI_PEER_STATS_TX_PARTIAL_AID_SET(flag, val) \
  13209. WMI_SET_BITS(flag, 16, 16, val)
  13210. #define WMI_PEER_STATS_TX_PARTIAL_AID_GET(flag) \
  13211. WMI_GET_BITS(flag, 16, 16)
  13212. #define WMI_PEER_STATS_MAX_NSS_SET(flag, val) \
  13213. WMI_SET_BITS(flag, 0, 8, val)
  13214. #define WMI_PEER_STATS_MAX_NSS_GET(flag) \
  13215. WMI_GET_BITS(flag, 0, 8)
  13216. /* bits 31:8 unused/reserved */
  13217. #define WMI_PEER_STATS_DEL_RESP_TO_HOST_SET(flag, val) \
  13218. WMI_SET_BITS(flag, 0, 1, val)
  13219. #define WMI_PEER_STATS_DEL_RESP_TO_HOST_GET(flag) \
  13220. WMI_GET_BITS(flag, 0, 1)
  13221. #define WMI_PEER_STATS_DELETE_IN_PROGRESS_SET(flag, val) \
  13222. WMI_SET_BITS(flag, 1, 1, val)
  13223. #define WMI_PEER_STATS_DELETE_IN_PROGRESS_GET(flag) \
  13224. WMI_GET_BITS(flag, 1, 1)
  13225. #define WMI_PEER_STATS_MIGRATION_IN_PROGRESS_SET(flag, val) \
  13226. WMI_SET_BITS(flag, 2, 1, val)
  13227. #define WMI_PEER_STATS_MIGRATION_IN_PROGRESS_GET(flag) \
  13228. WMI_GET_BITS(flag, 2, 1)
  13229. #define WMI_PEER_STATS_CONN_STATE_SET(flag, val) \
  13230. WMI_SET_BITS(flag, 3, 4, val)
  13231. #define WMI_PEER_STATS_CONN_STATE_GET(flag) \
  13232. WMI_GET_BITS(flag, 3, 4)
  13233. #define WMI_PEER_STATS_TX_CHAIN_MASK_160_SET(flag, val) \
  13234. WMI_SET_BITS(flag, 8, 8, val)
  13235. #define WMI_PEER_STATS_TX_CHAIN_MASK_160_GET(flag) \
  13236. WMI_GET_BITS(flag, 8, 8)
  13237. #define WMI_PEER_STATS_TX_CHAIN_MASK_SET(flag, val) \
  13238. WMI_SET_BITS(flag, 16, 8, val)
  13239. #define WMI_PEER_STATS_TX_CHAIN_MASK_GET(flag) \
  13240. WMI_GET_BITS(flag, 16, 8)
  13241. #define WMI_PEER_STATS_ASSOC_CHAIN_MASK_SET(flag, val) \
  13242. WMI_SET_BITS(flag, 24, 8, val)
  13243. #define WMI_PEER_STATS_ASSOC_CHAIN_MASK_GET(flag) \
  13244. WMI_GET_BITS(flag, 24, 8)
  13245. #define WMI_PEER_STATS_QOS_NULL_OVER_WMI_SET(flag, val) \
  13246. WMI_SET_BITS(flag, 0, 1, val)
  13247. #define WMI_PEER_STATS_QOS_NULL_OVER_WMI_GET(flag) \
  13248. WMI_GET_BITS(flag, 0, 1)
  13249. #define WMI_PEER_STATS_NEW_ASSOC_SET(flag, val) \
  13250. WMI_SET_BITS(flag, 1, 1, val)
  13251. #define WMI_PEER_STATS_NEW_ASSOC_GET(flag) \
  13252. WMI_GET_BITS(flag, 1, 1)
  13253. #define WMI_PEER_STATS_TWT_FILT_FLAG_SET(flag, val) \
  13254. WMI_SET_BITS(flag, 2, 1, val)
  13255. #define WMI_PEER_STATS_TWT_FILT_FLAG_GET(flag) \
  13256. WMI_GET_BITS(flag, 2, 1)
  13257. #define WMI_PEER_STATS_TWT_REG_FLAG_SET(flag, val) \
  13258. WMI_SET_BITS(flag, 3, 1, val)
  13259. #define WMI_PEER_STATS_TWT_REG_FLAG_GET(flag) \
  13260. WMI_GET_BITS(flag, 3, 1)
  13261. #define WMI_PEER_STATS_WMM_UL_TRIG_FLAG_SET(flag, val) \
  13262. WMI_SET_BITS(flag, 4, 1, val)
  13263. #define WMI_PEER_STATS_WMM_UL_TRIG_FLAG_GET(flag) \
  13264. WMI_GET_BITS(flag, 4, 1)
  13265. #define WMI_PEER_STATS_ACTIVE_NOT_BA_TID_SET(flag, val) \
  13266. WMI_SET_BITS(flag, 5, 4, val)
  13267. #define WMI_PEER_STATS_ACTIVE_NOT_BA_TID_GET(flag) \
  13268. WMI_GET_BITS(flag, 5, 4)
  13269. /* bits 31:10 unused/reserved */
  13270. #define WMI_PEER_STATS_NUM_LINKS_SET(flag, val) \
  13271. WMI_SET_BITS(flag, 0, 2, val)
  13272. #define WMI_PEER_STATS_NUM_LINKS_GET(flag) \
  13273. WMI_GET_BITS(flag, 0, 2)
  13274. #define WMI_PEER_STATS_ML_PEER_ID_SET(flag, val) \
  13275. WMI_SET_BITS(flag, 2, 12, val)
  13276. #define WMI_PEER_STATS_ML_PEER_ID_GET(flag) \
  13277. WMI_GET_BITS(flag, 2, 12)
  13278. #define WMI_PEER_STATS_PRI_LINK_ID_SET(flag, val) \
  13279. WMI_SET_BITS(flag, 14, 3, val)
  13280. #define WMI_PEER_STATS_PRI_LINK_ID_GET(flag) \
  13281. WMI_GET_BITS(flag, 14, 3)
  13282. #define WMI_PEER_STATS_PRI_CHIP_ID_SET(flag, val) \
  13283. WMI_SET_BITS(flag, 17, 2, val)
  13284. #define WMI_PEER_STATS_PRI_CHIP_ID_GET(flag) \
  13285. WMI_GET_BITS(flag, 17, 2)
  13286. #define WMI_PEER_STATS_LINK_INIT_CNT_SET(flag, val) \
  13287. WMI_SET_BITS(flag, 19, 3, val)
  13288. #define WMI_PEER_STATS_LINK_INIT_CNT_GET(flag) \
  13289. WMI_GET_BITS(flag, 19, 3)
  13290. #define WMI_PEER_STATS_NUM_LOCAL_LINKS_SET(flag, val) \
  13291. WMI_SET_BITS(flag, 22, 2, val)
  13292. #define WMI_PEER_STATS_NUM_LOCAL_LINKS_GET(flag) \
  13293. WMI_GET_BITS(flag, 22, 2)
  13294. #define WMI_PEER_STATS_CHIPS_BITMAP_SET(flag, val) \
  13295. WMI_SET_BITS(flag, 24, 8, val)
  13296. #define WMI_PEER_STATS_CHIPS_BITMAP_GET(flag) \
  13297. WMI_GET_BITS(flag, 24, 8)
  13298. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_SET(flag, val) \
  13299. WMI_SET_BITS(flag, 0, 1, val)
  13300. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_GET(flag) \
  13301. WMI_GET_BITS(flag, 0, 1)
  13302. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_SET(flag, val) \
  13303. WMI_SET_BITS(flag, 1, 1, val)
  13304. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_GET(flag) \
  13305. WMI_GET_BITS(flag, 1, 1)
  13306. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_SET(flag, val) \
  13307. WMI_SET_BITS(flag, 2, 1, val)
  13308. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_GET(flag) \
  13309. WMI_GET_BITS(flag, 2, 1)
  13310. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_SET(flag, val) \
  13311. WMI_SET_BITS(flag, 3, 1, val)
  13312. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_GET(flag) \
  13313. WMI_GET_BITS(flag, 3, 1)
  13314. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_SET(flag, val) \
  13315. WMI_SET_BITS(flag, 4, 3, val)
  13316. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_GET(flag) \
  13317. WMI_GET_BITS(flag, 4, 3)
  13318. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_SET(flag, val) \
  13319. WMI_SET_BITS(flag, 7, 8, val)
  13320. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_GET(flag) \
  13321. WMI_GET_BITS(flag, 7, 8)
  13322. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_SET(flag, val) \
  13323. WMI_SET_BITS(flag, 15, 3, val)
  13324. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_GET(flag) \
  13325. WMI_GET_BITS(flag, 15, 3)
  13326. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_SET(flag, val) \
  13327. WMI_SET_BITS(flag, 18, 2, val)
  13328. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_GET(flag) \
  13329. WMI_GET_BITS(flag, 18, 2)
  13330. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_SET(flag, val) \
  13331. WMI_SET_BITS(flag, 20, 1, val)
  13332. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_GET(flag) \
  13333. WMI_GET_BITS(flag, 20, 1)
  13334. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_SET(flag, val) \
  13335. WMI_SET_BITS(flag, 21, 1, val)
  13336. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_GET(flag) \
  13337. WMI_GET_BITS(flag, 21, 1)
  13338. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_SET(flag, val) \
  13339. WMI_SET_BITS(flag, 22, 1, val)
  13340. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_GET(flag) \
  13341. WMI_GET_BITS(flag, 22, 1)
  13342. /* bits 31:23 unused/reserved */
  13343. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_SET(flag, val) \
  13344. WMI_SET_BITS(flag, 0, 16, val)
  13345. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_GET(flag) \
  13346. WMI_GET_BITS(flag, 0, 16)
  13347. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_SET(flag, val) \
  13348. WMI_SET_BITS(flag, 16, 8, val)
  13349. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_GET(flag) \
  13350. WMI_GET_BITS(flag, 16, 8)
  13351. /* bits 31:24 unused/reserved */
  13352. #define WMI_PEER_STATS_NSS_160_SET(flag, val) \
  13353. WMI_SET_BITS(flag, 0, 8, val)
  13354. #define WMI_PEER_STATS_NSS_160_GET(flag) \
  13355. WMI_GET_BITS(flag, 0, 8)
  13356. #define WMI_PEER_STATS_RC_PHYMODE_SET(flag, val) \
  13357. WMI_SET_BITS(flag, 8, 8, val)
  13358. #define WMI_PEER_STATS_RC_PHYMODE_GET(flag) \
  13359. WMI_GET_BITS(flag, 8, 8)
  13360. #define WMI_PEER_STATS_LEGACY_RATE_SET(flag, val) \
  13361. WMI_SET_BITS(flag, 16, 16, val)
  13362. #define WMI_PEER_STATS_LEGACY_RATE_GET(flag) \
  13363. WMI_GET_BITS(flag, 16, 16)
  13364. #define WMI_PEER_STATS_MIN_DATA_RATE_SET(flag, val) \
  13365. WMI_SET_BITS(flag, 0, 8, val)
  13366. #define WMI_PEER_STATS_MIN_DATA_RATE_GET(flag) \
  13367. WMI_GET_BITS(flag, 0, 8)
  13368. #define WMI_PEER_STATS_VHT_MAX_RATE_SET(flag, val) \
  13369. WMI_SET_BITS(flag, 8, 4, val)
  13370. #define WMI_PEER_STATS_VHT_MAX_RATE_GET(flag) \
  13371. WMI_GET_BITS(flag, 8, 4)
  13372. #define WMI_PEER_STATS_VHT_MAX_STREAMS_SET(flag, val) \
  13373. WMI_SET_BITS(flag, 12, 4, val)
  13374. #define WMI_PEER_STATS_VHT_MAX_STREAMS_GET(flag) \
  13375. WMI_GET_BITS(flag, 12, 4)
  13376. #define WMI_PEER_STATS_RC_CHAN_FREQ_SET(flag, val) \
  13377. WMI_SET_BITS(flag, 16, 16, val)
  13378. #define WMI_PEER_STATS_RC_CHAN_FREQ_GET(flag) \
  13379. WMI_GET_BITS(flag, 16, 16)
  13380. typedef struct {
  13381. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_cfr_stats_struct */
  13382. A_UINT32 tlv_header;
  13383. /* blanking_mode:
  13384. * blanking configuration. Refer to WMI_SCAN_BLANKING_MODE
  13385. */
  13386. A_UINT32 blanking_mode;
  13387. /* is_blanking_enabled:
  13388. * current blanking status. 0 = disabled, 1 = enabled
  13389. */
  13390. A_UINT32 is_blanking_enabled;
  13391. A_UINT32 gate_2g_enabled; /* 2.4GHZ gate pin state */
  13392. A_UINT32 gate_5g_enabled; /* 5GHz gate pin state */
  13393. A_UINT32 gate_6g_enabled; /* 6GHz gate pin state */
  13394. A_UINT32 blanking_count; /* scan radio blanking count */
  13395. A_UINT32 blanking_duration; /* scan radio blanking duration in us */
  13396. } wmi_ctrl_path_blanking_stats_struct;
  13397. typedef struct {
  13398. /** TLV tag and len; tag equals
  13399. * WMITLV_TAG_STRUC_wmi_ctrl_path_stats_event_fixed_param */
  13400. A_UINT32 tlv_header;
  13401. /** Request ID */
  13402. A_UINT32 request_id;
  13403. /** more flag
  13404. * 1 - More events sent after this event.
  13405. * 0 - no more events after this event.
  13406. */
  13407. A_UINT32 more;
  13408. /** status:
  13409. * The status field's value shows whether the WMI_REQUEST_CTRL_PATH_STATS
  13410. * request was completed successfully,
  13411. * 0 - status is success
  13412. * 1 - status is failure
  13413. */
  13414. A_UINT32 status;
  13415. /** This TLV is (optionally) followed by TLV arrays containing
  13416. * different types of stats:
  13417. * 1. wmi_ctrl_path_pdev_stats_struct ctrl_path_pdev_stats[];
  13418. * This TLV array contains zero or more pdev stats instances.
  13419. * 2. wmi_vdev_extd_stats vdev_extd_stats[];
  13420. * This TLV array contains zero or more vdev_extd_stats instances.
  13421. */
  13422. } wmi_ctrl_path_stats_event_fixed_param;
  13423. typedef struct {
  13424. /** TLV tag and len; tag equals
  13425. * WMITLV_TAG_STRUC_wmi_halphy_ctrl_path_stats_event_fixed_param
  13426. */
  13427. A_UINT32 tlv_header;
  13428. /** Process id requested */
  13429. A_UINT32 request_id;
  13430. /* end_of_event - single event or Multiple Event */
  13431. A_UINT32 end_of_event;
  13432. /*
  13433. * event_count - If Multiple Events are send, this is to identify
  13434. * particular event out of Multiple Events that are send to host
  13435. */
  13436. A_UINT32 event_count;
  13437. /** Pdev id requested */
  13438. A_UINT32 pdev_id;
  13439. } wmi_halphy_ctrl_path_stats_event_fixed_param;
  13440. typedef struct {
  13441. /** TLV tag and len; tag equals
  13442. * WMITLV_TAG_STRUC_wmi_radio_chan_stats */
  13443. A_UINT32 tlv_header;
  13444. /** primary channel freq of the channel whose stats is sent */
  13445. A_UINT32 chan_mhz;
  13446. /** accumulation of time the radio is tuned to this channel,
  13447. * in units of microseconds */
  13448. A_UINT32 on_chan_us;
  13449. /** accumulation of the TX PPDU duration over the measurement period,
  13450. * in units of microseconds */
  13451. A_UINT32 tx_duration_us;
  13452. /** accumulation of the RX PPDU duration over the measurement period,
  13453. * in units of microseconds */
  13454. A_UINT32 rx_duration_us;
  13455. /** ratio of channel busy time to on_chan_us, in units of percent */
  13456. A_UINT32 chan_busy_ratio;
  13457. /** ratio of on_chan_us to the measurement period, in units of percent */
  13458. A_UINT32 on_chan_ratio;
  13459. /** measurement period, in units of microseconds */
  13460. A_UINT32 measurement_period_us;
  13461. /** MPDUs transmitted on this channel */
  13462. A_UINT32 tx_mpdus;
  13463. /** MSDUs transmitted on this channel */
  13464. A_UINT32 tx_msdus;
  13465. /** MPDUS successfully received on this channel */
  13466. A_UINT32 rx_succ_mpdus;
  13467. /** Failed MPDUs (CRC failures) received on this channel */
  13468. A_UINT32 rx_fail_mpdus;
  13469. } wmi_radio_chan_stats;
  13470. typedef struct {
  13471. /** TLV tag and len; tag equals
  13472. * WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param */
  13473. A_UINT32 tlv_header;
  13474. /** number of channel stats in radio_chan_stats[] */
  13475. A_UINT32 num_chans;
  13476. /* This TLV is followed by another TLV of array of structs
  13477. * wmi_radio_chan_stats radio_chan_stats[];
  13478. */
  13479. } wmi_radio_chan_stats_event_fixed_param;
  13480. /**
  13481. * PDEV statistics
  13482. *
  13483. * This struct incorporates the wlan_dbg_stats struct, which is
  13484. * conditionally defined, based on the AR900B flag.
  13485. * The below _v1 struct variant is the unconditional definition
  13486. * that matches what would be conditionally defined by builds that
  13487. * don't use the AR900B flag. The _v2 struct variant is the
  13488. * unconditional definition that matches what would be conditionally
  13489. * defined by builds that use the AR900B flag.
  13490. * The _v2 struct def can be used within host or target builds
  13491. * that don't use the AR900B flag, but needs to interoperate with a
  13492. * target or host build that does use the AR900B flag.
  13493. * Similarly, the _v1 struct def can be used by a host or target build
  13494. * that does use the AR900B flag, but needs to interoperate with a
  13495. * target or host build that doesn't use the AR900B flag.
  13496. *
  13497. * For backwards compatibility, wmi_pdev_stats is still (conditionally)
  13498. * defined, as an alias for either the _v1 or _v2 variant.
  13499. */
  13500. typedef struct {
  13501. /** Channel noise floor */
  13502. A_INT32 chan_nf;
  13503. /** TX frame count */
  13504. A_UINT32 tx_frame_count;
  13505. /** RX frame count */
  13506. A_UINT32 rx_frame_count;
  13507. /** rx clear count */
  13508. A_UINT32 rx_clear_count;
  13509. /** cycle count */
  13510. A_UINT32 cycle_count;
  13511. /** Phy error count */
  13512. A_UINT32 phy_err_count;
  13513. /** Channel Tx Power */
  13514. A_UINT32 chan_tx_pwr;
  13515. /** WAL dbg stats */
  13516. struct wlan_dbg_stats_v1 pdev_stats;
  13517. } wmi_pdev_stats_v1;
  13518. typedef struct {
  13519. /** Channel noise floor */
  13520. A_INT32 chan_nf;
  13521. /** TX frame count */
  13522. A_UINT32 tx_frame_count;
  13523. /** RX frame count */
  13524. A_UINT32 rx_frame_count;
  13525. /** rx clear count */
  13526. A_UINT32 rx_clear_count;
  13527. /** cycle count */
  13528. A_UINT32 cycle_count;
  13529. /** Phy error count */
  13530. A_UINT32 phy_err_count;
  13531. /** Channel Tx Power */
  13532. A_UINT32 chan_tx_pwr;
  13533. /** WAL dbg stats */
  13534. struct wlan_dbg_stats_v2 pdev_stats;
  13535. } wmi_pdev_stats_v2;
  13536. #if defined(AR900B)
  13537. #define wmi_pdev_stats wmi_pdev_stats_v2
  13538. #else
  13539. #define wmi_pdev_stats wmi_pdev_stats_v1
  13540. #endif
  13541. /**
  13542. * pdev extension statistics
  13543. */
  13544. typedef struct {
  13545. A_UINT32 tlv_header;
  13546. /* pdev id */
  13547. A_UINT32 pdev_id;
  13548. /** my_rx_count
  13549. * What portion of time, as measured by the MAC HW clock was occupied
  13550. * by receiving PPDUs addressed to one of the vdevs within this pdev.
  13551. */
  13552. A_UINT32 my_rx_count;
  13553. /** rx_matched_11ax_msdu_cnt
  13554. * number of Rx 11ax MSDUs with matching BSS color counter
  13555. * updated at EOP (end of packet)
  13556. */
  13557. A_UINT32 rx_matched_11ax_msdu_cnt;
  13558. /** rx_other_11ax_msdu_cnt
  13559. * number of Rx 11ax MSDUs with other BSS color counter updated at EOP
  13560. * (end of packet)
  13561. */
  13562. A_UINT32 rx_other_11ax_msdu_cnt;
  13563. } wmi_pdev_extd_stats;
  13564. /**
  13565. * pdev telemetry statistics
  13566. */
  13567. typedef struct{
  13568. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_telemetry_stats */
  13569. A_UINT32 pdev_id;
  13570. /*
  13571. * Average channel latency per AC, units in micro seconds.
  13572. * avg_chan_lat_per_ac[0] : AC_VO
  13573. * avg_chan_lat_per_ac[1] : AC_VI
  13574. * avg_chan_lat_per_ac[2] : AC_BE
  13575. * avg_chan_lat_per_ac[3] : AC_BK
  13576. */
  13577. A_UINT32 avg_chan_lat_per_ac[WMI_AC_MAX];
  13578. /*
  13579. * Percentage of air time available for each AC, units in percentage.
  13580. * BIT[0-7] : AC_BE
  13581. * BIT[8-15] : AC_BK
  13582. * BIT[16-23] : AC_VI
  13583. * BIT[24-31] : AC_VO
  13584. * Please refer to WMI_ESP_ESTIMATE_GET_* and WMI_ESP_ESTIMATE_SET_* macros
  13585. * to retrieve values for each access category in estimated_air_time_per_ac.
  13586. */
  13587. A_UINT32 estimated_air_time_per_ac;
  13588. } wmi_pdev_telemetry_stats;
  13589. /**
  13590. * VDEV statistics
  13591. * @todo
  13592. * add all VDEV stats here
  13593. */
  13594. typedef struct {
  13595. A_INT32 bcn_snr;
  13596. A_INT32 dat_snr;
  13597. } wmi_snr_info;
  13598. typedef struct {
  13599. /** unique id identifying the VDEV, generated by the caller */
  13600. A_UINT32 vdev_id;
  13601. wmi_snr_info vdev_snr;
  13602. 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) */
  13603. A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
  13604. A_UINT32 multiple_retry_cnt[WLAN_MAX_AC]; /* The number of MSDU packets and MMPDU frames per AC
  13605. that the 802.11 station successfully transmitted after more than one retransmission attempt */
  13606. A_UINT32 fail_cnt[WLAN_MAX_AC]; /* Total number packets(per AC) failed to transmit */
  13607. A_UINT32 rts_fail_cnt; /* Total number of RTS/CTS sequence failures for transmission of a packet */
  13608. A_UINT32 rts_succ_cnt; /* Total number of RTS/CTS sequence success for transmission of a packet */
  13609. A_UINT32 rx_err_cnt; /* The receive error count. HAL will provide the RxP FCS error global */
  13610. A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
  13611. A_UINT32 ack_fail_cnt; /* Total number packets failed transmit because of no ACK from the remote entity */
  13612. A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES];/*History of last ten transmit rate, in units of 500 kbit/sec */
  13613. A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES];/*History of last ten Beacon RSSI of the connected Bss */
  13614. } wmi_vdev_stats;
  13615. /*
  13616. * vdev ext stats with additional bcn stats
  13617. * (Due to backward compatibility requirements, these new stats fields cannot be
  13618. * added inside wmi_vdev_stats.)
  13619. */
  13620. typedef struct {
  13621. A_UINT32 vdev_id;
  13622. A_UINT32 tx_bcn_succ_cnt; /* Total number of beacon frame transmitted successfully */
  13623. A_UINT32 tx_bcn_outage_cnt; /* Total number of failed beacons */
  13624. } wmi_bcn_stats;
  13625. #define WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_BIT 0
  13626. #define WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_MASK \
  13627. (1 << WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_BIT)
  13628. #define WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_BIT 1
  13629. #define WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_MASK \
  13630. (1 << WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_BIT)
  13631. /**
  13632. * vdev extension statistics
  13633. */
  13634. typedef struct {
  13635. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_vdev_extd_stats */
  13636. A_UINT32 tlv_header;
  13637. /* vdev id */
  13638. A_UINT32 vdev_id;
  13639. /* Total number of Fils Discovery frames transmitted successfully */
  13640. A_UINT32 fd_succ_cnt;
  13641. /* Total number of Fils Discovery frames failed */
  13642. A_UINT32 fd_fail_cnt;
  13643. /* Total number of unsolicited probe response frames transmitted successfully */
  13644. A_UINT32 unsolicited_prb_succ_cnt;
  13645. /* Total number of unsolicited probe response frames failed */
  13646. A_UINT32 unsolicited_prb_fail_cnt;
  13647. /* vdev info flags:
  13648. * bit 0: WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID,
  13649. * 0: the "is link active" flag is not valid
  13650. * 1: the "is link active" flag is valid
  13651. * bit 1: WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE,
  13652. * 1:link_active; 0:link_inactive
  13653. * Refer to WMI_VDEV_STATS_FLAGS_ defs.
  13654. */
  13655. A_UINT32 flags;
  13656. A_INT32 vdev_tx_power; /* dBm units */
  13657. } wmi_vdev_extd_stats;
  13658. /**
  13659. * Vdev debug stats to be used for wmi control path stats.
  13660. * This is an extension to vdev_extd_stats,
  13661. * vdev_extd_stats display is part of apstats.
  13662. */
  13663. typedef struct {
  13664. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_vdev_stats_struct */
  13665. A_UINT32 tlv_header;
  13666. /* vdev id */
  13667. A_UINT32 vdev_id;
  13668. /** opaque_debug_wal_vdev_flags:
  13669. * This will contain the value from wal_vdev wal vdev flags for vdev state
  13670. */
  13671. A_UINT32 opaque_debug_wal_vdev_flags;
  13672. /** control flags for this vdev */
  13673. A_UINT32 opaque_debug_vdev_flags;
  13674. /** vdevid of transmitted AP (mbssid case) */
  13675. A_UINT32 opaque_debug_vdevid_trans;
  13676. /** opaque_debug_profile_idx:
  13677. * the profile index of the connected non-trans ap (mbssid case).
  13678. * 0 means invalid.
  13679. */
  13680. A_UINT32 opaque_debug_profile_idx;
  13681. /** opaque_debug_profile_num:
  13682. * the total profile numbers of non-trans aps (mbssid case).
  13683. * 0 means legacy AP.
  13684. */
  13685. A_UINT32 opaque_debug_profile_num;
  13686. /* Contains the value of multi_vdev_restart status */
  13687. A_UINT32 opaque_debug_multi_vdev_restart;
  13688. /* Contains the value of created mac_id from wal_vdev */
  13689. A_UINT32 opaque_debug_created_mac_id;
  13690. /* Contains the value of consecutive count of the leaky AP */
  13691. A_UINT32 opaque_debug_consec_detect_leaky_ap_cnt;
  13692. /* Contains the value of Vdev manager debug flags */
  13693. A_UINT32 opaque_debug_vdev_mgr_dbg_flags;
  13694. /* Contains the value of max vdev pause delay in microseconds */
  13695. A_UINT32 opaque_debug_max_pause_delay_us;
  13696. /* opaque_debug_sta_offset:
  13697. * Contains the value of the offset of vdev TSF with BI (vdev_tsf%BI)
  13698. * for STA vdev.
  13699. */
  13700. A_UINT32 opaque_debug_sta_offset;
  13701. /* Contains the value of vdev pn sequence receive filter */
  13702. A_UINT32 opaque_debug_vdev_pn_rx_filter;
  13703. /* Contains the value of config params */
  13704. A_UINT32 opaque_debug_traffic_config;
  13705. /* opaque_debug_he_bss_rts_thld_tu:
  13706. * Contains Period of time in units for a non-AP STA to reserve the medium.
  13707. */
  13708. A_UINT32 opaque_debug_he_bss_rts_thld_tu;
  13709. /* opaque_debug_rts_threshold:
  13710. * Contains the value of Request to Send (RTS) Threshold of the packet size.
  13711. */
  13712. A_UINT32 opaque_debug_rts_threshold; /* dot11RTSThreshold */
  13713. /* Contains the value of Tx failure count threshold */
  13714. A_UINT32 opaque_debug_tx_fail_cnt_thres;
  13715. /* Contains the value of ratio = HI_WORD/LO_WORD */
  13716. A_UINT32 opaque_debug_mu_edca_sifs_ratio;
  13717. /* opaque_debug_kickout_th:
  13718. * Contains the value of kickout threshold that denotes units of
  13719. * lost block acks of consecutive tx failure threshold.
  13720. */
  13721. A_UINT32 opaque_debug_kickout_th;
  13722. /* opaque_debug_rate_dd_bmap:
  13723. * Contains the value of per vap config related to VAP aggregation
  13724. * of ratectrl drop-down limits.
  13725. */
  13726. A_UINT32 opaque_debug_rate_dd_bmap;
  13727. /* Contains the value of Maximum Transmission Unit frame size */
  13728. A_UINT32 opaque_debug_mtu_size;
  13729. /* Contains the value of vdev event bitmap from wal_vdev */
  13730. A_UINT32 opaque_debug_event_bitmap;
  13731. /* Contains the value of peer event bitmap from wal_vdev */
  13732. A_UINT32 opaque_debug_peer_event_bitmap;
  13733. /* Contains the value of Sched config of vdev allowed time during ATF */
  13734. A_UINT32 opaque_debug_atf_vdev_allowed_time;
  13735. /* opaque_debug_atf_vdev_used_unallocated_time:
  13736. * Contains the value of Sched config of vdev used unallocated time
  13737. * during ATF.
  13738. */
  13739. A_UINT32 opaque_debug_atf_vdev_used_unallocated_time;
  13740. /* Contains the value of Sched config of vdev unused time during ATF */
  13741. A_UINT32 opaque_debug_atf_vdev_unused_time;
  13742. /* Contains the value of Carrier frequency offset last programmed time */
  13743. A_UINT32 opaque_debug_last_prog_time;
  13744. /* Contains the value of Carrier frequency offset last receive time */
  13745. A_UINT32 opaque_debug_last_recv_time;
  13746. /* Contains the value of Packet count of received frames on the channel */
  13747. A_UINT32 opaque_debug_rx_pkt_on_channel;
  13748. /* Contains the value of Target beacon transmission time offset value */
  13749. A_UINT32 opaque_debug_tbtt_offset;
  13750. /* Contains the value of tid pause bitmap of the peer from wal_vdev */
  13751. A_UINT32 opaque_debug_peer_all_tid_pause_bitmap;
  13752. /* Contains the value of tid block bitmap of the peer from wal_vdev */
  13753. A_UINT32 opaque_debug_peer_all_tid_block_bitmap;
  13754. /* Contains the value of tdls peer kickout threshold */
  13755. A_UINT32 opaque_debug_tdls_peer_kickout_th;
  13756. /* opaque_debug_num_of_remote_peers_connected:
  13757. * Contains the value of num_of_remote_peers_connected;
  13758. * Below field is valid only for AP vap.
  13759. */
  13760. A_UINT32 opaque_debug_num_of_remote_peers_connected;
  13761. /* Contains the value of num of Multi group key support */
  13762. A_UINT32 opaque_debug_num_group_key_enabled;
  13763. /* Contains the value of delete all peer command flags */
  13764. A_UINT32 opaque_debug_delete_all_peer_flags;
  13765. /* Contains the value of Keepalive ARP sender address time */
  13766. A_UINT32 opaque_debug_keepalive_arp_sender_ipv4;
  13767. /* Contains the value of Keepalive ARP Target address time */
  13768. A_UINT32 opaque_debug_keepalive_arp_target_ipv4;
  13769. /* Contains the value of Keepalive interval duration time */
  13770. A_UINT32 opaque_debug_keepalive_interval;
  13771. /* Contains the value of Keepalive start timer timestamp */
  13772. A_UINT32 opaque_debug_keepalive_timer_start_timestamp;
  13773. /* Contains the value of max idle interval and status of STA */
  13774. A_UINT32 opaque_debug_sta_maxidle_interval;
  13775. A_UINT32 opaque_debug_sta_maxidle_method;
  13776. /* Contains the value of Timing synchronization function (TSF) time diff */
  13777. A_UINT32 opaque_debug_tsf_curr_time_diff;
  13778. /* opaque_debug_sleep_duration_us:
  13779. * Contains the value of Time in microsends to detect sleep duration
  13780. * of the client.
  13781. */
  13782. A_UINT32 opaque_debug_sleep_duration_us;
  13783. /* Contains the value of pause start time and to calculate pause delay */
  13784. A_UINT32 opaque_debug_pause_start_time_us;
  13785. A_UINT32 opaque_debug_pause_delay_us;
  13786. /* Contains the value of number of supported group key */
  13787. A_UINT32 opaque_debug_num_supported_group_key;
  13788. /* opaque_debug_avg_data_null_tx_delay:
  13789. * Contains the value of Average time taken to calculate data frame
  13790. * tx delay.
  13791. */
  13792. A_UINT32 opaque_debug_avg_data_null_tx_delay;
  13793. /* opaque_debug_avg_rx_leak_window:
  13794. * Contains the value of Average time taken to calculate data frame
  13795. * in receive window.
  13796. */
  13797. A_UINT32 opaque_debug_avg_rx_leak_window;
  13798. /* Contains the value of count for number of received deauth frames */
  13799. A_UINT32 opaque_debug_num_recv_deauth;
  13800. /* Contains the value of Beacon interval in microseconds */
  13801. A_UINT32 opaque_debug_bcn_intval_us;
  13802. /* opaque_debug_fils_period
  13803. * Contains the value of us, period configured through
  13804. * WMI_ENABLE_FILS_CMDID.
  13805. */
  13806. A_UINT32 opaque_debug_fils_period;
  13807. /* Contains the value of previous Timing synchronization function (TSF) */
  13808. A_UINT32 opaque_debug_prev_tsf;
  13809. /* Contains the value of time taken during client sleep */
  13810. A_UINT32 opaque_debug_sleep_entry_time;
  13811. /* Contains the value of Total sleep duration from wal_vdev */
  13812. A_UINT32 opaque_debug_tot_sleep_dur;
  13813. /* Contains the value of Vdev pause bitmap from wal_vdev */
  13814. A_UINT32 opaque_debug_pause_bitmap;
  13815. /* opaque_debug_last_send_to_host_deauth_tsf:
  13816. * Contains the value of Last TSF time last_send_to_host_deauth_tsf
  13817. * from wlan_vdev.
  13818. */
  13819. A_UINT32 opaque_debug_last_send_to_host_deauth_tsf;
  13820. /* Contains the value of debug_short_ssid from wlan_vdev */
  13821. A_UINT32 opaque_debug_short_ssid;
  13822. /* Bitfield macro's expansion variables */
  13823. /* opaque_debug_vdev_amsdu_bitfield:
  13824. * bit 7:0 - Contains the value of dis_dyn_bw_rts from wlan_vdev,
  13825. * 15:8 - max_amsdu,
  13826. * 23:16 - def_amsdu,
  13827. * 31:24 - he_bss_color
  13828. */
  13829. A_UINT32 opaque_debug_vdev_amsdu_bitfield;
  13830. /* opaque_debug_vdev_ac_failure_configs:
  13831. * bit 7:0 - Contains the value of dhe_def_pe_duratio from wal_vdev,
  13832. * 15:8 - minimum_allowed_mcs,
  13833. * 23:16 - max_11ac_to_leg_rts_fallback_th,
  13834. * 31:24 - max_11ac_rts_consec_failure_th
  13835. */
  13836. A_UINT32 opaque_debug_vdev_ac_failure_configs;
  13837. /* opaque_debug_vdev_pkt_type_info:
  13838. * bit 7:0 - Contains the value of input_pkt_type from wal_vdev,
  13839. * 15:8 - recv_pkt_type,
  13840. * 23:16 - disable_intra_fwd,
  13841. * 31:24 - ps_awake
  13842. */
  13843. A_UINT32 opaque_debug_vdev_pkt_type_info;
  13844. /* opaque_debug_vdev_ba_param_bitfield:
  13845. * bit 7:0 - Contains the value of snr_cal_count from wal_vdev,
  13846. * 15:8 - amsdu_auto_enable,
  13847. * 23:16 - param_ba_timeout,
  13848. * 31:24 - param_ba_buffer_size
  13849. */
  13850. A_UINT32 opaque_debug_vdev_ba_param_bitfield;
  13851. /* opaque_debug_vdev_aggr_bitfield:
  13852. * bit 7:0 - Contains the value of param_amsdu_support from wal_vdev,
  13853. * 15:8 - param_ba_retry_max,
  13854. * 23:16 - tx_aggr_size,
  13855. * 31:24 - rx_aggr_size
  13856. */
  13857. A_UINT32 opaque_debug_vdev_aggr_bitfield;
  13858. /* opaque_debug_vdev_event_delivery:
  13859. * bit 7:0 - Contains the value of tqm_bypass_enabled from wal_vdev,
  13860. * 15:8 - wmmac_timer_vote_cnt,
  13861. * 23:16 - peer_event_delivery_in_progress,
  13862. * 31:24 - vdev_event_delivery_in_progress
  13863. */
  13864. A_UINT32 opaque_debug_vdev_event_delivery;
  13865. /* opaque_debug_vdev_cap_slot_bitfield:
  13866. * bit 7:0 - Contains the value of bcn_max_slot from wal_vdev,
  13867. * 15:8 - bcn_curr_slot,
  13868. * 23:16 - mgmt_tx_power,
  13869. * 31:24 - mbssid_capable_association
  13870. */
  13871. A_UINT32 opaque_debug_vdev_cap_slot_bitfield;
  13872. /* opaque_debug_vdev_bcn_configs:
  13873. * bit 7:0 - Contains the value of mbssid_txbssid_association from
  13874. * wal_vdev,
  13875. * 15:8 - consec_beacon_skip,
  13876. * 23:16 - consec_beacon_skip_cnt,
  13877. * 31:24 - max_consec_beacon_skip
  13878. */
  13879. A_UINT32 opaque_debug_vdev_bcn_configs;
  13880. /* Contains the value of opaque_debug_vdev_cmd_info */
  13881. A_UINT32 opaque_debug_vdev_cmd_info;
  13882. /* opaque_debug_vdev_mac_configs:
  13883. * bit 7:0 - Contains the value of pause_cnt from wlan_vdev,
  13884. * 15:8 - e_mac_id,
  13885. * 23:16 - is_transmit_bssid,
  13886. * 31:24 - rts_rc_flag
  13887. */
  13888. A_UINT32 opaque_debug_vdev_mac_configs;
  13889. /* opaque_debug_vdev_mode_configs:
  13890. * bit 7:0 - Contains the value of ic_opmode from wlan_vdev,
  13891. * 15:8 - ic_subopmode,
  13892. * 23:16 - ic_curmode,
  13893. * 31:24 - vdev_up_cmd_cnt
  13894. */
  13895. A_UINT32 opaque_debug_vdev_mode_configs;
  13896. /* opaque_debug_vdev_keepalive_bitfields:
  13897. * bit 7:0 - keepalive_method
  13898. * 15:8 - keepalive_prohibit_data_mgmt
  13899. * 23:16 - resp_type
  13900. * 31:24 - ap_detect_out_of_sync_sleeping_sta_time_secs
  13901. */
  13902. A_UINT32 opaque_debug_vdev_keepalive_bitfields;
  13903. /* opaque_debug_vdev_bcn_drift_info:
  13904. * bit 7:0 - bcn_drift_cnt
  13905. * 15:8 - bcn_drift_calibration
  13906. * 23:16 - rts_cts_default
  13907. * 31:24 - vdev_down_cmd_cnt
  13908. */
  13909. A_UINT32 opaque_debug_vdev_bcn_drift_info;
  13910. /* opaque_debug_vdev_arp_configs:
  13911. * bit 7:0 - Contains the value of tbtt_link_type from wlan_vdev,
  13912. * 15:8 - is_arp_in_air,
  13913. * 23:16 - is_ns_in_air,
  13914. * 31:24 - num_of_keepalive_attempts
  13915. */
  13916. A_UINT32 opaque_debug_vdev_arp_configs;
  13917. /* opaque_debug_vdev_streams_configs:
  13918. * bit 7:0 - n_beacons_since_last_rssi_report
  13919. * 15:8 - num_ofld_peer_alloced
  13920. * 23:16 - preferred_tx_streams
  13921. * 31:24 - preferred_rx_streams
  13922. */
  13923. A_UINT32 opaque_debug_vdev_streams_configs;
  13924. /* opaque_debug_vdev_chains_configs:
  13925. * bit 7:0 - Contains the value of preferred_tx_streams_160 from
  13926. * wlan_vdev,
  13927. * 15:8 - preferred_rx_streams_160,
  13928. * 23:16 - tx_chains_num_11b,
  13929. * 31:24 - tx_chains_num_11ag
  13930. */
  13931. A_UINT32 opaque_debug_vdev_chains_configs;
  13932. /* opaque_debug_vdev_power_cap_configs:
  13933. * bit 7:0 - Contains the value of supp_op_cls_ie_len from wlan_vdev,
  13934. * 15:8 - rm_en_cap_ie_len,
  13935. * 23:16 - power_cap_ie_len,
  13936. * 31:24 - supp_channel_ie_len
  13937. */
  13938. A_UINT32 opaque_debug_vdev_power_cap_configs;
  13939. /* opaque_debug_vdev_wmm_mbo_configs:
  13940. * bit 7:0 - Contains the value of wmm_tspec_ie_len from wlan_vdev,
  13941. * 15:8 - ccx_version_ie_len,
  13942. * 23:16 - extn_dh_ie_len,
  13943. * 31:24 - mbo_ie_len
  13944. */
  13945. A_UINT32 opaque_debug_vdev_wmm_mbo_configs;
  13946. /* opaque_debug_vdev_remote_configs:
  13947. * bit 7:0 - Contains the value of rsnxe_ie_len from wlan_vdev,
  13948. * 15:8 - remote_peer_cnt
  13949. * 23:16 - p2p_cli_pause_type
  13950. * 31:24 - mu_edca_update_count
  13951. */
  13952. A_UINT32 opaque_debug_vdev_remote_configs;
  13953. /* opaque_debug_vdev_stats_id_configs:
  13954. * bit 7:0 - vdev_stats_id
  13955. * 15:8 - vdev_stats_id_valid
  13956. * 23:16 - preferred_tx_streams_320
  13957. * 31:24 - preferred_rx_streams_320
  13958. */
  13959. A_UINT32 opaque_debug_vdev_stats_id_configs;
  13960. /* opaque_debug_vdev_assoc_peer_configs:
  13961. * bit 7:0 - unused / reserved
  13962. * 15:8 - group_cipher
  13963. * 31:16 - assoc_id
  13964. */
  13965. A_UINT32 opaque_debug_vdev_assoc_peer_configs;
  13966. /* opaque_debug_vdev_mhz_fils_configs:
  13967. * bit 15:0 - Contains the value of bss_channel_mhz from wal_vdev,
  13968. * 31:16 - config_fils_period
  13969. */
  13970. A_UINT32 opaque_debug_vdev_mhz_fils_configs;
  13971. /* opaque_debug_vdev_fils_period:
  13972. * bit 15:0 - Contains the value of calc_fils_period from wal_vdev,
  13973. * 31:16 - ic_txseqs_cmn
  13974. */
  13975. A_UINT32 opaque_debug_vdev_fils_period;
  13976. /* opaque_debug_vdev_inactive_time:
  13977. * bit 15:0 - Contains the value of
  13978. * ap_keepalive_min_idle_inactive_time_secs from wlan_vdev,
  13979. * 31:16 - ap_keepalive_max_idle_inactive_time_secs
  13980. */
  13981. A_UINT32 opaque_debug_vdev_inactive_time;
  13982. /* opaque_debug_vdev_chain_mask_configs:
  13983. * bit 15:0 - Contains the value of
  13984. * ap_keepalive_max_unresponsive_time_secs from wlan_vdev,
  13985. * 31:16 - chain_mask
  13986. */
  13987. A_UINT32 opaque_debug_vdev_chain_mask_configs;
  13988. /* opaque_debug_vdev_ie_len_configs:
  13989. * bit 15:0 - num_mcast_filters
  13990. * 31:16 - ext_cap_ie_len
  13991. */
  13992. A_UINT32 opaque_debug_vdev_ie_len_configs;
  13993. /* opaque_debug_vdev_fils_configs:
  13994. * bit 15:0 - Contains the value of fils_channel_guard_time from wlan_vdev,
  13995. * 31:16 - fd_tmpl_len
  13996. */
  13997. A_UINT32 opaque_debug_vdev_fils_configs;
  13998. /* opaque_debug_vdev_chan_configs:
  13999. * bit 15:0 - Contains the value of common_rsn_caps from wlan_vdev,
  14000. * 31:16 - off_ch_active_dwell_time
  14001. */
  14002. A_UINT32 opaque_debug_vdev_chan_configs;
  14003. /* opaque_debug_vdev_dwell_configs:
  14004. * bit 15:0 - Contains the value of off_ch_passive_dwell_time from
  14005. * wlan_vdev,
  14006. * 31:16 - current_pause_request_id
  14007. */
  14008. A_UINT32 opaque_debug_vdev_dwell_configs;
  14009. /* opaque_debug_vdev_wmi_configs:
  14010. * bit 0 - Contains the value of hide_ssid_enable from wlan_vdev,
  14011. * 1 - b_none_protocol_paused
  14012. * 2 - dpd_cal_state
  14013. * 4 - req_bcn_q_unpause
  14014. * 5 - bt_coex_enable_cts2s
  14015. * 6 - dpd_delay_n_beacon
  14016. * 8 - b_need_check_first_beacon
  14017. * 9 - ap_peer_keepalive_max_idle_time_reached
  14018. * 10 - leakyap_cts2s_enable
  14019. * 11 - stasapscc_in_mcc
  14020. * 12 - stasapscc_in_mcc_cts2s_enable
  14021. * 13 - is_vdev_stopping
  14022. * 14 - is_wmi_vdev_down
  14023. * 15 - is_vdev_down_pending
  14024. * 16 - vdev_delete_in_progress
  14025. * 17 - cac_enabled
  14026. * 18 - is_quaterrate
  14027. * 19 - is_halfrate
  14028. * 20 - stop_resp_event_blocked
  14029. * 21 - use_enhanced_mcast_filter
  14030. * 22 - is_start_pending_on_asm
  14031. * 23 - no_null_to_ap_for_roaming
  14032. * 24 - is_loopback_cal_pending
  14033. * 25 - vdev_delete_acked
  14034. * 26 - bc_proberesp_enable
  14035. * 27 - is_wmm_param
  14036. * 28 - is_connect_in_progress
  14037. * 29 - is_mu_edca_param
  14038. * 30 - send_del_resp_tohost
  14039. * 31 - is_restart_different_ch
  14040. */
  14041. A_UINT32 opaque_debug_vdev_wmi_configs;
  14042. /* opaque_debug_vdev_hu_mu_configs:
  14043. * bit 0 - Contains the value of proto_ps_status from wlan_vdev,
  14044. * 1 - smps_intolerant
  14045. * 2 - is_offload_registered_for_connection
  14046. * 3 - is_bss_beacon_offload_registered
  14047. * 4 - is_prob_resp_offload_registered
  14048. * 5 - is_ibss_beacon_offload_registered
  14049. * 6 - is_keepalive_attempts_exhausted
  14050. * 7 - is_bcn_tx_ie_changed_log
  14051. * 8 - he_su_bfee
  14052. * 9 - he_su_bfer
  14053. * 10 - he_mu_bfee
  14054. * 11 - he_mu_bfer
  14055. * 12 - he_dl_ofdma
  14056. * 13 - he_ul_ofdma
  14057. * 14 - he_ul_mumimo
  14058. * 15 - ul_mu_resp
  14059. * 23:16 - alt_rssi_non_srg
  14060. * 31:24 - alt_rssi_srg
  14061. */
  14062. A_UINT32 opaque_debug_vdev_hu_mu_configs;
  14063. /* opaque_debug_vdev_sm_chan_configs:
  14064. * bit 0 - Contains the value of he_bss_color_en from wlan_vdev,
  14065. * 1 - he_txbf_ofdma
  14066. * 2 - non_srg_enable
  14067. * 3 - srg_enable
  14068. * 4 - srp_enable
  14069. * 5 - sr_initialized
  14070. * 6 - sr_rings_initialized
  14071. * 10:7 - per_ac_obss_pd_enable
  14072. * 11 - ifup
  14073. * 12 - ifactive
  14074. * 13 - ifpaused
  14075. * 14 - ifoutofsync
  14076. * 15 - is_free
  14077. * 16 - is_nawds
  14078. * 17 - hw_flag
  14079. * 18 - ch_req_flag
  14080. * 20 - restart_resp
  14081. * 21 - first_beacon_recv_wait
  14082. * 22 - erpenabled
  14083. * 23 - start_responded
  14084. * 24 - bcn_sync_crit_req_act
  14085. * 25 - recal_notif_registered
  14086. * 26 - bcn_tx_paused
  14087. * 27 - he_bss_color_en_bypass
  14088. * 28 - default_ba_mode
  14089. * 29 - ba_256_bitmap_enable
  14090. * 30 - ba_256_bitmap_tx_disable
  14091. * 31 - is_multi_group_key_enabled
  14092. */
  14093. A_UINT32 opaque_debug_vdev_sm_chan_configs;
  14094. /*
  14095. * The following 4 opaque_debug variables are provided purely for
  14096. * debugging by technicians who have outside knowledge of what kind of
  14097. * values the target has placed into these fields.
  14098. * The host must not interpret the values of these fields, since the
  14099. * meaning of the values provided in these fields may change without
  14100. * regard for backwards compatibility or interoperability.
  14101. */
  14102. A_UINT32 opaque_debug_field_1;
  14103. A_UINT32 opaque_debug_field_2;
  14104. A_UINT32 opaque_debug_field_3;
  14105. A_UINT32 opaque_debug_field_4;
  14106. } wmi_ctrl_path_vdev_stats_struct;
  14107. #define WMI_VDEV_STATS_DIS_DYN_BW_RTS_SET(flag, val) \
  14108. WMI_SET_BITS(flag, 0, 8, val)
  14109. #define WMI_VDEV_STATS_DIS_DYN_BW_RTS_GET(flag) \
  14110. WMI_GET_BITS(flag, 0, 8)
  14111. #define WMI_VDEV_STATS_MAX_AMSDU_SET(flag, val) \
  14112. WMI_SET_BITS(flag, 8, 8, val)
  14113. #define WMI_VDEV_STATS_MAX_AMSDU_GET(flag) \
  14114. WMI_GET_BITS(flag, 8, 8)
  14115. #define WMI_VDEV_STATS_DEF_AMSDU_SET(flag, val) \
  14116. WMI_SET_BITS(flag, 16, 8, val)
  14117. #define WMI_VDEV_STATS_DEF_AMSDU_GET(flag) \
  14118. WMI_GET_BITS(flag, 16, 8)
  14119. #define WMI_VDEV_STATS_HW_BSS_COLOR_SET(flag, val) \
  14120. WMI_SET_BITS(flag, 24, 8, val)
  14121. #define WMI_VDEV_STATS_HW_BSS_COLOR_GET(flag) \
  14122. WMI_GET_BITS(flag, 24, 8)
  14123. #define WMI_VDEV_STATS_HE_DEF_PE_DURATION_SET(flag, val) \
  14124. WMI_SET_BITS(flag, 0, 8, val)
  14125. #define WMI_VDEV_STATS_HE_DEF_PE_DURATION_GET(flag) \
  14126. WMI_GET_BITS(flag, 0, 8)
  14127. #define WMI_VDEV_STATS_MINIMUM_ALLOWED_MCS_SET(flag, val) \
  14128. WMI_SET_BITS(flag, 8, 8, val)
  14129. #define WMI_VDEV_STATS_MINIMUM_ALLOWED_MCS_GET(flag) \
  14130. WMI_GET_BITS(flag, 8, 8)
  14131. #define WMI_VDEV_STATS_MAX_11AC_TO_LEG_RTS_FALLBACK_TH_SET(flag, val) \
  14132. WMI_SET_BITS(flag, 16, 8, val)
  14133. #define WMI_VDEV_STATS_MAX_11AC_TO_LEG_RTS_FALLBACK_TH_GET(flag) \
  14134. WMI_GET_BITS(flag, 16, 8)
  14135. #define WMI_VDEV_STATS_MAX_11AC_RTS_CONSEC_FAILURE_SET(flag, val) \
  14136. WMI_SET_BITS(flag, 24, 8, val)
  14137. #define WMI_VDEV_STATS_MAX_11AC_RTS_CONSEC_FAILURE_GET(flag) \
  14138. WMI_GET_BITS(flag, 24, 8)
  14139. #define WMI_VDEV_STATS_INPUT_PKT_TYPE_SET(flag, val) \
  14140. WMI_SET_BITS(flag, 0, 8, val)
  14141. #define WMI_VDEV_STATS_INPUT_PKT_TYPE_GET(flag) \
  14142. WMI_GET_BITS(flag, 0, 8)
  14143. #define WMI_VDEV_STATS_RECV_PKT_TYPE_SET(flag, val) \
  14144. WMI_SET_BITS(flag, 8, 8, val)
  14145. #define WMI_VDEV_STATS_RECV_PKT_TYPE_GET(flag) \
  14146. WMI_GET_BITS(flag, 8, 8)
  14147. #define WMI_VDEV_STATS_DISABLE_INTRA_FWD_SET(flag, val) \
  14148. WMI_SET_BITS(flag, 16, 8, val)
  14149. #define WMI_VDEV_STATS_DISABLE_INTRA_FWD_GET(flag) \
  14150. WMI_GET_BITS(flag, 16, 8)
  14151. #define WMI_VDEV_STATS_PS_AWAKE_SET(flag, val) \
  14152. WMI_SET_BITS(flag, 24, 8, val)
  14153. #define WMI_VDEV_STATS_PS_AWAKE_GET(flag) \
  14154. WMI_GET_BITS(flag, 24, 8)
  14155. #define WMI_VDEV_STATS_SNR_CAL_COUNT_SET(flag, val) \
  14156. WMI_SET_BITS(flag, 0, 8, val)
  14157. #define WMI_VDEV_STATS_SNR_CAL_COUNT_GET(flag) \
  14158. WMI_GET_BITS(flag, 0, 8)
  14159. #define WMI_VDEV_STATS_AMSDU_AUTO_ENABLE_SET(flag, val) \
  14160. WMI_SET_BITS(flag, 8, 8, val)
  14161. #define WMI_VDEV_STATS_AMSDU_AUTO_ENABLE_GET(flag) \
  14162. WMI_GET_BITS(flag, 8, 8)
  14163. #define WMI_VDEV_STATS_PARAM_BA_TIMEOUT_SET(flag, val) \
  14164. WMI_SET_BITS(flag, 16, 8, val)
  14165. #define WMI_VDEV_STATS_PARAM_BA_TIMEOUT_GET(flag) \
  14166. WMI_GET_BITS(flag, 16, 8)
  14167. #define WMI_VDEV_STATS_PARAM_BA_BUFFER_SIZE_SET(flag, val) \
  14168. WMI_SET_BITS(flag, 24, 8, val)
  14169. #define WMI_VDEV_STATS_PARAM_BA_BUFFER_SIZE_GET(flag) \
  14170. WMI_GET_BITS(flag, 24, 8)
  14171. #define WMI_VDEV_STATS_PARAM_AMSDU_SUPPORT_SET(flag, val) \
  14172. WMI_SET_BITS(flag, 0, 8, val)
  14173. #define WMI_VDEV_STATS_PARAM_AMSDU_SUPPORT_GET(flag) \
  14174. WMI_GET_BITS(flag, 0, 8)
  14175. #define WMI_VDEV_STATS_PARAM_BA_RETRY_MAX_SET(flag, val) \
  14176. WMI_SET_BITS(flag, 8, 8, val)
  14177. #define WMI_VDEV_STATS_PARAM_BA_RETRY_MAX_GET(flag) \
  14178. WMI_GET_BITS(flag, 8, 8)
  14179. #define WMI_VDEV_STATS_TX_AGGR_SIZE_SET(flag, val) \
  14180. WMI_SET_BITS(flag, 16, 8, val)
  14181. #define WMI_VDEV_STATS_TX_AGGR_SIZE_GET(flag) \
  14182. WMI_GET_BITS(flag, 16, 8)
  14183. #define WMI_VDEV_STATS_RX_AGGR_SIZE_SET(flag, val) \
  14184. WMI_SET_BITS(flag, 24, 8, val)
  14185. #define WMI_VDEV_STATS_RX_AGGR_SIZE_GET(flag) \
  14186. WMI_GET_BITS(flag, 24, 8)
  14187. #define WMI_VDEV_STATS_TQM_BYPASS_ENABLED_SET(flag, val) \
  14188. WMI_SET_BITS(flag, 0, 8, val)
  14189. #define WMI_VDEV_STATS_TQM_BYPASS_ENABLED_GET(flag) \
  14190. WMI_GET_BITS(flag, 0, 8)
  14191. #define WMI_VDEV_STATS_WMMAC_TIMER_VOTE_CNT_SET(flag, val) \
  14192. WMI_SET_BITS(flag, 8, 8, val)
  14193. #define WMI_VDEV_STATS_WMMAC_TIMER_VOTE_CNT_GET(flag) \
  14194. WMI_GET_BITS(flag, 8, 8)
  14195. #define WMI_VDEV_STATS_PEER_EVENT_DELIVERY_IN_PROGRESS_SET(flag, val) \
  14196. WMI_SET_BITS(flag, 16, 8, val)
  14197. #define WMI_VDEV_STATS_PEER_EVENT_DELIVERY_IN_PROGRESS_GET(flag) \
  14198. WMI_GET_BITS(flag, 16, 8)
  14199. #define WMI_VDEV_STATS_VDEV_EVENT_DELIVERY_IN_PROGRESS_SET(flag, val) \
  14200. WMI_SET_BITS(flag, 24, 8, val)
  14201. #define WMI_VDEV_STATS_VDEV_EVENT_DELIVERY_IN_PROGRESS_GET(flag) \
  14202. WMI_GET_BITS(flag, 24, 8)
  14203. #define WMI_VDEV_STATS_BCN_MAX_SLOT_SET(flag, val) \
  14204. WMI_SET_BITS(flag, 0, 8, val)
  14205. #define WMI_VDEV_STATS_BCN_MAX_SLOT_GET(flag) \
  14206. WMI_GET_BITS(flag, 0, 8)
  14207. #define WMI_VDEV_STATS_BCN_CURR_SLOT_SET(flag, val) \
  14208. WMI_SET_BITS(flag, 8, 8, val)
  14209. #define WMI_VDEV_STATS_BCN_CURR_SLOT_GET(flag) \
  14210. WMI_GET_BITS(flag, 8, 8)
  14211. #define WMI_VDEV_STATS_MGMT_TX_POWER_SET(flag, val) \
  14212. WMI_SET_BITS(flag, 16, 8, val)
  14213. #define WMI_VDEV_STATS_MGMT_TX_POWER_GET(flag) \
  14214. WMI_GET_BITS(flag, 16, 8)
  14215. #define WMI_VDEV_STATS_MBSSID_CAPABLE_ASSOCIATION_SET(flag, val) \
  14216. WMI_SET_BITS(flag, 24, 8, val)
  14217. #define WMI_VDEV_STATS_MBSSID_CAPABLE_ASSOCIATION_GET(flag) \
  14218. WMI_GET_BITS(flag, 24, 8)
  14219. #define WMI_VDEV_STATS_MBSSID_TXBSSID_ASSOCIATION_SET(flag, val) \
  14220. WMI_SET_BITS(flag, 0, 8, val)
  14221. #define WMI_VDEV_STATS_MBSSID_TXBSSID_ASSOCIATION_GET(flag) \
  14222. WMI_GET_BITS(flag, 0, 8)
  14223. #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_SET(flag, val) \
  14224. WMI_SET_BITS(flag, 8, 8, val)
  14225. #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_GET(flag) \
  14226. WMI_GET_BITS(flag, 8, 8)
  14227. #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_CNT_SET(flag, val) \
  14228. WMI_SET_BITS(flag, 16, 8, val)
  14229. #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_CNT_GET(flag) \
  14230. WMI_GET_BITS(flag, 16, 8)
  14231. #define WMI_VDEV_STATS_MAX_CONSEC_BEACON_SKIP_SET(flag, val) \
  14232. WMI_SET_BITS(flag, 24, 8, val)
  14233. #define WMI_VDEV_STATS_MAX_CONSEC_BEACON_SKIP_GET(flag) \
  14234. WMI_GET_BITS(flag, 24, 8)
  14235. #define WMI_VDEV_STATS_BCN_DRIFT_CNT_SET(flag, val) \
  14236. WMI_SET_BITS(flag, 0, 8, val)
  14237. #define WMI_VDEV_STATS_BCN_DRIFT_CNT_GET(flag) \
  14238. WMI_GET_BITS(flag, 0, 8)
  14239. #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_SET(flag, val) \
  14240. WMI_SET_BITS(flag, 8, 8, val)
  14241. #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_GET(flag) \
  14242. WMI_GET_BITS(flag, 8, 8)
  14243. #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_SET(flag, val) \
  14244. WMI_SET_BITS(flag, 16, 8, val)
  14245. #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_GET(flag) \
  14246. WMI_GET_BITS(flag, 16, 8)
  14247. #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_SET(flag, val) \
  14248. WMI_SET_BITS(flag, 24, 8, val)
  14249. #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_GET(flag) \
  14250. WMI_GET_BITS(flag, 24, 8)
  14251. #define WMI_VDEV_STATS_PAUSE_CNT_SET(flag, val) \
  14252. WMI_SET_BITS(flag, 0, 8, val)
  14253. #define WMI_VDEV_STATS_PAUSE_CNT_GET(flag) \
  14254. WMI_GET_BITS(flag, 0, 8)
  14255. #define WMI_VDEV_STATS_E_MAC_ID_SET(flag, val) \
  14256. WMI_SET_BITS(flag, 8, 8, val)
  14257. #define WMI_VDEV_STATS_E_MAC_ID_GET(flag) \
  14258. WMI_GET_BITS(flag, 8, 8)
  14259. #define WMI_VDEV_STATS_IS_TRANSMIT_BSSID_SET(flag, val) \
  14260. WMI_SET_BITS(flag, 16, 8, val)
  14261. #define WMI_VDEV_STATS_IS_TRANSMIT_BSSID_GET(flag) \
  14262. WMI_GET_BITS(flag, 16, 8)
  14263. #define WMI_VDEV_STATS_RTS_RC_FLAG_SET(flag, val) \
  14264. WMI_SET_BITS(flag, 24, 8, val)
  14265. #define WMI_VDEV_STATS_RTS_RC_FLAG_GET(flag) \
  14266. WMI_GET_BITS(flag, 24, 8)
  14267. #define WMI_VDEV_STATS_IC_OPMODE_SET(flag, val) \
  14268. WMI_SET_BITS(flag, 0, 8, val)
  14269. #define WMI_VDEV_STATS_IC_OPMODE_GET(flag) \
  14270. WMI_GET_BITS(flag, 0, 8)
  14271. #define WMI_VDEV_STATS_IC_SUBOPMODE_SET(flag, val) \
  14272. WMI_SET_BITS(flag, 8, 8, val)
  14273. #define WMI_VDEV_STATS_IC_SUBOPMODE_GET(flag) \
  14274. WMI_GET_BITS(flag, 8, 8)
  14275. #define WMI_VDEV_STATS_IC_CURMODE_SET(flag, val) \
  14276. WMI_SET_BITS(flag, 16, 8, val)
  14277. #define WMI_VDEV_STATS_IC_CURMODE_GET(flag) \
  14278. WMI_GET_BITS(flag, 16, 8)
  14279. #define WMI_VDEV_STATS_VDEV_UP_CMD_CNT_SET(flag, val) \
  14280. WMI_SET_BITS(flag, 24, 8, val)
  14281. #define WMI_VDEV_STATS_VDEV_UP_CMD_CNT_GET(flag) \
  14282. WMI_GET_BITS(flag, 24, 8)
  14283. #define WMI_VDEV_STATS_KEEPALIVE_METHOD_SET(flag, val) \
  14284. WMI_SET_BITS(flag, 0, 8, val)
  14285. #define WMI_VDEV_STATS_KEEPALIVE_METHOD_GET(flag) \
  14286. WMI_GET_BITS(flag, 0, 8)
  14287. #define WMI_VDEV_STATS_KEEPALIVE_PROHIBIT_DATA_MGMT_SET(flag, val) \
  14288. WMI_SET_BITS(flag, 8, 8, val)
  14289. #define WMI_VDEV_STATS_KEEPALIVE_PROHIBIT_DATA_MGMT_GET(flag) \
  14290. WMI_GET_BITS(flag, 8, 8)
  14291. #define WMI_VDEV_STATS_RESP_TYPE_SET(flag, val) \
  14292. WMI_SET_BITS(flag, 16, 8, val)
  14293. #define WMI_VDEV_STATS_RESP_TYPE_GET(flag) \
  14294. WMI_GET_BITS(flag, 16, 8)
  14295. #define WMI_VDEV_STATS_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS_SET(flag, val) \
  14296. WMI_SET_BITS(flag, 24, 8, val)
  14297. #define WMI_VDEV_STATS_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS_GET(flag) \
  14298. WMI_GET_BITS(flag, 24, 8)
  14299. #define WMI_VDEV_STATS_BCN_DRIFT_CNT_SET(flag, val) \
  14300. WMI_SET_BITS(flag, 0, 8, val)
  14301. #define WMI_VDEV_STATS_BCN_DRIFT_CNT_GET(flag) \
  14302. WMI_GET_BITS(flag, 0, 8)
  14303. #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_SET(flag, val) \
  14304. WMI_SET_BITS(flag, 8, 8, val)
  14305. #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_GET(flag) \
  14306. WMI_GET_BITS(flag, 8, 8)
  14307. #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_SET(flag, val) \
  14308. WMI_SET_BITS(flag, 16, 8, val)
  14309. #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_GET(flag) \
  14310. WMI_GET_BITS(flag, 16, 8)
  14311. #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_SET(flag, val) \
  14312. WMI_SET_BITS(flag, 24, 8, val)
  14313. #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_GET(flag) \
  14314. WMI_GET_BITS(flag, 24, 8)
  14315. #define WMI_VDEV_STATS_TBTT_LINK_TYPE_SET(flag, val) \
  14316. WMI_SET_BITS(flag, 0, 8, val)
  14317. #define WMI_VDEV_STATS_TBTT_LINK_TYPE_GET(flag) \
  14318. WMI_GET_BITS(flag, 0, 8)
  14319. #define WMI_VDEV_STATS_IS_ARP_IN_AIR_SET(flag, val) \
  14320. WMI_SET_BITS(flag, 8, 8, val)
  14321. #define WMI_VDEV_STATS_IS_ARP_IN_AIR_GET(flag) \
  14322. WMI_GET_BITS(flag, 8, 8)
  14323. #define WMI_VDEV_STATS_IS_NS_IN_AIR_SET(flag, val) \
  14324. WMI_SET_BITS(flag, 16, 8, val)
  14325. #define WMI_VDEV_STATS_IS_NS_IN_AIR_GET(flag) \
  14326. WMI_GET_BITS(flag, 16, 8)
  14327. #define WMI_VDEV_STATS_NUM_OF_KEEPALIVE_ATTEMPTS_SET(flag, val) \
  14328. WMI_SET_BITS(flag, 24, 8, val)
  14329. #define WMI_VDEV_STATS_NUM_OF_KEEPALIVE_ATTEMPTS_GET(flag) \
  14330. WMI_GET_BITS(flag, 24, 8)
  14331. #define WMI_VDEV_STATS_N_BEACONS_SINCE_LAST_RSSI_REPORT_SET(flag, val) \
  14332. WMI_SET_BITS(flag, 0, 8, val)
  14333. #define WMI_VDEV_STATS_N_BEACONS_SINCE_LAST_RSSI_REPORT_GET(flag) \
  14334. WMI_GET_BITS(flag, 0, 8)
  14335. #define WMI_VDEV_STATS_NUM_OFLD_PEER_ALLOCED_SET(flag, val) \
  14336. WMI_SET_BITS(flag, 8, 8, val)
  14337. #define WMI_VDEV_STATS_NUM_OFLD_PEER_ALLOCED_GET(flag) \
  14338. WMI_GET_BITS(flag, 8, 8)
  14339. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_SET(flag, val) \
  14340. WMI_SET_BITS(flag, 16, 8, val)
  14341. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_GET(flag) \
  14342. WMI_GET_BITS(flag, 16, 8)
  14343. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_SET(flag, val) \
  14344. WMI_SET_BITS(flag, 24, 8, val)
  14345. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_GET(flag) \
  14346. WMI_GET_BITS(flag, 24, 8)
  14347. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_160_SET(flag, val) \
  14348. WMI_SET_BITS(flag, 0, 8, val)
  14349. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_160_GET(flag) \
  14350. WMI_GET_BITS(flag, 0, 8)
  14351. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_160_SET(flag, val) \
  14352. WMI_SET_BITS(flag, 8, 8, val)
  14353. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_160_GET(flag) \
  14354. WMI_GET_BITS(flag, 8, 8)
  14355. #define WMI_VDEV_STATS_TX_CHAINS_NUM_11B_SET(flag, val) \
  14356. WMI_SET_BITS(flag, 16, 8, val)
  14357. #define WMI_VDEV_STATS_TX_CHAINS_NUM_11B_GET(flag) \
  14358. WMI_GET_BITS(flag, 16, 8)
  14359. #define WMI_VDEV_STATS_TX_CHAINS_NUM_11AG_SET(flag, val) \
  14360. WMI_SET_BITS(flag, 24, 8, val)
  14361. #define WMI_VDEV_STATS_TX_CHAINS_NUM_11AG_GET(flag) \
  14362. WMI_GET_BITS(flag, 24, 8)
  14363. #define WMI_VDEV_STATS_SUPP_OP_CLS_IE_LEN_SET(flag, val) \
  14364. WMI_SET_BITS(flag, 0, 8, val)
  14365. #define WMI_VDEV_STATS_SUPP_OP_CLS_IE_LEN_GET(flag) \
  14366. WMI_GET_BITS(flag, 0, 8)
  14367. #define WMI_VDEV_STATS_RM_EN_CAP_IE_LEN_SET(flag, val) \
  14368. WMI_SET_BITS(flag, 8, 8, val)
  14369. #define WMI_VDEV_STATS_RM_EN_CAP_IE_LEN_GET(flag) \
  14370. WMI_GET_BITS(flag, 8, 8)
  14371. #define WMI_VDEV_STATS_POWER_CAP_IE_LEN_SET(flag, val) \
  14372. WMI_SET_BITS(flag, 16, 8, val)
  14373. #define WMI_VDEV_STATS_POWER_CAP_IE_LEN_GET(flag) \
  14374. WMI_GET_BITS(flag, 16, 8)
  14375. #define WMI_VDEV_STATS_SUPP_CHANNEL_IE_LEN_SET(flag, val) \
  14376. WMI_SET_BITS(flag, 24, 8, val)
  14377. #define WMI_VDEV_STATS_SUPP_CHANNEL_IE_LEN_GET(flag) \
  14378. WMI_GET_BITS(flag, 24, 8)
  14379. #define WMI_VDEV_STATS_WMM_TSPEC_IE_LEN_SET(flag, val) \
  14380. WMI_SET_BITS(flag, 0, 8, val)
  14381. #define WMI_VDEV_STATS_WMM_TSPEC_IE_LEN_GET(flag) \
  14382. WMI_GET_BITS(flag, 0, 8)
  14383. #define WMI_VDEV_STATS_CCX_VERSION_IE_LEN_SET(flag, val) \
  14384. WMI_SET_BITS(flag, 8, 8, val)
  14385. #define WMI_VDEV_STATS_CCX_VERSION_IE_LEN_GET(flag) \
  14386. WMI_GET_BITS(flag, 8, 8)
  14387. #define WMI_VDEV_STATS_EXTN_DH_IE_LEN_SET(flag, val) \
  14388. WMI_SET_BITS(flag, 16, 8, val)
  14389. #define WMI_VDEV_STATS_EXTN_DH_IE_LEN_GET(flag) \
  14390. WMI_GET_BITS(flag, 16, 8)
  14391. #define WMI_VDEV_STATS_MBO_IE_LEN_SET(flag, val) \
  14392. WMI_SET_BITS(flag, 24, 8, val)
  14393. #define WMI_VDEV_STATS_MBO_IE_LEN_GET(flag) \
  14394. WMI_GET_BITS(flag, 24, 8)
  14395. #define WMI_VDEV_STATS_RSNXE_IE_LEN_SET(flag, val) \
  14396. WMI_SET_BITS(flag, 0, 8, val)
  14397. #define WMI_VDEV_STATS_RSNXE_IE_LEN_GET(flag) \
  14398. WMI_GET_BITS(flag, 0, 8)
  14399. #define WMI_VDEV_STATS_REMOTE_PEER_CNT_SET(flag, val) \
  14400. WMI_SET_BITS(flag, 8, 8, val)
  14401. #define WMI_VDEV_STATS_REMOTE_PEER_CNT_GET(flag) \
  14402. WMI_GET_BITS(flag, 8, 8)
  14403. #define WMI_VDEV_STATS_P2P_CLI_PAUSE_TYPE_SET(flag, val) \
  14404. WMI_SET_BITS(flag, 16, 8, val)
  14405. #define WMI_VDEV_STATS_P2P_CLI_PAUSE_TYPE_GET(flag) \
  14406. WMI_GET_BITS(flag, 16, 8)
  14407. #define WMI_VDEV_STATS_MU_EDCA_UPDATE_COUNT_SET(flag, val) \
  14408. WMI_SET_BITS(flag, 24, 8, val)
  14409. #define WMI_VDEV_STATS_MU_EDCA_UPDATE_COUNT_GET(flag) \
  14410. WMI_GET_BITS(flag, 24, 8)
  14411. #define WMI_VDEV_STATS_ID_SET(flag, val) \
  14412. WMI_SET_BITS(flag, 0, 8, val)
  14413. #define WMI_VDEV_STATS_ID_GET(flag) \
  14414. WMI_GET_BITS(flag, 0, 8)
  14415. #define WMI_VDEV_STATS_ID_VALID_SET(flag, val) \
  14416. WMI_SET_BITS(flag, 8, 8, val)
  14417. #define WMI_VDEV_STATS_ID_VALID_GET(flag) \
  14418. WMI_GET_BITS(flag, 8, 8)
  14419. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_320_SET(flag, val) \
  14420. WMI_SET_BITS(flag, 16, 8, val)
  14421. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_320_GET(flag) \
  14422. WMI_GET_BITS(flag, 16, 8)
  14423. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_320_SET(flag, val) \
  14424. WMI_SET_BITS(flag, 24, 8, val)
  14425. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_320_GET(flag) \
  14426. WMI_GET_BITS(flag, 24, 8)
  14427. /* bits 7:0 unused / reserved */
  14428. #define WMI_VDEV_STATS_GROUP_CIPHER_SET(flag, val) \
  14429. WMI_SET_BITS(flag, 8, 8, val)
  14430. #define WMI_VDEV_STATS_GROUP_CIPHER_GET(flag) \
  14431. WMI_GET_BITS(flag, 8, 8)
  14432. #define WMI_VDEV_STATS_ASSOC_ID_SET(flag, val) \
  14433. WMI_SET_BITS(flag, 16, 16, val)
  14434. #define WMI_VDEV_STATS_ASSOC_ID_GET(flag) \
  14435. WMI_GET_BITS(flag, 16, 16)
  14436. #define WMI_VDEV_STATS_BSS_CHANNEL_MHZ_SET(flag, val) \
  14437. WMI_SET_BITS(flag, 0, 16, val)
  14438. #define WMI_VDEV_STATS_BSS_CHANNEL_MHZ_GET(flag) \
  14439. WMI_GET_BITS(flag, 0, 16)
  14440. #define WMI_VDEV_STATS_CONFIG_FILS_PERIOD_SET(flag, val) \
  14441. WMI_SET_BITS(flag, 16, 16, val)
  14442. #define WMI_VDEV_STATS_CONFIG_FILS_PERIOD_GET(flag) \
  14443. WMI_GET_BITS(flag, 16, 16)
  14444. #define WMI_VDEV_STATS_CALC_FILS_PERIOD_SET(flag, val) \
  14445. WMI_SET_BITS(flag, 0, 16, val)
  14446. #define WMI_VDEV_STATS_CALC_FILS_PERIOD_GET(flag) \
  14447. WMI_GET_BITS(flag, 0, 16)
  14448. #define WMI_VDEV_STATS_IC_TXSEQS_CMN_SET(flag, val) \
  14449. WMI_SET_BITS(flag, 16, 16, val)
  14450. #define WMI_VDEV_STATS_IC_TXSEQS_CMN_GET(flag) \
  14451. WMI_GET_BITS(flag, 16, 16)
  14452. #define WMI_VDEV_STATS_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS_SET(flag, val) \
  14453. WMI_SET_BITS(flag, 0, 16, val)
  14454. #define WMI_VDEV_STATS_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS_GET(flag) \
  14455. WMI_GET_BITS(flag, 0, 16)
  14456. #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS_SET(flag, val) \
  14457. WMI_SET_BITS(flag, 16, 16, val)
  14458. #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS_GET(flag) \
  14459. WMI_GET_BITS(flag, 16, 16)
  14460. #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS_SET(flag, val) \
  14461. WMI_SET_BITS(flag, 0, 16, val)
  14462. #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS_GET(flag) \
  14463. WMI_GET_BITS(flag, 0, 16)
  14464. #define WMI_VDEV_STATS_CHAIN_MASK_SET(flag, val) \
  14465. WMI_SET_BITS(flag, 16, 16, val)
  14466. #define WMI_VDEV_STATS_CHAIN_MASK_GET(flag) \
  14467. WMI_GET_BITS(flag, 16, 16)
  14468. #define WMI_VDEV_STATS_NUM_MCAST_FILTERS_SET(flag, val) \
  14469. WMI_SET_BITS(flag, 0, 16, val)
  14470. #define WMI_VDEV_STATS_NUM_MCAST_FILTERS_GET(flag) \
  14471. WMI_GET_BITS(flag, 0, 16)
  14472. #define WMI_VDEV_STATS_EXT_CAP_IE_LEN_SET(flag, val) \
  14473. WMI_SET_BITS(flag, 16, 16, val)
  14474. #define WMI_VDEV_STATS_EXT_CAP_IE_LEN_GET(flag) \
  14475. WMI_GET_BITS(flag, 16, 16)
  14476. #define WMI_VDEV_STATS_FILS_CHANNEL_GUARD_TIME_SET(flag, val) \
  14477. WMI_SET_BITS(flag, 0, 16, val)
  14478. #define WMI_VDEV_STATS_FILS_CHANNEL_GUARD_TIME_GET(flag) \
  14479. WMI_GET_BITS(flag, 0, 16)
  14480. #define WMI_VDEV_STATS_FD_TMPL_LEN_SET(flag, val) \
  14481. WMI_SET_BITS(flag, 16, 16, val)
  14482. #define WMI_VDEV_STATS_FD_TMPL_LEN_GET(flag) \
  14483. WMI_GET_BITS(flag, 16, 16)
  14484. #define WMI_VDEV_STATS_COMMON_RSN_CAPS_SET(flag, val) \
  14485. WMI_SET_BITS(flag, 0, 16, val)
  14486. #define WMI_VDEV_STATS_COMMON_RSN_CAPS_GET(flag) \
  14487. WMI_GET_BITS(flag, 0, 16)
  14488. #define WMI_VDEV_STATS_OFF_CH_ACTIVE_DWELL_TIME_SET(flag, val) \
  14489. WMI_SET_BITS(flag, 16, 16, val)
  14490. #define WMI_VDEV_STATS_OFF_CH_ACTIVE_DWELL_TIME_GET(flag) \
  14491. WMI_GET_BITS(flag, 16, 16)
  14492. #define WMI_VDEV_STATS_OFF_CH_PASSIVE_DWELL_TIME_SET(flag, val) \
  14493. WMI_SET_BITS(flag, 0, 16, val)
  14494. #define WMI_VDEV_STATS_OFF_CH_PASSIVE_DWELL_TIME_GET(flag) \
  14495. WMI_GET_BITS(flag, 0, 16)
  14496. #define WMI_VDEV_STATS_CURRENT_PAUSE_REQUEST_ID_SET(flag, val) \
  14497. WMI_SET_BITS(flag, 16, 16, val)
  14498. #define WMI_VDEV_STATS_CURRENT_PAUSE_REQUEST_ID_GET(flag) \
  14499. WMI_GET_BITS(flag, 16, 16)
  14500. #define WMI_VDEV_STATS_HIDE_SSID_ENABLE_SET(flag, val) \
  14501. WMI_SET_BITS(flag, 0, 1, val)
  14502. #define WMI_VDEV_STATS_HIDE_SSID_ENABLE_GET(flag) \
  14503. WMI_GET_BITS(flag, 0, 1)
  14504. #define WMI_VDEV_STATS_B_NONE_PROTOCOL_PAUSED_SET(flag, val) \
  14505. WMI_SET_BITS(flag, 1, 1, val)
  14506. #define WMI_VDEV_STATS_B_NONE_PROTOCOL_PAUSED_GET(flag) \
  14507. WMI_GET_BITS(flag, 1, 1)
  14508. #define WMI_VDEV_STATS_DPD_CAL_STATE_SET(flag, val) \
  14509. WMI_SET_BITS(flag, 2, 2, val)
  14510. #define WMI_VDEV_STATS_DPD_CAL_STATE_GET(flag) \
  14511. WMI_GET_BITS(flag, 2, 2)
  14512. #define WMI_VDEV_STATS_REQ_BCN_Q_UNPAUSE_SET(flag, val) \
  14513. WMI_SET_BITS(flag, 4, 1, val)
  14514. #define WMI_VDEV_STATS_REQ_BCN_Q_UNPAUSE_GET(flag) \
  14515. WMI_GET_BITS(flag, 4, 1)
  14516. #define WMI_VDEV_STATS_BT_COEX_ENABLE_CTS2S_SET(flag, val) \
  14517. WMI_SET_BITS(flag, 5, 1, val)
  14518. #define WMI_VDEV_STATS_BT_COEX_ENABLE_CTS2S_GET(flag) \
  14519. WMI_GET_BITS(flag, 5, 1)
  14520. #define WMI_VDEV_STATS_DPD_DELAY_N_BEACON_SET(flag, val) \
  14521. WMI_SET_BITS(flag, 6, 2, val)
  14522. #define WMI_VDEV_STATS_DPD_DELAY_N_BEACON_GET(flag) \
  14523. WMI_GET_BITS(flag, 6, 2)
  14524. #define WMI_VDEV_STATS_B_NEED_CHECK_FIRST_BEACON_SET(flag, val) \
  14525. WMI_SET_BITS(flag, 8, 1, val)
  14526. #define WMI_VDEV_STATS_B_NEED_CHECK_FIRST_BEACON_GET(flag) \
  14527. WMI_GET_BITS(flag, 8, 1)
  14528. #define WMI_VDEV_STATS_AP_PEER_KEEPALIVE_MAX_IDLE_TIME_REACHED_SET(flag, val) \
  14529. WMI_SET_BITS(flag, 9, 1, val)
  14530. #define WMI_VDEV_STATS_AP_PEER_KEEPALIVE_MAX_IDLE_TIME_REACHED_GET(flag) \
  14531. WMI_GET_BITS(flag, 9, 1)
  14532. #define WMI_VDEV_STATS_LEAKYAP_CTS2S_ENABLE_SET(flag, val) \
  14533. WMI_SET_BITS(flag, 10, 1, val)
  14534. #define WMI_VDEV_STATS_LEAKYAP_CTS2S_ENABLE_GET(flag) \
  14535. WMI_GET_BITS(flag, 10, 1)
  14536. #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_SET(flag, val) \
  14537. WMI_SET_BITS(flag, 11, 1, val)
  14538. #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_GET(flag) \
  14539. WMI_GET_BITS(flag, 11, 1)
  14540. #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_CTS2S_ENABLE_SET(flag, val) \
  14541. WMI_SET_BITS(flag, 12, 1, val)
  14542. #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_CTS2S_ENABLE_GET(flag) \
  14543. WMI_GET_BITS(flag, 12, 1)
  14544. #define WMI_VDEV_STATS_IS_VDEV_STOPPING_SET(flag, val) \
  14545. WMI_SET_BITS(flag, 13, 1, val)
  14546. #define WMI_VDEV_STATS_IS_VDEV_STOPPING_GET(flag) \
  14547. WMI_GET_BITS(flag, 13, 1)
  14548. #define WMI_VDEV_STATS_IS_WMI_VDEV_DOWN_SET(flag, val) \
  14549. WMI_SET_BITS(flag, 14, 1, val)
  14550. #define WMI_VDEV_STATS_IS_WMI_VDEV_DOWN_GET(flag) \
  14551. WMI_GET_BITS(flag, 14, 1)
  14552. #define WMI_VDEV_STATS_IS_VDEV_DOWN_PENDING_SET(flag, val) \
  14553. WMI_SET_BITS(flag, 15, 1, val)
  14554. #define WMI_VDEV_STATS_IS_VDEV_DOWN_PENDING_GET(flag) \
  14555. WMI_GET_BITS(flag, 15, 1)
  14556. #define WMI_VDEV_STATS_VDEV_DELETE_IN_PROGRESS_SET(flag, val) \
  14557. WMI_SET_BITS(flag, 16, 1, val)
  14558. #define WMI_VDEV_STATS_VDEV_DELETE_IN_PROGRESS_GET(flag) \
  14559. WMI_GET_BITS(flag, 16, 1)
  14560. #define WMI_VDEV_STATS_CAC_ENABLED_SET(flag, val) \
  14561. WMI_SET_BITS(flag, 17, 1, val)
  14562. #define WMI_VDEV_STATS_CAC_ENABLED_GET(flag) \
  14563. WMI_GET_BITS(flag, 17, 1)
  14564. #define WMI_VDEV_STATS_IS_QUATERRATE_SET(flag, val) \
  14565. WMI_SET_BITS(flag, 18, 1, val)
  14566. #define WMI_VDEV_STATS_IS_QUATERRATE_GET(flag) \
  14567. WMI_GET_BITS(flag, 18, 1)
  14568. #define WMI_VDEV_STATS_IS_HALFRATE_SET(flag, val) \
  14569. WMI_SET_BITS(flag, 19, 1, val)
  14570. #define WMI_VDEV_STATS_IS_HALFRATE_GET(flag) \
  14571. WMI_GET_BITS(flag, 19, 1)
  14572. #define WMI_VDEV_STATS_STOP_RESP_EVENT_BLOCKED_SET(flag, val) \
  14573. WMI_SET_BITS(flag, 20, 1, val)
  14574. #define WMI_VDEV_STATS_STOP_RESP_EVENT_BLOCKED_GET(flag) \
  14575. WMI_GET_BITS(flag, 20, 1)
  14576. #define WMI_VDEV_STATS_USE_ENHANCED_MCAST_FILTER_SET(flag, val) \
  14577. WMI_SET_BITS(flag, 21, 1, val)
  14578. #define WMI_VDEV_STATS_USE_ENHANCED_MCAST_FILTER_GET(flag) \
  14579. WMI_GET_BITS(flag, 21, 1)
  14580. #define WMI_VDEV_STATS_IS_START_PENDING_ON_ASM_SET(flag, val) \
  14581. WMI_SET_BITS(flag, 22, 1, val)
  14582. #define WMI_VDEV_STATS_IS_START_PENDING_ON_ASM_GET(flag) \
  14583. WMI_GET_BITS(flag, 22, 1)
  14584. #define WMI_VDEV_STATS_NO_NULL_TO_AP_FOR_ROAMING_SET(flag, val) \
  14585. WMI_SET_BITS(flag, 23, 1, val)
  14586. #define WMI_VDEV_STATS_NO_NULL_TO_AP_FOR_ROAMING_GET(flag) \
  14587. WMI_GET_BITS(flag, 23, 1)
  14588. #define WMI_VDEV_STATS_IS_LOOPBACK_CAL_PENDING_SET(flag, val) \
  14589. WMI_SET_BITS(flag, 24, 1, val)
  14590. #define WMI_VDEV_STATS_IS_LOOPBACK_CAL_PENDING_GET(flag) \
  14591. WMI_GET_BITS(flag, 24, 1)
  14592. #define WMI_VDEV_STATS_VDEV_DELETE_ACKED_SET(flag, val) \
  14593. WMI_SET_BITS(flag, 25, 1, val)
  14594. #define WMI_VDEV_STATS_VDEV_DELETE_ACKED_GET(flag) \
  14595. WMI_GET_BITS(flag, 25, 1)
  14596. #define WMI_VDEV_STATS_BC_PROBERESP_ENABLE_SET(flag, val) \
  14597. WMI_SET_BITS(flag, 26, 1, val)
  14598. #define WMI_VDEV_STATS_BC_PROBERESP_ENABLE_GET(flag) \
  14599. WMI_GET_BITS(flag, 26, 1)
  14600. #define WMI_VDEV_STATS_IS_WMM_PARAM_SET_SET(flag, val) \
  14601. WMI_SET_BITS(flag, 27, 1, val)
  14602. #define WMI_VDEV_STATS_IS_WMM_PARAM_SET_GET(flag) \
  14603. WMI_GET_BITS(flag, 27, 1)
  14604. #define WMI_VDEV_STATS_IS_CONNECT_IN_PROGRESS_SET(flag, val) \
  14605. WMI_SET_BITS(flag, 28, 1, val)
  14606. #define WMI_VDEV_STATS_IS_CONNECT_IN_PROGRESS_GET(flag) \
  14607. WMI_GET_BITS(flag, 28, 1)
  14608. #define WMI_VDEV_STATS_IS_MU_EDCA_PARAM_SET_SET(flag, val) \
  14609. WMI_SET_BITS(flag, 29, 1, val)
  14610. #define WMI_VDEV_STATS_IS_MU_EDCA_PARAM_SET_GET(flag) \
  14611. WMI_GET_BITS(flag, 29, 1)
  14612. #define WMI_VDEV_STATS_SEND_DEL_RESP_TOHOST_SET(flag, val) \
  14613. WMI_SET_BITS(flag, 30, 1, val)
  14614. #define WMI_VDEV_STATS_SEND_DEL_RESP_TOHOST_GET(flag) \
  14615. WMI_GET_BITS(flag, 30, 1)
  14616. #define WMI_VDEV_STATS_IS_RESTART_DIFFERENT_CH_SET(flag, val) \
  14617. WMI_SET_BITS(flag, 31, 1, val)
  14618. #define WMI_VDEV_STATS_IS_RESTART_DIFFERENT_CH_GET(flag) \
  14619. WMI_GET_BITS(flag, 31, 1)
  14620. #define WMI_VDEV_STATS_PROTO_PS_STATUS_SET(flag, val) \
  14621. WMI_SET_BITS(flag, 0, 1, val)
  14622. #define WMI_VDEV_STATS_PROTO_PS_STATUS_GET(flag) \
  14623. WMI_GET_BITS(flag, 0, 1)
  14624. #define WMI_VDEV_STATS_SMPS_INTOLERANT_SET(flag, val) \
  14625. WMI_SET_BITS(flag, 1, 1, val)
  14626. #define WMI_VDEV_STATS_SMPS_INTOLERANT_GET(flag) \
  14627. WMI_GET_BITS(flag, 1, 1)
  14628. #define WMI_VDEV_STATS_IS_OFFLOAD_REGISTERED_FOR_CONNECTION_SET(flag, val) \
  14629. WMI_SET_BITS(flag, 2, 1, val)
  14630. #define WMI_VDEV_STATS_IS_OFFLOAD_REGISTERED_FOR_CONNECTION_GET(flag) \
  14631. WMI_GET_BITS(flag, 2, 1)
  14632. #define WMI_VDEV_STATS_IS_BSS_BEACON_OFFLOAD_REGISTERED_SET(flag, val) \
  14633. WMI_SET_BITS(flag, 3, 1, val)
  14634. #define WMI_VDEV_STATS_IS_BSS_BEACON_OFFLOAD_REGISTERED_GET(flag) \
  14635. WMI_GET_BITS(flag, 3, 1)
  14636. #define WMI_VDEV_STATS_IS_PROB_RESP_OFFLOAD_REGISTERED_SET(flag, val) \
  14637. WMI_SET_BITS(flag, 4, 1, val)
  14638. #define WMI_VDEV_STATS_IS_PROB_RESP_OFFLOAD_REGISTERED_GET(flag) \
  14639. WMI_GET_BITS(flag, 4, 1)
  14640. #define WMI_VDEV_STATS_IS_IBSS_BEACON_OFFLOAD_REGISTERED_SET(flag, val) \
  14641. WMI_SET_BITS(flag, 5, 1, val)
  14642. #define WMI_VDEV_STATS_IS_IBSS_BEACON_OFFLOAD_REGISTERED_GET(flag) \
  14643. WMI_GET_BITS(flag, 5, 1)
  14644. #define WMI_VDEV_STATS_IS_KEEPALIVE_ATTEMPTS_EXHAUSTED_SET(flag, val) \
  14645. WMI_SET_BITS(flag, 6, 1, val)
  14646. #define WMI_VDEV_STATS_IS_KEEPALIVE_ATTEMPTS_EXHAUSTED_GET(flag) \
  14647. WMI_GET_BITS(flag, 6, 1)
  14648. #define WMI_VDEV_STATS_IS_BCN_TX_IE_CHANGED_LOG_SET(flag, val) \
  14649. WMI_SET_BITS(flag, 7, 1, val)
  14650. #define WMI_VDEV_STATS_IS_BCN_TX_IE_CHANGED_LOG_GET(flag) \
  14651. WMI_GET_BITS(flag, 7, 1)
  14652. #define WMI_VDEV_STATS_HE_SU_BFEE_SET(flag, val) \
  14653. WMI_SET_BITS(flag, 8, 1, val)
  14654. #define WMI_VDEV_STATS_HE_SU_BFEE_GET(flag) \
  14655. WMI_GET_BITS(flag, 8, 1)
  14656. #define WMI_VDEV_STATS_HE_SU_BFER_SET(flag, val) \
  14657. WMI_SET_BITS(flag, 9, 1, val)
  14658. #define WMI_VDEV_STATS_HE_SU_BFER_GET(flag) \
  14659. WMI_GET_BITS(flag, 9, 1)
  14660. #define WMI_VDEV_STATS_HE_MU_BFEE_SET(flag, val) \
  14661. WMI_SET_BITS(flag, 10, 1, val)
  14662. #define WMI_VDEV_STATS_HE_MU_BFEE_GET(flag) \
  14663. WMI_GET_BITS(flag, 10, 1)
  14664. #define WMI_VDEV_STATS_HE_MU_BFER_SET(flag, val) \
  14665. WMI_SET_BITS(flag, 11, 1, val)
  14666. #define WMI_VDEV_STATS_HE_MU_BFER_GET(flag) \
  14667. WMI_GET_BITS(flag, 11, 1)
  14668. #define WMI_VDEV_STATS_HE_DL_OFDMA_SET(flag, val) \
  14669. WMI_SET_BITS(flag, 12, 1, val)
  14670. #define WMI_VDEV_STATS_HE_DL_OFDMA_GET(flag) \
  14671. WMI_GET_BITS(flag, 12, 1)
  14672. #define WMI_VDEV_STATS_HE_UL_OFDMA_SET(flag, val) \
  14673. WMI_SET_BITS(flag, 13, 1, val)
  14674. #define WMI_VDEV_STATS_HE_UL_OFDMA_GET(flag) \
  14675. WMI_GET_BITS(flag, 13, 1)
  14676. #define WMI_VDEV_STATS_HE_UL_MUMIMO_SET(flag, val) \
  14677. WMI_SET_BITS(flag, 14, 1, val)
  14678. #define WMI_VDEV_STATS_HE_UL_MUMIMO_GET(flag) \
  14679. WMI_GET_BITS(flag, 14, 1)
  14680. #define WMI_VDEV_STATS_UL_MU_RESP_SET(flag, val) \
  14681. WMI_SET_BITS(flag, 15, 1, val)
  14682. #define WMI_VDEV_STATS_UL_MU_RESP_GET(flag) \
  14683. WMI_GET_BITS(flag, 15, 1)
  14684. #define WMI_VDEV_STATS_ALT_RSSI_NON_SRG_SET(flag, val) \
  14685. WMI_SET_BITS(flag, 16, 8, val)
  14686. #define WMI_VDEV_STATS_ALT_RSSI_NON_SRG_GET(flag) \
  14687. WMI_GET_BITS(flag, 16, 8)
  14688. #define WMI_VDEV_STATS_ALT_RSSI_SRG_SET(flag, val) \
  14689. WMI_SET_BITS(flag, 24, 8, val)
  14690. #define WMI_VDEV_STATS_ALT_RSSI_SRG_GET(flag) \
  14691. WMI_GET_BITS(flag, 24, 8)
  14692. #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_SET(flag, val) \
  14693. WMI_SET_BITS(flag, 0, 1, val)
  14694. #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_GET(flag) \
  14695. WMI_GET_BITS(flag, 0, 1)
  14696. #define WMI_VDEV_STATS_HE_TXBF_OFDMA_SET(flag, val) \
  14697. WMI_SET_BITS(flag, 1, 1, val)
  14698. #define WMI_VDEV_STATS_HE_TXBF_OFDMA_GET(flag) \
  14699. WMI_GET_BITS(flag, 1, 1)
  14700. #define WMI_VDEV_STATS_NON_SRG_ENABLE_SET(flag, val) \
  14701. WMI_SET_BITS(flag, 2, 1, val)
  14702. #define WMI_VDEV_STATS_NON_SRG_ENABLE_GET(flag) \
  14703. WMI_GET_BITS(flag, 2, 1)
  14704. #define WMI_VDEV_STATS_SRG_ENABLE_SET(flag, val) \
  14705. WMI_SET_BITS(flag, 3, 1, val)
  14706. #define WMI_VDEV_STATS_SRG_ENABLE_GET(flag) \
  14707. WMI_GET_BITS(flag, 3, 1)
  14708. #define WMI_VDEV_STATS_SRP_ENABLE_SET(flag, val) \
  14709. WMI_SET_BITS(flag, 4, 1, val)
  14710. #define WMI_VDEV_STATS_SRP_ENABLE_GET(flag) \
  14711. WMI_GET_BITS(flag, 4, 1)
  14712. #define WMI_VDEV_STATS_SR_INITIALIZED_SET(flag, val) \
  14713. WMI_SET_BITS(flag, 5, 1, val)
  14714. #define WMI_VDEV_STATS_SR_INITIALIZED_GET(flag) \
  14715. WMI_GET_BITS(flag, 5, 1)
  14716. #define WMI_VDEV_STATS_SR_RINGS_INITIALIZED_SET(flag, val) \
  14717. WMI_SET_BITS(flag, 6, 1, val)
  14718. #define WMI_VDEV_STATS_SR_RINGS_INITIALIZED_GET(flag) \
  14719. WMI_GET_BITS(flag, 6, 1)
  14720. #define WMI_VDEV_STATS_PER_AC_OBSS_PD_ENABLE_SET(flag, val) \
  14721. WMI_SET_BITS(flag, 7, 4, val)
  14722. #define WMI_VDEV_STATS_PER_AC_OBSS_PD_ENABLE_GET(flag) \
  14723. WMI_GET_BITS(flag, 7, 4)
  14724. #define WMI_VDEV_STATS_IFUP_SET(flag, val) \
  14725. WMI_SET_BITS(flag, 11, 1, val)
  14726. #define WMI_VDEV_STATS_IFUP_GET(flag) \
  14727. WMI_GET_BITS(flag, 11, 1)
  14728. #define WMI_VDEV_STATS_IFACTIVE_SET(flag, val) \
  14729. WMI_SET_BITS(flag, 12, 1, val)
  14730. #define WMI_VDEV_STATS_IFACTIVE_GET(flag) \
  14731. WMI_GET_BITS(flag, 12, 1)
  14732. #define WMI_VDEV_STATS_IFPAUSED_SET(flag, val) \
  14733. WMI_SET_BITS(flag, 13, 1, val)
  14734. #define WMI_VDEV_STATS_IFPAUSED_GET(flag) \
  14735. WMI_GET_BITS(flag, 13, 1)
  14736. #define WMI_VDEV_STATS_IFOUTOFSYNC_SET(flag, val) \
  14737. WMI_SET_BITS(flag, 14, 1, val)
  14738. #define WMI_VDEV_STATS_IFOUTOFSYNC_GET(flag) \
  14739. WMI_GET_BITS(flag, 14, 1)
  14740. #define WMI_VDEV_STATS_IS_FREE_SET(flag, val) \
  14741. WMI_SET_BITS(flag, 15, 1, val)
  14742. #define WMI_VDEV_STATS_IS_FREE_GET(flag) \
  14743. WMI_GET_BITS(flag, 15, 1)
  14744. #define WMI_VDEV_STATS_IS_NAWDS_SET(flag, val) \
  14745. WMI_SET_BITS(flag, 16, 1, val)
  14746. #define WMI_VDEV_STATS_IS_NAWDS_GET(flag) \
  14747. WMI_GET_BITS(flag, 16, 1)
  14748. #define WMI_VDEV_STATS_HW_FLAG_SET(flag, val) \
  14749. WMI_SET_BITS(flag, 17, 1, val)
  14750. #define WMI_VDEV_STATS_HW_FLAG_GET(flag) \
  14751. WMI_GET_BITS(flag, 17, 1)
  14752. #define WMI_VDEV_STATS_CH_REQ_FLAG_SET(flag, val) \
  14753. WMI_SET_BITS(flag, 18, 2, val)
  14754. #define WMI_VDEV_STATS_CH_REQ_FLAG_GET(flag) \
  14755. WMI_GET_BITS(flag, 18, 2)
  14756. #define WMI_VDEV_STATS_RESTART_RESP_SET(flag, val) \
  14757. WMI_SET_BITS(flag, 20, 1, val)
  14758. #define WMI_VDEV_STATS_RESTART_RESP_GET(flag) \
  14759. WMI_GET_BITS(flag, 20, 1)
  14760. #define WMI_VDEV_STATS_FIRST_BEACON_RECV_WAIT_SET(flag, val) \
  14761. WMI_SET_BITS(flag, 21, 1, val)
  14762. #define WMI_VDEV_STATS_FIRST_BEACON_RECV_WAIT_GET(flag) \
  14763. WMI_GET_BITS(flag, 21, 1)
  14764. #define WMI_VDEV_STATS_ERPENABLED_SET(flag, val) \
  14765. WMI_SET_BITS(flag, 22, 1, val)
  14766. #define WMI_VDEV_STATS_ERPENABLED_GET(flag) \
  14767. WMI_GET_BITS(flag, 22, 1)
  14768. #define WMI_VDEV_STATS_START_RESPONDED_SET(flag, val) \
  14769. WMI_SET_BITS(flag, 23, 1, val)
  14770. #define WMI_VDEV_STATS_START_RESPONDED_GET(flag) \
  14771. WMI_GET_BITS(flag, 23, 1)
  14772. #define WMI_VDEV_STATS_BCN_SYNC_CRIT_REQ_ACT_SET(flag, val) \
  14773. WMI_SET_BITS(flag, 24, 1, val)
  14774. #define WMI_VDEV_STATS_BCN_SYNC_CRIT_REQ_ACT_GET(flag) \
  14775. WMI_GET_BITS(flag, 24, 1)
  14776. #define WMI_VDEV_STATS_RECAL_NOTIF_REGISTERED_SET(flag, val) \
  14777. WMI_SET_BITS(flag, 25, 1, val)
  14778. #define WMI_VDEV_STATS_RECAL_NOTIF_REGISTERED_GET(flag) \
  14779. WMI_GET_BITS(flag, 25, 1)
  14780. #define WMI_VDEV_STATS_BCN_TX_PAUSED_SET(flag, val) \
  14781. WMI_SET_BITS(flag, 26, 1, val)
  14782. #define WMI_VDEV_STATS_BCN_TX_PAUSED_GET(flag) \
  14783. WMI_GET_BITS(flag, 26, 1)
  14784. #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_BYPASS_SET(flag, val) \
  14785. WMI_SET_BITS(flag, 27, 1, val)
  14786. #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_BYPASS_GET(flag) \
  14787. WMI_GET_BITS(flag, 27, 1)
  14788. #define WMI_VDEV_STATS_DEFAULT_BA_MODE_SET(flag, val) \
  14789. WMI_SET_BITS(flag, 28, 1, val)
  14790. #define WMI_VDEV_STATS_DEFAULT_BA_MODE_GET(flag) \
  14791. WMI_GET_BITS(flag, 28, 1)
  14792. #define WMI_VDEV_STATS_BA_256_BITMAP_ENABLE_SET(flag, val) \
  14793. WMI_SET_BITS(flag, 29, 1, val)
  14794. #define WMI_VDEV_STATS_BA_256_BITMAP_ENABLE_GET(flag) \
  14795. WMI_GET_BITS(flag, 29, 1)
  14796. #define WMI_VDEV_STATS_BA_256_BITMAP_TX_DISABLE_SET(flag, val) \
  14797. WMI_SET_BITS(flag, 30, 1, val)
  14798. #define WMI_VDEV_STATS_BA_256_BITMAP_TX_DISABLE_GET(flag) \
  14799. WMI_GET_BITS(flag, 30, 1)
  14800. #define WMI_VDEV_STATS_IS_MULTI_GROUP_KEY_ENABLED_SET(flag, val) \
  14801. WMI_SET_BITS(flag, 31, 1, val)
  14802. #define WMI_VDEV_STATS_IS_MULTI_GROUP_KEY_ENABLED_GET(flag) \
  14803. WMI_GET_BITS(flag, 31, 1)
  14804. typedef struct {
  14805. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_sta_rrm_stats_struct */
  14806. A_UINT32 tlv_header;
  14807. A_UINT32 dot11GroupTransmittedFrameCount;
  14808. A_UINT32 dot11GroupReceivedFrameCount;
  14809. A_UINT32 dot11TransmittedFrameCount;
  14810. A_UINT32 dot11AckFailureCount;
  14811. A_UINT32 dot11FailedCount;
  14812. A_UINT32 dot11FCSErrorCount;
  14813. A_UINT32 dot11RTSSuccessCount;
  14814. A_UINT32 dot11RTSFailureCount;
  14815. } wmi_ctrl_path_sta_rrm_stats_struct;
  14816. typedef struct {
  14817. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_vdev_bcn_stats_struct */
  14818. A_UINT32 tlv_header;
  14819. A_UINT32 vdev_id;
  14820. A_UINT32 beacon_succ_cnt;
  14821. A_UINT32 beacon_outage_cnt;
  14822. A_UINT32 beacon_cons_miss_cnt;
  14823. A_UINT32 beacon_curr_miss_cnt;
  14824. A_UINT32 beacon_sw_abort_cnt;
  14825. A_UINT32 beacon_tx_filter_cnt;
  14826. A_UINT32 beacon_tx_xretry_cnt;
  14827. A_UINT32 beacon_tx_drop_cnt;
  14828. A_UINT32 beacon_tx_abort_cnt;
  14829. A_UINT32 beacon_tx_tid_del_cnt;
  14830. A_UINT32 beacon_tx_mig_drop_cnt;
  14831. A_UINT32 beacon_fail_others_cnt;
  14832. A_UINT32 beacon_stuck_cnt;
  14833. A_UINT32 beacon_tbtt_skip_cnt;
  14834. A_UINT32 beacon_swba_cnt;
  14835. A_UINT32 beacon_enque_fail;
  14836. A_UINT32 scan_time_exceed_cnt;
  14837. A_UINT32 beacon_miss_systime_gap_us;
  14838. A_UINT32 beacon_last_miss_time_low_us;
  14839. A_UINT32 beacon_last_miss_time_high_us;
  14840. A_UINT32 last_tbtt_time_low_us;
  14841. A_UINT32 last_tbtt_time_high_us;
  14842. A_UINT32 last_tbtt_update_low_us;
  14843. A_UINT32 last_tbtt_update_high_us;
  14844. } wmi_ctrl_path_vdev_bcn_tx_stats_struct;
  14845. typedef struct {
  14846. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_pdev_bcn_stats_struct */
  14847. A_UINT32 tlv_header;
  14848. A_UINT32 pdev_id;
  14849. A_UINT32 beacon_succ_cnt;
  14850. A_UINT32 beacon_outage_cnt;
  14851. A_UINT32 beacon_sw_abort_cnt;
  14852. A_UINT32 beacon_tx_filter_cnt;
  14853. A_UINT32 beacon_tx_xretry_cnt;
  14854. A_UINT32 beacon_tx_drop_cnt;
  14855. A_UINT32 beacon_tx_abort_cnt;
  14856. A_UINT32 beacon_tx_tid_del_cnt;
  14857. A_UINT32 beacon_tx_mig_drop_cnt;
  14858. A_UINT32 beacon_fail_others_cnt;
  14859. A_UINT32 beacon_stuck_cnt;
  14860. A_UINT32 beacon_swba_cnt;
  14861. A_UINT32 beacon_enque_fail;
  14862. } wmi_ctrl_path_pdev_bcn_tx_stats_struct;
  14863. /**
  14864. * peer statistics.
  14865. */
  14866. typedef struct {
  14867. /** peer MAC address */
  14868. wmi_mac_addr peer_macaddr;
  14869. /** RSSI */
  14870. A_UINT32 peer_rssi;
  14871. /** last tx data rate used for peer */
  14872. A_UINT32 peer_tx_rate;
  14873. /** last rx data rate used for peer */
  14874. A_UINT32 peer_rx_rate;
  14875. } wmi_peer_stats;
  14876. /**
  14877. * Peer extension statistics
  14878. */
  14879. typedef struct {
  14880. /** peer MAC address */
  14881. wmi_mac_addr peer_macaddr;
  14882. /* lower 32 bits of rx duration in microseconds */
  14883. A_UINT32 rx_duration;
  14884. /** Total TX bytes (including dot11 header) sent to peer */
  14885. A_UINT32 peer_tx_bytes;
  14886. /** Total RX bytes (including dot11 header) received from peer */
  14887. A_UINT32 peer_rx_bytes;
  14888. /** last TX ratecode */
  14889. A_UINT32 last_tx_rate_code;
  14890. /** TX power used by peer - units are 0.5 dBm */
  14891. A_INT32 last_tx_power;
  14892. /* Total number of received multicast & broadcast data frames corresponding to this peer */
  14893. A_UINT32 rx_mc_bc_cnt; /* 1 in the MSB of rx_mc_bc_cnt represents a valid data */
  14894. /* upper 32 bits of rx duration in microseconds */
  14895. A_UINT32 rx_duration_u32; /* 1 in the most significant bit indicates this field contains valid data */
  14896. A_UINT32 reserved[2]; /** for future use - add new peer stats here */
  14897. } wmi_peer_extd_stats;
  14898. typedef struct {
  14899. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_extd2_stats */
  14900. /** peer MAC address */
  14901. wmi_mac_addr peer_macaddr;
  14902. /*
  14903. * The following rx_bytes field (lower/upper pair) counts only the
  14904. * MSDU bytes (after 802.11 decap, if applicable), and thus doesn't
  14905. * count the 802.11 header, unlike the wmi_peer_extd_stats.peer_rx_bytes
  14906. * and wmi_peer_stats_info.rx_bytes fields.
  14907. */
  14908. /** Lower 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  14909. A_UINT32 rx_bytes_l32;
  14910. /** Upper 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  14911. A_UINT32 rx_bytes_u32;
  14912. /** Number of MPDUS received with FCS error from this peer */
  14913. A_UINT32 rx_fcs_err;
  14914. /** Number of MPDUs(both data and non data) received from this peer */
  14915. A_UINT32 rx_mpdus;
  14916. /** nss of last tx data to peer */
  14917. A_UINT32 last_tx_nss;
  14918. /** nss of last rx data from peer */
  14919. A_UINT32 last_rx_nss;
  14920. /** chain mask used for last tx data to peer */
  14921. A_UINT32 last_tx_chain_mask;
  14922. /** chain mask used for last rx data from peer */
  14923. A_UINT32 last_rx_chain_mask;
  14924. } wmi_peer_extd2_stats;
  14925. typedef struct {
  14926. /** Primary channel freq of the channel for which stats are sent */
  14927. A_UINT32 chan_mhz;
  14928. /** Time spent on the channel */
  14929. A_UINT32 sampling_period_us;
  14930. /** Aggregate duration over a sampling period for which channel activity was observed */
  14931. A_UINT32 rx_clear_count;
  14932. /** Accumalation of the TX PPDU duration over a sampling period */
  14933. A_UINT32 tx_duration_us;
  14934. /** Accumalation of the RX PPDU duration over a sampling period */
  14935. A_UINT32 rx_duration_us;
  14936. } wmi_chan_stats;
  14937. /**
  14938. * MIB statistics. See 802.11 spec for the meaning of each field.
  14939. */
  14940. typedef struct {
  14941. A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
  14942. A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
  14943. A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
  14944. A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
  14945. A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
  14946. A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
  14947. A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
  14948. A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
  14949. A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
  14950. A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
  14951. A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
  14952. A_UINT32 tx_Qos_mpdu_grp_frag_cnt; /*dot11QosTransmittedFragmentCount */
  14953. A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
  14954. A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
  14955. A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
  14956. A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
  14957. A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
  14958. A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
  14959. A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
  14960. A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
  14961. A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
  14962. A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
  14963. A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; /*dot11RSNAStatsRobustMgmtCCMPReplays*/
  14964. A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
  14965. A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
  14966. A_UINT32 rsna_CCMP_decrypt_err_cnt; /*dot11RSNAStatsCCMPDecryptErrors*/
  14967. A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
  14968. A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
  14969. A_UINT32 tx_mpdu_cnt_in_ampdu; /*dot11TransmittedMPDUsInAMPDUCount*/
  14970. union {
  14971. A_UINT64 counter; /* for use by target only */
  14972. struct {
  14973. A_UINT32 low;
  14974. A_UINT32 high;
  14975. } upload; /* for use by host */
  14976. } tx_octets_in_ampdu; /*dot11TransmittedOctetsInAMPDUCount*/
  14977. A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
  14978. A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
  14979. union {
  14980. A_UINT64 counter; /* for use by target only */
  14981. struct {
  14982. A_UINT32 rx_octets_in_ampdu_low;
  14983. A_UINT32 rx_octets_in_ampdu_high;
  14984. } upload; /* for use by host */
  14985. } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
  14986. A_UINT32 reserved_1;
  14987. A_UINT32 reserved_2;
  14988. A_UINT32 reserved_3;
  14989. A_UINT32 reserved_4;
  14990. } wmi_mib_stats;
  14991. /**
  14992. * MIB extension statistics.
  14993. */
  14994. typedef struct {
  14995. A_UINT32 tx_msdu_multi_retry_cnt; /*dot11MultipleRetryCount*/
  14996. A_UINT32 tx_ack_fail_cnt; /*dot11ACKFailureCount*/
  14997. A_UINT32 tx_qos_msdu_multi_retry_up; /*dot11QosMultipleRetryCount*/
  14998. A_UINT32 tx_qos_ack_fail_cnt_up; /*dot11QosACKFailureCount*/
  14999. A_UINT32 rsna_cmac_icv_err_cnt; /*dot11RSNAStatsCMACICVErrors*/
  15000. A_UINT32 rsna_cmac_replay_err_cnt; /*dot11RSNAStatsCMACReplays*/
  15001. A_UINT32 rx_ampdu_deli_crc_err_cnt; /*dot11AMPDUDelimiterCRCErrorCount*/
  15002. A_UINT32 reserved[8]; /* Reserve more fields for future extension */
  15003. } wmi_mib_extd_stats;
  15004. /**
  15005. * Beacon protection statistics.
  15006. */
  15007. typedef struct {
  15008. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmf_bcn_protect_stats */
  15009. A_UINT32 igtk_mic_fail_cnt; /* MIC failure count of management packets using IGTK */
  15010. A_UINT32 igtk_replay_cnt; /* Replay detection count of management packets using IGTK */
  15011. A_UINT32 bcn_mic_fail_cnt; /* MIC failure count of beacon packets using BIGTK */
  15012. A_UINT32 bcn_replay_cnt; /* Replay detection count of beacon packets using BIGTK */
  15013. } wmi_pmf_bcn_protect_stats;
  15014. typedef struct {
  15015. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
  15016. A_UINT32 vdev_id;
  15017. A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
  15018. A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
  15019. wmi_mac_addr peer_macaddr;
  15020. } wmi_rssi_stats;
  15021. typedef struct {
  15022. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_congestion_stats */
  15023. A_UINT32 vdev_id;
  15024. /* congestion -
  15025. * This field holds the congestion percentage = (busy_time/total_time)*100
  15026. * for the interval from when the vdev was started to the current time
  15027. * (or the time at which the vdev was stopped).
  15028. */
  15029. A_UINT32 congestion;
  15030. } wmi_congestion_stats;
  15031. typedef struct {
  15032. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats */
  15033. A_UINT32 num_per_chain_rssi_stats;
  15034. /* This TLV is followed by another TLV of array of structs:
  15035. * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
  15036. */
  15037. } wmi_per_chain_rssi_stats;
  15038. /* vdev control flags (per bits) */
  15039. #define VDEV_FLAGS_NON_MBSSID_AP 0x00000001 /* legacy AP */
  15040. #define VDEV_FLAGS_TRANSMIT_AP 0x00000002 /* indicate if this vdev is transmitting AP */
  15041. #define VDEV_FLAGS_NON_TRANSMIT_AP 0x00000004 /* explicitly indicate this vdev is non-transmitting AP */
  15042. #define VDEV_FLAGS_EMA_MODE 0x00000008 /* vdev is EMA and supports multiple beacon profiles.
  15043. * Once this flag set, flags VDEV_FLAGS_TRANSMIT_AP and
  15044. * VDEV_FLAGS_NON_TRANSMIT_AP classify it as either Tx vap
  15045. * or non Tx vap.
  15046. */
  15047. #define VDEV_FLAGS_SCAN_MODE_VAP 0x00000010 /* for Scan Radio vdev will be special vap.
  15048. * There will not be WMI_VDEV_UP_CMD, there will be only WMI_VDEV_CREATE_CMD
  15049. * and WMI_VDEV_START_REQUEST_CMD. Based on this parameter need to make decision like
  15050. * vdev Pause/Unpause at WMI_VDEV_START_REQUEST_CMD.
  15051. */
  15052. /* get/set/check macros for VDEV_FLAGS_SCAN_MODE_VAP flag */
  15053. #define WMI_SCAN_MODE_VDEV_FLAG_GET(flag) WMI_GET_BITS(flag, 4, 1)
  15054. #define WMI_SCAN_MODE_VDEV_FLAG_SET(flag, val) WMI_SET_BITS(flag, 4, 1, val)
  15055. #define WMI_SCAN_MODE_VDEV_FLAG_ENABLED(flag) ((flag & VDEV_FLAGS_SCAN_MODE_VAP) ? 1 : 0)
  15056. typedef struct {
  15057. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
  15058. /** unique id identifying the VDEV, generated by the caller */
  15059. A_UINT32 vdev_id;
  15060. /** VDEV type (AP,STA,IBSS,MONITOR) */
  15061. A_UINT32 vdev_type;
  15062. /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0, BRIDGE) */
  15063. A_UINT32 vdev_subtype;
  15064. /** VDEV MAC address */
  15065. wmi_mac_addr vdev_macaddr;
  15066. /** Number of configured txrx streams */
  15067. A_UINT32 num_cfg_txrx_streams;
  15068. /**
  15069. * pdev_id for identifying the MAC,
  15070. * See macros starting with WMI_PDEV_ID_ for values.
  15071. */
  15072. A_UINT32 pdev_id;
  15073. /** control flags for this vdev (DEPRECATED)
  15074. * Use @mbss_capability_flags in vdev start instead.
  15075. */
  15076. A_UINT32 flags;
  15077. /** vdevid of transmitted AP (mbssid case) (DEPRECATED)
  15078. * Use @vdevid_trans in vdev start instead.
  15079. */
  15080. A_UINT32 vdevid_trans;
  15081. /* vdev_stats_id_valid indicates whether vdev_stats_id is valid */
  15082. A_UINT32 vdev_stats_id_valid;
  15083. /**
  15084. * vdev_stats_id indicates the ID for the REO Rx stats collection
  15085. * For Beryllium: 0-47 is the valid range and >=48 is invalid
  15086. * This vdev_stats_id field should be ignored unless the
  15087. * vdev_stats_id_valid field is non-zero.
  15088. */
  15089. A_UINT32 vdev_stats_id;
  15090. /* This TLV is followed by another TLV of array of structures
  15091. * wmi_vdev_txrx_streams cfg_txrx_streams[];
  15092. * wmi_vdev_create_mlo_params mlo_params[0,1];
  15093. * optional TLV, only present for MLO vdev;
  15094. * if the vdev is not MLO the array length should be 0.
  15095. */
  15096. } wmi_vdev_create_cmd_fixed_param;
  15097. typedef struct {
  15098. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_txrx_streams */
  15099. /* band - Should take values from wmi_channel_band_mask */
  15100. A_UINT32 band;
  15101. /* max supported tx streams per given band for this vdev */
  15102. A_UINT32 supported_tx_streams;
  15103. /* max supported rx streams per given band for this vdev */
  15104. A_UINT32 supported_rx_streams;
  15105. } wmi_vdev_txrx_streams;
  15106. /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
  15107. typedef struct {
  15108. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
  15109. A_UINT32 type_count; /** 255: continuous schedule, 0: reserved */
  15110. A_UINT32 duration; /** Absent period duration in micro seconds */
  15111. A_UINT32 interval; /** Absent period interval in micro seconds */
  15112. A_UINT32 start_time; /** 32 bit tsf time when in starts */
  15113. } wmi_p2p_noa_descriptor;
  15114. /*
  15115. * mlo_flags sub-fields:
  15116. * bits 0 - mlo enable flag;
  15117. * bits 1 - assoc link flag;
  15118. * bits 2 - primary_umac flag;
  15119. * bits 3 - is logical link index valid
  15120. * bits 4 - is mlo peer id valid
  15121. */
  15122. #define WMI_MLO_FLAGS_GET_ENABLED(mlo_flags) WMI_GET_BITS(mlo_flags, 0, 1)
  15123. #define WMI_MLO_FLAGS_SET_ENABLED(mlo_flags, value) WMI_SET_BITS(mlo_flags, 0, 1, value)
  15124. #define WMI_MLO_FLAGS_GET_ASSOC_LINK(mlo_flags) WMI_GET_BITS(mlo_flags, 1, 1)
  15125. #define WMI_MLO_FLAGS_SET_ASSOC_LINK(mlo_flags, value) WMI_SET_BITS(mlo_flags, 1, 1, value)
  15126. #define WMI_MLO_FLAGS_GET_PRIMARY_UMAC(mlo_flags) WMI_GET_BITS(mlo_flags, 2, 1)
  15127. #define WMI_MLO_FLAGS_SET_PRIMARY_UMAC(mlo_flags, value) WMI_SET_BITS(mlo_flags, 2, 1, value)
  15128. #define WMI_MLO_FLAGS_GET_LINK_INDEX_VALID(mlo_flags) WMI_GET_BITS(mlo_flags, 3, 1)
  15129. #define WMI_MLO_FLAGS_SET_LINK_INDEX_VALID(mlo_flags, value) WMI_SET_BITS(mlo_flags, 3, 1, value)
  15130. #define WMI_MLO_FLAGS_GET_PEER_ID_VALID(mlo_flags) WMI_GET_BITS(mlo_flags, 4, 1)
  15131. #define WMI_MLO_FLAGS_SET_PEER_ID_VALID(mlo_flags, value) WMI_SET_BITS(mlo_flags, 4, 1, value)
  15132. #define WMI_MLO_FLAGS_GET_MCAST_VDEV(mlo_flags) WMI_GET_BITS(mlo_flags, 5, 1)
  15133. #define WMI_MLO_FLAGS_SET_MCAST_VDEV(mlo_flags, value) WMI_SET_BITS(mlo_flags, 5, 1, value)
  15134. #define WMI_MLO_FLAGS_GET_EMLSR_SUPPORT(mlo_flags) WMI_GET_BITS(mlo_flags, 6, 1)
  15135. #define WMI_MLO_FLAGS_SET_EMLSR_SUPPORT(mlo_flags, value) WMI_SET_BITS(mlo_flags, 6, 1, value)
  15136. #define WMI_MLO_FLAGS_GET_FORCE_LINK_INACTIVE(mlo_flags) WMI_GET_BITS(mlo_flags, 7, 1)
  15137. #define WMI_MLO_FLAGS_SET_FORCE_LINK_INACTIVE(mlo_flags, value) WMI_SET_BITS(mlo_flags, 7, 1, value)
  15138. #define WMI_MLO_FLAGS_GET_LINK_ADD(mlo_flags) WMI_GET_BITS(mlo_flags, 8, 1)
  15139. #define WMI_MLO_FLAGS_SET_LINK_ADD(mlo_flags, value) WMI_SET_BITS(mlo_flags, 8, 1, value)
  15140. #define WMI_MLO_FLAGS_GET_LINK_DEL(mlo_flags) WMI_GET_BITS(mlo_flags, 9, 1)
  15141. #define WMI_MLO_FLAGS_SET_LINK_DEL(mlo_flags, value) WMI_SET_BITS(mlo_flags, 9, 1, value)
  15142. #define WMI_MLO_FLAGS_GET_BRIDGE_PEER(mlo_flags) WMI_GET_BITS(mlo_flags, 10, 1)
  15143. #define WMI_MLO_FLAGS_SET_BRIDGE_PEER(mlo_flags, value) WMI_SET_BITS(mlo_flags, 10, 1, value)
  15144. #define WMI_MLO_FLAGS_GET_NSTR_BITMAP_PRESENT(mlo_flags) WMI_GET_BITS(mlo_flags, 11, 1)
  15145. #define WMI_MLO_FLAGS_SET_NSTR_BITMAP_PRESENT(mlo_flags, value) WMI_SET_BITS(mlo_flags, 11, 1, value)
  15146. #define WMI_MLO_FLAGS_GET_NSTR_BITMAP_SIZE(mlo_flags) WMI_GET_BITS(mlo_flags, 12, 1)
  15147. #define WMI_MLO_FLAGS_SET_NSTR_BITMAP_SIZE(mlo_flags, value) WMI_SET_BITS(mlo_flags, 12, 1, value)
  15148. #define WMI_MLO_FLAGS_GET_MLO_LINK_SWITCH(mlo_flags) WMI_GET_BITS(mlo_flags, 13, 1)
  15149. #define WMI_MLO_FLAGS_SET_MLO_LINK_SWITCH(mlo_flags, value) WMI_SET_BITS(mlo_flags, 13, 1, value)
  15150. #define WMI_MLO_FLAGS_GET_MLO_BRIDGE_LINK(mlo_flags) WMI_GET_BITS(mlo_flags, 14, 1)
  15151. #define WMI_MLO_FLAGS_SET_MLO_BRIDGE_LINK(mlo_flags, value) WMI_SET_BITS(mlo_flags, 14, 1, value)
  15152. /* this structure used for pass mlo flags*/
  15153. typedef struct {
  15154. union {
  15155. struct {
  15156. A_UINT32 mlo_enabled:1, /* indicate is MLO enabled */
  15157. mlo_assoc_link:1, /* indicate is the link used to initialize the association of mlo connection */
  15158. mlo_primary_umac:1, /* indicate is the link on primary UMAC, WIN only flag */
  15159. mlo_logical_link_index_valid:1, /* indicate if the logial link index in wmi_peer_assoc_mlo_params is valid */
  15160. mlo_peer_id_valid:1, /* indicate if the mlo peer id in wmi_peer_assoc_mlo_params is valid */
  15161. mlo_mcast_vdev:1, /* indicate this is the MLO mcast primary vdev */
  15162. emlsr_support:1, /* indicate that eMLSR is supported */
  15163. mlo_force_link_inactive:1, /* indicate this link is forced inactive */
  15164. mlo_link_add:1, /* Indicate dynamic link addition in an MLD VAP */
  15165. mlo_link_del:1, /* Indicate dynamic link deletion in an MLD VAP */
  15166. mlo_bridge_peer:1, /* Indicate if this link has bridge_peer */
  15167. nstr_bitmap_present:1, /* Indicate if at least one NSTR link pair is present in the MLD */
  15168. /* nstr_bitmap_size:
  15169. * Set to 1 if the length of the corresponding NSTR
  15170. * Indication Bitmap subfield is equal to 2 octets.
  15171. * Set to 0 if the length of the corresponding NSTR
  15172. * Indication Bitmap subfield is equal to 1 octet.
  15173. */
  15174. nstr_bitmap_size:1,
  15175. mlo_link_switch: 1, /* indicate the command is a part of link switch procedure */
  15176. mlo_bridge_link:1, /* indicate link is bridge link */
  15177. unused: 17;
  15178. };
  15179. A_UINT32 mlo_flags;
  15180. };
  15181. /* NOTE:
  15182. * Since this struct is embedded inside WMI TLV structs, it cannot
  15183. * have any fields added, as expanding this struct would break
  15184. * backwards-compatibility by changing the offsets of the subsequent
  15185. * fields in the structs that contain this struct.
  15186. */
  15187. } wmi_mlo_flags;
  15188. typedef struct {
  15189. A_UINT32 tlv_header;/** TLV tag (WMITLV_TAG_STRUC_wmi_partner_link_params) and len;*/
  15190. A_UINT32 vdev_id; /** partner vdev_id */
  15191. A_UINT32 hw_link_id; /** hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
  15192. wmi_mac_addr vdev_macaddr; /** VDEV MAC address */
  15193. wmi_mlo_flags mlo_flags;
  15194. } wmi_partner_link_params;
  15195. /* this TLV structure used for pass mlo parameters on vdev create*/
  15196. typedef struct {
  15197. A_UINT32 tlv_header; /** TLV tag and len; */
  15198. /** MLD MAC address */
  15199. wmi_mac_addr mld_macaddr;
  15200. } wmi_vdev_create_mlo_params;
  15201. /* this TLV structure used for pass mlo parameters on vdev start*/
  15202. typedef struct {
  15203. A_UINT32 tlv_header; /** TLV tag and len; */
  15204. wmi_mlo_flags mlo_flags; /*only mlo enable and assoc link flag need by vdev start*/
  15205. } wmi_vdev_start_mlo_params;
  15206. /* this TLV structure used for passing mlo parameters on vdev stop */
  15207. typedef struct {
  15208. A_UINT32 tlv_header; /** TLV tag and len; */
  15209. wmi_mlo_flags mlo_flags; /* only mlo_link_switch flag needed by vdev stop */
  15210. } wmi_vdev_stop_mlo_params;
  15211. typedef struct {
  15212. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_update_mac_addr_cmd_fixed_param */
  15213. /** Unique id identifying the VDEV to update mac addr */
  15214. A_UINT32 vdev_id;
  15215. /** New VDEV MAC address to configure */
  15216. wmi_mac_addr vdev_macaddr;
  15217. /** New MLD MAC address to configure */
  15218. wmi_mac_addr mld_macaddr;
  15219. } wmi_vdev_update_mac_addr_cmd_fixed_param;
  15220. typedef struct {
  15221. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_update_mac_addr_conf_event_fixed_param */
  15222. /** Unique id identifying the VDEV */
  15223. A_UINT32 vdev_id;
  15224. /*
  15225. * Status of mac address update request.
  15226. * Refer to wmi_vdev_update_mac_addr_conf_status.
  15227. */
  15228. A_UINT32 status;
  15229. } wmi_vdev_update_mac_addr_conf_event_fixed_param;
  15230. /** VDEV update mac address event response status codes */
  15231. typedef enum {
  15232. /** VDEV mac address updated successfully */
  15233. WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_SUCCESS = 0,
  15234. /** Requested VDEV not found */
  15235. WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_INVALID_VDEVID = 1,
  15236. /** Unsupported VDEV combination.eg: received cmd in VDEV connected state */
  15237. WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_NOT_SUPPORTED = 2,
  15238. /** FW internal failure to update mac address */
  15239. WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_INTERNAL_FAIL = 3,
  15240. } wmi_vdev_update_mac_addr_conf_status;
  15241. /** values for vdev_type */
  15242. #define WMI_VDEV_TYPE_AP 0x1
  15243. #define WMI_VDEV_TYPE_STA 0x2
  15244. #define WMI_VDEV_TYPE_IBSS 0x3
  15245. #define WMI_VDEV_TYPE_MONITOR 0x4
  15246. /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
  15247. * by FW to execute the NAN specific WMI commands and also implement NAN specific
  15248. * operations like Network discovery, service provisioning and service
  15249. * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
  15250. * WMI command to create this VDEV once during initialization and host is not
  15251. * expected to use any VDEV specific WMI commands on this VDEV.
  15252. **/
  15253. #define WMI_VDEV_TYPE_NAN 0x5
  15254. #define WMI_VDEV_TYPE_OCB 0x6
  15255. /* NAN Data Interface */
  15256. #define WMI_VDEV_TYPE_NDI 0x7
  15257. #define WMI_VDEV_TYPE_MESH_POINT 0x8
  15258. /*
  15259. * Param values to be sent for WMI_VDEV_PARAM_SGI command
  15260. * which are used in 11ax, 11be systems
  15261. */
  15262. #define WMI_SGI_LEGACY 0x1 /* for HT and VHT */
  15263. #define WMI_SGI_HE_400_NS 0x2 /* for HE 400 nsec */
  15264. #define WMI_SGI_HE_800_NS 0x4 /* for HE 800 nsec */
  15265. #define WMI_SGI_HE_1600_NS 0x8 /* for HE 1600 nsec */
  15266. #define WMI_SGI_HE_3200_NS 0x10 /* for HE 3200 nsec */
  15267. #define WMI_SGI_EHT_800_NS 0x20 /* for EHT 800 nsec */
  15268. #define WMI_SGI_EHT_1600_NS 0x40 /* for EHT 1600 nsec */
  15269. #define WMI_SGI_EHT_3200_NS 0x80 /* for EHT 3200 nsec */
  15270. /*
  15271. * Param values to be sent for WMI_VDEV_PARAM_HE_LTF command
  15272. * which are used in 11ax systems
  15273. */
  15274. #define WMI_HE_LTF_DEFAULT 0x0
  15275. #define WMI_HE_LTF_1X 0x1
  15276. #define WMI_HE_LTF_2X 0x2
  15277. #define WMI_HE_LTF_4X 0x3
  15278. /*
  15279. * Param values to be sent for WMI_VDEV_EHT_PARAM_LTF command
  15280. * which are used in 11be systems
  15281. */
  15282. #define WMI_EHT_LTF_DEFAULT 0x4
  15283. #define WMI_EHT_LTF_1X 0x5
  15284. #define WMI_EHT_LTF_2X 0x6
  15285. #define WMI_EHT_LTF_4X 0x7
  15286. /** values for vdev_subtype */
  15287. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
  15288. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
  15289. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
  15290. #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
  15291. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
  15292. /* new subtype for 11S mesh is required as 11S functionality differs
  15293. * in many ways from proprietary mesh
  15294. * 11S uses 6-addr frame format and supports peering between mesh
  15295. * stations and dynamic best path selection between mesh stations.
  15296. * While in proprietary mesh, neighboring mesh station MAC is manually
  15297. * added to AST table for traffic flow between mesh stations
  15298. */
  15299. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
  15300. /* Subtype to indicate that the AP VAP is in smart monitor mode
  15301. * This is needed to differentiate in firmware between normal AP mode
  15302. * with smart monitor AP mode
  15303. */
  15304. #define WMI_UNIFIED_VDEV_SUBTYPE_SMART_MON 0x7
  15305. /* Subtype to indicate that the VDEV is in Bridge mode.
  15306. * Bridge VDEV is dummy VDEV required for 4 chip MLO scenario.
  15307. * Bridge Peer will be connected to Bridge VDEV.
  15308. * Bridge VDEV/PEER will be required to seamlessly transmit
  15309. * to diagonal links in 4 chip MLO.
  15310. */
  15311. #define WMI_UNIFIED_VDEV_SUBTYPE_BRIDGE 0x8
  15312. /** values for vdev_start_request flags */
  15313. /** Indicates that AP VDEV uses hidden ssid. only valid for
  15314. * AP/GO */
  15315. #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
  15316. /** Indicates if robust management frame/management frame
  15317. * protection is enabled. For GO/AP vdevs, it indicates that
  15318. * it may support station/client associations with RMF enabled.
  15319. * For STA/client vdevs, it indicates that sta will
  15320. * associate with AP with RMF enabled. */
  15321. #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
  15322. /*
  15323. * Host is sending bcn_tx_rate to override the beacon tx rates.
  15324. */
  15325. #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
  15326. /** Indicates if LDPC RX will be advertized inside HT/VHT Capabilities IE
  15327. * of assoc request/response
  15328. */
  15329. #define WMI_UNIFIED_VDEV_START_LDPC_RX_ENABLED (1<<3)
  15330. /** Indicates HW encryption is disabled, and SW encryption is enabled.
  15331. * If This flag is set, indicates that HW encryption will be disabled
  15332. * and SW encryption will be enabled.
  15333. * If SW encryption is enabled, key plumbing will not happen in FW.
  15334. */
  15335. #define WMI_UNIFIED_VDEV_START_HW_ENCRYPTION_DISABLED (1<<4)
  15336. /** Indicates VAP is used for MLO repurpose.
  15337. * This Indicates that vap can be brought up as 11ax or 11be and can be
  15338. * repurposed based on the above stack on the fly to change from MLO to
  15339. * non MLO, currently we support only 11ax and 11be transition.
  15340. */
  15341. #define WMI_UNIFIED_VDEV_START_MLO_REPURPOSE_VAP (1<<5)
  15342. /* BSS color 0-6 */
  15343. #define WMI_HEOPS_COLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 0, 6)
  15344. #define WMI_HEOPS_COLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
  15345. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  15346. #define WMI_HEOPS_DEFPE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 6, 3)
  15347. #define WMI_HEOPS_DEFPE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
  15348. /* TWT required */
  15349. #define WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops) WMI_GET_BITS(he_ops, 9, 1)
  15350. #define WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
  15351. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET instead */
  15352. #define WMI_HEOPS_TWT_GET_D2(he_ops) \
  15353. WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops)
  15354. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET instead */
  15355. #define WMI_HEOPS_TWT_SET_D2(he_ops, value) \
  15356. WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value)
  15357. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  15358. #define WMI_HEOPS_RTSTHLD_GET_D2(he_ops) WMI_GET_BITS(he_ops, 10, 10)
  15359. #define WMI_HEOPS_RTSTHLD_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 10, 10, value)
  15360. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  15361. #define WMI_HEOPS_PARTBSSCOLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 20, 1)
  15362. #define WMI_HEOPS_PARTBSSCOLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 20, 1, value)
  15363. /* MAX BSS supported by MultiBSS element */
  15364. #define WMI_HEOPS_MAXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 21, 8)
  15365. #define WMI_HEOPS_MAXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 21, 8, value)
  15366. /* Tx BSSID Indicator indicates whether HE AP corresponds to transmitted BSSID */
  15367. #define WMI_HEOPS_TXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 29, 1)
  15368. #define WMI_HEOPS_TXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 29, 1, value)
  15369. /* when set to 1 disables use of BSS color */
  15370. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  15371. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  15372. /**--- HEOPS_DUALBEACON: DO NOT USE - DEPRECATED ---*/
  15373. /* When set to 1 HE AP transmits beacons using two PHY formats,
  15374. * one in non-HE format and other in an HE_EXT_SU PHY format
  15375. */
  15376. #define WMI_HEOPS_DUALBEACON_GET_D2(he_ops) (0)
  15377. #define WMI_HEOPS_DUALBEACON_SET_D2(he_ops, value) {;}
  15378. #define WMI_MAX_HECAP_PHY_SIZE (3)
  15379. /* Dual Band both 2.4 GHz and 5 GHz Supported */
  15380. #define WMI_HECAP_PHY_DB_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
  15381. #define WMI_HECAP_PHY_DB_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
  15382. /*
  15383. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  15384. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  15385. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  15386. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  15387. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  15388. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  15389. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  15390. * 242-tone RU mapping in 40 MHz and 80
  15391. * MHz channel width in 5 GHz. Otherwise Reserved.
  15392. * B6: Reserved
  15393. */
  15394. #define WMI_HECAP_PHY_CBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  15395. #define WMI_HECAP_PHY_CBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  15396. /*
  15397. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  15398. * where in the preamble only the secondary 20 MHz is punctured
  15399. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  15400. * where in the preamble only one of the two 20 MHz sub-channels in the
  15401. * secondary 40 MHz is punctured
  15402. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  15403. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  15404. * secondary 20 MHz is punctured
  15405. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  15406. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  15407. * primary 40 MHz is present
  15408. */
  15409. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  15410. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  15411. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  15412. #define WMI_HECAP_PHY_COD_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  15413. #define WMI_HECAP_PHY_COD_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  15414. /* Indicates support of transmission and reception of LDPC encoded packets */
  15415. #define WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  15416. #define WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  15417. /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LDPC instead */
  15418. #define WMI_HECAP_PHY_TXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  15419. #define WMI_HECAP_PHY_TXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  15420. /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LDPC instead */
  15421. #define WMI_HECAP_PHY_RXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  15422. #define WMI_HECAP_PHY_RXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  15423. /*
  15424. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  15425. */
  15426. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  15427. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  15428. /*
  15429. * When the Doppler Rx subfield is 1, indicates the maximum number of space-
  15430. * time streams supported for reception when midamble is used in the Data field.
  15431. */
  15432. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  15433. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  15434. /*
  15435. * B0: For a transmitting STA acting as beamformee, it indicates support of
  15436. * NDP reception using 4x LTF and 3.2 us guard interval duration
  15437. */
  15438. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  15439. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  15440. /* indicates support for the transmission of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  15441. #define WMI_HECAP_PHY_TXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  15442. #define WMI_HECAP_PHY_TXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  15443. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  15444. #define WMI_HECAP_PHY_RXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  15445. #define WMI_HECAP_PHY_RXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  15446. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  15447. #define WMI_HECAP_PHY_TXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  15448. #define WMI_HECAP_PHY_TXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  15449. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  15450. #define WMI_HECAP_PHY_RXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  15451. #define WMI_HECAP_PHY_RXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  15452. /*
  15453. * If the transmitting STA is an AP:
  15454. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  15455. * transmission.
  15456. * If the transmitting STA is a non-AP STA:
  15457. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  15458. * transmission.
  15459. */
  15460. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  15461. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  15462. /*
  15463. * If the transmitting STA is an AP:
  15464. * indicates STA supports of reception of UL MUMIMO transmission on an
  15465. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  15466. * If the transmitting STA is a non-AP STA:
  15467. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  15468. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  15469. */
  15470. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  15471. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  15472. /* Tx DCM
  15473. * B0:B1
  15474. * 00: Does not support DCM
  15475. * 01: BPSK
  15476. * 10: QPSK
  15477. * 11: 16-QAM
  15478. * B2 signals maximum number of spatial streams with DCM
  15479. * 0: 1 spatial stream
  15480. * 1: 2 spatial streams
  15481. */
  15482. #define WMI_HECAP_PHY_DCMTX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  15483. #define WMI_HECAP_PHY_DCMTX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  15484. /* Rx DCM
  15485. * B0:B1
  15486. * 00: Does not support DCM
  15487. * 01: BPSK
  15488. * 10: QPSK
  15489. * 11: 16-QAM
  15490. * B2 signals maximum number of spatial streams with DCM
  15491. * 0: 1 spatial stream
  15492. * 1: 2 spatial streams
  15493. */
  15494. #define WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  15495. #define WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  15496. /*
  15497. * Indicates that the STA supports the reception of an HE MU PPDU payload
  15498. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  15499. */
  15500. #define WMI_HECAP_PHY_ULHEMU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  15501. #define WMI_HECAP_PHY_ULHEMU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  15502. /* Indicates support for operation as an SU beamformer */
  15503. #define WMI_HECAP_PHY_SUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  15504. #define WMI_HECAP_PHY_SUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  15505. /* Indicates support for operation as an SU beamformee */
  15506. #define WMI_HECAP_PHY_SUBFME_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  15507. #define WMI_HECAP_PHY_SUBFME_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  15508. /* Indicates support for operation as an MU Beamformer */
  15509. #define WMI_HECAP_PHY_MUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  15510. #define WMI_HECAP_PHY_MUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  15511. /*
  15512. * Num STS -1 for <= 80MHz (min val 3)
  15513. * The maximum number of space-time streams minus 1 that the STA can
  15514. * receive in an HE NDP
  15515. */
  15516. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  15517. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  15518. /*
  15519. * Num STS -1 for > 80MHz (min val 3)
  15520. * The maximum number of space-time streams minus 1 that the STA can
  15521. * receive in an HE NDP
  15522. */
  15523. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  15524. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  15525. /*
  15526. * Number Of Sounding Dimensions For <= 80 MHz
  15527. * If SU beamformer capable, set to the maximum supported value of the
  15528. * TXVECTOR parameter NUM_STS minus 1.
  15529. * Otherwise, reserved.
  15530. */
  15531. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  15532. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  15533. /*
  15534. * Number Of Sounding Dimensions For > 80 MHz
  15535. * If SU beamformer capable, set to the maximum supported value of the
  15536. * TXVECTOR parameter NUM_STS minus 1.
  15537. * Otherwise, reserved.
  15538. */
  15539. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  15540. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  15541. /*
  15542. * Indicates if the HE beamformee is capable of feedback with tone
  15543. * grouping of 16 in the HE Compressed Beamforming Report field for
  15544. * a SU-type feedback.
  15545. */
  15546. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  15547. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  15548. /*
  15549. * Indicates if the HE beamformee is capable of feedback with tone
  15550. * grouping of 16 in the HE Compressed Beamforming Report field for
  15551. * a MU-type feedback.
  15552. */
  15553. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  15554. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  15555. /*
  15556. * Indicates if HE beamformee is capable of feedback with codebook
  15557. * size {4, 2} in the HECompressed Beamforming Report field for
  15558. * a SU-type feedback.
  15559. */
  15560. #define WMI_HECAP_PHY_CODBK42SU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  15561. #define WMI_HECAP_PHY_CODBK42SU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  15562. /*
  15563. * Indicates if HE beamformee is capable of feedback with codebook
  15564. * size {7, 5} in the HE Compressed Beamforming Report field for
  15565. * a MU-type feedback.
  15566. */
  15567. #define WMI_HECAP_PHY_CODBK75MU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  15568. #define WMI_HECAP_PHY_CODBK75MU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  15569. /*
  15570. * Beamforming Feedback With Trigger Frame
  15571. * If the transmitting STA is an AP STA:
  15572. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  15573. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  15574. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  15575. * If the transmitting STA is a non-AP STA:
  15576. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  15577. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  15578. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  15579. */
  15580. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  15581. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  15582. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  15583. * over the right 106-tone RU or partial BW ER
  15584. */
  15585. #define WMI_HECAP_PHY_HEERSU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  15586. #define WMI_HECAP_PHY_HEERSU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  15587. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  15588. * where the RU does not span the entire PPDU bandwidth.
  15589. */
  15590. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  15591. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  15592. /* Indicates whether or not the PPE Threshold field is present */
  15593. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  15594. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  15595. /* Indicates that the STA supports SRP-based SR operation */
  15596. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  15597. #define WMI_HECAP_PHY_SRPPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  15598. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  15599. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  15600. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  15601. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  15602. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  15603. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  15604. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  15605. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  15606. * minus 1. Otherwise, reserved.
  15607. */
  15608. #define WMI_HECAP_PHY_MAXNC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  15609. #define WMI_HECAP_PHY_MAXNC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  15610. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  15611. * STBC with one spatial stream
  15612. */
  15613. #define WMI_HECAP_PHY_STBCTXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  15614. #define WMI_HECAP_PHY_STBCTXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  15615. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  15616. * STBC with one spatial stream
  15617. */
  15618. #define WMI_HECAP_PHY_STBCRXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  15619. #define WMI_HECAP_PHY_STBCRXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  15620. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  15621. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  15622. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  15623. /*
  15624. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  15625. * 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.
  15626. */
  15627. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  15628. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  15629. /*
  15630. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  15631. * 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.
  15632. */
  15633. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  15634. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  15635. /*
  15636. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  15637. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  15638. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  15639. * 160 MHz HE TB PPDU.
  15640. */
  15641. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  15642. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  15643. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  15644. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  15645. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  15646. /*
  15647. * When the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF
  15648. * 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
  15649. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  15650. */
  15651. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  15652. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  15653. /*HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field*/
  15654. #define WMI_HECAP_MAC_HECTRL_GET_D2(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  15655. #define WMI_HECAP_MAC_HECTRL_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  15656. /* set to 1 to for TWT Requestor support*/
  15657. #define WMI_HECAP_MAC_TWTREQ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  15658. #define WMI_HECAP_MAC_TWTREQ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  15659. /* set to 1 to for TWT Responder support*/
  15660. #define WMI_HECAP_MAC_TWTRSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  15661. #define WMI_HECAP_MAC_TWTRSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  15662. /* Level of frag support
  15663. Set to 0 for no support for dynamic fragmentation.
  15664. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  15665. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  15666. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  15667. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  15668. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  15669. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  15670. */
  15671. #define WMI_HECAP_MAC_HEFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  15672. #define WMI_HECAP_MAC_HEFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  15673. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs*/
  15674. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  15675. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  15676. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  15677. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  15678. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  15679. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  15680. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  15681. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  15682. /*number of TIDs minus 1 of QoS Data frames that HE STA can aggregate in multi-TID AMPDU*/
  15683. #define WMI_HECAP_MAC_MTID_GET_D2(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  15684. #define WMI_HECAP_MAC_MTID_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  15685. /*
  15686. * Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  15687. * a QoS Data frame for which no block ack agreement exists.
  15688. */
  15689. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 15, 1)
  15690. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
  15691. /*--- HECAP_MAC_HELKAD: DO NOT USE - DEPRECATED ---*/
  15692. /*0=No Feedback,2=Unsolicited,3=Both*/
  15693. #define WMI_HECAP_MAC_HELKAD_GET_D2(he_cap) (0)
  15694. #define WMI_HECAP_MAC_HELKAD_SET_D2(he_cap, value) {;}
  15695. /* bit 16 reserved. */
  15696. /*Set to 1 for reception of AllAck support*/
  15697. #define WMI_HECAP_MAC_AACK_GET_D2(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  15698. #define WMI_HECAP_MAC_AACK_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  15699. /*Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field*/
  15700. #define WMI_HECAP_MAC_ULMURSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  15701. #define WMI_HECAP_MAC_ULMURSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  15702. /*Set to 1 if the STA supports the BSR A-Control field functionality.*/
  15703. #define WMI_HECAP_MAC_BSR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  15704. #define WMI_HECAP_MAC_BSR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  15705. /*Set to 1 when the STA supports broadcast TWT functionality.*/
  15706. #define WMI_HECAP_MAC_BCSTTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  15707. #define WMI_HECAP_MAC_BCSTTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  15708. /*Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap*/
  15709. #define WMI_HECAP_MAC_32BITBA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  15710. #define WMI_HECAP_MAC_32BITBA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  15711. /*Set to 1 if the STA supports MU cascading operation*/
  15712. #define WMI_HECAP_MAC_MUCASCADE_GET_D2(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  15713. #define WMI_HECAP_MAC_MUCASCADE_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  15714. /*Set to 1 when the STA supports reception of this multi-TID A-MPDU format*/
  15715. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  15716. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  15717. /*Set to 1 when the STA supports its reception*/
  15718. #define WMI_HECAP_MAC_GROUPMSTABA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 24, 1)
  15719. #define WMI_HECAP_MAC_GROUPMSTABA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 24, 1, value)
  15720. /*Set to 1 if the STA supports reception of the OMI A-Control field*/
  15721. #define WMI_HECAP_MAC_OMI_GET_D2(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  15722. #define WMI_HECAP_MAC_OMI_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  15723. /*1 if OFDMA Random Access Supported*/
  15724. #define WMI_HECAP_MAC_OFDMARA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  15725. #define WMI_HECAP_MAC_OFDMARA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  15726. /* Maximum AMPDU Length Exponent.
  15727. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  15728. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  15729. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  15730. * padding is not included in this limit.
  15731. */
  15732. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  15733. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  15734. /*A-MSDU Fragmentation Support*/
  15735. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  15736. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  15737. /*Flexible TWT Schedule Support*/
  15738. #define WMI_HECAP_MAC_FLEXTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  15739. #define WMI_HECAP_MAC_FLEXTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  15740. /*Rx Control Frame to MultiBSS*/
  15741. #define WMI_HECAP_MAC_MBSS_GET_D2(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  15742. #define WMI_HECAP_MAC_MBSS_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  15743. /* BSRP A-MPDU Aggregation
  15744. * maintaining compatibility since we don't support this now so not wasting memory
  15745. */
  15746. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D2(he_cap) (0)
  15747. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D2(he_cap, value) {;}
  15748. /* Quiet Time Period (QTP) operation
  15749. * maintaining compatibility since we don't support this now so not wasting memory
  15750. */
  15751. #define WMI_HECAP_MAC_QTP_GET_D2(he_cap) (0)
  15752. #define WMI_HECAP_MAC_QTP_SET_D2(he_cap, value) {;}
  15753. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  15754. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  15755. * that contains a BQR in the A-Control subfield
  15756. * maintaining compatibility since we don't support this now so not wasting memory
  15757. */
  15758. #define WMI_HECAP_MAC_ABQR_GET_D2(he_cap) (0)
  15759. #define WMI_HECAP_MAC_ABQR_SET_D2(he_cap, value) {;}
  15760. /*Indicates support by the STA for the role of SR Responder.*/
  15761. #define WMI_HECAP_MAC_SRRESP_GET_D2(he_cap) (0)
  15762. #define WMI_HECAP_MAC_SRRESP_SET_D2(he_cap, value) {;}
  15763. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  15764. * frames or TIM frames as described in AP operation for opportunistic power save.
  15765. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  15766. */
  15767. #define WMI_HECAP_MAC_OPS_GET_D2(he_cap) (0)
  15768. #define WMI_HECAP_MAC_OPS_SET_D2(he_cap, value) {;}
  15769. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  15770. * the NDP Feedback Report Poll Trigger frame.
  15771. */
  15772. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D2(he_cap) (0)
  15773. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D2(he_cap, value) {;}
  15774. /* BELOW MACROS ARE DEPRECATED Also we are not defining bits for capabilities
  15775. * beyond bit 31 we donot support as it adds additional dword to our struct which may be later
  15776. * removed by standard
  15777. */
  15778. #define WMI_HECAP_MAC_MBAHECTRL_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  15779. #define WMI_HECAP_MAC_MBAHECTRL_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  15780. #define WMI_HECAP_MAC_MURTS_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  15781. #define WMI_HECAP_MAC_MURTS_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  15782. /*Deprecate use WMI_HECAP_PHY_PREAMBLEPUNCRX instead*/
  15783. #define WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy) WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy)
  15784. #define WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value)
  15785. /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LTFGIFORHE_GET instead */
  15786. #define WMI_HECAP_PHY_OLTF_GET_D2(he_cap_phy) WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy)
  15787. #define WMI_HECAP_PHY_OLTF_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value)
  15788. /*DEPRECATED - USE WMI_HECAP_PHY_BFMENLTSGT80MHZ*/
  15789. #define WMI_HECAP_PHY_SUBFMESTS_GET_D2(he_cap_phy) WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy)
  15790. #define WMI_HECAP_PHY_SUBFMESTS_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value)
  15791. /*DEPRECATED - use WMI_HECAP_PHY_PETHRESPRESENT**/
  15792. #define WMI_HECAP_PHY_PADDING_GET_D2(he_cap_phy) WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy)
  15793. #define WMI_HECAP_PHY_PADDING_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value)
  15794. /**DO NOT USE - DEPRECATED*/
  15795. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2(he_cap_phy) (0)
  15796. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2(he_cap_phy, value) {;}
  15797. /*DO NOT USE - DEPRECATED**/
  15798. #define WMI_HECAP_PHY_32GI_GET_D2(he_cap_phy) (0)
  15799. #define WMI_HECAP_PHY_32GI_SET_D2(he_cap_phy, value) {;}
  15800. /*DO NOT USE - DEPRECATED**/
  15801. #define WMI_HECAP_PHY_NOSUNDIMENS_GET_D2(he_cap_phy) (0)
  15802. #define WMI_HECAP_PHY_NOSUNDIMENS_SET_D2(he_cap_phy, value) {;}
  15803. /*DO NOT USE - DEPRECATED**/
  15804. #define WMI_HECAP_PHY_40MHZNSS_GET_D2(he_cap_phy)(0)
  15805. #define WMI_HECAP_PHY_40MHZNSS_SET_D2(he_cap_phy, value) {;}
  15806. /* START TEMPORARY WORKAROUND -
  15807. * Leave legacy names as aliases for new names, until all references to the
  15808. * legacy names have been removed.
  15809. */
  15810. #define WMI_HECAP_PHY_ULOFDMA_GET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  15811. #define WMI_HECAP_PHY_ULOFDMA_SET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  15812. /* END TEMPORARY WORKAROUND */
  15813. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  15814. #define WMI_HECAP_PHY_DCM_GET_D2(he_cap_phy) WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy)
  15815. #define WMI_HECAP_PHY_DCM_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value)
  15816. /*
  15817. * The maximum value for NSTS-1<=80MHz,(min val 3)total that can be sent
  15818. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  15819. */
  15820. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  15821. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  15822. /*
  15823. * The maximum value for NSTS-1 > 80MHz (min val 3) total that can be sent
  15824. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  15825. */
  15826. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  15827. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  15828. /*
  15829. * Indicates the spatial multiplexing power save mode after receiving a
  15830. * Trigger frame that is in operation immediately after (re)association.
  15831. */
  15832. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2(he_cap2) (0)
  15833. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2(he_cap2, value) {;}
  15834. /* Indicates support for Punctured Sounding */
  15835. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D2(he_cap2) (0)
  15836. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D2(he_cap2, value) {;}
  15837. /*
  15838. * Indicates support for receiving a Trigger frame in an HT PPDU and
  15839. * receiving a Trigger frame in a VHT PPDU
  15840. */
  15841. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2(he_cap2) (0)
  15842. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2(he_cap2, value) {;}
  15843. #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode) (((_rcode) >> 8) & 0x7)
  15844. #define WMI_GET_HW_RATECODE_NSS_V1(_rcode) (((_rcode) >> 5) & 0x7)
  15845. #define WMI_GET_HW_RATECODE_RATE_V1(_rcode) (((_rcode) >> 0) & 0x1F)
  15846. #define WMI_ASSEMBLE_RATECODE_V1(_rate, _nss, _pream) \
  15847. (((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
  15848. typedef struct {
  15849. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
  15850. /** unique id identifying the VDEV, generated by the caller */
  15851. A_UINT32 vdev_id;
  15852. /** requestor id identifying the caller module */
  15853. A_UINT32 requestor_id;
  15854. /** beacon interval from received beacon */
  15855. A_UINT32 beacon_interval;
  15856. /** DTIM Period from the received beacon */
  15857. A_UINT32 dtim_period;
  15858. /** Flags */
  15859. A_UINT32 flags;
  15860. /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  15861. wmi_ssid ssid;
  15862. /** beacon/probe response xmit rate. Applicable for SoftAP. */
  15863. /** This field will be invalid and ignored unless the */
  15864. /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
  15865. /** When valid, this field contains the fixed tx rate for the beacon */
  15866. /** and probe response frames send by the GO or SoftAP */
  15867. A_UINT32 bcn_tx_rate;
  15868. /** beacon/probe response xmit power. Applicable for SoftAP. */
  15869. A_UINT32 bcn_txPower;
  15870. /** number of p2p NOA descriptor(s) from scan entry */
  15871. A_UINT32 num_noa_descriptors;
  15872. /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  15873. During CAC, Our HW shouldn't ack ditected frames */
  15874. A_UINT32 disable_hw_ack;
  15875. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  15876. /** The DBS policy manager indicates the preferred number of transmit streams. */
  15877. A_UINT32 preferred_tx_streams;
  15878. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  15879. /** the DBS policy manager indicates the preferred number of receive streams. */
  15880. A_UINT32 preferred_rx_streams;
  15881. A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
  15882. A_UINT32 cac_duration_ms; /* in milliseconds */
  15883. A_UINT32 regdomain;
  15884. /* min data rate to be used in BSS in Mbps */
  15885. A_UINT32 min_data_rate;
  15886. /** @mbss_capability_flags: Bitmap of vdev's MBSS/EMA capability.
  15887. * Capabilities are combination of below flags:
  15888. * VDEV_FLAGS_NON_MBSSID_AP
  15889. * VDEV_FLAGS_TRANSMIT_AP
  15890. * VDEV_FLAGS_NON_TRANSMIT_AP
  15891. * VDEV_FLAGS_EMA_MODE
  15892. * VDEV_FLAGS_SCAN_MODE_VAP - if the vdev is used for scan radio
  15893. */
  15894. A_UINT32 mbss_capability_flags;
  15895. /** vdevid of transmitting VAP (mbssid case). Ignored for non mbssid case */
  15896. A_UINT32 vdevid_trans;
  15897. A_UINT32 eht_ops;
  15898. A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20 MHz BW punctured */
  15899. A_UINT32 mbssid_multi_group_flag; /* Flag to identify whether multi group mbssid is supported */
  15900. A_UINT32 mbssid_multi_group_id; /* Group id of current vdev only valid when multi group mbssid is supported */
  15901. /* Target TSF value by which VDEV restart procedure should be completed in FW */
  15902. A_UINT32 target_tsf_us_lo; /* bits 31:0 */
  15903. A_UINT32 target_tsf_us_hi; /* bits 63:32 */
  15904. /* The TLVs follows this structure:
  15905. * wmi_channel chan; <-- WMI channel
  15906. * wmi_p2p_noa_descriptor noa_descriptors[]; <-- actual p2p NOA descriptor from scan entry
  15907. * wmi_vdev_start_mlo_params mlo_params[0,1]; <-- vdev start MLO parameters
  15908. * optional TLV, only present for MLO vdevs,
  15909. * If the vdev is non-MLO the array length should be 0.
  15910. * wmi_partner_link_info link_info[]; <-- partner link info
  15911. * optional TLV, only present for MLO vdevs,
  15912. * If the vdev is non-MLO the array length should be 0.
  15913. * wmi_channel dbw_chan; <-- WMI channel
  15914. * optional TLV for dbw_chan
  15915. * wmi_dbw_chan_info dbw_chan_info
  15916. * optional TLV used for dbw_chan_info
  15917. */
  15918. } wmi_vdev_start_request_cmd_fixed_param;
  15919. typedef struct {
  15920. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
  15921. /** unique id identifying the VDEV, generated by the caller */
  15922. A_UINT32 vdev_id;
  15923. } wmi_vdev_delete_cmd_fixed_param;
  15924. typedef struct {
  15925. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_dfs_ap_config_fixed_param */
  15926. /** unique id identifying the VDEV, generated by the caller */
  15927. A_UINT32 vdev_id;
  15928. /** "set" field:
  15929. * HOST to specify a non-zero value if DFS master AP config is to be added,
  15930. * or a zero value if it is to be removed.
  15931. */
  15932. A_UINT32 set;
  15933. /* The TLVs follows this structure:
  15934. * wmi_mac_addr bssid; <-- bssid for P2P GO's STA's connected AP,
  15935. * STA's connected AP is DFS master
  15936. * optional TLV used for bssid
  15937. * wmi_mac_addr non_tx_bssid; <-- bssid for P2P GO's STA's connected AP,
  15938. * if connected to non TX VAP
  15939. * optional TLV used for bssid
  15940. */
  15941. } wmi_p2p_go_dfs_ap_config_fixed_param;
  15942. enum WMI_VDEV_UP_FLAGS {
  15943. /** EMA_MBSSID_AP
  15944. * Valid only for STA VDEV.
  15945. * This flag will be set when STA connected MBSSID AP is EMA capable.
  15946. * EMA - Enhanced Multiple BSS Advertisemet.
  15947. */
  15948. WMI_VDEV_UP_FLAG_EMA_MBSSID_AP = 0x00000001,
  15949. };
  15950. typedef struct {
  15951. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
  15952. /** unique id identifying the VDEV, generated by the caller */
  15953. A_UINT32 vdev_id;
  15954. /** aid (assoc id) received in association response for STA VDEV */
  15955. A_UINT32 vdev_assoc_id;
  15956. /** bssid of the BSS the VDEV is joining */
  15957. wmi_mac_addr vdev_bssid;
  15958. /** bssid of transmitted AP (mbssid case) */
  15959. wmi_mac_addr trans_bssid;
  15960. /** the profile index of the connected non-trans ap (mbssid case). 0 means invalid */
  15961. A_UINT32 profile_idx;
  15962. /** the total profile numbers of non-trans aps (mbssid case). 0 means legacy AP */
  15963. A_UINT32 profile_num;
  15964. /** flags - this is a bitwise-or combination of WMI_VDEV_UP_FLAGS values */
  15965. A_UINT32 flags;
  15966. } wmi_vdev_up_cmd_fixed_param;
  15967. typedef struct {
  15968. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
  15969. /** unique id identifying the VDEV, generated by the caller */
  15970. A_UINT32 vdev_id;
  15971. /* The TLVs follows this structure:
  15972. * - wmi_vdev_stop_mlo_params mlo_params[0/1];
  15973. * optional TLV, host may provide this TLV to indicate the vdev stop
  15974. * is done for link switch.
  15975. */
  15976. } wmi_vdev_stop_cmd_fixed_param;
  15977. typedef struct {
  15978. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
  15979. /** unique id identifying the VDEV, generated by the caller */
  15980. A_UINT32 vdev_id;
  15981. } wmi_vdev_down_cmd_fixed_param;
  15982. typedef struct {
  15983. /** unique id identifying the VDEV, generated by the caller */
  15984. A_UINT32 vdev_id;
  15985. } wmi_vdev_standby_response_cmd;
  15986. typedef struct {
  15987. /** unique id identifying the VDEV, generated by the caller */
  15988. A_UINT32 vdev_id;
  15989. } wmi_vdev_resume_response_cmd;
  15990. typedef struct {
  15991. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  15992. /** unique id identifying the VDEV, generated by the caller */
  15993. A_UINT32 vdev_id;
  15994. /** parameter id */
  15995. A_UINT32 param_id;
  15996. /** parameter value */
  15997. A_UINT32 param_value;
  15998. } wmi_vdev_set_param_cmd_fixed_param;
  15999. typedef struct {
  16000. A_UINT32 key_seq_counter_l;
  16001. A_UINT32 key_seq_counter_h;
  16002. } wmi_key_seq_counter;
  16003. #define WMI_CIPHER_NONE 0x0 /* clear key */
  16004. #define WMI_CIPHER_WEP 0x1
  16005. #define WMI_CIPHER_TKIP 0x2
  16006. #define WMI_CIPHER_AES_OCB 0x3
  16007. #define WMI_CIPHER_AES_CCM 0x4
  16008. #define WMI_CIPHER_WAPI 0x5
  16009. #define WMI_CIPHER_CKIP 0x6
  16010. #define WMI_CIPHER_AES_CMAC 0x7
  16011. #define WMI_CIPHER_ANY 0x8
  16012. #define WMI_CIPHER_AES_GCM 0x9
  16013. #define WMI_CIPHER_AES_GMAC 0xa
  16014. #define WMI_CIPHER_WAPI_GCM_SM4 0xb
  16015. #define WMI_CIPHER_BIP_CMAC_128 0xc
  16016. #define WMI_CIPHER_BIP_CMAC_256 0xd
  16017. #define WMI_CIPHER_BIP_GMAC_128 0xe
  16018. #define WMI_CIPHER_BIP_GMAC_256 0xf
  16019. typedef struct {
  16020. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
  16021. /** unique id identifying the VDEV, generated by the caller */
  16022. A_UINT32 vdev_id;
  16023. /** MAC address used for installing */
  16024. wmi_mac_addr peer_macaddr;
  16025. /** key index */
  16026. A_UINT32 key_ix;
  16027. /** key flags */
  16028. A_UINT32 key_flags;
  16029. /** key cipher, defined above */
  16030. A_UINT32 key_cipher;
  16031. /** key rsc counter */
  16032. wmi_key_seq_counter key_rsc_counter;
  16033. /** global key rsc counter */
  16034. wmi_key_seq_counter key_global_rsc_counter;
  16035. /** global key tsc counter */
  16036. wmi_key_seq_counter key_tsc_counter;
  16037. /** WAPI key rsc counter */
  16038. A_UINT8 wpi_key_rsc_counter[16];
  16039. /** WAPI key tsc counter */
  16040. A_UINT8 wpi_key_tsc_counter[16];
  16041. /** key length */
  16042. A_UINT32 key_len;
  16043. /** key tx mic length */
  16044. A_UINT32 key_txmic_len;
  16045. /** key rx mic length */
  16046. A_UINT32 key_rxmic_len;
  16047. /** specifies if the group_key_ix is valid, filled by the sender */
  16048. A_UINT32 is_group_key_ix_valid;
  16049. /** Multi group key ID */
  16050. A_UINT32 group_key_ix;
  16051. /*
  16052. * Following this struct are this TLV.
  16053. * A_UINT8 key_data[]; <-- actual key data; contains key followed by tx mic followed by rx mic
  16054. */
  16055. } wmi_vdev_install_key_cmd_fixed_param;
  16056. typedef struct {
  16057. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ltf_key_seed_cmd_fixed_param */
  16058. /** unique id identifying the VDEV, generated by the caller */
  16059. A_UINT32 vdev_id;
  16060. /** MAC address used for deriving */
  16061. wmi_mac_addr peer_macaddr;
  16062. /** authentication mode */
  16063. A_UINT32 rsn_authmode;
  16064. /** LTF key seed length */
  16065. A_UINT32 key_seed_len;
  16066. /*
  16067. * Following this struct are this TLV.
  16068. * A_UINT8 key_seed[key_seed_len]; <-- actual LTF key seed;
  16069. */
  16070. } wmi_vdev_set_ltf_key_seed_cmd_fixed_param;
  16071. /** Preamble types to be used with VDEV fixed rate configuration */
  16072. typedef enum {
  16073. WMI_RATE_PREAMBLE_OFDM,
  16074. WMI_RATE_PREAMBLE_CCK,
  16075. WMI_RATE_PREAMBLE_HT,
  16076. WMI_RATE_PREAMBLE_VHT,
  16077. WMI_RATE_PREAMBLE_HE,
  16078. WMI_RATE_PREAMBLE_EHT,
  16079. } WMI_RATE_PREAMBLE;
  16080. /** Value to disable fixed rate setting */
  16081. #define WMI_FIXED_RATE_NONE (0xff)
  16082. #define WMI_GI_400_NS 1
  16083. #define WMI_GI_800_NS 0
  16084. #define WMI_GI_1600_NS 2
  16085. #define WMI_GI_3200_NS 3
  16086. /** OCE(Optimized Connectivity_Experience) Feature flags */
  16087. #define WMI_VDEV_OCE_PROBE_REQUEST_RATE_FEATURE_BITMAP 0x1
  16088. #define WMI_VDEV_OCE_PROBE_RESPONSE_RATE_FEATURE_BITMAP 0x2
  16089. #define WMI_VDEV_OCE_BEACON_RATE_FEATURE_BITMAP 0x4
  16090. #define WMI_VDEV_OCE_PROBE_REQUEST_DEFERRAL_FEATURE_BITMAP 0x8
  16091. #define WMI_VDEV_OCE_FILS_DISCOVERY_FRAME_FEATURE_BITMAP 0x10
  16092. #define WMI_VDEV_OCE_ESP_FEATURE_BITMAP 0x20
  16093. #define WMI_VDEV_OCE_REASSOC_REJECT_FEATURE_BITMAP 0x40
  16094. /** 6 GHZ params **/
  16095. /* Control to enable/disable beacon tx in non-HT duplicate */
  16096. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BEACON 0x1
  16097. /* Control to enable/disable broadcast probe response tx in non-HT duplicate */
  16098. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BCAST_PROBE_RSP 0x2
  16099. /* Control to enable/disable FILS discovery frame tx in non-HT duplicate */
  16100. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_FD_FRAME 0x4
  16101. /* Control to enable/disable periodic FILS discovery frame transmission */
  16102. #define WMI_VDEV_6GHZ_BITMAP_FD_FRAME 0x8 /* deprecated */
  16103. /* Control to enable/disable periodic broadcast probe response transmission */
  16104. #define WMI_VDEV_6GHZ_BITMAP_BCAST_PROBE_RSP 0x10 /* deprecated */
  16105. /** ROAM_11KV control params */
  16106. /* WMI_VDEV_ROAM_11KV_CTRL_DISABLE_FW_TRIGGER_ROAMING:
  16107. * Disable all FW-triggered roaming (e.g. low RSSI/final bmiss/BTM/PER)
  16108. * while still allowing host-invoked roaming.
  16109. */
  16110. #define WMI_VDEV_ROAM_11KV_CTRL_DISABLE_FW_TRIGGER_ROAMING 0x1
  16111. /* WMI_VDEV_ROAM_11KV_CTRL_KEEP_CONN_RECV_BTM_REQ:
  16112. * DUT do not scan or roaming when receiving BTM req frame
  16113. */
  16114. #define WMI_VDEV_ROAM_11KV_CTRL_KEEP_CONN_RECV_BTM_REQ 0x2
  16115. /* WMI_VDEV_ROAM_11KV_CTRL_DONOT_SEND_DISASSOC_ON_BTM_DI_SET:
  16116. * DUT do not send disasoc frame to AP when receiving BTM req with
  16117. * Disassoc Imminent bit set to 1.
  16118. */
  16119. #define WMI_VDEV_ROAM_11KV_CTRL_DONOT_SEND_DISASSOC_ON_BTM_DI_SET 0x4
  16120. /** NAN vdev config Feature flags */
  16121. #define WMI_VDEV_NAN_ALLOW_DW_CONFIG_CHANGE_IN_SYNC_ROLE 0x1
  16122. #define WMI_VDEV_NAN_FORCE_CONGIG_WOW_DB_INTERVAL 0x2
  16123. /** the definition of different VDEV parameters */
  16124. typedef enum {
  16125. /** RTS Threshold */
  16126. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  16127. /** Fragmentation threshold */
  16128. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, /* 0x2 */
  16129. /** beacon interval in TUs */
  16130. WMI_VDEV_PARAM_BEACON_INTERVAL, /* 0x3 */
  16131. /** Listen interval in TUs */
  16132. WMI_VDEV_PARAM_LISTEN_INTERVAL, /* 0x4 */
  16133. /** multicast rate in Mbps */
  16134. WMI_VDEV_PARAM_MULTICAST_RATE, /* 0x5 */
  16135. /** management frame rate in Mbps */
  16136. WMI_VDEV_PARAM_MGMT_TX_RATE, /* 0x6 */
  16137. /** slot time (long vs short) */
  16138. WMI_VDEV_PARAM_SLOT_TIME, /* 0x7 */
  16139. /** preamble (long vs short) */
  16140. WMI_VDEV_PARAM_PREAMBLE, /* 0x8 */
  16141. /** SWBA time (time before tbtt in msec) */
  16142. WMI_VDEV_PARAM_SWBA_TIME, /* 0x9 */
  16143. /** time period for updating VDEV stats */
  16144. WMI_VDEV_STATS_UPDATE_PERIOD, /* 0xa */
  16145. /** age out time in msec for frames queued for station in power save*/
  16146. WMI_VDEV_PWRSAVE_AGEOUT_TIME, /* 0xb */
  16147. /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
  16148. WMI_VDEV_HOST_SWBA_INTERVAL, /* 0xc */
  16149. /** DTIM period (specified in units of num beacon intervals) */
  16150. WMI_VDEV_PARAM_DTIM_PERIOD, /* 0xd */
  16151. /** scheduler air time limit for this VDEV. used by off chan scheduler */
  16152. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, /* 0xe */
  16153. /** enable/disable WDS for this VDEV */
  16154. WMI_VDEV_PARAM_WDS, /* 0xf */
  16155. /** ATIM Window */
  16156. WMI_VDEV_PARAM_ATIM_WINDOW, /* 0x10 */
  16157. /** BMISS max */
  16158. WMI_VDEV_PARAM_BMISS_COUNT_MAX, /* 0x11 */
  16159. /** BMISS first time */
  16160. WMI_VDEV_PARAM_BMISS_FIRST_BCNT, /* 0x12 */
  16161. /** BMISS final time */
  16162. WMI_VDEV_PARAM_BMISS_FINAL_BCNT, /* 0x13 */
  16163. /** WMM enables/disabled */
  16164. WMI_VDEV_PARAM_FEATURE_WMM, /* 0x14 */
  16165. /** Channel width */
  16166. WMI_VDEV_PARAM_CHWIDTH, /* 0x15 */
  16167. /** Channel Offset */
  16168. WMI_VDEV_PARAM_CHEXTOFFSET, /* 0x16 */
  16169. /** Disable HT Protection */
  16170. WMI_VDEV_PARAM_DISABLE_HTPROTECTION, /* 0x17 */
  16171. /** Quick STA Kickout */
  16172. WMI_VDEV_PARAM_STA_QUICKKICKOUT, /* 0x18 */
  16173. /** Rate to be used with Management frames */
  16174. WMI_VDEV_PARAM_MGMT_RATE, /* 0x19 */
  16175. /** Protection Mode */
  16176. WMI_VDEV_PARAM_PROTECTION_MODE, /* 0x1a */
  16177. /** Fixed rate setting
  16178. * The top nibble is used to select which format to use for encoding
  16179. * the rate specification: 0xVXXXXXXX
  16180. * If V == 0b0000: format is same as before: 0x000000RR
  16181. * If V == 0b0001: format is: 0x1000RRRR.
  16182. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  16183. * The host shall use the new V1 format (and set V = 0x1) if the target
  16184. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  16185. * system is configured with Nss > 4 (either at compile time within the
  16186. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  16187. * by the target).
  16188. */
  16189. WMI_VDEV_PARAM_FIXED_RATE, /* 0x1b */
  16190. /**
  16191. * 11AX: GI =
  16192. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  16193. * 11N: SGI=WMI_GI_400_NS
  16194. */
  16195. WMI_VDEV_PARAM_SGI, /* 0x1c */
  16196. /** Enable LDPC */
  16197. WMI_VDEV_PARAM_LDPC, /* 0x1d */
  16198. /** Enable Tx STBC */
  16199. WMI_VDEV_PARAM_TX_STBC, /* 0x1e */
  16200. /** Enable Rx STBC */
  16201. WMI_VDEV_PARAM_RX_STBC, /* 0x1f */
  16202. /** Intra BSS forwarding */
  16203. WMI_VDEV_PARAM_INTRA_BSS_FWD, /* 0x20 */
  16204. /** Setting Default xmit key for Vdev */
  16205. WMI_VDEV_PARAM_DEF_KEYID, /* 0x21 */
  16206. /** NSS width */
  16207. WMI_VDEV_PARAM_NSS, /* 0x22 */
  16208. /** Set the custom rate for the broadcast data frames */
  16209. WMI_VDEV_PARAM_BCAST_DATA_RATE, /* 0x23 */
  16210. /** Set the custom rate (rate-code) for multicast data frames */
  16211. WMI_VDEV_PARAM_MCAST_DATA_RATE, /* 0x24 */
  16212. /** Tx multicast packet indicate Enable/Disable */
  16213. WMI_VDEV_PARAM_MCAST_INDICATE, /* 0x25 */
  16214. /** Tx DHCP packet indicate Enable/Disable */
  16215. WMI_VDEV_PARAM_DHCP_INDICATE, /* 0x26 */
  16216. /** Enable host inspection of Tx unicast packet to unknown destination */
  16217. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, /* 0x27 */
  16218. /* The minimum amount of time AP begins to consider STA inactive */
  16219. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, /* 0x28 */
  16220. /* An associated STA is considered inactive when there is no recent TX/RX
  16221. * activity and no downlink frames are buffered for it. Once a STA exceeds
  16222. * the maximum idle inactive time, the AP will send an 802.11 data-null as
  16223. * a keep alive to verify the STA is still associated. If the STA does ACK
  16224. * the data-null, or if the data-null is buffered and the STA does not
  16225. * retrieve it, the STA will be considered unresponsive (see
  16226. * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
  16227. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, /* 0x29 */
  16228. /* An associated STA is considered unresponsive if there is no recent
  16229. * TX/RX activity and downlink frames are buffered for it. Once a STA
  16230. * exceeds the maximum unresponsive time, the AP will send a
  16231. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  16232. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, /* 0x2a */
  16233. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  16234. WMI_VDEV_PARAM_AP_ENABLE_NAWDS, /* 0x2b */
  16235. /** Enable/Disable RTS-CTS */
  16236. WMI_VDEV_PARAM_ENABLE_RTSCTS, /* 0x2c */
  16237. /* Enable TXBFee/er */
  16238. WMI_VDEV_PARAM_TXBF, /* 0x2d */
  16239. /**Set packet power save */
  16240. WMI_VDEV_PARAM_PACKET_POWERSAVE, /* 0x2e */
  16241. /**Drops un-encrypted packets if any received in an encryted connection
  16242. * otherwise forwards to host
  16243. */
  16244. WMI_VDEV_PARAM_DROP_UNENCRY, /* 0x2f */
  16245. /*
  16246. * Set TX encap type.
  16247. *
  16248. * enum wmi_pkt_type is to be used as the parameter
  16249. * specifying the encap type.
  16250. */
  16251. WMI_VDEV_PARAM_TX_ENCAP_TYPE, /* 0x30 */
  16252. /*
  16253. * Try to detect stations that woke-up and exited power save but did not
  16254. * successfully transmit data-null with PM=0 to AP. When this happens,
  16255. * STA and AP power save state are out-of-sync. Use buffered but
  16256. * undelivered MSDU to the STA as a hint that the STA is really awake
  16257. * and expecting normal ASAP delivery, rather than retrieving BU with
  16258. * PS-Poll, U-APSD trigger, etc.
  16259. *
  16260. * 0 disables out-of-sync detection. Maximum time is 255 seconds.
  16261. */
  16262. WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, /* 0x31 */
  16263. /* Enable/Disable early rx dynamic adjust feature.
  16264. * Early-rx dynamic adjust is a advance power save feature.
  16265. * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
  16266. * timing discrepancies in the system.
  16267. * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
  16268. * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
  16269. * properly to minimum the power consume.*/
  16270. WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, /* 0x32 */
  16271. /* set target bmiss number per sample cycle if bmiss adjust was chosen.
  16272. * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
  16273. * which can be set by user through WMI command.
  16274. */
  16275. WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, /* 0x33 */
  16276. /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
  16277. WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, /* 0x34 */
  16278. /* set slop_step */
  16279. WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP, /* 0x35 */
  16280. /* set init slop */
  16281. WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP, /* 0x36 */
  16282. /* pause adjust enable/disable */
  16283. WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, /* 0x37 */
  16284. /* Set channel pwr limit value of the vdev the minimal value of all
  16285. * vdevs operating on this channel will be set as channel tx power
  16286. * limit, which is used to configure ratearray
  16287. */
  16288. WMI_VDEV_PARAM_TX_PWRLIMIT, /* 0x38 */
  16289. /* set the count of snr value for calculation in snr monitor */
  16290. WMI_VDEV_PARAM_SNR_NUM_FOR_CAL, /* 0x39 */
  16291. /** Roaming offload */
  16292. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, /* 0x3a */
  16293. /** Enable Leader request RX functionality for RMC */
  16294. WMI_VDEV_PARAM_ENABLE_RMC, /* 0x3b */
  16295. /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
  16296. * by himself. If the beacon lost time exceed this threshold, the peer is
  16297. * thought to be gone. */
  16298. WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS, /* 0x3c */
  16299. /** max rate in kpbs, transmit rate can't go beyond it */
  16300. WMI_VDEV_PARAM_MAX_RATE, /* 0x3d */
  16301. /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift*/
  16302. WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE, /* 0x3e */
  16303. /* set Tx failure count threshold for the vdev */
  16304. WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR, /* 0x3f */
  16305. /* set ebt resync timeout value, in the unit of TU */
  16306. WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT, /* 0x40 */
  16307. /* Enable Aggregation State Trigger Event */
  16308. WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE, /* 0x41 */
  16309. /* This parameter indicates whether IBSS station can enter into power save
  16310. * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
  16311. * awake all the time and should never set PM=1 in its transmitted frames.
  16312. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
  16313. * is non-zero. */
  16314. WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED, /* 0x42 */
  16315. /* This parameter indicates if this station can enter into power collapse
  16316. * for the remaining beacon interval after the ATIM window.
  16317. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
  16318. * is set to TRUE. */
  16319. WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED, /* 0x43 */
  16320. /* This parameter indicates whether IBSS station exit power save mode and
  16321. * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
  16322. * whenever there is a TX/RX activity. */
  16323. WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED, /* 0x44 */
  16324. /* If Awake on TX/RX activity is enabled, this parameter indicates
  16325. * the data inactivity time in number of beacon intervals after which
  16326. * IBSS station reenters power save by sending Null frame with PM=1. */
  16327. WMI_VDEV_PARAM_INACTIVITY_CNT, /* 0x45 */
  16328. /* Inactivity time in msec after which TX Service Period (SP) is
  16329. * terminated by sending a Qos Null frame with EOSP.
  16330. * If value is 0, TX SP is terminated with the last buffered packet itself
  16331. * instead of waiting for the inactivity timeout. */
  16332. WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS, /* 0x46 */
  16333. /** DTIM policy */
  16334. WMI_VDEV_PARAM_DTIM_POLICY, /* 0x47 */
  16335. /* When IBSS network is initialized, PS-supporting device
  16336. * does not enter protocol sleep state during first
  16337. * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
  16338. WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS, /* 0x48 */
  16339. /* Enable/Disable 1 RX chain usage during the ATIM window */
  16340. WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE, /* 0x49 */
  16341. /* RX Leak window is the time driver waits before shutting down
  16342. * the radio or switching the channel and after receiving an ACK
  16343. * for a data frame with PM bit set) */
  16344. WMI_VDEV_PARAM_RX_LEAK_WINDOW, /* 0x4a */
  16345. /** Averaging factor(16 bit value) is used in the calculations to
  16346. * perform averaging of different link level statistics like average
  16347. * beacon spread or average number of frames leaked */
  16348. WMI_VDEV_PARAM_STATS_AVG_FACTOR, /* 0x4b */
  16349. /** disconnect threshold, once the consecutive error for specific peer
  16350. * exceed this threshold, FW will send kickout event to host */
  16351. WMI_VDEV_PARAM_DISCONNECT_TH, /* 0x4c */
  16352. /** The rate_code of RTS_CTS changed by host. Now FW can support
  16353. * more non-HT rates rather than 1Mbps or 6Mbps */
  16354. WMI_VDEV_PARAM_RTSCTS_RATE, /* 0x4d */
  16355. /** This parameter indicates whether using a long duration RTS-CTS
  16356. * protection when a SAP goes off channel in MCC mode */
  16357. WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE, /* 0x4e */
  16358. /** This parameter indicates whether using a broadcast probe response
  16359. * to increase the detectability of SAP in MCC mode */
  16360. WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE, /* 0x4f */
  16361. /** This parameter indicates the power backoff in percentage
  16362. * currently supports 100%, 50%, 25%, 12.5%, and minimum
  16363. * Host passes 0, 1, 2, 3, 4 to Firmware
  16364. * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
  16365. * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
  16366. */
  16367. WMI_VDEV_PARAM_TXPOWER_SCALE, /* 0x50 */
  16368. /** TX power backoff in dB: tx power -= param value
  16369. * Host passes values(DB) to Halphy, Halphy reduces the power table
  16370. * by the values. Safety check will happen in Halphy.
  16371. */
  16372. WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB, /* 0x51 */
  16373. /** Multicast to Unicast conversion setting */
  16374. WMI_VDEV_PARAM_MCAST2UCAST_SET, /* 0x52 */
  16375. /** Total number of HW retries */
  16376. WMI_VDEV_PARAM_RC_NUM_RETRIES, /* 0x53 */
  16377. /** Max tx percentage for cabq */
  16378. WMI_VDEV_PARAM_CABQ_MAXDUR, /* 0x54 */
  16379. /** MFPTEST settings */
  16380. WMI_VDEV_PARAM_MFPTEST_SET, /* 0x55 */
  16381. /** RTS Fixed rate setting */
  16382. WMI_VDEV_PARAM_RTS_FIXED_RATE, /* 0x56 */
  16383. /** VHT SGI MASK */
  16384. WMI_VDEV_PARAM_VHT_SGIMASK, /* 0x57 */
  16385. /** VHT80 Auto Rate MASK */
  16386. WMI_VDEV_PARAM_VHT80_RATEMASK, /* 0x58 */
  16387. /** set Proxy STA features for this vap */
  16388. WMI_VDEV_PARAM_PROXY_STA, /* 0x59 */
  16389. /** set virtual cell mode - enable/disable */
  16390. WMI_VDEV_PARAM_VIRTUAL_CELL_MODE, /* 0x5a */
  16391. /** Set receive packet type */
  16392. WMI_VDEV_PARAM_RX_DECAP_TYPE, /* 0x5b */
  16393. /** Set ratemask with specific Bandwidth and NSS */
  16394. WMI_VDEV_PARAM_BW_NSS_RATEMASK, /* 0x5c */
  16395. /** Set SENSOR Support */
  16396. WMI_VDEV_PARAM_SENSOR_AP, /* 0x5d */
  16397. /** Set beacon rate */
  16398. WMI_VDEV_PARAM_BEACON_RATE, /* 0x5e */
  16399. /** Enable CTS to self for DTIM beacon */
  16400. WMI_VDEV_PARAM_DTIM_ENABLE_CTS, /* 0x5f */
  16401. /** Disable station kickout at Vap level */
  16402. WMI_VDEV_PARAM_STA_KICKOUT, /* 0x60 */
  16403. /* VDEV capabilities */
  16404. WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */ /* 0x61 */
  16405. /**
  16406. * Increment TSF in micro seconds to avoid beacon collision on mesh VAP.
  16407. * The host must ensure that either no other vdevs share the TSF with
  16408. * this vdev, or else that it is acceptable to apply this TSF adjustment
  16409. * to all vdevs sharing the TSF.
  16410. */
  16411. WMI_VDEV_PARAM_TSF_INCREMENT, /* 0x62 */
  16412. /** Disable/Enable AMPDU of vdev per AC:
  16413. * bit | AC
  16414. * --------
  16415. * 0 | VO
  16416. * 1 | VI
  16417. * 2 | BE
  16418. * 3 | BK
  16419. * A value of 0 in a given bit disables A-MPDU aggregation for
  16420. * that AC; a value of 1 enables A-MPDU aggregation
  16421. */
  16422. WMI_VDEV_PARAM_AMPDU_PER_AC, /* 0x63 */
  16423. /**
  16424. * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
  16425. * Used mainly for mesh-vap.
  16426. * The parameter value delivered with the RX_FILTER vdev param contains
  16427. * a bit-or mask of wmi_vdev_param_filter enum values.
  16428. */
  16429. WMI_VDEV_PARAM_RX_FILTER, /* 0x64 */
  16430. /** vdev-specific mgmt tx power in dBm units (signed integer value) */
  16431. WMI_VDEV_PARAM_MGMT_TX_POWER, /* 0x65 */
  16432. /** Vdev level non aggregration/11g sw retry threshold. 0-disable, min:0, max:31, default:15 */
  16433. WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0x66 */
  16434. /** Vdev level aggregration sw retry threshold. 0-disable, min:0, max:31, default:15 */
  16435. WMI_VDEV_PARAM_AGG_SW_RETRY_TH, /* 0x67 */
  16436. /** disable dynamic bw RTS **/
  16437. WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS, /* 0x68 */
  16438. /** per ssid (vdev) based ATF strict/fair scheduling policy
  16439. * param values are WMI_ATF_SSID_FAIR_SCHED, WMI_ATF_SSID_STRICT_SCHED,
  16440. * or WMI_ATF_SSID_FAIR_SCHED_WITH_UB
  16441. */
  16442. WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY, /* 0x69 */
  16443. /** Enable or disable Dual carrier modulation
  16444. * valid values: 0-Disable DCM, 1-Enable DCM.
  16445. */
  16446. WMI_VDEV_PARAM_HE_DCM, /* 0x6a */
  16447. /** Enable or disable Extended range
  16448. * valid values: 0-Disable ER, 1-Enable ER.
  16449. */
  16450. WMI_VDEV_PARAM_HE_RANGE_EXT, /* 0x6b */
  16451. /* enable or disable BCAST probe response feature */
  16452. WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE, /* 0x6c */
  16453. /* param to specify probe request Tx delay during Fast Initial Link Setup */
  16454. WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME, /* units = milliseconds */ /* 0x6d */
  16455. /* enable or disable NOA for P2P GO */
  16456. WMI_VDEV_PARAM_DISABLE_NOA_P2P_GO, /* 0x6e */
  16457. /** Per band user management frame fix rate setting
  16458. * BIT 31: enable (1) or disable (0) mgmt fix rate for 5G
  16459. * BIT 30: enable (1) or disable (0) mgmt fix rate for 2G
  16460. *
  16461. * BIT 23: 11ax (1) or legacy (0) rate code
  16462. * BITS [22..12]: rate code for 5G
  16463. *
  16464. * BIT 11: 11ax (1) or legacy (0) rate code
  16465. * BITS [10..0]: rate code for 2G
  16466. */
  16467. WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE, /* 0x6f */
  16468. /* This should be called before WMI_VDEV_PARAM_TXBF */
  16469. WMI_VDEV_PARAM_11AX_TXBF, /* 0x70 */
  16470. /** This parameter indicates whether VDEV is SMPS intolerant.
  16471. * I.e. - SMPS action frame cannot be transmitted by the VDEV to
  16472. * dynamically change the RX NSS.
  16473. *
  16474. * valid values: 1 - VDEV is SMPS intolerant, 0 - VDEV is SMPS tolerant
  16475. */
  16476. WMI_VDEV_PARAM_SMPS_INTOLERANT, /* 0x71 */
  16477. /** specify probe request Tx delay for scans triggered on this VDEV */
  16478. WMI_VDEV_PARAM_PROBE_DELAY, /* units = milliseconds */ /* 0x72 */
  16479. /** specify the time gap between each set of probe request transmissions.
  16480. * The number of probe requests in each set depends on the ssid_list and
  16481. * bssid_list in the scan request.
  16482. * This parameter will be applied only for scans triggered on this VDEV.
  16483. */
  16484. WMI_VDEV_PARAM_REPEAT_PROBE_TIME, /* units = milliseconds */ /* 0x73 */
  16485. /** specify the HE LTF setting that should be used for fixed rate
  16486. * transmissions.
  16487. *
  16488. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  16489. * or WMI_HE_LTF_4X.
  16490. */
  16491. WMI_VDEV_PARAM_HE_LTF, /* 0x74 */
  16492. /** VDEV parameter to configure the number of TX chains to use for
  16493. * a/b/g rates.
  16494. * bit 0~15 : 11b mode TX chain number.
  16495. * bit 16~31 : 11ag mode TX chain number.
  16496. *
  16497. * valid values:
  16498. * Should not exceed the maximum number of supported TX Chains
  16499. * 0 - Used to reset the vote. Acts as Don't Care
  16500. */
  16501. WMI_VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x75 */
  16502. /**
  16503. * Enable or disable the multi group key feature on this VDEV.
  16504. * used for NAN APP and VLAN Tagging
  16505. */
  16506. WMI_VDEV_PARAM_ENABLE_MULTI_GROUP_KEY, /* 0x76 */
  16507. /*
  16508. * Specify the total number of multi group key on this VDEV.
  16509. */
  16510. WMI_VDEV_PARAM_NUM_GROUP_KEYS, /* 0x77 */
  16511. /** VDEV parameter to enable or disable various OCE features */
  16512. WMI_VDEV_PARAM_ENABLE_DISABLE_OCE_FEATURES, /* 0x78 */
  16513. /*
  16514. * Set/Clear 3 least-significant bits to
  16515. * Disable or Enable rate drop down for MGMT, SU data and MU data pkts
  16516. *
  16517. * bit 0 -> If set MGMT Pkt rate drop down is enabled else disabled
  16518. * bit 1 -> If set SU data Pkt rate drop down is enabled else disabled
  16519. * bit 2 -> If set MU data Pkt rate drop down is enabled else disabled
  16520. * bits 31:3 -> Reserved bits. should be set to zero.
  16521. */
  16522. WMI_VDEV_PARAM_RATE_DROPDOWN_BMAP, /* 0x79 */
  16523. /** VDEV parameter to config modulated DTIM count */
  16524. WMI_VDEV_PARAM_MODDTIM_CNT, /* 0x7a */
  16525. /**
  16526. * VDEV parameter to config max listen interval,
  16527. * when modulated DTIM is enabled.
  16528. * Units are 100TU.
  16529. */
  16530. WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM, /* 0x7b */
  16531. /** VDEV parameter to config dynamic DTIM count */
  16532. WMI_VDEV_PARAM_DYNDTIM_CNT, /* 0x7c */
  16533. /** VDEV parameter to enable or disable RTT responder role
  16534. * A value of 0 in a given bit disables corresponding mode.
  16535. * bit | Responder mode support
  16536. * -----------------------------------------
  16537. * 0 | responder mode for 11MC ranging
  16538. * 1 | responder mode for 11AZ NTB ranging
  16539. * 2 | responder mode for 11AZ TB ranging
  16540. */
  16541. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE, /* 0x7d */
  16542. /** Parameter to configure BA mode.
  16543. * Valid values: 0- Auto mode,
  16544. * 1- Manual mode(addba req not sent).
  16545. * 2- buffer size 64
  16546. * 3- buffer size 256
  16547. * 4- buffer size 128 // placeholder, not valid
  16548. * 5- buffer size 512
  16549. * 6- buffer size 1024
  16550. */
  16551. WMI_VDEV_PARAM_BA_MODE, /* 0x7e */
  16552. /**
  16553. * VDEV parameter to force to set modulate DTIM count as listen interval,
  16554. * no matter whether WoW is enabled
  16555. * Default: Disabled.
  16556. * Valid values: 0- Disabled,
  16557. * 1- Enabled.
  16558. */
  16559. WMI_VDEV_PARAM_FORCED_MODDTIM_ENABLE, /* 0x7f */
  16560. /** specify the setting that are valid for auto rate transmissions.
  16561. * bits 7:0 (LTF): When bitmask is set, then corresponding LTF value is
  16562. * used for auto rate.
  16563. * BIT0 = 1 (WMI_HE_LTF_1X or WMI_EHT_LTF_1X depending on
  16564. * current rate’s preamble type HE or EHT)
  16565. * BIT1 = 1 (WMI_HE_LTF_2X or WMI_EHT_LTF_2X)
  16566. * BIT2 = 1 (WMI_HE_LTF_4X or WMI_EHT_LTF_4X)
  16567. * BIT3-7 = Reserved bits.
  16568. * bits 15:8 (SGI): When bitmask is set, then corresponding SGI value is
  16569. * used for auto rate.
  16570. * BIT8 = 1 (400 NS)
  16571. * BIT9 = 1 (800 NS)
  16572. * BIT10 = 1 (1600 NS)
  16573. * BIT11 = 1 (3200 NS)
  16574. * BIT12-15 = Reserved bits.
  16575. * bits 31:16: Reserved bits. should be set to zero.
  16576. */
  16577. WMI_VDEV_PARAM_AUTORATE_MISC_CFG, /* 0x80 */
  16578. /** VDEV parameter to enable or disable RTT initiator mac address
  16579. * randomization.
  16580. * Default: Disabled.
  16581. * valid values: 0-Disable random mac 1-Enable random mac
  16582. */
  16583. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC, /* 0x81 */
  16584. /**
  16585. * For each AC, configure how many tx retries to send without RTS
  16586. * before enabling RTS
  16587. * bits 0:7 :BE
  16588. * bits 8:15 :BK
  16589. * bits 16:23 :VI
  16590. * bits 24:31 :VO
  16591. * A value of 0 in specific AC means default configuration for that AC.
  16592. */
  16593. WMI_VDEV_PARAM_TX_RETRIES_BEFORE_RTS_PER_AC, /* 0x82 */
  16594. /**
  16595. * Parameter to enable/disable AMSDU aggregation size auto-selection logic.
  16596. * We have logic where AMSDU aggregation size is dynamically decided
  16597. * based on MCS. That logic is enabled by default.
  16598. * For certain tests, we need a method to disable this optimization,
  16599. * and base AMSDU size only on the peer's capability rather than our logic.
  16600. * A value of 0 means disable internal optimization,
  16601. * 1 means enable internal optimzation.
  16602. */
  16603. WMI_VDEV_PARAM_AMSDU_AGGREGATION_SIZE_OPTIMIZATION, /* 0x83 */
  16604. /**
  16605. * In RAW mode, FW will not know whether the encryption is enabled
  16606. * on this vdev or not.
  16607. * Because of this, FW will not program the right info into the
  16608. * RawNwifi TLV resulting in the connection failure in RAW mode.
  16609. * So to program the right info, FW should know whether the security
  16610. * is enabled on this VDEV.
  16611. * Host will send this VDEV param command (With Value = 1) in case of
  16612. * RAW secure mode.
  16613. */
  16614. WMI_VDEV_PARAM_RAW_IS_ENCRYPTED, /* 0x84 */
  16615. /**
  16616. * Dynamically enable/disable green tx (GTX) on supported rates.
  16617. * Host will set this param to 1 for enabling GTX & 0 for disabling it.
  16618. * Note: If GTX was already running (since the global GTX control
  16619. * resides with default BDF setting) & host wants to disable GTX,
  16620. * the VDEV does not exercise any more TPC changes on the GTX supported
  16621. * rates & goes to a default GTX SM where all PPDU's sent on default TPC.
  16622. * Whenever, host wants to re-enable GTX, the enable command resumes the
  16623. * GTX functionality & TPC convergence to lower power levels can be
  16624. * attained as long as PER on GTX supported rates is within the pre-defined
  16625. * PER margin configured through the BDF.
  16626. */
  16627. WMI_VDEV_PARAM_GTX_ENABLE, /* 0x85 */
  16628. /*
  16629. * Enable/Disable multicast buffer.
  16630. * A FLAG to enable & disable buffering of multicast frames at AP
  16631. * when stations are in Power Save mode.
  16632. * Once AP disables buffering of multicast frame,
  16633. * clients which goes into Power save mode will not receive these frames.
  16634. * by default MCAST buffering will be enabled.
  16635. * (CABQ = Content After Beacon Queue = multicast queue)
  16636. * Host will send this VDEV param command,
  16637. * With Value = 1 means fw will disable the MCAST buffering
  16638. * With Value = 0 means fw will enable the MCAST buffering.
  16639. */
  16640. WMI_VDEV_PARAM_DISABLE_CABQ, /* 0x86 */
  16641. /**
  16642. * For SU and MU sounding
  16643. * switch between su ac/ax sounding and mu ac/ax sounding
  16644. * switch between triggered/ non-triggered on ax sounding enabled.
  16645. * each bit toggles the corresponding modes by enabling/disabling
  16646. *
  16647. * Bit 1 doesn't carry any operation for now and may change later,
  16648. * so reserved.
  16649. *
  16650. *-----------------------
  16651. * bit(0) | mode
  16652. *-----------------------
  16653. * 0 | AC
  16654. * 1 | AX
  16655. *-----------------------
  16656. *
  16657. * bit(1) | Reserved
  16658. *
  16659. *-----------------------
  16660. * bit(2) | mode
  16661. *-----------------------
  16662. * 0 | SU
  16663. * 1 | MU
  16664. *-----------------------
  16665. * bit(3) | mode
  16666. *-----------------------
  16667. * 0 | non -triggered
  16668. * 1 | triggered
  16669. */
  16670. WMI_VDEV_PARAM_SET_HE_SOUNDING_MODE, /* 0x87 */
  16671. /** Fixed rate setting used in UL Trigger
  16672. * The top nibble is used to select which format to use for encoding
  16673. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  16674. * format.
  16675. * If V == 0b0001: format is: 0x1000RRRR.
  16676. * ("RRRR" ratecode already has those preamble bits,
  16677. * which can specify HE or EHT)
  16678. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  16679. *
  16680. * This parameter controls the UL OFDMA and UL MU-MIMO vdev fixed rate.
  16681. */
  16682. WMI_VDEV_PARAM_UL_FIXED_RATE, /* 0x88 */
  16683. /**
  16684. * Uplink MU-MIMO & OFDMA GI configuration used in UL Trigger
  16685. * 11AX: GI =
  16686. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  16687. * 11N: SGI=WMI_GI_400_NS
  16688. */
  16689. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16690. * If V == 0b0000: format is HE.
  16691. * If V == 0b0001: format is EHT.
  16692. */
  16693. WMI_VDEV_PARAM_UL_GI, /* 0x89 */
  16694. /** Enable/Disable LDPC in UL Trigger */
  16695. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16696. * If V == 0b0000: format is HE.
  16697. * If V == 0b0001: format is EHT.
  16698. */
  16699. WMI_VDEV_PARAM_UL_LDPC, /* 0x8A */
  16700. /** Max NSS allowed in UL Trigger */
  16701. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16702. * If V == 0b0000: format is HE.
  16703. * If V == 0b0001: format is EHT.
  16704. */
  16705. WMI_VDEV_PARAM_UL_NSS, /* 0x8B */
  16706. /** Enable/Disable STBC in UL Trigger */
  16707. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16708. * If V == 0b0000: format is HE.
  16709. * If V == 0b0001: format is EHT.
  16710. */
  16711. WMI_VDEV_PARAM_UL_STBC, /* 0x8C */
  16712. /** specify the HE LTF setting that should be used for fixed rate
  16713. * uplink transmissions.
  16714. *
  16715. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  16716. * or WMI_HE_LTF_4X.
  16717. */
  16718. WMI_VDEV_PARAM_UL_HE_LTF, /* 0x8D */
  16719. /** Uplink OFDMA PPDU bandwidth */
  16720. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16721. * If V == 0b0000: format is HE.
  16722. * (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz)
  16723. * If V == 0b0001: format is EHT.
  16724. * (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz, 4: 320MHz)
  16725. */
  16726. WMI_VDEV_PARAM_UL_PPDU_BW, /* 0x8E */
  16727. /** Enable/Disable FW handling MU EDCA change from AP (1: En, 0:Dis) */
  16728. WMI_VDEV_PARAM_MU_EDCA_FW_UPDATE_EN, /* 0x8F */
  16729. /** Update dot11ObssNbruToleranceTime in fw. Param value: seconds */
  16730. WMI_VDEV_PARAM_UPDATE_OBSS_RU_TOLERANCE_TIME, /* 0x90 */
  16731. /** Parameter used when MTU size is sent by the host
  16732. * In particular, this configuration message is used for cases where the
  16733. * encapsulation header results in a larger max frame size than the
  16734. * typical 802.3 + SNAP/LLC frame.
  16735. */
  16736. WMI_VDEV_PARAM_MAX_MTU_SIZE, /* 0x91 */
  16737. /** Send every nth beacon to host
  16738. * if value of n is 0, it means this Nth beacon upload is disabled
  16739. */
  16740. WMI_VDEV_PARAM_NTH_BEACON_TO_HOST, /* 0x92 */
  16741. /**
  16742. * To capture the MGMT OR DATA OR BOTH packets.
  16743. * Refer to enum WMI_PKT_CAPTURE_MODE_CONFIG for specifications of
  16744. * which parameter value enables which kind of packet captures.
  16745. */
  16746. WMI_VDEV_PARAM_PACKET_CAPTURE_MODE, /* 0x93 */
  16747. /**
  16748. * To configure duration of how many seconds without tx unicast traffic is
  16749. * considered stale for mcast rate adaptation
  16750. */
  16751. WMI_VDEV_PARAM_MCAST_RC_STALE_PERIOD, /* 0x94 */
  16752. /*
  16753. * Bits 3:0 - AST0_FLOW_MASK(4)
  16754. * Bits 7:4 - AST1_FLOW_MASK(4)
  16755. * Bits 11:8 - AST2_FLOW_MASK(4)
  16756. * Bits 15:12 - AST3_FLOW_MASK(4)
  16757. * Bits 23:16 - TID_VALID_HI_PRI(8)
  16758. * Bits 31:24 - TID_VALID_LOW_PRI(8)
  16759. *
  16760. * The below macros can be used to set/get the relevant fields.
  16761. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x)
  16762. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET(msdu_flow_config1, ast_x, mask)
  16763. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1)
  16764. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask)
  16765. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1)
  16766. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask)
  16767. */
  16768. WMI_VDEV_PARAM_MSDU_FLOW_OVERRIDE_CONFIG, /* 0x95 */
  16769. /* Enable/Disable using NULL frame for leaky AP */
  16770. WMI_VDEV_PARAM_ENABLE_NULL_FOR_LEAKY_AP, /* 0x96 */
  16771. /**
  16772. * To configure duration of how many seconds without TX/RX data traffic,
  16773. * NDI vdev can kickout the connected peer (i.e. NDP Termination).
  16774. */
  16775. WMI_VDEV_PARAM_NDP_INACTIVITY_TIMEOUT, /* 0x97 */
  16776. /* To enable/disable multicast rate adaptation feature at vdev level */
  16777. WMI_VDEV_PARAM_ENABLE_MCAST_RC, /* 0x98 */
  16778. /*
  16779. * Params related to 6 GHz operation
  16780. * The parameter value is formed from WMI_VDEV_6GHZ_BITMAP flags.
  16781. */
  16782. WMI_VDEV_PARAM_6GHZ_PARAMS, /* 0x99 */
  16783. /**
  16784. * VDEV parameter to enable or disable RTT initiator role
  16785. * Default : Enabled
  16786. * valid values: 0-Disable initiator role, 1-Enable initiator role.
  16787. */
  16788. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_ROLE, /* 0x9A */
  16789. /**
  16790. * To configure duration of how many seconds to wait to kickout peer
  16791. * if peer is not reachable
  16792. */
  16793. WMI_VDEV_PARAM_NDP_KEEPALIVE_TIMEOUT, /* 0x9B*/
  16794. /**
  16795. * To support discovery of NAN cluster with Master Preference (MP) as 0
  16796. * when a new device is enabling NAN
  16797. */
  16798. WMI_VDEV_PARAM_ALLOW_NAN_INITIAL_DISCOVERY_OF_MP0_CLUSTER, /* 0x9C */
  16799. /**
  16800. * VDEV parameter to enable or disable roaming reason VSIE in
  16801. * re-association request
  16802. *
  16803. * Default : Disabled
  16804. * valid values: 0 - Disable 1 - Enable
  16805. */
  16806. WMI_VDEV_PARAM_ENABLE_DISABLE_ROAM_REASON_VSIE, /* 0x9D */
  16807. /* Parameter used to configure OBSS Packet Detect threshold
  16808. * for Non-SRG / SRG based Spatial Reuse feature.
  16809. * (SRG = Spatial Reuse Group)
  16810. * The accepted values are in between 0x00 and 0xFF, inclusive.
  16811. * The parameter value is programmed into the appropriate spatial reuse
  16812. * register, to specify how low the background signal strength from
  16813. * neighboring BSS cells must be, for this AP to employ spatial reuse.
  16814. *
  16815. * The value of the parameter is compared against the OBSS RSSI in dB.
  16816. * It is a 8-bit value whose
  16817. * range is -128 to 127 (after two's complement operation).
  16818. * For example, if the parameter value is 0xF5, the target will
  16819. * allow spatial reuse if the RSSI detected from other BSS
  16820. * is below -10 dB.
  16821. * Similarly, if the parameter value is 0x0A, the target will
  16822. * allow spatial reuse only if the RSSI detected from neighboring
  16823. * BSS cells is no more than 10 dB.
  16824. *
  16825. * If Bit 29 is set, then input value will be in dBm. This is used
  16826. * for chipsets that use dBm for comparison across MAC/Phy blocks.
  16827. * Older chipsets support input in dB units. For newer chipsets, dBm
  16828. * units will be used.
  16829. * The host will use the WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT
  16830. * service ready bit to differentiate between providing input as dB or dBm.
  16831. *
  16832. * bit | purpose
  16833. * -----------------
  16834. * 0 - 7 | Param Value for non-SRG based Spatial Reuse
  16835. * 8 - 15| Param value for SRG based Spatial Reuse
  16836. * 16 - 28| Reserved
  16837. * 29 | Param value is in dBm units rather than dB units
  16838. * 30 | Enable/Disable SRG based spatial reuse.
  16839. * | If set to 0, ignore bits 8-15.
  16840. * 31 | Enable/Disable Non-SRG based spatial reuse.
  16841. * | If set to 0, ignore bits 0-7.
  16842. *
  16843. * The WMI_VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD setting will only
  16844. * take effect if the WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD
  16845. * setting is also set for the pdev that the vdev belongs to.
  16846. */
  16847. WMI_VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD, /* 0x9E */
  16848. /* Parameter used to configure OBSS Packet Detection per Access Category
  16849. * for SRP based and OBSS_PD based spatial reuse feature.
  16850. * (SRP = Spatial Reuse Parameter)
  16851. * Based on the bits set, the corresponding Access Category Queues will have
  16852. * spatial reuse enabled / disabled.
  16853. * bit | AC
  16854. * ------------
  16855. * 0 | BK for SRG/Non-SRG
  16856. * 1 | BE for SRG/Non-SRG
  16857. * 2 | VI for SRG/Non-SRG
  16858. * 3 | VO for SRG/Non-SRG
  16859. * 4 - 15 | Reserved
  16860. * 16 | BK for SRP
  16861. * 17 | BE for SRP
  16862. * 18 | VI for SRP
  16863. * 19 | VO for SRP
  16864. * 20 - 31 | Reserved
  16865. *
  16866. * The WMI_VDEV_PARAM_SET_CMD_OBSS_PD_PER_AC setting will only take effect
  16867. * if the WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC setting is also set for
  16868. * the pdev that the vdev belongs to.
  16869. */
  16870. WMI_VDEV_PARAM_SET_CMD_OBSS_PD_PER_AC, /* 0x9F */
  16871. /**
  16872. * VDEV parameter to indicate RSN (Robust Security Network) capability.
  16873. * This value will be intersection of the local vdev's (STA's)
  16874. * RSN capability and the peer's (AP's) RSN capability.
  16875. */
  16876. WMI_VDEV_PARAM_RSN_CAPABILITY, /* 0xA0 */
  16877. /* Parameter used to enable/disable SRP feature */
  16878. WMI_VDEV_PARAM_ENABLE_SRP, /* 0xA1 */
  16879. /*
  16880. * Parameter used to control roaming/11kv (BTM) / etc. behavior
  16881. * bit | purpose
  16882. * -----------------
  16883. * 0 | Disable any FW side roaming except host invoke roaming
  16884. * 1 | Do not trans away on receiving BTM req
  16885. * 2 | Do not send disassoc to AP when receiving BTM req with
  16886. * | Disassoc Imminent bit set to 1
  16887. * 3 - 31 | Reserved
  16888. */
  16889. WMI_VDEV_PARAM_ROAM_11KV_CTRL, /* 0xA2 */
  16890. /* vdev param to enable or disable various NAN config features
  16891. * param value bitmap set to 1 for enable and 0 for disable respectively
  16892. */
  16893. WMI_VDEV_PARAM_ENABLE_DISABLE_NAN_CONFIG_FEATURES, /* 0xA3 */
  16894. /* vdev param to enable the SAP HW offload
  16895. * Bit : 0 - enable/disable SHO
  16896. * Bit : 1 - enable for Sta connected state as well.
  16897. * Bit : 2-31 - reserved
  16898. */
  16899. WMI_VDEV_PARAM_SHO_CONFIG, /* 0xA4 */
  16900. /** Enable or disable Non-data HE Extended range
  16901. * valid values: 0-Disable ER, 1-Enable ER.
  16902. */
  16903. WMI_VDEV_PARAM_NON_DATA_HE_RANGE_EXT, /* 0xA5 */
  16904. /** Prohibit data & mgmt except keepalive pkt */
  16905. WMI_VDEV_PARAM_PROHIBIT_DATA_MGMT, /* 0xA6 */
  16906. /** Enable or disable Txop requirement feature
  16907. * 0 - Disable feature
  16908. * 1 - Enable feature
  16909. */
  16910. WMI_VDEV_PARAM_WMM_TXOP_ENABLE, /* 0xA7 */
  16911. /** Value of DTIM to be applied in Suspend mode
  16912. */
  16913. WMI_VDEV_PARAM_FORCE_DTIM_CNT, /* 0xA8 */
  16914. /* vdev param to configure the Smart Monitor features
  16915. * Bit : 0 - enable/disable Trigger frames
  16916. * Bit : 1 - enable/disable QOS frames
  16917. * Bit : 2-4 - if 1, fwd beacon frames from connected AP
  16918. * - if 2, fwd beacon frames from unconnected AP
  16919. * during roam scan/host scan
  16920. * - if 3, fwd beacons from unconnected AP during
  16921. * roam scan/host scan and from connected AP
  16922. * - if 4, don't fwd any beacon frame
  16923. * Bit : 5-31 - reserved
  16924. */
  16925. WMI_VDEV_PARAM_SMART_MONITOR_CONFIG, /* 0xA9 */
  16926. /** Value of MAX modulated DTIM in ms to be applied
  16927. * in Suspend mode. This parameter will override
  16928. * the value of WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM
  16929. */
  16930. WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM_MS, /* 0xAA */
  16931. /*
  16932. * Security config advertised in beacons
  16933. * bit 0: URNM_MFPR in RSNXE
  16934. * bit 1: MFPC in RSN CAP
  16935. * bit 2: MFPR in RSN CAP
  16936. * bit 3: URNM_MFPR_X20 in RSNXE
  16937. * bit 4: RSTA_EXTCAP_I2R_LMR_FB
  16938. * bit 31:5 Reserved
  16939. */
  16940. WMI_VDEV_PARAM_11AZ_SECURITY_CONFIG, /* 0xAB */
  16941. /*
  16942. * Latency Level Flags
  16943. */
  16944. WMI_VDEV_PARAM_NORMAL_LATENCY_FLAGS_CONFIGURATION, /* 0xAC */
  16945. WMI_VDEV_PARAM_XR_LATENCY_FLAGS_CONFIGURATION, /* 0xAD */
  16946. WMI_VDEV_PARAM_LOW_LATENCY_FLAGS_CONFIGURATION, /* 0xAE */
  16947. WMI_VDEV_PARAM_ULTRA_LOW_LATENCY_FLAGS_CONFIGURATION, /* 0xAF */
  16948. /*
  16949. * Latency level UL/DL
  16950. * 0-15 bits: UL
  16951. * 16-31 bits: DL
  16952. */
  16953. WMI_VDEV_PARAM_NORMAL_LATENCY_UL_DL_CONFIGURATION, /* 0xB0 */
  16954. WMI_VDEV_PARAM_XR_LATENCY_UL_DL_CONFIGURATION, /* 0xB1 */
  16955. WMI_VDEV_PARAM_LOW_LATENCY_UL_DL_CONFIGURATION, /* 0xB2 */
  16956. WMI_VDEV_PARAM_ULTRA_LOW_LATENCY_UL_DL_CONFIGURATION, /* 0xB3 */
  16957. /*
  16958. * Ini to
  16959. * Configure default latency level for all clients
  16960. */
  16961. WMI_VDEV_PARAM_DEFAULT_LATENCY_LEVEL_CONFIGURATION, /* 0xB4 */
  16962. /*
  16963. * Ini to
  16964. * Configure multi client Low latency Feature
  16965. */
  16966. WMI_VDEV_PARAM_MULTI_CLIENT_LL_FEATURE_CONFIGURATION, /* 0xB5 */
  16967. /*
  16968. * traffic config for per vdev
  16969. * bit 0: low latency vdev
  16970. * bit 1: high tput vdev
  16971. * bit 31:2 Reserved
  16972. */
  16973. WMI_VDEV_PARAM_VDEV_TRAFFIC_CONFIG, /* 0xB6 */
  16974. /* Final bmiss time for Non WOW mode in sec */
  16975. WMI_VDEV_PARAM_FINAL_BMISS_TIME_SEC, /* 0xB7 */
  16976. /* Final bmiss time for WOW mode in sec */
  16977. WMI_VDEV_PARAM_FINAL_BMISS_TIME_WOW_SEC, /* 0xB8 */
  16978. /*
  16979. * Param to disable LPI antenna optimizations at Vdev level.
  16980. * In 6G LPI mode, additional antenna optimizations are done to
  16981. * improve range. Param is provided to disable the added
  16982. * optimizations.
  16983. */
  16984. WMI_VDEV_PARAM_DISABLE_LPI_ANT_OPTIMIZATION, /* 0xB9 */
  16985. /*
  16986. * Param to update connected VDEV channel bandwidth.
  16987. * Target firmware should take care of notifying associated peers
  16988. * (except TDLS) about change in bandwidth, through OMN/OMI notification
  16989. * before performing bandwidth update internally.
  16990. * Please note incase of STA VDEV only BSS peer gets updated,
  16991. * associated TDLS peer bandwidth won't be impacted.
  16992. *
  16993. * The updated bandwidth is specified with a wmi_channel_width value.
  16994. */
  16995. WMI_VDEV_PARAM_CHWIDTH_WITH_NOTIFY, /* 0xBA */
  16996. /*
  16997. * Min time between measurment for 11AZ NTB ranging
  16998. * in units of 100 microseconds
  16999. */
  17000. WMI_VDEV_PARAM_RTT_11AZ_NTB_MIN_TIME_BW_MEAS, /* 0xBB */
  17001. /*
  17002. * Max time between measurment for 11AZ NTB ranging
  17003. * in units of 10 milliseconds
  17004. */
  17005. WMI_VDEV_PARAM_RTT_11AZ_NTB_MAX_TIME_BW_MEAS, /* 0xBC */
  17006. /*
  17007. * Max session expiry for 11AZ TB ranging.
  17008. * Session expiry value is computed as 2^(Max Session Exp + 8) ms.
  17009. */
  17010. WMI_VDEV_PARAM_RTT_11AZ_TB_MAX_SESSION_EXPIRY, /* 0xBD */
  17011. /*
  17012. * WiFi Standard version to be supported.
  17013. * Value is from enum WMI_WIFI_STANDARD
  17014. */
  17015. WMI_VDEV_PARAM_WIFI_STANDARD_VERSION, /* 0xBE */
  17016. /*
  17017. * Allow to disable TWT on 2G channel
  17018. * if corresponding INI is set
  17019. */
  17020. WMI_VDEV_PARAM_DISABLE_2G_TWT, /* 0xBF */
  17021. /*
  17022. * Disable FW initiated Information frame for TWT
  17023. */
  17024. WMI_VDEV_PARAM_DISABLE_TWT_INFO_FRAME, /* 0xC0 */
  17025. /*
  17026. * Set the Recommended Max allowed active links
  17027. */
  17028. WMI_VDEV_PARAM_MLO_MAX_RECOM_ACTIVE_LINKS, /* 0xC1 */
  17029. /* DCS stats enable configuration at VDEV level */
  17030. WMI_VDEV_PARAM_DCS, /* 0xC2 */
  17031. /* VDEV parameter to configure Telescopic DTIM count */
  17032. WMI_VDEV_PARAM_TELESDTIM_CNT, /* 0xC3 */
  17033. /* Configure minimum DTIM level used by Telescopic DTIM */
  17034. WMI_VDEV_PARAM_MIN_TELES_DTIM_LVL, /* 0xC4 */
  17035. /* Set HW CTS2SELF before DL OFDMA Sequence */
  17036. WMI_VDEV_PARAM_HWCTS2SELF_OFDMA, /* 0xC5 */
  17037. /* Update TWT_UNAVAIL_MODE */
  17038. WMI_VDEV_PARAM_TWT_UNAVAIL_MODE, /* 0xC6 */
  17039. /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
  17040. * The below vdev param types are used for prototyping, and are
  17041. * prone to change.
  17042. */
  17043. WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
  17044. /* 11AX SPECIFIC defines */
  17045. /* USE this for BSS color change */
  17046. WMI_VDEV_PARAM_BSS_COLOR, /* 0x8001 */
  17047. /*
  17048. * Enable / disable trigger access for a AP vdev's peers.
  17049. * For a STA mode vdev this will enable/disable triggered access
  17050. * and enable/disable Multi User mode of operation.
  17051. * A value of 0 in a given bit disables corresponding mode.
  17052. * bit | hemu mode
  17053. * ---------------
  17054. * 0 | HE SUBFEE
  17055. * 1 | HE SUBFER
  17056. * 2 | HE MUBFEE
  17057. * 3 | HE MUBFER
  17058. * 4 | DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
  17059. * 5 | UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
  17060. * | trigger receive & UL response
  17061. * 6 | UL MUMIMO
  17062. * 7 | TXBF+OFDMA
  17063. */
  17064. WMI_VDEV_PARAM_SET_HEMU_MODE, /* 0x8002 */
  17065. WMI_VDEV_PARAM_HEOPS_0_31, /* 0x8003 */
  17066. WMI_VDEV_PARAM_OBSSPD, /* 0x8004 */
  17067. /*
  17068. * Enable / disable trigger access for a AP vdev's peers.
  17069. * For a STA mode vdev this will enable/disable triggered access
  17070. * and enable/disable Multi User mode of operation.
  17071. * A value of 0 in a given bit disables corresponding mode.
  17072. * bit | EHT mu mode
  17073. * ---------------
  17074. * 0 | EHT SUBFEE
  17075. * 1 | EHT SUBFER
  17076. * 2 | EHT MUBFEE
  17077. * 3 | EHT MUBFER
  17078. * 4 | EHT DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
  17079. * 5 | EHT UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
  17080. * | trigger receive & UL response
  17081. * 6 | EHT MUMIMO
  17082. * 7 | EHT DL OFDMA + TXBF
  17083. * 8 | EHT DL OFDMA + MU-MIMO
  17084. * 9 | EHT UL OFDMA + MU-MIMO
  17085. */
  17086. WMI_VDEV_PARAM_SET_EHT_MU_MODE, /* 0x8005 */
  17087. /**
  17088. * Specify the EHT LTF setting that should be used for fixed rate
  17089. * transmissions.
  17090. *
  17091. * Expects values of WMI_EHT_LTF_DEFAULT, WMI_EHT_LTF_1X,
  17092. * WMI_EHT_LTF_2X, or WMI_EHT_LTF_4X.
  17093. */
  17094. WMI_VDEV_PARAM_EHT_LTF, /* 0x8006 */
  17095. /**
  17096. * Expects values of WMI_EHT_LTF_DEFAULT, WMI_EHT_LTF_1X,
  17097. * WMI_EHT_LTF_2X, or WMI_EHT_LTF_4X.
  17098. */
  17099. WMI_VDEV_PARAM_UL_EHT_LTF, /* 0x8007 */
  17100. /**
  17101. * Enable or disable Dual Carrier Modulation
  17102. * valid values: 0-Disable EHT DCM, 1-Enable EHT DCM.
  17103. */
  17104. WMI_VDEV_PARAM_EHT_DCM, /* 0x8008 */
  17105. /**
  17106. * Enable or disable Extended range
  17107. * valid values: 0-Disable ER, 1-Enable ER.
  17108. */
  17109. WMI_VDEV_PARAM_EHT_RANGE_EXT, /* 0x8009 */
  17110. /**
  17111. * Enable or disable Non-data EHT Extended range
  17112. * valid values: 0-Disable ER, 1-Enable ER.
  17113. */
  17114. WMI_VDEV_PARAM_NON_DATA_EHT_RANGE_EXT, /* 0x800A */
  17115. /*
  17116. * 0 - fixed pattern disable,
  17117. * 1 - Fixed pattern enable and value pointed by
  17118. * WMI_VDEV_PARAM_FIXED_PUNCTURE_PATTERN
  17119. * punctured mode for 11be systems
  17120. */
  17121. WMI_VDEV_PARAM_FIXED_PUNCTURE_PATTERN, /* 0x800B */
  17122. WMI_VDEV_PARAM_EHTOPS_0_31, /* 0x800C */
  17123. /*
  17124. * 0 - eht 11be puncturing disable,
  17125. * 1 - eht 11be puncturing enable
  17126. */
  17127. WMI_VDEV_PARAM_SET_EHT_PUNCTURING_MODE, /* 0x800D */
  17128. /*
  17129. * 0 - Disable MCAST Beamforming
  17130. * 1 - Enable MCAST Beamforming
  17131. */
  17132. WMI_VDEV_PARAM_MCAST_STEERING, /* 0x800E */
  17133. /*
  17134. * bit 0: 0 - XR SAP profile disabled
  17135. * 1 - XR SAP profile enabled
  17136. * bit 1: 0 - XPAN profile disabled
  17137. * 1 - XPAN profile enabled
  17138. * bits 31:2 - reserved
  17139. */
  17140. WMI_VDEV_PARAM_SET_PROFILE, /* 0x800F */
  17141. /*
  17142. * for valid vdev id
  17143. * for vdev offload stats
  17144. */
  17145. WMI_VDEV_PARAM_VDEV_STATS_ID_UPDATE, /* 0x8010 */
  17146. /*
  17147. * Enable or disable Extra LTF capability in Auto rate and
  17148. * Fixed rate EHT data packet transmissions.
  17149. * Even when this vdev param is enabled, Extra LTF may not be
  17150. * enabled for all rates in auto rate mode based on other conditions.
  17151. * valid values: 0 - Disable Extra LTF, 1- Enable Extra LTF.
  17152. */
  17153. WMI_VDEV_PARAM_EXTRA_EHT_LTF, /* 0x8011 */
  17154. /*
  17155. * Disable the indicated DL and UL scheduler for the VDEV.
  17156. *
  17157. * This command is not supported in STA mode.
  17158. *
  17159. * A value of 1 in a given bit position disables the corresponding
  17160. * mode, and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS
  17161. * enum defines the bit positions for each mode.
  17162. *
  17163. * A single 32 bit value is used to store the following configuration
  17164. * bitmap.
  17165. *
  17166. * This command differs from WMI_VDEV_PARAM_SET_HEMU_MODE and
  17167. * WMI_VDEV_PARAM_SET_EHT_MU_MODE in that it is intended for use during
  17168. * normal AP operation, and will never cause a VAP restart or other
  17169. * capability bit modification. It simply controls the scheduler
  17170. * behavior.
  17171. *
  17172. * bit | sched mode
  17173. * ---------------
  17174. * 0 | DL MU-MIMO
  17175. * 1 | UL MU-MIMO
  17176. * 2 | DL OFDMA
  17177. * 3 | UL OFDMA
  17178. * 4..31 | RESERVED
  17179. */
  17180. WMI_VDEV_PARAM_SET_DISABLED_SCHED_MODES, /* 0x8012 */
  17181. /*
  17182. * SAP Power save with TWT vdev param command
  17183. * 0 - Disable SAP Power save TWT
  17184. * 1 - Enable SAP Power save TWT
  17185. */
  17186. WMI_VDEV_PARAM_SET_SAP_PS_WITH_TWT, /* 0x8013 */
  17187. /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
  17188. } WMI_VDEV_PARAM;
  17189. /* EHT Modes */
  17190. #define WMI_VDEV_EHT_SUBFEE_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 0, 1)
  17191. #define WMI_VDEV_EHT_SUBFEE_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 0, 1, 1)
  17192. #define WMI_VDEV_EHT_SUBFEE_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 0, 1, 0)
  17193. #define WMI_VDEV_EHT_SUBFER_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 1, 1)
  17194. #define WMI_VDEV_EHT_SUBFER_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 1, 1, 1)
  17195. #define WMI_VDEV_EHT_SUBFER_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 1, 1, 0)
  17196. #define WMI_VDEV_EHT_MUBFEE_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 2, 1)
  17197. #define WMI_VDEV_EHT_MUBFEE_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 2, 1, 1)
  17198. #define WMI_VDEV_EHT_MUBFEE_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 2, 1, 0)
  17199. #define WMI_VDEV_EHT_MUBFER_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 3, 1)
  17200. #define WMI_VDEV_EHT_MUBFER_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 3, 1, 1)
  17201. #define WMI_VDEV_EHT_MUBFER_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 3, 1, 0)
  17202. #define WMI_VDEV_EHT_DLOFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 4, 1)
  17203. #define WMI_VDEV_EHT_DLOFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 4, 1, 1)
  17204. #define WMI_VDEV_EHT_DLOFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 4, 1, 0)
  17205. #define WMI_VDEV_EHT_ULOFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 5, 1)
  17206. #define WMI_VDEV_EHT_ULOFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 5, 1, 1)
  17207. #define WMI_VDEV_EHT_ULOFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 5, 1, 0)
  17208. #define WMI_VDEV_EHT_ULMUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 6, 1)
  17209. #define WMI_VDEV_EHT_ULMUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 6, 1, 1)
  17210. #define WMI_VDEV_EHT_ULMUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 6, 1, 0)
  17211. #define WMI_VDEV_EHT_TXBF_OFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 7, 1)
  17212. #define WMI_VDEV_EHT_TXBF_OFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 7, 1, 1)
  17213. #define WMI_VDEV_EHT_TXBF_OFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 7, 1, 0)
  17214. #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 8, 1)
  17215. #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 8, 1, 1)
  17216. #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 8, 1, 0)
  17217. #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 9, 1)
  17218. #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 9, 1, 1)
  17219. #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 9, 1, 0)
  17220. /* HE Modes */
  17221. #define WMI_VDEV_HE_SUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 0, 1)
  17222. #define WMI_VDEV_HE_SUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 1)
  17223. #define WMI_VDEV_HE_SUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 0)
  17224. #define WMI_VDEV_HE_SUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 1, 1)
  17225. #define WMI_VDEV_HE_SUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 1)
  17226. #define WMI_VDEV_HE_SUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 0)
  17227. #define WMI_VDEV_HE_MUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 2, 1)
  17228. #define WMI_VDEV_HE_MUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 1)
  17229. #define WMI_VDEV_HE_MUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 0)
  17230. #define WMI_VDEV_HE_MUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 3, 1)
  17231. #define WMI_VDEV_HE_MUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 1)
  17232. #define WMI_VDEV_HE_MUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 0)
  17233. #define WMI_VDEV_HE_DLOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 4, 1)
  17234. #define WMI_VDEV_HE_DLOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 1)
  17235. #define WMI_VDEV_HE_DLOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 0)
  17236. #define WMI_VDEV_HE_ULOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 5, 1)
  17237. #define WMI_VDEV_HE_ULOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 1)
  17238. #define WMI_VDEV_HE_ULOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 0)
  17239. #define WMI_VDEV_HE_ULMUMIMO_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 6, 1)
  17240. #define WMI_VDEV_HE_ULMUMIMO_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 1)
  17241. #define WMI_VDEV_HE_ULMUMIMO_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 0)
  17242. #define WMI_VDEV_HE_TXBF_OFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 7, 1)
  17243. #define WMI_VDEV_HE_TXBF_OFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 7, 1, 1)
  17244. #define WMI_VDEV_HE_TXBF_OFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 7, 1, 0)
  17245. #define WMI_VDEV_HE_AX_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 0, 1)
  17246. #define WMI_VDEV_HE_MU_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 2, 1)
  17247. #define WMI_VDEV_HE_AX_TRIG_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 3, 1)
  17248. /* Indicates RTT Responder mode support for 11MC, 11AZ NTB, 11AZ TB ranging */
  17249. #define WMI_VDEV_11MC_RESP_ENABLED(param) WMI_GET_BITS(param, 0, 1)
  17250. #define WMI_VDEV_11AZ_NTB_RESP_ENABLED(param) WMI_GET_BITS(param, 1, 1)
  17251. #define WMI_VDEV_11AZ_TB_RESP_ENABLED(param) WMI_GET_BITS(param, 2, 1)
  17252. /* vdev capabilities bit mask */
  17253. #define WMI_VDEV_BEACON_SUPPORT 0x1
  17254. #define WMI_VDEV_WDS_LRN_ENABLED 0x2
  17255. #define WMI_VDEV_VOW_ENABLED 0x4
  17256. #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
  17257. #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
  17258. #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
  17259. /* Per VAP rate dropdown masks */
  17260. #define WMI_VDEV_MGMT_RATE_DROPDOWN_M 0x01
  17261. #define WMI_VDEV_MGMT_RATE_DROPDOWN_S 0
  17262. #define WMI_VDEV_MGMT_RATE_DROPDOWN (WMI_VDEV_MGMT_RATE_DROPDOWN_M << WMI_VDEV_MGMT_RATE_DROPDOWN_S)
  17263. #define WMI_VDEV_MGMT_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MGMT_RATE_DROPDOWN)
  17264. #define WMI_VDEV_MGMT_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MGMT_RATE_DROPDOWN)
  17265. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_M 0x01
  17266. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_S 1
  17267. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN (WMI_VDEV_SU_DATA_RATE_DROPDOWN_M << WMI_VDEV_SU_DATA_RATE_DROPDOWN_S)
  17268. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  17269. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  17270. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_M 0x01
  17271. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_S 2
  17272. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN (WMI_VDEV_MU_DATA_RATE_DROPDOWN_M << WMI_VDEV_MU_DATA_RATE_DROPDOWN_S)
  17273. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  17274. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  17275. /* TXBF capabilities masks */
  17276. #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
  17277. #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
  17278. #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << WMI_TXBF_CONF_SU_TX_BFEE_S)
  17279. #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFEE)
  17280. #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFEE)
  17281. #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
  17282. #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
  17283. #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << WMI_TXBF_CONF_MU_TX_BFEE_S)
  17284. #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFEE)
  17285. #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFEE)
  17286. #define WMI_TXBF_CONF_SU_TX_BFER_S 2
  17287. #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
  17288. #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << WMI_TXBF_CONF_SU_TX_BFER_S)
  17289. #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFER)
  17290. #define WMI_TXBF_CONF_SU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFER)
  17291. #define WMI_TXBF_CONF_MU_TX_BFER_S 3
  17292. #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
  17293. #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << WMI_TXBF_CONF_MU_TX_BFER_S)
  17294. #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFER)
  17295. #define WMI_TXBF_CONF_MU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFER)
  17296. #define WMI_TXBF_CONF_STS_CAP_S 4
  17297. #define WMI_TXBF_CONF_STS_CAP_M 0x7
  17298. #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << WMI_TXBF_CONF_STS_CAP_S)
  17299. #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_STS_CAP);
  17300. #define WMI_TXBF_CONF_STS_CAP_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_STS_CAP)
  17301. #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
  17302. #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
  17303. #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << WMI_TXBF_CONF_IMPLICIT_BF_S)
  17304. #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_IMPLICIT_BF)
  17305. #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_IMPLICIT_BF)
  17306. #define WMI_TXBF_CONF_BF_SND_DIM_S 8
  17307. #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
  17308. #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << WMI_TXBF_CONF_BF_SND_DIM_S)
  17309. #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_BF_SND_DIM)
  17310. #define WMI_TXBF_CONF_BF_SND_DIM_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_BF_SND_DIM)
  17311. /* commands for 11ax TXBF capabilities */
  17312. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_GET(x) WMI_GET_BITS((x,0,1)
  17313. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_SET(x,z) WMI_SET_BITS(x,0,1,z)
  17314. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_GET(x) WMI_GET_BITS((x,1,1)
  17315. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_SET(x,z) WMI_SET_BITS(x,1,1,z)
  17316. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_GET(x) WMI_GET_BITS((x,2,1)
  17317. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_SET(x,z) WMI_SET_BITS(x,2,1,z)
  17318. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_GET(x) WMI_GET_BITS((x,3,3)
  17319. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,3,3,z)
  17320. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_GET(x) WMI_GET_BITS((x,6,3)
  17321. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,6,3,z)
  17322. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_GET(x) WMI_GET_BITS((x,9,3)
  17323. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_SET(x,z) WMI_SET_BITS(x,9,3,z)
  17324. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_GET(x) WMI_GET_BITS((x,12,3)
  17325. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_SET(x,z) WMI_SET_BITS(x,12,3,z)
  17326. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_GET(x) WMI_GET_BITS((x,15,3)
  17327. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,15,3,z)
  17328. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_GET(x) WMI_GET_BITS((x,18,3)
  17329. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,18,3,z)
  17330. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,21,1)
  17331. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,21,1,z)
  17332. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,22,1)
  17333. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,22,1,z)
  17334. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_GET(x) WMI_GET_BITS((x,23,1)
  17335. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_SET(x,z) WMI_SET_BITS(x,23,1,z)
  17336. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_GET(x) WMI_GET_BITS((x,24,1)
  17337. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_SET(x,z) WMI_SET_BITS(x,24,1,z)
  17338. #define WMI_TXBF_CONF_AX_FDBK_TRIG_GET(x) WMI_GET_BITS((x,25,1)
  17339. #define WMI_TXBF_CONF_AX_FDBK_TRIG_SET(x,z) WMI_SET_BITS(x,25,1,z)
  17340. /* TXBF capabilities */
  17341. typedef struct {
  17342. A_UINT32 txbf_cap;
  17343. } wmi_vdev_txbf_cap;
  17344. /* vdev rx filters (for mesh) */
  17345. typedef enum {
  17346. WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0, /* Don't drop any frames - Default */
  17347. WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1, /* Drop FromDS frames */
  17348. WMI_VDEV_RX_FILTER_OUT_TODS = 0x2, /* Drop ToDS frames */
  17349. WMI_VDEV_RX_FILTER_OUT_NODS = 0x4, /* Drop NODS frames */
  17350. WMI_VDEV_RX_FILTER_OUT_RA = 0x8, /* Drop RA frames */
  17351. WMI_VDEV_RX_FILTER_OUT_TA = 0x10, /* Drop TA frames */
  17352. } wmi_vdev_param_filter;
  17353. /* Length of ATIM Window in TU */
  17354. #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
  17355. enum wmi_pkt_type {
  17356. WMI_PKT_TYPE_RAW = 0,
  17357. WMI_PKT_TYPE_NATIVE_WIFI = 1,
  17358. WMI_PKT_TYPE_ETHERNET = 2,
  17359. };
  17360. /*******************************************************************
  17361. * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
  17362. * Do not use it!
  17363. *******************************************************************/
  17364. typedef struct {
  17365. A_UINT8 sutxbfee : 1,
  17366. mutxbfee : 1,
  17367. sutxbfer : 1,
  17368. mutxbfer : 1,
  17369. txb_sts_cap : 3,
  17370. implicit_bf : 1;
  17371. } wmi_vdev_txbf_en;
  17372. /** Upto 8 bits are available for Roaming module to be sent along with
  17373. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
  17374. /* Bit 0: Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
  17375. #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
  17376. /* Bit 1: Enable Roaming module in FW to do scan based on Final BMISS */
  17377. #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
  17378. /* Bit 2:
  17379. * To enable/disable EAPOL_4WAY_HANDSHAKE process while roaming.
  17380. * param value = 0 --> Enable EAPOL 4way handshake
  17381. * param value = 1 --> Skip EAPOL 4way handshake
  17382. */
  17383. #define WMI_VDEV_PARAM_SKIP_ROAM_EAPOL_4WAY_HANDSHAKE 0x4
  17384. /* Bit 3:
  17385. * Scan type when WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG is set:
  17386. * value = 0 --> Chanmap scan followed by one full scan if no candidate found.
  17387. * value = 1 --> Chanmap scan only
  17388. */
  17389. #define WMI_ROAM_BMISS_FINAL_SCAN_TYPE_FLAG 0x8
  17390. /* Bit 4:
  17391. * To enable/disable feature: EAPOL offload to FW while SAE roaming.
  17392. * param value = 0 --> Enable EAPOL offload to FW for SAE roaming
  17393. * param value = 1 --> Disable EAPOL offload to FW for SAE roaming
  17394. */
  17395. #define WMI_VDEV_PARAM_SKIP_SAE_ROAM_4WAY_HANDSHAKE 0x10
  17396. /** slot time long */
  17397. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  17398. /** slot time short */
  17399. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  17400. /** preablbe long */
  17401. #define WMI_VDEV_PREAMBLE_LONG 0x1
  17402. /** preablbe short */
  17403. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  17404. /** the definition of different START/RESTART Event response */
  17405. typedef enum {
  17406. /* Event response of START CMD */
  17407. WMI_VDEV_START_RESP_EVENT = 0,
  17408. /* Event response of RESTART CMD */
  17409. WMI_VDEV_RESTART_RESP_EVENT,
  17410. } WMI_START_EVENT_PARAM;
  17411. typedef struct {
  17412. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
  17413. /** unique id identifying the VDEV, generated by the caller */
  17414. A_UINT32 vdev_id;
  17415. /** requestor id that requested the VDEV start request */
  17416. A_UINT32 requestor_id;
  17417. /* Respose of Event type START/RESTART */
  17418. WMI_START_EVENT_PARAM resp_type;
  17419. /** status of the response */
  17420. A_UINT32 status;
  17421. /** Vdev chain mask */
  17422. A_UINT32 chain_mask;
  17423. /** Vdev mimo power save mode */
  17424. A_UINT32 smps_mode;
  17425. union {
  17426. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17427. /** pdev_id for identifying the MAC
  17428. * See macros starting with WMI_PDEV_ID_ for values.
  17429. */
  17430. A_UINT32 pdev_id;
  17431. };
  17432. /** Configured Transmit Streams **/
  17433. A_UINT32 cfgd_tx_streams;
  17434. /** Configured Receive Streams **/
  17435. A_UINT32 cfgd_rx_streams;
  17436. /**
  17437. * maximum allowed Tx power (in dBm) for this connection.
  17438. * max_allowed_tx_power = 0 dBm means value is not specified.
  17439. */
  17440. A_INT32 max_allowed_tx_power;
  17441. /** unique id to identify mac's TSF register */
  17442. A_UINT32 mac_tsf_id;
  17443. /** ignore mac_tsf_id unless mac_tsf_id_valid is set */
  17444. A_UINT32 mac_tsf_id_valid;
  17445. /** min_device_tx_pwr_valid = 0 means value is not specified. */
  17446. A_UINT32 min_device_tx_pwr_valid;
  17447. /** minimum allowed device Tx power (in dBm) for this connection. */
  17448. A_INT32 min_device_tx_pwr;
  17449. } wmi_vdev_start_response_event_fixed_param;
  17450. typedef struct {
  17451. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
  17452. /** unique id identifying the VDEV, generated by the caller */
  17453. A_UINT32 vdev_id;
  17454. } wmi_vdev_stopped_event_fixed_param;
  17455. typedef struct {
  17456. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
  17457. /** unique id identifying the VDEV, generated by the caller */
  17458. A_UINT32 vdev_id;
  17459. } wmi_vdev_delete_resp_event_fixed_param;
  17460. /** common structure used for simple events (stopped, resume_req, standby response) */
  17461. typedef struct {
  17462. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
  17463. /** unique id identifying the VDEV, generated by the caller */
  17464. A_UINT32 vdev_id;
  17465. } wmi_vdev_simple_event_fixed_param;
  17466. /* Commands for getting and setting protected bit : bss max idle time */
  17467. #define WMI_BSS_MAX_IDLE_TIME_PROTECTED_GET(idle_options) \
  17468. WMI_GET_BITS(idle_options, 0, 1)
  17469. #define WMI_BSS_MAX_IDLE_TIME_PROTECTED_SET(idle_options, val) \
  17470. WMI_SET_BITS(idle_options, 0, 1, val)
  17471. typedef struct {
  17472. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_VDEV_BSS_MAX_IDLE_TIME_fixed_param */
  17473. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  17474. A_UINT32 max_idle_period; /* time interval in seconds */
  17475. /* idle_options:
  17476. * bit 0 - Protected bit
  17477. * Refer to WMI_BSS_MAX_IDLE_TIME_PROTECTED_GET,SET macros.
  17478. * bit 31:1 - Reserved bits
  17479. */
  17480. A_UINT32 idle_options;
  17481. } wmi_vdev_bss_max_idle_time_cmd_fixed_param;
  17482. /** VDEV start response status codes */
  17483. #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV successfully started */
  17484. #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
  17485. #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
  17486. #define WMI_VDEV_START_RESPONSE_DFS_VIOLATION 0x3 /** DFS_VIOLATION since channel in the NOL is selected */
  17487. #define WMI_VDEV_START_RESPONSE_INVALID_REGDOMAIN 0x4 /** Invalid regulatory domain in VDEV start */
  17488. #define WMI_VDEV_START_RESPONSE_INVALID_BAND 0x5 /** Band unsupported by current hw mode in VDEV start */
  17489. #define WMI_VDEV_START_RESPONSE_INVALID_PREFERRED_TX_RX_STREAMS 0x6 /** Invalid preferred tx/rx streams */
  17490. #define WMI_VDEV_START_RESPONSE_INVALID_TX_VAP_CONFIG 0x7 /** Invalid tx_vap config in VDEV start */
  17491. /** Beacon processing related command and event structures */
  17492. typedef struct {
  17493. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
  17494. /** unique id identifying the VDEV, generated by the caller */
  17495. A_UINT32 vdev_id;
  17496. /** xmit rate */
  17497. A_UINT32 tx_rate;
  17498. /** xmit power */
  17499. A_UINT32 txPower;
  17500. /** beacon buffer length in bytes */
  17501. A_UINT32 buf_len;
  17502. /* This TLV is followed by array of bytes:
  17503. * A_UINT8 bufp[]; <-- beacon frame buffer
  17504. */
  17505. } wmi_bcn_tx_hdr;
  17506. /* Beacon filter */
  17507. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  17508. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  17509. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  17510. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  17511. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  17512. typedef struct {
  17513. /** Filter ID */
  17514. A_UINT32 bcn_filter_id;
  17515. /** Filter type - wmi_bcn_filter */
  17516. A_UINT32 bcn_filter;
  17517. /** Buffer len */
  17518. A_UINT32 bcn_filter_len;
  17519. /** Filter info (threshold, BSSID, RSSI) */
  17520. A_UINT8 *bcn_filter_buf;
  17521. } wmi_bcn_filter_rx_cmd;
  17522. /** Capabilities and IEs to be passed to firmware */
  17523. typedef struct {
  17524. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
  17525. /** Capabilities */
  17526. A_UINT32 caps;
  17527. /** ERP info */
  17528. A_UINT32 erp;
  17529. /** Advanced capabilities */
  17530. /** HT capabilities */
  17531. /** HT Info */
  17532. /** ibss_dfs */
  17533. /** wpa Info */
  17534. /** rsn Info */
  17535. /** rrm info */
  17536. /** ath_ext */
  17537. /** app IE */
  17538. } wmi_bcn_prb_info;
  17539. enum wmi_frame_inject_type {
  17540. /* Transmit QoS null frame each period */
  17541. WMI_FRAME_INJECT_TYPE_QOS_NULL,
  17542. /* Transmit CTS to self each period */
  17543. WMI_FRAME_INJECT_TYPE_CTS_TO_SELF,
  17544. /* Transmit HOST provided buffer instead of forming frame in FW */
  17545. WMI_FRAME_INJECT_TYPE_HOST_BUFFER,
  17546. /* Max valid frame inject type for sanity checks*/
  17547. WMI_FRAME_INJECT_TYPE_MAX,
  17548. };
  17549. typedef struct {
  17550. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_frame_inject_cmd_fixed_param */
  17551. A_UINT32 tlv_header;
  17552. /** unique id identifying the VDEV, generated by the caller.
  17553. * At any time only one vdev per mac can have this feature enabled.
  17554. * Two consecutive enable commands on same mac will result in previous
  17555. * command being disabled and new one being enabled.
  17556. */
  17557. A_UINT32 vdev_id;
  17558. /** enable or disable injection */
  17559. A_UINT32 enable;
  17560. /** frame type to be used for frame injection. possible values are
  17561. * defined in enum wmi_frame_inject_type.
  17562. */
  17563. A_UINT32 frame_type;
  17564. /** periodicity of frame injection in milliseconds */
  17565. A_UINT32 frame_inject_period;
  17566. /** Destination address of frame */
  17567. wmi_mac_addr frame_addr1;
  17568. /** Frame control duration field to be set in CTS_TO_SELF.
  17569. * Applicable to frame_type WMI_FRAME_INJECT_TYPE_CTS_TO_SELF only.
  17570. */
  17571. A_UINT32 fc_duration;
  17572. /** variable buffer length. Can be used for frame template.
  17573. * data is in TLV data[]
  17574. */
  17575. A_UINT32 buf_len;
  17576. /** bw:
  17577. * Bandwidth to use for the injected frame, of type wmi_channel_width.
  17578. * This bw spec shall be ignored unless the bw_valid flag is set.
  17579. */
  17580. A_UINT32 bw;
  17581. /*
  17582. * The TLVs follows:
  17583. * A_UINT8 data[]; <-- Variable length data
  17584. */
  17585. } wmi_frame_inject_cmd_fixed_param;
  17586. #define WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS (0)
  17587. #define WMI_BEACON_TMPLT_PROFILE_PERIOD_MASK (0xff << WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS)
  17588. #define WMI_BEACON_TMPLT_SET_PROFILE_PERIOD(_ema_param, _val) \
  17589. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS, 8, _val)
  17590. #define WMI_BEACON_TMPLT_GET_PROFILE_PERIOD(_ema_param) \
  17591. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS, 8)
  17592. #define WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS (8)
  17593. #define WMI_BEACON_TMPLT_TEMPLATE_INDEX_MASK (0xff << WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS)
  17594. #define WMI_BEACON_TMPLT_SET_TEMPLATE_INDEX(_ema_param, _val) \
  17595. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS, 8, _val)
  17596. #define WMI_BEACON_TMPLT_GET_TEMPLATE_INDEX(_ema_param) \
  17597. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS, 8)
  17598. #define WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS (16)
  17599. #define WMI_BEACON_TMPLT_FIRST_TEMPLATE_MASK (0xff << WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS)
  17600. #define WMI_BEACON_TMPLT_SET_FIRST_TEMPLATE(_ema_param, _val) \
  17601. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS, 8, _val)
  17602. #define WMI_BEACON_TMPLT_GET_FIRST_TEMPLATE(_ema_param) \
  17603. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS, 8)
  17604. #define WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS (24)
  17605. #define WMI_BEACON_TMPLT_LAST_TEMPLATE_MASK (0xff << WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS)
  17606. #define WMI_BEACON_TMPLT_SET_LAST_TEMPLATE(_ema_param, _val) \
  17607. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS, 8, _val)
  17608. #define WMI_BEACON_TMPLT_GET_LAST_TEMPLATE(_ema_param) \
  17609. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS, 8)
  17610. typedef struct {
  17611. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_ml_info */
  17612. /** hw_link_id:
  17613. * Unique link id across SOCs, got as part of QMI handshake
  17614. */
  17615. A_UINT32 hw_link_id;
  17616. /**
  17617. * CU vdev map for the Critical update category-1
  17618. * (Inclusion of CU IES)
  17619. */
  17620. A_UINT32 cu_vdev_map_cat1_lo; /* bits 31:0 */
  17621. A_UINT32 cu_vdev_map_cat1_hi; /* bits 63:32 */
  17622. /**
  17623. * CU vdev map for the Critical update category-2
  17624. * (modification of CU IES)
  17625. */
  17626. A_UINT32 cu_vdev_map_cat2_lo; /* bits 31:0 */
  17627. A_UINT32 cu_vdev_map_cat2_hi; /* bits 63:32 */
  17628. } wmi_bcn_tmpl_ml_info;
  17629. typedef struct {
  17630. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_ml_params */
  17631. A_UINT32 vdev_id; /* partner vdev_id */
  17632. A_UINT32 hw_link_id; /* hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
  17633. A_UINT32 beacon_interval; /* beacon interval in TU from received beacon of the partner link */
  17634. /** CSA IE switch count offset from the beginning of data[]
  17635. * Value 0 indicates CSA IE is not present in beacon template.
  17636. */
  17637. A_UINT32 csa_switch_count_offset; /* units = bytes */
  17638. /** Extended CSA IE switch count offset from the beginning of data[]
  17639. * Value 0 indicates ECSA IE is not present in beacon template.
  17640. */
  17641. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  17642. /** Per-STA profile Subelement offset from the beginning of the template. */
  17643. A_UINT32 per_sta_profile_offset;
  17644. /** Quiet IE offset from the beginning of the template. */
  17645. A_UINT32 quiet_ie_offset;
  17646. /** Flag to check if other IEs are present in per-sta profile */
  17647. A_UINT32 is_other_ie_present;
  17648. } wmi_bcn_tmpl_ml_params;
  17649. typedef struct {
  17650. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
  17651. /** unique id identifying the VDEV, generated by the caller */
  17652. A_UINT32 vdev_id;
  17653. /** TIM IE offset from the beginning of the template. */
  17654. A_UINT32 tim_ie_offset;
  17655. /** beacon buffer length. data is in TLV data[] */
  17656. A_UINT32 buf_len;
  17657. /** CSA IE switch count offset from the beginning of data[]
  17658. * Value 0 indicates CSA IE is not present in beacon template.
  17659. */
  17660. A_UINT32 csa_switch_count_offset; /* units = bytes */
  17661. /** Extended CSA IE switch count offset from the beginning of data[]
  17662. * Value 0 indicates CSA IE is not present in beacon template.
  17663. */
  17664. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  17665. /** Specify when to send the CSA switch count status from FW to host.
  17666. * See WMI_CSA_EVENT_BMAP* below for more information.
  17667. * E.g. if CSA switch count event is needed to be sent when the switch count
  17668. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  17669. */
  17670. A_UINT32 csa_event_bitmap;
  17671. /** offset (in octets/bytes) of MBSSID IE in beacon frame */
  17672. A_UINT32 mbssid_ie_offset;
  17673. /** offset (in octets/bytes) of ESP IE in beacon frame */
  17674. A_UINT32 esp_ie_offset;
  17675. /** CSC IE color switch count offset from the beginning of data[]
  17676. * Value 0 indicates CSC IE is not present in beacon template.
  17677. */
  17678. A_UINT32 csc_switch_count_offset; /* units = bytes */
  17679. /** Specify when to send the CSC switch count status from FW to host.
  17680. * See WMI_CSC_EVENT_BMAP* below for more information.
  17681. * E.g. if CSA switch count event is needed to be sent when the switch count
  17682. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  17683. */
  17684. A_UINT32 csc_event_bitmap;
  17685. /** Specify offset for FW to overwrite MU EDCA parameters in the beacon.
  17686. * This is done during FW tuning of EDCA parameters.
  17687. * Based on number of HE and Legacy stations.
  17688. * If mu_edca_ie_offset == 0, it is ignored.
  17689. * Only non-zero values are considered.
  17690. */
  17691. A_UINT32 mu_edca_ie_offset;
  17692. /** Specify features that need to be enabled/disabled for the beacon.
  17693. *
  17694. * Bit 0:
  17695. * Beacon Protection feature enable/disable indication.
  17696. * Refer to WMI_BEACON_PROTECTION_EN_SET/GET macros.
  17697. *
  17698. * More features can be added to this bitmap.
  17699. */
  17700. A_UINT32 feature_enable_bitmap;
  17701. /**
  17702. * @ema_params: Applicable only for EMA tx VAPs (VAPs having both flags
  17703. * VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set) and should
  17704. * remain 0 otherwise. For EMA vaps it carries below information
  17705. * encoded in each byte:
  17706. * Byte 0: (@ema_beacon_profile_periodicity) - beacon profile periodicity
  17707. * (number of beacons) after which nontransmitted MBSS info repeats.
  17708. * Assumes values [1, N] inclusive.
  17709. * Refer to WMI_BEACON_TMPLT_[SET,GET]_PROFILE_PERIOD macros.
  17710. * Byte 1: (@ema_beacon_tmpl_idx) - Specifies the position of beacon
  17711. * templates within profile periodicity.
  17712. * Assumes values [0, ema_beacon_profile_periodicity-1] inclusive.
  17713. * Multiple templates having same @ema_beacon_max_tmpl_idx will
  17714. * overwrite previous template.
  17715. * Refer to WMI_BEACON_TMPLT_[SET,GET]_TEMPLATE_INDEX macros.
  17716. * Byte 2: (@ema_first_tmpl) - Specifies whether it's a last template in
  17717. * sequence of @ema_beacon_profile_periodicity templates
  17718. * (end of new template update exchange).
  17719. * If this template is the only template being updated,
  17720. * @ema_first_tmpl and @ema_last_tmpl both shall be set to 1.
  17721. * Refer to WMI_BEACON_TMPLT_[SET,GET]_FIRST_TEMPLATE macros.
  17722. * Byte 3: (@ema_last_tmpl) - pecifies whether it's a last template in
  17723. * sequence of @ema_beacon_profile_periodicity templates
  17724. * (end of new template update exchange).
  17725. * If this template is the only template being updated,
  17726. * @ema_first_tmpl and @ema_last_tmpl both shall be set to 1.
  17727. * Refer to WMI_BEACON_TMPLT_[SET,GET]_LAST_TEMPLATE macros.
  17728. */
  17729. A_UINT32 ema_params;
  17730. /*
  17731. * The TLVs follows:
  17732. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  17733. * A_UINT8 data[]; <-- Variable length data
  17734. * wmi_bcn_tmpl_ml_params ml_bcn_param[]; <-- per-MLO-link beacon data
  17735. * wmi_bcn_tmpl_ml_params will have multiple instances equal to
  17736. * the number of links in an AP MLD
  17737. */
  17738. } wmi_bcn_tmpl_cmd_fixed_param;
  17739. #define WMI_CSA_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSA switch count event */
  17740. #define WMI_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  17741. Same can also be achieved by setting bitmap to 0X80000001 */
  17742. #define WMI_CSA_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSA switch count event for every update to switch count */
  17743. #define WMI_CSC_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSC switch count event */
  17744. #define WMI_CSC_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  17745. Same can also be achieved by setting bitmap to 0X80000001 */
  17746. #define WMI_CSC_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSC switch count event for every update to switch count */
  17747. #define WMI_BEACON_PROTECTION_BIT_POS 0 /* Beacon Protection enable/disable indication */
  17748. #define WMI_BEACON_PROTECTION_EN_SET(param, value) \
  17749. WMI_SET_BITS(param, WMI_BEACON_PROTECTION_BIT_POS, 1, value)
  17750. #define WMI_BEACON_PROTECTION_EN_GET(param) \
  17751. WMI_GET_BITS(param, WMI_BEACON_PROTECTION_BIT_POS, 1)
  17752. typedef struct {
  17753. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_resp_tmpl_ml_info */
  17754. /** hw_link_id:
  17755. * Unique link id across SOCs, got as part of QMI handshake
  17756. */
  17757. A_UINT32 hw_link_id;
  17758. /**
  17759. * CU vdev map for the Critical update category-1
  17760. * (Inclusion of CU IES)
  17761. */
  17762. A_UINT32 cu_vdev_map_cat1_lo; /* bits 31:0 */
  17763. A_UINT32 cu_vdev_map_cat1_hi; /* bits 63:32 */
  17764. /**
  17765. * CU vdev map for the Critical update category-2
  17766. * (modification of CU IES)
  17767. */
  17768. A_UINT32 cu_vdev_map_cat2_lo; /* bits 31:0 */
  17769. A_UINT32 cu_vdev_map_cat2_hi; /* bits 63:32 */
  17770. } wmi_prb_resp_tmpl_ml_info;
  17771. /** indicates P2P GO only case not replay probe req */
  17772. #define WMI_PRB_TMPL_IGNORE_NONP2P_PRB_REQ 0x1
  17773. typedef struct {
  17774. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
  17775. /** unique id identifying the VDEV, generated by the caller */
  17776. A_UINT32 vdev_id;
  17777. /** beacon buffer length. data is in TLV data[] */
  17778. A_UINT32 buf_len;
  17779. /** flags to control probe tmpl:
  17780. * Bit 0: If set, FW should ignore non-P2P probe req
  17781. * Bits 31-1: Reserved
  17782. */
  17783. A_UINT32 flags;
  17784. /*
  17785. * The TLVs follows:
  17786. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  17787. * A_UINT8 data[]; <-- Variable length data
  17788. */
  17789. } wmi_prb_tmpl_cmd_fixed_param;
  17790. typedef struct {
  17791. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_tmpl_cmd_fixed_param */
  17792. /** unique id identifying the VDEV, generated by the caller */
  17793. A_UINT32 vdev_id;
  17794. /** fd frame buffer length. data is in TLV data[] */
  17795. A_UINT32 buf_len;
  17796. /*
  17797. * The TLVs follows:
  17798. * A_UINT8 data[]; <-- Variable length data
  17799. */
  17800. } wmi_fd_tmpl_cmd_fixed_param;
  17801. typedef struct {
  17802. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
  17803. A_UINT32 tlv_header;
  17804. /** unique id identifying the VDEV */
  17805. A_UINT32 vdev_id;
  17806. /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
  17807. A_UINT32 tx_status;
  17808. } wmi_offload_bcn_tx_status_event_fixed_param;
  17809. enum wmi_sta_ps_mode {
  17810. /** enable power save for the given STA VDEV */
  17811. WMI_STA_PS_MODE_DISABLED = 0,
  17812. /** disable power save for a given STA VDEV */
  17813. WMI_STA_PS_MODE_ENABLED = 1,
  17814. };
  17815. typedef struct {
  17816. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
  17817. /** unique id identifying the VDEV, generated by the caller */
  17818. A_UINT32 vdev_id;
  17819. /** Power save mode
  17820. *
  17821. * (see enum wmi_sta_ps_mode)
  17822. */
  17823. A_UINT32 sta_ps_mode;
  17824. } wmi_sta_powersave_mode_cmd_fixed_param;
  17825. typedef struct {
  17826. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_tdcc_config_cmd_fixed_param */
  17827. /** Set a max tx period: percentage of one beacon interval. range: 0 - 100 */
  17828. A_UINT32 tx_cycle_percentage;
  17829. /** Enable/disable TX Duty Cycle Control powersave */
  17830. A_UINT32 enabled;
  17831. } wmi_sta_tdcc_config_cmd_fixed_param;
  17832. enum wmi_csa_offload_en {
  17833. WMI_CSA_OFFLOAD_DISABLE = 0,
  17834. WMI_CSA_OFFLOAD_ENABLE = 1,
  17835. };
  17836. typedef struct {
  17837. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
  17838. A_UINT32 vdev_id;
  17839. A_UINT32 csa_offload_enable;
  17840. } wmi_csa_offload_enable_cmd_fixed_param;
  17841. typedef struct {
  17842. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
  17843. A_UINT32 vdev_id;
  17844. /*
  17845. * The TLVs follows:
  17846. * wmi_channel chan;
  17847. */
  17848. } wmi_csa_offload_chanswitch_cmd_fixed_param;
  17849. /**
  17850. * This parameter controls the policy for retrieving frames from AP while the
  17851. * STA is in sleep state.
  17852. *
  17853. * Only takes affect if the sta_ps_mode is enabled
  17854. */
  17855. enum wmi_sta_ps_param_rx_wake_policy {
  17856. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  17857. * the Power save SM(state machine) will come out of sleep by either
  17858. * sending null frame (or) a data frame (with PS==0) in response to TIM
  17859. * bit set in the received beacon frame from AP.
  17860. */
  17861. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  17862. /* Here the power save state machine will not wakeup in response to TIM
  17863. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  17864. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  17865. * access categories are delivery-enabled, the station will send a UAPSD
  17866. * trigger frame, otherwise it will send a PS-Poll.
  17867. */
  17868. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  17869. };
  17870. /** Number of tx frames/beacon that cause the power save SM to wake up.
  17871. *
  17872. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  17873. * meaning, It will cause the SM to never wake up. This is useful if you want
  17874. * to keep the system to sleep all the time for some kind of test mode . host
  17875. * can change this parameter any time. It will affect at the next tx frame.
  17876. */
  17877. enum wmi_sta_ps_param_tx_wake_threshold {
  17878. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  17879. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  17880. /* Values greater than one indicate that many TX attempts per beacon
  17881. * interval before the STA will wake up
  17882. */
  17883. };
  17884. /**
  17885. * The maximum number of PS-Poll frames the FW will send in response to
  17886. * traffic advertised in TIM before waking up (by sending a null frame with PS
  17887. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  17888. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  17889. * parameter is used when the RX wake policy is
  17890. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  17891. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  17892. */
  17893. enum wmi_sta_ps_param_pspoll_count {
  17894. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  17895. /* Values greater than 0 indicate the maximum number of PS-Poll frames FW
  17896. * will send before waking up.
  17897. */
  17898. };
  17899. /*
  17900. * This will include the delivery and trigger enabled state for every AC.
  17901. * This is the negotiated state with AP. The host MLME needs to set this based
  17902. * on AP capability and the state Set in the association request by the
  17903. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  17904. */
  17905. #define WMI_UAPSD_AC_TYPE_DELI 0
  17906. #define WMI_UAPSD_AC_TYPE_TRIG 1
  17907. #define WMI_UAPSD_AC_BIT_MASK(ac,type) \
  17908. ((type == WMI_UAPSD_AC_TYPE_DELI) ? \
  17909. (1 << (ac<<1)) : \
  17910. (1 << ((ac<<1)+1)))
  17911. enum wmi_sta_ps_param_uapsd {
  17912. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  17913. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  17914. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  17915. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  17916. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  17917. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  17918. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  17919. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  17920. };
  17921. enum wmi_sta_ps_scheme_cfg {
  17922. WMI_STA_PS_OPM_CONSERVATIVE = 0,
  17923. WMI_STA_PS_OPM_AGGRESSIVE = 1,
  17924. WMI_STA_PS_USER_DEF = 2,
  17925. };
  17926. enum wmi_sta_powersave_param {
  17927. /**
  17928. * Controls how frames are retrievd from AP while STA is sleeping
  17929. *
  17930. * (see enum wmi_sta_ps_param_rx_wake_policy)
  17931. */
  17932. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  17933. /**
  17934. * The STA will go active after this many TX
  17935. *
  17936. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  17937. */
  17938. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  17939. /**
  17940. * Number of PS-Poll to send before STA wakes up
  17941. *
  17942. * (see enum wmi_sta_ps_param_pspoll_count)
  17943. *
  17944. */
  17945. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  17946. /**
  17947. * TX/RX inactivity time in msec before going to sleep.
  17948. *
  17949. * The power save SM will monitor tx/rx activity on the VDEV, if no
  17950. * activity for the specified msec of the parameter the Power save SM will
  17951. * go to sleep.
  17952. */
  17953. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  17954. /**
  17955. * Set uapsd configuration.
  17956. *
  17957. * (see enum wmi_sta_ps_param_uapsd)
  17958. */
  17959. WMI_STA_PS_PARAM_UAPSD = 4,
  17960. /**
  17961. * Number of PS-Poll to send before STA wakes up in QPower Mode
  17962. */
  17963. WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
  17964. /**
  17965. * Enable OPM
  17966. */
  17967. WMI_STA_PS_ENABLE_QPOWER = 6,
  17968. WMI_STA_PS_ENABLE_OPM = WMI_STA_PS_ENABLE_QPOWER, /* alias */
  17969. /**
  17970. * Number of TX frames before the entering the Active state
  17971. */
  17972. WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
  17973. /**
  17974. * QPower SPEC PSPOLL interval
  17975. */
  17976. WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
  17977. /**
  17978. * Max SPEC PSPOLL to be sent when the PSPOLL response has
  17979. * no-data bit set
  17980. */
  17981. WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
  17982. /**
  17983. * Max value of ITO reset when there is no tx-rx
  17984. * after AP has set the TIM bit
  17985. */
  17986. WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX = 10,
  17987. /**
  17988. * Flag to enable/disable Powersave Optimization
  17989. * in WOW
  17990. */
  17991. WMI_STA_PS_PARAM_ENABLE_PS_OPT_IN_WOW = 11,
  17992. /**
  17993. * Speculative interval in ms
  17994. */
  17995. WMI_STA_PS_PARAM_SPEC_WAKE_INTERVAL = 12,
  17996. };
  17997. typedef struct {
  17998. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
  17999. /** unique id identifying the VDEV, generated by the caller */
  18000. A_UINT32 vdev_id;
  18001. /** station power save parameter (see enum wmi_sta_powersave_param) */
  18002. A_UINT32 param;
  18003. A_UINT32 value;
  18004. } wmi_sta_powersave_param_cmd_fixed_param;
  18005. /** No MIMO power save */
  18006. #define WMI_STA_MIMO_PS_MODE_DISABLE
  18007. /** mimo powersave mode static*/
  18008. #define WMI_STA_MIMO_PS_MODE_STATIC
  18009. /** mimo powersave mode dynamic */
  18010. #define WMI_STA_MIMO_PS_MODE_DYNAMI
  18011. typedef struct {
  18012. /** unique id identifying the VDEV, generated by the caller */
  18013. A_UINT32 vdev_id;
  18014. /** mimo powersave mode as defined above */
  18015. A_UINT32 mimo_pwrsave_mode;
  18016. } wmi_sta_mimo_ps_mode_cmd;
  18017. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  18018. enum wmi_ap_ps_param_uapsd {
  18019. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  18020. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  18021. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  18022. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  18023. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  18024. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  18025. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  18026. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  18027. };
  18028. /** U-APSD maximum service period of peer station */
  18029. enum wmi_ap_ps_peer_param_max_sp {
  18030. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  18031. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  18032. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  18033. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  18034. /* keep last! */
  18035. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  18036. };
  18037. /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
  18038. enum wmi_ap_ps_param_sifs_resp_frmtype {
  18039. WMI_SIFS_RESP_PSPOLL = (1 << 0),
  18040. WMI_SIFS_RESP_UAPSD = (1 << 1),
  18041. WMI_SIFS_RESP_QBST_EXP = (1 << 2),
  18042. WMI_SIFS_RESP_QBST_DATA = (1 << 3),
  18043. WMI_SIFS_RESP_QBST_BAR = (1 << 4),
  18044. };
  18045. /**
  18046. * AP power save parameter
  18047. * Set a power save specific parameter for a peer station
  18048. */
  18049. enum wmi_ap_ps_peer_param {
  18050. /** Set uapsd configuration for a given peer.
  18051. *
  18052. * This will include the delivery and trigger enabled state for every AC.
  18053. * The host MLME needs to set this based on AP capability and stations
  18054. * request Set in the association request received from the station.
  18055. *
  18056. * Lower 8 bits of the value specify the UAPSD configuration.
  18057. *
  18058. * (see enum wmi_ap_ps_param_uapsd)
  18059. * The default value is 0.
  18060. */
  18061. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  18062. /**
  18063. * Set the service period for a UAPSD capable station
  18064. *
  18065. * The service period from wme ie in the (re)assoc request frame.
  18066. *
  18067. * (see enum wmi_ap_ps_peer_param_max_sp)
  18068. */
  18069. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  18070. /** Time in seconds for aging out buffered frames for STA in power save */
  18071. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  18072. /**
  18073. * Specify frame types that are considered SIFS RESP trigger frame
  18074. * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
  18075. */
  18076. WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  18077. /** Specifies the trigger state of TID. Valid only for UAPSD frame type */
  18078. WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  18079. /** Specifies the WNM sleep state of a STA */
  18080. WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  18081. };
  18082. typedef struct {
  18083. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
  18084. /** unique id identifying the VDEV, generated by the caller */
  18085. A_UINT32 vdev_id;
  18086. /** peer MAC address */
  18087. wmi_mac_addr peer_macaddr;
  18088. /** AP powersave param (see enum wmi_ap_ps_peer_param) */
  18089. A_UINT32 param;
  18090. /** AP powersave param value (see defines) */
  18091. A_UINT32 value;
  18092. } wmi_ap_ps_peer_cmd_fixed_param;
  18093. /** Configure peer station 11v U-APSD coexistence
  18094. *
  18095. * Two parameters from uaspd coexistence ie info (as specified in 11v) are
  18096. * sent down to FW along with this command.
  18097. *
  18098. * The semantics of these fields are described in the following text extracted
  18099. * from 802.11v.
  18100. *
  18101. * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
  18102. * U-APSD Coexistence element, the AP should not transmit frames to the
  18103. * non-AP STA outside of the U-APSD Coexistence Service Period, which
  18104. * begins when the AP receives the U-APSD trigger frame and ends after
  18105. * the transmission period specified by the result of the following
  18106. * calculation:
  18107. *
  18108. * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
  18109. *
  18110. * Where T is the time the U-APSD trigger frame was received at the AP
  18111. * Interval is the UAPSD Coexistence element Duration/Interval field
  18112. * value (see 7.3.2.91) or upon the successful transmission of a frame
  18113. * with EOSP bit set to 1, whichever is earlier.
  18114. *
  18115. *
  18116. * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
  18117. * Coexistence element, the AP should not transmit frames to the non-AP
  18118. * STA outside of the U-APSD Coexistence Service Period, which begins
  18119. * when the AP receives a U-APSD trigger frame and ends after the
  18120. * transmission period specified by the result of the following
  18121. * calculation: End of transmission period = T + Duration
  18122. */
  18123. typedef struct {
  18124. /** unique id identifying the VDEV, generated by the caller */
  18125. A_UINT32 vdev_id;
  18126. /** peer MAC address */
  18127. wmi_mac_addr peer_macaddr;
  18128. /** Enable U-APSD coexistence support for this peer
  18129. *
  18130. * 0 -> disabled (default)
  18131. * 1 -> enabled
  18132. */
  18133. A_UINT32 enabled;
  18134. /** Duration/Interval as defined by 11v U-ASPD coexistence */
  18135. A_UINT32 duration_interval;
  18136. /** Upper 32 bits of 64-bit TSF offset */
  18137. A_UINT32 tsf_offset_high;
  18138. /** Lower 32 bits of 64-bit TSF offset */
  18139. A_UINT32 tsf_offset_low;
  18140. } wmi_ap_powersave_peer_uapsd_coex_cmd;
  18141. typedef enum {
  18142. WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
  18143. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
  18144. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
  18145. WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
  18146. } wmi_ap_ps_egap_flag_type;
  18147. #define WMI_EGAP_GET_REDUCED_2G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 0, 8)
  18148. #define WMI_EGAP_GET_REDUCED_2G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 8, 8)
  18149. #define WMI_EGAP_GET_REDUCED_5G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 16, 8)
  18150. #define WMI_EGAP_GET_REDUCED_5G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 24, 8)
  18151. #define WMI_EGAP_SET_REDUCED_2G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 0, 8, val)
  18152. #define WMI_EGAP_SET_REDUCED_2G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 8, 8, val)
  18153. #define WMI_EGAP_SET_REDUCED_5G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 16, 8, val)
  18154. #define WMI_EGAP_SET_REDUCED_5G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 24, 8, val)
  18155. /**
  18156. * configure enhanced green ap parameters
  18157. */
  18158. typedef struct {
  18159. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  18160. /** Enable enhanced green ap
  18161. * 0 -> disabled
  18162. * 1 -> enabled
  18163. */
  18164. A_UINT32 enable;
  18165. /** The param indicates a duration that all STAs connected
  18166. * to S-AP have no traffic.
  18167. */
  18168. A_UINT32 inactivity_time; /* in unit of milliseconds */
  18169. /** The param indicates a duration that all STAs connected
  18170. * to S-AP have no traffic, after all STAs have entered powersave.
  18171. */
  18172. A_UINT32 wait_time; /* in unit of milliseconds */
  18173. /** The param is used to turn on/off some functions within E-GAP.
  18174. */
  18175. A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
  18176. /** Reduced_txrx_chainmask
  18177. * [7:0] - 2G band tx chain mask
  18178. * [15:8] - 2G band rx chain mask
  18179. * [23:16] - 5G band tx chain mask
  18180. * [31:24] - 5G band rx chain mask
  18181. */
  18182. A_UINT32 reduced_txrx_chainmask;
  18183. } wmi_ap_ps_egap_param_cmd_fixed_param;
  18184. typedef enum {
  18185. WMI_AP_PS_EGAP_STATUS_IDLE = 1,
  18186. WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
  18187. WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
  18188. WMI_AP_PS_EGAP_STATUS_MAX = 15
  18189. } wmi_ap_ps_egap_status_type;
  18190. /**
  18191. * send enhanced green ap status to host
  18192. */
  18193. typedef struct
  18194. {
  18195. /** TLV tag and len; tag equals
  18196. * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list */
  18197. A_UINT32 tlv_header;
  18198. union {
  18199. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18200. /** pdev_id for identifying the MAC
  18201. * See macros starting with WMI_PDEV_ID_ for values.
  18202. */
  18203. A_UINT32 pdev_id;
  18204. };
  18205. /** The param indicates the current tx chainmask with the mac id. */
  18206. A_UINT32 tx_chainmask;
  18207. /** The param indicates the current rx chainmask with the mac id. */
  18208. A_UINT32 rx_chainmask;
  18209. } wmi_ap_ps_egap_info_chainmask_list;
  18210. typedef struct {
  18211. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  18212. /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
  18213. A_UINT32 status;
  18214. /* This TLV is followed by
  18215. * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
  18216. */
  18217. } wmi_ap_ps_egap_info_event_fixed_param;
  18218. /* 128 clients = 4 words */
  18219. /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
  18220. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  18221. typedef struct {
  18222. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  18223. /** TIM bitmap len (in bytes) */
  18224. A_UINT32 tim_len;
  18225. /** TIM Partial Virtual Bitmap */
  18226. A_UINT32 tim_mcast;
  18227. A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  18228. A_UINT32 tim_changed;
  18229. A_UINT32 tim_num_ps_pending;
  18230. /** Use the vdev_id only if vdev_id_valid is set */
  18231. A_UINT32 vdev_id_valid;
  18232. /** unique id identifying the VDEV */
  18233. A_UINT32 vdev_id;
  18234. } wmi_tim_info;
  18235. typedef struct {
  18236. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  18237. /** TIM Partial Virtual Bitmap */
  18238. A_UINT32 tim_mcast;
  18239. A_UINT32 tim_changed;
  18240. A_UINT32 tim_num_ps_pending;
  18241. /** Use the vdev_id only if vdev_id_valid is set */
  18242. A_UINT32 vdev_id_valid;
  18243. /** unique id identifying the VDEV */
  18244. A_UINT32 vdev_id;
  18245. /** TIM bitmap len (in bytes) */
  18246. A_UINT32 tim_len;
  18247. /* followed by WMITLV_TAG_ARRAY_BYTE holding the TIM bitmap */
  18248. } wmi_tim_info_v2;
  18249. typedef struct {
  18250. /** Flag to enable quiet period IE support */
  18251. A_UINT32 is_enabled;
  18252. /** Quiet start */
  18253. A_UINT32 tbttcount;
  18254. /** Beacon intervals between quiets*/
  18255. A_UINT32 period;
  18256. /** TUs of each quiet*/
  18257. A_UINT32 duration;
  18258. /** TUs of from TBTT of quiet start*/
  18259. A_UINT32 offset;
  18260. } wmi_quiet_info;
  18261. /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
  18262. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
  18263. typedef struct {
  18264. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
  18265. /** Bit 0: Flag to indicate an update in NOA schedule
  18266. * Bits 7-1: Reserved
  18267. * Bits 15-8: Index (identifies the instance of NOA sub element)
  18268. * Bit 16: Opp PS state of the AP
  18269. * Bits 23-17: Ctwindow in TUs
  18270. * Bits 31-24: Number of NOA descriptors
  18271. */
  18272. A_UINT32 noa_attributes;
  18273. wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  18274. /** Use the vdev_id only if vdev_id_valid is set */
  18275. A_UINT32 vdev_id_valid;
  18276. /** unique id identifying the VDEV */
  18277. A_UINT32 vdev_id;
  18278. } wmi_p2p_noa_info;
  18279. typedef struct {
  18280. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_offload_info */
  18281. A_UINT32 vdev_id; /* unique id identifying the VDEV */
  18282. A_UINT8 tbttcount; /* quiet start */
  18283. A_UINT8 period; /* beacon intervals between quiets */
  18284. A_UINT16 duration; /* TUs of each quiet */
  18285. A_UINT16 offset; /* TUs of from TBTT of quiet start */
  18286. } wmi_quiet_offload_info;
  18287. #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
  18288. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
  18289. #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
  18290. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
  18291. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
  18292. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  18293. WMI_UNIFIED_NOA_ATTR_MODIFIED);
  18294. #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
  18295. #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
  18296. #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
  18297. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
  18298. #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
  18299. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  18300. WMI_UNIFIED_NOA_ATTR_INDEX);
  18301. #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
  18302. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
  18303. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
  18304. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
  18305. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
  18306. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  18307. WMI_UNIFIED_NOA_ATTR_OPP_PS);
  18308. #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
  18309. #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
  18310. #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
  18311. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
  18312. #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
  18313. WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
  18314. WMI_UNIFIED_NOA_ATTR_CTWIN);
  18315. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
  18316. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
  18317. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
  18318. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
  18319. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
  18320. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  18321. WMI_UNIFIED_NOA_ATTR_NUM_DESC);
  18322. typedef struct {
  18323. /** TIM info */
  18324. wmi_tim_info tim_info;
  18325. /** P2P NOA info */
  18326. wmi_p2p_noa_info p2p_noa_info;
  18327. /* TBD: More info elements to be added later */
  18328. } wmi_bcn_info;
  18329. typedef struct {
  18330. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
  18331. /** bitmap identifying the VDEVs, generated by the caller */
  18332. A_UINT32 vdev_map;
  18333. /** how many vdev's info is included in this message
  18334. * If this field is zero, then the number of vdevs is specified by
  18335. * the number of bits set in the vdev_map bitmap.
  18336. */
  18337. A_UINT32 num_vdevs;
  18338. /* This TLV is followed by tim_info and p2p_noa_info for each vdev:
  18339. * wmi_tim_info tim_info[];
  18340. * wmi_p2p_noa_info p2p_noa_info[];
  18341. * wmi_quiet_offload_info quiet_offload_info[0/1];
  18342. *
  18343. */
  18344. } wmi_host_swba_event_fixed_param;
  18345. #define WMI_MAX_AP_VDEV 16
  18346. typedef struct {
  18347. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swfda_event_fixed_param */
  18348. /** vdev_id identifying the VDEV for which FILS should be generated */
  18349. A_UINT32 vdev_id;
  18350. /** time (in TU) at which current FILS Discovery frame is scheduled for Tx */
  18351. A_UINT32 fils_tt;
  18352. /** next TBTT time (in TU) for this vdev */
  18353. A_UINT32 tbtt;
  18354. } wmi_host_swfda_event_fixed_param;
  18355. typedef struct {
  18356. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
  18357. /** bimtap of VDEVs that has tbtt offset updated */
  18358. A_UINT32 vdev_map;
  18359. /* The TLVs for tbttoffset_list, tbtt_qtime_low_us_list, and
  18360. * tbtt_qtime_high_us_list will follow this TLV.
  18361. * - tbtt offset list in the order of the LSb to MSb in the vdev_map bitmap
  18362. * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
  18363. * - tbtt qtime_low_us list(Lower 32 bit of qtime us) in the order of the
  18364. * LSb to MSb in the vdev_map bitmap
  18365. * A_UINT32 tbtt_qtime_low_us_list[WMI_MAX_AP_VDEV];
  18366. * - tbtt qtime_high_us list(Higher 32 bit of qtime us) in the order of the
  18367. * LSb to MSb in the vdev_map bitmap
  18368. * A_UINT32 tbtt_qtime_high_us_list[WMI_MAX_AP_VDEV];
  18369. */
  18370. } wmi_tbtt_offset_event_fixed_param;
  18371. #define WMI_TBTT_OFFSET_INVALID 0xffffffff /* tbttoffset is not updated by FW */
  18372. typedef struct {
  18373. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
  18374. /** unique id identifying the VDEV */
  18375. A_UINT32 vdev_id;
  18376. /** tbttoffset in TUs */
  18377. A_UINT32 tbttoffset;
  18378. /** absolute tbtt time in qtime us */
  18379. A_UINT32 tbtt_qtime_low_us; /* bits 31:0 of qtime */
  18380. A_UINT32 tbtt_qtime_high_us; /* bits 63:32 of qtime */
  18381. } wmi_tbtt_offset_info;
  18382. /** Use this event if number of vdevs > 32 */
  18383. typedef struct {
  18384. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param */
  18385. A_UINT32 num_vdevs;
  18386. /*
  18387. * The TLVs for tbttoffset will follow this TLV.
  18388. * Of size num_vdevs * wmi_tbtt_offset_info
  18389. */
  18390. } wmi_tbtt_offset_ext_event_fixed_param;
  18391. /* Peer Specific commands and events */
  18392. typedef struct {
  18393. A_UINT32 percentage; /* in unit of 12.5% */
  18394. A_UINT32 min_delta; /* in unit of Mbps */
  18395. } rate_delta_t;
  18396. #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
  18397. #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
  18398. #define MAX_NUM_OF_RATE_THRESH 4
  18399. typedef struct {
  18400. A_UINT32 val_cond_flags; /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  18401. Any of these two conditions or both of them can be set. */
  18402. rate_delta_t rate_delta;
  18403. A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; /* In unit of Mbps. There are at most 4 thresholds.
  18404. If the threshold count is less than 4, set zero to
  18405. the one following the last threshold */
  18406. } report_cond_per_phy_t;
  18407. enum peer_rate_report_cond_phy_type {
  18408. PEER_RATE_REPORT_COND_11B = 0,
  18409. PEER_RATE_REPORT_COND_11A_G,
  18410. PEER_RATE_REPORT_COND_11N,
  18411. PEER_RATE_REPORT_COND_11AC,
  18412. PEER_RATE_REPORT_COND_MAX_NUM
  18413. };
  18414. typedef struct {
  18415. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condition_fixed_param */
  18416. A_UINT32 enable_rate_report; /* 1= enable, 0=disable */
  18417. A_UINT32 report_backoff_time; /* in unit of msecond */
  18418. A_UINT32 report_timer_period; /* in unit of msecond */
  18419. /* In the following field, the array index means the phy type,
  18420. * please see enum peer_rate_report_cond_phy_type for detail */
  18421. report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
  18422. } wmi_peer_set_rate_report_condition_fixed_param;
  18423. /* Peer Type:
  18424. * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
  18425. * on address and vdev opmode. This is largely here to allow host to indicate that
  18426. * peer is explicitly a TDLS peer
  18427. */
  18428. enum wmi_peer_type {
  18429. WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
  18430. WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
  18431. WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
  18432. WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
  18433. WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
  18434. WMI_PEER_TYPE_TRANS_BSS = 5, /* For creating BSS peer when connecting with non-transmit AP */
  18435. WMI_PEER_TYPE_PASN = 6, /* Peer is used for Pre-Association Security Negotiation */
  18436. WMI_PEER_TYPE_BRIDGE = 7, /* For creating Dummy Peer in case of 4 Link MLO */
  18437. WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
  18438. /* Reserved from 128 - 255 for target internal use.*/
  18439. WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
  18440. };
  18441. /* this TLV structure used for providing mlo parameters on peer create */
  18442. typedef struct {
  18443. A_UINT32 tlv_header; /** TLV tag and len */
  18444. wmi_mlo_flags mlo_flags; /* only mlo enable flag need by STA mode peer create */
  18445. } wmi_peer_create_mlo_params;
  18446. typedef struct {
  18447. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
  18448. /** unique id identifying the VDEV, generated by the caller */
  18449. A_UINT32 vdev_id;
  18450. /** peer MAC address */
  18451. wmi_mac_addr peer_macaddr;
  18452. /** peer type: see enum values above */
  18453. A_UINT32 peer_type;
  18454. /* The TLVs follows this structure:
  18455. * wmi_peer_create_mlo_params mlo_params[]; <-- MLO flags on peer_create
  18456. * Optional TLV, only present for MLO peers.
  18457. * If the peer is non-MLO, the array length should be 0.
  18458. * Only mlo_enable flag required by MCC to decide MAC address to be used.
  18459. */
  18460. } wmi_peer_create_cmd_fixed_param;
  18461. /* this TLV structure is used for providing MLO parameters on peer delete */
  18462. typedef struct {
  18463. A_UINT32 tlv_header; /** TLV tag and len */
  18464. A_UINT32 mlo_hw_link_id_bitmap; /* Hardware link id of the link which has crashed or was not created in the first place */
  18465. wmi_mlo_flags mlo_flags; /* to indicate whether peer delete is due to link switch */
  18466. } wmi_peer_delete_mlo_params;
  18467. typedef struct {
  18468. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
  18469. /** unique id identifying the VDEV, generated by the caller */
  18470. A_UINT32 vdev_id;
  18471. /** peer MAC address */
  18472. wmi_mac_addr peer_macaddr;
  18473. /* The TLVs follows this structure:
  18474. * wmi_peer_delete_mlo_params mlo_params[]; <-- MLO flags on peer_delete
  18475. * Optional TLV, only present for MLO peers.
  18476. * If the peer is non-MLO, the array length should be 0.
  18477. * Used for Link peer deleted.
  18478. */
  18479. } wmi_peer_delete_cmd_fixed_param;
  18480. #define WMI_VDEV_ALL_PEER_MAX_BITMAP_WORD32 ((WMI_PEER_TYPE_HOST_MAX+31) / 32)
  18481. #define WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET(param, peer_type) \
  18482. WMI_SET_BITS(param[peer_type / 32], (peer_type % 32), 1, 1)
  18483. #define WMI_VDEV_DELETE_ALL_PEER_BITMAP_GET(param, peer_type) \
  18484. WMI_GET_BITS(param[peer_type / 32], (peer_type % 32), 1)
  18485. typedef struct {
  18486. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delete_all_peer_cmd_fixed_param */
  18487. /** unique id identifying the VDEV, generated by the caller */
  18488. A_UINT32 vdev_id;
  18489. /**
  18490. * Host can request for deletion of peers specific to wmi_peer_type
  18491. * through below bitmap.
  18492. * Macro's WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET &
  18493. * WMI_VDEV_DELETE_ALL_PEER_BITMAP_GET are used for accessing purpose.
  18494. * And if bitmap array is filled with zeros, firmware needs to delete
  18495. * all peers.
  18496. */
  18497. A_UINT32 peer_type_bitmap[WMI_VDEV_ALL_PEER_MAX_BITMAP_WORD32];
  18498. } wmi_vdev_delete_all_peer_cmd_fixed_param;
  18499. typedef struct {
  18500. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param */
  18501. A_UINT32 tlv_header;
  18502. /*
  18503. * Following this struct is the TLV:
  18504. * A_UINT32 peer_ids[]; <-- variable-length array of peer_ids
  18505. * that have been unmapped by the host
  18506. */
  18507. } wmi_peer_unmap_response_cmd_fixed_param;
  18508. typedef struct {
  18509. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
  18510. /** unique id identifying the VDEV, generated by the caller */
  18511. A_UINT32 vdev_id;
  18512. /** peer MAC address */
  18513. wmi_mac_addr peer_macaddr;
  18514. /**
  18515. * maximum block ack window size to use during a rx block ack negotiation,
  18516. * i.e. the maximum number of MPDUs per A-MPDU that will be received
  18517. */
  18518. A_UINT32 rx_block_ack_win_limit;
  18519. } wmi_peer_set_rx_blocksize_cmd_fixed_param;
  18520. typedef struct {
  18521. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
  18522. /** unique id identifying the VDEV, generated by the caller */
  18523. A_UINT32 vdev_id;
  18524. /** peer MAC address */
  18525. wmi_mac_addr peer_macaddr;
  18526. /** tid bitmap identifying the tids to flush */
  18527. A_UINT32 peer_tid_bitmap;
  18528. } wmi_peer_flush_tids_cmd_fixed_param;
  18529. typedef struct {
  18530. /** rate mode . 0: disable fixed rate (auto rate)
  18531. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  18532. * 2: ht20 11n rate specified as mcs index
  18533. * 3: ht40 11n rate specified as mcs index
  18534. */
  18535. A_UINT32 rate_mode;
  18536. /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  18537. * and series 3 is stored at byte 3 (MSB) */
  18538. A_UINT32 rate_series;
  18539. /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
  18540. * and retry count for rate 3 is stored at byte 3 (MSB) */
  18541. A_UINT32 rate_retries;
  18542. } wmi_fixed_rate;
  18543. typedef struct {
  18544. /** unique id identifying the VDEV, generated by the caller */
  18545. A_UINT32 vdev_id;
  18546. /** peer MAC address */
  18547. wmi_mac_addr peer_macaddr;
  18548. /** fixed rate */
  18549. wmi_fixed_rate peer_fixed_rate;
  18550. } wmi_peer_fixed_rate_cmd;
  18551. #define WMI_MGMT_TID 17
  18552. typedef struct {
  18553. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
  18554. /** unique id identifying the VDEV, generated by the caller */
  18555. A_UINT32 vdev_id;
  18556. /** peer MAC address */
  18557. wmi_mac_addr peer_macaddr;
  18558. } wmi_addba_clear_resp_cmd_fixed_param;
  18559. typedef struct {
  18560. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
  18561. /** unique id identifying the VDEV, generated by the caller */
  18562. A_UINT32 vdev_id;
  18563. /** peer MAC address */
  18564. wmi_mac_addr peer_macaddr;
  18565. /** Tid number */
  18566. A_UINT32 tid;
  18567. /** Buffer/Window size*/
  18568. A_UINT32 buffersize;
  18569. } wmi_addba_send_cmd_fixed_param;
  18570. typedef struct {
  18571. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
  18572. /** unique id identifying the VDEV, generated by the caller */
  18573. A_UINT32 vdev_id;
  18574. /** peer MAC address */
  18575. wmi_mac_addr peer_macaddr;
  18576. /** Tid number */
  18577. A_UINT32 tid;
  18578. /** Is Initiator */
  18579. A_UINT32 initiator;
  18580. /** Reason code */
  18581. A_UINT32 reasoncode;
  18582. } wmi_delba_send_cmd_fixed_param;
  18583. typedef struct {
  18584. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
  18585. /** unique id identifying the vdev, generated by the caller */
  18586. A_UINT32 vdev_id;
  18587. /** peer mac address */
  18588. wmi_mac_addr peer_macaddr;
  18589. /** Tid number */
  18590. A_UINT32 tid;
  18591. /** status code */
  18592. A_UINT32 statuscode;
  18593. } wmi_addba_setresponse_cmd_fixed_param;
  18594. typedef struct {
  18595. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
  18596. /** unique id identifying the vdev, generated by the caller */
  18597. A_UINT32 vdev_id;
  18598. /** peer mac address */
  18599. wmi_mac_addr peer_macaddr;
  18600. /** Tid number */
  18601. A_UINT32 tid;
  18602. } wmi_send_singleamsdu_cmd_fixed_param;
  18603. /* Type of Station DTIM Power Save method */
  18604. enum {
  18605. /* For NORMAL DTIM, the parameter is the number of beacon intervals and
  18606. * also the same value as the listen interval. For this method, the
  18607. * station will wake up based on the listen interval. If this
  18608. * listen interval is not equal to DTIM, then the station may
  18609. * miss certain DTIM beacons. If this value is 1, then the
  18610. * station will wake up for every beacon.
  18611. */
  18612. WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
  18613. /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
  18614. * When this value is 1, then the station will wake at every DTIM beacon.
  18615. * If this value is >1, then the station will skip certain DTIM beacons.
  18616. * This value is the multiple of DTIM intervals that the station will
  18617. * wake up to receive the DTIM beacons.
  18618. */
  18619. WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
  18620. };
  18621. /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
  18622. typedef struct {
  18623. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
  18624. /** unique id identifying the VDEV, generated by the caller */
  18625. A_UINT32 vdev_id;
  18626. /** Station DTIM Power Save method as defined above */
  18627. A_UINT32 dtim_pwrsave_method;
  18628. /** DTIM PS value. Contents depends on the method */
  18629. A_UINT32 value;
  18630. /** Modulated DTIM value */
  18631. A_UINT32 MaxLIModulatedDTIM;
  18632. } wmi_sta_dtim_ps_method_cmd_fixed_param;
  18633. /*
  18634. * For Station UAPSD Auto Trigger feature, the Firmware monitors the
  18635. * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
  18636. * If there is no uplink/download for the specified service interval (field service_interval),
  18637. * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
  18638. * specified in the UP (field user_priority).
  18639. * Firmware also monitors the responses for these QOS-NULL triggers.
  18640. * If the peer does not have any delivery frames, it will respond with
  18641. * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
  18642. * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
  18643. * are unused and should be set to 0.
  18644. * When service_interval is 0, then the firmware will not send any trigger frames. This is for
  18645. * certain host-based implementations that don't want this firmware offload.
  18646. * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
  18647. * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
  18648. * and rest of the AC default to 300 ms.
  18649. *
  18650. * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
  18651. * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
  18652. * the more advanced monitoring method.
  18653. * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
  18654. * suspend interval (field suspend_interval), firmware will change its auto trigger interval
  18655. * to delay interval (field delay_interval). This way, when there is no traffic, the station
  18656. * will save more power by waking up less and sending less trigger frames.
  18657. * The (service_interval < suspend_interval) and (service_interval < delay_interval).
  18658. * If this variable auto trigger is not required, then the suspend_interval and delay_interval
  18659. * should be 0.
  18660. */
  18661. typedef struct {
  18662. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
  18663. /** WMM Access category from 0 to 3 */
  18664. A_UINT32 wmm_ac;
  18665. /** User priority to use in trigger frames. It is the TID
  18666. * value. This field needs to be specified and may not be
  18667. * equivalent to AC since some implementation may use the TSPEC
  18668. * to enable UAPSD and negotiate a particular user priority. */
  18669. A_UINT32 user_priority;
  18670. /** service interval in ms */
  18671. A_UINT32 service_interval;
  18672. /** Suspend interval in ms */
  18673. A_UINT32 suspend_interval;
  18674. /** delay interval in ms */
  18675. A_UINT32 delay_interval;
  18676. } wmi_sta_uapsd_auto_trig_param;
  18677. typedef struct {
  18678. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
  18679. /** unique id identifying the VDEV, generated by the caller */
  18680. A_UINT32 vdev_id;
  18681. /** peer mac address */
  18682. wmi_mac_addr peer_macaddr;
  18683. /** Number of AC to specify */
  18684. A_UINT32 num_ac;
  18685. /*
  18686. * Following this struct is the TLV:
  18687. * wmi_sta_uapsd_auto_trig_param ac_param[]; <-- Variable number of AC parameters (defined by field num_ac)
  18688. */
  18689. } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
  18690. /** mimo powersave state */
  18691. #define WMI_PEER_MIMO_PS_STATE 0x1
  18692. /** enable/disable AMPDU . initial value (enabled) */
  18693. #define WMI_PEER_AMPDU 0x2
  18694. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  18695. #define WMI_PEER_AUTHORIZE 0x3
  18696. /** peer channel bandwidth */
  18697. #define WMI_PEER_CHWIDTH 0x4
  18698. /** peer NSS */
  18699. #define WMI_PEER_NSS 0x5
  18700. /** USE 4 ADDR */
  18701. #define WMI_PEER_USE_4ADDR 0x6
  18702. /* set group membership status */
  18703. #define WMI_PEER_MEMBERSHIP 0x7
  18704. #define WMI_PEER_USERPOS 0x8
  18705. /*
  18706. * A critical high-level protocol is being used with this peer. Target
  18707. * should take appropriate measures (if possible) to ensure more
  18708. * reliable link with minimal latency. This *may* include modifying the
  18709. * station power save policy, enabling more RX chains, increased
  18710. * priority of channel scheduling, etc.
  18711. *
  18712. * NOTE: This parameter should only be considered a hint as specific
  18713. * behavior will depend on many factors including current network load
  18714. * and vdev/peer configuration.
  18715. *
  18716. * For STA VDEV this peer corresponds to the AP's BSS peer.
  18717. * For AP VDEV this peer corresponds to the remote peer STA.
  18718. */
  18719. #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
  18720. /* set Tx failure count threshold for the peer - Currently unused */
  18721. #define WMI_PEER_TX_FAIL_CNT_THR 0xA
  18722. /* Enable H/W retry and Enable H/W Send CTS2S before Data */
  18723. #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
  18724. /* Set peer advertised IBSS atim window length */
  18725. #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
  18726. /** peer phy mode */
  18727. #define WMI_PEER_PHYMODE 0xD
  18728. /** Use FIXED Pwr */
  18729. #define WMI_PEER_USE_FIXED_PWR 0xE
  18730. /** Set peer fixed rate
  18731. * The top nibble is used to select which format to use for encoding
  18732. * the rate specification: 0xVXXXXXXX
  18733. * If V == 0b0000: format is same as before: 0x000000RR
  18734. * If V == 0b0001: format is: 0x1000RRRR.
  18735. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  18736. * The host shall use the new V1 format (and set V = 0x1) if the target
  18737. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  18738. * system is configured with Nss > 4 (either at compile time within the
  18739. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  18740. * by the target).
  18741. */
  18742. #define WMI_PEER_PARAM_FIXED_RATE 0xF
  18743. /** Allowlist peer TIDs */
  18744. #define WMI_PEER_SET_MU_ALLOWLIST 0x10
  18745. /* retain definition of deprecated prior name, for backwards compatibility */
  18746. #define WMI_PEER_SET_MU_WHITELIST WMI_PEER_SET_MU_ALLOWLIST
  18747. /** Set peer max tx rate (MCS) in adaptive rate ctrl */
  18748. #define WMI_PEER_SET_MAX_TX_RATE 0x11
  18749. /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
  18750. #define WMI_PEER_SET_MIN_TX_RATE 0x12
  18751. /**
  18752. * default ring routing for peer data packets,
  18753. * param_value = bit 0 for hash based routing enabled or not
  18754. * (value 1 is enabled, value 0 is disabled)
  18755. * bits 1:5 are for ring 32 (i.e. ring id value
  18756. * selected from 0 to 31 values)
  18757. * bits 6:7 are for LMAC/peer based routing.
  18758. * bit 8 for peer based ring selection enabled or not
  18759. * (value 1 is enabled, value 0 is disabled
  18760. * bits 9-15 are valid when bit 8 is set to 1)
  18761. * bit 9 is for ring selection enabled for filter-pass
  18762. * unicast or not (value 1 is enabled, value 0 is disabled)
  18763. * bit 10 is for ring selection enabled for filter-pass
  18764. * mcast or not (value 1 is enabled, value 0 is disabled)
  18765. * bit 11 is for ring selection enabled for filter-pass
  18766. * BAR or not (value 1 is enabled, value 0 is disabled)
  18767. * bit 12-14 is for source ring selection value
  18768. * (value 0 for wbm2rxdma buf ring,
  18769. * value 1 for fw2rxdma buf ring,
  18770. * value 2 for sw2rxdma buf ring,
  18771. * value 3 for no buf ring,
  18772. * value 4 for sw2rxdma_exception buf ring,
  18773. * value 5 for fw2rxdma buf ring)
  18774. * bit 15-17 is for destination ring selection value
  18775. * (value 0 for wbm release ring,
  18776. * value 1 for rxdma2fw ring,
  18777. * value 2 for rxdma2sw ring,
  18778. * value 3 for rxdma2reo ring,
  18779. * value 4 for rxdma2fw_pmac1_ring,
  18780. * value 5 for rxdma2reo_remote0_ring,
  18781. * value 6 for rxdma2reo_remote1_ring)
  18782. */
  18783. #define WMI_PEER_HASH_BASED_ROUTING_GET(value32) WMI_GET_BITS(value32, 0x0, 1)
  18784. #define WMI_PEER_ROUTING_RING_ID_GET(value32) WMI_GET_BITS(value32, 0x1, 5)
  18785. #define WMI_PEER_LMAC_BASED_ROUTING_GET(value32) WMI_GET_BITS(value32, 0x6, 2)
  18786. #define WMI_PEER_BASED_RING_SELECTION_GET(value32) WMI_GET_BITS(value32, 0x8, 1)
  18787. #define WMI_PEER_FILTER_PASS_UNICAST_GET(value32) WMI_GET_BITS(value32, 0x9, 1)
  18788. #define WMI_PEER_FILTER_PASS_MCAST_GET(value32) WMI_GET_BITS(value32, 0xA, 1)
  18789. #define WMI_PEER_FILTER_PASS_BAR_GET(value32) WMI_GET_BITS(value32, 0xB, 1)
  18790. #define WMI_PEER_FILTER_PASS_SRC_RING_VAL_GET(value32) WMI_GET_BITS(value32, 0xC, 3)
  18791. #define WMI_PEER_FILTER_PASS_DEST_RING_VAL_GET(value32) WMI_GET_BITS(value32, 0xF, 3)
  18792. #define WMI_PEER_SET_DEFAULT_ROUTING 0x13
  18793. /* peer NSS for VHT160 - Extended NSS support */
  18794. #define WMI_PEER_NSS_VHT160 0x14
  18795. /* peer NSS for VHT160 - Extended NSS support */
  18796. #define WMI_PEER_NSS_VHT80_80 0x15
  18797. /* Peer SU TXBF sounding interval */
  18798. #define WMI_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL 0x16
  18799. /* Peer MU TXBF sounding interval */
  18800. #define WMI_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL 0x17
  18801. /* Peer TXBF sounding enable or disable */
  18802. #define WMI_PEER_PARAM_TXBF_SOUNDING_ENABLE 0x18
  18803. /* Per peer 11ax OFDMA enable or disable */
  18804. #define WMI_PEER_PARAM_OFDMA_ENABLE 0x19
  18805. /* Per peer 11ax/11ac MU enable or disable */
  18806. #define WMI_PEER_PARAM_MU_ENABLE 0x1a
  18807. /** Set peer fixed rate used in UL Trigger
  18808. * The top nibble is used to select which format to use for encoding
  18809. * the rate specification: 0xVXXXXXXX, V must be 1 for this parameter.
  18810. * If V == 0b0001: format is: 0x1000RRRR.
  18811. * ("RRRR" rate code already has those preamble bits,
  18812. * which can specify EHT or HE)
  18813. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  18814. *
  18815. * This parameter controls the UL OFDMA and UL MU-MIMO peer fixed rate.
  18816. */
  18817. #define WMI_PEER_PARAM_UL_FIXED_RATE 0x1b
  18818. /** send specific OMI to peer via QoS-null frame
  18819. * param_value = follow 11ax spec definition
  18820. * bit0:VHT(1), bit1:HE(1), bit2-31:A-Control
  18821. */
  18822. #define WMI_PEER_PARAM_XMIT_OMI 0x1c
  18823. #define WMI_PEER_RARAM_XMIT_OMI WMI_PEER_PARAM_XMIT_OMI /* alias due to prior typo */
  18824. /* Disable burst and assist */
  18825. #define WMI_PEER_PARAM_DISABLE_AGGRESSIVE_TX 0x1d
  18826. /* Enable 11r FT Roaming */
  18827. #define WMI_PEER_PARAM_ENABLE_FT 0x1e
  18828. /* update peer flag for ptk 4 way handshake */
  18829. #define WMI_PEER_PARAM_NEED_PTK_4_WAY 0x1f
  18830. /* update peer flag for gtk 2 way handshake */
  18831. #define WMI_PEER_PARAM_NEED_GTK_2_WAY 0x20
  18832. /* update peer flag for M4 sent */
  18833. #define WMI_PEER_PARAM_M4_SENT 0x21
  18834. /* Per peer MISC stats enable or disable */
  18835. #define WMI_PEER_PARAM_MISC_STATS_ENABLE 0x22
  18836. /* Per peer FW congestion enable or disable:
  18837. * A parameter value of 1 will disable FW tx congestion control for the peer,
  18838. * a parameter value 0f 0 will enable FW tx congestion control for the peer.
  18839. */
  18840. #define WMI_PEER_PARAM_FW_CONGESTION_DISABLE 0x23
  18841. /* Per peer dynamically change max Nss limit in supported tx modes.
  18842. * Whereas WMI_PEER_NSS cmd needs to reset PER tables and start peer rate
  18843. * control again.
  18844. * Currently supported only for 2x2 case, and also only supports setting
  18845. * all NSS up to current NSS.
  18846. * Mask is used so we can extend in future if needed.
  18847. *
  18848. * Expected values in bits:
  18849. * 00: Use autorate
  18850. * 01: Enable only 1SS
  18851. * 10: Enable only 2SS
  18852. * 11: Disable NSS clamp feature or Fallback to autorate
  18853. */
  18854. #define WMI_PEER_PARAM_DYN_NSS_EN_MASK 0x24
  18855. /* Per peer enable/disable RTS/CTS for unicast management frames.
  18856. * Enabling RTS/CTS only applicable after association process of the peer.
  18857. * Currently supported for spruce(2x2) chipset.
  18858. * Expected values:
  18859. * 0 : Disable RTS/CTS for unicast management frames.
  18860. * 1 : Enable RTS/CTS for unicast management frames.
  18861. */
  18862. #define WMI_PEER_PARAM_EN_RTSCTS_FOR_UNICAST_MGMT 0x25
  18863. /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
  18864. #define WMI_PEER_MIMO_PS_NONE 0x0
  18865. #define WMI_PEER_MIMO_PS_STATIC 0x1
  18866. #define WMI_PEER_MIMO_PS_DYNAMIC 0x2
  18867. /*
  18868. * Each bit indicates one 20 MHz subchannel is punctured or not.
  18869. * A bit in the bitmap is set to 1 to indicate that the corresponding 20 MHz
  18870. * subchannel is not punctured and is set to 0 to indicate that it is punctured.
  18871. */
  18872. #define WMI_PEER_PUNCTURE_20MHZ_BITMAP 0x26
  18873. #define WMI_PEER_CHWIDTH_PUNCTURE_BITMAP_GET_CHWIDTH(value32) WMI_GET_BITS(value32, 0x0, 8)
  18874. #define WMI_PEER_CHWIDTH_PUNCTURE_BITMAP_GET_PUNCTURE_BMAP(value32) WMI_GET_BITS(value32, 0x8, 16)
  18875. /*
  18876. * peer channel bandwidth and puncture_bitmap
  18877. * BIT 0-7 - Peer channel width
  18878. * This bitfield holds a wmi_channel_width enum value.
  18879. * BIT 8-23 - Peer Puncture bitmap where each bit indicates whether
  18880. * a 20 MHz BW is punctured.
  18881. * The variable should be read from left, LSb (bit 8) will
  18882. * represent the lowest-frequency 20 MHz portion.
  18883. * Bit value: 0 - 20 MHz channel is punctured, 1 - not punctured
  18884. */
  18885. #define WMI_PEER_CHWIDTH_PUNCTURE_20MHZ_BITMAP 0x27
  18886. #define WMI_PEER_SET_TX_POWER 0x28
  18887. #define WMI_PEER_FT_ROAMING_PEER_UPDATE 0x29
  18888. #define WMI_PEER_PARAM_DMS_SUPPORT 0x2A
  18889. #define WMI_PEER_PARAM_UL_OFDMA_RTD 0x2B
  18890. typedef struct {
  18891. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
  18892. /** unique id identifying the VDEV, generated by the caller */
  18893. A_UINT32 vdev_id;
  18894. /** peer MAC address */
  18895. wmi_mac_addr peer_macaddr;
  18896. /** parameter id */
  18897. A_UINT32 param_id;
  18898. /** parameter value */
  18899. A_UINT32 param_value;
  18900. } wmi_peer_set_param_cmd_fixed_param;
  18901. typedef union {
  18902. /*
  18903. * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
  18904. * by the target or a little-endian host.
  18905. * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
  18906. * macros on the A_UINT32 "value" field.
  18907. */
  18908. struct {
  18909. A_UINT16 mode; /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
  18910. A_UINT16 tx_rate; /* see per-mode specs below */
  18911. };
  18912. A_UINT32 value; /* for use by big-endian host */
  18913. } wmi_peer_max_min_tx_rate;
  18914. /*
  18915. * Any access to the mode/tx_rate in an big endian system should use
  18916. * the below Macros on the wmi_peer_max_min_tx_rate.value field.
  18917. */
  18918. #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
  18919. #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
  18920. #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
  18921. #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
  18922. /* CCK max/min tx Rate description
  18923. * tx_rate = 0: 1 Mbps
  18924. * tx_rate = 1: 2 Mbps
  18925. * tx_rate = 2: 5.5 Mbps
  18926. * tx_rate = 3: 11 Mbps
  18927. * tx_rate = else: invalid
  18928. */
  18929. enum {
  18930. WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate available */
  18931. WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate available */
  18932. WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate available */
  18933. WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate available */
  18934. WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
  18935. };
  18936. /* OFDM max/min tx Rate description
  18937. * tx_rate = 0: 6 Mbps
  18938. * tx_rate = 1: 9 Mbps
  18939. * tx_rate = 2: 12 Mbps
  18940. * tx_rate = 3: 18 Mbps
  18941. * tx_rate = 4: 24 Mbps
  18942. * tx_rate = 5: 32 Mbps
  18943. * tx_rate = 6: 48 Mbps
  18944. * tx_rate = 7: 54 Mbps
  18945. * tx_rate = else: invalid
  18946. */
  18947. enum {
  18948. WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate available */
  18949. WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate available */
  18950. WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate available */
  18951. WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate available */
  18952. WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate available */
  18953. WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate available */
  18954. WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate available */
  18955. WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate available */
  18956. WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
  18957. };
  18958. /* HT max/min tx rate description
  18959. * tx_rate = 0~7 : MCS Rate 0~7
  18960. * tx_rate=else : invalid.
  18961. */
  18962. #define WMI_MAX_HT_TX_MCS 0x07
  18963. /* VHT max/min tx rate description
  18964. * tx_rate = 0~9 : MCS Rate 0~9
  18965. * tx_rate=else : invalid.
  18966. */
  18967. #define WMI_MAX_VHT_TX_MCS 0x09
  18968. #define MAX_SUPPORTED_RATES 128
  18969. typedef struct {
  18970. /** total number of rates */
  18971. A_UINT32 num_rates;
  18972. /**
  18973. * rates (each 8bit value) packed into a 32 bit word.
  18974. * the rates are filled from least significant byte to most
  18975. * significant byte.
  18976. */
  18977. A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
  18978. } wmi_rate_set;
  18979. /* NOTE: It would bea good idea to represent the Tx MCS
  18980. * info in one word and Rx in another word. This is split
  18981. * into multiple words for convenience
  18982. */
  18983. typedef struct {
  18984. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
  18985. A_UINT32 rx_max_rate; /* Max Rx data rate */
  18986. A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
  18987. A_UINT32 tx_max_rate; /* Max Tx data rate */
  18988. /*
  18989. * bit [15:0] indicates MCS 0 to 9
  18990. * bit [23:16] indicates MCS 10 & 11
  18991. * bit [24] indicates whether MCS 10 & 11 is notified in bit [23:16]
  18992. */
  18993. A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
  18994. A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
  18995. } wmi_vht_rate_set;
  18996. /* NOTE: It would bea good idea to represent the Tx MCS
  18997. * info in one word and Rx in another word. This is split
  18998. * into multiple words for convenience
  18999. * 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
  19000. */
  19001. typedef struct {
  19002. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_he_rate_set */
  19003. /* HE Supported MCS Set field Rx
  19004. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  19005. * value 0 - MCS 0-7 enabled for this NSS
  19006. * value 1 - MCS 0-9 enabled for this NSS
  19007. * value 2 - MCS 0-11 enabled for this NSS
  19008. * value 3 - NSS disabled
  19009. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  19010. */
  19011. A_UINT32 rx_mcs_set; /* Negotiated RX HE rates (i.e. rate this node can RX from peer)*/
  19012. /* HE Supported MCS Set field Tx
  19013. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  19014. * value 0 - MCS 0-7 enabled for this NSS
  19015. * value 1 - MCS 0-9 enabled for this NSS
  19016. * value 2 - MCS 0-11 enabled for this NSS
  19017. * value 3 - NSS disabled
  19018. * WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  19019. *
  19020. * - 8 bits x 2 are used for each Nss value for 2 categories of bandwidths,
  19021. * to indicate whether MCS 12 and 13 are enabled.
  19022. * Bits [16:23] used for checking if MCS 12/13 is enabled for a
  19023. * particular NSS (BW <= 80MHz)
  19024. * Bits [24:31] used for checking if MCS 12/13 is enabled for a
  19025. * particular NSS (BW > 80MHz)
  19026. * The WMI_HE_EXTRA_MCS_SS_[GET,SET] macros can be used for accessing
  19027. * these bit-fields.
  19028. */
  19029. A_UINT32 tx_mcs_set; /* Negotiated TX HE rates(i.e. rate this node can TX to peer) */
  19030. } wmi_he_rate_set;
  19031. typedef struct {
  19032. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_eht_rate_set */
  19033. /*
  19034. * B0-B3 indicates max NSS that supports mcs 0-7
  19035. * B4-B7 indicates max NSS that supports mcs 8-9
  19036. * B8-B11 indicates max NSS that supports mcs 10-11
  19037. * B12-B15 indicates max NSS that supports mcs 12-13
  19038. * B16-B31 reserved
  19039. */
  19040. A_UINT32 rx_mcs_set; /* Rx max NSS set */
  19041. A_UINT32 tx_mcs_set; /* Tx max NSS set */
  19042. } wmi_eht_rate_set;
  19043. /*
  19044. * IMPORTANT: Make sure the bit definitions here are consistent
  19045. * with the ni_flags definitions in wlan_peer.h
  19046. */
  19047. #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
  19048. #define WMI_PEER_QOS 0x00000002 /* QoS enabled */
  19049. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
  19050. #define WMI_PEER_GK_INST 0x00000008 /* group Key Installed */
  19051. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
  19052. #define WMI_PEER_PRIV 0x00000020 /* Encryption Enabled */
  19053. #define WMI_PEER_PK_INST 0x00000040 /* Pairwise Key Installed */
  19054. #define WMI_PEER_TKIP_CM_ENABLED 0x00000080 /* TKIP CounterMeasures */
  19055. #define WMI_PEER_SW_DEMIC_FRAG 0x00000100 /* S/W Demic of Frag Train */
  19056. #define WMI_PEER_CCX_ENABLED 0x00000200 /* CCX enabled */
  19057. #define WMI_PEER_HE 0x00000400 /* HE Enabled */
  19058. #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
  19059. #define WMI_PEER_HT 0x00001000 /* HT enabled */
  19060. #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
  19061. #define WMI_PEER_INTER_BSS_PEER 0x00004000 /* Inter BSS peer */
  19062. #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
  19063. #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
  19064. #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
  19065. #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
  19066. #define WMI_PEER_DIS_MIMOPS 0x00080000 /* MIMO PS DISABLED */
  19067. #define WMI_PEER_SPATIAL_EXP 0x00100000 /* Enable spatial expansion for
  19068. * single stream rates to avoid
  19069. * unintentional beamforming */
  19070. #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
  19071. #define WMI_PEER_TWT_REQ 0x00400000 /* TWT Requester Support bit in Extended Capabilities element */
  19072. #define WMI_PEER_TWT_RESP 0x00800000 /* TWT Responder Support bit in Extended Capabilities element */
  19073. #define WMI_PEER_MULTI_BSSID 0x01000000 /* Multiple BSSID Support bit in Extended Capabilities element */
  19074. #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
  19075. #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
  19076. #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
  19077. #define WMI_PEER_F_PS_PRESEND_REQUIRED 0x10000000 /* Use this flag to avoid calling powersave API when STA is awake */
  19078. #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
  19079. #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
  19080. #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
  19081. /** define for peer_flags_ext */
  19082. #define WMI_PEER_EXT_EHT 0x00000001 /* EHT enabled */
  19083. #define WMI_PEER_EXT_320MHZ 0x00000002 /* 320Mhz enabled */
  19084. #define WMI_PEER_EXT_DMS_CAPABLE 0x00000004
  19085. #define WMI_PEER_EXT_HE_CAPS_6GHZ_VALID 0x00000008 /* param he_caps_6ghz is valid or not */
  19086. #define WMI_PEER_EXT_IS_QUALCOMM_NODE 0x00000010 /* Indicates if the peer connecting is a qualcomm node */
  19087. #define WMI_PEER_EXT_IS_MESH_NODE 0x00000020 /* Indicates if the peer connecting is a mesh node */
  19088. #define WMI_PEER_EXT_F_CRIT_PROTO_HINT_ENABLED 0x40000000
  19089. /**
  19090. * Peer rate capabilities.
  19091. *
  19092. * This is of interest to the ratecontrol
  19093. * module which resides in the firmware. The bit definitions are
  19094. * consistent with that defined in if_athrate.c.
  19095. *
  19096. * @todo
  19097. * Move this to a common header file later so there is no need to
  19098. * duplicate the definitions or maintain consistency.
  19099. */
  19100. #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
  19101. #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
  19102. #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  19103. #define WMI_RC_HT_FLAG 0x08 /* HT */
  19104. #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  19105. #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  19106. #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
  19107. #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  19108. #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  19109. #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  19110. #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
  19111. #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  19112. enum WMI_PEER_STA_TYPE {
  19113. WMI_PEER_STA_TYPE_INVALID = 0, /* Invalid type*/
  19114. WMI_PEER_STA_TYPE_ONLY_STAVDEV = 1, /* AP has only STAVDEV and APVDEV is not present on any radio */
  19115. WMI_PEER_STA_TYPE_APVDEV_ON_OTHER_RADIO = 2, /* AP has STAVDEV on one radio and APVDEV on other radios */
  19116. WMI_PEER_STA_TYPE_FH_APVDEV_ON_SAME_RADIO = 3, /* AP has STAVDEV and APVDEV on same radio. During STAVDEV connection,
  19117. * no repeater client is connected with this repeater APVDEV
  19118. */
  19119. WMI_PEER_STA_TYPE_BH_APVDEV_ON_SAME_RADIO = 4, /* AP has STAVDEV and APVDEV on same radio. During STAVDEV connection,
  19120. * at least one repeater client is connected with this repeater APVDEV
  19121. * (daisy chain config)
  19122. */
  19123. };
  19124. #define WMI_PEER_STA_TYPE_GET(dword) WMI_GET_BITS(dword, 0, 8)
  19125. #define WMI_PEER_STA_TYPE_SET(dword, value) WMI_SET_BITS(dword, 0, 8, value)
  19126. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS (0)
  19127. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_MASK (0x1 << WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS)
  19128. #define WMI_PEER_ASSOC_SET_BSS_MAX_IDLE_OPTION(_dword, _val) \
  19129. WMI_SET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS, 1, _val)
  19130. #define WMI_PEER_ASSOC_GET_BSS_MAX_IDLE_OPTION(_dword) \
  19131. WMI_GET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS, 1)
  19132. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS (16)
  19133. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_MASK (0xFFFF << WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS)
  19134. #define WMI_PEER_ASSOC_SET_BSS_MAX_IDLE_PERIOD(_dword, _val) \
  19135. WMI_SET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS, 16, _val)
  19136. #define WMI_PEER_ASSOC_GET_BSS_MAX_IDLE_PERIOD(_dword) \
  19137. WMI_GET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS, 16)
  19138. typedef struct {
  19139. A_UINT32 tlv_header; /** TLV tag (MITLV_TAG_STRUC_wmi_peer_assoc_mlo_partner_link_params) and len */
  19140. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller. Set to 0xFFFFFFFF if no vdev is allocated. */
  19141. A_UINT32 hw_mld_link_id; /** Unique link id across SOCs, got as part of QMI handshake. */
  19142. wmi_mlo_flags mlo_flags; /** MLO flags */
  19143. A_UINT32 logical_link_index; /** Unique index for links of the mlo. Starts with Zero */
  19144. A_UINT32 ieee_link_id; /*link id in the 802.11 frames*/
  19145. wmi_mac_addr bss_id;
  19146. wmi_channel wmi_chan;
  19147. wmi_mac_addr self_mac;
  19148. } wmi_peer_assoc_mlo_partner_link_params;
  19149. /* This TLV structure used to pass mlo Parameters on peer assoc, only apply for mlo-peers */
  19150. typedef struct {
  19151. A_UINT32 tlv_header; /** TLV tag and len; */
  19152. /** MLO flags */
  19153. wmi_mlo_flags mlo_flags;
  19154. /** MLD MAC address */
  19155. wmi_mac_addr mld_macaddr;
  19156. /** Unique index for links of the mlo. Starts with Zero */
  19157. A_UINT32 logical_link_index;
  19158. /** ML Peer ID
  19159. * In WIN systems, mld_peer_id is generated by Host.
  19160. * In MCL systems, mld_peer_id will be set to invalid peer id.
  19161. */
  19162. A_UINT32 mld_peer_id;
  19163. /** Link-ID of the AP to which STA is associated */
  19164. A_UINT32 ieee_link_id;
  19165. /** eMLSR transition timeout in microseconds */
  19166. A_UINT32 emlsr_trans_timeout_us;
  19167. /** eMLSR transition delay in microseconds */
  19168. A_UINT32 emlsr_trans_delay_us;
  19169. /** eMLSR padding delay in microseconds */
  19170. A_UINT32 emlsr_padding_delay_us;
  19171. union {
  19172. /** Medium Synchronization Duration field in units of 32 microseconds */
  19173. A_UINT32 msd_dur_subfield;
  19174. /** DEPRECATED - DO NOT USE.
  19175. * Medium Synchronization Duration in microseconds */
  19176. A_UINT32 msd_dur_us;
  19177. };
  19178. /** Medium Synchronization OFDM ED Threshold */
  19179. A_UINT32 msd_ofdm_ed_thr;
  19180. /** Medium Synchronization Max Num of TXOPs */
  19181. A_UINT32 msd_max_num_txops;
  19182. /** max_num_simultaneous_links:
  19183. * The maximum number of affiliated STAs in the non-AP MLD that
  19184. * support simultaneous transmission or reception of frames.
  19185. */
  19186. A_UINT32 max_num_simultaneous_links;
  19187. /** NSTR indication bitmap received in assoc req */
  19188. A_UINT32 nstr_indication_bitmap;
  19189. /** max num of active links recommended by AP or applications */
  19190. A_UINT32 recommended_max_num_simultaneous_links;
  19191. } wmi_peer_assoc_mlo_params;
  19192. typedef struct {
  19193. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_tid_to_link_map */
  19194. A_UINT32 tlv_header;
  19195. /**
  19196. * A_UINT32
  19197. * WMI_TID_TO_LINK_MAP_TID_NUM_GET / WMI_TID_TO_LINK_MAP_TID_NUM_SET
  19198. * tid_num:5,
  19199. *
  19200. * WMI_TID_TO_LINK_MAP_DIR_GET / WMI_TID_TO_LINK_MAP_DIR_SET
  19201. * dir:2, // 0 - DL, 1 - UL, 2 - BiDi
  19202. *
  19203. * WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET /
  19204. * WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET
  19205. * default_link_mapping:1, // If this is set to 1, ignore
  19206. * // link_mapping_mask for the specific tid
  19207. *
  19208. * WMI_TID_TO_LINK_MAP_LINK_MASK_GET / WMI_TID_TO_LINK_MAP_LINK_MASK_SET
  19209. * link_mapping_mask:16,
  19210. *
  19211. * rsvd:8;
  19212. */
  19213. A_UINT32 tid_to_link_map_info;
  19214. } wmi_peer_assoc_tid_to_link_map;
  19215. #define WMI_PDEV_MESH_RX_FILTER_GET(enable) WMI_GET_BITS(enable,0,1)
  19216. #define WMI_PDEV_MESH_RX_FILTER_SET(enable,value) WMI_SET_BITS(enable,0,1,value)
  19217. typedef struct {
  19218. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_mesh_rx_filter_enable_fixed_param **/
  19219. A_UINT32 tlv_header;
  19220. A_UINT32 pdev_id;
  19221. union {
  19222. struct {
  19223. A_UINT32 enable: 1, /** denotes enable/disable mesh rx filter, refer to WMI_PDEV_MESH_RX_FILTER_GET/SET macros */
  19224. reserved: 31;
  19225. };
  19226. A_UINT32 enable_word32;
  19227. };
  19228. /** Mac_Add for the RX filter **/
  19229. wmi_mac_addr link_macaddr;
  19230. } wmi_pdev_mesh_rx_filter_enable_fixed_param;
  19231. /*
  19232. * PEER assoc_flags for assoc complete:
  19233. * Bit 0: Set for peer data flush
  19234. */
  19235. #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA 0x00000001
  19236. #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA_GET(assoc_flags) WMI_GET_BITS(assoc_flags, 0, 1)
  19237. #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA_SET(assoc_flags, value) WMI_GET_BITS(assoc_flags, 0, 1, value)
  19238. typedef struct {
  19239. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
  19240. /** peer MAC address */
  19241. wmi_mac_addr peer_macaddr;
  19242. /** VDEV id */
  19243. A_UINT32 vdev_id;
  19244. /** assoc = 1 reassoc = 0 */
  19245. A_UINT32 peer_new_assoc;
  19246. /** peer associd (16 bits) */
  19247. A_UINT32 peer_associd;
  19248. /** peer station flags: see definition above */
  19249. A_UINT32 peer_flags;
  19250. /** negotiated capabilities (lower 16 bits)*/
  19251. A_UINT32 peer_caps;
  19252. /** Listen interval */
  19253. A_UINT32 peer_listen_intval;
  19254. /** HT capabilities of the peer */
  19255. A_UINT32 peer_ht_caps;
  19256. /** maximum rx A-MPDU length */
  19257. A_UINT32 peer_max_mpdu;
  19258. /** mpdu density of the peer in usec(0 to 16) */
  19259. A_UINT32 peer_mpdu_density;
  19260. /** peer rate capabilities see flags above */
  19261. A_UINT32 peer_rate_caps;
  19262. /** num spatial streams */
  19263. A_UINT32 peer_nss;
  19264. /** VHT capabilities of the peer */
  19265. A_UINT32 peer_vht_caps;
  19266. /** phy mode */
  19267. A_UINT32 peer_phymode;
  19268. /** HT Operation Element of the peer. Five bytes packed in 2
  19269. * INT32 array and filled from lsb to msb.
  19270. * Note that the size of array peer_ht_info[] cannotbe changed
  19271. * without breaking WMI Compatibility. */
  19272. A_UINT32 peer_ht_info[2];
  19273. /** total number of negotiated legacy rate set. Also the sizeof
  19274. * peer_legacy_rates[] */
  19275. A_UINT32 num_peer_legacy_rates;
  19276. /** total number of negotiated ht rate set. Also the sizeof
  19277. * peer_ht_rates[] */
  19278. A_UINT32 num_peer_ht_rates;
  19279. /**
  19280. * Bitmap providing the mapping of bandwidths to max Rx NSS for this peer
  19281. * in VHT160 / VHT80+80 Mode.
  19282. * As per the New IEEE 802.11 Update, the AP & Peer could advertise and
  19283. * handshake with the Max Rx NSS differing for different bandwidths
  19284. * instead of a single max Rx NSS Value.
  19285. * Some QCA chipsets have to advertise a different max Rx NSS value for
  19286. * 160 MHz and 80MHz.
  19287. *
  19288. * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
  19289. * bit[5:3] : Represents value of Rx NSS for VHT 80_80 MHz -
  19290. * Extended NSS support
  19291. * bit[30:6]: Reserved
  19292. * bit[31] : MSB(0/1): 1 in case of valid data sent from Host
  19293. */
  19294. A_UINT32 peer_bw_rxnss_override;
  19295. /* 802.11ax capabilities */
  19296. wmi_ppe_threshold peer_ppet;
  19297. A_UINT32 peer_he_cap_info; /* protocol-defined HE / 11ax capability flags */
  19298. A_UINT32 peer_he_ops; /* HE operation contains BSS color */
  19299. A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
  19300. A_UINT32 peer_he_mcs; /* Indicates number of HE MCS TLV present */
  19301. /* 2nd DWORD of 11ax MAC Capabilities */
  19302. A_UINT32 peer_he_cap_info_ext;
  19303. /*
  19304. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  19305. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  19306. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  19307. * bit[4:3] : Indicates support for DL OFDMA
  19308. * Refer to enum WMI_HE_RX_DL_OFDMA_SUPPORT_x
  19309. * bit[6:5] : Indicates support for DL MU-MIMO
  19310. * Refer to enum WMI_HE_RX_DL_MUMIMO_SUPPORT_x
  19311. * bit[31:7] : Reserved
  19312. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  19313. */
  19314. A_UINT32 peer_he_cap_info_internal;
  19315. /* min data rate to be used in Mbps */
  19316. A_UINT32 min_data_rate;
  19317. /** HE 6 GHz Band Capabilities of the peer.
  19318. * (Defined in 9.4.2.261 HE 6 GHz Band Capabilities element in
  19319. * 802.11ax_D5.0.)
  19320. * valid when WMI_PEER_HE is set and WMI_PEER_VHT/HT are not set.
  19321. */
  19322. A_UINT32 peer_he_caps_6ghz;
  19323. /* bit[0-7] : sta_type
  19324. * bit[8-31]: reserved
  19325. * Refer to enum WMI_PEER_STA_TYPE for sta_type values.
  19326. * Refer to WMI_PEER_STA_TYPE_GET/SET macros.
  19327. */
  19328. A_UINT32 sta_type;
  19329. /*
  19330. * @bss_max_idle_option - Parameters exchanged for BSS Max Idle capability.
  19331. * bit 0 : If set, only a protected frame indicates activity.
  19332. * If cleared, either an unprotected or a protected frame
  19333. * indicates activity.
  19334. * Refer to the WMI_PEER_ASSOC_[SET,GET]_BSS_MAX_IDLE_OPTION
  19335. * macros.
  19336. * bit [1:15] : Reserved
  19337. * bit [16:31] : Max idle period in units of 1000 TUs
  19338. * Refer to the WMI_PEER_ASSOC_[SET,GET]_BSS_MAX_IDLE_PERIOD
  19339. * macros.
  19340. */
  19341. A_UINT32 bss_max_idle_option;
  19342. /*
  19343. * Connected AP auth mode values are from WMI_AUTH_ enum.
  19344. * The target shall ignore an auth_mode value of 0 / WMI_AUTH_NONE,
  19345. * due to ambiguity whether a zero value was provided explicitly or
  19346. * simply as a default.
  19347. */
  19348. A_UINT32 auth_mode;
  19349. /* Refer to WMI_PEER_EXT_xxx defs */
  19350. A_UINT32 peer_flags_ext;
  19351. /* 802.11be capabilities and other params */
  19352. A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20Mhz bw puntured */
  19353. /* EHT mac capabilities from BSS beacon EHT cap IE, total WMI_MAX_EHTCAP_MAC_SIZE*A_UINT32 bits */
  19354. A_UINT32 peer_eht_cap_mac[WMI_MAX_EHTCAP_MAC_SIZE];
  19355. /* EHT phy capabilities from BSS beacon EHT cap IE, total WMI_MAX_EHTCAP_PHY_SIZE*A_UINT32 bits */
  19356. A_UINT32 peer_eht_cap_phy[WMI_MAX_EHTCAP_PHY_SIZE];
  19357. A_UINT32 peer_eht_ops;
  19358. wmi_ppe_threshold peer_eht_ppet;
  19359. A_UINT32 assoc_flags;
  19360. /* Following this struct are the TLV's:
  19361. * A_UINT8 peer_legacy_rates[];
  19362. * A_UINT8 peer_ht_rates[];
  19363. * wmi_vht_rate_set peer_vht_rates; <-- VHT capabilities of the peer
  19364. * WMI_he_rate_set_peer_he_rates; <-- HE capabilities of the peer
  19365. * wmi_peer_assoc_mlo_params mlo_params[0,1]; <-- MLO parameters opt. TLV
  19366. * Only present for MLO peers.
  19367. * For non-MLO peers the array length should be 0.
  19368. * wmi_eht_rate_set peer_eht_rates; <-- EHT capabilities of the peer
  19369. * wmi_peer_assoc_mlo_partner_link_params link_info[] <-- partner link info
  19370. * wmi_peer_assoc_tid_to_link_map[] <-- tid to link_map info
  19371. */
  19372. } wmi_peer_assoc_complete_cmd_fixed_param;
  19373. typedef struct {
  19374. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_ap_oper_bw_cmd_fixed_param */
  19375. A_UINT32 vdev_id;
  19376. A_UINT32 ap_phymode; /* contains a WLAN_PHY_MODE value */
  19377. } wmi_vdev_report_ap_oper_bw_cmd_fixed_param;
  19378. /* WDS Entry Flags */
  19379. #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
  19380. typedef struct {
  19381. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
  19382. /** peer MAC address */
  19383. wmi_mac_addr peer_macaddr;
  19384. /** wds MAC addr */
  19385. wmi_mac_addr wds_macaddr;
  19386. /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
  19387. A_UINT32 flags;
  19388. A_UINT32 vdev_id;
  19389. } wmi_peer_add_wds_entry_cmd_fixed_param;
  19390. #define WMI_CHAN_INFO_START_RESP 0
  19391. #define WMI_CHAN_INFO_END_RESP 1
  19392. /* deprecated but maintained as aliases: old names containing typo */
  19393. #define WMI_CHAN_InFO_START_RESP WMI_CHAN_INFO_START_RESP
  19394. #define WMI_CHAN_InFO_END_RESP WMI_CHAN_INFO_END_RESP
  19395. /* end deprecated */
  19396. #define WMI_CHAN_INFO_ENTRY_RESP 2
  19397. typedef struct {
  19398. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
  19399. /** wds MAC addr */
  19400. wmi_mac_addr wds_macaddr;
  19401. A_UINT32 vdev_id;
  19402. } wmi_peer_remove_wds_entry_cmd_fixed_param;
  19403. typedef struct {
  19404. /** peer MAC address */
  19405. wmi_mac_addr peer_macaddr;
  19406. } wmi_peer_q_empty_callback_event;
  19407. /*
  19408. * Command to update an already existing WDS entry. Different address setting
  19409. * combinations are possible.
  19410. *
  19411. * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
  19412. * Valid wds and null peer -> Associated WDS entry flags will be updated.
  19413. * Null wds and Valid peer -> Flags will be updated for all WDS entries behind the peer.
  19414. * Null wds and peer -> Flags will be updated for all WDS entries.
  19415. */
  19416. typedef struct {
  19417. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param */
  19418. /** peer MAC address */
  19419. wmi_mac_addr peer_macaddr;
  19420. /** wds MAC addr */
  19421. wmi_mac_addr wds_macaddr;
  19422. /* Flags associated with WDS entry */
  19423. A_UINT32 flags;
  19424. A_UINT32 vdev_id;
  19425. } wmi_peer_update_wds_entry_cmd_fixed_param;
  19426. /**
  19427. * Channel info WMI event
  19428. */
  19429. typedef struct {
  19430. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
  19431. /** Error code */
  19432. A_UINT32 err_code;
  19433. /** Channel freq */
  19434. A_UINT32 freq;
  19435. /** Read flags */
  19436. A_UINT32 cmd_flags;
  19437. /** Noise Floor value */
  19438. A_UINT32 noise_floor;
  19439. /** rx clear count */
  19440. A_UINT32 rx_clear_count;
  19441. /** cycle count */
  19442. A_UINT32 cycle_count;
  19443. /** channel tx power per range in 0.5dBm steps */
  19444. A_UINT32 chan_tx_pwr_range;
  19445. /** channel tx power per throughput */
  19446. A_UINT32 chan_tx_pwr_tp;
  19447. /** rx frame count (cumulative) */
  19448. A_UINT32 rx_frame_count;
  19449. /** BSS rx cycle count */
  19450. A_UINT32 my_bss_rx_cycle_count;
  19451. /** b-mode data rx time (units are microseconds) */
  19452. A_UINT32 rx_11b_mode_data_duration;
  19453. /** tx frame count */
  19454. A_UINT32 tx_frame_cnt;
  19455. /** mac clock */
  19456. A_UINT32 mac_clk_mhz;
  19457. /** unique id identifying the VDEV */
  19458. A_UINT32 vdev_id;
  19459. /**
  19460. * Noise Floor value for all chain in dBm.
  19461. * If per_chain_noise_floor value is 0 then it should be ignored.
  19462. */
  19463. A_UINT32 per_chain_noise_floor[WMI_MAX_CHAINS];
  19464. /**
  19465. * Following this structure is the optional TLV:
  19466. * struct wmi_scan_blanking_params_info[0/1];
  19467. * struct wmi_cca_busy_subband_info[];
  19468. * Reporting subband CCA busy info in host requested manner.
  19469. */
  19470. } wmi_chan_info_event_fixed_param;
  19471. typedef struct {
  19472. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_cca_busy_subband_info */
  19473. A_UINT32 tlv_header;
  19474. /** rx clear count */
  19475. A_UINT32 rx_clear_count;
  19476. } wmi_cca_busy_subband_info;
  19477. /**
  19478. * The below structure contains parameters related to the scan radio
  19479. * blanking feature
  19480. */
  19481. typedef struct {
  19482. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_blanking_params_info */
  19483. A_UINT32 tlv_header;
  19484. /* scan_radio_blanking_duration:
  19485. * Cumulative scan disabled duration which indicates the total time in
  19486. * micro seconds where rx blanking was enabled on the scan radio due to
  19487. * simultaneous transmissions on the same band in the serving radio.
  19488. */
  19489. A_UINT32 scan_radio_blanking_duration;
  19490. /* scan_radio_blanking_count:
  19491. * Count of the number of times rx blanking was enabled on the scan radio
  19492. * due to simultaneous transmissions on the same band in the serving radio.
  19493. */
  19494. A_UINT32 scan_radio_blanking_count;
  19495. } wmi_scan_blanking_params_info;
  19496. typedef enum {
  19497. /* Blanking feature will be disabled */
  19498. WMI_SCAN_BLANKING_DISABLED = 0,
  19499. /* Blanking enabled only on current operating band */
  19500. WMI_SCAN_BLANKING_ENABLED,
  19501. /*
  19502. * Blanking enabled on both 5GHz and 6GHz bands when scan radio
  19503. * home channel is on either 5GHz or 6GHz bands
  19504. */
  19505. WMI_SCAN_BLANKING_ENABLED_NO_ISOLATION,
  19506. WMI_SCAN_BLANKING_MAX,
  19507. } WMI_SCAN_BLANKING_MODE;
  19508. /**
  19509. * The below three structures are the params used for converting RSSI
  19510. * from dB to dBm units.
  19511. */
  19512. typedef struct {
  19513. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_params_info */
  19514. /* Current operating bandwidth as per wmi_channel_width */
  19515. A_UINT32 curr_bw;
  19516. /* Current rx chainmask */
  19517. A_UINT32 curr_rx_chainmask;
  19518. /* 3 Bytes of xbar_config are used for RF to BB mapping*/
  19519. /* Samples of xbar_config,
  19520. * If xbar_config is 0xFAC688(hex):
  19521. * RF chains 0-7 are connected to BB chains 0-7
  19522. * here,
  19523. * bits 0 to 2 = 0, maps BB chain 0 for RF chain 0
  19524. * bits 3 to 5 = 1, maps BB chain 1 for RF chain 1
  19525. * bits 6 to 8 = 2, maps BB chain 2 for RF chain 2
  19526. * bits 9 to 11 = 3, maps BB chain 3 for RF chain 3
  19527. * bits 12 to 14 = 4, maps BB chain 4 for RF chain 4
  19528. * bits 15 to 17 = 5, maps BB chain 5 for RF chain 5
  19529. * bits 18 to 20 = 6, maps BB chain 6 for RF chain 6
  19530. * bits 21 to 23 = 7, maps BB chain 7 for RF chain 7
  19531. *
  19532. * If xbar_config is 0x688FAC(hex):
  19533. * RF chains 0-3 are connected to BB chains 4-7
  19534. * RF chains 4-7 are connected to BB chains 0-3
  19535. * here,
  19536. * bits 0 to 2 = 4, maps BB chain 4 for RF chain 0
  19537. * bits 3 to 5 = 5, maps BB chain 5 for RF chain 1
  19538. * bits 6 to 8 = 6, maps BB chain 6 for RF chain 2
  19539. * bits 9 to 11 = 7, maps BB chain 7 for RF chain 3
  19540. * bits 12 to 14 = 0, maps BB chain 0 for RF chain 4
  19541. * bits 15 to 17 = 1, maps BB chain 1 for RF chain 5
  19542. * bits 18 to 20 = 2, maps BB chain 2 for RF chain 6
  19543. * bits 21 to 23 = 3, maps BB chain 3 for RF chain 7
  19544. */
  19545. A_UINT32 xbar_config;
  19546. /* The below xlna_bypass params needed in old target architecture
  19547. * generation, not applicable for current target architecture generation.
  19548. * Values will be zero for current target architectures. */
  19549. /* Low noise amplifier bypass offset; signed integer; units are in dB */
  19550. A_INT32 xlna_bypass_offset;
  19551. /* Low noise amplifier bypass threshold; signed integer; units are in dB */
  19552. A_INT32 xlna_bypass_threshold;
  19553. /* nf_hw_dbm:
  19554. * 2D byte array of HW noise floor in dBm per chain, per 20MHz subband
  19555. * This array is filled in little endian format.
  19556. * for big-endian hosts, manual endian conversion is needed to obtain
  19557. * correct sequence of values.
  19558. */
  19559. A_INT8 nf_hw_dbm[MAX_ANTENNA_EIGHT][MAX_20MHZ_SEGMENTS];
  19560. } wmi_rssi_dbm_conversion_params_info;
  19561. typedef struct {
  19562. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_temp_offset_info */
  19563. /**
  19564. * RSSI offset based on the current temperature, signed integer,
  19565. * units are in dB
  19566. */
  19567. A_INT32 rssi_temp_offset;
  19568. } wmi_rssi_dbm_conversion_temp_offset_info;
  19569. /**
  19570. * RSSI dB to dBm conversion params event to host
  19571. */
  19572. typedef struct {
  19573. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_fixed_param */
  19574. /* PDEV id */
  19575. A_UINT32 pdev_id;
  19576. /**
  19577. * Followed by these TLVs below.
  19578. * wmi_rssi_dbm_conversion_params_info rssi_dbm_conversion_param[0 or 1]
  19579. * wmi_rssi_dbm_conversion_params_info will be sent in case of
  19580. * channel, BW, rx_chainmask change.
  19581. * wmi_rssi_dbm_conversion_temp_offset_info rssi_temp_offset[0 or 1]
  19582. * wmi_rssi_dbm_conversion_temp_offset_info will be sent when the
  19583. * RSSI temp offset changes.
  19584. */
  19585. } wmi_rssi_dbm_conversion_params_info_event_fixed_param;
  19586. /**
  19587. * Non wlan interference event
  19588. */
  19589. typedef struct {
  19590. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_cw_int */
  19591. A_UINT32 channel; /* either number or freq in mhz*/
  19592. } wlan_dcs_cw_int;
  19593. #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
  19594. /**
  19595. * wlan_dcs_im_tgt_stats
  19596. *
  19597. */
  19598. typedef struct _wlan_dcs_im_tgt_stats {
  19599. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t */
  19600. /** current running TSF from the TSF-1 */
  19601. A_UINT32 reg_tsf32;
  19602. /** Known last frame RSSI, in case of multiple stations, if
  19603. * and at different ranges, this would not guarantee that
  19604. * this is the least RSSI.
  19605. */
  19606. A_UINT32 last_ack_rssi;
  19607. /** Sum of all the failed durations in the last one second interval.
  19608. */
  19609. A_UINT32 tx_waste_time;
  19610. /** count how many times the hal_rxerr_phy is marked, in this
  19611. * time period
  19612. */
  19613. A_UINT32 rx_time;
  19614. A_UINT32 phyerr_cnt;
  19615. /**
  19616. * WLAN IM stats from target to host
  19617. *
  19618. * Below statistics are sent from target to host periodically.
  19619. * These are collected at target as long as target is running
  19620. * and target chip is not in sleep.
  19621. *
  19622. */
  19623. /** listen time from ANI */
  19624. A_INT32 listen_time;
  19625. /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
  19626. A_UINT32 reg_tx_frame_cnt;
  19627. /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
  19628. A_UINT32 reg_rx_frame_cnt;
  19629. /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
  19630. A_UINT32 reg_rxclr_cnt;
  19631. /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
  19632. A_UINT32 reg_cycle_cnt; /* delta cycle count */
  19633. /** extension channel rx clear count */
  19634. A_UINT32 reg_rxclr_ext_cnt;
  19635. /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
  19636. A_UINT32 reg_ofdm_phyerr_cnt;
  19637. /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
  19638. A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
  19639. /** Channel noise floor (units are dBm) */
  19640. A_INT32 chan_nf;
  19641. /** BSS rx cycle count */
  19642. A_UINT32 my_bss_rx_cycle_count;
  19643. } wlan_dcs_im_tgt_stats_t;
  19644. typedef struct wlan_dcs_awgn_info {
  19645. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_awgn_int_t */
  19646. A_UINT32 tlv_header;
  19647. /** Channel width (20, 40, 80, 80+80, 160, 320 ) enum wmi_channel_width */
  19648. A_UINT32 channel_width;
  19649. /** Primary channel frequency (MHz) */
  19650. A_UINT32 chan_freq;
  19651. /** center frequency (MHz) first segment */
  19652. A_UINT32 center_freq0;
  19653. /** center frequency (MHz) second segment */
  19654. A_UINT32 center_freq1;
  19655. /*
  19656. * Indicates which 20MHz segments contain interference
  19657. * 320 MHz: bits 0-15
  19658. * 160 MHz: bits 0-7
  19659. * 80 MHz: bits 0-3
  19660. * Bitmap - Each bit position will indicate 20MHz in which
  19661. * interference is seen. (Valid 16 bits out of 32 bit integer)
  19662. * Note: for 11be, the interference present 20MHz can be punctured
  19663. * for better channel utilization.
  19664. */
  19665. A_UINT32 chan_bw_interference_bitmap;
  19666. } wmi_dcs_awgn_int_t;
  19667. typedef struct wlan_dcs_obss_info {
  19668. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_obss_int_t */
  19669. A_UINT32 tlv_header;
  19670. /** Channel width (20, 40, 80, 80+80, 160, 320) enum wmi_channel_width */
  19671. A_UINT32 channel_width;
  19672. /** Primary channel frequency (MHz) */
  19673. A_UINT32 chan_freq;
  19674. /** center frequency (MHz) first segment */
  19675. A_UINT32 center_freq0;
  19676. /** center frequency (MHz) second segment */
  19677. A_UINT32 center_freq1;
  19678. /* chan_bw_interference_bitmap:
  19679. * Indicates which 20MHz segments contain interference
  19680. * 320 MHz: bits 0-15
  19681. * 160 MHz: bits 0-7
  19682. * 80 MHz: bits 0-3
  19683. * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
  19684. * second lowest 20Mhz and so on.
  19685. * Each bit position will indicate 20MHz in which interference is seen.
  19686. * (Valid 16 bits out of 32 bit integer)
  19687. * Note: for 11be, the interference present 20MHz can be punctured
  19688. * for better channel utilization.
  19689. */
  19690. A_UINT32 chan_bw_interference_bitmap;
  19691. } wmi_dcs_obss_int_t;
  19692. /**
  19693. * wmi_dcs_interference_event_t
  19694. *
  19695. * Right now this is event and stats together. Partly this is
  19696. * because cw interference is handled in target now. This
  19697. * can be done at host itself, if we can carry the NF alone
  19698. * as a stats event. In future this would be done and this
  19699. * event would carry only stats.
  19700. */
  19701. typedef struct {
  19702. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
  19703. /**
  19704. * Type of the event present, either the cw interference event, or the wlan_im stats, or AWGN int
  19705. * ATH_CAP_DCS_CWIM 0x01
  19706. * ATH_CAP_DCS_WLANIM 0x02
  19707. * ATH_CAP_DCS_AGWNIM 0x04
  19708. * reserved (AFC) 0x08
  19709. * ATH_CAP_DCS_OBSSIM 0x10
  19710. */
  19711. A_UINT32 interference_type; /* type of interference, wlan, cw, or AWGN */
  19712. /** pdev_id for identifying the MAC
  19713. * See macros starting with WMI_PDEV_ID_ for values.
  19714. */
  19715. A_UINT32 pdev_id;
  19716. /** VDEV ID for identifying DCS stats reported at VDEV level.
  19717. * Should be interpreted only when WMI_SERVICE_VDEV_DCS_STATS_SUPPORT
  19718. * service cap is advertized by target.
  19719. * And value would be 0xFF if DCS stats is still configured at PDEV level.
  19720. */
  19721. A_UINT32 vdev_id;
  19722. /*
  19723. * Following this struct are these TLVs. Note that they are both array of structures
  19724. * but can have at most one element. Which TLV is empty or has one element depends
  19725. * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
  19726. * elements (not arrays). union { wlan_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event;
  19727. *
  19728. * wlan_dcs_cw_int cw_int[]; <-- cw_interference event
  19729. * wlan_dcs_im_tgt_stats_t wlan_stat[]; <-- wlan im interference stats
  19730. * wmi_dcs_awgn_int_t awgn_int[]; <-- Additive white Gaussian noise (AWGN) interference
  19731. * wmi_dcs_obss_int_t obss_int[]; <-- Overlapping Basic Service Set (OBSS) interference
  19732. */
  19733. } wmi_dcs_interference_event_fixed_param;
  19734. enum wmi_peer_mcast_group_action {
  19735. wmi_peer_mcast_group_action_add = 0,
  19736. wmi_peer_mcast_group_action_del = 1
  19737. };
  19738. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
  19739. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
  19740. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
  19741. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
  19742. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 /* flag to exclude an ip while filtering. set to exclude */
  19743. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
  19744. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 /* flag to say ipv4/ipv6. Will be set for ipv6 */
  19745. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
  19746. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 /* delete all mcast table entries. */
  19747. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
  19748. /* multicast group membership commands */
  19749. /* TODO: Converting this will be tricky since it uses an union.
  19750. Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
  19751. typedef struct {
  19752. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
  19753. A_UINT32 flags;
  19754. wmi_mac_addr ucast_mac_addr;
  19755. /* in network byte order */
  19756. /* for ipv4, bytes (12-15) should contain ip address and other lower bytes 0. ipv6 should have all bytes valid */
  19757. A_UINT8 mcast_ip_addr[16];
  19758. /* for ipv6, all 16 bytes has to be valid; for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s */
  19759. A_UINT8 mcast_ip_mask[16];/* zero out lower bytes if ipv4*/
  19760. /* number of address filters - irrespective of ipv4/ipv6 addresses */
  19761. A_UINT32 num_filter_addr;
  19762. /* this array should contain the src IPs that are to be filtered during find
  19763. The array should be packed.
  19764. If there are 2 ipv4 addresses, there should be 8 bytes and rest all 0s */
  19765. A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
  19766. A_UINT8 vdev_id; /* vdev of this mcast group */
  19767. } wmi_peer_mcast_group_cmd_fixed_param;
  19768. /** Offload Scan and Roaming related commands */
  19769. /** The FW performs 2 different kinds of offload scans independent
  19770. * of host. One is Roam scan which is primarily performed on a
  19771. * station VDEV after association to look for a better AP that
  19772. * the station VDEV can roam to. The second scan is connect scan
  19773. * which is mainly performed when the station is not associated
  19774. * and to look for a matching AP profile from a list of
  19775. * configured profiles. */
  19776. /* flags for roam_scan_mode_cmd
  19777. * indicate the status (success/fail) of wmi_roam_scan_mode cmd through WMI_ROAM_EVENTID */
  19778. #define WMI_ROAM_SCAN_MODE_FLAG_REPORT_STATUS 0x1
  19779. /**
  19780. * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
  19781. * the roam scan mode is one of the periodic, RSSI change, both, none.
  19782. * None : Disable Roam scan. No Roam scan at all.
  19783. * Periodic : Scan periodically with a configurable period.
  19784. * Rssi change : Scan when ever RSSI to current AP changes by the threshold value
  19785. * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
  19786. * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
  19787. *
  19788. */
  19789. typedef struct {
  19790. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
  19791. A_UINT32 roam_scan_mode;
  19792. A_UINT32 vdev_id;
  19793. A_UINT32 flags; /* see WMI_ROAM_SCAN_MODE_FLAG defs */
  19794. /*
  19795. * Minimum duration allowed between two consecutive roam scans.
  19796. * Roam scan is not allowed, if duration between two consecutive
  19797. * roam scans is less than this time.
  19798. */
  19799. A_UINT32 min_delay_btw_scans; /* In msec */
  19800. /*
  19801. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  19802. * positions) showing for which roam_trigger_reasons the
  19803. * min_delay_btw_scans constraint should be applied.
  19804. * 0x0 means there is no time restrictions between successive roam scans.
  19805. */
  19806. A_UINT32 min_delay_roam_trigger_reason_bitmask;
  19807. } wmi_roam_scan_mode_fixed_param;
  19808. #define WMI_ROAM_SCAN_MODE_NONE 0x0
  19809. #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
  19810. #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
  19811. #define WMI_ROAM_SCAN_MODE_BOTH 0x3
  19812. /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
  19813. #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
  19814. typedef struct {
  19815. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
  19816. A_UINT32 vdev_id;
  19817. A_UINT32 command_arg;
  19818. } wmi_roam_scan_cmd_fixed_param;
  19819. #define WMI_ROAM_SCAN_STOP_CMD 0x1
  19820. /** flags for WMI_ROAM_SCAN_RSSI_THRESHOLD command:
  19821. * BIT 0 -> Indicate High RSSI Trigger support is enabled for roaming
  19822. * from 5 GHz to 6 GHz Band
  19823. * BIT 1-31 -> Reserved
  19824. */
  19825. #define WMI_ROAM_SCAN_RSSI_THRESHOLD_FLAG_ROAM_HI_RSSI_EN_ON_5G 0x1
  19826. /**
  19827. * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan RSSI threshold
  19828. * scan RSSI threshold is the RSSI threshold below which the FW will start running Roam scans.
  19829. * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
  19830. */
  19831. typedef struct {
  19832. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
  19833. /** unique id identifying the VDEV, generated by the caller */
  19834. A_UINT32 vdev_id;
  19835. /** roam scan RSSI threshold */
  19836. A_UINT32 roam_scan_rssi_thresh;
  19837. /** When using Hw generated beacon RSSI interrupts */
  19838. A_UINT32 roam_rssi_thresh_diff;
  19839. /** 5G scan max count */
  19840. A_UINT32 hirssi_scan_max_count;
  19841. /** 5G scan RSSI change threshold value */
  19842. A_UINT32 hirssi_scan_delta;
  19843. /** 5G scan upper bound */
  19844. A_UINT32 hirssi_upper_bound;
  19845. /** roam scan RSSI threshold for 5G band.
  19846. * offset from roam_scan_rssi_thres, in dB units
  19847. */
  19848. A_INT32 rssi_thresh_offset_5g;
  19849. /** flags for WMI_ROAM_SCAN_RSSI_THRESHOLD Command */
  19850. A_UINT32 flags; /* see WMI_ROAM_SCAN_RSSI_THRESHOLD_FLAG defs */
  19851. /* The TLVs will follow.
  19852. * wmi_roam_scan_extended_threshold_param extended_param;
  19853. * wmi_roam_earlystop_rssi_thres_param earlystop_param;
  19854. * wmi_roam_dense_thres_param dense_param;
  19855. * wmi_roam_bg_scan_roaming_param bg_scan_param;
  19856. * wmi_roam_data_rssi_roaming_param data_rssi_param;
  19857. */
  19858. } wmi_roam_scan_rssi_threshold_fixed_param;
  19859. /**
  19860. * WMI_ROAM_BTM_CONFIG_CMDID : set BTM (BSS Transition Management. 802.11v) offload config
  19861. * Applicable only when WMI_ROAM_SCAN_MODE is enabled with WMI_ROAM_SCAN_MODE_ROAMOFFLOAD
  19862. */
  19863. /**
  19864. * btm_config.flags
  19865. * BIT 0 : Enable/Disable the BTM offload.
  19866. * BIT 1-2 : Action on non matching candidate with cache. Used WMI_ROAM_BTM_OFLD_NON_MATCHING_CND_XXX
  19867. * BIT 3-5 : Roaming handoff decisions. Use WMI_ROAM_BTM_OFLD_CNDS_MATCH_XXX
  19868. * BIT 6 : Enable/Disable solicited BTM
  19869. * BIT 7 : Roam BTM candidates based on the roam score instead of BTM preferred value
  19870. * BIT 8 : BTM query preference over 11k neighbor report request
  19871. * BIT 9 : Send BTM query with preferred candidates list
  19872. * BIT 10 : Forward MBO BTM Request to Host if MBO ASSOC RETRY attribute is set
  19873. * BIT 11-31 : Reserved
  19874. */
  19875. #define WMI_ROAM_BTM_SET_ENABLE(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  19876. #define WMI_ROAM_BTM_GET_ENABLE(flags) WMI_GET_BITS(flags, 0, 1)
  19877. #define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val) WMI_SET_BITS(flags, 1, 2, val)
  19878. #define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags) WMI_GET_BITS(flags, 1, 2)
  19879. #define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val) WMI_SET_BITS(flags, 3, 3, val)
  19880. #define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags) WMI_GET_BITS(flags, 3, 3)
  19881. #define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val) WMI_SET_BITS(flags, 6, 1, val)
  19882. #define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags) WMI_GET_BITS(flags, 6, 1)
  19883. #define WMI_ROAM_BTM_SET_CNDS_SELECT_BASED_ON_SCORE(flags, val) WMI_SET_BITS(flags, 7, 1, val)
  19884. #define WMI_ROAM_BTM_GET_CNDS_SELECT_BASED_ON_SCORE(flags) WMI_GET_BITS(flags, 7, 1)
  19885. #define WMI_ROAM_BTM_SET_BTM_QUERY_PREFERENCE_OVER_11K(flags, val) WMI_SET_BITS(flags, 8, 1, val)
  19886. #define WMI_ROAM_BTM_GET_BTM_QUERY_PREFERENCE_OVER_11K(flags) WMI_GET_BITS(flags, 8, 1)
  19887. #define WMI_ROAM_BTM_SET_BTM_QUERY_WITH_CANDIDATE_LIST(flags, val) WMI_SET_BITS(flags, 9, 1, val)
  19888. #define WMI_ROAM_BTM_GET_BTM_QUERY_WITH_CANDIDATE_LIST(flags) WMI_GET_BITS(flags, 9, 1)
  19889. #define WMI_ROAM_BTM_SET_FORWARD_MBO_ASSOC_RETRY_BTM_REQUEST_TO_HOST(flags, val) WMI_SET_BITS(flags, 10, 1, val)
  19890. #define WMI_ROAM_BTM_GET_FORWARD_MBO_ASSOC_RETRY_BTM_REQUEST_TO_HOST(flags) WMI_GET_BITS(flags, 10, 1)
  19891. /** 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 */
  19892. #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 */
  19893. #define WMI_ROAM_BTM_NON_MATCHING_CNDS_NO_SCAN_FORWARD 1 /** Does not allow roam scan and forward BTM frame to host */
  19894. /** reserved upto 3 */
  19895. /** 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 */
  19896. #define WMI_ROAM_BTM_CNDS_MATCH_EXACT 0 /** Exactly matched with roam candidate list to BTM candidates */
  19897. #define WMI_ROAM_BTM_CNDS_MATCH_AT_LEAST_TOP 1 /** At least one or more top priority bssid matched */
  19898. /** reserved upto 7 */
  19899. typedef struct {
  19900. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_btm_config_fixed_param */
  19901. A_UINT32 tlv_header;
  19902. /** unique id identifying the VDEV on which BTM is enabled/disabled */
  19903. A_UINT32 vdev_id;
  19904. /** BTM configuration control flags */
  19905. A_UINT32 flags;
  19906. /* BTM query timeout, unit: milliseconds
  19907. * valid value range: 1-10000,
  19908. * default value: 100 will be set if invalid value is given
  19909. */
  19910. A_UINT32 solicited_timeout_ms;
  19911. /* Maximum attempt of solicited BTM
  19912. * If continuous failure reach to this value, solicited BTM to current
  19913. * ESS will be disabled.
  19914. * valid value range: 1 - (2^32-1). (2^32)-1 means sending forever
  19915. * Default value: 3 will be set if invalid value is given
  19916. */
  19917. A_UINT32 max_attempt_cnt;
  19918. /* Time to stick to current AP after BTM, unit: seconds
  19919. * valid value range: 0 -(2^16-1).
  19920. * Either 0 or (2^16)-1 means stick to AP forever.
  19921. * Default value: 300 will be set if invalid value is given
  19922. */
  19923. A_UINT32 stick_time_seconds;
  19924. /* Disassoc time threshold in milliseconds
  19925. * This time threshold allows the target to judge whether the STA
  19926. * should can move to another AP immediately, or if the STA has time
  19927. * to calculate roaming candidates.
  19928. * If the disassoc_timer_threshold value is 0x0, the field should be
  19929. * disregarded.
  19930. */
  19931. A_UINT32 disassoc_timer_threshold;
  19932. /*
  19933. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  19934. * positions) showing for which roam_trigger_reasons the
  19935. * btm query needs to be sent.
  19936. * If roam trigger reasons are unspecified, btm_bitmap will be 0x0.
  19937. */
  19938. A_UINT32 btm_bitmap;
  19939. /*
  19940. * Consider AP as roam candidate only if AP score is better than
  19941. * btm_candidate_min_score for BTM roam trigger
  19942. */
  19943. A_UINT32 btm_candidate_min_score;
  19944. } wmi_btm_config_fixed_param;
  19945. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
  19946. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
  19947. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
  19948. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
  19949. typedef struct {
  19950. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
  19951. A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
  19952. A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
  19953. A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  19954. A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
  19955. A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  19956. A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
  19957. A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
  19958. A_UINT32 max_penalty_5g; /** maximum penalty that can be applied to a 5GHz RSSI */
  19959. A_UINT32 good_rssi_threshold; /** RSSI below which roam is kicked in by background scan, although RSSI is still good */
  19960. } wmi_roam_scan_extended_threshold_param;
  19961. /**
  19962. * WMI_ROAM_SCAN_PERIOD: period for roam scan.
  19963. * Applicable when the scan mode is Periodic or both.
  19964. */
  19965. typedef struct {
  19966. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
  19967. /** unique id identifying the VDEV, generated by the caller */
  19968. A_UINT32 vdev_id;
  19969. /** roam scan period value */
  19970. A_UINT32 roam_scan_period; /* units = milliseconds */
  19971. /** Aging for Roam scans */
  19972. A_UINT32 roam_scan_age;
  19973. /** Inactivity monitoring time to consider device is in inactive state with data count is less than roam_inactive_count */
  19974. A_UINT32 inactivity_time_period; /* units = milliseconds */
  19975. /** Maximum allowed data packets count during inactivity_time_period */
  19976. A_UINT32 roam_inactive_count;
  19977. /** New roam scan period after device is in inactivity state */
  19978. A_UINT32 roam_scan_period_after_inactivity; /* units = milliseconds */
  19979. /** roam full scan period value */
  19980. A_UINT32 roam_full_scan_period; /* units = milliseconds */
  19981. } wmi_roam_scan_period_fixed_param;
  19982. /**
  19983. * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : RSSI delta to trigger the roam scan.
  19984. * Rssi change threshold used when mode is Rssi change (or) Both.
  19985. * The FW will run the roam scan when ever the RSSI changes (up or down) by the value set by this parameter.
  19986. * Note scan is triggered based on the RSSI threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
  19987. */
  19988. typedef struct {
  19989. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
  19990. /** unique id identifying the VDEV, generated by the caller */
  19991. A_UINT32 vdev_id;
  19992. /** roam scan RSSI change threshold value */
  19993. A_UINT32 roam_scan_rssi_change_thresh;
  19994. /** When using Hw generated beacon RSSI interrupts */
  19995. A_UINT32 bcn_rssi_weight;
  19996. /** Minimum delay between two 5G scans */
  19997. A_UINT32 hirssi_delay_btw_scans;
  19998. } wmi_roam_scan_rssi_change_threshold_fixed_param;
  19999. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
  20000. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
  20001. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
  20002. #define WMI_ROAM_SCAN_LIST_FLAG_FLUSH_STATIC 0x1 /* Flush static roam scan channel list in FW */
  20003. #define WMI_ROAM_SCAN_LIST_FLAG_FLUSH_DYNAMIC 0x2 /* Flush dynamic roam scan channel list in FW */
  20004. /**
  20005. * TLV for roaming channel list
  20006. */
  20007. typedef struct {
  20008. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
  20009. /** unique id identifying the VDEV, generated by the caller */
  20010. A_UINT32 vdev_id;
  20011. /** WMI_CHAN_LIST_TAG */
  20012. A_UINT32 chan_list_type;
  20013. /** # if channels to scan */
  20014. A_UINT32 num_chan;
  20015. A_UINT32 flags; /* refer to WMI_ROAM_SCAN_LIST_FLAG_xxx defs */
  20016. /**
  20017. * TLV (tag length value) parameters follow the wmi_roam_chan_list
  20018. * structure. The TLV's are:
  20019. * A_UINT32 channel_list[]; // in MHz
  20020. **/
  20021. } wmi_roam_chan_list_fixed_param;
  20022. /** Authentication modes */
  20023. enum {
  20024. WMI_AUTH_NONE, /* no upper level auth */
  20025. WMI_AUTH_OPEN, /* open */
  20026. WMI_AUTH_SHARED, /* shared-key */
  20027. WMI_AUTH_8021X, /* 802.1x */
  20028. WMI_AUTH_AUTO, /* Auto */
  20029. WMI_AUTH_WPA, /* WPA */
  20030. WMI_AUTH_RSNA, /* WPA2/RSNA */
  20031. WMI_AUTH_CCKM, /* CCKM */
  20032. WMI_AUTH_WAPI, /* WAPI */
  20033. WMI_AUTH_AUTO_PSK,
  20034. WMI_AUTH_WPA_PSK,
  20035. WMI_AUTH_RSNA_PSK,
  20036. WMI_AUTH_WAPI_PSK,
  20037. WMI_AUTH_FT_RSNA, /* 11r FT */
  20038. WMI_AUTH_FT_RSNA_PSK,
  20039. WMI_AUTH_RSNA_PSK_SHA256,
  20040. WMI_AUTH_RSNA_8021X_SHA256,
  20041. WMI_AUTH_CCKM_WPA,
  20042. WMI_AUTH_CCKM_RSNA,
  20043. WMI_AUTH_RSNA_FILS_SHA256,
  20044. WMI_AUTH_RSNA_FILS_SHA384,
  20045. WMI_AUTH_RSNA_SUITE_B_8021X_SHA256,
  20046. WMI_AUTH_RSNA_SUITE_B_8021X_SHA384,
  20047. WMI_AUTH_FT_RSNA_SAE,
  20048. WMI_AUTH_FT_RSNA_SUITE_B_8021X_SHA384,
  20049. WMI_AUTH_FT_RSNA_FILS_SHA256,
  20050. WMI_AUTH_FT_RSNA_FILS_SHA384,
  20051. WMI_AUTH_WPA3_SAE,
  20052. WMI_AUTH_WPA3_OWE,
  20053. WMI_AUTH_PASN,
  20054. WMI_AUTH_RSNA_8021X_SHA384,
  20055. WMI_AUTH_WPA3_SAE_SHA384,
  20056. WMI_AUTH_FT_RSNA_SAE_SHA384,
  20057. };
  20058. typedef enum {
  20059. WMI_SCAN_CLIENT_NLO = 0x1, /* 1 */
  20060. WMI_SCAN_CLIENT_EXTSCAN, /* 2 */
  20061. WMI_SCAN_CLIENT_ROAM, /* 3 */
  20062. WMI_SCAN_CLIENT_P2P, /* 4 */
  20063. WMI_SCAN_CLIENT_LPI, /* 5 */
  20064. WMI_SCAN_CLIENT_NAN, /* 6 */
  20065. WMI_SCAN_CLIENT_ANQP, /* 7 */
  20066. WMI_SCAN_CLIENT_OBSS, /* 8 */
  20067. WMI_SCAN_CLIENT_PLM, /* 9 */
  20068. WMI_SCAN_CLIENT_HOST, /* 10 */
  20069. } WMI_SCAN_CLIENT_ID;
  20070. typedef struct {
  20071. /** authentication mode (defined above) */
  20072. A_UINT32 rsn_authmode;
  20073. /** unicast cipher set */
  20074. A_UINT32 rsn_ucastcipherset;
  20075. /** mcast/group cipher set */
  20076. A_UINT32 rsn_mcastcipherset;
  20077. /** mcast/group management frames cipher set */
  20078. A_UINT32 rsn_mcastmgmtcipherset;
  20079. } wmi_rsn_params;
  20080. /** looking for a wps enabled AP */
  20081. #define WMI_AP_PROFILE_FLAG_WPS 0x1
  20082. /** looking for a secure AP */
  20083. #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
  20084. /** looking for a PMF enabled AP */
  20085. #define WMI_AP_PROFILE_FLAG_PMF 0x4
  20086. /** If this flag is set roam to SAE_H2E (Hash to Element) enabled APs only */
  20087. #define WMI_AP_PROFILE_FLAG_SAE_H2E 0x8
  20088. /* the value used in wmi_roam_cnd_scoring_param->disable_bitmap */
  20089. #define WLAN_ROAM_SCORING_RSSI_DISABLE 0x00000001
  20090. #define WLAN_ROAM_SCORING_HT_DISABLE 0x00000002
  20091. #define WLAN_ROAM_SCORING_VHT_DISABLE 0x00000004
  20092. #define WLAN_ROAM_SCORING_BW_DISABLE 0x00000008
  20093. #define WLAN_ROAM_SCORING_BAND_DISABLE 0x00000010
  20094. #define WLAN_ROAM_SCORING_NSS_DISABLE 0x00000020
  20095. #define WLAN_ROAM_SCORING_CHAN_CONGESTION_DISABLE 0x00000040
  20096. #define WLAN_ROAM_SCORING_BEAMFORMING_DISABLE 0x00000080
  20097. #define WLAN_ROAM_SCORING_PCL_DISABLE 0x00000100
  20098. #define WLAN_ROAM_SCORING_HE_DISABLE 0x00000200
  20099. #define WLAN_ROAM_SCORING_OCE_WAN_DISABLE 0x00000400
  20100. #define WLAN_ROAM_SCORING_ETH_DISABLE 0x00000800
  20101. #define WLAN_ROAM_SCORING_MLO_DISABLE 0x00001000
  20102. #define WLAN_ROAM_SCORING_DISABLE_ALL 0xFFFFFFFF
  20103. #define WLAN_ROAM_SCORING_DEFAULT_PARAM_ALLOW 0x0
  20104. #define WLAN_ROAM_MAX_SELECTION_SCORE 10000
  20105. #define WLAN_ROAM_SCORE_20MHZ_BW_INDEX 0
  20106. #define WLAN_ROAM_SCORE_40MHZ_BW_INDEX 1
  20107. #define WLAN_ROAM_SCORE_80MHZ_BW_INDEX 2
  20108. #define WLAN_ROAM_SCORE_160MHZ_BW_INDEX 3
  20109. #define WLAN_ROAM_SCORE_MAX_BW_INDEX 4
  20110. #define WMI_ROAM_GET_BW_SCORE_PERCENTAGE(value32, bw_index) WMI_GET_BITS(value32, (8 * (bw_index)), 8)
  20111. #define WMI_ROAM_SET_BW_SCORE_PERCENTAGE(value32, score_pcnt, bw_index) WMI_SET_BITS(value32, (8 * (bw_index)), 8, score_pcnt)
  20112. #define WLAN_ROAM_SCORE_NSS_1x1_INDEX 0
  20113. #define WLAN_ROAM_SCORE_NSS_2x2_INDEX 1
  20114. #define WLAN_ROAM_SCORE_NSS_3x3_INDEX 2
  20115. #define WLAN_ROAM_SCORE_NSS_4x4_INDEX 3
  20116. #define WLAN_ROAM_SCORE_MAX_NSS_INDEX 4
  20117. #define WMI_ROAM_GET_NSS_SCORE_PERCENTAGE(value32, nss_index) WMI_GET_BITS(value32, (8 * (nss_index)), 8)
  20118. #define WMI_ROAM_SET_NSS_SCORE_PERCENTAGE(value32, score_pcnt, nss_index) WMI_SET_BITS(value32, (8 * (nss_index)), 8, score_pcnt)
  20119. #define WLAN_ROAM_SCORE_BAND_2G_INDEX 0
  20120. #define WLAN_ROAM_SCORE_BAND_5G_INDEX 1
  20121. #define WLAN_ROAM_SCORE_BAND_6G_INDEX 2
  20122. /* 3 is reserved */
  20123. #define WLAN_ROAM_SCORE_MAX_BAND_NUM_INDICES 4
  20124. #define WLAN_ROAM_SCORE_MAX_BAND_INDEX WLAN_ROAM_SCORE_MAX_BAND_NUM_INDICES
  20125. #define WLAN_ROAM_SCORE_SECURITY_WPA_INDEX 0
  20126. #define WLAN_ROAM_SCORE_SECURITY_WPA2_INDEX 1
  20127. #define WLAN_ROAM_SCORE_SECURITY_WPA3_INDEX 2
  20128. /* 3 is reserved */
  20129. #define WLAN_ROAM_SCORE_SECURITY_MAX_NUM_INDICES 4
  20130. #define WMI_ROAM_GET_BAND_SCORE_PERCENTAGE(value32, band_index) WMI_GET_BITS(value32, (8 * (band_index)), 8)
  20131. #define WMI_ROAM_SET_BAND_SCORE_PERCENTAGE(value32, score_pcnt, band_index) WMI_SET_BITS(value32, (8 * (band_index)), 8, score_pcnt)
  20132. #define WLAN_ROAM_SCORE_MAX_CHAN_CONGESTION_SLOT 16
  20133. #define WLAN_ROAM_SCORE_DEFAULT_CONGESTION_SLOT 0
  20134. #define WLAN_ROAM_SCORE_MAX_OCE_WAN_SLOT 16
  20135. #define WLAN_ROAM_SCORE_DEFAULT_OCE_WAN_SLOT 0
  20136. #define WLAN_ROAM_SCORE_320MHZ_BW_EXT_INDEX 0
  20137. #define WLAN_ROAM_SCORE_MAX_BW_EXT_INDEX 4
  20138. #define WLAN_ROAM_SCORE_MLSR_INDEX 0
  20139. #define WLAN_ROAM_SCORE_MLMR_INDEX 1
  20140. #define WLAN_ROAM_SCORE_EMLSR_INDEX 2
  20141. #define WLAN_ROAM_SCORE_EMLMR_INDEX 3
  20142. #define WLAN_ROAM_SCORE_MLO_INDEX 4
  20143. #define WMI_ROAM_GET_MLO_SCORE_PERCENTAGE(value32, mlo_index) WMI_GET_BITS(value32, (8 * (mlo_index)), 8)
  20144. #define WMI_ROAM_SET_MLO_SCORE_PERCENTAGE(value32, score_pcnt, mlo_index) WMI_SET_BITS(value32, (8 * (mlo_index)), 8, score_pcnt)
  20145. #define WMI_ROAM_GET_SECURITY_SCORE_PERCENTAGE(value32, security_index) \
  20146. WMI_GET_BITS(value32, (8 * (security_index)), 8)
  20147. #define WMI_ROAM_SET_SECURITY_SCORE_PERCENTAGE(value32, score_pcnt, security_index) \
  20148. WMI_SET_BITS(value32, (8 * (security_index)), 8, score_pcnt)
  20149. /**
  20150. best_rssi_threshold: Roamable AP RSSI equal or better than this threshold, full RSSI score 100. Units in dBm.
  20151. good_rssi_threshold: Below this threshold, scoring linear percentage between rssi_good_pcnt and 100. Units in dBm.
  20152. bad_rssi_threshold: Between good and bad RSSI threshold, scoring linear percentage between rssi_bad_pcnt and rssi_good_pcnt. Units in dBm.
  20153. good_rssi_pcnt: Used to assigned scoring percentage of each slot between best to good RSSI threshold. Units in percentage.
  20154. bad_rssi_pcnt: Used to assigned scoring percentage of each slot between good to bad RSSI threshold. Units in percentage.
  20155. good_bucket_size : bucket size of slot in good zone. Units in dB.
  20156. bad_bucket_size : bucket size of slot in bad zone. Units in dB.
  20157. rssi_pref_5g_rssi_thresh: Below RSSI threshold, 5G AP have given preference of band percentage. Units in dBm.
  20158. */
  20159. /**
  20160. The graph below explains how RSSI scoring percentage is calculated
  20161. as the RSSI improves. In the graph, the derived parameters good_buckets
  20162. and bad_buckets are used. These derived parameters are related to the
  20163. specified parameters as follows:
  20164. good_buckets =
  20165. (best_rssi_threshold - good_rssi_threshold) / good_bucket_size
  20166. bad_buckets =
  20167. (good_rssi_threshold - bad_rssi_threshold) / bad_bucket_size
  20168. | (x0,y0) (x0 = best_rssi, y0 = 100)
  20169. p 100 |-------o
  20170. e | |<--------- (100 - good_rssi_pct)/good_buckets
  20171. r | |___ ,---- good_bucket_size
  20172. c | | |
  20173. e | |_V_
  20174. n | |
  20175. t | |___o (x1,y1) (x1 = good_rssi, y1 = good_rssi_pcnt)
  20176. 80 | |
  20177. % | |<------ (good_rssi_pcnt - bad_rssi_pcnt)/bad_buckets
  20178. | |_____
  20179. | | ,-- bad_bucket_size
  20180. | | |
  20181. | |__v__
  20182. | |
  20183. | |
  20184. 40 | o------------
  20185. | (x2,y2) (x2 = bad_rssi, y2 = bad_rssi_pcnt)
  20186. +------o------------o-----------o------------->
  20187. -50 -70 -80 RSSI dBm
  20188. | excellent | good | bad | poor
  20189. | zone | zone | zone | zone
  20190. V V V
  20191. BEST_THRES GOOD_THRES BAD_THRES
  20192. */
  20193. typedef struct {
  20194. A_INT32 best_rssi_threshold;
  20195. A_INT32 good_rssi_threshold;
  20196. A_INT32 bad_rssi_threshold;
  20197. A_UINT32 good_rssi_pcnt;
  20198. A_UINT32 bad_rssi_pcnt;
  20199. A_UINT32 good_bucket_size;
  20200. A_UINT32 bad_bucket_size;
  20201. A_INT32 rssi_pref_5g_rssi_thresh;
  20202. } wmi_roam_cnd_rssi_scoring;
  20203. /**
  20204. Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the
  20205. value respectively of bw_scoring
  20206. BITS 0-7 :- It contains scoring percentage of 20MHz BW
  20207. BITS 8-15 :- It contains scoring percentage of 40MHz BW
  20208. BITS 16-23 :- It contains scoring percentage of 80MHz BW
  20209. BITS 24-31 :- It contains scoring percentage of 160MHz BW
  20210. Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the
  20211. value respectively of ext_bw_scoring:
  20212. BITS 0-7 :- It contains scoring percentage of 320MHz BW
  20213. BITS 8-15 :- reserved
  20214. BITS 16-23 :- reserved
  20215. BITS 24-31 :- reserved
  20216. The value of each index must be 0-100
  20217. */
  20218. typedef struct {
  20219. A_UINT32 score_pcnt;
  20220. } wmi_roam_cnd_bw_scoring;
  20221. /**
  20222. Use macro WMI_ROAM_CND_GET/SET_BAND_SCORE_PERCENTAGE to get and set the value respectively.
  20223. BITS 0-7 :- It contains scoring percentage of 2G
  20224. BITS 8-15 :- It contains scoring percentage of 5G
  20225. BITS 16-23 :- reserved
  20226. BITS 24-31 :- reserved
  20227. The value of each index must be 0-100
  20228. */
  20229. typedef struct {
  20230. A_UINT32 score_pcnt;
  20231. } wmi_roam_cnd_band_scoring;
  20232. /**
  20233. Use macro WMI_ROAM_CND_GET/SET_NSS_SCORE_PERCENTAGE to get and set the value respectively.
  20234. BITS 0-7 :- It contains scoring percentage of 1x1
  20235. BITS 8-15 :- It contains scoring percentage of 2x2
  20236. BITS 16-23 :- It contains scoring percentage of 3x3
  20237. BITS 24-31 :- It contains scoring percentage of 4x4
  20238. The value of each index must be 0-100
  20239. */
  20240. typedef struct {
  20241. A_UINT32 score_pcnt;
  20242. } wmi_roam_cnd_nss_scoring;
  20243. /**
  20244. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  20245. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  20246. BITS 8-15 :- SLOT_1
  20247. BITS 16-23 :- SLOT_2
  20248. BITS 24-31 :- SLOT_3
  20249. BITS 32- ...
  20250. num_slot will equally divide 100. e.g, if num_slot = 4
  20251. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  20252. */
  20253. typedef struct {
  20254. A_UINT32 num_slot; /* max 15 */
  20255. A_UINT32 score_pcnt3_to_0;
  20256. A_UINT32 score_pcnt7_to_4;
  20257. A_UINT32 score_pcnt11_to_8;
  20258. A_UINT32 score_pcnt15_to_12;
  20259. } wmi_roam_cnd_esp_qbss_scoring;
  20260. /**
  20261. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  20262. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  20263. BITS 8-15 :- SLOT_1
  20264. BITS 16-23 :- SLOT_2
  20265. BITS 24-31 :- SLOT_3
  20266. BITS 32- ...
  20267. num_slot will equally divide 100. e.g, if num_slot = 4
  20268. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  20269. */
  20270. typedef struct {
  20271. A_UINT32 num_slot; /* max 15 */
  20272. A_UINT32 score_pcnt3_to_0;
  20273. A_UINT32 score_pcnt7_to_4;
  20274. A_UINT32 score_pcnt11_to_8;
  20275. A_UINT32 score_pcnt15_to_12;
  20276. } wmi_roam_cnd_oce_wan_scoring;
  20277. /**
  20278. * Use macro WMI_ROAM_CND_GET/SET_SECURITY_SCORE_PERCENTAGE
  20279. * to get and set the value respectively.
  20280. * BITS 0-7 :- It contains scoring percentage of WPA security
  20281. * BITS 8-15 :- It contains scoring percentage of WPA2 security
  20282. * BITS 16-23 :- It contains scoring percentage of WPA3 security
  20283. * BITS 24-31 :- reserved
  20284. *
  20285. * The value of each score must be 0-100
  20286. */
  20287. typedef struct {
  20288. A_UINT32 score_pcnt;
  20289. } wmi_roam_cnd_security_scoring;
  20290. typedef enum {
  20291. WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_NONE = 0, /* Legacy roam score algorithm */
  20292. WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_RSSI_CU_BASED = 1, /* Roam score algorithm based on RSSI and CU */
  20293. } WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID;
  20294. /**
  20295. disable_bitmap :- Each bit will be either allow(0)/disallow(1) to considered the roam score param.
  20296. rssi_weightage_pcnt :- RSSI weightage out of total score in percentage
  20297. ht_weightage_pcnt :- HT weightage out of total score in percentage.
  20298. vht_weightage_pcnt :- VHT weightage out of total score in percentage.
  20299. he_weightage_pcnt :- 11ax weightage out of total score in percentage.
  20300. bw_weightage_pcnt :- Bandwidth weightage out of total score in percentage.
  20301. band_weightage_pcnt :- Band(2G/5G) weightage out of total score in percentage.
  20302. nss_weightage_pcnt:- NSS(1x1 / 2x2) weightage out of total score in percentage.
  20303. esp_qbss_weightage_pcnt: ESP/QBSS weightage out of total score in percentage.
  20304. beamforming_weightage_pcnt :- Beamforming weightage out of total score in percentage.
  20305. pcl_weightage_pcnt :- PCL weightage out of total score in percentage.
  20306. oce_wan_weightage_pcnt :- OCE WAN metrics weightage out of total score in percentage.
  20307. rssi_scoring :- RSSI scoring information.
  20308. bw_scoring :- channel BW scoring percentage information.
  20309. band_scoring : - band scording percentage information.
  20310. nss_scoring :- NSS scoring percentage information.
  20311. esp_qbss_scoring :- ESP/QBSS scoring percentage information
  20312. oce_wan_scoring : OCE WAN metrics percentage information
  20313. 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
  20314. 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.
  20315. */
  20316. typedef struct {
  20317. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_scoring_param */
  20318. A_UINT32 disable_bitmap;
  20319. A_INT32 rssi_weightage_pcnt;
  20320. A_INT32 ht_weightage_pcnt;
  20321. A_INT32 vht_weightage_pcnt;
  20322. A_INT32 he_weightage_pcnt;
  20323. A_INT32 bw_weightage_pcnt;
  20324. A_INT32 band_weightage_pcnt;
  20325. A_INT32 nss_weightage_pcnt;
  20326. A_INT32 esp_qbss_weightage_pcnt;
  20327. A_INT32 beamforming_weightage_pcnt;
  20328. A_INT32 pcl_weightage_pcnt;
  20329. A_INT32 oce_wan_weightage_pcnt;
  20330. wmi_roam_cnd_rssi_scoring rssi_scoring;
  20331. wmi_roam_cnd_bw_scoring bw_scoring;
  20332. wmi_roam_cnd_band_scoring band_scoring;
  20333. wmi_roam_cnd_nss_scoring nss_scoring;
  20334. wmi_roam_cnd_esp_qbss_scoring esp_qbss_scoring;
  20335. wmi_roam_cnd_oce_wan_scoring oce_wan_scoring;
  20336. A_UINT32 roam_score_delta_pcnt;
  20337. A_UINT32 roam_score_delta_mask;
  20338. /* Vendor specific roam score algorithm ID from WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID enum */
  20339. A_UINT32 vendor_roam_score_algorithm_id;
  20340. /*
  20341. * During CU and low RSSI based roam triggers, consider AP as
  20342. * roam candidate only if its roam score is better than connected AP score
  20343. * by at least candidate_min_roam_score_delta.
  20344. */
  20345. A_UINT32 candidate_min_roam_score_delta;
  20346. /*
  20347. * For OCE Release 2, give weightage to roam candidate tx power if
  20348. * oce_ap_tx_pwr_weightage_pcnt != 0.
  20349. */
  20350. A_UINT32 oce_ap_tx_pwr_weightage_pcnt;
  20351. /*
  20352. * For OCE Release 2, give weightage to roam candidate based on
  20353. * advertised subnet id.
  20354. * Only used if oce_ap_subnet_id_weightage_pcnt != 0.
  20355. */
  20356. A_UINT32 oce_ap_subnet_id_weightage_pcnt;
  20357. /*
  20358. * Give weightage to SAE-PK (Simultaneous Authentication of Equals -
  20359. * Public Key) enabled network APs.
  20360. * Only used if sae_pk_ap_weightage_pcnt != 0.
  20361. */
  20362. A_UINT32 sae_pk_ap_weightage_pcnt;
  20363. /*
  20364. * Give weightage to bandwidth which is greater than 160Mhz.
  20365. */
  20366. wmi_roam_cnd_bw_scoring ext_bw_scoring;
  20367. /*
  20368. * eht_weightage_pcnt :- 11be weightage out of total score in percentage.
  20369. */
  20370. A_UINT32 eht_weightage_pcnt;
  20371. /*
  20372. * mlo_weightage_pcnt :- give weightage to candidate based on MLO support.
  20373. */
  20374. A_UINT32 mlo_weightage_pcnt;
  20375. /*
  20376. * btc_score_factor :- Scale down 2.4GHz AP total score by btc_score_factor
  20377. * during BT coex.
  20378. * Value 0 should be ignored
  20379. */
  20380. A_UINT32 btc_score_factor;
  20381. /*
  20382. * btc_etp_factor :- Scale down 2.4GHz AP total etp value by btc_etp_factor
  20383. * during BT coex.
  20384. * Value 0 should be ignored
  20385. */
  20386. A_UINT32 btc_etp_factor;
  20387. /* Scoring for security mode */
  20388. A_INT32 security_weightage_pcnt;
  20389. wmi_roam_cnd_security_scoring security_scoring;
  20390. /* mlo_etp_weightage_pcnt:
  20391. * Give etp weightage to candidate based on MLO support.
  20392. * In host INI configuration, it will give boost(+) or reduction(-)
  20393. * percentage value and host will deliver actual weighted number
  20394. * based on 100. For example:
  20395. * If percentage value in INI is 20, then host will give 120 (100 * 1.2)
  20396. * as mlo_etp_weightage_pcnt.
  20397. * If percentage value in INI is -20, then host will give 80 (100 * 0.8)
  20398. * as mlo_etp_weightage_pcnt.
  20399. */
  20400. A_UINT32 mlo_etp_weightage_pcnt;
  20401. } wmi_roam_cnd_scoring_param;
  20402. typedef struct {
  20403. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_score_delta_param */
  20404. /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
  20405. A_UINT32 roam_trigger_reason;
  20406. /* Roam score delta in %.
  20407. * Consider AP as roam candidate only if AP score is at least
  20408. * roam_score_delta % better than connected AP score.
  20409. * Ex: roam_score_delta = 20, and connected AP score is 4000,
  20410. * then consider candidate AP only if its score is at least
  20411. * 4800 (= 4000 * 120%)
  20412. */
  20413. A_UINT32 roam_score_delta;
  20414. } wmi_roam_score_delta_param;
  20415. typedef struct {
  20416. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_min_rssi_param */
  20417. /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
  20418. A_UINT32 roam_trigger_reason;
  20419. /*
  20420. * Consider AP as roam candidate only if AP RSSI is better than
  20421. * candidate_min_rssi
  20422. */
  20423. A_UINT32 candidate_min_rssi; /* units = dBm */
  20424. } wmi_roam_cnd_min_rssi_param;
  20425. /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
  20426. * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
  20427. * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
  20428. * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
  20429. */
  20430. typedef struct {
  20431. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
  20432. /** flags as defined above */
  20433. A_UINT32 flags;
  20434. /**
  20435. * RSSI threshold value in dB: the value of the candidate AP should
  20436. * higher by this threshold than the RSSI of the currently associated AP.
  20437. */
  20438. A_UINT32 rssi_threshold;
  20439. /**
  20440. * ssid value to be matched.
  20441. */
  20442. wmi_ssid ssid;
  20443. /**
  20444. * security params to be matched.
  20445. */
  20446. /** authentication mode (defined above) */
  20447. A_UINT32 rsn_authmode;
  20448. /** unicast cipher set */
  20449. A_UINT32 rsn_ucastcipherset;
  20450. /** mcast/group cipher set */
  20451. A_UINT32 rsn_mcastcipherset;
  20452. /** mcast/group management frames cipher set */
  20453. A_UINT32 rsn_mcastmgmtcipherset;
  20454. /**
  20455. * rssi_abs_threshold value: the value of the candidate AP should
  20456. * higher than this absolute RSSI threshold.
  20457. * Zero means no absolute minimum RSSI is required.
  20458. * units are the offset from the noise floor in dB.
  20459. */
  20460. A_UINT32 rssi_abs_thresh;
  20461. /**
  20462. * bg_rssi_threshold value in dB: For background scan the value of
  20463. * the candidate AP should be higher by this threshold than the RSSI
  20464. * of the currently associated AP.
  20465. */
  20466. A_UINT32 bg_rssi_threshold;
  20467. } wmi_ap_profile;
  20468. typedef struct {
  20469. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_owe_ap_profile */
  20470. /* OPEN SSID value when STA is connected to OWE transition AP in OWE security */
  20471. wmi_ssid open_ssid_for_owe_transition;
  20472. } wmi_owe_ap_profile;
  20473. typedef struct {
  20474. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_vendor_scoring_param */
  20475. A_UINT32 tlv_header;
  20476. /** Indicates the channel band for which these vendor scoring params needs to be applied.
  20477. * Refer WLAN_ROAM_SCORE_MAX_BAND_INDEX for possible band_idx values.
  20478. */
  20479. A_UINT32 band_idx;
  20480. /** Below RSSI/CU factor_value & factor_score param values are configured by vendor */
  20481. A_UINT32 rssi_factor_value1;
  20482. A_UINT32 rssi_factor_value2;
  20483. A_UINT32 rssi_factor_value3;
  20484. A_UINT32 rssi_factor_value4;
  20485. A_UINT32 rssi_factor_value5;
  20486. A_UINT32 rssi_factor_score1;
  20487. A_UINT32 rssi_factor_score2;
  20488. A_UINT32 rssi_factor_score3;
  20489. A_UINT32 rssi_factor_score4;
  20490. A_UINT32 rssi_factor_score5;
  20491. A_UINT32 cu_factor_value1;
  20492. A_UINT32 cu_factor_value2;
  20493. A_UINT32 cu_factor_score1;
  20494. A_UINT32 cu_factor_score2;
  20495. } wmi_roam_cnd_vendor_scoring_param;
  20496. /** Support early stop roaming scanning when finding a strong candidate AP
  20497. * A 'strong' candidate is
  20498. * 1) Is eligible candidate
  20499. * (all conditions are met in existing candidate selection).
  20500. * 2) Its RSSI is better than earlystop threshold.
  20501. * Earlystop threshold will be relaxed as each channel is scanned.
  20502. */
  20503. typedef struct {
  20504. A_UINT32 tlv_header;
  20505. /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
  20506. A_UINT32 roam_earlystop_thres_min;
  20507. /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
  20508. A_UINT32 roam_earlystop_thres_max;
  20509. } wmi_roam_earlystop_rssi_thres_param;
  20510. typedef struct {
  20511. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param */
  20512. A_UINT32 tlv_header;
  20513. /** RSSI threshold offset under trffic and dense env */
  20514. A_UINT32 roam_dense_rssi_thres_offset;
  20515. /** minimum number of APs to determine dense env */
  20516. A_UINT32 roam_dense_min_aps;
  20517. /** initial dense status detected by host at the time of initial connection */
  20518. A_UINT32 roam_dense_status;
  20519. /* traffic threshold to enable aggressive roaming in dense env; units are percent of medium occupancy, 0 - 100 */
  20520. A_UINT32 roam_dense_traffic_thres;
  20521. } wmi_roam_dense_thres_param;
  20522. /* Definition for flags in wmi_roam_bg_scan_roaming_param
  20523. * Bit 0: BG roaming enabled when we connect to 2G AP only and roaming to 5G AP only.
  20524. * Bit 1-31: Reserved
  20525. */
  20526. #define WMI_ROAM_BG_SCAN_FLAGS_2G_TO_5G_ONLY 1
  20527. typedef struct {
  20528. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bg_scan_roaming_param */
  20529. A_UINT32 tlv_header;
  20530. /** RSSI threshold in dBm below which roaming will be triggered during background scan(non-roam scan). 0 will disable this threshold */
  20531. A_UINT32 roam_bg_scan_bad_rssi_thresh;
  20532. /** 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 */
  20533. A_UINT32 roam_bg_scan_client_bitmap;
  20534. /** roam scan RSSI threshold for 2 GHz band.
  20535. * offset from roam_bg_scan_bad_rssi_thresh, in dB units
  20536. */
  20537. A_INT32 bad_rssi_thresh_offset_2g;
  20538. /* flags for background roaming */
  20539. A_UINT32 flags;
  20540. } wmi_roam_bg_scan_roaming_param;
  20541. /*
  20542. * If there's rx activity during rx_inactivity_ms and avg of data_rssi
  20543. * is better than roam_data_rssi_thres, then suppress low rssi roaming.
  20544. */
  20545. #define WMI_ROAM_DATA_RSSI_FLAG_LOW_RSSI 0x00000001
  20546. /*
  20547. * If there's no rx activity during rx_inactivity_ms or avg of data_rssi
  20548. * is better than roam_data_rssi_thres, then suppress this background roaming.
  20549. */
  20550. #define WMI_ROAM_DATA_RSSI_FLAG_BACKGROUND 0x00000002
  20551. typedef struct {
  20552. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_data_rssi_roaming_param */
  20553. A_UINT32 tlv_header;
  20554. /* flags for when consider data_rssi,
  20555. * valid values are OR operation of WMI_ROAM_DATA_RSSI_FLAG_ .
  20556. * value 0 to disable the feature.
  20557. */
  20558. A_UINT32 flags;
  20559. /**
  20560. * RSSI threshold in dBm above which roaming scan will be suppressed
  20561. * during some roaming trigger.
  20562. */
  20563. A_INT32 roam_data_rssi_thres;
  20564. /** rx inactivity time, in unit of milliseconds. */
  20565. A_UINT32 rx_inactivity_ms;
  20566. } wmi_roam_data_rssi_roaming_param;
  20567. /** Beacon filter wmi command info */
  20568. #define BCN_FLT_MAX_SUPPORTED_IES 256
  20569. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES/32)
  20570. typedef struct bss_bcn_stats {
  20571. A_UINT32 vdev_id;
  20572. A_UINT32 bss_bcnsdropped;
  20573. A_UINT32 bss_bcnsdelivered;
  20574. } wmi_bss_bcn_stats_t;
  20575. typedef struct bcn_filter_stats {
  20576. A_UINT32 bcns_dropped;
  20577. A_UINT32 bcns_delivered;
  20578. A_UINT32 activefilters;
  20579. wmi_bss_bcn_stats_t bss_stats;
  20580. } wmi_bcnfilter_stats_t;
  20581. typedef struct wmi_add_bcn_filter_cmd {
  20582. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
  20583. A_UINT32 vdev_id;
  20584. /*
  20585. * Following this structure is the TLV:
  20586. * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  20587. */
  20588. } wmi_add_bcn_filter_cmd_fixed_param;
  20589. typedef struct wmi_rmv_bcn_filter_cmd {
  20590. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
  20591. A_UINT32 vdev_id;
  20592. } wmi_rmv_bcn_filter_cmd_fixed_param;
  20593. #define WMI_BCN_SEND_DTIM_ZERO 1
  20594. #define WMI_BCN_SEND_DTIM_BITCTL_SET 2
  20595. typedef struct wmi_bcn_send_from_host {
  20596. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
  20597. A_UINT32 vdev_id;
  20598. A_UINT32 data_len;
  20599. union {
  20600. A_UINT32 frag_ptr; /* Physical address of the frame */
  20601. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  20602. };
  20603. A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
  20604. A_UINT32 dtim_flag; /* to control CABQ traffic */
  20605. A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
  20606. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  20607. } wmi_bcn_send_from_host_cmd_fixed_param;
  20608. /* cmd to support bcn snd for all vaps at once */
  20609. typedef struct wmi_pdev_send_bcn {
  20610. A_UINT32 num_vdevs;
  20611. WMI_VAR_LEN_ARRAY1(wmi_bcn_send_from_host_cmd_fixed_param, bcn_cmd);
  20612. } wmi_pdev_send_bcn_cmd_t;
  20613. typedef struct wmi_fd_send_from_host {
  20614. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_send_from_host_cmd_fixed_param */
  20615. A_UINT32 vdev_id;
  20616. A_UINT32 data_len;
  20617. union {
  20618. A_UINT32 frag_ptr; /* Physical address of the frame */
  20619. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  20620. };
  20621. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  20622. A_UINT32 frame_ctrl; /* frame ctrl to setup PPDU desc */
  20623. } wmi_fd_send_from_host_cmd_fixed_param;
  20624. /*
  20625. * Control to send broadcast probe response instead of FD frames.
  20626. * When this flag is not set then FD frame will be transmitted when
  20627. * fd_period is non-zero
  20628. */
  20629. #define WMI_FILS_FLAGS_BITMAP_BCAST_PROBE_RSP 0x1
  20630. /*
  20631. * WMI command structure for FILS feature enable/disable
  20632. */
  20633. typedef struct {
  20634. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_fils_cmd_fixed_param */
  20635. /* VDEV identifier */
  20636. A_UINT32 vdev_id;
  20637. A_UINT32 fd_period; /* non-zero - enable Fils Discovery frames or broadcast probe response with this period (in TU),
  20638. * 0 - disable FD and broadcast probe response frames */
  20639. A_UINT32 flags; /* WMI_FILS_FLAGS_BITMAP flags */
  20640. } wmi_enable_fils_cmd_fixed_param;
  20641. /*
  20642. * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
  20643. */
  20644. typedef struct {
  20645. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
  20646. /** id of AP criteria */
  20647. A_UINT32 id;
  20648. /** unique id identifying the VDEV, generated by the caller */
  20649. A_UINT32 vdev_id;
  20650. /*
  20651. * Following this structure are the TLVs:
  20652. * wmi_ap_profile ap_profile; <-- AP profile info
  20653. * wmi_roam_cnd_scoring_param roam_cnd_scoring_param
  20654. * wmi_roam_score_delta_param roam_score_delta_param_list[]
  20655. * wmi_roam_cnd_min_rssi_param roam_cnd_min_rssi_param_list[]
  20656. * wmi_roam_cnd_vendor_scoring_param roam_cnd_vendor_scoring_param[]
  20657. * wmi_owe_ap_profile owe_ap_profile[]
  20658. * A_UINT32 authmode_list[] <-- List of authmode allowed for roaming.
  20659. * Refer WMI_AUTH_ for authmode values.
  20660. */
  20661. } wmi_roam_ap_profile_fixed_param;
  20662. /**
  20663. * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
  20664. */
  20665. typedef struct {
  20666. /** id of AP criteria */
  20667. A_UINT32 id;
  20668. /** unique id identifying the VDEV, generated by the caller */
  20669. A_UINT32 vdev_id;
  20670. /** AP profile info */
  20671. wmi_ap_profile ap_profile;
  20672. } wmi_ofl_scan_add_ap_profile;
  20673. /**
  20674. * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
  20675. */
  20676. typedef struct {
  20677. /** id of AP criteria */
  20678. A_UINT32 id;
  20679. /** unique id identifying the VDEV, generated by the caller */
  20680. A_UINT32 vdev_id;
  20681. } wmi_ofl_scan_remove_ap_profile;
  20682. /**
  20683. * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
  20684. * 0 will disable ofload scan and a very low value will perform a continuous
  20685. * scan.
  20686. */
  20687. typedef struct {
  20688. /** offload scan period value, used for scans used when not connected */
  20689. A_UINT32 ofl_scan_period;
  20690. } wmi_ofl_scan_period;
  20691. /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
  20692. #define ROAM_OFFLOAD_PMK_BYTES (32)
  20693. #define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
  20694. #define ROAM_OFFLOAD_KRK_BYTES (16)
  20695. #define ROAM_OFFLOAD_BTK_BYTES (32)
  20696. #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
  20697. #define ROAM_OFFLOAD_NUM_MCS_SET (16)
  20698. /* This TLV will be filled only in case roam offload for wpa2-psk/okc/ese/11r is enabled */
  20699. typedef struct {
  20700. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
  20701. A_UINT32 rssi_cat_gap; /* gap for every category bucket */
  20702. A_UINT32 prefer_5g; /* prefer select 5G candidate */
  20703. A_UINT32 select_5g_margin;
  20704. A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
  20705. A_UINT32 capability;
  20706. A_UINT32 ht_caps_info;
  20707. A_UINT32 ampdu_param;
  20708. A_UINT32 ht_ext_cap;
  20709. A_UINT32 ht_txbf;
  20710. A_UINT32 asel_cap;
  20711. A_UINT32 qos_enabled;
  20712. A_UINT32 qos_caps;
  20713. A_UINT32 wmm_caps;
  20714. A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned, we don't declare it as tlv array */
  20715. A_UINT32 handoff_delay_for_rx; /* In msec. Delay Hand-Off by this duration to receive pending Rx frames from current BSS */
  20716. A_UINT32 max_mlme_sw_retries; /* maximum number of software retries for preauth and reassoc req */
  20717. A_UINT32 no_ack_timeout; /* In msec. duration to wait before another SW retry made if no ack seen for previous frame */
  20718. 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. */
  20719. A_UINT32 roam_to_current_bss_disable; /* Disable roaming to current bss */
  20720. } wmi_roam_offload_tlv_param;
  20721. /* flags for 11i offload */
  20722. #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
  20723. #define WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED 1 /* pmk caching is disabled */
  20724. #define WMI_ROAM_OFFLOAD_FLAG_SAE_SAME_PMKID 2 /* Use same PMKID for WPA3 SAE roaming */
  20725. /* from bit 3 to bit 31 are reserved */
  20726. #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
  20727. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  20728. } while (0)
  20729. #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
  20730. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  20731. } while (0)
  20732. #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
  20733. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
  20734. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_ENABLED(flag) \
  20735. do { \
  20736. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  20737. } while (0)
  20738. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  20739. do { \
  20740. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  20741. } while (0)
  20742. #define WMI_GET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  20743. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED))
  20744. /* This TLV will be filled only in case of wpa-psk/wpa2-psk/wpa3 */
  20745. typedef struct {
  20746. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
  20747. A_UINT32 flags; /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
  20748. A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
  20749. A_UINT32 pmk_len; /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
  20750. A_UINT32 pmk_ext_len; /** the length of extended pmk. in normal case it should be 0, but for suiteB, it should be 16*/
  20751. A_UINT32 pmk_ext[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk ext offload. 16 bytes for suiteB */
  20752. } wmi_roam_11i_offload_tlv_param;
  20753. /* This TLV will be filled only in case of 11R*/
  20754. typedef struct {
  20755. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
  20756. A_UINT32 mdie_present;
  20757. A_UINT32 mdid;
  20758. A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN>>2];
  20759. A_UINT32 r0kh_id_len;
  20760. 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 */
  20761. A_UINT32 psk_msk_len; /**length of psk_msk*/
  20762. A_UINT32 psk_msk_ext_len; /**length of psk_msk_ext*/
  20763. A_UINT32 psk_msk_ext[ROAM_OFFLOAD_PSK_MSK_BYTES>>2];
  20764. A_UINT32 adaptive_11r; /* FW needs to perform adaptive 11r roaming */
  20765. /*
  20766. * FW needs to perform FT initial moiblity association instead of
  20767. * FT roaming for deauth roam trigger
  20768. * 0 - To disable FT-IM
  20769. * 1 - To enable FT-IM
  20770. */
  20771. A_UINT32 ft_im_for_deauth;
  20772. /*
  20773. * FW can prefer doing over-the-ds fast BSS transition instead of
  20774. * over-the-air if associated and target AP are both capable of FT over DS.
  20775. * 0 - To disable FT-over-DS
  20776. * 1 - To enable FT-over-DS
  20777. */
  20778. A_UINT32 ft_over_ds_enable;
  20779. } wmi_roam_11r_offload_tlv_param;
  20780. /* This TLV will be filled only in case of ESE */
  20781. typedef struct {
  20782. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
  20783. A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
  20784. A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
  20785. } wmi_roam_ese_offload_tlv_param;
  20786. typedef struct {
  20787. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_sae_offload_tlv_param */
  20788. /* SAE SPMK timeout value in seconds after which FW need to perform SAE full authentication to derive new SPMK */
  20789. A_UINT32 spmk_timeout;
  20790. } wmi_roam_sae_offload_tlv_param;
  20791. typedef enum {
  20792. WMI_BL_REASON_NUD_FAILURE = 1,
  20793. WMI_BL_REASON_STA_KICKOUT,
  20794. WMI_BL_REASON_ROAM_HO_FAILURE,
  20795. /* Assoc resp with status code 71 - POOR RSSI CONDITIONS */
  20796. WMI_BL_REASON_ASSOC_REJECT_POOR_RSSI,
  20797. /* Assoc resp with status code 34 - DENIED_POOR_CHANNEL_CONDITIONS */
  20798. WMI_BL_REASON_ASSOC_REJECT_OCE,
  20799. WMI_BL_REASON_USERSPACE_BL,
  20800. WMI_BL_REASON_USERSPACE_AVOID_LIST,
  20801. WMI_BL_REASON_BTM_DIASSOC_IMMINENT,
  20802. WMI_BL_REASON_BTM_BSS_TERMINATION,
  20803. WMI_BL_REASON_BTM_MBO_RETRY,
  20804. /* Reassoc resp with status code 34 - DENIED_POOR_CHANNEL_CONDITIONS */
  20805. WMI_BL_REASON_REASSOC_RSSI_REJECT,
  20806. /* Reassoc resp with status code 17 - DENIED_NO_MORE_STAS */
  20807. WMI_BL_REASON_REASSOC_NO_MORE_STAS,
  20808. WMI_BL_REASON_BASIC_RATES_MIS_MATCH, /* Status code 18 */
  20809. WMI_BL_REASON_EHT_NOT_SUPPORTED, /* Status code 135 */
  20810. WMI_BL_REASON_EXISTING_MLD_ASSOCIATION, /* Status code 130 */
  20811. WMI_BL_REASON_LINK_TRANSMITTED_NOT_ACCEPTED, /* Status code 139 */
  20812. WMI_BL_REASON_DENIED_OTHER_REASON,
  20813. WMI_BL_REASON_BTM_LOAD_BALANCE,
  20814. } WMI_BLACKLIST_REASON_ID;
  20815. typedef enum {
  20816. WMI_BL_SOURCE_HOST = 1,
  20817. WMI_BL_SOURCE_FW,
  20818. } WMI_BLACKLIST_SOURCE_ID;
  20819. #define WMI_MAX_FAILED_LINK_COMBO_COUNT 10
  20820. typedef struct {
  20821. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_with_timeout_tlv_param */
  20822. A_UINT32 tlv_header;
  20823. /** Blaclisted AP mac address */
  20824. wmi_mac_addr bssid;
  20825. /** How much time in milliseconds to keep AP in blacklist */
  20826. A_UINT32 timeout;
  20827. /** RSSI (dBm units) when put in blacklist */
  20828. A_INT32 rssi;
  20829. /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
  20830. A_UINT32 reason;
  20831. /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
  20832. A_UINT32 source;
  20833. /*
  20834. * timestamp is the absolute time w.r.t host timer which is synchronized
  20835. * between the host and target.
  20836. * This timestamp indicates the time when AP added to blacklist.
  20837. */
  20838. A_UINT32 timestamp;
  20839. /* Original timeout value in milli seconds when AP added to BL */
  20840. A_UINT32 original_timeout;
  20841. /*
  20842. * The disallow link ID bitmap indicates links which should not be allowed
  20843. * for any assoc or partner link combination.
  20844. * If all links for MLD AP are disallowed, then the value shall be
  20845. * 0xffffffff.
  20846. */
  20847. A_UINT32 disallow_linkid_bitmap;
  20848. /* MLD address of AP */
  20849. wmi_mac_addr mld;
  20850. /* List of link combinations for which association is failed */
  20851. A_UINT32 ml_failed_links_combo_bitmap[WMI_MAX_FAILED_LINK_COMBO_COUNT];
  20852. /* Failed link combo count filled in ml_failed_links_combo_bitmap[] */
  20853. A_UINT32 ml_failed_link_combo_count;
  20854. } wmi_roam_blacklist_with_timeout_tlv_param;
  20855. /** WMI_ROAM_BLACKLIST_EVENT: generated whenever STA needs to move AP to blacklist for a particluar time
  20856. * Ex: AP which sends BTM request with disassoc imminent is set should be
  20857. * moved to blacklist until disassociation timer expires
  20858. */
  20859. typedef struct {
  20860. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param */
  20861. A_UINT32 vdev_id;
  20862. /* This TLV is followed by further TLVs:
  20863. * wmi_roam_blacklist_with_timeout_tlv_param blacklist_with_timeout[]
  20864. */
  20865. } wmi_roam_blacklist_event_fixed_param;
  20866. typedef struct {
  20867. A_UINT32 tlv_header;
  20868. /** candidate AP mac address */
  20869. wmi_mac_addr bssid;
  20870. } wmi_roam_pmkid_request_tlv_param;
  20871. /** WMI_ROAM_PMKID_REQUEST_EVENT: generated whenever FW needs the PMKID while roaming **/
  20872. typedef struct {
  20873. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmkid_request_event_fixed_param */
  20874. A_UINT32 vdev_id;
  20875. /* This TLV is followed by further TLVs:
  20876. * wmi_roam_pmkid_request_tlv_param pmkid_request[]
  20877. */
  20878. } wmi_roam_pmkid_request_event_fixed_param;
  20879. /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
  20880. * generated when ever a better AP is found in the recent roam scan (or)
  20881. * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
  20882. * from the current AP.
  20883. */
  20884. typedef struct {
  20885. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
  20886. /** unique id identifying the VDEV, generated by the caller */
  20887. A_UINT32 vdev_id;
  20888. /** reason for roam event */
  20889. A_UINT32 reason;
  20890. /** associated AP's RSSI calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI */
  20891. A_UINT32 rssi;
  20892. /** roam notification */
  20893. A_UINT32 notif;
  20894. /** roam notification param
  20895. * Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params value.
  20896. * notif_params contains roam invoke fail reason from
  20897. * wmi_roam_invoke_error_t if reason is WMI_ROAM_REASON_INVOKE_ROAM_FAIL.
  20898. */
  20899. A_UINT32 notif_params;
  20900. /** roam notification param1
  20901. * Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params1 value.
  20902. * notif_params1 is exact frame length of deauth or disassoc if reason
  20903. * is WMI_ROAM_REASON_DEAUTH.
  20904. */
  20905. A_UINT32 notif_params1;
  20906. } wmi_roam_event_fixed_param;
  20907. #define WMI_ROAM_BSS_INFO_FLAG_IS_MLD 0
  20908. typedef struct {
  20909. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_info_param */
  20910. /*
  20911. * bit0: WMI_ROAM_BSS_INFO_FLAG_IS_MLD
  20912. */
  20913. A_UINT32 flags;
  20914. /*
  20915. * mld score if WMI_ROAM_BSS_INFO_FLAG_IS_MLD set, otherwise link score
  20916. */
  20917. A_UINT32 score;
  20918. /*
  20919. * mld address if WMI_ROAM_BSS_INFO_FLAG_IS_MLD set, otherwise link address
  20920. */
  20921. wmi_mac_addr mac_addr;
  20922. } wmi_roam_bss_info_param;
  20923. /* roam_reason: bits 0-3 */
  20924. #define WMI_ROAM_REASON_INVALID 0x0 /** invalid reason. Do not interpret reason field */
  20925. #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
  20926. #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
  20927. #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low RSSI condition detected */
  20928. #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
  20929. SSID and Security profile in
  20930. WMI_ROAM_AP_PROFILE, found during scan
  20931. triggered upon FINAL_BMISS **/
  20932. #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
  20933. /** WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
  20934. * Result code of WMI_ROAM_INVOKE_CMDID.
  20935. * Any roaming failure before reassociation will be indicated to host
  20936. * with this reason.
  20937. * Any roaming failure after reassociation will be indicated to host with
  20938. * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
  20939. */
  20940. #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
  20941. #define WMI_ROAM_REASON_RSO_STATUS 0x7
  20942. #define WMI_ROAM_REASON_BTM 0x8 /** Roaming because of BTM request received */
  20943. #define WMI_ROAM_REASON_DEAUTH 0x9 /** deauth/disassoc received */
  20944. /* reserved up through 0xF */
  20945. /* subnet status: bits 4-5 */
  20946. typedef enum
  20947. {
  20948. WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
  20949. WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
  20950. WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
  20951. } wmi_roam_subnet_change_status;
  20952. #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
  20953. #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
  20954. #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
  20955. do { \
  20956. (roam_reason) |= \
  20957. (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
  20958. WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
  20959. } while (0)
  20960. #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
  20961. (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
  20962. WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
  20963. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK 0x40
  20964. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT 6
  20965. #define WMI_SET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason, status) \
  20966. do { \
  20967. (roam_reason) |= \
  20968. (((status) << WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT) & \
  20969. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK); \
  20970. } while (0)
  20971. #define WMI_GET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason) \
  20972. (((roam_reason) & WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK) >> \
  20973. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT)
  20974. /* Bits 0-3: stores 4 LSbs of trigger reason.
  20975. * Old host will get trigger reasons <= 15 from this bitfield.
  20976. * Bit 7 will be 1 always to indicate that bits 8-15 are valid.
  20977. * Bits 8-15: full trigger_reason, including values > 15.
  20978. * New host will gett full trigger_reason from this bitfield.
  20979. * Bits 8-11 and bits 0-3 store matching values.
  20980. */
  20981. #define WMI_SET_ROAM_EXT_TRIGGER_REASON(roam_reason, trigger_reason) \
  20982. do { \
  20983. (roam_reason) |= (trigger_reason & 0xf); \
  20984. (roam_reason) |= 0x80; \
  20985. (roam_reason) |= ((trigger_reason & 0xff) << 8); \
  20986. } while (0)
  20987. /* roaming notification */
  20988. #define WMI_ROAM_NOTIF_INVALID 0x0 /** invalid notification. Do not interpret notif field */
  20989. #define WMI_ROAM_NOTIF_ROAM_START 0x1 /** indicate that roaming is started. sent only in non WOW state */
  20990. #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2 /** indicate that roaming is aborted. sent only in non WOW state */
  20991. #define WMI_ROAM_NOTIF_ROAM_REASSOC 0x3 /** indicate that reassociation is done. sent only in non WOW state */
  20992. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS 0x4 /** indicate that roaming scan mode is successful */
  20993. #define WMI_ROAM_NOTIF_SCAN_MODE_FAIL 0x5 /** indicate that roaming scan mode is failed due to internal roaming state */
  20994. #define WMI_ROAM_NOTIF_DISCONNECT 0x6 /** indicate that roaming not allowed due BTM req */
  20995. #define WMI_ROAM_NOTIF_SUBNET_CHANGED 0x7 /** indicate that subnet has changed */
  20996. #define WMI_ROAM_NOTIF_SCAN_START 0x8 /** indicate roam scan start, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
  20997. #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 */
  20998. #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 */
  20999. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS_WITH_HO_FAIL 0xb /** indicate that roaming scan mode is successful but cause disconnection and subsequent
  21000. ** WMI_ROAM_REASON_HO_FAILED is event expected */
  21001. #define WMI_ROAM_NOTIF_SCAN_END 0xc /** indicate roam scan end, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
  21002. /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
  21003. * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on this information
  21004. */
  21005. typedef struct
  21006. {
  21007. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
  21008. A_UINT32 vdev_id; /**unique id identifying the VDEV, generated by the caller*/
  21009. A_UINT32 num_ric_request; /**number of ric request ie send to firmware.(max value is 2 now)*/
  21010. A_UINT32 is_add_ric; /**support add ric or delete ric*/
  21011. } wmi_ric_request_fixed_param;
  21012. /** tspec element: refer to 8.4.2.32 of 802.11 2012 spec
  21013. * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
  21014. */
  21015. typedef struct {
  21016. A_UINT32 tlv_header;
  21017. A_UINT32 ts_info; /** bits value of TS Info field.*/
  21018. A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
  21019. A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
  21020. A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
  21021. A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
  21022. A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
  21023. A_UINT32 suspension_interval; /**The Suspension Interval field*/
  21024. A_UINT32 svc_start_time; /**The Service Start Time field*/
  21025. A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
  21026. A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
  21027. A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
  21028. A_UINT32 max_burst_size; /**The Burst Size field*/
  21029. A_UINT32 delay_bound; /**The Delay Bound field*/
  21030. A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
  21031. A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
  21032. A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
  21033. } wmi_ric_tspec;
  21034. /* flags for roam_invoke_cmd */
  21035. /* add this channel into roam cache channel list after this command is finished */
  21036. #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
  21037. /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
  21038. #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
  21039. /* during host-invoked roaming, don't send null data frame to AP */
  21040. #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
  21041. /* start extra full scan if no candidate found in previous scan */
  21042. #define WMI_ROAM_INVOKE_FLAG_FULL_SCAN_IF_NO_CANDIDATE 3
  21043. /* when bit is set:
  21044. * Candidate selection algo will based on fw score algo.
  21045. * Which means configurations like wmi_roam_score_delta_param,
  21046. * wmi_configure_roam_trigger_parameters is also configurable for
  21047. * host_invoke roam, as well as consider current BSS score as
  21048. * score algo input.
  21049. * when bit is not set:
  21050. * Candidate selection algo will ignore score and above configurations
  21051. * and ignore current BSS score.
  21052. */
  21053. #define WMI_ROAM_INVOKE_FLAG_SELECT_CANDIDATE_CONSIDER_SCORE 4
  21054. /* from bit 5 to bit 31 are reserved */
  21055. #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  21056. (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  21057. } while (0)
  21058. #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  21059. (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  21060. } while (0)
  21061. #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
  21062. ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
  21063. #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
  21064. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
  21065. #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
  21066. #define WMI_ROAM_INVOKE_SCAN_MODE_SKIP 3 /* no scan is performed. use beacon/probe resp given by the host */
  21067. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_MAP 4 /* scan cached channel map */
  21068. #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
  21069. #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
  21070. enum wlan_roam_invoke_reason {
  21071. ROAM_INVOKE_REASON_UNDEFINED = 0,
  21072. /* FW will use default parameters to do roam scan, ignore other parameters like WLM, etc. */
  21073. ROAM_INVOKE_REASON_NUD_FAILURE, /* Neighbor Unreachable Detection */
  21074. ROAM_INVOKE_REASON_USER_SPACE,
  21075. };
  21076. /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
  21077. *
  21078. if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
  21079. if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
  21080. This command can be used to add specific channel into roam cached channel list by following
  21081. <roam_scan_ch_mode> = 0
  21082. <roam_ap_sel_mode> = 0
  21083. <roam_delay> = 0
  21084. <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
  21085. <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
  21086. <channel_no> = channel list to be added
  21087. */
  21088. typedef struct {
  21089. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
  21090. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
  21091. A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
  21092. A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
  21093. A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
  21094. A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
  21095. A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
  21096. A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
  21097. A_UINT32 num_buf; /** number of buffers In the TLV bcn_prb_buf_list[] */
  21098. A_UINT32 reason; /** reason of invoke roam, see enum wlan_roam_invoke_reason */
  21099. /**
  21100. * TLV (tag length value) parameters follows roam_invoke_req
  21101. * The TLV's are:
  21102. * A_UINT32 channel_list[]; // in MHz
  21103. * wmi_mac_addr bssid_list[];
  21104. * wmi_tlv_buf_len_param bcn_prb_buf_list[];
  21105. * A_UINT8 bcn_prb_frm[];
  21106. */
  21107. } wmi_roam_invoke_cmd_fixed_param;
  21108. /* Definition for op_bitmap */
  21109. enum {
  21110. ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
  21111. ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
  21112. ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
  21113. ROAM_FILTER_OP_BITMAP_LCA_DISALLOW = 0x8,
  21114. ROAM_FILTER_OP_BITMAP_RSSI_REJECTION_OCE = 0x10,
  21115. };
  21116. /** lca_enable_source_bitmap */
  21117. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PER 0x1
  21118. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BMISS 0x2
  21119. #define WMI_ROAM_LCA_DISALLOW_SOURCE_LOW_RSSI 0x4
  21120. #define WMI_ROAM_LCA_DISALLOW_SOURCE_HIGH_RSSI 0x8
  21121. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PERIODIC 0x10
  21122. #define WMI_ROAM_LCA_DISALLOW_SOURCE_MAWC 0x20 /* MAWC = Motion Aided Wifi connectivity */
  21123. #define WMI_ROAM_LCA_DISALLOW_SOURCE_DENSE 0x40
  21124. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BACKGROUND 0x80
  21125. #define WMI_ROAM_LCA_DISALLOW_SOURCE_FORCED 0x100
  21126. typedef struct {
  21127. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_rejection_list_config_param */
  21128. A_UINT32 tlv_header;
  21129. /** BSSID of AP, who reject (re-)assoc due to low RSSI */
  21130. wmi_mac_addr bssid;
  21131. /** Disallowed AP for certain duration, in units of milliseconds */
  21132. A_UINT32 remaining_disallow_duration;
  21133. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  21134. A_INT32 requested_rssi;
  21135. } wmi_roam_rejection_list_config_param;
  21136. 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 */
  21137. typedef struct {
  21138. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
  21139. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
  21140. A_UINT32 flags; /** flags for filter */
  21141. A_UINT32 op_bitmap; /** 32 bit bitmap to be set on. bit0 = first param, bit 1 = second param...etc. Can be or'ed */
  21142. A_UINT32 num_bssid_black_list; /* number of blacklist in the TLV variable bssid_black_list */
  21143. A_UINT32 num_ssid_white_list; /* number of whitelist in the TLV variable ssid_white_list */
  21144. A_UINT32 num_bssid_preferred_list; /* only for lfr 3.0. number of preferred list & factor in the TLV */
  21145. A_UINT32 num_rssi_rejection_ap; /** number of list of AP who rejected STA due to low RSSI */
  21146. A_UINT32 delta_rssi; /** (dB units) when AB in RSSI blacklist improved by at least delta_rssi, it will be removed from blacklist */
  21147. /**
  21148. * TLV (tag length value) parameters follows roam_filter_list_cmd
  21149. * The TLV's are:
  21150. * wmi_mac_addr bssid_black_list[];
  21151. * wmi_ssid ssid_white_list[];
  21152. * wmi_mac_addr bssid_preferred_list[];
  21153. * A_UINT32 bssid_preferred_factor[];
  21154. * wmi_roam_lca_disallow_config_tlv_param lca_disallow_param[0/1] (opt)
  21155. * wmi_roam_rejection_list_config_param rssi_rejection_list[]
  21156. */
  21157. } wmi_roam_filter_fixed_param;
  21158. typedef struct {
  21159. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param */
  21160. A_UINT32 disallow_duration; /** How long LCA AP will be disallowed before it can be a roaming candidate again, in units of seconds */
  21161. 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 */
  21162. A_UINT32 num_disallowed_aps; /** How many APs the target should maintain in its LCA (Last Connected AP) list */
  21163. 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) */
  21164. } wmi_roam_lca_disallow_config_tlv_param;
  21165. typedef struct {
  21166. A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
  21167. } WMI_IPV4_ADDR;
  21168. typedef struct _WMI_IPV6_ADDR {
  21169. A_UINT8 address[16]; /* IPV6 in Network Byte Order */
  21170. } WMI_IPV6_ADDR;
  21171. /* flags for subnet change detection */
  21172. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
  21173. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
  21174. /* bit 2 to bit 31 are reserved */
  21175. /* set IPv4 enabled/disabled flag and get the flag */
  21176. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
  21177. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  21178. } while (0)
  21179. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
  21180. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  21181. } while (0)
  21182. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
  21183. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
  21184. /* set IPv6 enabled flag, disabled and get the flag */
  21185. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
  21186. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  21187. } while (0)
  21188. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
  21189. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  21190. } while (0)
  21191. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
  21192. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
  21193. /**
  21194. * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
  21195. * to FW. FW uses these parameters for subnet change detection.
  21196. */
  21197. typedef struct {
  21198. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
  21199. /** unique id identifying the VDEV, generated by the caller */
  21200. A_UINT32 vdev_id;
  21201. /** IPv4/IPv6 enabled/disabled */
  21202. /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/DISABLED */
  21203. A_UINT32 flag;
  21204. /** Gateway MAC address */
  21205. wmi_mac_addr inet_gw_mac_addr;
  21206. /** IP addresses */
  21207. WMI_IPV4_ADDR inet_gw_ip_v4_addr;
  21208. WMI_IPV6_ADDR inet_gw_ip_v6_addr;
  21209. /** Number of software retries for ARP/Neighbor solicitation request */
  21210. A_UINT32 max_retries;
  21211. /** timeout in milliseconds for each ARP request*/
  21212. A_UINT32 timeout;
  21213. /** number of skipped aps **/
  21214. A_UINT32 num_skip_subnet_change_detection_bssid_list;
  21215. /**
  21216. * TLV (tag length value) parameters follows roam_subnet_change_config_cmd
  21217. * structure. The TLV's are:
  21218. * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
  21219. **/
  21220. } wmi_roam_subnet_change_config_fixed_param;
  21221. typedef enum {
  21222. /** No change in scan mode, use legacy modes */
  21223. ROAM_TRIGGER_SCAN_MODE_NONE = 0,
  21224. /** Trigger only partial roam scan */
  21225. ROAM_TRIGGER_SCAN_MODE_PARTIAL,
  21226. /** Trigger only FULL roam scan */
  21227. ROAM_TRIGGER_SCAN_MODE_FULL,
  21228. /** Don't trigger any roam scan and disconnect from AP */
  21229. ROAM_TRIGGER_SCAN_MODE_NO_SCAN_DISCONNECTION,
  21230. } WMI_ROAM_TRIGGER_SCAN_MODE;
  21231. typedef struct {
  21232. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_configure_roam_trigger_parameters */
  21233. A_UINT32 trigger_reason; /** Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID */
  21234. A_UINT32 enable; /** 0 - Disable, non-zero - enable */
  21235. A_UINT32 scan_mode; /** Scan mode from WMI_ROAM_TRIGGER_SCAN_MODE */
  21236. /** consider roam trigger if connected AP RSSI is worse than trigger_rssi_threshold */
  21237. A_INT32 trigger_rssi_threshold; /* Units in dBm */
  21238. /*
  21239. * Consider 2.4GHz AP as roam candidate only if AP RSSI is better than
  21240. * cand_ap_min_rssi_threshold
  21241. * If valid (non-zero) cand_ap_min_rssi_threshold_5g and
  21242. * cand_ap_min_rssi_threshold_6g values are provided,
  21243. * then cand_ap_min_rssi_threshold should only be applied to 2.4 GHz APs.
  21244. * But if cand_ap_min_rssi_threshold_5g and cand_ap_min_rssi_threshold_6g
  21245. * are zeros, then cand_ap_min_rssi_threshold should be applied to all APs.
  21246. */
  21247. A_INT32 cand_ap_min_rssi_threshold; /* Units in dBm */
  21248. /* Roam score delta in %.
  21249. * Consider AP as roam candidate only if AP score is at least
  21250. * roam_score_delta % better than connected AP score.
  21251. * Ex: roam_score_delta = 20, and connected AP score is 4000,
  21252. * then consider candidate AP only if its score is at least
  21253. * 4800 (= 4000 * 120%)
  21254. */
  21255. A_UINT32 roam_score_delta_percentage;
  21256. /* Reason code to be filled in the response frame from STA.
  21257. Ex: Reason code in the BTM response frame
  21258. Valid values are 0 - 255 */
  21259. A_UINT32 reason_code;
  21260. /*
  21261. * Consider 5GHz AP as roam candidate only if AP RSSI is better than
  21262. * cand_ap_min_rssi_threshold_5g
  21263. */
  21264. A_INT32 cand_ap_min_rssi_threshold_5g; /* Units in dBm */
  21265. /*
  21266. * Consider 6 GHz AP as roam candidate only if AP RSSI is better than
  21267. * cand_ap_min_rssi_threshold_6g
  21268. */
  21269. A_INT32 cand_ap_min_rssi_threshold_6g; /* Units in dBm */
  21270. } wmi_configure_roam_trigger_parameters;
  21271. /**
  21272. * WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON:
  21273. * Enable or disable roaming triggers in FW.
  21274. */
  21275. typedef struct {
  21276. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_enable_disable_trigger_reason_fixed_param */
  21277. /** unique id identifying the VDEV, generated by the caller */
  21278. A_UINT32 vdev_id;
  21279. /**
  21280. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  21281. * positions) showing for which roam_trigger_reasons are enabled by
  21282. * bit value equal 0x1, and which roam_trigger_reasons are disabled by
  21283. * bit value equal 0x0.
  21284. */
  21285. A_UINT32 trigger_reason_bitmask;
  21286. /**
  21287. * The following TLVs will follow this fixed_param TLV:
  21288. *
  21289. * wmi_configure_roam_trigger_parameters config_roam_trigger_param[]
  21290. * Roam trigger configuration per roam trigger.
  21291. * The number of elements in this TLV array is limited to
  21292. * WMI_ROAM_TRIGGER_EXT_REASON_MAX
  21293. */
  21294. } wmi_roam_enable_disable_trigger_reason_fixed_param;
  21295. /** WMI_PROFILE_MATCH_EVENT: offload scan
  21296. * generated when ever atleast one of the matching profiles is found
  21297. * in recent NLO scan. no data is carried with the event.
  21298. */
  21299. /** P2P specific commands */
  21300. /**
  21301. * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
  21302. * FW to generate P2P IE tobe carried in probe response frames.
  21303. * FW will respond to probe requests while in listen state.
  21304. */
  21305. typedef struct {
  21306. /* number of secondary device types,supported */
  21307. A_UINT32 num_secondary_dev_types;
  21308. /**
  21309. * followed by 8 bytes of primary device id and
  21310. * num_secondary_dev_types * 8 bytes of secondary device
  21311. * id.
  21312. */
  21313. } wmi_p2p_dev_set_device_info;
  21314. /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
  21315. * state. if enabled, an active STA/AP will respond to P2P probe requests on
  21316. * the operating channel of the VDEV.
  21317. */
  21318. typedef struct {
  21319. /* 1:enable disoverability, 0:disable discoverability */
  21320. A_UINT32 enable_discoverability;
  21321. } wmi_p2p_set_discoverability;
  21322. /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
  21323. * beacons generated by FW. used in FW beacon mode.
  21324. * the FW will add this IE to beacon in addition to the beacon
  21325. * template set by WMI_BCN_TMPL_CMDID command.
  21326. */
  21327. typedef struct {
  21328. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
  21329. /** unique id identifying the VDEV, generated by the caller */
  21330. A_UINT32 vdev_id;
  21331. /* ie length */
  21332. A_UINT32 ie_buf_len;
  21333. /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  21334. * A_UINT8 ie_data[]; <-- length in byte given by field num_data.
  21335. */
  21336. } wmi_p2p_go_set_beacon_ie_fixed_param;
  21337. /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
  21338. * probe response generated by FW. used in FW beacon mode.
  21339. * the FW will add this IE to probe response in addition to the probe response
  21340. * template set by WMI_PRB_TMPL_CMDID command.
  21341. */
  21342. typedef struct {
  21343. /** unique id identifying the VDEV, generated by the caller */
  21344. A_UINT32 vdev_id;
  21345. /* ie length */
  21346. A_UINT32 ie_buf_len;
  21347. /*followed by byte stream of ie data of length ie_buf_len */
  21348. } wmi_p2p_go_set_probe_resp_ie;
  21349. /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
  21350. * be used by the FW to parse the P2P NoA attribute in beacons, probe responses
  21351. * and action frames received by the P2P Client.
  21352. * Note: This command is currently used only for Apple P2P implementation.
  21353. */
  21354. typedef struct {
  21355. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
  21356. /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
  21357. A_UINT32 p2p_ie_oui_type;
  21358. /** OS specific NoA Attribute ID */
  21359. A_UINT32 p2p_noa_attribute;
  21360. } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
  21361. /*----P2P disc offload definition ----*/
  21362. typedef struct {
  21363. A_UINT32 pattern_type;
  21364. /**
  21365. * TLV (tag length value) parameters follow the pattern structure.
  21366. * TLV can contain bssid list, ssid list and
  21367. * ie. the TLV tags are defined above;
  21368. */
  21369. } wmi_p2p_disc_offload_pattern_cmd;
  21370. typedef struct {
  21371. /* unique id identifying the VDEV, generated by the caller */
  21372. A_UINT32 vdev_id;
  21373. /* mgmt type of the ie*/
  21374. A_UINT32 mgmt_type;
  21375. /* ie length */
  21376. A_UINT32 ie_buf_len;
  21377. /*followed by byte stream of ie data of length ie_buf_len */
  21378. } wmi_p2p_disc_offload_appie_cmd;
  21379. typedef struct {
  21380. /* enable/disable p2p find offload*/
  21381. A_UINT32 enable;
  21382. /* unique id identifying the VDEV, generated by the caller */
  21383. A_UINT32 vdev_id;
  21384. /* p2p find type */
  21385. A_UINT32 disc_type;
  21386. /* p2p find perodic */
  21387. A_UINT32 perodic;
  21388. /* p2p find listen channel in MHz */
  21389. A_UINT32 listen_channel;
  21390. /* p2p find full channel number */
  21391. A_UINT32 num_scan_chans;
  21392. /**
  21393. * TLV (tag length value) parameters follow the pattern structure.
  21394. * TLV contain channel list in MHz
  21395. */
  21396. } wmi_p2p_disc_offload_config_cmd;
  21397. /*----P2P OppPS definition ----*/
  21398. typedef struct {
  21399. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
  21400. A_UINT32 tlv_header;
  21401. /* unique id identifying the VDEV, generated by the caller */
  21402. A_UINT32 vdev_id;
  21403. /* OppPS attributes */
  21404. /** Bit 0: Indicate enable/disable of OppPS
  21405. * Bits 7-1: Ctwindow in TUs
  21406. * Bits 31-8: Reserved
  21407. */
  21408. A_UINT32 oppps_attr;
  21409. } wmi_p2p_set_oppps_cmd_fixed_param;
  21410. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
  21411. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
  21412. #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
  21413. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
  21414. #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
  21415. WMI_F_RMW((hdr)->oppps_attr, 0x1, \
  21416. WMI_UNIFIED_OPPPS_ATTR_ENALBED);
  21417. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
  21418. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
  21419. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
  21420. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
  21421. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
  21422. WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
  21423. WMI_UNIFIED_OPPPS_ATTR_CTWIN);
  21424. typedef enum p2p_lo_start_ctrl_flags_e {
  21425. P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0, /* flush prob. req when host is awake */
  21426. } p2p_lo_start_ctrl_flags;
  21427. #define P2P_LO_PER_DEV_TYPE_LEN 8
  21428. #define P2P_LO_DEV_TYPES_COUNT_MAX 10
  21429. #define P2P_LO_DEV_TYPES_LEN_MAX (P2P_LO_PER_DEV_TYPE_LEN * P2P_LO_DEV_TYPES_COUNT_MAX)
  21430. #define P2P_LO_PROB_RESP_MAX_LEN 512
  21431. typedef struct {
  21432. A_UINT32 tlv_header;
  21433. A_UINT32 vdev_id;
  21434. A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
  21435. A_UINT32 channel; /* MHz */
  21436. A_UINT32 period; /* ms */
  21437. A_UINT32 interval; /* ms, interval should be larger than period */
  21438. A_UINT32 count; /* 0 means forever */
  21439. /*
  21440. * device_types_len specifies the number of bytes in the
  21441. * device_types_data[] byte-array TLV that follows this TLV.
  21442. * The data in device_types_data[] is in 8-byte elements, so
  21443. * device_types_len will be a multiple of 8.
  21444. * Refer to P2P_LO_DEV_TYPES_LEN_MAX
  21445. */
  21446. A_UINT32 device_types_len;
  21447. /*
  21448. * prob_resp_len specifies the number of bytes in the
  21449. * prob_resp_data[] byte-array TLV that follows this TLV.
  21450. * Refer to P2P_LO_PROB_RESP_MAX_LEN
  21451. */
  21452. A_UINT32 prob_resp_len;
  21453. /* MAC address to be used for P2P discovery */
  21454. wmi_mac_addr p2p_disc_mac_addr;
  21455. /*
  21456. * Two other TLVs follow this TLV:
  21457. * A_UINT8 device_types_data[device_types_len];
  21458. * A_UINT8 prob_resp_data[prob_resp_len];
  21459. * The information in device_types_data[] and prob_resp_data[]
  21460. * needs to be provided to the target in over-the-air byte order.
  21461. * On a big-endian host, if device_types_data and prob_resp_data
  21462. * are initially in the correct over-the-air byte order,
  21463. * the automatic byteswap for endianness-correction during WMI
  21464. * message download will mess up the byte order.
  21465. * Thus, a big-endian host needs to explicitly byte-swap the bytes
  21466. * within each quad-byte segment of device_types_data[] and
  21467. * prob_resp_data[], so that the automatic byte-swap applied during
  21468. * WMI download from a big-endian host to the little-endian target
  21469. * will restore device_types_data and prob_resp_data into the
  21470. * correct byte ordering.
  21471. */
  21472. } wmi_p2p_lo_start_cmd_fixed_param;
  21473. typedef struct {
  21474. A_UINT32 tlv_header;
  21475. A_UINT32 vdev_id;
  21476. } wmi_p2p_lo_stop_cmd_fixed_param;
  21477. typedef enum p2p_lo_stopped_reason_e {
  21478. P2P_LO_STOPPED_REASON_COMPLETE = 0, /* finished as scheduled */
  21479. P2P_LO_STOPPED_REASON_RECV_STOP_CMD, /* host stops it */
  21480. P2P_LO_STOPPED_REASON_INVALID_LO_PAR, /* invalid listen offload par */
  21481. P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, /* vdev cannot support it right now */
  21482. } p2p_lo_stopped_reason;
  21483. typedef struct {
  21484. A_UINT32 tlv_header;
  21485. A_UINT32 vdev_id;
  21486. A_UINT32 reason;/* refer to p2p_lo_stopped_reason_e */
  21487. } wmi_p2p_lo_stopped_event_fixed_param;
  21488. typedef enum {
  21489. WMI_MNT_FILTER_CONFIG_MANAGER,
  21490. WMI_MNT_FILTER_CONFIG_CONTROL,
  21491. WMI_MNT_FILTER_CONFIG_DATA,
  21492. WMI_MNT_FILTER_CONFIG_ALL,
  21493. WMI_MNT_FILTER_CONFIG_UNKNOWN,
  21494. } WMI_MNT_FILTER_CONFIG_TYPE;
  21495. typedef struct {
  21496. A_UINT32 tlv_header;
  21497. A_UINT32 vdev_id;
  21498. A_UINT32 clear_or_set;
  21499. A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
  21500. } wmi_mnt_filter_cmd_fixed_param;
  21501. typedef struct {
  21502. A_UINT32 time32; /* upper 32 bits of time stamp */
  21503. A_UINT32 time0; /* lower 32 bits of time stamp */
  21504. } A_TIME64;
  21505. typedef enum wmi_peer_sta_kickout_reason {
  21506. WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
  21507. WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
  21508. WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
  21509. WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
  21510. WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
  21511. WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
  21512. WMI_PEER_STA_KICKOUT_REASON_ROAMING_EVENT = 6, /* Directly connected peer has roamed to a repeater */
  21513. WMI_PEER_STA_KICKOUT_REASON_PMF_ERROR = 7, /* PMF error threshold is hit */
  21514. } PEER_KICKOUT_REASON;
  21515. typedef struct {
  21516. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
  21517. /** peer mac address */
  21518. wmi_mac_addr peer_macaddr;
  21519. /** Reason code, defined as above */
  21520. A_UINT32 reason;
  21521. /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
  21522. A_UINT32 rssi;
  21523. } wmi_peer_sta_kickout_event_fixed_param;
  21524. #define WMI_WLAN_PROFILE_MAX_HIST 3
  21525. #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
  21526. typedef struct _wmi_wlan_profile_t {
  21527. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
  21528. A_UINT32 id;
  21529. A_UINT32 cnt;
  21530. A_UINT32 tot;
  21531. A_UINT32 min;
  21532. A_UINT32 max;
  21533. A_UINT32 hist_intvl;
  21534. A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
  21535. } wmi_wlan_profile_t;
  21536. typedef struct _wmi_wlan_profile_ctx_t {
  21537. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
  21538. A_UINT32 tot; /* time in us */
  21539. A_UINT32 tx_msdu_cnt;
  21540. A_UINT32 tx_mpdu_cnt;
  21541. A_UINT32 tx_ppdu_cnt;
  21542. A_UINT32 rx_msdu_cnt;
  21543. A_UINT32 rx_mpdu_cnt;
  21544. A_UINT32 bin_count;
  21545. } wmi_wlan_profile_ctx_t;
  21546. typedef struct {
  21547. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
  21548. A_UINT32 enable;
  21549. } wmi_wlan_profile_trigger_cmd_fixed_param;
  21550. typedef struct {
  21551. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
  21552. A_UINT32 value;
  21553. } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
  21554. typedef struct {
  21555. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
  21556. A_UINT32 profile_id;
  21557. A_UINT32 value;
  21558. } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
  21559. typedef struct {
  21560. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
  21561. A_UINT32 profile_id;
  21562. A_UINT32 enable;
  21563. } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
  21564. /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
  21565. 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
  21566. when comparing wifi header.*/
  21567. /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
  21568. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
  21569. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
  21570. #define WOW_DEFAULT_BITMASK_SIZE 146
  21571. #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
  21572. #define WOW_MAX_BITMAP_FILTERS 32
  21573. #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
  21574. #define WOW_EXTEND_PATTERN_MATCH_CNT 16
  21575. #define WOW_SHORT_PATTERN_MATCH_CNT 8
  21576. #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
  21577. The 148 comes from (128 - 14) payload size + 8bytes LLC + 26bytes MAC header*/
  21578. #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
  21579. #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
  21580. #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
  21581. #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
  21582. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
  21583. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
  21584. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
  21585. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
  21586. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
  21587. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
  21588. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
  21589. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
  21590. typedef enum pattern_type_e {
  21591. WOW_PATTERN_MIN = 0,
  21592. WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
  21593. WOW_IPV4_SYNC_PATTERN,
  21594. WOW_IPV6_SYNC_PATTERN,
  21595. WOW_WILD_CARD_PATTERN,
  21596. WOW_TIMER_PATTERN,
  21597. WOW_MAGIC_PATTERN,
  21598. WOW_IPV6_RA_PATTERN,
  21599. WOW_IOAC_PKT_PATTERN,
  21600. WOW_IOAC_TMR_PATTERN,
  21601. WOW_IOAC_SOCK_PATTERN,
  21602. WOW_PATTERN_MAX
  21603. } WOW_PATTERN_TYPE;
  21604. typedef enum event_type_e {
  21605. WOW_BMISS_EVENT = 0, /* 0 */
  21606. WOW_BETTER_AP_EVENT, /* 1 */
  21607. WOW_DEAUTH_RECVD_EVENT, /* 2 */
  21608. WOW_MAGIC_PKT_RECVD_EVENT, /* 3 */
  21609. WOW_GTK_ERR_EVENT, /* 4 */
  21610. WOW_FOURWAY_HSHAKE_EVENT, /* 5 */
  21611. WOW_EAPOL_RECVD_EVENT, /* 6 */
  21612. WOW_NLO_DETECTED_EVENT, /* 7 */
  21613. WOW_DISASSOC_RECVD_EVENT, /* 8 */
  21614. WOW_PATTERN_MATCH_EVENT, /* 9 */
  21615. WOW_CSA_IE_EVENT, /* 10 */
  21616. WOW_PROBE_REQ_WPS_IE_EVENT, /* 11 */
  21617. WOW_AUTH_REQ_EVENT, /* 12 */
  21618. WOW_ASSOC_REQ_EVENT, /* 13 */
  21619. WOW_HTT_EVENT, /* 14 */
  21620. WOW_RA_MATCH_EVENT, /* 15 */
  21621. WOW_HOST_AUTO_SHUTDOWN_EVENT, /* 16 */
  21622. WOW_IOAC_MAGIC_EVENT, /* 17 */
  21623. WOW_IOAC_SHORT_EVENT, /* 18 */
  21624. WOW_IOAC_EXTEND_EVENT, /* 19 */
  21625. WOW_IOAC_TIMER_EVENT, /* 20 */
  21626. WOW_DFS_PHYERR_RADAR_EVENT, /* 21 */
  21627. WOW_BEACON_EVENT, /* 22 */
  21628. WOW_CLIENT_KICKOUT_EVENT, /* 23 */
  21629. WOW_NAN_EVENT, /* 24 */
  21630. WOW_EXTSCAN_EVENT, /* 25 */
  21631. WOW_IOAC_REV_KA_FAIL_EVENT, /* 26 */
  21632. WOW_IOAC_SOCK_EVENT, /* 27 */
  21633. WOW_NLO_SCAN_COMPLETE_EVENT, /* 28 */
  21634. WOW_NAN_DATA_EVENT, /* 29 */
  21635. WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED; 30 */
  21636. WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, /* reuse deprecated event value; 30 */
  21637. WOW_TDLS_CONN_TRACKER_EVENT, /* 31 */
  21638. WOW_CRITICAL_LOG_EVENT, /* 32 + 0 */
  21639. WOW_CHIP_POWER_FAILURE_DETECT_EVENT, /* 32 + 1 */
  21640. WOW_11D_SCAN_EVENT, /* 32 + 2 */
  21641. WOW_SAP_OBSS_DETECTION_EVENT, /* 32 + 3 */
  21642. WOW_BSS_COLOR_COLLISION_DETECT_EVENT, /* 32 + 4 */
  21643. WOW_TKIP_MIC_ERR_FRAME_RECVD_EVENT, /* 32 + 5 */
  21644. WOW_ROAM_PREAUTH_START_EVENT, /* 32 + 6 */
  21645. WOW_ROAM_PMKID_REQUEST_EVENT, /* 32 + 7 */
  21646. WOW_DFS_CAC_COMPLETE_EVENT, /* 32 + 8 */
  21647. WOW_VDEV_DISCONNECT_EVENT, /* 32 + 9 */
  21648. WOW_TWT_EVENT, /* 32 + 10 */
  21649. WOW_DCS_INTERFERENCE_DET, /* 32 + 11 */
  21650. WOW_ROAM_STATS_EVENT, /* 32 + 12 */
  21651. WOW_RTT_11AZ_EVENT, /* 32 + 13 */
  21652. WOW_P2P_NOA_EVENT, /* 32 + 14 */
  21653. WOW_XGAP_EVENT, /* 32 + 15 */
  21654. WOW_PAGE_FAULT_EVENT, /* 32 + 16 */
  21655. } WOW_WAKE_EVENT_TYPE;
  21656. typedef enum wake_reason_e {
  21657. WOW_REASON_UNSPECIFIED = -1,
  21658. WOW_REASON_NLOD = 0,
  21659. WOW_REASON_AP_ASSOC_LOST,
  21660. WOW_REASON_LOW_RSSI,
  21661. WOW_REASON_DEAUTH_RECVD,
  21662. WOW_REASON_DISASSOC_RECVD,
  21663. WOW_REASON_GTK_HS_ERR,
  21664. WOW_REASON_EAP_REQ,
  21665. WOW_REASON_FOURWAY_HS_RECV,
  21666. WOW_REASON_TIMER_INTR_RECV,
  21667. WOW_REASON_PATTERN_MATCH_FOUND,
  21668. WOW_REASON_RECV_MAGIC_PATTERN,
  21669. WOW_REASON_P2P_DISC,
  21670. WOW_REASON_WLAN_HB,
  21671. WOW_REASON_CSA_EVENT,
  21672. WOW_REASON_PROBE_REQ_WPS_IE_RECV,
  21673. WOW_REASON_AUTH_REQ_RECV,
  21674. WOW_REASON_ASSOC_REQ_RECV,
  21675. WOW_REASON_HTT_EVENT,
  21676. WOW_REASON_RA_MATCH,
  21677. WOW_REASON_HOST_AUTO_SHUTDOWN,
  21678. WOW_REASON_IOAC_MAGIC_EVENT,
  21679. WOW_REASON_IOAC_SHORT_EVENT,
  21680. WOW_REASON_IOAC_EXTEND_EVENT,
  21681. WOW_REASON_IOAC_TIMER_EVENT,
  21682. WOW_REASON_ROAM_HO,
  21683. WOW_REASON_DFS_PHYERR_RADADR_EVENT,
  21684. WOW_REASON_BEACON_RECV,
  21685. WOW_REASON_CLIENT_KICKOUT_EVENT,
  21686. WOW_REASON_NAN_EVENT,
  21687. WOW_REASON_EXTSCAN,
  21688. WOW_REASON_RSSI_BREACH_EVENT,
  21689. WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
  21690. WOW_REASON_IOAC_SOCK_EVENT,
  21691. WOW_REASON_NLO_SCAN_COMPLETE,
  21692. WOW_REASON_PACKET_FILTER_MATCH,
  21693. WOW_REASON_ASSOC_RES_RECV,
  21694. WOW_REASON_REASSOC_REQ_RECV,
  21695. WOW_REASON_REASSOC_RES_RECV,
  21696. WOW_REASON_ACTION_FRAME_RECV,
  21697. WOW_REASON_BPF_ALLOW,
  21698. WOW_REASON_NAN_DATA,
  21699. WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
  21700. WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, /* reuse deprecated reason value */
  21701. WOW_REASON_TDLS_CONN_TRACKER_EVENT,
  21702. WOW_REASON_CRITICAL_LOG,
  21703. WOW_REASON_P2P_LISTEN_OFFLOAD,
  21704. WOW_REASON_NAN_EVENT_WAKE_HOST,
  21705. WOW_REASON_CHIP_POWER_FAILURE_DETECT,
  21706. WOW_REASON_11D_SCAN,
  21707. WOW_REASON_THERMAL_CHANGE,
  21708. WOW_REASON_OIC_PING_OFFLOAD,
  21709. WOW_REASON_WLAN_DHCP_RENEW,
  21710. WOW_REASON_SAP_OBSS_DETECTION,
  21711. WOW_REASON_BSS_COLOR_COLLISION_DETECT,
  21712. WOW_REASON_TKIP_MIC_ERR_FRAME_RECVD_DETECT,
  21713. WOW_REASON_WLAN_MD, /* motion detected */
  21714. WOW_REASON_WLAN_BL, /* baselining done */
  21715. WOW_REASON_NTH_BCN_OFLD, /* nth beacon forward to host */
  21716. WOW_REASON_PKT_CAPTURE_MODE_WAKE,
  21717. WOW_REASON_PAGE_FAULT, /* Host wake up due to page fault */
  21718. WOW_REASON_ROAM_PREAUTH_START,
  21719. WOW_REASON_ROAM_PMKID_REQUEST,
  21720. WOW_REASON_RFKILL,
  21721. WOW_REASON_DFS_CAC,
  21722. WOW_REASON_VDEV_DISCONNECT,
  21723. WOW_REASON_LOCAL_DATA_UC_DROP,
  21724. WOW_REASON_GENERIC_WAKE, /* A generic reason that host should be woken up */
  21725. WOW_REASON_ERR_PKT_TRIGGERED_WAKEUP,
  21726. WOW_REASON_TWT,
  21727. WOW_REASON_FATAL_EVENT_WAKE,
  21728. WOW_REASON_DCS_INT_DET,
  21729. WOW_REASON_ROAM_STATS,
  21730. WOW_REASON_MDNS_WAKEUP,
  21731. WOW_REASON_RTT_11AZ,
  21732. WOW_REASON_P2P_NOA_UPDATE,
  21733. /* When Host configured timer elapsed for delayed wakeup */
  21734. WOW_REASON_DELAYED_WAKEUP_HOST_CFG_TIMER_ELAPSED,
  21735. /* Data store list is full, so Host wakeup should be triggered */
  21736. WOW_REASON_DELAYED_WAKEUP_DATA_STORE_LIST_FULL,
  21737. /* Sched PM FW initiated termination event */
  21738. WOW_REASON_SCHED_PM_TERMINATED,
  21739. /* XGAP entry/exit response */
  21740. WOW_REASON_XGAP,
  21741. /* COEX channel avoid event */
  21742. WOW_REASON_COEX_CHAVD,
  21743. /* vdev repurpose request event */
  21744. WOW_REASON_VDEV_REPURPOSE,
  21745. /* STX High duty cycle event */
  21746. WOW_REASON_STX_WOW_HIGH_DUTY_CYCLE,
  21747. /* WoW exit reason MCC lite */
  21748. WOW_REASON_MCC_LITE,
  21749. /* P2P CLI detected BMISS from DFS master AP */
  21750. WOW_REASON_P2P_CLI_DFS_AP_BMISS_DETECTED,
  21751. /* if Page Fault blocking feature enabled and PF observed under WoW */
  21752. WOW_REASON_PF_BLOCKING_LAST_TIME,
  21753. /* add new WOW_REASON_ defs before this line */
  21754. WOW_REASON_MAX,
  21755. WOW_REASON_DEBUG_TEST = 0xFF,
  21756. } WOW_WAKE_REASON_TYPE;
  21757. typedef enum {
  21758. WOW_IFACE_PAUSE_ENABLED,
  21759. WOW_IFACE_PAUSE_DISABLED
  21760. } WOW_IFACE_STATUS;
  21761. enum {
  21762. WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, /* some win10 platform will not assert pcie_reset for wow.*/
  21763. /* WMI_WOW_FLAG_SEND_PM_PME
  21764. * Some platforms have issues if the PM_PME message is sent after WoW,
  21765. * so don't send PM_PME after WoW unless the host uses this flag
  21766. * to request it.
  21767. */
  21768. WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
  21769. /* Flag to indicate unit test */
  21770. WMI_WOW_FLAG_UNIT_TEST_ENABLE = 0x00000004,
  21771. /* Force HTC wakeup */
  21772. WMI_WOW_FLAG_DO_HTC_WAKEUP = 0x00000008,
  21773. /* Enable L1SS sleep for PCIE DRV case */
  21774. WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP = 0x00000010,
  21775. /*
  21776. * To differentiate system suspend Vs RTPM BIT set -
  21777. * System Suspend WOW, BIT Reset- RTPM (DRV)
  21778. */
  21779. WMI_WOW_FLAG_SYSTEM_SUSPEND_WOW = 0x00000020,
  21780. /*
  21781. * Feature flag for INI enable_mod_dtim_on_system_suspend
  21782. * This flag/bit will be set if INI settings enable mod_dtim_on_sys_suspend.
  21783. */
  21784. WMI_WOW_FLAG_MOD_DTIM_ON_SYS_SUSPEND = 0x00000040,
  21785. /*
  21786. * Forced dtim in suspend mode enable Flag.
  21787. * setDtimInSuspendMode
  21788. */
  21789. WMI_WOW_FLAG_FORCED_DTIM_ON_SYS_SUSPEND = 0x00000080,
  21790. /* Flag to force DPD lock. */
  21791. WMI_WOW_FLAG_FORCED_DPD_LOCK = 0x00000100,
  21792. /*
  21793. * Feature flag for INI 'enable_teles_dtim_on_system_suspend'
  21794. * This flag/bit will be set if INI 'enable_teles_dtim_on_system_suspend'
  21795. * is enabled.
  21796. */
  21797. WMI_WOW_FLAG_TELES_DTIM_ON_SYS_SUSPEND = 0x00000200,
  21798. };
  21799. typedef struct {
  21800. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
  21801. A_UINT32 enable;
  21802. A_UINT32 pause_iface_config;
  21803. A_UINT32 flags; /* WMI_WOW_FLAG enums */
  21804. } wmi_wow_enable_cmd_fixed_param;
  21805. typedef enum {
  21806. WMI_WOW_RESUME_FLAG_TX_DATA = 0x00000001, /* TX data pending to be sent in resume */
  21807. } WMI_WOW_RESUME_FLAG_ENUM;
  21808. /* wow nack reason codes */
  21809. typedef enum {
  21810. /* WoW error due to unnkown reason */
  21811. WMI_WOW_NON_ACK_REASON_UNKNOWN = 0,
  21812. /* WoW error due to TX failure */
  21813. WMI_WOW_NON_ACK_REASON_TX = 1,
  21814. /* WoW error due to some data blocked */
  21815. WMI_WOW_NON_ACK_REASON_IS_BLOCK = 2,
  21816. /* WoW error in WFA mode */
  21817. WMI_WOW_NON_ACK_REASON_NOT_ALLOW = 3,
  21818. /* WoW error mac operation fail */
  21819. WMI_WOW_NON_ACK_REASON_HW_FAIL = 4,
  21820. /* WoW error due to timeout */
  21821. WMI_WOW_NON_ACK_REASON_TIMEOUT = 5,
  21822. /* WoW error due to RTT or CFR capture active */
  21823. WMI_WOW_NON_ACK_REASON_RTT_DMA = 6,
  21824. /* WoW error due to roam module holding lock */
  21825. WMI_WOW_NON_ACK_REASON_ROAM = 7,
  21826. /* WoW error remote peer not sleeping */
  21827. WMI_WOW_NON_ACK_REASON_PEER_ACTIVE = 8,
  21828. /* WoW error due to WoW entry defer failed */
  21829. WMI_WOW_NON_ACK_REASON_DEFER_FAILURE = 9,
  21830. /* WoW error due to WoW entry defer timeout */
  21831. WMI_WOW_NON_ACK_REASON_DEFER_TIMEOUT = 10,
  21832. /* WoW error due to FATAL event */
  21833. WMI_WOW_NON_ACK_REASON_FATAL_EVENT = 11,
  21834. /* WoW error if close to TBTT */
  21835. WMI_WOW_NON_ACK_REASON_CLOSE_TO_TBTT = 12,
  21836. } WMI_WOW_NACK_STATUS;
  21837. typedef struct {
  21838. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
  21839. /* reserved0:
  21840. * This "reserved" field is not actually reserved any more.
  21841. * It is being used in certain FW branches to hold flags, whose values
  21842. * are defined by WMI_WOW_RESUME_FLAG_ENUM.
  21843. */
  21844. union {
  21845. A_UINT32 reserved0;
  21846. A_UINT32 flags;
  21847. };
  21848. } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
  21849. #define WOW_ICMPV6_NA_FILTER_DISABLE 0
  21850. #define WOW_ICMPV6_NA_FILTER_ENABLE 1
  21851. typedef struct {
  21852. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param */
  21853. A_UINT32 vdev_id;
  21854. A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
  21855. } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
  21856. typedef struct bitmap_pattern_s {
  21857. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
  21858. A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
  21859. A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
  21860. A_UINT32 pattern_offset;
  21861. A_UINT32 pattern_len;
  21862. A_UINT32 bitmask_len;
  21863. A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
  21864. } WOW_BITMAP_PATTERN_T;
  21865. typedef struct ipv4_sync_s {
  21866. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
  21867. A_UINT32 ipv4_src_addr;
  21868. A_UINT32 ipv4_dst_addr;
  21869. A_UINT32 tcp_src_prt;
  21870. A_UINT32 tcp_dst_prt;
  21871. } WOW_IPV4_SYNC_PATTERN_T;
  21872. typedef struct ipv6_sync_s {
  21873. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
  21874. A_UINT32 ipv6_src_addr[4];
  21875. A_UINT32 ipv6_dst_addr[4];
  21876. A_UINT32 tcp_src_prt;
  21877. A_UINT32 tcp_dst_prt;
  21878. } WOW_IPV6_SYNC_PATTERN_T;
  21879. typedef struct WOW_MAGIC_PATTERN_CMD
  21880. {
  21881. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
  21882. wmi_mac_addr macaddr;
  21883. } WOW_MAGIC_PATTERN_CMD;
  21884. typedef enum wow_ioac_pattern_type {
  21885. WOW_IOAC_MAGIC_PATTERN = 1,
  21886. WOW_IOAC_SHORT_PATTERN,
  21887. WOW_IOAC_EXTEND_PATTERN,
  21888. } WOW_IOAC_PATTERN_TYPE;
  21889. typedef struct ioac_sock_pattern_s {
  21890. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T */
  21891. A_UINT32 id;
  21892. A_UINT32 local_ipv4;
  21893. A_UINT32 remote_ipv4;
  21894. A_UINT32 local_port;
  21895. A_UINT32 remote_port;
  21896. A_UINT32 pattern_len; /* units = bytes */
  21897. A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
  21898. WMI_IPV6_ADDR local_ipv6;
  21899. WMI_IPV6_ADDR remote_ipv6;
  21900. A_UINT32 ack_nak_len;
  21901. A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  21902. A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  21903. } WOW_IOAC_SOCK_PATTERN_T;
  21904. typedef struct ioac_pkt_pattern_s {
  21905. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
  21906. A_UINT32 pattern_type;
  21907. A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
  21908. A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
  21909. A_UINT32 pattern_len;
  21910. A_UINT32 random_len;
  21911. } WOW_IOAC_PKT_PATTERN_T;
  21912. typedef struct ioac_tmr_pattern_s {
  21913. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
  21914. A_UINT32 wake_in_s;
  21915. A_UINT32 vdev_id;
  21916. } WOW_IOAC_TMR_PATTERN_T;
  21917. typedef struct {
  21918. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
  21919. A_UINT32 nID;
  21920. } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
  21921. typedef struct {
  21922. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
  21923. A_UINT32 nID;
  21924. } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
  21925. typedef struct ioac_keepalive_s {
  21926. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
  21927. A_UINT32 keepalive_pkt_buf[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
  21928. A_UINT32 keepalive_pkt_len;
  21929. A_UINT32 period_in_ms;
  21930. A_UINT32 vdev_id;
  21931. A_UINT32 max_loss_cnt;
  21932. A_UINT32 local_ipv4;
  21933. A_UINT32 remote_ipv4;
  21934. A_UINT32 local_port;
  21935. A_UINT32 remote_port;
  21936. A_UINT32 recv_period_in_ms;
  21937. A_UINT32 rev_ka_size;
  21938. A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
  21939. WMI_IPV6_ADDR local_ipv6;
  21940. WMI_IPV6_ADDR remote_ipv6;
  21941. } WMI_WOW_IOAC_KEEPALIVE_T;
  21942. typedef struct {
  21943. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
  21944. A_UINT32 vdev_id;
  21945. A_UINT32 pattern_type;
  21946. /*
  21947. * Following this struct are these TLVs. Note that they are all array of structures
  21948. * but can have at most one element. Which TLV is empty or has one element depends
  21949. * on the field pattern_type. This is to emulate an union.
  21950. * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
  21951. * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
  21952. */
  21953. } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
  21954. typedef struct {
  21955. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
  21956. A_UINT32 vdev_id;
  21957. A_UINT32 pattern_type;
  21958. A_UINT32 pattern_id;
  21959. } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
  21960. typedef struct {
  21961. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
  21962. A_UINT32 vdev_id;
  21963. A_UINT32 pattern_id;
  21964. A_UINT32 pattern_type;
  21965. /*
  21966. * Following this struct are these TLVs. Note that they are all array of structures
  21967. * but can have at most one element. Which TLV is empty or has one element depends
  21968. * on the field pattern_type. This is to emulate an union.
  21969. * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
  21970. * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
  21971. * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
  21972. * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
  21973. * A_UINT32 pattern_info_timeout[];
  21974. * A_UINT32 ra_ratelimit_interval;
  21975. */
  21976. } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
  21977. typedef struct {
  21978. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
  21979. A_UINT32 vdev_id;
  21980. A_UINT32 pattern_id;
  21981. A_UINT32 pattern_type;
  21982. } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
  21983. #define WMI_WOW_MAX_EVENT_BM_LEN 4
  21984. typedef struct {
  21985. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
  21986. A_UINT32 vdev_id;
  21987. A_UINT32 is_add;
  21988. union {
  21989. A_UINT32 event_bitmap;
  21990. A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
  21991. };
  21992. } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
  21993. /*
  21994. * This structure is used to set the pattern to check UDP packet in WOW mode.
  21995. * If match, construct a tx frame in a local buffer to send through the peer
  21996. * AP to the entity in the IP network that sent the UDP packet to this STA.
  21997. */
  21998. typedef struct {
  21999. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param */
  22000. A_UINT32 vdev_id;
  22001. A_UINT32 enable; /* 1: enable, 0: disable*/
  22002. /* dest_port -
  22003. * bits 7:0 contain the LSB of the UDP dest port,
  22004. * bits 15:8 contain the MSB of the UDP dest port
  22005. */
  22006. A_UINT32 dest_port;
  22007. A_UINT32 pattern_len; /* length in byte of pattern[] */
  22008. A_UINT32 response_len; /* length in byte of response[] */
  22009. /* Following this struct are the TLV's:
  22010. * A_UINT8 pattern[]; <-- payload of UDP packet to be checked, network byte order
  22011. * A_UINT8 response[]; <-- payload of UDP packet to be response, network byte order
  22012. */
  22013. } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
  22014. /*
  22015. * This structure is used to set the pattern for WOW host wakeup pin pulse pattern confirguration.
  22016. */
  22017. typedef struct {
  22018. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param */
  22019. A_UINT32 enable; /* 1: enable, 0: disable */
  22020. A_UINT32 pin; /* pin for host wakeup */
  22021. A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
  22022. A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
  22023. A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
  22024. A_UINT32 init_state; /* Sense of the GPIO pin used for host wakeups.
  22025. * If init_state is 0, a low --> high transition
  22026. * causes a host wakeup interrupt.
  22027. * If init_state is 1, a high --> low transition
  22028. * causes a host wakeup interrupt.
  22029. */
  22030. } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
  22031. #define MAX_SUPPORTED_ACTION_CATEGORY 256
  22032. #define MAX_SUPPORTED_ACTION_SUBCATEGORY 32
  22033. #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
  22034. typedef enum {
  22035. WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
  22036. WOW_ACTION_WAKEUP_OPERATION_SET,
  22037. WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
  22038. WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
  22039. } WOW_ACTION_WAKEUP_OPERATION;
  22040. typedef struct {
  22041. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param */
  22042. A_UINT32 vdev_id;
  22043. A_UINT32 operation; /* 0 reset to fw default, 1 set the bits, 2 add the setting bits, 3 delete the setting bits */
  22044. A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
  22045. /* This fixed_param TLV is followed by these additional TLV's
  22046. * action_bitmaps_per_category -
  22047. * Each element is a 32-bit bitmap indicating which subcategories
  22048. * for that particular action category are considered for WoW wakeup
  22049. * (if the subcategory's bit is 0) or ignored for WoW wakeup (if the
  22050. * subcategory's bit is 1).
  22051. *
  22052. * A_UINT32 action_bitmaps_per_category[]; <-- variable length array
  22053. */
  22054. } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
  22055. typedef union {
  22056. /* the bytes within these IP addresses are arranged in network byte order */
  22057. A_UINT8 ipv4_addr[4];
  22058. A_UINT8 ipv6_addr[16];
  22059. } WMI_IP_ADDR;
  22060. #define WMI_COAP_IPTV6_BIT_POS 0
  22061. #define WMI_COAP_ADDR_TYPE_BIT_POS 1
  22062. #define WMI_COAP_IPV6_SET(param, value) \
  22063. WMI_SET_BITS(param, WMI_COAP_IPTV6_BIT_POS, 1, value)
  22064. #define WMI_COAP_IPV6_GET(param) \
  22065. WMI_GET_BITS(param, WMI_COAP_IPTV6_BIT_POS, 1)
  22066. #define WMI_COAP_ADDR_TYPE_SET(param, value) \
  22067. WMI_SET_BITS(param, WMI_COAP_ADDR_TYPE_BIT_POS, 1, value)
  22068. #define WMI_COAP_ADDR_TYPE_GET(param) \
  22069. WMI_GET_BITS(param, WMI_COAP_ADDR_TYPE_BIT_POS, 1)
  22070. typedef struct {
  22071. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param */
  22072. A_UINT32 vdev_id;
  22073. A_UINT32 pattern_id;
  22074. /* pattern_type:
  22075. * Indicates the type of pattern to be enabled
  22076. * Bit 0: Indicate pattern IP ADDR is IPV6 or IPV4
  22077. * Bit 1: Indicate pattern ADDR TYPE is BC or UC/MC
  22078. * Bits 31:2 Reserved for future use
  22079. *
  22080. * Refer to WMI_COAP_IPV6_SET,GET and WMI_COAP_ADDR_TYPE_SET,GET macros
  22081. */
  22082. A_UINT32 pattern_type;
  22083. A_UINT32 timeout; /* the cached packet expire timeout in ms */
  22084. /* the dst ip address(uc/mc/bc), dst port to match CoAP message */
  22085. WMI_IP_ADDR match_udp_ip; /* network byte order */
  22086. A_UINT32 match_udp_port;
  22087. /* DUT ip address and port for CoAP replay message */
  22088. WMI_IP_ADDR udp_local_ip; /* network byte order */
  22089. A_UINT32 udp_local_port;
  22090. A_UINT32 verify_offset; /* UDP payload offset to verify */
  22091. A_UINT32 verify_len; /* UDP payload length to verofy*/
  22092. A_UINT32 coapmsg_len; /* CoAP reply message length */
  22093. /* The below TLV (tag length value) parameters follow this fixed_param TLV:
  22094. * A_UINT8 verify_string[]; verify content,
  22095. * length identified by verify_len;
  22096. * A_UINT8 coapmsg[]; CoAP reply message,
  22097. * length identified by coapmsg_len;
  22098. */
  22099. } WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param;
  22100. typedef struct {
  22101. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param */
  22102. A_UINT32 vdev_id;
  22103. A_UINT32 pattern_id;
  22104. } WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param;
  22105. typedef struct {
  22106. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param */
  22107. A_UINT32 vdev_id;
  22108. A_UINT32 pattern_id;
  22109. /* pattern_type:
  22110. * Indicates the type of pattern to be enabled
  22111. * Bit 0: Indicate pattern IP ADDR is IPV6 or IPV4
  22112. * Bit 1: Indicate pattern ADDR TYPE is BC or UC/MC
  22113. * Bits 31:2 Reserved for future use
  22114. *
  22115. * Refer to WMI_COAP_IPV6_SET,GET and WMI_COAP_ADDR_TYPE_SET,GET macros
  22116. */
  22117. A_UINT32 pattern_type;
  22118. /* ip address and port for CoAP send keepalive message */
  22119. WMI_IP_ADDR udp_local_ip; /* network byte order */
  22120. A_UINT32 udp_local_port;
  22121. WMI_IP_ADDR udp_remote_ip; /* network byte order */
  22122. A_UINT32 udp_remote_port;
  22123. A_UINT32 timeout; /* the periorid to send keepalive message in ms */
  22124. A_UINT32 coapmsg_len; /* keeplive CoAP message length */
  22125. /* The below TLV (tag length value) parameters follow this fixed_param TLV:
  22126. * A_UINT8 coapmsg[]; CoAP keepalive message,
  22127. * length specified by coapmsg_len field
  22128. */
  22129. } WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param;
  22130. typedef struct {
  22131. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param */
  22132. A_UINT32 vdev_id;
  22133. A_UINT32 pattern_id;
  22134. } WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param;
  22135. typedef struct {
  22136. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param */
  22137. A_UINT32 vdev_id;
  22138. A_UINT32 pattern_id;
  22139. } WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param;
  22140. typedef struct {
  22141. A_UINT32 tlv_hdr; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_coap_tuple */
  22142. A_UINT64 tsf; /* host and firmware sync tsf */
  22143. /* flag:
  22144. * Indicates the type of ip address
  22145. * Bit 0: Indicate ip address is IPV6 or IPV4
  22146. * Bits 31:1 Reserved for future use
  22147. *
  22148. * Refer to WMI_COAP_IPV6_SET,GET macros
  22149. */
  22150. A_UINT32 flag;
  22151. WMI_IP_ADDR src_ip; /* network byte order */
  22152. A_UINT32 payload_len;
  22153. } wmi_coap_tuple;
  22154. typedef struct {
  22155. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_BUF_INFO_fixed_param */
  22156. A_UINT32 vdev_id;
  22157. A_UINT32 pattern_id;
  22158. /** more_data will be set depending on the number of tuples need transmit */
  22159. A_UINT32 more_tuples;
  22160. /* The below TLV (tag length value) parameters follow this fixed_param TLV:
  22161. * wmi_coap_tuple coap_tuple[]; <-- Array of coap_tuple.
  22162. * A_UINT32 payloads[] <-- the cached received CoAP messages.
  22163. * The number of message payloads combined into the payloads[]
  22164. * array matches the number of coap tuples.
  22165. * The length of each message payload is specified by the
  22166. * "payload_len" field in the corresponding coap_tuple.
  22167. * The subsequent message payload starts at the next 4-byte aligned
  22168. * position within payloads[].
  22169. * For example, if there are 3 coap_tuples, with
  22170. * coap_tuples[0].payload_len = 12
  22171. * coap_tuples[1].payload_len = 23
  22172. * coap_tuples[2].payload_len = 34
  22173. * then msg 0 payload will be stored in payloads[0] - payloads[11]
  22174. * message 1 payload will be stored in payloads[12] - payloads[34]
  22175. * message 2 payload will be stored in payloads[36] - payloads[69]
  22176. */
  22177. } WMI_WOW_COAP_BUF_INFO_EVENT_fixed_param;
  22178. typedef struct wow_event_info_s {
  22179. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
  22180. A_UINT32 vdev_id;
  22181. A_UINT32 flag; /*This is current reserved.*/
  22182. A_INT32 wake_reason;
  22183. A_UINT32 data_len;
  22184. A_UINT32 delayed_pkt_count;
  22185. } WOW_EVENT_INFO_fixed_param;
  22186. typedef struct wow_initial_wakeup_event_s {
  22187. A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param */
  22188. A_UINT32 vdev_id;
  22189. } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
  22190. typedef enum {
  22191. WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
  22192. WOW_EVENT_INFO_TYPE_BITMAP,
  22193. WOW_EVENT_INFO_TYPE_GTKIGTK,
  22194. } WOW_EVENT_INFO_TYPE;
  22195. typedef struct wow_event_info_section_s {
  22196. A_UINT32 data_type;
  22197. A_UINT32 data_len;
  22198. } WOW_EVENT_INFO_SECTION;
  22199. typedef struct wow_event_info_section_packet_s {
  22200. A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
  22201. } WOW_EVENT_INFO_SECTION_PACKET;
  22202. typedef struct wow_event_info_section_bitmap_s {
  22203. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
  22204. A_UINT32 flag; /*This is current reserved.*/
  22205. A_UINT32 value; /*This could be the pattern id for bitmap pattern.*/
  22206. A_UINT32 org_len; /*The length of the original packet.*/
  22207. } WOW_EVENT_INFO_SECTION_BITMAP;
  22208. /**
  22209. * This command is sent from WLAN host driver to firmware to
  22210. * enable or disable D0-WOW. D0-WOW means APSS suspend with
  22211. * PCIe link and DDR being active.
  22212. *
  22213. *
  22214. * Entering D0-WOW Mode (based on kernel suspend request):
  22215. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
  22216. * target: Take action (e.g. dbglog suspend)
  22217. * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
  22218. *
  22219. * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
  22220. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
  22221. * target: Take action (e.g. dbglog resume)
  22222. * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
  22223. *
  22224. * This command is applicable only on the PCIE LL systems
  22225. * Host can enter either D0-WOW or WOW mode, but NOT both at same time
  22226. * Decision to enter D0-WOW or WOW is based on active interfaces
  22227. *
  22228. */
  22229. typedef struct {
  22230. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
  22231. A_UINT32 enable; /* 1 = enable, 0 = disable */
  22232. } wmi_d0_wow_enable_disable_cmd_fixed_param;
  22233. typedef enum extend_wow_type_e {
  22234. EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
  22235. EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
  22236. EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
  22237. EXTWOW_TYPE_APP_PULSETEST,
  22238. EXTWOW_DISABLED = 255,
  22239. } EXTWOW_TYPE;
  22240. typedef struct {
  22241. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
  22242. A_UINT32 vdev_id;
  22243. A_UINT32 type;
  22244. A_UINT32 wakeup_pin_num;
  22245. A_UINT32 swol_pulsetest_type;
  22246. A_UINT32 swol_pulsetest_application;
  22247. } wmi_extwow_enable_cmd_fixed_param;
  22248. #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
  22249. #define SWOL_INDOOR_KEY_LEN 16
  22250. typedef struct {
  22251. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
  22252. A_UINT32 vdev_id;
  22253. wmi_mac_addr wakee_mac;
  22254. A_UINT8 ident[8];
  22255. A_UINT8 passwd[16];
  22256. A_UINT32 ident_len;
  22257. A_UINT32 passwd_len;
  22258. /* indoor check parameters */
  22259. /* key for mac addresses specified in swol_indoor_key_mac
  22260. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  22261. * segment of this array, so the bytes will return to their original
  22262. * order when the entire WMI message contents are byte-swapped to
  22263. * convert from big-endian to little-endian format.
  22264. */
  22265. A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
  22266. /* key length for specified mac address index
  22267. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  22268. * segment of this array, so the bytes will return to their original
  22269. * order when the entire WMI message contents are byte-swapped to
  22270. * convert from big-endian to little-endian format.
  22271. */
  22272. A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  22273. /* mac address array allowed to wakeup host*/
  22274. wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  22275. /* app mask for the mac addresses specified in swol_indoor_key_mac */
  22276. A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  22277. A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
  22278. A_UINT32 swol_indoor_pw_check; /* whether to check password */
  22279. A_UINT32 swol_indoor_pattern; /* wakeup pattern */
  22280. A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
  22281. A_UINT32 swol_indoor_exception_app;
  22282. A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
  22283. } wmi_extwow_set_app_type1_params_cmd_fixed_param;
  22284. typedef struct {
  22285. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
  22286. A_UINT32 vdev_id;
  22287. A_UINT8 rc4_key[16];
  22288. A_UINT32 rc4_key_len;
  22289. /** ip header parameter */
  22290. A_UINT32 ip_id; /* NC id */
  22291. A_UINT32 ip_device_ip; /* NC IP address */
  22292. A_UINT32 ip_server_ip; /* Push server IP address */
  22293. /** tcp header parameter */
  22294. A_UINT16 tcp_src_port; /* NC TCP port */
  22295. A_UINT16 tcp_dst_port; /* Push server TCP port */
  22296. A_UINT32 tcp_seq;
  22297. A_UINT32 tcp_ack_seq;
  22298. A_UINT32 keepalive_init; /* Initial ping interval */
  22299. A_UINT32 keepalive_min; /* Minimum ping interval */
  22300. A_UINT32 keepalive_max; /* Maximum ping interval */
  22301. A_UINT32 keepalive_inc; /* Increment of ping interval */
  22302. wmi_mac_addr gateway_mac;
  22303. A_UINT32 tcp_tx_timeout_val;
  22304. A_UINT32 tcp_rx_timeout_val;
  22305. /** add extra parameter for backward-compatible */
  22306. /*
  22307. * For all byte arrays, natural order is used. E.g.
  22308. * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
  22309. * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
  22310. */
  22311. /* used to encrypt transmit packet such as keep-alive */
  22312. A_UINT8 rc4_write_sandbox[256];
  22313. A_UINT32 rc4_write_x;
  22314. A_UINT32 rc4_write_y;
  22315. /* used to decrypt received packet such as wow data */
  22316. A_UINT8 rc4_read_sandbox[256];
  22317. A_UINT32 rc4_read_x;
  22318. A_UINT32 rc4_read_y;
  22319. /* used to calculate HMAC hash for transmit packet such as keep-alive */
  22320. A_UINT8 ssl_write_seq[8];
  22321. A_UINT8 ssl_sha1_write_key[64];
  22322. A_UINT32 ssl_sha1_write_key_len;
  22323. /* used to calculate HAMC hash for receive packet such as wow data */
  22324. A_UINT8 ssl_read_seq[8];
  22325. A_UINT8 ssl_sha1_read_key[64];
  22326. A_UINT32 ssl_sha1_read_key_len;
  22327. /* optional element for specifying TCP options data to include in
  22328. * transmit packets such as keep-alive
  22329. */
  22330. A_UINT32 tcp_options_len;
  22331. A_UINT8 tcp_options[40];
  22332. A_UINT32 async_id; /* keep-alive request id */
  22333. } wmi_extwow_set_app_type2_params_cmd_fixed_param;
  22334. #define WMI_RXERR_CRC 0x01 /* CRC error on frame */
  22335. #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  22336. #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  22337. #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  22338. #define WMI_RX_OFFLOAD_MON_MODE 0x40 /* Offload dropped mgmt pkt's for only in capture mode*/
  22339. #define WMI_RXERR_PN 0x80 /* Invalid PN number on frame */
  22340. typedef enum {
  22341. PKT_PWR_SAVE_PAID_MATCH = 0x00000001,
  22342. PKT_PWR_SAVE_GID_MATCH = 0x00000002,
  22343. PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x00000004,
  22344. PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x00000008,
  22345. PKT_PWR_SAVE_EOF_PAD_DELIM = 0x00000010,
  22346. PKT_PWR_SAVE_MACADDR_MISMATCH = 0x00000020,
  22347. PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x00000040,
  22348. PKT_PWR_SAVE_GID_NSTS_ZERO = 0x00000080,
  22349. PKT_PWR_SAVE_RSSI_CHECK = 0x00000100,
  22350. PKT_PWR_SAVE_5G_EBT = 0x00000200,
  22351. PKT_PWR_SAVE_2G_EBT = 0x00000400,
  22352. PKT_PWR_SAVE_BSS_COLOR_MISMATCH = 0x00000800,
  22353. PKT_PWR_SAVE_UL_FLAG = 0x00001000,
  22354. PKT_PWR_SAVE_STA_ID_MISMATCH = 0x00002000,
  22355. PKT_PWR_SAVE_MACADDR_MISMATCH_FCS = 0x00004000,
  22356. PKT_PWR_SAVE_ENABLE = 0x80000000,
  22357. } WMI_PKT_PWR_SAVE_TYPE;
  22358. typedef struct {
  22359. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
  22360. A_UINT32 num_data; /** length in byte of data[]. */
  22361. /** pdev_id for identifying the MAC
  22362. * See macros starting with WMI_PDEV_ID_ for values.
  22363. */
  22364. A_UINT32 pdev_id;
  22365. /* This structure is used to send Factory Test Mode [FTM] command
  22366. * from host to firmware for integrated chips which are binary blobs.
  22367. * Following this structure is the TLV:
  22368. * A_UINT8 data[]; <-- length in byte given by field num_data.
  22369. */
  22370. } wmi_ftm_intg_cmd_fixed_param;
  22371. typedef struct {
  22372. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
  22373. A_UINT32 num_data; /** length in byte of data[]. */
  22374. /* This structure is used to receive Factory Test Mode [FTM] event
  22375. * from firmware to host for integrated chips which are binary blobs.
  22376. * Following this structure is the TLV:
  22377. * A_UINT8 data[]; <-- length in byte given by field num_data.
  22378. */
  22379. } wmi_ftm_intg_event_fixed_param;
  22380. #define WMI_MAX_NS_OFFLOADS 2
  22381. #define WMI_MAX_ARP_OFFLOADS 2
  22382. #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  22383. #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  22384. #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  22385. typedef struct {
  22386. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
  22387. A_UINT32 flags; /* flags */
  22388. A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node*/
  22389. A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
  22390. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  22391. } WMI_ARP_OFFLOAD_TUPLE;
  22392. #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  22393. #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  22394. #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  22395. #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3) /* whether the configured IPv6 address is anycast */
  22396. #define WMI_NSOFF_MAX_TARGET_IPS 2
  22397. typedef struct {
  22398. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
  22399. A_UINT32 flags; /* flags */
  22400. /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
  22401. WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
  22402. WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
  22403. WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
  22404. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  22405. } WMI_NS_OFFLOAD_TUPLE;
  22406. typedef struct {
  22407. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
  22408. A_UINT32 flags;
  22409. A_UINT32 vdev_id;
  22410. A_UINT32 num_ns_ext_tuples;
  22411. /* Following this structure are the TLVs:
  22412. * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
  22413. * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
  22414. * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; <-- size based on num_ns_ext_tuples
  22415. */
  22416. } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
  22417. typedef struct {
  22418. A_UINT32 tlv_header;
  22419. A_UINT32 vdev_id;
  22420. A_UINT32 pattern_id;
  22421. A_UINT32 timeout;
  22422. A_UINT32 length;
  22423. /*Following this would be the pattern
  22424. A_UINT8 pattern[] of length specified by length
  22425. field in the structure.*/
  22426. } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  22427. typedef struct {
  22428. A_UINT32 tlv_header;
  22429. A_UINT32 vdev_id;
  22430. A_UINT32 pattern_id;
  22431. } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  22432. typedef struct {
  22433. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
  22434. /** unique id identifying the VDEV, generated by the caller */
  22435. A_UINT32 vdev_id;
  22436. /** peer MAC address */
  22437. wmi_mac_addr peer_macaddr;
  22438. /** Tid number */
  22439. A_UINT32 tid;
  22440. /** Initiator (1) or Responder (0) for this aggregation */
  22441. A_UINT32 initiator;
  22442. /** size of the negotiated window */
  22443. A_UINT32 window_size;
  22444. /** starting sequence number (only valid for initiator) */
  22445. A_UINT32 ssn;
  22446. /** timeout field represents the time to wait for Block Ack in
  22447. * initiator case and the time to wait for BAR in responder
  22448. * case. 0 represents no timeout. */
  22449. A_UINT32 timeout;
  22450. /* BA policy: immediate ACK (0) or delayed ACK (1) */
  22451. A_UINT32 policy;
  22452. } wmi_peer_tid_addba_cmd_fixed_param;
  22453. typedef struct {
  22454. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
  22455. /** unique id identifying the VDEV, generated by the caller */
  22456. A_UINT32 vdev_id;
  22457. /** peer MAC address */
  22458. wmi_mac_addr peer_macaddr;
  22459. /** Tid number */
  22460. A_UINT32 tid;
  22461. /** Initiator (1) or Responder (0) for this aggregation */
  22462. A_UINT32 initiator;
  22463. } wmi_peer_tid_delba_cmd_fixed_param;
  22464. typedef struct {
  22465. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
  22466. /** unique id identifying the VDEV, generated by the caller */
  22467. A_UINT32 vdev_id;
  22468. /** peer MAC address */
  22469. wmi_mac_addr peer_macaddr;
  22470. /** Tid number */
  22471. A_UINT32 tid;
  22472. /** Event status */
  22473. A_UINT32 status;
  22474. } wmi_tx_addba_complete_event_fixed_param;
  22475. typedef struct {
  22476. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
  22477. /** unique id identifying the VDEV, generated by the caller */
  22478. A_UINT32 vdev_id;
  22479. /** peer MAC address */
  22480. wmi_mac_addr peer_macaddr;
  22481. /** Tid number */
  22482. A_UINT32 tid;
  22483. /** Event status */
  22484. A_UINT32 status;
  22485. } wmi_tx_delba_complete_event_fixed_param;
  22486. /*
  22487. * Structure to request sequence numbers for a given
  22488. * peer station on different TIDs. The TIDs are
  22489. * indicated in the tidBitMap, tid 0 would
  22490. * be represented by LSB bit 0. tid 1 would be
  22491. * represented by LSB bit 1 etc.
  22492. * The target will retrieve the current sequence
  22493. * numbers for the peer on all the TIDs requested
  22494. * and send back a response in a WMI event.
  22495. */
  22496. typedef struct
  22497. {
  22498. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  22499. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
  22500. wmi_mac_addr peer_macaddr;
  22501. A_UINT32 tidBitmap;
  22502. } wmi_ba_req_ssn;
  22503. typedef struct {
  22504. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  22505. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
  22506. /** unique id identifying the VDEV, generated by the caller */
  22507. A_UINT32 vdev_id;
  22508. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  22509. A_UINT32 num_ba_req_ssn;
  22510. /* Following this struct are the TLV's:
  22511. * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
  22512. */
  22513. } wmi_ba_req_ssn_cmd_fixed_param;
  22514. /*
  22515. * Max transmit categories
  22516. *
  22517. * Note: In future if we need to increase WMI_MAX_TC definition
  22518. * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
  22519. */
  22520. #define WMI_MAX_TC 8
  22521. /*
  22522. * Structure to send response sequence numbers
  22523. * for a give peer and tidmap.
  22524. */
  22525. typedef struct
  22526. {
  22527. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  22528. WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
  22529. wmi_mac_addr peer_macaddr;
  22530. /* A boolean to indicate if ssn is present */
  22531. A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
  22532. /* The ssn from target, valid only if
  22533. * ssn_present_for_tid[tidn] equals 1
  22534. */
  22535. A_UINT32 ssn_for_tid[WMI_MAX_TC];
  22536. } wmi_ba_event_ssn;
  22537. typedef struct {
  22538. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  22539. WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
  22540. /** unique id identifying the VDEV, generated by the caller */
  22541. A_UINT32 vdev_id;
  22542. /** Event status, success or failure of the overall operation */
  22543. A_UINT32 status;
  22544. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  22545. A_UINT32 num_ba_event_ssn;
  22546. /* Following this struct are the TLV's:
  22547. * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
  22548. */
  22549. } wmi_ba_rsp_ssn_event_fixed_param;
  22550. enum wmi_aggr_state_req_type {
  22551. WMI_DISABLE_AGGREGATION,
  22552. WMI_ENABLE_AGGREGATION
  22553. };
  22554. /*
  22555. * This event is generated by the COEX module
  22556. * when esco call is begins the coex module in fw generated this event to host to
  22557. * disable the RX aggregation and after completion of the esco call fw will indicate to
  22558. * enable back the Rx aggregation .
  22559. */
  22560. typedef struct {
  22561. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
  22562. /** unique id identifying the VDEV, generated by the caller */
  22563. A_UINT32 vdev_id;
  22564. /** req_type contains values from enum
  22565. * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
  22566. A_UINT32 req_type;
  22567. } wmi_aggr_state_trig_event_fixed_param;
  22568. typedef struct {
  22569. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
  22570. /** unique id identifying the VDEV, generated by the caller */
  22571. A_UINT32 vdev_id;
  22572. /** MAC address used for installing */
  22573. wmi_mac_addr peer_macaddr;
  22574. /** key index */
  22575. A_UINT32 key_ix;
  22576. /** key flags */
  22577. A_UINT32 key_flags;
  22578. /** Event status */
  22579. A_UINT32 status;
  22580. } wmi_vdev_install_key_complete_event_fixed_param;
  22581. typedef enum {
  22582. /* CSA_SA_QUERY_TIMEOUT:
  22583. * Disconnect due to SA query timeout after moving to new channel
  22584. * due to CSA in OCV enabled case.
  22585. */
  22586. WLAN_DISCONNECT_REASON_CSA_SA_QUERY_TIMEOUT = 1,
  22587. /* MOVE_TO_CELLULAR:
  22588. * Disconnect from WiFi to move to cellular
  22589. */
  22590. WLAN_DISCONNECT_REASON_MOVE_TO_CELLULAR,
  22591. } WMI_VDEV_DISCONNECT_REASON_ID;
  22592. typedef struct {
  22593. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_disconnect_event_fixed_param */
  22594. /** unique id identifying the VDEV, generated by the caller */
  22595. A_UINT32 vdev_id;
  22596. /* Disconnect reason from WMI_VDEV_DISCONNECT_REASON_ID */
  22597. A_UINT32 reason;
  22598. } wmi_vdev_disconnect_event_fixed_param;
  22599. typedef enum _WMI_NLO_AUTH_ALGORITHM {
  22600. WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
  22601. WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
  22602. WMI_NLO_AUTH_ALGO_WPA = 3,
  22603. WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
  22604. WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
  22605. WMI_NLO_AUTH_ALGO_RSNA = 6,
  22606. WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
  22607. } WMI_NLO_AUTH_ALGORITHM;
  22608. typedef enum _WMI_NLO_CIPHER_ALGORITHM {
  22609. WMI_NLO_CIPHER_ALGO_NONE = 0x00,
  22610. WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
  22611. WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
  22612. WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
  22613. WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
  22614. WMI_NLO_CIPHER_ALGO_BIP = 0x06,
  22615. WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  22616. WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  22617. WMI_NLO_CIPHER_ALGO_WEP = 0x101,
  22618. } WMI_NLO_CIPHER_ALGORITHM;
  22619. /* SSID broadcast type passed in NLO params */
  22620. typedef enum _WMI_NLO_SSID_BcastNwType
  22621. {
  22622. WMI_NLO_BCAST_UNKNOWN = 0,
  22623. WMI_NLO_BCAST_NORMAL = 1,
  22624. WMI_NLO_BCAST_HIDDEN = 2,
  22625. } WMI_NLO_SSID_BcastNwType;
  22626. #define WMI_NLO_MAX_SSIDS 16
  22627. #define WMI_NLO_MAX_CHAN 48
  22628. #define WMI_NLO_CONFIG_STOP (0x1 << 0)
  22629. #define WMI_NLO_CONFIG_START (0x1 << 1)
  22630. #define WMI_NLO_CONFIG_RESET (0x1 << 2)
  22631. #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
  22632. #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
  22633. #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
  22634. /* This bit is used to indicate if EPNO Profile is enabled */
  22635. #define WMI_NLO_CONFIG_ENLO (0x1 << 7)
  22636. #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
  22637. #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
  22638. #define WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ (0x1 << 10)
  22639. #define WMI_NLO_CONFIG_RANDOM_SEQ_NO_IN_PROBE_REQ (0x1 << 11)
  22640. #define WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ (0x1 << 12)
  22641. #define WMI_NLO_CONFIG_ENABLE_CNLO_RSSI_CONFIG (0x1 << 13)
  22642. /*
  22643. * This bit is used to indicate if MRSNO IE parsing for WiFi6 standard
  22644. * is enabled.
  22645. */
  22646. #define WMI_NLO_CONFIG_ENABLE_MRSNO_WIFI6 (0x1 << 14)
  22647. /*
  22648. * This bit is used to indicate if MRSNO IE parsing for WiFi7 standard
  22649. * is enabled.
  22650. */
  22651. #define WMI_NLO_CONFIG_ENABLE_MRSNO_WIFI7 (0x1 << 15)
  22652. /* Whether directed scan needs to be performed (for hidden SSIDs) */
  22653. #define WMI_ENLO_FLAG_DIRECTED_SCAN 1
  22654. /* Whether PNO event shall be triggered if the network is found on A band */
  22655. #define WMI_ENLO_FLAG_A_BAND 2
  22656. /* Whether PNO event shall be triggered if the network is found on G band */
  22657. #define WMI_ENLO_FLAG_G_BAND 4
  22658. /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
  22659. #define WMI_ENLO_FLAG_STRICT_MATCH 8
  22660. /* Code for matching the beacon AUTH IE - additional codes TBD */
  22661. /* open */
  22662. #define WMI_ENLO_AUTH_CODE_OPEN 1
  22663. /* WPA_PSK or WPA2PSK */
  22664. #define WMI_ENLO_AUTH_CODE_PSK 2
  22665. /* any EAPOL */
  22666. #define WMI_ENLO_AUTH_CODE_EAPOL 4
  22667. /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
  22668. typedef struct wmi_nlo_ssid_param
  22669. {
  22670. A_UINT32 valid;
  22671. wmi_ssid ssid;
  22672. } wmi_nlo_ssid_param;
  22673. /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
  22674. typedef struct wmi_nlo_enc_param
  22675. {
  22676. A_UINT32 valid;
  22677. A_UINT32 enc_type;
  22678. } wmi_nlo_enc_param;
  22679. /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
  22680. typedef struct wmi_nlo_auth_param
  22681. {
  22682. A_UINT32 valid;
  22683. A_UINT32 auth_type;
  22684. } wmi_nlo_auth_param;
  22685. /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
  22686. typedef struct wmi_nlo_bcast_nw_param
  22687. {
  22688. A_UINT32 valid;
  22689. /* If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value should be true/false
  22690. Otherwise EPNO is enabled. bcast_nw_type would be used as a bit flag contains WMI_ENLO_FLAG_XXX */
  22691. A_UINT32 bcast_nw_type;
  22692. } wmi_nlo_bcast_nw_param;
  22693. /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
  22694. typedef struct wmi_nlo_rssi_param
  22695. {
  22696. A_UINT32 valid;
  22697. A_INT32 rssi;
  22698. } wmi_nlo_rssi_param;
  22699. typedef struct nlo_configured_parameters {
  22700. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
  22701. wmi_nlo_ssid_param ssid;
  22702. wmi_nlo_enc_param enc_type;
  22703. wmi_nlo_auth_param auth_type;
  22704. wmi_nlo_rssi_param rssi_cond;
  22705. wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
  22706. } nlo_configured_parameters;
  22707. /* Support channel prediction for PNO scan after scanning top_k_num channels
  22708. * if stationary_threshold is met.
  22709. */
  22710. typedef struct nlo_channel_prediction_cfg {
  22711. A_UINT32 tlv_header;
  22712. /* Enable or disable this feature. */
  22713. A_UINT32 enable;
  22714. /* Top K channels will be scanned before deciding whether to further scan
  22715. * or stop. Minimum value is 3 and maximum is 5. */
  22716. A_UINT32 top_k_num;
  22717. /* Preconfigured stationary threshold.
  22718. * Lesser value means more conservative. Bigger value means more aggressive.
  22719. * Maximum is 100 and minimum is 0. */
  22720. A_UINT32 stationary_threshold;
  22721. /* Periodic full channel scan in milliseconds unit.
  22722. * After full_scan_period_ms since last full scan, channel prediction
  22723. * scan is suppressed and will do full scan.
  22724. * This is to help detecting sudden AP power-on or -off. Value 0 means no
  22725. * full scan at all (not recommended).
  22726. */
  22727. A_UINT32 full_scan_period_ms;
  22728. } nlo_channel_prediction_cfg;
  22729. typedef struct enlo_candidate_score_params_t {
  22730. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param */
  22731. A_INT32 min5GHz_rssi; /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
  22732. A_INT32 min24GHz_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
  22733. A_UINT32 initial_score_max; /* the maximum score that a network can have before bonuses */
  22734. /* current_connection_bonus:
  22735. * only report when there is a network's score this much higher
  22736. * than the current connection
  22737. */
  22738. A_UINT32 current_connection_bonus;
  22739. A_UINT32 same_network_bonus; /* score bonus for all networks with the same network flag */
  22740. A_UINT32 secure_bonus; /* score bonus for networks that are not open */
  22741. A_UINT32 band5GHz_bonus; /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
  22742. } enlo_candidate_score_params;
  22743. typedef struct connected_nlo_bss_band_rssi_pref_t {
  22744. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_bss_band_rssi_pref */
  22745. /** band which needs to get preference over other band - see wmi_set_vdev_ie_band enum */
  22746. A_UINT32 band;
  22747. /* Amount of RSSI preference (in dB) that can be given to band (mentioned above) over other band */
  22748. A_INT32 rssi_pref;
  22749. } connected_nlo_bss_band_rssi_pref;
  22750. typedef struct connected_nlo_rssi_params_t {
  22751. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_rssi_params */
  22752. /* Relative RSSI threshold (in dB) by which new BSS should have better RSSI than
  22753. * the current connected BSS.
  22754. */
  22755. A_INT32 relative_rssi;
  22756. /* The amount of RSSI preference (in dB) that can be given to a 5G BSS over 2.4G BSS. */
  22757. A_INT32 relative_rssi_5g_pref;
  22758. } connected_nlo_rssi_params;
  22759. typedef struct wmi_nlo_config {
  22760. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
  22761. A_UINT32 flags;
  22762. A_UINT32 vdev_id;
  22763. A_UINT32 fast_scan_max_cycles;
  22764. A_UINT32 active_dwell_time;
  22765. A_UINT32 passive_dwell_time; /* PDT in msecs */
  22766. A_UINT32 probe_bundle_size;
  22767. A_UINT32 rest_time; /* ART = IRT */
  22768. A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
  22769. A_UINT32 scan_backoff_multiplier; /* SBM */
  22770. A_UINT32 fast_scan_period; /* SCBM */
  22771. A_UINT32 slow_scan_period; /* specific to windows */
  22772. A_UINT32 no_of_ssids;
  22773. A_UINT32 num_of_channels;
  22774. A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
  22775. /** MAC Address to use in Probe Req as SA **/
  22776. wmi_mac_addr mac_addr;
  22777. /** Mask on which MAC has to be randomized **/
  22778. wmi_mac_addr mac_mask;
  22779. /** IE bitmap to use in Probe Req **/
  22780. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  22781. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  22782. A_UINT32 num_vendor_oui;
  22783. /** Number of connected NLO band preferences **/
  22784. A_UINT32 num_cnlo_band_pref;
  22785. /** dwell time in msec on active 2GHz channels */
  22786. A_UINT32 active_dwell_time_2ghz;
  22787. /** dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked as an active channel */
  22788. A_UINT32 active_dwell_time_6ghz;
  22789. /** dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked as a passive channel */
  22790. A_UINT32 passive_dwell_time_6ghz;
  22791. /* The TLVs will follow.
  22792. * nlo_configured_parameters nlo_list[];
  22793. * A_UINT32 channel_list[num_of_channels]; // in MHz
  22794. * channel_list:
  22795. * If FW supports WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL,
  22796. * then channel_list may fill the upper 12 bits with channel flags,
  22797. * while using only the lower 20 bits for channel frequency.
  22798. * Check WMI_SCAN_CHANNEL_FLAG macros for the channel flags
  22799. * If FW doesn't support WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL,
  22800. * then channel_list only holds the frequency value
  22801. * nlo_channel_prediction_cfg ch_prediction_cfg;
  22802. * enlo_candidate_score_params candidate_score_params;
  22803. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  22804. * connected_nlo_rssi_params cnlo_rssi_params;
  22805. * connected_nlo_bss_band_rssi_pref cnlo_bss_band_rssi_pref[num_cnlo_band_pref];
  22806. * A_UINT32 preferred_chan_list[]; // in MHz
  22807. */
  22808. } wmi_nlo_config_cmd_fixed_param;
  22809. typedef struct wmi_nlo_event
  22810. {
  22811. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
  22812. A_UINT32 vdev_id;
  22813. } wmi_nlo_event;
  22814. /* WMI_PASSPOINT_CONFIG_SET
  22815. * Sets a list for passpoint networks for PNO purposes;
  22816. * it should be matched against any passpoint networks found
  22817. * during regular PNO scan.
  22818. */
  22819. #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
  22820. /* WMI_PASSPOINT_CONFIG_RESET
  22821. * Reset passpoint network list -
  22822. * no Passpoint networks should be matched after this.
  22823. */
  22824. #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
  22825. #define PASSPOINT_REALM_LEN 256
  22826. #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
  22827. #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  22828. #define PASSPOINT_PLMN_ID_LEN 3
  22829. #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
  22830. (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
  22831. /*
  22832. * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
  22833. * A_UINT8 realm[PASSPOINT_REALM_LEN]
  22834. * array will end on a 4-byte boundary.
  22835. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  22836. */
  22837. A_COMPILE_TIME_ASSERT(
  22838. check_passpoint_realm_size,
  22839. (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
  22840. /*
  22841. * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
  22842. * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
  22843. * roaming_consortium_ids array below will end on a 4-byte boundary.
  22844. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  22845. */
  22846. A_COMPILE_TIME_ASSERT(
  22847. check_passpoint_roaming_consortium_ids_size,
  22848. ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
  22849. /* wildcard ID to allow an action (reset) to apply to all networks */
  22850. #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
  22851. typedef struct wmi_passpoint_config {
  22852. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
  22853. /* (network) id
  22854. * identifier of the matched network, report this in event
  22855. * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
  22856. * that indicates the action should be applied to all networks.
  22857. * Currently, the only action that is applied to all networks is "reset".
  22858. * If a non-wildcard ID is specified, that particular network is configured.
  22859. * If a wildcard ID is specified, all networks are reset.
  22860. */
  22861. A_UINT32 id;
  22862. A_UINT32 req_id;
  22863. A_UINT8 realm[PASSPOINT_REALM_LEN]; /*null terminated UTF8 encoded realm, 0 if unspecified*/
  22864. A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; /*roaming consortium ids to match, 0s if unspecified*/
  22865. /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
  22866. A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
  22867. } wmi_passpoint_config_cmd_fixed_param;
  22868. typedef struct {
  22869. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_event_hdr */
  22870. A_UINT32 id; /* identifier of the matched network */
  22871. A_UINT32 vdev_id;
  22872. A_UINT32 timestamp; /* time since boot (in microsecond) when the result was retrieved*/
  22873. wmi_ssid ssid;
  22874. wmi_mac_addr bssid; /* bssid of the network */
  22875. A_UINT32 channel_mhz; /* channel frequency in MHz */
  22876. A_UINT32 rssi; /* RSSI value */
  22877. A_UINT32 rtt; /* timestamp in nanoseconds*/
  22878. A_UINT32 rtt_sd; /* standard deviation in rtt */
  22879. A_UINT32 beacon_period; /* beacon advertised in the beacon */
  22880. A_UINT32 capability; /* capabilities advertised in the beacon */
  22881. A_UINT32 ie_length; /* size of the ie_data blob */
  22882. A_UINT32 anqp_length; /* length of ANQP blob */
  22883. /* Following this structure is the byte stream of ie data of length ie_buf_len:
  22884. * A_UINT8 ie_data[]; <-- length in byte given by field ie_length, blob of ie data in beacon
  22885. * A_UINT8 anqp_ie[]; <-- length in byte given by field anqp_len, blob of anqp data of IE
  22886. * 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.
  22887. */
  22888. } wmi_passpoint_event_hdr;
  22889. #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
  22890. /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
  22891. #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
  22892. /** Disable GTK offload */
  22893. #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
  22894. /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
  22895. #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
  22896. enum wmi_chatter_mode {
  22897. /* Chatter enter/exit happens
  22898. * automatically based on preset
  22899. * params
  22900. */
  22901. WMI_CHATTER_MODE_AUTO,
  22902. /* Chatter enter is triggered
  22903. * manually by the user
  22904. */
  22905. WMI_CHATTER_MODE_MANUAL_ENTER,
  22906. /* Chatter exit is triggered
  22907. * manually by the user
  22908. */
  22909. WMI_CHATTER_MODE_MANUAL_EXIT,
  22910. /* Placeholder max value, always last*/
  22911. WMI_CHATTER_MODE_MAX
  22912. };
  22913. enum wmi_chatter_query_type {
  22914. /*query coalescing filter match counter*/
  22915. WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
  22916. WMI_CHATTER_QUERY_MAX
  22917. };
  22918. typedef struct {
  22919. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
  22920. A_UINT32 chatter_mode;
  22921. } wmi_chatter_set_mode_cmd_fixed_param;
  22922. /** maximum number of filter supported*/
  22923. #define CHATTER_MAX_COALESCING_RULES 11
  22924. /** maximum number of field tests per filter*/
  22925. #define CHATTER_MAX_FIELD_TEST 5
  22926. /** maximum field length in number of DWORDS*/
  22927. #define CHATTER_MAX_TEST_FIELD_LEN32 2
  22928. /** field test kinds*/
  22929. #define CHATTER_COALESCING_TEST_EQUAL 1
  22930. #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
  22931. #define CHATTER_COALESCING_TEST_NOT_EQUAL 3
  22932. /** packet type*/
  22933. #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
  22934. #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
  22935. #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
  22936. /** coalescing field test*/
  22937. typedef struct _chatter_pkt_coalescing_hdr_test {
  22938. /** offset from start of mac header, for windows native wifi host driver
  22939. * should assume standard 802.11 frame format without QoS info and address4
  22940. * FW would account for any non-stand fields for final offset value.
  22941. */
  22942. A_UINT32 offset;
  22943. A_UINT32 length; /* length of test field*/
  22944. A_UINT32 test; /*equal, not equal or masked equal*/
  22945. A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream*/
  22946. A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream*/
  22947. } chatter_pkt_coalescing_hdr_test;
  22948. /** packet coalescing filter*/
  22949. typedef struct _chatter_pkt_coalescing_filter {
  22950. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
  22951. A_UINT32 filter_id; /* unique id assigned by OS */
  22952. A_UINT32 max_coalescing_delay; /* max milliseconds 1st pkt can be held */
  22953. A_UINT32 pkt_type; /* unicast/multicast/broadcast */
  22954. A_UINT32 num_of_test_field; /* number of field test in table */
  22955. chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /* field test tbl */
  22956. } chatter_pkt_coalescing_filter;
  22957. /** packet coalescing filter add command*/
  22958. typedef struct {
  22959. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
  22960. A_UINT32 num_of_filters;
  22961. /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
  22962. chatter_pkt_coalescing_filter rx_filter[1];*/
  22963. } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
  22964. /** packet coalescing filter delete command*/
  22965. typedef struct {
  22966. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
  22967. A_UINT32 filter_id; /*filter id which will be deleted*/
  22968. } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
  22969. /** packet coalescing query command*/
  22970. typedef struct {
  22971. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
  22972. A_UINT32 type; /*type of query*/
  22973. } wmi_chatter_coalescing_query_cmd_fixed_param;
  22974. /** chatter query reply event*/
  22975. typedef struct {
  22976. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
  22977. A_UINT32 type; /*query type*/
  22978. A_UINT32 filter_match_cnt; /*coalescing filter match counter*/
  22979. } wmi_chatter_query_reply_event_fixed_param;
  22980. /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
  22981. * cannot be changed without breaking WMI compatibility. */
  22982. #define GTK_OFFLOAD_KEK_BYTES 16
  22983. #define GTK_OFFLOAD_KCK_BYTES 16
  22984. /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
  22985. #define GTK_REPLAY_COUNTER_BYTES 8
  22986. #define WMI_MAX_KEY_LEN 32
  22987. #define IGTK_PN_SIZE 6
  22988. typedef struct {
  22989. /**
  22990. * WMITLV_TAG_STRUC_wmi_roam_ml_key_material_param will exist when link is not created by fw.
  22991. */
  22992. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ml_link_key_material_param */
  22993. A_UINT32 link_id; /* The key is for which link, when link_id is 0xf, means the key is used for all links, like PTK */
  22994. /** key index */
  22995. A_UINT32 key_ix;
  22996. /** key cipher, defined as WMI_CIPHER_ */
  22997. A_UINT32 key_cipher;
  22998. A_UINT8 pn[WMI_MAX_PN_LEN];
  22999. A_UINT8 key_buff[WMI_MAX_KEY_LEN];
  23000. /*
  23001. * When link_id is 0xf, this field will be MLD address.
  23002. * Otherwise, it will be bssid which specified with link_id.
  23003. */
  23004. wmi_mac_addr mac_addr;
  23005. A_UINT32 key_len; /* number of valid bytes within key_buff */
  23006. A_UINT32 key_flags;
  23007. } wmi_roam_ml_key_material_param;
  23008. typedef struct {
  23009. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
  23010. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  23011. A_UINT32 flags; /* status flags */
  23012. A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
  23013. /*
  23014. * As with all WMI messages, this message uses little-endian byte
  23015. * ordering within each A_UINT32 field.
  23016. * If a big-endian host is using automatic swapping of the bytes within
  23017. * each 4-byte A_UINT32 to automatically correct the endianness of the
  23018. * A_UINT32 fields as the message is uploaded from target --> host, the
  23019. * big-endian host will have to undo the automatic byte swapping for the
  23020. * below A_UINT8 fields, to restore them to their original order.
  23021. */
  23022. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
  23023. A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  23024. A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  23025. A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  23026. A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  23027. A_UINT8 gtk_keyIndex; /* GTK key index */
  23028. A_UINT8 gtk_keyLength; /* GTK key length */
  23029. A_UINT8 gtk_keyRSC[GTK_REPLAY_COUNTER_BYTES]; /* GTK key replay sequence counter */
  23030. A_UINT8 gtk_key[WMI_MAX_KEY_LEN]; /* GTK key data */
  23031. A_UINT8 bigtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  23032. A_UINT8 bigtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  23033. A_UINT8 bigtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  23034. A_UINT8 bigtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  23035. } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
  23036. typedef struct {
  23037. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
  23038. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  23039. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  23040. /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
  23041. A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
  23042. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  23043. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  23044. /*
  23045. * Following structure will be appended when fils:
  23046. * wmi_gtk_offload_fils_tlv_param wmi_fils_gtk_info;
  23047. * Following structure will be appended to the above KEK[] when kek length
  23048. * is larger than GTK_OFFLOAD_KEK_BYTES:
  23049. * A_UINT8 kek_ext[];
  23050. * Following structure will be appended to the above KCK[] when kck length
  23051. * is larger than GTK_OFFLOAD_KCK_BYTES:
  23052. * A_UINT8 kck_ext[];
  23053. */
  23054. } WMI_GTK_OFFLOAD_CMD_fixed_param;
  23055. typedef struct {
  23056. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_offload_extended_tlv_param */
  23057. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  23058. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  23059. A_UINT32 kek_len;
  23060. A_UINT8 KEK[GTK_OFFLOAD_KEK_EXTENDED_BYTES]; /* key encryption key */
  23061. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  23062. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  23063. } wmi_gtk_offload_fils_tlv_param;
  23064. typedef struct {
  23065. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param */
  23066. A_UINT32 vdev_id;
  23067. A_UINT32 sa_query_retry_interval; /* in msec */
  23068. A_UINT32 sa_query_max_retry_count;
  23069. } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
  23070. typedef enum {
  23071. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
  23072. WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
  23073. WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
  23074. WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
  23075. WMI_STA_KEEPALIVE_METHOD_MGMT_VENDOR_ACTION = 5, /* vendor action frame */
  23076. } WMI_STA_KEEPALIVE_METHOD;
  23077. typedef struct {
  23078. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
  23079. WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
  23080. WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
  23081. wmi_mac_addr dest_mac_addr; /* destination MAC address */
  23082. } WMI_STA_KEEPALVE_ARP_RESPONSE;
  23083. typedef struct {
  23084. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
  23085. A_UINT32 vdev_id;
  23086. A_UINT32 enable; /* 1 - Enable, 0 - disable */
  23087. A_UINT32 method; /* keep alive method */
  23088. A_UINT32 interval; /* time interval in seconds */
  23089. /*
  23090. * NOTE: following this structure is the TLV for ARP Response:
  23091. * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; <-- ARP response
  23092. */
  23093. } WMI_STA_KEEPALIVE_CMD_fixed_param;
  23094. typedef struct {
  23095. A_UINT32 tlv_header;
  23096. A_UINT32 vdev_id;
  23097. A_UINT32 action;
  23098. } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
  23099. typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
  23100. typedef struct {
  23101. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
  23102. A_UINT32 vdev_id;
  23103. A_UINT32 keepaliveInterval; /* seconds */
  23104. A_UINT32 keepaliveMethod;
  23105. } wmi_vdev_set_keepalive_cmd_fixed_param;
  23106. typedef struct {
  23107. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
  23108. A_UINT32 vdev_id;
  23109. } wmi_vdev_get_keepalive_cmd_fixed_param;
  23110. typedef struct {
  23111. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
  23112. A_UINT32 vdev_id;
  23113. A_UINT32 keepaliveInterval; /* seconds */
  23114. A_UINT32 keepaliveMethod; /* seconds */
  23115. } wmi_vdev_get_keepalive_event_fixed_param;
  23116. typedef enum {
  23117. WMI_CLEAR_ARP_STATS_COLLECTED = 0x0,
  23118. WMI_START_ARP_STATS_COLLECTION,
  23119. } WMI_ARP_STATS_ACTION;
  23120. typedef enum {
  23121. WMI_ARP_STATS_RX_PKT_TYPE_ARP = 0x1,
  23122. } WMI_ARP_STATS_RX_PKT_TYPE;
  23123. typedef enum {
  23124. WMI_BA_SESSION_ESTABLISHMENT_STATUS_SUCCESS = 0x0,
  23125. WMI_BA_SESSION_ESTABLISHMENT_STATUS_FAILURE,
  23126. } WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS;
  23127. typedef enum {
  23128. WMI_CONNECTION_STATUS_FAILURE = 0x0,
  23129. WMI_CONNECTION_STATUS_SUCCESS,
  23130. } WMI_ARP_STATS_CONNECTION_STATUS;
  23131. /* ARP stats set (configure) req */
  23132. typedef struct {
  23133. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param */
  23134. A_UINT32 vdev_id;
  23135. A_UINT32 set_clr; /* WMI_ARP_STATS_ACTION */
  23136. A_UINT32 pkt_type; /* WMI_ARP_STATS_RX_PKT_TYPE */
  23137. A_UINT32 ipv4; /* target will maintain ARP stats (only) for frames containing this IP address */
  23138. } wmi_vdev_set_arp_stats_cmd_fixed_param;
  23139. /* ARP stats get req */
  23140. typedef struct {
  23141. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param */
  23142. A_UINT32 vdev_id;
  23143. } wmi_vdev_get_arp_stats_cmd_fixed_param;
  23144. /* per vdev based ARP stats */
  23145. typedef struct {
  23146. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param */
  23147. A_UINT32 vdev_id;
  23148. A_UINT32 arp_req_enqueue;
  23149. A_UINT32 arp_req_tx_success;
  23150. A_UINT32 arp_req_tx_failure; /* number of times a tx MPDU containing a unicast ARP request went unacked */
  23151. A_UINT32 arp_rsp_recvd;
  23152. A_UINT32 out_of_order_arp_rsp_drop_cnt;
  23153. A_UINT32 dad_detected; /* duplicate address detection */
  23154. A_UINT32 connect_status; /* WMI_ARP_STATS_CONNECTION_STATUS */
  23155. A_UINT32 ba_session_establishment_status; /* WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS */
  23156. } wmi_vdev_get_arp_stats_event_fixed_param;
  23157. typedef struct {
  23158. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_connectivity_check_stats */
  23159. A_UINT32 pkt_type_bitmap; /* WMI_IP_CONNECTIVITY_STATS_RX_PKT_TYPE_BITMAP - only for DNS, TCP and ICMP */
  23160. A_UINT32 tcp_src_port; /* target will maintain TCP stats (only) for frames with this src port */
  23161. A_UINT32 tcp_dst_port; /* target will maintain TCP stats (only) for frames with this dst port */
  23162. A_UINT32 icmp_ipv4; /* target will maintain ICMPv4 stats (only) for frames containing this IP address */
  23163. } wmi_vdev_set_connectivity_check_stats;
  23164. /* per vdev dns/icmp/tcp based stats*/
  23165. typedef struct {
  23166. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_connectivity_check_stats */
  23167. A_UINT32 tcp_ack_recvd; /* number of tcp syn ack's received by FW */
  23168. A_UINT32 icmpv4_rsp_recvd; /* number of icmpv4 responses received by FW */
  23169. } wmi_vdev_get_connectivity_check_stats;
  23170. typedef struct {
  23171. A_UINT32 tlv_header;
  23172. A_UINT32 vdev_id;
  23173. #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
  23174. #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
  23175. A_UINT32 action;
  23176. } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
  23177. typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
  23178. typedef struct {
  23179. A_UINT32 tlv_header;
  23180. A_UINT32 vdev_id;
  23181. A_UINT32 mcc_tbttmode;
  23182. wmi_mac_addr mcc_bssid;
  23183. } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
  23184. #define WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION 10
  23185. #define WMI_MAX_VENDOR_OUI_DATA_LENGTH 20
  23186. typedef enum
  23187. {
  23188. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1 = 0, /* Connect in 1X1 only */
  23189. 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 */
  23190. WMI_VENDOR_OUI_ACTION_CCKM_1X1 = 2, /* TX (only) CCKM rates with 1 chain only */
  23191. WMI_VENDOR_OUI_ACTION_ALT_ITO = 3, /* inactivity time-out */
  23192. WMI_VENDOR_OUI_ACTION_SWITCH_TO_11N_MODE = 4, /* Switch from 11ac to 11n mode to avoid IOT issues with ONM frame */
  23193. /* WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1
  23194. * Connect in 1x1 only and Use only one chain for both Tx and Rx
  23195. * to avoid IOT issues due to change in number of Tx and Rx chains
  23196. */
  23197. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1 = 5,
  23198. /* Disable burst and assist, and restrict A-MPDU size to 32 */
  23199. WMI_VENDOR_OUI_ACTION_DISABLE_AGGRESSIVE_TX = 6,
  23200. /* Disable FW triggered TWT if vendor OUI is received in beacon */
  23201. WMI_VENDOR_OUI_ACTION_DISABLE_FW_TRIGGERED_TWT = 7,
  23202. /* Extend ITO under WOW mode if vendor OUI is received in beacon */
  23203. WMI_VENDOR_OUI_ACTION_EXTEND_WOW_ITO = 8,
  23204. /*
  23205. * Turn on station 80211BE feature if AP's vendor OUI is in the list
  23206. * for specific customer
  23207. */
  23208. WMI_VENDOR_OUI_ACTION_ALLOW_11BE = 9,
  23209. /*
  23210. * Turn off FW's dynamic qos null tx rate if specific vendor OUI
  23211. * received in beacon.
  23212. */
  23213. WMI_VENDOR_OUI_ACTION_DISABLE_DYNAMIC_QOS_NULL_TX_RATE = 10,
  23214. /*
  23215. * Enable CTS2SELF with QoS null frame if specific vendor OUI
  23216. * received in beacon.
  23217. */
  23218. WMI_VENDOR_OUI_ACTION_ENABLE_CTS2SELF_WITH_QOS_NULL = 11,
  23219. /*
  23220. * Send SMPS frame following OMN frame on VHT conncection if specific
  23221. * vendor OUI received in beacon.
  23222. */
  23223. WMI_VENDOR_OUI_ACTION_SEND_SMPS_FRAME_WITH_OMN = 12,
  23224. /* Restrict SLO if specific vendor OUI received in beacon. */
  23225. WMI_VENDOR_OUI_ACTION_RESTRICT_SLO = 13,
  23226. /*
  23227. * Force MLSR mode if specific vendor OUI received in beacon
  23228. * when connect with MLO.
  23229. */
  23230. WMI_VENDOR_OUI_ACTION_FORCE_MLSR = 14,
  23231. /*
  23232. * Disable AUX learning and AUX listen if OUI matches
  23233. */
  23234. WMI_VENDOR_OUI_ACTION_DISABLE_AUXL = 15,
  23235. /* Add any action before this line */
  23236. WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID
  23237. } wmi_vendor_oui_action_id;
  23238. typedef struct {
  23239. A_UINT32 tlv_header;
  23240. /** vendor OUI actions */
  23241. A_UINT32 action_id; /* enum wmi_vendor_oui_action_id */
  23242. A_UINT32 total_num_vendor_oui; /* total number of OUI present in ini for all actions.
  23243. ** For first command, this value will be used for allocating memory in FW accordingly */
  23244. A_UINT32 num_vendor_oui_ext; /* the number of wmi_vendor_oui_ext for action_id */
  23245. /* followed by TLVs, an array of structure of type wmi_vendor_oui_ext
  23246. ** wmi_vendor_oui_ext vendor_oui_ext[num_vendor_oui_ext];
  23247. */
  23248. /* followed by A_UINT8 data[] of concatenated data for each vendor_oui_ext[] element
  23249. ** first byte contains the index i of structure vendor_oui_ext[]
  23250. ** for which data is coming and length of the data is extracted as
  23251. ** wmi_vendor_oui_ext[i].buf_data_length. No padding between data of
  23252. ** N th OUI and (N+1) th OUI.
  23253. ** For example, if vendor_oui_ext[0].buf_data_length is 18, then
  23254. ** data[0] will hold the index value 0, data[1] through data[17]
  23255. ** will hold the OUI data for this first OUI, data[18] will hold
  23256. ** the index value 1, and the OUI data for the second OUI will
  23257. ** begin at data[19].
  23258. */
  23259. } wmi_pdev_config_vendor_oui_action_fixed_param;
  23260. typedef struct {
  23261. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param */
  23262. /** pdev_id for identifying the MAC
  23263. * See macros starting with WMI_PDEV_ID_ for values.
  23264. */
  23265. A_UINT32 pdev_id;
  23266. /** AC number */
  23267. A_UINT32 ac; /* refer to wmi_traffic_ac */
  23268. /**
  23269. * Enable/disable tx queue optimizations (such as dropping stale tx frms)
  23270. * for the specified AC.
  23271. */
  23272. A_UINT32 ac_tx_queue_optimize_enable;
  23273. } wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param;
  23274. typedef struct {
  23275. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param */
  23276. /** pdev_id for identifying the MAC
  23277. * See macros starting with WMI_PDEV_ID_ for values.
  23278. */
  23279. A_UINT32 pdev_id;
  23280. /** Enable/disable rx filter promiscuous */
  23281. A_UINT32 rx_filter_promiscuous_enable;
  23282. } wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param;
  23283. typedef enum {
  23284. WMI_BEACON_INFO_PRESENCE_OUI_EXT = 1 << 0,
  23285. WMI_BEACON_INFO_PRESENCE_MAC_ADDRESS = 1 << 1,
  23286. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_NSS = 1 << 2,
  23287. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_HT = 1 << 3,
  23288. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_VHT = 1 << 4,
  23289. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_BAND = 1 << 5,
  23290. } wmi_beacon_info_presence_items;
  23291. typedef struct _wmi_vendor_oui_ext {
  23292. A_UINT32 tlv_header;
  23293. A_UINT32 buf_data_length; /* length of data in bytes for this OUI including index byte */
  23294. A_UINT32 info_presence_bit_mask; /* see enum wmi_beacon_info_presence_items */
  23295. A_UINT32 oui_header_length; /* either 3 or 5 bytes */
  23296. 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 */
  23297. A_UINT32 mac_address_length; /* MAC address length in bytes
  23298. ** (This value will always be 6,
  23299. ** but is explicitly specified for sake
  23300. ** of uniformity and completeness).
  23301. */
  23302. A_UINT32 capability_data_length; /* length of capability in bytes */
  23303. } wmi_vendor_oui_ext;
  23304. #define WMI_INFO_CAPABILITY_NSS_MASK 0x0f
  23305. #define WMI_INFO_CAPABILITY_NSS_OFFSET 0
  23306. #define WMI_INFO_CAPABILITY_HT_ENABLE_MASK 0x10
  23307. #define WMI_INFO_CAPABILITY_HT_ENABLE_OFFSET 4
  23308. #define WMI_INFO_CAPABILITY_VHT_ENABLE_MASK 0x20
  23309. #define WMI_INFO_CAPABILITY_VHT_ENABLE_OFFSET 5
  23310. #define WMI_INFO_CAPABILITY_BAND_MASK 0xc0
  23311. #define WMI_INFO_CAPABILITY_BAND_OFFSET 6
  23312. /* definition of WMI_INFO_CAPABILITY_NSS_MASK */
  23313. #define WMI_INFO_CAPABILITY_NSS_1X1 1
  23314. #define WMI_INFO_CAPABILITY_NSS_2X2 2
  23315. #define WMI_INFO_CAPABILITY_NSS_3X3 3
  23316. #define WMI_INFO_CAPABILITY_NSS_4X4 4
  23317. /* definition of WMI_INFO_CAPABILITY_BAND_MASK */
  23318. #define WMI_INFO_CAPABILITY_2G_BAND_MASK (1 << 0)
  23319. #define WMI_INFO_CAPABILITY_5G_BAND_MASK (1 << 1)
  23320. typedef struct {
  23321. A_UINT32 tlv_header;
  23322. A_UINT32 vdev_id; /* home vdev id */
  23323. A_UINT32 meas_token; /* from measure request frame */
  23324. A_UINT32 dialog_token;
  23325. A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
  23326. A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst*/
  23327. A_UINT32 burst_cycle; /* times cycle through within one burst */
  23328. A_UINT32 tx_power; /* for path frame */
  23329. A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
  23330. wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
  23331. A_UINT32 num_chans;
  23332. /*
  23333. * This fixed_param TLV is followed by other TLVs:
  23334. * A_UINT32 channel_list[num_chans]; // in MHz
  23335. */
  23336. } wmi_vdev_plmreq_start_cmd_fixed_param;
  23337. typedef struct {
  23338. A_UINT32 tlv_header;
  23339. A_UINT32 vdev_id;
  23340. A_UINT32 meas_token; /* same value from req*/
  23341. } wmi_vdev_plmreq_stop_cmd_fixed_param;
  23342. typedef struct {
  23343. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
  23344. A_UINT32 tlv_header;
  23345. /* unique id identifying the VDEV, generated by the caller */
  23346. A_UINT32 vdev_id;
  23347. /* enable/disable NoA */
  23348. A_UINT32 enable;
  23349. /** number of NoA desc. In the TLV noa_descriptor[] */
  23350. A_UINT32 num_noa;
  23351. /**
  23352. * TLV (tag length value) parameters follow the pattern structure.
  23353. * TLV contain NoA desc with num of num_noa
  23354. */
  23355. } wmi_p2p_set_noa_cmd_fixed_param;
  23356. typedef struct {
  23357. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
  23358. A_UINT32 tlv_header;
  23359. /* unique id identifying the VDEV, generated by the caller */
  23360. A_UINT32 vdev_id;
  23361. /* Identify the wlan module */
  23362. A_UINT32 module_id;
  23363. /* Num of test arguments passed */
  23364. A_UINT32 num_args;
  23365. /* unique id identifying the unit test cmd, generated by the caller */
  23366. A_UINT32 diag_token;
  23367. /**
  23368. * TLV (tag length value) parameters follow the wmi_unit_test_cmd_fixed_param
  23369. * structure. The TLV's are:
  23370. * A_UINT32 args[];
  23371. **/
  23372. } wmi_unit_test_cmd_fixed_param;
  23373. /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
  23374. * after it received WMI_ROAM_SYNCH_EVENTID.
  23375. */
  23376. typedef struct {
  23377. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
  23378. /** unique id identifying the VDEV, generated by the caller */
  23379. A_UINT32 vdev_id;
  23380. } wmi_roam_synch_complete_fixed_param;
  23381. typedef enum {
  23382. RECOVERY_SIM_ASSERT = 0x01,
  23383. RECOVERY_SIM_NO_DETECT = 0x02,
  23384. RECOVERY_SIM_CTR_EP_FULL = 0x03,
  23385. RECOVERY_SIM_EMPTY_POINT = 0x04,
  23386. RECOVERY_SIM_STACK_OV = 0x05,
  23387. RECOVERY_SIM_INFINITE_LOOP = 0x06,
  23388. RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
  23389. RECOVERY_SIM_SELF_RECOVERY = 0x08,
  23390. RECOVERY_SIM_BT_RECOVERY = 0x09,
  23391. } RECOVERY_SIM_TYPE;
  23392. /* WMI_FORCE_FW_HANG_CMDID */
  23393. typedef struct {
  23394. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
  23395. A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:...*/
  23396. A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
  23397. } WMI_FORCE_FW_HANG_CMD_fixed_param;
  23398. typedef enum {
  23399. WMI_MCAST_FILTER_SET = 1,
  23400. WMI_MCAST_FILTER_DELETE
  23401. } WMI_SET_SINGLE_MCAST_FILTER_OP;
  23402. typedef struct {
  23403. A_UINT32 tlv_header;
  23404. A_UINT32 vdev_id;
  23405. A_UINT32 index;
  23406. A_UINT32 action;
  23407. wmi_mac_addr mcastbdcastaddr;
  23408. } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
  23409. typedef enum {
  23410. WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
  23411. WMI_MULTIPLE_MCAST_FILTER_SET, /* clear all previous mc list, and set new list */
  23412. WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
  23413. WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
  23414. } WMI_MULTIPLE_MCAST_FILTER_OP;
  23415. typedef struct {
  23416. A_UINT32 tlv_header;
  23417. A_UINT32 vdev_id;
  23418. A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
  23419. A_UINT32 num_mcastaddrs; /* number of elements in the subsequent mcast addr list */
  23420. /**
  23421. * TLV (tag length value) parameters follow the
  23422. * structure. The TLV's are:
  23423. * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
  23424. */
  23425. } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
  23426. /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
  23427. typedef enum {
  23428. WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
  23429. WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
  23430. } WMI_TIME_STAMP_SYNC_MODE;
  23431. typedef struct {
  23432. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param */
  23433. A_UINT32 mode; /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
  23434. A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
  23435. A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
  23436. } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
  23437. /* GPIO Command and Event data structures */
  23438. /* WMI_GPIO_CONFIG_CMDID */
  23439. enum {
  23440. WMI_GPIO_PULL_NONE, /** Do not specify a pull. */
  23441. WMI_GPIO_PULL_UP, /** Pull the GPIO up. */
  23442. WMI_GPIO_PULL_DOWN, /** Pull the GPIO down. */
  23443. WMI_GPIO_PULL_KEEPER, /** Designate as a keeper. */
  23444. };
  23445. enum wmi_gpio_drive_strength {
  23446. WMI_GPIO_2MA, /** Specify a 2 mA drive. */
  23447. WMI_GPIO_4MA, /** Specify a 4 mA drive. */
  23448. WMI_GPIO_6MA, /** Specify a 6 mA drive. */
  23449. WMI_GPIO_8MA, /** Specify an 8 mA drive. */
  23450. WMI_GPIO_10MA, /** Specify a 10 mA drive. */
  23451. WMI_GPIO_12MA, /** Specify a 12 mA drive. */
  23452. WMI_GPIO_14MA, /** Specify a 14 mA drive. */
  23453. WMI_GPIO_16MA, /** Specify a 16 mA drive. */
  23454. };
  23455. enum wmi_tlmm_gpio_config {
  23456. WMI_TLMM_GPIO_DISABLE, /** Use the internal inactive configuration. */
  23457. WMI_TLMM_GPIO_ENABLE, /** Use the configuration passed as parameter. */
  23458. };
  23459. enum {
  23460. WMI_GPIO_INTTYPE_DISABLE,
  23461. WMI_GPIO_INTTYPE_RISING_EDGE,
  23462. WMI_GPIO_INTTYPE_FALLING_EDGE,
  23463. WMI_GPIO_INTTYPE_BOTH_EDGE,
  23464. WMI_GPIO_INTTYPE_LEVEL_LOW,
  23465. WMI_GPIO_INTTYPE_LEVEL_HIGH
  23466. };
  23467. typedef struct {
  23468. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
  23469. A_UINT32 gpio_num; /* GPIO number to be setup */
  23470. A_UINT32 input; /* 0 - Output/ 1 - Input */
  23471. A_UINT32 pull_type; /* Pull type defined above */
  23472. A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
  23473. /* mux_config_val - configure pin MUX
  23474. * A value of 0x0 for this field means to use the default MUX configuration.
  23475. * Valid non-zero values are as follows:
  23476. * Rome:
  23477. * 0x4 - use the pin as GPIO (rather than UART)
  23478. */
  23479. A_UINT32 mux_config_val;
  23480. /*
  23481. * The drive strength to use in the configuration of a GPIO.
  23482. * Refer to the wmi_gpio_drive_strength enum.
  23483. */
  23484. A_UINT32 drive;
  23485. /*
  23486. * Use the internal inactive configuration or configuration passed
  23487. * as parameter.
  23488. * Refer to the wmi_tlmm_gpio_config enum.
  23489. */
  23490. A_UINT32 init_enable;
  23491. } wmi_gpio_config_cmd_fixed_param;
  23492. /* WMI_GPIO_OUTPUT_CMDID */
  23493. typedef struct {
  23494. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
  23495. A_UINT32 gpio_num; /* GPIO number to be setup */
  23496. A_UINT32 set; /* Set the GPIO pin*/
  23497. } wmi_gpio_output_cmd_fixed_param;
  23498. /* WMI_GPIO_STATE_REQ_CMDID */
  23499. typedef struct {
  23500. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_state_req_cmd_fixed_param */
  23501. A_UINT32 gpio_num; /* GPIO number to get state */
  23502. } wmi_gpio_state_req_cmd_fixed_param;
  23503. /* WMI_GPIO_INPUT_EVENTID */
  23504. typedef struct {
  23505. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
  23506. A_UINT32 gpio_num; /* GPIO number which changed state */
  23507. } wmi_gpio_input_event_fixed_param;
  23508. typedef enum {
  23509. /**
  23510. * The following wmi_gpio_state_type is mutually exclusive.
  23511. * 0: gpio_invalid_state
  23512. * 1: gpio_state is LO
  23513. * 2: gpio_state is HIGH
  23514. */
  23515. WMI_GPIO_STATE_INVALID, /* GPIO state is invalid. */
  23516. WMI_GPIO_STATE_LOW, /* GPIO state is low. */
  23517. WMI_GPIO_STATE_HIGH, /* GPIO state is high. */
  23518. } WMI_GPIO_STATE_TYPE;
  23519. /* WMI_GPIO_STATE_RES_EVENTID */
  23520. typedef struct {
  23521. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_state_res_event_fixed_param */
  23522. A_UINT32 gpio_num; /* GPIO number */
  23523. A_UINT32 gpio_state; /* state of GPIO pin defined in WMI_GPIO_STATE_TYPE 0 invalid 1 - LO, 2 -HI*/
  23524. } wmi_gpio_state_res_event_fixed_param;
  23525. /* WMI_ANT_CONTROLLER_CMDID */
  23526. typedef struct {
  23527. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ant_controller_cmd_fixed_param */
  23528. A_UINT32 ant_controller_enable;
  23529. } wmi_ant_controller_cmd_fixed_param;
  23530. /* WMI_P2P_DISC_EVENTID */
  23531. enum {
  23532. P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
  23533. P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
  23534. };
  23535. enum {
  23536. P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload*/
  23537. P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload*/
  23538. P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload*/
  23539. };
  23540. enum {
  23541. P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
  23542. P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
  23543. };
  23544. typedef struct {
  23545. A_UINT32 vdev_id;
  23546. A_UINT32 reason; /* P2P DISC wake up reason*/
  23547. } wmi_p2p_disc_event;
  23548. typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param WOW_EVENT_INFO_SECTION_GTKIGTK;
  23549. typedef enum {
  23550. WMI_FAKE_TXBFER_SEND_NDPA,
  23551. WMI_FAKE_TXBFER_SEND_MU,
  23552. WMI_FAKE_TXBFER_NDPA_FBTYPE,
  23553. WMI_FAKE_TXBFER_NDPA_NCIDX,
  23554. WMI_FAKE_TXBFER_NDPA_POLL,
  23555. WMI_FAKE_TXBFER_NDPA_BW,
  23556. WMI_FAKE_TXBFER_NDPA_PREAMBLE,
  23557. WMI_FAKE_TXBFER_NDPA_RATE,
  23558. WMI_FAKE_TXBFER_NDP_BW,
  23559. WMI_FAKE_TXBFER_NDP_NSS,
  23560. WMI_TXBFEE_ENABLE_UPLOAD_H,
  23561. WMI_TXBFEE_ENABLE_CAPTURE_H,
  23562. WMI_TXBFEE_SET_CBF_TBL,
  23563. WMI_TXBFEE_CBF_TBL_LSIG,
  23564. WMI_TXBFEE_CBF_TBL_SIGA1,
  23565. WMI_TXBFEE_CBF_TBL_SIGA2,
  23566. WMI_TXBFEE_CBF_TBL_SIGB,
  23567. WMI_TXBFEE_CBF_TBL_PAD,
  23568. WMI_TXBFEE_CBF_TBL_DUR,
  23569. WMI_TXBFEE_SU_NCIDX,
  23570. WMI_TXBFEE_CBIDX,
  23571. WMI_TXBFEE_NGIDX,
  23572. } WMI_TXBF_PARAM_ID;
  23573. typedef struct {
  23574. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
  23575. /** parameter id */
  23576. A_UINT32 param_id;
  23577. /** parameter value */
  23578. A_UINT32 param_value;
  23579. } wmi_txbf_cmd_fixed_param;
  23580. typedef struct {
  23581. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
  23582. A_UINT32 h_length;
  23583. A_UINT32 cv_length;
  23584. /* This TLV is followed by array of bytes:
  23585. * A_UINT8 bufp[]; <-- h_cv info buffer
  23586. */
  23587. } wmi_upload_h_hdr;
  23588. typedef struct {
  23589. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
  23590. A_UINT32 svd_num;
  23591. A_UINT32 tone_num;
  23592. A_UINT32 reserved;
  23593. } wmi_capture_h_event_hdr;
  23594. typedef struct {
  23595. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
  23596. A_UINT32 start_freq; /* start frequency, not channel center freq */
  23597. A_UINT32 end_freq; /* end frequency */
  23598. } wmi_avoid_freq_range_desc;
  23599. typedef struct {
  23600. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
  23601. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  23602. A_UINT32 num_freq_ranges;
  23603. /* The TLVs will follow.
  23604. * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
  23605. * wmi_avoid_freq_range_desc avd_freq_range[]; <-- message buffer, NULL terminated
  23606. */
  23607. } wmi_avoid_freq_ranges_event_fixed_param;
  23608. enum {
  23609. WMI_SAR2_SUCCESS = 0,
  23610. WMI_SAR2_INVALID_ANTENNA_INDEX = 1,
  23611. WMI_SAR2_INVALID_TABLE_INDEX = 2,
  23612. WMI_SAR2_STATE_ERROR = 4,
  23613. WMI_SAR2_BDF_NO_TABLE = 8,
  23614. };
  23615. typedef struct {
  23616. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param */
  23617. A_UINT32 result; /* refer to the above WMI_SAR2_ result definitions */
  23618. } wmi_sar2_result_event_fixed_param;
  23619. typedef struct {
  23620. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
  23621. /** Reserved for future use */
  23622. A_UINT32 reserved0;
  23623. A_UINT32 vdev_id;
  23624. } wmi_gtk_rekey_fail_event_fixed_param;
  23625. typedef enum WLAN_COEX_EVENT {
  23626. WLAN_COEX_EVENT_BT_NONE = 0,
  23627. WLAN_COEX_EVENT_BT_A2DP_PROFILE_ADD = 1,
  23628. WLAN_COEX_EVENT_BT_A2DP_PROFILE_REMOVE = 2,
  23629. WLAN_COEX_EVENT_BT_VOICE_PROFILE_ADD = 3,
  23630. WLAN_COEX_EVENT_BT_VOICE_PROFILE_REMOVE = 4,
  23631. WLAN_COEX_EVENT_BT_SCAN_START = 5,
  23632. WLAN_COEX_EVENT_BT_SCAN_STOP = 6,
  23633. WLAN_COEX_EVENT_BT_PROFILE_CONNECTED = 7,
  23634. WLAN_COEX_EVENT_BT_PROFILE_DISCONNECTED = 8,
  23635. } WLAN_COEX_EVENT;
  23636. typedef struct {
  23637. A_UINT32 tlv_header;
  23638. A_UINT32 coex_profile_evt; //uses the enum values from WLAN_COEX_EVENT
  23639. } wmi_coex_bt_activity_event_fixed_param;
  23640. enum wmm_ac_downgrade_policy {
  23641. WMM_AC_DOWNGRADE_DEPRIO,
  23642. WMM_AC_DOWNGRADE_DROP,
  23643. WMM_AC_DOWNGRADE_INVALID,
  23644. };
  23645. /* WMM EDCA Params type */
  23646. #define WMM_PARAM_TYPE_LEGACY 0
  23647. /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
  23648. #define WMM_PARAM_TYPE_11AX_EDCA 1
  23649. typedef struct {
  23650. A_UINT32 tlv_header;
  23651. A_UINT32 cwmin;
  23652. A_UINT32 cwmax;
  23653. A_UINT32 aifs;
  23654. union {
  23655. A_UINT32 txoplimit;
  23656. A_UINT32 mu_edca_timer;
  23657. };
  23658. A_UINT32 acm;
  23659. A_UINT32 no_ack;
  23660. } wmi_wmm_vparams;
  23661. typedef struct {
  23662. A_UINT32 tlv_header;
  23663. A_UINT32 vdev_id;
  23664. wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
  23665. A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
  23666. } wmi_vdev_set_wmm_params_cmd_fixed_param;
  23667. typedef struct {
  23668. A_UINT32 tlv_header;
  23669. A_UINT32 vdev_id;
  23670. A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
  23671. A_UINT32 userGtxMask; /* host request for GTX mask */
  23672. A_UINT32 gtxPERThreshold; /* default: 10% */
  23673. A_UINT32 gtxPERMargin; /* default: 2% */
  23674. A_UINT32 gtxTPCstep; /* default: 1 */
  23675. A_UINT32 gtxTPCMin; /* default: 5 */
  23676. A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
  23677. } wmi_vdev_set_gtx_params_cmd_fixed_param;
  23678. typedef struct
  23679. {
  23680. A_UINT32 tlv_header;
  23681. A_UINT32 vdev_id;
  23682. A_UINT32 ac;
  23683. A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
  23684. A_UINT32 downgrade_type;
  23685. } wmi_vdev_wmm_addts_cmd_fixed_param;
  23686. typedef struct
  23687. {
  23688. A_UINT32 tlv_header;
  23689. A_UINT32 vdev_id;
  23690. A_UINT32 ac;
  23691. } wmi_vdev_wmm_delts_cmd_fixed_param;
  23692. /* DEPRECATED */
  23693. typedef struct {
  23694. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
  23695. /** Reserved for future use */
  23696. A_UINT32 reserved0;
  23697. } wmi_pdev_dfs_enable_cmd_fixed_param;
  23698. /* DEPRECATED */
  23699. typedef struct {
  23700. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
  23701. /** pdev_id for identifying the MAC
  23702. * See macros starting with WMI_PDEV_ID_ for values.
  23703. */
  23704. A_UINT32 pdev_id;
  23705. } wmi_pdev_dfs_disable_cmd_fixed_param;
  23706. typedef struct {
  23707. /** TLV tag and len; tag equals
  23708. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
  23709. */
  23710. A_UINT32 tlv_header;
  23711. /** pdev_id for identifying the MAC
  23712. * See macros starting with WMI_PDEV_ID_ for values.
  23713. */
  23714. A_UINT32 pdev_id;
  23715. } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
  23716. typedef struct {
  23717. /** TLV tag and len; tag equals
  23718. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
  23719. */
  23720. A_UINT32 tlv_header;
  23721. /** pdev_id for identifying the MAC
  23722. * See macros starting with WMI_PDEV_ID_ for values.
  23723. */
  23724. A_UINT32 pdev_id;
  23725. } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
  23726. typedef struct {
  23727. A_UINT32 tlv_header;
  23728. A_UINT32 pdev_id;
  23729. } wmi_pdev_dfs_phyerr_offload_enable_cmd_fixed_param;
  23730. typedef struct {
  23731. A_UINT32 tlv_header;
  23732. A_UINT32 pdev_id;
  23733. } wmi_pdev_dfs_phyerr_offload_disable_cmd_fixed_param;
  23734. typedef enum {
  23735. QUICK_OCAC = 0,
  23736. EXTENSIVE_OCAC,
  23737. QUICK_RCAC,
  23738. } WMI_ADFS_OCAC_MODE;
  23739. typedef struct {
  23740. A_UINT32 tlv_header;
  23741. A_UINT32 vdev_id;
  23742. A_UINT32 ocac_mode; /* WMI_ADFS_OCAC_MODE */
  23743. A_UINT32 min_duration_ms; /* in milliseconds */
  23744. A_UINT32 max_duration_ms; /* in milliseconds */
  23745. A_UINT32 chan_freq; /* in MHz */
  23746. A_UINT32 chan_width; /* in MHz */
  23747. /*
  23748. * Two center frequencies are required since agile channel switch
  23749. * has to support 160/165 MHz for products like Pine.
  23750. * For agile which supports only up to 80MHz (HK),
  23751. * freq2 will be 0 and ignored.
  23752. */
  23753. union {
  23754. A_UINT32 center_freq; /* in MHz */ /* old name */
  23755. A_UINT32 center_freq1; /* in MHz */ /* new name */
  23756. };
  23757. A_UINT32 center_freq2; /* in MHz */
  23758. } wmi_vdev_adfs_ch_cfg_cmd_fixed_param;
  23759. typedef struct {
  23760. A_UINT32 tlv_header;
  23761. A_UINT32 vdev_id;
  23762. } wmi_vdev_adfs_ocac_abort_cmd_fixed_param;
  23763. typedef enum {
  23764. IN_SERVICE_MODE = 0,
  23765. OCAC_MODE,
  23766. } WMI_DFS_RADAR_DETECTION_MODE;
  23767. typedef struct {
  23768. A_UINT32 tlv_header;
  23769. A_UINT32 pdev_id;
  23770. /* In-service mode or O-CAC mode */
  23771. A_UINT32 detection_mode; /* WMI_DFS_RADAR_DETECTION_MODE */
  23772. A_UINT32 chan_freq; /* in MHz */
  23773. A_UINT32 chan_width; /* in MHz */
  23774. A_UINT32 detector_id;
  23775. A_UINT32 segment_id;
  23776. A_UINT32 timestamp;
  23777. A_UINT32 is_chirp;
  23778. A_INT32 freq_offset; /* in MHz */
  23779. A_INT32 sidx; /* segment index (where was the radar within the channel) */
  23780. } wmi_pdev_dfs_radar_detection_event_fixed_param;
  23781. typedef struct {
  23782. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_RADAR_FLAGS */
  23783. /*
  23784. * Bit 0:
  23785. * 0 - need check sub channel marking
  23786. * 1 - full bandwidth need put to NOL
  23787. * Refer to WMI_RADAR_FLAGS_FULL_BW_NOL_GET and _SET macros
  23788. * [1:31] reserved
  23789. */
  23790. A_UINT32 flags;
  23791. } WMI_RADAR_FLAGS;
  23792. #define WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS 0
  23793. #define WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS 1
  23794. #define WMI_RADAR_FLAGS_FULL_BW_NOL_GET(flag) \
  23795. WMI_GET_BITS(flag, \
  23796. WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS, \
  23797. WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS)
  23798. #define WMI_RADAR_FLAGS_FULL_BW_NOL_SET(flag, val) \
  23799. WMI_SET_BITS(flag, \
  23800. WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS, \
  23801. WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS, val)
  23802. typedef enum {
  23803. OCAC_COMPLETE = 0,
  23804. OCAC_ABORT,
  23805. } WMI_VDEV_OCAC_COMPLETE_STATUS;
  23806. typedef struct {
  23807. A_UINT32 tlv_header;
  23808. A_UINT32 vdev_id;
  23809. A_UINT32 chan_freq; /* in MHz */
  23810. A_UINT32 chan_width; /* in MHz */
  23811. /*
  23812. * Two center frequencies are required since agile channel switch
  23813. * has to support 160/165 MHz for products like Pine.
  23814. * For agile which supports only up to 80MHz (HK),
  23815. * freq2 will be 0 and ignored.
  23816. */
  23817. union {
  23818. A_UINT32 center_freq; /* in MHz */ /* old name */
  23819. A_UINT32 center_freq1; /* in MHz */ /* new name */
  23820. };
  23821. A_UINT32 status; /* WMI_VDEV_OCAC_COMPLETE_STATUS */
  23822. A_UINT32 center_freq2; /* in MHz */
  23823. } wmi_vdev_adfs_ocac_complete_event_fixed_param;
  23824. typedef struct {
  23825. A_UINT32 tlv_header;
  23826. A_UINT32 vdev_id;
  23827. } wmi_vdev_dfs_cac_complete_event_fixed_param;
  23828. /** TDLS COMMANDS */
  23829. /* WMI_TDLS_SET_STATE_CMDID */
  23830. /* TDLS State */
  23831. enum wmi_tdls_state {
  23832. /** TDLS disable */
  23833. WMI_TDLS_DISABLE,
  23834. /** TDLS enabled - no firmware connection tracking/notifications */
  23835. WMI_TDLS_ENABLE_PASSIVE,
  23836. /** TDLS enabled - with firmware connection tracking/notifications */
  23837. WMI_TDLS_ENABLE_ACTIVE,
  23838. /** TDLS enabled - firmware waits for peer mac for connection tracking */
  23839. WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
  23840. /** TDLS enabled - TDLS connection tracking is done in host */
  23841. WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
  23842. };
  23843. /* TDLS Options */
  23844. #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
  23845. #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
  23846. #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
  23847. typedef struct {
  23848. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
  23849. A_UINT32 tlv_header;
  23850. /** unique id identifying the VDEV */
  23851. A_UINT32 vdev_id;
  23852. /** Enable/Disable TDLS (wmi_tdls_state) */
  23853. A_UINT32 state;
  23854. /** Duration (in ms) over which to calculate tx/rx threshold to trigger TDLS Discovery */
  23855. A_UINT32 notification_interval_ms;
  23856. /** number of packets OVER which notify/suggest TDLS Discovery:
  23857. * if current tx pps counter / notification interval >= threshold
  23858. * then a notification will be sent to host to advise TDLS Discovery */
  23859. A_UINT32 tx_discovery_threshold;
  23860. /** number of packets UNDER which notify/suggest TDLS Teardown:
  23861. * if current tx pps counter / notification interval < threshold
  23862. * then a notification will be sent to host to advise TDLS Tear down */
  23863. A_UINT32 tx_teardown_threshold;
  23864. /** Absolute RSSI value under which notify/suggest TDLS Teardown */
  23865. A_INT32 rssi_teardown_threshold;
  23866. /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
  23867. A_INT32 rssi_delta;
  23868. /** TDLS Option Control
  23869. * Off-Channel, Buffer STA, (later)Sleep STA support */
  23870. A_UINT32 tdls_options;
  23871. /* Buffering time in number of beacon intervals */
  23872. A_UINT32 tdls_peer_traffic_ind_window;
  23873. /* Wait time for PTR frame */
  23874. A_UINT32 tdls_peer_traffic_response_timeout_ms;
  23875. /* Self PUAPSD mask */
  23876. A_UINT32 tdls_puapsd_mask;
  23877. /* Inactivity timeout */
  23878. A_UINT32 tdls_puapsd_inactivity_time_ms;
  23879. /* Max of rx frame during SP */
  23880. A_UINT32 tdls_puapsd_rx_frame_threshold;
  23881. /**Duration (in ms) over which to check whether TDLS link needs to be torn down */
  23882. A_UINT32 teardown_notification_ms;
  23883. /** STA kickout threshold for TDLS peer */
  23884. A_UINT32 tdls_peer_kickout_threshold;
  23885. /* TDLS discovery WAKE timeout in ms.
  23886. * DUT will wake until this timeout to receive TDLS discovery response
  23887. * from peer.
  23888. * If tdls_discovery_wake_timeout is 0x0, the DUT will choose autonomously
  23889. * what wake timeout value to use.
  23890. */
  23891. A_UINT32 tdls_discovery_wake_timeout;
  23892. } wmi_tdls_set_state_cmd_fixed_param;
  23893. /* WMI_TDLS_PEER_UPDATE_CMDID */
  23894. enum wmi_tdls_peer_state {
  23895. /** tx peer TDLS link setup now starting, traffic to DA should be
  23896. * paused (except TDLS frames) until state is moved to CONNECTED (or
  23897. * TEARDOWN on setup failure) */
  23898. WMI_TDLS_PEER_STATE_PEERING,
  23899. /** tx peer TDLS link established, running (all traffic to DA unpaused) */
  23900. WMI_TDLS_PEER_STATE_CONNECTED,
  23901. /** tx peer TDLS link tear down started (link paused, any frames
  23902. * queued for DA will be requeued back through the AP)*/
  23903. WMI_TDLS_PEER_STATE_TEARDOWN,
  23904. /** Add peer mac into connection table */
  23905. WMI_TDLS_PEER_ADD_MAC_ADDR,
  23906. /** Remove peer mac from connection table */
  23907. WMI_TDLS_PEER_REMOVE_MAC_ADDR,
  23908. };
  23909. /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
  23910. #define WMI_TDLS_MAX_SUPP_CHANNELS 128
  23911. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  23912. typedef struct {
  23913. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
  23914. A_UINT32 tlv_header;
  23915. /* Peer's QoS Info - for U-APSD */
  23916. /* AC FLAGS - accessed through macros below */
  23917. /* Ack, SP, More Data Ack - accessed through macros below */
  23918. A_UINT32 peer_qos;
  23919. /*TDLS Peer's U-APSD Buffer STA Support*/
  23920. A_UINT32 buff_sta_support;
  23921. /*TDLS off channel related params */
  23922. A_UINT32 off_chan_support;
  23923. A_UINT32 peer_curr_operclass;
  23924. A_UINT32 self_curr_operclass;
  23925. /* Number of channels available for off channel operation */
  23926. A_UINT32 peer_chan_len;
  23927. A_UINT32 peer_operclass_len;
  23928. A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  23929. /* Is peer initiator or responder of TDLS setup request */
  23930. A_UINT32 is_peer_responder;
  23931. /* Preferred off channel number as configured by user */
  23932. A_UINT32 pref_offchan_num;
  23933. /* Preferred off channel bandwidth as configured by user */
  23934. A_UINT32 pref_offchan_bw;
  23935. /* Preferred off channel frequency in MHz as configured by user */
  23936. A_UINT32 pref_offchan_freq;
  23937. /** Followed by the variable length TLV peer_chan_list:
  23938. * wmi_channel peer_chan_list[].
  23939. * Array size would be peer_chan_len.
  23940. * This array is intersected channels which is supported by both peer
  23941. * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
  23942. * FW shall compute BW for an offchan based on peer's ht/vht cap
  23943. * received in peer_assoc cmd during change STA operation
  23944. */
  23945. } wmi_tdls_peer_capabilities;
  23946. #define WMI_TDLS_QOS_VO_FLAG 0
  23947. #define WMI_TDLS_QOS_VI_FLAG 1
  23948. #define WMI_TDLS_QOS_BK_FLAG 2
  23949. #define WMI_TDLS_QOS_BE_FLAG 3
  23950. #define WMI_TDLS_QOS_ACK_FLAG 4
  23951. #define WMI_TDLS_QOS_SP_FLAG 5
  23952. #define WMI_TDLS_QOS_MOREDATA_FLAG 7
  23953. #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \
  23954. (ppeer_caps)->peer_qos |= (1 << flag); \
  23955. } while (0)
  23956. #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag) \
  23957. (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
  23958. #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  23959. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  23960. #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  23961. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  23962. #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  23963. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  23964. #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  23965. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  23966. #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  23967. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  23968. #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  23969. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  23970. #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  23971. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  23972. #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  23973. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  23974. #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  23975. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  23976. #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  23977. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  23978. /* SP has 2 bits */
  23979. #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \
  23980. (ppeer_caps)->peer_qos |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  23981. } while (0)
  23982. #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
  23983. (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  23984. #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  23985. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  23986. #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  23987. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  23988. #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \
  23989. (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
  23990. } while (0)
  23991. #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag) \
  23992. (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
  23993. #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  23994. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  23995. #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  23996. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  23997. #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  23998. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  23999. #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  24000. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  24001. #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
  24002. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  24003. #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
  24004. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  24005. #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  24006. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  24007. #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  24008. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  24009. #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  24010. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  24011. #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  24012. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  24013. /* SP has 2 bits */
  24014. #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \
  24015. (pset_cmd)->tdls_puapsd_mask |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  24016. } while (0)
  24017. #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
  24018. (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  24019. #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  24020. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  24021. #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  24022. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  24023. typedef struct {
  24024. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
  24025. A_UINT32 tlv_header;
  24026. /** unique id identifying the VDEV */
  24027. A_UINT32 vdev_id;
  24028. /** peer MAC address */
  24029. wmi_mac_addr peer_macaddr;
  24030. /** new TDLS state for peer (wmi_tdls_peer_state) */
  24031. A_UINT32 peer_state;
  24032. /* The TLV for wmi_tdls_peer_capabilities will follow.
  24033. * wmi_tdls_peer_capabilities peer_caps;
  24034. */
  24035. /** Followed by the variable length TLV chan_info:
  24036. * wmi_channel chan_info[] */
  24037. } wmi_tdls_peer_update_cmd_fixed_param;
  24038. /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
  24039. /* bitmap 20, 40, 80 or 160 MHz wide channel */
  24040. #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
  24041. #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
  24042. #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
  24043. #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
  24044. enum wmi_tdls_offchan_mode {
  24045. WMI_TDLS_ENABLE_OFFCHANNEL,
  24046. WMI_TDLS_DISABLE_OFFCHANNEL, /* passive offchannel disable */
  24047. WMI_TDLS_ACTIVE_DISABLE_OFFCHANNEL,
  24048. };
  24049. typedef struct {
  24050. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
  24051. A_UINT32 tlv_header;
  24052. /** unique id identifying the VDEV */
  24053. A_UINT32 vdev_id;
  24054. /** Enable/Disable TDLS offchannel */
  24055. A_UINT32 offchan_mode;
  24056. /** peer MAC address */
  24057. wmi_mac_addr peer_macaddr;
  24058. /* Is peer initiator or responder of TDLS setup request */
  24059. A_UINT32 is_peer_responder;
  24060. /* off channel number*/
  24061. A_UINT32 offchan_num;
  24062. /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
  24063. A_UINT32 offchan_bw_bitmap;
  24064. /* operating class for offchan */
  24065. A_UINT32 offchan_oper_class;
  24066. /* off channel frequency in MHz */
  24067. A_UINT32 offchan_freq;
  24068. /** This fixed_param TLV is followed by the below additional TLVs:
  24069. * - wmi_channel peer_chan_info[]: optional per-peer chan_info
  24070. */
  24071. } wmi_tdls_set_offchan_mode_cmd_fixed_param;
  24072. /** TDLS EVENTS */
  24073. enum wmi_tdls_peer_notification {
  24074. /** tdls discovery recommended for peer (based
  24075. * on tx bytes per second > tx_discover threshold) */
  24076. WMI_TDLS_SHOULD_DISCOVER,
  24077. /** tdls link tear down recommended for peer
  24078. * due to tx bytes per second below tx_teardown_threshold
  24079. * NB: this notification sent once */
  24080. WMI_TDLS_SHOULD_TEARDOWN,
  24081. /** tx peer TDLS link tear down complete */
  24082. WMI_TDLS_PEER_DISCONNECTED,
  24083. /** TDLS/BT role change notification for connection tracker */
  24084. WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
  24085. };
  24086. enum wmi_tdls_peer_reason {
  24087. /** tdls teardown recommended due to low transmits */
  24088. WMI_TDLS_TEARDOWN_REASON_TX,
  24089. /** tdls link tear down recommended due to poor RSSI */
  24090. WMI_TDLS_TEARDOWN_REASON_RSSI,
  24091. /** tdls link tear down recommended due to offchannel scan */
  24092. WMI_TDLS_TEARDOWN_REASON_SCAN,
  24093. /** tdls peer disconnected due to peer deletion */
  24094. WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
  24095. /** tdls peer disconnected due to PTR timeout */
  24096. WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
  24097. /** tdls peer disconnected due wrong PTR format */
  24098. WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
  24099. /** tdls peer not responding */
  24100. WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
  24101. /** tdls entered buffer STA role, TDLS connection tracker needs to handle this */
  24102. WMI_TDLS_ENTER_BUF_STA,
  24103. /** tdls exited buffer STA role, TDLS connection tracker needs to handle this */
  24104. WMI_TDLS_EXIT_BUF_STA,
  24105. /** BT entered busy mode, TDLS connection tracker needs to handle this */
  24106. WMI_TDLS_ENTER_BT_BUSY_MODE,
  24107. /** BT exited busy mode, TDLS connection tracker needs to handle this */
  24108. WMI_TDLS_EXIT_BT_BUSY_MODE,
  24109. /** TDLS module received a scan start event, TDLS connection tracker needs to handle this */
  24110. WMI_TDLS_SCAN_STARTED_EVENT,
  24111. /** TDLS module received a scan complete event, TDLS connection tracker needs to handle this */
  24112. WMI_TDLS_SCAN_COMPLETED_EVENT,
  24113. };
  24114. /* WMI_TDLS_PEER_EVENTID */
  24115. typedef struct {
  24116. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
  24117. A_UINT32 tlv_header;
  24118. /** peer MAC address */
  24119. wmi_mac_addr peer_macaddr;
  24120. /** TDLS peer status (wmi_tdls_peer_notification)*/
  24121. A_UINT32 peer_status;
  24122. /** TDLS peer reason (wmi_tdls_peer_reason) */
  24123. A_UINT32 peer_reason;
  24124. /** unique id identifying the VDEV */
  24125. A_UINT32 vdev_id;
  24126. } wmi_tdls_peer_event_fixed_param;
  24127. /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
  24128. don't use this for any new implementations */
  24129. typedef struct {
  24130. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
  24131. /** unique id identifying the VDEV, generated by the caller */
  24132. A_UINT32 vdev_id;
  24133. /* New beacon interval to be used for the specified VDEV suggested by firmware */
  24134. A_UINT32 new_bcn_intvl;
  24135. } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
  24136. /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
  24137. typedef struct {
  24138. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
  24139. A_UINT32 tlv_header;
  24140. /** 1: enable fw based adaptive ocs,
  24141. * 0: disable fw based adaptive ocs
  24142. */
  24143. A_UINT32 enable;
  24144. /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
  24145. union {
  24146. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  24147. /** pdev_id for identifying the MAC
  24148. * See macros starting with WMI_PDEV_ID_ for values.
  24149. */
  24150. A_UINT32 pdev_id;
  24151. };
  24152. } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
  24153. /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
  24154. typedef struct {
  24155. /* Frequency of the channel for which the quota is set */
  24156. A_UINT32 chan_mhz;
  24157. /* Requested channel time quota expressed as percentage */
  24158. A_UINT32 channel_time_quota;
  24159. } wmi_resmgr_chan_time_quota;
  24160. typedef struct {
  24161. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_chan_time_quota_tlv */
  24162. A_UINT32 tlv_header;
  24163. wmi_resmgr_chan_time_quota chan_time_quota;
  24164. } wmi_resmgr_chan_time_quota_tlv;
  24165. typedef struct {
  24166. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
  24167. A_UINT32 tlv_header;
  24168. /** number of channel time quota command structures
  24169. * (wmi_resmgr_chan_time_quota) 1 or 2
  24170. */
  24171. A_UINT32 num_chans;
  24172. /* This TLV is followed by another TLV of array of bytes
  24173. * A_UINT8 data[];
  24174. * This data array contains
  24175. * num_chans * size of(struct wmi_resmgr_chan_time_quota)
  24176. */
  24177. } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
  24178. typedef enum {
  24179. WMI_RESMGR_QUOTA_TYPE_CLEAR = 0,
  24180. WMI_RESMGR_QUOTA_TYPE_FIXED = 1,
  24181. WMI_RESMGR_QUOTA_TYPE_DYNAMIC = 2,
  24182. } wmi_resmgr_quota_type;
  24183. typedef struct {
  24184. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_chan_time_quota_changed_event_fixed_param */
  24185. A_UINT32 tlv_header;
  24186. /** quota_type: refer to wmi_resmgr_quota_type
  24187. * 0 : clear quota
  24188. * 1 : fixed quota
  24189. * 2 : dynamic quota
  24190. */
  24191. A_UINT32 quota_type;
  24192. /* This TLV is followed by another TLV of array of struct
  24193. * wmi_resmgr_chan_time_quota_tlv chan_quota[num_chans];
  24194. */
  24195. } wmi_resmgr_chan_time_quota_changed_event_fixed_param;
  24196. /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
  24197. typedef struct {
  24198. /* Frequency of the channel for which the latency is set */
  24199. A_UINT32 chan_mhz;
  24200. /* Requested channel latency in milliseconds */
  24201. A_UINT32 latency;
  24202. } wmi_resmgr_chan_latency;
  24203. typedef struct {
  24204. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
  24205. A_UINT32 tlv_header;
  24206. /** number of channel latency command structures
  24207. * (wmi_resmgr_chan_latency) 1 or 2
  24208. */
  24209. A_UINT32 num_chans;
  24210. /* This TLV is followed by another TLV of array of bytes
  24211. * A_UINT8 data[];
  24212. * This data array contains
  24213. * num_chans * size of(struct wmi_resmgr_chan_latency)
  24214. */
  24215. } wmi_resmgr_set_chan_latency_cmd_fixed_param;
  24216. /* WMI_STA_SMPS_FORCE_MODE_CMDID */
  24217. /** STA SMPS Forced Mode */
  24218. typedef enum {
  24219. WMI_SMPS_FORCED_MODE_NONE = 0,
  24220. WMI_SMPS_FORCED_MODE_DISABLED,
  24221. WMI_SMPS_FORCED_MODE_STATIC,
  24222. WMI_SMPS_FORCED_MODE_DYNAMIC
  24223. } wmi_sta_smps_forced_mode;
  24224. typedef struct {
  24225. /** TLV tag and len; tag equals
  24226. * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
  24227. A_UINT32 tlv_header;
  24228. /** Unique id identifying the VDEV */
  24229. A_UINT32 vdev_id;
  24230. /** The mode of SMPS that is to be forced in the FW. */
  24231. A_UINT32 forced_mode;
  24232. } wmi_sta_smps_force_mode_cmd_fixed_param;
  24233. /** wlan HB commands */
  24234. #define WMI_WLAN_HB_ITEM_UDP 0x1
  24235. #define WMI_WLAN_HB_ITEM_TCP 0x2
  24236. #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE,
  24237. must be a multiple of 4 bytes */
  24238. typedef struct {
  24239. /** TLV tag and len; tag equals
  24240. * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
  24241. A_UINT32 tlv_header; /** TLV header*/
  24242. A_UINT32 vdev_id; /** Vdev ID */
  24243. A_UINT32 enable; /** 1: Enable, 0: Disable`*/
  24244. A_UINT32 item; /** 1: UDP, 2: TCP */
  24245. A_UINT32 session; /** Session ID from HOST */
  24246. } wmi_hb_set_enable_cmd_fixed_param;
  24247. typedef struct {
  24248. /** TLV tag and len; tag equals
  24249. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
  24250. A_UINT32 tlv_header; /** TLV header*/
  24251. A_UINT32 vdev_id; /** Vdev ID */
  24252. A_UINT32 srv_ip; /** Server IP address (IPv4) */
  24253. A_UINT32 dev_ip; /** Device IP address (IPv4) */
  24254. A_UINT32 seq; /** TCP Sequence no */
  24255. A_UINT32 src_port; /** Source port */
  24256. A_UINT32 dst_port; /** Destination port */
  24257. A_UINT32 interval; /** Keep alive interval */
  24258. A_UINT32 timeout; /** Timeout if keep alive fails */
  24259. A_UINT32 session; /** Session ID from HOST */
  24260. wmi_mac_addr gateway_mac; /** Server Mac Address */
  24261. } wmi_hb_set_tcp_params_cmd_fixed_param;
  24262. typedef struct {
  24263. /** TLV tag and len; tag equals
  24264. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
  24265. A_UINT32 tlv_header;
  24266. A_UINT32 vdev_id;
  24267. A_UINT32 length;
  24268. A_UINT32 offset;
  24269. A_UINT32 session;
  24270. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  24271. } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
  24272. typedef struct {
  24273. /** TLV tag and len; tag equals
  24274. * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
  24275. A_UINT32 tlv_header;
  24276. A_UINT32 vdev_id;
  24277. A_UINT32 srv_ip;
  24278. A_UINT32 dev_ip;
  24279. A_UINT32 src_port;
  24280. A_UINT32 dst_port;
  24281. A_UINT32 interval;
  24282. A_UINT32 timeout;
  24283. A_UINT32 session;
  24284. wmi_mac_addr gateway_mac;
  24285. } wmi_hb_set_udp_params_cmd_fixed_param;
  24286. typedef struct {
  24287. /** TLV tag and len; tag equals
  24288. * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
  24289. A_UINT32 tlv_header;
  24290. A_UINT32 vdev_id;
  24291. A_UINT32 length;
  24292. A_UINT32 offset;
  24293. A_UINT32 session;
  24294. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  24295. } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
  24296. /** wlan HB events */
  24297. typedef enum {
  24298. WMI_WLAN_HB_REASON_UNKNOWN = 0,
  24299. WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
  24300. WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
  24301. } WMI_HB_WAKEUP_REASON;
  24302. typedef struct {
  24303. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
  24304. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  24305. A_UINT32 session; /** Session ID from HOST */
  24306. A_UINT32 reason; /** wakeup reason */
  24307. } wmi_hb_ind_event_fixed_param;
  24308. typedef struct {
  24309. /** TLV tag and len; tag equals
  24310. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  24311. A_UINT32 tlv_header; /** TLV Header */
  24312. A_UINT32 vdev_id; /** Vdev ID */
  24313. A_UINT32 session; /** Session number from the HOST */
  24314. A_UINT32 srv_ip; /** IPv4 address of the OCF server */
  24315. A_UINT32 dev_ip; /** IPv4 address of the device */
  24316. A_UINT32 tcp_tx_seq; /** TCP sequence number */
  24317. A_UINT32 src_port; /** Source port */
  24318. A_UINT32 dst_port; /** Destination port */
  24319. A_UINT32 protocol; /** Protocol used: TCP:0, UDP:1 */
  24320. 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 */
  24321. A_UINT32 timeout_retries; /** timeout[31:16]: TCP ACK timeout, time to wait for a TCP ACK in ms
  24322. retries[15:0]: Number of TCP level retries of OIC ping request */
  24323. wmi_mac_addr peer_macaddr; /** MAC address of the OCF server */
  24324. A_UINT32 oic_ping_pkt0; /** OIC ping packet content [Byte03:Byte00] */
  24325. A_UINT32 oic_ping_pkt1; /** OIC ping packet content [Byte07:Byte04] */
  24326. A_UINT32 oic_ping_pkt2; /** OIC ping packet content [Byte11:Byte08] */
  24327. A_UINT32 oic_ping_pkt3; /** OIC ping packet content [Byte15:Byte12] */
  24328. A_UINT32 tls_cipher_suite_version; /** Cipher suite [31:16] as defined in https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml
  24329. TLS version [15:00] */
  24330. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  24331. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  24332. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  24333. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  24334. A_UINT32 tls_tx_key0; /** client_write_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  24335. A_UINT32 tls_tx_key1; /** client_write_key[Byte07:Byte04] */
  24336. A_UINT32 tls_tx_key2; /** client_write_key[Byte11:Byte08] */
  24337. A_UINT32 tls_tx_key3; /** client_write_key[Byte15:Byte12] */
  24338. A_UINT32 tls_rx_key0; /** server_write_key[Byte03:Byte00] */
  24339. A_UINT32 tls_rx_key1; /** server_write_key[Byte07:Byte04] */
  24340. A_UINT32 tls_rx_key2; /** server_write_key[Byte11:Byte08] */
  24341. A_UINT32 tls_rx_key3; /** server_write_key[Byte15:Byte12] */
  24342. A_UINT32 tls_MAC_write_key0; /** client_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  24343. A_UINT32 tls_MAC_write_key1; /** client_write_MAC_key[Byte07:Byte04] */
  24344. A_UINT32 tls_MAC_write_key2; /** client_write_MAC_key[Byte11:Byte08] */
  24345. A_UINT32 tls_MAC_write_key3; /** client_write_MAC_key[Byte15:Byte12] */
  24346. A_UINT32 tls_MAC_write_key4; /** client_write_MAC_key[Byte19:Byte16] */
  24347. A_UINT32 tls_MAC_write_key5; /** client_write_MAC_key[Byte23:Byte20] */
  24348. A_UINT32 tls_MAC_write_key6; /** client_write_MAC_key[Byte27:Byte24] */
  24349. A_UINT32 tls_MAC_write_key7; /** client_write_MAC_key[Byte31:Byte28] */
  24350. A_UINT32 tls_MAC_read_key0; /** server_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  24351. A_UINT32 tls_MAC_read_key1; /** server_write_MAC_key[Byte07:Byte04] */
  24352. A_UINT32 tls_MAC_read_key2; /** server_write_MAC_key[Byte11:Byte08] */
  24353. A_UINT32 tls_MAC_read_key3; /** server_write_MAC_key[Byte15:Byte12] */
  24354. A_UINT32 tls_MAC_read_key4; /** server_write_MAC_key[Byte19:Byte16] */
  24355. A_UINT32 tls_MAC_read_key5; /** server_write_MAC_key[Byte23:Byte20] */
  24356. A_UINT32 tls_MAC_read_key6; /** server_write_MAC_key[Byte27:Byte24] */
  24357. A_UINT32 tls_MAC_read_key7; /** server_write_MAC_key[Byte31:Byte28] */
  24358. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  24359. GCM Mode: GCMNonce.salt [Byte03:Byte00] refer Section 3 of RFC 5288 */
  24360. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  24361. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  24362. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  24363. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  24364. GCM Mode: GCMNonce.salt [Byte4: Byte0] refer Section 3 of RFC 5288 */
  24365. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  24366. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  24367. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  24368. } wmi_oic_ping_offload_params_cmd_fixed_param;
  24369. typedef struct {
  24370. /** TLV tag and len; tag equals
  24371. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  24372. A_UINT32 tlv_header; /** TLV Header*/
  24373. A_UINT32 vdev_id; /** Interface number */
  24374. A_UINT32 session; /** Session ID*/
  24375. A_UINT32 enable; /** 1: Enable , 0: Disable */
  24376. } wmi_oic_ping_offload_set_enable_cmd_fixed_param;
  24377. /** wlan OIC events */
  24378. typedef enum {
  24379. WMI_WLAN_OIC_REASON_UNKNOWN = 0, /** Unknown */
  24380. WMI_WLAN_OIC_REASON_HOST_WAKE = 1, /** No error , but host is woken up due to other reasons */
  24381. WMI_WLAN_OIC_REASON_TCP_TIMEOUT = 2, /** TCP Timeout */
  24382. WMI_WLAN_OIC_REASON_PING_TIMEOUT = 3, /** OIC Ping resposnse timeout */
  24383. WMI_WLAN_OIC_REASON_TLS_ERROR = 4, /** TLS decryption error */
  24384. } WMI_OIC_WAKEUP_REASON;
  24385. typedef struct {
  24386. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oic_ind_event_fixed_param */
  24387. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  24388. A_UINT32 session; /** Session ID from driver */
  24389. A_UINT32 reason; /** wakeup reason as per WMI_OIC_WAKEUP_REASON */
  24390. A_UINT32 tcp_tx_seq; /** Current TCP sequence number */
  24391. A_UINT32 tcp_ack_num; /** Current TCP Acknowledgement number */
  24392. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  24393. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  24394. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  24395. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  24396. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  24397. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  24398. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  24399. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  24400. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  24401. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  24402. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  24403. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  24404. } wmi_oic_ping_handoff_event;
  24405. typedef struct {
  24406. /** TLV tag and len; tag equals
  24407. * WMITLV_TAG_STRUC_wmi_dhcp_lease_renew_offload_fixed_param */
  24408. A_UINT32 tlv_header; /** TLV Header*/
  24409. A_UINT32 vdev_id; /** Vdev ID */
  24410. A_UINT32 enable; /** 1: Enable 0: Disable*/
  24411. A_UINT32 srv_ip; /** DHCP Server IP address (IPv4) */
  24412. A_UINT32 client_ip; /** Device IP address (IPv4) */
  24413. wmi_mac_addr srv_mac; /** DHCP Server MAC address */
  24414. A_UINT32 parameter_list; /** Optional Parameter list. RFC 1533 gives the complete set of options defined for use with DHCP */
  24415. } wmi_dhcp_lease_renew_offload_cmd_fixed_param;
  24416. /** WLAN DHCP Lease Renew Events */
  24417. typedef enum {
  24418. WMI_WLAN_DHCP_RENEW_REASON_UNKNOWN = 0, /** Unknown */
  24419. WMI_WLAN_DHCP_RENEW_REASON_ACK_TIMEOUT = 1, /** DHCP ACK Timeout */
  24420. WMI_WLAN_DHCP_RENEW_REASON_NACK = 2, /** DHCP error */
  24421. } WMI_DHCP_RENEW_WAKEUP_REASON;
  24422. typedef struct {
  24423. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dhcp_renew_ind_event_fixed_param */
  24424. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  24425. A_UINT32 reason; /** wakeup reason as per enum WMI_DHCP_RENEW_WAKEUP_REASON*/
  24426. } wmi_dhcp_lease_renew_event;
  24427. /** WMI_STA_SMPS_PARAM_CMDID */
  24428. typedef enum {
  24429. /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
  24430. WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
  24431. /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
  24432. * to enter D-SMPS mode from Stalled-D-SMPS mode */
  24433. WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
  24434. /** RSSI threshold to disable SMPS modes */
  24435. WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
  24436. /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
  24437. WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
  24438. /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
  24439. WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
  24440. /** Enable/Disable DTIM 1chRx feature */
  24441. WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5,
  24442. /** Enable/Disable dynamic bw feature */
  24443. WMI_STA_SMPS_PARAM_DYNAMIC_BW_SWITCH = 6,
  24444. } wmi_sta_smps_param;
  24445. typedef struct {
  24446. /** TLV tag and len; tag equals
  24447. * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
  24448. A_UINT32 tlv_header;
  24449. /** Unique id identifying the VDEV */
  24450. A_UINT32 vdev_id;
  24451. /** SMPS parameter (see wmi_sta_smps_param) */
  24452. A_UINT32 param;
  24453. /** Value of SMPS parameter */
  24454. A_UINT32 value;
  24455. } wmi_sta_smps_param_cmd_fixed_param;
  24456. typedef struct {
  24457. /** TLV tag and len; tag equals
  24458. * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
  24459. A_UINT32 tlv_header;
  24460. /* TX stats */
  24461. A_UINT32 txBytesPushed;
  24462. A_UINT32 txPacketsPushed;
  24463. /* RX stats */
  24464. A_UINT32 rxBytesRcvd;
  24465. A_UINT32 rxPacketsRcvd;
  24466. A_UINT32 rxTimeTotal;
  24467. /** peer MAC address */
  24468. wmi_mac_addr peer_macaddr;
  24469. } wmi_mcc_sched_sta_traffic_stats;
  24470. typedef struct {
  24471. /** TLV tag and len; tag equals
  24472. * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
  24473. A_UINT32 tlv_header;
  24474. /** Duration over which the host stats were collected */
  24475. A_UINT32 duration;
  24476. /** Number of stations filled in following stats array */
  24477. A_UINT32 num_sta;
  24478. /* Following this struct are the TLVs:
  24479. * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
  24480. */
  24481. } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
  24482. typedef struct
  24483. {
  24484. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
  24485. /* unique id identifying the VDEV, generated by the caller */
  24486. A_UINT32 vdev_id;
  24487. /*Batch scan enable command parameters*/
  24488. A_UINT32 scanInterval;
  24489. A_UINT32 numScan2Batch;
  24490. A_UINT32 bestNetworks;
  24491. A_UINT32 rfBand;
  24492. A_UINT32 rtt;
  24493. } wmi_batch_scan_enable_cmd_fixed_param;
  24494. typedef struct
  24495. {
  24496. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
  24497. A_UINT32 supportedMscan;
  24498. } wmi_batch_scan_enabled_event_fixed_param;
  24499. typedef struct
  24500. {
  24501. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
  24502. /* unique id identifying the VDEV, generated by the caller */
  24503. A_UINT32 vdev_id;
  24504. A_UINT32 param;
  24505. } wmi_batch_scan_disable_cmd_fixed_param;
  24506. typedef struct
  24507. {
  24508. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
  24509. /** unique id identifying the VDEV, generated by the caller */
  24510. A_UINT32 vdev_id;
  24511. A_UINT32 param;
  24512. } wmi_batch_scan_trigger_result_cmd_fixed_param;
  24513. typedef struct
  24514. {
  24515. A_UINT32 tlv_header;
  24516. wmi_mac_addr bssid; /* BSSID */
  24517. wmi_ssid ssid; /* SSID */
  24518. A_UINT32 ch; /* Channel number */
  24519. A_UINT32 rssi; /* RSSI or Level */
  24520. /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
  24521. A_UINT32 timestamp;
  24522. A_UINT32 ch_freq; /* Channel frequency in MHz */
  24523. } wmi_batch_scan_result_network_info;
  24524. typedef struct
  24525. {
  24526. A_UINT32 tlv_header;
  24527. A_UINT32 scanId; /* Scan List ID. */
  24528. /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
  24529. A_UINT32 numNetworksInScanList;
  24530. A_UINT32 netWorkStartIndex; /* indicate the start index of network info*/
  24531. } wmi_batch_scan_result_scan_list;
  24532. #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. */
  24533. #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /* send true or false based on scan response frame being a Probe Rsp or not */
  24534. #define LPI_IE_BITMAP_SSID 0x00000004 /* send ssid from received scan response frame */
  24535. #define LPI_IE_BITMAP_RSSI 0x00000008 /* send RSSI value reported by HW for the received scan response after adjusting with noise floor */
  24536. #define LPI_IE_BITMAP_CHAN 0x00000010 /* send channel number from the received scan response */
  24537. #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* send Tx power from TPC IE of scan rsp */
  24538. #define LPI_IE_BITMAP_TX_RATE 0x00000040 /* send rate of the received frame as reported by HW. */
  24539. #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. */
  24540. #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /* send timestamp reported in the received scan rsp frame. */
  24541. #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. */
  24542. /*
  24543. * TEMPORARY alias of incorrect old name the correct name.
  24544. * This alias will be removed once all references to the old name have been fixed.
  24545. */
  24546. #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
  24547. #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false. */
  24548. #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP */
  24549. #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled */
  24550. #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device. */
  24551. #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel */
  24552. #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received. */
  24553. #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz */
  24554. #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above */
  24555. #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations */
  24556. #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan */
  24557. #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. */
  24558. #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 */
  24559. #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 */
  24560. #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. */
  24561. #define LPI_IE_BITMAP_CHRE_RADIO_CHAIN 0x01000000 /* include radio chain and RSSI per chain information if this bit is set - for CHRE */
  24562. #define LPI_IE_BITMAP_CHRE_SEC_MODE_MRSNO_WIFI6 0x02000000 /* include MRSNO IE's sec_mode information for WiFi6 if this bit is set - for CHRE */
  24563. #define LPI_IE_BITMAP_CHRE_SEC_MODE_MRSNO_WIFI7 0x04000000 /* include MRSNO IE's sec_mode information for WiFi7 if this bit is set - for CHRE */
  24564. /* 0x08000000 is unused / available */
  24565. #define LPI_IE_BITMAP_CHRE_ESS 0x10000000 /* ESS capability info for CHRE */
  24566. #define LPI_IE_BITMAP_CHRE_SEC_MODE 0x20000000 /* Security capability info for CHRE */
  24567. #define LPI_IE_BITMAP_CHRE_SUPPORTED_RATE 0x40000000 /* Highest MCS corresponding NCC for TX and RX */
  24568. #define LPI_IE_BITMAP_ALL 0xFFFFFFFF
  24569. typedef struct {
  24570. A_UINT32 tlv_header;
  24571. /**A_BOOL indicates LPI mgmt snooping enable/disable*/
  24572. A_UINT32 enable;
  24573. /**LPI snooping mode*/
  24574. A_UINT32 snooping_mode;
  24575. /** LPI interested IEs in snooping context */
  24576. A_UINT32 ie_bitmap;
  24577. } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
  24578. typedef struct {
  24579. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  24580. /** Scan ID */
  24581. A_UINT32 scan_id;
  24582. /** Scan requestor ID */
  24583. A_UINT32 scan_req_id;
  24584. /** VDEV id(interface) that is requesting scan */
  24585. A_UINT32 vdev_id;
  24586. /** LPI interested IEs in scan context */
  24587. A_UINT32 ie_bitmap;
  24588. /** Scan Priority, input to scan scheduler */
  24589. A_UINT32 scan_priority;
  24590. /** dwell time in msec on active channels */
  24591. A_UINT32 dwell_time_active;
  24592. /** dwell time in msec on passive channels */
  24593. A_UINT32 dwell_time_passive;
  24594. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  24595. A_UINT32 min_rest_time;
  24596. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  24597. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  24598. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  24599. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  24600. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  24601. * irrespective of activity. activity is determined by the idle_time parameter.
  24602. */
  24603. A_UINT32 max_rest_time;
  24604. /** time before sending next set of probe requests.
  24605. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  24606. * The number of probe requests specified depends on the ssid_list and bssid_list
  24607. */
  24608. A_UINT32 repeat_probe_time;
  24609. /** time in msec between 2 consecutive probe requests with in a set. */
  24610. A_UINT32 probe_spacing_time;
  24611. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  24612. A_UINT32 idle_time;
  24613. /** maximum time in msec allowed for scan */
  24614. A_UINT32 max_scan_time;
  24615. /** delay in msec before sending first probe request after switching to a channel */
  24616. A_UINT32 probe_delay;
  24617. /** Scan control flags */
  24618. A_UINT32 scan_ctrl_flags;
  24619. /** Burst duration time in msec*/
  24620. A_UINT32 burst_duration;
  24621. /** # if channels to scan. In the TLV channel_list[] */
  24622. A_UINT32 num_chan;
  24623. /** number of bssids. In the TLV bssid_list[] */
  24624. A_UINT32 num_bssid;
  24625. /** number of ssid. In the TLV ssid_list[] */
  24626. A_UINT32 num_ssids;
  24627. /** number of bytes in ie data. In the TLV ie_data[] */
  24628. A_UINT32 ie_len;
  24629. /** Scan control flags extended (see WMI_SCAN_FLAG_EXT_xxx) */
  24630. A_UINT32 scan_ctrl_flags_ext;
  24631. /**
  24632. * TLV (tag length value) parameters follow the scan_cmd
  24633. * structure. The TLV's are:
  24634. * A_UINT32 channel_list[]; // in MHz
  24635. * wmi_ssid ssid_list[];
  24636. * wmi_mac_addr bssid_list[];
  24637. * A_UINT8 ie_data[];
  24638. */
  24639. } wmi_lpi_start_scan_cmd_fixed_param;
  24640. typedef struct {
  24641. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  24642. /** Scan requestor ID */
  24643. A_UINT32 scan_req_id;
  24644. /** Scan ID */
  24645. A_UINT32 scan_id;
  24646. /**
  24647. * Req Type
  24648. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  24649. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  24650. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  24651. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  24652. */
  24653. A_UINT32 req_type;
  24654. /**
  24655. * vDev ID
  24656. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  24657. */
  24658. A_UINT32 vdev_id;
  24659. } wmi_lpi_stop_scan_cmd_fixed_param;
  24660. typedef enum {
  24661. WMI_LPI_DEVICE_TYPE_AP = 1,
  24662. WMI_LPI_DEVICE_TYPE_P2P = 2,
  24663. WMI_LPI_DEVICE_TYPE_NAN = 3,
  24664. } wmi_lpi_device_type;
  24665. typedef struct
  24666. {
  24667. A_UINT32 tlv_header;
  24668. /** Scan requestor ID */
  24669. A_UINT32 scan_req_id;
  24670. A_UINT32 ie_bitmap;
  24671. A_UINT32 data_len;
  24672. } wmi_lpi_result_event_fixed_param;
  24673. typedef enum {
  24674. /** User scan Request completed */
  24675. WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
  24676. /** User Request was never serviced */
  24677. WMI_LPI_STATUS_DROPPED_REQ = 1,
  24678. /** Illegal channel Req */
  24679. WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
  24680. /** Illegal Operation Req */
  24681. WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
  24682. /** Request Aborted */
  24683. WMI_LPI_STATUS_REQ_ABORTED = 4,
  24684. /** Request Timed Out */
  24685. WMI_LPI_STATUS_REQ_TIME_OUT = 5,
  24686. /** Medium Busy, already there
  24687. * is a scan is going on */
  24688. WMI_LPI_STATUS_MEDIUM_BUSY = 6,
  24689. /** Extscan is the scan client whose scan complete event is triggered */
  24690. WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
  24691. } wmi_lpi_staus;
  24692. typedef struct
  24693. {
  24694. A_UINT32 tlv_header;
  24695. wmi_lpi_staus status;
  24696. /** Scan requestor ID */
  24697. A_UINT32 scan_req_id;
  24698. } wmi_lpi_status_event_fixed_param;
  24699. typedef struct
  24700. {
  24701. A_UINT32 tlv_header;
  24702. wmi_mac_addr bssid;
  24703. wmi_ssid ssid;
  24704. A_UINT32 freq;
  24705. A_UINT32 rssi;
  24706. A_UINT32 vdev_id;
  24707. } wmi_lpi_handoff_event_fixed_param;
  24708. typedef struct
  24709. {
  24710. A_UINT32 tlv_header;
  24711. A_UINT32 timestamp; /*timestamp of batch scan event*/
  24712. A_UINT32 numScanLists; /*number of scan in this event*/
  24713. A_UINT32 isLastResult; /*is this event a last event of the whole batch scan*/
  24714. } wmi_batch_scan_result_event_fixed_param;
  24715. typedef enum { /* DEPRECATED - DO NOT USE */
  24716. /** beacons not received from P2P GO */
  24717. WMI_P2P_GO_BMISS = 0,
  24718. /** beacons not received from P2 GO's STA's connected AP */
  24719. WMI_DFS_AP_BMISS = 1,
  24720. } wmi_dfs_ap_bmiss_reason; /* DEPRECATED - DO NOT USE */
  24721. typedef struct {
  24722. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_cli_dfs_ap_bmiss_fixed_param*/
  24723. A_UINT32 vdev_id;
  24724. /* NOTE:
  24725. * The reason_code field is deprecated, and should be ignored.
  24726. */
  24727. A_UINT32 reason_code; /* contains a wmi_dfs_ap_bmiss_reason value */
  24728. } wmi_p2p_cli_dfs_ap_bmiss_fixed_param;
  24729. typedef struct {
  24730. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
  24731. A_UINT32 vdev_id;
  24732. /* This TLV is followed by p2p_noa_info for vdev :
  24733. * wmi_p2p_noa_info p2p_noa_info;
  24734. */
  24735. } wmi_p2p_noa_event_fixed_param;
  24736. #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
  24737. #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
  24738. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
  24739. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
  24740. #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
  24741. #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
  24742. typedef struct {
  24743. /** TLV tag and len; tag equals
  24744. * */
  24745. A_UINT32 tlv_header;
  24746. /** gpip pin number */
  24747. A_UINT32 gpio_pin_num;
  24748. /** gpio interrupt type */
  24749. A_UINT32 int_type;
  24750. /** RF radio status */
  24751. A_UINT32 radio_state;
  24752. } wmi_rfkill_mode_param;
  24753. typedef enum {
  24754. WMI_SET_LED_SYS_POWEROFF,
  24755. WMI_SET_LED_SYS_S3_SUSPEND,
  24756. WMI_SET_LED_SYS_S4_S5,
  24757. WMI_SET_LED_SYS_DRIVER_DISABLE,
  24758. WMI_SET_LED_SYS_WAKEUP,
  24759. WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
  24760. WMI_SET_LED_SYS_POWERON,
  24761. } wmi_led_sys_state_param;
  24762. typedef enum {
  24763. WMI_CONFIG_LED_TO_VDD = 0,
  24764. WMI_CONFIG_LED_TO_GND = 1,
  24765. } wmi_config_led_connect_type;
  24766. typedef enum {
  24767. WMI_CONFIG_LED_NOT_WITH_BT = 0,
  24768. WMI_CONFIG_LED_WITH_BT = 1,
  24769. } wmi_config_led_with_bt_flag;
  24770. typedef enum {
  24771. WMI_CONFIG_LED_DISABLE = 0,
  24772. WMI_CONFIG_LED_ENABLE = 1,
  24773. } wmi_config_led_enable_flag;
  24774. typedef enum {
  24775. WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
  24776. WMI_CONFIG_LED_HIGH_OFF = 1,
  24777. WMI_CONFIG_LED_HIGH_ON = 2,
  24778. } wmi_config_led_on_flag;
  24779. typedef enum {
  24780. WMI_CONFIG_LED_UNSPECIFIED = 0,
  24781. WMI_CONFIG_LED_ON = 1,
  24782. WMI_CONFIG_LED_OFF = 2,
  24783. WMI_CONFIG_LED_DIM = 3,
  24784. WMI_CONFIG_LED_BLINK = 4,
  24785. WMI_CONFIG_LED_TXRX = 5,
  24786. } wmi_config_led_operation_type;
  24787. typedef struct {
  24788. /** TLV tag and len; tag equals
  24789. * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
  24790. A_UINT32 tlv_header;
  24791. /* Set GPIO pin */
  24792. A_UINT32 led_gpio_pin;
  24793. /* Set connect type defined in wmi_config_led_connect_type */
  24794. A_UINT32 connect_type;
  24795. /* Set flag defined in wmi_config_led_with_bt_flag*/
  24796. A_UINT32 with_bt;
  24797. /* Set LED enablement defined in wmi_config_led_enable_flag */
  24798. A_UINT32 led_enable;
  24799. /** pdev_id for identifying the MAC
  24800. * See macros starting with WMI_PDEV_ID_ for values.
  24801. */
  24802. A_UINT32 pdev_id;
  24803. /* see wmi_config_led_operation_type enum */
  24804. A_UINT32 led_operation_type;
  24805. /* see wmi_config_led_on_flag enum */
  24806. A_UINT32 led_on_flag; /* configure high/low on/off sense */
  24807. A_UINT32 led_on_interval; /* for blink function; unit: ms */
  24808. A_UINT32 led_off_interval; /* for blink function; unit: ms */
  24809. A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
  24810. } wmi_pdev_set_led_config_cmd_fixed_param;
  24811. #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
  24812. #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
  24813. /** WMI_SMARTANT_STATE_CHANGE_EVENTIDWMI_SMARTANT_STATE_CHANGE_EVENTID
  24814. * report Smart Antenna status to host */
  24815. typedef struct {
  24816. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_smartant_event_fixed_param */
  24817. A_UINT32 tlv_header;
  24818. /** whether Antenna Controller is still alive or offline. */
  24819. A_UINT32 smart_ant_AC_alive;
  24820. } wmi_smartant_state_param;
  24821. /** WMI_PEER_INFO_REQ_CMDID
  24822. * Request FW to provide peer info */
  24823. typedef struct {
  24824. /** TLV tag and len; tag equals
  24825. * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
  24826. A_UINT32 tlv_header;
  24827. /** In order to get the peer info for a single peer, host shall
  24828. * issue the peer_mac_address of that peer. For getting the
  24829. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  24830. * address. The firmware will return the peer info for all the
  24831. * peers on the specified vdev_id */
  24832. wmi_mac_addr peer_mac_address;
  24833. /** vdev id */
  24834. A_UINT32 vdev_id;
  24835. } wmi_peer_info_req_cmd_fixed_param;
  24836. typedef struct {
  24837. /** TLV tag and len; tag equals
  24838. * WMITLV_TAG_STRUC_wmi_peer_info */
  24839. A_UINT32 tlv_header;
  24840. /** mac addr of the peer */
  24841. wmi_mac_addr peer_mac_address;
  24842. /** data_rate of the peer */
  24843. A_UINT32 data_rate;
  24844. /** RSSI of the peer */
  24845. A_UINT32 rssi;
  24846. /** tx fail count */
  24847. A_UINT32 tx_fail_cnt;
  24848. } wmi_peer_info;
  24849. /** FW response with the peer info */
  24850. typedef struct {
  24851. /** TLV tag and len; tag equals
  24852. * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
  24853. A_UINT32 tlv_header;
  24854. /** number of peers in peer_info */
  24855. A_UINT32 num_peers;
  24856. /* Set to 1 only if vdev_id field is valid */
  24857. A_UINT32 valid_vdev_id;
  24858. /* VDEV to which the peer belongs to */
  24859. A_UINT32 vdev_id;
  24860. /* This TLV is followed by another TLV of array of structs
  24861. * wmi_peer_info peer_info[];
  24862. */
  24863. } wmi_peer_info_event_fixed_param;
  24864. /** WMI_PEER_ANTDIV_INFO_REQ_CMDID
  24865. * Request FW to provide peer info */
  24866. typedef struct {
  24867. /** TLV tag and len; tag equals
  24868. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param */
  24869. A_UINT32 tlv_header;
  24870. /** In order to get the peer antdiv info for a single peer, host shall
  24871. * issue the peer_mac_address of that peer. For getting the
  24872. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  24873. * address. The firmware will return the peer info for all the
  24874. * peers on the specified vdev_id */
  24875. wmi_mac_addr peer_mac_address;
  24876. /** vdev id */
  24877. A_UINT32 vdev_id;
  24878. } wmi_peer_antdiv_info_req_cmd_fixed_param;
  24879. /** FW response with the peer antdiv info */
  24880. typedef struct {
  24881. /** TLV tag and len; tag equals
  24882. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param */
  24883. A_UINT32 tlv_header;
  24884. /** number of peers in peer_info */
  24885. A_UINT32 num_peers;
  24886. /* VDEV to which the peer belongs to */
  24887. A_UINT32 vdev_id;
  24888. /* This TLV is followed by another TLV of array of structs
  24889. * wmi_peer_antdiv_info peer_antdiv_info[];
  24890. */
  24891. } wmi_peer_antdiv_info_event_fixed_param;
  24892. typedef struct {
  24893. /** TLV tag and len; tag equals
  24894. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info */
  24895. A_UINT32 tlv_header;
  24896. /** mac addr of the peer */
  24897. wmi_mac_addr peer_mac_address;
  24898. /** per chain RSSI of the peer, for up to 8 chains.
  24899. * Each chain's entry reports the RSSI for different bandwidths:
  24900. * bits 7:0 -> primary 20 MHz
  24901. * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
  24902. * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
  24903. * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
  24904. * Each of these 8-bit RSSI reports is in dB units, with respect to
  24905. * the noise floor.
  24906. * 0x80 means invalid.
  24907. * All unused bytes within used chain_rssi indices shall be set to 0x80.
  24908. * All unused chain_rssi indices shall be set to 0x80808080.
  24909. */
  24910. A_INT32 chain_rssi[8];
  24911. } wmi_peer_antdiv_info;
  24912. typedef struct {
  24913. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_msduq_qdepth_thresh_update */
  24914. /** tid_number */
  24915. A_UINT32 tid_num;
  24916. /** msduq_mask to set the value
  24917. * bit 0 - HI-PRI msdu flowq qdepth threshold need to update if set
  24918. * bit 1 - LOW-PRI msdu flowq qdepth threshold need to update if set
  24919. * bit 2 - UDP msdu flowq qdepth threshold need to update if set
  24920. * bit 3 - NON-UDP msdu flowq qdepth threshold need to update if set
  24921. * rest of bits are reserved and set to 0.
  24922. */
  24923. A_UINT32 msduq_update_mask;
  24924. /** Qdepth threshold value
  24925. * If number of msdus in a queue excess over qdepth_thresh_value value
  24926. * while queuing msdu's then we drop new msdus.
  24927. * (Though dropping older (stale) data rather than newer data might be
  24928. * preferable, the dropping is performed by MAC HW, and there's no option
  24929. * to configure the HW to do head dropping rather than tail dropping.)
  24930. */
  24931. A_UINT32 qdepth_thresh_value;
  24932. } wmi_msduq_qdepth_thresh_update;
  24933. /** WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID
  24934. * Request FW to update msduq qdepth threshold per TID per peer */
  24935. typedef struct {
  24936. /** TLV tag and len; tag equals
  24937. * WMITLV_TAG_STRUC_wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param
  24938. */
  24939. A_UINT32 tlv_header;
  24940. /** pdev id
  24941. * The pdev_id can be determined from the vdev_id, but the pdev_id
  24942. * is explicitly provided so it can be used for sanity checking.
  24943. */
  24944. A_UINT32 pdev_id;
  24945. /** vdev id */
  24946. A_UINT32 vdev_id;
  24947. /**
  24948. * To set the peer msduq qdepth threshold update for a single peer,
  24949. * the host shall send mac address for which peer need to be updated.
  24950. */
  24951. wmi_mac_addr peer_mac_address;
  24952. /** number of payload update tlvs */
  24953. A_UINT32 num_of_msduq_updates;
  24954. /** Followed by the variable length TLV msduq_qdepth_updates:
  24955. * wmi_msduq_qdepth_th_update msduq_qdepth_thshd_update_list[]
  24956. */
  24957. } wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param;
  24958. /**
  24959. * ACK policy to be followed for the TID
  24960. */
  24961. typedef enum {
  24962. /** Used when the host does not want to configure the ACK policy */
  24963. WMI_PEER_TID_CONFIG_ACK_POLICY_IGNORE,
  24964. /** Allow ACK for the TID */
  24965. WMI_PEER_TID_CONFIG_ACK,
  24966. /** Do not expect ACK for the TID */
  24967. WMI_PEER_TID_CONFIG_NOACK,
  24968. } WMI_PEER_TID_CONFIG_ACK_POLICY;
  24969. /**
  24970. * Aggregation control policy for the TID
  24971. */
  24972. typedef enum {
  24973. /** Used when the host does not want to configure the aggregation policy */
  24974. WMI_PEER_TID_CONFIG_AGGR_CONTROL_IGNORE,
  24975. /** Enable aggregation for the TID */
  24976. WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE,
  24977. /** Disable aggregation for the TID */
  24978. WMI_PEER_TID_CONFIG_AGGR_CONTROL_DISABLE,
  24979. } WMI_PEER_TID_CONFIG_AGGR_CONTROL;
  24980. /**
  24981. * Rate control policy for the TID
  24982. */
  24983. typedef enum {
  24984. /** Used when the host does not want to configure the rate control policy */
  24985. WMI_PEER_TID_CONFIG_RATE_CONTROL_IGNORE,
  24986. /** Auto rate control */
  24987. WMI_PEER_TID_CONFIG_RATE_CONTROL_AUTO,
  24988. /** Fixed rate control */
  24989. WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE,
  24990. /** Set the Default lowest rate (6Mbps in 5GHZ and 1Mbps in 2GHZ) */
  24991. WMI_PEER_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE,
  24992. /**
  24993. * Set the highest rate cap allowed for this TID.
  24994. * Rate cap is specified in rate code format,
  24995. * i.e. NSS and MCS combined as shown below:
  24996. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  24997. * b'3-b'0 indicate the MCS
  24998. */
  24999. WMI_PEER_TID_CONFIG_RATE_UPPER_CAP,
  25000. } WMI_PEER_TID_CONFIG_RATE_CONTROL;
  25001. /**
  25002. * SW retry threshold for the TID
  25003. */
  25004. typedef enum {
  25005. /** Used when the host does not want to configure the SW retry threshold */
  25006. WMI_PEER_TID_SW_RETRY_IGNORE = 0,
  25007. WMI_PEER_TID_SW_RETRY_MIN = 1,
  25008. WMI_PEER_TID_SW_RETRY_MAX = 30,
  25009. /** No SW retry for the TID */
  25010. WMI_PEER_TID_SW_RETRY_NO_RETRY = 0xFFFFFFFF,
  25011. } WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD;
  25012. /*
  25013. * values for tid_config_supported_bitmap field,
  25014. * in wmi_peer_tid_configurations_cmd structure.
  25015. */
  25016. typedef enum {
  25017. /* Used to indicate that disable_rts_cts field is valid */
  25018. WMI_PEER_TID_DISABLE_RTS_CTS_VALID = 0x00000001,
  25019. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_VALID = 0x00000002,
  25020. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_VALID = 0x00000004,
  25021. } WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP;
  25022. /*
  25023. * Per TID level enable/disable of RTS/CTS for that peer.
  25024. * Currently applicable only for "data tids" within targets which set
  25025. * the RTSCTS_FOR_UNICAST_MGMT WMI service bit.
  25026. *
  25027. * Enum values/Expected values for disable_rts_cts of
  25028. * WMI_PEER_TID_DISABLE_RTS_CTS_VALID as below:
  25029. *
  25030. * 0 (WMI_RTSCTS_RESET) - Use default RTS/CTS
  25031. * 1 (WMI_RTSCTS_DISABLE) - Disable RTS/CTS for every ppdu for that
  25032. * configured data TID
  25033. * 2 (WMI_RTSCTS_ENABLE) - Enable RTS/CTS for every ppdu for that
  25034. * configured data TID
  25035. */
  25036. typedef enum {
  25037. WMI_RTSCTS_RESET = 0,
  25038. WMI_RTSCTS_DISABLE = 1,
  25039. WMI_RTSCTS_ENABLE = 2,
  25040. } WMI_PEER_TID_CONFIG_RTSCTS_CONTROL;
  25041. /**
  25042. * MPDU Aggregate value for the TID
  25043. */
  25044. typedef enum {
  25045. /** Set the default Aggregation value configured in FW */
  25046. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_DEFAULT,
  25047. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MIN = 1,
  25048. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MAX = 1024,
  25049. } WMI_PEER_TID_CONFIG_MAX_NUM_MPDU_IN_PPDU;
  25050. /**
  25051. * MSDU Aggregate value for the TID
  25052. */
  25053. typedef enum {
  25054. /** Set the default Aggregation value configured in FW */
  25055. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_DEFAULT,
  25056. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MIN = 1,
  25057. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MAX = 7,
  25058. } WMI_PEER_TID_CONFIG_MAX_NUM_MSDU_IN_MPDU;
  25059. /**
  25060. * Command format for the TID configuration
  25061. */
  25062. typedef struct {
  25063. /** TLV tag and len; tag equals
  25064. * WMITLV_TAG_STRUC_wmi_peer_tid_configurations_cmd_fixed_param
  25065. */
  25066. A_UINT32 tlv_header;
  25067. /** vdev id */
  25068. A_UINT32 vdev_id;
  25069. /** peer MAC address */
  25070. wmi_mac_addr peer_mac_address;
  25071. /** TID number, generated by the caller.
  25072. * Valid range for QoS TID : 0-15
  25073. * Valid range for non QOS/Mgmt TID: 16-19
  25074. * Any other TID number is invalid.
  25075. */
  25076. A_UINT32 tid_num;
  25077. /** ACK policy - of type WMI_PEER_TID_CONFIG_ACK_POLICY */
  25078. A_UINT32 ack_policy;
  25079. /** Aggregation control - of type WMI_PEER_TID_CONFIG_AGGR_CONTROL */
  25080. A_UINT32 aggr_control;
  25081. /** Rate control - of type WMI_PEER_TID_CONFIG_RATE_CONTROL */
  25082. A_UINT32 rate_control;
  25083. /** Fixed rate control parameters - of type WMI_PEER_PARAM_FIXED_RATE.
  25084. * This is applicable only when rate_control is
  25085. * WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE
  25086. */
  25087. A_UINT32 rcode_rcflags;
  25088. /** MPDU SW retry threshold - of type WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD
  25089. * This SW retry threshold limits the total number of retransmits of
  25090. * nacked or unacked MPDUs, but it is up to the FW to decide what
  25091. * tx rate to use during each retransmission.
  25092. */
  25093. A_UINT32 sw_retry_threshold;
  25094. /*--- Start of extended structure ---*/
  25095. /* Bitmap to indicate which fields in the extended structure are valid.
  25096. * Bitmap values correspond to enum WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP
  25097. */
  25098. A_UINT32 tid_config_supported_bitmap;
  25099. /* Knob to enable/disable RTS/CTS per TID
  25100. * Enum values/Expected values:
  25101. *
  25102. * 0 (WMI_RTSCTS_RESET) - Use default RTS/CTS
  25103. * 1 (WMI_RTSCTS_DISABLE) - Disable RTS/CTS for every ppdu for
  25104. * that configured data TID
  25105. * 2 (WMI_RTSCTS_ENABLE) - Enable RTS/CTS for every ppdu for
  25106. * that configured data TID
  25107. */
  25108. A_UINT32 disable_rts_cts;
  25109. /** Size for mpdu aggregation
  25110. * (max MPDUs per PPDU)
  25111. * Valid range : 1-1024 (refer to WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MIN,MAX)
  25112. * When this field is set to 0, default aggregation value configured
  25113. * in the fw will be used.
  25114. * This is applicable only when aggr_control is
  25115. * WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE
  25116. */
  25117. A_UINT32 max_num_mpdu_in_ppdu;
  25118. /** Size for msdu aggregation
  25119. * (max MSDUs per MPDU)
  25120. * Valid range : 1-7 (refer to WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MIN,MAX)
  25121. * When this field is set to 0, default aggregation value configured
  25122. * in the fw will be used.
  25123. * This is applicable only when aggr_control is
  25124. * WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE
  25125. */
  25126. A_UINT32 max_num_msdu_in_mpdu;
  25127. } wmi_peer_tid_configurations_cmd_fixed_param;
  25128. /* The below enable/disable macros are used for both per peer CFR capture
  25129. * control (as in wmi_peer_cfr_capture_cmd) and control of the entire periodic
  25130. * CFR capture feature (as in WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE)
  25131. */
  25132. #define WMI_PEER_CFR_CAPTURE_ENABLE 1
  25133. #define WMI_PEER_CFR_CAPTURE_DISABLE 0
  25134. #define WMI_PEER_CFR_ONE_SHOT_REQUEST 0
  25135. #define WMI_PEER_CFR_PERIODICITY_MIN 10 /* 10ms */
  25136. #define WMI_PEER_CFR_PERIODICITY_MAX 10*60*1000 /* 10 minutes */
  25137. /* Bandwidth of peer CFR captures */
  25138. typedef enum {
  25139. WMI_PEER_CFR_CAPTURE_BW_20MHZ = 0,
  25140. WMI_PEER_CFR_CAPTURE_BW_40MHZ = 1,
  25141. WMI_PEER_CFR_CAPTURE_BW_80MHZ = 2,
  25142. WMI_PEER_CFR_CAPTURE_BW_160MHZ = 3,
  25143. WMI_PEER_CFR_CAPTURE_BW_80_80MHZ = 4,
  25144. WMI_PEER_CFR_CAPTURE_BW_MAX,
  25145. } WMI_PEER_CFR_CAPTURE_BW;
  25146. /* Peer CFR capture method */
  25147. typedef enum {
  25148. /* Send null frame on the requested bw and capture CFR on ACK */
  25149. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME = 0,
  25150. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME_WITH_PHASE = 1,
  25151. WMI_PEER_CFR_CAPTURE_METHOD_PROBE_RESP = 2,
  25152. /* New methods to be added here */
  25153. WMI_PEER_CFR_CAPTURE_METHOD_MAX,
  25154. } WMI_PEER_CFR_CAPTURE_METHOD;
  25155. /*
  25156. * Peer command structure to configure the CFR capture
  25157. */
  25158. typedef struct {
  25159. /** TLV tag and len; tag equals
  25160. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_cmd_fixed_param
  25161. */
  25162. A_UINT32 tlv_header;
  25163. /* WMI_PEER_CFR_CAPTURE_ENABLE: Enable CFR capture for the peer
  25164. * WMI_PEER_CFR_CAPTURE_DISABLE: Disable CFR capture for the peer
  25165. */
  25166. A_UINT32 request;
  25167. /* Peer MAC address. In AP mode, this is the address of the connected peer
  25168. * for which CFR capture is needed. In case of STA mode, this is the address
  25169. * of the AP to which the STA is connected
  25170. */
  25171. wmi_mac_addr mac_addr;
  25172. /* vdev id */
  25173. A_UINT32 vdev_id;
  25174. /* Periodicity of measurement in ms.
  25175. * WMI_PEER_CFR_ONE_SHOT_REQUEST: One-shot request i.e., Only one CFR
  25176. * capture for the request and no periodic CFR captures.
  25177. * The min value is WMI_PEER_CFR_PERIODICITY_MIN
  25178. * The max value is WMI_PEER_CFR_PERIODICITY_MAX
  25179. */
  25180. A_UINT32 periodicity;
  25181. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  25182. A_UINT32 bandwidth;
  25183. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  25184. A_UINT32 capture_method;
  25185. } wmi_peer_cfr_capture_cmd_fixed_param;
  25186. typedef enum {
  25187. WMI_PEER_IND_SMPS = 0x0, /* spatial multiplexing power save */
  25188. WMI_PEER_IND_OMN, /* operating mode notification */
  25189. WMI_PEER_IND_OMI, /* operating mode indication */
  25190. } WMI_PEER_OPER_MODE_IND;
  25191. typedef struct {
  25192. /** TLV tag and len; tag equals
  25193. * WMITLV_TAG_STRUC_wmi_peer_oper_mode_change */
  25194. A_UINT32 tlv_header;
  25195. /** mac addr of the peer */
  25196. wmi_mac_addr peer_mac_address;
  25197. /** Peer type indication WMI_PEER_OPER_MODE_IND. */
  25198. A_UINT32 ind_type;
  25199. /** new_rxnss valid for all peer_operating mode ind. */
  25200. A_UINT32 new_rxnss;
  25201. /** new_bw valid for peer_operating mode ind. OMN/OMI
  25202. * value of this bw is as per 11ax/ac standard:
  25203. * 0 = 20MHz,1 = 40MHz, 2= 80MHz, 3 = 160MHz
  25204. */
  25205. A_UINT32 new_bw;
  25206. /** new_txnss valid for peer_operating mode ind. OMI */
  25207. A_UINT32 new_txnss;
  25208. /** new_disablemu: disable mu mode
  25209. * valid for peer_operating mode ind. OMI
  25210. */
  25211. A_UINT32 new_disablemu;
  25212. } wmi_peer_oper_mode_change_event_fixed_param;
  25213. /** FW response when tx failure count has reached threshold
  25214. * for a peer */
  25215. typedef struct {
  25216. /** TLV tag and len; tag equals
  25217. * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
  25218. A_UINT32 tlv_header;
  25219. /** vdev id*/
  25220. A_UINT32 vdev_id;
  25221. /** mac address */
  25222. wmi_mac_addr peer_mac_address;
  25223. /** tx failure count - will eventually be removed and not used */
  25224. A_UINT32 tx_fail_cnt;
  25225. /** seq number of the nth tx_fail_event */
  25226. A_UINT32 seq_no;
  25227. } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
  25228. enum wmi_rmc_mode {
  25229. /** Disable RMC */
  25230. WMI_RMC_MODE_DISABLED = 0,
  25231. /** Enable RMC */
  25232. WMI_RMC_MODE_ENABLED = 1,
  25233. };
  25234. /** Enable RMC transmitter functionality. Upon
  25235. * receiving this, the FW shall mutlicast frames with
  25236. * reliability. This is a vendor
  25237. * proprietary feature. */
  25238. typedef struct {
  25239. /** TLV tag and len; tag equals
  25240. * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
  25241. A_UINT32 tlv_header;
  25242. /** vdev id*/
  25243. A_UINT32 vdev_id;
  25244. /** enable_rmc contains values from enum wmi_rmc_mode;
  25245. * Default value: 0 (disabled) */
  25246. A_UINT32 enable_rmc;
  25247. } wmi_rmc_set_mode_cmd_fixed_param;
  25248. /** Configure transmission periodicity of action frames in a
  25249. * RMC network for the multicast transmitter */
  25250. typedef struct {
  25251. /** TLV tag and len; tag equals
  25252. * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
  25253. A_UINT32 tlv_header;
  25254. /** vdev id */
  25255. A_UINT32 vdev_id;
  25256. /** time period in milliseconds. Default: 300 ms.
  25257. An action frame indicating the current leader is transmitted by the
  25258. RMC transmitter once every 'periodity_msec' */
  25259. A_UINT32 periodicity_msec;
  25260. } wmi_rmc_set_action_period_cmd_fixed_param;
  25261. /** Optimise Leader selection process in RMC functionality. For
  25262. * Enhancement/Debug purposes only */
  25263. typedef struct {
  25264. /** TLV tag and len; tag equals
  25265. * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
  25266. A_UINT32 tlv_header;
  25267. /** vdev id */
  25268. A_UINT32 vdev_id;
  25269. /** flags ::
  25270. * 0x0001 - Enable beacon averaging
  25271. * 0x0002 - Force leader selection
  25272. * 0x0004 - Enable Timer based leader switch
  25273. * 0x0008 - Use qos/NULL based for multicast reliability */
  25274. A_UINT32 flags;
  25275. /** control leader change timeperiod (in seconds) */
  25276. A_UINT32 peridocity_leader_switch;
  25277. /** control activity timeout value for data rx (in seconds) */
  25278. A_UINT32 data_activity_timeout;
  25279. /** mac address of leader */
  25280. wmi_mac_addr forced_leader_mac_addr;
  25281. } wmi_rmc_config_cmd_fixed_param;
  25282. /** MHF is generally implemented in
  25283. * the kernel. To decrease system power consumption, the
  25284. * driver can enable offloading this to the chipset. In
  25285. * order for the offload, the firmware needs the routing table.
  25286. * The host shall plumb the routing table into FW. The firmware
  25287. * shall perform an IP address lookup and forward the packet to
  25288. * the next hop using next hop's mac address. This is a vendor
  25289. * proprietary feature. */
  25290. enum wmi_mhf_ofl_mode {
  25291. /** Disable MHF offload */
  25292. WMI_MHF_OFL_MODE_DISABLED = 0,
  25293. /** Enable MHF offload */
  25294. WMI_MHF_OFL_MODE_ENABLED = 1,
  25295. };
  25296. typedef struct {
  25297. /** TLV tag and len; tag equals
  25298. * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
  25299. A_UINT32 tlv_header;
  25300. /** vdev id*/
  25301. A_UINT32 vdev_id;
  25302. /** enable_mhf_ofl contains values from enum
  25303. * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
  25304. A_UINT32 enable_mhf_ofl;
  25305. } wmi_mhf_offload_set_mode_cmd_fixed_param;
  25306. enum wmi_mhf_ofl_table_action {
  25307. /** Create MHF offload table in FW */
  25308. WMI_MHF_OFL_TBL_CREATE = 0,
  25309. /** Append to existing MHF offload table */
  25310. WMI_MHF_OFL_TBL_APPEND = 1,
  25311. /** Flush entire MHF offload table in FW */
  25312. WMI_MHF_OFL_TBL_FLUSH = 2,
  25313. };
  25314. typedef struct {
  25315. /** TLV tag and len; tag equals
  25316. * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
  25317. A_UINT32 tlv_header;
  25318. /** vdev id*/
  25319. A_UINT32 vdev_id;
  25320. /** action corresponds to values from enum
  25321. * wmi_mhf_ofl_table_action */
  25322. A_UINT32 action;
  25323. /** number of entries in the table */
  25324. A_UINT32 num_entries;
  25325. /** Followed by the variable length TLV
  25326. * wmi_mhf_offload_routing_table_entry entries[] */
  25327. } wmi_mhf_offload_plumb_routing_table_cmd;
  25328. typedef struct {
  25329. /** TLV tag and len; tag equals
  25330. * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
  25331. A_UINT32 tlv_header;
  25332. /** Destination node's IP address */
  25333. WMI_IPV4_ADDR dest_ipv4_addr;
  25334. /** Next hop node's MAC address */
  25335. wmi_mac_addr next_hop_mac_addr;
  25336. } wmi_mhf_offload_routing_table_entry;
  25337. enum {
  25338. WMI_DFS_RADAR_PULSE_FLAG_MASK_PSIDX_DIFF_VALID = 0x00000001,
  25339. };
  25340. typedef struct {
  25341. /** tlv tag and len, tag equals
  25342. * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
  25343. A_UINT32 tlv_header;
  25344. /** full 64 tsf timestamp get from MAC tsf timer indicates
  25345. * the time that the radar event uploading to host, split
  25346. * it to high 32 bit and lower 32 bit in fulltsf_high and
  25347. * full_tsf_low
  25348. */
  25349. A_UINT32 upload_fullts_low;
  25350. A_UINT32 upload_fullts_high;
  25351. /** timestamp indicates the time when DFS pulse is detected
  25352. * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
  25353. */
  25354. A_UINT32 pulse_detect_ts;
  25355. /** the duaration of the pulse in us */
  25356. A_UINT32 pulse_duration;
  25357. /** the center frequency of the radar pulse detected, KHz */
  25358. A_UINT32 pulse_center_freq;
  25359. /** bandwidth of current DFS channel, MHz */
  25360. A_UINT32 ch_bandwidth;
  25361. /** center channel frequency1 of current DFS channel, MHz */
  25362. A_UINT16 ch_center_freq1;
  25363. /** center channel frequency2 of current DFS channel, MHz,
  25364. * reserved for 160 BW mode
  25365. */
  25366. A_UINT16 ch_center_freq2;
  25367. /** flag to indicate if this pulse is chirp */
  25368. A_UINT8 pulse_is_chirp;
  25369. /** RSSI recorded in the ppdu */
  25370. A_UINT8 rssi;
  25371. /** extended RSSI info */
  25372. A_UINT8 rssi_ext;
  25373. union {
  25374. A_UINT8 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  25375. /** pdev_id for identifying the MAC
  25376. * See macros starting with WMI_PDEV_ID_ for values.
  25377. */
  25378. A_UINT8 pdev_id;
  25379. };
  25380. /** index of peak magnitude bin (signed) */
  25381. A_INT32 peak_sidx;
  25382. /** Max pulse chirp velocity in delta bins over chirp FFT interval */
  25383. A_INT32 pulse_delta_peak;
  25384. /** Max pulse chirp velocity variance in delta bins */
  25385. A_INT32 pulse_delta_diff;
  25386. /** the difference in the FFT peak index between short FFT and the first long FFT
  25387. * psidx_diff = (first_long_fft_psidx - 4*first_short_fft_psidx),
  25388. */
  25389. A_INT32 psidx_diff;
  25390. /** pulse_flags: see WMI_DFS_RADAR_PULSE_FLAG_MASK enum values
  25391. * 0x0001 - set if psidx_diff is valid
  25392. */
  25393. A_UINT32 pulse_flags;
  25394. } wmi_dfs_radar_event_fixed_param;
  25395. enum {
  25396. /* DEFAULT - target chooses what action to take, based on its thermal
  25397. * management policy
  25398. * Targets which throttle tx (and potentially rx) based on thermal
  25399. * management thresholds specified by the host will shut down tx
  25400. * if the temperature exceeds upper_thresh_degreeC.
  25401. * Targets which simply inform the host about threshold breaches will
  25402. * send a notification message to the host if the temperature exceeds
  25403. * upper_thresh_degreeC.
  25404. * Conversely, if the temperature was above upper_thresh_degreeC but
  25405. * then drops to below lower_threshold_degreeC, the target will either
  25406. * resume tx, or notify the host.
  25407. */
  25408. WMI_THERMAL_MGMT_ACTION_DEFAULT = 0,
  25409. /* HALT_TRAFFIC -
  25410. * If the temperature rises above upper_thresh_degreeC, the target will
  25411. * halt tx.
  25412. * If the temperature falls back below lower_thresh_degreeC, the target
  25413. * will resume tx.
  25414. */
  25415. WMI_THERMAL_MGMT_ACTION_HALT_TRAFFIC = 1,
  25416. /* NOTIFY_HOST - the target will notify the host if the temperature
  25417. * either rises above upper_thresh_degreeC or falls below
  25418. * lower_thresh_degreeC.
  25419. */
  25420. WMI_THERMAL_MGMT_ACTION_NOTIFY_HOST = 2,
  25421. /* CHAIN SCALING -
  25422. * The target will switch tx chain mask from multi chains to single chain
  25423. * if the temperature rises above upper_thresh_degreeC.
  25424. * The target will switch tx chainmask back to multi chains if the
  25425. * temperature drops below upper_thresh_degreeC.
  25426. */
  25427. WMI_THERMAL_MGMT_ACTION_CHAINSCALING = 3,
  25428. };
  25429. typedef struct {
  25430. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
  25431. /*Thermal thresholds*/
  25432. A_UINT32 lower_thresh_degreeC; /* in degree C*/
  25433. A_UINT32 upper_thresh_degreeC; /* in degree C*/
  25434. /*Enable/Disable Thermal Monitoring for Mitigation*/
  25435. A_UINT32 enable;
  25436. /* action: what the target should do when a thermal upper/lower threshold
  25437. * is crossed.
  25438. * Refer to the WMI_THERMAL_MGMT_ACTION enum.
  25439. */
  25440. A_UINT32 action;
  25441. A_UINT32 threshold_warning_degreeC;
  25442. A_UINT32 sample_rate_ms;
  25443. } wmi_thermal_mgmt_cmd_fixed_param;
  25444. typedef struct {
  25445. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
  25446. A_UINT32 temperature_degreeC;/* temperature in degree C*/
  25447. } wmi_thermal_mgmt_event_fixed_param;
  25448. /**
  25449. * This command is sent from WLAN host driver to firmware to
  25450. * request firmware to configure auto shutdown timer in fw
  25451. * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
  25452. */
  25453. typedef struct {
  25454. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
  25455. A_UINT32 timer_value; /** timer value; 0=disable */
  25456. } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
  25457. enum wmi_host_auto_shutdown_reason {
  25458. WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
  25459. WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
  25460. WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
  25461. };
  25462. /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
  25463. typedef struct {
  25464. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
  25465. A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
  25466. } wmi_host_auto_shutdown_event_fixed_param;
  25467. /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
  25468. * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
  25469. * This command is only used by some customer for verification test. It is not for end-user.
  25470. *
  25471. * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
  25472. *
  25473. * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
  25474. * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condition only. When multiple
  25475. * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
  25476. * <channel, ack_offset> pair is unique.
  25477. *
  25478. * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
  25479. * called basic_config_info by bitmap
  25480. * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
  25481. *
  25482. * '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
  25483. * is ignored.
  25484. * disable will remove preious conditions from FW.
  25485. * conditions from the later command will over write conditions stored from a previous command.
  25486. *
  25487. */
  25488. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
  25489. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
  25490. #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
  25491. #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
  25492. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
  25493. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
  25494. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
  25495. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
  25496. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
  25497. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
  25498. #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
  25499. #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
  25500. #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
  25501. #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
  25502. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
  25503. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
  25504. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
  25505. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
  25506. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
  25507. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
  25508. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
  25509. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
  25510. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
  25511. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
  25512. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
  25513. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
  25514. #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
  25515. #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
  25516. /** Bit map definition for basic_config_info starts */
  25517. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
  25518. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
  25519. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  25520. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z) WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  25521. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
  25522. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
  25523. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  25524. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  25525. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
  25526. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
  25527. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  25528. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  25529. #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
  25530. #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
  25531. #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT)
  25532. #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
  25533. #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
  25534. #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
  25535. #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC)
  25536. #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
  25537. #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
  25538. #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
  25539. #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND)
  25540. #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
  25541. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
  25542. #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
  25543. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM)
  25544. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
  25545. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
  25546. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
  25547. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  25548. #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z) WMI_F_RMW(x, (z) & 0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  25549. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
  25550. /*
  25551. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
  25552. * is temporarily maintained as an alias for the correct name
  25553. * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  25554. */
  25555. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
  25556. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
  25557. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  25558. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  25559. #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
  25560. /*
  25561. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
  25562. * is temporarily maintained as an alias for the correct name
  25563. * (WMI_TPC_CHAINMASK_CONFIG_RATE)
  25564. */
  25565. #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
  25566. #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
  25567. #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
  25568. #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
  25569. /** Bit map definition for basic_config_info ends */
  25570. typedef struct {
  25571. A_UINT32 tlv_header;
  25572. /** Basic condition defined as bit map above, bitmap is chosen to save memory.
  25573. * Bit0 ~ Bit4: tpc offset which will be adjusted if condition matches, the unit is 0.5dB. bit4 indicates signed
  25574. * Bit5 ~ Bit9: ack offset which will be adjusted if condition matches, the unit is 0.5dB. bit9 indicates signed
  25575. * 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
  25576. * 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
  25577. * 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
  25578. * Bit16 : band condition b'0: 2G, b'1: 5G
  25579. * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
  25580. * 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
  25581. * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
  25582. * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
  25583. * Bit23 ~ Bit31: reserved
  25584. */
  25585. A_UINT32 basic_config_info;
  25586. /** channel mapping bit rule: The lower bit corresponds with smaller channel.
  25587. * it depends on Bit14 of basic_config_info
  25588. * Total 24 channels for 5G
  25589. * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
  25590. * Total 14 channels for 2G
  25591. * 1 ~ 14
  25592. */
  25593. A_UINT32 channel;
  25594. /** rate mapping bit rule: The lower bit corresponds with lower rate.
  25595. * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
  25596. * Legacy rates , 11b, 11g, 11A
  25597. * 11n one stream (ht20, ht40) 8+8
  25598. * 11n two streams (ht20, ht40) 8+8
  25599. * 11ac one stream (vht20, vht40, vht80) 10+10+10
  25600. * 11ac two streams (vht20, vht40, vht80) 10+10+10
  25601. */
  25602. A_UINT32 rate0;
  25603. /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
  25604. * 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
  25605. */
  25606. /** 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
  25607. */
  25608. A_UINT32 rate1;
  25609. } wmi_tpc_chainmask_config;
  25610. #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
  25611. #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
  25612. typedef struct {
  25613. A_UINT32 tlv_header;
  25614. A_UINT32 enable; /** enable to set tpc & chainmask when conditions meet, 0: disabled, 1: enabled. */
  25615. A_UINT32 num_tpc_chainmask_configs;
  25616. /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
  25617. } wmi_tpc_chainmask_config_cmd_fixed_param;
  25618. typedef struct {
  25619. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_req_fixed_param */
  25620. A_UINT32 pdev_id;
  25621. /**
  25622. * Bits 31:0: base address of ring [31:0]
  25623. */
  25624. A_UINT32 base_addr_lo;
  25625. /**
  25626. * Bits 3:0: base address of ring [35:32]
  25627. * Bits 31:4: reserved
  25628. */
  25629. A_UINT32 base_addr_hi;
  25630. /**
  25631. * Bits 31:0: address of head index [31:0]
  25632. */
  25633. A_UINT32 head_idx_addr_lo;
  25634. /**
  25635. * Bits 3:0: address of head index [35:32]
  25636. * Bits 31:4: reserved
  25637. */
  25638. A_UINT32 head_idx_addr_hi;
  25639. /**
  25640. * Bits 31:0: address of tail index [31:0]
  25641. */
  25642. A_UINT32 tail_idx_addr_lo;
  25643. /**
  25644. * Bits 3:0: address of tail index [35:32]
  25645. * Bits 31:4: reserved
  25646. */
  25647. A_UINT32 tail_idx_addr_hi;
  25648. A_UINT32 num_ptr; /** Number of pointers in the ring */
  25649. } wmi_oem_dma_ring_cfg_req_fixed_param;
  25650. #define WMI_OEM_DMA_RING_ADDR_LO_S 0
  25651. #define WMI_OEM_DMA_RING_ADDR_LO 0xffffffff
  25652. #define WMI_OEM_DMA_RING_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_LO)
  25653. #define WMI_OEM_DMA_RING_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_LO)
  25654. #define WMI_OEM_DMA_RING_ADDR_HI_S 0
  25655. #define WMI_OEM_DMA_RING_ADDR_HI 0xf
  25656. #define WMI_OEM_DMA_RING_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_HI)
  25657. #define WMI_OEM_DMA_RING_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_HI)
  25658. typedef struct {
  25659. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_rsp_fixed_param */
  25660. A_UINT32 pdev_id;
  25661. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  25662. } wmi_oem_dma_ring_cfg_rsp_fixed_param;
  25663. typedef struct {
  25664. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_indirect_data */
  25665. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  25666. /**
  25667. * Bits 31:0: address of data [31:0]
  25668. */
  25669. A_UINT32 addr_lo;
  25670. /**
  25671. * Bits 3:0: address of data [35:32]
  25672. * Bits 11:4: reserved
  25673. * Bits 31:12: opaque host context data [19:0]
  25674. */
  25675. A_UINT32 addr_hi;
  25676. A_UINT32 len; /** Length of data in bytes */
  25677. } wmi_oem_indirect_data;
  25678. #define WMI_OEM_DMA_DATA_ADDR_LO_S 0
  25679. #define WMI_OEM_DMA_DATA_ADDR_LO 0xffffffff
  25680. #define WMI_OEM_DMA_DATA_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_LO)
  25681. #define WMI_OEM_DMA_DATA_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_LO)
  25682. #define WMI_OEM_DMA_DATA_ADDR_HI_S 0
  25683. #define WMI_OEM_DMA_DATA_ADDR_HI 0xf
  25684. #define WMI_OEM_DMA_DATA_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI)
  25685. #define WMI_OEM_DMA_DATA_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI)
  25686. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_S 12
  25687. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA 0xfffff
  25688. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
  25689. #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)
  25690. typedef struct {
  25691. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_buf_release_hdr */
  25692. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  25693. } wmi_oem_dma_buf_release_fixed_param;
  25694. typedef struct {
  25695. /**
  25696. * Bits 31:0: address of data [31:0]
  25697. */
  25698. A_UINT32 addr_lo;
  25699. /**
  25700. * Bits 3:0: address of data [35:32]
  25701. * Bits 11:4: reserved
  25702. * Bits 31:12: host context data [19:0]
  25703. */
  25704. A_UINT32 addr_hi;
  25705. } wmi_oem_dma_buf_release_entry;
  25706. typedef struct {
  25707. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_cmd_fixed_param */
  25708. A_UINT32 tlv_header;
  25709. /** Unique id identifying the VDEV */
  25710. A_UINT32 vdev_id;
  25711. /** Actual length in byte of data[]. */
  25712. A_UINT32 data_len;
  25713. /**
  25714. * pdev_vdev_flag - 0 follow old method (vdev_id is valid, ignore pdev_id)
  25715. * pdev_vdev_flag - 1 pdev_id is valid
  25716. */
  25717. A_UINT32 pdev_vdev_flag;
  25718. /** Unique id identifying the PDEV */
  25719. A_UINT32 pdev_id;
  25720. /** This structure is used to send OEM DATA binary blobs from
  25721. * application/service to firmware where Host driver is pass through.
  25722. * The OEM-specific commands from OEM-specific userspace applications
  25723. * are passed to OEM-specific feature handlers in firmware as OEM DATA
  25724. * binary blobs. The format of the data is per agreement between FW and
  25725. * userspace applications, with the binary blob beginning with a header
  25726. * that identifies to the FW the nature of the remaining data within the
  25727. * blob.
  25728. *
  25729. * Following this structure is the TLV:
  25730. * A_UINT8 data[]; <-- actual length in byte given by field data_len.
  25731. */
  25732. } wmi_oem_data_cmd_fixed_param;
  25733. typedef struct {
  25734. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
  25735. A_UINT32 data_len; /** length in byte of data[]. */
  25736. /* This structure is used to send REQ binary blobs
  25737. * from application/service to firmware where Host drv is pass through .
  25738. * Following this structure is the TLV:
  25739. * A_UINT8 data[]; <-- length in byte given by field data_len.
  25740. */
  25741. } wmi_nan_cmd_param;
  25742. typedef enum {
  25743. WMI_NAN_VENDOR1_REQ1 = 1,
  25744. } WMI_NAN_OEM_DATA_TYPE;
  25745. typedef struct {
  25746. /** oem_data_type:
  25747. * Indicate what kind of OEM-specific data is present in the
  25748. * oem_data_buffer[].
  25749. * Possible values are listed in the enum WMI_NAN_OEM_DATA_TYPE.
  25750. */
  25751. A_UINT32 oem_data_type;
  25752. /** oem_data_len:
  25753. * Actual length in bytes of the OEM-specific data within the
  25754. * oem_data_buffer[].
  25755. * Note that it is possible for a single message to contain multiple
  25756. * OEM opaque data blobs. In such cases, the oem_data_len field of
  25757. * nan_oem_data_hdr[0] not only specifies the size of the first such
  25758. * opaque blob, but furthermore specifies the offset in oem_data_buffer[]
  25759. * where the second opaque blob begins.
  25760. */
  25761. A_UINT32 oem_data_len;
  25762. } wmi_nan_oem_data_hdr;
  25763. typedef struct {
  25764. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_oem_data_cmd_fixed_param */
  25765. /* Following this structure are the below TLVs:
  25766. * - wmi_nan_oem_data_hdr nan_oem_data_hdr[];
  25767. * This TLV explains the type and size of the one or more OEM NAN
  25768. * opaque data blobs carried in this message.
  25769. * - A_UINT8 nan_oem_data_buffer[];
  25770. * This TLV holds the contents of the one or more OEM NAN opaque data
  25771. * blobs carried in this message.
  25772. */
  25773. } wmi_nan_oem_data_cmd_fixed_param;
  25774. #define WMI_NAN_GET_RANGING_INITIATOR_ROLE(flag) WMI_GET_BITS(flag, 0, 1)
  25775. #define WMI_NAN_SET_RANGING_INITIATOR_ROLE(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  25776. #define WMI_NAN_GET_RANGING_RESPONDER_ROLE(flag) WMI_GET_BITS(flag, 1, 1)
  25777. #define WMI_NAN_SET_RANGING_RESPONDER_ROLE(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  25778. #define WMI_NAN_GET_NAN_6G_DISABLE(flag) WMI_GET_BITS(flag, 2, 1)
  25779. #define WMI_NAN_SET_NAN_6G_DISABLE(flag, val) WMI_SET_BITS(flag, 2, 1, val)
  25780. typedef struct {
  25781. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_host_config_param */
  25782. A_UINT32 nan_2g_disc_disable:1; /** This bit when set to 1 indicate NAN 2G discovery should be disabled */
  25783. A_UINT32 nan_5g_disc_disable:1; /** This bit when set to 1 indicate NAN 5G discovery should be disabled */
  25784. A_UINT32 reserved:30;
  25785. /** Flags: refer to WMI_NAN_GET/SET macros
  25786. * Bit 0 -> Nan ranging initiator role (0 - Disable, 1 - Enable)
  25787. * Bit 1 -> Nan ranging responder role (0 - Disable, 1 - Enable)
  25788. * Bit 2 -> Nan 6 GHz support (1 - Disable, 0 - Enable)
  25789. * Bits 3-31 -> Reserved
  25790. */
  25791. A_UINT32 flags;
  25792. } wmi_nan_host_config_param_PROTOTYPE;
  25793. #define wmi_nan_host_config_param wmi_nan_host_config_param_PROTOTYPE
  25794. typedef struct {
  25795. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
  25796. A_UINT32 data_len; /** length in byte of data[]. */
  25797. /* This structure is used to send REQ binary blobs
  25798. * from firmware to application/service where Host drv is pass through .
  25799. * Following this structure is the TLV:
  25800. * A_UINT8 data[]; <-- length in byte given by field data_len.
  25801. */
  25802. } wmi_nan_event_hdr;
  25803. typedef struct {
  25804. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_oem_data_event_fixed_param */
  25805. /* Following this structure are the below TLVs:
  25806. * - wmi_nan_oem_data_hdr nan_oem_data_hdr[];
  25807. * This TLV explains the type and size of the one or more OEM NAN
  25808. * opaque data blobs carried in this message.
  25809. * - A_UINT8 nan_oem_data_buffer[];
  25810. * This TLV holds the contents of the one or more OEM NAN opaque data
  25811. * blobs carried in this message.
  25812. */
  25813. } wmi_nan_oem_data_event_fixed_param;
  25814. typedef struct {
  25815. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_info */
  25816. 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 */
  25817. 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 */
  25818. A_UINT32 reserved:31;
  25819. A_UINT32 vdev_id; /** Unique id identifying the vdev with type OPMODE_NAN; Valid only for NAN enable resp message identified by NAN_MSG_ID_ENABLE_RSP */
  25820. } wmi_nan_event_info_PROTOTYPE;
  25821. #define wmi_nan_event_info wmi_nan_event_info_PROTOTYPE
  25822. /**
  25823. * Event to indicate NAN discovery interface created
  25824. */
  25825. typedef struct {
  25826. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param */
  25827. A_UINT32 tlv_header;
  25828. /** Unique id identifying the VDEV */
  25829. A_UINT32 vdev_id;
  25830. /** NAN interface MAC address */
  25831. wmi_mac_addr nan_interface_macaddr;
  25832. } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
  25833. #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
  25834. /**
  25835. * Event to indicate NAN discovery interface deleted
  25836. */
  25837. typedef struct {
  25838. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param */
  25839. A_UINT32 tlv_header;
  25840. /** Unique id identifying the VDEV */
  25841. A_UINT32 vdev_id;
  25842. } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
  25843. #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
  25844. /**
  25845. * Event to indicate NAN device started new cluster
  25846. */
  25847. typedef struct {
  25848. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param */
  25849. A_UINT32 tlv_header;
  25850. /** Unique id identifying the VDEV */
  25851. A_UINT32 vdev_id;
  25852. /** NAN Cluster ID */
  25853. A_UINT32 nan_cluster_id;
  25854. } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
  25855. #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
  25856. /**
  25857. * Event to indicate NAN device joined to cluster
  25858. */
  25859. typedef struct {
  25860. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param */
  25861. A_UINT32 tlv_header;
  25862. /** Unique id identifying the VDEV */
  25863. A_UINT32 vdev_id;
  25864. /** NAN Cluster ID */
  25865. A_UINT32 nan_cluster_id;
  25866. } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
  25867. #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
  25868. typedef struct {
  25869. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_dmesg_event_fixed_param */
  25870. A_UINT32 tlv_header;
  25871. /** length in byte of msg[]. */
  25872. A_UINT32 msg_len;
  25873. /* Following this structure is the TLV:
  25874. * A_UINT8 msg[]; <-- length in byte given by field data_len.
  25875. * This data contains the string message which will be given to Host to dump it to kernel logs.
  25876. */
  25877. } wmi_nan_dmesg_event_fixed_param;
  25878. typedef struct {
  25879. /** TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_nan_capabilities */
  25880. A_UINT32 tlv_header;
  25881. /** Maximum number of ndp sessions supported by the Firmware */
  25882. A_UINT32 max_ndp_sessions;
  25883. /** Maximum number of nan pairing sessions supported by the Firmware */
  25884. A_UINT32 max_pairing_sessions;
  25885. } wmi_nan_capabilities;
  25886. /** NAN DATA CMD's */
  25887. /**
  25888. * NAN Data get capabilities req
  25889. */
  25890. typedef struct {
  25891. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param */
  25892. A_UINT32 tlv_header;
  25893. /** unique id generated in upper layer for the transaction */
  25894. A_UINT32 transaction_id;
  25895. } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
  25896. #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
  25897. /**
  25898. * NDP Response code
  25899. */
  25900. typedef enum {
  25901. NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
  25902. NDP_RSP_CODE_REQUEST_REJECT = 0x01,
  25903. NDP_RSP_CODE_REQUEST_DEFER = 0x02,
  25904. } wmi_ndp_rsp_code_PROTOTYPE;
  25905. #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
  25906. /**
  25907. * NDP Channel configuration type
  25908. */
  25909. typedef enum {
  25910. WMI_NDP_CHANNEL_NOT_REQUESTED = 0, /* Channel will not configured */
  25911. WMI_NDP_REQUEST_CHANNEL_SETUP = 1, /* Channel will be provided and is optional/hint */
  25912. WMI_NDP_FORCE_CHANNEL_SETUP = 2/* NDP must start on the provided channel */
  25913. } wmi_ndp_channel_cfg_PROTOTYPE;
  25914. /*
  25915. * The WMI_NDP_IPV6_INTF_ADDR_LEN macro cannot be changed without breaking
  25916. * WMI compatibility.
  25917. */
  25918. #define WMI_NDP_IPV6_INTF_ADDR_LEN 16
  25919. typedef struct {
  25920. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_transport_ip_param */
  25921. /* Presence of ipv6_intf_addr */
  25922. A_UINT32 ipv6_addr_present;
  25923. /* Presence of transport Port */
  25924. A_UINT32 trans_port_present;
  25925. /* Presence of transport Protocol */
  25926. A_UINT32 trans_proto_present;
  25927. /* ipv6 Interface address */
  25928. A_UINT8 ipv6_intf_addr[WMI_NDP_IPV6_INTF_ADDR_LEN];
  25929. /* Transport Port */
  25930. A_UINT32 transport_port;
  25931. /* Transport Protocol */
  25932. A_UINT32 transport_protocol;
  25933. } wmi_ndp_transport_ip_param;
  25934. #define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
  25935. typedef struct {
  25936. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_channel_info */
  25937. A_UINT32 mac_id; /* mac_id associated with ndp channel at same index */
  25938. } wmi_ndp_channel_info_PROTOTYPE;
  25939. #define wmi_ndp_channel_info wmi_ndp_channel_info_PROTOTYPE
  25940. typedef struct {
  25941. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_event_param */
  25942. A_UINT32 vdev_id; /* NDI VDEV ID */
  25943. 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 */
  25944. A_UINT32 reserved:31;
  25945. } wmi_ndp_event_param_PROTOTYPE;
  25946. #define wmi_ndp_event_param wmi_ndp_event_param_PROTOTYPE
  25947. /**
  25948. * NDP Initiator requesting a data session
  25949. */
  25950. typedef struct {
  25951. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param */
  25952. A_UINT32 tlv_header;
  25953. /** Unique id identifying the VDEV */
  25954. A_UINT32 vdev_id;
  25955. /** unique id generated in upper layer for the transaction */
  25956. A_UINT32 transaction_id;
  25957. /** Unique Instance Id identifying the Responder's service */
  25958. A_UINT32 service_instance_id;
  25959. /** Discovery MAC addr of the publisher/peer */
  25960. wmi_mac_addr peer_discovery_mac_addr;
  25961. /** Actual number of bytes in TLV ndp_cfg */
  25962. A_UINT32 ndp_cfg_len;
  25963. /** Actual number of bytes in TLV ndp_app_info */
  25964. A_UINT32 ndp_app_info_len;
  25965. /** NDP channel configuration type defined in wmi_ndp_channel_cfg */
  25966. A_UINT32 ndp_channel_cfg;
  25967. /** NAN Cipher Suite Shared Key */
  25968. A_UINT32 nan_csid;
  25969. /** Actual number of bytes in TLV ndp_pmk */
  25970. A_UINT32 nan_pmk_len;
  25971. /** Actual number of bytes in TLV ndp_passphrase */
  25972. A_UINT32 nan_passphrase_len;
  25973. /** Actual number of bytes in TLV nan_servicename */
  25974. A_UINT32 nan_servicename_len;
  25975. /** NAN Cipher Suite Capability field */
  25976. A_UINT32 nan_csid_cap;
  25977. /** GTK protection is required for the NDP */
  25978. A_UINT32 nan_gtk_required;
  25979. /**
  25980. * TLV (tag length value) parameters follow the ndp_initiator_req
  25981. * structure. The TLV's are:
  25982. * wmi_channel channel;
  25983. * A_UINT8 ndp_cfg[];
  25984. * A_UINT8 ndp_app_info[];
  25985. * A_UINT8 ndp_pmk[];
  25986. * A_INT8 ndp_passphrase[];
  25987. * A_INT8 nan_servicename[];
  25988. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  25989. */
  25990. } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
  25991. #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
  25992. /**
  25993. * Initiate a data response on the responder side
  25994. * for data request indication from the peer
  25995. */
  25996. typedef struct {
  25997. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param */
  25998. A_UINT32 tlv_header;
  25999. /** Unique id identifying the VDEV */
  26000. A_UINT32 vdev_id;
  26001. /** unique id generated in upper layer for the transaction */
  26002. A_UINT32 transaction_id;
  26003. /**
  26004. * Unique token Id generated on the initiator/responder
  26005. * side used for a NDP session between two NAN devices
  26006. */
  26007. A_UINT32 ndp_instance_id;
  26008. /** Response Code defined in wmi_ndp_rsp_code */
  26009. A_UINT32 rsp_code;
  26010. /** Number of bytes in TLV ndp_cfg */
  26011. A_UINT32 ndp_cfg_len;
  26012. /** Number of bytes in TLV ndp_app_info */
  26013. A_UINT32 ndp_app_info_len;
  26014. /** NAN Cipher Suite Shared Key */
  26015. A_UINT32 nan_csid;
  26016. /** Actual number of bytes in TLV ndp_pmk */
  26017. A_UINT32 nan_pmk_len;
  26018. /** Actual number of bytes in TLV ndp_passphrase */
  26019. A_UINT32 nan_passphrase_len;
  26020. /** Actual number of bytes in TLV nan_servicename */
  26021. A_UINT32 nan_servicename_len;
  26022. /** NAN Cipher Suite Capability field */
  26023. A_UINT32 nan_csid_cap;
  26024. /** GTK protection is required for the NDP */
  26025. A_UINT32 nan_gtk_required;
  26026. /**
  26027. * TLV (tag length value) parameters follow the ndp_responder_req
  26028. * structure. The TLV's are:
  26029. * A_UINT8 ndp_cfg[];
  26030. * A_UINT8 ndp_app_info[];
  26031. * A_UINT8 ndp_pmk[];
  26032. * A_INT8 ndp_passphrase[];
  26033. * A_INT8 nan_servicename[];
  26034. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  26035. */
  26036. } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
  26037. #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
  26038. /**
  26039. * NDP end type
  26040. */
  26041. typedef enum {
  26042. WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
  26043. WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
  26044. WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
  26045. WMI_NDP_END_TYPE_DATA_INACTIVITY = 0x03,
  26046. } wmi_ndp_end_type_PROTOTYPE;
  26047. #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
  26048. /**
  26049. * NDP end reason code
  26050. */
  26051. typedef enum {
  26052. WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
  26053. WMI_NDP_END_REASON_INACTIVITY = 0x01,
  26054. WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
  26055. WMI_NDP_END_REASON_DATA_INACTIVITY = 0x03,
  26056. } wmi_ndp_end_reason_code_PROTOTYPE;
  26057. #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
  26058. /**
  26059. * NDP end request
  26060. */
  26061. typedef struct {
  26062. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
  26063. A_UINT32 tlv_header;
  26064. /** NDP instance id */
  26065. A_UINT32 ndp_instance_id;
  26066. /** vdev_id valid flag */
  26067. A_UINT32 vdev_id_valid;
  26068. /** vdev id */
  26069. A_UINT32 vdev_id;
  26070. } wmi_ndp_end_req_PROTOTYPE;
  26071. #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
  26072. typedef struct {
  26073. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_cmd_param */
  26074. A_UINT32 vdev_id; /* NDI VDEV ID */
  26075. A_UINT32 ndp_disable:1; /** This bit when set to 1 indicates to terminate all NDPs associated with NDI vdev ID */
  26076. A_UINT32 reserved:31;
  26077. } wmi_ndp_cmd_param_PROTOTYPE;
  26078. #define wmi_ndp_cmd_param wmi_ndp_cmd_param_PROTOTYPE
  26079. /**
  26080. * NDP End request
  26081. */
  26082. typedef struct {
  26083. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param */
  26084. A_UINT32 tlv_header;
  26085. /** unique id generated in upper layer for the transaction */
  26086. A_UINT32 transaction_id;
  26087. /**
  26088. * TLV (tag length value) parameters follow the ndp_end_req
  26089. * structure. The TLV's are:
  26090. * wmi_ndp_end_req ndp_end_req_list[];
  26091. */
  26092. } wmi_ndp_end_req_fixed_param_PROTOTYPE;
  26093. #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
  26094. /* NAN DATA RSP EVENTS */
  26095. /**
  26096. * Event to indicate NAN Data Interface capabilities cmd
  26097. */
  26098. typedef struct {
  26099. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param */
  26100. A_UINT32 tlv_header;
  26101. /** Copy of transaction_id received in wmi_ndi_get_cap_req */
  26102. A_UINT32 transaction_id;
  26103. /** Max ndi interface support */
  26104. A_UINT32 max_ndi_interfaces;
  26105. /** Max ndp sessions can support */
  26106. A_UINT32 max_ndp_sessions;
  26107. /** Max number of peer's per ndi */
  26108. A_UINT32 max_peers_per_ndi;
  26109. /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
  26110. A_UINT32 nan_data_supported_bands;
  26111. } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
  26112. #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
  26113. /**
  26114. * NDP command response code
  26115. */
  26116. typedef enum {
  26117. NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
  26118. NDP_CMD_RSP_STATUS_ERROR = 0x01,
  26119. } wmi_ndp_cmd_rsp_status_PROTOTYPE;
  26120. #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
  26121. /**
  26122. * Event response for wmi_ndp_initiator_req
  26123. */
  26124. typedef struct {
  26125. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param */
  26126. A_UINT32 tlv_header;
  26127. /** Unique id identifying the VDEV */
  26128. A_UINT32 vdev_id;
  26129. /** Copy of transaction_id received in wmi_ndp_initiator_req */
  26130. A_UINT32 transaction_id;
  26131. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  26132. A_UINT32 rsp_status;
  26133. A_UINT32 reason_code;
  26134. /**
  26135. * Unique token Id generated on the initiator/responder
  26136. * side used for a NDP session between two NAN devices
  26137. */
  26138. A_UINT32 ndp_instance_id;
  26139. } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
  26140. #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
  26141. /**
  26142. * Event response for wmi_ndp_responder_req cmd
  26143. */
  26144. typedef struct {
  26145. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param */
  26146. A_UINT32 tlv_header;
  26147. /** Unique id identifying the VDEV */
  26148. A_UINT32 vdev_id;
  26149. /** Copy of transaction_id received in wmi_ndp_responder_req */
  26150. A_UINT32 transaction_id;
  26151. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  26152. A_UINT32 rsp_status;
  26153. A_UINT32 reason_code;
  26154. /**
  26155. * Unique token Id generated on the initiator/responder
  26156. * side used for a NDP session between two NAN devices
  26157. */
  26158. A_UINT32 ndp_instance_id;
  26159. /** NDI mac address of the peer */
  26160. wmi_mac_addr peer_ndi_mac_addr;
  26161. /** Host can create peer if this entry is TRUE */
  26162. A_UINT32 create_peer;
  26163. } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
  26164. #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
  26165. /**
  26166. * Active ndp instance id
  26167. */
  26168. typedef struct {
  26169. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_active_ndp_instance_id */
  26170. A_UINT32 tlv_header;
  26171. /** NDP instance id */
  26172. A_UINT32 ndp_instance_id;
  26173. } wmi_active_ndp_instance_id_PROTOTYPE;
  26174. #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
  26175. /**
  26176. * NDP end response per ndi
  26177. */
  26178. typedef struct {
  26179. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi */
  26180. A_UINT32 tlv_header;
  26181. /** Unique id identifying the VDEV */
  26182. A_UINT32 vdev_id;
  26183. /** Peer MAC addr */
  26184. wmi_mac_addr peer_mac_addr;
  26185. /** Number of active ndps on this ndi */
  26186. A_UINT32 num_active_ndps_on_ndi;
  26187. } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
  26188. #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
  26189. /**
  26190. * Event response for wmi_ndp_end_req cmd
  26191. */
  26192. typedef struct {
  26193. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param */
  26194. A_UINT32 tlv_header;
  26195. /** Copy of transaction_id received in wmi_ndp_end_req */
  26196. A_UINT32 transaction_id;
  26197. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  26198. A_UINT32 rsp_status;
  26199. A_UINT32 reason_code;
  26200. /**
  26201. * TLV (tag length value) parameters follow the ndp_end_rsp
  26202. * structure. The TLV's are:
  26203. * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
  26204. * wmi_active_ndp_instance_id active_ndp_instances_id[];
  26205. */
  26206. } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
  26207. #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
  26208. /** NAN DATA EVENTS */
  26209. /**
  26210. * NDP self role
  26211. */
  26212. typedef enum {
  26213. WMI_NDP_INITIATOR_ROLE,
  26214. WMI_NDP_RESPONDER_ROLE,
  26215. } wmi_ndp_self_role_PROTOTYPE;
  26216. #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
  26217. /**
  26218. * NDP accept policy
  26219. */
  26220. typedef enum {
  26221. WMI_NDP_ACCEPT_POLICY_NONE,
  26222. WMI_NDP_ACCEPT_POLICY_ALL,
  26223. } wmi_ndp_accept_policy_PROTOTYPE;
  26224. #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
  26225. /**
  26226. * Event indication received on the responder side when a NDP Initiator request/
  26227. * NDP session is initiated on the Initiator side (self role will be NDP_RESPONDER_ROLE)
  26228. *
  26229. * Event indication received on the initiator side when a
  26230. * NDP responder request on the Initiator side (self role will be NDP_INITIATOR_ROLE)
  26231. */
  26232. typedef struct {
  26233. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param */
  26234. A_UINT32 tlv_header;
  26235. /** Unique id identifying the VDEV */
  26236. A_UINT32 vdev_id;
  26237. /** Self NDP Role defined in wmi_ndp_self_role */
  26238. A_UINT32 self_ndp_role;
  26239. /** Accept policy defined in wmi_ndp_accept_policy */
  26240. A_UINT32 accept_policy;
  26241. /** Unique Instance Id corresponding to a service/session. */
  26242. A_UINT32 service_instance_id;
  26243. /** Discovery MAC addr of the peer/initiator */
  26244. wmi_mac_addr peer_discovery_mac_addr;
  26245. /** NDI mac address of the peer */
  26246. wmi_mac_addr peer_ndi_mac_addr;
  26247. /**
  26248. * Unique token Id generated on the initiator/responder
  26249. * side used for a NDP session between two NAN devices
  26250. */
  26251. A_UINT32 ndp_instance_id;
  26252. /** Number of bytes in TLV wmi_ndp_cfg */
  26253. A_UINT32 ndp_cfg_len;
  26254. /** Number of bytes in TLV wmi_ndp_app_info */
  26255. A_UINT32 ndp_app_info_len;
  26256. /** Peer NAN Cipher Suite Shared Key */
  26257. A_UINT32 nan_csid;
  26258. /** Actual number of bytes in TLV nan_scid */
  26259. A_UINT32 nan_scid_len;
  26260. /** Self NDI mac address */
  26261. wmi_mac_addr self_ndi_mac_addr;
  26262. /** Number of bytes in TLV service_id */
  26263. A_UINT32 service_id_len;
  26264. /** NAN Cipher Suite Capability field */
  26265. A_UINT32 nan_csid_cap;
  26266. /** GTK protection is required for the NDP */
  26267. A_UINT32 nan_gtk_required;
  26268. /**
  26269. * TLV (tag length value) parameters follow the ndp_indication
  26270. * structure. The TLV's are:
  26271. * A_UINT8 ndp_cfg[];
  26272. * A_UINT8 ndp_app_info[];
  26273. * A_UINT8 nan_scid[];
  26274. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  26275. * A_UINT8 service_id[service_id_len]; <- holds a single service ID of an
  26276. * indeterminate number of bytes (most likely 6 bytes)
  26277. */
  26278. } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
  26279. #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
  26280. /**
  26281. * Event indication of data confirm is received on both
  26282. * initiator and responder side confirming a NDP session
  26283. */
  26284. typedef struct {
  26285. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param */
  26286. A_UINT32 tlv_header;
  26287. /** Unique id identifying the VDEV */
  26288. A_UINT32 vdev_id;
  26289. /**
  26290. * Unique token Id generated on the initiator/responder
  26291. * side used for a NDP session between two NAN devices
  26292. */
  26293. A_UINT32 ndp_instance_id;
  26294. /** NDI mac address of the peer (required to derive target ipv6 address) */
  26295. wmi_mac_addr peer_ndi_mac_addr;
  26296. /** Response Code defined in wmi_ndp_rsp_code */
  26297. A_UINT32 rsp_code;
  26298. /** Number of bytes in TLV wmi_ndp_cfg */
  26299. A_UINT32 ndp_cfg_len;
  26300. /** Number of bytes in TLV wmi_ndp_app_info */
  26301. A_UINT32 ndp_app_info_len;
  26302. /** Reason Code */
  26303. A_UINT32 reason_code;
  26304. /** Number of active ndps on this peer */
  26305. A_UINT32 num_active_ndps_on_peer;
  26306. /** Number of channels on this peer */
  26307. A_UINT32 num_ndp_channels;
  26308. /**
  26309. * TLV (tag length value) parameters follow the ndp_confirm
  26310. * structure. The TLV's are:
  26311. * A_UINT8 ndp_cfg[];
  26312. * A_UINT8 ndp_app_info[];
  26313. * wmi_channel ndp_channel_list[];
  26314. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  26315. * // since Nss is associated with the channel
  26316. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  26317. */
  26318. } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
  26319. #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
  26320. /**
  26321. * Event indication received on the initiator/responder side terminating a NDP session
  26322. */
  26323. typedef struct {
  26324. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_indication */
  26325. A_UINT32 tlv_header;
  26326. /** type defined in wmi_ndp_end_type */
  26327. A_UINT32 type;
  26328. /** Unique id identifying the VDEV */
  26329. A_UINT32 vdev_id;
  26330. /** reason_code defined in wmi_ndp_end_reason_code */
  26331. A_UINT32 reason_code;
  26332. /** NDP instance id */
  26333. A_UINT32 ndp_instance_id;
  26334. /** NDI MAC addr of the peer */
  26335. wmi_mac_addr peer_ndi_mac_addr;
  26336. /** Number of active ndps on this peer */
  26337. A_UINT32 num_active_ndps_on_peer;
  26338. } wmi_ndp_end_indication_PROTOTYPE;
  26339. #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
  26340. typedef struct
  26341. {
  26342. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndl_schedule_update_fixed_param */
  26343. /** Unique id identifying the VDEV */
  26344. A_UINT32 vdev_id;
  26345. /** peer MAC address */
  26346. wmi_mac_addr peer_macaddr;
  26347. /** Flags:
  26348. * Bit 0 -> Nss updated
  26349. * Bit 1 -> channel list updated
  26350. * Bits 2-31 -> Reserved
  26351. */
  26352. A_UINT32 flags;
  26353. /** num of channels */
  26354. A_UINT32 num_channels;
  26355. /** num of ndp instances */
  26356. A_UINT32 num_ndp_instances;
  26357. /**
  26358. * TLV (tag length value) parameters follow the ndl_schedule_update
  26359. * structure. The TLV's are:
  26360. * A_UINT32 ndp_instance_list[];
  26361. * wmi_channel ndl_channel_list[];
  26362. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  26363. * // since Nss is associate with a channel
  26364. */
  26365. } wmi_ndl_schedule_update_fixed_param_PROTOTYPE;
  26366. #define wmi_ndl_schedule_update_fixed_param wmi_ndl_schedule_update_fixed_param_PROTOTYPE
  26367. typedef struct {
  26368. A_UINT32 tlv_header;
  26369. A_UINT32 num_data;
  26370. /* followed by WMITLV_TAG_ARRAY_BYTE */
  26371. } wmi_diag_data_container_event_fixed_param;
  26372. enum {
  26373. WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
  26374. WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
  26375. WMI_PDEV_PARAM_TXPOWER_REASON_MAX
  26376. };
  26377. #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
  26378. #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
  26379. #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
  26380. #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
  26381. #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
  26382. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
  26383. #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
  26384. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
  26385. #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
  26386. (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
  26387. #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
  26388. (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
  26389. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK 0x00000001
  26390. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT 0
  26391. #define SET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param, value) \
  26392. do { \
  26393. (param) &= ~PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK; \
  26394. (param) |= (value) << PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT; \
  26395. } while (0)
  26396. #define GET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param) \
  26397. (((param) & PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK) >> PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT)
  26398. /**
  26399. * This command is sent from WLAN host driver to firmware to
  26400. * notify the current modem power state. Host would receive a
  26401. * message from modem when modem is powered on. Host driver
  26402. * would then send this command to firmware. Firmware would then
  26403. * power on WCI-2 (UART) interface for LTE/MWS Coex.
  26404. *
  26405. * This command is only applicable for APQ platform which has
  26406. * modem on the platform. If firmware doesn't support MWS Coex,
  26407. * this command can be dropped by firmware.
  26408. *
  26409. * This is a requirement from modem team that WCN can't toggle
  26410. * UART before modem is powered on.
  26411. */
  26412. typedef struct {
  26413. /** TLV tag and len; tag equals
  26414. * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
  26415. A_UINT32 tlv_header;
  26416. /** Modem power state parameter */
  26417. A_UINT32 modem_power_state;
  26418. } wmi_modem_power_state_cmd_param;
  26419. enum {
  26420. WMI_MODEM_STATE_OFF = 0,
  26421. WMI_MODEM_STATE_ON
  26422. };
  26423. /**
  26424. * This command is sent from WLAN host driver to firmware to
  26425. * notify the updated Specific Absorption Rate (SAR) limits.
  26426. * A critical regulation for FCC compliance, OEMs require methods to set
  26427. * limits on TX power of WLAN/WWAN.
  26428. * Host would receive instructions on what to set the limits per
  26429. * band/chain/modulation to, it would then interpret and send the limits
  26430. * to FW using this WMI message.
  26431. * Since it is possible to have too many commands to fit into one message,
  26432. * FW will keep receiving the messages, until it finds one with
  26433. * commit_limits = 1, at which point it will apply all the received
  26434. * specifications.
  26435. */
  26436. typedef struct {
  26437. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
  26438. A_UINT32 tlv_header;
  26439. /** when set to WMI_SAR_FEATURE_ON_*, enable SAR feature
  26440. * with BDF (SET_0 to 4) or WMI
  26441. * if set to WMI_SAR_FEATURE_OFF, disable feature;
  26442. * if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
  26443. */
  26444. A_UINT32 sar_enable;
  26445. /** number of items in sar_limits[] */
  26446. A_UINT32 num_limit_rows;
  26447. /** once received and is set to 1, FW will calculate the power limits
  26448. * and send set_power command to apply them.
  26449. * Otherwise just update local values stored in FW until a future msg
  26450. * with commit_limits=1 arrives.
  26451. */
  26452. A_UINT32 commit_limits;
  26453. /**
  26454. * TLV (tag length value) parameters follow the sar_limit_cmd_row
  26455. * structure. The TLV's are:
  26456. * wmi_sar_limit_cmd_row sar_limits[];
  26457. */
  26458. } wmi_sar_limits_cmd_fixed_param;
  26459. enum wmi_sar_feature_state_flags {
  26460. WMI_SAR_FEATURE_OFF = 0,
  26461. WMI_SAR_FEATURE_ON_SET_0,
  26462. WMI_SAR_FEATURE_ON_SET_1,
  26463. WMI_SAR_FEATURE_ON_SET_2,
  26464. WMI_SAR_FEATURE_ON_SET_3,
  26465. WMI_SAR_FEATURE_ON_SET_4,
  26466. WMI_SAR_FEATURE_NO_CHANGE,
  26467. WMI_SAR_FEATURE_ON_USER_DEFINED,
  26468. WMI_SAR_FEATURE_ON_SAR_V2_0,
  26469. WMI_SAR_FEATURE_ON_SAR_V3,
  26470. };
  26471. typedef struct {
  26472. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
  26473. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  26474. * new band_id values .
  26475. */
  26476. A_UINT32 band_id;
  26477. A_UINT32 chain_id;
  26478. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  26479. A_UINT32 mod_id;
  26480. /**
  26481. * To be backwards-compatible with older code use a union with
  26482. * limit_value & limit_index as alternate names / interpretations
  26483. * of the same message information element.
  26484. * The older code still uses limit_value, while the new code will
  26485. * use limit_index.
  26486. * The interpretation of the field as value or index depends on
  26487. * WMI_SAR_FEATURE_ON_*
  26488. * WMI_SAR_FEATURE_ON_SAR_V2_0 will use it as index, other case
  26489. * still use it as value.
  26490. */
  26491. union {
  26492. /** actual power limit value, in steps of 0.5 dBm */
  26493. A_UINT32 limit_value;
  26494. A_UINT32 limit_index;
  26495. };
  26496. /** in case the OEM doesn't care about one of the qualifiers from above,
  26497. * the bit for that qualifier within the validity_bitmap can be set to 0
  26498. * so that limit is applied to all possible cases of this qualifier
  26499. * (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
  26500. * treated as a wildcard).
  26501. * Current masks:
  26502. * WMI_SAR_BAND_ID_VALID_MASK
  26503. * WMI_SAR_CHAIN_ID_VALID_MASK
  26504. * WMI_SAR_MOD_ID_VALID_MASK
  26505. * Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
  26506. * it means apply same limit_value to both WMI_SAR_MOD_CCK and
  26507. * WMI_SAR_MOD_OFDM cases.
  26508. */
  26509. A_UINT32 validity_bitmap;
  26510. } wmi_sar_limit_cmd_row;
  26511. enum wmi_sar_band_id_flags {
  26512. WMI_SAR_2G_ID = 0,
  26513. WMI_SAR_5G_ID
  26514. };
  26515. enum wmi_sar_mod_id_flags {
  26516. WMI_SAR_MOD_CCK = 0,
  26517. WMI_SAR_MOD_OFDM
  26518. };
  26519. /**
  26520. * This message is sent from FW to WLAN host to inform the host of the
  26521. * updated Specific Absorption Rate (SAR) limits currently in use.
  26522. */
  26523. typedef struct {
  26524. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_event_param */
  26525. A_UINT32 tlv_header;
  26526. /** when set to WMI_SAR_FEATURE_ON_*, SAR feature is enabled
  26527. * with BDF (SET_0 to 4) or WMI
  26528. * if set to WMI_SAR_FEATURE_OFF, feature is disabled;
  26529. */
  26530. A_UINT32 sar_enable;
  26531. /**
  26532. * number of items in sar_limits[].
  26533. * used when sar_enable == WMI_SAR_FEATURE_ON_USER_DEFINED.
  26534. * Should be zero if any of the BDF sets is activated.
  26535. */
  26536. A_UINT32 num_limit_rows;
  26537. /**
  26538. * TLV (tag length value) parameters follow the sar_get_limit_event_row
  26539. * structure. The TLV's are:
  26540. * wmi_sar_get_limit_event_row sar_limits[num_limit_rows];
  26541. */
  26542. } wmi_sar_get_limits_event_fixed_param;
  26543. typedef struct {
  26544. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limit_event_row */
  26545. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  26546. * new band_id values .
  26547. */
  26548. A_UINT32 band_id;
  26549. A_UINT32 chain_id;
  26550. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  26551. A_UINT32 mod_id;
  26552. /** actual power limit value, in steps of 0.5 dBm */
  26553. A_UINT32 limit_value;
  26554. } wmi_sar_get_limit_event_row;
  26555. #define WMI_SAR_BAND_ID_VALID_MASK (0x1)
  26556. #define WMI_SAR_CHAIN_ID_VALID_MASK (0x2)
  26557. #define WMI_SAR_MOD_ID_VALID_MASK (0x4)
  26558. #define WMI_SET_SAR_BAND_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
  26559. #define WMI_SET_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
  26560. #define WMI_SET_SAR_MOD_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
  26561. #define WMI_IS_SAR_BAND_ID_VALID(bitmap) ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
  26562. #define WMI_IS_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
  26563. #define WMI_IS_SAR_MOD_ID_VALID(bitmap) ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
  26564. /**
  26565. * This command is sent from WLAN host driver to firmware to
  26566. * get current Specific Absorption Rate (SAR) limits status from firmware.
  26567. * The command does not require any parameters as of now.
  26568. */
  26569. typedef struct {
  26570. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_cmd_param */
  26571. A_UINT32 tlv_header;
  26572. /** currently no parameters are required. Reserved bit field for future use added */
  26573. /* All bits need to be set to 0 while it is a reserved field. */
  26574. A_UINT32 reserved;
  26575. } wmi_sar_get_limits_cmd_fixed_param;
  26576. #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
  26577. #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
  26578. /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
  26579. generated whenever firmware roamed to new AP silently and
  26580. (a) If the host is awake, FW sends the event to the host immediately .
  26581. (b) If host is in sleep then either
  26582. (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
  26583. command to FW (part of host wake up sequence from low power mode) before sending the event host.
  26584. (2) data/mgmt frame is received from roamed AP, which needs to return to host
  26585. */
  26586. #define GTK_OFFLOAD_KCK_EXTENDED_BYTES 32
  26587. typedef struct {
  26588. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
  26589. A_UINT32 tlv_header;
  26590. A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
  26591. A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
  26592. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
  26593. } wmi_key_material;
  26594. typedef struct {
  26595. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material_ext */
  26596. A_UINT32 tlv_header;
  26597. /*
  26598. * key_buffer contains kck,kck2,kek,kek2,replay counter, in order.
  26599. * If both the below kck_len and kek_len fields are 0x0, the split
  26600. * between kck vs. kek should be inferred based on akmp.
  26601. */
  26602. A_UINT8 key_buffer[GTK_OFFLOAD_KEK_EXTENDED_BYTES+GTK_OFFLOAD_KCK_EXTENDED_BYTES+GTK_REPLAY_COUNTER_BYTES];
  26603. /* length of kck in key_buffer */
  26604. A_UINT32 kck_len;
  26605. /* length of kek in key_buffer */
  26606. A_UINT32 kek_len;
  26607. } wmi_key_material_ext;
  26608. typedef struct {
  26609. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
  26610. /** Unique id identifying the VDEV on which roaming is done by firmware */
  26611. A_UINT32 vdev_id;
  26612. /** auth_status: connected or authorized */
  26613. A_UINT32 auth_status;
  26614. /** roam_reason:
  26615. * bits 0-3 roam trigger reason LSbs - see WMI_ROAM_TRIGGER_REASON_XXX
  26616. * bits 4-5 subnet status - see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
  26617. * bit 6 HW mode status, set 1 to indicate host to schedule
  26618. * HW mode change, see WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE.
  26619. * bit 7 0x1 to show bits 8-15 are valid
  26620. * bits 8-15 full WMI_ROAM_TRIGGER_REASON_ID/WMI_ROAM_TRIGGER_EXT_REASON_ID
  26621. * since 4 bits are not enough.
  26622. */
  26623. A_UINT32 roam_reason;
  26624. /** associated AP's RSSI calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
  26625. A_UINT32 rssi;
  26626. /** MAC address of roamed AP */
  26627. wmi_mac_addr bssid; /* BSSID */
  26628. /** whether the frame is beacon or probe rsp */
  26629. A_UINT32 is_beacon;
  26630. /** the length of beacon/probe rsp */
  26631. A_UINT32 bcn_probe_rsp_len;
  26632. /** the length of reassoc rsp */
  26633. A_UINT32 reassoc_rsp_len;
  26634. /** the length of reassoc req */
  26635. A_UINT32 reassoc_req_len;
  26636. /**
  26637. * maximum allowed Tx power (in dBm) for this connection.
  26638. * max_allowed_tx_power = 0 dBm means value is not specified.
  26639. */
  26640. A_INT32 max_allowed_tx_power;
  26641. /** unique id to identify mac's TSF register */
  26642. A_UINT32 mac_tsf_id;
  26643. /** ignore mac_tsf_id unless mac_tsf_id_valid is set */
  26644. A_UINT32 mac_tsf_id_valid;
  26645. /**
  26646. * TLV (tag length value) parameters follows roam_synch_event
  26647. * The TLV's are:
  26648. * A_UINT8 bcn_probe_rsp_frame[bcn_probe_resp_len];
  26649. * A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
  26650. * wmi_channel chan;
  26651. * wmi_key_material key[];
  26652. * A_UINT32 status[]; subnet changed status not being used currently.
  26653. * Will pass the information using roam_status.
  26654. * A_UINT8 reassoc_req_frame[reassoc_req_len];
  26655. * wmi_pdev_hw_mode_transition_event_fixed_param
  26656. * hw_mode_transition_fixed_param[];
  26657. * wmi_pdev_set_hw_mode_response_vdev_mac_entry
  26658. * wmi_pdev_set_hw_mode_response_vdev_mac_mapping[];
  26659. * wmi_roam_fils_synch_tlv_param roam_fils_synch_info[];
  26660. * wmi_key_material_ext key_ext[];
  26661. * wmi_roam_pmk_cache_synch_tlv_param roam_pmk_cache_synch_info[];
  26662. * wmi_pdev_band_to_mac mac_freq_mapping[];
  26663. */
  26664. } wmi_roam_synch_event_fixed_param;
  26665. /**
  26666. * The WMI_ROAM_SYNCH_FRAME_EVENTID message is used in conjunction with the
  26667. * WMI_ROAM_SYNCH_EVENTID message. The former will be sent 1st followed by
  26668. * the latter for cases where the WMI_ROAM_SYNCH_EVENTID message size would
  26669. * exceed 2K. The more_frag field in the WMI_ROAM_SYNCH_FRAME_EVENTID informs
  26670. * the host whether more WMI_ROAM_SYNCH_FRAME_EVENTID messages would follow;
  26671. * after the WMI_ROAM_SYNCH_FRAME_EVENTID messages the target sends the
  26672. * WMI_ROAM_SYNCH_EVENTID with bcn_probe_rsp_len, reassoc_rsp_len, and
  26673. * reassoc_rsp_len set to 0.
  26674. */
  26675. typedef struct {
  26676. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_frame_event_fixed_param */
  26677. /** Unique id identifying the VDEV on which roaming is done by firmware */
  26678. A_UINT32 vdev_id;
  26679. /** More frags to follow? */
  26680. A_UINT32 more_frag;
  26681. /** whether the frame is beacon or probe rsp */
  26682. A_UINT32 is_beacon;
  26683. /** the length of beacon/probe rsp */
  26684. A_UINT32 bcn_probe_rsp_len;
  26685. /** the length of reassoc rsp */
  26686. A_UINT32 reassoc_rsp_len;
  26687. /** the length of reassoc req */
  26688. A_UINT32 reassoc_req_len;
  26689. A_INT32 bcn_probe_resp_rssi; /* RSSI units dBm */
  26690. /**
  26691. * TLV (tag length value) parameters follows roam_synch_event
  26692. * The TLV's are:
  26693. * A_UINT8 bcn_probe_rsp_frame[bcn_probe_rsp_len];
  26694. * A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
  26695. * A_UINT8 reassoc_req_frame[reassoc_req_len];
  26696. */
  26697. } wmi_roam_synch_frame_event_fixed_param;
  26698. typedef struct {
  26699. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_frame_event_fixed_param */
  26700. /** Unique id identifying the VDEV on which roaming is done by firmware */
  26701. A_UINT32 vdev_id;
  26702. /* Exact frame length without considering 4 byte alignment */
  26703. A_UINT32 frame_length;
  26704. A_INT32 rssi; /* Units in dBm */
  26705. /* The frequency on which to transmit. */
  26706. A_UINT32 primary_channel_freq; /* MHz units */
  26707. /**
  26708. * TLV (tag length value) parameters follows roam_frame_event
  26709. * The TLV's are:
  26710. * A_UINT8 frame[frame_length];
  26711. */
  26712. } wmi_roam_frame_event_fixed_param;
  26713. #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
  26714. typedef struct {
  26715. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
  26716. A_UINT32 tlv_header;
  26717. /** MAC address of the peer for which the estimated link speed is required. */
  26718. wmi_mac_addr peer_macaddr;
  26719. /* Set to 1 only if vdev_id field is valid */
  26720. A_UINT32 valid_vdev_id;
  26721. /* VDEV to which the peer belongs to */
  26722. A_UINT32 vdev_id;
  26723. } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
  26724. typedef struct {
  26725. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
  26726. A_UINT32 tlv_header;
  26727. /** MAC address of the peer for which the estimated link speed is required.
  26728. */
  26729. wmi_mac_addr peer_macaddr;
  26730. /* Estimated link speed in kbps.
  26731. * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
  26732. */
  26733. A_UINT32 est_linkspeed_kbps;
  26734. /* Set to 1 only if vdev_id field is valid */
  26735. A_UINT32 valid_vdev_id;
  26736. /* VDEV to which the peer belongs to */
  26737. A_UINT32 vdev_id;
  26738. } wmi_peer_estimated_linkspeed_event_fixed_param;
  26739. typedef struct {
  26740. A_UINT32 tlv_header; /* TLV tag and len; tag equals */
  26741. /* vdev ID */
  26742. A_UINT32 vdev_id;
  26743. A_UINT32 data_len; /** length in byte of data[]. */
  26744. /* This structure is used to send REQ binary blobs
  26745. * from application/service to firmware where Host drv is pass through .
  26746. * Following this structure is the TLV:
  26747. * A_UINT8 data[]; <-- length in byte given by field data_len.
  26748. * A_UINT32 vdev_id_bitmap[];
  26749. * This array is present and non-zero length in MLO case, stats should
  26750. * only be provided from the vdev_id_bitmap in the bitmap when it is
  26751. * present.
  26752. */
  26753. } wmi_req_stats_ext_cmd_fixed_param;
  26754. typedef struct {
  26755. /** TLV tag and len; tag equals
  26756. * WMITLV_TAG_STRUC_wmi_partner_link_stats */
  26757. A_UINT32 tlv_header;
  26758. A_UINT32 vdev_id;
  26759. A_UINT32 data_length; /* length of the stats for this vdev */
  26760. A_UINT32 offset; /* offset of the stats from partner_link_data for this vdev */
  26761. } wmi_partner_link_stats;
  26762. typedef struct {
  26763. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
  26764. A_UINT32 vdev_id; /** vdev ID */
  26765. A_UINT32 data_len; /** length in byte of data[]. */
  26766. /* This structure is used to send REQ binary blobs
  26767. * from firmware to application/service where Host drv is pass through .
  26768. * Following this structure is the TLV:
  26769. * A_UINT8 data[]; <-- length in byte given by field data_len.
  26770. */
  26771. /* This structure is used to send information of partner links.
  26772. * Following this structure is the TLV:
  26773. * wmi_partner_link_stats partner_link_stats[];
  26774. */
  26775. /* This structure is used to send REQ binary blobs of stats of partner
  26776. * links from firmware to application/service where Host drv is pass
  26777. * through.
  26778. * Following this structure is the TLV partner_link_stats:
  26779. * A_UINT8 partner_link_stats_data[]; <-- length and offset in byte
  26780. * units given by TLV
  26781. * wmi_partner_link_stats.
  26782. */
  26783. } wmi_stats_ext_event_fixed_param;
  26784. typedef enum {
  26785. /** Default: no replay required. */
  26786. WMI_PEER_DELETE_NO_REPLAY = 0,
  26787. /**
  26788. * Replay requested due to UMAC hang during Peer delete.
  26789. * Replay done by Host SW after MLO UMAC SSR recovered the UMAC.
  26790. */
  26791. WMI_PEER_DELETE_REPLAY_FOR_UMAC,
  26792. } WMI_PEER_DELETE_REPLAY_T;
  26793. typedef struct {
  26794. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
  26795. /** unique id identifying the VDEV, generated by the caller */
  26796. A_UINT32 vdev_id;
  26797. /** peer MAC address */
  26798. wmi_mac_addr peer_macaddr;
  26799. /** WMI_PEER_DELETE_REPLAY_T */
  26800. A_UINT32 replay_type;
  26801. } wmi_peer_delete_resp_event_fixed_param;
  26802. typedef struct {
  26803. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_all_peer_resp_event_fixed_param */
  26804. /** unique id identifying the VDEV, generated by the caller */
  26805. A_UINT32 vdev_id;
  26806. /* Status of peer delete all command */
  26807. /*
  26808. * Values for Status:
  26809. * 0 - OK; command successful
  26810. * 1 - EINVAL; Requested invalid vdev_id
  26811. * 2 - EFAILED; Delete all peer failed
  26812. */
  26813. A_UINT32 status;
  26814. /** WMI_PEER_DELETE_REPLAY_T */
  26815. A_UINT32 replay_type;
  26816. } wmi_vdev_delete_all_peer_resp_event_fixed_param;
  26817. typedef struct {
  26818. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
  26819. A_UINT32 tlv_header;
  26820. A_UINT32 vdev_id; /* vdev ID */
  26821. /* MAC address of the peer for which the estimated link speed is required.*/
  26822. wmi_mac_addr peer_macaddr;
  26823. A_UINT32 state; /* peer state */
  26824. } wmi_peer_state_event_fixed_param;
  26825. typedef struct {
  26826. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param */
  26827. A_UINT32 tlv_header;
  26828. /* unique id identifying the VDEV, generated by the caller */
  26829. A_UINT32 vdev_id;
  26830. /* peer MAC address */
  26831. wmi_mac_addr peer_macaddr;
  26832. /* status
  26833. * 0: ok
  26834. * 1: fail - peer not present
  26835. */
  26836. A_UINT32 status;
  26837. } wmi_peer_assoc_conf_event_fixed_param;
  26838. typedef struct {
  26839. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_conf_event_fixed_param */
  26840. A_UINT32 tlv_header;
  26841. /* unique id identifying the VDEV, generated by the caller */
  26842. A_UINT32 vdev_id;
  26843. /* peer MAC address */
  26844. wmi_mac_addr peer_macaddr;
  26845. /* 0: OK.
  26846. * 1: FAIL - same bss peer exist already. */
  26847. A_UINT32 status;
  26848. } wmi_peer_create_conf_event_fixed_param;
  26849. enum {
  26850. WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, /** scan_type: passive */
  26851. WMI_2G4_HT40_OBSS_SCAN_ACTIVE, /** scan_type: active */
  26852. };
  26853. typedef struct {
  26854. /**
  26855. * TLV tag and len;
  26856. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enable_cmd_fixed_param
  26857. */
  26858. A_UINT32 tlv_header;
  26859. A_UINT32 vdev_id;
  26860. /**
  26861. * active or passive. if active all the channels are actively scanned.
  26862. * if passive then all the channels are passively scanned
  26863. */
  26864. A_UINT32 scan_type;
  26865. /**
  26866. * FW can perform multiple scans with in a OBSS scan interval.
  26867. * For each scan,
  26868. * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
  26869. * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
  26870. * The unit for these 2 parameters is TUs.
  26871. */
  26872. A_UINT32 obss_scan_passive_dwell;
  26873. A_UINT32 obss_scan_active_dwell;
  26874. /**
  26875. * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
  26876. * both min and total per channel dwell time requirement
  26877. */
  26878. A_UINT32 bss_channel_width_trigger_scan_interval;
  26879. /**
  26880. * FW can perform multiple scans with in a OBSS scan interval.
  26881. * For each scan,
  26882. * the total per channel dwell time across all scans with in OBSS scan interval should be
  26883. * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
  26884. * for active scans and ,
  26885. * The unit for these 2 parameters is TUs.
  26886. */
  26887. A_UINT32 obss_scan_passive_total_per_channel;
  26888. A_UINT32 obss_scan_active_total_per_channel;
  26889. A_UINT32 bss_width_channel_transition_delay_factor; /** parameter to check exemption from scan */
  26890. A_UINT32 obss_scan_activity_threshold; /** parameter to check exemption from scan */
  26891. /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
  26892. A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */
  26893. A_UINT32 current_operating_class; /** STA current operating class */
  26894. /** length of 2.4GHz channel list to scan at, channel number list in tlv->channels[] */
  26895. A_UINT32 channel_len;
  26896. /** length of optional ie data to append to probe request when active scan, ie data in tlv->ie_field[] */
  26897. A_UINT32 ie_len;
  26898. /**
  26899. * TLV (tag length value) parameters following the fixed param structure
  26900. * A_UINT8 channels[channel_len]; // channel numbers
  26901. * A_UINT8 ie_field[ie_len];
  26902. * A_UINT32 chan_freqs[channel_len] // in MHz
  26903. */
  26904. } wmi_obss_scan_enable_cmd_fixed_param;
  26905. typedef struct {
  26906. /**
  26907. * TLV tag and len;
  26908. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
  26909. */
  26910. A_UINT32 tlv_header;
  26911. A_UINT32 vdev_id;
  26912. } wmi_obss_scan_disable_cmd_fixed_param;
  26913. typedef struct {
  26914. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
  26915. A_UINT32 tlv_header;
  26916. /** unique id identifying the VDEV */
  26917. A_UINT32 vdev_id;
  26918. /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
  26919. A_UINT32 tx_status;
  26920. } wmi_offload_prb_rsp_tx_status_event_fixed_param;
  26921. typedef enum {
  26922. WMI_FRAME_TX_OK, /* frame tx ok */
  26923. WMI_FRAME_TX_XRETRY, /* excessivley retried */
  26924. WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
  26925. WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
  26926. } WMI_FRAME_TX_STATUS;
  26927. /**
  26928. * This command is sent from WLAN host driver to firmware to
  26929. * request firmware to send the latest channel avoidance range
  26930. * to host.
  26931. *
  26932. * This command is only applicable for APQ platform which has
  26933. * modem on the platform. If firmware doesn't support MWS Coex,
  26934. * this command can be dropped by firmware.
  26935. *
  26936. * Host would send this command to firmware to request a channel
  26937. * avoidance information update.
  26938. */
  26939. typedef struct {
  26940. /** TLV tag and len; tag equals
  26941. * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
  26942. A_UINT32 tlv_header;
  26943. } wmi_chan_avoid_update_cmd_param;
  26944. /* ExtScan operation mode */
  26945. typedef enum {
  26946. WMI_EXTSCAN_MODE_NONE = 0x0000,
  26947. WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
  26948. WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
  26949. WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
  26950. } wmi_extscan_operation_mode;
  26951. /* Channel Mask */
  26952. typedef enum {
  26953. WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
  26954. WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
  26955. WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
  26956. WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
  26957. } wmi_channel_band_mask;
  26958. typedef enum {
  26959. WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
  26960. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
  26961. WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
  26962. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
  26963. WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
  26964. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
  26965. WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
  26966. WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
  26967. WMI_EXTSCAN_EVENT_MAX = 0x8000
  26968. } wmi_extscan_event_type;
  26969. #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
  26970. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
  26971. #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
  26972. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
  26973. WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
  26974. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
  26975. typedef enum {
  26976. WMI_EXTSCAN_NO_FORWARDING = 0x0000,
  26977. WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
  26978. } wmi_extscan_forwarding_flags;
  26979. typedef enum {
  26980. WMI_EXTSCAN_USE_MSD = 0x0001, /* Use Motion Sensor Detection */
  26981. WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, /* Extscan LPASS extended batching feature is supported and enabled */
  26982. } wmi_extscan_configuration_flags;
  26983. typedef enum {
  26984. WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, /* Cache the results of bucket whose configuration flags has this bit set */
  26985. WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002, /* Report ext scan results to context hub or not. */
  26986. } wmi_extscan_bucket_configuration_flags;
  26987. typedef enum {
  26988. WMI_EXTSCAN_STATUS_OK = 0,
  26989. WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
  26990. WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
  26991. WMI_EXTSCAN_STATUS_INTERNAL_ERROR
  26992. } wmi_extscan_start_stop_status;
  26993. typedef struct {
  26994. /** Request ID - to identify command. Cannot be 0 */
  26995. A_UINT32 request_id;
  26996. /** Requestor ID - client requesting ExtScan */
  26997. A_UINT32 requestor_id;
  26998. /** VDEV id(interface) that is requesting scan */
  26999. A_UINT32 vdev_id;
  27000. } wmi_extscan_command_id;
  27001. typedef struct {
  27002. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27003. /** channel in MHz */
  27004. A_UINT32 channel;
  27005. /** dwell time in msec - use defaults if 0 */
  27006. A_UINT32 min_dwell_time;
  27007. A_UINT32 max_dwell_time;
  27008. /** passive/active channel and other flags */
  27009. A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
  27010. } wmi_extscan_bucket_channel;
  27011. /* Scan Bucket specification */
  27012. typedef struct {
  27013. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27014. /** Bucket ID - 0-based */
  27015. A_UINT32 bucket_id;
  27016. /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
  27017. A_UINT32 notify_extscan_events;
  27018. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  27019. A_UINT32 forwarding_flags;
  27020. /** ExtScan configuration flags - wmi_extscan_bucket_configuration_flags */
  27021. A_UINT32 configuration_flags;
  27022. /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
  27023. A_UINT32 base_period_multiplier;
  27024. /** dwell time in msec on active channels - use defaults if 0 */
  27025. A_UINT32 min_dwell_time_active;
  27026. A_UINT32 max_dwell_time_active;
  27027. /** dwell time in msec on passive channels - use defaults if 0 */
  27028. A_UINT32 min_dwell_time_passive;
  27029. A_UINT32 max_dwell_time_passive;
  27030. /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
  27031. A_UINT32 channel_band;
  27032. /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
  27033. A_UINT32 num_channels;
  27034. /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
  27035. A_UINT32 min_period;
  27036. /** period above which exponent is not applied anymore */
  27037. A_UINT32 max_period;
  27038. /** back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
  27039. * new_bucket_period = last_bucket_period + last_exponent_period * exp_backoff
  27040. */
  27041. A_UINT32 exp_backoff;
  27042. /** number of scans performed at a given periodicity after which exponential back off value is
  27043. * applied to current periodicity to obtain a newer one
  27044. */
  27045. A_UINT32 exp_max_step_count;
  27046. /** Followed by the variable length TLV chan_list:
  27047. * wmi_extscan_bucket_channel chan_list[] */
  27048. } wmi_extscan_bucket;
  27049. typedef struct {
  27050. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
  27051. /** Request ID - to identify command. Cannot be 0 */
  27052. A_UINT32 request_id;
  27053. /** Requestor ID - client requesting ExtScan */
  27054. A_UINT32 requestor_id;
  27055. /** VDEV id(interface) that is requesting scan */
  27056. A_UINT32 vdev_id;
  27057. /** table ID - to allow support for multiple simultaneous requests */
  27058. A_UINT32 table_id;
  27059. /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
  27060. A_UINT32 base_period;
  27061. /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
  27062. A_UINT32 max_iterations;
  27063. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  27064. A_UINT32 forwarding_flags;
  27065. /** ExtScan configuration flags - wmi_extscan_configuration_flags */
  27066. A_UINT32 configuration_flags;
  27067. /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
  27068. A_UINT32 notify_extscan_events;
  27069. /** Scan Priority, input to scan scheduler */
  27070. A_UINT32 scan_priority;
  27071. /** Maximum number of BSSIDs to cache on each scan cycle */
  27072. A_UINT32 max_bssids_per_scan_cycle;
  27073. /** Minimum RSSI value to report */
  27074. A_UINT32 min_rssi;
  27075. /** Maximum table usage in percentage */
  27076. A_UINT32 max_table_usage;
  27077. /** default dwell time in msec on active channels */
  27078. A_UINT32 min_dwell_time_active;
  27079. A_UINT32 max_dwell_time_active;
  27080. /** default dwell time in msec on passive channels */
  27081. A_UINT32 min_dwell_time_passive;
  27082. A_UINT32 max_dwell_time_passive;
  27083. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  27084. A_UINT32 min_rest_time;
  27085. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  27086. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  27087. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  27088. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  27089. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  27090. * irrespective of activity. activity is determined by the idle_time parameter.
  27091. */
  27092. A_UINT32 max_rest_time;
  27093. /** time before sending next set of probe requests.
  27094. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  27095. * The number of probe requests specified depends on the ssid_list and bssid_list
  27096. */
  27097. /** Max number of probes to be sent */
  27098. A_UINT32 n_probes;
  27099. /** time in msec between 2 sets of probe requests. */
  27100. A_UINT32 repeat_probe_time;
  27101. /** time in msec between 2 consecutive probe requests with in a set. */
  27102. A_UINT32 probe_spacing_time;
  27103. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  27104. A_UINT32 idle_time;
  27105. /** maximum time in msec allowed for scan */
  27106. A_UINT32 max_scan_time;
  27107. /** delay in msec before sending first probe request after switching to a channel */
  27108. A_UINT32 probe_delay;
  27109. /** Scan control flags */
  27110. A_UINT32 scan_ctrl_flags;
  27111. /** Burst duration time in msec*/
  27112. A_UINT32 burst_duration;
  27113. /** number of bssids in the TLV bssid_list[] */
  27114. A_UINT32 num_bssid;
  27115. /** number of ssid in the TLV ssid_list[] */
  27116. A_UINT32 num_ssids;
  27117. /** number of bytes in TLV ie_data[] */
  27118. A_UINT32 ie_len;
  27119. /** number of buckets in the TLV bucket_list[] */
  27120. A_UINT32 num_buckets;
  27121. /** in number of scans, send notifications to host after these many scans */
  27122. A_UINT32 report_threshold_num_scans;
  27123. /** number of channels in channel_list[] determined by the
  27124. sum of wmi_extscan_bucket.num_channels in array */
  27125. /**
  27126. * TLV (tag length value) parameters follow the extscan_cmd
  27127. * structure. The TLV's are:
  27128. * wmi_ssid ssid_list[];
  27129. * wmi_mac_addr bssid_list[];
  27130. * A_UINT8 ie_data[];
  27131. * wmi_extscan_bucket bucket_list[];
  27132. * wmi_extscan_bucket_channel channel_list[];
  27133. */
  27134. } wmi_extscan_start_cmd_fixed_param;
  27135. typedef struct {
  27136. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
  27137. /** Request ID - to match running command. 0 matches any request */
  27138. A_UINT32 request_id;
  27139. /** Requestor ID - client requesting stop */
  27140. A_UINT32 requestor_id;
  27141. /** VDEV id(interface) that is requesting scan */
  27142. A_UINT32 vdev_id;
  27143. /** table ID - to allow support for multiple simultaneous requests */
  27144. A_UINT32 table_id;
  27145. } wmi_extscan_stop_cmd_fixed_param;
  27146. enum wmi_extscan_get_cached_results_flags {
  27147. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
  27148. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
  27149. };
  27150. typedef struct {
  27151. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
  27152. /** request ID - used to correlate command with events */
  27153. A_UINT32 request_id;
  27154. /** Requestor ID - client that requested results */
  27155. A_UINT32 requestor_id;
  27156. /** VDEV id(interface) that is requesting scan */
  27157. A_UINT32 vdev_id;
  27158. /** table ID - to allow support for multiple simultaneous requests */
  27159. A_UINT32 table_id;
  27160. /** maximum number of results to be returned */
  27161. A_UINT32 max_results;
  27162. /** flush BSSID list - wmi_extscan_get_cached_results_flags */
  27163. A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
  27164. } wmi_extscan_get_cached_results_cmd_fixed_param;
  27165. typedef struct {
  27166. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
  27167. /** request ID - used to correlate command with events */
  27168. A_UINT32 request_id;
  27169. /** Requestor ID - client that requested results */
  27170. A_UINT32 requestor_id;
  27171. /** VDEV id(interface) that is requesting scan */
  27172. A_UINT32 vdev_id;
  27173. /** table ID - to allow support for multiple simultaneous requests */
  27174. A_UINT32 table_id;
  27175. } wmi_extscan_get_wlan_change_results_cmd_fixed_param;
  27176. typedef struct {
  27177. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27178. /** bssid */
  27179. wmi_mac_addr bssid;
  27180. /** channel in MHz */
  27181. A_UINT32 channel;
  27182. /** upper RSSI limit */
  27183. A_UINT32 upper_rssi_limit;
  27184. /** lower RSSI limit */
  27185. A_UINT32 lower_rssi_limit;
  27186. } wmi_extscan_wlan_change_bssid_param;
  27187. typedef struct {
  27188. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
  27189. /** Request ID - to identify command. Cannot be 0 */
  27190. A_UINT32 request_id;
  27191. /** Requestor ID - client requesting wlan change monitoring */
  27192. A_UINT32 requestor_id;
  27193. /** VDEV id(interface) that is requesting scan */
  27194. A_UINT32 vdev_id;
  27195. /** table ID - to allow support for multiple simultaneous tables */
  27196. A_UINT32 table_id;
  27197. /** operation mode: start/stop */
  27198. A_UINT32 mode; /* wmi_extscan_operation_mode */
  27199. /** number of RSSI samples to store */
  27200. A_UINT32 max_rssi_samples;
  27201. /** number of samples to use to calculate RSSI average */
  27202. A_UINT32 rssi_averaging_samples;
  27203. /** number of scans to confirm loss of contact with RSSI */
  27204. A_UINT32 lost_ap_scan_count;
  27205. /** number of out-of-range BSSIDs necessary to send event */
  27206. A_UINT32 max_out_of_range_count;
  27207. /** total number of bssid signal descriptors (in all pages) */
  27208. A_UINT32 total_entries;
  27209. /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
  27210. A_UINT32 first_entry_index;
  27211. /** number of bssid signal descriptors in this page */
  27212. A_UINT32 num_entries_in_page;
  27213. /* Following this structure is the TLV:
  27214. * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[];
  27215. * (number of elements given by field num_page_entries)
  27216. */
  27217. } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
  27218. typedef struct {
  27219. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27220. /** bssid */
  27221. wmi_mac_addr bssid;
  27222. /** RSSI min threshold for reporting */
  27223. A_UINT32 min_rssi;
  27224. /** Deprecated entry - channel in MHz */
  27225. A_UINT32 channel;
  27226. /** RSSI max threshold for reporting */
  27227. A_UINT32 max_rssi;
  27228. } wmi_extscan_hotlist_entry;
  27229. typedef struct {
  27230. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
  27231. /** Request ID - to identify command. Cannot be 0 */
  27232. A_UINT32 request_id;
  27233. /** Requestor ID - client requesting hotlist monitoring */
  27234. A_UINT32 requestor_id;
  27235. /** VDEV id(interface) that is requesting scan */
  27236. A_UINT32 vdev_id;
  27237. /** table ID - to allow support for multiple simultaneous tables */
  27238. A_UINT32 table_id;
  27239. /** operation mode: start/stop */
  27240. A_UINT32 mode; /* wmi_extscan_operation_mode */
  27241. /** total number of bssids (in all pages) */
  27242. A_UINT32 total_entries;
  27243. /** index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry */
  27244. A_UINT32 first_entry_index;
  27245. /** number of bssids in this page */
  27246. A_UINT32 num_entries_in_page;
  27247. /** number of consecutive scans to confirm loss of contact with AP */
  27248. A_UINT32 lost_ap_scan_count;
  27249. /* Following this structure is the TLV:
  27250. * wmi_extscan_hotlist_entry hotlist[]; <-- number of elements given by field num_page_entries.
  27251. */
  27252. } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
  27253. typedef struct {
  27254. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27255. /**ssid */
  27256. wmi_ssid ssid;
  27257. /**band */
  27258. A_UINT32 band;
  27259. /**RSSI threshold for reporting */
  27260. A_UINT32 min_rssi;
  27261. A_UINT32 max_rssi;
  27262. } wmi_extscan_hotlist_ssid_entry;
  27263. typedef struct {
  27264. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param */
  27265. /** Request ID - to identify command. Cannot be 0 */
  27266. A_UINT32 request_id;
  27267. /** Requestor ID - client requesting hotlist ssid monitoring */
  27268. A_UINT32 requestor_id;
  27269. /** VDEV id(interface) that is requesting scan */
  27270. A_UINT32 vdev_id;
  27271. /** table ID - to allow support for multiple simultaneous tables */
  27272. A_UINT32 table_id;
  27273. /** operation mode: start/stop */
  27274. A_UINT32 mode; /* wmi_extscan_operation_mode */
  27275. /**total number of ssids (in all pages) */
  27276. A_UINT32 total_entries;
  27277. /**index of the first ssid entry found in the TLV wmi_extscan_hotlist_ssid_entry*/
  27278. A_UINT32 first_entry_index;
  27279. /**number of ssids in this page */
  27280. A_UINT32 num_entries_in_page;
  27281. /** number of consecutive scans to confirm loss of an ssid **/
  27282. A_UINT32 lost_ap_scan_count;
  27283. /* Following this structure is the TLV:
  27284. * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; <-- number of elements given by field num_page_entries.
  27285. */
  27286. } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
  27287. typedef struct {
  27288. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27289. /** table ID - to allow support for multiple simultaneous tables */
  27290. A_UINT32 table_id;
  27291. /** size in bytes of scan cache entry */
  27292. A_UINT32 scan_cache_entry_size;
  27293. /** maximum number of scan cache entries */
  27294. A_UINT32 max_scan_cache_entries;
  27295. /** maximum number of buckets per extscan request */
  27296. A_UINT32 max_buckets;
  27297. /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
  27298. A_UINT32 max_bssid_per_scan;
  27299. /** table usage level at which indication must be sent to host */
  27300. A_UINT32 max_table_usage_threshold;
  27301. } wmi_extscan_cache_capabilities;
  27302. typedef struct {
  27303. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27304. /** table ID - to allow support for multiple simultaneous tables */
  27305. A_UINT32 table_id;
  27306. /** size in bytes of wlan change entry */
  27307. A_UINT32 wlan_change_entry_size;
  27308. /** maximum number of entries in wlan change table */
  27309. A_UINT32 max_wlan_change_entries;
  27310. /** number of RSSI samples used for averaging RSSI */
  27311. A_UINT32 max_rssi_averaging_samples;
  27312. /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
  27313. A_UINT32 max_rssi_history_entries;
  27314. } wmi_extscan_wlan_change_monitor_capabilities;
  27315. typedef struct {
  27316. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27317. /** table ID - to allow support for multiple simultaneous tables */
  27318. A_UINT32 table_id;
  27319. /** size in bytes of hotlist entry */
  27320. A_UINT32 wlan_hotlist_entry_size;
  27321. /** maximum number of entries in wlan change table */
  27322. A_UINT32 max_hotlist_entries;
  27323. } wmi_extscan_hotlist_monitor_capabilities;
  27324. typedef struct {
  27325. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
  27326. /** Request ID - matches request ID used to start hot list monitoring */
  27327. A_UINT32 request_id;
  27328. /** Requestor ID - client requesting stop */
  27329. A_UINT32 requestor_id;
  27330. /** number of extscan caches */
  27331. A_UINT32 num_extscan_cache_tables;
  27332. /** number of wlan change lists */
  27333. A_UINT32 num_wlan_change_monitor_tables;
  27334. /** number of hotlists */
  27335. A_UINT32 num_hotlist_monitor_tables;
  27336. /** if one sided rtt data collection is supported */
  27337. A_UINT32 rtt_one_sided_supported;
  27338. /** if 11v data collection is supported */
  27339. A_UINT32 rtt_11v_supported;
  27340. /** if 11mc data collection is supported */
  27341. A_UINT32 rtt_ftm_supported;
  27342. /** number of extscan cache capabilities (one per table) */
  27343. A_UINT32 num_extscan_cache_capabilities;
  27344. /** number of wlan change capabilities (one per table) */
  27345. A_UINT32 num_extscan_wlan_change_capabilities;
  27346. /** number of extscan hotlist capabilities (one per table) */
  27347. A_UINT32 num_extscan_hotlist_capabilities;
  27348. /* Following this structure is the TLV:
  27349. * wmi_extscan_cache_capabilities extscan_cache_capabilities; <-- number of capabilities given by num_extscan_caches
  27350. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; <-- number of capabilities given by num_wlan_change_monitor_tables
  27351. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; <-- number of capabilities given by num_hotlist_monitor_tables
  27352. */
  27353. } wmi_extscan_set_capabilities_cmd_fixed_param;
  27354. typedef struct {
  27355. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
  27356. /** Request ID - matches request ID used to start hot list monitoring */
  27357. A_UINT32 request_id;
  27358. /** Requestor ID - client requesting capabilities */
  27359. A_UINT32 requestor_id;
  27360. } wmi_extscan_get_capabilities_cmd_fixed_param;
  27361. typedef struct {
  27362. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
  27363. /** Request ID of the operation that was started/stopped */
  27364. A_UINT32 request_id;
  27365. /** Requestor ID of the operation that was started/stopped */
  27366. A_UINT32 requestor_id;
  27367. /** VDEV id(interface) of the operation that was started/stopped */
  27368. A_UINT32 vdev_id;
  27369. /** extscan WMI command */
  27370. A_UINT32 command;
  27371. /** operation mode: start/stop */
  27372. A_UINT32 mode; /* wmi_extscan_operation_mode */
  27373. /**success/failure */
  27374. A_UINT32 status; /* enum wmi_extscan_start_stop_status */
  27375. /** table ID - to allow support for multiple simultaneous requests */
  27376. A_UINT32 table_id;
  27377. } wmi_extscan_start_stop_event_fixed_param;
  27378. typedef struct {
  27379. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
  27380. /** Request ID of the extscan operation that is currently running */
  27381. A_UINT32 request_id;
  27382. /** Requestor ID of the extscan operation that is currently running */
  27383. A_UINT32 requestor_id;
  27384. /** VDEV id(interface) of the extscan operation that is currently running */
  27385. A_UINT32 vdev_id;
  27386. /** scan event (wmi_scan_event_type) */
  27387. A_UINT32 event; /* wmi_extscan_event_type */
  27388. /** table ID - to allow support for multiple simultaneous requests */
  27389. A_UINT32 table_id;
  27390. /**number of buckets */
  27391. A_UINT32 num_buckets;
  27392. /* Following this structure is the TLV:
  27393. * A_UINT32 bucket_id[]; <-- number of elements given by field num_buckets.
  27394. */
  27395. } wmi_extscan_operation_event_fixed_param;
  27396. /* Types of extscan tables */
  27397. typedef enum {
  27398. EXTSCAN_TABLE_NONE = 0,
  27399. EXTSCAN_TABLE_BSSID = 1,
  27400. EXTSCAN_TABLE_RSSI = 2,
  27401. } wmi_extscan_table_type;
  27402. typedef struct {
  27403. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
  27404. /** Request ID of the extscan operation that is currently running */
  27405. A_UINT32 request_id;
  27406. /** Requestor ID of the extscan operation that is currently running */
  27407. A_UINT32 requestor_id;
  27408. /** VDEV id(interface) of the extscan operation that is currently running */
  27409. A_UINT32 vdev_id;
  27410. /** table ID - to allow support for multiple simultaneous tables */
  27411. A_UINT32 table_id;
  27412. /**see wmi_extscan_table_type for table reporting usage */
  27413. A_UINT32 table_type;
  27414. /**number of entries in use */
  27415. A_UINT32 entries_in_use;
  27416. /**maximum number of entries in table */
  27417. A_UINT32 maximum_entries;
  27418. } wmi_extscan_table_usage_event_fixed_param;
  27419. typedef enum {
  27420. WMI_SCAN_STATUS_INTERRUPTED = 1 /* Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
  27421. this can be used to discard scan results */
  27422. } wmi_scan_status_flags;
  27423. typedef struct {
  27424. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27425. /** RSSI */
  27426. A_UINT32 rssi;
  27427. /** time stamp in milliseconds */
  27428. A_UINT32 tstamp;
  27429. /** Extscan cycle during which this entry was scanned */
  27430. A_UINT32 scan_cycle_id;
  27431. /** flag to indicate if the given result was obtained as part of interrupted (aborted/large time gap preempted) scan */
  27432. A_UINT32 flags;
  27433. /** Bitmask of buckets (i.e. sets of channels) scanned */
  27434. A_UINT32 buckets_scanned;
  27435. } wmi_extscan_rssi_info;
  27436. typedef struct {
  27437. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27438. /** bssid */
  27439. wmi_mac_addr bssid;
  27440. /** ssid */
  27441. wmi_ssid ssid;
  27442. /** channel in MHz */
  27443. A_UINT32 channel;
  27444. /** capabilities */
  27445. A_UINT32 capabilities;
  27446. /** beacon interval in TUs */
  27447. A_UINT32 beacon_interval;
  27448. /** time stamp in milliseconds - time last seen */
  27449. A_UINT32 tstamp;
  27450. /** flags - _tExtScanEntryFlags */
  27451. A_UINT32 flags;
  27452. /** RTT in ns */
  27453. A_UINT32 rtt;
  27454. /** RTT standard deviation */
  27455. A_UINT32 rtt_sd;
  27456. /** RSSI information */
  27457. A_UINT32 number_rssi_samples;
  27458. /** IE length */
  27459. A_UINT32 ie_length; /* length of IE data */
  27460. } wmi_extscan_wlan_descriptor;
  27461. typedef struct {
  27462. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
  27463. /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  27464. A_UINT32 request_id;
  27465. /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  27466. A_UINT32 requestor_id;
  27467. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  27468. A_UINT32 vdev_id;
  27469. /** Request ID of the extscan operation that is currently running */
  27470. A_UINT32 extscan_request_id;
  27471. /** Requestor ID of the extscan operation that is currently running */
  27472. A_UINT32 extscan_requestor_id;
  27473. /** VDEV id(interface) of the extscan operation that is currently running */
  27474. A_UINT32 extscan_vdev_id;
  27475. /** table ID - to allow support for multiple simultaneous tables */
  27476. A_UINT32 table_id;
  27477. /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
  27478. A_UINT32 current_tstamp;
  27479. /**total number of bssids (in all pages) */
  27480. A_UINT32 total_entries;
  27481. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  27482. A_UINT32 first_entry_index;
  27483. /**number of bssids in this page */
  27484. A_UINT32 num_entries_in_page;
  27485. /** number of buckets scanned**/
  27486. A_UINT32 buckets_scanned;
  27487. /* Followed by the variable length TLVs
  27488. * wmi_extscan_wlan_descriptor bssid_list[]
  27489. * wmi_extscan_rssi_info rssi_list[]
  27490. * A_UINT8 ie_list[]
  27491. */
  27492. } wmi_extscan_cached_results_event_fixed_param;
  27493. typedef enum {
  27494. EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
  27495. EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
  27496. EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
  27497. } wmi_extscan_wlan_change_flags;
  27498. typedef struct {
  27499. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27500. /** bssid */
  27501. wmi_mac_addr bssid;
  27502. /** time stamp in milliseconds */
  27503. A_UINT32 tstamp;
  27504. /** upper RSSI limit */
  27505. A_UINT32 upper_rssi_limit;
  27506. /** lower RSSI limit */
  27507. A_UINT32 lower_rssi_limit;
  27508. /** channel */
  27509. A_UINT32 channel; /* in MHz */
  27510. /** current RSSI average */
  27511. A_UINT32 rssi_average;
  27512. /** flags - wmi_extscan_wlan_change_flags */
  27513. A_UINT32 flags;
  27514. /** length of RSSI history to follow (number of values) */
  27515. A_UINT32 num_rssi_samples;
  27516. } wmi_extscan_wlan_change_result_bssid;
  27517. typedef struct {
  27518. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
  27519. /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  27520. A_UINT32 request_id;
  27521. /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  27522. A_UINT32 requestor_id;
  27523. /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  27524. A_UINT32 vdev_id;
  27525. /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  27526. A_UINT32 config_request_id;
  27527. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  27528. A_UINT32 config_requestor_id;
  27529. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  27530. A_UINT32 config_vdev_id;
  27531. /** table ID - to allow support for multiple simultaneous tables */
  27532. A_UINT32 table_id;
  27533. /**number of entries with RSSI out of range or BSSID not detected */
  27534. A_UINT32 change_count;
  27535. /**total number of bssid signal descriptors (in all pages) */
  27536. A_UINT32 total_entries;
  27537. /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
  27538. A_UINT32 first_entry_index;
  27539. /**number of bssids signal descriptors in this page */
  27540. A_UINT32 num_entries_in_page;
  27541. /* Following this structure is the TLV:
  27542. * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[];
  27543. * (number of descriptors given by field num_entries_in_page)
  27544. * Following this structure is the list of RSSI values (each is an A_UINT8):
  27545. * A_UINT8 rssi_list[]; <-- last N RSSI values.
  27546. */
  27547. } wmi_extscan_wlan_change_results_event_fixed_param;
  27548. enum _tExtScanEntryFlags
  27549. {
  27550. WMI_HOTLIST_FLAG_NONE = 0x00,
  27551. WMI_HOTLIST_FLAG_PRESENCE = 0x01,
  27552. WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
  27553. };
  27554. typedef struct {
  27555. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  27556. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  27557. A_UINT32 config_request_id;
  27558. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  27559. A_UINT32 config_requestor_id;
  27560. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  27561. A_UINT32 config_vdev_id;
  27562. /** table ID - to allow support for multiple simultaneous tables */
  27563. A_UINT32 table_id;
  27564. /**total number of bssids (in all pages) */
  27565. A_UINT32 total_entries;
  27566. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  27567. A_UINT32 first_entry_index;
  27568. /**number of bssids in this page */
  27569. A_UINT32 num_entries_in_page;
  27570. /* Following this structure is the TLV:
  27571. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  27572. */
  27573. } wmi_extscan_hotlist_match_event_fixed_param;
  27574. typedef struct {
  27575. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  27576. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  27577. A_UINT32 config_request_id;
  27578. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  27579. A_UINT32 config_requestor_id;
  27580. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  27581. A_UINT32 config_vdev_id;
  27582. /** table ID - to allow support for multiple simultaneous tables */
  27583. A_UINT32 table_id;
  27584. /**total number of ssids (in all pages) */
  27585. A_UINT32 total_entries;
  27586. /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  27587. A_UINT32 first_entry_index;
  27588. /**number of ssids in this page */
  27589. A_UINT32 num_entries_in_page;
  27590. /* Following this structure is the TLV:
  27591. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  27592. */
  27593. } wmi_extscan_hotlist_ssid_match_event_fixed_param;
  27594. typedef struct {
  27595. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
  27596. /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  27597. A_UINT32 request_id;
  27598. /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  27599. A_UINT32 requestor_id;
  27600. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  27601. A_UINT32 vdev_id;
  27602. /** number of extscan caches */
  27603. A_UINT32 num_extscan_cache_tables;
  27604. /** number of wlan change lists */
  27605. A_UINT32 num_wlan_change_monitor_tables;
  27606. /** number of hotlists */
  27607. A_UINT32 num_hotlist_monitor_tables;
  27608. /** if one sided rtt data collection is supported */
  27609. A_UINT32 rtt_one_sided_supported;
  27610. /** if 11v data collection is supported */
  27611. A_UINT32 rtt_11v_supported;
  27612. /** if 11mc data collection is supported */
  27613. A_UINT32 rtt_ftm_supported;
  27614. /** number of extscan cache capabilities (one per table) */
  27615. A_UINT32 num_extscan_cache_capabilities;
  27616. /** number of wlan change capabilities (one per table) */
  27617. A_UINT32 num_extscan_wlan_change_capabilities;
  27618. /** number of extscan hotlist capabilities (one per table) */
  27619. A_UINT32 num_extscan_hotlist_capabilities;
  27620. /* max number of roaming ssid whitelist firmware can support */
  27621. A_UINT32 num_roam_ssid_whitelist;
  27622. /* max number of blacklist bssid firmware can support */
  27623. A_UINT32 num_roam_bssid_blacklist;
  27624. /* max number of preferred list firmware can support */
  27625. A_UINT32 num_roam_bssid_preferred_list;
  27626. /* max number of hotlist ssids firmware can support */
  27627. A_UINT32 num_extscan_hotlist_ssid;
  27628. /* max number of epno networks firmware can support */
  27629. A_UINT32 num_epno_networks;
  27630. /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
  27631. * supports multiple lists of each type.
  27632. *
  27633. * wmi_extscan_cache_capabilities extscan_cache_capabilities[] <-- capabilities of extscan cache (BSSID/RSSI lists)
  27634. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] <-- capabilities of wlan_change_monitor_tables
  27635. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] <-- capabilities of hotlist_monitor_tables
  27636. */
  27637. } wmi_extscan_capabilities_event_fixed_param;
  27638. /* WMI_D0_WOW_DISABLE_ACK_EVENTID */
  27639. typedef struct {
  27640. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
  27641. A_UINT32 reserved0; /* for future need */
  27642. } wmi_d0_wow_disable_ack_event_fixed_param;
  27643. /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
  27644. typedef struct {
  27645. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */
  27646. /** pdev_id for identifying the MAC
  27647. * See macros starting with WMI_PDEV_ID_ for values.
  27648. */
  27649. A_UINT32 pdev_id;
  27650. } wmi_pdev_resume_event_fixed_param;
  27651. /** value representing all modules */
  27652. #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
  27653. /* param definitions */
  27654. /**
  27655. * Log level for a given module. Value contains both module id and log level.
  27656. * here is the bitmap definition for value.
  27657. * module Id : 16
  27658. * Flags : reserved
  27659. * Level : 8
  27660. * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
  27661. * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
  27662. */
  27663. #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
  27664. #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \
  27665. (val) |= (lvl & 0xff); \
  27666. } while (0)
  27667. #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
  27668. #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \
  27669. (val) |= ((mid & 0xffff) << 16); \
  27670. } while (0)
  27671. #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
  27672. /**
  27673. * Enable the debug log for a given vdev. Value is vdev id
  27674. */
  27675. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
  27676. /**
  27677. * Disable the debug log for a given vdev. Value is vdev id
  27678. * All the log level for a given VDEV is disabled except the ERROR log messages
  27679. */
  27680. #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
  27681. /**
  27682. * set vdev enable bitmap. value is the vden enable bitmap
  27683. */
  27684. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
  27685. /**
  27686. * set a given log level to all the modules specified in the module bitmap.
  27687. * and set the log level for all other modules to DBGLOG_ERR.
  27688. * value: log levelt to be set.
  27689. * module_id_bitmap : identifies the modules for which the log level should be set and
  27690. * modules for which the log level should be reset to DBGLOG_ERR.
  27691. */
  27692. #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
  27693. /**
  27694. * Wow mode specific logging enablement
  27695. * Wow mode module_id_bitmap : identifies the modules for which the log level
  27696. * should be set in WOW and modules for which the log level
  27697. * should be reset to DBGLOG_MAX_LVL.
  27698. */
  27699. #define WMI_DEBUG_LOG_PARAM_WOW_MOD_ENABLE_BITMAP 0x6
  27700. #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
  27701. #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \
  27702. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
  27703. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
  27704. #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id) \
  27705. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
  27706. (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
  27707. #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \
  27708. (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
  27709. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
  27710. #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
  27711. typedef struct {
  27712. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
  27713. A_UINT32 dbg_log_param; /** param types are defined above */
  27714. A_UINT32 value;
  27715. /* The below array will follow this tlv ->fixed length module_id_bitmap[]
  27716. A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
  27717. */
  27718. } wmi_debug_log_config_cmd_fixed_param;
  27719. typedef struct {
  27720. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
  27721. A_UINT32 param; /* Reserved for future use */
  27722. /** pdev_id for identifying the MAC
  27723. * See macros starting with WMI_PDEV_ID_ for values.
  27724. */
  27725. A_UINT32 pdev_id;
  27726. } wmi_pdev_get_temperature_cmd_fixed_param;
  27727. typedef struct {
  27728. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
  27729. A_INT32 value; /* temperature value in Celcius degree */
  27730. /** pdev_id for identifying the MAC
  27731. * See macros starting with WMI_PDEV_ID_ for values.
  27732. */
  27733. A_UINT32 pdev_id;
  27734. } wmi_pdev_temperature_event_fixed_param;
  27735. typedef enum {
  27736. ANTDIV_HW_CFG_STATUS,
  27737. ANTDIV_SW_CFG_STATUS,
  27738. ANTDIV_MAX_STATUS_TYPE_NUM
  27739. } ANTDIV_STATUS_TYPE;
  27740. typedef struct {
  27741. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param */
  27742. A_UINT32 status_event_id; /* Status event ID - see ANTDIV_STATUS_TYPE */
  27743. /** pdev_id for identifying the MAC
  27744. * See macros starting with WMI_PDEV_ID_ for values.
  27745. */
  27746. A_UINT32 pdev_id;
  27747. } wmi_pdev_get_antdiv_status_cmd_fixed_param;
  27748. typedef struct {
  27749. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param */
  27750. A_UINT32 support; /* ANT DIV feature enabled or not */
  27751. A_UINT32 chain_num; /* how many chain supported */
  27752. A_UINT32 ant_num; /* how many ANT supported, 32 max */
  27753. /*
  27754. * Each entry is for a tx/rx chain, and contains a bitmap identifying
  27755. * the antennas attached to that tx/rx chain.
  27756. */
  27757. A_UINT32 selectable_ant_mask[8];
  27758. /** pdev_id for identifying the MAC
  27759. * See macros starting with WMI_PDEV_ID_ for values.
  27760. */
  27761. A_UINT32 pdev_id;
  27762. } wmi_pdev_antdiv_status_event_fixed_param;
  27763. typedef struct {
  27764. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
  27765. A_UINT32 vdev_id;
  27766. A_UINT32 enable;
  27767. A_UINT32 srv_ipv4; /* server IP */
  27768. A_UINT32 start_lsb; /* starting address assigned to client */
  27769. A_UINT32 num_client; /* number of clients we support */
  27770. } wmi_set_dhcp_server_offload_cmd_fixed_param;
  27771. typedef enum {
  27772. AP_RX_DATA_OFFLOAD = 0x00,
  27773. STA_RX_DATA_OFFLOAD = 0x01,
  27774. } wmi_ipa_offload_types;
  27775. /**
  27776. * This command is sent from WLAN host driver to firmware for
  27777. * enabling/disabling IPA data-path offload features.
  27778. *
  27779. *
  27780. * Enabling data path offload to IPA(based on host INI configuration), example:
  27781. * when STA interface comes up,
  27782. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  27783. * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  27784. *
  27785. * Disabling data path offload to IPA, example:
  27786. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  27787. * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  27788. *
  27789. *
  27790. * This command is applicable only on the PCIE LL systems
  27791. *
  27792. */
  27793. typedef struct {
  27794. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
  27795. A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
  27796. A_UINT32 vdev_id;
  27797. A_UINT32 enable; /* 1 == enable, 0 == disable */
  27798. } wmi_ipa_offload_enable_disable_cmd_fixed_param;
  27799. typedef enum {
  27800. WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
  27801. WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
  27802. WMI_LED_FLASHING_PATTERN_RESERVED = 2,
  27803. } wmi_set_led_flashing_type;
  27804. /**
  27805. 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.
  27806. Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
  27807. remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
  27808. 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
  27809. pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
  27810. High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
  27811. Zero is reached, it is skipped and moves on to the next interval.
  27812. */
  27813. typedef struct {
  27814. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
  27815. A_UINT32 pattern_id; /* pattern identifier */
  27816. A_UINT32 led_x0; /* led flashing parameter0 */
  27817. A_UINT32 led_x1; /* led flashing parameter1 */
  27818. A_UINT32 gpio_num; /* GPIO number */
  27819. } wmi_set_led_flashing_cmd_fixed_param;
  27820. /**
  27821. * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
  27822. * within small networks that do not include a local name server.
  27823. * It utilizes essentially the same programming interfaces, packet formats and operating semantics
  27824. * as the unicast DNS, and the advantage is zero configuration service while no need for central or
  27825. * global server.
  27826. * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
  27827. * by type in a specified domain using standard DNS queries.
  27828. * Here, we provide the ability to advertise the available services by responding to mDNS queries.
  27829. */
  27830. typedef struct {
  27831. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
  27832. A_UINT32 vdev_id;
  27833. A_UINT32 enable;
  27834. } wmi_mdns_offload_cmd_fixed_param;
  27835. #define WMI_MAX_MDNS_FQDN_LEN 64
  27836. #define WMI_MAX_MDNS_RESP_LEN 512
  27837. #define WMI_MDNS_FQDN_TYPE_GENERAL 0
  27838. #define WMI_MDNS_FQDN_TYPE_UNIQUE 1
  27839. typedef struct {
  27840. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
  27841. A_UINT32 vdev_id;
  27842. /** type of fqdn, general or unique */
  27843. A_UINT32 type;
  27844. /** length of fqdn */
  27845. A_UINT32 fqdn_len;
  27846. /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
  27847. * A_UINT8 fqdn_data[]; <-- fully-qualified domain name to check if match with the received queries
  27848. */
  27849. } wmi_mdns_set_fqdn_cmd_fixed_param;
  27850. typedef struct {
  27851. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
  27852. A_UINT32 vdev_id;
  27853. /** Answer Resource Record count */
  27854. A_UINT32 AR_count;
  27855. /** length of response */
  27856. A_UINT32 resp_len;
  27857. /* Following this structure is the TLV byte stream of resp data of length resp_len
  27858. * A_UINT8 resp_data[]; <-- responses consisits of Resource Records
  27859. */
  27860. } wmi_mdns_set_resp_cmd_fixed_param;
  27861. typedef struct {
  27862. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_staIP_cmd_fixed_param */
  27863. A_UINT32 vdev_id;
  27864. A_UINT32 staIP; /* IPv4 address for STA mode */
  27865. } wmi_mdns_set_staIP_cmd_fixed_param;
  27866. typedef struct {
  27867. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
  27868. A_UINT32 vdev_id;
  27869. } wmi_mdns_get_stats_cmd_fixed_param;
  27870. typedef struct {
  27871. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
  27872. A_UINT32 vdev_id;
  27873. /** curTimestamp in milliseconds */
  27874. A_UINT32 curTimestamp;
  27875. /** last received Query in milliseconds */
  27876. A_UINT32 lastQueryTimestamp;
  27877. /** last sent Response in milliseconds */
  27878. A_UINT32 lastResponseTimestamp;
  27879. /** stats of received queries */
  27880. A_UINT32 totalQueries;
  27881. /** stats of macth queries */
  27882. A_UINT32 totalMatches;
  27883. /** stats of responses */
  27884. A_UINT32 totalResponses;
  27885. /** indicate the current status of mDNS offload */
  27886. A_UINT32 status;
  27887. } wmi_mdns_stats_event_fixed_param;
  27888. /**
  27889. * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
  27890. * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
  27891. * request and create/remove connection even host is suspended.
  27892. * 3 major components are offloaded:
  27893. * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
  27894. * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
  27895. * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
  27896. * Current implementation only supports WPA2 CCMP.
  27897. */
  27898. typedef struct {
  27899. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
  27900. /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
  27901. A_UINT32 vdev_id;
  27902. /** enable/disable sap auth offload */
  27903. A_UINT32 enable;
  27904. /** sap ssid */
  27905. wmi_ssid ap_ssid;
  27906. /** authentication mode (defined above) */
  27907. A_UINT32 rsn_authmode;
  27908. /** unicast cipher set */
  27909. A_UINT32 rsn_ucastcipherset;
  27910. /** mcast/group cipher set */
  27911. A_UINT32 rsn_mcastcipherset;
  27912. /** mcast/group management frames cipher set */
  27913. A_UINT32 rsn_mcastmgmtcipherset;
  27914. /** sap channel */
  27915. A_UINT32 channel;
  27916. /** length of psk */
  27917. A_UINT32 psk_len;
  27918. /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
  27919. * A_UINT8 psk[];
  27920. */
  27921. } wmi_sap_ofl_enable_cmd_fixed_param;
  27922. typedef struct {
  27923. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
  27924. /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
  27925. A_UINT32 vdev_id;
  27926. /** aid (association id) of this station */
  27927. A_UINT32 assoc_id;
  27928. /** peer station's mac addr */
  27929. wmi_mac_addr peer_macaddr;
  27930. /** length of association request frame */
  27931. A_UINT32 data_len;
  27932. /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
  27933. * A_UINT8 bufp[];
  27934. */
  27935. } wmi_sap_ofl_add_sta_event_fixed_param;
  27936. typedef enum {
  27937. SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
  27938. SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
  27939. } wmi_sap_ofl_del_sta_flags;
  27940. typedef struct {
  27941. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
  27942. /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
  27943. A_UINT32 vdev_id;
  27944. /** aid (association id) of this station */
  27945. A_UINT32 assoc_id;
  27946. /** peer station's mac addr */
  27947. wmi_mac_addr peer_macaddr;
  27948. /** disassociation reason */
  27949. A_UINT32 reason;
  27950. /** flags - wmi_sap_ofl_del_sta_flags */
  27951. A_UINT32 flags;
  27952. } wmi_sap_ofl_del_sta_event_fixed_param;
  27953. typedef struct {
  27954. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param */
  27955. A_UINT32 vdev_id;
  27956. /* Number of client failure connection attempt */
  27957. A_UINT32 num_retry;
  27958. /* Time in milliseconds to record the client's failure connection attempts */
  27959. A_UINT32 retry_allow_time_ms;
  27960. /* Time in milliseconds to drop the connection request if client is blacklisted */
  27961. A_UINT32 blackout_time_ms;
  27962. } wmi_sap_set_blacklist_param_cmd_fixed_param;
  27963. typedef struct {
  27964. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
  27965. A_UINT32 data_len; /** length in byte of data[]. */
  27966. /** This structure is used to send REQ binary blobs
  27967. * from application/service to firmware where Host drv is pass through .
  27968. * Following this structure is the TLV:
  27969. * A_UINT8 data[]; <-- length in byte given by field data_len.
  27970. */
  27971. } wmi_apfind_cmd_param;
  27972. typedef enum apfind_event_type_e {
  27973. APFIND_MATCH_EVENT = 0,
  27974. APFIND_WAKEUP_EVENT,
  27975. } APFIND_EVENT_TYPE;
  27976. typedef struct {
  27977. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
  27978. A_UINT32 event_type; /** APFIND_EVENT_TYPE */
  27979. A_UINT32 data_len; /** length in byte of data[]. */
  27980. /** This structure is used to send event binary blobs
  27981. * from firmware to application/service and Host drv.
  27982. * Following this structure is the TLV:
  27983. * A_UINT8 data[]; <-- length in byte given by field data_len.
  27984. */
  27985. } wmi_apfind_event_hdr;
  27986. /* SAP obss detection offload types */
  27987. typedef enum {
  27988. WMI_SAP_OBSS_DETECTION_MODE_DISABLED = 0, /* fw to disable the detection */
  27989. WMI_SAP_OBSS_DETECTION_MODE_PRESENT_NOTIFY = 1, /* if the matching beacon is present, notify host immediately */
  27990. WMI_SAP_OBSS_DETECTION_MODE_ABSENT_TIMEOUT_NOTIFY = 2,/* if the matching beacon is absent for the timeout period, notify host */
  27991. } WMI_SAP_OBSS_DETECTION_MODE;
  27992. typedef struct wmi_sap_obss_detection_cfg_cmd_s {
  27993. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_cfg_cmd_fixed_param */
  27994. A_UINT32 vdev_id;
  27995. A_UINT32 detect_period_ms;
  27996. /* detect whether there is 11b ap/ibss */
  27997. A_UINT32 b_ap_detect_mode; /* refer WMI_SAP_OBSS_DETECTION_MODE */
  27998. /* detect whether there is 11b sta connected with other APs */
  27999. A_UINT32 b_sta_detect_mode;
  28000. /* detect whether there is 11g AP */
  28001. A_UINT32 g_ap_detect_mode;
  28002. /* detect whether there is legacy 11a traffic */
  28003. A_UINT32 a_detect_mode;
  28004. /* detect whether there is ap which is ht legacy mode */
  28005. A_UINT32 ht_legacy_detect_mode;
  28006. /* detect whether there is ap which is ht mixed mode : has 11b/11g sta */
  28007. A_UINT32 ht_mixed_detect_mode;
  28008. /* detect whether there is ap which has 20M only station */
  28009. A_UINT32 ht_20mhz_detect_mode;
  28010. } wmi_sap_obss_detection_cfg_cmd_fixed_param;
  28011. typedef enum {
  28012. WMI_SAP_OBSS_DETECTION_EVENT_REASON_NOT_SUPPORT = 0,
  28013. WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY,
  28014. WMI_SAP_OBSS_DETECTION_EVENT_REASON_ABSENT_TIMEOUT,
  28015. } WMI_SAP_OBSS_DETECTION_EVENT_REASON;
  28016. /* WMI_SAP_OBSS_DETECTION_MATCH_MASK is one or more of the following shift bits */
  28017. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_AP_S 0
  28018. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_STA_S 1
  28019. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11G_AP_S 2
  28020. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11A_S 3
  28021. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_LEGACY_S 4
  28022. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_MIXED_S 5
  28023. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_20MHZ_S 6
  28024. typedef struct wmi_sap_obss_detection_info_evt_s {
  28025. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_info_evt_fixed_param */
  28026. A_UINT32 vdev_id;
  28027. A_UINT32 reason; /* refer WMI_SAP_OBSS_DETECTION_EVENT_REASON */
  28028. A_UINT32 matched_detection_masks; /* bit(s) from WMI_SAP_OBSS_DETECTION_MATCH_MASK */
  28029. wmi_mac_addr matched_bssid_addr; /* valid when reason is WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY */
  28030. } wmi_sap_obss_detection_info_evt_fixed_param;
  28031. /** WMI command to enable STA FW handle bss color change notification from AP */
  28032. typedef struct {
  28033. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_bss_color_change_enable_fixed_param */
  28034. A_UINT32 vdev_id;
  28035. A_UINT32 enable;
  28036. } wmi_bss_color_change_enable_fixed_param;
  28037. typedef enum {
  28038. WMI_BSS_COLOR_COLLISION_DISABLE = 0,
  28039. WMI_BSS_COLOR_COLLISION_DETECTION,
  28040. WMI_BSS_COLOR_FREE_SLOT_TIMER_EXPIRY,
  28041. WMI_BSS_COLOR_FREE_SLOT_AVAILABLE,
  28042. } WMI_BSS_COLOR_COLLISION_EVT_TYPE;
  28043. /** Command to enable OBSS Color collision detection for both STA and AP mode */
  28044. typedef struct {
  28045. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_det_config_fixed_param */
  28046. A_UINT32 vdev_id;
  28047. A_UINT32 flags; /* proposed for future use cases */
  28048. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  28049. A_UINT32 current_bss_color;
  28050. A_UINT32 detection_period_ms; /* scan interval for both AP and STA mode */
  28051. A_UINT32 scan_period_ms; /* scan period for passive scan to detect collision */
  28052. A_UINT32 free_slot_expiry_time_ms; /* FW to notify host at timer expiry after which Host disables bss color */
  28053. } wmi_obss_color_collision_det_config_fixed_param;
  28054. /** WMI event to notify host on OBSS Color collision detection, free slot available for AP mode */
  28055. typedef struct {
  28056. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_evt_fixed_param */
  28057. A_UINT32 vdev_id;
  28058. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  28059. A_UINT32 bss_color_bitmap_bit0to31; /* Bit set indicating BSS color present */
  28060. A_UINT32 bss_color_bitmap_bit32to63; /* Bit set indicating BSS color present */
  28061. } wmi_obss_color_collision_evt_fixed_param;
  28062. /*
  28063. * WMI event to notify host if latency_flags/latency_level got changed
  28064. * or if latency got enabled/disabled.
  28065. * When latency disable is received in the beacon vendor IE and wlm
  28066. * parameters are restored, latency_enable will be zero.
  28067. * latency level and latency flags will be those of wlm params.
  28068. * Lay out of latency flags is as follows. The field is same as flags
  28069. * in wmi_wlm_config_cmd_fixed_param.
  28070. *
  28071. * |31 19| 18 | 17|16 14| 13 | 12| 11 | 10 | 9 | 8 |7 6|5 4|3 2| 1 | 0 |
  28072. * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
  28073. * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
  28074. * +------------------------------+---------------+---------+-----------------+
  28075. * | WAL | PS | Roam | Scan |
  28076. */
  28077. typedef struct {
  28078. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_latency_fixed_param */
  28079. A_UINT32 vdev_id;
  28080. A_UINT32 latency_enable;
  28081. A_UINT32 latency_level;
  28082. A_UINT32 latency_flags;
  28083. } wmi_vdev_bcn_latency_fixed_param;
  28084. /**
  28085. * OCB DCC types and structures.
  28086. */
  28087. /**
  28088. * DCC types as described in ETSI TS 102 687
  28089. * Type Format stepSize referenceValue numBits
  28090. * -------------------------------------------------------------------------
  28091. * ndlType_acPrio INTEGER (0...7) 1 number 3
  28092. * ndlType_controlLoop INTEGER (0...7) 1 0 3
  28093. * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
  28094. * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
  28095. * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
  28096. * ndlType_datarate INTEGER (0..7) Table 8 3
  28097. * ndlType_distance INTEGER (0..4095) 1 m 0 12
  28098. * ndlType_numberElements INTEGER (0..63) number 6
  28099. * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
  28100. * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
  28101. * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
  28102. * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
  28103. * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
  28104. * ndlType_timing INTEGER (0..4095) 10 ms 0 12
  28105. * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
  28106. * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
  28107. * ndlType_exponent INTEGER (0..100) 0.1 0 7
  28108. * ndlType_queueStatus Enumeration Table A.2 1
  28109. * ndlType_dccMechanism Bitset Table A.2 6
  28110. *
  28111. * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
  28112. * cannot be changed without breaking WMI compatibility.
  28113. *
  28114. * NOTE: For each of the types, one additional bit is allocated. This
  28115. * leftmost bit is used to indicate that the value is invalid. */
  28116. #define SIZE_NDLTYPE_ACPRIO (1 + 3)
  28117. #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
  28118. #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
  28119. #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
  28120. #define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
  28121. #define SIZE_NDLTYPE_DATARATE (1 + 3)
  28122. #define SIZE_NDLTYPE_DISTANCE (1 + 12)
  28123. #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
  28124. #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
  28125. #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
  28126. #define SIZE_NDLTYPE_PATHLOSS (1 + 5)
  28127. #define SIZE_NDLTYPE_RXPOWER (1 + 7)
  28128. #define SIZE_NDLTYPE_SNR (1 + 7)
  28129. #define SIZE_NDLTYPE_TIMING (1 + 12)
  28130. #define SIZE_NDLTYPE_TXPOWER (1 + 7)
  28131. #define SIZE_NDLTYPE_RATIO (1 + 7)
  28132. #define SIZE_NDLTYPE_EXPONENT (1 + 7)
  28133. #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
  28134. #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
  28135. #define SIZE_BYTE (8)
  28136. #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
  28137. #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
  28138. #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
  28139. #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
  28140. #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
  28141. #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
  28142. #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
  28143. #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
  28144. #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
  28145. #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
  28146. #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
  28147. #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
  28148. #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
  28149. #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
  28150. #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
  28151. #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
  28152. #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
  28153. #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
  28154. #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
  28155. /** The MCS_COUNT macro cannot be modified without breaking
  28156. * WMI compatibility. */
  28157. #define MCS_COUNT (8)
  28158. /** Flags for ndlType_dccMechanism. */
  28159. typedef enum {
  28160. DCC_MECHANISM_TPC = 1,
  28161. DCC_MECHANISM_TRC = 2,
  28162. DCC_MECHANISM_TDC = 4,
  28163. DCC_MECHANISM_DSC = 8,
  28164. DCC_MECHANISM_TAC = 16,
  28165. DCC_MECHANISM_RESERVED = 32,
  28166. DCC_MECHANISM_ALL = 0x3f,
  28167. } wmi_dcc_ndl_type_dcc_mechanism;
  28168. /** Values for ndlType_queueStatus. */
  28169. typedef enum {
  28170. DCC_QUEUE_CLOSED = 0,
  28171. DCC_QUEUE_OPEN = 1,
  28172. } wmi_dcc_ndl_type_queue_status;
  28173. /** For ndlType_acPrio, use the values in wmi_traffic_ac. */
  28174. /** Values for ndlType_datarate */
  28175. typedef enum {
  28176. DCC_DATARATE_3_MBPS = 0,
  28177. DCC_DATARATE_4_5_MBPS = 1,
  28178. DCC_DATARATE_6_MBPS = 2,
  28179. DCC_DATARATE_9_MBPS = 3,
  28180. DCC_DATARATE_12_MBPS = 4,
  28181. DCC_DATARATE_18_MBPS = 5,
  28182. DCC_DATARATE_24_MBPS = 6,
  28183. DCC_DATARATE_27_MBPS = 7,
  28184. } wmi_dcc_ndl_type_datarate;
  28185. /** Data structure for active state configuration. */
  28186. typedef struct {
  28187. /** TLV tag and len; tag equals
  28188. * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config */
  28189. A_UINT32 tlv_header;
  28190. /**
  28191. * NDL_asStateId, ndlType_numberElements, 1+6 bits.
  28192. * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
  28193. */
  28194. A_UINT32 state_info;
  28195. /**
  28196. * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
  28197. * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
  28198. * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
  28199. * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
  28200. */
  28201. A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
  28202. /**
  28203. * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  28204. * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  28205. * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  28206. * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  28207. */
  28208. A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  28209. /**
  28210. * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  28211. * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  28212. * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  28213. * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  28214. */
  28215. A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
  28216. /**
  28217. * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  28218. * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  28219. * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  28220. * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  28221. */
  28222. A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
  28223. /**
  28224. * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
  28225. * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
  28226. * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
  28227. * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
  28228. */
  28229. A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
  28230. } wmi_dcc_ndl_active_state_config;
  28231. #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
  28232. #define WMI_NDL_AS_STATE_ID_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
  28233. #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
  28234. #define WMI_NDL_AS_CHAN_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
  28235. #define WMI_NDL_AS_DCC_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
  28236. #define WMI_NDL_AS_DCC_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
  28237. #define WMI_NDL_AS_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  28238. #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)
  28239. #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  28240. #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)
  28241. #define WMI_NDL_AS_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  28242. #define WMI_NDL_AS_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  28243. #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
  28244. #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)
  28245. /** Data structure for EDCA/QOS parameters. */
  28246. typedef struct
  28247. {
  28248. /** TLV tag and len; tag equals
  28249. * WMITLV_TAG_STRUC_wmi_qos_parameter */
  28250. A_UINT32 tlv_header;
  28251. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  28252. A_UINT32 aifsn;
  28253. /** Contention Window minimum. Range: 1 - 10 */
  28254. A_UINT32 cwmin;
  28255. /** Contention Window maximum. Range: 1 - 10 */
  28256. A_UINT32 cwmax;
  28257. } wmi_qos_parameter;
  28258. /** Data structure for information specific to a channel. */
  28259. typedef struct {
  28260. /** TLV tag and len; tag equals
  28261. * WMITLV_TAG_STRUC_wmi_ocb_channel */
  28262. A_UINT32 tlv_header;
  28263. A_UINT32 bandwidth; /* MHz units */
  28264. wmi_mac_addr mac_address;
  28265. } wmi_ocb_channel;
  28266. /** Data structure for an element of the schedule array. */
  28267. typedef struct {
  28268. /** TLV tag and len; tag equals
  28269. * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
  28270. A_UINT32 tlv_header;
  28271. A_UINT32 channel_freq; /* MHz units */
  28272. A_UINT32 total_duration; /* ms units */
  28273. A_UINT32 guard_interval; /* ms units */
  28274. } wmi_ocb_schedule_element;
  28275. /** Data structure for OCB configuration. */
  28276. typedef struct {
  28277. /** TLV tag and len; tag equals
  28278. * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
  28279. A_UINT32 tlv_header;
  28280. /** VDEV id(interface) that is being configured */
  28281. A_UINT32 vdev_id;
  28282. A_UINT32 channel_count;
  28283. A_UINT32 schedule_size;
  28284. A_UINT32 flags;
  28285. A_UINT32 ta_max_duration; /* Max duration of continuing multichannel operation without receiving a TA frame (units = seconds) */
  28286. /** This is followed by a TLV array of wmi_channel. */
  28287. /** This is followed by a TLV array of wmi_ocb_channel. */
  28288. /** This is followed by a TLV array of wmi_qos_parameter. */
  28289. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  28290. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  28291. /** This is followed by a TLV array of wmi_ocb_schedule_element. */
  28292. } wmi_ocb_set_config_cmd_fixed_param;
  28293. /** WMI Generic hash to be used by any 6 byte or 8 byte hash
  28294. * Used for 6 byte USD Service ID
  28295. */
  28296. typedef struct _wmi_generic_hash {
  28297. /** upper 4 bytes of hash */
  28298. A_UINT32 generic_hash31to0;
  28299. /** lower 4 bytes of hash */
  28300. A_UINT32 generic_hash47to32;
  28301. } wmi_generic_hash;
  28302. typedef struct {
  28303. /** TLV tag and len; tag equals
  28304. * WMITLV_TAG_STRUC_wmi_usd_add_delete_update_service_cmd_fixed_param */
  28305. A_UINT32 tlv_header;
  28306. A_UINT32 vdev_id;
  28307. /* picks service type from WMI_USD_MODE */
  28308. A_UINT32 usd_mode;
  28309. /* element_container_attribute struct:
  28310. * A_UINT8 element_container_attr_data[element_container_attr_len] */
  28311. A_UINT32 element_container_attr_data_len;
  28312. /* 6 bytes of service id hash */
  28313. wmi_generic_hash service_id;
  28314. /* Instance ID of the service */
  28315. A_UINT32 instance_id;
  28316. /* Default frequency in MHz */
  28317. A_UINT32 default_freq;
  28318. /* length of the Service Specific Info */
  28319. A_UINT32 service_specific_info_len;
  28320. /* Time to live in seconds */
  28321. A_UINT32 time_to_live;
  28322. /* picks protocol type from WMI_USD_SERVICE_PROTOCOL_TYPE */
  28323. A_UINT32 protocol_type;
  28324. wmi_mac_addr device_mac_addr;
  28325. } wmi_usd_service_cmd_fixed_param;
  28326. typedef struct {
  28327. A_UINT32 tlv_header;
  28328. A_UINT32 vdev_id;
  28329. /* picks values from WMI_USD_MODE_STATUS */
  28330. A_UINT32 usd_mode_status;
  28331. /* Instance ID of the service */
  28332. A_UINT32 instance_id;
  28333. } wmi_usd_service_event_fixed_param;
  28334. typedef enum {
  28335. WMI_USD_MODE_FLUSH,
  28336. WMI_USD_MODE_PUBLISH,
  28337. WMI_USD_MODE_SUBSCRIBE,
  28338. WMI_USD_MODE_UPDATE_PUBLISH,
  28339. WMI_USD_MODE_CANCEL_PUBLISH,
  28340. WMI_USD_MODE_CANCEL_SUBSCRIBE,
  28341. } WMI_USD_MODE;
  28342. typedef enum {
  28343. WMI_USD_MODE_FLUSH_SUCCESS,
  28344. WMI_USD_MODE_FLUSH_FAIL,
  28345. WMI_USD_MODE_PUBLISH_SUCCESS,
  28346. WMI_USD_MODE_PUBLISH_FAIL,
  28347. WMI_USD_MODE_SUBSCRIBE_SUCCESS,
  28348. WMI_USD_MODE_SUBSCRIBE_FAIL,
  28349. WMI_USD_MODE_UPDATE_PUBLISH_SUCCESS,
  28350. WMI_USD_MODE_UPDATE_PUBLISH_FAIL,
  28351. WMI_USD_MODE_CANCEL_PUBLISH_SUCCESS,
  28352. WMI_USD_MODE_CANCEL_PUBLISH_FAIL,
  28353. WMI_USD_MODE_CANCEL_SUBSCRIBE_SUCCESS,
  28354. WMI_USD_MODE_CANCEL_SUBSCRIBE_FAIL,
  28355. } WMI_USD_MODE_STATUS;
  28356. typedef enum {
  28357. WMI_USD_SERVICE_PROTOCOL_TYPE_BONJOUR = 1,
  28358. WMI_USD_SERVICE_PROTOCOL_TYPE_GENERIC = 2,
  28359. WMI_USD_SERVICE_PROTOCOL_TYPE_CSA_MATTER = 3,
  28360. } WMI_USD_SERVICE_PROTOCOL_TYPE;
  28361. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
  28362. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
  28363. #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
  28364. /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
  28365. typedef struct {
  28366. /** TLV tag and len; tag equals
  28367. * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param */
  28368. A_UINT32 tlv_header;
  28369. /* VDEV identifier */
  28370. A_UINT32 vdev_id;
  28371. A_UINT32 status;
  28372. } wmi_ocb_set_config_resp_event_fixed_param;
  28373. /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
  28374. WMI compatibility. */
  28375. #define SIZE_UTC_TIME (10) /* The size of the utc time in bytes. */
  28376. #define SIZE_UTC_TIME_ERROR (5) /* The size of the utc time error in bytes. */
  28377. /** Data structure to set the UTC time. */
  28378. typedef struct {
  28379. /** TLV tag and len; tag equals
  28380. * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
  28381. A_UINT32 tlv_header;
  28382. /* VDEV identifier */
  28383. A_UINT32 vdev_id;
  28384. /** 10 bytes of the utc time. */
  28385. A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME,SIZE_BYTE)];
  28386. /** 5 bytes of the time error. */
  28387. A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR,SIZE_BYTE)];
  28388. } wmi_ocb_set_utc_time_cmd_fixed_param;
  28389. #define WMI_UTC_TIME_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
  28390. #define WMI_UTC_TIME_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
  28391. #define WMI_TIME_ERROR_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
  28392. #define WMI_TIME_ERROR_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
  28393. /** Data structure start the timing advertisement. The template for the
  28394. * timing advertisement frame follows this structure in the WMI command.
  28395. */
  28396. typedef struct {
  28397. /** TLV tag and len; tag equals
  28398. * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
  28399. A_UINT32 tlv_header;
  28400. /* VDEV identifier */
  28401. A_UINT32 vdev_id;
  28402. /** Number of times the TA is sent every 5 seconds. */
  28403. A_UINT32 repeat_rate;
  28404. /** The frequency on which to transmit. */
  28405. A_UINT32 channel_freq; /* MHz units */
  28406. /** The offset into the template of the timestamp. */
  28407. A_UINT32 timestamp_offset;
  28408. /** The offset into the template of the time value. */
  28409. A_UINT32 time_value_offset;
  28410. /** The length of the timing advertisement template. The
  28411. * template is in the TLV data. */
  28412. A_UINT32 timing_advert_template_length;
  28413. /** This is followed by a binary array containing the TA template. */
  28414. } wmi_ocb_start_timing_advert_cmd_fixed_param;
  28415. /** Data structure to stop the timing advertisement. */
  28416. typedef struct {
  28417. /** TLV tag and len; tag equals
  28418. * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
  28419. A_UINT32 tlv_header;
  28420. /* VDEV identifier */
  28421. A_UINT32 vdev_id;
  28422. A_UINT32 channel_freq; /* MHz units */
  28423. } wmi_ocb_stop_timing_advert_cmd_fixed_param;
  28424. /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
  28425. typedef struct {
  28426. /** TLV tag and len; tag equals
  28427. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
  28428. A_UINT32 tlv_header;
  28429. /* VDEV identifier */
  28430. A_UINT32 vdev_id;
  28431. A_UINT32 reserved;
  28432. } wmi_ocb_get_tsf_timer_cmd_fixed_param;
  28433. /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
  28434. typedef struct {
  28435. /** TLV tag and len; tag equals
  28436. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
  28437. A_UINT32 tlv_header;
  28438. /* VDEV identifier */
  28439. A_UINT32 vdev_id;
  28440. A_UINT32 tsf_timer_high;
  28441. A_UINT32 tsf_timer_low;
  28442. } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
  28443. /** Data structure for DCC stats configuration per channel. */
  28444. typedef struct {
  28445. /** TLV tag and len; tag equals
  28446. * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
  28447. A_UINT32 tlv_header;
  28448. /** The channel for which this applies, 16 bits. */
  28449. /** The dcc_stats_bitmap, 8 bits. */
  28450. A_UINT32 chan_info;
  28451. /** Demodulation model parameters. */
  28452. /**
  28453. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  28454. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  28455. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  28456. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  28457. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  28458. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  28459. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  28460. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  28461. */
  28462. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  28463. /** Communication ranges. */
  28464. /**
  28465. * tx_power, ndlType_txPower, 1+7 bits.
  28466. * datarate, ndlType_datarate, 1+3 bits.
  28467. */
  28468. A_UINT32 tx_power_datarate;
  28469. /**
  28470. * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
  28471. * NDL_estCommRange, ndlType_distance, 1+12 bits.
  28472. */
  28473. A_UINT32 carrier_sense_est_comm_range;
  28474. /** Channel load measures. */
  28475. /**
  28476. * dccSensitivity, ndlType_rxPower, 1+7 bits.
  28477. * carrierSense, ndlType_rxPower, 1+7 bits.
  28478. * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
  28479. */
  28480. A_UINT32 dcc_stats;
  28481. /**
  28482. * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
  28483. * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
  28484. */
  28485. A_UINT32 packet_stats;
  28486. /**
  28487. * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
  28488. */
  28489. A_UINT32 channel_busy_time;
  28490. /** Transmit packet statistics. */
  28491. /**
  28492. * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  28493. * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  28494. * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  28495. * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  28496. */
  28497. A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_ARRIVALRATE)];
  28498. /**
  28499. * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  28500. * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  28501. * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  28502. * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  28503. */
  28504. A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  28505. /**
  28506. * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  28507. * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  28508. * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  28509. * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  28510. */
  28511. A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_CHANNELUSE)];
  28512. /**
  28513. * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  28514. * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  28515. * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  28516. * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  28517. */
  28518. A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  28519. } wmi_dcc_ndl_stats_per_channel;
  28520. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  28521. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  28522. #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  28523. #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  28524. #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
  28525. #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
  28526. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  28527. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  28528. #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
  28529. #define WMI_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
  28530. #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
  28531. #define WMI_TX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
  28532. #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
  28533. #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
  28534. #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
  28535. #define WMI_NDL_EST_COMM_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
  28536. #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
  28537. #define WMI_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
  28538. #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
  28539. #define WMI_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
  28540. #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
  28541. #define WMI_NDL_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
  28542. #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
  28543. #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
  28544. #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
  28545. #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
  28546. #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
  28547. #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr,val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
  28548. #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)
  28549. #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)
  28550. #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)
  28551. #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)
  28552. #define WMI_NDL_TX_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  28553. #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)
  28554. #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)
  28555. #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)
  28556. /** Bitmap for DCC stats. */
  28557. typedef enum {
  28558. DCC_STATS_DEMODULATION_MODEL = 1,
  28559. DCC_STATS_COMMUNICATION_RANGES = 2,
  28560. DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
  28561. DCC_STATS_TRANSMIT_PACKET_STATS = 8,
  28562. DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
  28563. DCC_STATS_ALL = 0xff,
  28564. } wmi_dcc_stats_bitmap;
  28565. /** Data structure for getting the DCC stats. */
  28566. typedef struct {
  28567. /** TLV tag and len; tag equals
  28568. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param */
  28569. A_UINT32 tlv_header;
  28570. /* VDEV identifier */
  28571. A_UINT32 vdev_id;
  28572. /** The number of channels for which stats are being requested. */
  28573. A_UINT32 num_channels;
  28574. /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
  28575. } wmi_dcc_get_stats_cmd_fixed_param;
  28576. typedef struct {
  28577. /** TLV tag and len; tag equals
  28578. * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request */
  28579. A_UINT32 tlv_header;
  28580. /** The channel for which this applies. */
  28581. A_UINT32 chan_freq; /* MHz units */
  28582. /** The DCC stats being requested. */
  28583. A_UINT32 dcc_stats_bitmap;
  28584. } wmi_dcc_channel_stats_request;
  28585. /** Data structure for the response with the DCC stats. */
  28586. typedef struct {
  28587. /** TLV tag and len; tag equals
  28588. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param */
  28589. A_UINT32 tlv_header;
  28590. /* VDEV identifier */
  28591. A_UINT32 vdev_id;
  28592. /** Number of channels in the response. */
  28593. A_UINT32 num_channels;
  28594. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  28595. } wmi_dcc_get_stats_resp_event_fixed_param;
  28596. /** Data structure for clearing the DCC stats. */
  28597. typedef struct {
  28598. /** TLV tag and len; tag equals
  28599. * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param */
  28600. A_UINT32 tlv_header;
  28601. /* VDEV identifier */
  28602. A_UINT32 vdev_id;
  28603. A_UINT32 dcc_stats_bitmap;
  28604. } wmi_dcc_clear_stats_cmd_fixed_param;
  28605. /** Data structure for the pushed DCC stats */
  28606. typedef struct {
  28607. /** TLV tag and len; tag equals
  28608. * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param */
  28609. A_UINT32 tlv_header;
  28610. /* VDEV identifier */
  28611. A_UINT32 vdev_id;
  28612. /** The number of channels in the response. */
  28613. A_UINT32 num_channels;
  28614. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  28615. } wmi_dcc_stats_event_fixed_param;
  28616. /** Data structure for updating NDL per channel. */
  28617. typedef struct {
  28618. /** TLV tag and len; tag equals
  28619. * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan */
  28620. A_UINT32 tlv_header;
  28621. /**
  28622. * Channel frequency, 16 bits
  28623. * NDL_numActiveState, ndlType_numberElements, 1+6 bits
  28624. */
  28625. A_UINT32 chan_info;
  28626. /**
  28627. * NDL_minDccSampling, 10 bits.
  28628. * Maximum time interval between subsequent checks of the DCC rules.
  28629. */
  28630. A_UINT32 ndl_min_dcc_sampling;
  28631. /**
  28632. * dcc_enable, 1 bit.
  28633. * dcc_stats_enable, 1 bit.
  28634. * dcc_stats_interval, 16 bits.
  28635. */
  28636. A_UINT32 dcc_flags;
  28637. /** General DCC configuration. */
  28638. /**
  28639. * NDL_timeUp, ndlType_timing, 1+12 bits.
  28640. * NDL_timeDown, ndlType_timing, 1+12 bits.
  28641. */
  28642. A_UINT32 general_config;
  28643. /** Transmit power thresholds. */
  28644. /**
  28645. * NDL_minTxPower, ndlType_txPower, 1+7 bits.
  28646. * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
  28647. */
  28648. A_UINT32 min_max_tx_power; /* see "ETSI TS 102 687" table above for units */
  28649. /**
  28650. * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  28651. * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  28652. * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  28653. * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  28654. */
  28655. /* see "ETSI TS 102 687" table above for units */
  28656. A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  28657. /** Packet timing thresholds. */
  28658. /**
  28659. * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  28660. * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  28661. * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  28662. * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  28663. */
  28664. A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  28665. /**
  28666. * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
  28667. * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
  28668. */
  28669. A_UINT32 min_max_packet_interval;
  28670. /**
  28671. * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  28672. * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  28673. * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  28674. * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  28675. */
  28676. A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETINTERVAL)];
  28677. /** Packet datarate thresholds. */
  28678. /**
  28679. * NDL_minDatarate, ndlType_datarate, 1+3 bits.
  28680. * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
  28681. */
  28682. A_UINT32 min_max_datarate;
  28683. /**
  28684. * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  28685. * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  28686. * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  28687. * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  28688. */
  28689. A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_DATARATE)];
  28690. /** Receive signal thresholds. */
  28691. /**
  28692. * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
  28693. * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
  28694. * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
  28695. */
  28696. A_UINT32 min_max_def_carrier_sense;
  28697. /** Receive model parameter. */
  28698. /**
  28699. * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
  28700. * NDL_maxCsRange, ndlType_distance, 1+12 bits.
  28701. * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
  28702. */
  28703. A_UINT32 receive_model_parameter;
  28704. /**
  28705. * NDL_minSNR, ndlType_snr, 1+7 bits.
  28706. */
  28707. A_UINT32 receive_model_parameter_2;
  28708. /** Demodulation model parameters. */
  28709. /**
  28710. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  28711. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  28712. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  28713. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  28714. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  28715. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  28716. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  28717. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  28718. */
  28719. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  28720. /** Transmit model parameters. */
  28721. /**
  28722. * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  28723. * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  28724. * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  28725. * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  28726. */
  28727. A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
  28728. /**
  28729. * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  28730. * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  28731. * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  28732. * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  28733. */
  28734. A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  28735. /**
  28736. * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  28737. * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  28738. * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  28739. * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  28740. */
  28741. A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  28742. /**
  28743. * NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits.
  28744. */
  28745. A_UINT32 tm_max_channel_use;
  28746. /**
  28747. * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  28748. * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  28749. * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  28750. * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  28751. */
  28752. A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
  28753. /** Channel load thresholds. */
  28754. /**
  28755. * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
  28756. * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
  28757. */
  28758. A_UINT32 min_max_channel_load;
  28759. /** Transmit queue parameters. */
  28760. /**
  28761. * NDL_numQueue, ndlType_acPrio, 1+3 bits.
  28762. * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
  28763. * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
  28764. * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
  28765. * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
  28766. */
  28767. A_UINT32 transmit_queue_parameters;
  28768. /**
  28769. * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
  28770. * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
  28771. * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
  28772. * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
  28773. */
  28774. A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
  28775. } wmi_dcc_ndl_chan;
  28776. #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  28777. #define WMI_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  28778. #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
  28779. #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
  28780. #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
  28781. #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
  28782. #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
  28783. #define WMI_NDL_MEASURE_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
  28784. #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
  28785. #define WMI_NDL_DCC_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
  28786. #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
  28787. #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
  28788. #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
  28789. #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
  28790. #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
  28791. #define WMI_NDL_TIME_UP_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
  28792. #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
  28793. #define WMI_NDL_TIME_DOWN_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
  28794. #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
  28795. #define WMI_NDL_MIN_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
  28796. #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
  28797. #define WMI_NDL_MAX_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
  28798. #define WMI_NDL_DEF_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  28799. #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)
  28800. #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  28801. #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)
  28802. #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
  28803. #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
  28804. #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
  28805. #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
  28806. #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  28807. #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)
  28808. #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
  28809. #define WMI_NDL_MIN_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
  28810. #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
  28811. #define WMI_NDL_MAX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
  28812. #define WMI_NDL_DEF_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  28813. #define WMI_NDL_DEF_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  28814. #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
  28815. #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
  28816. #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
  28817. #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
  28818. #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
  28819. #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
  28820. #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
  28821. #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
  28822. #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
  28823. #define WMI_NDL_MAX_CS_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
  28824. #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
  28825. #define WMI_NDL_REF_PATH_LOSS_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
  28826. #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
  28827. #define WMI_NDL_MIN_SNR_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
  28828. #define WMI_NDL_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  28829. #define WMI_NDL_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  28830. #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)
  28831. #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)
  28832. #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)
  28833. #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)
  28834. #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)
  28835. #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)
  28836. #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
  28837. #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr,val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
  28838. #define WMI_NDL_TM_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  28839. #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)
  28840. #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
  28841. #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
  28842. #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
  28843. #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
  28844. #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
  28845. #define WMI_NDL_NUM_QUEUE_SET(ptr,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
  28846. #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr,acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
  28847. #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr,acprio,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
  28848. #define WMI_NDL_REF_QUEUE_LEN_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
  28849. #define WMI_NDL_REF_QUEUE_LEN_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
  28850. /** Data structure for updating the NDL. */
  28851. typedef struct {
  28852. /** TLV tag and len; tag equals
  28853. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
  28854. A_UINT32 tlv_header;
  28855. /* VDEV identifier */
  28856. A_UINT32 vdev_id;
  28857. /** The number of channels in the request. */
  28858. A_UINT32 num_channel;
  28859. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  28860. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  28861. } wmi_dcc_update_ndl_cmd_fixed_param;
  28862. typedef struct {
  28863. /** TLV tag and len; tag equals
  28864. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param */
  28865. A_UINT32 tlv_header;
  28866. /* VDEV identifier */
  28867. A_UINT32 vdev_id;
  28868. A_UINT32 status;
  28869. } wmi_dcc_update_ndl_resp_event_fixed_param;
  28870. /* Actions for TSF timestamp */
  28871. typedef enum {
  28872. TSF_TSTAMP_CAPTURE_REQ = 1,
  28873. TSF_TSTAMP_CAPTURE_RESET = 2,
  28874. TSF_TSTAMP_READ_VALUE = 3,
  28875. TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
  28876. TSF_TSTAMP_AUTO_REPORT_ENABLE = 5,
  28877. TSF_TSTAMP_AUTO_REPORT_DISABLE = 6,
  28878. TSF_TSTAMP_PERIODIC_REPORT_REQ = 5,
  28879. } wmi_tsf_tstamp_action;
  28880. typedef enum {
  28881. TSF_TSTAMP_REPORT_TTIMER = 0x1, /* bit 0: TSF Timer */
  28882. TSF_TSTAMP_REPORT_QTIMER = 0x2, /* bit 1: H/T common Timer */
  28883. } wmi_tsf_tstamp_report_flags;
  28884. #define TSF_TSTAMP_REPORT_PERIOD_MIN 1000 /* ms units */
  28885. typedef struct {
  28886. /** TLV tag and len; tag equals
  28887. * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
  28888. A_UINT32 tlv_header;
  28889. /** unique id identifying the VDEV, generated by the caller */
  28890. A_UINT32 vdev_id;
  28891. /* action type, refer to wmi_tsf_tstamp_action */
  28892. A_UINT32 tsf_action;
  28893. /*
  28894. * The below fields are valid only when tsf_action is
  28895. * TSF_TSTAMP_PERIODIC_REPORT_REQ.
  28896. */
  28897. A_UINT32 period; /* the period of report timestamp, ms units */
  28898. A_UINT32 flags; /* wmi_tsf_tstamp_report_flags */
  28899. } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
  28900. typedef struct {
  28901. /* TLV tag and len; tag equals
  28902. * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
  28903. A_UINT32 tlv_header;
  28904. /* VDEV identifier */
  28905. A_UINT32 vdev_id;
  28906. /* low 32bit of tsf */
  28907. A_UINT32 tsf_low;
  28908. /* high 32 bit of tsf */
  28909. A_UINT32 tsf_high;
  28910. /* low 32 bits of qtimer */
  28911. A_UINT32 qtimer_low;
  28912. /* high 32 bits of qtimer */
  28913. A_UINT32 qtimer_high;
  28914. /*
  28915. * tsf_id: TSF ID for the current vdev
  28916. * This field should be ignored unless the tsf_id_valid flag is set.
  28917. */
  28918. A_UINT32 tsf_id;
  28919. /*
  28920. * The mac_id and tsf_id fields should be ignored unless the
  28921. * tsf_id_valid flag is set.
  28922. */
  28923. A_UINT32 tsf_id_valid;
  28924. /*
  28925. * mac_id: MAC identifier
  28926. * This field should be ignored unless the tsf_id_valid flag is set.
  28927. */
  28928. A_UINT32 mac_id;
  28929. /*
  28930. * The original mac_id_valid field that was originally used to specify
  28931. * whether the mac_id field is valid has been repurposed to instead
  28932. * specify whether this message is a TSF report or a UL delay report.
  28933. */
  28934. union {
  28935. A_UINT32 mac_id_valid; /* original name */
  28936. /* ul_delay_or_tsf_report:
  28937. * New name for the field, reflecting its new purpose.
  28938. * ul_delay_or_tsf_report = 1 -> UL delay
  28939. * ul_delay_or_tsf_report = 0 -> TSF report
  28940. */
  28941. A_UINT32 ul_delay_or_tsf_report;
  28942. };
  28943. /* low 32 bits of wlan global tsf */
  28944. A_UINT32 wlan_global_tsf_low;
  28945. /* high 32 bits of wlan global tsf */
  28946. A_UINT32 wlan_global_tsf_high;
  28947. /* low 32 bits of tqm timer */
  28948. A_UINT32 tqm_timer_low;
  28949. /* high 32 bits of tqm timer */
  28950. A_UINT32 tqm_timer_high;
  28951. /* use tqm timer flag */
  28952. A_UINT32 use_tqm_timer;
  28953. } wmi_vdev_tsf_report_event_fixed_param;
  28954. /* ie_id values:
  28955. * 0 to 255 are used for individual IEEE802.11 Information Element types
  28956. */
  28957. #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
  28958. /* source values: */
  28959. #define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
  28960. /* band values: */
  28961. typedef enum {
  28962. WMI_SET_VDEV_IE_BAND_ALL = 0,
  28963. WMI_SET_VDEV_IE_BAND_2_4GHZ,
  28964. WMI_SET_VDEV_IE_BAND_5GHZ,
  28965. } wmi_set_vdev_ie_band;
  28966. typedef struct {
  28967. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
  28968. A_UINT32 tlv_header;
  28969. /** unique id identifying the VDEV, generated by the caller */
  28970. A_UINT32 vdev_id;
  28971. /** unique id to identify the ie_data as defined by ieee 802.11 spec */
  28972. A_UINT32 ie_id;
  28973. /** ie_len corresponds to num of bytes in ie_data[] */
  28974. A_UINT32 ie_len;
  28975. /** source of this command */
  28976. A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
  28977. /** band for this IE - se wmi_set_vdev_ie_band enum */
  28978. A_UINT32 band;
  28979. /**
  28980. * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  28981. * A_UINT8 ie_data[];
  28982. *
  28983. */
  28984. } wmi_vdev_set_ie_cmd_fixed_param;
  28985. /* DISA feature related data structures */
  28986. #define MAX_MAC_HEADER_LEN 32
  28987. typedef enum {
  28988. WMI_ENCRYPT_DECRYPT_FLAG_INVALID,
  28989. WMI_ENCRYPT = 1,
  28990. WMI_DECRYPT = 2,
  28991. } WMI_ENCRYPT_DECRYPT_FLAG;
  28992. typedef struct {
  28993. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param */
  28994. /** unique id identifying the VDEV, generated by the caller */
  28995. A_UINT32 vdev_id;
  28996. A_UINT32 key_flag; /* WMI_ENCRYPT_DECRYPT_FLAG */
  28997. A_UINT32 key_idx;
  28998. A_UINT32 key_cipher;
  28999. A_UINT32 key_len; /* units = bytes */
  29000. A_UINT32 key_txmic_len; /* units = bytes */
  29001. A_UINT32 key_rxmic_len; /* units = bytes */
  29002. /** Key: This array needs to be provided in little-endian order */
  29003. A_UINT8 key_data[WMI_MAX_KEY_LEN];
  29004. /** Packet number: This array needs to be provided in little-endian order.
  29005. * If the PN is less than 8 bytes, the PN data shall be placed into this
  29006. * pn[] array starting at byte 0, leaving the MSBs empty.
  29007. */
  29008. A_UINT8 pn[8];
  29009. /** 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
  29010. * This array needs to be provided in little-endian order.
  29011. */
  29012. A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
  29013. A_UINT32 data_len; /** Payload length, units = bytes */
  29014. /*
  29015. * Following this struct are this TLV:
  29016. * A_UINT8 data[]; <-- actual data to be encrypted,
  29017. * needs to be provided in little-endian order
  29018. */
  29019. } wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
  29020. /* This event is generated in response to WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
  29021. * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
  29022. * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
  29023. * then on receiving the tx completion for the DISA frame this WMI event
  29024. * will be delivered to HOST with the encrypted frame.
  29025. */
  29026. typedef struct {
  29027. /** TLV tag and len; tag equals
  29028. * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param */
  29029. A_UINT32 tlv_header;
  29030. /* VDEV identifier */
  29031. A_UINT32 vdev_id;
  29032. A_INT32 status; /* 0: success, -1: Failure, */
  29033. /* 802.11 header length + encrypted payload length (units = bytes) */
  29034. A_UINT32 data_length;
  29035. /*
  29036. * Following this struct is this TLV:
  29037. * A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
  29038. * 802.11 header + encrypted payload,
  29039. * provided in little-endian order
  29040. */
  29041. } wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
  29042. /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
  29043. typedef struct {
  29044. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
  29045. /** Set Preferred Channel List **/
  29046. /** # of channels to scan */
  29047. A_UINT32 num_chan;
  29048. /**
  29049. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  29050. * structure. The TLV's are:
  29051. * A_UINT32 channel_list[];
  29052. **/
  29053. } wmi_soc_set_pcl_cmd_fixed_param;
  29054. /* Values for channel_weight */
  29055. typedef enum {
  29056. WMI_PCL_WEIGHT_DISALLOW = 0,
  29057. WMI_PCL_WEIGHT_LOW = 1,
  29058. WMI_PCL_WEIGHT_MEDIUM = 2,
  29059. WMI_PCL_WEIGHT_HIGH = 3,
  29060. WMI_PCL_WEIGHT_VERY_HIGH = 4,
  29061. } wmi_pcl_chan_weight;
  29062. typedef struct {
  29063. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param */
  29064. /** Set Preferred Channel List **/
  29065. /** pdev_id for identifying the MAC
  29066. * See macros starting with WMI_PDEV_ID_ for values.
  29067. */
  29068. A_UINT32 pdev_id;
  29069. /** # of channels to scan */
  29070. A_UINT32 num_chan;
  29071. /**
  29072. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  29073. * structure. The TLV's are:
  29074. * A_UINT32 channel_weight[]; channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  29075. **/
  29076. } wmi_pdev_set_pcl_cmd_fixed_param;
  29077. /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
  29078. typedef struct {
  29079. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
  29080. /** Set Hardware Mode **/
  29081. /* Hardware Mode Index */
  29082. A_UINT32 hw_mode_index;
  29083. } wmi_soc_set_hw_mode_cmd_fixed_param;
  29084. typedef struct {
  29085. A_UINT32 tlv_header; /* TLV tag and len tag equals WMITLV_TAG_STRUC_wmi_pdev_band_to_mac */
  29086. /** pdev_id for identifying the MAC
  29087. * See macros starting with WMI_PDEV_ID_ for values.
  29088. */
  29089. A_UINT32 pdev_id;
  29090. /* start frequency in MHz */
  29091. A_UINT32 start_freq;
  29092. /* end frequency in MHz */
  29093. A_UINT32 end_freq;
  29094. } wmi_pdev_band_to_mac;
  29095. typedef struct {
  29096. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param */
  29097. /** Set Hardware Mode **/
  29098. /** pdev_id for identifying the MAC
  29099. * See macros starting with WMI_PDEV_ID_ for values.
  29100. */
  29101. A_UINT32 pdev_id;
  29102. /* Hardware Mode Index */
  29103. A_UINT32 hw_mode_index;
  29104. /* Number of band to mac TLVs */
  29105. A_UINT32 num_band_to_mac;
  29106. /* Followed by TLVs of type
  29107. * num_band_to_mac * wmi_pdev_band_to_mac.
  29108. */
  29109. } wmi_pdev_set_hw_mode_cmd_fixed_param;
  29110. /* DEPRECATED - use wmi_pdev_set_dual_mac_config_cmd_fixed_param instead */
  29111. typedef struct {
  29112. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param */
  29113. /** Set Dual MAC Firmware Configuration **/
  29114. /* Concurrent scan configuration bits */
  29115. A_UINT32 concurrent_scan_config_bits;
  29116. /* Firmware mode configuration bits */
  29117. A_UINT32 fw_mode_config_bits;
  29118. } wmi_soc_set_dual_mac_config_cmd_fixed_param;
  29119. typedef struct {
  29120. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param */
  29121. /** Set Dual MAC Firmware Configuration **/
  29122. /** pdev_id for identifying the MAC
  29123. * See macros starting with WMI_PDEV_ID_ for values.
  29124. */
  29125. A_UINT32 pdev_id;
  29126. /* Concurrent scan configuration bits */
  29127. A_UINT32 concurrent_scan_config_bits;
  29128. /* Firmware mode configuration bits */
  29129. A_UINT32 fw_mode_config_bits;
  29130. } wmi_pdev_set_mac_config_cmd_fixed_param;
  29131. typedef struct { /* DEPRECATED */
  29132. A_UINT32 num_tx_chains;
  29133. A_UINT32 num_rx_chains;
  29134. A_UINT32 reserved[2];
  29135. } soc_num_tx_rx_chains;
  29136. typedef struct {
  29137. A_UINT32 num_tx_chains_2g;
  29138. A_UINT32 num_rx_chains_2g;
  29139. A_UINT32 num_tx_chains_5g;
  29140. A_UINT32 num_rx_chains_5g;
  29141. } band_num_tx_rx_chains;
  29142. typedef union { /* DEPRECATED */
  29143. soc_num_tx_rx_chains soc_txrx_chain_setting;
  29144. band_num_tx_rx_chains band_txrx_chain_setting;
  29145. } antenna_num_tx_rx_chains;
  29146. typedef enum {
  29147. ANTENNA_MODE_DISABLED = 0x0,
  29148. ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
  29149. /* reserved */
  29150. } antenna_mode_reason;
  29151. /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
  29152. typedef struct {
  29153. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param */
  29154. /* the reason for setting antenna mode, refer antenna_mode_reason */
  29155. A_UINT32 reason;
  29156. /*
  29157. * The above reason parameter will select whether the following union
  29158. * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
  29159. */
  29160. antenna_num_tx_rx_chains num_txrx_chains_setting;
  29161. } wmi_soc_set_antenna_mode_cmd_fixed_param;
  29162. typedef struct {
  29163. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param */
  29164. /** pdev_id for identifying the MAC
  29165. * See macros starting with WMI_PDEV_ID_ for values.
  29166. */
  29167. A_UINT32 pdev_id;
  29168. /* Bits 0-15 is the number of RX chains and 16-31 is the number of TX chains */
  29169. A_UINT32 num_txrx_chains;
  29170. } wmi_pdev_set_antenna_mode_cmd_fixed_param;
  29171. /** Data structure for information specific to a VDEV to MAC mapping. */
  29172. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
  29173. typedef struct {
  29174. /** TLV tag and len; tag equals
  29175. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
  29176. A_UINT32 tlv_header;
  29177. A_UINT32 vdev_id; /* VDEV ID */
  29178. A_UINT32 mac_id; /* MAC ID */
  29179. } wmi_soc_set_hw_mode_response_vdev_mac_entry;
  29180. /** Data structure for information specific to a VDEV to MAC mapping. */
  29181. typedef struct {
  29182. /** TLV tag and len; tag equals
  29183. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
  29184. A_UINT32 tlv_header;
  29185. /** pdev_id for identifying the MAC
  29186. * See macros starting with WMI_PDEV_ID_ for values.
  29187. */
  29188. A_UINT32 pdev_id;
  29189. A_UINT32 vdev_id;
  29190. } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
  29191. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
  29192. typedef struct {
  29193. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
  29194. /** Set Hardware Mode Response Event **/
  29195. /* Status of set_hw_mode command */
  29196. /*
  29197. * Values for Status:
  29198. * 0 - OK; command successful
  29199. * 1 - EINVAL; Requested invalid hw_mode
  29200. * 2 - ECANCELED; HW mode change canceled
  29201. * 3 - ENOTSUP; HW mode not supported
  29202. * 4 - EHARDWARE; HW mode change prevented by hardware
  29203. * 5 - EPENDING; HW mode change is pending
  29204. * 6 - ECOEX; HW mode change conflict with Coex
  29205. */
  29206. A_UINT32 status;
  29207. /* Configured Hardware Mode */
  29208. A_UINT32 cfgd_hw_mode_index;
  29209. /* Number of Vdev to Mac entries */
  29210. A_UINT32 num_vdev_mac_entries;
  29211. /**
  29212. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  29213. * structure. The TLV's are:
  29214. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  29215. */
  29216. } wmi_soc_set_hw_mode_response_event_fixed_param;
  29217. typedef struct {
  29218. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param */
  29219. /** Set Hardware Mode Response Event **/
  29220. /** pdev_id for identifying the MAC
  29221. * See macros starting with WMI_PDEV_ID_ for values.
  29222. */
  29223. A_UINT32 pdev_id;
  29224. /* Status of set_hw_mode command */
  29225. /*
  29226. * Values for Status:
  29227. * 0 - OK; command successful
  29228. * 1 - EINVAL; Requested invalid hw_mode
  29229. * 2 - ECANCELED; HW mode change canceled
  29230. * 3 - ENOTSUP; HW mode not supported
  29231. * 4 - EHARDWARE; HW mode change prevented by hardware
  29232. * 5 - EPENDING; HW mode change is pending
  29233. * 6 - ECOEX; HW mode change conflict with Coex
  29234. */
  29235. A_UINT32 status;
  29236. /* Configured Hardware Mode */
  29237. A_UINT32 cfgd_hw_mode_index;
  29238. /* Number of Vdev to Mac entries */
  29239. A_UINT32 num_vdev_mac_entries;
  29240. /**
  29241. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  29242. * structure. The TLV's are:
  29243. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  29244. */
  29245. } wmi_pdev_set_hw_mode_response_event_fixed_param;
  29246. /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
  29247. typedef struct {
  29248. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
  29249. /** Hardware Mode Transition Event **/
  29250. /* Original or old Hardware mode */
  29251. A_UINT32 old_hw_mode_index;
  29252. /* New Hardware Mode */
  29253. A_UINT32 new_hw_mode_index;
  29254. /* Number of Vdev to Mac entries */
  29255. A_UINT32 num_vdev_mac_entries;
  29256. /**
  29257. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  29258. * structure. The TLV's are:
  29259. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  29260. */
  29261. } wmi_soc_hw_mode_transition_event_fixed_param;
  29262. typedef struct {
  29263. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param */
  29264. /** Hardware Mode Transition Event **/
  29265. /** pdev_id for identifying the MAC
  29266. * See macros starting with WMI_PDEV_ID_ for values.
  29267. */
  29268. A_UINT32 pdev_id;
  29269. /* Original or old Hardware mode */
  29270. A_UINT32 old_hw_mode_index;
  29271. /* New Hardware Mode */
  29272. A_UINT32 new_hw_mode_index;
  29273. /* Number of Vdev to Mac entries */
  29274. A_UINT32 num_vdev_mac_entries;
  29275. /**
  29276. * TLV (tag length value) parameters follow the pdev_set_hw_mode_response_event
  29277. * structure. The TLV's are:
  29278. * wmi_pdev_set_hw_mode_response_vdev_mac_entry
  29279. * wmi_pdev_set_hw_mode_response_vdev_mac_mapping[];
  29280. * wmi_pdev_band_to_mac mac_freq_mapping[];
  29281. */
  29282. } wmi_pdev_hw_mode_transition_event_fixed_param;
  29283. /**
  29284. * This command is sent from WLAN host driver to firmware for
  29285. * plugging in reorder queue desc to lithium hw.
  29286. *
  29287. * Example: plug-in queue desc for TID 5
  29288. * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  29289. * (vdev_id = PEER vdev id,
  29290. * peer_macaddr = PEER mac addr,
  29291. * tid = 5,
  29292. * queue_ptr_lo = queue desc addr lower 32 bits,
  29293. * queue_ptr_hi = queue desc addr higher 32 bits,
  29294. * queue_no = 16-bit number assigned by host for queue,
  29295. * stored in bits 15:0 of queue_no field)
  29296. */
  29297. typedef struct {
  29298. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param */
  29299. A_UINT32 vdev_id;
  29300. wmi_mac_addr peer_macaddr; /* peer mac address */
  29301. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  29302. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc address */
  29303. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc address */
  29304. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  29305. stored in bits 15:0 of queue_no field */
  29306. A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
  29307. * 0 = Invalid, 1 = Valid */
  29308. A_UINT32 ba_window_size; /* Valid values: 0 to 256
  29309. * Host sends the message when BA session is
  29310. * established or terminated for the TID. */
  29311. } wmi_peer_reorder_queue_setup_cmd_fixed_param;
  29312. typedef struct {
  29313. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_per_reorder_q_setup_params_t */
  29314. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  29315. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc address */
  29316. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc address */
  29317. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  29318. * stored in bits 15:0 of queue_no field */
  29319. A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
  29320. * 0 = Invalid, 1 = Valid */
  29321. A_UINT32 ba_window_size; /* Valid values: 0 to 256
  29322. * Host sends the message when BA session is
  29323. * established or terminated for the TID. */
  29324. } wmi_peer_per_reorder_q_setup_params_t;
  29325. /**
  29326. * This command is sent from WLAN host driver to firmware for
  29327. * plugging in reorder queue desc to hw for multiple TIDs in one shot.
  29328. *
  29329. * Example: plug-in queue desc
  29330. * host->target: WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID,
  29331. * (vdev_id = PEER vdev id,
  29332. * peer_macaddr = PEER mac addr)
  29333. */
  29334. typedef struct {
  29335. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param */
  29336. A_UINT32 vdev_id;
  29337. wmi_mac_addr peer_macaddr; /* peer mac address */
  29338. /*
  29339. * This struct is followed by other TLVs:
  29340. * wmi_peer_per_reorder_q_setup_params_t q_setup_params[num_queues];
  29341. */
  29342. } wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param;
  29343. /**
  29344. * This command is sent from WLAN host driver to firmware for
  29345. * removing one or more reorder queue desc to lithium hw.
  29346. *
  29347. * Example: remove queue desc for all TIDs
  29348. * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
  29349. * (vdev_id = PEER vdev id,
  29350. * peer_macaddr = PEER mac addr,
  29351. * tid = 0x1FFFF,
  29352. */
  29353. typedef struct {
  29354. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param */
  29355. A_UINT32 vdev_id;
  29356. wmi_mac_addr peer_macaddr; /* peer mac address */
  29357. A_UINT32 tid_mask; /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
  29358. } wmi_peer_reorder_queue_remove_cmd_fixed_param;
  29359. /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param instead */
  29360. typedef struct {
  29361. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param */
  29362. /** Set Dual MAC Config Response Event **/
  29363. /* Status for set_dual_mac_config command */
  29364. /*
  29365. * Values for Status:
  29366. * 0 - OK; command successful
  29367. * 1 - EINVAL; Requested invalid hw_mode
  29368. * 3 - ENOTSUP; HW mode not supported
  29369. * 4 - EHARDWARE; HW mode change prevented by hardware
  29370. * 6 - ECOEX; HW mode change conflict with Coex
  29371. */
  29372. A_UINT32 status;
  29373. } wmi_soc_set_dual_mac_config_response_event_fixed_param;
  29374. typedef struct {
  29375. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param */
  29376. /** Set Dual MAC Config Response Event **/
  29377. /** pdev_id for identifying the MAC
  29378. * See macros starting with WMI_PDEV_ID_ for values.
  29379. */
  29380. A_UINT32 pdev_id;
  29381. /* Status for set_dual_mac_config command */
  29382. /*
  29383. * Values for Status:
  29384. * 0 - OK; command successful
  29385. * 1 - EINVAL; Requested invalid hw_mode
  29386. * 3 - ENOTSUP; HW mode not supported
  29387. * 4 - EHARDWARE; HW mode change prevented by hardware
  29388. * 6 - ECOEX; HW mode change conflict with Coex
  29389. */
  29390. A_UINT32 status;
  29391. } wmi_pdev_set_mac_config_response_event_fixed_param;
  29392. typedef enum {
  29393. MAWC_MOTION_STATE_UNKNOWN,
  29394. MAWC_MOTION_STATE_STATIONARY,
  29395. MAWC_MOTION_STATE_WALK,
  29396. MAWC_MOTION_STATE_TRANSIT,
  29397. } MAWC_MOTION_STATE;
  29398. typedef enum {
  29399. MAWC_SENSOR_STATUS_OK,
  29400. MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
  29401. MAWC_SENSOR_STATUS_SHUTDOWN,
  29402. } MAWC_SENSOR_STATUS;
  29403. typedef struct {
  29404. /* TLV tag and len; tag equals
  29405. * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
  29406. A_UINT32 tlv_header;
  29407. /** new motion state, MAWC_MOTION_STATE */
  29408. A_UINT32 motion_state;
  29409. /** status code of sensor, MAWC_SENSOR_STATUS */
  29410. A_UINT32 sensor_status;
  29411. } wmi_mawc_sensor_report_ind_cmd_fixed_param;
  29412. /* MBO flag field definition */
  29413. /* Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
  29414. * 1 - Allow to connect to MBO AP only
  29415. * Bit 1-31 : reserved.
  29416. */
  29417. #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
  29418. typedef struct {
  29419. /* TLV tag and len; tag equals
  29420. * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param */
  29421. A_UINT32 tlv_header;
  29422. /** vdev id */
  29423. A_UINT32 vdev_id;
  29424. /** enable or disable MBO */
  29425. A_UINT32 enable;
  29426. /** MBO flags, refer to definition of MBO flags*/
  29427. A_UINT32 flags;
  29428. } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
  29429. typedef struct {
  29430. /* TLV tag and len; tag equals
  29431. * WMITLV_TAG_ARRAY_STRUC */
  29432. A_UINT32 tlv_header;
  29433. /** Current operating class number */
  29434. A_UINT32 cur_op_class;
  29435. /** Country string of current reg domain,
  29436. * the expected value should be same as country str defined
  29437. * in country IE.
  29438. * 3 octets (COUNTRY_STR) + 1 octet (always 0)
  29439. * The ordering of this array must be maintained,
  29440. * even when a big-endian host's WMI messages undergo
  29441. * automatic byte reordering for conversion to the
  29442. * little-endian ordering required by the target.
  29443. * On big-endian hosts, this array may need to be byte-swapped
  29444. * by the host, so the subsequent automatic byte-swap
  29445. * will result in the correct final byte order.
  29446. * global operating class: set country_str[0]=0
  29447. */
  29448. A_UINT8 country_str[4];
  29449. /** Supported operating class number in current regdomain */
  29450. A_UINT32 supp_op_class_num;
  29451. /* The TLVs will follow. */
  29452. /* A_UINT32 supp_op_class_list[] */
  29453. } wmi_supported_operating_class_param;
  29454. typedef struct {
  29455. /* TLV tag and len; tag equals
  29456. * WMITLV_TAG_ARRAY_STRUC */
  29457. A_UINT32 tlv_header;
  29458. /** non preferred channel attribute length */
  29459. A_UINT32 non_prefer_ch_attr_len;
  29460. /* The TLVs will follow. */
  29461. /** A_UINT8 non_prefer_ch_attr[];*/
  29462. } wmi_mbo_non_preferred_channel_report_param;
  29463. typedef struct {
  29464. /* TLV tag and len; tag equals
  29465. * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
  29466. A_UINT32 tlv_header;
  29467. /* enable(1) or disable(0) */
  29468. A_UINT32 enable;
  29469. } wmi_mawc_enable_sensor_event_fixed_param;
  29470. typedef struct {
  29471. /* TLV tag and len; tag equals
  29472. * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
  29473. A_UINT32 tlv_header;
  29474. /* Unique id identifying the VDEV */
  29475. A_UINT32 vdev_id;
  29476. /* enable(1) or disable(0) MAWC */
  29477. A_UINT32 enable;
  29478. /* ratio of skipping suppressing scan, skip one out of x */
  29479. A_UINT32 suppress_ratio;
  29480. } wmi_extscan_configure_mawc_cmd_fixed_param;
  29481. typedef struct {
  29482. /* TLV tag and len; tag equals
  29483. * WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param */
  29484. A_UINT32 tlv_header;
  29485. /* Unique id identifying the VDEV */
  29486. A_UINT32 vdev_id;
  29487. /* enable(1) or disable(0) packet error rate trigger for roaming */
  29488. A_UINT32 enable;
  29489. /* high_rate_thresh, low_rate_thresh, pkt_err_rate_thresh_pct:
  29490. * If PER monitoring as a trigger for roaming is enabled,
  29491. * it is controlled by high_rate_thresh, low_rate_thresh, and
  29492. * pkt_err_rate_thresh_pct.
  29493. * PER monitoring is performed only when the time-averaged throughput
  29494. * is less than high_rate_thresh.
  29495. * During PER monitoring, the target keeps track of the PHY rate for
  29496. * each of the first N PPDUs within a time window.
  29497. * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
  29498. * N * pkt_err_rate_thresh_pct / 100, roaming will be triggered.
  29499. *
  29500. * This PER monitoring as a trigger for roaming is performed
  29501. * concurrently but independently for rx and tx.
  29502. */
  29503. A_UINT32 high_rate_thresh; /* units = Kbps */
  29504. A_UINT32 low_rate_thresh; /* units = Kbps */
  29505. A_UINT32 pkt_err_rate_thresh_pct;
  29506. /*
  29507. * rest time after associating to a new AP before
  29508. * starting to monitor PER as a roaming trigger,
  29509. * (units are seconds)
  29510. */
  29511. A_UINT32 per_rest_time;
  29512. /* This is the total time for which PER monitoring will be run.
  29513. * After completion of time windows, the average PER over the window
  29514. * will be computed.
  29515. * The parameter value stores specifications for both TX and RX
  29516. * monitor times.
  29517. * The two least-significant bytes (0 & 1) hold the RX monitor time;
  29518. * the two most-significant bytes (2 & 3) hold the TX monitor time.
  29519. */
  29520. A_UINT32 pkt_err_rate_mon_time; /* units = seconds */
  29521. /* Minimum roamable AP RSSI for candidate selection for PER based roam */
  29522. A_INT32 min_candidate_rssi; /* units = dBm */
  29523. } wmi_roam_per_config_fixed_param;
  29524. typedef struct {
  29525. /* TLV tag and len; tag equals
  29526. * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
  29527. A_UINT32 tlv_header;
  29528. /* Unique id identifying the VDEV */
  29529. A_UINT32 vdev_id;
  29530. /* enable(1) or disable(0) MAWC */
  29531. A_UINT32 enable;
  29532. /* ratio of exponential backoff, next = current + current*ratio/100 */
  29533. A_UINT32 exp_backoff_ratio;
  29534. /* initial scan interval(msec) */
  29535. A_UINT32 init_scan_interval;
  29536. /* max scan interval(msec) */
  29537. A_UINT32 max_scan_interval;
  29538. } wmi_nlo_configure_mawc_cmd_fixed_param;
  29539. typedef struct {
  29540. /* TLV tag and len; tag equals
  29541. * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
  29542. A_UINT32 tlv_header;
  29543. /* Unique id identifying the VDEV */
  29544. A_UINT32 vdev_id;
  29545. /* enable(1) or disable(0) MAWC */
  29546. A_UINT32 enable;
  29547. /* data traffic load (kBps) to register CMC */
  29548. A_UINT32 traffic_load_threshold;
  29549. /* RSSI threshold (dBm) to scan for Best AP */
  29550. A_UINT32 best_ap_rssi_threshold;
  29551. /* high RSSI threshold adjustment in Stationary to suppress scan */
  29552. A_UINT32 rssi_stationary_high_adjust;
  29553. /* low RSSI threshold adjustment in Stationary to suppress scan */
  29554. A_UINT32 rssi_stationary_low_adjust;
  29555. } wmi_roam_configure_mawc_cmd_fixed_param;
  29556. #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
  29557. #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
  29558. typedef enum {
  29559. PACKET_FILTER_TYPE_INVALID = 0,
  29560. PACKET_FILTER_TYPE_FILTER_PKT,
  29561. PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
  29562. PACKET_FILTER_TYPE_MAX_ENUM_SIZE
  29563. } WMI_PACKET_FILTER_FILTER_TYPE;
  29564. typedef enum {
  29565. PACKET_FILTER_PROTO_TYPE_INVALID = 0,
  29566. /* L2 header */
  29567. PACKET_FILTER_PROTO_TYPE_MAC,
  29568. PACKET_FILTER_PROTO_TYPE_SNAP,
  29569. /* L3 header (EtherType) */
  29570. PACKET_FILTER_PROTO_TYPE_IPV4,
  29571. PACKET_FILTER_PROTO_TYPE_IPV6,
  29572. /* L4 header (IP protocol) */
  29573. PACKET_FILTER_PROTO_TYPE_UDP,
  29574. PACKET_FILTER_PROTO_TYPE_TCP,
  29575. PACKET_FILTER_PROTO_TYPE_ICMPV6,
  29576. PACKET_FILTER_PROTO_TYPE_MAX
  29577. } WMI_PACKET_FILTER_PROTO_TYPE;
  29578. typedef enum {
  29579. PACKET_FILTER_CMP_TYPE_INVALID = 0,
  29580. PACKET_FILTER_CMP_TYPE_EQUAL,
  29581. PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
  29582. PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
  29583. PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  29584. PACKET_FILTER_CMP_TYPE_ADDRTYPE,
  29585. PACKET_FILTER_CMP_TYPE_MAX
  29586. } WMI_PACKET_FILTER_CMP_TYPE;
  29587. typedef enum {
  29588. PACKET_FILTER_SET_INACTIVE = 0,
  29589. PACKET_FILTER_SET_ACTIVE
  29590. } WMI_PACKET_FILTER_ACTION;
  29591. typedef enum {
  29592. PACKET_FILTER_SET_DISABLE = 0,
  29593. PACKET_FILTER_SET_ENABLE
  29594. } WMI_PACKET_FILTER_RUNTIME_ENABLE;
  29595. typedef struct {
  29596. A_UINT32 proto_type;
  29597. A_UINT32 cmp_type;
  29598. A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
  29599. A_UINT32 data_offset; /* from start of the respective frame header (units = bytes) */
  29600. A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
  29601. A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
  29602. } WMI_PACKET_FILTER_PARAMS_TYPE;
  29603. typedef struct {
  29604. A_UINT32 tlv_header;
  29605. A_UINT32 vdev_id;
  29606. A_UINT32 filter_id;
  29607. A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
  29608. A_UINT32 filter_type;
  29609. A_UINT32 num_params; /* how many entries in paramsData are valid */
  29610. A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
  29611. WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
  29612. /* deprecated0:
  29613. * This field simply provides filler space to retain the original message
  29614. * format while reducing WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER
  29615. * from 10 to 5.
  29616. */
  29617. WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
  29618. } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
  29619. /* enable / disable all filters within the specified vdev */
  29620. typedef struct {
  29621. A_UINT32 tlv_header;
  29622. A_UINT32 vdev_id;
  29623. A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
  29624. } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
  29625. #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
  29626. #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
  29627. #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
  29628. WMI_SET_BITS(tcp_flag_u32, \
  29629. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  29630. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
  29631. tcp_flag_values)
  29632. #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
  29633. WMI_GET_BITS(tcp_flag_u32, \
  29634. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  29635. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
  29636. #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
  29637. #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
  29638. #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
  29639. WMI_SET_BITS(tcp_flag_u32, \
  29640. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  29641. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
  29642. tcp_flags_mask)
  29643. #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
  29644. WMI_GET_BITS(tcp_flag_u32, \
  29645. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  29646. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
  29647. typedef struct {
  29648. A_UINT32 tlv_header;
  29649. /**
  29650. * @brief lro_enable - indicates whether lro is enabled
  29651. * [0] LRO Enable
  29652. */
  29653. A_UINT32 lro_enable;
  29654. /**
  29655. * @brief tcp_flag_u32 - mask of which TCP flags to check and
  29656. * values to check for
  29657. * [8:0] TCP flag values - If the TCP flags from the packet do not match
  29658. * the values in this field after masking with TCP flags mask below,
  29659. * LRO eligible will not be set
  29660. * [17:9] TCP flags mask - Mask field for comparing the TCP values
  29661. * provided above with the TCP flags field in the received packet
  29662. * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
  29663. * macros to isolate the mask field and values field that are packed
  29664. * into this u32 "word".
  29665. */
  29666. A_UINT32 tcp_flag_u32;
  29667. /**
  29668. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29669. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29670. * bytes 0 to 3
  29671. *
  29672. * In this and all the below toeplitz_hash fields, the bytes are
  29673. * specified in little-endian order. For example:
  29674. * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
  29675. * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
  29676. * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
  29677. * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
  29678. */
  29679. A_UINT32 toeplitz_hash_ipv4_0_3;
  29680. /**
  29681. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29682. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29683. * bytes 4 to 7
  29684. */
  29685. A_UINT32 toeplitz_hash_ipv4_4_7;
  29686. /**
  29687. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29688. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29689. * bytes 8 to 11
  29690. */
  29691. A_UINT32 toeplitz_hash_ipv4_8_11;
  29692. /**
  29693. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29694. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29695. * bytes 12 to 15
  29696. */
  29697. A_UINT32 toeplitz_hash_ipv4_12_15;
  29698. /**
  29699. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29700. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29701. * byte 16
  29702. */
  29703. A_UINT32 toeplitz_hash_ipv4_16;
  29704. /**
  29705. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29706. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29707. * bytes 0 to 3
  29708. */
  29709. A_UINT32 toeplitz_hash_ipv6_0_3;
  29710. /**
  29711. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29712. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29713. * bytes 4 to 7
  29714. */
  29715. A_UINT32 toeplitz_hash_ipv6_4_7;
  29716. /**
  29717. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29718. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29719. * bytes 8 to 11
  29720. */
  29721. A_UINT32 toeplitz_hash_ipv6_8_11;
  29722. /**
  29723. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29724. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29725. * bytes 12 to 15
  29726. */
  29727. A_UINT32 toeplitz_hash_ipv6_12_15;
  29728. /**
  29729. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29730. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29731. * bytes 16 to 19
  29732. */
  29733. A_UINT32 toeplitz_hash_ipv6_16_19;
  29734. /**
  29735. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29736. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29737. * bytes 20 to 22
  29738. */
  29739. A_UINT32 toeplitz_hash_ipv6_20_23;
  29740. /**
  29741. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29742. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29743. * bytes 24 to 27
  29744. */
  29745. A_UINT32 toeplitz_hash_ipv6_24_27;
  29746. /**
  29747. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29748. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29749. * bytes 28 to 31
  29750. */
  29751. A_UINT32 toeplitz_hash_ipv6_28_31;
  29752. /**
  29753. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29754. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29755. * bytes 32 to 35
  29756. */
  29757. A_UINT32 toeplitz_hash_ipv6_32_35;
  29758. /**
  29759. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29760. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29761. * bytes 36 to 39
  29762. */
  29763. A_UINT32 toeplitz_hash_ipv6_36_39;
  29764. /**
  29765. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29766. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29767. * byte 40
  29768. */
  29769. A_UINT32 toeplitz_hash_ipv6_40;
  29770. /**
  29771. * @brief pdev_id - identifies the MAC
  29772. * See macros starting with WMI_PDEV_ID_ for values.
  29773. */
  29774. A_UINT32 pdev_id;
  29775. } wmi_lro_info_cmd_fixed_param;
  29776. typedef struct {
  29777. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param */
  29778. A_UINT32 offset; /* flash offset to write, starting from 0 */
  29779. A_UINT32 length; /* valid data length in buffer, unit: byte */
  29780. } wmi_transfer_data_to_flash_cmd_fixed_param;
  29781. typedef struct {
  29782. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param */
  29783. /** Return status. 0 for success, non-zero otherwise */
  29784. A_UINT32 status;
  29785. } wmi_transfer_data_to_flash_complete_event_fixed_param;
  29786. typedef struct {
  29787. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param */
  29788. A_UINT32 offset; /* flash offset to read, starting from 0 */
  29789. A_UINT32 length; /* data length to read, unit: byte */
  29790. } wmi_read_data_from_flash_cmd_fixed_param;
  29791. typedef struct {
  29792. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param */
  29793. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  29794. A_UINT32 offset; /* flash offset reading from, starting from 0 */
  29795. A_UINT32 length; /* length of data being reported, unit: byte */
  29796. } wmi_read_data_from_flash_event_fixed_param;
  29797. typedef enum {
  29798. ENHANCED_MCAST_FILTER_DISABLED,
  29799. ENHANCED_MCAST_FILTER_ENABLED
  29800. } ENHANCED_MCAST_FILTER_CONFIG;
  29801. /*
  29802. * Command to enable/disable filtering of multicast IP with unicast mac
  29803. */
  29804. typedef struct {
  29805. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param */
  29806. /* Unique id identifying the VDEV */
  29807. A_UINT32 vdev_id;
  29808. /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
  29809. A_UINT32 enable;
  29810. } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
  29811. typedef struct {
  29812. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param */
  29813. A_UINT32 tlv_header;
  29814. /** unique id identifying the VDEV, generated by the caller */
  29815. A_UINT32 vdev_id;
  29816. /** WISA enable / disable mode */
  29817. A_UINT32 wisa_mode;
  29818. } wmi_vdev_wisa_cmd_fixed_param;
  29819. /*
  29820. * This structure is used to report SMPS force mode set complete to host.
  29821. */
  29822. typedef struct {
  29823. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param */
  29824. /* Unique id identifying the VDEV */
  29825. A_UINT32 vdev_id;
  29826. /* Return status. 0 for success, non-zero otherwise */
  29827. A_UINT32 status;
  29828. } wmi_sta_smps_force_mode_complete_event_fixed_param;
  29829. /*
  29830. * This structure is used to report SCPC calibrated data to host.
  29831. */
  29832. typedef struct {
  29833. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param */
  29834. /** number of BDF patches. Each patch contains offset, length and data */
  29835. A_UINT32 num_patch;
  29836. /* This TLV is followed by another TLV of array of bytes
  29837. * A_UINT8 data[];
  29838. * This data array contains, for example
  29839. * patch1 offset(byte3~0), patch1 data length(byte7~4), patch1 data(byte11~8)
  29840. * patch2 offset(byte15~12), patch2 data length(byte19~16), patch2 data(byte47~20)
  29841. *
  29842. */
  29843. } wmi_scpc_event_fixed_param;
  29844. typedef enum {
  29845. FW_ACTIVE_BPF_MODE_DISABLE = (1 << 1),
  29846. FW_ACTIVE_BPF_MODE_FORCE_ENABLE = (1 << 2),
  29847. FW_ACTIVE_BPF_MODE_ADAPTIVE_ENABLE = (1 << 3),
  29848. } FW_ACTIVE_BPF_MODE;
  29849. /* bpf interface structure */
  29850. typedef struct wmi_bpf_get_capability_cmd_s {
  29851. A_UINT32 tlv_header;
  29852. A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
  29853. } wmi_bpf_get_capability_cmd_fixed_param;
  29854. typedef struct wmi_bpf_capability_info_evt_s {
  29855. A_UINT32 tlv_header;
  29856. A_UINT32 bpf_version; /* fw's implement version */
  29857. A_UINT32 max_bpf_filters; /* max filters that fw supports */
  29858. A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
  29859. A_UINT32 fw_active_bpf_support_mcbc_modes; /* multicast/broadcast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  29860. A_UINT32 fw_active_bpf_support_uc_modes; /* unicast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  29861. } wmi_bpf_capability_info_evt_fixed_param;
  29862. /* bit 0 of flags: report counters */
  29863. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
  29864. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
  29865. typedef struct wmi_bpf_get_vdev_stats_cmd_s {
  29866. A_UINT32 tlv_header;
  29867. A_UINT32 flags;
  29868. A_UINT32 vdev_id;
  29869. } wmi_bpf_get_vdev_stats_cmd_fixed_param;
  29870. typedef struct wmi_bpf_vdev_stats_info_evt_s {
  29871. A_UINT32 tlv_header;
  29872. A_UINT32 vdev_id;
  29873. A_UINT32 num_filters;
  29874. A_UINT32 num_checked_pkts;
  29875. A_UINT32 num_dropped_pkts;
  29876. } wmi_bpf_vdev_stats_info_evt_fixed_param;
  29877. typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
  29878. A_UINT32 tlv_header;
  29879. A_UINT32 vdev_id;
  29880. A_UINT32 filter_id;
  29881. A_UINT32 bpf_version; /* host bpf version */
  29882. A_UINT32 total_length;
  29883. A_UINT32 current_offset;
  29884. A_UINT32 current_length;
  29885. /*
  29886. * The TLV follows:
  29887. * A_UINT8 buf_inst[]; <-- Variable length buffer for the instuctions
  29888. */
  29889. } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
  29890. #define BPF_FILTER_ID_ALL 0xFFFFFFFF
  29891. typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
  29892. A_UINT32 tlv_header;
  29893. A_UINT32 vdev_id;
  29894. A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
  29895. } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
  29896. typedef struct wmi_bpf_set_vdev_active_mode_cmd_s {
  29897. A_UINT32 tlv_header;
  29898. A_UINT32 vdev_id;
  29899. A_UINT32 mcbc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  29900. A_UINT32 uc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  29901. } wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
  29902. typedef struct wmi_bpf_set_vdev_enable_cmd_s {
  29903. A_UINT32 tlv_header;
  29904. A_UINT32 vdev_id;
  29905. A_UINT32 is_enabled; /* fw assume host default enables */
  29906. } wmi_bpf_set_vdev_enable_cmd_fixed_param;
  29907. typedef struct wmi_bpf_set_vdev_work_memory_cmd_s {
  29908. A_UINT32 tlv_header;
  29909. A_UINT32 vdev_id;
  29910. A_UINT32 bpf_version; /* bpf instruction version */
  29911. A_UINT32 program_len; /* the program length may be changed by this command */
  29912. A_UINT32 addr_offset; /* start writing addr in the working memory */
  29913. A_UINT32 length; /* the writing size of this command (byte units) */
  29914. /*
  29915. * The TLV follows:
  29916. * A_UINT8 buf_inst[]; <-- Variable length buffer with the data to write
  29917. */
  29918. } wmi_bpf_set_vdev_work_memory_cmd_fixed_param;
  29919. typedef struct wmi_bpf_get_vdev_work_memory_cmd_s {
  29920. A_UINT32 tlv_header;
  29921. A_UINT32 vdev_id;
  29922. A_UINT32 addr_offset; /* start reading addr in the working memory */
  29923. A_UINT32 length; /* reading size from addr (byte units) */
  29924. } wmi_bpf_get_vdev_work_memory_cmd_fixed_param;
  29925. typedef struct wmi_bpf_get_vdev_work_memory_resp_evt_s {
  29926. A_UINT32 tlv_header;
  29927. A_UINT32 vdev_id;
  29928. A_UINT32 offset; /* read memory offset from start_addr */
  29929. A_UINT32 length; /* read memory length of this command */
  29930. A_UINT32 fragment; /* 1 means more data will come, 0 means last fragment */
  29931. /*
  29932. * The TLV follows:
  29933. * A_UINT8 buf_inst[]; <-- Variable length buffer containing the read data
  29934. */
  29935. } wmi_bpf_get_vdev_work_memory_resp_evt_fixed_param;
  29936. #define AES_BLOCK_LEN 16 /* in bytes */
  29937. #define FIPS_KEY_LENGTH_128 16 /* in bytes */
  29938. #define FIPS_KEY_LENGTH_256 32 /* in bytes */
  29939. #define FIPS_ENCRYPT_CMD 0
  29940. #define FIPS_DECRYPT_CMD 1
  29941. #define FIPS_ENGINE_AES_CTR 0
  29942. #define FIPS_ENGINE_AES_MIC 1
  29943. #define FIPS_ERROR_OPER_TIMEOUT 1
  29944. typedef enum {
  29945. WMI_FIPS_KEY_CIPHER_CCM,
  29946. WMI_FIPS_KEY_CIPHER_GCM
  29947. } wmi_fips_key_cipher;
  29948. typedef enum {
  29949. WMI_FIPS_DISABLE,
  29950. WMI_FIPS_ENABLE
  29951. } wmi_fips_mode_set;
  29952. /* WMI_PDEV_FIPS_CMDID */
  29953. typedef struct {
  29954. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param */
  29955. union {
  29956. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  29957. /** pdev_id for identifying the MAC
  29958. * See macros starting with WMI_PDEV_ID_ for values.
  29959. */
  29960. A_UINT32 pdev_id;
  29961. };
  29962. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  29963. A_UINT32 mode; /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
  29964. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
  29965. A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
  29966. A_UINT32 data_len; /* data length */
  29967. /*
  29968. * Following this structure is the TLV:
  29969. * A_UINT32 data[1]; <-- In Data (keep this in the end)
  29970. */
  29971. } wmi_pdev_fips_cmd_fixed_param;
  29972. #define MAX_IVNONCE_LEN_FIPS_EXTEND 16
  29973. typedef struct {
  29974. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_init_params */
  29975. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  29976. A_UINT32 key_cipher; /* CCM or GCM */
  29977. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256: 16/32 bytes */
  29978. A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key if this message is sent by a big-endian host, the byte-ordering of this array needs to be maintained (by manually byte-swapping this array's contents to make up for the automatic byte-swapping done by the copy engine). */
  29979. A_UINT32 nonce_iv_len;
  29980. A_UINT8 nonce_iv[MAX_IVNONCE_LEN_FIPS_EXTEND]; /* if this message is sent by a big-endian host, the byte-ordering of this array needs to be maintained (by manually byte-swapping this array's contents to make up for the automatic byte-swapping done by the copy engine).*/
  29981. A_UINT32 tag_len; /* 8 or 16 */
  29982. A_UINT32 aad_len;
  29983. A_UINT32 payload_len;/* Plaintext length */
  29984. } wmi_fips_extend_cmd_init_params;
  29985. typedef struct {
  29986. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_fixed_param */
  29987. A_UINT32 pdev_id;
  29988. A_UINT32 fips_cookie; /* Cookie value to identify test vector */
  29989. A_UINT32 frag_idx; /* Fragment Number */
  29990. A_UINT32 more_bit; /* Set to 0 for last fragment number */
  29991. A_UINT32 data_len; /* data length ()*/
  29992. /*
  29993. * Following this structure are the TLVs:
  29994. * wmi_fips_extend_cmd_init_params cmd_params
  29995. * A_UINT32 data[1]; <-- In Data ((aad, payload in order))
  29996. */
  29997. } wmi_pdev_fips_extend_cmd_fixed_param;
  29998. typedef struct {
  29999. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_fixed_param */
  30000. A_UINT32 pdev_id;
  30001. A_UINT32 fips_mode_set; /*FIPS_MODE_ENABLE -Enable, FIPS_MODE_DISABLE -disable */
  30002. } wmi_pdev_fips_mode_set_cmd_fixed_param;
  30003. typedef struct {
  30004. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_featureset_cmd_fixed_param */
  30005. /*
  30006. * Following this structure are the TLVs:
  30007. * A_UINT32 feature_set_bitmap[]; <-- Host supported feature info,
  30008. * array length is equal to
  30009. * WMI_FEATURE_SET_BITMAP_ARRAY_LEN32.
  30010. */
  30011. } wmi_pdev_featureset_cmd_fixed_param;
  30012. typedef struct {
  30013. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param */
  30014. union {
  30015. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  30016. /** pdev_id for identifying the MAC
  30017. * See macros starting with WMI_PDEV_ID_ for values.
  30018. */
  30019. A_UINT32 pdev_id;
  30020. };
  30021. A_UINT32 enable; /* 1:enable, 0:disable */
  30022. A_UINT32 mode; /* 1:GPIO parallel mode, 0:GPIO serial mode */
  30023. A_UINT32 rx_antenna; /* rx antenna */
  30024. A_UINT32 tx_default_antenna; /* tx default antenna */
  30025. /*
  30026. * Following this structure is the TLV:
  30027. * wmi_pdev_smart_ant_gpio_handle
  30028. */
  30029. } wmi_pdev_smart_ant_enable_cmd_fixed_param;
  30030. /** GPIO pins/function values to control antennas */
  30031. typedef struct {
  30032. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle */
  30033. A_UINT32 gpio_pin; /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
  30034. A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
  30035. /** pdev_id for identifying the MAC
  30036. * See macros starting with WMI_PDEV_ID_ for values.
  30037. */
  30038. A_UINT32 pdev_id;
  30039. } wmi_pdev_smart_ant_gpio_handle;
  30040. typedef struct {
  30041. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param */
  30042. union {
  30043. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  30044. /** pdev_id for identifying the MAC
  30045. * See macros starting with WMI_PDEV_ID_ for values.
  30046. */
  30047. A_UINT32 pdev_id;
  30048. };
  30049. A_UINT32 rx_antenna;
  30050. } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
  30051. typedef struct {
  30052. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param */
  30053. /** unique id identifying the vdev, generated by the caller */
  30054. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  30055. /** peer MAC address */
  30056. wmi_mac_addr peer_macaddr;
  30057. /*
  30058. * Following this structure is the TLV:
  30059. * wmi_peer_smart_ant_set_tx_antenna_series
  30060. */
  30061. } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
  30062. typedef struct {
  30063. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series */
  30064. /* antenna array */
  30065. A_UINT32 antenna_series;
  30066. } wmi_peer_smart_ant_set_tx_antenna_series;
  30067. #define WMI_PER_VALID_BIT_POS 0
  30068. #define WMI_PER_VALID_NUM_BITS 1
  30069. #define WMI_GET_PER_VALID(per_threshold) \
  30070. WMI_GET_BITS(per_threshold, WMI_PER_VALID_BIT_POS, WMI_PER_VALID_NUM_BITS)
  30071. #define WMI_PER_VALID_SET(per_threshold, value) \
  30072. WMI_SET_BITS(per_threshold, WMI_PER_VALID_BIT_POS, WMI_PER_VALID_NUM_BITS, value)
  30073. #define WMI_PER_THRESHOLD_BIT_POS 1
  30074. #define WMI_PER_THRESHOLD_NUM_BITS 8
  30075. #define WMI_GET_PER_THRESHOLD(per_threshold) \
  30076. WMI_GET_BITS(per_threshold, WMI_PER_THRESHOLD_BIT_POS, WMI_PER_THRESHOLD_NUM_BITS)
  30077. #define WMI_PER_THRESHOLD_SET(per_threshold, value) \
  30078. WMI_SET_BITS(per_threshold, WMI_PER_THRESHOLD_BIT_POS, WMI_PER_THRESHOLD_NUM_BITS, value)
  30079. #define WMI_PER_MIN_TX_PKTS_BIT_POS 9
  30080. #define WMI_PER_MIN_TX_PKTS_NUM_BITS 16
  30081. #define WMI_GET_PER_MIN_TX_PKTS(per_threshold) \
  30082. WMI_GET_BITS(per_threshold, WMI_PER_MIN_TX_PKTS_BIT_POS, WMI_PER_MIN_TX_PKTS_NUM_BITS)
  30083. #define WMI_PER_MIN_TX_PKTS_SET(per_threshold, value) \
  30084. WMI_SET_BITS(per_threshold, WMI_PER_MIN_TX_PKTS_BIT_POS, WMI_PER_MIN_TX_PKTS_NUM_BITS, value)
  30085. #define WMI_RATE_SERIES_320_BIT_POS 0
  30086. #define WMI_RATE_SERIES_320_NUM_BITS 16
  30087. #define WMI_GET_RATE_SERIES_320(train_rate_series_ext) \
  30088. WMI_GET_BITS(train_rate_series_ext, WMI_RATE_SERIES_320_BIT_POS, WMI_RATE_SERIES_320_NUM_BITS)
  30089. #define WMI_SET_RATE_SERIES_320(train_rate_series_ext) \
  30090. WMI_SET_BITS(train_rate_series_ext, WMI_RATE_SERIES_320_BIT_POS, WMI_RATE_SERIES_320_NUM_BITS, value)
  30091. typedef struct {
  30092. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */
  30093. /* rate array */
  30094. union {
  30095. /* train_rate_series:
  30096. * original name, used for 8-bit rate-code implementations
  30097. */
  30098. A_UINT32 train_rate_series;
  30099. /* train_rate_series_lo:
  30100. * Contains the lower 32 bits of rate array, for larger rate-code
  30101. * implementations. This field is paired with train_rate_series_hi.
  30102. */
  30103. A_UINT32 train_rate_series_lo;
  30104. };
  30105. /* antenna array */
  30106. A_UINT32 train_antenna_series;
  30107. /* Rate flags */
  30108. /* TODO: For future use? */
  30109. A_UINT32 rc_flags;
  30110. /* rate array -- continued */
  30111. A_UINT32 train_rate_series_hi; /* Higher 32 bits of rate array */
  30112. /* train_rate_series_ext:
  30113. * 15:0 - 320Mhz rate
  30114. * 31:16 - Reserved
  30115. */
  30116. A_UINT32 train_rate_series_ext; /* For 320Mhz and Reserved for other */
  30117. } wmi_peer_smart_ant_set_train_antenna_param;
  30118. typedef struct {
  30119. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param */
  30120. /** unique id identifying the VDEV, generated by the caller */
  30121. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  30122. /** peer MAC address */
  30123. wmi_mac_addr peer_macaddr;
  30124. /* num packets; 0-stop training */
  30125. A_UINT32 num_pkts;
  30126. /* per_threshold:
  30127. * bits | interpretation
  30128. * ------+--------------------------
  30129. * 0 | PER Threshold is valid
  30130. * 1:8 | Per Threshold
  30131. * 9:24 | min_tx_pkts Minimum number of pkts need to be checked
  30132. * 25:31 | Reserved
  30133. */
  30134. A_UINT32 per_threshold;
  30135. /*
  30136. * Following this structure is the TLV:
  30137. * wmi_peer_smart_ant_set_train_antenna_param
  30138. */
  30139. } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
  30140. typedef struct {
  30141. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param */
  30142. /** unique id identifying the vdev, generated by the caller */
  30143. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  30144. /** peer MAC address */
  30145. wmi_mac_addr peer_macaddr;
  30146. /* command id*/
  30147. A_UINT32 cmd_id;
  30148. /* number of arguments passed */
  30149. A_UINT32 args_count;
  30150. /*
  30151. * Following this structure is the TLV:
  30152. * A_UINT32 args[]; <-- argument list
  30153. */
  30154. } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
  30155. typedef struct {
  30156. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain */
  30157. A_UINT32 antCtrlChain;
  30158. /** pdev_id for identifying the MAC
  30159. * See macros starting with WMI_PDEV_ID_ for values.
  30160. */
  30161. A_UINT32 pdev_id;
  30162. } wmi_pdev_set_ant_ctrl_chain;
  30163. typedef struct {
  30164. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param */
  30165. A_UINT32 mac_id; /* MAC ID */
  30166. A_UINT32 antCtrlCommon1;
  30167. A_UINT32 antCtrlCommon2;
  30168. /*
  30169. * Following this structure is the TLV:
  30170. * wmi_pdev_set_ant_ctrl_chain
  30171. */
  30172. } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
  30173. typedef struct {
  30174. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param */
  30175. union {
  30176. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  30177. /** pdev_id for identifying the MAC
  30178. * See macros starting with WMI_PDEV_ID_ for values.
  30179. */
  30180. A_UINT32 pdev_id;
  30181. };
  30182. /** len of CTL info */
  30183. A_UINT32 ctl_len;
  30184. /* ctl array (len adjusted to number of words).
  30185. * Following this structure is the TLV:
  30186. * A_UINT32 ctl_info[1];
  30187. */
  30188. } wmi_pdev_set_ctl_table_cmd_fixed_param;
  30189. typedef struct {
  30190. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_sar_cmd_fixed_param */
  30191. A_UINT32 pdev_id; /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  30192. A_UINT32 sar_len;
  30193. /* sar power array are stored in TLV, which follow this structure;
  30194. * sar_len is the number of valid bytes in the sar power array;
  30195. * sar power array contains 22 elements.
  30196. * Each element stores the maximum SAR power on certain band.
  30197. * Its type is A_UINT8 and its unit is 0.25 dBm.
  30198. * sar_power[0] for chain0 2g
  30199. * sar_power[1] for chain0 5g unii-1
  30200. * ...
  30201. * sar_power[4] for chain0 5g unii-4
  30202. * sar_power[5] for chain0 6g unii-5
  30203. * ...
  30204. * sar_power[10] for chain0 6g unii-10
  30205. * sar_power[11] for chain1 2g
  30206. * ...
  30207. * sar_power[21] for chain1 6g unii-10
  30208. */
  30209. A_UINT32 dbs_backoff_len;
  30210. /* dbs_backoff follow sar array, its type is A_UINT8;
  30211. * dbs_backoff[0] ~ dbs_backoff[5], these six elements are based on
  30212. * maximum SAR power, and make some offset adjustment in DBS mode.
  30213. * Their unit is 0.25 dB.
  30214. * dbs_backoff[0] for chain 0 2G
  30215. * dbs_backoff[1] for chain 0 5G
  30216. * dbs_backoff[2] for chain 0 6G
  30217. * dbs_backoff[3] for chain 1 2G
  30218. * dbs_backoff[4] for chain 1 5G
  30219. * dbs_backoff[5] for chain 1 6G
  30220. */
  30221. } wmi_pdev_set_bios_sar_table_cmd_fixed_param;
  30222. typedef struct {
  30223. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_sar_cmd_fixed_param */
  30224. A_UINT32 pdev_id; /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  30225. A_UINT32 geo_len;
  30226. /* geo offset array is in TLV, followed this structure:
  30227. * A_UINT8 Geo_offset[];
  30228. * Geo_offset array has 18 elements. The meaning of each element is to
  30229. * adjust offset based on maximum SAR power according to different regions.
  30230. * Its unit is 0.25 dB.
  30231. * Geo_offset[0] chain 0 FCC_Offset on 2G
  30232. * Geo_offset[1] chain 0 FCC_Offset on 5G
  30233. * Geo_offset[2] chain 0 FCC_Offset on 6G
  30234. * Geo_offset[3] chain 0 CE_Offset on 2G
  30235. * Geo_offset[4] chain 0 CE_Offset on 5G
  30236. * Geo_offset[5] chain 0 CE_Offset on 6G
  30237. * Geo_offset[6] chain 0 ROW_Offset on 2G
  30238. * Geo_offset[7] chain 0 ROW_Offset on 5G
  30239. * Geo_offset[8] chain 0 ROW_Offset on 6G
  30240. * Geo_offset[9] chain 1 FCC_Offset on 2G
  30241. * ...
  30242. * Geo_offset[17] chain 1 ROW_Offset on 6G
  30243. * In actual use, FW will subtract an offset value according to the region;
  30244. */
  30245. } wmi_pdev_set_bios_geo_table_cmd_fixed_param;
  30246. typedef struct {
  30247. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_interface_cmd_fixed_param */
  30248. A_UINT32 pdev_id; /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  30249. A_UINT32 param_type_id; /* BIOS parameters type, see bios_param_type_e */
  30250. /* length:
  30251. * Number of valid bytes in A_UINT8 TLV array that follows this
  30252. * fixed_param TLV.
  30253. * The number of bytes allocated in the A_UINT8 TLV array will be a
  30254. * multiple of 4. The "length" field indicates how many of these
  30255. * byte elements contain valid data; the remainder are only for
  30256. * alignment padding and should be ignored.
  30257. */
  30258. A_UINT32 length;
  30259. /* Following this structure is TLV, bios data array */
  30260. } wmi_pdev_set_bios_interface_cmd_fixed_param;
  30261. typedef enum {
  30262. BIOS_PARAM_CCA_THRESHOLD_TYPE,
  30263. /* CCA THR structure has 29 bytes, it includes control flag and
  30264. * CCA THR parameters;
  30265. *
  30266. * If CCA_THR_Control is set 0, FW will still use
  30267. * AGC_ENERGY_DETECT_THRESHOLD.agcEnergyDetThr in BDF, and detailed
  30268. * CCA threshold do not need to be transported.
  30269. * If CCA_THR_Control is set 1, FW needs to use CCA threshold parameters
  30270. * in BIOS, and CCA THR parameters are provided in the subsequent A_UINT8
  30271. * TLV array.
  30272. *
  30273. * In CCA THR parameters, ETSI / MKK / CHN use same CCA threshold,
  30274. * and FCC / KOR use same CCA threshold. Its unit is in 1db,
  30275. * which is relative to HW NF value.
  30276. *
  30277. * //control flag
  30278. * A_UINT8 CCA_THR_Control
  30279. *
  30280. * //5G
  30281. * A_UINT8 agcEnergyDetThr5G_thrCcaPri20dB_ETSI_MKK_CHN
  30282. * A_UINT8 agcEnergyDetThr5G_thrCcaExt20dB_ETSI_MKK_CHN
  30283. * A_UINT8 agcEnergyDetThr5G_thrCcaExt40dB_ETSI_MKK_CHN
  30284. * A_UINT8 agcEnergyDetThr5G_thrCcaExt80dB_ETSI_MKK_CHN
  30285. * A_UINT8 agcEnergyDetThr5G_thrCcaPri20dB_FCC_KOR
  30286. * A_UINT8 agcEnergyDetThr5G_thrCcaExt20dB_FCC_KOR
  30287. * A_UINT8 agcEnergyDetThr5G_thrCcaExt40dB_FCC_KOR
  30288. * A_UINT8 agcEnergyDetThr5G_thrCcaExt80dB_FCC_KOR
  30289. *
  30290. * //2G
  30291. * A_UINT8 agcEnergyDetThr2G_thrCcaPri20dB_ETSI_MKK_CHN
  30292. * A_UINT8 agcEnergyDetThr2G_thrCcaExt20dB_ETSI_MKK_CHN
  30293. * A_UINT8 agcEnergyDetThr2G_thrCcaExt40dB_ETSI_MKK_CHN
  30294. * A_UINT8 agcEnergyDetThr2G_thrCcaExt80dB_ETSI_MKK_CHN
  30295. * A_UINT8 agcEnergyDetThr2G_thrCcaPri20dB_FCC_KOR
  30296. * A_UINT8 agcEnergyDetThr2G_thrCcaExt20dB_FCC_KOR
  30297. * A_UINT8 agcEnergyDetThr2G_hrCcaExt40dB_FCC_KOR
  30298. * A_UINT8 agcEnergyDetThr2G_hrCcaExt80dB_FCC_KOR
  30299. *
  30300. * //6G
  30301. * A_UINT8 agcEnergyDetThr6G_thrCcaPri20dB_FCC_KOR
  30302. * A_UINT8 agcEnergyDetThr6G_thrCcaExt20dB_FCC_KOR
  30303. * A_UINT8 agcEnergyDetThr6G_thrCcaExt40dB_FCC_KOR
  30304. * A_UINT8 agcEnergyDetThr6G_thrCcaExt80dB_FCC_KOR
  30305. *
  30306. * //6G-LPI/VLP
  30307. * A_UINT8 agcEnergyDetThr6GLPI.thrCcaPri20dB_ETSI_MKK_CHN
  30308. * A_UINT8 agcEnergyDetThr6GLPI thrCcaExt20dB_ETSI_MKK_CHN
  30309. * A_UINT8 agcEnergyDetThr6GLPI thrCcaExt40dB_ETSI_MKK_CHN
  30310. * A_UINT8 agcEnergyDetThr6GLPI.thrCcaExt80dB_ETSI_MKK_CHN
  30311. * A_UINT8 agcEnergyDetThr6GVLP.thrCcaPri20dB_ETSI_MKK_CHN
  30312. * A_UINT8 agcEnergyDetThr6GVLP thrCcaExt20dB_ETSI_MKK_CHN
  30313. * A_UINT8 agcEnergyDetThr6GVLP thrCcaExt40dB_ETSI_MKK_CHN
  30314. * A_UINT8 agcEnergyDetThr6GVLP.thrCcaExt80dB_ETSI_MKK_CHN
  30315. */
  30316. BIOS_PARAM_TAS_CONFIG_TYPE,
  30317. /*
  30318. * BIOS_PARAM_TAS_CONFIG_TYPE Structure has 108 bytes. Please Note these fields of A_UINT32 or A_INT32.
  30319. * explicit endianness corrections will need to be done by any big-endian host when the little-endian target is paired with a big-endian host.
  30320. * PowerLimitIndicator points out which region(FCC OR ICNIRP) power limit value should be used.
  30321. * A bit of PowerLimitIndicator maps a country. bit value 0: ICNIRP 1: FCC
  30322. *
  30323. * A_UINT8 Version
  30324. * A_UINT8 TASIsPairWith3rdPartyWwan
  30325. * A_UINT8 SARAntennaGroupingExt[6] (6 Bytes)
  30326. * A_UINT32 TASPeakModeIndicator[8] (32 Bytes)
  30327. * A_UINT32 TAS_FCC_ICNIRP_Indicator[8] (32 Bytes)
  30328. * A_UINT32 PowerLimitIndicator[8] (32 Bytes)
  30329. * A_UINT8 reserveMarginDb (1 Bytes)
  30330. * A_UINT8 reserved[3] (3 Bytes)
  30331. */
  30332. BIOS_PARAM_TAS_DATA_TYPE,
  30333. /*
  30334. * BIOS_PARAM_TAS_DATA_TYPE Structure has 69 bytes as below, power limit value unit is 0.25 dBm.
  30335. * If Enable flag is 0, FW will not use power limit value of bios.
  30336. *
  30337. * A_UINT8 Version
  30338. * A_UINT8 Enable Flag
  30339. * A_UINT8 Power Table Index
  30340. * ====================FCC POWER LIMIT VALUE======================
  30341. * A_INT8 FCC 2 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm)
  30342. * A_INT8 FCC 2 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm)
  30343. * A_INT8 FCC 2 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm)
  30344. * A_INT8 FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30345. * A_INT8 FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30346. * A_INT8 FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30347. * A_INT8 FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30348. * A_INT8 FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30349. * A_INT8 FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30350. * A_INT8 FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30351. * A_INT8 FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30352. * A_INT8 FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30353. * A_INT8 FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30354. * A_INT8 FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30355. * A_INT8 FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30356. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30357. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30358. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30359. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30360. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30361. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30362. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30363. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30364. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30365. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30366. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30367. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30368. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30369. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30370. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30371. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30372. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30373. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30374. * ====================ICNIRP POWER LIMIT VALUE======================
  30375. * A_INT8 ICNIRP 2 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm)
  30376. * A_INT8 ICNIRP 2 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm)
  30377. * A_INT8 ICNIRP 2 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm)
  30378. * A_INT8 ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30379. * A_INT8 ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30380. * A_INT8 ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30381. * A_INT8 ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30382. * A_INT8 ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30383. * A_INT8 ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30384. * A_INT8 ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30385. * A_INT8 ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30386. * A_INT8 ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30387. * A_INT8 ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30388. * A_INT8 ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30389. * A_INT8 ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30390. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30391. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30392. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30393. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30394. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30395. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30396. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30397. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30398. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30399. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30400. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30401. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30402. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30403. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30404. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30405. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30406. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30407. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30408. */
  30409. BIOS_PARAM_TYPE_BANDEDGE_CTL_POWER,
  30410. /*
  30411. * BIOS_PARAM_TYPE_BANDEDGE_CTL_POWER Structure has 100 bytes as below, CTL limit power unit is 0.25 dBm.
  30412. * If Enable flag is 0, FW will not use power limit value of bios.
  30413. *
  30414. * A_UINT8 version
  30415. * A_UINT8 enableFlag (always 1)
  30416. * A_UINT8 reserved[2] for 4 byte alignment,
  30417. * ====================2G CTL POWER LIMIT ======================
  30418. * A_INT8 2G 20M Channel Center Freq 2412 CTL Limit Power SU
  30419. * A_INT8 2G 20M Channel Center Freq 2412 CTL Limit Power OFDMA
  30420. * A_INT8 2G 20M Channel Center Freq 2417 CTL Limit Power SU
  30421. * A_INT8 2G 20M Channel Center Freq 2417 CTL Limit Power OFDMA
  30422. * A_INT8 2G 20M Channel Center Freq 2462 CTL Limit Power SU
  30423. * A_INT8 2G 20M Channel Center Freq 2462 CTL Limit Power OFDMA
  30424. * A_INT8 2G 20M Channel Center Freq 2467 CTL Limit Power SU
  30425. * A_INT8 2G 20M Channel Center Freq 2467 CTL Limit Power OFDMA
  30426. * A_INT8 2G 20M Channel Center Freq 2472 CTL Limit Power SU
  30427. * A_INT8 2G 20M Channel Center Freq 2472 CTL Limit Power OFDMA
  30428. * A_INT8 2G 40M Channel Center Freq 2422 CTL Limit Power SU
  30429. * A_INT8 2G 40M Channel Center Freq 2422 CTL Limit Power OFDMA
  30430. * A_INT8 2G 40M Channel Center Freq 2427 CTL Limit Power SU
  30431. * A_INT8 2G 40M Channel Center Freq 2427 CTL Limit Power OFDMA
  30432. * A_INT8 2G 40M Channel Center Freq 2452 CTL Limit Power SU
  30433. * A_INT8 2G 40M Channel Center Freq 2452 CTL Limit Power OFDMA
  30434. * A_INT8 2G 40M Channel Center Freq 2457 CTL Limit Power SU
  30435. * A_INT8 2G 40M Channel Center Freq 2457 CTL Limit Power OFDMA
  30436. * A_INT8 2G 40M Channel Center Freq 2462 CTL Limit Power SU
  30437. * A_INT8 2G 40M Channel Center Freq 2462 CTL Limit Power OFDMA
  30438. * ====================5G CTL POWER LIMIT ======================
  30439. * A_INT8 5G 20M Channel Center Freq 5180 CTL Limit Power SU
  30440. * A_INT8 5G 20M Channel Center Freq 5180 CTL Limit Power OFDMA
  30441. * A_INT8 5G 20M Channel Center Freq 5320 CTL Limit Power SU
  30442. * A_INT8 5G 20M Channel Center Freq 5320 CTL Limit Power OFDMA
  30443. * A_INT8 5G 20M Channel Center Freq 5500 CTL Limit Power SU
  30444. * A_INT8 5G 20M Channel Center Freq 5500 CTL Limit Power OFDMA
  30445. * A_INT8 5G 20M Channel Center Freq 5700 CTL Limit Power SU
  30446. * A_INT8 5G 20M Channel Center Freq 5700 CTL Limit Power OFDMA
  30447. * A_INT8 5G 20M Channel Center Freq 5745 CTL Limit Power SU
  30448. * A_INT8 5G 20M Channel Center Freq 5745 CTL Limit Power OFDMA
  30449. * A_INT8 5G 20M Channel Center Freq 5825 CTL Limit Power SU
  30450. * A_INT8 5G 20M Channel Center Freq 5825 CTL Limit Power OFDMA
  30451. * A_INT8 5G 20M Channel Center Freq 5845 CTL Limit Power SU
  30452. * A_INT8 5G 20M Channel Center Freq 5845 CTL Limit Power OFDMA
  30453. * A_INT8 5G 20M Channel Center Freq 5885 CTL Limit Power SU
  30454. * A_INT8 5G 20M Channel Center Freq 5885 CTL Limit Power OFDMA
  30455. * A_INT8 5G 40M Channel Center Freq 5190 CTL Limit Power SU
  30456. * A_INT8 5G 40M Channel Center Freq 5190 CTL Limit Power OFDMA
  30457. * A_INT8 5G 40M Channel Center Freq 5310 CTL Limit Power SU
  30458. * A_INT8 5G 40M Channel Center Freq 5310 CTL Limit Power OFDMA
  30459. * A_INT8 5G 40M Channel Center Freq 5510 CTL Limit Power SU
  30460. * A_INT8 5G 40M Channel Center Freq 5510 CTL Limit Power OFDMA
  30461. * A_INT8 5G 40M Channel Center Freq 5670 CTL Limit Power SU
  30462. * A_INT8 5G 40M Channel Center Freq 5670 CTL Limit Power OFDMA
  30463. * A_INT8 5G 40M Channel Center Freq 5755 CTL Limit Power SU
  30464. * A_INT8 5G 40M Channel Center Freq 5755 CTL Limit Power OFDMA
  30465. * A_INT8 5G 40M Channel Center Freq 5795 CTL Limit Power SU
  30466. * A_INT8 5G 40M Channel Center Freq 5795 CTL Limit Power OFDMA
  30467. * A_INT8 5G 40M Channel Center Freq 5835 CTL Limit Power SU
  30468. * A_INT8 5G 40M Channel Center Freq 5835 CTL Limit Power OFDMA
  30469. * A_INT8 5G 40M Channel Center Freq 5875 CTL Limit Power SU
  30470. * A_INT8 5G 40M Channel Center Freq 5875 CTL Limit Power OFDMA
  30471. * A_INT8 5G 80M Channel Center Freq 5210 CTL Limit Power SU
  30472. * A_INT8 5G 80M Channel Center Freq 5210 CTL Limit Power OFDMA
  30473. * A_INT8 5G 80M Channel Center Freq 5290 CTL Limit Power SU
  30474. * A_INT8 5G 80M Channel Center Freq 5290 CTL Limit Power OFDMA
  30475. * A_INT8 5G 80M Channel Center Freq 5530 CTL Limit Power SU
  30476. * A_INT8 5G 80M Channel Center Freq 5530 CTL Limit Power OFDMA
  30477. * A_INT8 5G 80M Channel Center Freq 5610 CTL Limit Power SU
  30478. * A_INT8 5G 80M Channel Center Freq 5610 CTL Limit Power OFDMA
  30479. * A_INT8 5G 80M Channel Center Freq 5775 CTL Limit Power SU
  30480. * A_INT8 5G 80M Channel Center Freq 5775 CTL Limit Power OFDMA
  30481. * A_INT8 5G 80M Channel Center Freq 5855 CTL Limit Power SU
  30482. * A_INT8 5G 80M Channel Center Freq 5855 CTL Limit Power OFDMA
  30483. * A_INT8 5G 160M Channel Center Freq 5250 CTL Limit Power SU
  30484. * A_INT8 5G 160M Channel Center Freq 5250 CTL Limit Power OFDMA
  30485. * A_INT8 5G 160M Channel Center Freq 5570 CTL Limit Power SU
  30486. * A_INT8 5G 160M Channel Center Freq 5570 CTL Limit Power OFDMA
  30487. * A_INT8 5G 160M Channel Center Freq 5815 CTL Limit Power SU
  30488. * A_INT8 5G 160M Channel Center Freq 5815 CTL Limit Power OFDMA
  30489. * A_INT8 5G 320M Channel Center Freq 5650 CTL Limit Power SU (5650 Punctured 1111_1111_1111_0000)
  30490. * A_INT8 5G 320M Channel Center Freq 5650 CTL Limit Power OFDMA (5650 Punctured 1111_1111_1111_0000)
  30491. * ====================6G CTL POWER LIMIT ======================
  30492. * A_INT8 6G 20M Channel Center Freq 5935 CTL Limit Power SU
  30493. * A_INT8 6G 20M Channel Center Freq 5935 CTL Limit Power OFDMA
  30494. * A_INT8 6G 20M Channel Center Freq 5955 CTL Limit Power SU
  30495. * A_INT8 6G 20M Channel Center Freq 5955 CTL Limit Power OFDMA
  30496. * A_INT8 6G 20M Channel Center Freq 6415 CTL Limit Power SU
  30497. * A_INT8 6G 20M Channel Center Freq 6415 CTL Limit Power OFDMA
  30498. * A_INT8 6G 20M Channel Center Freq 7115 CTL Limit Power SU
  30499. * A_INT8 6G 20M Channel Center Freq 7115 CTL Limit Power OFDMA
  30500. * A_INT8 6G 40M Channel Center Freq 5965 CTL Limit Power SU
  30501. * A_INT8 6G 40M Channel Center Freq 5965 CTL Limit Power OFDMA
  30502. * A_INT8 6G 40M Channel Center Freq 6405 CTL Limit Power SU
  30503. * A_INT8 6G 40M Channel Center Freq 6405 CTL Limit Power OFDMA
  30504. * A_INT8 6G 80M Channel Center Freq 5985 CTL Limit Power SU
  30505. * A_INT8 6G 80M Channel Center Freq 5985 CTL Limit Power OFDMA
  30506. * A_INT8 6G 80M Channel Center Freq 6385 CTL Limit Power SU
  30507. * A_INT8 6G 80M Channel Center Freq 6385 CTL Limit Power OFDMA
  30508. * A_INT8 6G 160M Channel Center Freq 6025 CTL Limit Power SU
  30509. * A_INT8 6G 160M Channel Center Freq 6025 CTL Limit Power OFDMA
  30510. * A_INT8 6G 160M Channel Center Freq 6345 CTL Limit Power SU
  30511. * A_INT8 6G 160M Channel Center Freq 6345 CTL Limit Power OFDMA
  30512. * A_INT8 6G 320M Channel Center Freq 6105 CTL Limit Power SU
  30513. * A_INT8 6G 320M Channel Center Freq 6105 CTL Limit Power OFDMA
  30514. * A_INT8 6G 320M Channel Center Freq 6265 CTL Limit Power SU
  30515. * A_INT8 6G 320M Channel Center Freq 6265 CTL Limit Power OFDMA
  30516. */
  30517. BIOS_PARAM_TYPE_MAX,
  30518. } bios_param_type_e;
  30519. typedef struct {
  30520. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param */
  30521. union {
  30522. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  30523. /** pdev_id for identifying the MAC
  30524. * See macros starting with WMI_PDEV_ID_ for values.
  30525. */
  30526. A_UINT32 pdev_id;
  30527. };
  30528. A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
  30529. /*
  30530. * Bit 7:0 len of array gain table
  30531. * Bit 8 bypass multi chain gain or not
  30532. */
  30533. /* array gain table(s) (len adjusted to number of words).
  30534. * Following this structure is the TLV:
  30535. * A_UINT32 arraygain_tbl[1];
  30536. */
  30537. } wmi_pdev_set_mimogain_table_cmd_fixed_param;
  30538. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
  30539. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
  30540. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  30541. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  30542. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
  30543. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
  30544. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  30545. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  30546. typedef struct {
  30547. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param */
  30548. /** parameter id */
  30549. A_UINT32 param_id;
  30550. /** parameter value */
  30551. A_UINT32 param_value;
  30552. } wmi_fwtest_set_param_cmd_fixed_param;
  30553. #define WMI_ATF_DENOMINATION 1000 /* Expressed in 1 part in 1000 (permille) */
  30554. #define WMI_ATF_SSID_FAIR_SCHED 0 /** fair ATF scheduling for vdev */
  30555. #define WMI_ATF_SSID_STRICT_SCHED 1 /** strict ATF scheduling for vdev */
  30556. #define WMI_ATF_SSID_FAIR_SCHED_WITH_UB 2 /** fair ATF scheduling with upper bound for VDEV */
  30557. typedef struct {
  30558. /** TLV tag and len; tag equals
  30559. * WMITLV_TAG_STRUC_wmi_atf_peer_info */
  30560. A_UINT32 tlv_header;
  30561. wmi_mac_addr peer_macaddr;
  30562. A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
  30563. A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
  30564. A_UINT32 atf_units_reserved; /* Peer congestion threshold for future use */
  30565. A_UINT32 vdev_id;
  30566. A_UINT32 pdev_id;
  30567. } wmi_atf_peer_info;
  30568. #define WMI_ATF_PEER_UNITS_BIT_POS 0
  30569. #define WMI_ATF_PEER_UNITS_NUM_BITS 16
  30570. #define WMI_ATF_GET_PEER_UNITS(atf_peer_info) \
  30571. WMI_GET_BITS(atf_peer_info,WMI_ATF_PEER_UNITS_BIT_POS,WMI_ATF_PEER_UNITS_NUM_BITS)
  30572. #define WMI_ATF_SET_PEER_UNITS(atf_peer_info,val) \
  30573. WMI_SET_BITS(atf_peer_info,WMI_ATF_PEER_UNITS_BIT_POS,WMI_ATF_PEER_UNITS_NUM_BITS, val)
  30574. #define WMI_ATF_GROUP_ID_BIT_POS 16
  30575. #define WMI_ATF_GROUP_ID_NUM_BITS 8
  30576. #define WMI_ATF_GET_GROUP_ID(atf_peer_info) \
  30577. WMI_GET_BITS(atf_peer_info,WMI_ATF_GROUP_ID_BIT_POS,WMI_ATF_GROUP_ID_NUM_BITS)
  30578. #define WMI_ATF_SET_GROUP_ID(atf_peer_info,val) \
  30579. WMI_SET_BITS(atf_peer_info,WMI_ATF_GROUP_ID_BIT_POS,WMI_ATF_GROUP_ID_NUM_BITS, val)
  30580. #define WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS 24
  30581. #define WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS 1
  30582. #define WMI_ATF_GET_EXPLICIT_PEER_FLAG(atf_peer_info) \
  30583. WMI_GET_BITS(atf_peer_info,WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS,WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS)
  30584. #define WMI_ATF_SET_EXPLICIT_PEER_FLAG(atf_peer_info,val) \
  30585. WMI_SET_BITS(atf_peer_info,WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS,WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS, val)
  30586. typedef struct {
  30587. /* The new structure is an optimized version of wmi_atf_peer_info & wmi_atf_peer_ext_info combined */
  30588. A_UINT32 tlv_header;
  30589. wmi_mac_addr peer_macaddr;
  30590. /* atf_peer_info
  30591. * Bits 0-15 - atf_units (based on 1 part in 1000 (per mille))
  30592. * Bits 16-23 - atf_groupid
  30593. * Bit 24 - Configured Peer Indication (0/1), this bit would be set by
  30594. * host to indicate that the peer has airtime % configured
  30595. * explicitly by user
  30596. * Bits 25-31 - Reserved (Shall be zero)
  30597. */
  30598. A_UINT32 atf_peer_info;
  30599. } wmi_atf_peer_info_v2;
  30600. #define WMI_ATF_PEER_FULL_UPDATE_BIT_POS 0
  30601. #define WMI_ATF_PEER_FULL_UPDATE_NUM_BITS 1
  30602. #define WMI_ATF_GET_PEER_FULL_UPDATE(atf_flags) \
  30603. WMI_GET_BITS(atf_flags,WMI_ATF_PEER_FULL_UPDATE_BIT_POS,WMI_ATF_PEER_FULL_UPDATE_NUM_BITS)
  30604. #define WMI_ATF_SET_PEER_FULL_UPDATE(atf_flags,val) \
  30605. WMI_SET_BITS(atf_flags,WMI_ATF_PEER_FULL_UPDATE_BIT_POS,WMI_ATF_PEER_FULL_UPDATE_NUM_BITS,val)
  30606. #define WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS 1
  30607. #define WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS 1
  30608. #define WMI_ATF_GET_PEER_PENDING_WMI_CMDS(atf_flags) \
  30609. WMI_GET_BITS(atf_flags,WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS, WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS)
  30610. #define WMI_ATF_SET_PEER_PENDING_WMI_CMDS(atf_flags,val) \
  30611. WMI_SET_BITS(atf_flags,WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS, WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS, val)
  30612. #define WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS 2
  30613. #define WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS 1
  30614. #define WMI_ATF_GET_PEER_PDEV_ID_VALID(atf_flags) \
  30615. WMI_GET_BITS(atf_flags,WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS, WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS)
  30616. #define WMI_ATF_SET_PEER_PDEV_ID_VALID(atf_flags,val) \
  30617. WMI_SET_BITS(atf_flags,WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS, WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS, val)
  30618. typedef struct {
  30619. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */
  30620. A_UINT32 num_peers;
  30621. A_UINT32 pdev_id;
  30622. /* atf_flags
  30623. * Bit 0 - full or partial update;
  30624. * full update -
  30625. * indicates that this is done for all the connected peers
  30626. * partial update -
  30627. * indicates update for only the newly connected peers
  30628. * (whenever some peers gets connected/disconnected)
  30629. * Bit 1 - indicates whether there are more iterations of WMI command
  30630. * incoming after the current set of cmds
  30631. * Example : If there are 500 peers present and tlv can accomodate
  30632. * only 50 peers at a time, then this will be set for all the
  30633. * instances of the WMI commands except the last one.
  30634. * Bit 2 - indicates if pdev_id is valid or not
  30635. * Bits 3-31 - Reserved (Shall be zero)
  30636. */
  30637. A_UINT32 atf_flags;
  30638. /*
  30639. * Following this structure is one of the following TLVs
  30640. * (only one of them will have valid data in a particular message)
  30641. * - struct wmi_atf_peer_info peer_info[num_peers];
  30642. * - struct wmi_atf_peer_info_v2 peer_info_v2[num_peers];
  30643. */
  30644. } wmi_peer_atf_request_fixed_param;
  30645. #define WMI_ATF_GROUP_SCHED_POLICY_BIT_POS 0
  30646. #define WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS 4
  30647. #define WMI_ATF_GROUP_GET_GROUP_SCHED_POLICY(atf_group_flags) \
  30648. WMI_GET_BITS(atf_group_flags,WMI_ATF_GROUP_SCHED_POLICY_BIT_POS,WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS)
  30649. #define WMI_ATF_GROUP_SET_GROUP_SCHED_POLICY(atf_group_flags,val) \
  30650. WMI_SET_BITS(atf_group_flags,WMI_ATF_GROUP_SCHED_POLICY_BIT_POS,WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS,val)
  30651. typedef struct {
  30652. /** TLV tag and len; tag equals
  30653. * WMITLV_TAG_STRUC_wmi_atf_group_info */
  30654. A_UINT32 tlv_header;
  30655. A_UINT32 atf_group_id; /* ID of the Air Time Management group */
  30656. /* atf_group_units
  30657. * Fraction of air time allowed for the group, in per mille units
  30658. * (from 0-1000).
  30659. * For example, to indicate that the group can use 12.3% of the air time,
  30660. * the atf_group_units setting would be 123.
  30661. */
  30662. A_UINT32 atf_group_units;
  30663. /* atf_group_flags
  30664. * Bits 4-31 - Reserved (Shall be zero)
  30665. * Bits 0-3 - Group Schedule Policy (Fair/Strict/Fair with upper bound)
  30666. * Refer to WMI_ATF_SSID_ definitions
  30667. */
  30668. A_UINT32 atf_group_flags;
  30669. } wmi_atf_group_info;
  30670. #define WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS 0
  30671. #define WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS 16
  30672. #define WMI_ATF_GROUP_GET_NUM_EXPLICIT_PEERS(atf_total_num_peers) \
  30673. WMI_GET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS)
  30674. #define WMI_ATF_GROUP_SET_NUM_EXPLICIT_PEERS(atf_total_num_peers, val) \
  30675. WMI_SET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS, val)
  30676. #define WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS 16
  30677. #define WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS 16
  30678. #define WMI_ATF_GROUP_GET_NUM_IMPLICIT_PEERS(atf_total_num_peers) \
  30679. WMI_GET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS)
  30680. #define WMI_ATF_GROUP_SET_NUM_IMPLICIT_PEERS(atf_total_num_peers, val) \
  30681. WMI_SET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS, val)
  30682. typedef struct {
  30683. /** TLV tag and len; tag equals
  30684. * WMITLV_TAG_STRUC_wmi_atf_group_info_v2 */
  30685. A_UINT32 tlv_header;
  30686. A_UINT32 atf_group_id; /* ID of the Air Time Management group */
  30687. /* atf_group_units
  30688. * Fraction of air time allowed for the group, in per mille units
  30689. * (from 0-1000).
  30690. * For example, to indicate that the group can use 12.3% of the air time,
  30691. * the atf_group_units setting would be 123.
  30692. */
  30693. A_UINT32 atf_group_units;
  30694. /* atf_group_flags
  30695. * Bits 0-3 - Group Schedule Policy (Fair/Strict/Fair with upper bound)
  30696. * Refer to WMI_ATF_SSID_ definitions
  30697. * Bit 4-31 - Reserved (Shall be zero)
  30698. */
  30699. A_UINT32 atf_group_flags;
  30700. /* atf_total_num_peers
  30701. *
  30702. * Bits 0-15 - total number of explicit peers
  30703. * Bits 16-31 - total number of implicit peers
  30704. * An explicit peer has an ATF % configured by the user.
  30705. * An implicit peer has an ATF % =
  30706. * (Group_ATF_percent - Total_Explicit_Peers_ATF_Percent) /
  30707. * number of implicit peers
  30708. * This computation can be done in FW based on atf_total_num_peers.
  30709. */
  30710. A_UINT32 atf_total_num_peers;
  30711. /* atf_total_implicit_peer_units
  30712. *
  30713. * Air time allocated for all the implicit peers
  30714. * (from 0-1000, in per mille units)
  30715. */
  30716. A_UINT32 atf_total_implicit_peer_units;
  30717. } wmi_atf_group_info_v2;
  30718. typedef struct {
  30719. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_atf_ssid_grp_request_fixed_param */
  30720. A_UINT32 pdev_id;
  30721. /*
  30722. * Following this structure is the one of the following TLVs
  30723. * (only one of them will have valid data in a particular message)
  30724. * - struct wmi_atf_group_info group_info[];
  30725. * - struct wmi_atf_group_info_v2 group_info[];
  30726. */
  30727. } wmi_atf_ssid_grp_request_fixed_param;
  30728. /* ATF Configurations for WMM ACs of a group, value for each AC shall be in
  30729. * percentage (0-100).
  30730. * This perecentage is relative to the residual airtime (derived by FW)
  30731. * configured for the group.
  30732. * When WMM ATF is not configured for a peer all values shall be 0.
  30733. */
  30734. typedef struct {
  30735. /** TLV tag and len; tag equals
  30736. * WMITLV_TAG_STRUC_wmi_atf_group_wmm_ac_info
  30737. */
  30738. A_UINT32 tlv_header;
  30739. A_UINT32 atf_group_id; /* ID of the Air Time Management group */
  30740. A_UINT32 atf_units_be;
  30741. A_UINT32 atf_units_bk;
  30742. A_UINT32 atf_units_vi;
  30743. A_UINT32 atf_units_vo;
  30744. } wmi_atf_group_wmm_ac_info;
  30745. typedef struct {
  30746. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_atf_grp_wmm_ac_cfg_request_fixed_param */
  30747. A_UINT32 pdev_id;
  30748. /*
  30749. * Following this structure is the TLV:
  30750. * struct wmi_atf_group_wmm_ac_info group_info[];
  30751. */
  30752. } wmi_atf_grp_wmm_ac_cfg_request_fixed_param;
  30753. #define WMI_VDEV_LATENCY_TIDNUM_BIT_POS 0
  30754. #define WMI_VDEV_LATENCY_TIDNUM_NUM_BITS 8
  30755. #define WMI_VDEV_LATENCY_GET_TIDNUM(vdev_latency_info) \
  30756. WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_TIDNUM_BIT_POS, WMI_VDEV_LATENCY_TIDNUM_NUM_BITS)
  30757. #define WMI_VDEV_LATENCY_SET_TIDNUM(vdev_latency_info,val) \
  30758. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_TIDNUM_BIT_POS, WMI_VDEV_LATENCY_TIDNUM_NUM_BITS, val)
  30759. #define WMI_VDEV_LATENCY_AC_BIT_POS 8
  30760. #define WMI_VDEV_LATENCY_AC_NUM_BITS 2
  30761. #define WMI_VDEV_LATENCY_GET_AC(vdev_latency_info) \
  30762. WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_AC_BIT_POS, WMI_VDEV_LATENCY_AC_NUM_BITS)
  30763. #define WMI_VDEV_LATENCY_SET_AC(vdev_latency_info,val) \
  30764. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_AC_BIT_POS, WMI_VDEV_LATENCY_AC_NUM_BITS, val)
  30765. #define WMI_VDEV_LATENCY_DL_VALID_BIT_POS 10
  30766. #define WMI_VDEV_LATENCY_DL_VALID_NUM_BITS 1
  30767. #define WMI_VDEV_LATENCY_GET_DL_VALID(vdev_latency_info) \
  30768. WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_DL_VALID_BIT_POS, WMI_VDEV_LATENCY_DL_VALID_NUM_BITS)
  30769. #define WMI_VDEV_LATENCY_SET_DL_VALID(vdev_latency_info,val) \
  30770. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_DL_VALID_BIT_POS, WMI_VDEV_LATENCY_DL_VALID_NUM_BITS, val)
  30771. #define WMI_VDEV_LATENCY_UL_VALID_BIT_POS 11
  30772. #define WMI_VDEV_LATENCY_UL_VALID_NUM_BITS 1
  30773. #define WMI_VDEV_LATENCY_GET_UL_VALID(vdev_latency_info) \
  30774. WMI_GET_BITS(vdev_latency_info,WMI_VDEV_LATENCY_UL_VALID_BIT_POS, WMI_VDEV_LATENCY_UL_VALID_NUM_BITS)
  30775. #define WMI_VDEV_LATENCY_SET_UL_VALID(vdev_latency_info,val) \
  30776. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_UL_VALID_BIT_POS, WMI_VDEV_LATENCY_UL_VALID_NUM_BITS, val)
  30777. typedef struct {
  30778. /** TLV tag and len; tag equals
  30779. * WMITLV_TAG_STRUC_wmi_vdev_latency_info
  30780. */
  30781. A_UINT32 tlv_header;
  30782. /*
  30783. * Maximum expected average delay between 2 schedules in milliseconds
  30784. * of given TID type when it has active traffic.
  30785. * 0x0 is considered as invalid service interval.
  30786. */
  30787. A_UINT32 service_interval;
  30788. /* burst_size:
  30789. * The number of bytes transmitted (in DL TIDs) / received (in UL ACs)
  30790. * in service interval.
  30791. */
  30792. A_UINT32 burst_size;
  30793. /* max_latency:
  30794. * The maximum end to end latency expectation, in milliseconds.
  30795. * If this value is 0x0, it shall be ignored.
  30796. */
  30797. A_UINT32 max_latency;
  30798. /* max_per:
  30799. * The maximum PER (as a percent) for the peer-TID, in range 1 - 100.
  30800. * If this value is 0x0, it shall be ignored.
  30801. */
  30802. A_UINT32 max_per;
  30803. /* min_tput:
  30804. * The minimum guaranteed throughput to the peer-TID, in Kbps.
  30805. * If this value is 0x0, it shall be ignored.
  30806. */
  30807. A_UINT32 min_tput;
  30808. /* vdev_latency_info
  30809. * Bits 12 - 31 - Reserved (Shall be zero)
  30810. * Bit 11 - UL latency config indication.
  30811. * If this bit is set then this latency info will
  30812. * be used when triggering UL traffic. Until the
  30813. * AC specified in bits 8-9 has transferred at least
  30814. * burst_size amount of UL data within the service
  30815. * period, the AP will continue sending UL triggers
  30816. * when the STA has data of the specified access
  30817. * category ready to transmit.
  30818. * Note that the TID specified in bits 0-7 does not
  30819. * apply to UL; the TID-to-AC mapping applied to DL
  30820. * data that can be adjusted by the TID specified
  30821. * in bits 0-7 and the AC specified in bits 8-9 is
  30822. * distinct from the TID-to-AC mapping applied to
  30823. * UL data.
  30824. * Bit 10 - DL latency config indication. If the bit is set
  30825. * then DL TID will use this latency config.
  30826. * Bits 8 - 9 - This bit has info on the custom AC of DL TID.
  30827. * Also if bit 11 is set, the AP will apply some
  30828. * of these latency specs (in particular, burst_size)
  30829. * to UL traffic for this AC, by sending UL triggers
  30830. * until the desired amount of data has been received
  30831. * within the service period.
  30832. * Bits 0 - 7 - Specifies the TID of interest that corresponds
  30833. * to the AC specified in bits 8-9. This can be
  30834. * used to adjust the TID-to-AC mapping applied to
  30835. * DL data (if bit 10 is set).
  30836. */
  30837. A_UINT32 vdev_latency_info;
  30838. } wmi_vdev_latency_info;
  30839. /*
  30840. * Currently wmi_vdev_tid_latency_config_fixed_param will be sent per
  30841. * data tid to map the AC.
  30842. * Also to configure VDEV level latency config to be used by all TIDs
  30843. * based on the mapping.
  30844. * VDEV restart is expected during this command
  30845. */
  30846. typedef struct {
  30847. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tid_latency_config_fixed_param */
  30848. A_UINT32 pdev_id;
  30849. A_UINT32 vdev_id;
  30850. /*
  30851. * Following this structure is the TLV:
  30852. * struct wmi_vdev_latency_info vdev_latency_info[];
  30853. */
  30854. } wmi_vdev_tid_latency_config_fixed_param;
  30855. #define WMI_TID_LATENCY_TIDNUM_BIT_POS 0
  30856. #define WMI_TID_LATENCY_TIDNUM_NUM_BITS 8
  30857. #define WMI_TID_LATENCY_GET_TIDNUM(latency_tid_info) \
  30858. WMI_GET_BITS(latency_tid_info, WMI_TID_LATENCY_TIDNUM_BIT_POS, WMI_TID_LATENCY_TIDNUM_NUM_BITS)
  30859. #define WMI_TID_LATENCY_SET_TIDNUM(latency_tid_info,val) \
  30860. WMI_SET_BITS(latency_tid_info, WMI_TID_LATENCY_TIDNUM_BIT_POS, WMI_TID_LATENCY_TIDNUM_NUM_BITS, val)
  30861. #define WMI_TID_LATENCY_AC_BIT_POS 8
  30862. #define WMI_TID_LATENCY_AC_NUM_BITS 2
  30863. #define WMI_TID_LATENCY_GET_AC(latency_tid_info) \
  30864. WMI_GET_BITS(latency_tid_info, WMI_TID_LATENCY_AC_BIT_POS , WMI_TID_LATENCY_AC_NUM_BITS)
  30865. #define WMI_TID_LATENCY_SET_AC(latency_tid_info,val) \
  30866. WMI_SET_BITS(latency_tid_info, WMI_TID_LATENCY_AC_BIT_POS , WMI_TID_LATENCY_AC_NUM_BITS, val)
  30867. #define WMI_TID_LATENCY_DL_ENABLE_BIT_POS 10
  30868. #define WMI_TID_LATENCY_DL_ENABLE_NUM_BITS 1
  30869. #define WMI_TID_LATENCY_GET_DL_ENABLE(latency_tid_info) \
  30870. WMI_GET_BITS(latency_tid_info,WMI_TID_LATENCY_DL_ENABLE_BIT_POS, WMI_TID_LATENCY_DL_ENABLE_NUM_BITS)
  30871. #define WMI_TID_LATENCY_SET_DL_ENABLE(latency_tid_info,val) \
  30872. WMI_SET_BITS(latency_tid_info,WMI_TID_LATENCY_DL_ENABLE_BIT_POS, WMI_TID_LATENCY_DL_ENABLE_NUM_BITS, val)
  30873. #define WMI_TID_LATENCY_UL_ENABLE_BIT_POS 11
  30874. #define WMI_TID_LATENCY_UL_ENABLE_NUM_BITS 1
  30875. #define WMI_TID_LATENCY_GET_UL_ENABLE(latency_tid_info) \
  30876. WMI_GET_BITS(latency_tid_info,WMI_TID_LATENCY_UL_ENABLE_BIT_POS, WMI_TID_LATENCY_UL_ENABLE_NUM_BITS)
  30877. #define WMI_TID_LATENCY_SET_UL_ENABLE(latency_tid_info,val) \
  30878. WMI_SET_BITS(latency_tid_info,WMI_TID_LATENCY_UL_ENABLE_BIT_POS, WMI_TID_LATENCY_UL_ENABLE_NUM_BITS, val)
  30879. #define WMI_LATENCY_BURST_SIZE_SUM_BIT_POS 12
  30880. #define WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS 2
  30881. #define WMI_LATENCY_GET_BURST_SIZE_SUM(latency_tid_info) \
  30882. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_BURST_SIZE_SUM_BIT_POS, WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS)
  30883. #define WMI_LATENCY_SET_BURST_SIZE_SUM(latency_tid_info,val) \
  30884. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_BURST_SIZE_SUM_BIT_POS, WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS, val)
  30885. #define WMI_LATENCY_MSDUQ_ID_BIT_POS 14
  30886. #define WMI_LATENCY_MSDUQ_ID_NUM_BITS 4
  30887. #define WMI_LATENCY_GET_MSDUQ_ID(latency_tid_info) \
  30888. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_MSDUQ_ID_BIT_POS, WMI_LATENCY_MSDUQ_ID_NUM_BITS)
  30889. #define WMI_LATENCY_SET_MSDUQ_ID(latency_tid_info,val) \
  30890. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_MSDUQ_ID_BIT_POS, WMI_LATENCY_MSDUQ_ID_NUM_BITS, val)
  30891. #define WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS 18
  30892. #define WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS 1
  30893. #define WMI_LATENCY_GET_DISABLE_UL_OFDMA(latency_tid_info) \
  30894. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS, WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS)
  30895. #define WMI_LATENCY_SET_DISABLE_UL_OFDMA(latency_tid_info,val) \
  30896. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS, WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS, val)
  30897. #define WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS 19
  30898. #define WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS 1
  30899. #define WMI_LATENCY_GET_DISABLE_UL_MU_MIMO(latency_tid_info) \
  30900. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS, WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS)
  30901. #define WMI_LATENCY_SET_DISABLE_UL_MU_MIMO(latency_tid_info,val) \
  30902. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS, WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS, val)
  30903. #define WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS 20
  30904. #define WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS 1
  30905. #define WMI_LATENCY_GET_SAWF_UL_PARAMS_BIT(latency_tid_info) \
  30906. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS)
  30907. #define WMI_LATENCY_SET_SAWF_UL_PARAMS_BIT(latency_tid_info, val) \
  30908. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS, val)
  30909. typedef struct {
  30910. /** TLV tag and len; tag equals
  30911. * WMITLV_TAG_STRUC_wmi_tid_latency_info
  30912. */
  30913. A_UINT32 tlv_header;
  30914. wmi_mac_addr dest_macaddr; /* Mac address of end client */
  30915. /*
  30916. * Maximum expected average delay between 2 schedules in milliseconds
  30917. * of given TID type when it has active traffic.
  30918. * 0x0 is considered as invalid service interval.
  30919. */
  30920. A_UINT32 service_interval;
  30921. /*
  30922. * Cumulative number of bytes are expected to be transmitted or
  30923. * received in the service interval when this specific Peer-TID
  30924. * has active traffic.
  30925. * If cumulative number of bytes is 0x0, it is considered as
  30926. * invalid burst size. In that case, firmware would try to transmit
  30927. * and receive as many bytes as it can for this specific Peer-TID.
  30928. * This burst size will be added or subtracted from vdev burst size
  30929. * based on burst size sum bit in latency tid info.
  30930. * The VDEV burst size will be considered to be 0 when no VDEV latency
  30931. * command is received.
  30932. * If host needs to set burst size for a peer then they can use the
  30933. * peer cmd and set burst size sum bit to 1.
  30934. */
  30935. A_UINT32 burst_size_diff;
  30936. /* max_latency:
  30937. * The maximum end to end latency expectation, in milliseconds.
  30938. * If this value is 0x0, it shall be ignored.
  30939. */
  30940. A_UINT32 max_latency;
  30941. /* max_per:
  30942. * The maximum PER (as a percent) for the peer-TID, in range 1 - 100
  30943. * If this value is 0x0, it shall be ignored.
  30944. */
  30945. A_UINT32 max_per;
  30946. /* min_tput:
  30947. * The minimum guaranteed throughput to the peer-TID, in Kbps.
  30948. * If this value is 0x0, it shall be ignored.
  30949. */
  30950. A_UINT32 min_tput;
  30951. /* latency_tid_info
  30952. * Bits 21-31 - Reserved (Shall be zero)
  30953. * Bit 20 - Flag to indicate SAWF UL params (and not mesh latency)
  30954. * Bit 19 - Disable UL MU-MIMO. If set, UL MU-MIMO is disabled
  30955. * for the specified AC. Note that TID level control is
  30956. * not possible for UL MU-MIMO (the granularity is AC).
  30957. * Bit 18 - Disable UL OFDMA. If set, UL OFDMA is disabled for
  30958. * the specified AC. Note that TID level control is not
  30959. * possible for UL OFDMA (the granularity is AC).
  30960. * Bits 14-17 - MSDU queue flow id within the TID for configuring
  30961. * latency info per MSDU flow queue
  30962. * Bit 12-13 - burst size sum. Bit to indicate whether to add or
  30963. * subtract burst_size_diff from vdev cmd burst size:
  30964. * 1 -> addition
  30965. * 2 -> subtraction
  30966. * Bit 11 - UL latency config indication.
  30967. * If this bit is set then this latency info will
  30968. * be used when triggering UL traffic. Until the
  30969. * AC specified in bits 8-9 has transferred at least
  30970. * burst_size amount of UL data within the service
  30971. * period, the AP will continue sending UL triggers
  30972. * when the STA has data of the specified access
  30973. * category ready to transmit.
  30974. * Note that the TID specified in bits 0-7 does not
  30975. * apply to UL; the TID-to-AC mapping applied to DL
  30976. * data that can be adjusted by the TID specified
  30977. * in bits 0-7 and the AC specified in bits 8-9 is
  30978. * distinct from the TID-to-AC mapping applied to
  30979. * UL data.
  30980. * Bit 10 - DL latency config indication. If the bit is set
  30981. * then DL TID will use this latency config.
  30982. * Bits 8 - 9 - This bit has info on the custom AC of DL TID.
  30983. * Also if bit 11 is set, the AP will apply some
  30984. * of these latency specs (in particular, burst_size)
  30985. * to UL traffic for this AC, by sending UL triggers
  30986. * until the desired amount of data has been received
  30987. * within the service period.
  30988. * Bits 0 - 7 - Specifies the TID of interest that corresponds
  30989. * to the AC specified in bits 8-9. This can be
  30990. * used to adjust the TID-to-AC mapping applied to
  30991. * DL data (if bit 10 is set).
  30992. */
  30993. A_UINT32 latency_tid_info;
  30994. } wmi_tid_latency_info;
  30995. /*
  30996. * Currently wmi_peer_tid_set_latency_request_fixed_param will be sent
  30997. * per TID per latency configured client.
  30998. * In future this command might come for multiple latency configured
  30999. * clients together.
  31000. * The clients are expected to be associated while receiving this command.
  31001. */
  31002. typedef struct {
  31003. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_latency_config_fixed_param */
  31004. A_UINT32 pdev_id;
  31005. /*
  31006. * Following this structure is the TLV:
  31007. * struct wmi_tid_latency_info latency_info[];
  31008. */
  31009. } wmi_peer_tid_latency_config_fixed_param;
  31010. #define WMI_ATF_GROUP_CFG_PEER_BIT_POS 0
  31011. #define WMI_ATF_GROUP_CFG_PEER_NUM_BITS 1
  31012. #define WMI_ATF_GROUP_GET_CFG_PEER_BIT(atf_peer_flags) \
  31013. WMI_GET_BITS(atf_peer_flags,WMI_ATF_GROUP_CFG_PEER_BIT_POS,WMI_ATF_GROUP_CFG_PEER_NUM_BITS)
  31014. #define WMI_ATF_GROUP_SET_CFG_PEER_BIT(atf_peer_flags,val) \
  31015. WMI_SET_BITS(atf_peer_flags,WMI_ATF_GROUP_CFG_PEER_BIT_POS,WMI_ATF_GROUP_CFG_PEER_NUM_BITS,val)
  31016. typedef struct {
  31017. /** TLV tag and len; tag equals
  31018. * WMITLV_TAG_STRUC_wmi_peer_atf_ext_info */
  31019. A_UINT32 tlv_header;
  31020. wmi_mac_addr peer_macaddr;
  31021. A_UINT32 atf_group_id; /* Group Id of the peers for ATF SSID grouping */
  31022. /* atf_peer_flags
  31023. * Bits 1-31 - Reserved (Shall be zero)
  31024. * Bit 0 - Configured Peer Indication (0/1), this bit would be set by
  31025. * host to indicate that the peer has airtime % configured
  31026. * explicitly by user.
  31027. */
  31028. A_UINT32 atf_peer_flags;
  31029. } wmi_peer_atf_ext_info;
  31030. typedef struct {
  31031. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_ext_request_fixed_param */
  31032. A_UINT32 pdev_id;
  31033. /*
  31034. * Following this structure is the TLV:
  31035. * struct wmi_peer_atf_ext_info peer_ext_info[];
  31036. */
  31037. } wmi_peer_atf_ext_request_fixed_param;
  31038. /* Structure for Bandwidth Fairness peer information */
  31039. typedef struct {
  31040. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bwf_peer_info */
  31041. A_UINT32 tlv_header;
  31042. wmi_mac_addr peer_macaddr;
  31043. A_UINT32 bwf_guaranteed_bandwidth; /* BWF guaranteed_bandwidth for the peers in mbps */
  31044. A_UINT32 bwf_max_airtime; /* BWF Maximum airtime percentage that can be allocated to the peer to meet the guaranteed_bandwidth */
  31045. A_UINT32 bwf_peer_priority; /* BWF priority of the peer to allocate the tokens dynamically */
  31046. A_UINT32 vdev_id;
  31047. A_UINT32 pdev_id;
  31048. } wmi_bwf_peer_info;
  31049. /* Structure for Bandwidth Fairness peer request */
  31050. typedef struct {
  31051. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param */
  31052. A_UINT32 num_peers;
  31053. /*
  31054. * Following this structure is the TLV:
  31055. * struct wmi_bwf_peer_info peer_info[num_peers];
  31056. */
  31057. } wmi_peer_bwf_request_fixed_param;
  31058. /* Equal distribution of ATF air time within an VDEV. */
  31059. typedef struct {
  31060. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param */
  31061. A_UINT32 vdev_id;
  31062. A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
  31063. A_UINT32 pdev_id;
  31064. } wmi_vdev_atf_request_fixed_param;
  31065. typedef struct {
  31066. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param */
  31067. /** pdev_id for identifying the MAC
  31068. * See macros starting with WMI_PDEV_ID_ for values.
  31069. */
  31070. A_UINT32 pdev_id;
  31071. /** parameter */
  31072. A_UINT32 param;
  31073. } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
  31074. typedef struct {
  31075. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param */
  31076. /** pdev_id for identifying the MAC
  31077. * See macros starting with WMI_PDEV_ID_ for values.
  31078. */
  31079. A_UINT32 pdev_id;
  31080. /** parameter */
  31081. A_UINT32 param;
  31082. } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
  31083. typedef struct {
  31084. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param */
  31085. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  31086. A_UINT32 qb_enable;
  31087. wmi_mac_addr peer_macaddr;
  31088. } WMI_QBOOST_CFG_CMD_fixed_param;
  31089. #define WMI_INST_STATS_INVALID_RSSI 0
  31090. typedef struct {
  31091. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */
  31092. A_UINT32 iRSSI; /* dB above the noise floor */
  31093. /* peer MAC address */
  31094. wmi_mac_addr peer_macaddr;
  31095. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  31096. } wmi_inst_rssi_stats_resp_fixed_param;
  31097. typedef struct {
  31098. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info */
  31099. A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
  31100. } wmi_peer_cck_ofdm_rate_info;
  31101. typedef struct {
  31102. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info */
  31103. A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
  31104. A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
  31105. A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
  31106. A_UINT32 ratecode_160; /* Rate code for 160MHz BW */
  31107. A_UINT32 ratecode_320; /* Rate code for 320MHz BW */
  31108. } wmi_peer_mcs_rate_info;
  31109. typedef struct {
  31110. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param */
  31111. wmi_mac_addr peer_macaddr;
  31112. A_UINT32 ratecount; /* Max Rate count for each mode */
  31113. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  31114. A_UINT32 pdev_id; /* ID of the pdev this peer belongs to */
  31115. A_UINT32 ratecount_ext; /* Max Rate count for 160, 320MHz */
  31116. /*
  31117. * Following this structure are the TLV:
  31118. * struct wmi_peer_cck_ofdm_rate_info;
  31119. * struct wmi_peer_mcs_rate_info;
  31120. */
  31121. } wmi_peer_ratecode_list_event_fixed_param;
  31122. typedef struct wmi_wds_addr_event {
  31123. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param */
  31124. A_UINT32 event_type[4];
  31125. wmi_mac_addr peer_mac;
  31126. wmi_mac_addr dest_mac;
  31127. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  31128. } wmi_wds_addr_event_fixed_param;
  31129. /*
  31130. * Enum values for WMI_PEER_PS_SUPPORTED_BITMAP field,
  31131. * in wmi_peer_sta_ps_statechange_event structure.
  31132. */
  31133. typedef enum {
  31134. /* Used to indicate that peer_ps_valid is valid */
  31135. WMI_PEER_PS_VALID_SUPPORTED = 0x00000001,
  31136. /* Used to indicate that peer_ps_timestamp field is valid */
  31137. WMI_PEER_PS_TIMESTAMP_SUPPORTED = 0x00000002,
  31138. } WMI_PEER_PS_SUPPORTED_BITMAP;
  31139. typedef struct {
  31140. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param */
  31141. wmi_mac_addr peer_macaddr;
  31142. A_UINT32 peer_ps_state;
  31143. /* Start of extended structure */
  31144. /* Bitmap to indicate which fields in the extended structure are valid.
  31145. * Bitmap values correspond to enum WMI_PEER_PS_SUPPORTED_BITMAP
  31146. */
  31147. A_UINT32 peer_ps_supported_bitmap;
  31148. /* This field is used to indicate host of a valid PS state change.
  31149. * 1 - indicates a valid PS state change.
  31150. * 0 - indicates an invalid PS state change.
  31151. * Host to ignore the power save duration calculation when peer_ps_valid = 0
  31152. */
  31153. A_UINT32 peer_ps_valid;
  31154. /* This field indicates the time since target boot-up in MilliSeconds. */
  31155. A_UINT32 peer_ps_timestamp;
  31156. /* Indicates the vdev id for MLO case */
  31157. wmi_vdev_id_info vdev_id_info;
  31158. } wmi_peer_sta_ps_statechange_event_fixed_param;
  31159. /* WMI_PDEV_FIPS_EVENTID */
  31160. typedef struct {
  31161. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  31162. union {
  31163. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  31164. /** pdev_id for identifying the MAC
  31165. * See macros starting with WMI_PDEV_ID_ for values.
  31166. */
  31167. A_UINT32 pdev_id;
  31168. };
  31169. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  31170. A_UINT32 data_len; /* Data length */
  31171. /*
  31172. * Following this structure is the TLV:
  31173. * A_UINT32 data[1]; <-- Out Data (keep this in the end)
  31174. */
  31175. } wmi_pdev_fips_event_fixed_param;
  31176. typedef struct {
  31177. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  31178. A_UINT32 pdev_id;
  31179. A_UINT32 fips_cookie; /* Cookie value to identify test vector */
  31180. A_UINT32 cmd_frag_idx; /* Fragment Number */
  31181. A_UINT32 more_bit;
  31182. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  31183. A_UINT32 data_len; /* Data length CTlen+ TAGlen*/
  31184. /*
  31185. * Following this structure is the TLV:
  31186. * A_UINT32 data[1]; <-- Out Data (ciphertext+tag)
  31187. */
  31188. } wmi_pdev_fips_extend_event_fixed_param;
  31189. typedef struct {
  31190. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param */
  31191. union {
  31192. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  31193. /** pdev_id for identifying the MAC
  31194. * See macros starting with WMI_PDEV_ID_ for values.
  31195. */
  31196. A_UINT32 pdev_id;
  31197. };
  31198. /* Noise threshold iterations with high values */
  31199. A_UINT32 noise_floor_report_iter;
  31200. /* Total noise threshold iterations */
  31201. A_UINT32 noise_floor_total_iter;
  31202. } wmi_pdev_channel_hopping_event_fixed_param;
  31203. enum {
  31204. WMI_PDEV_RESERVE_AST_ENTRY_OK,
  31205. WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
  31206. WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
  31207. };
  31208. typedef struct {
  31209. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param */
  31210. union {
  31211. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  31212. /** pdev_id for identifying the MAC
  31213. * See macros starting with WMI_PDEV_ID_ for values.
  31214. */
  31215. A_UINT32 pdev_id;
  31216. };
  31217. A_UINT32 rate_flags;
  31218. /**
  31219. * FLAG_ONE_CHAIN 0x00000001 - one chain mask
  31220. * FLAG_TWO_CHAIN 0x00000003 - two chain mask
  31221. * FLAG_THREE_CHAIN 0x00000007 - three chain mask
  31222. * FLAG_FOUR_CHAIN 0x0000000F - four chain mask
  31223. * FLAG_FIVE_CHAIN 0x0000001F - five chain mask
  31224. * FLAG_SIX_CHAIN 0x0000003F - six chain mask
  31225. * FLAG_SEVEN_CHAIN 0x0000007F - seven chain mask
  31226. * FLAG_EIGHT_CHAIN 0x000000FF - eight chain mask
  31227. * FLAG_STBC 0x00000100 - STBC is set
  31228. * FLAG_40MHZ 0x00000200 - bits 9-10 used for BW:
  31229. * FLAG_80MHZ 0x00000400 (bw >> 9) & 3 will give
  31230. * FLAG_160MHZ 0x00000600 1 -> 40 MHz, 2 -> 80 MHz, 3 -> 160 MHz
  31231. * FLAG_TXBF 0x00000800 - Tx Bf enabled
  31232. * FLAG_RTSENA 0x00001000 - RTS enabled
  31233. * FLAG_CTSENA 0x00002000 - CTS enabled
  31234. * FLAG_LDPC 0x00004000 - LDPC set
  31235. * FLAG_SGI 0x00008000 - Short guard interval
  31236. * (0x00010000-0x00080000 unused)
  31237. *------------------
  31238. * 0x00100000-0x00700000 used for SU/MU/OFDMA tx mode
  31239. * FLAG_SU 0x00100000 - SU Data
  31240. * FLAG_DL_MU_MIMO_AC 0x00200000 - DL AC MU data
  31241. * FLAG_DL_MU_MIMO_AX 0x00300000 - DL AX MU data
  31242. * FLAG_DL_OFDMA 0x00400000 - DL OFDMA data
  31243. * FLAG_UL_OFDMA 0x00500000 - UL OFDMA data
  31244. * FLAG_UL_MU_MIMO 0x00600000 - UL MU data
  31245. *------------------
  31246. * */
  31247. A_UINT32 nss;
  31248. /**
  31249. * NSS 0x0 - 0x7
  31250. * */
  31251. A_UINT32 preamble;
  31252. /**
  31253. * PREAM_OFDM - 0x0
  31254. * PREAM_CCK - 0x1
  31255. * PREAM_HT - 0x2
  31256. * PREAM_VHT - 0x3
  31257. * PREAM_HE - 0x4
  31258. * */
  31259. A_UINT32 hw_rate;
  31260. /**
  31261. * *** HW_OFDM_RATE ***
  31262. * OFDM_48_MBPS - 0x0
  31263. * OFDM_24_MBPS - 0x1
  31264. * OFDM_12_MBPS - 0x2
  31265. * OFDM_6_MBPS - 0x3
  31266. * OFDM_54_MBPS - 0x4
  31267. * OFDM_36_MBPS - 0x5
  31268. * OFDM_18_MBPS - 0x6
  31269. * OFDM_9_MBPS - 0x7
  31270. *
  31271. * *** HW_CCK_RATE ***
  31272. * CCK_11_LONG_MBPS - 0x0
  31273. * CCK_5_5_LONG_MBPS - 0x1
  31274. * CCK_2_LONG_MBPS - 0x2
  31275. * CCK_1_LONG_MBPS - 0x3
  31276. * CCK_11_SHORT_MBPS - 0x4
  31277. * CCK_5_5_SHORT_MBPS - 0x5
  31278. * CCK_2_SHORT_MBPS - 0x6
  31279. *
  31280. * *** HW_HT / VHT_RATE ***
  31281. * MCS 0x0 - 0xb
  31282. * */
  31283. } wmi_pdev_get_tpc_cmd_fixed_param;
  31284. typedef struct {
  31285. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
  31286. /** pdev_id for identifying the MAC
  31287. * See macros starting with WMI_PDEV_ID_ for values.
  31288. */
  31289. A_UINT32 pdev_id;
  31290. } wmi_pdev_get_chip_power_stats_cmd_fixed_param;
  31291. typedef struct {
  31292. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_bcn_recv_stats_cmd_fixed_param */
  31293. /** VDEV identifier */
  31294. A_UINT32 vdev_id;
  31295. } wmi_vdev_get_bcn_recv_stats_cmd_fixed_param;
  31296. typedef struct {
  31297. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_xgap_enable_cmd_fixed_param */
  31298. A_UINT32 beacon_interval; /* in TU */
  31299. A_UINT32 sap_lp_flag; /* bit 0 : set/unset for enter/exit XGAP */
  31300. A_UINT32 dialog_token;
  31301. A_UINT32 duration; /* in us : sap LP enter/exit duration, 0 for permanent exit */
  31302. } wmi_xgap_enable_cmd_fixed_param;
  31303. typedef struct {
  31304. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_xgap_enable_complete_event_fixed_param */
  31305. A_UINT32 dialog_token;
  31306. A_UINT32 next_tsf_low32;
  31307. A_UINT32 next_tsf_high32;
  31308. } wmi_xgap_enable_complete_event_fixed_param;
  31309. /*
  31310. * wmi mws-coex command IDs
  31311. */
  31312. typedef enum {
  31313. WMI_MWS_COEX_STATE = 0x01,
  31314. WMI_MWS_COEX_DPWB_STATE,
  31315. WMI_MWS_COEX_TDM_STATE,
  31316. WMI_MWS_COEX_IDRX_STATE,
  31317. WMI_MWS_COEX_ANTENNA_SHARING_STATE,
  31318. } wmi_mws_coex_cmd_id;
  31319. typedef struct {
  31320. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_cmd_fixed_param */
  31321. /** VDEV identifier */
  31322. A_UINT32 vdev_id;
  31323. /** Command ID (type: wmi_mws_coex_cmd_id) */
  31324. A_UINT32 cmd_id;
  31325. } wmi_vdev_get_mws_coex_info_cmd_fixed_param;
  31326. typedef struct {
  31327. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
  31328. /** pdev_id for identifying the MAC
  31329. * See macros starting with WMI_PDEV_ID_ for values.
  31330. */
  31331. A_UINT32 pdev_id;
  31332. /*
  31333. * Following this structure is the TLV:
  31334. * A_UINT32 tpc[2];
  31335. * tpc[0] - maximum power per rate
  31336. * tpc[1] - minimum power per rate
  31337. * Currently this event only provides max and min power limits
  31338. * for a single rate. In the future this event may be expanded
  31339. * to provide the information for multiple rates.
  31340. * At that time, the format of the data will be provided.
  31341. */
  31342. } wmi_pdev_tpc_event_fixed_param;
  31343. typedef struct {
  31344. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param */
  31345. union {
  31346. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  31347. /** pdev_id for identifying the MAC
  31348. * See macros starting with WMI_PDEV_ID_ for values.
  31349. */
  31350. A_UINT32 pdev_id;
  31351. };
  31352. A_UINT32 nfdBr_len;
  31353. A_UINT32 nfdBm_len;
  31354. A_UINT32 freqNum_len;
  31355. /*
  31356. * Following this structure is the TLV:
  31357. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
  31358. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
  31359. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
  31360. */
  31361. } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
  31362. typedef struct {
  31363. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr */
  31364. A_UINT32 nfdBr;
  31365. } wmi_pdev_nfcal_power_all_channels_nfdBr;
  31366. typedef struct {
  31367. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm */
  31368. A_UINT32 nfdBm;
  31369. } wmi_pdev_nfcal_power_all_channels_nfdBm;
  31370. typedef struct {
  31371. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum */
  31372. A_UINT32 freqNum;
  31373. } wmi_pdev_nfcal_power_all_channels_freqNum;
  31374. /* Bit set/unset definitions for valid_bitmap field in ani_cck_event */
  31375. #define WMI_ANI_CCK_EVENT_PDEV_ID_SET(bitmap, val) \
  31376. WMI_SET_BITS(bitmap, 0, 8, val)
  31377. #define WMI_ANI_CCK_EVENT_PDEV_ID_GET(bitmap) \
  31378. WMI_GET_BITS(bitmap, 0, 8)
  31379. #define WMI_ANI_CCK_EVENT_PDEV_ID_VALID_BIT_SET(bitmap, val) \
  31380. WMI_SET_BITS(bitmap, 31, 1, val)
  31381. #define WMI_ANI_CCK_EVENT_PDEV_ID_VALID_BIT_GET(bitmap) \
  31382. WMI_GET_BITS(bitmap, 31, 1)
  31383. typedef struct {
  31384. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param */
  31385. A_UINT32 cck_level;
  31386. union {
  31387. A_UINT32 pdev_id_valid__pdev_id__word;
  31388. struct {
  31389. /**
  31390. * word containng the pdev_id for identifying the MAC
  31391. * Contents:
  31392. * bits 7:0 - pdev ID
  31393. * bits 30:8 - reserved
  31394. * bit 31 - pdev ID valid flag
  31395. * See macros starting with WMI_ANI_CCK_EVENT_PDEV_ID_ for values.
  31396. * pdev_id is valid when pdev_id_valid is set.
  31397. */
  31398. A_UINT32 pdev_id: 8,
  31399. reserved: 23,
  31400. pdev_id_valid: 1;
  31401. };
  31402. };
  31403. } wmi_ani_cck_event_fixed_param;
  31404. typedef enum wmi_power_debug_reg_fmt_type {
  31405. /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
  31406. * SOC_SYSTEM_SLEEP
  31407. * WLAN_SYSTEM_SLEEP
  31408. * RTC_SYNC_FORCE_WAKE
  31409. * MAC_DMA_ISR
  31410. * MAC_DMA_TXRX_ISR
  31411. * MAC_DMA_ISR_S1
  31412. * MAC_DMA_ISR_S2
  31413. * MAC_DMA_ISR_S3
  31414. * MAC_DMA_ISR_S4
  31415. * MAC_DMA_ISR_S5
  31416. * MAC_DMA_ISR_S6
  31417. * MAC_DMA_ISR_S7
  31418. */
  31419. WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
  31420. WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
  31421. } WMI_POWER_DEBUG_REG_FMT_TYPE;
  31422. typedef struct {
  31423. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
  31424. A_UINT32 cumulative_sleep_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  31425. A_UINT32 cumulative_total_on_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  31426. A_UINT32 deep_sleep_enter_counter; /* count of number of times chip enterred deep sleep */
  31427. A_UINT32 last_deep_sleep_enter_tstamp_ms; /* Last Timestamp when Chip went to deep sleep */
  31428. A_UINT32 debug_register_fmt; /* WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers being dumped as part of the event */
  31429. A_UINT32 num_debug_register; /* number of debug registers being sent to host */
  31430. /*
  31431. * Following this structure is the TLV:
  31432. * A_UINT32 debug_registers[num_debug_registers];
  31433. */
  31434. } wmi_pdev_chip_power_stats_event_fixed_param;
  31435. typedef struct {
  31436. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_bcn_recv_stats_fixed_param */
  31437. A_UINT32 vdev_id;
  31438. /* total_bcn_cnt
  31439. * total beacon count (tbtt instances)
  31440. * After this value reaches 255 it saturates and stays at 255.
  31441. * This field is used to determine which of the 256 bits in the
  31442. * bmiss_bitmap field are valid.
  31443. */
  31444. A_UINT32 total_bcn_cnt;
  31445. /* total_bmiss_cnt
  31446. * Total beacon miss count in last 255 beacons, max value is 255.
  31447. * This value is the number of bits set within bmiss_bitmap.
  31448. */
  31449. A_UINT32 total_bmiss_cnt;
  31450. /* bmiss_bitmap
  31451. * This bitmap indicates the status of the last 255 beacons.
  31452. * If a bit is set, that means the corresponding beacon was missed.
  31453. * Bit 0 of bmiss_bitmap[0] represents the most recent beacon.
  31454. * The total_bcn_cnt field indicates how many bits within bmiss_bitmap
  31455. * are valid.
  31456. */
  31457. A_UINT32 bmiss_bitmap[8];
  31458. } wmi_vdev_bcn_recv_stats_fixed_param;
  31459. typedef struct {
  31460. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param */
  31461. A_UINT32 vdev_id;
  31462. /* LTE-WLAN coexistence scheme bitmap
  31463. * Indicates the final schemes applied for the current Coex scenario.
  31464. * Bit 0 - TDM policy
  31465. * Bit 1 - Forced TDM policy
  31466. * Bit 2 - Dynamic Power Back-off policy
  31467. * Bit 3 - Channel Avoidance policy
  31468. * Bit 4 - Static Power Back-off policy
  31469. */
  31470. A_UINT32 coex_scheme_bitmap;
  31471. /* Active conflict count
  31472. * Indicates the number of Active conflicts for the current WLAN and LTE frequency combinations.
  31473. */
  31474. A_UINT32 active_conflict_count;
  31475. /* Potential conflict count
  31476. * Indicates the number of Potential conflicts for the current WLAN and LTE frequency combinations.
  31477. */
  31478. A_UINT32 potential_conflict_count;
  31479. /* Bitmap of the group-0 WLAN channels to be avoided during LTE-WLAN coex operation.
  31480. * Indicates the WLAN channels to be avoided in b/w WLAN CH-1 and WLAN CH-14.
  31481. */
  31482. A_UINT32 chavd_group0_bitmap;
  31483. /* Bitmap of the group-1 WLAN channels to be avoided during LTE-WLAN coex operation.
  31484. * Indicates the WLAN channels to be avoided in b/w WLAN CH-36 and WLAN CH-64.
  31485. */
  31486. A_UINT32 chavd_group1_bitmap;
  31487. /* Bitmap of the group-2 WLAN channels to be avoided during LTE-WLAN coex operation.
  31488. * Indicates the WLAN channels to be avoided in b/w WLAN CH-100 and WLAN CH-140.
  31489. */
  31490. A_UINT32 chavd_group2_bitmap;
  31491. /* Bitmap of the group-3 WLAN channels to be avoided during LTE-WLAN coex operation.
  31492. * Indicates the WLAN channels to be avoided in b/w WLAN CH-149 and WLAN CH-165.
  31493. */
  31494. A_UINT32 chavd_group3_bitmap;
  31495. } wmi_vdev_get_mws_coex_state_fixed_param;
  31496. typedef struct {
  31497. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param */
  31498. A_UINT32 vdev_id;
  31499. /* Current state of the Dynamic Power Back-off state machine
  31500. * MWSCOEX_PWB_UNINIT_STATE = 0, PWB state machine is in un-intialized state.
  31501. * MWSCOEX_PWB_WLAN_ON_SINR_START_STATE = 1, SINR measurement starts when WLAN is on
  31502. * MWSCOEX_PWB_WLAN_ON_WAIT_RESP_STATE = 2, Waiting for SINR response when WLAN is on
  31503. * MWSCOEX_PWB_WLAN_OFF_AWAIT_STATE = 3, WLAN off state for buffer between SINR on/off measurement.
  31504. * MWSCOEX_PWB_WLAN_OFF_SINR_START_STATE = 4, SINR measurement starts when WLAN is off
  31505. * MWSCOEX_PWB_WLAN_OFF_WAIT_RESP_STATE = 5, Waiting for SINR response when WLAN is off
  31506. * MWSCOEX_PWB_WLAN_OFF_SINR_STOP_STATE = 6, SINR measurement stops when WLAN is off
  31507. * MWSCOEX_PWB_FORCED_TDM_STATE = 7, Entered Forced TDM state.
  31508. * MWSCOEX_PWB_HALTED_STATE = 8, Power back-off algorithm halted.
  31509. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_START_STATE = 9, SINR measurement starts in WLAN always on state.
  31510. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_STOP_STATE = 10, SINR measurement stops in WLAN always on state.
  31511. */
  31512. A_UINT32 current_dpwb_state;
  31513. /* P(N+1) value in dBm i.e. Tx power to be applied in the next Dynamic Power Back-off cycle,
  31514. * where P(N) is the power applied during current cycle.
  31515. * ranges from 3dBm to 21 dBM
  31516. */
  31517. A_INT32 pnp1_value;
  31518. /* Indicates the duty cycle of current LTE frame.
  31519. * Duty cycle: Number of UL slots with uplink data and allocated RBs.
  31520. */
  31521. A_UINT32 lte_dutycycle;
  31522. /* LTE SINR value in dB, when WLAN is ON. */
  31523. A_INT32 sinr_wlan_on;
  31524. /* LTE SINR value in dB, when WLAN is OFF. */
  31525. A_INT32 sinr_wlan_off;
  31526. /* LTE blocks with error for the current bler report.
  31527. * Number of LTE blocks with error for a given number (block_count) of LTE blocks.
  31528. */
  31529. A_UINT32 bler_count;
  31530. /* Number of LTE blocks considered for bler count report.
  31531. * Bler repot will be generated after the reception of every "block_count" number of blocks.
  31532. */
  31533. A_UINT32 block_count;
  31534. /* WLAN RSSI level
  31535. * WLAN RSSI is divided in to 3 levels i.e. Good/Moderate/Low (configurable inside f/w)
  31536. * 0-Good, 1-Moderate, 2-Low
  31537. */
  31538. A_UINT32 wlan_rssi_level;
  31539. /* WLAN RSSI value in dBm considered in Dynamic Power back-off algorithm
  31540. * Dynamic power back-off algorithm considers either Rx data frame RSSI/Beacon RSSI based on some constraints.
  31541. */
  31542. A_INT32 wlan_rssi;
  31543. /* Indicates whether any TDM policy triggered from Dynamic power back-off policy.
  31544. * 1 - TDM triggered.
  31545. * 0 - TDM not triggered.
  31546. */
  31547. A_UINT32 is_tdm_running;
  31548. } wmi_vdev_get_mws_coex_dpwb_state_fixed_param;
  31549. typedef struct {
  31550. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param */
  31551. A_UINT32 vdev_id;
  31552. /* Time Division Multiplexing (TDM) LTE-Coex Policy type.
  31553. * There are totally 4 types of TDM policies(1-SINR TDM, 2-RSSI TDM, 3-LOW RX RATE TDM, 4-STICKY TDM)
  31554. * Bit 0 - SINR TDM policy.
  31555. * Bit 1 - RSSI TDM policy.
  31556. * Bit 2 - Low Rx rate TDM policy
  31557. * Bit 3 - Sticky TDM policy
  31558. */
  31559. A_UINT32 tdm_policy_bitmap;
  31560. /* TDM LTE/WLAN sub-frame bitmap
  31561. * Indicates the bitmap of LTE/WLAN sub-frames.
  31562. * value 0: WLAN slot.
  31563. * value 1: LTE slot.
  31564. */
  31565. A_UINT32 tdm_sf_bitmap;
  31566. } wmi_vdev_get_mws_coex_tdm_state_fixed_param;
  31567. typedef struct {
  31568. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param */
  31569. A_UINT32 vdev_id;
  31570. /* SUB0 LTE-coex tech.
  31571. *------------------------
  31572. * TECH TECH_ID
  31573. *------------------------
  31574. * LTE 0
  31575. * TDSCDMA 1
  31576. * GSM1 2
  31577. * ONEX 3
  31578. * HDR 4
  31579. * WCDMA 5
  31580. * GSM2 6
  31581. * GSM3 7
  31582. * WCDMA2 8
  31583. * LTE2 9
  31584. * Indicates the type of WWAN technology used as SUB0 i.e. SIM slot 1
  31585. */
  31586. A_UINT32 sub0_techid;
  31587. /* SUB0 mitigation policy.
  31588. * Indicates the mitigation policy used to coexist with WLAN.
  31589. * 1 - Tx blanking
  31590. * 2 - Static power back-off
  31591. */
  31592. A_UINT32 sub0_policy;
  31593. /* Set if SUB0 is in link critical state.
  31594. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  31595. */
  31596. A_UINT32 sub0_is_link_critical;
  31597. /* LTE SUB0 imposed static power applied to WLAN due to LTE-WLAN coex.
  31598. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  31599. */
  31600. A_INT32 sub0_static_power;
  31601. /* LTE SUB0 RSSI value in dBm */
  31602. A_INT32 sub0_rssi;
  31603. /* SUB1 LTE-coex tech.
  31604. *------------------------
  31605. * TECH TECH_ID
  31606. *------------------------
  31607. * LTE 0
  31608. * TDSCDMA 1
  31609. * GSM1 2
  31610. * ONEX 3
  31611. * HDR 4
  31612. * WCDMA 5
  31613. * GSM2 6
  31614. * GSM3 7
  31615. * WCDMA2 8
  31616. * LTE2 9
  31617. * Indicates the type of WWAN technology used as SUB1 i.e. SIM slot 2
  31618. */
  31619. A_UINT32 sub1_techid;
  31620. /* SUB1 mitigation policy.
  31621. * Indicates the mitigation policy used to coexist with WLAN.
  31622. * 1 - Tx blanking
  31623. * 2 - Static power back-off
  31624. */
  31625. A_UINT32 sub1_policy;
  31626. /* Set if SUB1 is in link critical state.
  31627. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  31628. */
  31629. A_UINT32 sub1_is_link_critical;
  31630. /* LTE SUB1 imposed static power applied to WLAN due to LTE-WLAN coex.
  31631. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  31632. */
  31633. A_INT32 sub1_static_power;
  31634. /* LTE SUB1 RSSI value in dBm */
  31635. A_INT32 sub1_rssi;
  31636. } wmi_vdev_get_mws_coex_idrx_state_fixed_param;
  31637. typedef struct {
  31638. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param */
  31639. A_UINT32 vdev_id;
  31640. /* BDF values of Coex flags.
  31641. * coexflag 0x1 = MWS Coex enabled
  31642. * coexflag 0x3 = MWS Coex enabled + Antenna sharing enabled for WLAN operating in 2.4GHz band.
  31643. */
  31644. A_UINT32 coex_flags;
  31645. /* BDF values of Coex Antenna sharing config
  31646. * coex_config 0x0 = no Antenna sharing
  31647. * coexconfig 0x1 = switched based Antenna sharing
  31648. * coexconfig 0x2 = splitter based Antenna sharing
  31649. */
  31650. A_UINT32 coex_config;
  31651. /* Tx Chain mask value
  31652. * Bit 0: Tx chain-0
  31653. * Bit 1: Tx Chain-1
  31654. * value: 0x1 - Operating in 1X1
  31655. * value: 0x3 - Operating in 2X2
  31656. */
  31657. A_UINT32 tx_chain_mask;
  31658. /* Rx Chain mask value
  31659. * Bit 0: Rx chain-0
  31660. * Bit 1: Rx Chain-1
  31661. * value: 0x1 - Operating in 1X1
  31662. * value: 0x3 - Operating in 2X2
  31663. */
  31664. A_UINT32 rx_chain_mask;
  31665. /* Currently active Rx Spatial streams
  31666. * Bit 0: Rx Spatial Stream-0
  31667. * Bit 1: Rx Spatial Stream-1
  31668. */
  31669. A_UINT32 rx_nss;
  31670. /* Forced MRC policy type
  31671. * BTC_FORCED (0x01)
  31672. * RSSI_FORCED (0x02)
  31673. * MODEM_ACQ_FORCED (0x04)
  31674. */
  31675. A_UINT32 force_mrc;
  31676. /* RSSI value considered for MRC
  31677. * 1: Data RSSI
  31678. * 2: Beacon RSSI
  31679. */
  31680. A_UINT32 rssi_type;
  31681. /* RSSI value measured at Chain-0 in dBm */
  31682. A_INT32 chain0_rssi;
  31683. /* RSSI value measured at Chain-1 in dBm */
  31684. A_INT32 chain1_rssi;
  31685. /* RSSI value of two chains combined in dBm */
  31686. A_INT32 combined_rssi;
  31687. /* Absolute imbalance between two Rx chains in dB */
  31688. A_UINT32 imbalance;
  31689. /* RSSI threshold defined for the above imbalance value in dBm.
  31690. * Based on the degree of imbalance between the rx chains, different
  31691. * RSSI thresholds are used to determine whether MRC (Maximum-Ratio
  31692. * Combining) use of multiple rx chains is suitable.
  31693. * This field shows the RSSI threshold below which MRC is used.
  31694. */
  31695. A_INT32 mrc_threshold;
  31696. /* Antenna grant duration to WLAN, in milliseconds */
  31697. A_UINT32 grant_duration;
  31698. } wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param;
  31699. typedef enum wmi_chip_power_save_failure_reason_code_type {
  31700. WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON,
  31701. WMI_HW_POWER_SAVE_FAILURE_REASON,
  31702. WMI_CSS_LOCKED_POWER_FAILURE_REASON,
  31703. WMI_MAC0_LOCKED_POWER_FAILURE_REASON,
  31704. WMI_MAC1_LOCKED_POWER_FAILURE_REASON,
  31705. WMI_POWER_SAVE_FAILURE_REASON_MAX = 0xf,
  31706. } WMI_POWER_SAVE_FAILURE_REASON_TYPE;
  31707. typedef struct {
  31708. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_save_failure_detected_fixed_param */
  31709. A_UINT32 power_save_failure_reason_code; /* Chip power save failuire reason as defined in WMI_POWER_SAVE_FAILURE_REASON_TYPE */
  31710. A_UINT32 protocol_wake_lock_bitmap[4]; /* bitmap with bits set for modules (from WLAN_MODULE_ID enum) voting against sleep for prolonged duration */
  31711. } wmi_chip_power_save_failure_detected_fixed_param;
  31712. /* Bit set/unset definitions for valid_bitmap field in ani_ofdm_event */
  31713. #define WMI_ANI_OFDM_EVENT_PDEV_ID_BIT_SET(bitmap, val) \
  31714. WMI_SET_BITS(bitmap, 0, 8, val)
  31715. #define WMI_ANI_OFDM_EVENT_PDEV_ID_BIT_GET(bitmap) \
  31716. WMI_GET_BITS(bitmap, 0, 8)
  31717. #define WMI_ANI_OFDM_EVENT_PDEV_ID_VALID_BIT_SET(bitmap, val) \
  31718. WMI_SET_BITS(bitmap, 31, 1, val)
  31719. #define WMI_ANI_OFDM_EVENT_PDEV_ID_VALID_BIT_GET(bitmap) \
  31720. WMI_GET_BITS(bitmap, 31, 1)
  31721. typedef struct {
  31722. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param */
  31723. A_UINT32 ofdm_level;
  31724. union {
  31725. A_UINT32 pdev_id_valid__pdev_id__word;
  31726. struct {
  31727. /**
  31728. * word containng the pdev_id for identifying the MAC
  31729. * Contents:
  31730. * bits 7:0 - pdev ID
  31731. * bits 30:8 - reserved
  31732. * bit 31 - pdev ID valid flag
  31733. * See macros starting with WMI_ANI_OFDM_EVENT_PDEV_ID_ for values.
  31734. * pdev_id is valid when pdev_id_valid is set.
  31735. */
  31736. A_UINT32 pdev_id: 8,
  31737. reserved: 23,
  31738. pdev_id_valid: 1;
  31739. };
  31740. };
  31741. } wmi_ani_ofdm_event_fixed_param;
  31742. /* When a bit is set it specifies the particular WLAN traffic type is high priority.
  31743. * BT low priority traffic has higher priority than WLAN low priority traffic and has
  31744. * lower priority when compared to WLAN high priority traffic.
  31745. * BT high priority traffic has higher priority than WLAN low/high priority traffic.
  31746. */
  31747. #define WMI_PDEV_BE_PRIORITY_BIT (1<<0)
  31748. #define WMI_PDEV_BK_PRIORITY_BIT (1<<1)
  31749. #define WMI_PDEV_VI_PRIORITY_BIT (1<<2)
  31750. #define WMI_PDEV_VO_PRIORITY_BIT (1<<3)
  31751. #define WMI_PDEV_BEACON_PRIORITY_BIT (1<<4)
  31752. #define WMI_PDEV_MGMT_PRIORITY_BIT (1<<5)
  31753. #define WMI_PDEV_IS_BE_PRIORITY_SET(val) ((val) & WMI_PDEV_BE_PRIORITY_BIT)
  31754. #define WMI_PDEV_IS_BK_PRIORITY_SET(val) ((val) & WMI_PDEV_BK_PRIORITY_BIT)
  31755. #define WMI_PDEV_IS_VI_PRIORITY_SET(val) ((val) & WMI_PDEV_VI_PRIORITY_BIT)
  31756. #define WMI_PDEV_IS_VO_PRIORITY_SET(val) ((val) & WMI_PDEV_VO_PRIORITY_BIT)
  31757. #define WMI_PDEV_IS_BEACON_PRIORITY_SET(val) ((val) & WMI_PDEV_BEACON_PRIORITY_BIT)
  31758. #define WMI_PDEV_IS_MGMT_PRIORITY_SET(val) ((val) & WMI_PDEV_MGMT_PRIORITY_BIT)
  31759. /*
  31760. * For Maple 3-way coex, The interface will have following configurable
  31761. * priority bits to set relative priorities of WLAN/BT/3-radio PTA.
  31762. * To send below config host will use WMI_COEX_CONFIG_CMD command with
  31763. * config type WMI_COEX_CONFIG_THREE_WAY_COEX_START
  31764. * WMI_COEX_CONFIG_THREE_WAY_COEX_RESET
  31765. *
  31766. ** Bits 0 to 7 corresponds to Wifi
  31767. * Bit - 0: QCA_WIFI_BE
  31768. * Bit - 1: QCA_WIFI_BK
  31769. * Bit - 2: QCA_WIFI_VI
  31770. * Bit - 3: QCA_WIFI_VO
  31771. * Bit - 4: QCA_WIFI_BEACON
  31772. * Bit - 5: QCA_WIFI_MGMT
  31773. * Bits 6 - 7: Reserved
  31774. *
  31775. ** Bits 8 to 15 corresponds to BT
  31776. * Bit - 8: QCA_BT_ADVERTISER
  31777. * Bit - 9: QCA_BT_SCANNER
  31778. * Bit - 10: QCA_BT_BLE_CONNECTION
  31779. * Bits 11 to 15: Reserved
  31780. *
  31781. ** Bits 16 to 24 corresponds to 3-radio PTA,
  31782. * It can be anything BT/ZigBee connected to 802.15.4 radio
  31783. * Bit - 16: QCA_PTA_THIRD_RADIO_LOW
  31784. * Bit - 17: QCA_PTA_THIRD_RADIO_HIGH
  31785. * Bits 18 to 24: Reserved
  31786. *
  31787. ** Bits 25 to 31 Reserved for future use
  31788. */
  31789. #define WMI_PDEV_BT_ADVERTISER_PRIORITY_BIT (1 << 8)
  31790. #define WMI_PDEV_BT_SCANNER_PRIORITY_BIT (1 << 9)
  31791. #define WMI_PDEV_BT_BLE_CONNECTION_PRIORITY_BIT (1 << 10)
  31792. #define WMI_PDEV_IS_BT_ADVERTISER_PRIORITY_SET(val) \
  31793. ((val) & WMI_PDEV_BT_ADVERTISER_PRIORITY_BIT)
  31794. #define WMI_PDEV_IS_BT_SCANNER_PRIORITY_SET(val) \
  31795. ((val) & WMI_PDEV_BT_SCANNER_PRIORITY_BIT)
  31796. #define WMI_PDEV_IS_BT_BLE_CONNECTION_PRIORITY_SET(val) \
  31797. ((val) & WMI_PDEV_BT_BLE_CONNECTION_PRIORITY_BIT)
  31798. #define WMI_PDEV_PTA_THIRD_RADIO_LOW_PRIORITY_BIT (1 << 16)
  31799. #define WMI_PDEV_PTA_THIRD_RADIO_HIGH_PRIORITY_BIT (1 << 17)
  31800. #define WMI_PDEV_IS_PTA_THIRD_RADIO_LOW_PRIORITY_SET(val) \
  31801. ((val) & WMI_PDEV_PTA_THIRD_RADIO_LOW_PRIORITY_BIT)
  31802. #define WMI_PDEV_IS_PTA_THIRD_RADIO_HIGH_PRIORITY_SET(val) \
  31803. ((val) & WMI_PDEV_PTA_THIRD_RADIO_HIGH_PRIORITY_BIT)
  31804. typedef enum wmi_coex_algo_type {
  31805. WMI_COEX_ALGO_UNCONS_FREERUN = 0,
  31806. WMI_COEX_ALGO_FREERUN = 1,
  31807. WMI_COEX_ALGO_OCS = 2,
  31808. } WMI_COEX_ALGO_TYPE;
  31809. typedef enum wmi_coex_config_type {
  31810. WMI_COEX_CONFIG_PAGE_P2P_TDM = 1, /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
  31811. WMI_COEX_CONFIG_PAGE_STA_TDM = 2, /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
  31812. WMI_COEX_CONFIG_PAGE_SAP_TDM = 3, /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
  31813. WMI_COEX_CONFIG_DURING_WLAN_CONN = 4, /* config during WLAN connection */
  31814. WMI_COEX_CONFIG_BTC_ENABLE = 5, /* config to enable/disable BTC */
  31815. WMI_COEX_CONFIG_COEX_DBG = 6, /* config of COEX debug setting */
  31816. WMI_COEX_CONFIG_PAGE_P2P_STA_TDM = 7, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + PAGE */
  31817. WMI_COEX_CONFIG_INQUIRY_P2P_TDM = 8, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + INQUIRY */
  31818. WMI_COEX_CONFIG_INQUIRY_STA_TDM = 9, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + INQUIRY */
  31819. WMI_COEX_CONFIG_INQUIRY_SAP_TDM = 10, /* config interval (ms units) (arg1 BT, arg2 WLAN) for SAP + INQUIRY */
  31820. WMI_COEX_CONFIG_INQUIRY_P2P_STA_TDM = 11, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + INQUIRY */
  31821. WMI_COEX_CONFIG_TX_POWER = 12, /* config wlan total tx power when bt coex (arg1 is wlan_tx_power_limit, in 0.5 dBm units) */
  31822. 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) */
  31823. WMI_COEX_CONFIG_AP_TDM = 14, /* config interval (arg1 duty cycle in ms, arg2 WLAN duration in ms) for AP */
  31824. WMI_COEX_CONFIG_WLAN_SCAN_PRIORITY = 15, /* config to set WLAN priority during Off Channel Scan */
  31825. WMI_COEX_CONFIG_WLAN_PKT_PRIORITY = 16, /* config to set WLAN priority for BE/BK/VO/VI/Beacon/Management frame */
  31826. WMI_COEX_CONFIG_PTA_INTERFACE = 17, /* config PTA interface,
  31827. arg1 PTA num,
  31828. arg2 mode (2-wire/3-wire/PTA),
  31829. arg3 first slot time in microsec,
  31830. arg4 BT priority time in microsec,
  31831. arg5 PTA algorithm (WMI_COEX_ALGO_TYPE),
  31832. arg6 PTA priority */
  31833. WMI_COEX_CONFIG_BTC_DUTYCYCLE = 18, /* config interval (ms units) (arg1 WLAN pause duration, arg2 WLAN unpause duration) for WLAN UL + BT Rx */
  31834. WMI_COEX_CONFIG_HANDOVER_RSSI = 19, /* config to set WLAN RSSI (dBm units) at which device switches from Hybrid to TDD coex mode */
  31835. WMI_COEX_CONFIG_PTA_BT_INFO = 20, /* get BT information,
  31836. arg1 BT info type: WMI_COEX_PTA_BT_INFO_TYPE_T, scan/advertise/connection info,
  31837. arg2-arg5: BT information parameters */
  31838. WMI_COEX_CONFIG_SINK_WLAN_TDM = 21, /* config interval (ms units) (arg1 BT, arg2 WLAN) for A2DP SINK + WLAN */
  31839. WMI_COEX_CONFIG_COEX_ENABLE_MCC_TDM = 22, /* config disable/enable COEX TDM for MCC */
  31840. WMI_COEX_CONFIG_LOWRSSI_A2DPOPP_TDM = 23, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + A2dp + OPP + LOWRSSI */
  31841. WMI_COEX_CONFIG_BTC_MODE = 24, /* config BTC mode, arg1 mode: 0 TDD/1 FDD/2 Hybrid*/
  31842. WMI_COEX_CONFIG_ANTENNA_ISOLATION = 25, /* config isolation between BT and WLAN chains
  31843. * The arguments are interpreted differently
  31844. * depending on whether the target supports
  31845. * WMI_SERVICE_COEX_SUPPORT_UNEQUAL_ISOLATION
  31846. * If (not COEX_SUPPORT_UNEQUAL_ISOLATION) or arg2 == 0:
  31847. * arg1 => isolation between BT and WLAN chains,
  31848. * dB units,
  31849. * same isolation for all chains
  31850. * Else:
  31851. * arg1 bits 7:0 - chain 0 isolation, in dB
  31852. * arg1 bits 15:8 - chain 1 isolation, in dB
  31853. * arg1 bits 23:16 - chain 2 isolation, in dB
  31854. * arg1 bits 31:24 - chain 3 isolation, in dB
  31855. * arg2 - 0 => Equal isolation b/w BT and each WLAN chain (default)
  31856. * 1 => Different isolation b/w BT and each WLAN chain
  31857. */
  31858. WMI_COEX_CONFIG_BT_LOW_RSSI_THRESHOLD = 26, /* config BT low RSSI threshold (dBm units) */
  31859. WMI_COEX_CONFIG_BT_INTERFERENCE_LEVEL = 27, /* config BT interference level (dBm units)
  31860. arg1 low - lower limit
  31861. arg2 low - upper limit
  31862. arg3 medium - lower limit
  31863. arg4 medium - upper limit
  31864. arg5 high - lower limit
  31865. arg6 high - upper limit */
  31866. WMI_COEX_CONFIG_WLAN_OVER_ZBLOW = 28, /* config to boost WiFi traffic over 15.4 Low prio traffic */
  31867. 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 */
  31868. WMI_COEX_CONFIG_WLAN_CONN_OVER_LE = 30, /* config to elevate Wifi priority over BLE during WLAN association */
  31869. WMI_COEX_CONFIG_LE_OVER_WLAN_TRAFFIC = 31, /* config to elevate BLE traffic over WiFi traffic */
  31870. WMI_COEX_CONFIG_THREE_WAY_COEX_RESET = 32, /* config to reset the weights to default */
  31871. /* WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA
  31872. * config to T_PRIO T_DELAY parameter for each case
  31873. * arg1 - wlan/bt state
  31874. * 0: beacon tx
  31875. * 1: wlan connecting
  31876. * 2: wlan in dhcp
  31877. * 3: a2dp critical
  31878. * 4: eSCO
  31879. * arg2 - t_prio for low priority traffic (microsecond units)
  31880. * arg3 - t_delay for low priority traffic (microsecond units)
  31881. * arg4 - t_prio for high priority traffic (microsecond units)
  31882. * arg5 - t_delay for high priority traffic (microsecond units)
  31883. */
  31884. WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA = 33,
  31885. /* WMI_COEX_CONFIG_THREE_WAY_COEX_START
  31886. * config to set coex parameters from WLAN host to adjust priorities
  31887. * among wlan/bt/zb
  31888. * arg1 - priority level 1, the serialized coex scenorio ID will be put here
  31889. * arg2 - priority level 2, same parameters rules as arg1
  31890. * arg3 - priority level 3, same parameters rules as arg1
  31891. * arg4 - priority level 4, same parameters rules as arg1
  31892. */
  31893. WMI_COEX_CONFIG_THREE_WAY_COEX_START = 34,
  31894. /* WMI_COEX_CONFIG_MPTA_HELPER_ENABLE
  31895. * config to enable(1)/disable(0) mpta-helper function
  31896. */
  31897. WMI_COEX_CONFIG_MPTA_HELPER_ENABLE = 35,
  31898. /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE
  31899. * config zigbee state
  31900. * arg1: zigbee state
  31901. * (idle form-network wait-join join-network network-up HMI)
  31902. */
  31903. WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE = 36,
  31904. /* WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS
  31905. * config ocs wlan/nonwlan params after MPTA interrupt fired
  31906. * arg1: wlan duration (ms units) in Shape-OCS
  31907. * arg2: nonwlan duration (ms units) in Shape-OCS
  31908. */
  31909. WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS = 37,
  31910. /* WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS
  31911. * config ocs wlan/nonwlan params during monitor period after
  31912. * interrupt period finished
  31913. * arg1: wlan duration (ms units) in Shape-OCS
  31914. * arg2: nonwlan duration (ms units) in Shape-OCS
  31915. */
  31916. WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS = 38,
  31917. /* WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION
  31918. * config ocs duration in interrupt period and monitor period
  31919. * arg1: duration (ms units) in interrupt period
  31920. * arg2: duration (ms units) in monitor period
  31921. */
  31922. WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION = 39,
  31923. /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL
  31924. * config zigbee channel 11 - 26
  31925. */
  31926. WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL = 40,
  31927. /* WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION
  31928. * config msw mute duration (ms units) after MPTA interrupt fired
  31929. */
  31930. WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION = 41,
  31931. /* WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN
  31932. * allow WLAN scan on 2.4G channel when BT SCO connectivity is alive
  31933. */
  31934. WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN = 42,
  31935. /* WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR
  31936. * config to enable(1)/disable(0) WAR of BT 2nd harmonic issue function
  31937. */
  31938. WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR = 43,
  31939. /* WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE
  31940. * config BTC separate chain mode or shared mode
  31941. */
  31942. WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE = 44,
  31943. /* WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING
  31944. * enable WLAN throughput shaping while BT scanning
  31945. */
  31946. WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING = 45,
  31947. /* WMI_COEX_CONFIG_ENABLE_TXBF
  31948. * enable WLAN tx beamforming during coex case
  31949. */
  31950. WMI_COEX_CONFIG_ENABLE_TXBF = 46,
  31951. /* WMI_COEX_CONFIG_FORCED_ALGO
  31952. * config to select coex algorithm
  31953. * arg1: select fixed coex algorithm
  31954. */
  31955. WMI_COEX_CONFIG_FORCED_ALGO = 47,
  31956. /* WMI_COEX_CONFIG_LE_SCAN_POLICY
  31957. * BLE scan Coex policy hint
  31958. * 0 to place more emphasis on BLE Scan results
  31959. * 1 to place more emphasis on WLAN performance
  31960. */
  31961. WMI_COEX_CONFIG_LE_SCAN_POLICY = 48,
  31962. /* WMI_COEX_CONFIG_BT_RX_PER_THRESHOLD
  31963. * config BT RX PER threshold
  31964. */
  31965. WMI_COEX_CONFIG_BT_RX_PER_THRESHOLD = 49,
  31966. /* WMI_COEX_SET_TRAFFIC_SHAPING_MODE
  31967. * arg1: 0 (WMI_COEX_TRAFFIC_SHAPING_MODE_DISABLED)
  31968. * Disable coex policies and set fixed arbitration config.
  31969. * 1 (WMI_COEX_TRAFFIC_SHAPING_MODE_ENABLED)
  31970. * Enable all coex policies.
  31971. */
  31972. WMI_COEX_SET_TRAFFIC_SHAPING_MODE = 50,
  31973. /* WMI_COEX_CONFIG_ENABLE_CONT_INFO
  31974. * enable contention info log
  31975. * arg1:
  31976. * 0: disable both cont/sched log
  31977. * 1: enable cont log
  31978. * 2: enable sched log
  31979. * 3: enable both cont and sched log
  31980. */
  31981. WMI_COEX_CONFIG_ENABLE_CONT_INFO = 51,
  31982. } WMI_COEX_CONFIG_TYPE;
  31983. typedef struct {
  31984. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_COEX_CONFIG_CMD_fixed_param */
  31985. A_UINT32 vdev_id;
  31986. A_UINT32 config_type; /* wmi_coex_config_type enum */
  31987. A_UINT32 config_arg1;
  31988. A_UINT32 config_arg2;
  31989. A_UINT32 config_arg3;
  31990. A_UINT32 config_arg4;
  31991. A_UINT32 config_arg5;
  31992. A_UINT32 config_arg6;
  31993. } WMI_COEX_CONFIG_CMD_fixed_param;
  31994. typedef struct {
  31995. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_coex_multiple_config_cmd_fixed_param */
  31996. /*
  31997. * This struct is followed by other TLVs:
  31998. * WMI_COEX_CONFIG_CMD_fixed_param config_list[num_config];
  31999. */
  32000. } wmi_coex_multiple_config_cmd_fixed_param;
  32001. typedef enum wmi_coex_dbam_mode_type {
  32002. WMI_COEX_DBAM_DISABLE = 0,
  32003. WMI_COEX_DBAM_ENABLE = 1,
  32004. WMI_COEX_DBAM_FORCED = 2,
  32005. } WMI_COEX_DBAM_MODE_TYPE;
  32006. typedef enum {
  32007. WMI_COEX_TRAFFIC_SHAPING_MODE_DISABLED = 0,
  32008. WMI_COEX_TRAFFIC_SHAPING_MODE_ENABLED = 1,
  32009. } WMI_COEX_TRAFFIC_SHAPING_MODE;
  32010. typedef struct {
  32011. A_UINT32 tlv_header;
  32012. A_UINT32 vdev_id;
  32013. A_UINT32 dbam_mode; /* wmi_coex_dbam_mode_type enum */
  32014. } wmi_coex_dbam_cmd_fixed_param;
  32015. /**
  32016. * Host get current TAS buffer from FW or set last TAS buffer to FW
  32017. */
  32018. typedef enum wmi_tas_power_history_cmd_type {
  32019. WMI_TAS_POWER_HISTORY_CMD_GET = 0, /* before WLAN off, host trigger this cmd to get power history */
  32020. WMI_TAS_POWER_HISTORY_CMD_SET = 1, /* after WLAN reboot, host trigger this cmd to set power history of last life cycle */
  32021. } WMI_TAS_POWER_HISTORY_CMD_TYPE;
  32022. typedef struct {
  32023. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tas_power_history_cmd_fixed_param */
  32024. A_UINT32 sub_type; /* refer to WMI_TAS_POWER_HISTORY_TYPE */
  32025. A_UINT32 time_diff; /* time of wlan on - time of wlan off after wlan reboot. unit: millisecond*/
  32026. } wmi_tas_power_history_cmd_fixed_param;
  32027. /**
  32028. * This command is sent from WLAN host driver to firmware to
  32029. * request firmware to enable/disable channel avoidance report
  32030. * to host.
  32031. *
  32032. */
  32033. enum {
  32034. WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
  32035. WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
  32036. };
  32037. typedef struct {
  32038. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param */
  32039. /** Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
  32040. A_UINT32 rpt_allow;
  32041. } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
  32042. /*
  32043. * Periodic channel stats WMI command structure
  32044. * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
  32045. */
  32046. typedef struct {
  32047. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param */
  32048. /** 1 = enable, 0 = disable */
  32049. A_UINT32 enable;
  32050. /** periodic stats duration (units are milliseconds) */
  32051. A_UINT32 stats_period;
  32052. /** pdev_id for identifying the MAC
  32053. * See macros starting with WMI_PDEV_ID_ for values.
  32054. */
  32055. A_UINT32 pdev_id;
  32056. } wmi_set_periodic_channel_stats_config_fixed_param;
  32057. typedef struct {
  32058. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param */
  32059. /** pdev_id for identifying the MAC
  32060. * See macros starting with WMI_PDEV_ID_ for values.
  32061. */
  32062. A_UINT32 pdev_id;
  32063. /* Identify the wlan module */
  32064. A_UINT32 module_id;
  32065. /* Num of elements in the following args[] array */
  32066. A_UINT32 num_args;
  32067. /**
  32068. * Following this structure are the TLVs:
  32069. * A_UINT32 args[];
  32070. **/
  32071. } wmi_pdev_wal_power_debug_cmd_fixed_param;
  32072. typedef struct {
  32073. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param */
  32074. /**
  32075. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  32076. * @details
  32077. * Each WMM access category (voice, video, best-effort, background)
  32078. * will have its own timeout value to dictate how long to wait for
  32079. * missing rx MPDUs to arrive before releasing subsequent MPDUs that
  32080. * have already been received.
  32081. * This parameter specifies the timeout in milliseconds for each
  32082. * access category.
  32083. * The array elements are indexed by the WMI_AC enum to identify
  32084. * which array element corresponds to which AC / traffic type.
  32085. */
  32086. A_UINT32 rx_timeout_pri[WMI_AC_MAX];
  32087. } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
  32088. /**
  32089. * wlan stats shall be understood as per period.
  32090. * Generally, it is reported periodically based on the period specified by host.
  32091. * But if the variation of one stats of compared to the
  32092. * previous notification exceeds a threshold,
  32093. * FW will report the wlan stats immediately.
  32094. * The values of the stats becomes the new reference to compute variations.
  32095. * This threshold can be a global setting or per category.
  32096. * Host can enable/disable the mechanism for any stats per bitmap.
  32097. * TX/RX thresholds (percentage value) are shared across ACs,
  32098. * and TX/RX stats comprisons are processed per AC of each peer.
  32099. * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
  32100. * and the detailed tx_mpdus threshold value is set to 10%,
  32101. * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
  32102. * and it reaches 110 during the second period,
  32103. * FW will generate and send out a wlan stats event immediately.
  32104. */
  32105. typedef struct {
  32106. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
  32107. /** Indicate if threshold mechanism is enabled or disabled.
  32108. * It is disabled by default.
  32109. * Host can enable and disable it dynamically.
  32110. */
  32111. A_UINT32 enable_thresh;
  32112. /** use_thresh_bitmap equals 0 means gbl_thresh is used.
  32113. * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
  32114. */
  32115. A_UINT32 use_thresh_bitmap;
  32116. /** global threshold, valid when use_thresh_bitmap equals 0.
  32117. * It takes effect for all counters.
  32118. * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
  32119. */
  32120. A_UINT32 gbl_thresh;
  32121. /** Enable/disable bitmap for threshold mechanism of CCA stats */
  32122. A_UINT32 cca_thresh_enable_bitmap;
  32123. /** Enable/disable bitmap for threshold mechanism of signal stats */
  32124. A_UINT32 signal_thresh_enable_bitmap;
  32125. /** Enable/disable bitmap for threshold mechanism of TX stats */
  32126. A_UINT32 tx_thresh_enable_bitmap;
  32127. /** Enable/disable bitmap for threshold mechanism of RX stats */
  32128. A_UINT32 rx_thresh_enable_bitmap;
  32129. /* This TLV is followed by TLVs below:
  32130. * wmi_chan_cca_stats_thresh cca_thresh;
  32131. * wmi_peer_signal_stats_thresh signal_thresh;
  32132. * wmi_tx_stats_thresh tx_thresh;
  32133. * wmi_rx_stats_thresh rx_thresh;
  32134. */
  32135. } wmi_pdev_set_stats_threshold_cmd_fixed_param;
  32136. typedef enum {
  32137. WMI_REQUEST_WLAN_TX_STAT = 0x01,
  32138. WMI_REQUEST_WLAN_RX_STAT = 0x02,
  32139. WMI_REQUEST_WLAN_CCA_STAT = 0x04,
  32140. WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
  32141. } wmi_wlan_stats_id;
  32142. typedef struct {
  32143. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
  32144. wmi_wlan_stats_id stats_id;
  32145. } wmi_request_wlan_stats_cmd_fixed_param;
  32146. typedef enum {
  32147. WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01, /* request stats of one specified peer */
  32148. WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02, /* request stats of all peers belong to specified VDEV */
  32149. } wmi_peer_stats_info_request_type;
  32150. /** It is required to issue WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE
  32151. * (with a non-zero value) before issuing the first REQUEST_PEER_STATS_INFO.
  32152. */
  32153. typedef struct {
  32154. /** TLV tag and len; tag equals
  32155. * WMITLV_TAG_STRUC_wmi_request_peer_stats_info_cmd_fixed_param */
  32156. A_UINT32 tlv_header;
  32157. /** request_type to indicate if only stats of
  32158. * one peer or all peers of the VDEV are requested,
  32159. * see wmi_peer_stats_info_request_type.
  32160. */
  32161. A_UINT32 request_type;
  32162. /** VDEV identifier */
  32163. A_UINT32 vdev_id;
  32164. /** this peer_macaddr is only used if request_type == ONE_PEER_STATS_INFO */
  32165. wmi_mac_addr peer_macaddr;
  32166. /** flag to indicate if FW needs to reset requested peers stats */
  32167. A_UINT32 reset_after_request;
  32168. } wmi_request_peer_stats_info_cmd_fixed_param;
  32169. typedef enum {
  32170. /*
  32171. * Multiple stats type can be requested together, so each value
  32172. * within this enum represents a bit position within a stats bitmap.
  32173. */
  32174. /* bit 0 is currently unused / reserved */
  32175. WMI_REQUEST_CTRL_PATH_PDEV_TX_STAT = 1,
  32176. WMI_REQUEST_CTRL_PATH_VDEV_EXTD_STAT = 2,
  32177. WMI_REQUEST_CTRL_PATH_MEM_STAT = 3,
  32178. WMI_REQUEST_CTRL_PATH_TWT_STAT = 4,
  32179. WMI_REQUEST_CTRL_PATH_CALIBRATION_STAT = 5,
  32180. WMI_REQUEST_CTRL_PATH_DFS_CHANNEL_STAT = 6,
  32181. WMI_REQUEST_CTRL_PATH_AWGN_STAT = 7,
  32182. WMI_REQUEST_CTRL_PATH_BTCOEX_STAT = 8,
  32183. WMI_REQUEST_CTRL_PATH_BMISS_STAT = 9,
  32184. WMI_REQUEST_CTRL_PATH_ODD_ADDR_READ = 10,
  32185. WMI_REQUEST_CTRL_PATH_AFC_STAT = 11,
  32186. WMI_REQUEST_CTRL_PATH_PMLO_STAT = 12,
  32187. WMI_REQUEST_CTRL_PATH_CFR_STAT = 13,
  32188. WMI_REQUEST_CTRL_PATH_T2LM_STAT = 14,
  32189. WMI_REQUEST_CTRL_PATH_BLANKING_STAT = 15,
  32190. WMI_REQUEST_CTRL_PATH_PEER_STAT = 16,
  32191. WMI_REQUEST_CTRL_PATH_VDEV_DEBUG_STAT = 17,
  32192. WMI_REQUEST_CTRL_STA_RRM_STAT = 18,
  32193. WMI_REQUEST_CTRL_PATH_VDEV_BCN_TX_STAT = 19,
  32194. WMI_REQUEST_CTRL_PATH_PDEV_BCN_TX_STAT = 20,
  32195. } wmi_ctrl_path_stats_id;
  32196. typedef enum {
  32197. /* bit 0 is currently unused / reserved */
  32198. WMI_HALPHY_CTRL_PATH_PDEV_TX_STAT = 1,
  32199. } wmi_halphy_ctrl_path_stats_id;
  32200. typedef enum {
  32201. /*
  32202. * The following stats actions are mutually exclusive.
  32203. * A single stats request message can only specify one action.
  32204. */
  32205. WMI_REQUEST_CTRL_PATH_STAT_GET = 1,
  32206. WMI_REQUEST_CTRL_PATH_STAT_RESET = 2,
  32207. WMI_REQUEST_CTRL_PATH_STAT_START = 3,
  32208. WMI_REQUEST_CTRL_PATH_STAT_STOP = 4,
  32209. WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH = 5,
  32210. } wmi_ctrl_path_stats_action;
  32211. typedef enum {
  32212. WMI_HALPHY_CTRL_PATH_SU_STATS = 0,
  32213. WMI_HALPHY_CTRL_PATH_SUTXBF_STATS,
  32214. WMI_HALPHY_CTRL_PATH_MU_STATS,
  32215. WMI_HALPHY_CTRL_PATH_MUTXBF_STATS,
  32216. } wmi_halphy_ctrl_path_subid;
  32217. typedef struct {
  32218. /** TLV tag and len; tag equals
  32219. * WMITLV_TAG_STRUC_wmi_request_ctrl_path_stats_cmd_fixed_param */
  32220. A_UINT32 tlv_header;
  32221. /** Bitmask showing which of stats IDs 0-31 have been requested.
  32222. * These stats ids are defined in enum wmi_ctrl_path_stats_id.
  32223. */
  32224. A_UINT32 stats_id_mask;
  32225. /** request ID to store the cookies in wifistats */
  32226. A_UINT32 request_id;
  32227. /** action
  32228. * get/reset/start/stop based on stats id
  32229. * defined as a part of wmi_ctrl_path_stats_action
  32230. **/
  32231. A_UINT32 action; /* refer to wmi_ctrl_path_stats_action */
  32232. /**
  32233. * The stat_periodicity field is relevant only when action is set to
  32234. * WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH.
  32235. * The units of this periodicity are milliseconds.
  32236. * Periodically send WMI ctrl-path stats event with the specified stats
  32237. * periodicity for the stats whose IDs are set in stats_id_mask.
  32238. * Periodic WMI ctrl-path stats events are enabled by setting value > 0,
  32239. * Previously onngoing periodic WMI ctrl-path stats events become
  32240. * disabled when action is WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH
  32241. * and stat_periodicity = 0.
  32242. */
  32243. A_UINT32 stat_periodicity;
  32244. /** The below TLV arrays optionally follow this fixed_param TLV structure:
  32245. * 1. A_UINT32 pdev_ids[];
  32246. * If this array is present and non-zero length, stats should only
  32247. * be provided from the pdevs identified in the array.
  32248. * 2. A_UINT32 vdev_ids[];
  32249. * If this array is present and non-zero length, stats should only
  32250. * be provided from the vdevs identified in the array.
  32251. * 3. wmi_mac_addr peer_macaddr[];
  32252. * If this array is present and non-zero length, stats should only
  32253. * be provided from the peers with the MAC addresses specified
  32254. * in the array.
  32255. */
  32256. } wmi_request_ctrl_path_stats_cmd_fixed_param;
  32257. typedef struct {
  32258. /** TLV tag and len; tag equals
  32259. * WMITLV_TAG_STRUC_wmi_request_halphy_ctrl_path_stats_cmd_fixed_param */
  32260. A_UINT32 tlv_header;
  32261. /** Bitmask showing which of stats IDs 0-31 have been requested.
  32262. * These stats ids are defined in enum wmi_halphy_ctrl_path_stats_id.
  32263. */
  32264. A_UINT32 stats_id_mask;
  32265. /** process id requested */
  32266. A_UINT32 request_id;
  32267. /** action
  32268. * get/reset based on stats id
  32269. * defined as a part of wmi_ctrl_path_stats_action
  32270. **/
  32271. A_UINT32 action; /* refer to wmi_ctrl_path_stats_action */
  32272. /** Request Halphy subid stats
  32273. * According to the requested stats_id_mask this halphy_subid varies
  32274. * For stats_id = 1, the possible values could be enum
  32275. * wmi_halphy_ctrl_path_halphyid
  32276. */
  32277. A_UINT32 halphy_subid;
  32278. /** The below TLV arrays optionally follow this fixed_param TLV structure:
  32279. * 1. A_UINT32 pdev_ids[];
  32280. * If this array is present and non-zero length, stats should only
  32281. * be provided from the pdevs identified in the array.
  32282. * 2. A_UINT32 vdev_ids[];
  32283. * If this array is present and non-zero length, stats should only
  32284. * be provided from the vdevs identified in the array.
  32285. * 3. wmi_mac_addr peer_macaddr[];
  32286. * If this array is present and non-zero length, stats should only
  32287. * be provided from the peers with the MAC addresses specified
  32288. * in the array.
  32289. */
  32290. } wmi_request_halphy_ctrl_path_stats_cmd_fixed_param;
  32291. typedef enum {
  32292. WMI_REQUEST_ONE_RADIO_CHAN_STATS = 0x01, /* request stats of one specified channel */
  32293. WMI_REQUEST_ALL_RADIO_CHAN_STATS = 0x02, /* request stats of all channels */
  32294. } wmi_radio_chan_stats_request_type;
  32295. /** It is required to issue WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE
  32296. * (with a non-zero value) before issuing the first REQUEST_RADIO_CHAN_STATS.
  32297. */
  32298. typedef struct {
  32299. /** TLV tag and len; tag equals
  32300. * WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param */
  32301. A_UINT32 tlv_header;
  32302. /** request_type to indicate if only stats of
  32303. * one channel or all channels are requested,
  32304. * see wmi_radio_chan_stats_request_type.
  32305. */
  32306. A_UINT32 request_type;
  32307. /** Frequency of channel whose stats is requested,
  32308. * only used when request_type == WMI_REQUEST_ONE_RADIO_CHAN_STATS
  32309. */
  32310. A_UINT32 chan_mhz;
  32311. /** flag to indicate if FW needs to reset requested stats of specified channel/channels */
  32312. A_UINT32 reset_after_request;
  32313. } wmi_request_radio_chan_stats_cmd_fixed_param;
  32314. typedef struct {
  32315. /** TLV tag and len; tag equals
  32316. * WMITLV_TAG_STRUC_wmi_rmc_set_leader_cmd_fixed_param */
  32317. A_UINT32 tlv_header;
  32318. /* VDEV identifier */
  32319. A_UINT32 vdev_id;
  32320. /* Leader's mac address */
  32321. wmi_mac_addr leader_mac_addr;
  32322. } wmi_rmc_set_leader_cmd_fixed_param;
  32323. typedef struct {
  32324. /** TLV tag and len; tag equals
  32325. * WMITLV_TAG_STRUC_wmi_rmc_manual_leader_event_fixed_param */
  32326. A_UINT32 tlv_header;
  32327. /* VDEV identifier */
  32328. A_UINT32 vdev_id;
  32329. /* 0: success
  32330. * 1: selected leader not found in network, able to find using auto selection
  32331. * -1: error
  32332. * non zero value should be return to userspace in case of failure */
  32333. A_INT32 status;
  32334. /* bssid of new leader */
  32335. wmi_mac_addr leader_mac_addr;
  32336. } wmi_rmc_manual_leader_event_fixed_param;
  32337. typedef struct {
  32338. /** TLV tag and len; tag equals
  32339. * WMITLV_TAG_STRUC_wmi_audio_sync_start_event_fixed_param
  32340. */
  32341. A_UINT32 tlv_header;
  32342. /* VDEV identifier */
  32343. A_UINT32 vdev_id;
  32344. /* periodicity:
  32345. * How frequently (in msec) FW wants host to capture the Q_TIMER.
  32346. * periodicity = 0 indicates to the host to stop capturing the QTIMERs.
  32347. */
  32348. A_UINT32 periodicity;
  32349. /* No of Qtimer captures FW wants */
  32350. A_UINT32 reads_needed;
  32351. /* Lower 32 bits of the mac timer. Value is valid only if periodicity = 0 */
  32352. A_UINT32 mac_timer_l32;
  32353. /* Upper 32 bits of the mac timer. Value is valid only if periodicity = 0 */
  32354. A_UINT32 mac_timer_u32;
  32355. /* Lower 32 bits of the Qtimer. Value is valid only if periodicity = 0 */
  32356. A_UINT32 qtimer_l32;
  32357. /* Upper 32 bits of the Qtimer. Value is valid only if periodicity = 0 */
  32358. A_UINT32 qtimer_u32;
  32359. } wmi_audio_sync_start_stop_event_fixed_param;
  32360. typedef struct {
  32361. /** TLV tag and len; tag equals
  32362. * WMITLV_TAG_STRUC_wmi_audio_sync_q_mac_relation_event_fixed_param */
  32363. A_UINT32 tlv_header;
  32364. /* VDEV identifier */
  32365. A_UINT32 vdev_id;
  32366. /* Lower 32 bits of the offset between Qmaster and Qslave */
  32367. A_UINT32 offset_l32;
  32368. /* Upper 32 bits of the offset between Qmaster and Qslave */
  32369. A_UINT32 offset_u32;
  32370. } wmi_audio_sync_q_master_slave_offset_event_fixed_param;
  32371. typedef struct {
  32372. /** TLV tag and len; tag equals
  32373. * WMITLV_TAG_STRUC_wmi_audio_sync_q_mac_relation_event_fixed_param */
  32374. A_UINT32 tlv_header;
  32375. /* Lower 32 bits of the Qtimer of master */
  32376. A_UINT32 qmaster_l32;
  32377. /* Upper 32 bits of the Qtimer of master */
  32378. A_UINT32 qmaster_u32;
  32379. /* Lower 32 bits of the Qtimer of slave*/
  32380. A_UINT32 qslave_l32;
  32381. /* Upper 32 bits of the Qtimer of slave*/
  32382. A_UINT32 qslave_u32;
  32383. } wmi_audio_sync_q_master_slave_times;
  32384. /** Set Preferred Channel List **/
  32385. typedef struct {
  32386. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_pcl_cmd_fixed_param */
  32387. /** vdev_id */
  32388. A_UINT32 vdev_id;
  32389. /**
  32390. * TLV (tag length value) parameters follow the wmi_vdev_set_pcl_cmd
  32391. * structure. The TLV's are:
  32392. *
  32393. * A_UINT32 channel_weight[];
  32394. * values defined by enum 'wmi_pcl_chan_weight'
  32395. * channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  32396. **/
  32397. } wmi_vdev_set_pcl_cmd_fixed_param;
  32398. /** command type for WMI_PDEV_TBTT_OFFSET_SYNC_CMDID */
  32399. enum pdev_tbtt_offset_cmd_type
  32400. {
  32401. WMI_PDEV_GET_TBTT_OFFSET,
  32402. WMI_PDEV_SET_TBTT_OFFSET,
  32403. };
  32404. /** Per neighbour TBTT offset information */
  32405. typedef struct
  32406. {
  32407. /** TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_pdev_tbtt_offset_info */
  32408. A_UINT32 tlv_header;
  32409. /* neighbour bss mac address */
  32410. wmi_mac_addr bss_mac;
  32411. /* neighbour bss beacon interval in TU */
  32412. A_UINT32 beacon_intval;
  32413. /* neighbour bss operating class as defined in Annex E, IEEE80211 standard */
  32414. A_UINT32 opclass;
  32415. /* neighbour bss operating channel index */
  32416. A_UINT32 chan_idx;
  32417. /* neighbour bss next QTIME TBTT high 32 bit value */
  32418. A_UINT32 next_qtime_tbtt_high;
  32419. /* neighbour bss next QTIME TBTT low 32 bit value */
  32420. A_UINT32 next_qtime_tbtt_low;
  32421. } wmi_pdev_rnr_bss_tbtt_info;
  32422. typedef struct {
  32423. /** TLV tag and len; tag equals
  32424. * WMITLV_TAG_STRUC_wmi_pdev_tbtt_offset_sync_cmd_fixed_param */
  32425. A_UINT32 tlv_header;
  32426. /*
  32427. * PDEV identifier. Value WMI_PDEV_ID_SOC implies applicable to all pdevs
  32428. * on SoC else applicable only to specified pdev
  32429. */
  32430. A_UINT32 pdev_id;
  32431. /* command_type from enum pdev_tbtt_offset_cmd_type */
  32432. A_UINT32 cmd_type;
  32433. /*
  32434. * Following this structure is the TLV:
  32435. * struct wmi_pdev_rnr_bss_tbtt_info rnr_tbtt_info[num_rnr_tbtt_info];
  32436. */
  32437. } wmi_pdev_tbtt_offset_sync_cmd_fixed_param;
  32438. typedef enum {
  32439. WLAN_2G_CAPABILITY = 0x1,
  32440. WLAN_5G_CAPABILITY = 0x2,
  32441. } WLAN_BAND_CAPABILITY;
  32442. typedef enum wmi_hw_mode_config_type {
  32443. WMI_HW_MODE_SINGLE = 0, /* Only one PHY is active. */
  32444. WMI_HW_MODE_DBS = 1, /* Both PHYs are active in different bands, PHYB in 2G and PHYA in 5G. */
  32445. WMI_HW_MODE_SBS_PASSIVE = 2, /* Both PHYs are in passive mode (only rx) in same band; no tx allowed. */
  32446. WMI_HW_MODE_SBS = 3, /* Both PHYs are active in the same band.
  32447. * Support for both PHYs within one band is planned for 5G only
  32448. * (as indicated in WMI_MAC_PHY_CAPABILITIES),
  32449. * but could be extended to other bands in the future.
  32450. * The separation of the band between the two PHYs needs to be communicated separately.
  32451. */
  32452. WMI_HW_MODE_DBS_SBS = 4, /* 3 PHYs, with 2 on the same band doing SBS
  32453. * as in WMI_HW_MODE_SBS, and 3rd on the other band
  32454. */
  32455. WMI_HW_MODE_DBS_OR_SBS = 5, /* One PHY is on 5G and the other PHY can be in 2G or 5G. */
  32456. WMI_HW_MODE_DBS_2G_5G = 6, /* Both PHYs are active in different bands. PhyA 2G and PhyB 5G */
  32457. WMI_HW_MODE_2G_PHYB = 7, /* Only PhyB 2G active */
  32458. WMI_HW_MODE_EMLSR = 8, /* Both PHYs are active in listen mode in 1x1
  32459. * and Tx/Rx trigger on any PHY will switch
  32460. * from 1x1 to 2x2 on that Phy
  32461. */
  32462. WMI_HW_MODE_AUX_EMLSR_SINGLE = 9, /* PHYA0 and AUX are active in listen mode
  32463. * in 1x1 and Tx/Rx trigger on any.
  32464. * PHY will switch from 1x1 to 2x2
  32465. * on that Phy.
  32466. */
  32467. WMI_HW_MODE_AUX_EMLSR_SPLIT = 10, /* PHYA1 and AUX are active in listen mode
  32468. * in 1x1 and Tx/Rx trigger on any.
  32469. * PHY will switch from 1x1 to 2x2
  32470. * on that Phy.
  32471. */
  32472. } WMI_HW_MODE_CONFIG_TYPE;
  32473. /*
  32474. * Per HW mode MLO capability flags
  32475. * use bits 31:27 of A_UINT32 hw_mode_config_type for Per HW mode MLO
  32476. * capability flags...
  32477. * WMI_MLO_CAP_FLAG_NONE: Do not support MLO for the specific HW mode
  32478. * WMI_MLO_CAP_FLAG_NON_STR_IN_DBS: Support STR MLO when DBS for the specific
  32479. * HW mode
  32480. * WMI_MLO_CAP_FLAG_STR_IN_DBS: Support Non-STR MLO when DBS for the
  32481. * specific HW mode
  32482. * WMI_MLO_CAP_FLAG_NON_STR_IN_SBS: Support STR MLO when SBS for the specific
  32483. * HW mode
  32484. * WMI_MLO_CAP_FLAG_STR_IN_SBS: Support Non-STR MLO when SBS for the
  32485. * specific HW mode
  32486. * WMI_MLO_CAP_FLAG_STR: Support STR for the specific HW mode.
  32487. *
  32488. * WMI_MLO_CAP_FLAG_EMLSR: Support eMLSR mode.
  32489. */
  32490. #define WMI_MLO_CAP_FLAG_NONE 0x00
  32491. #define WMI_MLO_CAP_FLAG_NON_STR_IN_DBS 0x01
  32492. #define WMI_MLO_CAP_FLAG_STR_IN_DBS 0x02
  32493. #define WMI_MLO_CAP_FLAG_NON_STR_IN_SBS 0x04
  32494. #define WMI_MLO_CAP_FLAG_STR_IN_SBS 0x08
  32495. #define WMI_MLO_CAP_FLAG_STR 0x10
  32496. #define WMI_MLO_CAP_FLAG_EMLSR 0x20
  32497. /*
  32498. * hw_mode_config_type sub-fields for chips that support 802.11BE/MLO:
  32499. * bits 26:0 - hw_mode_config
  32500. * bits 31:27 - per HW mode MLO capability flags
  32501. */
  32502. #define WMI_BECAP_PHY_GET_HW_MODE_CFG(hw_mode_config_type) WMI_GET_BITS(hw_mode_config_type, 0, 27)
  32503. #define WMI_BECAP_PHY_SET_HW_MODE_CFG(hw_mode_config_type, value) WMI_SET_BITS(hw_mode_config_type, 0, 27, value)
  32504. #define WMI_BECAP_PHY_GET_MLO_CAP(hw_mode_config_type) WMI_GET_BITS(hw_mode_config_type, 27, 5)
  32505. #define WMI_BECAP_PHY_SET_MLO_CAP(hw_mode_config_type, value) WMI_SET_BITS(hw_mode_config_type, 27, 5, value)
  32506. /*
  32507. * pdev_id sub-fields for chips that support 802.11BE/MLO
  32508. * as part of WMI_MAC_PHY_CAPABILITIES and WMI_MAC_PHY_CAPABILITIES_EXT:
  32509. * bits 16:0 - pdev_id
  32510. * bits 32:16 - Unique link id across SOCs, got as part of QMI handshake.
  32511. */
  32512. #define WMI_PHY_GET_PDEV_ID(pdev_id) WMI_GET_BITS(pdev_id, 0, 16)
  32513. #define WMI_PHY_SET_PDEV_ID(pdev_id, value) WMI_SET_BITS(pdev_id, 0, 16, value)
  32514. #define WMI_PHY_GET_HW_LINK_ID(pdev_id) WMI_GET_BITS(pdev_id, 16, 16)
  32515. #define WMI_PHY_SET_HW_LINK_ID(pdev_id, value) WMI_SET_BITS(pdev_id, 16, 16, value)
  32516. #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
  32517. #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  32518. #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
  32519. #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  32520. #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
  32521. #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  32522. #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
  32523. #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  32524. #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
  32525. #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  32526. #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
  32527. #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  32528. #define WMI_SUPPORT_11BE_GET(flags) WMI_GET_BITS(flags, 6, 1)
  32529. #define WMI_SUPPORT_11BE_SET(flags, value) WMI_SET_BITS(flags, 6, 1, value)
  32530. #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
  32531. #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
  32532. /*
  32533. * +-----------------------------+------------------------------------+
  32534. * | Transmitted VHT Capabilities| NSS Support of STA |
  32535. * | Information Field | transmitted VHT Capabilites |
  32536. * +---------------+-------------+------+------+------+------+--------+
  32537. * | Supported | Extended | | | | | |
  32538. * | Channel | NSS BW | | | | | |
  32539. * | WidthSet | Support |20 Mhz|40 Mhz|80 Mhz|160Mhz|80+80Mhz|
  32540. * +---------------+-------------+------+------+------+------+--------+
  32541. * | 0 | 0 | 1 | 1 | 1 | | |
  32542. * +---------------+-------------+------+------+------+------+--------+
  32543. * | 0 | 1 | 1 | 1 | 1 | 1/2 | |
  32544. * +---------------+-------------+------+------+------+------+--------+
  32545. * | 0 | 2 | 1 | 1 | 1 | 1/2 | 1/2 |
  32546. * +---------------+-------------+------+------+------+------+--------+
  32547. * | 0 | 3 | 1 | 1 | 1 | 3/4 | 3/4 |
  32548. * +---------------+-------------+------+------+------+------+--------+
  32549. * | 1 | 0 | 1 | 1 | 1 | 1 | |
  32550. * +---------------+-------------+------+------+------+------+--------+
  32551. * | 1 | 1 | 1 | 1 | 1 | 1 | 1/2 |
  32552. * +---------------+-------------+------+------+------+------+--------+
  32553. * | 1 | 2 | 1 | 1 | 1 | 1 | 3/4 |
  32554. * +---------------+-------------+------+------+------+------+--------+
  32555. * | 1 | 3 | 2 | 2 | 2 | 2 | 1 |
  32556. * +---------------+-------------+------+------+------+------+--------+
  32557. * | 2 | 0 | 1 | 1 | 1 | 1 | 1 |
  32558. * +---------------+-------------+------+------+------+------+--------+
  32559. * | 2 | 3 | 2 | 2 | 2 | 1 | 1 |
  32560. * +---------------+-------------+------+------+------+------+--------+
  32561. */
  32562. /*
  32563. * [0] : WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS
  32564. * [4:1] : WMI_NSS_RATIO_INFO_BITPOS
  32565. */
  32566. #define WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS 0x0
  32567. #define WMI_NSS_RATIO_INFO_BITPOS 0x1
  32568. /*
  32569. * WMI_NSS_RATIO_ENABLE_DISABLE values:
  32570. * [0] : 0 - WMI_NSS_RATIO_DISABLE
  32571. * [0] : 1 - WMI_NSS_RATIO_ENABLE
  32572. */
  32573. #define WMI_NSS_RATIO_DISABLE 0x0
  32574. #define WMI_NSS_RATIO_ENABLE 0x1
  32575. /*
  32576. * WMI_NSS_RATIO_INFO values:
  32577. * [4:1] : 0000 - WMI_NSS_RATIO_1BY2_NSS
  32578. * [4:1] : 0001 - WMI_NSS_RATIO_3BY4_NSS
  32579. * [4:1] : 0010 - WMI_NSS_RATIO_1_NSS
  32580. * [4:1] : 0011 - WMI_NSS_RATIO_2_NSS
  32581. */
  32582. #define WMI_NSS_RATIO_1BY2_NSS 0x0
  32583. #define WMI_NSS_RATIO_3BY4_NSS 0x1
  32584. #define WMI_NSS_RATIO_1_NSS 0x2
  32585. #define WMI_NSS_RATIO_2_NSS 0x3
  32586. #define WMI_NSS_RATIO_ENABLE_DISABLE_SET(param, value) \
  32587. WMI_SET_BITS(param, WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS, 1, value)
  32588. #define WMI_NSS_RATIO_ENABLE_DISABLE_GET(dword) \
  32589. WMI_GET_BITS(dword, WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS, 1)
  32590. #define WMI_NSS_RATIO_INFO_SET(param, value) \
  32591. WMI_SET_BITS(param, WMI_NSS_RATIO_INFO_BITPOS, 4, value)
  32592. #define WMI_NSS_RATIO_INFO_GET(dword) \
  32593. WMI_GET_BITS(dword, WMI_NSS_RATIO_INFO_BITPOS, 4)
  32594. /*
  32595. * 11BE EML Capability Set and Get macros
  32596. */
  32597. #define WMI_SUPPORT_EMLSR_GET(eml_capability) WMI_GET_BITS(eml_capability, 0, 1)
  32598. #define WMI_SUPPORT_EMLSR_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 0, 1, value)
  32599. #define WMI_EMLSR_PADDING_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 1, 3)
  32600. #define WMI_EMLSR_PADDING_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 1, 3, value)
  32601. #define WMI_EMLSR_TRANSITION_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 4, 3)
  32602. #define WMI_EMLSR_TRANSITION_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 4, 3, value)
  32603. #define WMI_SUPPORT_EMLMR_GET(eml_capability) WMI_GET_BITS(eml_capability, 7, 1)
  32604. #define WMI_SUPPORT_EMLMR_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 7, 1, value)
  32605. #define WMI_EMLMR_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 8, 3)
  32606. #define WMI_EMLMR_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 8, 3, value)
  32607. #define WMI_TRANSITION_TIMEOUT_GET(eml_capability) WMI_GET_BITS(eml_capability, 11, 4)
  32608. #define WMI_TRANSITION_TIMEOUT_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 11, 4, value)
  32609. /*
  32610. * 11BE MLD Capability Set and Get macros
  32611. */
  32612. #define WMI_MAX_NUM_SIMULTANEOUS_LINKS_GET(mld_capability) WMI_GET_BITS(mld_capability, 0, 4)
  32613. #define WMI_MAX_NUM_SIMULTANEOUS_LINKS_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 0, 4, value)
  32614. #define WMI_SUPPORT_SRS_GET(mld_capability) WMI_GET_BITS(mld_capability, 4, 1)
  32615. #define WMI_SUPPORT_SRS_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 4, 1, value)
  32616. #define WMI_TID_TO_LINK_NEGOTIATION_GET(mld_capability) WMI_GET_BITS(mld_capability, 5, 2)
  32617. #define WMI_TID_TO_LINK_NEGOTIATION_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 5, 2, value)
  32618. #define WMI_FREQ_SEPERATION_STR_GET(mld_capability) WMI_GET_BITS(mld_capability, 7, 5)
  32619. #define WMI_FREQ_SEPERATION_STR_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 7, 5, value)
  32620. #define WMI_SUPPORT_AAR_GET(mld_capability) WMI_GET_BITS(mld_capability, 12, 1)
  32621. #define WMI_SUPPORT_AAR_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 12, 1, value)
  32622. /*
  32623. * 11BE Ext MLD Capability Set and Get macros
  32624. */
  32625. #define WMI_EXT_MLD_OPERATION_PARAMETER_UPDATE_SUPP_GET(ext_mld_capability) WMI_GET_BITS(ext_mld_capability, 0, 1)
  32626. #define WMI_EXT_MLD_OPERATION_PARAMETER_UPDATE_SUPP_SET(ext_mld_capability, value) WMI_SET_BITS(ext_mld_capability, 0, 1, value)
  32627. /*
  32628. * 11BE MSD Capability Set and Get macros
  32629. */
  32630. #define WMI_MEDIUM_SYNC_DURATION_GET(msd_capability) WMI_GET_BITS(msd_capability, 0, 8)
  32631. #define WMI_MEDIUM_SYNC_DURATION_SET(msd_capability,value) WMI_SET_BITS(msd_capability, 0, 8, value)
  32632. #define WMI_MEDIUM_SYNC_OFDM_ED_THRESHOLD_GET(msd_capability) WMI_GET_BITS(msd_capability, 8, 4)
  32633. #define WMI_MEDIUM_SYNC_OFDM_ED_THRESHOLD_SET(msd_capability, value) WMI_SET_BITS(msd_capability, 8, 4, value)
  32634. #define WMI_MEDIUM_SYNC_MAX_NO_TXOPS_GET(msd_capability) WMI_GET_BITS(msd_capability, 12, 4)
  32635. #define WMI_MEDIUM_SYNC_MAX_NO_TXOPS_SET(msd_capability, value) WMI_SET_BITS(msd_capability, 12, 4, value)
  32636. typedef struct {
  32637. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES */
  32638. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  32639. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  32640. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  32641. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  32642. * though in practice the elements may always be ordered by hw_mode_id */
  32643. A_UINT32 hw_mode_id;
  32644. /*
  32645. * pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
  32646. * hw_link_id: Unique link id across SOCs, got as part of QMI handshake.
  32647. * For legacy chips which do not support MLO, these top bits will always
  32648. * be set to 0, so it won't impact the legacy chips which treat pdev_id
  32649. * as 32 bits.
  32650. */
  32651. union {
  32652. struct {
  32653. A_UINT32 pdev_id:16,
  32654. hw_link_id:16;
  32655. } wmi_pdev_to_link_map;
  32656. A_UINT32 pdev_id;
  32657. };
  32658. /* phy id. Starts with 0 */
  32659. A_UINT32 phy_id;
  32660. /* supported modulations and number of MU beamformees */
  32661. union {
  32662. struct {
  32663. A_UINT32 supports_11b:1,
  32664. supports_11g:1,
  32665. supports_11a:1,
  32666. supports_11n:1,
  32667. supports_11ac:1,
  32668. supports_11ax:1,
  32669. supports_11be:1,
  32670. unused: 21,
  32671. max_mubfee: 4; /* max MU beamformees supported per MAC */
  32672. };
  32673. A_UINT32 supported_flags;
  32674. };
  32675. /* supported bands, enum WLAN_BAND_CAPABILITY */
  32676. A_UINT32 supported_bands;
  32677. /* ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
  32678. * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us */
  32679. A_UINT32 ampdu_density;
  32680. /* max bw supported 2G, enum wmi_channel_width */
  32681. A_UINT32 max_bw_supported_2G;
  32682. /* WMI HT Capability, WMI_HT_CAP defines */
  32683. A_UINT32 ht_cap_info_2G;
  32684. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  32685. A_UINT32 vht_cap_info_2G;
  32686. /* VHT Supported MCS Set field Rx/Tx same
  32687. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  32688. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  32689. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  32690. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  32691. * - 3 indicates that n spatial streams is not supported
  32692. * - bit [15:0] Each NSS takes 2 bit.
  32693. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  32694. * n spatial streams
  32695. * - bit 16 - for NSS 1
  32696. * - bit 17 - for NSS 2
  32697. * - .
  32698. * - .
  32699. * - bit 23 - for NSS 8
  32700. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  32701. * are valid
  32702. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  32703. */
  32704. A_UINT32 vht_supp_mcs_2G;
  32705. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  32706. A_UINT32 he_cap_info_2G;
  32707. /* HE Supported MCS Set field Rx/Tx same
  32708. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  32709. * bit 2-0 indicating max HE MCS of NSS1
  32710. * bit 5-3 indicating max HE MCS of NSS2 and so on
  32711. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  32712. * HE BW less than or equal to 80MHZ is encoded as follows
  32713. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  32714. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  32715. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  32716. * - 3 indicates that n spatial streams is not supported
  32717. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  32718. */
  32719. A_UINT32 he_supp_mcs_2G;
  32720. /* Valid Transmit chain mask */
  32721. A_UINT32 tx_chain_mask_2G;
  32722. /* Valid Receive chain mask */
  32723. A_UINT32 rx_chain_mask_2G;
  32724. /* max bw supported 5G, enum wmi_channel_width */
  32725. A_UINT32 max_bw_supported_5G;
  32726. /* WMI HT Capability, WMI_HT_CAP defines */
  32727. A_UINT32 ht_cap_info_5G;
  32728. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  32729. A_UINT32 vht_cap_info_5G;
  32730. /* VHT Supported MCS Set field Rx/Tx same
  32731. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  32732. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  32733. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  32734. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  32735. * - 3 indicates that n spatial streams is not supported
  32736. * - bit [15:0] Each NSS takes 2 bit.
  32737. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  32738. * n spatial streams
  32739. * - bit 16 - for NSS 1
  32740. * - bit 17 - for NSS 2
  32741. * - .
  32742. * - .
  32743. * - bit 23 - for NSS 8
  32744. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  32745. * are valid
  32746. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  32747. */
  32748. A_UINT32 vht_supp_mcs_5G;
  32749. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  32750. A_UINT32 he_cap_info_5G;
  32751. /* HE Supported MCS Set field Rx/Tx same
  32752. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  32753. * bit 2-0 indicating max HE MCS of NSS1
  32754. * bit 5-3 indicating max HE MCS of NSS2 and so on
  32755. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  32756. * HE BW less than or equal to 80MHZ is encoded as follows
  32757. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  32758. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  32759. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  32760. * - 3 indicates that n spatial streams is not supported
  32761. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  32762. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  32763. * HE BW equal to 80+80 or 160 MHZ encoding is same as above just the
  32764. * lower 16 bits are used for lower 80MHz NSS-MCS supported combo and
  32765. * upper 16 bits are used for upper 80MHz NSS-MCS supported combo
  32766. */
  32767. A_UINT32 he_supp_mcs_5G;
  32768. /* Valid Transmit chain mask */
  32769. A_UINT32 tx_chain_mask_5G;
  32770. /* Valid Receive chain mask */
  32771. A_UINT32 rx_chain_mask_5G;
  32772. /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
  32773. A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
  32774. A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
  32775. wmi_ppe_threshold he_ppet2G;
  32776. wmi_ppe_threshold he_ppet5G;
  32777. /* chainmask table to be used for the MAC */
  32778. A_UINT32 chainmask_table_id;
  32779. /* PDEV ID to LMAC ID mapping */
  32780. A_UINT32 lmac_id;
  32781. /* 2nd DWORD of HE capability info field of 802.11ax, support Draft 3+ */
  32782. A_UINT32 he_cap_info_2G_ext;
  32783. A_UINT32 he_cap_info_5G_ext;
  32784. /*
  32785. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  32786. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  32787. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  32788. * bit[31:3] : Reserved
  32789. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  32790. */
  32791. A_UINT32 he_cap_info_internal;
  32792. A_UINT32 wireless_modes; /* REGDMN MODE, see REGDMN_MODE_ enum */
  32793. A_UINT32 low_2ghz_chan_freq; /* units = MHz */
  32794. A_UINT32 high_2ghz_chan_freq; /* units = MHz */
  32795. A_UINT32 low_5ghz_chan_freq; /* units = MHz */
  32796. A_UINT32 high_5ghz_chan_freq; /* units = MHz */
  32797. /*
  32798. * NSS ratio to be sent to Host during boot-up capabilities negotiation
  32799. *
  32800. * Bit 0 - refer to WMI_NSS_RATIO_ENABLE_DISABLE_ definitions
  32801. * [0] : 0 - WMI_NSS_RATIO_DISABLE
  32802. * [0] : 1 - WMI_NSS_RATIO_ENABLE
  32803. *
  32804. * Bits 4:1 - refer to WMI_NSS_RATIO_INFO_ definitions
  32805. * [4:1] : 0000 - WMI_NSS_RATIO_1BY2_NSS
  32806. * [4:1] : 0001 - WMI_NSS_RATIO_3BY4_NSS
  32807. * [4:1] : 0010 - WMI_NSS_RATIO_1_NSS
  32808. * [4:1] : 0011 - WMI_NSS_RATIO_2_NSS
  32809. *
  32810. * [31:5] : Reserved
  32811. */
  32812. A_UINT32 nss_ratio;
  32813. /**************************************************************************
  32814. * DON'T ADD ANY FURTHER FIELDS HERE -
  32815. * It would cause the size of the READY_EXT message within some targets
  32816. * to exceed the size of the buffer used for the message.
  32817. **************************************************************************/
  32818. } WMI_MAC_PHY_CAPABILITIES;
  32819. typedef struct {
  32820. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES_EXT */
  32821. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  32822. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  32823. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  32824. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  32825. * though in practice the elements may always be ordered by hw_mode_id */
  32826. A_UINT32 hw_mode_id;
  32827. /*
  32828. * pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
  32829. * hw_link_id: Unique link id across SOCs, got as part of QMI handshake.
  32830. * For legacy chips which do not support MLO, these top bits will always
  32831. * be set to 0, so it won't impact the legacy chips which treat pdev_id
  32832. * as 32 bits.
  32833. */
  32834. union {
  32835. struct {
  32836. A_UINT32 pdev_id:16,
  32837. hw_link_id:16;
  32838. } wmi_pdev_to_link_map;
  32839. A_UINT32 pdev_id;
  32840. };
  32841. /* phy id. Starts with 0 */
  32842. A_UINT32 phy_id;
  32843. A_UINT32 wireless_modes_ext; /* REGDMN MODE EXT, see REGDMN_MODE_ enum */
  32844. /**************************************************************************
  32845. * following new params for 802.11be, but under development
  32846. **************************************************************************/
  32847. /* EHT capability mac info field of 802.11be */
  32848. A_UINT32 eht_cap_mac_info_2G[WMI_MAX_EHTCAP_MAC_SIZE];
  32849. A_UINT32 eht_cap_mac_info_5G[WMI_MAX_EHTCAP_MAC_SIZE];
  32850. A_UINT32 eht_supp_mcs_2G; /* deprecated (c.f. eht_supp_mcs_ext_2G) */
  32851. A_UINT32 eht_supp_mcs_5G; /* deprecated (c.f. eht_supp_mcs_ext_5G) */
  32852. /* EHT capability phy field of 802.11be, WMI_EHT_CAP defines */
  32853. A_UINT32 eht_cap_phy_info_2G[WMI_MAX_EHTCAP_PHY_SIZE];
  32854. A_UINT32 eht_cap_phy_info_5G[WMI_MAX_EHTCAP_PHY_SIZE];
  32855. wmi_ppe_threshold eht_ppet2G;
  32856. wmi_ppe_threshold eht_ppet5G;
  32857. A_UINT32 eht_cap_info_internal;
  32858. /* eht_supp_mcs_ext_2G, eht_supp_mcs_ext_5G:
  32859. * array index interpretation:
  32860. * 0 – index indicated EHT-MCS map for 20Mhz only sta (4 bytes valid)
  32861. * 1 – index for <= 80MHz bw (only 3 bytes are valid and other is reserved)
  32862. * 2 – index for 160Mhz bw (only 3 bytes are valid and other is reserved)
  32863. * 3 – index for 320Mhz bw (only 3 bytes are valid and other is reserved)
  32864. *
  32865. * The format of the data stored in each array index element is defined
  32866. * by IEEE802.11 9.4.2.295c.4
  32867. * For example, for the 20 MHz / index 0 element:
  32868. * B0 -- B3: Rx Max Nss that Supports EHT-MCS 0–7
  32869. * B4 -- B7: Tx Max Nss that Supports EHT-MCS 0–7
  32870. * B8 -- B11: Rx Max Nss that Supports EHT-MCS 8–9
  32871. * B12 -- B15: Tx Max Nss that Supports EHT-MCS 8–9
  32872. * B16 -- B19: Rx Max Nss that Supports EHT-MCS 10–11
  32873. * B20 -- B23: Tx Max Nss that Supports EHT-MCS 10–11
  32874. * B24 -- B27: Rx Max Nss that Supports EHT-MCS 12–13
  32875. * B28 -- B31: Tx Max Nss that Supports EHT-MCS 12–13
  32876. */
  32877. A_UINT32 eht_supp_mcs_ext_2G[WMI_MAX_EHT_SUPP_MCS_2G_SIZE];
  32878. A_UINT32 eht_supp_mcs_ext_5G[WMI_MAX_EHT_SUPP_MCS_5G_SIZE];
  32879. union {
  32880. struct {
  32881. A_UINT32 emlsr_support:1,
  32882. emlsr_padding_delay:3,
  32883. emlsr_transition_delay:3,
  32884. emlmr_support:1,
  32885. emlmr_delay:3,
  32886. transition_timeout:4,
  32887. reserved: 17;
  32888. };
  32889. A_UINT32 eml_capability;
  32890. };
  32891. union {
  32892. struct {
  32893. A_UINT32 max_num_simultaneous_links:4,
  32894. srs_support:1,
  32895. tid_to_link_negotiation_support:2, /* Set to 0 if TID-to-link mapping is not supported by the MLD.
  32896. * Set to 1 if MLD supports the mapping of each TID to the same or different link set.
  32897. * Set to 2 if MLD only supports the mapping of all TIDs to the same link set.
  32898. * Value 3 is reserved */
  32899. freq_separation_str:5,
  32900. aar_support:1,
  32901. reserved2: 19;
  32902. };
  32903. A_UINT32 mld_capability;
  32904. };
  32905. union {
  32906. struct {
  32907. A_UINT32
  32908. op_update_para_support:1, /* Indicates support of operation parameter update negotiation */
  32909. reserved3: 31;
  32910. };
  32911. A_UINT32 ext_mld_capability;
  32912. };
  32913. union {
  32914. struct {
  32915. A_UINT32 medium_sync_duration:8,
  32916. medium_sync_ofdm_ed_threshold:4,
  32917. medium_sync_max_no_txops:4,
  32918. reserved4: 16;
  32919. };
  32920. A_UINT32 msd_capability;
  32921. };
  32922. } WMI_MAC_PHY_CAPABILITIES_EXT;
  32923. typedef struct {
  32924. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES */
  32925. /* hw_mode_id - identify a particular set of HW characteristics,
  32926. * as specified by the subsequent fields */
  32927. A_UINT32 hw_mode_id;
  32928. /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
  32929. * number of bits set in phy_id_map represents number of WMI_MAC_PHY_CAPABILITIES TLV's
  32930. * one for each active PHY for current HW mode identified by hw_mode_id. For example for
  32931. * DBS/SBS mode there will be 2 WMI_MAC_PHY_CAPABILITIES TLVs and for single MAC modes it
  32932. * will be 1 WMI_MAC_PHY_CAPABILITIES TLVs */
  32933. A_UINT32 phy_id_map;
  32934. /* hw_mode_config_type
  32935. * Identify a particular type of HW mode such as SBS, DBS etc.
  32936. * Refer to WMI_HW_MODE_CONFIG_TYPE values.
  32937. *
  32938. * Use bits 31:27 of hw_mode_config_type for Per HW mode MLO capability
  32939. * flags.
  32940. * Refer to WMI_MLO_CAP_FLAG_XXX. For legacy chips which do not support
  32941. * MLO, these top bits will always be set to 0, so it won't impact the
  32942. * legacy chips which treat hw_mode_config_type as 32 bits.
  32943. */
  32944. union {
  32945. struct {
  32946. A_UINT32 hw_mode_config :27,
  32947. mlo_cap_flag :5; /* see WMI_MLO_CAP_FLAG_ defs */
  32948. };
  32949. A_UINT32 hw_mode_config_type;
  32950. };
  32951. /**************************************************************************
  32952. * DON'T ADD ANY FURTHER FIELDS HERE -
  32953. * It would cause the size of the READY_EXT message within some targets
  32954. * to exceed the size of the buffer used for the message.
  32955. **************************************************************************/
  32956. } WMI_HW_MODE_CAPABILITIES;
  32957. /*
  32958. * The following macros are for the bitfields witihin the supported flags field
  32959. * of WMI_MAC_PHY_CHAINMASK_CAPABILITY:
  32960. * Capabilities for the chainmask
  32961. */
  32962. #define WMI_SUPPORT_CHAN_WIDTH_20_GET(flags) WMI_GET_BITS(flags, 0, 1)
  32963. #define WMI_SUPPORT_CHAN_WIDTH_20_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  32964. #define WMI_SUPPORT_CHAN_WIDTH_40_GET(flags) WMI_GET_BITS(flags, 1, 1)
  32965. #define WMI_SUPPORT_CHAN_WIDTH_40_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  32966. #define WMI_SUPPORT_CHAN_WIDTH_80_GET(flags) WMI_GET_BITS(flags, 2, 1)
  32967. #define WMI_SUPPORT_CHAN_WIDTH_80_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  32968. #define WMI_SUPPORT_CHAN_WIDTH_160_GET(flags) WMI_GET_BITS(flags, 3, 1)
  32969. #define WMI_SUPPORT_CHAN_WIDTH_160_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  32970. #define WMI_SUPPORT_CHAN_WIDTH_80P80_GET(flags) WMI_GET_BITS(flags, 4, 1)
  32971. #define WMI_SUPPORT_CHAN_WIDTH_80P80_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  32972. #define WMI_SUPPORT_AGILE_SPECTRAL_GET(flags) WMI_GET_BITS(flags, 5, 1)
  32973. #define WMI_SUPPORT_AGILE_SPECTRAL_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  32974. #define WMI_SUPPORT_AGILE_SPECTRAL_160_GET(flags) WMI_GET_BITS(flags, 6, 1)
  32975. #define WMI_SUPPORT_AGILE_SPECTRAL_160_SET(flags, value) WMI_SET_BITS(flags, 6, 1, value)
  32976. #define WMI_SUPPORT_ADFS_160_GET(flags) WMI_GET_BITS(flags, 7, 1)
  32977. #define WMI_SUPPORT_ADFS_160_SET(flags, value) WMI_SET_BITS(flags, 7, 1, value)
  32978. #define WMI_SUPPORT_CHAN_WIDTH_320_GET(flags) WMI_GET_BITS(flags, 8, 1)
  32979. #define WMI_SUPPORT_CHAN_WIDTH_320_SET(flags, value) WMI_SET_BITS(flags, 8, 1, value)
  32980. #define WMI_SUPPORT_ADFS_320_GET(flags) WMI_GET_BITS(flags, 9, 1)
  32981. #define WMI_SUPPORT_ADFS_320_SET(flags, value) WMI_SET_BITS(flags, 9, 1, value)
  32982. #define WMI_SUPPORT_AGILE_SPECTRAL_320_GET(flags) WMI_GET_BITS(flags, 10, 1)
  32983. #define WMI_SUPPORT_AGILE_SPECTRAL_320_SET(flags, value) WMI_SET_BITS(flags, 10, 1, value)
  32984. #define WMI_SUPPORT_CHAIN_MASK_2G_GET(flags) WMI_GET_BITS(flags, 27, 1)
  32985. #define WMI_SUPPORT_CHAIN_MASK_2G_SET(flags, value) WMI_SET_BITS(flags, 27, 1, value)
  32986. #define WMI_SUPPORT_CHAIN_MASK_5G_GET(flags) WMI_GET_BITS(flags, 28, 1)
  32987. #define WMI_SUPPORT_CHAIN_MASK_5G_SET(flags, value) WMI_SET_BITS(flags, 28, 1, value)
  32988. #define WMI_SUPPORT_CHAIN_MASK_TX_GET(flags) WMI_GET_BITS(flags, 29, 1)
  32989. #define WMI_SUPPORT_CHAIN_MASK_TX_SET(flags, value) WMI_SET_BITS(flags, 29, 1, value)
  32990. #define WMI_SUPPORT_CHAIN_MASK_RX_GET(flags) WMI_GET_BITS(flags, 30, 1)
  32991. #define WMI_SUPPORT_CHAIN_MASK_RX_SET(flags, value) WMI_SET_BITS(flags, 30, 1, value)
  32992. #define WMI_SUPPORT_CHAIN_MASK_ADFS_GET(flags) WMI_GET_BITS(flags, 31, 1)
  32993. #define WMI_SUPPORT_CHAIN_MASK_ADFS_SET(flags, value) WMI_SET_BITS(flags, 31, 1, value)
  32994. /** Definition of valid chainmask and associated capabilities */
  32995. typedef struct {
  32996. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_CAPABILITY */
  32997. /* supported flags: Capabilities for this chianmask*/
  32998. union {
  32999. struct {
  33000. A_UINT32 supports_chan_width_20:1,
  33001. supports_chan_width_40:1,
  33002. supports_chan_width_80:1,
  33003. supports_chan_width_160:1,
  33004. supports_chan_width_80P80:1,
  33005. supports_agile_spectral:1,
  33006. supports_agile_spectral_160:1,
  33007. supports_aDFS_160:1,
  33008. supports_chan_width_320:1,
  33009. supports_aDFS_320:1,
  33010. supports_agile_spectral_320:1,
  33011. reserved:16, /* bits 26:11 */
  33012. chain_mask_2G:1,
  33013. chain_mask_5G:1,
  33014. chain_mask_tx:1,
  33015. chain_mask_rx:1,
  33016. supports_aDFS:1; /* agile DFS */
  33017. };
  33018. A_UINT32 supported_flags;
  33019. };
  33020. A_UINT32 chainmask;
  33021. /**************************************************************************
  33022. * DON'T ADD ANY FURTHER FIELDS HERE -
  33023. * It would cause the size of the READY_EXT message within some targets
  33024. * to exceed the size of the buffer used for the message.
  33025. **************************************************************************/
  33026. } WMI_MAC_PHY_CHAINMASK_CAPABILITY;
  33027. typedef struct {
  33028. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_COMBO */
  33029. A_UINT32 chainmask_table_id;
  33030. /* Number of valid Chainmask in the table */
  33031. A_UINT32 num_valid_chainmask;
  33032. /**************************************************************************
  33033. * DON'T ADD ANY FURTHER FIELDS HERE -
  33034. * It would cause the size of the READY_EXT message within some targets
  33035. * to exceed the size of the buffer used for the message.
  33036. **************************************************************************/
  33037. /*
  33038. * This TLV is followed by the below TLVs:
  33039. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask]
  33040. */
  33041. } WMI_MAC_PHY_CHAINMASK_COMBO;
  33042. typedef struct {
  33043. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS */
  33044. /* num HW modes */
  33045. A_UINT32 num_hw_modes;
  33046. /* number of unique chainmask combo tables */
  33047. A_UINT32 num_chainmask_tables;
  33048. /**************************************************************************
  33049. * DON'T ADD ANY FURTHER FIELDS HERE -
  33050. * It would cause the size of the READY_EXT message within some targets
  33051. * to exceed the size of the buffer used for the message.
  33052. **************************************************************************/
  33053. /*
  33054. * This TLV is followed by the below TLVs:
  33055. *
  33056. * WMI_HW_MODE_CAPABILITIES soc_hw_mode_caps[num_hw_modes]
  33057. *
  33058. * (intervening TLVs, e.g. HW_MODE_CAPS, MAC_PHY_CAPS, HAL_REG_CAPS)
  33059. *
  33060. * WMI_MAC_PHY_CHAINMASK_COMBO mac_phy_chainmask_combo[num_chainmask_tables]
  33061. * // number of chainmasks specified in mac_phy_chainmask_combo[0]
  33062. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask0]
  33063. * // number of chainmasks specified in mac_phy_chainmask_combo[1]
  33064. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask1]
  33065. * // number of chainmasks specified in mac_phy_chainmask_combo[2]
  33066. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask2]
  33067. * etc.
  33068. */
  33069. } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
  33070. /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
  33071. typedef struct {
  33072. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT */
  33073. /* phy id */
  33074. A_UINT32 phy_id;
  33075. /* regdomain value specified in EEPROM */
  33076. A_UINT32 eeprom_reg_domain;
  33077. /* regdomain */
  33078. A_UINT32 eeprom_reg_domain_ext;
  33079. /* CAP1 capabilities bit map, see REGDMN_CAP1_ defines */
  33080. A_UINT32 regcap1;
  33081. /* REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines */
  33082. A_UINT32 regcap2;
  33083. /* REGDMN MODE, see REGDMN_MODE_ enum */
  33084. A_UINT32 wireless_modes;
  33085. A_UINT32 low_2ghz_chan; /* freq in MHz */
  33086. A_UINT32 high_2ghz_chan; /* freq in MHz */
  33087. A_UINT32 low_5ghz_chan; /* freq in MHz */
  33088. A_UINT32 high_5ghz_chan; /* freq in MHz */
  33089. /**************************************************************************
  33090. * DON'T ADD ANY FURTHER FIELDS HERE -
  33091. * It would cause the size of the READY_EXT message within some targets
  33092. * to exceed the size of the buffer used for the message.
  33093. **************************************************************************/
  33094. } WMI_HAL_REG_CAPABILITIES_EXT;
  33095. typedef struct {
  33096. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT2 */
  33097. /* phy id */
  33098. A_UINT32 phy_id;
  33099. /* regdomain value specified in EEPROM */
  33100. A_UINT32 wireless_modes_ext;
  33101. A_UINT32 low_2ghz_chan_ext; /* freq in MHz */
  33102. A_UINT32 high_2ghz_chan_ext; /* freq in MHz */
  33103. A_UINT32 low_5ghz_chan_ext; /* freq in MHz */
  33104. A_UINT32 high_5ghz_chan_ext; /* freq in MHz */
  33105. } WMI_HAL_REG_CAPABILITIES_EXT2;
  33106. /*
  33107. * TWT service capability bitmap in wmi_twt_caps_params TLV
  33108. * within WMI_SERVICE_READY_EXT2_EVENTID message
  33109. */
  33110. typedef enum {
  33111. WMI_TWT_STA_SYNC_EVENT_CAP = 1, /* STA TWT: FW internal errors reported using sync WMI_TWT_ACK_EVENTID */
  33112. /* Add new TWT Caps above */
  33113. WMI_TWT_MAX_CAP = 32,
  33114. } WMI_TWT_CAPS_BITMAP;
  33115. typedef struct {
  33116. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_caps_param */
  33117. /* twt_capability_bitmap
  33118. * TWT Capabilities - refer to WMI_TWT_CAPS_BITMAP for the meaning of
  33119. * the bits within the bitmap
  33120. */
  33121. A_UINT32 twt_capability_bitmap;
  33122. } wmi_twt_caps_params;
  33123. /*
  33124. * This TLV used for Scan Radio RDP
  33125. * We have an RDP which supports Multiband-Frequency (2 GHz, 5 GHz and 6 GHz)
  33126. * on a single radio.
  33127. * The AP acts as a special VAP. There will not be WMI_VDEV_UP_CMD.
  33128. * This radio is used only for scanning purpose and to send few MGMT frames.
  33129. * The DFS feature is disabled on this scan radio, since there will not be
  33130. * much TX traffic.
  33131. * The Host has to disable CAC timer because DFS feature not supported here.
  33132. * In order to know about the scan radio RDP, DFS disabled case and
  33133. * SCAN BLANKING support, the target has to send this information to Host
  33134. * per pdev via WMI_SERVICE_READY_EXT2_EVENT.
  33135. * The target is notified of the special scan VAP by the flags variable
  33136. * in the WMI_CREATE_CMD.
  33137. */
  33138. typedef struct {
  33139. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SCAN_RADIO_CAPABILITIES_EXT2 */
  33140. A_UINT32 phy_id;
  33141. /*
  33142. * Bit 0:
  33143. * 1 - SCAN_RADIO supported 0 - SCAN_RADIO not supported
  33144. * Refer to WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_SET, GET macros
  33145. * Bit 1:
  33146. * 1 - DFS enabled 0 - DFS disabled
  33147. * Refer to WMI_SCAN_RADIO_CAP_DFS_FLAG_SET, GET macros
  33148. * Bit 2:
  33149. * 1 - SCAN RADIO blanking supported
  33150. * 0 - SCAN RADIO blanking not supported
  33151. * Refer to WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_SET, GET macros
  33152. * [3:31] reserved
  33153. */
  33154. A_UINT32 flags;
  33155. } WMI_SCAN_RADIO_CAPABILITIES_EXT2;
  33156. #define WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_GET(flag) WMI_GET_BITS(flag, 0, 1)
  33157. #define WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_SET(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  33158. #define WMI_SCAN_RADIO_CAP_DFS_FLAG_GET(flag) WMI_GET_BITS(flag, 1, 1)
  33159. #define WMI_SCAN_RADIO_CAP_DFS_FLAG_SET(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  33160. #define WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_GET(flag) WMI_GET_BITS(flag, 2, 1)
  33161. #define WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_SET(flag, val) WMI_SET_BITS(flag, 2, 1, val)
  33162. typedef struct {
  33163. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES */
  33164. A_UINT32 num_phy;
  33165. /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
  33166. /**************************************************************************
  33167. * DON'T ADD ANY FURTHER FIELDS HERE -
  33168. * It would cause the size of the READY_EXT message within some targets
  33169. * to exceed the size of the buffer used for the message.
  33170. **************************************************************************/
  33171. } WMI_SOC_HAL_REG_CAPABILITIES;
  33172. typedef struct {
  33173. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_OEM_DMA_RING_CAPABILITIES */
  33174. A_UINT32 pdev_id;
  33175. A_UINT32 min_num_ptr;
  33176. /* Minimum number of pointers in the OEM DMA ring for this pdev */
  33177. A_UINT32 min_buf_size;
  33178. /* Minimum size in bytes of each buffer in the OEM DMA ring */
  33179. A_UINT32 min_buf_align;
  33180. /* Minimum alignment in bytes of each buffer in the OEM DMA ring */
  33181. /**************************************************************************
  33182. * DON'T ADD ANY FURTHER FIELDS HERE -
  33183. * It would cause the size of the READY_EXT message within some targets
  33184. * to exceed the size of the buffer used for the message.
  33185. **************************************************************************/
  33186. } WMI_OEM_DMA_RING_CAPABILITIES;
  33187. typedef enum {
  33188. WMI_SAR_VERSION_0_ORIGINAL = 0x00,
  33189. WMI_SAR_VERSION_1_FULL_TABLE = 0x01,
  33190. WMI_SAR_VERSION_2_DBS_SAR = 0x02,
  33191. WMI_SAR_VERSION_3_SBS_SAR = 0x03,
  33192. WMI_SAR_VERSION_SMART_TX = 0x04,
  33193. WMI_SAR_VERSION_TAS = 0x05,
  33194. WMI_SAR_VERSION_INVALID = 0x80
  33195. } wmi_sar_version_t;
  33196. typedef struct {
  33197. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES*/
  33198. /* sar version in bdf */
  33199. A_UINT32 active_version; /* contains a wmi_sar_version_t value */
  33200. /**************************************************************************
  33201. * DON'T ADD ANY FURTHER FIELDS HERE -
  33202. * It would cause the size of the READY_EXT message within some targets
  33203. * to exceed the size of the buffer used for the message.
  33204. **************************************************************************/
  33205. } WMI_SAR_CAPABILITIES;
  33206. typedef enum {
  33207. WMI_SAR_FLAG_NONE = 0,
  33208. WMI_SAR_SET_CTL_GROUPING_DISABLE,
  33209. WMI_SAR_DBS_WITH_BT_DISABLE,
  33210. WMI_SAR_FLAG_MAX,
  33211. } wmi_sar_flags;
  33212. typedef struct {
  33213. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_flags*/
  33214. /* sar flags in bdf */
  33215. A_UINT32 sar_flags; /* refer to enum wmi_sar_flags */
  33216. } wmi_sar_flag_tlv_param;
  33217. typedef struct {
  33218. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */
  33219. /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */
  33220. A_UINT32 default_adaptive_dwell_mode;
  33221. /** the weight to calculate the average low pass filter for channel congestion. 0-100 */
  33222. A_UINT32 adapative_lpf_weight;
  33223. /** interval to monitor passive scan in msec */
  33224. A_UINT32 passive_monitor_interval_ms;
  33225. /** % of wifi activity to switch from passive to active 0-100 */
  33226. A_UINT32 wifi_activity_threshold_pct;
  33227. } wmi_scan_adaptive_dwell_parameters_tlv;
  33228. typedef struct {
  33229. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param */
  33230. /* globally enable/disable adaptive dwell */
  33231. A_UINT32 enable;
  33232. /** pdev_id for identifying the MAC
  33233. * See macros starting with WMI_PDEV_ID_ for values.
  33234. * In non-DBDC case host should set it to 0
  33235. */
  33236. A_UINT32 pdev_id;
  33237. /**
  33238. * followed by TLV (tag length value) parameters array
  33239. * The TLV's are:
  33240. * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
  33241. */
  33242. } wmi_scan_adaptive_dwell_config_fixed_param;
  33243. typedef struct {
  33244. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_param_tlv */
  33245. /** module_id **/
  33246. A_UINT32 module_id;
  33247. /** number of dbs scans */
  33248. A_UINT32 num_dbs_scans;
  33249. /** number of non-dbs scans */
  33250. A_UINT32 num_non_dbs_scans;
  33251. } wmi_scan_dbs_duty_cycle_tlv_param;
  33252. typedef struct {
  33253. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_fixed_param */
  33254. /* number of scan client dutycycle param elements */
  33255. A_UINT32 num_clients;
  33256. /** pdev_id for identifying the MAC
  33257. * See macros starting with WMI_PDEV_ID_ for values.
  33258. * In non-DBDC case host should set it to 0
  33259. */
  33260. A_UINT32 pdev_id;
  33261. /**
  33262. * followed by TLV (tag length value) parameters array
  33263. * The TLV's are:
  33264. * wmi_scan_selection_duty_cycle_tlv_param[num_clients];
  33265. */
  33266. } wmi_scan_dbs_duty_cycle_fixed_param;
  33267. typedef struct {
  33268. /** TLV tag and len; tag equals
  33269. * WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info */
  33270. A_UINT32 tlv_header;
  33271. /** temp_lwm:
  33272. * temperature sensor value in celsius when to exit to lower zone,
  33273. * this value can be lower than HWM of lower zone as zone overlapping
  33274. * is permitted by design to provide hysteresis
  33275. */
  33276. A_UINT32 temp_lwm;
  33277. /** temp_hwm:
  33278. * temperature sensor value in celsius when to exit to higher zone,
  33279. * this value can be higher than LWM of higher zone as zone overlapping
  33280. * is permitted by design to provide hysteresis
  33281. */
  33282. A_UINT32 temp_hwm;
  33283. /** dc_off_percent:
  33284. * duty cycle off percent 0-100.
  33285. * 0 means no off, 100 means no on (shutdown the phy).
  33286. */
  33287. A_UINT32 dc_off_percent;
  33288. /** prio:
  33289. * Disable only the transmit queues in firmware that have lower priority
  33290. * than value defined by prio.
  33291. * Prioritization:
  33292. * 0 = disable all data tx queues, No Prioritization defined
  33293. * 1 = disable BK tx queue
  33294. * 2 = disable BK+BE tx queues
  33295. * 3 = disable BK+BE+VI tx queues
  33296. */
  33297. A_UINT32 prio;
  33298. /**
  33299. * Pout power reduction in 0.25 dB units.
  33300. * For example, a value of 5 causes a power reduction of 1.25 dB.
  33301. */
  33302. A_UINT32 pout_reduction_25db;
  33303. /* tx chain mask: Chain mask to apply based on the temp level */
  33304. A_UINT32 tx_chain_mask;
  33305. } wmi_therm_throt_level_config_info;
  33306. typedef enum {
  33307. WMI_THERMAL_TEMP_RANGE_STATS_NONE = 0,
  33308. WMI_THERMAL_TEMP_RANGE_STATS_INIT,
  33309. WMI_THERMAL_TEMP_RANGE_STATS_REQUEST,
  33310. WMI_THERMAL_TEMP_RANGE_STATS_CLEAR,
  33311. WMI_THERMAL_STATS_CURRENT_ALL_SENSORS_TEMP,
  33312. } wmi_thermal_stats_action;
  33313. typedef struct {
  33314. /** TLV tag and len; tag equals
  33315. * WMITLV_TAG_STRUC_wmi_thermal_stats_cmd_fixed_param
  33316. */
  33317. A_UINT32 tlv_header;
  33318. /*
  33319. * Configure thermal temperature offset value for capturing
  33320. * thermal stats in thermal range.
  33321. * FW already has thermal throttling threshold temperature in BDF.
  33322. * Thermal STATS start capturing from temperature threshold to
  33323. * temperature threshold + offset.
  33324. * If thermal offset is 0 then thermal STATS capture is disabled.
  33325. *
  33326. * Units of thermal_offset are degrees Celsius.
  33327. */
  33328. A_UINT32 thermal_offset;
  33329. A_UINT32 thermal_action; /* refer to enum wmi_thermal_stats_action */
  33330. } wmi_thermal_stats_cmd_fixed_param;
  33331. typedef enum {
  33332. WMI_THERMAL_CLIENT_UNSPECIFIED = 0,
  33333. WMI_THERMAL_CLIENT_APPS = 1,
  33334. WMI_THERMAL_CLIENT_WPSS = 2,
  33335. WMI_THERMAL_CLIENT_FW = 3,
  33336. WMI_THERMAL_CLIENT_MAX
  33337. } WMI_THERMAL_MITIGATION_CLIENTS;
  33338. #define WMI_THERMAL_CLIENT_MAX_PRIORITY 10
  33339. typedef struct {
  33340. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param */
  33341. A_UINT32 pdev_id; /* config for each pdev */
  33342. A_UINT32 enable; /* 0:disable, 1:enable */
  33343. A_UINT32 dc; /* duty cycle in ms */
  33344. A_UINT32 dc_per_event; /* how often (after how many duty cycles) the FW sends stats to host */
  33345. A_UINT32 therm_throt_levels; /* Indicates the number of thermal zone configuration */
  33346. A_UINT32 client_id; /* Indicates the client from whom the request is being forwarded to FW. Refer to WMI_THERMAL_MITIGATION_CLIENTS. */
  33347. A_UINT32 priority; /* Indicates the priority, higher the value, higher the priority. Varies from 1 to WMI_THERMAL_CLIENT_MAX_PRIORITY. */
  33348. /*
  33349. * Following this structure is the TLV:
  33350. * struct wmi_therm_throt_level_config_info therm_throt_level_config_info[therm_throt_levels];
  33351. */
  33352. } wmi_therm_throt_config_request_fixed_param;
  33353. typedef enum {
  33354. /* no throttling */
  33355. WMI_THERMAL_FULLPERF = 0,
  33356. /* throttling tx to do thermal mitigation */
  33357. WMI_THERMAL_MITIGATION = 1,
  33358. /* shut down the tx completely */
  33359. WMI_THERMAL_SHUTOFF = 2,
  33360. /* THERMAL_SHUTDOWN_TGT
  33361. * The target is over the temperature limit even with tx shut off.
  33362. * The target will be shut down entirely to control the temperature.
  33363. */
  33364. WMI_THERMAL_SHUTDOWN_TGT = 3,
  33365. } WMI_THERMAL_THROT_LEVEL;
  33366. #define WMI_THERMAL_STATS_TEMP_THRESH_LEVEL_MAX 5
  33367. /** FW response with the stats event id for every pdev and zones */
  33368. typedef struct {
  33369. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param */
  33370. A_UINT32 tlv_header;
  33371. A_UINT32 pdev_id; /* stats for corresponding pdev*/
  33372. A_UINT32 temp; /* Temperature reading in celsius */
  33373. A_UINT32 level; /* Current thermal throttling level -
  33374. * contains a WMI_THERMAL_THROT_LEVEL value. */
  33375. A_UINT32 therm_throt_levels; /* number of levels in therm_throt_level_stats_info */
  33376. /* This TLV is followed by another TLV of array of structs
  33377. * wmi_therm_throt_level_stats_info therm_throt_level_stats_info[therm_throt_levels];
  33378. * wmi_thermal_throt_temp_range_stats temp_range_stats[therm_throt_levels];
  33379. */
  33380. } wmi_therm_throt_stats_event_fixed_param;
  33381. typedef struct {
  33382. /** TLV tag and len; tag equals
  33383. * WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info */
  33384. A_UINT32 tlv_header;
  33385. A_UINT32 level_count; /* count of each time thermal throttling entered this state */
  33386. A_UINT32 dc_count; /* total number of duty cycles spent in this state. */
  33387. /* this number increments by one each time we are in this state and we finish one full duty cycle. */
  33388. } wmi_therm_throt_level_stats_info;
  33389. typedef struct {
  33390. /** TLV tag and len; tag equals
  33391. * WMITLV_TAG_STRUC_wmi_thermal_throt_temp_range_stats
  33392. */
  33393. A_UINT32 tlv_header;
  33394. /**
  33395. * Temperature range to capture thermal stats between start to end
  33396. * temperature level.
  33397. */
  33398. A_UINT32 start_temp_level; /* unit in degC */
  33399. A_UINT32 end_temp_level; /* unit in degC */
  33400. /** Total time spent on each thermal stats level, units are milliseconds. */
  33401. A_UINT32 total_time_ms_lo;
  33402. A_UINT32 total_time_ms_hi;
  33403. /**
  33404. * Thermal stats counter for every time thermal stats level enters
  33405. * this temperature range.
  33406. */
  33407. A_UINT32 num_entry;
  33408. } wmi_thermal_throt_temp_range_stats;
  33409. typedef enum {
  33410. WMI_REG_EXT_FCC_MIDBAND = 0,
  33411. WMI_REG_EXT_JAPAN_MIDBAND = 1,
  33412. WMI_REG_EXT_FCC_DFS_HT40 = 2,
  33413. WMI_REG_EXT_JAPAN_NONDFS_HT40 = 3,
  33414. WMI_REG_EXT_JAPAN_DFS_HT40 = 4,
  33415. WMI_REG_EXT_FCC_CH_144 = 5,
  33416. } WMI_REG_EXT_BITMAP;
  33417. #ifdef WMI_CMD_STRINGS
  33418. static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
  33419. {
  33420. switch (wmi_command) {
  33421. /* initialize the wlan sub system */
  33422. WMI_RETURN_STRING(WMI_INIT_CMDID);
  33423. /* Scan specific commands */
  33424. /* start scan request to FW */
  33425. WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
  33426. /* stop scan request to FW */
  33427. WMI_RETURN_STRING(WMI_STOP_SCAN_CMDID);
  33428. /* full list of channels as defined by the regulatory
  33429. * that will be used by scanner */
  33430. WMI_RETURN_STRING(WMI_SCAN_CHAN_LIST_CMDID);
  33431. /* overwrite default priority table in scan scheduler */
  33432. WMI_RETURN_STRING(WMI_SCAN_SCH_PRIO_TBL_CMDID);
  33433. /* This command to adjust the priority and min.max_rest_time
  33434. * of an on ongoing scan request.
  33435. */
  33436. WMI_RETURN_STRING(WMI_SCAN_UPDATE_REQUEST_CMDID);
  33437. /* PDEV(physical device) specific commands */
  33438. /* set regulatorty ctl id used by FW to determine the exact
  33439. * ctl power limits */
  33440. WMI_RETURN_STRING(WMI_PDEV_SET_REGDOMAIN_CMDID);
  33441. /* set channel. mainly used for supporting monitor mode */
  33442. WMI_RETURN_STRING(WMI_PDEV_SET_CHANNEL_CMDID);
  33443. /* set pdev specific parameters */
  33444. WMI_RETURN_STRING(WMI_PDEV_SET_PARAM_CMDID);
  33445. /* enable packet log */
  33446. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_ENABLE_CMDID);
  33447. /* disable packet log*/
  33448. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_DISABLE_CMDID);
  33449. /* set wmm parameters */
  33450. WMI_RETURN_STRING(WMI_PDEV_SET_WMM_PARAMS_CMDID);
  33451. /* set HT cap ie that needs to be carried probe requests
  33452. * HT/VHT channels */
  33453. WMI_RETURN_STRING(WMI_PDEV_SET_HT_CAP_IE_CMDID);
  33454. /* set VHT cap ie that needs to be carried on probe
  33455. * requests on VHT channels */
  33456. WMI_RETURN_STRING(WMI_PDEV_SET_VHT_CAP_IE_CMDID);
  33457. /* Command to send the DSCP-to-TID map to the target */
  33458. WMI_RETURN_STRING(WMI_PDEV_SET_DSCP_TID_MAP_CMDID);
  33459. /* set quiet ie parameters. primarily used in AP mode */
  33460. WMI_RETURN_STRING(WMI_PDEV_SET_QUIET_MODE_CMDID);
  33461. /* Enable/Disable Green AP Power Save */
  33462. WMI_RETURN_STRING(WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID);
  33463. /* get TPC config for the current operating channel */
  33464. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CONFIG_CMDID);
  33465. /* set the base MAC address for the physical device before
  33466. * a VDEV is created. For firmware that does not support
  33467. * this feature and this command, the pdev MAC address will
  33468. * not be changed. */
  33469. WMI_RETURN_STRING(WMI_PDEV_SET_BASE_MACADDR_CMDID);
  33470. /* eeprom content dump , the same to bdboard data */
  33471. WMI_RETURN_STRING(WMI_PDEV_DUMP_CMDID);
  33472. /* VDEV(virtual device) specific commands */
  33473. /* vdev create */
  33474. WMI_RETURN_STRING(WMI_VDEV_CREATE_CMDID);
  33475. /* vdev delete */
  33476. WMI_RETURN_STRING(WMI_VDEV_DELETE_CMDID);
  33477. /* vdev start request */
  33478. WMI_RETURN_STRING(WMI_VDEV_START_REQUEST_CMDID);
  33479. /* vdev restart request (RX only, NO TX, used for CAC period)*/
  33480. WMI_RETURN_STRING(WMI_VDEV_RESTART_REQUEST_CMDID);
  33481. /* vdev up request */
  33482. WMI_RETURN_STRING(WMI_VDEV_UP_CMDID);
  33483. /* vdev stop request */
  33484. WMI_RETURN_STRING(WMI_VDEV_STOP_CMDID);
  33485. /* vdev down request */
  33486. WMI_RETURN_STRING(WMI_VDEV_DOWN_CMDID);
  33487. /* set a vdev param */
  33488. WMI_RETURN_STRING(WMI_VDEV_SET_PARAM_CMDID);
  33489. /* set a key (used for setting per peer unicast
  33490. * and per vdev multicast) */
  33491. WMI_RETURN_STRING(WMI_VDEV_INSTALL_KEY_CMDID);
  33492. /* Set bss max idle time */
  33493. WMI_RETURN_STRING(WMI_VDEV_BSS_MAX_IDLE_TIME_CMDID);
  33494. /* wnm sleep mode command */
  33495. WMI_RETURN_STRING(WMI_VDEV_WNM_SLEEPMODE_CMDID);
  33496. WMI_RETURN_STRING(WMI_VDEV_WMM_ADDTS_CMDID);
  33497. WMI_RETURN_STRING(WMI_VDEV_WMM_DELTS_CMDID);
  33498. WMI_RETURN_STRING(WMI_VDEV_SET_WMM_PARAMS_CMDID);
  33499. WMI_RETURN_STRING(WMI_VDEV_SET_GTX_PARAMS_CMDID);
  33500. WMI_RETURN_STRING(WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID);
  33501. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_START_CMDID);
  33502. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_STOP_CMDID);
  33503. WMI_RETURN_STRING(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
  33504. WMI_RETURN_STRING(WMI_VDEV_SET_IE_CMDID);
  33505. WMI_RETURN_STRING(WMI_VDEV_REPORT_AP_OPER_BW_CMDID);
  33506. /* peer specific commands */
  33507. /** create a peer */
  33508. WMI_RETURN_STRING(WMI_PEER_CREATE_CMDID);
  33509. /** delete a peer */
  33510. WMI_RETURN_STRING(WMI_PEER_DELETE_CMDID);
  33511. /** delete all peer (excluding bss peer) */
  33512. WMI_RETURN_STRING(WMI_VDEV_DELETE_ALL_PEER_CMDID);
  33513. /** flush specific tid queues of a peer */
  33514. WMI_RETURN_STRING(WMI_PEER_FLUSH_TIDS_CMDID);
  33515. /** set a parameter of a peer */
  33516. WMI_RETURN_STRING(WMI_PEER_SET_PARAM_CMDID);
  33517. /* set peer to associated state. will cary all parameters
  33518. * determined during assocication time */
  33519. WMI_RETURN_STRING(WMI_PEER_ASSOC_CMDID);
  33520. /* add a wds (4 address ) entry. used only for testing
  33521. * WDS feature on AP products */
  33522. WMI_RETURN_STRING(WMI_PEER_ADD_WDS_ENTRY_CMDID);
  33523. /* remove wds (4 address ) entry. used only for testing WDS
  33524. * feature on AP products */
  33525. WMI_RETURN_STRING(WMI_PEER_REMOVE_WDS_ENTRY_CMDID);
  33526. /* set up mcast info for multicast to unicast conversion */
  33527. WMI_RETURN_STRING(WMI_PEER_MCAST_GROUP_CMDID);
  33528. /* request peer info from FW to get PEER_INFO_EVENTID */
  33529. WMI_RETURN_STRING(WMI_PEER_INFO_REQ_CMDID);
  33530. /* unmap response for a peer */
  33531. WMI_RETURN_STRING(WMI_PEER_UNMAP_RESPONSE_CMDID);
  33532. /* beacon/management specific commands */
  33533. /* transmit beacon by reference. used for transmitting beacon
  33534. * on low latency interface like pcie */
  33535. WMI_RETURN_STRING(WMI_BCN_TX_CMDID);
  33536. /* transmit beacon by value */
  33537. WMI_RETURN_STRING(WMI_PDEV_SEND_BCN_CMDID);
  33538. /* set the beacon template. used in beacon offload mode to setup
  33539. * the common beacon template with the FW to be used by FW to
  33540. * generate beacons */
  33541. WMI_RETURN_STRING(WMI_BCN_TMPL_CMDID);
  33542. /* set beacon filter with FW */
  33543. WMI_RETURN_STRING(WMI_BCN_FILTER_RX_CMDID);
  33544. /* enable/disable filtering of probe requests in the firmware */
  33545. WMI_RETURN_STRING(WMI_PRB_REQ_FILTER_RX_CMDID);
  33546. /* transmit management frame by value. will be deprecated */
  33547. WMI_RETURN_STRING(WMI_MGMT_TX_CMDID);
  33548. /* set the probe response template. used in beacon offload mode
  33549. * to setup the common probe response template with the FW to
  33550. * be used by FW to generate probe responses */
  33551. WMI_RETURN_STRING(WMI_PRB_TMPL_CMDID);
  33552. /** set FILS Discovery frame template for FW to generate FD frames */
  33553. WMI_RETURN_STRING(WMI_FD_TMPL_CMDID);
  33554. /* commands to directly control ba negotiation directly from
  33555. * host. only used in test mode */
  33556. /* turn off FW Auto addba mode and let host control addba */
  33557. WMI_RETURN_STRING(WMI_ADDBA_CLEAR_RESP_CMDID);
  33558. /* send add ba request */
  33559. WMI_RETURN_STRING(WMI_ADDBA_SEND_CMDID);
  33560. WMI_RETURN_STRING(WMI_ADDBA_STATUS_CMDID);
  33561. /* send del ba */
  33562. WMI_RETURN_STRING(WMI_DELBA_SEND_CMDID);
  33563. /* set add ba response will be used by FW to generate
  33564. * addba response*/
  33565. WMI_RETURN_STRING(WMI_ADDBA_SET_RESP_CMDID);
  33566. /* send single VHT MPDU with AMSDU */
  33567. WMI_RETURN_STRING(WMI_SEND_SINGLEAMSDU_CMDID);
  33568. /* Station power save specific config */
  33569. /* enable/disable station powersave */
  33570. WMI_RETURN_STRING(WMI_STA_POWERSAVE_MODE_CMDID);
  33571. /* set station power save specific parameter */
  33572. WMI_RETURN_STRING(WMI_STA_POWERSAVE_PARAM_CMDID);
  33573. /* set station mimo powersave mode */
  33574. WMI_RETURN_STRING(WMI_STA_MIMO_PS_MODE_CMDID);
  33575. /* DFS-specific commands */
  33576. /* enable DFS (radar detection)*/
  33577. WMI_RETURN_STRING(WMI_PDEV_DFS_ENABLE_CMDID);
  33578. /* disable DFS (radar detection)*/
  33579. WMI_RETURN_STRING(WMI_PDEV_DFS_DISABLE_CMDID);
  33580. /* enable DFS phyerr/parse filter offload */
  33581. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_ENA_CMDID);
  33582. /* enable DFS phyerr/parse filter offload */
  33583. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_DIS_CMDID);
  33584. /* Roaming specific commands */
  33585. /* set roam scan mode */
  33586. WMI_RETURN_STRING(WMI_ROAM_SCAN_MODE);
  33587. /* set roam scan RSSI threshold below which roam
  33588. * scan is enabled */
  33589. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_THRESHOLD);
  33590. /* set roam scan period for periodic roam scan mode */
  33591. WMI_RETURN_STRING(WMI_ROAM_SCAN_PERIOD);
  33592. /* set roam scan trigger RSSI change threshold */
  33593. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
  33594. /* set roam AP profile */
  33595. WMI_RETURN_STRING(WMI_ROAM_AP_PROFILE);
  33596. /* set channel list for roam scans */
  33597. WMI_RETURN_STRING(WMI_ROAM_CHAN_LIST);
  33598. /* offload scan specific commands */
  33599. /* set offload scan AP profile */
  33600. WMI_RETURN_STRING(WMI_OFL_SCAN_ADD_AP_PROFILE);
  33601. /* remove offload scan AP profile */
  33602. WMI_RETURN_STRING(WMI_OFL_SCAN_REMOVE_AP_PROFILE);
  33603. /* set offload scan period */
  33604. WMI_RETURN_STRING(WMI_OFL_SCAN_PERIOD);
  33605. /* P2P specific commands */
  33606. /* set P2P device info. FW will used by FW to create P2P IE
  33607. * to be carried in probe response generated during p2p listen
  33608. * and for p2p discoverability */
  33609. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DEVICE_INFO);
  33610. /* enable/disable p2p discoverability on STA/AP VDEVs */
  33611. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DISCOVERABILITY);
  33612. /* set p2p ie to be carried in beacons generated by FW for GO */
  33613. WMI_RETURN_STRING(WMI_P2P_GO_SET_BEACON_IE);
  33614. /* set p2p ie to be carried in probe response frames generated
  33615. * by FW for GO */
  33616. WMI_RETURN_STRING(WMI_P2P_GO_SET_PROBE_RESP_IE);
  33617. /* set the vendor specific p2p ie data.
  33618. * FW will use this to parse the P2P NoA
  33619. * attribute in the beacons/probe responses received.
  33620. */
  33621. WMI_RETURN_STRING(WMI_P2P_SET_VENDOR_IE_DATA_CMDID);
  33622. /* set the configure of p2p find offload */
  33623. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID);
  33624. /* set the vendor specific p2p ie data for p2p find offload */
  33625. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_APPIE_CMDID);
  33626. /* set the BSSID/device name pattern of p2p find offload */
  33627. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID);
  33628. /* set OppPS related parameters **/
  33629. WMI_RETURN_STRING(WMI_P2P_SET_OPPPS_PARAM_CMDID);
  33630. /* AP power save specific config
  33631. * set AP power save specific param */
  33632. WMI_RETURN_STRING(WMI_AP_PS_PEER_PARAM_CMDID);
  33633. /* set AP UAPSD coex specific param */
  33634. WMI_RETURN_STRING(WMI_AP_PS_PEER_UAPSD_COEX_CMDID);
  33635. /* Rate-control specific commands */
  33636. WMI_RETURN_STRING(WMI_PEER_RATE_RETRY_SCHED_CMDID);
  33637. /* WLAN Profiling commands. */
  33638. WMI_RETURN_STRING(WMI_WLAN_PROFILE_TRIGGER_CMDID);
  33639. WMI_RETURN_STRING(WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID);
  33640. WMI_RETURN_STRING(WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID);
  33641. WMI_RETURN_STRING(WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID);
  33642. WMI_RETURN_STRING(WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID);
  33643. /* Suspend resume command Ids */
  33644. WMI_RETURN_STRING(WMI_PDEV_SUSPEND_CMDID);
  33645. WMI_RETURN_STRING(WMI_PDEV_RESUME_CMDID);
  33646. /* Beacon filter commands */
  33647. /* add a beacon filter */
  33648. WMI_RETURN_STRING(WMI_ADD_BCN_FILTER_CMDID);
  33649. /* remove a beacon filter */
  33650. WMI_RETURN_STRING(WMI_RMV_BCN_FILTER_CMDID);
  33651. /* WOW Specific WMI commands */
  33652. /* add pattern for awake */
  33653. WMI_RETURN_STRING(WMI_WOW_ADD_WAKE_PATTERN_CMDID);
  33654. /* deleta a wake pattern */
  33655. WMI_RETURN_STRING(WMI_WOW_DEL_WAKE_PATTERN_CMDID);
  33656. /* enable/deisable wake event */
  33657. WMI_RETURN_STRING(WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID);
  33658. /* enable WOW */
  33659. WMI_RETURN_STRING(WMI_WOW_ENABLE_CMDID);
  33660. /* host woke up from sleep event to FW. Generated in response
  33661. * to WOW Hardware event */
  33662. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
  33663. /* RTT measurement related cmd */
  33664. /* request to make an RTT measurement */
  33665. WMI_RETURN_STRING(WMI_RTT_MEASREQ_CMDID);
  33666. /* request to report a tsf measurement */
  33667. WMI_RETURN_STRING(WMI_RTT_TSF_CMDID);
  33668. /* spectral scan command */
  33669. /* configure spectral scan */
  33670. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID);
  33671. /* enable/disable spectral scan and trigger */
  33672. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
  33673. /* F/W stats */
  33674. /* one time request for stats */
  33675. WMI_RETURN_STRING(WMI_REQUEST_STATS_CMDID);
  33676. /* Push MCC Adaptive Scheduler Stats to Firmware */
  33677. WMI_RETURN_STRING(WMI_MCC_SCHED_TRAFFIC_STATS_CMDID);
  33678. /* ARP OFFLOAD REQUEST*/
  33679. WMI_RETURN_STRING(WMI_SET_ARP_NS_OFFLOAD_CMDID);
  33680. /* Proactive ARP Response Add Pattern Command*/
  33681. WMI_RETURN_STRING(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  33682. /* Proactive ARP Response Del Pattern Command*/
  33683. WMI_RETURN_STRING(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  33684. /* NS offload confid*/
  33685. WMI_RETURN_STRING(WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID);
  33686. /* GTK offload Specific WMI commands */
  33687. WMI_RETURN_STRING(WMI_GTK_OFFLOAD_CMDID);
  33688. /* CSA offload Specific WMI commands */
  33689. /* csa offload enable */
  33690. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_ENABLE_CMDID);
  33691. /* chan switch command */
  33692. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_CHANSWITCH_CMDID);
  33693. /* Chatter commands */
  33694. /* Change chatter mode of operation */
  33695. WMI_RETURN_STRING(WMI_CHATTER_SET_MODE_CMDID);
  33696. /* chatter add coalescing filter command */
  33697. WMI_RETURN_STRING(WMI_CHATTER_ADD_COALESCING_FILTER_CMDID);
  33698. /* chatter delete coalescing filter command */
  33699. WMI_RETURN_STRING(WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID);
  33700. /* chatter coalecing query command */
  33701. WMI_RETURN_STRING(WMI_CHATTER_COALESCING_QUERY_CMDID);
  33702. /* addba specific commands */
  33703. /* start the aggregation on this TID */
  33704. WMI_RETURN_STRING(WMI_PEER_TID_ADDBA_CMDID);
  33705. /* stop the aggregation on this TID */
  33706. WMI_RETURN_STRING(WMI_PEER_TID_DELBA_CMDID);
  33707. /* set station mimo powersave method */
  33708. WMI_RETURN_STRING(WMI_STA_DTIM_PS_METHOD_CMDID);
  33709. /* Configure the Station UAPSD AC Auto Trigger Parameters */
  33710. WMI_RETURN_STRING(WMI_STA_UAPSD_AUTO_TRIG_CMDID);
  33711. /* Configure the Keep Alive Parameters */
  33712. WMI_RETURN_STRING(WMI_STA_KEEPALIVE_CMDID);
  33713. /* Request ssn from target for a sta/tid pair */
  33714. WMI_RETURN_STRING(WMI_BA_REQ_SSN_CMDID);
  33715. /* misc command group */
  33716. /* echo command mainly used for testing */
  33717. WMI_RETURN_STRING(WMI_ECHO_CMDID);
  33718. /* !!IMPORTANT!!
  33719. * If you need to add a new WMI command to the
  33720. * WMI_RETURN_STRING(WMI_GRP_MISC) sub-group,
  33721. * please make sure you add it BEHIND
  33722. * WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  33723. * as we MUST have a fixed value here to maintain compatibility between
  33724. * UTF and the ART2 driver
  33725. */
  33726. /* UTF WMI commands */
  33727. WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  33728. /* set debug log config */
  33729. WMI_RETURN_STRING(WMI_DBGLOG_CFG_CMDID);
  33730. /* QVIT specific command id */
  33731. WMI_RETURN_STRING(WMI_PDEV_QVIT_CMDID);
  33732. /* Factory Testing Mode request command
  33733. * used for integrated chipsets */
  33734. WMI_RETURN_STRING(WMI_PDEV_FTM_INTG_CMDID);
  33735. /* set and get keepalive parameters command */
  33736. WMI_RETURN_STRING(WMI_VDEV_SET_KEEPALIVE_CMDID);
  33737. WMI_RETURN_STRING(WMI_VDEV_GET_KEEPALIVE_CMDID);
  33738. /* For fw recovery test command */
  33739. WMI_RETURN_STRING(WMI_FORCE_FW_HANG_CMDID);
  33740. /* Set Mcast/Bdcast filter */
  33741. WMI_RETURN_STRING(WMI_SET_MCASTBCAST_FILTER_CMDID);
  33742. /* set thermal management params */
  33743. WMI_RETURN_STRING(WMI_THERMAL_MGMT_CMDID);
  33744. WMI_RETURN_STRING(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
  33745. WMI_RETURN_STRING(WMI_LRO_CONFIG_CMDID);
  33746. WMI_RETURN_STRING(WMI_TRANSFER_DATA_TO_FLASH_CMDID);
  33747. WMI_RETURN_STRING(WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID);
  33748. WMI_RETURN_STRING(WMI_VDEV_WISA_CMDID);
  33749. WMI_RETURN_STRING(WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID);
  33750. WMI_RETURN_STRING(WMI_WOW_SET_ACTION_WAKE_UP_CMDID);
  33751. WMI_RETURN_STRING(WMI_MAWC_SENSOR_REPORT_IND_CMDID);
  33752. WMI_RETURN_STRING(WMI_ROAM_CONFIGURE_MAWC_CMDID);
  33753. WMI_RETURN_STRING(WMI_NLO_CONFIGURE_MAWC_CMDID);
  33754. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_MAWC_CMDID);
  33755. /* GPIO Configuration */
  33756. WMI_RETURN_STRING(WMI_GPIO_CONFIG_CMDID);
  33757. WMI_RETURN_STRING(WMI_GPIO_OUTPUT_CMDID);
  33758. /* Txbf configuration command */
  33759. WMI_RETURN_STRING(WMI_TXBF_CMDID);
  33760. /* FWTEST Commands */
  33761. WMI_RETURN_STRING(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
  33762. /* set NoA descs */
  33763. WMI_RETURN_STRING(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
  33764. /* TDLS Configuration */
  33765. /* enable/disable TDLS */
  33766. WMI_RETURN_STRING(WMI_TDLS_SET_STATE_CMDID);
  33767. /* set tdls peer state */
  33768. WMI_RETURN_STRING(WMI_TDLS_PEER_UPDATE_CMDID);
  33769. /* Resmgr Configuration */
  33770. /* Adaptive OCS is enabled by default in the FW.
  33771. * This command is used to disable FW based adaptive OCS.
  33772. */
  33773. WMI_RETURN_STRING
  33774. (WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
  33775. /* set the requested channel time quota for the home channels */
  33776. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
  33777. /* set the requested latency for the home channels */
  33778. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
  33779. /* STA SMPS Configuration */
  33780. /* force SMPS mode */
  33781. WMI_RETURN_STRING(WMI_STA_SMPS_FORCE_MODE_CMDID);
  33782. /* set SMPS parameters */
  33783. WMI_RETURN_STRING(WMI_STA_SMPS_PARAM_CMDID);
  33784. /* Wlan HB commands */
  33785. /* enable/disable wlan HB */
  33786. WMI_RETURN_STRING(WMI_HB_SET_ENABLE_CMDID);
  33787. /* set tcp parameters for wlan HB */
  33788. WMI_RETURN_STRING(WMI_HB_SET_TCP_PARAMS_CMDID);
  33789. /* set tcp pkt filter for wlan HB */
  33790. WMI_RETURN_STRING(WMI_HB_SET_TCP_PKT_FILTER_CMDID);
  33791. /* set udp parameters for wlan HB */
  33792. WMI_RETURN_STRING(WMI_HB_SET_UDP_PARAMS_CMDID);
  33793. /* set udp pkt filter for wlan HB */
  33794. WMI_RETURN_STRING(WMI_HB_SET_UDP_PKT_FILTER_CMDID);
  33795. /* Wlan RMC commands*/
  33796. /* enable/disable RMC */
  33797. WMI_RETURN_STRING(WMI_RMC_SET_MODE_CMDID);
  33798. /* configure action frame period */
  33799. WMI_RETURN_STRING(WMI_RMC_SET_ACTION_PERIOD_CMDID);
  33800. /* For debug/future enhancement purposes only,
  33801. * configures/finetunes RMC algorithms */
  33802. WMI_RETURN_STRING(WMI_RMC_CONFIG_CMDID);
  33803. /* WLAN MHF offload commands */
  33804. /* enable/disable MHF offload */
  33805. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_SET_MODE_CMDID);
  33806. /* Plumb routing table for MHF offload */
  33807. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID);
  33808. /* location scan commands */
  33809. /* start batch scan */
  33810. WMI_RETURN_STRING(WMI_BATCH_SCAN_ENABLE_CMDID);
  33811. /* stop batch scan */
  33812. WMI_RETURN_STRING(WMI_BATCH_SCAN_DISABLE_CMDID);
  33813. /* get batch scan result */
  33814. WMI_RETURN_STRING(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID);
  33815. /* OEM related cmd */
  33816. WMI_RETURN_STRING(WMI_OEM_REQ_CMDID);
  33817. WMI_RETURN_STRING(WMI_OEM_REQUEST_CMDID);
  33818. /* NAN request cmd */
  33819. WMI_RETURN_STRING(WMI_NAN_CMDID);
  33820. /* Modem power state cmd */
  33821. WMI_RETURN_STRING(WMI_MODEM_POWER_STATE_CMDID);
  33822. WMI_RETURN_STRING(WMI_REQUEST_STATS_EXT_CMDID);
  33823. WMI_RETURN_STRING(WMI_OBSS_SCAN_ENABLE_CMDID);
  33824. WMI_RETURN_STRING(WMI_OBSS_SCAN_DISABLE_CMDID);
  33825. WMI_RETURN_STRING(WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID);
  33826. WMI_RETURN_STRING(WMI_ROAM_SCAN_CMD);
  33827. WMI_RETURN_STRING(WMI_PDEV_SET_LED_CONFIG_CMDID);
  33828. WMI_RETURN_STRING(WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID);
  33829. WMI_RETURN_STRING(WMI_CHAN_AVOID_UPDATE_CMDID);
  33830. WMI_RETURN_STRING(WMI_COEX_CONFIG_CMDID);
  33831. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID);
  33832. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID);
  33833. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID);
  33834. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID);
  33835. WMI_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID);
  33836. WMI_RETURN_STRING(WMI_START_LINK_STATS_CMDID);
  33837. WMI_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID);
  33838. WMI_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID);
  33839. WMI_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID);
  33840. WMI_RETURN_STRING(WMI_LPI_START_SCAN_CMDID);
  33841. WMI_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID);
  33842. WMI_RETURN_STRING(WMI_EXTSCAN_START_CMDID);
  33843. WMI_RETURN_STRING(WMI_EXTSCAN_STOP_CMDID);
  33844. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID);
  33845. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID);
  33846. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID);
  33847. WMI_RETURN_STRING(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID);
  33848. WMI_RETURN_STRING(WMI_EXTSCAN_SET_CAPABILITIES_CMDID);
  33849. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CAPABILITIES_CMDID);
  33850. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID);
  33851. WMI_RETURN_STRING(WMI_ROAM_SYNCH_COMPLETE);
  33852. WMI_RETURN_STRING(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
  33853. WMI_RETURN_STRING(WMI_EXTWOW_ENABLE_CMDID);
  33854. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
  33855. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
  33856. WMI_RETURN_STRING(WMI_UNIT_TEST_CMDID);
  33857. WMI_RETURN_STRING(WMI_ROAM_SET_RIC_REQUEST_CMDID);
  33858. WMI_RETURN_STRING(WMI_PDEV_GET_TEMPERATURE_CMDID);
  33859. WMI_RETURN_STRING(WMI_SET_DHCP_SERVER_OFFLOAD_CMDID);
  33860. WMI_RETURN_STRING(WMI_TPC_CHAINMASK_CONFIG_CMDID);
  33861. WMI_RETURN_STRING(WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID);
  33862. WMI_RETURN_STRING(WMI_SCAN_PROB_REQ_OUI_CMDID);
  33863. WMI_RETURN_STRING(WMI_TDLS_SET_OFFCHAN_MODE_CMDID);
  33864. WMI_RETURN_STRING(WMI_PDEV_SET_LED_FLASHING_CMDID);
  33865. WMI_RETURN_STRING(WMI_MDNS_OFFLOAD_ENABLE_CMDID);
  33866. WMI_RETURN_STRING(WMI_MDNS_SET_FQDN_CMDID);
  33867. WMI_RETURN_STRING(WMI_MDNS_SET_RESPONSE_CMDID);
  33868. WMI_RETURN_STRING(WMI_MDNS_GET_STATS_CMDID);
  33869. WMI_RETURN_STRING(WMI_MDNS_SET_STAIP_CMDID);
  33870. WMI_RETURN_STRING(WMI_ROAM_INVOKE_CMDID);
  33871. WMI_RETURN_STRING(WMI_SET_ANTENNA_DIVERSITY_CMDID);
  33872. WMI_RETURN_STRING(WMI_SAP_OFL_ENABLE_CMDID);
  33873. WMI_RETURN_STRING(WMI_APFIND_CMDID);
  33874. WMI_RETURN_STRING(WMI_PASSPOINT_LIST_CONFIG_CMDID);
  33875. WMI_RETURN_STRING(WMI_OCB_SET_SCHED_CMDID);
  33876. WMI_RETURN_STRING(WMI_OCB_SET_CONFIG_CMDID);
  33877. WMI_RETURN_STRING(WMI_OCB_SET_UTC_TIME_CMDID);
  33878. WMI_RETURN_STRING(WMI_OCB_START_TIMING_ADVERT_CMDID);
  33879. WMI_RETURN_STRING(WMI_OCB_STOP_TIMING_ADVERT_CMDID);
  33880. WMI_RETURN_STRING(WMI_OCB_GET_TSF_TIMER_CMDID);
  33881. WMI_RETURN_STRING(WMI_DCC_GET_STATS_CMDID);
  33882. WMI_RETURN_STRING(WMI_DCC_CLEAR_STATS_CMDID);
  33883. WMI_RETURN_STRING(WMI_DCC_UPDATE_NDL_CMDID);
  33884. WMI_RETURN_STRING(WMI_ROAM_FILTER_CMDID);
  33885. WMI_RETURN_STRING(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
  33886. WMI_RETURN_STRING(WMI_DEBUG_MESG_FLUSH_CMDID);
  33887. WMI_RETURN_STRING(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
  33888. WMI_RETURN_STRING(WMI_SOC_SET_PCL_CMDID);
  33889. WMI_RETURN_STRING(WMI_SOC_SET_HW_MODE_CMDID);
  33890. WMI_RETURN_STRING(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID);
  33891. WMI_RETURN_STRING(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID);
  33892. WMI_RETURN_STRING(WMI_DIAG_EVENT_LOG_CONFIG_CMDID);
  33893. WMI_RETURN_STRING(WMI_PACKET_FILTER_CONFIG_CMDID);
  33894. WMI_RETURN_STRING(WMI_PACKET_FILTER_ENABLE_CMDID);
  33895. WMI_RETURN_STRING(WMI_SAP_SET_BLACKLIST_PARAM_CMDID);
  33896. WMI_RETURN_STRING(WMI_WOW_UDP_SVC_OFLD_CMDID);
  33897. WMI_RETURN_STRING(WMI_MGMT_TX_SEND_CMDID);
  33898. WMI_RETURN_STRING(WMI_SOC_SET_ANTENNA_MODE_CMDID);
  33899. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID);
  33900. WMI_RETURN_STRING(WMI_AP_PS_EGAP_PARAM_CMDID);
  33901. WMI_RETURN_STRING(WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID);
  33902. WMI_RETURN_STRING(WMI_BPF_GET_CAPABILITY_CMDID);
  33903. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_STATS_CMDID);
  33904. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID);
  33905. WMI_RETURN_STRING(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID);
  33906. WMI_RETURN_STRING(WMI_NDI_GET_CAP_REQ_CMDID);
  33907. WMI_RETURN_STRING(WMI_NDP_INITIATOR_REQ_CMDID);
  33908. WMI_RETURN_STRING(WMI_NDP_RESPONDER_REQ_CMDID);
  33909. WMI_RETURN_STRING(WMI_NDP_END_REQ_CMDID);
  33910. WMI_RETURN_STRING(WMI_PEER_UPDATE_WDS_ENTRY_CMDID);
  33911. WMI_RETURN_STRING(WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID);
  33912. WMI_RETURN_STRING(WMI_PDEV_FIPS_CMDID);
  33913. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_ENABLE_CMDID);
  33914. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID);
  33915. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID);
  33916. WMI_RETURN_STRING(WMI_PDEV_SET_CTL_TABLE_CMDID);
  33917. WMI_RETURN_STRING(WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID);
  33918. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CMDID);
  33919. WMI_RETURN_STRING(WMI_MIB_STATS_ENABLE_CMDID);
  33920. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID);
  33921. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID);
  33922. WMI_RETURN_STRING(WMI_VDEV_RATEMASK_CMDID);
  33923. WMI_RETURN_STRING(WMI_VDEV_ATF_REQUEST_CMDID);
  33924. WMI_RETURN_STRING(WMI_VDEV_SET_DSCP_TID_MAP_CMDID);
  33925. WMI_RETURN_STRING(WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID);
  33926. WMI_RETURN_STRING(WMI_VDEV_SET_QUIET_MODE_CMDID);
  33927. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID);
  33928. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID);
  33929. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID);
  33930. WMI_RETURN_STRING(WMI_PEER_ATF_REQUEST_CMDID);
  33931. WMI_RETURN_STRING(WMI_FWTEST_CMDID);
  33932. WMI_RETURN_STRING(WMI_QBOOST_CFG_CMDID);
  33933. WMI_RETURN_STRING(WMI_PDEV_GET_NFCAL_POWER_CMDID);
  33934. WMI_RETURN_STRING(WMI_PDEV_SET_PCL_CMDID);
  33935. WMI_RETURN_STRING(WMI_PDEV_SET_HW_MODE_CMDID);
  33936. WMI_RETURN_STRING(WMI_PDEV_SET_MAC_CONFIG_CMDID);
  33937. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_MODE_CMDID);
  33938. WMI_RETURN_STRING(WMI_ROAM_SET_MBO_PARAM_CMDID);
  33939. WMI_RETURN_STRING(WMI_CHAN_AVOID_RPT_ALLOW_CMDID);
  33940. WMI_RETURN_STRING(WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID);
  33941. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID);
  33942. WMI_RETURN_STRING(WMI_PDEV_WAL_POWER_DEBUG_CMDID);
  33943. WMI_RETURN_STRING(WMI_PEER_BWF_REQUEST_CMDID);
  33944. WMI_RETURN_STRING(WMI_DBGLOG_TIME_STAMP_SYNC_CMDID);
  33945. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_START_CMDID);
  33946. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID);
  33947. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_SETUP_CMDID);
  33948. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_REMOVE_CMDID);
  33949. WMI_RETURN_STRING(WMI_SET_MULTIPLE_MCAST_FILTER_CMDID);
  33950. WMI_RETURN_STRING(WMI_READ_DATA_FROM_FLASH_CMDID);
  33951. WMI_RETURN_STRING(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID);
  33952. WMI_RETURN_STRING(WMI_PEER_SET_RX_BLOCKSIZE_CMDID);
  33953. WMI_RETURN_STRING(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID);
  33954. WMI_RETURN_STRING(WMI_PDEV_GET_ANTDIV_STATUS_CMDID);
  33955. WMI_RETURN_STRING(WMI_PEER_ANTDIV_INFO_REQ_CMDID);
  33956. WMI_RETURN_STRING(WMI_MNT_FILTER_CMDID);
  33957. WMI_RETURN_STRING(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID);
  33958. WMI_RETURN_STRING(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID);
  33959. WMI_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID);
  33960. WMI_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID);
  33961. WMI_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
  33962. WMI_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID);
  33963. WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
  33964. WMI_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID);
  33965. WMI_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
  33966. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
  33967. WMI_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID);
  33968. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID);
  33969. WMI_RETURN_STRING(WMI_LPI_OEM_REQ_CMDID);
  33970. WMI_RETURN_STRING(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID);
  33971. WMI_RETURN_STRING(WMI_PDEV_CHECK_CAL_VERSION_CMDID);
  33972. WMI_RETURN_STRING(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID);
  33973. WMI_RETURN_STRING(WMI_VDEV_SET_ARP_STAT_CMDID);
  33974. WMI_RETURN_STRING(WMI_VDEV_GET_ARP_STAT_CMDID);
  33975. WMI_RETURN_STRING(WMI_VDEV_GET_TX_POWER_CMDID);
  33976. WMI_RETURN_STRING(WMI_OFFCHAN_DATA_TX_SEND_CMDID);
  33977. WMI_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID);
  33978. WMI_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID);
  33979. WMI_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID);
  33980. WMI_RETURN_STRING(WMI_OEM_DMA_RING_CFG_REQ_CMDID);
  33981. WMI_RETURN_STRING(WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID);
  33982. WMI_RETURN_STRING(WMI_VDEV_LIMIT_OFFCHAN_CMDID);
  33983. WMI_RETURN_STRING(WMI_ROAM_BTM_CONFIG_CMDID);
  33984. WMI_RETURN_STRING(WMI_WLM_CONFIG_CMDID);
  33985. WMI_RETURN_STRING(WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID);
  33986. WMI_RETURN_STRING(WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID);
  33987. WMI_RETURN_STRING(WMI_PDEV_SEND_FD_CMDID);
  33988. WMI_RETURN_STRING(WMI_ENABLE_FILS_CMDID);
  33989. WMI_RETURN_STRING(WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID);
  33990. WMI_RETURN_STRING(WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID);
  33991. WMI_RETURN_STRING(WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID);
  33992. WMI_RETURN_STRING(WMI_SAP_OBSS_DETECTION_CFG_CMDID);
  33993. WMI_RETURN_STRING(WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
  33994. WMI_RETURN_STRING(WMI_11K_OFFLOAD_REPORT_CMDID);
  33995. WMI_RETURN_STRING(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
  33996. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ENABLE_CMDID);
  33997. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID);
  33998. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID);
  33999. WMI_RETURN_STRING(WMI_BSS_COLOR_CHANGE_ENABLE_CMDID);
  34000. WMI_RETURN_STRING(WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID);
  34001. WMI_RETURN_STRING(WMI_RUNTIME_DPD_RECAL_CMDID);
  34002. WMI_RETURN_STRING(WMI_TWT_ENABLE_CMDID);
  34003. WMI_RETURN_STRING(WMI_TWT_DISABLE_CMDID);
  34004. WMI_RETURN_STRING(WMI_TWT_ADD_DIALOG_CMDID);
  34005. WMI_RETURN_STRING(WMI_TWT_DEL_DIALOG_CMDID);
  34006. WMI_RETURN_STRING(WMI_TWT_PAUSE_DIALOG_CMDID);
  34007. WMI_RETURN_STRING(WMI_TWT_RESUME_DIALOG_CMDID);
  34008. WMI_RETURN_STRING(WMI_TWT_VDEV_CONFIG_CMDID);
  34009. WMI_RETURN_STRING(WMI_REQUEST_ROAM_SCAN_STATS_CMDID);
  34010. WMI_RETURN_STRING(WMI_PEER_TID_CONFIGURATIONS_CMDID);
  34011. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID);
  34012. WMI_RETURN_STRING(WMI_GET_TPC_POWER_CMDID);
  34013. WMI_RETURN_STRING(WMI_MOTION_DET_CONFIG_PARAM_CMDID);
  34014. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID);
  34015. WMI_RETURN_STRING(WMI_MOTION_DET_START_STOP_CMDID);
  34016. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID);
  34017. WMI_RETURN_STRING(WMI_SAR_LIMITS_CMDID);
  34018. WMI_RETURN_STRING(WMI_SAR_GET_LIMITS_CMDID);
  34019. WMI_RETURN_STRING(WMI_PEER_CHAN_WIDTH_SWITCH_CMDID);
  34020. WMI_RETURN_STRING(WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID);
  34021. WMI_RETURN_STRING(WMI_PDEV_HE_TB_ACTION_FRM_CMDID);
  34022. WMI_RETURN_STRING(WMI_HPCS_PULSE_START_CMDID);
  34023. WMI_RETURN_STRING(WMI_VDEV_CHAINMASK_CONFIG_CMDID);
  34024. WMI_RETURN_STRING(WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID);
  34025. WMI_RETURN_STRING(WMI_NDP_CMDID);
  34026. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_FILTER_CMDID);
  34027. WMI_RETURN_STRING(WMI_SET_CURRENT_COUNTRY_CMDID);
  34028. WMI_RETURN_STRING(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID);
  34029. WMI_RETURN_STRING(WMI_PEER_TX_PN_REQUEST_CMDID);
  34030. WMI_RETURN_STRING(WMI_ROAM_BSS_LOAD_CONFIG_CMDID);
  34031. WMI_RETURN_STRING(WMI_VDEV_GET_MWS_COEX_INFO_CMDID);
  34032. WMI_RETURN_STRING(WMI_REQUEST_WLM_STATS_CMDID);
  34033. WMI_RETURN_STRING(WMI_PDEV_SET_RAP_CONFIG_CMDID);
  34034. WMI_RETURN_STRING(WMI_STA_TDCC_CONFIG_CMDID);
  34035. WMI_RETURN_STRING(WMI_ROAM_DEAUTH_CONFIG_CMDID);
  34036. WMI_RETURN_STRING(WMI_ROAM_IDLE_CONFIG_CMDID);
  34037. WMI_RETURN_STRING(WMI_IDLE_TRIGGER_MONITOR_CMDID);
  34038. WMI_RETURN_STRING(WMI_PDEV_DSM_FILTER_CMDID);
  34039. WMI_RETURN_STRING(WMI_TWT_BTWT_INVITE_STA_CMDID);
  34040. WMI_RETURN_STRING(WMI_TWT_BTWT_REMOVE_STA_CMDID);
  34041. WMI_RETURN_STRING(WMI_OEM_DATA_CMDID);
  34042. WMI_RETURN_STRING(WMI_ROAM_PREAUTH_STATUS_CMDID);
  34043. WMI_RETURN_STRING(WMI_SET_ELNA_BYPASS_CMDID);
  34044. WMI_RETURN_STRING(WMI_GET_ELNA_BYPASS_CMDID);
  34045. WMI_RETURN_STRING(WMI_AUDIO_AGGR_ENABLE_CMDID);
  34046. WMI_RETURN_STRING(WMI_AUDIO_AGGR_ADD_GROUP_CMDID);
  34047. WMI_RETURN_STRING(WMI_AUDIO_AGGR_DEL_GROUP_CMDID);
  34048. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID);
  34049. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID);
  34050. WMI_RETURN_STRING(WMI_AUDIO_AGGR_UPDATE_STA_GROUP_INFO_CMDID);
  34051. WMI_RETURN_STRING(WMI_CFR_CAPTURE_FILTER_CMDID);
  34052. WMI_RETURN_STRING(WMI_ATF_SSID_GROUPING_REQUEST_CMDID);
  34053. WMI_RETURN_STRING(WMI_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID);
  34054. WMI_RETURN_STRING(WMI_PEER_ATF_EXT_REQUEST_CMDID);
  34055. WMI_RETURN_STRING(WMI_GET_CHANNEL_ANI_CMDID);
  34056. WMI_RETURN_STRING(WMI_SET_OCL_CMDID);
  34057. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_AUTO_RATE_CMDID);
  34058. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_PROBE_CMDID);
  34059. WMI_RETURN_STRING(WMI_VDEV_AUDIO_SYNC_TRIGGER_CMDID);
  34060. WMI_RETURN_STRING(WMI_VDEV_AUDIO_SYNC_QTIMER_CMDID);
  34061. WMI_RETURN_STRING(WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID);
  34062. WMI_RETURN_STRING(WMI_VDEV_GET_BIG_DATA_CMDID);
  34063. WMI_RETURN_STRING(WMI_PDEV_FRAME_INJECT_CMDID);
  34064. WMI_RETURN_STRING(WMI_PDEV_TBTT_OFFSET_SYNC_CMDID);
  34065. WMI_RETURN_STRING(WMI_VDEV_GET_BIG_DATA_P2_CMDID);
  34066. WMI_RETURN_STRING(WMI_AUDIO_AGGR_GET_STATISTICS_CMDID);
  34067. WMI_RETURN_STRING(WMI_AUDIO_AGGR_RESET_STATISTICS_CMDID);
  34068. WMI_RETURN_STRING(WMI_ANT_CONTROLLER_CMDID);
  34069. WMI_RETURN_STRING(WMI_SIMULATION_TEST_CMDID);
  34070. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_RTSCTS_CONFIG_CMDID);
  34071. WMI_RETURN_STRING(WMI_REQUEST_CTRL_PATH_STATS_CMDID);
  34072. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_STATS_CMDID);
  34073. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_SCHED_METHOD_CMDID);
  34074. WMI_RETURN_STRING(WMI_AUDIO_AGGR_GET_SCHED_METHOD_CMDID);
  34075. WMI_RETURN_STRING(WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID);
  34076. WMI_RETURN_STRING(WMI_QOS_NULL_FRAME_TX_SEND_CMDID);
  34077. WMI_RETURN_STRING(WMI_PDEV_ENABLE_DURATION_BASED_TX_MODE_SELECTION_CMDID);
  34078. WMI_RETURN_STRING(WMI_TWT_NUDGE_DIALOG_CMDID);
  34079. WMI_RETURN_STRING(WMI_VDEV_SET_TPC_POWER_CMDID);
  34080. WMI_RETURN_STRING(WMI_VDEV_TID_LATENCY_CONFIG_CMDID);
  34081. WMI_RETURN_STRING(WMI_PEER_TID_LATENCY_CONFIG_CMDID);
  34082. WMI_RETURN_STRING(WMI_MLO_LINK_SET_ACTIVE_CMDID);
  34083. WMI_RETURN_STRING(WMI_PDEV_GET_DPD_STATUS_CMDID);
  34084. WMI_RETURN_STRING(WMI_MLO_SETUP_CMDID);
  34085. WMI_RETURN_STRING(WMI_MLO_READY_CMDID);
  34086. WMI_RETURN_STRING(WMI_MLO_TEARDOWN_CMDID);
  34087. WMI_RETURN_STRING(WMI_VDEV_IGMP_OFFLOAD_CMDID);
  34088. WMI_RETURN_STRING(WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID);
  34089. WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_SAR_TABLE_CMDID);
  34090. WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_GEO_TABLE_CMDID);
  34091. WMI_RETURN_STRING(WMI_PDEV_GET_HALPHY_CAL_STATUS_CMDID);
  34092. WMI_RETURN_STRING(WMI_PDEV_SET_HALPHY_CAL_BMAP_CMDID);
  34093. WMI_RETURN_STRING(WMI_AFC_CMDID);
  34094. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_SET_PARAM_CMDID);
  34095. WMI_RETURN_STRING(WMI_PDEV_MEC_AGING_TIMER_CONFIG_CMDID);
  34096. WMI_RETURN_STRING(WMI_PEER_CONFIG_PPE_DS_CMDID);
  34097. WMI_RETURN_STRING(WMI_VDEV_ENABLE_DISABLE_INTRA_BSS_CMDID);
  34098. WMI_RETURN_STRING(WMI_PEER_ENABLE_DISABLE_INTRA_BSS_CMDID);
  34099. WMI_RETURN_STRING(WMI_ROAM_MLO_CONFIG_CMDID);
  34100. WMI_RETURN_STRING(WMI_REQUEST_THERMAL_STATS_CMDID);
  34101. WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_INTERFACE_CMDID);
  34102. WMI_RETURN_STRING(WMI_VDEV_SET_MU_SNIF_CMDID);
  34103. WMI_RETURN_STRING(WMI_VDEV_ICMP_OFFLOAD_CMDID);
  34104. WMI_RETURN_STRING(WMI_ROAM_SET_PARAM_CMDID);
  34105. WMI_RETURN_STRING(WMI_PDEV_FIPS_EXTEND_CMDID);
  34106. WMI_RETURN_STRING(WMI_PDEV_FIPS_MODE_SET_CMDID);
  34107. WMI_RETURN_STRING(WMI_SAWF_SVC_CLASS_CFG_CMDID);
  34108. WMI_RETURN_STRING(WMI_SAWF_SVC_CLASS_DISABLE_CMDID);
  34109. WMI_RETURN_STRING(WMI_VDEV_UPDATE_MAC_ADDR_CMDID);
  34110. WMI_RETURN_STRING(WMI_SOC_TQM_RESET_ENABLE_DISABLE_CMDID);
  34111. WMI_RETURN_STRING(WMI_VDEV_MULTIPLE_PEER_GROUP_CMDID);
  34112. WMI_RETURN_STRING(WMI_VDEV_SET_LTF_KEY_SEED_CMDID);
  34113. WMI_RETURN_STRING(WMI_RTT_PASN_AUTH_STATUS_CMD);
  34114. WMI_RETURN_STRING(WMI_RTT_PASN_DEAUTH_CMD);
  34115. WMI_RETURN_STRING(WMI_VDEV_PN_MGMT_RX_FILTER_CMDID);
  34116. WMI_RETURN_STRING(WMI_PEER_RX_PN_REQUEST_CMDID);
  34117. WMI_RETURN_STRING(WMI_SET_MULTIPLE_PDEV_VDEV_PARAM_CMDID);
  34118. WMI_RETURN_STRING(WMI_PMM_SCRATCH_REG_ALLOCATION_CMDID);
  34119. WMI_RETURN_STRING(WMI_MLO_PEER_TID_TO_LINK_MAP_CMDID);
  34120. WMI_RETURN_STRING(WMI_ROAM_ENABLE_VENDOR_CONTROL_CMDID);
  34121. WMI_RETURN_STRING(WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID);
  34122. WMI_RETURN_STRING(WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID);
  34123. WMI_RETURN_STRING(WMI_PEER_FLUSH_POLICY_CMDID);
  34124. WMI_RETURN_STRING(WMI_WOW_COAP_ADD_PATTERN_CMDID);
  34125. WMI_RETURN_STRING(WMI_WOW_COAP_DEL_PATTERN_CMDID);
  34126. WMI_RETURN_STRING(WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID);
  34127. WMI_RETURN_STRING(WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID);
  34128. WMI_RETURN_STRING(WMI_WOW_COAP_GET_BUF_INFO_CMDID);
  34129. WMI_RETURN_STRING(WMI_COEX_DBAM_CMDID);
  34130. WMI_RETURN_STRING(WMI_PDEV_FEATURESET_CMDID);
  34131. WMI_RETURN_STRING(WMI_VDEV_PARAM_ENABLE_SR_PROHIBIT_CMDID);
  34132. WMI_RETURN_STRING(WMI_XGAP_ENABLE_CMDID);
  34133. WMI_RETURN_STRING(WMI_PDEV_MESH_RX_FILTER_ENABLE_CMDID);
  34134. WMI_RETURN_STRING(WMI_MLO_LINK_REMOVAL_CMDID);
  34135. WMI_RETURN_STRING(WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID);
  34136. WMI_RETURN_STRING(WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID);
  34137. WMI_RETURN_STRING(WMI_PDEV_UPDATE_PMK_CACHE_CMDID);
  34138. WMI_RETURN_STRING(WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID);
  34139. WMI_RETURN_STRING(WMI_PDEV_SET_SRG_BSS_COLOR_BITMAP_CMDID);
  34140. WMI_RETURN_STRING(WMI_PDEV_SET_SRG_PARTIAL_BSSID_BITMAP_CMDID);
  34141. WMI_RETURN_STRING(WMI_PDEV_SET_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID);
  34142. WMI_RETURN_STRING(WMI_PDEV_SET_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID);
  34143. WMI_RETURN_STRING(WMI_PDEV_SET_NON_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID);
  34144. WMI_RETURN_STRING(WMI_PDEV_SET_NON_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID);
  34145. WMI_RETURN_STRING(WMI_VDEV_SET_PCL_CMDID);
  34146. WMI_RETURN_STRING(WMI_PEER_RESERVED0_CMDID);
  34147. WMI_RETURN_STRING(WMI_PEER_CFR_CAPTURE_CMDID);
  34148. WMI_RETURN_STRING(WMI_PEER_CONFIG_VLAN_CMDID);
  34149. WMI_RETURN_STRING(WMI_PEER_TX_FILTER_CMDID);
  34150. WMI_RETURN_STRING(WMI_BCN_OFFLOAD_CTRL_CMDID);
  34151. WMI_RETURN_STRING(WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID);
  34152. WMI_RETURN_STRING(WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID);
  34153. WMI_RETURN_STRING(WMI_VDEV_ADFS_CH_CFG_CMDID);
  34154. WMI_RETURN_STRING(WMI_VDEV_ADFS_OCAC_ABORT_CMDID);
  34155. WMI_RETURN_STRING(WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID);
  34156. WMI_RETURN_STRING(WMI_REQUEST_RCPI_CMDID);
  34157. WMI_RETURN_STRING(WMI_WFA_CONFIG_CMDID);
  34158. WMI_RETURN_STRING(WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID);
  34159. WMI_RETURN_STRING(WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID);
  34160. WMI_RETURN_STRING(WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID);
  34161. WMI_RETURN_STRING(WMI_RMC_SET_MANUAL_LEADER_CMDID);
  34162. WMI_RETURN_STRING(WMI_11D_SCAN_START_CMDID);
  34163. WMI_RETURN_STRING(WMI_11D_SCAN_STOP_CMDID);
  34164. WMI_RETURN_STRING(WMI_VENDOR_PDEV_CMDID);
  34165. WMI_RETURN_STRING(WMI_VENDOR_VDEV_CMDID);
  34166. WMI_RETURN_STRING(WMI_VENDOR_PEER_CMDID);
  34167. WMI_RETURN_STRING(WMI_VDEV_SET_TWT_EDCA_PARAMS_CMDID); /* XPAN TWT */
  34168. WMI_RETURN_STRING(WMI_ESL_EGID_CMDID);
  34169. WMI_RETURN_STRING(WMI_TDMA_SCHEDULE_REQUEST_CMDID);
  34170. WMI_RETURN_STRING(WMI_HPA_CMDID);
  34171. WMI_RETURN_STRING(WMI_PDEV_SET_TGTR2P_TABLE_CMDID); /* To set target rate to power table */
  34172. WMI_RETURN_STRING(WMI_MLO_VDEV_GET_LINK_INFO_CMDID);
  34173. WMI_RETURN_STRING(WMI_VDEV_SET_ULOFDMA_MANUAL_SU_TRIG_CMDID);
  34174. WMI_RETURN_STRING(WMI_VDEV_SET_ULOFDMA_MANUAL_MU_TRIG_CMDID);
  34175. WMI_RETURN_STRING(WMI_VDEV_STANDALONE_SOUND_CMDID);
  34176. WMI_RETURN_STRING(WMI_PDEV_SET_RF_PATH_CMDID); /* set RF path of PHY */
  34177. WMI_RETURN_STRING(WMI_VDEV_PAUSE_CMDID);
  34178. WMI_RETURN_STRING(WMI_GPIO_STATE_REQ_CMDID);
  34179. WMI_RETURN_STRING(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID);
  34180. WMI_RETURN_STRING(WMI_MLO_LINK_RECOMMENDATION_CMDID);
  34181. WMI_RETURN_STRING(WMI_NAN_OEM_DATA_CMDID);
  34182. WMI_RETURN_STRING(WMI_PDEV_WSI_STATS_INFO_CMDID);
  34183. WMI_RETURN_STRING(WMI_CSA_EVENT_STATUS_INDICATION_CMDID);
  34184. WMI_RETURN_STRING(WMI_VDEV_SCHED_MODE_PROBE_REQ_CMDID);
  34185. WMI_RETURN_STRING(WMI_VDEV_OOB_CONNECTION_REQ_CMDID);
  34186. WMI_RETURN_STRING(WMI_AUDIO_TRANSPORT_SWITCH_RESP_STATUS_CMDID);
  34187. WMI_RETURN_STRING(WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID);
  34188. WMI_RETURN_STRING(WMI_COEX_MULTIPLE_CONFIG_CMDID);
  34189. WMI_RETURN_STRING(WMI_PDEV_ENABLE_LED_BLINK_DOWNLOAD_TABLE_CMDID);
  34190. WMI_RETURN_STRING(WMI_PDEV_ENABLE_WIFI_RADAR_CMDID);
  34191. WMI_RETURN_STRING(WMI_VDEV_GET_TWT_SESSION_STATS_INFO_CMDID);
  34192. WMI_RETURN_STRING(WMI_PDEV_ENABLE_XLNA_CMDID);
  34193. WMI_RETURN_STRING(WMI_PDEV_SET_CUSTOM_TX_POWER_PER_MCS_CMDID);
  34194. WMI_RETURN_STRING(WMI_PEER_ACTIVE_TRAFFIC_MAP_CMDID);
  34195. WMI_RETURN_STRING(WMI_REQUEST_OPM_STATS_CMDID);
  34196. WMI_RETURN_STRING(WMI_SOC_TX_PACKET_CUSTOM_CLASSIFY_CMDID);
  34197. WMI_RETURN_STRING(WMI_SET_AP_SUSPEND_RESUME_CMDID);
  34198. WMI_RETURN_STRING(WMI_P2P_GO_DFS_AP_CONFIG_CMDID);
  34199. }
  34200. return (A_UINT8 *) "Invalid WMI cmd";
  34201. }
  34202. #endif /* WMI_CMD_STRINGS */
  34203. /** WMI commands/events for the regulatory offload */
  34204. /** Host indicating current country code to FW */
  34205. typedef struct {
  34206. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param */
  34207. A_UINT32 pdev_id;
  34208. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  34209. } wmi_set_current_country_cmd_fixed_param;
  34210. typedef enum {
  34211. WMI_COUNTRYCODE_ALPHA2,
  34212. WMI_COUNTRYCODE_COUNTRY_ID,
  34213. WMI_COUNTRYCODE_DOMAIN_CODE,
  34214. } WMI_COUNTRYCODE_TYPE;
  34215. typedef struct {
  34216. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_init_country_cmd_fixed_param */
  34217. A_UINT32 pdev_id;
  34218. A_UINT32 countrycode_type; /* WMI_COUNTRYCODE_TYPE */
  34219. union {
  34220. struct {
  34221. /* Three character for alpha2. The first two is ISO name for country the last one
  34222. present if it is indoor and out door. First char in bits 7:0 and second char in bits 15:8 ... */
  34223. A_UINT32 alpha2:24,
  34224. unused:8;
  34225. };
  34226. A_UINT32 country_id; /* Country ID */
  34227. A_UINT32 domain_code; /* Domain code */
  34228. } country_code;
  34229. } wmi_set_init_country_cmd_fixed_param;
  34230. typedef enum {
  34231. /**
  34232. * serv_resp_format_type will indicate the format in which afc_serv data
  34233. * is written into host/target shared memory
  34234. * This type can be expanded in future as per requirements.
  34235. */
  34236. AFC_SERV_RESP_FORMAT_JSON = 0,
  34237. AFC_SERV_RESP_FORMAT_BINARY = 1,
  34238. AFC_SERV_RESP_FORMAT_IGNORE = 2, /* When cmd type is reset,server response is set to FORMAT_IGNORE */
  34239. } WMI_AFC_SERV_RESP_FORMAT_TYPE;
  34240. typedef enum {
  34241. /**
  34242. * wmi_afc_cmd_type will indicate type of AFC command sent to FW.
  34243. * Once AFC server writes data at TZ memory location SERV_RESP_READY
  34244. * type command is sent to FW.
  34245. * This type can be expanded in future as per requirements.
  34246. */
  34247. WMI_AFC_CMD_SERV_RESP_READY = 1,
  34248. WMI_AFC_CMD_RESET = 2, /* Added cmd type to handle AFC reset */
  34249. WMI_AFC_CMD_CLEAR_PAYLOAD = 3, /* Added cmd type to clear AFC response payload in proxy mode */
  34250. } WMI_AFC_CMD_TYPE;
  34251. /** Host indicating AFC info availability to FW */
  34252. typedef struct {
  34253. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_afc_cmd_fixed_param */
  34254. A_UINT32 pdev_id;
  34255. A_UINT32 cmd_type; /* refer WMI_AFC_CMD_TYPE */
  34256. A_UINT32 serv_resp_format; /* refer WMI_AFC_SERV_RESP_FORMAT_TYPE */
  34257. } wmi_afc_cmd_fixed_param;
  34258. /** Host indicates AFC info availability to FW using WMI_AFC_CMD
  34259. * This AFC info is written by AFC application/ server in host/target
  34260. * shared memory reserved during bootup.
  34261. * The structure is placeholder, indicating way afc_serv_resp is written in FW.
  34262. * This structure will not be attach as input to WMI command.
  34263. * This structure will be common to both host and FW.
  34264. * The structure of this WMI AFC info is as follows.
  34265. */
  34266. typedef struct {
  34267. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_afc_serv_resp_struct */
  34268. A_UINT32 status; /* validity flag to be updated by TZ/ PF stub layer,
  34269. * to indicate if payload is valid or not.
  34270. * status = 1 will indicate payload is valid. */
  34271. A_UINT32 time_to_live; /* Total time for which this AFC info is valid in seconds */
  34272. A_UINT32 length; /* length of the payload, in bytes */
  34273. A_UINT32 payload_format; /* The format of payload written in FW memory:
  34274. * 0 -> JSON format
  34275. * 1 -> Binary format
  34276. * Refer to WMI_AFC_SERV_RESP_FORMAT_TYPE.
  34277. */
  34278. /*
  34279. * The structure above is followed by array of char which will have
  34280. * JSON string or binary data, as specified by the payload_format field.
  34281. * A_CHAR bufp[]; AFC payload (JSON string or binary data)
  34282. */
  34283. } wmi_afc_serv_resp_struct;
  34284. /*
  34285. * The following structures define the format used for AFC binary data objects
  34286. * shared by the host SW and target FW.
  34287. * FW expects these structures to be written in shared memory in little-endian
  34288. * format. If the host/AFC app uses big endian format, Host/APP needs to
  34289. * byteswap the data, so FW will get data in the expected little-endian format.
  34290. */
  34291. typedef struct {
  34292. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  34293. * bits 31:16 = u16 end_freq
  34294. * both in MHz units
  34295. */
  34296. A_INT32 max_psd; /* Maximum PSD in dBm/MHz, value is stored in 0.01 dBm/MHz steps */
  34297. } afc_freq_info;
  34298. typedef struct {
  34299. A_UINT32 channel_cfi; /* channel center frequency index */
  34300. /*
  34301. * maximum permissible EIRP available for above CFI in dBm,
  34302. * value is stored in 0.01 dBm steps.
  34303. * Note: This A_UINT32 field can receive negative EIRP value from AFC
  34304. * server. These negative EIRP value cases are handled internally.
  34305. */
  34306. A_UINT32 max_eirp_pwr;
  34307. } afc_eirp_info;
  34308. typedef struct {
  34309. A_UINT32 global_operating_class;
  34310. A_UINT32 num_channels; /* num of valid channels for above global operating class */
  34311. /* This structure is followed by (num_channels*sizeof(afc_eirp_info))
  34312. * bytes array:
  34313. * afc_eirp_info eirp_info[num_channels];
  34314. * List of channel cfi and eirp power values,
  34315. * Total size will be num_channels * sizeof(afc_eirp_info)
  34316. */
  34317. } afc_channel_info;
  34318. /*
  34319. * For case of afc_server_resp containing binary payload, the buf pointer
  34320. * in wmi_afc_serv_resp_struct will be poiniting to binary format payload
  34321. * which is in the format defined below.
  34322. */
  34323. typedef struct {
  34324. A_UINT32 local_error_code; /* Internal error code between AFC app and target success = 0, General failure = 1 */
  34325. A_UINT32 version; /* Internal version between AFC app and Target for structure pattern */
  34326. A_UINT32 afc_wfa_version; /* Version defined in AFC spec document. bits 15:0 -- minor version & bits 31:16 -- major version */
  34327. A_UINT32 request_id; /* AFC unique request ID */
  34328. A_UINT32 avail_exp_time_d; /* avail_exp_time_d and avail_exp_time_t are in UTC
  34329. * Availability expiry time date format: YYYY-MM-DD,
  34330. * bits 7:0 -DD - Day (expected values 1-31)
  34331. * bits 15:8 -MM - Month (expected values 1-12)
  34332. * bits 31:16 -YYYY - Year
  34333. */
  34334. A_UINT32 avail_exp_time_t; /* Availability expiry time format HH-MM-SS
  34335. * bits 7:0 -SS - Time in Sec (expected values 0-59)
  34336. * bits 15:8 -MM - Minute (expected values 0-59)
  34337. * bits 23:16 -HH - Hour (expected values 0-23)
  34338. * bits 31:24 -reserved
  34339. */
  34340. A_INT32 afc_serv_resp_code; /* response code defined in afc wfa document, refer WMI_AFC_SERV_RESP_CODE */
  34341. A_UINT32 num_frequency_obj; /* Total number of frequency objects */
  34342. A_UINT32 num_channel_obj; /* Total number of frequency objects */
  34343. char shortdesc[64]; /* This field represents a short description related to the result indicated by the response_code
  34344. * field. End of description will be indicated by 0 */
  34345. A_UINT32 reserved[2]; /* reserve space for future fields - needs to be set to 0x0 */
  34346. /*
  34347. * This structure is followed by an array of frequency info and
  34348. * channel info array:
  34349. * - afc_freq_info freq_info[num_frequency_obj];
  34350. * List of frequency power values, total size will be
  34351. * num_frequency_obj * sizeof(afc_freq_info)
  34352. * - afc_channel_info chan_info[num_channel_obj];
  34353. * List of channel power values, total size will be
  34354. * num_channel_obj * sizeof(afc_channel_info)
  34355. */
  34356. } afc_spectrum_inquiry_resp_bin_type;
  34357. typedef struct {
  34358. /** TLV tag and len; tag equals
  34359. * WMITLV_TAG_STRUC_wmi_vdev_enable_disable_intra_bss_cmd_fixed_param
  34360. */
  34361. A_UINT32 tlv_header;
  34362. /** The corresponding vdev_id.
  34363. */
  34364. A_UINT32 vdev_id;
  34365. /* Enable/Disable intra_bss.
  34366. */
  34367. A_UINT32 enable;
  34368. } wmi_vdev_enable_disable_intra_bss_cmd_fixed_param;
  34369. typedef struct {
  34370. /** TLV tag and len; tag equals
  34371. * WMITLV_TAG_STRUC_wmi_peer_enable_disable_intra_bss_cmd_fixed_param
  34372. */
  34373. A_UINT32 tlv_header;
  34374. /** Mac Address of the peer.
  34375. */
  34376. wmi_mac_addr mac_addr;
  34377. /** The corresponding vdev_id.
  34378. */
  34379. A_UINT32 vdev_id;
  34380. /* Enable/Disable intra_bss.
  34381. */
  34382. A_UINT32 enable;
  34383. } wmi_peer_enable_disable_intra_bss_cmd_fixed_param;
  34384. /* Freq units in MHz */
  34385. #define WMI_REG_RULE_START_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  34386. #define WMI_REG_RULE_START_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  34387. #define WMI_REG_RULE_END_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 16, 16)
  34388. #define WMI_REG_RULE_END_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 16, value)
  34389. /* BW in MHz */
  34390. #define WMI_REG_RULE_MAX_BW_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 0, 16)
  34391. #define WMI_REG_RULE_MAX_BW_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 0, 16, value)
  34392. /* regpower in dBm */
  34393. #define WMI_REG_RULE_REG_POWER_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 16, 8)
  34394. #define WMI_REG_RULE_REG_POWER_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 16, 8, value)
  34395. /* antenna gain */
  34396. #define WMI_REG_RULE_ANTENNA_GAIN_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 24, 8)
  34397. #define WMI_REG_RULE_ANTENNA_GAIN_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 24, 8, value)
  34398. typedef enum {
  34399. WMI_REG_FLAG_CHAN_NO_IR = 0x0001, /* passive channel */
  34400. WMI_REG_FLAG_CHAN_RADAR = 0x0002, /* dfs channel */
  34401. WMI_REG_FLAG_CHAN_NO_OFDM = 0x0004, /* no ofdm channel */
  34402. WMI_REG_FLAG_CHAN_INDOOR_ONLY = 0x0008, /* indoor only channel */
  34403. } WMI_REGULATORY_FLAGS;
  34404. #define WMI_REG_RULE_FLAGS_GET(flag_info) WMI_GET_BITS(flag_info, 0, 16)
  34405. #define WMI_REG_RULE_FLAGS_SET(flag_info, value) WMI_SET_BITS(flag_info, 0, 16, value)
  34406. typedef struct {
  34407. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_struct */
  34408. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  34409. * bits 31:16 = u16 end_freq
  34410. * (both in MHz units) */
  34411. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  34412. bits 23:16 = u8 reg_power (dBm units),
  34413. bits 31:24 = u8 ant_gain (dB units) */
  34414. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  34415. bits 31:16 reserved */
  34416. } wmi_regulatory_rule_struct;
  34417. #define WMI_REG_RULE_PSD_FLAG_GET(psd_power_info) \
  34418. WMI_GET_BITS(psd_power_info, 0, 1)
  34419. #define WMI_REG_RULE_PSD_FLAG_SET(psd_power_info, value) \
  34420. WMI_SET_BITS(psd_power_info, 0, 1, value)
  34421. #define WMI_REG_RULE_PSD_EIRP_GET(psd_power_info) \
  34422. WMI_GET_BITS(psd_power_info, 16, 16)
  34423. #define WMI_REG_RULE_PSD_EIRP_SET(psd_power_info, value) \
  34424. WMI_SET_BITS(psd_power_info, 16, 16, value)
  34425. typedef struct {
  34426. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_ext_struct */
  34427. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  34428. bits 31:16 = u16 end_freq
  34429. (both in MHz units)
  34430. use same MACRO as wmi_regulatory_rule_struct
  34431. */
  34432. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  34433. bits 23:16 = u8 reg_power (dBm units),
  34434. bits 31:24 = u8 ant_gain (dB units)
  34435. use same MACRO as wmi_regulatory_rule_struct
  34436. */
  34437. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  34438. bits 31:16 reserved
  34439. use same MACRO as wmi_regulatory_rule_struct
  34440. */
  34441. A_UINT32 psd_power_info; /* bits 0 - whether PSD power,
  34442. bits 15:1 - reserved
  34443. bits 31:16 - maximum PSD EIRP (dB/MHz)
  34444. */
  34445. /*
  34446. * NOTE: no further fields can be added into this struct, due to
  34447. * message buffer size limitations in certain targets for the
  34448. * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
  34449. */
  34450. } wmi_regulatory_rule_ext_struct;
  34451. #define WMI_REG_CHAN_PRIORITY_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  34452. #define WMI_REG_CHAN_PRIORITY_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  34453. typedef struct {
  34454. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_chan_priority_struct */
  34455. A_UINT32 freq_info;
  34456. /* freq_info:
  34457. * bits 15:0 = u16 Cutoff Frequency value for Prioritization (in MHz units)
  34458. * The frequencies above this value will be prioritized and
  34459. * the frequencies below this value will be de-prioritized.
  34460. * bits 31:16 = reserved for future
  34461. */
  34462. /*
  34463. * NOTE: no further fields can be added into this struct, due to
  34464. * message buffer size limitations in certain targets for the
  34465. * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
  34466. */
  34467. } wmi_regulatory_chan_priority_struct;
  34468. #define WMI_REG_FCC_RULE_CHAN_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  34469. #define WMI_REG_FCC_RULE_CHAN_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  34470. #define WMI_REG_FCC_RULE_FCC_TX_POWER_GET(freq_info) WMI_GET_BITS(freq_info, 16, 8)
  34471. #define WMI_REG_FCC_RULE_FCC_TX_POWER_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 8, value)
  34472. typedef struct {
  34473. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_fcc_rule_struct */
  34474. A_UINT32 freq_info;
  34475. /* freq_info:
  34476. * bits 15:0 = u16 channel frequency (in MHz units)
  34477. * bits 23:16 = u8 FCC_Tx_power (dBm units)
  34478. * bits 31:24 = u8 reserved for future
  34479. */
  34480. /*
  34481. * NOTE: no further fields can be added into this struct, due to
  34482. * message buffer size limitations in certain targets for the
  34483. * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
  34484. */
  34485. } wmi_regulatory_fcc_rule_struct;
  34486. typedef enum {
  34487. WMI_REG_DFS_UNINIT_REGION = 0,
  34488. WMI_REG_DFS_FCC_REGION = 1,
  34489. WMI_REG_DFS_ETSI_REGION = 2,
  34490. WMI_REG_DFS_MKK_REGION = 3,
  34491. WMI_REG_DFS_CN_REGION = 4,
  34492. WMI_REG_DFS_KR_REGION = 5,
  34493. /* Add new items above */
  34494. WMI_REG_DFS_UNDEF_REGION = 0xFFFF,
  34495. } WMI_REG_DFS_REGION;
  34496. typedef enum {
  34497. WMI_REGULATORY_PHYMODE_NO11A = 0x0001, /* NO 11A */
  34498. WMI_REGULATORY_PHYMODE_NO11B = 0x0002, /* NO 11B */
  34499. WMI_REGULATORY_PHYMODE_NO11G = 0x0004, /* NO 11G */
  34500. WMI_REGULATORY_PHYMODE_NO11N = 0x0008, /* NO 11N */
  34501. WMI_REGULATORY_PHYMODE_NO11AC = 0x0010, /* NO 11AC */
  34502. WMI_REGULATORY_PHYMODE_NO11AX = 0x0020, /* NO 11AX */
  34503. WMI_REGULATORY_PHYMODE_NO11BE = 0x0040, /* NO 11BE */
  34504. } WMI_REGULATORY_PHYBITMAP;
  34505. typedef enum {
  34506. WMI_REG_SET_CC_STATUS_PASS = 0,
  34507. WMI_REG_CURRENT_ALPHA2_NOT_FOUND = 1,
  34508. WMI_REG_INIT_ALPHA2_NOT_FOUND = 2,
  34509. WMI_REG_SET_CC_CHANGE_NOT_ALLOWED = 3,
  34510. WMI_REG_SET_CC_STATUS_NO_MEMORY = 4,
  34511. WMI_REG_SET_CC_STATUS_FAIL = 5,
  34512. } WMI_REG_SET_CC_STATUS_CODE;
  34513. typedef struct {
  34514. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param */
  34515. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  34516. A_UINT32 phy_id;
  34517. A_UINT32 alpha2;
  34518. A_UINT32 num_phy;
  34519. A_UINT32 country_id;
  34520. A_UINT32 domain_code;
  34521. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  34522. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  34523. A_UINT32 min_bw_2g; /* BW in MHz */
  34524. A_UINT32 max_bw_2g; /* BW in MHz */
  34525. A_UINT32 min_bw_5g; /* BW in MHz */
  34526. A_UINT32 max_bw_5g; /* BW in MHz */
  34527. A_UINT32 num_2g_reg_rules;
  34528. A_UINT32 num_5g_reg_rules;
  34529. /*
  34530. * followed by wmi_regulatory_rule_struct TLV array. First 2G and then 5G
  34531. * - wmi_regulatory_fcc_rule_struct reg_fcc_rule[]
  34532. */
  34533. } wmi_reg_chan_list_cc_event_fixed_param;
  34534. typedef enum {
  34535. WMI_REG_CLIENT_REGULAR = 0,
  34536. WMI_REG_CLIENT_SUBORDINATE = 1,
  34537. /* 2 and 3 are reserved for future growth */
  34538. WMI_REG_CLIENT_MAX = 4, /* can't expand, b/c used as array length below */
  34539. } wmi_reg_client_type;
  34540. typedef struct {
  34541. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_ext_fixed_param */
  34542. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  34543. A_UINT32 phy_id;
  34544. A_UINT32 alpha2;
  34545. A_UINT32 num_phy;
  34546. A_UINT32 country_id; /* uses CountryCode enum values */
  34547. A_UINT32 domain_code; /* used EnumRd enum values */
  34548. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  34549. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  34550. A_UINT32 min_bw_2g; /* BW in MHz */
  34551. A_UINT32 max_bw_2g; /* BW in MHz */
  34552. A_UINT32 min_bw_5g; /* BW in MHz */
  34553. A_UINT32 max_bw_5g; /* BW in MHz */
  34554. A_UINT32 num_2g_reg_rules;
  34555. A_UINT32 num_5g_reg_rules;
  34556. A_UINT32 client_type; /* populated if device can function as client */
  34557. A_UINT32 rnr_tpe_usable; /* If RNR TPE Octet usable for that country */
  34558. A_UINT32 unspecified_ap_usable; /* If unspecified AP usable for that country */
  34559. A_UINT32 domain_code_6g_ap_lpi;
  34560. A_UINT32 domain_code_6g_ap_sp;
  34561. A_UINT32 domain_code_6g_ap_vlp;
  34562. A_UINT32 domain_code_6g_client_lpi[WMI_REG_CLIENT_MAX];
  34563. A_UINT32 domain_code_6g_client_sp[WMI_REG_CLIENT_MAX];
  34564. A_UINT32 domain_code_6g_client_vlp[WMI_REG_CLIENT_MAX];
  34565. A_UINT32 domain_code_6g_super_id;
  34566. A_UINT32 min_bw_6g_ap_sp; /* MHz */
  34567. A_UINT32 max_bw_6g_ap_sp;
  34568. A_UINT32 min_bw_6g_ap_lpi;
  34569. A_UINT32 max_bw_6g_ap_lpi;
  34570. A_UINT32 min_bw_6g_ap_vlp;
  34571. A_UINT32 max_bw_6g_ap_vlp;
  34572. A_UINT32 min_bw_6g_client_sp[WMI_REG_CLIENT_MAX];
  34573. A_UINT32 max_bw_6g_client_sp[WMI_REG_CLIENT_MAX];
  34574. A_UINT32 min_bw_6g_client_lpi[WMI_REG_CLIENT_MAX];
  34575. A_UINT32 max_bw_6g_client_lpi[WMI_REG_CLIENT_MAX];
  34576. A_UINT32 min_bw_6g_client_vlp[WMI_REG_CLIENT_MAX];
  34577. A_UINT32 max_bw_6g_client_vlp[WMI_REG_CLIENT_MAX];
  34578. A_UINT32 num_6g_reg_rules_ap_sp;
  34579. A_UINT32 num_6g_reg_rules_ap_lpi;
  34580. A_UINT32 num_6g_reg_rules_ap_vlp;
  34581. A_UINT32 num_6g_reg_rules_client_sp[WMI_REG_CLIENT_MAX];
  34582. A_UINT32 num_6g_reg_rules_client_lpi[WMI_REG_CLIENT_MAX];
  34583. A_UINT32 num_6g_reg_rules_client_vlp[WMI_REG_CLIENT_MAX];
  34584. /*
  34585. * NOTE: no further fields can be added into this struct, due to
  34586. * message buffer size limitations in certain targets for the
  34587. * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
  34588. */
  34589. /*
  34590. * This fixed_param TLV is followed by the following TLVs:
  34591. * - wmi_regulatory_rule_ext reg_rule_array[] struct TLV array.
  34592. * Within the reg rule ext TLV array, the 2G elements occur first,
  34593. * then the 5G elements, then the 6G elements (AP LPI, AP SP, AP VLP,
  34594. * client LPI x4, client SP x4, client VLP x4).
  34595. * - wmi_regulatory_chan_priority_struct reg_chan_priority[]
  34596. * - wmi_regulatory_fcc_rule_struct reg_fcc_rule[]
  34597. * - wmi_reg_chan_list_cc_ext_additional_params reg_more_data[]
  34598. * struct used to fill more fixed additional data, as existing
  34599. * fixed_param TLV struct can't be extended.
  34600. * - wmi_regulatory_rule_meta_data reg_meta_data[]
  34601. * struct used to fill meta information specific to new reg rules
  34602. * getting added(i.e. from C2C onwards).
  34603. */
  34604. } wmi_reg_chan_list_cc_event_ext_fixed_param;
  34605. #define WMI_REG_CAPS_C2C_SUPPORT_GET(additional_regulatory_capabilities) \
  34606. WMI_GET_BITS(additional_regulatory_capabilities, 0, 1)
  34607. #define WMI_REG_CAPS_C2C_SUPPORT_SET(additional_regulatory_capabilities, value) \
  34608. WMI_SET_BITS(additional_regulatory_capabilities, 0, 1, value)
  34609. typedef struct {
  34610. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_ext_additional_params */
  34611. /* additional_regulatory_capabilities:
  34612. * bit 0 - whether C2C supported
  34613. * bits 31:1 - reserved
  34614. */
  34615. A_UINT32 additional_regulatory_capabilities;
  34616. } wmi_reg_chan_list_cc_ext_additional_params;
  34617. typedef enum {
  34618. WMI_REG_RULE_TYPE_indoor_enabled_ap,
  34619. WMI_REG_RULE_TYPE_indoor_enabled_def_cli,
  34620. WMI_REG_RULE_TYPE_indoor_enabled_sub_cli,
  34621. WMI_REG_RULE_TYPE_MAX,
  34622. } WMI_REG_RULE_TYPE;
  34623. typedef struct {
  34624. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_meta_data */
  34625. A_UINT32 reg_rule_type; /* Refer enum WMI_REG_RULE_TYPE */
  34626. A_UINT32 domain_code_6ghz;
  34627. A_UINT32 min_bw_6ghz; /* units = MHz */
  34628. A_UINT32 max_bw_6ghz; /* units = MHz */
  34629. A_UINT32 num_6ghz_reg_rules;
  34630. } wmi_regulatory_rule_meta_data;
  34631. /* WFA AFC Version */
  34632. #define WMI_AFC_WFA_MINOR_VERSION_GET(afc_wfa_version) WMI_GET_BITS(afc_wfa_version, 0, 16)
  34633. #define WMI_AFC_WFA_MINOR_VERSION_SET(afc_wfa_version, value) WMI_SET_BITS(afc_wfa_version, 0, 16, value)
  34634. #define WMI_AFC_WFA_MAJOR_VERSION_GET(afc_wfa_version) WMI_GET_BITS(afc_wfa_version, 16, 16)
  34635. #define WMI_AFC_WFA_MAJOR_VERSION_SET(afc_wfa_version, value) WMI_SET_BITS(afc_wfa_version, 16, 16, value)
  34636. /* avail_exp_time_d time is expected as YYYY-MM-DD */
  34637. #define WMI_AVAIL_EXPIRY_TIME_DAY_GET(avail_exp_time_d) WMI_GET_BITS(avail_exp_time_d, 0, 8)
  34638. #define WMI_AVAIL_EXPIRY_TIME_DAY_SET(avail_exp_time_d, value) WMI_SET_BITS(avail_exp_time_d, 0, 8, value)
  34639. #define WMI_AVAIL_EXPIRY_TIME_MONTH_GET(avail_exp_time_d) WMI_GET_BITS(avail_exp_time_d, 8, 8)
  34640. #define WMI_AVAIL_EXPIRY_TIME_MONTH_SET(avail_exp_time_d, value) WMI_SET_BITS(avail_exp_time_d, 8, 8, value)
  34641. #define WMI_AVAIL_EXPIRY_TIME_YEAR_GET(avail_exp_time_d) WMI_GET_BITS(avail_exp_time_d, 16, 16)
  34642. #define WMI_AVAIL_EXPIRY_TIME_YEAR_SET(avail_exp_time_d, value) WMI_SET_BITS(avail_exp_time_d, 16, 16, value)
  34643. /* avail_exp_time_t time is expected as HH-MM-SS */
  34644. #define WMI_AVAIL_EXPIRY_TIME_SEC_GET(avail_exp_time_t) WMI_GET_BITS(avail_exp_time_t, 0, 8)
  34645. #define WMI_AVAIL_EXPIRY_TIME_SEC_SET(avail_exp_time_t, value) WMI_SET_BITS(avail_exp_time_t, 0, 8, value)
  34646. #define WMI_AVAIL_EXPIRY_TIME_MINUTE_GET(avail_exp_time_t) WMI_GET_BITS(avail_exp_time_t, 8, 8)
  34647. #define WMI_AVAIL_EXPIRY_TIME_MINUTE_SET(avail_exp_time_t, value) WMI_SET_BITS(avail_exp_time_t, 8, 8, value)
  34648. #define WMI_AVAIL_EXPIRY_TIME_HOUR_GET(avail_exp_time_t) WMI_GET_BITS(avail_exp_time_t, 16, 8)
  34649. #define WMI_AVAIL_EXPIRY_TIME_HOUR_SET(avail_exp_time_t, value) WMI_SET_BITS(avail_exp_time_t, 16, 8, value)
  34650. typedef enum {
  34651. /**
  34652. * The following event type is mutually exclusive.
  34653. * afc_event_type will indicate type of AFC event sent from FW to host.
  34654. * 1. For sending Power Info WMI_AFC_EVENT_POWER_INFO event is used.
  34655. * 2. For sending AFC expiry use WMI_AFC_EVENT_TIMER_EXPIRY
  34656. * This type can be expanded in future as per requirements.
  34657. */
  34658. WMI_AFC_EVENT_POWER_INFO = 1,
  34659. WMI_AFC_EVENT_TIMER_EXPIRY = 2,
  34660. } WMI_AFC_EVENT_TYPE;
  34661. typedef enum {
  34662. /**
  34663. * The following afc_expiry_event_subtype is mutually exclusive
  34664. * and is a part of expiry event.
  34665. * 1. At boot up AFC expiry will contain AFC start.
  34666. * 2. If AFC timer expires AFC_RENEW status code will be sent to host
  34667. * with expiry event.
  34668. * 3. If AFC server is not responding to FW in specified time, FW will
  34669. * indicate host to switch to LPI.
  34670. * 4. In SP mode, if AFC server is not responding to FW in
  34671. * specified time then FW will indicate host to stop TX since
  34672. * there are no lower power mode available.
  34673. */
  34674. WMI_AFC_EXPIRY_EVENT_START = 1,
  34675. WMI_AFC_EXPIRY_EVENT_RENEW = 2,
  34676. WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LOW_POWER_MODE = 3,
  34677. /* retain the deprecated old name as an alias for the new name */
  34678. WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LPI =
  34679. WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LOW_POWER_MODE,
  34680. WMI_AFC_EXPIRY_EVENT_STOP_TX = 4,
  34681. } WMI_AFC_EXPIRY_EVENT_SUBTYPE;
  34682. typedef enum {
  34683. /**
  34684. * The following fw_status_code is mutually exclusive
  34685. * and is used in power event.
  34686. * 0. AFC power event is success.
  34687. * 1. If Host does not indicate AFC indication cmd within certain time
  34688. * of AFC expiry FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED will be used.
  34689. * 2. If FW is not able to parse afc_info, parsing_failure will be
  34690. * indicated using WMI_FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED.
  34691. * 3. If due to some local reason AFC event is failed, AFC event failure
  34692. * is indicated using WMI_FW_AFC_POWER_EVENT_FAILURE.
  34693. */
  34694. WMI_FW_AFC_POWER_EVENT_SUCCESS = 0,
  34695. WMI_FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED = 1,
  34696. WMI_FW_AFC_POWER_EVENT_RESP_PARSING_FAILURE = 2,
  34697. WMI_FW_AFC_POWER_EVENT_FAILURE = 3,
  34698. } WMI_FW_AFC_POWER_EVENT_STATUS_CODE;
  34699. typedef enum {
  34700. /**
  34701. * The following afc_server_resp_code is mutually exclusive.
  34702. * This response code will be indicated to AFC server.
  34703. * These codes are defined in WIFI spec doc for AFC as follows
  34704. * -1: General Failure
  34705. * 0: Success
  34706. * 100 - 199: General errors related to the protocol
  34707. * 300 - 399: Error events specific to message exchange for the
  34708. * Available Spectrum Inquiry
  34709. */
  34710. WMI_AFC_SERV_RESP_GENERAL_FAILURE = -1,
  34711. WMI_AFC_SERV_RESP_SUCCESS = 0,
  34712. WMI_AFC_SERV_RESP_VERSION_NOT_SUPPORTED = 100,
  34713. WMI_AFC_SERV_RESP_DEVICE_UNALLOWED = 101,
  34714. WMI_AFC_SERV_RESP_MISSING_PARAM = 102,
  34715. WMI_AFC_SERV_RESP_INVALID_VALUE = 103,
  34716. WMI_AFC_SERV_RESP_UNEXPECTED_PARAM = 106,
  34717. WMI_AFC_SERV_RESP_UNSUPPORTED_SPECTRUM = 300,
  34718. } WMI_AFC_SERV_RESP_CODE;
  34719. typedef struct {
  34720. /** TLV tag and len;
  34721. * tag equals WMITLV_TAG_STRUC_wmi_afc_event_fixed_param */
  34722. A_UINT32 tlv_header;
  34723. A_UINT32 phy_id;
  34724. A_UINT32 event_type; /* refer to WMI_AFC_EVENT_TYPE */
  34725. /** This TLV is (optionally) followed by TLV and TLV arrays containing
  34726. * different afc_event:
  34727. * 1. wmi_afc_expiry_event_param expiry_evt;
  34728. * This TLV contains afc_expiry_event_param of fixed size.
  34729. * 2. wmi_reg_afc_power_event_param afc_power_event;
  34730. * This TLV contains afc_power_info_param of fixed size.
  34731. * 3. wmi_6g_afc_frequency_info freq_info[]
  34732. * This TLV array contains zero or more TLVs of freq_info,
  34733. * which contain freq range and PSD.
  34734. * 4. wmi_6g_afc_channel_info channel_info[]
  34735. * This TLV array contains zero or more TLVs of global_operating
  34736. * class and number of channel
  34737. * in each global operating class
  34738. * 5. wmi_afc_chan_eirp_power_info chan_eirp_power_info[]
  34739. * This TLV array contains zero or more TLVs of channel CFI and
  34740. * EIRP power values for each of the total number of channels
  34741. * per global operating class.
  34742. */
  34743. } wmi_afc_event_fixed_param;
  34744. typedef struct {
  34745. /** TLV tag and len;
  34746. * tag equals WMITLV_TAG_STRUC_wmi_afc_expiry_event_param.
  34747. */
  34748. A_UINT32 tlv_header;
  34749. A_UINT32 request_id; /* AFC unique Request ID for AFC expiry event, This is Nonce generated by FW for freshness */
  34750. A_UINT32 event_subtype; /* refer to WMI_AFC_EXPIRY_EVENT_SUBTYPE */
  34751. A_UINT32 afc_wfa_version; /* bits 15:0 -- minor version
  34752. * bits 31:16 -- major version
  34753. * WMI_AFC_WFA_MINOR_VERSION_GET &
  34754. * WMI_AFC_WFA_MAJOR_VERSION_GET
  34755. */
  34756. } wmi_afc_expiry_event_param;
  34757. typedef struct {
  34758. /** TLV tag and len;
  34759. *tag equals WMITLV_TAG_STRUC_wmi_afc_power_event_param */
  34760. A_UINT32 tlv_header;
  34761. A_UINT32 fw_status_code; /* refer WMI_FW_AFC_POWER_EVENT_STATUS_CODE */
  34762. A_UINT32 resp_id; /* AFC unique response ID, in case of fw_status_code as WMI_FW_AFC_POWER_EVENT_RESP_PARSING_FAILURE resp id may be invalid. */
  34763. A_INT32 afc_serv_resp_code; /* refer WMI_AFC_SERV_RESP_CODE, This field and following all fields are valid if fw_status_code is a success. */
  34764. A_UINT32 afc_wfa_version; /* bits 15:0 -- minor version
  34765. * bits 31:16 -- major version
  34766. * WMI_AFC_WFA_MINOR_VERSION_GET &
  34767. * WMI_AFC_WFA_MAJOR_VERSION_GET
  34768. */
  34769. A_UINT32 avail_exp_time_d; /* avail_exp_time_d and avail_exp_time_t are
  34770. * in UTC
  34771. * Availability expiry time date format:
  34772. * YYYY-MM-DD,
  34773. * bits 7:0 -DD - Day (expected values 1-31)
  34774. * bits 15:8 -MM - Month (expected values 1-12)
  34775. * bits 31:16 -YYYY - Year
  34776. */
  34777. A_UINT32 avail_exp_time_t; /* Availability expiry time format HH-MM-SS
  34778. * bits 7:0 -SS - Time in Sec (expected values 0-59)
  34779. * bits 15:8 -MM - Minute (expected values 0-59)
  34780. * bits 23:16 -HH - Hour (expected values 0-23)
  34781. * bits 31:24 -reserved
  34782. */
  34783. } wmi_afc_power_event_param;
  34784. typedef struct {
  34785. /** TLV tag and len;
  34786. * tag equals WMITLV_TAG_STRUC_wmi_6g_afc_frequency_info */
  34787. A_UINT32 tlv_header;
  34788. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  34789. * bits 31:16 = u16 end_freq
  34790. * (both in MHz units)
  34791. * use MACRO as WMI_REG_RULE_START_FREQ_GET &
  34792. * WMI_REG_RULE_START_FREQ_SET
  34793. */
  34794. A_INT32 psd_power_info; /* Maximum PSD in dBm/MHz, value is stored in 0.01 dBm/MHz steps */
  34795. } wmi_6g_afc_frequency_info;
  34796. typedef struct {
  34797. /** TLV tag and len;
  34798. * tag equals WMITLV_TAG_STRUC_wmi_6g_afc_channel_info */
  34799. A_UINT32 tlv_header;
  34800. A_UINT32 global_operating_class;
  34801. A_UINT32 num_channels; /* num of valid channels for above global operating class */
  34802. /* This TLV will be followed by array of
  34803. * num_channels times wmi_afc_chan_eirp_power_info
  34804. * wmi_afc_chan_eirp_power_info power_info[]
  34805. * EIRP power array has chunks of elements corresponding to each channel
  34806. * in the channel array.
  34807. * i.e. the EIRP power array will contain
  34808. * (suppose N1 and N2 are number of valid channels from channel_info[0]
  34809. * and channel_info[1] respectively)
  34810. * eirp_power[0] power for channel 0 from channel_info[0]
  34811. * eirp_power[1] power for channel 1 from channel_info[0]
  34812. * ...
  34813. * eirp_power[N1-1] power for channel N1-1 from channel_info[0]
  34814. * eirp_power[N1] power for channel 0 from channel_info[1]
  34815. * eirp_power[N1+1] power for channel 1 from channel_info[1]
  34816. * ...
  34817. * eirp_power[N1+N2-1] power for channel N2-1 channel_info[1]
  34818. * ...
  34819. */
  34820. } wmi_6g_afc_channel_info;
  34821. typedef struct {
  34822. /** TLV tag and len;
  34823. * tag equals WMITLV_TAG_STRUC_wmi_afc_chan_eirp_power_info */
  34824. A_UINT32 tlv_header ;
  34825. A_UINT32 channel_cfi; /* channel center frequency indices */
  34826. A_UINT32 eirp_pwr; /* maximum permissible EIRP available for above CFI in dBm, value is stored in 0.01 dBm steps */
  34827. } wmi_afc_chan_eirp_power_info;
  34828. typedef struct {
  34829. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param */
  34830. A_UINT32 vdev_id;
  34831. A_UINT32 scan_period_msec; /** scan duration in milli-seconds */
  34832. A_UINT32 start_interval_msec; /** offset duration to start the scan in milli-seconds */
  34833. } wmi_11d_scan_start_cmd_fixed_param;
  34834. typedef struct {
  34835. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param */
  34836. A_UINT32 vdev_id;
  34837. } wmi_11d_scan_stop_cmd_fixed_param;
  34838. /** FW indicating new current country code to Host */
  34839. typedef struct {
  34840. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param */
  34841. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  34842. } wmi_11d_new_country_event_fixed_param;
  34843. typedef struct {
  34844. /** TLV tag and len; tag equals
  34845. * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
  34846. A_UINT32 tlv_header;
  34847. /* Currently there are no parameters for this message. */
  34848. } wmi_coex_get_antenna_isolation_cmd_fixed_param;
  34849. typedef struct {
  34850. /** TLV tag and len; tag equals
  34851. * WMITLV_TAG_STRUC_wmi_pdev_get_nfcal_power_fixed_param */
  34852. A_UINT32 tlv_header;
  34853. /** pdev_id for identifying the MAC
  34854. * See macros starting with WMI_PDEV_ID_ for values.
  34855. */
  34856. A_UINT32 pdev_id;
  34857. } wmi_pdev_get_nfcal_power_fixed_param;
  34858. typedef struct {
  34859. /** TLV tag and len; tag equals
  34860. * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
  34861. A_UINT32 tlv_header;
  34862. /** 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.
  34863. * Currently the HW descriptor only supports 4 chains at most.
  34864. * Further isolation_chainX elements can be added in the future
  34865. * for additional chains, if needed.
  34866. */
  34867. A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
  34868. isolation_chain1:8, /* [15:8], isolation value for chain 1 */
  34869. isolation_chain2:8, /* [23:16], isolation value for chain 2 */
  34870. isolation_chain3:8; /* [31:24], isolation value for chain 3 */
  34871. } wmi_coex_report_isolation_event_fixed_param;
  34872. typedef enum {
  34873. WMI_COEX_DBAM_COMP_SUCCESS = 0, /* success, mode is applied */
  34874. WMI_COEX_DBAM_COMP_ONGOING = 1, /* success, mode is applied */
  34875. WMI_COEX_DBAM_COMP_DELAYED = 2, /* DBAM is delayed and TDD is selected temporarily */
  34876. WMI_COEX_DBAM_COMP_NOT_SUPPORT = 3, /* DBAM is not supported */
  34877. WMI_COEX_DBAM_COMP_TEST_MODE = 4, /* ignore due to test mode */
  34878. WMI_COEX_DBAM_COMP_INVALID_PARAM = 5, /* invalid parameter is received */
  34879. WMI_COEX_DBAM_COMP_FAIL = 6, /* command failed */
  34880. } wmi_coex_dbam_comp_status;
  34881. typedef struct {
  34882. /** TLV tag and len; tag equals
  34883. * WMITLV_TAG_STRUC_wmi_coex_dbam_complete_event_fixed_param */
  34884. A_UINT32 tlv_header;
  34885. A_UINT32 comp_status; /* wmi_coex_dbam_comp_status */
  34886. } wmi_coex_dbam_complete_event_fixed_param;
  34887. typedef enum wmi_tas_power_history_event_type {
  34888. WMI_TAS_POWER_HISTORY_EVENT_SAVE_FAILURE = 0, /* Power history save fail, it will caused by: TAS Feature Not enable or get remote address fail */
  34889. WMI_TAS_POWER_HISTORY_EVENT_SAVE_COMPLETE = 1, /* Power history save complete */
  34890. } WMI_TAS_POWER_HISTORY_EVENT_TYPE;
  34891. typedef struct {
  34892. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tas_power_history_event_fixed_param */
  34893. A_UINT32 tlv_header;
  34894. A_UINT32 sub_type; /* refer to WMI_TAS_POWER_HISTORY_EVENT_TYPE */
  34895. } wmi_tas_power_history_event_fixed_param;
  34896. typedef enum {
  34897. WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT = 1,
  34898. WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA = 2,
  34899. WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT = 3,
  34900. WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA = 4,
  34901. } wmi_rcpi_measurement_type;
  34902. typedef struct {
  34903. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param */
  34904. A_UINT32 tlv_header;
  34905. /* VDEV identifier */
  34906. A_UINT32 vdev_id;
  34907. /* peer MAC address */
  34908. wmi_mac_addr peer_macaddr;
  34909. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  34910. A_UINT32 measurement_type;
  34911. } wmi_request_rcpi_cmd_fixed_param;
  34912. typedef struct {
  34913. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_rcpi_event_fixed_param */
  34914. A_UINT32 tlv_header;
  34915. /* VDEV identifier */
  34916. A_UINT32 vdev_id;
  34917. /* peer MAC address */
  34918. wmi_mac_addr peer_macaddr;
  34919. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  34920. A_UINT32 measurement_type;
  34921. /* Measured RCPI in dBm of the peer requested by host */
  34922. A_INT32 rcpi;
  34923. /** status
  34924. * 0 - Requested peer RCPI available
  34925. * 1 - Requested peer RCPI not available
  34926. */
  34927. A_UINT32 status;
  34928. } wmi_update_rcpi_event_fixed_param;
  34929. /* Definition of mask for various package id */
  34930. #define WMI_PKGID_MASK_AUTO 0x00000080
  34931. typedef struct {
  34932. /** TLV tag and len; tag equals*/
  34933. A_UINT32 tlv_header;
  34934. /**
  34935. * The value field is filled with WMI_PKGID_MASK values.
  34936. * Currently, the only flag used within values is
  34937. * WMI_PKGID_MASK_AUTO, where bit7=1 for automotive systems.
  34938. */
  34939. A_UINT32 value;
  34940. } wmi_pkgid_event_fixed_param;
  34941. typedef struct {
  34942. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_params */
  34943. A_UINT32 vdev_id; /* vdev id whose mac to be randomized */
  34944. /* enable is set to 1 if mac randomization to be enabled */
  34945. A_UINT32 enable;
  34946. /* randomization mac address if randomization is enabled */
  34947. wmi_mac_addr mac_addr;
  34948. /* To get the PMAC from freq param */
  34949. A_UINT32 freq; /* units in MHz */
  34950. } wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param;
  34951. typedef struct {
  34952. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_event_fixed_params */
  34953. A_UINT32 vdev_id; /* vdev of id whose mac address was randomized */
  34954. A_UINT32 status; /* status is 1 if success and 0 if failed */
  34955. } wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param;
  34956. /* Definition of HW data filtering */
  34957. typedef enum {
  34958. WMI_HW_DATA_FILTER_DROP_NON_ARP_BC = 0x01,
  34959. WMI_HW_DATA_FILTER_DROP_NON_ICMPV6_MC = 0x02,
  34960. } WMI_HW_DATA_FILTER_BITMAP_TYPE;
  34961. typedef struct {
  34962. A_UINT32 tlv_header;
  34963. A_UINT32 vdev_id;
  34964. A_UINT32 enable; /* 1 . enable, 0- disable */
  34965. A_UINT32 hw_filter_bitmap; /* see WMI_HW_DATA_FILTER_BITMAP_TYPE */
  34966. } wmi_hw_data_filter_cmd_fixed_param;
  34967. /** values for multiple_vdev_restart_request flags */
  34968. /* Host is expecting consolidated Multiple Vdev Restart Response(MVRR) event. */
  34969. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_IS_MVRR_EVENT_SUPPORT(flag) WMI_GET_BITS(flag, 0, 1)
  34970. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_MVRR_EVENT_SUPPORT(flag,val) WMI_SET_BITS(flag, 0, 1, val)
  34971. /* Host is sending phymode_list for each vdev. */
  34972. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_IS_PHYMODE_PRESENT(flag) WMI_GET_BITS(flag, 1, 1)
  34973. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_PHYMODE_PRESENT(flag,val) WMI_SET_BITS(flag, 1, 1, val)
  34974. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_GET_PHYMODE(phymode) WMI_GET_BITS(phymode, 0, 6)
  34975. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_PHYMODE(phymode, val) WMI_SET_BITS(phymode, 0, 6, val)
  34976. /** Indicates that VDEV ID is in bit-map format
  34977. * If this flag is set, FW will determine the vdev IDs from the positions
  34978. * of the bits that are set, and use these vdev IDs for vdev restart.
  34979. *
  34980. * This flag should not be set from host unless FW has set the service bit
  34981. * WMI_SERVICE_MULTIPLE_VDEV_RESTART_BITMAP_SUPPORT to indicate it supports
  34982. * this interpretation of the vdev IDs as a bitmap.
  34983. *
  34984. * If this flag is set then below is the way it will be parsed
  34985. * vdev_ids[0] = 53 (0011 0101) -> indicates vdev 0,2,4,5 is set
  34986. * vdev_ids[1] = 53 (0000 0101) -> indicates vdev 32,34 is set
  34987. * similar to this the value can be extended in feature for more vdev's
  34988. *
  34989. * If flag is not se then default parsing will be as below
  34990. * vdev_ids[0] = 0
  34991. * vdev_ids[1] = 2
  34992. * vdev_ids[2] = 4
  34993. * .
  34994. * .
  34995. * vdev_ids[5] = 34
  34996. */
  34997. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_BITMAP_SUPPORT(flag) WMI_GET_BITS(flag, 2, 1)
  34998. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_BITMAP_SUPPORT(flag,val) WMI_SET_BITS(flag, 2, 1, val)
  34999. /* This command is used whenever host wants to restart multiple
  35000. * VDEVs using single command and the VDEV that are restarted will
  35001. * need to have same properties they had before restart except for the
  35002. * operating channel
  35003. */
  35004. typedef struct {
  35005. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param */
  35006. /** pdev_id for identifying the MAC
  35007. * See macros starting with WMI_PDEV_ID_ for values.
  35008. * In non-DBDC case host should set it to 0
  35009. */
  35010. A_UINT32 pdev_id;
  35011. /** unique id identifying the module, generated by the caller */
  35012. A_UINT32 requestor_id;
  35013. /** Disable H/W ack.
  35014. * During CAC, Our HW shouldn't ack directed frames
  35015. */
  35016. A_UINT32 disable_hw_ack;
  35017. /* Determine the duration of CAC on the given channel 'chan' */
  35018. A_UINT32 cac_duration_ms;
  35019. A_UINT32 num_vdevs;
  35020. /*
  35021. * Flags to indicate which parameters are sent as part of the request.
  35022. * This field is filled with the bitwise combination of the flag values
  35023. * defined by WMI_MULTIPLE_VDEV_RESTART_FLAG_xxx
  35024. */
  35025. A_UINT32 flags;
  35026. A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20 MHz BW punctured */
  35027. /* The TLVs follows this structure:
  35028. * A_UINT32 vdev_ids[]; <--- Array of vdev IDs, or bitmap of vdev IDs
  35029. * In flags if WMI_MULTIPLE_VDEV_RESTART_FLAG_BITMAP_SUPPORT is set
  35030. * FW will interpret the vdev_ids values as a bitmap, and will use the
  35031. * position of all the bits set within the bitmap to determine the
  35032. * vdev IDs to use for vdev restart.
  35033. * If this flag is set then below is the way it will be parsed
  35034. * vdev_ids[0] = 53 (0011 0101) -> indicates vdev 0,2,4,5 is set
  35035. * vdev_ids[1] = 53 (0000 0101) -> indicates vdev 32,34 is set
  35036. * The array can be extended in feature for more vdevs.
  35037. * If this flag is not se then default parsing will be as below
  35038. * vdev_ids[0] = 0
  35039. * vdev_ids[1] = 2
  35040. * vdev_ids[2] = 4
  35041. * .
  35042. * .
  35043. * vdev_ids[5] = 34
  35044. * wmi_channel chan; <------ WMI channel
  35045. * A_UINT32 phymode_list[]; <-- Array of Phymode list, with
  35046. * each phymode value stored in bits 5:0 of the A_UINT32.
  35047. * Use the WMI_MULTIPLE_VDEV_RESTART_FLAG_GET/SET_PHYMODE macros
  35048. * to access the phymode value from within each A_UINT32 element.
  35049. * A_UINT32 preferred_tx_streams[]; <-- Array of preferred_tx_streams
  35050. * with vdev ID as index.
  35051. * A_UINT32 preferred_rx_streams[]; <-- Array of preferred_rx_streams
  35052. * with vdev ID as index.
  35053. * wmi_channel dbw_chan; <-- WMI channel
  35054. * optional TLV for dbw_chan
  35055. * wmi_dbw_chan_info dbw_chan_info
  35056. * optional TLV used for dbw_chan_info
  35057. */
  35058. } wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param;
  35059. typedef struct {
  35060. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csa_switch_count_status_event_fixed_param */
  35061. A_UINT32 tlv_header;
  35062. /** pdev_id for identifying the MAC
  35063. * See macros starting with WMI_PDEV_ID_ for values.
  35064. * In non-DBDC case host should set it to 0
  35065. */
  35066. A_UINT32 pdev_id;
  35067. /** CSA switch count value in the last transmitted beacon */
  35068. A_UINT32 current_switch_count;
  35069. A_UINT32 num_vdevs;
  35070. /* The TLVs follows this structure:
  35071. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  35072. */
  35073. } wmi_pdev_csa_switch_count_status_event_fixed_param;
  35074. typedef struct {
  35075. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csc_vdev_list */
  35076. A_UINT32 vdev_id;
  35077. A_UINT32 current_switch_count; /** CSC switch count value in the last transmitted beacon */
  35078. } wmi_csc_vdev_list;
  35079. typedef struct {
  35080. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param */
  35081. A_UINT32 tlv_header;
  35082. /** pdev_id for identifying the MAC
  35083. * See macros starting with WMI_PDEV_ID_ for values.
  35084. * In non-DBDC case host should set it to 0
  35085. */
  35086. A_UINT32 pdev_id;
  35087. /** CSC switch count value in the last transmitted beacon */
  35088. A_UINT32 current_switch_count;
  35089. /* The TLVs follows this structure:
  35090. * struct wmi_csc_vdev_list vdev_info[]; // IDs of vdevs and their current switch countdown values
  35091. */
  35092. } wmi_pdev_csc_switch_count_status_event_fixed_param;
  35093. /* Operation types for packet routing command */
  35094. typedef enum {
  35095. WMI_PDEV_ADD_PKT_ROUTING,
  35096. WMI_PDEV_DEL_PKT_ROUTING,
  35097. } wmi_pdev_pkt_routing_op_code;
  35098. /* Packet routing types based on specific data types */
  35099. typedef enum {
  35100. WMI_PDEV_ROUTING_TYPE_ARP_IPV4,
  35101. WMI_PDEV_ROUTING_TYPE_NS_IPV6,
  35102. WMI_PDEV_ROUTING_TYPE_IGMP_IPV4,
  35103. WMI_PDEV_ROUTING_TYPE_MLD_IPV6,
  35104. WMI_PDEV_ROUTING_TYPE_DHCP_IPV4,
  35105. WMI_PDEV_ROUTING_TYPE_DHCP_IPV6,
  35106. WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV4,
  35107. WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV6,
  35108. WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV4,
  35109. WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV6,
  35110. WMI_PDEV_ROUTING_TYPE_ICMP_IPV4,
  35111. WMI_PDEV_ROUTING_TYPE_ICMP_IPV6,
  35112. WMI_PDEV_ROUTING_TYPE_TCP_IPV4,
  35113. WMI_PDEV_ROUTING_TYPE_TCP_IPV6,
  35114. WMI_PDEV_ROUTING_TYPE_UDP_IPV4,
  35115. WMI_PDEV_ROUTING_TYPE_UDP_IPV6,
  35116. WMI_PDEV_ROUTING_TYPE_IPV4,
  35117. WMI_PDEV_ROUTING_TYPE_IPV6,
  35118. WMI_PDEV_ROUTING_TYPE_EAP,
  35119. WMI_PDEV_ROUTING_TYPE_VLAN,
  35120. } wmi_pdev_pkt_routing_type;
  35121. typedef enum {
  35122. WMI_PDEV_WIFIRXCCE_USE_CCE_E = 0,
  35123. WMI_PDEV_WIFIRXCCE_USE_ASPT_E = 1,
  35124. WMI_PDEV_WIFIRXCCE_USE_FT_E = 2,
  35125. WMI_PDEV_WIFIRXCCE_USE_CCE2_E = 3,
  35126. } wmi_pdev_dest_ring_handler_type;
  35127. typedef enum {
  35128. WMI_SOC_TX_PACKET_TYPE_ARP = 1,
  35129. WMI_SOC_TX_PACKET_TYPE_EAPOL = 2,
  35130. WMI_SOC_TX_PACKET_TYPE_DHCP = 3,
  35131. WMI_SOC_TX_PACKET_TYPE_DNS = 4,
  35132. WMI_SOC_TX_PACKET_TYPE_ICMP = 5,
  35133. } wmi_soc_tx_packet_type;
  35134. /*
  35135. * This command shall be sent only when no VDEV is up.
  35136. * If the command is sent after any VDEV is up, target will ignore the command.
  35137. */
  35138. typedef struct {
  35139. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_tx_packet_custom_classify_cmd_fixed_param */
  35140. A_UINT32 tlv_header;
  35141. /** packet_bitmap:
  35142. * bitmap of the packets to be classified,
  35143. * Refer to wmi_soc_tx_packet_type for the interpretation of the bits
  35144. * within the bitmap.
  35145. */
  35146. A_UINT32 packet_bitmap;
  35147. } wmi_soc_tx_packet_custom_classify_cmd_fixed_param;
  35148. /*
  35149. * This command shall be sent only when no VDEV is up.
  35150. * If the command is sent after any VDEV is up, target will ignore the command.
  35151. */
  35152. typedef struct {
  35153. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pkt_routing_cmd_fixed_param */
  35154. A_UINT32 tlv_header;
  35155. /** Identifies pdev on which routing needs to be applied */
  35156. A_UINT32 pdev_id;
  35157. /** Indicates the routing operation type: add/delete */
  35158. A_UINT32 op_code; /* wmi_pdev_pkt_routing_op_code */
  35159. /** Bitmap of multiple pkt routing types for a given destination ring and meta data */
  35160. A_UINT32 routing_type_bitmap; /* see wmi_pdev_pkt_routing_type */
  35161. /** 5 bits [4:0] are used to specify the destination ring where the CCE matched
  35162. * packet needs to be routed.
  35163. */
  35164. A_UINT32 dest_ring;
  35165. /** 16 bits [15:0] meta data can be passed to CCE. When the superrule matches,
  35166. * CCE copies this back in RX_MSDU_END_TLV.
  35167. */
  35168. A_UINT32 meta_data;
  35169. /**
  35170. * Indicates the dest ring handler type: CCE, APST, FT, CCE2
  35171. * Refer to wmi_pdev_dest_ring_handler_type / WMI_PDEV_WIFIRXCCE_USE_xxx
  35172. */
  35173. A_UINT32 dest_ring_handler;
  35174. } wmi_pdev_update_pkt_routing_cmd_fixed_param;
  35175. typedef enum {
  35176. WMI_CALIBRATION_NO_FEATURE = 0, /* The board was calibrated with a meta which did not have this feature */
  35177. WMI_CALIBRATION_OK, /* The calibration status is OK */
  35178. WMI_CALIBRATION_NOT_OK, /* The calibration status is NOT OK */
  35179. } WMI_CALIBRATION_STATUS;
  35180. #define WMI_BOARD_MCN_STRING_MAX_SIZE 19
  35181. /**
  35182. * WMI_BOARD_MCN_STRING_BUF_SIZE : represents the number of elements in board_mcn_detail.
  35183. * Since board_mcn_detail is of type A_UINT8, the value of WMI_BOARD_MCN_STRING_BUF_SIZE
  35184. * should be multiple of 4 for alignment reason. And the last byte byte is reserved for
  35185. * null-terminator
  35186. */
  35187. #define WMI_BOARD_MCN_STRING_BUF_SIZE (WMI_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
  35188. typedef struct {
  35189. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param */
  35190. A_UINT32 software_cal_version; /* Current software level calibration data version */
  35191. A_UINT32 board_cal_version; /* Calibration data version programmed on chip */
  35192. A_UINT32 cal_status; /* filled with WMI_CALIBRATION_STATUS enum value */
  35193. /* board_mcn_detail:
  35194. * Provides board's MCN (Material Control Number) information for the host
  35195. * to display. This is used to track the Hardware level revisions/versions.
  35196. * This array carries the ASCII values of the MCN to the host. And host
  35197. * would just print this in a string format whenever user requests.
  35198. * Note: On a big-endian host, the 4 bytes within each A_UINT32 portion
  35199. * of a WMI message will be automatically byteswapped by the copy engine
  35200. * as the messages are transferred between host and target, to convert
  35201. * between the target's little-endianness and the host's big-endianness.
  35202. * Consequently, a big-endian host will have to manually unswap the bytes
  35203. * within the board_mcn_detail string buffer to get the bytes back into
  35204. * the desired natural order.
  35205. */
  35206. A_UINT8 board_mcn_detail[WMI_BOARD_MCN_STRING_BUF_SIZE];
  35207. /** pdev_id for identifying the MAC
  35208. * See macros starting with WMI_PDEV_ID_ for values.
  35209. */
  35210. A_UINT32 pdev_id;
  35211. } wmi_pdev_check_cal_version_event_fixed_param;
  35212. typedef struct {
  35213. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_cmd_fixed_param */
  35214. /** pdev_id for identifying the MAC
  35215. * See macros starting with WMI_PDEV_ID_ for values.
  35216. */
  35217. A_UINT32 pdev_id;
  35218. } wmi_pdev_check_cal_version_cmd_fixed_param;
  35219. typedef struct {
  35220. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_diversity_gain_cmd_fixed_param */
  35221. /** Identifies pdev on which diversity gain to be applied */
  35222. A_UINT32 pdev_id;
  35223. /** The number of spatial stream */
  35224. A_UINT32 nss;
  35225. /** The number of gains */
  35226. A_UINT32 num_gains;
  35227. /*
  35228. * This fixed_param TLV is followed by other TLVs:
  35229. * A_UINT8 diversity_gains[num_gains]; (gain is in dB units)
  35230. */
  35231. } wmi_pdev_set_diversity_gain_cmd_fixed_param;
  35232. /* flags for unit_test_event */
  35233. #define WMI_UNIT_TEST_EVENT_FLAG_STATUS 0 /* 0 = success, 1 = fail */
  35234. #define WMI_UNIT_TEST_EVENT_FLAG_DONE 1 /* 0 = not done, 1 = done */
  35235. /* from bit 2 to bit 31 are reserved */
  35236. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_SUCCESS(flag) do { \
  35237. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  35238. } while (0)
  35239. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_FAIL(flag) do { \
  35240. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  35241. } while (0)
  35242. #define WMI_GET_UNIT_TEST_EVENT_FLAG_STSTUS(flag) \
  35243. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS))
  35244. #define WMI_SET_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  35245. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  35246. } while (0)
  35247. #define WMI_CLR_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  35248. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  35249. } while (0)
  35250. #define WMI_GET_UNIT_TEST_EVENT_FLAG_DONE(flag) \
  35251. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE))
  35252. typedef struct {
  35253. /* TLV tag and len; tag equals WMI_UNIT_TEST_EVENTID */
  35254. A_UINT32 tlv_header;
  35255. /* unique id identifying the VDEV, generated by the caller */
  35256. A_UINT32 vdev_id;
  35257. /* Identify the wlan module */
  35258. A_UINT32 module_id;
  35259. /* unique id identifying the unit test cmd, generated by the caller */
  35260. A_UINT32 diag_token;
  35261. /* flag for the status of the unit_test_cmd */
  35262. A_UINT32 flag;
  35263. /* data length number of bytes for current dump */
  35264. A_UINT32 payload_len;
  35265. /* TLV/Payload after this structure is sent in little endian
  35266. * format for the length mentioned in this structure.
  35267. * A_UINT8 payload[1];
  35268. */
  35269. } wmi_unit_test_event_fixed_param;
  35270. /* Definition of latency levels */
  35271. typedef enum {
  35272. WMI_WLM_LL_NORMAL = 0x0,
  35273. /* DEPRECATED */ WMI_WLM_LL_MODERATE = 0x1,
  35274. WMI_WLM_LL_XR = 0x1,
  35275. WMI_WLM_LL_LOW = 0x2,
  35276. WMI_WLM_LL_ULTRA_LOW = 0x3,
  35277. } WMI_WLM_LATENCY_LEVEL;
  35278. typedef struct {
  35279. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_latency_event_fixed_param */
  35280. /** The latency level for specified vdev_id */
  35281. A_UINT32 vdev_id;
  35282. /** latency level enum WMI_WLM_LATENCY_LEVEL honored by FW */
  35283. A_UINT32 latency_level;
  35284. } wmi_vdev_latency_event_fixed_param;
  35285. /*
  35286. * Lay out of flags in wmi_wlm_config_cmd_fixed_param
  35287. *
  35288. * |31 19| 18 | 17|16 14| 13 | 12| 11 | 10 | 9 | 8 |7 6|5 4|3 2| 1 | 0 |
  35289. * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
  35290. * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
  35291. * +------------------------------+---------------+---------+-----------------+
  35292. * | WAL | PS | Roam | Scan |
  35293. *
  35294. * Flag values:
  35295. * TRY: (1) enable short limit for retrying unacked tx, where the limit is
  35296. * based on the traffic's latency level
  35297. * (0) default tx retry behavior
  35298. * EDCA: (1) Apply VO parameters on BE
  35299. * (0) default behavior
  35300. * NSS: (0) no Nss limits, other than those negotiatied during association
  35301. * (1) during 2-chain operation, tx only a single spatial stream
  35302. * (2) - (7) reserved / invalid
  35303. * RTS: (0) default protection
  35304. * (1) always enable RTS/CTS protection
  35305. * SRATE: (0) default secondary rate policy
  35306. * (1) disable secondary rate
  35307. */
  35308. /* bit 0-3 of flags is used for scan operation */
  35309. /* bit 0: Avoid scan request from HLOS if bit is set */
  35310. #define WLM_FLAGS_SCAN_SUPPRESS 1 /* suppress all scan request */
  35311. /* bit 1: WLM_FLAGS_SCAN_SKIP_DFS, skip dfs channel if bit is set */
  35312. #define WLM_FLAGS_SCAN_SKIP_DFS 1 /* skip dfs channel operation */
  35313. /* bit 2-3: define policy of dwell time/duration of each foreign channel
  35314. (b3 b2)
  35315. (0 0 ): Default dwell time
  35316. (0 1 ): WLM_FLAGS_STICK_SCAN_DWELL_TIME : Stick to original active/passive dwell time, but split
  35317. foreign channel dwell times into fitting into min (dl_latency, ul_latency). Note it can increase
  35318. overall scan duration.
  35319. (1 0 ): WLM_FLAGS_SHRINK_SCAN_DWELL_TIME: Shrink active/passive dwell time to
  35320. min(dl_latency, ul_latency, dwell_time). It may reduce overall scan duration, but it may decrease
  35321. the accuracy of scan result.
  35322. (1 1 ): reserved
  35323. */
  35324. #define WLM_FLAGS_DEFAULT_SCAN_DWELL_TIME 0 /* Default scan dwell time */
  35325. #define WLM_FLAGS_STICK_SCAN_DWELL_TIME 1 /* Shrink off channel time but extend overall scan duration */
  35326. #define WLM_FLAGS_SHRINK_SCAN_DWELL_TIME 2 /* Shrink scan off channel time */
  35327. /* bit 4-5: reserved for scan */
  35328. /* bit 6-7 of flags is used for roaming operation */
  35329. /* bit 6-7: define roaming policy:
  35330. (b7 b6)
  35331. (0 0 ): WLM_FLAGS_ROAM_ALLOW: Default behavior, allow roaming in all scenarios
  35332. (0 1 ): WLM_FLAGS_ROAM_SUPPRESS: Disallow all roaming
  35333. (1 0 ): WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM: Allow final bmiss roaming only
  35334. (1 1 ): reserved
  35335. */
  35336. #define WLM_FLAGS_ROAM_ALLOW 0
  35337. #define WLM_FLAGS_ROAM_SUPPRESS 1
  35338. #define WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM 2
  35339. /* bit 8: reserved for roaming */
  35340. /* bit 9-11 of flags is used for powersave operation */
  35341. /* bit 9: WLM_FLAGS_PS_DISABLE_BMPS, disable BMPS if bit is set */
  35342. #define WLM_FLAGS_PS_DISABLE_BMPS 1 /* disable BMPS */
  35343. /* bit 10: WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE, disable css power collapse if bit is set */
  35344. #define WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE 1 /* disable css power collapse */
  35345. /* bit 11: WLM_FLAGS_PS_DISABLE_SYS_SLEEP, disable sys sleep if bit is set */
  35346. #define WLM_FLAGS_PS_DISABLE_SYS_SLEEP 1 /* disable sys sleep */
  35347. /* bit 17-31 of flags is reserved for powersave and WAL */
  35348. /* bit 23: WLM_FLAGS_PS_DISABLE_MLO_PROBE_SCAN,
  35349. * disable MLO probe scan if bit is set
  35350. */
  35351. #define WLM_FLAGS_PS_DISABLE_MLO_PROBE_SCAN 1 /* disable MLO probe scan */
  35352. /* bit 24: WLM_FLAGS_PS_DISABLE_ULL_FORCED_MLMR,
  35353. * Disable forced MLMR on ULL if bit is set.
  35354. * (MLMR may still happen due to other reasons.)
  35355. */
  35356. #define WLM_FLAGS_PS_DISABLE_ULL_FORCED_MLMR 1 /* disable forced MLMR on ULL */
  35357. /* bit 25: WLM_FLAGS_PS_DISABLE_ULL_FORCED_EMLSR,
  35358. * Disable forced EMLSR on ULL if bit is set.
  35359. * (eMLSR may still happen due to other reasons.)
  35360. */
  35361. #define WLM_FLAGS_PS_DISABLE_ULL_FORCED_EMLSR 1 /* disable forced EMLSR on ULL */
  35362. #define WLM_FLAGS_SCAN_IS_SUPPRESS(flag) WMI_GET_BITS(flag, 0, 1)
  35363. #define WLM_FLAGS_SCAN_SET_SUPPRESS(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  35364. #define WLM_FLAGS_SCAN_IS_SKIP_DFS(flag) WMI_GET_BITS(flag, 1, 1)
  35365. #define WLM_FLAGS_SCAN_SET_SKIP_DFS(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  35366. #define WLM_FLAGS_SCAN_GET_DWELL_TIME_POLICY(flag) WMI_GET_BITS(flag, 2, 2)
  35367. #define WLM_FLAGS_SCAN_SET_DWELL_TIME_POLICY(flag, val) WMI_SET_BITS(flag, 2, 2, val)
  35368. #define WLM_FLAGS_TSF_LATENCY_COMPENSATE_ENABLED_GET(flag) WMI_GET_BITS(flag, 4, 1)
  35369. #define WLM_FLAGS_TSF_LATENCY_COMPENSATE_ENABLED_SET(flag) WMI_SET_BITS(flag, 4, 1, val)
  35370. #define WLM_FLAGS_ROAM_GET_POLICY(flag) WMI_GET_BITS(flag, 6, 2)
  35371. #define WLM_FLAGS_ROAM_SET_POLICY(flag, val) WMI_SET_BITS(flag, 6, 2, val)
  35372. #define WLM_FLAGS_PS_IS_BMPS_DISABLED(flag) WMI_GET_BITS(flag, 9, 1)
  35373. #define WLM_FLAGS_PS_IS_CSS_CLPS_DISABLED(flag) WMI_GET_BITS(flag, 10, 1)
  35374. #define WLM_FLAGS_PS_SET_CSS_CLPS_DISABLE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  35375. #define WLM_FLAGS_PS_IS_SYS_SLP_DISABLED(flag) WMI_GET_BITS(flag, 11, 1)
  35376. #define WLM_FLAGS_PS_SET_SYS_SLP_DISABLE(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  35377. #define WLM_FLAGS_WAL_LIMIT_TRY_ENABLED(flag) WMI_GET_BITS(flag, 12, 1)
  35378. #define WLM_FLAGS_WAL_LIMIT_TRY_SET(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  35379. #define WLM_FLAGS_WAL_ADJUST_EDCA_ENABLED(flag) WMI_GET_BITS(flag, 13, 1)
  35380. #define WLM_FLAGS_WAL_ADJUST_EDCA_SET(flag, val) WMI_SET_BITS(flag, 13, 1, val)
  35381. #define WLM_FLAGS_WAL_1NSS_ENABLED(flag) (WMI_GET_BITS(flag, 14, 3) & 0x1)
  35382. #define WLM_FLAGS_WAL_NSS_SET(flag, val) WMI_SET_BITS(flag, 14, 3, val)
  35383. #define WLM_FLAGS_WAL_ALWAYS_RTS_PROTECTION(flag) WMI_GET_BITS(flag, 17, 1)
  35384. #define WLM_FLAGS_WAL_RTS_PROTECTION_SET(flag, val) WMI_SET_BITS(flag, 17, 1, val)
  35385. #define WLM_FLAGS_WAL_DISABLE_SECONDARY_RATE(flag) WMI_GET_BITS(flag, 18, 1)
  35386. #define WLM_FLAGS_WAL_SECONDARY_RATE_SET(flag, val) WMI_SET_BITS(flag, 18, 1, val)
  35387. #define WLM_FLAGS_PS_IS_PCIE_L11_ENABLED(flag) WMI_GET_BITS(flag, 19, 1)
  35388. #define WLM_FLAGS_PS_SET_PCIE_L11_ENABLE(flag, val) WMI_SET_BITS(flag, 19, 1, val)
  35389. #define WLM_FLAGS_PS_IS_PHYRF_PS_ENABLED(flag) WMI_GET_BITS(flag, 20, 1)
  35390. #define WLM_FLAGS_PS_SET_PHYRF_PS_ENABLE(flag, val) WMI_SET_BITS(flag, 20, 1, val)
  35391. #define WLM_FLAGS_SCAN_IS_SPLIT_PAS_CH_ENABLED(flag) WMI_GET_BITS(flag, 21, 1)
  35392. #define WLM_FLAGS_SCAN_SET_SPLIT_PAS_CH_ENABLE(flag, val) WMI_SET_BITS(flag, 21, 1, val)
  35393. #define WLM_FLAGS_SCAN_IS_ADAPT_SCAN_ENABLED(flag) WMI_GET_BITS(flag, 22, 1)
  35394. #define WLM_FLAGS_SCAN_SET_ADAPT_SCAN_ENABLE(flag, val) WMI_SET_BITS(flag, 22, 1, val)
  35395. #define WLM_FLAGS_PS_IS_MLO_PROBE_SCAN_DISABLED(flag) WMI_GET_BITS(flag, 23, 1)
  35396. #define WLM_FLAGS_PS_SET_MLO_PROBE_SCAN_DISABLE(flag, val) WMI_SET_BITS(flag, 23, 1, val)
  35397. #define WLM_FLAGS_PS_IS_ULL_FORCED_MLMR_DISABLED(flag) WMI_GET_BITS(flag, 24, 1)
  35398. #define WLM_FLAGS_PS_SET_ULL_FORCED_MLMR_DISABLE(flag, val) WMI_SET_BITS(flag, 24, 1, val)
  35399. #define WLM_FLAGS_PS_IS_ULL_FORCED_EMLSR_DISABLED(flag) WMI_GET_BITS(flag, 25, 1)
  35400. #define WLM_FLAGS_PS_SET_ULL_FORCED_EMLSR_DISABLE(flag, val) WMI_SET_BITS(flag, 25, 1, val)
  35401. #define WLM_FLAGS_SET_FORCE_DEFAULT_LATENCY(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  35402. #define WLM_FLAGS_GET_FORCE_DEFAULT_LATENCY(flag) WMI_GET_BITS(flag, 0, 1)
  35403. #define WLM_MAX_HOST_CLIENTS 5
  35404. typedef struct {
  35405. /** TLV tag and len; tag equals WMI_WLM_CONFIG_CMD_fixed_param */
  35406. A_UINT32 tlv_header;
  35407. /* VDEV identifier */
  35408. A_UINT32 vdev_id;
  35409. /*
  35410. * Refer to WMI_WLM_LATENCY_LEVEL
  35411. * Once latency change detected, WLM will notify modules e.g. STAPS or SCAN/ROAM,
  35412. * who subscribed this event. And subscribers, like SCAN, may disable/cutoff offchan
  35413. * operation to support lower latency of WLAN.
  35414. */
  35415. A_UINT32 latency_level;
  35416. /*
  35417. * represent uplink latency in ms
  35418. * This parameter will be used by STAPS module to decide timing parameters, like
  35419. * ITO or SPEC wakeup interval. For SCAN/ROAM, it may used to calculate offchan
  35420. * durations.
  35421. * For host and FW with multi client LL feature enabled, this field is obsolete.
  35422. */
  35423. A_UINT32 ul_latency;
  35424. /*
  35425. * represent downlink latency in ms
  35426. * Similar usage as ul_latency
  35427. * For host and FW with multi client LL feature enabled, this field is obsolete.
  35428. */
  35429. A_UINT32 dl_latency;
  35430. /*
  35431. * flags for each client of WLM, refer to WLM_FLAGS_ definitions above.
  35432. * For host and FW with multi client LL feature enabled, this field is obsolete.
  35433. */
  35434. A_UINT32 flags;
  35435. /*
  35436. * bit 0 used as force reset:
  35437. * to override the latency level as default
  35438. * for all the wlm clients
  35439. */
  35440. A_UINT32 flags_ext;
  35441. /*
  35442. * clients of WLM Arbiter
  35443. * WLM_MAX_HOST_CLIENTS 5
  35444. */
  35445. A_UINT32 client_id_bitmask;
  35446. } wmi_wlm_config_cmd_fixed_param;
  35447. /* Broadcast TWT enable/disable for both REQUESTER and RESPONDER */
  35448. #define TWT_EN_DIS_FLAGS_GET_BTWT(flag) WMI_GET_BITS(flag, 0, 1)
  35449. #define TWT_EN_DIS_FLAGS_SET_BTWT(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  35450. /* legacy MBSSID enable/disable */
  35451. #define TWT_EN_DIS_FLAGS_GET_L_MBSSID(flag) WMI_GET_BITS(flag, 1, 1)
  35452. #define TWT_EN_DIS_FLAGS_SET_L_MBSSID(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  35453. /* 11ax MBSSID enable/disable */
  35454. #define TWT_EN_DIS_FLAGS_GET_AX_MBSSID(flag) WMI_GET_BITS(flag, 2, 1)
  35455. #define TWT_EN_DIS_FLAGS_SET_AX_MBSSID(flag, val) WMI_SET_BITS(flag, 2, 1, val)
  35456. /* Configuration of TWT Modes,
  35457. * If this BIT is set BIT4/5 will be used in FW, else BIT4/5 will be ignored.
  35458. * Which means when we receive WMI_TWT_ENABLE_CMDID command from host,
  35459. * without BIT3 set we will enable both REQUESTER/RESPONDER.
  35460. *
  35461. * Same interpretation is used in WMI_TWT_DISABLE_CMDID, if BIT3 is not set
  35462. * we will disable both REQUESTER and RESPONDER.
  35463. */
  35464. #define TWT_EN_DIS_FLAGS_GET_SPLIT_CONFIG(flag) WMI_GET_BITS(flag, 3, 1)
  35465. #define TWT_EN_DIS_FLAGS_SET_SPLIT_CONFIG(flag, val) WMI_SET_BITS(flag, 3, 1, val)
  35466. /*
  35467. * The flags are used both in WMI_TWT_ENABLE_CMDID and WMI_TWT_DISABLE_CMDID.
  35468. *
  35469. * BIT4 represents whether the it is for REQUESTER or RESPONDER.
  35470. * BIT5 represents whether it is individual or broadcast mode.
  35471. *
  35472. * For instance, in WMI_TWT_ENABLE_CMDID if BIT4=0 and BIT5=0, then we will
  35473. * enable only Requester, we will not change any configuration of RESPONDER.
  35474. *
  35475. * Same way in WMI_TWT_DISABLE_CMDID if BIT4=0 and BIT5=0, then we will only
  35476. * disable Individual and Broadcast REQUESTER, we will not alter any RESPONDER
  35477. * configuration.
  35478. *
  35479. * If host is enabling or disabling both REQUESTER and RESPONDER host will
  35480. * send two WMI commands, one for REQUESTER and one for RESPONDER.
  35481. *
  35482. * WMI_TWT_ENABLE_CMDID command flags description,
  35483. * |----------------------------------------------------------------------|
  35484. * |BIT4=0, BIT5=0 | Enable Individual TWT requester |
  35485. * |----------------------------------------------------------------------|
  35486. * |BIT4=0, BIT5=1 | Enable both Individual and Broadcast TWT requester |
  35487. * |----------------------------------------------------------------------|
  35488. * |BIT4=1, BIT5=0 | Enable Individual TWT responder |
  35489. * |----------------------------------------------------------------------|
  35490. * |BIT4=1, BIT5=1 | Enable both Individual and Broadcast TWT responder |
  35491. * |----------------------------------------------------------------------|
  35492. *
  35493. *
  35494. * WMI_TWT_DISABLE_CMDID command flags description,
  35495. * |----------------------------------------------------------------------|
  35496. * |BIT4=0, BIT5=0 | Disable both Individual and Broadcast TWT requester |
  35497. * |----------------------------------------------------------------------|
  35498. * |BIT4=0, BIT5=1 | Disable Broadcast TWT requester |
  35499. * |----------------------------------------------------------------------|
  35500. * |BIT4=1, BIT5=0 | Disable both Individual and broadcast TWT responder |
  35501. * |----------------------------------------------------------------------|
  35502. * |BIT4=1, BIT5=1 | Disable Broadcast TWT responder |
  35503. * |----------------------------------------------------------------------|
  35504. *
  35505. * If user has enabled only individual requester at any point and after
  35506. * sometime if user wants to enable broadcast requester then user cannot
  35507. * directly send another WMI_TWT_ENABLE_CMDID with broadcast configuration,
  35508. * user has to disable TWT requester first and then enable both individual
  35509. * requester and broadcast requester. Same way for RESPONDER.
  35510. *
  35511. */
  35512. /* 0: requester; 1: responder */
  35513. #define TWT_EN_DIS_FLAGS_GET_REQ_RESP(flag) WMI_GET_BITS(flag, 4, 1)
  35514. #define TWT_EN_DIS_FLAGS_SET_REQ_RESP(flag, val) WMI_SET_BITS(flag, 4, 1, val)
  35515. /* 0: iTWT; 1: bTWT */
  35516. #define TWT_EN_DIS_FLAGS_GET_I_B_TWT(flag) WMI_GET_BITS(flag, 5, 1)
  35517. #define TWT_EN_DIS_FLAGS_SET_I_B_TWT(flag, val) WMI_SET_BITS(flag, 5, 1, val)
  35518. /* 0: bTWT; 1: rTWT */
  35519. #define TWT_EN_DIS_FLAGS_GET_B_R_TWT(flag) WMI_GET_BITS(flag, 6, 1)
  35520. #define TWT_EN_DIS_FLAGS_SET_B_R_TWT(flag, val) WMI_SET_BITS(flag, 6, 1, val)
  35521. /*
  35522. * disable autonomous bTWT session delete feature
  35523. * This feature will delete client triggered session when number of clients
  35524. * joined decreases to 0.
  35525. */
  35526. #define TWT_EN_DIS_FLAGS_GET_DIS_BTWT_AUTO_DELETE(flag) \
  35527. WMI_GET_BITS(flag, 7, 1)
  35528. #define TWT_EN_DIS_FLAGS_SET_DIS_BTWT_AUTO_DELETE(flag, val) \
  35529. WMI_SET_BITS(flag, 7, 1, val)
  35530. typedef struct {
  35531. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_cmd_fixed_param */
  35532. /** 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
  35533. */
  35534. A_UINT32 pdev_id;
  35535. A_UINT32 sta_cong_timer_ms; /* STA TWT congestion timer TO value in terms of ms */
  35536. A_UINT32 mbss_support; /* Reserved */
  35537. A_UINT32 default_slot_size; /* This is the default value for the TWT slot setup by AP (units = microseconds) */
  35538. A_UINT32 congestion_thresh_setup; /* Minimum congestion required to start setting up TWT sessions */
  35539. /*
  35540. * The congestion parameters below are in percent of occupied airtime.
  35541. */
  35542. A_UINT32 congestion_thresh_teardown; /* Minimum congestion below which TWT will be torn down */
  35543. A_UINT32 congestion_thresh_critical; /* Threshold above which TWT will not be active */
  35544. /*
  35545. * The interference parameters below use an abstract method of evaluating
  35546. * interference. The parameters are in percent, ranging from 0 for no
  35547. * interference, to 100 for interference extreme enough to completely
  35548. * block the signal of interest.
  35549. */
  35550. A_UINT32 interference_thresh_teardown; /* Minimum interference above that TWT will not be active */
  35551. A_UINT32 interference_thresh_setup; /* Minimum interference below that TWT session can be setup */
  35552. A_UINT32 min_no_sta_setup; /* Minimum no of STA required to start TWT setup */
  35553. A_UINT32 min_no_sta_teardown; /* Minimum no of STA below which TWT will be torn down */
  35554. A_UINT32 no_of_bcast_mcast_slots; /* Number of default slot sizes reserved for BCAST/MCAST delivery */
  35555. A_UINT32 min_no_twt_slots; /* Minimum no of available slots for TWT to be operational */
  35556. 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) */
  35557. /*
  35558. * The below interval parameters have units of milliseconds.
  35559. */
  35560. A_UINT32 mode_check_interval; /* Interval between two successive check to decide the mode of TWT */
  35561. A_UINT32 add_sta_slot_interval; /* Interval between decisions making to create TWT slots for STAs */
  35562. A_UINT32 remove_sta_slot_interval; /* Interval between decisions making to remove TWT slot of STAs */
  35563. A_UINT32 flags; /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
  35564. } wmi_twt_enable_cmd_fixed_param;
  35565. /* status code of enabling TWT */
  35566. typedef enum _WMI_ENABLE_TWT_STATUS_T {
  35567. WMI_ENABLE_TWT_STATUS_OK, /* enabling TWT successfully completed */
  35568. WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED, /* TWT already enabled */
  35569. WMI_ENABLE_TWT_STATUS_NOT_READY, /* FW not ready for enabling TWT */
  35570. WMI_ENABLE_TWT_INVALID_PARAM, /* invalid parameters */
  35571. WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR, /* enabling TWT failed with an unknown reason */
  35572. } WMI_ENABLE_TWT_STATUS_T;
  35573. typedef struct {
  35574. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_complete_event_fixed_param */
  35575. /** 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 */
  35576. A_UINT32 pdev_id;
  35577. A_UINT32 status; /* WMI_ENABLE_TWT_STATUS_T */
  35578. } wmi_twt_enable_complete_event_fixed_param;
  35579. typedef struct {
  35580. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_cmd_fixed_param */
  35581. /** 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 */
  35582. A_UINT32 pdev_id; /* host should never set it to WMI_PDEV_ID_SOC */
  35583. A_UINT32 flags; /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
  35584. A_UINT32 reason_code; /* refer to WMI_DISABLE_TWT_REASON_T */
  35585. } wmi_twt_disable_cmd_fixed_param;
  35586. typedef struct {
  35587. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_complete_event_fixed_param */
  35588. A_UINT32 pdev_id;
  35589. A_UINT32 status; /* refer to WMI_DISABLE_TWT_STATUS_T enum */
  35590. } wmi_twt_disable_complete_event_fixed_param;
  35591. typedef struct {
  35592. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_vdev_config_cmd_fixed_param */
  35593. /** pdev_id for identifying the MAC.
  35594. * See macros starting with WMI_PDEV_ID_ for values.
  35595. */
  35596. A_UINT32 pdev_id;
  35597. A_UINT32 vdev_id;
  35598. /* TWT support flag to be applied to the vdev
  35599. * 0 = ITWT, BTWT and RTWT are disabled.
  35600. * 1 = ITWT is enabled
  35601. * 2 = ITWT and BTWT are enabled
  35602. * 3 = ITWT, BTWT and RTWT are enabled
  35603. */
  35604. A_UINT32 twt_support;
  35605. } wmi_twt_vdev_config_cmd_fixed_param;
  35606. /* status code of TWT Disable */
  35607. typedef enum _WMI_DISABLE_TWT_STATUS_T {
  35608. WMI_DISABLE_TWT_STATUS_OK, /* Disabling TWT successfully completed */
  35609. WMI_DISABLE_TWT_STATUS_ROAM_IN_PROGRESS, /* Roaming in progress */
  35610. WMI_DISABLE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35611. WMI_DISABLE_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35612. } WMI_DISABLE_TWT_STATUS_T;
  35613. /* Host reason code of TWT Disable command : Set by Host */
  35614. typedef enum _WMI_DISABLE_TWT_REASON_T {
  35615. /* Host will set one of below reason code while disabling TWT */
  35616. WMI_DISABLE_TWT_REASON_NONE, /* Normal case */
  35617. WMI_DISABLE_TWT_REASON_CONCURRENCY_SCC, /* Concurrency case SCC */
  35618. WMI_DISABLE_TWT_REASON_CONCURRENCY_MCC, /* Concurrency case MCC */
  35619. WMI_DISABLE_TWT_REASON_CHANGE_CONGESTION_TIMEOUT, /* To change congestion time */
  35620. WMI_DISABLE_TWT_REASON_P2P_GO_NOA, /* P2P GO NOA reason */
  35621. } WMI_DISABLE_TWT_REASON_T;
  35622. /* Notification event ID to Host */
  35623. typedef enum _WMI_TWT_NOTIFICATION_ID_T {
  35624. WMI_TWT_NOTIFY_EVENT_READY = 1,
  35625. WMI_TWT_NOTIFY_EVENT_AP_TWT_REQ_BIT_SET = 2,
  35626. WMI_TWT_NOTIFY_EVENT_AP_TWT_REQ_BIT_CLEAR = 3,
  35627. } WMI_TWT_NOTIFICATION_ID_T;
  35628. typedef struct {
  35629. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_notify_event_fixed_param */
  35630. A_UINT32 vdev_id; /* vdev id of TWT notify event */
  35631. A_UINT32 event_id; /* refer to WMI_TWT_NOTIFICATION_ID_T */
  35632. } wmi_twt_notify_event_fixed_param;
  35633. /* from IEEE 802.11ah section 9.4.2.200 */
  35634. typedef enum _WMI_TWT_COMMAND_T {
  35635. WMI_TWT_COMMAND_REQUEST_TWT = 0,
  35636. WMI_TWT_COMMAND_SUGGEST_TWT = 1,
  35637. WMI_TWT_COMMAND_DEMAND_TWT = 2,
  35638. WMI_TWT_COMMAND_TWT_GROUPING = 3,
  35639. WMI_TWT_COMMAND_ACCEPT_TWT = 4,
  35640. WMI_TWT_COMMAND_ALTERNATE_TWT = 5,
  35641. WMI_TWT_COMMAND_DICTATE_TWT = 6,
  35642. WMI_TWT_COMMAND_REJECT_TWT = 7,
  35643. } WMI_TWT_COMMAND_T;
  35644. /* TWT command, refer to WMI_TWT_COMMAND_T */
  35645. #define TWT_FLAGS_GET_CMD(flag) WMI_GET_BITS(flag, 0, 8)
  35646. #define TWT_FLAGS_SET_CMD(flag, val) WMI_SET_BITS(flag, 0, 8, val)
  35647. /* 0 means Individual TWT, 1 means Broadcast TWT */
  35648. #define TWT_FLAGS_GET_BROADCAST(flag) WMI_GET_BITS(flag, 8, 1)
  35649. #define TWT_FLAGS_SET_BROADCAST(flag, val) WMI_SET_BITS(flag, 8, 1, val)
  35650. /* 0 means non-Trigger-enabled TWT, 1 means means Trigger-enabled TWT */
  35651. #define TWT_FLAGS_GET_TRIGGER(flag) WMI_GET_BITS(flag, 9, 1)
  35652. #define TWT_FLAGS_SET_TRIGGER(flag, val) WMI_SET_BITS(flag, 9, 1, val)
  35653. /* flow type 0 means announced TWT, 1 means un-announced TWT */
  35654. #define TWT_FLAGS_GET_FLOW_TYPE(flag) WMI_GET_BITS(flag, 10, 1)
  35655. #define TWT_FLAGS_SET_FLOW_TYPE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  35656. /* 0 means TWT protection is required, 1 means TWT protection is not required */
  35657. #define TWT_FLAGS_GET_PROTECTION(flag) WMI_GET_BITS(flag, 11, 1)
  35658. #define TWT_FLAGS_SET_PROTECTION(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  35659. /* B-TWT ID 0: 0 means non-0 B-TWT ID or I-TWT, 1 means B-TWT ID 0 */
  35660. #define TWT_FLAGS_GET_BTWT_ID0(flag) WMI_GET_BITS(flag, 12, 1)
  35661. #define TWT_FLAGS_SET_BTWT_ID0(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  35662. /* 0 means TWT Information frame is enabled, 1 means TWT Information frame is disabled */
  35663. #define TWT_FLAGS_GET_TWT_INFO_FRAME_DISABLED(flag) WMI_GET_BITS(flag, 13, 1)
  35664. #define TWT_FLAGS_SET_TWT_INFO_FRAME_DISABLED(flag, val) WMI_SET_BITS(flag, 13, 1, val)
  35665. /*
  35666. * 1 means PM_RESPONDER_MODE information sent in BIT15 is valid, 0 means it is not valid.
  35667. * Will be used for backward compatibility if host uses older FW versions
  35668. * then value will be 0 so host will not consider the BIT15 value.
  35669. */
  35670. #define TWT_FLAGS_GET_PM_RESPONDER_MODE_VALID(flag) WMI_GET_BITS(flag, 14, 1)
  35671. #define TWT_FLAGS_SET_PM_RESPONDER_MODE_VALID(flag, val) WMI_SET_BITS(flag, 14, 1, val)
  35672. /* 1 means PM_RESPONDER_MODE supported, 0 means not supported */
  35673. #define TWT_FLAGS_GET_PM_RESPONDER_MODE(flag) WMI_GET_BITS(flag, 15, 1)
  35674. #define TWT_FLAGS_SET_PM_RESPONDER_MODE(flag, val) WMI_SET_BITS(flag, 15, 1, val)
  35675. typedef struct {
  35676. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_ack_event_fixed_param */
  35677. A_UINT32 vdev_id; /* VDEV identifier */
  35678. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35679. A_UINT32 dialog_id; /* TWT dialog ID */
  35680. A_UINT32 twt_cmd; /* TWT command for which this ack is sent */
  35681. A_UINT32 status; /* Status code corresponding to twt_cmd.
  35682. * This status field contains a value from the
  35683. * status enum corresponding to the twt_cmd type
  35684. * (WMI_ADD_TWT_STATUS_T, WMI_DEL_TWT_STATUS_T,
  35685. * WMI_PAUSE_TWT_STATUS_T, etc.)
  35686. */
  35687. } wmi_twt_ack_event_fixed_param;
  35688. typedef struct {
  35689. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_cmd_fixed_param */
  35690. A_UINT32 vdev_id; /* VDEV identifier */
  35691. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35692. A_UINT32 dialog_id; /* TWT dialog_id (< 0xFF) is per peer, I-TWT & B-TWT use different diaglog ID */
  35693. /* 1. wake_intvl_mantis must be <= 0xFFFF
  35694. * 2. wake_intvl_us must be divided evenly by wake_intvl_mantis,
  35695. * i.e., wake_intvl_us % wake_intvl_mantis == 0
  35696. * 3. the quotient of wake_intvl_us/wake_intvl_mantis must be 2 to N-th(0<=N<=31) power,
  35697. * i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
  35698. */
  35699. A_UINT32 wake_intvl_us; /* TWT Wake Interval in units of us */
  35700. A_UINT32 wake_intvl_mantis; /* TWT Wake Interval Mantissa */
  35701. /* wake_dura_us must be divided evenly by 256, i.e., wake_dura_us % 256 == 0 */
  35702. A_UINT32 wake_dura_us; /* TWT Wake Duration in units of us, must be <= 65280 (0xFF00) */
  35703. A_UINT32 sp_offset_us; /* this long time after TWT setup the 1st SP will start */
  35704. A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
  35705. /* Broadcast TWT(B-TWT) Persistence, when used in Add/update Dialog,
  35706. * indicates for how long(in units of TBTTs) current B-TWT session
  35707. * parameters will not be changed.
  35708. * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
  35709. */
  35710. A_UINT32 b_twt_persistence;
  35711. /* Broadcast TWT(B-TWT) Recommendation, refer to section
  35712. * "9.4.2.199 TWT element" of latest 11ax draft
  35713. */
  35714. A_UINT32 b_twt_recommendation;
  35715. /* Min tolerance limit of wake interval.
  35716. * If this variable is set to 0 by host, FW will ignore it.
  35717. */
  35718. A_UINT32 min_wake_intvl_us;
  35719. /* Max tolerance limit of wake interval.
  35720. * If this variable is set to 0 by host, FW will ignore it.
  35721. */
  35722. A_UINT32 max_wake_intvl_us;
  35723. /* Min tolerance limit of wake duration.
  35724. * If this variable is set to 0 by host, FW will ignore it.
  35725. */
  35726. A_UINT32 min_wake_dura_us;
  35727. /* Max tolerance limit of wake duration.
  35728. * If this variable is set to 0 by host, FW will ignore it.
  35729. */
  35730. A_UINT32 max_wake_dura_us;
  35731. /*
  35732. * Service period start TSF (absolute)
  35733. * If sp_start_tsf_lo == sp_start_tsf_hi == 0, the specification
  35734. * is invalid, and shall be ignored.
  35735. */
  35736. A_UINT32 sp_start_tsf_lo; /* bits 31:0 */
  35737. A_UINT32 sp_start_tsf_hi; /* bits 63:32 */
  35738. /*
  35739. * In announced mode, wait for announce timeout before explicit announce
  35740. * using QoS NULL.
  35741. * If set to 0, FW will send QoS NULL immediately.
  35742. */
  35743. A_UINT32 announce_timeout_us;
  35744. A_UINT32 link_id_bitmap;
  35745. /* parameters required for R-TWT feature */
  35746. A_UINT32 r_twt_dl_tid_bitmap;
  35747. A_UINT32 r_twt_ul_tid_bitmap;
  35748. } wmi_twt_add_dialog_cmd_fixed_param;
  35749. /* status code of adding TWT dialog */
  35750. typedef enum _WMI_ADD_TWT_STATUS_T {
  35751. WMI_ADD_TWT_STATUS_OK, /* adding TWT dialog successfully completed */
  35752. WMI_ADD_TWT_STATUS_TWT_NOT_ENABLED, /* TWT not enabled */
  35753. WMI_ADD_TWT_STATUS_USED_DIALOG_ID, /* TWT dialog ID is already used */
  35754. WMI_ADD_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35755. WMI_ADD_TWT_STATUS_NOT_READY, /* FW not ready */
  35756. WMI_ADD_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35757. WMI_ADD_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35758. WMI_ADD_TWT_STATUS_NO_RESPONSE, /* peer AP did not send the response frame */
  35759. WMI_ADD_TWT_STATUS_DENIED, /* AP did not accept the request */
  35760. WMI_ADD_TWT_STATUS_UNKNOWN_ERROR, /* adding TWT dialog failed with an unknown reason */
  35761. WMI_ADD_TWT_STATUS_AP_PARAMS_NOT_IN_RANGE, /* peer AP wake interval, duration not in range */
  35762. WMI_ADD_TWT_STATUS_AP_IE_VALIDATION_FAILED, /* peer AP IE Validation Failed */
  35763. WMI_ADD_TWT_STATUS_ROAM_IN_PROGRESS, /* Roaming in progress */
  35764. WMI_ADD_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35765. WMI_ADD_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35766. WMI_ADD_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35767. WMI_ADD_TWT_STATUS_BTWT_NOT_ENBABLED, /* Broadcast TWT is not enabled */
  35768. WMI_ADD_TWT_STATUS_RTWT_NOT_ENBABLED, /* Restricted TWT is not enabled */
  35769. WMI_ADD_TWT_STATUS_LINK_SWITCH_IN_PROGRESS, /* Link switch is ongoing */
  35770. WMI_ADD_TWT_STATUS_UNSUPPORTED_MODE_MLMR, /* Unsupported in MLMR mode */
  35771. } WMI_ADD_TWT_STATUS_T;
  35772. typedef struct {
  35773. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_additional_params */
  35774. A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
  35775. A_UINT32 wake_dur_us; /* Wake duration in uS */
  35776. A_UINT32 wake_intvl_us; /* Wake Interval in uS */
  35777. A_UINT32 sp_offset_us; /* SP Starting Offset */
  35778. A_UINT32 sp_tsf_us_lo; /* SP start TSF bits 31:0 */
  35779. A_UINT32 sp_tsf_us_hi; /* SP start TSF bits 63:32 */
  35780. } wmi_twt_add_dialog_additional_params;
  35781. typedef struct {
  35782. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_complete_event_fixed_param */
  35783. A_UINT32 vdev_id; /* VDEV identifier */
  35784. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35785. A_UINT32 dialog_id; /* TWT dialog ID */
  35786. A_UINT32 status; /* refer to WMI_ADD_TWT_STATUS_T */
  35787. /*
  35788. * This fixed_param TLV is followed by the below TLVs:
  35789. * wmi_twt_add_dialog_additional_params twt_params[]; // TWT params received
  35790. * // from peer
  35791. */
  35792. } wmi_twt_add_dialog_complete_event_fixed_param;
  35793. typedef struct {
  35794. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_cmd_fixed_param */
  35795. A_UINT32 vdev_id; /* VDEV identifier */
  35796. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35797. A_UINT32 dialog_id; /* TWT dialog ID */
  35798. /* Broadcast TWT(B-TWT) Persistence, when used in Del Dialog,
  35799. * indicates for how long(in units of TBTTs) current B-TWT session
  35800. * parameters will be present.
  35801. * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
  35802. */
  35803. A_UINT32 b_twt_persistence;
  35804. A_UINT32 is_bcast_twt;
  35805. } wmi_twt_del_dialog_cmd_fixed_param;
  35806. /* status code of deleting TWT dialog */
  35807. typedef enum _WMI_DEL_TWT_STATUS_T {
  35808. WMI_DEL_TWT_STATUS_OK, /* deleting TWT dialog successfully completed */
  35809. WMI_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35810. WMI_DEL_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35811. WMI_DEL_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35812. WMI_DEL_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35813. WMI_DEL_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35814. WMI_DEL_TWT_STATUS_UNKNOWN_ERROR, /* deleting TWT dialog failed with an unknown reason */
  35815. WMI_DEL_TWT_STATUS_PEER_INIT_TEARDOWN, /* Peer Initiated Teardown */
  35816. WMI_DEL_TWT_STATUS_ROAMING, /* Reason Roaming Start*/
  35817. WMI_DEL_TWT_STATUS_CONCURRENCY, /* Teardown due to concurrency */
  35818. WMI_DEL_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35819. WMI_DEL_TWT_STATUS_SCAN_IN_PROGRESS, /* Reason Scan in progress */
  35820. WMI_DEL_TWT_STATUS_CHANGE_CONGESTION_TIMEOUT, /* Congestion timeout changed */
  35821. WMI_DEL_TWT_STATUS_P2P_GO_NOA, /* P2P GO NOA */
  35822. } WMI_DEL_TWT_STATUS_T;
  35823. typedef struct {
  35824. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_complete_event_fixed_param */
  35825. A_UINT32 vdev_id; /* VDEV identifier */
  35826. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35827. A_UINT32 dialog_id; /* TWT dialog ID */
  35828. A_UINT32 status; /* refer to WMI_DEL_TWT_STATUS_T */
  35829. } wmi_twt_del_dialog_complete_event_fixed_param;
  35830. typedef struct {
  35831. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_cmd_fixed_param */
  35832. A_UINT32 vdev_id; /* VDEV identifier */
  35833. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35834. A_UINT32 dialog_id; /* TWT dialog ID */
  35835. } wmi_twt_pause_dialog_cmd_fixed_param;
  35836. /* status code of pausing TWT dialog */
  35837. typedef enum _WMI_PAUSE_TWT_STATUS_T {
  35838. WMI_PAUSE_TWT_STATUS_OK, /* pausing TWT dialog successfully completed */
  35839. WMI_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35840. WMI_PAUSE_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35841. WMI_PAUSE_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35842. WMI_PAUSE_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35843. WMI_PAUSE_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35844. WMI_PAUSE_TWT_STATUS_UNKNOWN_ERROR, /* pausing TWT dialog failed with an unknown reason */
  35845. WMI_PAUSE_TWT_STATUS_ALREADY_PAUSED, /* The TWT dialog is already paused */
  35846. WMI_PAUSE_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
  35847. WMI_PAUSE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35848. WMI_PAUSE_TWT_STATUS_ROAM_IN_PROGRESS, /* Roam in progress */
  35849. WMI_PAUSE_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35850. } WMI_PAUSE_TWT_STATUS_T;
  35851. typedef struct {
  35852. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_complete_event_fixed_param */
  35853. A_UINT32 vdev_id; /* VDEV identifier */
  35854. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35855. A_UINT32 dialog_id; /* TWT dialog ID */
  35856. A_UINT32 status; /* refer to WMI_PAUSE_TWT_STATUS_T */
  35857. } wmi_twt_pause_dialog_complete_event_fixed_param;
  35858. typedef struct {
  35859. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_cmd_fixed_param */
  35860. A_UINT32 vdev_id; /* VDEV identifier */
  35861. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35862. A_UINT32 dialog_id; /* TWT dialog ID */
  35863. A_UINT32 sp_offset_us; /* this long time after TWT resumed the 1st SP will start */
  35864. A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax section "9.4.1.60 TWT Information field" */
  35865. } wmi_twt_resume_dialog_cmd_fixed_param;
  35866. /* status code of resuming TWT dialog */
  35867. typedef enum _WMI_RESUME_TWT_STATUS_T {
  35868. WMI_RESUME_TWT_STATUS_OK, /* resuming TWT dialog successfully completed */
  35869. WMI_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35870. WMI_RESUME_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35871. WMI_RESUME_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35872. WMI_RESUME_TWT_STATUS_NOT_PAUSED, /* dialog not paused currently */
  35873. WMI_RESUME_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35874. WMI_RESUME_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35875. WMI_RESUME_TWT_STATUS_UNKNOWN_ERROR, /* resuming TWT dialog failed with an unknown reason */
  35876. WMI_RESUME_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
  35877. WMI_RESUME_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35878. WMI_RESUME_TWT_STATUS_ROAM_IN_PROGRESS, /* Roam in progress */
  35879. WMI_RESUME_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35880. } WMI_RESUME_TWT_STATUS_T;
  35881. typedef struct {
  35882. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param */
  35883. A_UINT32 vdev_id; /* VDEV identifier */
  35884. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35885. A_UINT32 dialog_id; /* TWT dialog ID */
  35886. A_UINT32 status; /* refer to WMI_RESUME_TWT_STATUS_T */
  35887. } wmi_twt_resume_dialog_complete_event_fixed_param;
  35888. typedef struct {
  35889. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_nudge_dialog_cmd_fixed_param */
  35890. A_UINT32 vdev_id; /* VDEV identifier */
  35891. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35892. A_UINT32 dialog_id; /* TWT dialog ID */
  35893. A_UINT32 suspend_duration_ms; /* this long time after TWT paused the 1st SP will start (millisecond) */
  35894. A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax section "9.4.1.60 TWT Information field" */
  35895. A_INT32 sp_start_offset; /* Next TWT service period will be offset by this time (microsecond) */
  35896. } wmi_twt_nudge_dialog_cmd_fixed_param;
  35897. /* status code of nudging TWT dialog */
  35898. typedef enum _WMI_TWT_NUDGE_STATUS_T {
  35899. WMI_NUDGE_TWT_STATUS_OK, /* nudging TWT dialog successfully completed */
  35900. WMI_NUDGE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID doesn't exist */
  35901. WMI_NUDGE_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35902. WMI_NUDGE_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35903. WMI_NUDGE_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35904. WMI_NUDGE_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35905. WMI_NUDGE_TWT_STATUS_UNKNOWN_ERROR, /* nudging TWT dialog failed with an unknown reason */
  35906. WMI_NUDGE_TWT_STATUS_ALREADY_PAUSED, /* The TWT dialog is already paused */
  35907. WMI_NUDGE_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
  35908. WMI_NUDGE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35909. WMI_NUDGE_TWT_STATUS_ROAM_IN_PROGRESS, /* Roam in progress */
  35910. WMI_NUDGE_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35911. } WMI_TWT_NUDGE_STATUS_T;
  35912. typedef struct {
  35913. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_nudge_dialog_complete_event_fixed_param */
  35914. A_UINT32 vdev_id; /* VDEV identifier */
  35915. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35916. A_UINT32 dialog_id; /* TWT dialog ID */
  35917. A_UINT32 status; /* refer to WMI_NUDGE_TWT_STATUS_T */
  35918. A_UINT32 sp_tsf_us_lo; /* SP resume TSF bits 31:0 */
  35919. A_UINT32 sp_tsf_us_hi; /* SP resume TSF bits 63:32 */
  35920. } wmi_twt_nudge_dialog_complete_event_fixed_param;
  35921. typedef struct {
  35922. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_btwt_invite_sta_cmd_fixed_param */
  35923. A_UINT32 vdev_id; /* VDEV identifier */
  35924. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35925. A_UINT32 dialog_id; /* TWT dialog ID */
  35926. /* parameters required for R-TWT feature */
  35927. A_UINT32 r_twt_dl_tid_bitmap;
  35928. A_UINT32 r_twt_ul_tid_bitmap;
  35929. } wmi_twt_btwt_invite_sta_cmd_fixed_param;
  35930. /* status code of inviting STA to B-TWT dialog */
  35931. typedef enum _WMI_TWT_BTWT_INVITE_STA_STATUS_T {
  35932. WMI_TWT_BTWT_INVITE_STA_STATUS_OK, /* inviting STA to B-TWT successfully completed */
  35933. WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35934. WMI_TWT_BTWT_INVITE_STA_STATUS_INVALID_PARAM, /* invalid parameters */
  35935. WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35936. WMI_TWT_BTWT_INVITE_STA_STATUS_ALREADY_JOINED, /* peer STA already joined the session */
  35937. WMI_TWT_BTWT_INVITE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35938. WMI_TWT_BTWT_INVITE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */
  35939. WMI_TWT_BTWT_INVITE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */
  35940. } WMI_TWT_BTWT_INVITE_STA_STATUS_T;
  35941. typedef struct {
  35942. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_invite_sta_complete_event_fixed_param */
  35943. A_UINT32 vdev_id; /* VDEV identifier */
  35944. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35945. A_UINT32 dialog_id; /* TWT dialog ID */
  35946. A_UINT32 status; /* refer to WMI_TWT_BTWT_INVITE_STA_STATUS_T */
  35947. } wmi_twt_btwt_invite_sta_complete_event_fixed_param;
  35948. typedef struct {
  35949. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_cmd_fixed_param */
  35950. A_UINT32 vdev_id; /* VDEV identifier */
  35951. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35952. A_UINT32 dialog_id; /* TWT dialog ID */
  35953. /* parameters required for R-TWT feature */
  35954. A_UINT32 r_twt_dl_tid_bitmap;
  35955. A_UINT32 r_twt_ul_tid_bitmap;
  35956. } wmi_twt_btwt_remove_sta_cmd_fixed_param;
  35957. /* status code of removing STA from B-TWT dialog */
  35958. typedef enum _WMI_TWT_BTWT_REMOVE_STA_STATUS_T {
  35959. WMI_TWT_BTWT_REMOVE_STA_STATUS_OK, /* removing STA from B-TWT successfully completed */
  35960. WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35961. WMI_TWT_BTWT_REMOVE_STA_STATUS_INVALID_PARAM, /* invalid parameters */
  35962. WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35963. WMI_TWT_BTWT_REMOVE_STA_STATUS_NOT_JOINED, /* peer STA not joined yet */
  35964. WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35965. WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */
  35966. WMI_TWT_BTWT_REMOVE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */
  35967. } WMI_TWT_BTWT_REMOVE_STA_STATUS_T;
  35968. typedef struct {
  35969. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_complete_event_fixed_param */
  35970. A_UINT32 vdev_id; /* VDEV identifier */
  35971. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35972. A_UINT32 dialog_id; /* TWT dialog ID */
  35973. A_UINT32 status; /* refer to WMI_TWT_BTWT_REMOVE_STA_STATUS_T */
  35974. } wmi_twt_btwt_remove_sta_complete_event_fixed_param;
  35975. typedef enum {
  35976. WMI_DMA_RING_CONFIG_MODULE_SPECTRAL,
  35977. WMI_DMA_RING_CONFIG_MODULE_RTT,
  35978. WMI_DMA_RING_CONFIG_MODULE_CV_UPLOAD,
  35979. WMI_DMA_RING_CONFIG_MODULE_WIFI_RADAR,
  35980. } WMI_DMA_RING_SUPPORTED_MODULE;
  35981. typedef struct {
  35982. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_DMA_RING_CAPABILITIES */
  35983. A_UINT32 pdev_id;
  35984. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  35985. A_UINT32 ring_elems_min; /* minimum spaces in the DMA ring for this pdev */
  35986. A_UINT32 min_buf_size; /* minimum size in bytes of each buffer in the DMA ring */
  35987. A_UINT32 min_buf_align; /* minimum alignment in bytes of each buffer in the DMA ring */
  35988. /**************************************************************************
  35989. * DON'T ADD ANY FURTHER FIELDS HERE -
  35990. * It would cause the size of the READY_EXT message within some targets
  35991. * to exceed the size of the buffer used for the message.
  35992. **************************************************************************/
  35993. } WMI_DMA_RING_CAPABILITIES;
  35994. typedef struct {
  35995. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_ wmi_chan_rf_characterization_info */
  35996. /**
  35997. * [7:0] : channel metric - 0 = unusable, 1 = worst, 100 = best
  35998. * [11:8] : channel BW - This bit-field uses values compatible with
  35999. * enum definitions used internally within the target's
  36000. * halphy code. This bit field uses wmi_channel_width.
  36001. * [15:12]: Reserved
  36002. * [31:16]: Frequency - Center frequency of the channel for which
  36003. * the RF characterisation info applies (MHz)
  36004. */
  36005. A_UINT32 freq_info;
  36006. /**************************************************************************
  36007. * DON'T ADD ANY FURTHER FIELDS HERE -
  36008. * It would cause the size of the READY_EXT message within some targets
  36009. * to exceed the size of the buffer used for the message.
  36010. **************************************************************************/
  36011. } WMI_CHAN_RF_CHARACTERIZATION_INFO;
  36012. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC 0x000000ff
  36013. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC_S 0
  36014. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW 0x00000f00
  36015. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S 8
  36016. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ 0xffff0000
  36017. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ_S 16
  36018. #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_SET(dword,val) \
  36019. WMI_F_RMW((dword)->freq_info,(val), \
  36020. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
  36021. #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_GET(dword) \
  36022. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
  36023. #define WMI_CHAN_RF_CHARACTERIZATION_BW_SET(dword, val) \
  36024. WMI_F_RMW((dword)->freq_info,(val), \
  36025. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
  36026. #define WMI_CHAN_RF_CHARACTERIZATION_BW_GET(dword) \
  36027. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
  36028. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_SET(dword, val) \
  36029. WMI_F_RMW((dword)->freq_info,(val), \
  36030. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
  36031. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_GET(dword) \
  36032. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
  36033. typedef struct {
  36034. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_COEX_FIX_CHANNEL_CAPABILITIES */
  36035. /**************************************************************************
  36036. * 1: SAP fix channel has higher priority than ACS
  36037. * 0: SAP fix channel has lower priority than ACS
  36038. **************************************************************************/
  36039. A_UINT32 fix_channel_priority;
  36040. } WMI_COEX_FIX_CHANNEL_CAPABILITIES;
  36041. #define WMI_DMA_RING_PADDR_LO_S 0
  36042. #define WMI_DMA_RING_PADDR_LO 0xffffffff
  36043. #define WMI_DMA_RING_BASE_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  36044. #define WMI_DMA_RING_BASE_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  36045. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  36046. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  36047. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  36048. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  36049. #define WMI_DMA_RING_PADDR_HI_S 0
  36050. #define WMI_DMA_RING_PADDR_HI 0xffff
  36051. #define WMI_DMA_RING_BASE_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  36052. #define WMI_DMA_RING_BASE_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  36053. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  36054. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  36055. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  36056. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  36057. typedef struct {
  36058. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_req_fixed_param */
  36059. A_UINT32 pdev_id;
  36060. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  36061. /**
  36062. * Bits 31:0: base address of ring [31:0]
  36063. */
  36064. A_UINT32 base_paddr_lo;
  36065. /**
  36066. * Bits 15:0: base address of ring [47:32]
  36067. * Bits 31:16: reserved (set to 0x0)
  36068. */
  36069. A_UINT32 base_paddr_hi;
  36070. /**
  36071. * Bits 31:0: address of head index [31:0]
  36072. */
  36073. A_UINT32 head_idx_paddr_lo;
  36074. /**
  36075. * Bits 15:0: address of head index [47:32]
  36076. * Bits 31:16: reserved (set to 0x0)
  36077. */
  36078. A_UINT32 head_idx_paddr_hi;
  36079. /**
  36080. * Bits 31:0: address of tail index [31:0]
  36081. */
  36082. A_UINT32 tail_idx_paddr_lo;
  36083. /**
  36084. * Bits 15:0: address of tail index [47:32]
  36085. * Bits 31:16: reserved (set to 0x0)
  36086. */
  36087. A_UINT32 tail_idx_paddr_hi;
  36088. A_UINT32 num_elems; /** Number of elems in the ring */
  36089. A_UINT32 buf_size; /** size of allocated buffer in bytes */
  36090. A_UINT32 num_resp_per_event; /** Number of wmi_dma_buf_release_entry packed together */
  36091. /**
  36092. * This parameter specifies the timeout in milliseconds.
  36093. * Target should timeout and send whatever resp it has if this time expires.
  36094. */
  36095. A_UINT32 event_timeout_ms;
  36096. } wmi_dma_ring_cfg_req_fixed_param;
  36097. typedef struct {
  36098. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_rsp_fixed_param */
  36099. A_UINT32 pdev_id;
  36100. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  36101. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  36102. } wmi_dma_ring_cfg_rsp_fixed_param;
  36103. typedef struct {
  36104. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_fixed_param */
  36105. A_UINT32 pdev_id; /** ID of pdev whose DMA ring produced the data */
  36106. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  36107. A_UINT32 num_buf_release_entry;
  36108. A_UINT32 num_meta_data_entry;
  36109. /* This TLV is followed by another TLV of array of structs.
  36110. * wmi_dma_buf_release_entry entries[num_buf_release_entry];
  36111. * wmi_dma_buf_release_spectral_meta_data meta_datat[num_meta_data_entry];
  36112. * wmi_dma_buf_release_cv_upload_meta_data cv_meta_data[num_meta_data_entry]
  36113. * wmi_dma_buf_release_cqi_upload_meta_data
  36114. * cqi_meta_data[num_meta_data_entry]
  36115. * wmi_dma_buf_release_wifi_radar_meta_data
  36116. * wifi_radar_meta_data[num_meta_data_entry]
  36117. */
  36118. } wmi_dma_buf_release_fixed_param;
  36119. typedef struct {
  36120. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_entry */
  36121. /**
  36122. * Bits 31:0: address of data [31:0]
  36123. */
  36124. A_UINT32 paddr_lo;
  36125. /**
  36126. * Bits 11:0: address of data [43:32]
  36127. * Bits 31:12: host context data [19:0]
  36128. */
  36129. A_UINT32 paddr_hi;
  36130. } wmi_dma_buf_release_entry;
  36131. typedef struct {
  36132. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_spectral_meta_data */
  36133. /**
  36134. * meta data information.
  36135. * Host uses the noise floor values as one of the major parameter
  36136. * to classify the spectral data.
  36137. * This information will not be provided by ucode unlike the fft reports
  36138. * which gets DMAed to DDR buffer.
  36139. * Hence sending the NF values in dBm units as meta data information.
  36140. */
  36141. A_INT32 noise_floor[WMI_MAX_CHAINS];
  36142. /**
  36143. * The time taken by target in micro seconds to complete the reset routine
  36144. * and re-initiate the spectral scan.
  36145. * If the delay is 0, the WAR to bookkeep the timestamp won't be exercised
  36146. * in HOST.
  36147. */
  36148. A_UINT32 reset_delay;
  36149. /**
  36150. * Current center freq1 (MHz units)
  36151. */
  36152. A_UINT32 freq1;
  36153. /**
  36154. * Current center freq2 (MHz units)
  36155. */
  36156. A_UINT32 freq2;
  36157. /**
  36158. * Channel Width (MHz units)
  36159. */
  36160. A_UINT32 ch_width;
  36161. } wmi_dma_buf_release_spectral_meta_data;
  36162. typedef enum {
  36163. NO_SCALING = 0, /* No bin scaling*/
  36164. /**
  36165. * scaled_bin_mag = bin_mag *
  36166. * sqrt(10^(max(legacy_max_gain - default_agc_max_gain + low_level_offset - RSSI_corr,
  36167. * (agc_total_gain_db < default_agc_max_gain) * high_level_offset)/10)) *
  36168. * 2^(DET{0,1,2}_SPECTRAL_SCAN_BIN_SCALE - legacy_spectral_scan_bin_scale)
  36169. */
  36170. AGC_GAIN_RSSI_CORR_BASED = 1,
  36171. } WMI_SPECTRAL_SCALING_FORMULA_ID;
  36172. typedef struct {
  36173. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_bin_scaling_params */
  36174. A_UINT32 pdev_id; /* ID of pdev to which the scaling parameters are to be applied */
  36175. WMI_SPECTRAL_SCALING_FORMULA_ID formula_id; /* Represets the formula to be used */
  36176. A_UINT32 low_level_offset; /* low level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  36177. A_UINT32 high_level_offset; /* high level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  36178. A_UINT32 rssi_thr; /* RSSI threshold to be used to adjust the inband power of the given spectral report */
  36179. A_UINT32 default_agc_max_gain;/* DEFAULT AGC MAX GAIN used. Fetched from register RXTD_RADAR_SBS_CTRL_1_L bits20:13 */
  36180. /**************************************************************************
  36181. * DON'T ADD ANY FURTHER FIELDS HERE -
  36182. * It would cause the size of the READY_EXT message within some targets
  36183. * to exceed the size of the buffer used for the message.
  36184. **************************************************************************/
  36185. } wmi_spectral_bin_scaling_params;
  36186. #define WMI_SPECTRAL_BW_CAPS_GET(bw_caps, index) WMI_GET_BITS(bw_caps, index, 1)
  36187. #define WMI_SPECTRAL_BW_CAPS_SET(bw_caps, index, value) WMI_SET_BITS(bw_caps, index, 1, value)
  36188. #define WMI_SPECTRAL_FFT_SIZE_CAPS_GET(fft_size_caps, index) WMI_GET_BITS(ft_size_caps, index, 1)
  36189. #define WMI_SPECTRAL_FFT_SIZE_CAPS_SET(fft_size_caps, index, value) WMI_SET_BITS(fft_size_caps, index, 1, value)
  36190. typedef struct {
  36191. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_scan_bw_capabilities */
  36192. A_UINT32 pdev_id; /* ID of pdev for which the bandwidth capabilities are advertised */
  36193. A_UINT32 sscan_mode; /* scan mode to denote whether this is a normal/agile scan (refer to wmi_spectral_scan_mode) */
  36194. A_UINT32 operating_bw; /* Operating bandwidth which supports the bandwidth capabilities, as per enum wmi_channel_width */
  36195. union {
  36196. struct { /* To indicate the scan bandwidths support for the operating bandwidth and scan mode */
  36197. A_UINT32 supports_sscan_bw_20:1,
  36198. supports_sscan_bw_40:1,
  36199. supports_sscan_bw_80:1,
  36200. supports_sscan_bw_160:1,
  36201. supports_sscan_bw_80p80:1,
  36202. supports_sscan_bw_320:1,
  36203. reserved:26;
  36204. };
  36205. A_UINT32 supported_flags;
  36206. };
  36207. } wmi_spectral_scan_bw_capabilities;
  36208. typedef struct {
  36209. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_fft_size_capabilities */
  36210. A_UINT32 pdev_id; /* ID of pdev for which the bandwidth capabilities are advertised */
  36211. A_UINT32 sscan_bw; /* sscan bandwidth, as per enum wmi_channel_width */
  36212. union {
  36213. struct { /* To indicate the scan FFT sizes supported in the sscan bandwidth */
  36214. A_UINT32 supports_fft_size_1:1,
  36215. supports_fft_size_2:1,
  36216. supports_fft_size_3:1,
  36217. supports_fft_size_4:1,
  36218. supports_fft_size_5:1,
  36219. supports_fft_size_6:1,
  36220. supports_fft_size_7:1,
  36221. supports_fft_size_8:1,
  36222. supports_fft_size_9:1,
  36223. supports_fft_size_10:1,
  36224. supports_fft_size_11:1,
  36225. reserved:21;
  36226. };
  36227. A_UINT32 supported_flags;
  36228. };
  36229. } wmi_spectral_fft_size_capabilities;
  36230. typedef struct {
  36231. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_ctl_failsafe_event_params */
  36232. A_UINT32 pdev_id; /* ID of pdev to which ctl failsafe status is sent */
  36233. A_UINT32 ctl_FailsafeStatus; /* To indicate if Failsafe value is imposed on CTL. 0- Success, 1- Failsafe imposed */
  36234. } wmi_pdev_ctl_failsafe_check_fixed_param;
  36235. typedef struct {
  36236. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_runtime_dpd_recal_cmd_fixed_param */
  36237. A_UINT32 enable; /* Enable/disable */
  36238. /* Thermal Thresholds,
  36239. * DPD recalibration will be triggered, when current temperature is
  36240. * either greater than (tmpt_base_c + dlt_tmpt_c_h),
  36241. * or less than (tmpt_base_c + dlt_tmpt_c_l).
  36242. * Here tmpt_base_c is the temperature in centigrade when first run dpd calibration.
  36243. */
  36244. A_UINT32 dlt_tmpt_c_h;
  36245. A_UINT32 dlt_tmpt_c_l;
  36246. /* cooling_time_ms
  36247. * The time (in milliseconds) expected to be needed for the unit
  36248. * to cool from dlt_tmpt_c_h to dlt_tmpt_c_l.
  36249. */
  36250. A_UINT32 cooling_time_ms;
  36251. /* Max duration for dpd re-cal. Unit: ms */
  36252. A_UINT32 dpd_dur_max_ms;
  36253. } wmi_runtime_dpd_recal_cmd_fixed_param;
  36254. typedef enum {
  36255. WMI_ROAM_TRIGGER_REASON_NONE = 0,
  36256. WMI_ROAM_TRIGGER_REASON_PER,
  36257. WMI_ROAM_TRIGGER_REASON_BMISS,
  36258. WMI_ROAM_TRIGGER_REASON_LOW_RSSI,
  36259. WMI_ROAM_TRIGGER_REASON_HIGH_RSSI,
  36260. WMI_ROAM_TRIGGER_REASON_PERIODIC,
  36261. WMI_ROAM_TRIGGER_REASON_MAWC,
  36262. WMI_ROAM_TRIGGER_REASON_DENSE,
  36263. WMI_ROAM_TRIGGER_REASON_BACKGROUND,
  36264. WMI_ROAM_TRIGGER_REASON_FORCED,
  36265. WMI_ROAM_TRIGGER_REASON_BTM,
  36266. WMI_ROAM_TRIGGER_REASON_UNIT_TEST,
  36267. WMI_ROAM_TRIGGER_REASON_BSS_LOAD,
  36268. WMI_ROAM_TRIGGER_REASON_DEAUTH,
  36269. WMI_ROAM_TRIGGER_REASON_IDLE,
  36270. /*
  36271. * NOTE: don't add any more ROAM_TRIGGER_REASON values here.
  36272. * There are checks in the FW that require the value of
  36273. * WMI_ROAM_TRIGGER_REASON_MAX to be < 16.
  36274. * Add new ROAM_TRIGGER_REASON values below, inside the
  36275. * WMI_ROAM_TRIGGER_EXT_REASON_ID enum.
  36276. */
  36277. WMI_ROAM_TRIGGER_REASON_MAX,
  36278. } WMI_ROAM_TRIGGER_REASON_ID;
  36279. /*
  36280. * The WMI_ROAM_TRIGGER_REASON_ID enum cannot be expanded with new values,
  36281. * due to checks in the FW that require WMI_ROAM_TRIGGER_REASON_MAX to be
  36282. * less than 16.
  36283. * The WMI_ROAM_TRIGGER_EXT_REASON_ID enum is used to hold further roam
  36284. * trigger reasons.
  36285. */
  36286. typedef enum {
  36287. WMI_ROAM_TRIGGER_REASON_STA_KICKOUT = WMI_ROAM_TRIGGER_REASON_MAX,
  36288. WMI_ROAM_TRIGGER_REASON_ESS_RSSI,
  36289. WMI_ROAM_TRIGGER_REASON_WTC_BTM,
  36290. WMI_ROAM_TRIGGER_REASON_PMK_TIMEOUT,
  36291. WMI_ROAM_TRIGGER_REASON_BTC,
  36292. WMI_ROAM_TRIGGER_EXT_REASON_MAX
  36293. } WMI_ROAM_TRIGGER_EXT_REASON_ID;
  36294. /* value for DENSE roam trigger */
  36295. #define WMI_RX_TRAFFIC_ABOVE_THRESHOLD 0x1
  36296. #define WMI_TX_TRAFFIC_ABOVE_THRESHOLD 0x2
  36297. typedef struct {
  36298. A_UINT32 trigger_id; /* id from WMI_ROAM_TRIGGER_REASON_ID */
  36299. /* interpretation of trigger value is as follows, for different trigger IDs
  36300. * ID = PER -> value = PER percentage
  36301. * ID = LOW_RSSI -> value = RSSI in dB wrt noise floor,
  36302. * ID = HIGH_RSSI -> value = RSSI in dB wrt to noise floor,
  36303. * ID = DENSE -> value = specification if it is tx or rx traffic threshold,
  36304. * (see WMI_[RX,TX]_TRAFFIC_ABOVE_THRESHOLD)
  36305. * ID = PERIODIC -> value = periodicity in ms
  36306. *
  36307. * for other IDs trigger_value would be 0 (invalid)
  36308. */
  36309. A_UINT32 trigger_value;
  36310. } wmi_roam_scan_trigger_reason;
  36311. typedef struct {
  36312. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param */
  36313. A_UINT32 vdev_id;
  36314. } wmi_request_roam_scan_stats_cmd_fixed_param;
  36315. /** BSS load configuration parameters for roam trigger */
  36316. typedef struct {
  36317. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_load_cmd_fixed_param */
  36318. A_UINT32 vdev_id;
  36319. /** Minimum number of beacons to be consider for calculating average AP BSS load within time monitor_time_window */
  36320. A_UINT32 beacons_min_count;
  36321. /** Monitor time window in seconds */
  36322. A_UINT32 monitor_time_window;
  36323. /** BSS load threshold after which roam scan should trigger */
  36324. A_UINT32 bss_load_threshold;
  36325. /** rssi_2g_threshold
  36326. * If connected AP is in 2.4 GHz, then consider bss load roam triggered
  36327. * only if load % > bss_load_threshold && connected AP RSSI is worse
  36328. * than rssi_2g_threshold.
  36329. */
  36330. A_INT32 rssi_2g_threshold; /* units = dBm */
  36331. /** rssi_5g_threshold
  36332. * If connected AP is in 5 GHz, then consider bss load roam triggered
  36333. * only if load % > bss_load_threshold && connected AP RSSI is worse
  36334. * than rssi_5g_threshold.
  36335. */
  36336. A_INT32 rssi_5g_threshold; /* units = dBm */
  36337. /** rssi_6g_threshold
  36338. * If connected AP is in 6 GHz, then consider bss load roam triggered
  36339. * only if load % > bss_load_threshold && connected AP RSSI is worse
  36340. * than rssi_6g_threshold. If rssi_6g_threshold is 0, it should be ignored.
  36341. */
  36342. A_INT32 rssi_6g_threshold; /* units = dBm */
  36343. } wmi_roam_bss_load_config_cmd_fixed_param;
  36344. /** Deauth roam trigger parameters */
  36345. typedef struct {
  36346. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_deauth_config_cmd_fixed_param */
  36347. A_UINT32 vdev_id;
  36348. /* 1-Enable, 0-Disable */
  36349. A_UINT32 enable;
  36350. } wmi_roam_deauth_config_cmd_fixed_param;
  36351. /** IDLE roam trigger parameters */
  36352. typedef struct {
  36353. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_idle_config_cmd_fixed_param */
  36354. A_UINT32 vdev_id;
  36355. /* 1: Enable, 0: Disable */
  36356. A_UINT32 enable;
  36357. /* Connected AP band. 0: Any Band, 1: 2.4 GHz Band, 2: 5 GHz Band */
  36358. A_UINT32 band;
  36359. /* Trigger Idle roaming only if RSSI change of connected AP is within rssi_delta during idle time */
  36360. A_UINT32 rssi_delta; /* units = dB */
  36361. /* Trigger idle roam only if connected RSSI is better than min_rssi */
  36362. A_INT32 min_rssi; /* units = dBm */
  36363. /* Inactive/Idle time duration
  36364. * After screen is OFF (or whatever condition is suitable in a given
  36365. * system as an indication that the system is likely idle)
  36366. * and if below conditions are met then idle roaming will be triggered.
  36367. * 1. Connected AP band is matching with band value configured
  36368. * 2. No TX/RX data for more than idle_time configured
  36369. * or TX/RX data packets count is less than data_packet_count
  36370. * during idle_time
  36371. * 3. Connected AP RSSI change is not more than rssi_delta
  36372. * 4. Connected AP RSSI is better than min_rssi.
  36373. * The purpose of this trigger for idle scan is to issue the scan
  36374. * even if (moreover, particularly if) the connection to the
  36375. * existing AP is still good, to keep the STA from getting locked
  36376. * onto the current good AP and thus missing out on an available
  36377. * even better AP. This min_rssi threshold can be used to adjust
  36378. * the connection quality level at which the STA considers doing an
  36379. * idle scan.
  36380. */
  36381. A_UINT32 idle_time; /* units = seconds */
  36382. /* Maximum allowed data packets count during idle time */
  36383. A_UINT32 data_packet_count;
  36384. } wmi_roam_idle_config_cmd_fixed_param;
  36385. /** trigger to start/stop monitoring if system is idle command parameters */
  36386. typedef struct {
  36387. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_idle_trigger_monitor_cmd_fixed_param */
  36388. /* idle_trigger_monitor values are from WMI_IDLE_TRIGGER_MONITOR_ID */
  36389. A_UINT32 idle_trigger_monitor;
  36390. } wmi_idle_trigger_monitor_cmd_fixed_param;
  36391. typedef enum {
  36392. WMI_IDLE_TRIGGER_MONITOR_NONE = 0, /* no-op */
  36393. /* IDLE_TRIGGER_MONITOR_ON
  36394. * The host's screen has turned off (or some other event indicating that
  36395. * the system is likely idle) -
  36396. * start monitoring to check if the system is idle.
  36397. */
  36398. WMI_IDLE_TRIGGER_MONITOR_ON,
  36399. /* IDLE_TRIGGER_MONITOR_OFF
  36400. * The host's screen has turned on (or some other event indicating that
  36401. * the system is not idle)
  36402. */
  36403. WMI_IDLE_TRIGGER_MONITOR_OFF,
  36404. } WMI_SCREEN_STATUS_NOTIFY_ID;
  36405. typedef struct {
  36406. /** TLV tag and len; tag equals wmi_pdev_dsm_filter_fixed_param */
  36407. A_UINT32 tlv_header;
  36408. /**
  36409. * TLV (tag length value) parameter's following pdev_dsm_filter_cmd are,
  36410. *
  36411. * wmi_pdev_bssid_disallow_list_config_param bssid_disallow_list[];
  36412. * i.e array containing all disallow AP filter lists including
  36413. * the new DSM lists (avoidlist / driver_blacklist) and existing
  36414. * lists (supplicant_blacklist / rssi_rejectlist etc.)
  36415. */
  36416. } wmi_pdev_dsm_filter_fixed_param;
  36417. typedef struct {
  36418. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_bssid_disallow_list_config_param */
  36419. A_UINT32 tlv_header;
  36420. /** bssid type i.e whether bssid falls in avoid list or driver_blacklist etc.
  36421. see WMI_BSSID_DISALLOW_LIST_TYPE **/
  36422. A_UINT32 bssid_type;
  36423. /** mac address of disallow BSSID */
  36424. wmi_mac_addr bssid;
  36425. /** Disallow AP for certain duration, in units of milliseconds */
  36426. A_UINT32 remaining_disallow_duration;
  36427. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  36428. A_INT32 expected_rssi;
  36429. /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
  36430. A_UINT32 reason;
  36431. /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
  36432. A_UINT32 source;
  36433. /*
  36434. * timestamp is the absolute time w.r.t host timer which is synchronized
  36435. * between the host and target.
  36436. * This timestamp indicates the time when AP added to blacklist.
  36437. */
  36438. A_UINT32 timestamp;
  36439. /* Original timeout value in milli seconds when AP added to BL */
  36440. A_UINT32 original_timeout;
  36441. /*
  36442. * The disallow link ID bitmap indicates links which should not be allowed
  36443. * for any assoc or partner link combination.
  36444. * If all links for MLD AP are disallowed, then the value shall be
  36445. * 0xffffffff.
  36446. */
  36447. A_UINT32 disallow_linkid_bitmap;
  36448. /* MLD address of AP */
  36449. wmi_mac_addr mld;
  36450. /* List of link combinations for which association is failed */
  36451. A_UINT32 ml_failed_links_combo_bitmap[WMI_MAX_FAILED_LINK_COMBO_COUNT];
  36452. /* Failed link combo count filled in ml_failed_links_combo_bitmap[] */
  36453. A_UINT32 ml_failed_link_combo_count;
  36454. } wmi_pdev_bssid_disallow_list_config_param;
  36455. typedef enum {
  36456. /* USER_SPACE_BLACK_LIST
  36457. * Black Listed AP's by host's user space
  36458. */
  36459. WMI_BSSID_DISALLOW_USER_SPACE_BLACK_LIST = 1,
  36460. /* DRIVER_BLACK_LIST
  36461. * Black Listed AP's by host driver
  36462. * used for data stall migitation
  36463. */
  36464. WMI_BSSID_DISALLOW_DRIVER_BLACK_LIST,
  36465. /* USER_SPACE_AVOID_LIST
  36466. * Avoid List AP's by host's user space
  36467. * used for data stall migitation
  36468. */
  36469. WMI_BSSID_DISALLOW_USER_SPACE_AVOID_LIST,
  36470. /* DRIVER_AVOID_LIST
  36471. * Avoid List AP's by host driver
  36472. * used for data stall migitation
  36473. */
  36474. WMI_BSSID_DISALLOW_DRIVER_AVOID_LIST,
  36475. /* RSSI_REJECT_LIST
  36476. * OCE AP's
  36477. */
  36478. WMI_BSSID_DISALLOW_RSSI_REJECT_LIST,
  36479. } WMI_BSSID_DISALLOW_LIST_TYPE;
  36480. /* WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST:
  36481. * Maximum number of BSSID disallow entries which host is allowed to send
  36482. * to firmware within the WMI_PDEV_DSM_FILTER_CMDID message.
  36483. */
  36484. #define WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST 28
  36485. /** Roam Pre-Authentication completion status */
  36486. typedef struct {
  36487. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_status_cmd_fixed_param */
  36488. A_UINT32 vdev_id;
  36489. /* preauth_status, 0 - Success, Non Zero - Failure
  36490. * Refer to IEEE Std 802.11-2016 Table 9-46 for meaning of status values.
  36491. */
  36492. A_UINT32 preauth_status;
  36493. /* AP BSSID for which pre-authentication is completed */
  36494. wmi_mac_addr candidate_ap_bssid;
  36495. /**
  36496. * This fixed_param TLV is followed by the below TLVs:
  36497. *
  36498. * PMKID computed after successful pre-authentication. This is valid only if preauth_status is success
  36499. * A_UINT8 pmkid[];
  36500. *
  36501. * PMK computed after successful pre-authentication. This is valid only if preauth_status is success
  36502. * A_UINT8 pmk[];
  36503. */
  36504. } wmi_roam_preauth_status_cmd_fixed_param;
  36505. /** Roam Pre-Authentication start event */
  36506. typedef struct {
  36507. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_start_event_fixed_param */
  36508. A_UINT32 vdev_id;
  36509. /* AP BSSID for which host needs to start pre-authentication */
  36510. wmi_mac_addr candidate_ap_bssid;
  36511. /*
  36512. * Transmit address for which host needs to start pre-authentication
  36513. * in MLO case. In non MLO cases, transmit_addr will be filled with 0x0.
  36514. */
  36515. wmi_mac_addr transmit_addr;
  36516. /* AKM suite type (as defined in the IEEE 802.11 spec) */
  36517. A_UINT32 akm_suite_type;
  36518. } wmi_roam_preauth_start_event_fixed_param;
  36519. typedef struct {
  36520. /*
  36521. * The timestamp is in units of ticks of a 19.2MHz clock.
  36522. * The timestamp is taken at roam scan start.
  36523. */
  36524. A_UINT32 lower32bit;
  36525. A_UINT32 upper32bit;
  36526. } wmi_roaming_timestamp;
  36527. typedef struct {
  36528. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param */
  36529. A_UINT32 vdev_id;
  36530. /* number of roam scans */
  36531. A_UINT32 num_roam_scans;
  36532. /* This TLV is followed by TLV's:
  36533. * A_UINT32 client_id[num_roam_scans]; based on WMI_SCAN_CLIENT_ID
  36534. * wmi_roaming_timestamp timestamp[num_roam_scans]; clock ticks at the time of scan start
  36535. * A_UINT32 num_channels[num_roam_scans]; number of channels that are scanned
  36536. * A_UINT32 chan_info[]; channel frequencies (MHz) in each scan
  36537. * The num_channels[] elements specify how many elements there are
  36538. * within chan_info[] for each scan.
  36539. * For example, if num_channels = [2, 3] then chan_info will have 5
  36540. * elements, with the first 2 elements from the first scan, and
  36541. * the last 3 elements from the second scan.
  36542. * wmi_mac_addr old_bssid[num_roam_scans]; bssid we are connected to at the time of roaming
  36543. * A_UINT32 is_roaming_success[num_roam_scans]; value is 1 if roaming is successful, 0 if roaming failed
  36544. * wmi_mac_addr new_bssid[num_roam_scans]; bssid after roaming
  36545. * A_UINT32 num_of_roam_candidates[num_roam_scans]; number of candidates found in each roam scan
  36546. * roam_scan_trigger_reason roam_reason[num_roam_scans]; reason for each roam scan
  36547. * wmi_mac_addr bssid[]; bssids of candidates in each roam scan
  36548. * The num_of_roam_candidates[] elements specify how many elements
  36549. * there are within bssid[] for each scan.
  36550. * For example, if num_of_roam_candidates = [2, 3] then bssid will
  36551. * have 5 elements, with the first 2 elements from the first scan,
  36552. * and the last 3 elements from the second scan.
  36553. * A_UINT32 score[]; score of candidates in each roam scan
  36554. * The num_of_roam_candidates[] elements specify how many elements
  36555. * there are within score[] for each scan.
  36556. * For example, if num_of_roam_candidates = [2, 3] then score will
  36557. * have 5 elements, with the first 2 elements from the first scan,
  36558. * and the last 3 elements from the second scan.
  36559. * A_UINT32 channel[]; channel frequency (MHz) of candidates in each roam scan
  36560. * The num_of_roam_candidates[] elements specify how many elements
  36561. * there are within channel[] for each scan.
  36562. * For example, if num_of_roam_candidates = [2, 3] then channel will
  36563. * have 5 elements, with the first 2 elements from the first scan,
  36564. * and the last 3 elements from the second scan.
  36565. * A_UINT32 rssi[]; RSSI in dB w.r.t. noise floor of candidates
  36566. * in each roam scan.
  36567. * The num_of_roam_candidates[] elements specify how many elements
  36568. * there are within rssi[] for each scan.
  36569. * For example, if num_of_roam_candidates = [2, 3] then rssi will
  36570. * have 5 elements, with the first 2 elements from the first scan,
  36571. * and the last 3 elements from the second scan.
  36572. */
  36573. } wmi_roam_scan_stats_event_fixed_param;
  36574. typedef enum {
  36575. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER = 1, /* Roam scan triggered due to periodic timer expiry */
  36576. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER, /* Roam scan triggered due to inactivity detection */
  36577. /* INACTIVITY_TIMER_LOW_RSSI - alias for INACTIVITY_TIMER */
  36578. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER_LOW_RSSI =
  36579. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER,
  36580. WMI_ROAM_TRIGGER_SUB_REASON_BTM_DI_TIMER, /* Roam scan triggered due to BTM Disassoc Imminent timeout */
  36581. WMI_ROAM_TRIGGER_SUB_REASON_FULL_SCAN, /* Roam scan triggered due to partial scan failure */
  36582. WMI_ROAM_TRIGGER_SUB_REASON_LOW_RSSI_PERIODIC, /* Roam scan triggered due to Low RSSI periodic timer */
  36583. WMI_ROAM_TRIGGER_SUB_REASON_CU_PERIODIC, /* Roam scan triggered due to CU periodic timer */
  36584. /* PERIODIC_TIMER_AFTER_INACTIVITY:
  36585. * Roam scan triggered due to periodic timer after device in
  36586. * inactivity state.
  36587. * This timer is enabled/used for roaming in a vendor-specific manner.
  36588. */
  36589. WMI_ROAM_TRIGGER_SUB_REASCON_PERIODIC_TIMER_AFTER_INACTIVITY,
  36590. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY =
  36591. WMI_ROAM_TRIGGER_SUB_REASCON_PERIODIC_TIMER_AFTER_INACTIVITY,
  36592. /*
  36593. * PERIODIC_TIMER_AFTER_INACTIVITY_LOW_RSSI - alias for
  36594. * PERIODIC_TIMER_AFTER_INACTIVITY
  36595. */
  36596. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY_LOW_RSSI =
  36597. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY,
  36598. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY_CU,
  36599. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER_CU,
  36600. /* MLD_EXTRA_PARTIAL_SCAN:
  36601. * FW triggers extra partial scan when all ml links are not found
  36602. * during first partial scan.
  36603. */
  36604. WMI_ROAM_TRIGGER_SUB_REASON_MLD_EXTRA_PARTIAL_SCAN,
  36605. } WMI_ROAM_TRIGGER_SUB_REASON_ID;
  36606. typedef enum wmi_roam_invoke_status_error {
  36607. WMI_ROAM_INVOKE_STATUS_SUCCESS = 0,
  36608. WMI_ROAM_INVOKE_STATUS_VDEV_INVALID = 0x11, /* Invalid VDEV */
  36609. WMI_ROAM_INVOKE_STATUS_BSS_INVALID, /* Invalid VDEV BSS */
  36610. WMI_ROAM_INVOKE_STATUS_VDEV_DOWN, /* VDEV is not UP */
  36611. WMI_ROAM_INVOKE_STATUS_ROAM_HANDLE_INVALID, /* VDEV ROAM handle is invalid */
  36612. WMI_ROAM_INVOKE_STATUS_OFFLOAD_DISABLE, /* Roam offload is not enabled */
  36613. WMI_ROAM_INVOKE_STATUS_AP_SSID_LENGTH_INVALID, /* Connected AP profile SSID length is zero */
  36614. WMI_ROAM_INVOKE_STATUS_HO_DISALLOW, /* Already FW internal roaming is in progress */
  36615. WMI_ROAM_INVOKE_STATUS_ALREADY_RUNNING, /* Roam Invoke already in progress either from internal FW BTM request or from host*/
  36616. WMI_ROAM_INVOKE_STATUS_NON_ROAMABLE_AP, /* Roam HO is not triggered due to non roamable AP */
  36617. WMI_ROAM_INVOKE_STATUS_HO_INTERNAL_FAIL, /* Candidate AP save failed */
  36618. WMI_ROAM_INVOKE_STATUS_DISALLOW, /* Roam invoke trigger is not enabled */
  36619. WMI_ROAM_INVOKE_STATUS_SCAN_FAIL, /* Scan start fail */
  36620. WMI_ROAM_INVOKE_STATUS_START_HO_FAIL, /* Roam HO start fail */
  36621. WMI_ROAM_INVOKE_STATUS_INVALID_PARAMS, /* Roam invoke params are invalid */
  36622. WMI_ROAM_INVOKE_STATUS_INVALID_SCAN_MODE, /* Roam scan mode is invalid */
  36623. WMI_ROAM_INVOKE_STATUS_NO_CAND_AP, /* No candidate AP found to roam to */
  36624. WMI_ROAM_INVOKE_STATUS_HO_FAIL, /* handoff failed */
  36625. } wmi_roam_invoke_status_error_t;
  36626. typedef struct {
  36627. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_reason_tlv_param */
  36628. /*
  36629. * timestamp is the absolute time w.r.t host timer which is synchronized
  36630. * between the host and target.
  36631. * This timestamp indicates the time when roam trigger happened.
  36632. */
  36633. A_UINT32 timestamp; /* Timestamp in milli seconds */
  36634. /* trigger_reason:
  36635. * Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID
  36636. */
  36637. A_UINT32 trigger_reason;
  36638. /* trigger_sub_reason:
  36639. * Reason for each roam scan from WMI_ROAM_TRIGGER_SUB_REASON_ID,
  36640. * if multiple scans are triggered for a single roam trigger.
  36641. */
  36642. A_UINT32 trigger_sub_reason;
  36643. A_UINT32 current_rssi; /* Connected AP RSSI in dBm */
  36644. /* roam_rssi_threshold:
  36645. * RSSI threshold value in dBm for low RSSI roam trigger.
  36646. */
  36647. A_UINT32 roam_rssi_threshold;
  36648. A_UINT32 cu_load; /* Connected AP CU load percentage (0-100) */
  36649. /* deauth_type:
  36650. * 1 -> De-authentication
  36651. * 2 -> Disassociation
  36652. */
  36653. A_UINT32 deauth_type;
  36654. /* deauth_reason:
  36655. * De-authentication or disassociation reason.
  36656. * De-authentication / disassociation Values are enumerated in the
  36657. * 802.11 spec.
  36658. */
  36659. A_UINT32 deauth_reason;
  36660. /* btm_request_mode:
  36661. * Mode Values are enumerated in the 802.11 spec.
  36662. */
  36663. A_UINT32 btm_request_mode;
  36664. A_UINT32 disassoc_imminent_timer; /* in Milli seconds */
  36665. /* validity_internal:
  36666. * Preferred candidate list validity interval in Milli seconds.
  36667. */
  36668. A_UINT32 validity_internal;
  36669. /* candidate_list_count:
  36670. * Number of preferred candidates from BTM request.
  36671. */
  36672. A_UINT32 candidate_list_count;
  36673. /* btm_response_status_code:
  36674. * Response status Values are enumerated in the 802.11 spec.
  36675. */
  36676. A_UINT32 btm_response_status_code;
  36677. union {
  36678. /*
  36679. * If a definition of these vendor-specific files has been provided,
  36680. * use the vendor-specific names for these fields as an alias for
  36681. */
  36682. #ifdef WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC1
  36683. WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC1;
  36684. #endif
  36685. struct {
  36686. /* opaque space reservation for vendor-specific fields */
  36687. A_UINT32 vendor_specific1[7];
  36688. };
  36689. };
  36690. /* BTM BSS termination timeout value in milli seconds */
  36691. A_UINT32 btm_bss_termination_timeout;
  36692. /* BTM MBO assoc retry timeout value in milli seconds */
  36693. A_UINT32 btm_mbo_assoc_retry_timeout;
  36694. union {
  36695. /*
  36696. * If a definition of these vendor-specific files has been provided,
  36697. * use the vendor-specific names for these fields as an alias for
  36698. */
  36699. #ifdef WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC2
  36700. WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC2;
  36701. #endif
  36702. struct {
  36703. /* opaque space reservation for vendor-specific fields */
  36704. A_UINT32 vendor_specific2[4];
  36705. };
  36706. };
  36707. /* btm_req_dialog_token: dialog token number in BTM request frame */
  36708. A_UINT32 btm_req_dialog_token;
  36709. /* data RSSI in dBm when abort to roam scan */
  36710. A_INT32 data_rssi;
  36711. /* data RSSI threshold in dBm */
  36712. A_INT32 data_rssi_threshold;
  36713. /* rx linkspeed status, 0:good linkspeed, 1:bad */
  36714. A_UINT32 rx_linkspeed_status;
  36715. } wmi_roam_trigger_reason;
  36716. #define WMI_GET_BTCONNECT_STATUS(flags) WMI_GET_BITS(flags, 0, 1)
  36717. #define WMI_SET_BTCONNECT_STATUS(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  36718. #define WMI_GET_MLO_BAND(flags) WMI_GET_BITS(flags, 1, 3)
  36719. #define WMI_SET_MLO_BAND(flags, val) WMI_SET_BITS(flags, 1, 3, val)
  36720. typedef enum wmi_mlo_band_info {
  36721. WMI_MLO_BAND_NO_MLO = 0,
  36722. WMI_MLO_BAND_2GHZ_MLO,
  36723. WMI_MLO_BAND_5GHZ_MLO,
  36724. WMI_MLO_BAND_6GHZ_MLO,
  36725. } wmi_mlo_band_info_t;
  36726. typedef struct {
  36727. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_info_tlv_param */
  36728. /* roam_scan_type:
  36729. * 0 -> Partial roam scan
  36730. * 1 -> Full roam scan
  36731. */
  36732. A_UINT32 roam_scan_type;
  36733. /* next_rssi_trigger_threshold:
  36734. * Updated RSSI threshold value in dBm for next roam trigger.
  36735. */
  36736. A_UINT32 next_rssi_trigger_threshold;
  36737. A_UINT32 roam_scan_channel_count; /* Number of channels scanned during roam scan */
  36738. A_UINT32 roam_ap_count; /* Number of roamable APs */
  36739. A_UINT32 frame_info_count; /* Number of frame info */
  36740. /*
  36741. * scan_complete_timestamp is the absolute time w.r.t host timer
  36742. * which is synchronized between the host and target.
  36743. * This timestamp indicates the time when roam scan finished.
  36744. */
  36745. A_UINT32 scan_complete_timestamp; /* milli second units */
  36746. /*
  36747. * Flags capturing factors involved during roam scan:
  36748. * Bit 0 : Bluetooth connect status, 0(not connected) or 1(connected).
  36749. * Bit 1-3 : Indicates which link triggered roaming in MLD cases.
  36750. * The value is one of the wmi_mlo_band_info_t enum constants.
  36751. * Refer to WMI_[GET,SET]_MLO_BAND macros.
  36752. * Bit 4-31 : reserved for future use.
  36753. */
  36754. A_UINT32 flags;
  36755. } wmi_roam_scan_info;
  36756. typedef struct {
  36757. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_channel_info_tlv_param */
  36758. A_UINT32 channel; /* Channel frequency in MHz */
  36759. A_UINT32 ch_dwell_type; /* indicates channel dwell type:
  36760. * 0 -> unspecified
  36761. * 1 -> active
  36762. * 2 -> passive
  36763. */
  36764. } wmi_roam_scan_channel_info;
  36765. #define WMI_GET_AP_INFO_MLO_STATUS(flags) WMI_GET_BITS(flags, 0, 1)
  36766. #define WMI_SET_AP_INFO_MLO_STATUS(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  36767. typedef struct {
  36768. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_info_tlv_param */
  36769. /*
  36770. * timestamp is the absolute time w.r.t host timer which is synchronized
  36771. * between the host and target.
  36772. * This timestamp indicates the time when candidate AP is found
  36773. * during roam scan.
  36774. */
  36775. A_UINT32 timestamp; /* Timestamp in milli seconds */
  36776. A_UINT32 candidate_type; /* 0 - Candidate AP, 1 - Connected AP */
  36777. wmi_mac_addr bssid; /* AP MAC address */
  36778. A_UINT32 channel; /* AP channel frequency in MHz */
  36779. A_UINT32 rssi; /* AP current RSSI in dBm */
  36780. A_UINT32 cu_load; /* AP current cu load percentage (0-100) */
  36781. /*
  36782. * The score fields below don't have a pre-determined range,
  36783. * but use the sense that a higher score indicates a better
  36784. * roam candidate.
  36785. */
  36786. A_UINT32 rssi_score; /* AP current RSSI score */
  36787. A_UINT32 cu_score; /* AP current cu score */
  36788. A_UINT32 total_score; /* AP total score */
  36789. A_UINT32 etp; /* AP Estimated Throughput (ETP) value in mbps */
  36790. /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
  36791. A_UINT32 bl_reason;
  36792. /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
  36793. A_UINT32 bl_source;
  36794. /*
  36795. * timestamp is the absolute time w.r.t host timer which is synchronized
  36796. * between the host and target.
  36797. * This timestamp indicates the time when AP added to blacklist.
  36798. */
  36799. A_UINT32 bl_timestamp;
  36800. /* Original timeout value in milli seconds when AP added to BL */
  36801. A_UINT32 bl_original_timeout;
  36802. /* flags:
  36803. * bit 0: MLD AP FLAG -> 1: MLD AP, 0: non-MLD AP
  36804. * Refer to WMI_[GET,SET]_AP_INFO_MLO_STATUS macros.
  36805. * bit 1-31: reserved.
  36806. */
  36807. A_UINT32 flags;
  36808. wmi_mac_addr mld_addr;
  36809. } wmi_roam_ap_info;
  36810. typedef enum {
  36811. /* Failures reasons for not triggering roaming */
  36812. WMI_ROAM_FAIL_REASON_NO_SCAN_START = 1, /* Roam scan not started */
  36813. WMI_ROAM_FAIL_REASON_SCAN_NOT_ALLOWED = WMI_ROAM_FAIL_REASON_NO_SCAN_START, /* Roam scan is not allowed to start */
  36814. WMI_ROAM_FAIL_REASON_NO_AP_FOUND, /* No roamable APs found during roam scan */
  36815. WMI_ROAM_FAIL_REASON_NO_CAND_AP_FOUND, /* No candidate APs found during roam scan */
  36816. /* Failure reasons after roaming is triggered */
  36817. WMI_ROAM_FAIL_REASON_HOST, /* Roam fail due to VDEV STOP issued from Host */
  36818. WMI_ROAM_FAIL_REASON_AUTH_SEND, /* Unable to send auth request frame */
  36819. WMI_ROAM_FAIL_REASON_AUTH_RECV, /* Received auth response with error status code */
  36820. WMI_ROAM_FAIL_REASON_NO_AUTH_RESP, /* Not receiving auth response frame */
  36821. WMI_ROAM_FAIL_REASON_REASSOC_SEND, /* Unable to send reassoc request frame */
  36822. WMI_ROAM_FAIL_REASON_REASSOC_RECV, /* Received reassoc response with error status code */
  36823. WMI_ROAM_FAIL_REASON_NO_REASSOC_RESP, /* Not receiving reassoc response frame */
  36824. WMI_ROAM_FAIL_REASON_EAPOL_TIMEOUT, /* EAPOL TIMEOUT */
  36825. WMI_ROAM_FAIL_REASON_EAPOL_M1_TIMEOUT = WMI_ROAM_FAIL_REASON_EAPOL_TIMEOUT, /* EAPOL M1 is not received */
  36826. WMI_ROAM_FAIL_REASON_MLME, /* MLME internal error */
  36827. WMI_ROAM_FAIL_REASON_INTERNAL_ABORT, /* Internal abort */
  36828. WMI_ROAM_FAIL_REASON_SCAN_START, /* Unable to start roam scan */
  36829. WMI_ROAM_FAIL_REASON_AUTH_NO_ACK, /* No ACK is received for Auth request */
  36830. WMI_ROAM_FAIL_REASON_AUTH_INTERNAL_DROP, /* Auth request is dropped internally */
  36831. WMI_ROAM_FAIL_REASON_REASSOC_NO_ACK, /* No ACK is received for Reassoc request */
  36832. WMI_ROAM_FAIL_REASON_REASSOC_INTERNAL_DROP, /* Reassoc request is dropped internally */
  36833. WMI_ROAM_FAIL_REASON_EAPOL_M2_SEND, /* Unable to send EAPOL M2 frame */
  36834. WMI_ROAM_FAIL_REASON_EAPOL_M2_INTERNAL_DROP, /* EAPOL M2 frame dropped internally */
  36835. WMI_ROAM_FAIL_REASON_EAPOL_M2_NO_ACK, /* No Ack is received for EAPOL M2 frame */
  36836. WMI_ROAM_FAIL_REASON_EAPOL_M3_TIMEOUT, /* M3 is not received */
  36837. WMI_ROAM_FAIL_REASON_EAPOL_M4_SEND, /* Unable to send EAPOL M4 frame */
  36838. WMI_ROAM_FAIL_REASON_EAPOL_M4_INTERNAL_DROP, /* EAPOL M4 frame dropped internally */
  36839. WMI_ROAM_FAIL_REASON_EAPOL_M4_NO_ACK, /* No Ack is received for EAPOL M4 frame */
  36840. WMI_ROAM_FAIL_REASON_NO_SCAN_FOR_FINAL_BMISS, /* Roam scan is not started for Final Bmiss case */
  36841. WMI_ROAM_FAIL_REASON_DISCONNECT, /* Deauth or Disassoc received from AP during roaming handoff */
  36842. WMI_ROAM_FAIL_REASON_SYNC, /* when host wakes-up during roaming in-progress, abort current roaming if previous sync is pending */
  36843. WMI_ROAM_FAIL_REASON_SAE_INVALID_PMKID, /* WPA3-SAE invalid PMKID */
  36844. WMI_ROAM_FAIL_REASON_SAE_PREAUTH_TIMEOUT, /* WPA3-SAE pre-authentication timeout */
  36845. WMI_ROAM_FAIL_REASON_SAE_PREAUTH_FAIL, /* WPA3-SAE pre-authentication failed */
  36846. WMI_ROAM_FAIL_REASON_UNABLE_TO_START_ROAM_HO, /* Roam HO is not started due to FW internal issue */
  36847. /* Failure reasons to indicate no candidate and final bmiss event sent */
  36848. WMI_ROAM_FAIL_REASON_NO_AP_FOUND_AND_FINAL_BMISS_SENT, /* No roamable APs found during roam scan and final bmiss event sent */
  36849. WMI_ROAM_FAIL_REASON_NO_CAND_AP_FOUND_AND_FINAL_BMISS_SENT, /* No candidate APs found during roam scan and final bmiss event sent */
  36850. WMI_ROAM_FAIL_REASON_CURR_AP_STILL_OK, /* Roam scan not happen due to current network condition is fine */
  36851. WMI_ROAM_FAIL_REASON_SCAN_CANCEL, /* Roam scan canceled */
  36852. WMI_ROAM_FAIL_REASON_MLD_EXTRA_SCAN_REQUIRED, /* Roaming is not triggered for current roam scan as extra scan is required to scan all MLD links */
  36853. WMI_ROAM_FAIL_REASON_UNKNOWN = 255,
  36854. } WMI_ROAM_FAIL_REASON_ID;
  36855. typedef enum {
  36856. WMI_ROAM_ABORT_UNSPECIFIED = 0, /* Target did not specify detailed reason for roam scan being aborted */
  36857. WMI_ROAM_ABORT_LOWRSSI_DATA_RSSI_HIGH = 1, /* Roam scan is not started due to high data RSSI during low-RSSI roaming */
  36858. WMI_ROAM_ABORT_LOWRSSI_LINK_SPEED_GOOD, /* Roam scan is not started due to good link speed during low-RSSI roaming */
  36859. WMI_ROAM_ABORT_BG_DATA_RSSI_HIGH, /* Roam scan is not started due to high data RSSI during background roaming */
  36860. WMI_ROAM_ABORT_BG_RSSI_ABOVE_THRESHOLD, /* Roam scan is not started due to high beacon RSSI during background roaming */
  36861. WMI_ROAM_SCAN_CANCEL_IDLE_SCREEN_ON, /* Idle roam scan is canceled due to screen on */
  36862. WMI_ROAM_SCAN_CANCEL_OTHER_PRIORITY_ROAM_SCAN, /* Roam scan is canceled due to other high priority roam scan */
  36863. } WMI_ROAM_FAIL_SUB_REASON_ID;
  36864. typedef struct {
  36865. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_result_tlv_param */
  36866. /*
  36867. * timestamp is the absolute time w.r.t host timer which is synchronized
  36868. * between the host and target.
  36869. * This timestamp indicates the time when roaming is completed.
  36870. */
  36871. A_UINT32 timestamp; /* Timestamp in milli seconds */
  36872. A_UINT32 roam_status; /* 0 - Roaming is success, 1 - Roaming is failed */
  36873. A_UINT32 roam_fail_reason; /* from WMI_ROAM_FAIL_REASON_ID */
  36874. wmi_mac_addr bssid; /* bssid corresponds to roam_fail_reason */
  36875. A_UINT32 roam_abort_reason; /* Detail reason for roam scan not start, from WMI_ROAM_FAIL_SUB_REASON_ID */
  36876. } wmi_roam_result;
  36877. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_REQUEST_TOKEN_GET(detail) WMI_GET_BITS(detail, 0, 8)
  36878. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_REQUEST_TOKEN_SET(detail,val) WMI_SET_BITS(detail, 0, 8, val)
  36879. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_RESPONSE_TOKEN_GET(detail) WMI_GET_BITS(detail, 8, 8)
  36880. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_RESPONSE_TOKEN_SET(detail,val) WMI_SET_BITS(detail, 8, 8, val)
  36881. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_NUM_OF_NRIE_GET(detail) WMI_GET_BITS(detail, 16, 8)
  36882. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_NUM_OF_NRIE_SET(detail,val) WMI_SET_BITS(detail, 16, 8, val)
  36883. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_GET(detail) WMI_GET_BITS(detail, 24, 3)
  36884. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_SET(detail,val) WMI_SET_BITS(detail, 24, 3, val)
  36885. typedef struct {
  36886. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_neighbor_report_info_tlv_param */
  36887. /* request_type:
  36888. * 1 -> BTM query
  36889. * 2 -> 11K neighbor report request
  36890. */
  36891. A_UINT32 request_type;
  36892. /* neighbor_report_request_timestamp:
  36893. * timestamp is the absolute time w.r.t host timer which is synchronized
  36894. * between the host and target.
  36895. * This timestamp indicates the time when neighbor report request
  36896. * is received.
  36897. */
  36898. A_UINT32 neighbor_report_request_timestamp; /* in milli seconds */
  36899. /* neighbor_report_response_timestamp:
  36900. * This timestamp indicates the time when neighbor report response is sent.
  36901. */
  36902. A_UINT32 neighbor_report_response_timestamp; /* in milli seconds */
  36903. A_UINT32 neighbor_report_channel_count; /* Number of channels received in neighbor report response */
  36904. A_UINT32 btm_query_token; /* btm query dialog token */
  36905. /* btm_query_reason_code:
  36906. * Transition Query Reasons are enumerated in table 7-43x
  36907. * of the 802.11v spec.
  36908. */
  36909. A_UINT32 btm_query_reason_code;
  36910. /* neighbor_report_detail:
  36911. * [7:0] : neighbor report request token
  36912. * [15:8] : neighbor report response token
  36913. * [23:16] : the number of neighbor report elements in response frame
  36914. * [26:24] : band on which frame is sent; the value will be one of the
  36915. * wmi_mlo_band_info enum constants
  36916. * Refer to WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_GET,SET
  36917. * macros.
  36918. * [31:27] : reserved
  36919. * Refer to the above WMI_ROAM_NEIGHBOR_REPORT_INFO_*_GET,_SET macros for
  36920. * reading and writing these bitfields.
  36921. */
  36922. A_UINT32 neighbor_report_detail;
  36923. } wmi_roam_neighbor_report_info;
  36924. #define WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET(detail) WMI_GET_BITS(detail, 0, 3)
  36925. #define WMI_ROAM_BTM_RESP_MLO_BAND_INFO_SET(detail,val) WMI_SET_BITS(detail, 0, 3, val)
  36926. typedef struct {
  36927. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_btm_response_info_tlv_param */
  36928. /*enum STATUS_CODE_WNM_BTM defined in ieee80211_defs.h*/
  36929. A_UINT32 btm_status;
  36930. /* AP MAC address */
  36931. wmi_mac_addr target_bssid;
  36932. /* vsie_reason value:
  36933. * 0x00 Will move to Cellular
  36934. * 0x01 Unspecified
  36935. * 0x02 Not supported
  36936. * 0x03 No Cellular Network
  36937. * 0x04 Controlled by framework
  36938. * 0x05 Roam to better AP
  36939. * 0x06 Suspend mode
  36940. * 0x07 RSSI is strong enough
  36941. * 0x08-0xFF TBD
  36942. */
  36943. A_UINT32 vsie_reason;
  36944. /*
  36945. * timestamp is the absolute time w.r.t host timer which is synchronized
  36946. * between the host and target.
  36947. * This timestamp indicates the time when btm response is sent.
  36948. */
  36949. A_UINT32 timestamp; /* milli second units */
  36950. A_UINT32 btm_resp_dialog_token; /* dialog_token in btm response frame */
  36951. /* btm_resp_bss_termination_delay:
  36952. * bss_termination_delay in btm response frame is the number of minutes
  36953. * that the responding STA requests the BSS to delay termination.
  36954. */
  36955. A_UINT32 btm_resp_bss_termination_delay;
  36956. /* info:
  36957. * Bit[0:2] - band on which frame is sent, band value will be one of the
  36958. * wmi_mlo_band_info_t enum constants
  36959. * Refer to WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET,SET macros.
  36960. * Bit[3:31] - reserved.
  36961. */
  36962. A_UINT32 info;
  36963. } wmi_roam_btm_response_info;
  36964. typedef struct {
  36965. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_btm_request_candidate_info_tlv_param */
  36966. wmi_mac_addr btm_candidate_bssid; /* BTM candidate MAC address */
  36967. A_UINT32 preference; /* preference in Preference IE */
  36968. } wmi_roam_btm_request_candidate_info;
  36969. typedef struct {
  36970. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_neighbor_report_channel_info_tlv_param */
  36971. A_UINT32 channel; /* Channel frequency in MHz */
  36972. } wmi_roam_neighbor_report_channel_info;
  36973. #define WMI_GET_ASSOC_ID(frame_info_ext) WMI_GET_BITS(frame_info_ext, 0, 16)
  36974. #define WMI_SET_ASSOC_ID(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 0, 16, val)
  36975. #define WMI_GET_MLO_BITMAP_BAND_INFO(frame_info_ext) WMI_GET_BITS(frame_info_ext, 16, 5)
  36976. #define WMI_SET_MLO_BITMAP_BAND_INFO(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 16, 5, val)
  36977. #define WMI_GET_RX_INDICATE(frame_info_ext) WMI_GET_BITS(frame_info_ext, 21, 1)
  36978. #define WMI_SET_RX_INDICATE(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 21, 1, val)
  36979. #define WMI_GET_TX_FAILED_REASON(frame_info_ext) WMI_GET_BITS(frame_info_ext, 22, 4)
  36980. #define WMI_SET_TX_FAILED_REASON(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 22, 4, val)
  36981. #define WMI_GET_MAP_ID(frame_info_ext) WMI_GET_BITS(frame_info_ext, 26, 6)
  36982. #define WMI_SET_MAP_ID(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 26, 6, val)
  36983. typedef struct {
  36984. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_frame_info_tlv_param */
  36985. /* timestamp is the absolute time w.r.t host timer which is synchronized between the host and target */
  36986. A_UINT32 timestamp; /* Timestamp when frame is sent or received */
  36987. /*
  36988. * frame_info = frame_type | (frame_subtype << 2) | (request_or_response << 6) | (auth_algo_num << 7) | (seq_num << 16)
  36989. * frame_type(2 bits), frame_subtype(4 bits) are from 802.11 spec.
  36990. * If frame_type is WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT, frame_subtype
  36991. * should be one of value in WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE.
  36992. * request_or_response(1 bit) - Valid if frame_subtype is authentication.
  36993. * 0 - Authentication request 1 - Authentication response
  36994. * auth_algo_num(5bits) : Lower 5 bits of 9.4.1.1 Authentication Algorithm
  36995. * Number field
  36996. * The auth_algo_num bits shall be ignored unless
  36997. * WMI_SERVICE_ROAM_STAT_PER_CANDIDATE_FRAME_INFO_SUPPORT is set and
  36998. * frame_subtype is auth frame.
  36999. * seq_num(16 bits) - frame sequence number
  37000. */
  37001. A_UINT32 frame_info;
  37002. /* status_code:
  37003. * For Rx frames : Status code from 802.11 spec, section 9.4.1.9
  37004. * For Rx frames (deauth / disassoc) : Reason code from 802.11 spec,
  37005. * section 9.4.1.7
  37006. * For Tx frames : Status_code should be one of value in
  37007. * WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS
  37008. */
  37009. A_UINT32 status_code;
  37010. /*
  37011. * rssi_dbm_abs
  37012. * Last known RSSI of the current BSSID at the moment when the frame
  37013. * was sent and received.
  37014. * This RSSI value is valid for deauth / disassoc frame only.
  37015. * The rssi_dbm_abs value is the absolute value of the RSSI in dBm units.
  37016. * For example, if the RSSI is -40 dBm, rssi_dbm_abs will be 40.
  37017. */
  37018. A_UINT32 rssi_dbm_abs;
  37019. /* retry_count
  37020. * To show how many times the same frame (but with different
  37021. * sequence number) is retransmitted, in protocol level.
  37022. */
  37023. A_UINT32 retry_count;
  37024. wmi_mac_addr bssid; /* AP MAC address */
  37025. /*
  37026. * frame_info_ext captures below fields:
  37027. * Bit 0-15 : (re)assoc id of (re)association response frame,
  37028. * section 9.4.1.8 AID field.
  37029. * Bit 16-20 : MLO bitmap band info,
  37030. * bit0: 2GHz, bit1: 5GHz, bit2: 6GHz, bits 3-4: reserved
  37031. * Refer to WMI_[GET,SET]_MLO_BITMAP_BAND_INFO macros.
  37032. * Bit 21 : indicate whether this frame is rx :0-not rx; 1-rx
  37033. * Refer to WMI_[GET,SET]_RX_INDICATE macros.
  37034. * Bit 22-25 : opaque tx failure reason
  37035. * Refer to WMI_[GET,SET]_TX_FAILED_REASON macros.
  37036. * Bit 26-31 : Indicate the map id, used to identify the all the
  37037. * ML link info corresponding to current roaming candidate.
  37038. */
  37039. A_UINT32 frame_info_ext;
  37040. } wmi_roam_frame_info;
  37041. typedef enum {
  37042. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT = 3,
  37043. } WMI_ROAM_FRAME_INFO_FRAME_TYPE;
  37044. typedef enum {
  37045. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M1 = 1,
  37046. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M2,
  37047. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M3,
  37048. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M4,
  37049. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_GTK_M1,
  37050. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_GTK_M2,
  37051. } WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE;
  37052. typedef enum {
  37053. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_ACK = 0,
  37054. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_NO_ACK,
  37055. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_TX_FAIL,
  37056. } WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS;
  37057. typedef struct {
  37058. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_initial_info_tlv_param */
  37059. /* count of full scan */
  37060. A_UINT32 roam_full_scan_count;
  37061. A_INT32 rssi_th; /* unit: dBm */
  37062. A_UINT32 cu_th; /* channel utilization threshold: uses units of percent */
  37063. /* timer_canceled:
  37064. * bit0: timer1 canceled
  37065. * bit1: timer2 canceled
  37066. * bit2: inactive timer canceled
  37067. */
  37068. A_UINT32 timer_canceled;
  37069. } wmi_roam_initial_info;
  37070. typedef enum {
  37071. WMI_ROAM_MSG_RSSI_RECOVERED = 1, /* Connected AP RSSI is recovered to good region */
  37072. WMI_ROAM_MSG_CONNECTED_IN_POOR_RSSI = 2, /* DUT connected to AP whose RSSI is below low RSSI threshold */
  37073. } WMI_ROAM_MSG_ID;
  37074. typedef struct {
  37075. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_msg_info_tlv_param */
  37076. /*
  37077. * timestamp is the absolute time (in milliseconds) w.r.t host timer
  37078. * which is synchronized between the host and target
  37079. */
  37080. A_UINT32 timestamp;
  37081. A_UINT32 msg_id; /* Message ID from WMI_ROAM_MSG_ID */
  37082. /* msg_param values are interpreted differently for different msg_id values.
  37083. * if msg_id == WMI_ROAM_MSG_RSSI_RECOVERED:
  37084. * msg_param1 contains current AP RSSI in dBm
  37085. * (unsigned -> signed conversion is required)
  37086. * msg_param2 contains next trigger RSSI threshold in dBm
  37087. * (unsigned -> signed conversion is required)
  37088. */
  37089. A_UINT32 msg_param1;
  37090. A_UINT32 msg_param2;
  37091. } wmi_roam_msg_info;
  37092. typedef struct {
  37093. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_stats_event_fixed_param */
  37094. A_UINT32 vdev_id;
  37095. A_UINT32 roam_scan_trigger_count; /* Number of roam scans triggered */
  37096. } wmi_roam_stats_event_fixed_param;
  37097. typedef struct {
  37098. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_reason_cmm_tlv_param */
  37099. /*
  37100. * timestamp is the absolute time w.r.t host timer which is synchronized
  37101. * between the host and target.
  37102. * This timestamp indicates the time when roam trigger happened.
  37103. */
  37104. A_UINT32 timestamp; /* Timestamp in milli seconds */
  37105. /* trigger_reason:
  37106. * Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID
  37107. */
  37108. A_UINT32 trigger_reason;
  37109. /* trigger_sub_reason:
  37110. * Reason for each roam scan from WMI_ROAM_TRIGGER_SUB_REASON_ID,
  37111. * if multiple scans are triggered for a single roam trigger.
  37112. */
  37113. A_UINT32 trigger_sub_reason;
  37114. A_UINT32 current_rssi; /* Connected AP RSSI in dBm */
  37115. } wmi_roam_trigger_reason_cmm;
  37116. typedef struct {
  37117. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_rssi_tlv_param */
  37118. /* roam_rssi_threshold:
  37119. * RSSI threshold value in dBm for low RSSI roam trigger.
  37120. */
  37121. A_UINT32 roam_rssi_threshold;
  37122. /* data RSSI in dBm */
  37123. A_UINT32 data_rssi;
  37124. /* data RSSI threshold in dBm */
  37125. A_UINT32 data_rssi_threshold;
  37126. /* rx linkspeed status, 0:good linkspeed, 1:bad */
  37127. A_UINT32 rx_linkspeed_status;
  37128. } wmi_roam_trigger_rssi;
  37129. typedef struct {
  37130. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_bss_load_tlv_param */
  37131. A_UINT32 cu_load; /* Connected AP CU load percentage (0-100) */
  37132. } wmi_roam_trigger_bss_load;
  37133. typedef struct {
  37134. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_deauth_tlv_param */
  37135. /* deauth_type:
  37136. * 1 -> De-authentication
  37137. * 2 -> Disassociation
  37138. */
  37139. A_UINT32 deauth_type;
  37140. /* deauth_reason:
  37141. * De-authentication or disassociation reason.
  37142. * De-authentication / disassociation Values are enumerated in the
  37143. * 802.11 spec.
  37144. */
  37145. A_UINT32 deauth_reason;
  37146. } wmi_roam_trigger_deauth;
  37147. typedef struct {
  37148. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_btm_tlv_param */
  37149. /* btm_request_mode:
  37150. * Mode Values are enumerated in the 802.11 spec.
  37151. */
  37152. A_UINT32 btm_request_mode;
  37153. A_UINT32 disassoc_imminent_timer; /* in Milli seconds */
  37154. /* validity_internal:
  37155. * Preferred candidate list validity interval in Milli seconds.
  37156. */
  37157. A_UINT32 validity_internal;
  37158. /* candidate_list_count:
  37159. * Number of preferred candidates from BTM request.
  37160. */
  37161. A_UINT32 candidate_list_count;
  37162. /* btm_response_status_code:
  37163. * Response status Values are enumerated in the 802.11 spec.
  37164. */
  37165. A_UINT32 btm_response_status_code;
  37166. /* BTM BSS termination timeout value in milli seconds */
  37167. A_UINT32 btm_bss_termination_timeout;
  37168. /* BTM MBO assoc retry timeout value in milli seconds */
  37169. A_UINT32 btm_mbo_assoc_retry_timeout;
  37170. /* btm_req_dialog_token: dialog token number in BTM request frame */
  37171. A_UINT32 btm_req_dialog_token;
  37172. } wmi_roam_trigger_btm;
  37173. typedef struct {
  37174. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_bmiss_tlv_param */
  37175. /* B[0-6]: final bmiss cnt.
  37176. * B[7-23]: consecutive bmiss cnt
  37177. * B[24]: isQosNullSuccess: 0: success, 1:fail
  37178. */
  37179. A_UINT32 bmiss_status;
  37180. } wmi_roam_trigger_bmiss;
  37181. typedef struct {
  37182. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_dense_tlv_param */
  37183. /* RX Throughput in bytes per second in dense env */
  37184. A_UINT32 rx_tput;
  37185. /* TX Throughput in bytes per second in dense env */
  37186. A_UINT32 tx_tput;
  37187. /* dense_status: b[0-7]: roamable AP count info in dense env */
  37188. A_UINT32 dense_status;
  37189. } wmi_roam_trigger_dense;
  37190. typedef struct {
  37191. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_force_tlv_param */
  37192. A_UINT32 invoke_reason; /* from wlan_roam_invoke_reason */
  37193. } wmi_roam_trigger_force;
  37194. typedef struct {
  37195. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_kickout_tlv_param */
  37196. /* consecutive tx failure threshold */
  37197. A_UINT32 kickout_th;
  37198. A_UINT32 kickout_reason; /* from PEER_KICKOUT_REASON */
  37199. } wmi_roam_trigger_kickout;
  37200. typedef struct {
  37201. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_per_tlv_param */
  37202. /* For PER roam,
  37203. * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
  37204. * N * tx/rx_rate_thresh_percnt / 100, roaming will be triggered.
  37205. * b[0-7]: tx_rate_thresh_percnt
  37206. * b[16-23]:rx_rate_thresh_percnt
  37207. */
  37208. A_UINT32 rate_thresh_percnt;
  37209. } wmi_roam_trigger_per;
  37210. typedef struct {
  37211. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_periodic_tlv_param */
  37212. /* roam scan periodic : units = milliseconds*/
  37213. A_UINT32 periodic_timer_ms;
  37214. } wmi_roam_trigger_periodic;
  37215. typedef struct {
  37216. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_hi_rssi_tlv_param */
  37217. /* roam High RSSI threshold */
  37218. A_UINT32 hi_rssi_threshold;
  37219. } wmi_roam_trigger_hi_rssi;
  37220. #define WMI_MLO_LINK_INFO_GET_MAP_ID(link_info) WMI_GET_BITS(link_info, 0, 6)
  37221. #define WMI_MLO_LINK_INFO_SET_MAP_ID(link_info, val) WMI_SET_BITS(link_info, 0, 6, val)
  37222. #define WMI_MLO_LINK_INFO_GET_STATUS(link_info) WMI_GET_BITS(link_info, 6, 1)
  37223. #define WMI_MLO_LINK_INFO_SET_STATUS(link_info, val) WMI_SET_BITS(link_info, 6, 1, val)
  37224. #define WMI_MLO_LINK_INFO_GET_BAND(link_info) WMI_GET_BITS(link_info, 7, 3)
  37225. #define WMI_MLO_LINK_INFO_SET_BAND(link_info, val) WMI_SET_BITS(link_info, 7, 3, val)
  37226. #define WMI_MLO_LINK_INFO_GET_IEEE_LINK_ID(link_info) WMI_GET_BITS(link_info, 10, 4)
  37227. #define WMI_MLO_LINK_INFO_SET_IEEE_LINK_ID(link_info, val) WMI_SET_BITS(link_info, 10, 4, val)
  37228. typedef struct {
  37229. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_info_tlv_param */
  37230. wmi_mac_addr link_addr;
  37231. A_UINT32 link_info;
  37232. /*
  37233. * b[0-5] : Map Id - maps the corresponding candidate AP for which
  37234. * re-assoc resp received.
  37235. * b[6] : Status - link status, AP accepted/rejected this link
  37236. * 0 - accepted
  37237. * 1 - rejected
  37238. * b[7-9] : Band - link band info (band value is from wmi_mlo_band_info)
  37239. * b[10-13] : IEEE link id - Link id associated with AP
  37240. */
  37241. } wmi_mlo_link_info;
  37242. typedef struct {
  37243. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_get_scan_channel_list_cmd_fixed_param */
  37244. A_UINT32 vdev_id;
  37245. } wmi_roam_get_scan_channel_list_cmd_fixed_param;
  37246. typedef struct {
  37247. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_channel_list_event_fixed_param */
  37248. A_UINT32 vdev_id;
  37249. wmi_ssid ssid; /* SSID of connected AP */
  37250. /*
  37251. * This event can be sent as a response to
  37252. * WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID or
  37253. * can be sent asynchronously during disconnection.
  37254. * command_response = 1, when it is sent as a response to
  37255. * WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID
  37256. * = 0, for other cases
  37257. */
  37258. A_UINT32 command_response;
  37259. /*
  37260. * This fixed_param TLV is followed by the below TLVs:
  37261. *
  37262. * List of roam scan channel frequencies in MHz
  37263. * A_UINT32 channel_list[];
  37264. */
  37265. } wmi_roam_scan_channel_list_event_fixed_param;
  37266. typedef enum {
  37267. WMI_ROAM_CND_RSSI_SCORING = 0x00000001, /* FW considers RSSI scoring */
  37268. WMI_ROAM_CND_HT_SCORING = 0x00000002, /* FW considers HT scoring */
  37269. WMI_ROAM_CND_VHT_SCORING = 0x00000004, /* FW considers VHT scoring */
  37270. WMI_ROAM_CND_HE_SCORING = 0x00000008, /* FW considers 11ax scoring */
  37271. WMI_ROAM_CND_BW_SCORING = 0x00000010, /* FW considers Bandwidth scoring */
  37272. WMI_ROAM_CND_BAND_SCORING = 0x00000020, /* FW considers Band(2G/5G) scoring */
  37273. WMI_ROAM_CND_NSS_SCORING = 0x00000040, /* FW considers NSS(1x1 / 2x2) scoring */
  37274. WMI_ROAM_CND_CHAN_CONGESTION_SCORING = 0x00000080, /* FW considers ESP/QBSS scoring */
  37275. WMI_ROAM_CND_BEAMFORMING_SCORING = 0x00000100, /* FW considers Beamforming scoring */
  37276. WMI_ROAM_CND_PCL_SCORING = 0x00000200, /* FW considers PCL scoring */
  37277. WMI_ROAM_CND_OCE_WAN_SCORING = 0x00000400, /* FW considers OCE WAN metrics scoring */
  37278. WMI_ROAM_CND_OCE_AP_TX_PWR_SCORING = 0x00000800, /* FW considers OCE AP Tx power scoring */
  37279. WMI_ROAM_CND_OCE_AP_SUBNET_ID_SCORING = 0x00001000, /* FW considers OCE AP subnet id scoring */
  37280. WMI_ROAM_CND_SAE_PK_AP_SCORING = 0x00002000, /* FW considers SAE-PK enabled AP scoring */
  37281. WMI_ROAM_CND_SECURITY_SCORING = 0x00004000, /* FW considers security scoring */
  37282. } WMI_ROAM_CND_SCORING_PARAMS;
  37283. typedef struct {
  37284. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_capability_report_event_fixed_param */
  37285. /*
  37286. * This event is sent asynchronously during FW init.
  37287. * It indicates FW roam related capabilities to host.
  37288. *
  37289. * scoring_capability_bitmap = Indicates firmware candidate scoring
  37290. * capabilities. It's a bitmap of values
  37291. * from enum WMI_ROAM_CND_SCORING_PARAMS.
  37292. */
  37293. A_UINT32 scoring_capability_bitmap;
  37294. } wmi_roam_capability_report_event_fixed_param;
  37295. /*
  37296. * Definition of disallow connection modes.
  37297. */
  37298. typedef enum {
  37299. /* Bit 0: roam to 5GL+5GH MLSR is not allowed if the bit is set. */
  37300. WMI_ROAM_MLO_CONNECTION_MODE_5GL_5GH_MLSR = 0x1,
  37301. } WMI_ROAM_MLO_CONNECTION_MODES;
  37302. typedef struct {
  37303. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_mlo_config_cmd_fixed_param */
  37304. wmi_mac_addr partner_link_addr; /* Assigned link address which can be used as self link addr when vdev is not created */
  37305. A_UINT32 vdev_id;
  37306. /*
  37307. * Configure max number of link mlo connection supports.
  37308. * Invalid value or 0 will use max supported value by fw.
  37309. */
  37310. A_UINT32 support_link_num;
  37311. /*
  37312. * Bit 0: 2G band support if 1
  37313. * Bit 1: 5G band support if 1
  37314. * Bit 2: 6G band support if 1
  37315. */
  37316. A_UINT32 support_link_band; /* Configure the band bitmap of mlo connection supports. */
  37317. A_UINT32 max_active_links; /* Max active links supported for STA */
  37318. /*
  37319. * Disallow the specified connection mode(s) when roaming to MLD AP.
  37320. * Refer to the WMI_ROAM_MLO_CONNECTION_MODES enum for the connection mode
  37321. * each bit represents.
  37322. */
  37323. A_UINT32 disallow_connect_modes;
  37324. /*
  37325. * If max_link_combo_count is non-zero, STA should try to roam to next
  37326. * candidate once max allowed link combinations is reached with current
  37327. * candidate AP.
  37328. */
  37329. A_UINT32 max_link_combo_count;
  37330. } wmi_roam_mlo_config_cmd_fixed_param;
  37331. typedef struct {
  37332. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  37333. /** unique id identifying the VDEV, generated by the caller */
  37334. A_UINT32 vdev_id;
  37335. /** parameter id - see WMI_ROAM_PARAM */
  37336. A_UINT32 param_id;
  37337. /** parameter value */
  37338. A_UINT32 param_value;
  37339. } wmi_roam_set_param_cmd_fixed_param;
  37340. typedef struct {
  37341. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_enable_vendor_cmd_fixed_param */
  37342. /** unique id identifying the VDEV, generated by the caller */
  37343. A_UINT32 vdev_id;
  37344. /** abstract mechanism for differentiating vendors */
  37345. A_UINT32 vendor_id;
  37346. /** 1 - Enable, 0 - Disable */
  37347. A_UINT32 enable;
  37348. } wmi_roam_enable_vendor_control_cmd_fixed_param;
  37349. typedef enum {
  37350. ROAM_VENDOR_CONTROL_PARAM_TRIGGER = 1,
  37351. ROAM_VENDOR_CONTROL_PARAM_DELTA,
  37352. ROAM_VENDOR_CONTROL_PARAM_FULL_SCANPERIOD,
  37353. ROAM_VENDOR_CONTROL_PARAM_PARTIAL_SCANPERIOD,
  37354. ROAM_VENDOR_CONTROL_PARAM_ACTIVE_CH_DWELLTIME,
  37355. ROAM_VENDOR_CONTROL_PARAM_PASSIVE_CH_DWELLTIME,
  37356. ROAM_VENDOR_CONTROL_PARAM_HOME_CH_TIME,
  37357. ROAM_VENDOR_CONTROL_PARAM_AWAY_TIME,
  37358. /* Sending query for all roam_vendor_control_param */
  37359. ROAM_VENDOR_CONTROL_PARAM_ALL = 0xFFFFFFFF,
  37360. } WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID;
  37361. typedef struct {
  37362. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_vendor_param_cmd_fixed_param */
  37363. /** unique id identifying the VDEV, generated by the caller */
  37364. A_UINT32 vdev_id;
  37365. /** Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID */
  37366. A_UINT32 param_id;
  37367. } wmi_roam_get_vendor_control_param_cmd_fixed_param;
  37368. /* WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID - No need to make this event as wakeable event
  37369. * Host ensures to take wakelock after sending WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID command */
  37370. typedef struct {
  37371. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_get_vendor_control_param_event_fixed_param */
  37372. /** unique id identifying the VDEV, generated by the caller */
  37373. A_UINT32 vdev_id;
  37374. /**
  37375. * Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID
  37376. * If param_id is ROAM_VENDOR_CONTROL_PARAM_ALL, send all vendor control
  37377. * param value defined in enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID
  37378. * using wmi_vendor_control_param tlv
  37379. */
  37380. A_UINT32 param_id;
  37381. /** Vendor control param value */
  37382. A_UINT32 param_value;
  37383. } wmi_roam_get_vendor_control_param_event_fixed_param;
  37384. typedef struct {
  37385. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_control_param */
  37386. /** Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID */
  37387. A_UINT32 param_id;
  37388. /** Vendor control param value */
  37389. A_UINT32 param_value;
  37390. } wmi_vendor_control_param;
  37391. /** the definition of different ROAM parameters */
  37392. typedef enum {
  37393. /*
  37394. * roam param to configure below roam events
  37395. * Bit : 0 disabled - do not send WMI_ROAM_NOTIF_SCAN_END in WMI_ROAM_EVENTID
  37396. * Bit : 0 enabled - send WMI_ROAM_NOTIF_SCAN_END in WMI_ROAM_EVENTID
  37397. * Bit : 1 disabled - do not send 1) WMI_ROAM_STATS_EVENTID 2) WMI_ROAM_NOTIF_SCAN_START and WMI_ROAM_NOTIF_SCAN_END notifs in WMI_ROAM_EVENTID in suspend mode
  37398. * Bit : 1 enabled - send 1) WMI_ROAM_STATS_EVENTID 2) WMI_ROAM_NOTIF_SCAN_START and WMI_ROAM_NOTIF_SCAN_END notifs in WMI_ROAM_EVENTID in suspend mode
  37399. * Bit : 2-31 - reserved
  37400. */
  37401. WMI_ROAM_PARAM_ROAM_EVENTS_CONFIG = 1,
  37402. /*
  37403. * Bit : 0 if unset, POOR_LINKSPEED
  37404. * Bit : 0 if set, GOOD_LINKSPEED
  37405. */
  37406. WMI_ROAM_PARAM_LINKSPEED_STATE = 2,
  37407. /*
  37408. * roam param to configure roam scan params for DFS jitter reduction
  37409. * Bit : 0 enabled - DFS channel jitter reduction is enabled.
  37410. * Bit : 0 disabled - DFS channel jitter reduction is disabled.
  37411. *
  37412. * Bit : 1-7 - To indicate the passive-to-active conversion timeout
  37413. * with range 40 to 70 in ms, default value is 50ms.
  37414. * If an invalid (out of range) value is provided, the
  37415. * default value will be used.
  37416. * Bit : 8-13 - To indicate the DFS RSSI threshold for current AP
  37417. * with range 0 to 58, default value is 0 dB
  37418. * (DFS RSSI threshold = -70 dBm + 0 dB = -70 dBm).
  37419. * The specified value (in dB) is added to the -70 dBm
  37420. * baseline value to get the RSSI threshold in dBm.
  37421. * If an invalid (out of range) value is provided, the
  37422. * default value will be used.
  37423. * Bit : 14-19 - To indicate the DFS RSSI threshold for candidate AP
  37424. * with range 0 to 58, default value is 0 dB
  37425. * (DFS RSSI threshold = -70 - 0 = -70 dBm).
  37426. * The specified value (in dB) is added to the -70 dBm
  37427. * baseline value to get the RSSI threshold in dBm.
  37428. * If an invalid (out of range) value is provided, the
  37429. * default value will be used.
  37430. * Bit : 20 disabled - To indicate DFS roam scan policy is AGILE
  37431. * Bit : 20 enabled - To indicate DFS roam scan policy is Legacy
  37432. *
  37433. * Bit : 21-31 are reserved
  37434. */
  37435. WMI_ROAM_PARAM_ROAM_SCAN_DFS_CONFIG_BITMAP = 3,
  37436. /*
  37437. * roam param to configure HO_DELAY_RX value at runtime
  37438. * The configured value of ho_delay_rx will be in milliseconds
  37439. * Maximum value which user can configure using this Param ID is 1000 msec.
  37440. *
  37441. * If any value beyond this Maximum value is provided by user, FW will
  37442. * configure the ho_delay_rx value to Maximum allowed value i.e. 1000 msec.
  37443. */
  37444. WMI_ROAM_PARAM_ROAM_HO_DELAY_RUNTIME_CONFIG = 4,
  37445. /*
  37446. * Roam param to enable/disable full scan channel optimization
  37447. * As per current implementation of roam scan, if there are no APs found
  37448. * during partial scan, immediately a full scan will be initiated as a
  37449. * fallback. This includes all channels that were already scanned as part
  37450. * of partial scan.
  37451. * This flag controls the optimization, to exclude all channels, which are
  37452. * already scanned as part of partial scan.
  37453. */
  37454. WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_CHANNEL_OPTIMIZATION = 5,
  37455. /*
  37456. * Roam param to enable/disable scanning of 6 GHz PSC channels
  37457. * As per current implementation, Wi-Fi STA scans on all 6 GHz PSC channels
  37458. * as part of full scan during a roam scan irrespective of whether APs are
  37459. * present in 6 GHz or not.
  37460. * This flag controls the optimization to do the scan in 6 GHz PSC channels
  37461. * only if channel map or newly received RNR indicates 6 GHz APs during
  37462. * current 2.4 GHz or 5 GHz scanning of Roam Full scan.
  37463. */
  37464. WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_6GHZ_PSC_ONLY_WITH_RNR = 6,
  37465. /*
  37466. * Flag to tell whether MCC is disallowed or not in sta + sta currrent case.
  37467. * If flag is unset, then no limitation for channels which sta can roam to.
  37468. * If flag is set, then the channels which one of STA roam to cause MCC with other STA, it will be disallowed.
  37469. */
  37470. WMI_ROAM_PARAM_ROAM_MCC_DISALLOW = 7,
  37471. /*
  37472. * Roam param to provide additional RSSI Boost for 6 GHz Candidate AP
  37473. * during Roam Scan in case any 6 GHz candidate has better Roam score
  37474. * but fails RSSI Delta Check.
  37475. * This configurable RSSI Boost value for 6GHz Candidate AP will be
  37476. * configured via ini RoamRssiDiff6GHz
  37477. * This configured RSSI boost value will only be applicable for 6GHz
  37478. * Candidate AP when the STA is connected to 2.4/5 GHz Band AP and will
  37479. * not impact if STA is connected to 6GHz Band AP
  37480. */
  37481. WMI_ROAM_PARAM_ROAM_RSSI_BOOST_FOR_6GHZ_CAND_AP = 8,
  37482. /*
  37483. * Roam param to indicate unsupported Power Type for 6 GHz Candidate AP
  37484. * found during Roam Scan. If AP operates on the power type disabled by
  37485. * the host, then that candidate should not be selected.
  37486. * This unsupported Power Type will be configured based
  37487. * on disabled 6GHz Power Types in Regdomain
  37488. *
  37489. * If below bits in the obtianed Bitmap is set then any AP
  37490. * broadcasting these Power Types should not be selected
  37491. * BIT 0 - Indoor Access Point
  37492. * BIT 1 - Standard Power (SP) Access Point
  37493. * BIT 2 - Very Low Power (VLP) Access Point
  37494. * BIT 3-7 - Reserved
  37495. */
  37496. WMI_ROAM_PARAM_ROAM_UNSUPPORTED_6GHZ_POWERTYPE = 9,
  37497. /*
  37498. * crypto params to allow EHT/MLO in WPA2/WPA3 security.
  37499. * BITMAP of wlan_crypto_roam_eht_config
  37500. */
  37501. WMI_ROAM_PARAM_CRYPTO_EHT_CONFIG = 10,
  37502. /*
  37503. * Roam Param for enabling/disabling Roam Latency Optimization via below
  37504. * BITMAP of wlan_roam_latency_optimization_t
  37505. */
  37506. WMI_ROAM_PARAM_ROAM_LATENCY_OPTIMIZATION_BITMAP = 11,
  37507. /*=== END ROAM_PARAM_PROTOTYPE SECTION ===*/
  37508. } WMI_ROAM_PARAM;
  37509. typedef enum {
  37510. /*
  37511. * BIT 0 - WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT:
  37512. * Connect to non-MLO/MLO WPA2 EHT APs in EHT without PMF support.
  37513. *
  37514. * BIT 1 - WLAN_CRYPTO_WPA2_ALLOW_MLO:
  37515. * Connect to MLO WPA2 EHT APs in MLO without PMF support.
  37516. *
  37517. * BIT 2 - WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT_MFPC_SET:
  37518. * Connect to non-MLO/MLO WPA2 EHT APs in EHT.
  37519. * (PMF capable is mandatory).
  37520. *
  37521. * BIT 3 - WLAN_CRYPTO_WPA2_ALLOW_MLO_MFPC_SET:
  37522. * Connect to MLO WPA2 EHT APs in MLO
  37523. * (PMF capable is mandatory).
  37524. *
  37525. * BIT 4 - 15 - reserved for future WPA2 security configs
  37526. *
  37527. * BIT 16 - WLAN_CRYPTO_WPA3_SAE_ALLOW_NON_MLO_EHT_HNP:
  37528. * Connect to non-MLO/MLO WPA3-SAE without support for H2E
  37529. * (or no RSNXE IE in beacon) in non-MLO EHT.
  37530. *
  37531. * BIT 17 - WLAN_CRYPTO_WPA3_SAE_ALLOW_MLO_HNP:
  37532. * Connect to MLO WPA3-SAE without support for H2E
  37533. * (or no RSNXE IE in beacon).
  37534. */
  37535. WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT = 0x00000001,
  37536. WLAN_CRYPTO_WPA2_ALLOW_MLO = 0x00000002,
  37537. WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT_MFPC_SET = 0x00000004,
  37538. WLAN_CRYPTO_WPA2_ALLOW_MLO_MFPC_SET = 0x00000008,
  37539. WLAN_CRYPTO_WPA3_SAE_ALLOW_NON_MLO_EHT_HNP = 0x00010000,
  37540. WLAN_CRYPTO_WPA3_SAE_ALLOW_MLO_HNP = 0x00020000,
  37541. } wlan_crypto_roam_eht_config;
  37542. typedef struct {
  37543. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_big_data_cmd_fixed_param */
  37544. A_UINT32 vdev_id;
  37545. } wmi_vdev_get_big_data_cmd_fixed_param;
  37546. typedef struct {
  37547. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_send_big_data_event_fixed_param */
  37548. A_UINT32 vdev_id;
  37549. /** param list **/
  37550. /* Target power (dBm units) - 2.4G/5G */
  37551. A_UINT32 target_power_2g_dsss;
  37552. A_UINT32 target_power_2g_ofdm;
  37553. A_UINT32 target_power_2g_mcs0;
  37554. A_UINT32 target_power_5g_ofdm;
  37555. A_UINT32 target_power_5g_mcs0;
  37556. /* ANI level from hal-phy */
  37557. A_UINT32 ani_level;
  37558. /* Number of probe requests sent while roaming after BMISS */
  37559. A_UINT32 tx_probe_req;
  37560. /* Number of probe responses received while roaming after BMISS */
  37561. A_UINT32 rx_probe_response;
  37562. /*
  37563. * Number of retries (both by HW and FW) for tx data MPDUs sent by this vdev
  37564. */
  37565. A_UINT32 num_data_retries;
  37566. /* Number of tx data MPDUs dropped from this vdev due to tx retry limit */
  37567. A_UINT32 num_tx_data_fail;
  37568. /* Number of aggregated unicast tx expecting response ppdu */
  37569. A_UINT32 data_tx_ppdu_count;
  37570. /* Number of aggregated unicast tx expecting response mpdu */
  37571. A_UINT32 data_tx_mpdu_count;
  37572. /* number of rx frames with good PCLP */
  37573. A_UINT32 rx_frame_good_pclp_count;
  37574. /* Number of occasions that no valid delimiter is detected by ampdu parser */
  37575. A_UINT32 invalid_delimiter_count;
  37576. /* Number of frames for which the CRC check failed in the MAC */
  37577. A_UINT32 rx_crc_check_fail_count;
  37578. /* tx fifo overflows count for transmissions by this vdev */
  37579. A_UINT32 txpcu_fifo_overflows_count;
  37580. /* Number of ucast ACKS received good FCS (doesn't include block acks) */
  37581. A_UINT32 successful_acks_count;
  37582. /*
  37583. * RX BlockACK Counts
  37584. * Note that this counts the number of block acks received by this vdev,
  37585. * not the number of MPDUs acked by block acks.
  37586. */
  37587. A_UINT32 rx_block_ack_count;
  37588. /* Beacons received from member of BSS */
  37589. A_UINT32 member_bss_beacon_count;
  37590. /* Beacons received from other BSS */
  37591. A_UINT32 non_bss_beacon_count;
  37592. /* Number of RX Data multicast frames dropped by the HW */
  37593. A_UINT32 rx_data_mc_frame_filtered_count;
  37594. } wmi_vdev_send_big_data_event_fixed_param;
  37595. typedef struct {
  37596. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_big_data_p2_cmd_fixed_param */
  37597. A_UINT32 vdev_id;
  37598. } wmi_vdev_get_big_data_p2_cmd_fixed_param;
  37599. typedef struct {
  37600. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_send_big_data_p2_event_fixed_param */
  37601. A_UINT32 vdev_id;
  37602. /** param list **/
  37603. /* total number of TSF out of sync */
  37604. A_UINT32 tsf_out_of_sync;
  37605. /**
  37606. * ANI (noise interference) level corresponding to the channel.
  37607. * The range of values is different for chips of different target
  37608. * architectures. Helium values range from 0 to 9, while Lithium
  37609. * and Beryllium values range from -5 to 15.
  37610. * In all cases, higher values indicate more noise interference.
  37611. */
  37612. A_INT32 ani_level;
  37613. /*
  37614. * This fixed_param TLV is followed by the below TLVs:
  37615. * List of datapath big data stats. This stat is not interpreted by
  37616. * host. This gets directly updated on big data server and later FW
  37617. * team will analyze this data.
  37618. *
  37619. * A_UINT32 bd_datapath_stats[]; // DEPRECATED
  37620. * wmi_big_data_dp_stats_tlv_param big_data_dp_stats[];
  37621. */
  37622. } wmi_vdev_send_big_data_p2_event_fixed_param;
  37623. typedef struct {
  37624. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bd_datapath_stats_tlv_param */
  37625. A_UINT32 tlv_header;
  37626. /* Tx power before disconnection.
  37627. * The units of the following tx power fields are 0.5 dBm for Helium
  37628. * architecture target (e.g. a value of 1 means tx power = 0.5 dBm),
  37629. * and are 0.25 dBm for subsequent target architectures.
  37630. */
  37631. A_UINT32 last_data_tx_pwr;
  37632. A_UINT32 target_power_dsss;
  37633. A_UINT32 target_power_ofdm;
  37634. /* Rate index of last data frame before disconnection */
  37635. A_UINT32 last_tx_data_rix;
  37636. /* Tx rate (in kbps) of last data frame before disconnection */
  37637. A_UINT32 last_tx_data_rate_kbps;
  37638. } wmi_big_data_dp_stats_tlv_param;
  37639. typedef enum {
  37640. WMI_6GHZ_REG_PWRMODE_LPI = 0, /* LPI mode for AP and client products */
  37641. WMI_6GHZ_REG_PWRMODE_SP = 1, /* SP mode for AP and client products */
  37642. WMI_6GHZ_REG_PWRMODE_VLP = 2, /* VLP mode for AP and client products */
  37643. WMI_6GHZ_REG_PWRMODE_SP_STA = 3, /* SP client mode for AP products */
  37644. WMI_6GHZ_REG_PWRMODE_MAX = 5
  37645. } WMI_6GHZ_REG_PWRMODE_TYPE;
  37646. typedef struct {
  37647. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_tpc_power_fixed_param */
  37648. A_UINT32 vdev_id;
  37649. A_UINT32 psd_power; /* Value: 0 or 1, is PSD power or not */
  37650. A_UINT32 eirp_power; /* Maximum EIRP power (dDm units), valid only if power is PSD */
  37651. A_UINT32 power_type_6ghz; /* Type: WMI_6GHZ_REG_TYPE, used for halphy CTL lookup */
  37652. /*
  37653. * This fixed_param TLV is followed by the below TLVs:
  37654. *
  37655. * Based on power_type_6ghz sent in fixed param, the array TLVs
  37656. * will be interpreted as described below:
  37657. *
  37658. * For power_type_6ghz - LPI and VLP power mode:
  37659. * num_pwr_levels of wmi_vdev_ch_power_info
  37660. * This array TLV will be filled based on psd_power field in
  37661. * fixed param.
  37662. * If psd_power = 1, TLV carries 20MHz sub-channel center frequency
  37663. * and PSD-power values.
  37664. * If psd_power = 0, TLV carries Cfreq and EIRP for all BWs
  37665. * (<= current channel BSS BW).
  37666. * wmi_vdev_ch_power_psd_info & wmi_vdev_ch_power_eirp_info are not used
  37667. * for LPI and VLP power mode.
  37668. *
  37669. * For power_type_6ghz SP and SP_CLIENT power mode:
  37670. * num_pwr_levels of wmi_vdev_ch_power_psd_info is filled as below
  37671. * Holds BSS sub-channel center frequency and OOBE PSD-power values.
  37672. * OOBE PSD values for AP and STA are filled in below manner:
  37673. * AP case:
  37674. * For example, DUT is operating in 160 MHz and pri20
  37675. * lies in first sub-channel,
  37676. * OOBE_PSD_20 | MIN_OOBE_PSD_40 | MIN_OOBE_PSD_80 |
  37677. * MIN_OOBE_PSD_80 | MIN_OOBE_PSD_160 | MIN_OOBE__PSD_160 |
  37678. * MIN_OOBE_PSD_160 | MIN_OOBE_PSD_160
  37679. * STA case:
  37680. * For example,STA is operating in 160 MHz
  37681. * OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 |
  37682. * OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20
  37683. *
  37684. * num_pwr_levels of wmi_vdev_ch_power_eirp_info
  37685. * Carries Cfreq and EIRP for all BWs (<= current channel BSS BW).
  37686. * For both AP and STA, EIRP are filled in below manner:
  37687. * Example: If operating BW is 160 MHz
  37688. * EIRP_20 | EIRP_40 | EIRP_80 | EIRP_160
  37689. *
  37690. * If the wmi_vdev_ch_power_psd_info or wmi_vdev_ch_power_eirp_info TLV
  37691. * arrays are not both present, check for older TLV
  37692. * (wmi_vdev_ch_power_info) as explained for LPI and VLP.
  37693. */
  37694. } wmi_vdev_set_tpc_power_fixed_param;
  37695. typedef struct {
  37696. A_UINT32 tlv_header;
  37697. A_UINT32 chan_cfreq; /* Channel center frequency (MHz) */
  37698. A_UINT32 tx_power; /* Unit: dBm, either PSD/EIRP power for this frequency or incremental for non-PSD BW */
  37699. } wmi_vdev_ch_power_info;
  37700. typedef struct {
  37701. A_UINT32 tlv_header;
  37702. A_UINT32 chan_cfreq; /* Channel center frequency (MHz) of all BSS Sub-channel */
  37703. /* psd_power:
  37704. * Unit: 0.25dBm/MHz, OOBE PSD power of sub-channel
  37705. * Example: a power spectral density of 1 dBm / MHz will be reported
  37706. * as the value 4.
  37707. */
  37708. A_INT32 psd_power;
  37709. } wmi_vdev_ch_power_psd_info;
  37710. typedef struct {
  37711. A_UINT32 tlv_header;
  37712. A_UINT32 chan_cfreq; /* Channel center frequency (MHz) for all BWs (<= current channel BSS BW) */
  37713. /* eirp_power:
  37714. * Unit: 0.25dBm, EIRP power for all BWs (<= current channel BSS BW)
  37715. * Example: a power of 1 dBm will be reported as the value 4.
  37716. */
  37717. A_INT32 eirp_power;
  37718. } wmi_vdev_ch_power_eirp_info;
  37719. typedef struct {
  37720. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_txpower_query_cmd_fixed_param */
  37721. A_UINT32 request_id; /* unique request ID to distinguish the command / event set */
  37722. /* The mode value has the following meaning :
  37723. * 0 : 11a
  37724. * 1 : 11bg
  37725. * 2 : 11b
  37726. * 3 : 11g only
  37727. * 4 : 11a HT20
  37728. * 5 : 11g HT20
  37729. * 6 : 11a HT40
  37730. * 7 : 11g HT40
  37731. * 8 : 11a VHT20
  37732. * 9 : 11a VHT40
  37733. * 10 : 11a VHT80
  37734. * 11 : 11g VHT20
  37735. * 12 : 11g VHT40
  37736. * 13 : 11g VHT80
  37737. * 14 : unknown
  37738. */
  37739. A_UINT32 mode;
  37740. A_UINT32 rate; /* rate index */
  37741. A_UINT32 nss; /* number of spatial stream */
  37742. A_UINT32 beamforming; /* beamforming parameter 0:disabled, 1:enabled */
  37743. A_UINT32 chain_mask; /* mask for the antenna set to get power */
  37744. A_UINT32 chain_index; /* index for the antenna */
  37745. } wmi_get_tpc_power_cmd_fixed_param;
  37746. typedef struct {
  37747. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_tpc_power_evt_fixed_param */
  37748. A_UINT32 request_id; /* request ID set by the command */
  37749. A_INT32 tx_power; /* TX power for the specified HALPHY parameters in half dBm unit */
  37750. } wmi_get_tpc_power_evt_fixed_param;
  37751. typedef struct {
  37752. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_dpd_status_cmd_fixed_param */
  37753. A_UINT32 pdev_id; /* PDEV ID set by the command */
  37754. } wmi_pdev_get_dpd_status_cmd_fixed_param;
  37755. typedef enum {
  37756. WMI_DPD_STATUS_DISABLE = 0,
  37757. WMI_DPD_STATUS_ENABLE = 1,
  37758. WMI_DPD_STATUS_INVALID = 2,
  37759. } WMI_DPD_STATUS;
  37760. typedef struct {
  37761. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_dpd_status_evt_fixed_param */
  37762. A_UINT32 pdev_id; /* PDEV Id set by the command */
  37763. A_UINT32 dpd_status; /* DPD status obtained from HALPHY, refer to WMI_DPD_STATUS */
  37764. } wmi_pdev_get_dpd_status_evt_fixed_param;
  37765. typedef struct {
  37766. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_halphy_cal_status_cmd_fixed_param */
  37767. A_UINT32 pdev_id; /* PDEV ID set by the command */
  37768. } wmi_pdev_get_halphy_cal_status_cmd_fixed_param;
  37769. typedef struct {
  37770. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_aoa_phasedelta_evt_fixed_param */
  37771. A_UINT32 pdev_id; /* PDEV Id set by the command */
  37772. A_UINT32 freq; /* Current channel in MHz */
  37773. /*
  37774. * Chain Info
  37775. * LSB 16 bits - Max chain supported,
  37776. * MSB 16 bits - Chain pair which has phase values:
  37777. * 0x0003 - chain 0 and 1
  37778. * 0x000c - chain 2 and 3
  37779. * 0x0030 - chain 4 and 5
  37780. * 0x00c0 - chain 6 and 7
  37781. */
  37782. A_UINT32 chainInfo;
  37783. /*
  37784. * Phase Delta values:
  37785. * Two phase delta values are packed into each A_UINT32 word
  37786. * LSB 16-bit is 1st value and MSB 16-bit is 2nd value
  37787. * Phasedelta values will be 0-1023 (mapped to 0-360 degree)
  37788. * Each gain from 0 to 61 has a phasedelta value, e.g.
  37789. * gain 0's phase delta occupies bits 15:0 of phasedelta[chain][0],
  37790. * gain 1's phase delta occupies bits 31:16 of phasedelta[chain][0],
  37791. * gain 2's phase delta occupies bits 15:0 of phasedelta[chain][1], etc.
  37792. */
  37793. A_UINT32 phasedelta[WMI_MAX_CHAINS_FOR_AOA_RCC][MAX_AOA_PHASEDELTA];
  37794. /*
  37795. * IBF cal values:
  37796. * Used for final AoA calculation
  37797. * [AoAPhase = ( PhaseDeltaValue + IBFcalValue ) % 1024]
  37798. */
  37799. A_UINT32 perChainIbfCalVal[WMI_MAX_CHAINS_FOR_AOA_RCC];
  37800. } wmi_pdev_aoa_phasedelta_evt_fixed_param;
  37801. #define WMI_AOA_MAX_SUPPORTED_CHAINS_GET(chain_data) \
  37802. WMI_GET_BITS(chain_data, 0, 16)
  37803. #define WMI_AOA_MAX_SUPPORTED_CHAINS_SET(chain_data, value) \
  37804. WMI_SET_BITS(chain_data, 0, 16, value)
  37805. #define WMI_AOA_SUPPORTED_CHAINMASK_GET(chain_data) \
  37806. WMI_GET_BITS(chain_data, 16, 16)
  37807. #define WMI_AOA_SUPPORTED_CHAINMASK_SET(chain_data, value) \
  37808. WMI_SET_BITS(chain_data, 16, 16, value)
  37809. typedef struct {
  37810. /** TLV tag and len; tag equals
  37811. * WMITLV_TAG_STRUC_wmi_pdev_enhanced_aoa_phasedelta_eventid */
  37812. A_UINT32 tlv_header;
  37813. /* Current Operating Channel Frequency in MHz */
  37814. A_UINT32 freq;
  37815. /** pdev_id:
  37816. * Identify the MAC.
  37817. * See macros starting with WMI_PDEV_ID_ for values.
  37818. * In non-DBDC case host should set it to 0.
  37819. */
  37820. A_UINT32 pdev_id;
  37821. /** chain_info:
  37822. * B0 -- B15 : Max number of chains supported
  37823. * B16 --B31 : Data shared for chainmask -
  37824. * indicates the chains to which the data shared.
  37825. */
  37826. union {
  37827. struct {
  37828. A_UINT32 max_supported_chains:16,
  37829. data_for_chainmask:16;
  37830. };
  37831. A_UINT32 chain_info;
  37832. };
  37833. /** XBAR configuration to get RF2BB/BB2RF chain mapping
  37834. * Samples of xbar_config,
  37835. * If xbar_config is 0xFAC688(hex):
  37836. * RF chains 0-7 are connected to BB chains 0-7
  37837. * here,
  37838. * bits 0 to 2 = 0, maps BB chain 0 for RF chain 0
  37839. * bits 3 to 5 = 1, maps BB chain 1 for RF chain 1
  37840. * bits 6 to 8 = 2, maps BB chain 2 for RF chain 2
  37841. * bits 9 to 11 = 3, maps BB chain 3 for RF chain 3
  37842. * bits 12 to 14 = 4, maps BB chain 4 for RF chain 4
  37843. * bits 15 to 17 = 5, maps BB chain 5 for RF chain 5
  37844. * bits 18 to 20 = 6, maps BB chain 6 for RF chain 6
  37845. * bits 21 to 23 = 7, maps BB chain 7 for RF chain 7
  37846. *
  37847. * If xbar_config is 0x688FAC(hex):
  37848. * RF chains 0-3 are connected to BB chains 4-7
  37849. * RF chains 4-7 are connected to BB chains 0-3
  37850. * here,
  37851. * bits 0 to 2 = 4, maps BB chain 4 for RF chain 0
  37852. * bits 3 to 5 = 5, maps BB chain 5 for RF chain 1
  37853. * bits 6 to 8 = 6, maps BB chain 6 for RF chain 2
  37854. * bits 9 to 11 = 7, maps BB chain 7 for RF chain 3
  37855. * bits 12 to 14 = 0, maps BB chain 0 for RF chain 4
  37856. * bits 15 to 17 = 1, maps BB chain 1 for RF chain 5
  37857. * bits 18 to 20 = 2, maps BB chain 2 for RF chain 6
  37858. * bits 21 to 23 = 3, maps BB chain 3 for RF chain 7
  37859. */
  37860. A_UINT32 xbar_config;
  37861. /**
  37862. * IBF cal values:
  37863. * Used for final AoA calculation
  37864. * [AoAPhase = ( PhaseDeltaValue + IBFcalValue ) % 1024]
  37865. */
  37866. A_UINT32 per_chain_ibf_cal_val[WMI_MAX_CHAINS];
  37867. /**
  37868. * This TLV is followed by TLV arrays containing
  37869. * different types of data header and data buffer TLVs:
  37870. * 1. wmi_enhanced_aoa_gain_phase_data_hdr.
  37871. * This TLV contains the array of structure fields which indicate
  37872. * the type and format of data carried in the following data buffer
  37873. * TLV.
  37874. * 2. aoa_data_buf[] - Data buffer TLV.
  37875. * TLV header contains the total buffer size.
  37876. * Data buffer contains the phase_delta_array[Chains][GainEntries]
  37877. * in absolute phase values ranging 0-1024 and
  37878. * gain_delta_array[Chains][GainEntries] are gain index values.
  37879. */
  37880. } wmi_pdev_enhanced_aoa_phasedelta_evt_fixed_param;
  37881. #define WMI_AOA_DATA_TYPE_GET(data_info) \
  37882. WMI_GET_BITS(data_info, 0, 8)
  37883. #define WMI_AOA_DATA_TYPE_SET(data_info,value) \
  37884. WMI_SET_BITS(data_info, 0, 8, value)
  37885. #define WMI_AOA_NUM_ENTIRES_GET(data_info) \
  37886. WMI_GET_BITS(data_info, 8, 8)
  37887. #define WMI_AOA_NUM_DATA_ENTRIES_SET(data_info,value) \
  37888. WMI_SET_BITS(data_info, 8, 8, value)
  37889. typedef enum _WMI_AOA_EVENT_DATA_TYPE {
  37890. WMI_PHASE_DELTA_ARRAY = 0x0,
  37891. WMI_GAIN_GROUP_STOP_ARRAY = 0x1,
  37892. /* add new types here */
  37893. WMI_MAX_DATA_TYPE_ARRAY,
  37894. } WMI_AOA_EVENT_DATA_TYPE;
  37895. typedef struct {
  37896. /** TLV tag and len; tag equals
  37897. * WMITLV_TAG_STRUC_wmi_pdev_enhanced_aoa_phasedelta_eventid */
  37898. A_UINT32 tlv_header;
  37899. /** data_info:
  37900. * Data follows the LSB first and MSB second order in a 32bit word
  37901. * bit mapping:
  37902. * B0 -- B7 : Data type
  37903. * B8 -- B15 : Number of entries to be parsed in terms of 32bit word
  37904. *
  37905. * If data is Phase delta values - Data type is 0x0
  37906. * group stop gain index values - Data type is 0x1
  37907. *
  37908. * num_entries - Total number of data entries in uint32
  37909. */
  37910. union {
  37911. struct {
  37912. A_UINT32 data_type:8,
  37913. num_entries:8,
  37914. reserved:16;
  37915. };
  37916. A_UINT32 data_info;
  37917. };
  37918. } wmi_enhanced_aoa_gain_phase_data_hdr;
  37919. typedef enum _WMI_AGC_GAIN_TABLE_IDX {
  37920. WMI_AGC_DG_TABLE_IDX = 0,
  37921. WMI_AGC_LG_TABLE_IDX,
  37922. WMI_AGC_VLG_TABLE_IDX,
  37923. WMI_AGC_MAX_GAIN_TABLE_IDX = 8,
  37924. } WMI_AGC_GAIN_TABLE_IDX;
  37925. #define WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD 4
  37926. #define WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD 2
  37927. #define WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM 1
  37928. #define WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM 2
  37929. /* Number of words required to store max number of gain table elements = ((max number of gain table elements)/(number of gain table elements per word)) */
  37930. /* 2 bytes (at most)used to store each gain table elements */
  37931. #define WMI_AOA_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS (WMI_AGC_MAX_GAIN_TABLE_IDX / WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD)
  37932. /* 1 byte (at most) used to store each gain table elements obtained from BDF */
  37933. #define WMI_AOA_BDF_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS (WMI_AGC_MAX_GAIN_TABLE_IDX / WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD)
  37934. typedef enum {
  37935. WMI_AOA_2G = 0,
  37936. WMI_AOA_5G,
  37937. WMI_AOA_6G,
  37938. WMI_AOA_MAX_BAND,
  37939. } WMI_AOA_SUPPORTED_BANDS;
  37940. #define WMI_AOA_MAX_AGC_GAIN_GET(pcap_var, tbl_idx, output) \
  37941. do { \
  37942. A_UINT8 word_idx = 0; \
  37943. A_UINT8 bit_index = 0; \
  37944. A_UINT8 nth_byte = 0; \
  37945. word_idx = tbl_idx >> 1; \
  37946. nth_byte = (tbl_idx % WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD); \
  37947. bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM; \
  37948. output = WMI_GET_BITS(*(pcap_var + word_idx), bit_index, 16); \
  37949. } while (0)
  37950. #define WMI_AOA_MAX_AGC_GAIN_SET(pcap_var, tbl_idx, value) \
  37951. do { \
  37952. A_UINT8 word_idx = 0; \
  37953. A_UINT8 bit_index = 0; \
  37954. A_UINT8 nth_byte = 0; \
  37955. word_idx = tbl_idx >> 1; \
  37956. nth_byte = (tbl_idx % WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD); \
  37957. bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM; \
  37958. WMI_SET_BITS(*(pcap_var+word_idx), bit_index, 16, value); \
  37959. } while (0)
  37960. #define WMI_AOA_MAX_BDF_ENTRIES_GET(pcap_var, tbl_idx, output) \
  37961. do { \
  37962. A_UINT8 word_idx = 0; \
  37963. A_UINT8 bit_index = 0; \
  37964. A_UINT8 nth_byte = 0; \
  37965. word_idx = tbl_idx >> 2; \
  37966. nth_byte = (tbl_idx % WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD); \
  37967. bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM; \
  37968. output = WMI_GET_BITS(*(pcap_var+word_idx), bit_index, 8); \
  37969. } while (0)
  37970. #define WMI_AOA_MAX_BDF_ENTRIES_SET(pcap_var, tbl_idx, value) \
  37971. do { \
  37972. A_UINT8 word_idx = 0; \
  37973. A_UINT8 nth_byte = 0; \
  37974. A_UINT8 bit_index = 0; \
  37975. word_idx = tbl_idx >> 2; \
  37976. nth_byte = (tbl_idx % WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD); \
  37977. bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM; \
  37978. WMI_SET_BITS(*(pcap_var+word_idx), bit_index, 8, value); \
  37979. } while (0)
  37980. typedef struct {
  37981. /** TLV tag and len; tag equals
  37982. * WMITLV_TAG_STRUC_wmi_enhanced_aoa_caps_param */
  37983. A_UINT32 tlv_header;
  37984. /* Maximum number of Rx AGC gain tables supported */
  37985. A_UINT32 max_agc_gain_tbls;
  37986. /* 1 byte is used to store bdf max number of elements in each gain tables */
  37987. A_UINT32 max_bdf_gain_entries[WMI_AOA_BDF_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS];
  37988. /** This TLV is followed by TLV array - wmi_enhanced_aoa_per_band_caps_param
  37989. * containing band specifc agc gain table information.
  37990. */
  37991. } wmi_enhanced_aoa_caps_param;
  37992. typedef struct {
  37993. /** TLV tag and len; tag equals
  37994. * WMITLV_TAG_STRUC_wmi_enhanced_aoa_per_band_caps_param */
  37995. A_UINT32 tlv_header;
  37996. /* Band information - WMI_AOA_SUPPORTED_BANDS */
  37997. A_UINT32 band_info;
  37998. /* 2 bytes are used to store agc max number of elements in each gain tables */
  37999. A_UINT32 max_agc_gain[WMI_AOA_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS];
  38000. } wmi_enhanced_aoa_per_band_caps_param;
  38001. /* WMI_HALPHY_CAL_LIST:
  38002. *
  38003. * Below is the list of HALPHY online CAL currently enabled in
  38004. * WIN chipsets
  38005. */
  38006. typedef enum {
  38007. WMI_HALPHY_CAL_ADC = 0,
  38008. WMI_HALPHY_CAL_BWFILTER,
  38009. WMI_HALPHY_CAL_PDET_AND_PAL,
  38010. WMI_HALPHY_CAL_RXDCO,
  38011. WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ,
  38012. WMI_HALPHY_CAL_IBF,
  38013. WMI_HALPHY_CAL_PA_DROOP,
  38014. WMI_HALPHY_CAL_DAC,
  38015. WMI_HALPHY_CAL_ANI,
  38016. WMI_HALPHY_CAL_NOISE_FLOOR,
  38017. WMI_HALPHY_CAL_MAX_CAL_LIST
  38018. } WMI_HALPHY_CAL_LIST;
  38019. /* WMI_HALPHY_CAL_VALID_BITMAP_STATUS
  38020. *
  38021. * In WMI wmi_pdev_get_halphy_cal_status_evt_fixed_param
  38022. * (halphy_cal_valid_bmap member), below enum list must be used
  38023. * to get which calibration status indication is sent by FW to HOST.
  38024. * Only if that particular bit it set, corresponding bit of the
  38025. * halphy_cal_status variable will be valid.
  38026. */
  38027. typedef enum {
  38028. WMI_HALPHY_CAL_ADC_BMAP = (1 << WMI_HALPHY_CAL_ADC),
  38029. WMI_HALPHY_CAL_BWFILTER_BMAP = (1 << WMI_HALPHY_CAL_BWFILTER),
  38030. WMI_HALPHY_CAL_PDET_AND_PAL_BMAP = (1 << WMI_HALPHY_CAL_PDET_AND_PAL),
  38031. WMI_HALPHY_CAL_RXDCO_BMAP = (1 << WMI_HALPHY_CAL_RXDCO),
  38032. WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ_BMAP = (1 << WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ),
  38033. WMI_HALPHY_CAL_IBF_BMAP = (1 << WMI_HALPHY_CAL_IBF),
  38034. WMI_HALPHY_CAL_PA_DROOP_BMAP = (1 << WMI_HALPHY_CAL_PA_DROOP),
  38035. WMI_HALPHY_CAL_DAC_BMAP = (1 << WMI_HALPHY_CAL_DAC),
  38036. WMI_HALPHY_CAL_ANI_BMAP = (1 << WMI_HALPHY_CAL_ANI),
  38037. WMI_HALPHY_CAL_NOISE_FLOOR_BMAP = (1 << WMI_HALPHY_CAL_NOISE_FLOOR),
  38038. } WMI_HALPHY_CAL_VALID_BITMAP_STATUS;
  38039. typedef struct {
  38040. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_halphy_cal_status_evt_fixed_param */
  38041. A_UINT32 pdev_id; /* PDEV Id set by the command */
  38042. /*
  38043. * Calibration valid bitmap from HALPHY, refer to
  38044. * WMI_HALPHY_CAL_VALID_BITMAP_STATUS.
  38045. * Only if this particular bit it set, corresponding bit of the
  38046. * halphy_cal_status variable will be valid.
  38047. */
  38048. A_UINT32 halphy_cal_valid_bmap;
  38049. /* Calibration result status bitmap from HALPHY.
  38050. * The WMI_HALPHY_CAL_VALID_BITMAP_STATUS enum identifies which bit
  38051. * in the bitmap corresponds to which cal type.
  38052. * Each valid bit uses the following settings:
  38053. * 1 - SUCCESS
  38054. * 0 - FAILURE
  38055. */
  38056. A_UINT32 halphy_cal_status;
  38057. } wmi_pdev_get_halphy_cal_status_evt_fixed_param;
  38058. typedef struct {
  38059. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_halphy_cal_bmap_cmd_fixed_param */
  38060. A_UINT32 pdev_id; /* PDEV ID set by the command */
  38061. /*
  38062. * Calibration valid bitmap from HOST, refer to
  38063. * WMI_HALPHY_CAL_VALID_BITMAP_STATUS.
  38064. * Based on the bitmap value, HALPHY will set corresponding mask values
  38065. * to each of the online calibrations
  38066. */
  38067. A_UINT32 online_halphy_cals_bmap;
  38068. /* Calibration enable/disable support for home/scan channel
  38069. * 0 - home channel
  38070. * 1 - scan channel
  38071. * 2 - both home and scan channel
  38072. */
  38073. A_UINT32 home_scan_channel;
  38074. } wmi_pdev_set_halphy_cal_bmap_cmd_fixed_param;
  38075. typedef struct {
  38076. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_halphy_cal_bmap_evt_fixed_param */
  38077. A_UINT32 pdev_id; /* PDEV Id set by the command */
  38078. /* Status indication for calibration
  38079. * 0 - SUCCESS
  38080. * 1 - FAIL
  38081. * This WMI command will by sent from HOST dynamically but only one
  38082. * at a time. So no need of cookie/request handshake.
  38083. */
  38084. A_UINT32 status;
  38085. } wmi_pdev_set_halphy_cal_bmap_evt_fixed_param;
  38086. /* below structures are related to Motion Detection. */
  38087. typedef struct {
  38088. /** TLV tag and len; tag equals
  38089. * WMITLV_TAG_STRUC_wmi_motion_det_config_params_cmd_fixed_param */
  38090. A_UINT32 tlv_header; /** TLV Header */
  38091. A_UINT32 vdev_id; /** Vdev ID */
  38092. A_UINT32 time_t1; /** Time gap of successive bursts of
  38093. * measurement frames during coarse
  38094. * motion detection (in ms) */
  38095. A_UINT32 time_t2; /** Time gap of successive bursts of
  38096. * measurement frames during fine
  38097. * motion detection (in ms) */
  38098. A_UINT32 n1; /** number of measurement frames in one
  38099. * burst, for coarse detection */
  38100. A_UINT32 n2; /** number of measurement frames in one
  38101. * burst, for fine detection */
  38102. A_UINT32 time_t1_gap; /** gap between measurement frames in
  38103. * course detection (in ms) */
  38104. A_UINT32 time_t2_gap; /** gap between measurement frames in
  38105. * fine detection (in ms) */
  38106. A_UINT32 coarse_K; /** number of times motion detection has to
  38107. * be performed for coarse detection */
  38108. A_UINT32 fine_K; /** number of times motion detection has to
  38109. * be performed for fine detection */
  38110. A_UINT32 coarse_Q; /** number of times motion is expected
  38111. * to be detected for success case in
  38112. * coarse detection */
  38113. A_UINT32 fine_Q; /** number of times motion is expected
  38114. * to be detected for success case in
  38115. * fine detection */
  38116. A_UINT32 md_coarse_thr_high; /** higher threshold value (in percent)
  38117. * from host to FW, which will be used in
  38118. * coarse detection phase of motion detection.
  38119. * This is the threshold for the correlation
  38120. * of the old RF local-scattering environment
  38121. * with the current RF local-scattering
  38122. * environment. A value of 100(%) indicates
  38123. * that neither the transceiver nor any
  38124. * nearby objects have changed position. */
  38125. A_UINT32 md_fine_thr_high; /** higher threshold value (in percent)
  38126. * from host to FW, which will be used in
  38127. * fine detection phase of motion detection.
  38128. * This is the threshold for correlation
  38129. * between the old and current RF environments,
  38130. * as explained above. */
  38131. A_UINT32 md_coarse_thr_low; /** lower threshold value (in percent)
  38132. * for immediate detection of motion in
  38133. * coarse detection phase.
  38134. * This is the threshold for correlation
  38135. * between the old and current RF environments,
  38136. * as explained above. */
  38137. A_UINT32 md_fine_thr_low; /** lower threshold value (in percent)
  38138. * for immediate detection of motion in
  38139. * fine detection phase.
  38140. * This is the threshold for correlation
  38141. * between the old and current RF environments,
  38142. * as explained above. */
  38143. } wmi_motion_det_config_params_cmd_fixed_param;
  38144. typedef struct {
  38145. /** TLV tag and len; tag equals
  38146. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_config_params_cmd_fixed_param */
  38147. A_UINT32 tlv_header; /** TLV Header */
  38148. A_UINT32 vdev_id; /** Vdev ID */
  38149. A_UINT32 bl_time_t; /** time T for baseline (in ms)
  38150. * Every bl_time_t, bl_n packets are sent */
  38151. A_UINT32 bl_packet_gap; /** gap between measurement frames for baseline
  38152. * (in ms) */
  38153. A_UINT32 bl_n; /** number of measurement frames to be sent
  38154. * during one baseline */
  38155. A_UINT32 bl_num_meas; /** number of times the baseline measurement
  38156. * to be done */
  38157. } wmi_motion_det_base_line_config_params_cmd_fixed_param;
  38158. typedef struct {
  38159. /** TLV tag and len; tag equals
  38160. * WMITLV_TAG_STRUC_wmi_motion_det_start_stop_cmd_fixed_param */
  38161. A_UINT32 tlv_header; /** TLV Header */
  38162. A_UINT32 vdev_id; /** Vdev ID */
  38163. A_UINT32 enable; /** start = 1, stop =0 */
  38164. } wmi_motion_det_start_stop_cmd_fixed_param;
  38165. typedef struct {
  38166. /** TLV tag and len; tag equals
  38167. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_start_stop_cmd_fixed_param */
  38168. A_UINT32 tlv_header; /** TLV Header */
  38169. A_UINT32 vdev_id; /** Vdev ID */
  38170. A_UINT32 enable; /** start = 1, stop =0 */
  38171. } wmi_motion_det_base_line_start_stop_cmd_fixed_param;
  38172. typedef struct {
  38173. /** TLV tag and len; tag equals
  38174. * WMITLV_TAG_STRUC_wmi_motion_det_event */
  38175. A_UINT32 tlv_header; /** TLV Header */
  38176. A_UINT32 vdev_id; /** Vdev ID */
  38177. A_UINT32 status; /** status = 1 -> motion detected */
  38178. } wmi_motion_det_event;
  38179. typedef struct {
  38180. /** TLV tag and len; tag equals
  38181. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_event */
  38182. A_UINT32 tlv_header; /** TLV Header */
  38183. A_UINT32 vdev_id; /** Vdev ID */
  38184. A_UINT32 bl_baseline_value; /** baseline correlation value calculated
  38185. * during baselining phase (in %) */
  38186. A_UINT32 bl_max_corr_reserved; /** max corr value obtained during baselining
  38187. * phase (in %); reserved for future */
  38188. A_UINT32 bl_min_corr_reserved; /** min corr value obtained during baselining
  38189. * phase (in %); reserved for future */
  38190. } wmi_motion_det_base_line_event;
  38191. /* Below structures are related to OBSS_PD_SPATIAL Reuse */
  38192. typedef struct {
  38193. /** TLV tag and len; tag equals
  38194. * WMITLV_TAG_STRUC_wmi_obss_set_cmd_fixed_param */
  38195. A_UINT32 tlv_header;
  38196. /** Enable/Disable Spatial Reuse */
  38197. A_UINT32 enable;
  38198. /*
  38199. * In the below fields, "OBSS level" refers to the power of the
  38200. * signals received from "Other BSS".
  38201. * Spatial reuse will only be permitted if the Other BSS's signal power
  38202. * is within the min to max range specified by the below fields.
  38203. */
  38204. /** Minimum OBSS level to use */
  38205. A_INT32 obss_min; /* RSSI in dBm */
  38206. /** Maximum OBSS level to use */
  38207. A_INT32 obss_max; /* RSSI in dBm */
  38208. /** Vdev id*/
  38209. A_UINT32 vdev_id;
  38210. } wmi_obss_spatial_reuse_set_cmd_fixed_param;
  38211. /*
  38212. * Below structure is related to WMI CMD that configures the default
  38213. * minimum (OBSS_MIN) and maximum (OBSS_MAX) Other BSS levels (RSSI in dBm)
  38214. * for VDEV of a give type (STA or AP). These thresholds are configured
  38215. * within the Host and passed down to the FW. FW will use these
  38216. * default OBSS_MIN and OBSS_MAX values during roaming if the assoc response
  38217. * from the AP does not include spatial reuse parameter set Info Element.
  38218. */
  38219. typedef struct {
  38220. /** TLV tag and len; tag equals
  38221. * WMITLV_TAG_STRUC_wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param
  38222. */
  38223. A_UINT32 tlv_header;
  38224. /*
  38225. * In the below fields, "OBSS level" refers to the power of the
  38226. * signals received from "Other BSS".
  38227. * Spatial reuse will only be permitted if the Other BSS's signal power
  38228. * is within the min to max range specified by the below fields.
  38229. */
  38230. /** Minimum OBSS level to use */
  38231. A_INT32 obss_min; /* RSSI in dBm */
  38232. /** Maximum OBSS level to use */
  38233. A_INT32 obss_max; /* RSSI in dBm */
  38234. /** Type of VDEV for which these threshold are applicable.
  38235. * vdev_type should be one of WMI_VDEV_TYPE_STA or WMI_VDEV_TYPE_AP
  38236. */
  38237. A_UINT32 vdev_type;
  38238. } wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param;
  38239. typedef struct {
  38240. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_chan_width_peer_list */
  38241. wmi_mac_addr peer_macaddr;
  38242. A_UINT32 chan_width; /* wmi_channel_width */
  38243. A_UINT32 puncture_20mhz_bitmap; /* per peer wmi puncture_bitmap,
  38244. * each bit indicates one 20 MHz BW
  38245. * punctured.
  38246. * This variable should be read from left,
  38247. * LSb will point to the lowest-frequency
  38248. * 20 MHz frequency slice.
  38249. * bit value:
  38250. * 0 - 20 MHz BW is punctured
  38251. * 1 - not punctured
  38252. */
  38253. } wmi_chan_width_peer_list;
  38254. #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VALID_VDEV_ID(comp) WMI_SET_BITS(comp, 31,1, 1)
  38255. #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VALID_VDEV_ID(comp) WMI_GET_BITS(comp, 31, 1)
  38256. #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VALID_PUNCTURE_BITMAP(comp) WMI_SET_BITS(comp, 30, 1, 1)
  38257. #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VALID_PUNCTURE_BITMAP(comp) WMI_GET_BITS(comp, 30, 1)
  38258. /* bits 29:8 currently unused */
  38259. #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VDEV_ID(comp, value) WMI_SET_BITS(comp, 0, 8, value)
  38260. #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VDEV_ID(comp) WMI_GET_BITS(comp, 0, 8)
  38261. typedef struct {
  38262. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_chan_width_switch_cmd_fixed_param */
  38263. A_UINT32 num_peers;
  38264. /* vdev_var:
  38265. * The MSb (bit 31) indicates that the vdev_id is valid.
  38266. * Bit 30 indicates that the puncture bitmap is valid.
  38267. * The LSB (bits 0-7) is used to infer the actual vdev_id.
  38268. * The other bits can be used for future enhancements.
  38269. */
  38270. A_UINT32 vdev_var;
  38271. /*
  38272. * Following this structure is the TLV:
  38273. * struct wmi_chan_width_peer_list chan_width_peer_info[num_peers];
  38274. */
  38275. } wmi_peer_chan_width_switch_cmd_fixed_param;
  38276. #define WMI_PEER_BULK_SET_VDEV_ID(comp, value) WMI_SET_BITS(comp, 0, 8, value)
  38277. #define WMI_PEER_BULK_GET_VDEV_ID(comp) WMI_GET_BITS(comp, 0, 8)
  38278. /* bits 30:8 currently unused */
  38279. #define WMI_PEER_BULK_SET_VALID_VDEV_ID(comp) WMI_SET_BITS(comp, 31, 1, 1)
  38280. #define WMI_PEER_BULK_GET_VALID_VDEV_ID(comp) WMI_GET_BITS(comp, 31, 1)
  38281. typedef struct {
  38282. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_peer_list */
  38283. wmi_mac_addr peer_macaddr;
  38284. /** parameter id */
  38285. A_UINT32 param_id;
  38286. A_UINT32 param_value;
  38287. } wmi_peer_list;
  38288. /* WMI_PEER_BULK_SET_CMDID */
  38289. typedef struct {
  38290. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bulk_set_cmd_fixed_param */
  38291. /* vdev_var:
  38292. * The MSb (bit 31) indicates that the vdev_id is valid.
  38293. * The LSB (bits 0-7) is used to infer the actual vdev_id.
  38294. * The other bits can be used for future enhancements.
  38295. */
  38296. A_UINT32 vdev_var;
  38297. /*
  38298. * Following this structure is the TLV array:
  38299. * struct wmi_peer_list peer_info[];
  38300. */
  38301. } wmi_peer_bulk_set_cmd_fixed_param;
  38302. typedef struct {
  38303. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_he_tb_action_frm_cmd_fixed_param */
  38304. A_UINT32 tlv_header;
  38305. /* enable or disable HE TB Action frame */
  38306. A_UINT32 enable;
  38307. /* length of action frame body in bytes */
  38308. A_UINT32 data_len;
  38309. /* This TLV is followed by another TLV of array of bytes
  38310. * A_UINT8 data[];
  38311. * This data array contains the action frame raw data
  38312. */
  38313. } wmi_pdev_he_tb_action_frm_cmd_fixed_param;
  38314. typedef struct {
  38315. /** TLV tag and len; tag equals
  38316. * WMITLV_TAG_STRUC_wmi_hpcs_pulse_start_cmd_fixed_param */
  38317. A_UINT32 tlv_header; /** TLV Header */
  38318. A_UINT32 vdev_id; /** Vdev ID */
  38319. A_UINT32 start; /** Start/Stop */
  38320. A_UINT32 sync_time; /** Lower 32-bit of the TSF at which the
  38321. * pulse should be synced. */
  38322. A_UINT32 pulse_interval; /** Periodicity of pulses in micro seconds */
  38323. A_UINT32 active_sync_period; /** Number of beacons to sync before generating
  38324. * pulse in units of beacon interval.
  38325. * Valid for clock slaves only. */
  38326. A_UINT32 gpio_pin; /** GPIO Pin number to be used */
  38327. A_UINT32 pulse_width; /** Duration of pulse in micro seconds */
  38328. } wmi_hpcs_pulse_start_cmd_fixed_param;
  38329. typedef struct {
  38330. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_muedca_params_config_event_fixed_param */
  38331. A_UINT32 tlv_header; /** TLV Header */
  38332. A_UINT32 pdev_id;
  38333. /*
  38334. * The following per-AC arrays are indexed using the
  38335. * WMI_AC_xxx / wmi_traffic_ac enum values.
  38336. */
  38337. /* aifsn
  38338. * Arbitration inter frame spacing number (AIFSN)
  38339. * Values are integers used for back off computation.
  38340. */
  38341. A_UINT32 aifsn[WMI_AC_MAX];
  38342. /* ecwmin
  38343. * Exponent form of ContentionWindow min (ECWmin)
  38344. * Values are integers used for back off computation.
  38345. */
  38346. A_UINT32 ecwmin[WMI_AC_MAX];
  38347. /* ecwmax
  38348. * Exponent form of ContentionWindow max (ECWmax)
  38349. * Values are integers used for back off computation.
  38350. */
  38351. A_UINT32 ecwmax[WMI_AC_MAX];
  38352. /* muedca_expiration_time
  38353. * MU EDCA Expiration time refers to the length of time after the most
  38354. * recent UL trigger time. The MU EDCA Timer field indicates the time
  38355. * limit, in units of 8 TUs
  38356. */
  38357. A_UINT32 muedca_expiration_time[WMI_AC_MAX];
  38358. } wmi_muedca_params_config_event_fixed_param;
  38359. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  38360. #define WMI_HEOPS_DEFPE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 0, 3)
  38361. #define WMI_HEOPS_DEFPE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 0, 3, value)
  38362. /* TWT required */
  38363. #define WMI_HEOPS_TWT_REQUIRED_GET_D3(he_ops) WMI_GET_BITS(he_ops, 3, 1)
  38364. #define WMI_HEOPS_TWT_REQUIRED_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 3, 1, value)
  38365. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  38366. #define WMI_HEOPS_RTSTHLD_GET_D3(he_ops) WMI_GET_BITS(he_ops, 4, 10)
  38367. #define WMI_HEOPS_RTSTHLD_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 4, 10, value)
  38368. /* VHT Operation Information Present */
  38369. #define WMI_HEOPS_VHTOPSPRSNT_GET_D3(he_ops) WMI_GET_BITS(he_ops, 14, 1)
  38370. #define WMI_HEOPS_VHTOPSPRSNT_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 14, 1, value)
  38371. /* Co-Located BSS */
  38372. #define WMI_HEOPS_COLOCBSS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 15, 1)
  38373. #define WMI_HEOPS_COLOCBSS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 15, 1, value)
  38374. /* ER SU Disable */
  38375. #define WMI_HEOPS_ERSUDIS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 16, 1)
  38376. #define WMI_HEOPS_ERSUDIS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 16, 1, value)
  38377. /* bit17 - bit23 are reserved */
  38378. /* BSS color */
  38379. #define WMI_HEOPS_COLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 24, 6)
  38380. #define WMI_HEOPS_COLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 24, 6, value)
  38381. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  38382. #define WMI_HEOPS_PARTBSSCOLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  38383. #define WMI_HEOPS_PARTBSSCOLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  38384. /* when set to 1 disables use of BSS color */
  38385. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 31, 1)
  38386. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 31, 1, value)
  38387. /* PHY Capabilities Information field */
  38388. /* bit 0 reserved */
  38389. /*
  38390. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  38391. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  38392. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  38393. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  38394. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  38395. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  38396. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  38397. * 242-tone RU mapping in 40 MHz and 80
  38398. * MHz channel width in 5 GHz. Otherwise Reserved.
  38399. * B6: Reserved
  38400. */
  38401. #define WMI_HECAP_PHY_CBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  38402. #define WMI_HECAP_PHY_CBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  38403. /*
  38404. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  38405. * where in the preamble only the secondary 20 MHz is punctured
  38406. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  38407. * where in the preamble only one of the two 20 MHz sub-channels in the
  38408. * secondary 40 MHz is punctured
  38409. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  38410. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  38411. * secondary 20 MHz is punctured
  38412. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  38413. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  38414. * primary 40 MHz is present
  38415. */
  38416. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  38417. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  38418. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  38419. #define WMI_HECAP_PHY_COD_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  38420. #define WMI_HECAP_PHY_COD_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  38421. /* Indicates support of transmission and reception of LDPC encoded packets */
  38422. #define WMI_HECAP_PHY_LDPC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  38423. #define WMI_HECAP_PHY_LDPC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  38424. /*
  38425. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  38426. */
  38427. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  38428. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  38429. /*
  38430. * If the Doppler Rx subfield is 1, indicates the maximum number of space-time streams supported for reception
  38431. * when a midamble is present in the Data field.
  38432. * If the Doppler Tx subfield is 1, indicates the maximum number of space-time streams supported for transmission
  38433. * when a midamble is present in the Data field.
  38434. * If both Doppler Rx and Doppler Tx subfields are 1, indicates the maximum number of space-time streams
  38435. * supported for transmission and reception when a midamble is present in the Data field.
  38436. */
  38437. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  38438. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  38439. /*
  38440. * B0: For a transmitting STA acting as beamformee, it indicates support of
  38441. * NDP reception using 4x LTF and 3.2 us guard interval duration
  38442. */
  38443. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  38444. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  38445. /*
  38446. * indicates support for the transmission of an HE TB PPDU that has a
  38447. * bandwidth less than or equal to 80 MHz and is using STBC and with
  38448. * one spatial stream
  38449. */
  38450. #define WMI_HECAP_PHY_TXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  38451. #define WMI_HECAP_PHY_TXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  38452. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx */
  38453. #define WMI_HECAP_PHY_RXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  38454. #define WMI_HECAP_PHY_RXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  38455. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  38456. #define WMI_HECAP_PHY_TXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  38457. #define WMI_HECAP_PHY_TXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  38458. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  38459. #define WMI_HECAP_PHY_RXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  38460. #define WMI_HECAP_PHY_RXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  38461. /*
  38462. * If the transmitting STA is an AP:
  38463. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  38464. * transmission.
  38465. * If the transmitting STA is a non-AP STA:
  38466. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  38467. * transmission.
  38468. */
  38469. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  38470. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  38471. /*
  38472. * If the transmitting STA is an AP:
  38473. * indicates STA supports of reception of UL MUMIMO transmission on an
  38474. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  38475. * If the transmitting STA is a non-AP STA:
  38476. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  38477. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  38478. */
  38479. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  38480. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  38481. /* Tx DCM
  38482. * B0:B1
  38483. * 00: Does not support DCM
  38484. * 01: BPSK
  38485. * 10: QPSK
  38486. * 11: 16-QAM
  38487. * B2 signals maximum number of spatial streams with DCM
  38488. * 0: 1 spatial stream
  38489. * 1: 2 spatial streams
  38490. */
  38491. #define WMI_HECAP_PHY_DCMTX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  38492. #define WMI_HECAP_PHY_DCMTX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  38493. /* Rx DCM
  38494. * B0:B1
  38495. * 00: Does not support DCM
  38496. * 01: BPSK
  38497. * 10: QPSK
  38498. * 11: 16-QAM
  38499. * B2 signals maximum number of spatial streams with DCM
  38500. * 0: 1 spatial stream
  38501. * 1: 2 spatial streams
  38502. */
  38503. #define WMI_HECAP_PHY_DCMRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  38504. #define WMI_HECAP_PHY_DCMRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  38505. /*
  38506. * Indicates that the STA supports the reception of an HE MU PPDU payload
  38507. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  38508. */
  38509. #define WMI_HECAP_PHY_ULHEMU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  38510. #define WMI_HECAP_PHY_ULHEMU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  38511. /* Indicates support for operation as an SU beamformer */
  38512. #define WMI_HECAP_PHY_SUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  38513. #define WMI_HECAP_PHY_SUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  38514. /* Indicates support for operation as an SU beamformee */
  38515. #define WMI_HECAP_PHY_SUBFME_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  38516. #define WMI_HECAP_PHY_SUBFME_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  38517. /* Indicates support for operation as an MU Beamformer */
  38518. #define WMI_HECAP_PHY_MUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  38519. #define WMI_HECAP_PHY_MUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  38520. /*
  38521. * Num STS -1 for <= 80MHz (min val 3)
  38522. * The maximum number of space-time streams minus 1 that the STA can
  38523. * receive in an HE NDP
  38524. */
  38525. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  38526. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  38527. /*
  38528. * Num STS -1 for > 80MHz (min val 3)
  38529. * The maximum number of space-time streams minus 1 that the STA can
  38530. * receive in an HE NDP
  38531. */
  38532. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  38533. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  38534. /*
  38535. * Number Of Sounding Dimensions For <= 80 MHz
  38536. * If SU beamformer capable, set to the maximum supported value of the
  38537. * TXVECTOR parameter NUM_STS minus 1.
  38538. * Otherwise, reserved.
  38539. */
  38540. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  38541. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  38542. /*
  38543. * Number Of Sounding Dimensions For > 80 MHz
  38544. * If SU beamformer capable, set to the maximum supported value of the
  38545. * TXVECTOR parameter NUM_STS minus 1.
  38546. * Otherwise, reserved.
  38547. */
  38548. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  38549. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  38550. /*
  38551. * Indicates if the HE beamformee is capable of feedback with tone
  38552. * grouping of 16 in the HE Compressed Beamforming Report field for
  38553. * a SU-type feedback.
  38554. */
  38555. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  38556. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  38557. /*
  38558. * Indicates if the HE beamformee is capable of feedback with tone
  38559. * grouping of 16 in the HE Compressed Beamforming Report field for
  38560. * a MU-type feedback.
  38561. */
  38562. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  38563. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  38564. /*
  38565. * Indicates if HE beamformee is capable of feedback with codebook
  38566. * size {4, 2} in the HECompressed Beamforming Report field for
  38567. * a SU-type feedback.
  38568. */
  38569. #define WMI_HECAP_PHY_CODBK42SU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  38570. #define WMI_HECAP_PHY_CODBK42SU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  38571. /*
  38572. * Indicates if HE beamformee is capable of feedback with codebook
  38573. * size {7, 5} in the HE Compressed Beamforming Report field for
  38574. * a MU-type feedback.
  38575. */
  38576. #define WMI_HECAP_PHY_CODBK75MU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  38577. #define WMI_HECAP_PHY_CODBK75MU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  38578. /*
  38579. * Beamforming Feedback With Trigger Frame
  38580. * If the transmitting STA is an AP STA:
  38581. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  38582. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  38583. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  38584. * If the transmitting STA is a non-AP STA:
  38585. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  38586. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  38587. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  38588. */
  38589. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  38590. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  38591. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  38592. * over the right 106-tone RU or partial BW ER
  38593. */
  38594. #define WMI_HECAP_PHY_HEERSU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  38595. #define WMI_HECAP_PHY_HEERSU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  38596. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  38597. * where the RU does not span the entire PPDU bandwidth.
  38598. */
  38599. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  38600. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  38601. /* Indicates whether or not the PPE Threshold field is present */
  38602. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  38603. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  38604. /* Indicates that the STA supports SRP-based SR operation */
  38605. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  38606. #define WMI_HECAP_PHY_SRPPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  38607. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  38608. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  38609. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  38610. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  38611. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  38612. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  38613. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  38614. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  38615. * minus 1. Otherwise, reserved.
  38616. */
  38617. #define WMI_HECAP_PHY_MAXNC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  38618. #define WMI_HECAP_PHY_MAXNC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  38619. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  38620. * STBC with one spatial stream
  38621. */
  38622. #define WMI_HECAP_PHY_STBCTXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  38623. #define WMI_HECAP_PHY_STBCTXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  38624. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  38625. * STBC with one spatial stream
  38626. */
  38627. #define WMI_HECAP_PHY_STBCRXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  38628. #define WMI_HECAP_PHY_STBCRXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  38629. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  38630. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  38631. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  38632. /*
  38633. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  38634. * 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.
  38635. */
  38636. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  38637. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  38638. /*
  38639. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  38640. * 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.
  38641. */
  38642. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  38643. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  38644. /*
  38645. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  38646. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  38647. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  38648. * 160 MHz HE TB PPDU.
  38649. */
  38650. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  38651. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  38652. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  38653. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  38654. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  38655. /*
  38656. * If the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF in
  38657. * 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
  38658. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  38659. *
  38660. * If the Doppler Tx subfield is 1, indicates support for transmitting midambles with 2x HE-LTF, 1x HE-LTF
  38661. * in HE TB PPDU when allowed.
  38662. * If both the Doppler Rx and Doppler Tx subfields are 1, indicates support for receiving midambles with 2x HELTF,
  38663. * 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
  38664. * 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
  38665. * to 1; and also support for transmitting midambles with 2x HE-LTF, 1x HE-LTF in HE TB PPDU when allowed.
  38666. */
  38667. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  38668. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  38669. /*
  38670. * If the DCM Max Constellation Tx subfield is greater than 0, then the DCM Max BW subfield indicates the
  38671. * maximum bandwidth of a PPDU that the STA might transmit with DCM applied.
  38672. *
  38673. * If the DCM Max Constellation Rx subfield is greater than 0, then the DCM Max BW subfield indicates the
  38674. * maximum bandwidth of a PPDU with DCM applied that the STA can receive.
  38675. *
  38676. * If both the DCM Max Constellation Tx subfield and DCM Max Constellation Rx subfield are 0, then this
  38677. * subfield is reserved.
  38678. *
  38679. * 0=20MHz, 1=40Mhz, 2=80Mhz, 3=160Mhz or 80+80Mhz
  38680. */
  38681. #define WMI_HECAP_PHY_DCMMAXBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 6, 2)
  38682. #define WMI_HECAP_PHY_DCMMAXBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 6, 2, value)
  38683. /*
  38684. * For a non-AP STA, indicates support for receiving a DL HE MU PPDU where the number of OFDM symbols
  38685. * in the HE SIG-B field is greater than 16.
  38686. */
  38687. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 8, 1)
  38688. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 8, 1, value)
  38689. /*
  38690. * For an AP, indicates support for the reception of full bandwidth non-triggered CQI-only feedback.
  38691. * For a non-AP STA, indicates support for the transmission of full bandwidth non-triggered CQI-only feedback.
  38692. */
  38693. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 9, 1)
  38694. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 9, 1, value)
  38695. /*
  38696. * For a non-AP STA, indicates support for the transmission of 1024-QAM on a 26-, 52-, and 106-tone RU.
  38697. * Reserved for an AP.
  38698. */
  38699. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 10, 1)
  38700. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 10, 1, value)
  38701. /*
  38702. * Indicates support for the reception of 1024-QAM on a 26-, 52-, and 106-tone RU.
  38703. */
  38704. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 11, 1)
  38705. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 11, 1, value)
  38706. /*
  38707. * Indicates support for reception of an HE MU PPDU with an RU spanning the entire PPDU bandwidth and a
  38708. * compressed HE-SIG-B format.
  38709. */
  38710. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 12, 1)
  38711. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 12, 1, value)
  38712. /*
  38713. * Indicates support for reception of an HE MU PPDU with a bandwidth less than or equal to 80 MHz, an RU
  38714. * spanning the entire PPDU bandwidth and a non-compressed HE-SIG-B format.
  38715. */
  38716. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 13, 1)
  38717. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 13, 1, value)
  38718. /* HE MAC Capabilities Information field format */
  38719. /* HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field */
  38720. #define WMI_HECAP_MAC_HECTRL_GET_D3(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  38721. #define WMI_HECAP_MAC_HECTRL_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  38722. /* set to 1 to for TWT Requestor support */
  38723. #define WMI_HECAP_MAC_TWTREQ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  38724. #define WMI_HECAP_MAC_TWTREQ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  38725. /* set to 1 to for TWT Responder support */
  38726. #define WMI_HECAP_MAC_TWTRSP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  38727. #define WMI_HECAP_MAC_TWTRSP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  38728. /* Level of frag support
  38729. Set to 0 for no support for dynamic fragmentation.
  38730. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  38731. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  38732. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  38733. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  38734. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  38735. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  38736. */
  38737. #define WMI_HECAP_MAC_HEFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  38738. #define WMI_HECAP_MAC_HEFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  38739. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs */
  38740. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  38741. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  38742. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  38743. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  38744. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  38745. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  38746. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  38747. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  38748. /* Indicates the number of TIDs of QoS Data frames that an HE STA can receive in a multi-TID AMPDU */
  38749. #define WMI_HECAP_MAC_MTID_RX_GET_D3(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  38750. #define WMI_HECAP_MAC_MTID_RX_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  38751. /* Indicates support for link adaptation using the HLA Control subfield. */
  38752. #define WMI_HECAP_MAC_HELINK_ADPT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 15, 2)
  38753. #define WMI_HECAP_MAC_HELINK_ADPT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 15, 2, value)
  38754. /* Set to 1 for reception of AllAck support */
  38755. #define WMI_HECAP_MAC_AACK_GET_D3(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  38756. #define WMI_HECAP_MAC_AACK_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  38757. /* Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field */
  38758. #define WMI_HECAP_MAC_TRS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  38759. #define WMI_HECAP_MAC_TRS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  38760. /* Set to 1 if the STA supports the BSR A-Control field functionality.*/
  38761. #define WMI_HECAP_MAC_BSR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  38762. #define WMI_HECAP_MAC_BSR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  38763. /* Set to 1 when the STA supports broadcast TWT functionality.*/
  38764. #define WMI_HECAP_MAC_BCSTTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  38765. #define WMI_HECAP_MAC_BCSTTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  38766. /* Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap */
  38767. #define WMI_HECAP_MAC_32BITBA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  38768. #define WMI_HECAP_MAC_32BITBA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  38769. /* Set to 1 if the STA supports MU cascading operation */
  38770. #define WMI_HECAP_MAC_MUCASCADE_GET_D3(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  38771. #define WMI_HECAP_MAC_MUCASCADE_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  38772. /* Set to 1 when the STA supports reception of this multi-TID A-MPDU format */
  38773. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  38774. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  38775. /* bit 24 - reserved */
  38776. /* Set to 1 if the STA supports reception of the OMI A-Control field */
  38777. #define WMI_HECAP_MAC_OMI_GET_D3(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  38778. #define WMI_HECAP_MAC_OMI_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  38779. /*1 if OFDMA Random Access Supported */
  38780. #define WMI_HECAP_MAC_OFDMARA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  38781. #define WMI_HECAP_MAC_OFDMARA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  38782. /* Maximum AMPDU Length Exponent.
  38783. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  38784. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  38785. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  38786. * padding is not included in this limit.
  38787. */
  38788. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  38789. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  38790. /* A-MSDU Fragmentation Support */
  38791. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  38792. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  38793. /* Flexible TWT Schedule Support */
  38794. #define WMI_HECAP_MAC_FLEXTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  38795. #define WMI_HECAP_MAC_FLEXTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  38796. /* Rx Control Frame to MultiBSS */
  38797. #define WMI_HECAP_MAC_MBSS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  38798. #define WMI_HECAP_MAC_MBSS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  38799. /* 2nd DWORD of HE MAC Capabilities */
  38800. /* BSRP A-MPDU Aggregation
  38801. * maintaining compatibility since we don't support this now so not wasting memory
  38802. */
  38803. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 0, 1)
  38804. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 0, 1, value)
  38805. /* Quiet Time Period (QTP) operation
  38806. * maintaining compatibility since we don't support this now so not wasting memory
  38807. */
  38808. #define WMI_HECAP_MAC_QTP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 1, 1)
  38809. #define WMI_HECAP_MAC_QTP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 1, 1, value)
  38810. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  38811. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  38812. * that contains a BQR in the A-Control subfield
  38813. * maintaining compatibility since we don't support this now so not wasting memory
  38814. */
  38815. #define WMI_HECAP_MAC_ABQR_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 2, 1)
  38816. #define WMI_HECAP_MAC_ABQR_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 2, 1, value)
  38817. /* Indicates support by the STA for the role of SRP Responder.*/
  38818. #define WMI_HECAP_MAC_SRPRESP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 3, 1)
  38819. #define WMI_HECAP_MAC_SRPRESP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 3, 1, value)
  38820. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  38821. * the NDP Feedback Report Poll Trigger frame.
  38822. */
  38823. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 4, 1)
  38824. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 4, 1, value)
  38825. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  38826. * frames or TIM frames as described in AP operation for opportunistic power save.
  38827. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  38828. */
  38829. #define WMI_HECAP_MAC_OPS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 5, 1)
  38830. #define WMI_HECAP_MAC_OPS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 5, 1, value)
  38831. /* Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  38832. * a QoS Data frame for which no block ack agreement exists.
  38833. */
  38834. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 6, 1)
  38835. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 6, 1, value)
  38836. /* Indicates the number of TIDs of QoS Data frames that an HE STA can transmit in a multi-TID AMPDU */
  38837. #define WMI_HECAP_MAC_MTID_TX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 7, 3)
  38838. #define WMI_HECAP_MAC_MTID_TX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 7, 3, value)
  38839. /* Indicates whether an HE STA supports an HE subchannel selective transmission operation */
  38840. #define WMI_HECAP_MAC_SUBCHANSELTX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 10, 1)
  38841. #define WMI_HECAP_MAC_SUBCHANSELTX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 10, 1, value)
  38842. /* Indicates support by a STA to receive a TRS Control subfield or a Trigger frame with a User Info
  38843. * field addressed to the STA with the RU Allocation subfield of the TRS Control subfield or the User
  38844. * Info field indicating 2x996-tone.
  38845. */
  38846. #define WMI_HECAP_MAC_UL2X996RU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 11, 1)
  38847. #define WMI_HECAP_MAC_UL2X996RU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 11, 1, value)
  38848. /* Indicates whether an AP supports interpretation of the UL MU Data Disable subfield of the OM Control subfield */
  38849. #define WMI_HECAP_MAC_OMCULMUDDIS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 12, 1)
  38850. #define WMI_HECAP_MAC_OMCULMUDDIS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 12, 1, value)
  38851. /* Indicates the spatial multiplexing power save mode after receiving a
  38852. * Trigger frame that is in operation immediately after (re)association.
  38853. */
  38854. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 13, 1)
  38855. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 13, 1, value)
  38856. /* Indicates support for Punctured Sounding */
  38857. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 14, 1)
  38858. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 14, 1, value)
  38859. /* Indicates support for receiving a Trigger frame in an HT PPDU and
  38860. * receiving a Trigger frame in a VHT PPDU
  38861. */
  38862. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 15, 1)
  38863. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 15, 1, value)
  38864. /*
  38865. * The following conditionally-defined macros can be used in systems
  38866. * which only support either 802.11ax draft 2 or 802.11ax draft 3,
  38867. * but not both, and which make this D2 vs. D3 selection at build time.
  38868. */
  38869. #ifdef SUPPORT_11AX_D3
  38870. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D3
  38871. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D3
  38872. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D3
  38873. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D3
  38874. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D3
  38875. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D3
  38876. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_REQUIRED_GET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET */
  38877. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_REQUIRED_SET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET */
  38878. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D3
  38879. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D3
  38880. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D3
  38881. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D3
  38882. #define WMI_HEOPS_COLOCBSS_GET WMI_HEOPS_COLOCBSS_GET_D3
  38883. #define WMI_HEOPS_COLOCBSS_SET WMI_HEOPS_COLOCBSS_SET_D3
  38884. #define WMI_HEOPS_VHTOPSPRSNT_GET WMI_HEOPS_VHTOPSPRSNT_GET_D3
  38885. #define WMI_HEOPS_VHTOPSPRSNT_SET WMI_HEOPS_VHTOPSPRSNT_SET_D3
  38886. #define WMI_HEOPS_ERSUDIS_GET WMI_HEOPS_ERSUDIS_GET_D3
  38887. #define WMI_HEOPS_ERSUDIS_SET WMI_HEOPS_ERSUDIS_SET_D3
  38888. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D3
  38889. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D3
  38890. #define WMI_HEOPS_TXBSSID_GET(he_ops) (0) /* DEPRECATED - DO NOT USE */
  38891. #define WMI_HEOPS_TXBSSID_SET(he_ops, value) /* DEPRECATED - DO NOT USE */
  38892. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D3
  38893. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D3
  38894. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3
  38895. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3
  38896. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D3
  38897. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D3
  38898. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D3
  38899. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D3
  38900. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  38901. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  38902. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  38903. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  38904. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D3
  38905. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D3
  38906. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3
  38907. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3
  38908. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D3
  38909. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D3
  38910. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D3
  38911. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D3
  38912. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D3
  38913. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D3
  38914. #define WMI_HECAP_PHY_TXDOPPLER WMI_HECAP_PHY_TXDOPPLER_GET_D3
  38915. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D3
  38916. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D3
  38917. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D3
  38918. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D3
  38919. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D3
  38920. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3
  38921. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3
  38922. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D3
  38923. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D3
  38924. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D3
  38925. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D3
  38926. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  38927. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCMRX_GET_D3
  38928. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCMRX_SET_D3
  38929. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D3
  38930. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D3
  38931. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D3
  38932. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D3
  38933. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D3
  38934. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D3
  38935. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D3
  38936. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D3
  38937. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  38938. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  38939. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  38940. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  38941. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  38942. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  38943. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  38944. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  38945. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3
  38946. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3
  38947. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3
  38948. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3
  38949. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3
  38950. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3
  38951. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3
  38952. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3
  38953. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D3
  38954. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D3
  38955. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D3
  38956. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D3
  38957. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3
  38958. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3
  38959. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D3
  38960. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D3
  38961. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3
  38962. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3
  38963. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D3
  38964. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D3
  38965. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D3
  38966. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D3
  38967. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D3
  38968. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D3
  38969. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3
  38970. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3
  38971. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D3
  38972. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D3
  38973. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D3
  38974. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D3
  38975. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D3
  38976. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D3
  38977. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3
  38978. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3
  38979. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3
  38980. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3
  38981. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3
  38982. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3
  38983. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3
  38984. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3
  38985. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3
  38986. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3
  38987. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3
  38988. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3
  38989. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET /* DEPRECATED */
  38990. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET /* DEPRECATED */
  38991. #define WMI_HECAP_PHY_DCMMAXBW_GET WMI_HECAP_PHY_DCMMAXBW_GET_D3
  38992. #define WMI_HECAP_PHY_DCMMAXBW_SET WMI_HECAP_PHY_DCMMAXBW_SET_D3
  38993. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3
  38994. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3
  38995. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3
  38996. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3
  38997. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3
  38998. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3
  38999. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3
  39000. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3
  39001. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3
  39002. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3
  39003. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3
  39004. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3
  39005. #define WMI_HECAP_PHY_DB_GET(he_phy_cap) (0) /* DEPRECATED - DO NOT USE */
  39006. #define WMI_HECAP_PHY_DB_SET(he_phy_cap, value) /* DEPRECATED - DO NOT USE */
  39007. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D3
  39008. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D3
  39009. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D3
  39010. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D3
  39011. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D3
  39012. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D3
  39013. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D3
  39014. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D3
  39015. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3
  39016. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3
  39017. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D3
  39018. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D3
  39019. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D3
  39020. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D3
  39021. #define WMI_HECAP_MAC_MTID_RX_GET WMI_HECAP_MAC_MTID_RX_GET_D3
  39022. #define WMI_HECAP_MAC_MTID_RX_SET WMI_HECAP_MAC_MTID_RX_SET_D3
  39023. #define WMI_HECAP_MAC_HELINK_ADPT_GET WMI_HECAP_MAC_HELINK_ADPT_GET_D3
  39024. #define WMI_HECAP_MAC_HELINK_ADPT_SET WMI_HECAP_MAC_HELINK_ADPT_SET_D3
  39025. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D3
  39026. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D3
  39027. #define WMI_HECAP_MAC_TRS_GET WMI_HECAP_MAC_TRS_GET_D3
  39028. #define WMI_HECAP_MAC_TRS_SET WMI_HECAP_MAC_TRS_SET_D3
  39029. #define WMI_HECAP_MAC_ULMURSP_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  39030. #define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  39031. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D3
  39032. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D3
  39033. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D3
  39034. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D3
  39035. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D3
  39036. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D3
  39037. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D3
  39038. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D3
  39039. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3
  39040. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3
  39041. #define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  39042. #define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  39043. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D3
  39044. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D3
  39045. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D3
  39046. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D3
  39047. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3
  39048. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3
  39049. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D3
  39050. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D3
  39051. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D3
  39052. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D3
  39053. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D3
  39054. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D3
  39055. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D3
  39056. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D3
  39057. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D3
  39058. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D3
  39059. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D3
  39060. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D3
  39061. #define WMI_HECAP_MAC_SRPRESP_GET WMI_HECAP_MAC_SRPRESP_GET_D3
  39062. #define WMI_HECAP_MAC_SRPRESP_SET WMI_HECAP_MAC_SRPRESP_SET_D3
  39063. #define WMI_HECAP_MAC_SRRESP_GET(he_cap2) (0) /* DEPRECATED, DO NOT USE */
  39064. #define WMI_HECAP_MAC_SRRESP_SET(he_cap2, value) /* DEPRECATED, DO NOT USE */
  39065. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D3
  39066. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D3
  39067. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D3
  39068. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D3
  39069. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3
  39070. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3
  39071. #define WMI_HECAP_MAC_MTID_TX_GET WMI_HECAP_MAC_MTID_TX_GET_D3
  39072. #define WMI_HECAP_MAC_MTID_TX_SET WMI_HECAP_MAC_MTID_TX_SET_D3
  39073. #define WMI_HECAP_MAC_SUBCHANSELTX_GET WMI_HECAP_MAC_SUBCHANSELTX_GET_D3
  39074. #define WMI_HECAP_MAC_SUBCHANSELTX_SET WMI_HECAP_MAC_SUBCHANSELTX_SET_D3
  39075. #define WMI_HECAP_MAC_UL2X996RU_GET WMI_HECAP_MAC_UL2X996RU_GET_D3
  39076. #define WMI_HECAP_MAC_UL2X996RU_SET WMI_HECAP_MAC_UL2X996RU_SET_D3
  39077. #define WMI_HECAP_MAC_OMCULMUDDIS_GET WMI_HECAP_MAC_OMCULMUDDIS_GET_D3
  39078. #define WMI_HECAP_MAC_OMCULMUDDIS_SET WMI_HECAP_MAC_OMCULMUDDIS_SET_D3
  39079. #define WMI_HECAP_MAC_HELKAD_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  39080. #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  39081. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3 /* DEPRECATED - DO NOT USE */
  39082. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3 /* DEPRECATED - DO NOT USE */
  39083. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3
  39084. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3
  39085. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D3
  39086. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D3
  39087. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3
  39088. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3
  39089. #else /* SUPPORT_11AX_D3 vs. D2 */
  39090. /* D2 and D2- */
  39091. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D2
  39092. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D2
  39093. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D2
  39094. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D2
  39095. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D2
  39096. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D2
  39097. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_GET_D2 /* Deprecated */
  39098. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_SET_D2 /* Deprecated */
  39099. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D2
  39100. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D2
  39101. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D2
  39102. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D2
  39103. #define WMI_HEOPS_MAXBSSID_GET WMI_HEOPS_MAXBSSID_GET_D2
  39104. #define WMI_HEOPS_MAXBSSID_SET WMI_HEOPS_MAXBSSID_SET_D2
  39105. #define WMI_HEOPS_TXBSSID_GET WMI_HEOPS_TXBSSID_GET_D2
  39106. #define WMI_HEOPS_TXBSSID_SET WMI_HEOPS_TXBSSID_SET_D2
  39107. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D2
  39108. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D2
  39109. #define WMI_HEOPS_DUALBEACON_GET WMI_HEOPS_DUALBEACON_GET_D2
  39110. #define WMI_HEOPS_DUALBEACON_SET WMI_HEOPS_DUALBEACON_SET_D2
  39111. #define WMI_HECAP_PHY_DB_GET WMI_HECAP_PHY_DB_GET_D2
  39112. #define WMI_HECAP_PHY_DB_SET WMI_HECAP_PHY_DB_SET_D2
  39113. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D2
  39114. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D2
  39115. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2
  39116. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2
  39117. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D2
  39118. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D2
  39119. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D2
  39120. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D2
  39121. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_TXLDPC_GET_D2
  39122. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_TXLDPC_SET_D2
  39123. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_RXLDPC_GET_D2
  39124. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_RXLDPC_SET_D2
  39125. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D2
  39126. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D2
  39127. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2
  39128. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2
  39129. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D2
  39130. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D2
  39131. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D2
  39132. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D2
  39133. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D2
  39134. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D2
  39135. #define WMI_HECAP_PHY_TXDOPPLER_GET WMI_HECAP_PHY_TXDOPPLER_GET_D2
  39136. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D2
  39137. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D2
  39138. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D2
  39139. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D2
  39140. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D2
  39141. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  39142. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  39143. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D2
  39144. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D2
  39145. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D2
  39146. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D2
  39147. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D2
  39148. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D2
  39149. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D2
  39150. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D2
  39151. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D2
  39152. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D2
  39153. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D2
  39154. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D2
  39155. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2
  39156. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2
  39157. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2
  39158. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2
  39159. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2
  39160. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2
  39161. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2
  39162. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2
  39163. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2
  39164. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2
  39165. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2
  39166. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2
  39167. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D2
  39168. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D2
  39169. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D2
  39170. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D2
  39171. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2
  39172. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2
  39173. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D2
  39174. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D2
  39175. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2
  39176. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2
  39177. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D2
  39178. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D2
  39179. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D2
  39180. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D2
  39181. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D2
  39182. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D2
  39183. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2
  39184. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2
  39185. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D2
  39186. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D2
  39187. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D2
  39188. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D2
  39189. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D2
  39190. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D2
  39191. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2
  39192. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2
  39193. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2
  39194. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2
  39195. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2
  39196. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2
  39197. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2
  39198. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2
  39199. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2
  39200. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2
  39201. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2
  39202. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2
  39203. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D2
  39204. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D2
  39205. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D2
  39206. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D2
  39207. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D2
  39208. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D2
  39209. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D2
  39210. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D2
  39211. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2
  39212. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2
  39213. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D2
  39214. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D2
  39215. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D2
  39216. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D2
  39217. #define WMI_HECAP_MAC_MTID_GET WMI_HECAP_MAC_MTID_GET_D2
  39218. #define WMI_HECAP_MAC_MTID_SET WMI_HECAP_MAC_MTID_SET_D2
  39219. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2
  39220. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2
  39221. #define WMI_HECAP_MAC_HELKAD_GET WMI_HECAP_MAC_HELKAD_GET_D2
  39222. #define WMI_HECAP_MAC_HELKAD_SET WMI_HECAP_MAC_HELKAD_SET_D2
  39223. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D2
  39224. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D2
  39225. #define WMI_HECAP_MAC_ULMURSP_GET WMI_HECAP_MAC_ULMURSP_GET_D2
  39226. #define WMI_HECAP_MAC_ULMURSP_SET WMI_HECAP_MAC_ULMURSP_SET_D2
  39227. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D2
  39228. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D2
  39229. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D2
  39230. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D2
  39231. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D2
  39232. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D2
  39233. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D2
  39234. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D2
  39235. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2
  39236. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2
  39237. #define WMI_HECAP_MAC_GROUPMSTABA_GET WMI_HECAP_MAC_GROUPMSTABA_GET_D2
  39238. #define WMI_HECAP_MAC_GROUPMSTABA_SET WMI_HECAP_MAC_GROUPMSTABA_SET_D2
  39239. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D2
  39240. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D2
  39241. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D2
  39242. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D2
  39243. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2
  39244. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2
  39245. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D2
  39246. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D2
  39247. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D2
  39248. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D2
  39249. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D2
  39250. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D2
  39251. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D2
  39252. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D2
  39253. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D2
  39254. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D2
  39255. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D2
  39256. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D2
  39257. #define WMI_HECAP_MAC_SRRESP_GET WMI_HECAP_MAC_SRRESP_GET_D2
  39258. #define WMI_HECAP_MAC_SRRESP_SET WMI_HECAP_MAC_SRRESP_SET_D2
  39259. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D2
  39260. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D2
  39261. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D2
  39262. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D2
  39263. #define WMI_HECAP_MAC_MBAHECTRL_GET WMI_HECAP_MAC_MBAHECTRL_GET_D2
  39264. #define WMI_HECAP_MAC_MBAHECTRL_SET WMI_HECAP_MAC_MBAHECTRL_SET_D2
  39265. #define WMI_HECAP_MAC_MURTS_GET WMI_HECAP_MAC_MURTS_GET_D2
  39266. #define WMI_HECAP_MAC_MURTS_SET WMI_HECAP_MAC_MURTS_SET_D2
  39267. #define WMI_HECAP_PHY_CBMODE_GET WMI_HECAP_PHY_CBMODE_GET_D2
  39268. #define WMI_HECAP_PHY_CBMODE_SET WMI_HECAP_PHY_CBMODE_SET_D2
  39269. #define WMI_HECAP_PHY_OLTF_GET WMI_HECAP_PHY_OLTF_GET_D2
  39270. #define WMI_HECAP_PHY_OLTF_SET WMI_HECAP_PHY_OLTF_SET_D2
  39271. #define WMI_HECAP_PHY_SUBFMESTS_GET WMI_HECAP_PHY_SUBFMESTS_GET_D2
  39272. #define WMI_HECAP_PHY_SUBFMESTS_SET WMI_HECAP_PHY_SUBFMESTS_SET_D2
  39273. #define WMI_HECAP_PHY_PADDING_GET WMI_HECAP_PHY_PADDING_GET_D2
  39274. #define WMI_HECAP_PHY_PADDING_SET WMI_HECAP_PHY_PADDING_SET_D2
  39275. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2
  39276. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2
  39277. #define WMI_HECAP_PHY_32GI_GET WMI_HECAP_PHY_32GI_GET_D2
  39278. #define WMI_HECAP_PHY_32GI_SET WMI_HECAP_PHY_32GI_SET_D2
  39279. #define WMI_HECAP_PHY_NOSUNDIMENS_GET WMI_HECAP_PHY_NOSUNDIMENS_GET_D2
  39280. #define WMI_HECAP_PHY_NOSUNDIMENS_SET WMI_HECAP_PHY_NOSUNDIMENS_SET_D2
  39281. #define WMI_HECAP_PHY_40MHZNSS_GET WMI_HECAP_PHY_40MHZNSS_GET_D2
  39282. #define WMI_HECAP_PHY_40MHZNSS_SET WMI_HECAP_PHY_40MHZNSS_SET_D2
  39283. #define WMI_HECAP_PHY_ULOFDMA_GET WMI_HECAP_PHY_ULOFDMA_GET_D2
  39284. #define WMI_HECAP_PHY_ULOFDMA_SET WMI_HECAP_PHY_ULOFDMA_SET_D2
  39285. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCM_GET_D2
  39286. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCM_SET_D2
  39287. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2
  39288. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2
  39289. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2
  39290. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2
  39291. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2
  39292. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2
  39293. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D2
  39294. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D2
  39295. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2
  39296. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2
  39297. #endif /* SUPPORT_11AX_D3 */
  39298. /****** 11BE EHT PHY Capabilities Information field ******/
  39299. /* Bit 0: reserved */
  39300. /* Bit 1: support for 320Mhz in 6 GHz */
  39301. #define WMI_EHTCAP_PHY_320MHZIN6GHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 1, 1)
  39302. #define WMI_EHTCAP_PHY_320MHZIN6GHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 1, 1, value)
  39303. /* Bit 2: support for 242-tone RU in BW wider than 20Mhz */
  39304. #define WMI_EHTCAP_PHY_242TONERUBWLT20MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 2, 1)
  39305. #define WMI_EHTCAP_PHY_242TONERUBWLT20MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 2, 1, value)
  39306. /* Bit 3: NDP with 4x EHT-LTF and 3.2us GI */
  39307. #define WMI_EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 3, 1)
  39308. #define WMI_EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 3, 1, value)
  39309. /* Bit 4: partial bandwidth UL MU-MIMO */
  39310. #define WMI_EHTCAP_PHY_PARTIALBWULMU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 4, 1)
  39311. #define WMI_EHTCAP_PHY_PARTIALBWULMU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 4, 1, value)
  39312. /* Bit 5: SU beamformer */
  39313. #define WMI_EHTCAP_PHY_SUBFMR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 5, 1)
  39314. #define WMI_EHTCAP_PHY_SUBFMR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 5, 1, value)
  39315. /* Bit 6: SU beamformee */
  39316. #define WMI_EHTCAP_PHY_SUBFME_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 6, 1)
  39317. #define WMI_EHTCAP_PHY_SUBFME_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 6, 1, value)
  39318. /* Bit 7-9: beamformee SS (<=80Mhz) */
  39319. #define WMI_EHTCAP_PHY_BFMESSLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 7, 3)
  39320. #define WMI_EHTCAP_PHY_BFMESSLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 7, 3, value)
  39321. /* Bit 10-12: beamformee SS (=160Mhz) */
  39322. #define WMI_EHTCAP_PHY_BFMESS160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 10, 3)
  39323. #define WMI_EHTCAP_PHY_BFMESS160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 10, 3, value)
  39324. /* Bit 13-15: beamformee SS (=320Mhz) */
  39325. #define WMI_EHTCAP_PHY_BFMESS320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 13, 3)
  39326. #define WMI_EHTCAP_PHY_BFMESS320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 13, 3, value)
  39327. /* Bit 16-18: number of sounding dimensions (<=80Mhz) */
  39328. #define WMI_EHTCAP_PHY_NUMSOUNDLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 16, 3)
  39329. #define WMI_EHTCAP_PHY_NUMSOUNDLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 16, 3, value)
  39330. /* Bit 19-21: number of sounding dimensions (=160Mhz) */
  39331. #define WMI_EHTCAP_PHY_NUMSOUND160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 19, 3)
  39332. #define WMI_EHTCAP_PHY_NUMSOUND160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 19, 3, value)
  39333. /* Bit 22-24: number of sounding dimensions (=320Mhz) */
  39334. #define WMI_EHTCAP_PHY_NUMSOUND320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 22, 3)
  39335. #define WMI_EHTCAP_PHY_NUMSOUND320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 22, 3, value)
  39336. /* Bit 25: ng = 16 SU feedback */
  39337. #define WMI_EHTCAP_PHY_NG16SUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 25, 1)
  39338. #define WMI_EHTCAP_PHY_NG16SUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 25, 1, value)
  39339. /* Bit 26: ng = 16 MU feedback */
  39340. #define WMI_EHTCAP_PHY_NG16MUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 26, 1)
  39341. #define WMI_EHTCAP_PHY_NG16MUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 26, 1, value)
  39342. /* Bit 27: codebook size {4,2} SU feedback */
  39343. #define WMI_EHTCAP_PHY_CODBK42SUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 27, 1)
  39344. #define WMI_EHTCAP_PHY_CODBK42SUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 27, 1, value)
  39345. /* Bit 28: codebook size {7,5} MU feedback */
  39346. #define WMI_EHTCAP_PHY_CODBK75MUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 28, 1)
  39347. #define WMI_EHTCAP_PHY_CODBK75MUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 28, 1, value)
  39348. /* Bit 29: triggered SU beamforming feedback */
  39349. #define WMI_EHTCAP_PHY_TRIGSUBFFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 29, 1)
  39350. #define WMI_EHTCAP_PHY_TRIGSUBFFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 29, 1, value)
  39351. /* Bit 30: triggered MU beamforming partial BW feedback */
  39352. #define WMI_EHTCAP_PHY_TRIGMUBFPARTBWFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 30, 1)
  39353. #define WMI_EHTCAP_PHY_TRIGMUBFPARTBWFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 30, 1, value)
  39354. /* Bit 31: triggered CQI feedback */
  39355. #define WMI_EHTCAP_PHY_TRIGCQIFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 31, 1)
  39356. #define WMI_EHTCAP_PHY_TRIGCQIFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 31, 1, value)
  39357. /* Bit 32: partial bandwidth DL MU-MIMO */
  39358. #define WMI_EHTCAP_PHY_PARTBWDLMUMIMO_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 0, 1)
  39359. #define WMI_EHTCAP_PHY_PARTBWDLMUMIMO_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 0, 1, value)
  39360. /* Bit 33: PSR-based SR support */
  39361. #define WMI_EHTCAP_PHY_PSRSR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 1, 1)
  39362. #define WMI_EHTCAP_PHY_PSRSR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 1, 1, value)
  39363. /* Bit 34: power boost factor support */
  39364. #define WMI_EHTCAP_PHY_PWRBSTFACTOR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 2, 1)
  39365. #define WMI_EHTCAP_PHY_PWRBSTFACTOR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 2, 1, value)
  39366. /* Bit 35: EHT MU PPDU with 4xEHT-LTF and 0.8us GI */
  39367. #define WMI_EHTCAP_PHY_4XEHTLTFAND800NSGI_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 3, 1)
  39368. #define WMI_EHTCAP_PHY_4XEHTLTFAND800NSGI_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 3, 1, value)
  39369. /* Bit 36-39: max NC */
  39370. #define WMI_EHTCAP_PHY_MAXNC_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 4, 4)
  39371. #define WMI_EHTCAP_PHY_MAXNC_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 4, 4, value)
  39372. /* Bit 40: non-triggered CQI feedback */
  39373. #define WMI_EHTCAP_PHY_NONTRIGCQIFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 8, 1)
  39374. #define WMI_EHTCAP_PHY_NONTRIGCQIFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 8, 1, value)
  39375. /* Bit 41: Tx 1024-QAM and 4096-QAM < 242-tone RU support */
  39376. #define WMI_EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 9, 1)
  39377. #define WMI_EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 9, 1, value)
  39378. /* Bit 42: Rx 1024-QAM and 4096-QAM < 242-tone RU support */
  39379. #define WMI_EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 10, 1)
  39380. #define WMI_EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 10, 1, value)
  39381. /* Bit 43: PPE thresholds present */
  39382. #define WMI_EHTCAP_PHY_PPETHRESPRESENT_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 11, 1)
  39383. #define WMI_EHTCAP_PHY_PPETHRESPRESENT_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 11, 1, value)
  39384. /* Bit 44-45: common nominal packet padding */
  39385. #define WMI_EHTCAP_PHY_CMNNOMPKTPAD_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 12, 2)
  39386. #define WMI_EHTCAP_PHY_CMNNOMPKTPAD_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 12, 2, value)
  39387. /* Bit 46-50: max number of supported EHT-LTFs */
  39388. #define WMI_EHTCAP_PHY_MAXNUMEHTLTF_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 14, 5)
  39389. #define WMI_EHTCAP_PHY_MAXNUMEHTLTF_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 14, 5, value)
  39390. /* Bit 51-54: support of MCS 15 */
  39391. #define WMI_EHTCAP_PHY_SUPMCS15_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 19, 4)
  39392. #define WMI_EHTCAP_PHY_SUPMCS15_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 19, 4, value)
  39393. /* Bit 55: support of EHT DUP in 6 GHz */
  39394. #define WMI_EHTCAP_PHY_EHTDUPIN6GHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 23, 1)
  39395. #define WMI_EHTCAP_PHY_EHTDUPIN6GHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 23, 1, value)
  39396. /* Bit 56: support for 20Mhz operating STA receiving NDP with wider bandwidth */
  39397. #define WMI_EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 24, 1)
  39398. #define WMI_EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 24, 1, value)
  39399. /* Bit 57: non-OFDMA UL MU-MIMO (bw <= 80Mhz) */
  39400. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 25, 1)
  39401. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 25, 1, value)
  39402. /* Bit 58: non-OFDMA UL MU-MIMO (bw = 160Mhz) */
  39403. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 26, 1)
  39404. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 26, 1, value)
  39405. /* Bit 59: non-OFDMA UL MU-MIMO (bw = 320Mhz) */
  39406. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 27, 1)
  39407. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 27, 1, value)
  39408. /* Bit 60: MU beamformer (bw <= 80Mhz) */
  39409. #define WMI_EHTCAP_PHY_MUBFMRLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 28, 1)
  39410. #define WMI_EHTCAP_PHY_MUBFMRLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 28, 1, value)
  39411. /* Bit 61: MU beamformer (bw = 160Mhz) */
  39412. #define WMI_EHTCAP_PHY_MUBFMR160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 29, 1)
  39413. #define WMI_EHTCAP_PHY_MUBFMR160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 29, 1, value)
  39414. /* Bit 62: MU beamformer (bw = 320Mhz) */
  39415. #define WMI_EHTCAP_PHY_MUBFMR320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 30, 1)
  39416. #define WMI_EHTCAP_PHY_MUBFMR320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 30, 1, value)
  39417. /* Bit 63: TB sounding feedback rate limit */
  39418. #define WMI_EHTCAP_PHY_TBSUNDFBRATELIMIT_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 31, 1)
  39419. #define WMI_EHTCAP_PHY_TBSUNDFBRATELIMIT_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 31, 1, value)
  39420. /* Bit 64: Rx 1024-QAM in wider bandwidth DL OFDMA support */
  39421. #define WMI_EHTCAP_PHY_RX1024QAMWIDERBWDLOFDMA_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 0, 1)
  39422. #define WMI_EHTCAP_PHY_RX1024QAMWIDERBWDLOFDMA_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 0, 1, value)
  39423. /* Bit 65: Rx 4096-QAM in wider bandwidth DL OFDMA support */
  39424. #define WMI_EHTCAP_PHY_RX4096QAMWIDERBWDLOFDMA_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 1, 1)
  39425. #define WMI_EHTCAP_PHY_RX4096QAMWIDERBWDLOFDMA_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 1, 1, value)
  39426. /* Bit 66: 20Mhz-only limited capabilities support */
  39427. #define WMI_EHTCAP_PHY_20MHZ_ONLY_CAPS_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 2, 1)
  39428. #define WMI_EHTCAP_PHY_20MHZ_ONLY_CAPS_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 2, 1, value)
  39429. /* Bit 67: 20Mhz-only triggered MU beamforming full BW feedback and DL MU-MIMO */
  39430. #define WMI_EHTCAP_PHY_20MHZ_ONLY_TRIGGER_MUBF_FULL_BW_FB_AND_DLMUMIMO_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 3, 1)
  39431. #define WMI_EHTCAP_PHY_20MHZ_ONLY_TRIGGER_MUBF_FULL_BW_FB_AND_DLMUMIMO_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 3, 1, value)
  39432. /* Bit 68: 20Mhz-only M-RU support */
  39433. #define WMI_EHTCAP_PHY_20MHZ_ONLY_MRU_SUPP_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 4, 1)
  39434. #define WMI_EHTCAP_PHY_20MHZ_ONLY_MRU_SUPP_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 4, 1, value)
  39435. /* Bits 69-71: reserved */
  39436. /****** End of 11BE EHT PHY Capabilities Information field ******/
  39437. /****** 11BE EHT MAC Capabilities Information field ******/
  39438. /* Bit 0: NSEP/EPCS priority access supported: draft1.4 change the name from NSEP to EPCS
  39439. * To compatible with <= draft 1.4 ver, we keep 2 define there, but same bit.
  39440. */
  39441. #define WMI_EHTCAP_MAC_NSEPPRIACCESS_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 0, 1)
  39442. #define WMI_EHTCAP_MAC_NSEPPRIACCESS_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 0, 1, value)
  39443. #define WMI_EHTCAP_MAC_EPCSPRIACCESS_GET(eht_cap_mac) WMI_EHTCAP_MAC_NSEPPRIACCESS_GET(eht_cap_mac)
  39444. #define WMI_EHTCAP_MAC_EPCSPRIACCESS_SET(eht_cap_mac, value) WMI_EHTCAP_MAC_NSEPPRIACCESS_SET(eht_cap_mac, value)
  39445. /* Bit 1: EHT OM control support */
  39446. #define WMI_EHTCAP_MAC_EHTOMCTRL_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 1, 1)
  39447. #define WMI_EHTCAP_MAC_EHTOMCTRL_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 1, 1, value)
  39448. /* Bit 2: triggered TXOP mode 1 support
  39449. * As in draft 1.4, we define mode2 and to compatible with old version, we keep 2 define there, but same bit.
  39450. */
  39451. #define WMI_EHTCAP_MAC_TRIGTXOP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 2, 1)
  39452. #define WMI_EHTCAP_MAC_TRIGTXOP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 2, 1, value)
  39453. #define WMI_EHTCAP_MAC_TRIGTXOPMODE1_GET(eht_cap_mac) WMI_EHTCAP_MAC_TRIGTXOP_GET(eht_cap_mac)
  39454. #define WMI_EHTCAP_MAC_TRIGTXOPMODE1_SET(eht_cap_mac, value) WMI_EHTCAP_MAC_TRIGTXOP_SET(eht_cap_mac, value)
  39455. /* Bit 3: triggered TXOP mode 2 support */
  39456. #define WMI_EHTCAP_MAC_TRIGTXOPMODE2_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 3, 1)
  39457. #define WMI_EHTCAP_MAC_TRIGTXOPMODE2_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 3, 1, value)
  39458. /* Bit 4: restricted TWT support */
  39459. #define WMI_EHTCAP_MAC_RESTRICTTWT_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 4, 1)
  39460. #define WMI_EHTCAP_MAC_RESTRICTTWT_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 4, 1, value)
  39461. /* Bit 5: SCS traffic description support */
  39462. #define WMI_EHTCAP_MAC_SCSTRAFFICDESC_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 5, 1)
  39463. #define WMI_EHTCAP_MAC_SCSTRAFFICDESC_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 5, 1, value)
  39464. /* Bit 6-7: maximum MPDU length */
  39465. #define WMI_EHTCAP_MAC_MAXMPDULEN_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 6, 2)
  39466. #define WMI_EHTCAP_MAC_MAXMPDULEN_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 6, 2, value)
  39467. /* Bit 8: Maximum A-MPDU Length Exponent Extension */
  39468. #define WMI_EHTCAP_MAC_MAXAMPDULEN_EXP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 8, 1)
  39469. #define WMI_EHTCAP_MAC_MAXAMPDULEN_EXP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 8, 1, value)
  39470. /* Bit 9: EHT TRS support */
  39471. #define WMI_EHTCAP_MAC_TRS_SUPPORT_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 9, 1)
  39472. #define WMI_EHTCAP_MAC_TRS_SUPPORT_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 9, 1, value)
  39473. /* Bit 10: TXOP return support in txop sharing mode 2 */
  39474. #define WMI_EHTCAP_MAC_TXOP_RETURN_SUPP_IN_SHARINGMODE2_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 10, 1)
  39475. #define WMI_EHTCAP_MAC_TXOP_RETURN_SUPP_IN_SHARINGMODE2_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 10, 1, value)
  39476. /* Bit 11: two BQRs support */
  39477. #define WMI_EHTCAP_MAC_TWO_BQRS_SUPP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 11, 1)
  39478. #define WMI_EHTCAP_MAC_TWO_BQRS_SUPP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 11, 1, value)
  39479. /* Bit 12-13: EHT link adaptation support */
  39480. #define WMI_EHTCAP_MAC_EHT_LINK_ADAPTATION_SUPP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 12, 2)
  39481. #define WMI_EHTCAP_MAC_EHT_LINK_ADAPTATION_SUPP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 12, 2, value)
  39482. /* Bit 14-15: reserved */
  39483. /****** End of 11BE EHT MAC Capabilities Information field ******/
  39484. typedef struct {
  39485. /** TLV tag and len; tag equals
  39486. * WMITLV_TAG_STRUC_wmi_cfr_capture_event_fixed_param */
  39487. A_UINT32 tlv_header;
  39488. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  39489. A_UINT32 capture_method;
  39490. /* VDEV identifier */
  39491. A_UINT32 vdev_id;
  39492. /* Peer MAC address. In AP mode, this is the address of the connected peer
  39493. * for which CFR capture is needed. In case of STA mode, this is the address
  39494. * of the AP to which the STA is connected
  39495. */
  39496. wmi_mac_addr mac_addr;
  39497. /* primary 20 MHz channel frequency in mhz */
  39498. A_UINT32 chan_mhz;
  39499. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  39500. A_UINT32 bandwidth;
  39501. /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h*/
  39502. A_UINT32 phy_mode;
  39503. /* Center frequency 1 in MHz*/
  39504. A_UINT32 band_center_freq1;
  39505. /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  39506. A_UINT32 band_center_freq2;
  39507. /* Number of spatial streams */
  39508. A_UINT32 sts_count;
  39509. /* Bits 31:0: address of data from wmi_dma_buf_release_entry [31:0] */
  39510. A_UINT32 correlation_info_1;
  39511. /* Bits 11:0: address of data from wmi_dma_buf_release_entry [43:32]
  39512. * Bits 15:12: reserved (set to 0x0)
  39513. * Bits 31:16: hardware PPDU ID [15:0]
  39514. */
  39515. A_UINT32 correlation_info_2;
  39516. /* Bits 1:0: TX status (if any); values defined in enum
  39517. * WMI_FRAME_TX_STATUS
  39518. * Bits 30:2: reserved (set to 0x0)
  39519. * Bit 31: Status of the CFR capture of the peer
  39520. * 1 (True) - Successful; 0 (False) - Not successful
  39521. */
  39522. A_UINT32 status;
  39523. /* Timestamp in microseconds at which the CFR was captured in the hardware.
  39524. * The clock used for this timestamp is private to the target and
  39525. * is not visible to the host i.e., Host can interpret only the
  39526. * relative timestamp deltas from one message to the next,
  39527. * but can't interpret the absolute timestamp from a single message.
  39528. */
  39529. A_UINT32 timestamp_us;
  39530. /*
  39531. * Count of the current CFR capture from FW.
  39532. * This is helpful to identify any drops in FW.
  39533. */
  39534. A_UINT32 counter;
  39535. /* Per chain RSSI of the peer, for up to WMI_MAX_CHAINS.
  39536. * Each chain's entry reports the RSSI for different bands in dBm units.
  39537. * Use WMI_UNIFIED_CHAIN_RSSI_GET to extract the value for a particular
  39538. * band.
  39539. * A band value of 0x80 (-128) is invalid.
  39540. */
  39541. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  39542. /* Carrier frequency offset
  39543. It is Difference between down conversion oscillator frequency at the receiver
  39544. versus carrier frequency of the received signal. To convert to ppm, below
  39545. equation needs to be used. Here, Fc is carrier frequency (primary 20 channel frequency) in Hz:
  39546. PPM = cfo_measurement(13 bits)/((2^13)/(800e-9)/2/Fc*1e6)
  39547. PPM ranges from -40 to +40
  39548. Bits 0 : 0 Set to 1 to indicate cfo measurement value is valid
  39549. Bits 1 : 14 14 bits cfo measurement raw data. 14 bit is signed bit.
  39550. For the above ppm equation , use the first 13 bits to calculate.
  39551. */
  39552. A_UINT32 cfo_measurement_valid :1,
  39553. cfo_measurement :14,
  39554. reserved :17;
  39555. /* RX packet start timestamp.
  39556. * It reports the time the first L-STF ADC sample arrived at RX antenna
  39557. * It is in units of 480 MHz clock, i.e. number of clock cycles at 480 MHz.
  39558. */
  39559. A_UINT32 rx_start_ts;
  39560. /*
  39561. * The rx_ts_reset flag will be set to 1 upon every reset of rx_start_ts.
  39562. */
  39563. A_UINT32 rx_ts_reset;
  39564. /*
  39565. * MCS and Guard Interval.
  39566. * MCS: For legacy mode only
  39567. * 0: 48 Mbps
  39568. * 1: 24 Mbps
  39569. * 2: 12 Mbps
  39570. * 3: 6 Mbps
  39571. * 4: 54 Mbps
  39572. * 5: 36 Mbps
  39573. * 6: 18 Mbps
  39574. * 7: 9 Mbps
  39575. * 8-254: reserved
  39576. * 255: invalid entry
  39577. *
  39578. * GI: For Legacy mode only
  39579. * 0: 0.8 us
  39580. * 1: 0.4 us
  39581. * 2: 1.6 us
  39582. * 3: 3.2 us
  39583. * 4-254: reserved
  39584. * 255: invalid entry
  39585. *
  39586. * Bits 0:7 mcs
  39587. * Bits 8:15 gi_type
  39588. * Bits 16:31 reserved
  39589. */
  39590. A_UINT32 mcs_gi_info;
  39591. } wmi_peer_cfr_capture_event_fixed_param;
  39592. #define WMI_CFR_MCS_GET(mcs_gi_info) \
  39593. WMI_GET_BITS(mcs_gi_info, 0, 8)
  39594. #define WMI_CFR_MCS_SET(mcs_gi_info, value) \
  39595. WMI_SET_BITS(mcs_gi_info, 0, 8, value)
  39596. #define WMI_CFR_GI_TYPE_GET(mcs_gi_info) \
  39597. WMI_GET_BITS(mcs_gi_info, 8, 8)
  39598. #define WMI_CFR_GI_TYPE_SET(mcs_gi_info, value) \
  39599. WMI_SET_BITS(mcs_gi_info, 8, 8, value)
  39600. #define WMI_UNIFIED_CHAIN_PHASE_MASK 0x0000ffff
  39601. #define WMI_UNIFIED_CHAIN_PHASE_GET(tlv, chain_idx) \
  39602. ((A_UINT16) ((tlv)->chain_phase[chain_idx] & WMI_UNIFIED_CHAIN_PHASE_MASK))
  39603. #define WMI_UNIFIED_CHAIN_PHASE_SET(tlv, chain_idx, value) \
  39604. (tlv)->chain_phase[chain_idx] = (WMI_UNIFIED_CHAIN_PHASE_MASK & (value))
  39605. #define WMI_CFR_AGC_GAIN_CHAINS_PER_U32 4
  39606. #define WMI_UNIFIED_AGC_GAIN_MASK 0x000000ff
  39607. #define WMI_UNIFIED_AGC_GAIN_GET(tlv, chain_idx) \
  39608. ((A_UINT8) ((tlv)->agc_gain_index[(chain_idx)/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] >> \
  39609. ((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8) & WMI_UNIFIED_AGC_GAIN_MASK)
  39610. #define WMI_UNIFIED_AGC_GAIN_SET(tlv, chain_idx, value) \
  39611. (tlv)->agc_gain_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] = \
  39612. (tlv)->agc_gain_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] & \
  39613. ~(0xff << (((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8)) | \
  39614. (((value)<<((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8))
  39615. #define WMI_UNIFIED_AGC_GAIN_TBL_IDX_GET(tlv, chain_idx) \
  39616. ((A_UINT8) ((tlv)->agc_gain_tbl_index[(chain_idx)/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] >> \
  39617. ((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8) & WMI_UNIFIED_AGC_GAIN_MASK)
  39618. #define WMI_UNIFIED_AGC_GAIN_TBL_IDX_SET(tlv, chain_idx, value) \
  39619. (tlv)->agc_gain_tbl_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] = \
  39620. (tlv)->agc_gain_tbl_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] & \
  39621. ~(0xff << (((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8)) | \
  39622. (((value)<<((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8))
  39623. typedef struct {
  39624. /** TLV tag and len; tag equals
  39625. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param */
  39626. A_UINT32 tlv_header;
  39627. /* Per chain AoA phase data of the Peer, for up to WMI_MAX_CHAINS.
  39628. * USE WMI_UNIFIED_CHAIN_PHASE_GET to extract the phase value for
  39629. * a particular chain.
  39630. * Only lower 2 bytes will contain phase data for a particular chain.
  39631. * The values in phase data will be from 0 1023 as mapping of
  39632. * 0-359 degrees using the formula -
  39633. * phase data = phase in degrees * 1024 / 360
  39634. *
  39635. * Target will set 0xFFFF for all invalid chains.
  39636. *
  39637. * The WMI_UNIFIED_CHAIN_PHASE_GET/SET macros can be used to access
  39638. * the valid portion of the 4-byte word containing the chain phase data.
  39639. */
  39640. A_UINT32 chain_phase[WMI_MAX_CHAINS];
  39641. /* agc_gain_index
  39642. * It shows an index in the AGC gain LUT.
  39643. * agc gain should be in range between 0 to 62.
  39644. * 4 AGC gain index values are packed into each A_UINT32 word;
  39645. * use the WMI_UNITIFED_AGC_GAIN_GET/SET macros to read/write
  39646. * the AGC gain indices for individual chains.
  39647. */
  39648. A_UINT32 agc_gain_index[WMI_MAX_CHAINS/WMI_CFR_AGC_GAIN_CHAINS_PER_U32];
  39649. /*
  39650. * Each chain is provided with 8 bits within agc_gain_tbl_index.
  39651. * The value for each of these 8-bit portions is between 0 to 2:
  39652. * 0 : Default Gain Table
  39653. * 1 : Low RF Gain Table.
  39654. * Low gain applied at RF as compared to gains applied when
  39655. * gain_table _idx = 0 is selected.
  39656. * 2 : Very Low RF Gain Table.
  39657. * It's similar to above with even lower gains applied.
  39658. *
  39659. * AoA should use the normal/regular GLUT, thus GAIN_TABLE_IDX
  39660. * should always be 0. If it is not 0, it means that there was
  39661. * out-of-band blocker causing the hardware to pick a different
  39662. * gain table. In that case, AoA result will not be reliable.
  39663. * Therefore, the recommendation is to stop doing AoA if
  39664. * GAIN_TABLE_IDX != 0 and indicate error.
  39665. */
  39666. A_UINT32 agc_gain_tbl_index[WMI_MAX_CHAINS/WMI_CFR_AGC_GAIN_CHAINS_PER_U32];
  39667. } wmi_peer_cfr_capture_event_phase_fixed_param;
  39668. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK 0x80000000
  39669. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK_S 31
  39670. /* Failed to capture CFR as peer is in power save mode */
  39671. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED 0x40000000
  39672. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED_S 30
  39673. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX 0x00000003
  39674. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX_S 0
  39675. /**
  39676. * wmi_cold_boot_cal_data config flags
  39677. * BIT 0 : 1 means more data will come, 0 means last event
  39678. * BIT 1-31 : Reserved
  39679. */
  39680. #define WMI_COLD_BOOT_CAL_DATA_SET_IS_MORE_DATA(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  39681. #define WMI_COLD_BOOT_CAL_DATA_GET_IS_MORE_DATA(flags) WMI_GET_BITS(flags, 0, 1)
  39682. typedef struct {
  39683. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_cold_boot_cal_data_fixed_param */
  39684. A_UINT32 data_len; /** length in byte of data[]. */
  39685. A_UINT32 flags; /** config flags : Only 0th bit is used, bit 1-31 are reserved */
  39686. /* Following this structure is the TLV:
  39687. * A_UINT8 data[]; <-- length in byte given by field data_len.
  39688. * This data array contains cold boot data calibration raw data.
  39689. */
  39690. } wmi_cold_boot_cal_data_fixed_param;
  39691. typedef struct {
  39692. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_rap_info_event_fixed_param */
  39693. /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
  39694. * See macros starting with WMI_PDEV_ID_ for values.
  39695. */
  39696. A_UINT32 pdev_id;
  39697. A_UINT32 type; /** type of the rogue ap, see WMI_ROGUE_AP_TYPE */
  39698. wmi_mac_addr bssid; /** bssid of the rogue ap */
  39699. } wmi_pdev_rap_info_event_fixed_param;
  39700. typedef struct {
  39701. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sched_tidq_susp_info_event_fixed_param */
  39702. A_UINT32 pdev_id; /** pdev id */
  39703. A_UINT32 tid_num; /** tid_num that is suspended */
  39704. A_UINT32 suspended_time_ms; /** time for which tid has been suspended in ms */
  39705. } wmi_pdev_sched_tidq_susp_info_event_fixed_param;
  39706. /*
  39707. * WMI API for Firmware to indicate iface combinations which Firmware
  39708. * support to Host
  39709. */
  39710. typedef struct {
  39711. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_cmb_ind_event_fixed_param */
  39712. /* common part */
  39713. /* Consider DBS/DBDC for this new implementation */
  39714. A_UINT32 pdev_n;
  39715. /* iface combinations part -
  39716. * Use subsequent TLV arrays to list supported combinations of interfaces.
  39717. */
  39718. /*
  39719. * The TLVs listing interface combinations, will follow this TLV.
  39720. * The number of combinations can be calculated by dividing the
  39721. * TLV array length by the TLV array element length.
  39722. *
  39723. * The fixed_param TLV is directly followed by a list of
  39724. * wlanfw_iface_combination elements:
  39725. * wlanfw_iface_combination combinations[0];
  39726. * wlanfw_iface_combination combinations[1];
  39727. * ...
  39728. * wlanfw_iface_combination combinations[N];
  39729. *
  39730. * After the list of wlanfw_iface_combinations is a list of interface limits.
  39731. * The cmb_limits field of each wlanfw_iface_combination show which of the
  39732. * limits within the "wlanfw_ifact_limit limits" list belong to that
  39733. * iface_combination:
  39734. * limits[0] <- cmb 0, limit 0
  39735. * ...
  39736. * limits[cmb[0].cmb_limits-1] <- cmb 0, limit N
  39737. * limits[cmb[0].cmb_limits] <- cmb 1, limit 0
  39738. * ...
  39739. * limits[cmb[0].cmb_limits+cmb[1].cmb_limits-1] <- cmb 1, limit N
  39740. * limits[cmb[0].cmb_limits+cmb[1].cmb_limits] <- cmb 2, limit 0
  39741. * ...
  39742. */
  39743. } wmi_wlanfw_iface_cmb_ind_event_fixed_param;
  39744. typedef struct {
  39745. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_limit_param */
  39746. /*
  39747. * How many vdevs can work as below vdev_type/vdev_subtype
  39748. * in one combination.
  39749. */
  39750. A_UINT32 vdev_limit_n;
  39751. /*
  39752. * Indicate what role above vdevs can work as.
  39753. * Refer to "WMI_VDEV_TYPE_xx, WMI_UNIFIED_VDEV_SUBTYPE_xx"
  39754. * for roles definition.
  39755. */
  39756. A_UINT32 vdev_type;
  39757. A_UINT32 vdev_subtype;
  39758. } wlanfw_iface_limit;
  39759. /**
  39760. * @brief specific configuration of valid_fields for host.
  39761. * These flags are used for indicating which fields in wlanfw_iface_combination
  39762. * contains valid value for Host Driver.
  39763. * 0: Host can ignore this field
  39764. * 1: field contains valid value for Host Driver
  39765. */
  39766. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_S 0
  39767. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_M 0x1
  39768. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_S 1
  39769. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_M 0x2
  39770. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_S 2
  39771. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_M 0x4
  39772. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_S 3
  39773. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_M 0x8
  39774. #define WMI_CMB_VALID_FIELDS_FLAG_SET(word32, flag, value) \
  39775. do { \
  39776. (word32) &= ~WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
  39777. (word32) |= ((value) << WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S) & \
  39778. WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
  39779. } while (0)
  39780. #define WMI_CMB_VALID_FIELDS_FLAG_GET(word32, flag) \
  39781. (((word32) & WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M) >> \
  39782. WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S)
  39783. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_SET(word32, value) \
  39784. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), PEER_MAX, (value))
  39785. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_GET(word32) \
  39786. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), PEER_MAX)
  39787. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_SET(word32, value) \
  39788. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), STA_AP_BCN_INT_MATCH, (value))
  39789. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_GET(word32) \
  39790. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), STA_AP_BCN_INT_MATCH)
  39791. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_SET(word32, value) \
  39792. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_MIN, (value))
  39793. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_GET(word32) \
  39794. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_MIN)
  39795. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_SET(word32, value) \
  39796. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_N, (value))
  39797. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_GET(word32) \
  39798. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_N)
  39799. typedef struct {
  39800. A_UINT32 tlv_header;
  39801. /*
  39802. * Max num Peers can be supported in this combination.
  39803. * It excludes the self-peers associated with each vdev.
  39804. * It's the number of real remote peers.
  39805. * eg: when working as AP mode, indicating how many clients can be
  39806. * supported to connect with this AP.
  39807. */
  39808. A_UINT32 peer_max;
  39809. /* Home Channels supported on one single phy concurrently */
  39810. A_UINT32 channel_n;
  39811. /*
  39812. * The number of "wlanfw_iface_limit" for a specified combination.
  39813. * eg: there is 2 vdev, including 1 AP vdev and 1 STA vdev, then this
  39814. * cmb_limits will be 2 for this combination.
  39815. */
  39816. A_UINT32 cmb_limits;
  39817. /*
  39818. * Beacon intervals for STA and AP types need to be match or not.
  39819. * 1: need to be match
  39820. * 0: not need
  39821. */
  39822. A_UINT32 sta_ap_bcn_int_match;
  39823. /*
  39824. * This combination supports different beacon intervals or not.
  39825. * 0: Beacon interval is same for all interface
  39826. * !0: STA Beacon interval AND GCD of AP Beacon intervals
  39827. * should be greater or equal to this value.
  39828. */
  39829. A_UINT32 bcn_int_min;
  39830. /*
  39831. * Number of different Beacon intervals
  39832. */
  39833. A_UINT32 bcn_int_n;
  39834. /*
  39835. * This indicates which field in this struct
  39836. * contains valid value for Host Driver.
  39837. * Refer to definitions for "WMI_CMB_VALID_FIELDS_FLAG_xx".
  39838. */
  39839. A_UINT32 valid_fields;
  39840. } wlanfw_iface_combination;
  39841. typedef struct {
  39842. /** TLV tag and len; tag equals
  39843. * WMITLV_TAG_STRUC_wmi_set_elna_bypass_cmd_fixed_param */
  39844. A_UINT32 tlv_header;
  39845. /* VDEV identifier */
  39846. A_UINT32 vdev_id;
  39847. /** 1-Enable, 0-Disable */
  39848. A_UINT32 en_dis;
  39849. } wmi_set_elna_bypass_cmd_fixed_param;
  39850. typedef struct {
  39851. /** TLV tag and len; tag equals
  39852. * WMITLV_TAG_STRUC_wmi_get_elna_bypass_cmd_fixed_param */
  39853. A_UINT32 tlv_header;
  39854. /* VDEV identifier */
  39855. A_UINT32 vdev_id;
  39856. } wmi_get_elna_bypass_cmd_fixed_param;
  39857. typedef struct {
  39858. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_elna_bypass_event_fixed_param */
  39859. /* VDEV identifier */
  39860. A_UINT32 vdev_id;
  39861. /** 1-Enable, 0-Disable */
  39862. A_UINT32 en_dis;
  39863. } wmi_get_elna_bypass_event_fixed_param;
  39864. typedef struct {
  39865. /** TLV tag and len; tag equals
  39866. * WMITLV_TAG_STRUC_wmi_get_channel_ani_cmd_fixed_param
  39867. */
  39868. A_UINT32 tlv_header;
  39869. /**
  39870. * TLV (tag length value) parameters follow the
  39871. * structure. The TLV's are:
  39872. * list of channels (center freq of primary 20 MHz of the channel, in MHz)
  39873. * A_UINT32 channel_list[];
  39874. */
  39875. } wmi_get_channel_ani_cmd_fixed_param;
  39876. typedef struct {
  39877. /** TLV tag and len; tag equals
  39878. * WMITLV_TAG_STRUC_wmi_get_channel_ani_event_fixed_param
  39879. */
  39880. A_UINT32 tlv_header;
  39881. /**
  39882. * TLV (tag length value) parameters follow the
  39883. * structure. The TLV's are:
  39884. * wmi_channel_ani_info_tlv_param ani_info[];
  39885. */
  39886. } wmi_get_channel_ani_event_fixed_param;
  39887. typedef struct {
  39888. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_ani_info_tlv_param */
  39889. A_UINT32 tlv_header;
  39890. /** channel freq (center of 20 MHz primary channel) in MHz */
  39891. A_UINT32 chan_freq;
  39892. /**
  39893. * ANI (noise interference) level corresponding to the channel.
  39894. * Values range from [0-9], with higher values indicating more
  39895. * noise interference.
  39896. */
  39897. A_UINT32 ani_level;
  39898. } wmi_channel_ani_info_tlv_param;
  39899. /* This command is to specify to enable/disable audio frame aggr */
  39900. typedef struct {
  39901. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_enable_cmd_fixed_param */
  39902. A_UINT32 aggr_enable; /* enable aggregation for audio frame */
  39903. A_UINT32 tbd_enable; /* enable time_based discarding for audio frame */
  39904. A_UINT32 vdev_id;
  39905. } wmi_audio_aggr_enable_cmd_fixed_param;
  39906. typedef struct wmi_audio_aggr_rate_set_s {
  39907. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_audio_aggr_rate_set */
  39908. A_UINT32 mcs;
  39909. A_UINT32 bandwidth; /* 0 for 20M, 1 for 40M and 2 for 80M, etc. */
  39910. A_UINT32 vdev_id;
  39911. } WMI_AUDIO_AGGR_RATE_SET_T;
  39912. typedef struct {
  39913. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_add_group */
  39914. A_UINT32 group_id; /* id of audio group */
  39915. wmi_mac_addr multicast_addr; /* multicast address of audio group */
  39916. A_UINT32 vdev_id;
  39917. } wmi_audio_aggr_add_group_cmd_fixed_param;
  39918. typedef struct {
  39919. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_del_group */
  39920. A_UINT32 group_id;
  39921. A_UINT32 vdev_id;
  39922. } wmi_audio_aggr_del_group_cmd_fixed_param;
  39923. typedef struct {
  39924. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_rate */
  39925. A_UINT32 group_id;
  39926. A_UINT32 vdev_id;
  39927. /**
  39928. * TLV (tag length value) parameters follow the
  39929. * structure. The TLV's are:
  39930. * WMI_AUDIO_AGGR_RATE_SET_T rate_set[];
  39931. **/
  39932. } wmi_audio_aggr_set_group_rate_cmd_fixed_param;
  39933. typedef struct {
  39934. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_retry */
  39935. A_UINT32 group_id;
  39936. A_UINT32 retry_thresh;
  39937. A_UINT32 vdev_id;
  39938. } wmi_audio_aggr_set_group_retry_cmd_fixed_param;
  39939. typedef struct {
  39940. A_UINT32 tlv_header;
  39941. A_UINT32 vdev_id;
  39942. A_UINT32 group_id;
  39943. /*
  39944. * bit0: if set, Enable HT20
  39945. * bit1: if set, Enable HT40
  39946. * bit2, bit3: Reserved
  39947. * bit4: if set, Enable VHT20
  39948. * bit5: if set, Enable VHT40
  39949. * bit6: if set, Enable VHT80
  39950. * bit7 ~ bit31: Reserved
  39951. */
  39952. A_UINT32 bw;
  39953. A_UINT32 mcs_min;
  39954. A_UINT32 mcs_max;
  39955. A_UINT32 mcs_offset;
  39956. A_UINT32 nss;
  39957. } wmi_audio_aggr_set_group_auto_rate_cmd_fixed_param;
  39958. typedef struct {
  39959. A_UINT32 tlv_header;
  39960. A_UINT32 vdev_id;
  39961. A_UINT32 group_id;
  39962. A_UINT32 interval;
  39963. } wmi_audio_aggr_set_group_probe_cmd_fixed_param;
  39964. typedef struct {
  39965. /**
  39966. * TLV tag and len;
  39967. * tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_update_sta_group_info */
  39968. A_UINT32 tlv_header;
  39969. /* vdev id */
  39970. A_UINT32 vdev_id; /* which STA/vdev's group membership is being specified */
  39971. /* bitmap that indicates which groups this sta belongs to */
  39972. A_UINT32 group_bmap;
  39973. /*
  39974. * This fixed_param struct is followed by a TLV array of wmi_mac_addr,
  39975. * which specifies the multi-cast MAC address used for each group.
  39976. * The number of elements within the TLV array matches the number of bits
  39977. * set within group_bmap.
  39978. */
  39979. } wmi_audio_aggr_update_sta_group_info_cmd_fixed_param;
  39980. typedef struct {
  39981. /** TLV tag and len **/
  39982. A_UINT32 tlv_header;
  39983. /* VDEV identifier */
  39984. A_UINT32 vdev_id;
  39985. /*
  39986. * Identifier from Host to indicate how many this cmd been sent to FW.
  39987. * This value will be echoed back in the response_id field
  39988. * of the WMI_AUDIO_AGGR_REPORT_STATISTICS_EVENTID.
  39989. */
  39990. A_UINT32 request_id;
  39991. } wmi_audio_aggr_get_statistics_cmd_fixed_param;
  39992. typedef struct {
  39993. /** TLV tag and len **/
  39994. A_UINT32 tlv_header;
  39995. /* VDEV identifier */
  39996. A_UINT32 vdev_id;
  39997. } wmi_audio_aggr_reset_statistics_cmd_fixed_param;
  39998. typedef struct {
  39999. /** TLV tag and len **/
  40000. A_UINT32 tlv_header;
  40001. /* VDEV identifier */
  40002. A_UINT32 vdev_id;
  40003. /*
  40004. * The user_mode and user_profile fields are passed through
  40005. * the host driver to the target FW, but are never interpreted
  40006. * by the host driver. The values for these fields are opaque
  40007. * to the host, and are only interpreted by the FW.
  40008. */
  40009. A_UINT32 user_mode;
  40010. A_UINT32 user_profile;
  40011. } wmi_audio_aggr_set_rtscts_config_cmd_fixed_param;
  40012. typedef enum {
  40013. /* audio aggr scheduler method list */
  40014. WMI_AUDIO_AGGR_SCHED_METHOD_HOST_CONTROL = 1,
  40015. WMI_AUDIO_AGGR_SCHED_METHOD_HOST_CONTROL_PER_CYCLE = 2,
  40016. WMI_AUDIO_AGGR_SCHED_METHOD_MAX,
  40017. } WMI_AUDIO_AGGR_SCHED_METHOD_TYPE;
  40018. typedef enum {
  40019. /* audio aggr RTS-CTS Config */
  40020. WMI_AUDIO_AGGR_RTS_CTS_CONFIG_DISABLED = 0,
  40021. WMI_AUDIO_AGGR_RTS_CTS_CONFIG_PPDU = 1,
  40022. WMI_AUDIO_AGGR_RTS_CTS_CONFIG_CYCLE = 2,
  40023. WMI_AUDIO_AGGR_RTS_CTS_MAX,
  40024. } WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE;
  40025. typedef struct {
  40026. /* TLV tag and len */
  40027. A_UINT32 tlv_header;
  40028. /* VDEV identifier */
  40029. A_UINT32 vdev_id;
  40030. /* selected audio aggr scheduler method
  40031. * valid methods can be found in WMI_AUDIO_AGGR_SCHED_METHOD_TYPE
  40032. */
  40033. A_UINT32 sched_method;
  40034. /* rts-cts config
  40035. * valid config can be found in WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE
  40036. */
  40037. A_UINT32 rtscts_config;
  40038. } wmi_audio_aggr_set_sched_method_cmd_fixed_param;
  40039. typedef struct {
  40040. /* TLV tag and len */
  40041. A_UINT32 tlv_header;
  40042. /* VDEV identifier */
  40043. A_UINT32 vdev_id;
  40044. } wmi_audio_aggr_get_sched_method_cmd_fixed_param;
  40045. typedef struct {
  40046. /** TLV tag and len; tag equals
  40047. * WMITLV_TAG_STRUC_wmi_set_ocl_cmd_fixed_param */
  40048. A_UINT32 tlv_header;
  40049. /* VDEV identifier */
  40050. A_UINT32 vdev_id;
  40051. /** enable/disable OCL, 1 - enable, 0 - disable*/
  40052. A_UINT32 en_dis_chain;
  40053. } wmi_set_ocl_cmd_fixed_param;
  40054. typedef enum {
  40055. /* HPA Handshake Stages */
  40056. WMI_HPA_SMCK_REQUEST = 0,
  40057. WMI_HPA_SMCK_RESPONSE = 1,
  40058. WMI_HPA_SIGN_REQUEST = 2,
  40059. WMI_HPA_SIGN_RESPONSE = 3,
  40060. WMI_HPA_HANDSHAKE_STAGE_MAX,
  40061. } WMI_HPA_STAGE_TYPE;
  40062. typedef struct {
  40063. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hpa_cmd_fixed_param */
  40064. /* stage:
  40065. * HPA Handshake Stage, filled with a WMI_HPA_STAGE_TYPE enum value
  40066. */
  40067. A_UINT32 stage;
  40068. /* the base address and length of data on host memory */
  40069. A_UINT32 base_paddr_low; /* bits 31:0 */
  40070. A_UINT32 base_paddr_high; /* bits 63:32 */
  40071. A_UINT32 len; /* units = bytes */
  40072. } wmi_hpa_cmd_fixed_param;
  40073. typedef struct {
  40074. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hpa_evt_fixed_param */
  40075. /* stage:
  40076. * HPA Handshake Stage, filled with a WMI_HPA_STAGE_TYPE enum value
  40077. */
  40078. A_UINT32 stage;
  40079. A_UINT32 nonce;
  40080. } wmi_hpa_evt_fixed_param;
  40081. typedef struct {
  40082. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_sync_qtimer */
  40083. A_UINT32 vdev_id;
  40084. A_UINT32 qtimer_l32;
  40085. A_UINT32 qtimer_u32;
  40086. } wmi_audio_sync_qtimer_cmd_fixed_param;
  40087. typedef struct {
  40088. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_sync_trigger */
  40089. A_UINT32 vdev_id;
  40090. /* agg_relation:
  40091. * indicates whether host needs only one pair of Qmaster and Qslave,
  40092. * or Qmaster and Qslave pairs derived for each FTM frame exchange.
  40093. * 0 indicates one pair for each FTM frame exchanged
  40094. * 1 indicates only one pair of Qmaster and Qslave times.
  40095. */
  40096. A_UINT32 agg_relation;
  40097. } wmi_audio_sync_trigger_cmd_fixed_param;
  40098. typedef struct {
  40099. /** TLV tag and len; tag equals
  40100. * WMITLV_TAG_STRUC_wmi_pdev_mec_aging_timer_config_cmd_fixed_param
  40101. */
  40102. A_UINT32 tlv_header;
  40103. /** SOC level Command. pdev_id - WMI_PDEV_ID_SOC is used.
  40104. */
  40105. A_UINT32 pdev_id;
  40106. /* The Threshold for mec aging timer in ms
  40107. */
  40108. A_UINT32 mec_aging_timer_threshold;
  40109. } wmi_pdev_mec_aging_timer_config_cmd_fixed_param;
  40110. #define WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS 0
  40111. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS 1
  40112. #define WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS 2
  40113. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS 3
  40114. #define WMI_CFR_GROUP_BW_VALID_BIT_POS 4
  40115. #define WMI_CFR_GROUP_NSS_VALID_BIT_POS 5
  40116. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS 6
  40117. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS 7
  40118. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS 8
  40119. /* The bits in this mask mapped to WMI_PEER_CFR_CAPTURE_BW enum */
  40120. #define WMI_CFR_GROUP_BW_MASK_NUM_BITS 6
  40121. #define WMI_CFR_GROUP_BW_BIT_POS 0
  40122. /* The bits in this mask correspond to the values as below
  40123. * bit 0 -> Nss 1
  40124. * bit 1 -> Nss 2
  40125. * ...
  40126. * bit 7 -> Nss 8
  40127. */
  40128. #define WMI_CFR_GROUP_NSS_MASK_NUM_BITS 8
  40129. #define WMI_CFR_GROUP_NSS_BIT_POS 16
  40130. #define WMI_CFR_GROUP_TA_ADDR_VALID_SET(param, value) \
  40131. WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1, value)
  40132. #define WMI_CFR_GROUP_TA_ADDR_VALID_GET(param) \
  40133. WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1)
  40134. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_SET(param, value) \
  40135. WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1, value)
  40136. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_GET(param) \
  40137. WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1)
  40138. #define WMI_CFR_GROUP_RA_ADDR_VALID_SET(param, value) \
  40139. WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1, value)
  40140. #define WMI_CFR_GROUP_RA_ADDR_VALID_GET(param) \
  40141. WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1)
  40142. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_SET(param, value) \
  40143. WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1, value)
  40144. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_GET(param) \
  40145. WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1)
  40146. #define WMI_CFR_GROUP_BW_VALID_SET(param, value) \
  40147. WMI_SET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1, value)
  40148. #define WMI_CFR_GROUP_BW_VALID_GET(param) \
  40149. WMI_GET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1)
  40150. #define WMI_CFR_GROUP_NSS_VALID_SET(param, value) \
  40151. WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1, value)
  40152. #define WMI_CFR_GROUP_NSS_VALID_GET(param) \
  40153. WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1)
  40154. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_SET(param, value) \
  40155. WMI_SET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1, value)
  40156. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_GET(param) \
  40157. WMI_GET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1)
  40158. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_SET(param, value) \
  40159. WMI_SET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1, value)
  40160. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_GET(param) \
  40161. WMI_GET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1)
  40162. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_SET(param, value) \
  40163. WMI_SET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1, value)
  40164. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_GET(param) \
  40165. WMI_GET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1)
  40166. #define WMI_CFR_GROUP_BW_SET(param, value) \
  40167. WMI_SET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS, value)
  40168. #define WMI_CFR_GROUP_BW_GET(param) \
  40169. WMI_GET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS)
  40170. #define WMI_CFR_GROUP_NSS_SET(param, value) \
  40171. WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS, value)
  40172. #define WMI_CFR_GROUP_NSS_GET(param) \
  40173. WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS)
  40174. typedef struct {
  40175. /** TLV tag and len; tag equals
  40176. * WMITLV_TAG_STRUC_wmi_cfr_filter_group_config */
  40177. A_UINT32 tlv_header;
  40178. /* Filter group number for which the below filters needs to be applied */
  40179. A_UINT32 filter_group_id;
  40180. /* Indicates which of the below filter's value is valid
  40181. * Bit 0: Ta_addr is valid if set
  40182. * Bit 1: Ta_addr_mask is valid if set
  40183. * Bit 2: Ra_addr is valid if set
  40184. * Bit 3: Ra_addr_mask is valid if set
  40185. * Bit 4: Bandwidth is valid if set
  40186. * Bit 5: NSS is valid if set
  40187. * Bit 6: Mgmt_subtype is valid if set
  40188. * Bit 7: Ctrl_subtype is valid if set
  40189. * Bit 8: Data_subtype is valid if set
  40190. * Bits 31:9 Reserved for future use
  40191. */
  40192. A_UINT32 filter_set_valid_mask;
  40193. /* ta_addr:
  40194. * Packets matching the TA_mac addr will be filtered in by MAC
  40195. * for CFR capture.
  40196. */
  40197. wmi_mac_addr ta_addr;
  40198. /* ta_addr_mask:
  40199. * Packets matching the TA_mac addr Mask will be filtered in by MAC
  40200. * for CFR capture.
  40201. */
  40202. wmi_mac_addr ta_addr_mask;
  40203. /* ra_addr:
  40204. * Packets matching the RA_mac addr will be filtered in by MAC
  40205. * for CFR capture.
  40206. */
  40207. wmi_mac_addr ra_addr;
  40208. /* ra_addr_mask:
  40209. * Packets matching the RA_mac addr Mask will be filtered in by MAC
  40210. * for CFR capture.
  40211. */
  40212. wmi_mac_addr ra_addr_mask;
  40213. /* bw_nss_filter:
  40214. * Indicates which bw and nss packets will be filtered for CFR capture
  40215. * Bits 4:0 CFR capture will be done for packets matching the bandwidths
  40216. * specified within this bitmask
  40217. * Bits 15:5 Reserved for future
  40218. * Bits 23:16 CFR capture will be done for packets matching the Nss
  40219. * specified within this bitmask
  40220. * Bits 31:24 Reserved for future
  40221. */
  40222. A_UINT32 bw_nss_filter;
  40223. /* mgmt_subtype_filter:
  40224. * Managments Packets matching the subtype filter categories will be
  40225. * filtered in by MAC for CFR capture.
  40226. * This is a bitmask, in which each bit represents the corresponding
  40227. * mgmt subtype value as per ieee80211_defs.h
  40228. */
  40229. A_UINT32 mgmt_subtype_filter;
  40230. /* ctrl_subtype_filter:
  40231. * Control Packets matching the subtype filter category will be
  40232. * filtered in by MAC for CFR capture.
  40233. * This is a bitmask, in which each bit represents the corresponding
  40234. * ctrl subtype value as per ieee80211_defs.h
  40235. */
  40236. A_UINT32 ctrl_subtype_filter;
  40237. /* data_subtype_filter:
  40238. * Data Packets matching the subtype filter category will be
  40239. * filtered in by MAC for CFR capture.
  40240. * This is a bitmask, in which each bit represents the corresponding
  40241. * data subtype value as per ieee80211_defs.h
  40242. */
  40243. A_UINT32 data_subtype_filter;
  40244. } wmi_cfr_filter_group_config;
  40245. #define WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS 0
  40246. #define WMI_CFR_ALL_FTM_ACK_EN_BIT_POS 1
  40247. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS 2
  40248. #define WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS 3
  40249. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS 4
  40250. #define WMI_CFR_ALL_PACKET_EN_BIT_POS 5
  40251. #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS 6
  40252. #define WMI_CFR_CAPTURE_INTERVAL_NUM_BITS 24
  40253. #define WMI_CFR_CAPTURE_INTERVAL_BIT_POS 0
  40254. #define WMI_CFR_CAPTURE_DURATION_NUM_BITS 24
  40255. #define WMI_CFR_CAPTURE_DURATION_BIT_POS 0
  40256. #define WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS 16
  40257. #define WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS 0
  40258. #define WMI_CFR_UL_MU_USER_UPPER_NUM_BITS 5
  40259. #define WMI_CFR_UL_MU_USER_UPPER_BIT_POS 0
  40260. #define WMI_CFR_FREEZE_DELAY_CNT_EN_MASK 1
  40261. #define WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS 0
  40262. #define WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS 8
  40263. #define WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS 1
  40264. #define WMI_CFR_CAPTURE_COUNT_NUM_BITS 16
  40265. #define WMI_CFR_CAPTURE_COUNT_BIT_POS 0
  40266. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS 1
  40267. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS 16
  40268. #define WMI_CFR_DIRECTED_FTM_ACK_EN_SET(param, value) \
  40269. WMI_SET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1, value)
  40270. #define WMI_CFR_DIRECTED_FTM_ACK_EN_GET(param) \
  40271. WMI_GET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1)
  40272. #define WMI_CFR_ALL_FTM_ACK_EN_SET(param, value) \
  40273. WMI_SET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1, value)
  40274. #define WMI_CFR_ALL_FTM_ACK_EN_GET(param) \
  40275. WMI_GET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1)
  40276. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_SET(param, value) \
  40277. WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1, value)
  40278. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_GET(param) \
  40279. WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1)
  40280. #define WMI_CFR_NDPA_NDP_ALL_EN_SET(param, value) \
  40281. WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1, value)
  40282. #define WWMI_CFR_NDPA_NDP_ALL_EN_GET WMI_CFR_NDPA_NDP_ALL_EN_GET
  40283. #define WMI_CFR_NDPA_NDP_ALL_EN_GET(param) \
  40284. WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1)
  40285. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_SET(param, value) \
  40286. WMI_SET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1, value)
  40287. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_GET(param) \
  40288. WMI_GET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1)
  40289. #define WWMI_CFR_ALL_PACKET_EN_SET WMI_CFR_ALL_PACKET_EN_SET
  40290. #define WMI_CFR_ALL_PACKET_EN_SET(param, value) \
  40291. WMI_SET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1, value)
  40292. #define WMI_CFR_ALL_PACKET_EN_GET(param) \
  40293. WMI_GET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1)
  40294. #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_SET(param, value) \
  40295. WMI_SET_BITS(param, WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS, 1, value)
  40296. #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_GET(param) \
  40297. WMI_GET_BITS(param, WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS, 1)
  40298. #define WMI_CFR_CAPTURE_INTERVAL_SET(param, value) \
  40299. WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS, value)
  40300. #define WMI_CFR_CAPTURE_INTERVAL_GET(param) \
  40301. WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS)
  40302. #define WMI_CFR_CAPTURE_DURATION_SET(param, value) \
  40303. WMI_SET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS, value)
  40304. #define WMI_CFR_CAPTURE_DURATION_GET(param) \
  40305. WMI_GET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS)
  40306. #define WMI_CFR_FILTER_GROUP_BITMAP_SET(param, value) \
  40307. WMI_SET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS, value)
  40308. #define WMI_CFR_FILTER_GROUP_BITMAP_GET(param) \
  40309. WMI_GET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS)
  40310. #define WMI_CFR_UL_MU_USER_UPPER_SET(param, value) \
  40311. WMI_SET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS, value)
  40312. #define WMI_CFR_UL_MU_USER_UPPER_GET(param) \
  40313. WMI_GET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS)
  40314. #define WMI_CFR_FREEZE_DELAY_CNT_EN_SET(param, value) \
  40315. WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK, value)
  40316. #define WMI_CFR_FREEZE_DELAY_CNT_EN_GET(param) \
  40317. WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK)
  40318. #define WMI_CFR_FREEZE_DELAY_CNT_THR_SET(param, value) \
  40319. WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS, value)
  40320. #define WMI_CFR_FREEZE_DELAY_CNT_THR_GET(param) \
  40321. WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS)
  40322. #define WMI_CFR_CAPTURE_COUNT_SET(param, value) \
  40323. WMI_SET_BITS(param, WMI_CFR_CAPTURE_COUNT_BIT_POS, WMI_CFR_CAPTURE_COUNT_NUM_BITS, value)
  40324. #define WMI_CFR_CAPTURE_COUNT_GET(param) \
  40325. WMI_GET_BITS(param, WMI_CFR_CAPTURE_COUNT_BIT_POS, WMI_CFR_CAPTURE_COUNT_NUM_BITS)
  40326. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_SET(param, value) \
  40327. WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS, value)
  40328. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_GET(param) \
  40329. WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS)
  40330. typedef struct {
  40331. /** TLV tag and len; tag equals
  40332. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_filter_cmd_fixed_param */
  40333. A_UINT32 tlv_header;
  40334. /** pdev_id for identifying the MAC
  40335. * See macros starting with WMI_PDEV_ID_ for values.
  40336. * In non-DBDC case host should set it to 0
  40337. */
  40338. A_UINT32 pdev_id;
  40339. /* filter_type:
  40340. * Indicates the type of filter to be enabled
  40341. * Bit 0: Filter Directed FTM ACK frames for CFR capture
  40342. * Bit 1: Filter All FTM ACK frames for CFR capture
  40343. * Bit 2: Filter NDPA NDP Directed Frames for CFR capture
  40344. * Bit 3: Filter NDPA NDP All Frames for CFR capture
  40345. * Bit 4: Filter Frames based on TA/RA/Subtype as provided
  40346. * in CFR Group config
  40347. * Bit 5: Filter in All packets for CFR Capture
  40348. * Bit 6: Filter in TA/RA frames as FP if this bit is set else as MO
  40349. * Bits 31:7 Reserved for future use
  40350. */
  40351. A_UINT32 filter_type;
  40352. /* capture_interval:
  40353. * Capture interval field which is time in between consecutive
  40354. * CFR capture, in microsecond units
  40355. * Bits 23:0 Capture interval
  40356. * Bits 31:24 Reserved for future use
  40357. */
  40358. A_UINT32 capture_interval;
  40359. /* capture_duration:
  40360. * Capture Duration field for which CFR capture has to happen,
  40361. * in microsecond units
  40362. * Bits 23:0 Capture Duration
  40363. * Bits 31:24 Reserved for future use
  40364. */
  40365. A_UINT32 capture_duration;
  40366. /* Bitfields set indicates which of the CFR group config is enabled
  40367. * Bits 15:0 Filter Group enable Bits
  40368. * Bits 31:16 Reserved for future use
  40369. * If Bit 0 is set, then CFR filter group 0 alone is enabled and so on
  40370. */
  40371. A_UINT32 filter_group_bitmap;
  40372. /* ul_mu_user_mask_lower:
  40373. * Bitfields indicates which of the users in the current UL MU
  40374. * transmission are enabled for CFR capture.
  40375. * Bits 31 to 0 indicates user indexes for 32 users in a UL MU transmission.
  40376. * If bit 0 is set, then the CFR capture will happen for user index 0
  40377. * in the current UL MU Transmission.
  40378. * If bits 0,2 are set, then CFR capture for UL MU TX corresponds to
  40379. * user indices 0 and 2.
  40380. */
  40381. A_UINT32 ul_mu_user_mask_lower;
  40382. /* ul_mu_user_mask_upper:
  40383. * This is continuation of the above lower mask.
  40384. * Bits 4:0 Bitfields indicates user indices from 33 to 37 users.
  40385. * Bits 31:5 Reserved for future use
  40386. * If bit 0 is set, then CFR capture is enabled for user index 33
  40387. * in a UL MU transmission.
  40388. */
  40389. A_UINT32 ul_mu_user_mask_upper;
  40390. /* freeze_tlv_delay_cnt
  40391. * Indicates the number of consecutive Rx packets to be skipped
  40392. * before CFR capture is enabled again.
  40393. * Bits 8:0 Freeze Delay Count value
  40394. * Bits 31:9 Reserved for future use
  40395. */
  40396. A_UINT32 freeze_tlv_delay_cnt;
  40397. /* capture_count:
  40398. * Indicates the number of consecutive packets for which CFR capture
  40399. * is to be enabled.
  40400. * Interpretation of capture_interval_mode_select (bit 16):
  40401. * Value 0: capture_interval + capture_duration fields are used
  40402. * to capture CFR for capture_duration after every
  40403. * capture_interval.
  40404. * Value 1: capture_interval + capture_count fields are used to
  40405. * capture CFR for capture_count+1 number of packets
  40406. * after every capture interval
  40407. * Bit 15:0 : capture_count
  40408. * Refer to WMI_CFR_CAPTURE_COUNT_GET/SET macros.
  40409. * Bit 16 : capture_interval_mode_select
  40410. * Refer to WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_GET/SET macros.
  40411. * Bits 31:17 : Reserved
  40412. */
  40413. A_UINT32 capture_count;
  40414. /*
  40415. * A variable-length TLV array of wmi_cfr_filter_group_config will
  40416. * follow this fixed_param TLV
  40417. * wmi_cfr_filter_group_config filter_group_config[];
  40418. */
  40419. } wmi_cfr_capture_filter_cmd_fixed_param;
  40420. enum wmi_oem_data_evt_cause {
  40421. WMI_OEM_DATA_EVT_CAUSE_UNSPECIFIED = 0,
  40422. WMI_OEM_DATA_EVT_CAUSE_CMD_REQ = 1,
  40423. WMI_OEM_DATA_EVT_CAUSE_ASYNC = 2,
  40424. WMI_OEM_DATA_EVT_CAUSE_QMS = 3, /* DEPRECATED */
  40425. WMI_OEM_DATA_EVT_CAUSE_SMEM_MAILBOX = 3,
  40426. };
  40427. typedef struct {
  40428. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_event_fixed_param */
  40429. A_UINT32 data_len; /** length in byte of data[]. */
  40430. /* Event Cause reason from enum wmi_oem_data_evt_cause */
  40431. A_UINT32 event_cause;
  40432. /* Following this structure is the TLV:
  40433. * A_UINT8 data[]; <-- length in byte given by field data_len.
  40434. * This data array contains OEM data, the payload begins with a field to tell the HOST regarding the kind of the OEM data.
  40435. * A_UINT8 file_name[]; <-- Name of the file to which HOST needs to write this OEM specific data.
  40436. */
  40437. } wmi_oem_data_event_fixed_param;
  40438. #define WMI_VLAN_TX_BIT_POS 0
  40439. #define WMI_VLAN_RX_BIT_POS 1
  40440. #define WMI_TX_INSERT_OR_STRIP_BIT_POS 2
  40441. #define WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS 3
  40442. #define WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS 4
  40443. #define WMI_RX_STRIP_VLAN_C_TAG_BIT_POS 5
  40444. #define WMI_RX_STRIP_VLAN_S_TAG_BIT_POS 6
  40445. #define WMI_RX_INSERT_VLAN_C_TAG_BIT_POS 7
  40446. #define WMI_RX_INSERT_VLAN_S_TAG_BIT_POS 8
  40447. #define WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS 16
  40448. #define WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS 0
  40449. #define WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS 16
  40450. #define WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS 16
  40451. #define WMI_VLAN_TX_SET(param, value) \
  40452. WMI_SET_BITS(param, WMI_VLAN_TX_BIT_POS, 1, value)
  40453. #define WMI_VLAN_TX_GET(param) \
  40454. WMI_GET_BITS(param, WMI_VLAN_TX_BIT_POS, 1)
  40455. #define WMI_VLAN_RX_SET(param, value) \
  40456. WMI_SET_BITS(param, WMI_VLAN_RX_BIT_POS, 1, value)
  40457. #define WMI_VLAN_RX_GET(param) \
  40458. WMI_GET_BITS(param, WMI_VLAN_RX_BIT_POS, 1)
  40459. #define WMI_TX_INSERT_OR_STRIP_SET(param, value) \
  40460. WMI_SET_BITS(param, WMI_TX_INSERT_OR_STRIP_BIT_POS, 1, value)
  40461. #define WMI_TX_INSERT_OR_STRIP_GET(param) \
  40462. WMI_GET_BITS(param, WMI_TX_INSERT_OR_STRIP_BIT_POS, 1)
  40463. #define WMI_TX_STRIP_INSERT_VLAN_INNER_SET(param, value) \
  40464. WMI_SET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS, 1, value)
  40465. #define WMI_TX_STRIP_INSERT_VLAN_INNER_GET(param) \
  40466. WMI_GET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS, 1)
  40467. #define WMI_TX_STRIP_INSERT_VLAN_OUTER_SET(param, value) \
  40468. WMI_SET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS, 1, value)
  40469. #define WMI_TX_STRIP_INSERT_VLAN_OUTER_GET(param) \
  40470. WMI_GET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS, 1)
  40471. #define WMI_RX_STRIP_VLAN_C_TAG_SET(param, value) \
  40472. WMI_SET_BITS(param, WMI_RX_STRIP_VLAN_C_TAG_BIT_POS, 1, value)
  40473. #define WMI_RX_STRIP_VLAN_C_TAG_GET(param) \
  40474. WMI_GET_BITS(param, WMI_RX_STRIP_VLAN_C_TAG_BIT_POS, 1)
  40475. #define WMI_RX_STRIP_VLAN_S_TAG_SET(param, value) \
  40476. WMI_SET_BITS(param, WMI_RX_STRIP_VLAN_S_TAG_BIT_POS, 1, value)
  40477. #define WMI_RX_STRIP_VLAN_S_TAG_GET(param) \
  40478. WMI_GET_BITS(param, WMI_RX_STRIP_VLAN_S_TAG_BIT_POS, 1)
  40479. #define WMI_RX_INSERT_VLAN_C_TAG_SET(param, value) \
  40480. WMI_SET_BITS(param, WMI_RX_INSERT_VLAN_C_TAG_BIT_POS, 1, value)
  40481. #define WMI_RX_INSERT_VLAN_C_TAG_GET(param) \
  40482. WMI_GET_BITS(param, WMI_RX_INSERT_VLAN_C_TAG_BIT_POS, 1)
  40483. #define WMI_RX_INSERT_VLAN_S_TAG_SET(param, value) \
  40484. WMI_SET_BITS(param, WMI_RX_INSERT_VLAN_S_TAG_BIT_POS, 1, value)
  40485. #define WMI_RX_INSERT_VLAN_S_TAG_GET(param) \
  40486. WMI_GET_BITS(param, WMI_RX_INSERT_VLAN_S_TAG_BIT_POS, 1)
  40487. #define WMI_TX_INSERT_VLAN_INNER_TCI_SET(param, value) \
  40488. WMI_SET_BITS(param, WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS, value)
  40489. #define WMI_TX_INSERT_VLAN_INNER_TCI_GET(param) \
  40490. WMI_GET_BITS(param, WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS)
  40491. #define WMI_TX_INSERT_VLAN_OUTER_TCI_SET(param, value) \
  40492. WMI_SET_BITS(param, WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS, value)
  40493. #define WMI_TX_INSERT_VLAN_OUTER_TCI_GET(param) \
  40494. WMI_GET_BITS(param, WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS)
  40495. typedef struct {
  40496. /** TLV tag and len; tag equals
  40497. * WMITLV_TAG_STRUC_wmi_peer_config_vlan_cmd_fixed_param */
  40498. A_UINT32 tlv_header;
  40499. /** peer MAC address */
  40500. wmi_mac_addr peer_macaddr;
  40501. /* peer_vlan_config_mask:
  40502. * Field indicates VLAN settings that need to set in RX and TX peer
  40503. * Bit 0: Indicates if the settings are present for TX peer
  40504. * [1 - present for TX peer]
  40505. * Bit 1: Indicates if the settings are present for RX peer
  40506. * [1 - present for RX peer]
  40507. * Bit 2: Setting the insert_or_strip bit in TX peer
  40508. * [0 - Strip, 1 - Insert]
  40509. * Bit 3: Setting the strip_insert_vlan_inner bit in TX peer
  40510. * [0 - Strip, 1 - Insert]
  40511. * Bit 4: Setting the strip_insert_vlan_outer bit in TX peer
  40512. * [0 - Strip, 1 - Insert]
  40513. * Bit 5: Setting the strip_vlan_c_tag_decap bit in RX peer [1 - Strip]
  40514. * Bit 6: Setting the strip_vlan_s_tag_decap bit in RX peer [1 - Strip]
  40515. * Bit 7: Setting the rx_insert_vlan_c_tag_padding bit in RX peer
  40516. * [1 - Insert]
  40517. * Bit 8: Setting the rx_insert_vlan_s_tag_padding bit in RX peer
  40518. * [1 - Insert]
  40519. */
  40520. A_UINT32 peer_vlan_config_mask;
  40521. /* insert_vlan_tci:
  40522. * Field indicates the word that needs to be inserted in the
  40523. * inner or outer tag, if insertion is enabled by the
  40524. * TX peer strip_insert_vlan_{inner,outer} fields along with
  40525. * insert_or_strip field
  40526. * Bits 0:15 insert_vlan_inner_tci
  40527. * Bits 16:31 insert_vlan_outer_tci
  40528. */
  40529. A_UINT32 insert_vlan_tci;
  40530. /* VDEV identifier */
  40531. A_UINT32 vdev_id;
  40532. } wmi_peer_config_vlan_cmd_fixed_param;
  40533. typedef struct {
  40534. /** TLV tag and len; tag equals
  40535. * WMITLV_TAG_STRUC_wmi_peer_config_ppe_ds_cmd_fixed_param */
  40536. A_UINT32 tlv_header;
  40537. wmi_mac_addr peer_macaddr;
  40538. A_UINT32 ppe_routing_enable; /* enum WMI_PPE_ROUTING_TYPE */
  40539. /* The processing stages in PPE that this packet buffer need to go through
  40540. * and on to which PPE queues these buffers should be mapped to.
  40541. * Refer pkg/ppe/src/ppe_sc.h for service code types
  40542. */
  40543. A_UINT32 service_code;
  40544. A_UINT32 priority_valid;
  40545. /* Unique number that represents a VAP's vdev_id in PPE domain */
  40546. A_UINT32 src_info;
  40547. /* VDEV identifier */
  40548. A_UINT32 vdev_id;
  40549. } wmi_peer_config_ppe_ds_cmd_fixed_param;
  40550. typedef enum {
  40551. WMI_PPE_ROUTING_DISABLED = 0,
  40552. WMI_AST_USE_PPE_ENABLED = 1,
  40553. WMI_AST_USE_PPE_DISABLED = 2,
  40554. WMI_PPE_ROUTING_TYPE_MAX,
  40555. } WMI_PPE_ROUTING_TYPE;
  40556. typedef struct {
  40557. /** TLV tag and len; tag equals
  40558. * WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_resp_event_fixed_param */
  40559. A_UINT32 tlv_header;
  40560. A_UINT32 pdev_id; /* ID of the pdev this response belongs to */
  40561. A_UINT32 requestor_id;
  40562. /** Return status. As per WMI_VDEV_START_RESPONSE_XXXXX */
  40563. A_UINT32 status;
  40564. /* The TLVs follows this structure:
  40565. * A_UINT32 vdev_ids_bitmap[]; <--- Array of VDEV id bitmap.
  40566. */
  40567. } wmi_pdev_multiple_vdev_restart_resp_event_fixed_param;
  40568. /** WMI event for Firmware to report soundbar audio frame statistics to Host **/
  40569. typedef struct {
  40570. /** TLV tag and len **/
  40571. A_UINT32 tlv_header;
  40572. A_UINT32 vdev_id; /* ID of the vdev this response belongs to */
  40573. /** identify which request this responds to **/
  40574. A_UINT32 response_id;
  40575. /* audio frame statistics part -
  40576. * Use subsequent TLV arrays to list group_stats and peer_stats.
  40577. */
  40578. /*
  40579. * The TLVs listing group_stats, will follow this TLV.
  40580. * The number of group_stats can be calculated by dividing the
  40581. * TLV array length by the TLV array element length.
  40582. *
  40583. * The fixed_param TLV is directly followed by a list of
  40584. * wmi_audio_aggr_group_stats elements:
  40585. * wmi_audio_aggr_group_stats group_stats[0];
  40586. * wmi_audio_aggr_group_stats group_stats[1];
  40587. * ...
  40588. * wmi_audio_aggr_group_stats group_stats[N];
  40589. *
  40590. * After the list of wmi_audio_aggr_group_stats is a list of peer_stats.
  40591. * wmi_audio_aggr_peer_stats peer_stats[0];
  40592. * wmi_audio_aggr_peer_stats peer_stats[1];
  40593. * ...
  40594. * wmi_audio_aggr_peer_stats peer_stats[N];
  40595. *
  40596. */
  40597. } wmi_audio_aggr_statistics_event_fixed_param;
  40598. typedef struct {
  40599. /** TLV tag and len **/
  40600. A_UINT32 tlv_header;
  40601. /* Group mac_address */
  40602. wmi_mac_addr group_addr;
  40603. /* Group identity */
  40604. A_UINT32 group_id;
  40605. /* Multicast MSDU Data Packets received from Host for this Group */
  40606. A_UINT32 mcast_tx;
  40607. /*
  40608. * Multicast MSDU Data Packets sent to OTA.
  40609. * Customer defined SW Retry Packets not included, as these
  40610. * SW Retry packets generated in FW locally, but not from Host.
  40611. */
  40612. A_UINT32 mcast_tx_ok;
  40613. /*
  40614. * Multicast MSDU Data Packets sent to OTA.
  40615. * Only include Customer defined SW Retry Packets.
  40616. */
  40617. A_UINT32 mcast_tx_ok_retry;
  40618. /*
  40619. * Multicast MSDU Data Packets not sent to OTA,
  40620. * discarded by tbd function due to timeout.
  40621. * Customer defined SW Retry Packets not included.
  40622. */
  40623. A_UINT32 mcast_tx_tbd_lost;
  40624. /*
  40625. * Multicast MSDU Data Packets not sent to OTA,
  40626. * discarded by tbd function due to timeout.
  40627. * Only include Customer defined SW Retry Packets.
  40628. */
  40629. A_UINT32 mcast_tx_tbd_lost_retry;
  40630. } wmi_audio_aggr_group_stats;
  40631. typedef struct {
  40632. /** TLV tag and len **/
  40633. A_UINT32 tlv_header;
  40634. /* STA mac_address */
  40635. wmi_mac_addr peer_addr;
  40636. /* Unicast MSDU Data Packets received from peer STA */
  40637. A_UINT32 ucast_rx;
  40638. /* Unicast MSDU Data Packets received from Host for Peer STA */
  40639. A_UINT32 ucast_tx;
  40640. /*
  40641. * Unicast MSDU Data Packets received from Host,
  40642. * and SW retry times for these packets.
  40643. */
  40644. A_UINT32 ucast_tx_retry;
  40645. /*
  40646. * Unicast MSDU Data Packets received from Host,
  40647. * and sent to Peer STA successfully.
  40648. */
  40649. A_UINT32 ucast_tx_ok;
  40650. /*
  40651. * Unicast MSDU Data Packets received from Host,
  40652. * but sent to Peer STA fail. not OTA, or no ACK from Peer.
  40653. */
  40654. A_UINT32 ucast_tx_lost;
  40655. /*
  40656. * Periodic NULL Data frames for multicast tx rate auto control.
  40657. * Generated by FW locally, and sent to Peer STA successfully.
  40658. */
  40659. A_UINT32 null_frame_tx;
  40660. /*
  40661. * Periodic NULL Data frames for multicast tx rate auto control.
  40662. * Generated by FW locally, but sent to Peer STA fail.
  40663. */
  40664. A_UINT32 null_frame_tx_lost;
  40665. } wmi_audio_aggr_peer_stats;
  40666. typedef struct {
  40667. /** TLV tag and len **/
  40668. A_UINT32 tlv_header;
  40669. /* ID of the vdev this response belongs to */
  40670. A_UINT32 vdev_id;
  40671. /* selected audio aggr scheduler method
  40672. * valid methods can be found in WMI_AUDIO_AGGR_SCHED_METHOD_TYPE
  40673. */
  40674. A_UINT32 sched_method;
  40675. /* rts-cts config
  40676. * valid config can be found in WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE
  40677. */
  40678. A_UINT32 rtscts_config;
  40679. } wmi_audio_aggr_sched_method_event_fixed_param;
  40680. typedef struct {
  40681. /** TLV tag and len; tag equals
  40682. *WMITLV_TAG_STRUC_wmi_pdev_srg_bss_color_bitmap_cmd_fixed_param */
  40683. A_UINT32 tlv_header;
  40684. /** pdev_id for identifying the MAC
  40685. * See macros starting with WMI_PDEV_ID_ for values.
  40686. * In non-DBDC case host should set it to 0
  40687. */
  40688. A_UINT32 pdev_id;
  40689. /* 64 bit bss color bitmap used by SRG based spatial reuse feature
  40690. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40691. * upper 32 bits.
  40692. */
  40693. A_UINT32 srg_bss_color_bitmap[2];
  40694. } wmi_pdev_srg_bss_color_bitmap_cmd_fixed_param;
  40695. typedef struct {
  40696. /** TLV tag and len; tag equals
  40697. *WMITLV_TAG_STRUC_wmi_pdev_srg_partial_bssid_bitmap_cmd_fixed_param */
  40698. A_UINT32 tlv_header;
  40699. /** pdev_id for identifying the MAC
  40700. * See macros starting with WMI_PDEV_ID_ for values.
  40701. * In non-DBDC case host should set it to 0
  40702. */
  40703. A_UINT32 pdev_id;
  40704. /* 64 bit partial bssid bitmap used by SRG based spatial reuse feature
  40705. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40706. * upper 32 bits.
  40707. */
  40708. A_UINT32 srg_partial_bssid_bitmap[2];
  40709. } wmi_pdev_srg_partial_bssid_bitmap_cmd_fixed_param;
  40710. typedef struct {
  40711. /** TLV tag and len; tag equals
  40712. * WMITLV_TAG_STRUC_wmi_pdev_srg_obss_color_enable_bitmap_cmd_fixed_param */
  40713. A_UINT32 tlv_header;
  40714. /** pdev_id for identifying the MAC
  40715. * See macros starting with WMI_PDEV_ID_ for values.
  40716. * In non-DBDC case host should set it to 0
  40717. */
  40718. A_UINT32 pdev_id;
  40719. /* 64 bit SRG obss color enable bitmap used by SRG based spatial reuse feature
  40720. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40721. * upper 32 bits.
  40722. */
  40723. A_UINT32 srg_obss_en_color_bitmap[2];
  40724. } wmi_pdev_srg_obss_color_enable_bitmap_cmd_fixed_param;
  40725. typedef struct {
  40726. /** TLV tag and len; tag equals
  40727. * WMITLV_TAG_STRUC_wmi_pdev_srg_obss_bssid_enable_bitmap_cmd_fixed_param */
  40728. A_UINT32 tlv_header;
  40729. /** pdev_id for identifying the MAC
  40730. * See macros starting with WMI_PDEV_ID_ for values.
  40731. * In non-DBDC case host should set it to 0
  40732. */
  40733. A_UINT32 pdev_id;
  40734. /* 64 bit obss bssid enable bitmap used by SRG based spatial reuse feature
  40735. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40736. * upper 32 bits.
  40737. */
  40738. A_UINT32 srg_obss_en_bssid_bitmap[2];
  40739. } wmi_pdev_srg_obss_bssid_enable_bitmap_cmd_fixed_param;
  40740. typedef struct {
  40741. /** TLV tag and len; tag equals
  40742. * WMITLV_TAG_STRUC_wmi_pdev_non_srg_obss_color_enable_bitmap_cmd_fixed_param */
  40743. A_UINT32 tlv_header;
  40744. /** pdev_id for identifying the MAC
  40745. * See macros starting with WMI_PDEV_ID_ for values.
  40746. * In non-DBDC case host should set it to 0
  40747. */
  40748. A_UINT32 pdev_id;
  40749. /* 64 bit Non_SRG obss color enable bitmap used by Non_SRG based spatial reuse feature
  40750. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40751. * upper 32 bits.
  40752. */
  40753. A_UINT32 non_srg_obss_en_color_bitmap[2];
  40754. } wmi_pdev_non_srg_obss_color_enable_bitmap_cmd_fixed_param;
  40755. typedef struct {
  40756. /** TLV tag and len; tag equals
  40757. * WMITLV_TAG_STRUC_wmi_pdev_non_srg_obss_bssid_enable_bitmap_cmd_fixed_param */
  40758. A_UINT32 tlv_header;
  40759. /** pdev_id for identifying the MAC
  40760. * See macros starting with WMI_PDEV_ID_ for values.
  40761. * In non-DBDC case host should set it to 0
  40762. */
  40763. A_UINT32 pdev_id;
  40764. /* 64 bit obss bssid enable bitmap used by Non_SRG based spatial reuse feature
  40765. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40766. * upper 32 bits.
  40767. */
  40768. A_UINT32 non_srg_obss_en_bssid_bitmap[2];
  40769. } wmi_pdev_non_srg_obss_bssid_enable_bitmap_cmd_fixed_param;
  40770. typedef struct {
  40771. /** TLV tag and len; tag equals
  40772. * WMITLV_TAG_STRUC_wmi_pdev_enable_duration_based_tx_mode_selection_cmd_fixed_param
  40773. */
  40774. A_UINT32 tlv_header;
  40775. /** pdev_id for identifying the MAC
  40776. * See macros starting with WMI_PDEV_ID_ for values.
  40777. * In non-DBDC case host should set it to 0
  40778. */
  40779. A_UINT32 pdev_id;
  40780. /* enable/disable Duration based Tx Mode selection */
  40781. A_UINT32 duration_based_tx_mode_selection;
  40782. } wmi_pdev_enable_duration_based_tx_mode_selection_cmd_fixed_param;
  40783. typedef enum {
  40784. /* Simulation test command types */
  40785. WMI_SIM_TEST_FRAME_CONTENT_CHANGE_CMD,
  40786. WMI_SIM_TEST_DROP_FRAME_CMD,
  40787. WMI_SIM_TEST_DELAY_FRAME_CMD,
  40788. WMI_SIM_TEST_CONFIGURATION_CMD,
  40789. WMI_SIM_TEST_CMD_UNKNOWN = 255,
  40790. } WMI_SIMULATION_TEST_CMD_TYPE;
  40791. typedef enum {
  40792. /* Simulation test sub-command types */
  40793. WMI_SIM_TEST_SUB_CMD_UNKNOWN = 255,
  40794. } WMI_SIMULATION_TEST_SUB_CMD_TYPE;
  40795. #define WMI_SIM_FRAME_TYPE_BIT_POS 0
  40796. #define WMI_SIM_FRAME_SUBTYPE_BIT_POS 8
  40797. #define WMI_SIM_FRAME_SEQ_BIT_POS 16
  40798. #define WMI_SIM_FRAME_OFFSET_BIT_POS 0
  40799. #define WMI_SIM_FRAME_LENGTH_BIT_POS 16
  40800. #define WMI_SIM_FRAME_TYPE_SET(param, value) \
  40801. WMI_SET_BITS(param, WMI_SIM_FRAME_TYPE_BIT_POS, 8, value)
  40802. #define WMI_SIM_FRAME_TYPE_GET(param) \
  40803. WMI_GET_BITS(param, WMI_SIM_FRAME_TYPE_BIT_POS, 8)
  40804. #define WMI_SIM_FRAME_SUBTYPE_SET(param, value) \
  40805. WMI_SET_BITS(param, WMI_SIM_FRAME_SUBTYPE_BIT_POS, 8, value)
  40806. #define WMI_SIM_FRAME_SUBTYPE_GET(param) \
  40807. WMI_GET_BITS(param, WMI_SIM_FRAME_SUBTYPE_BIT_POS, 8)
  40808. #define WMI_SIM_FRAME_SEQ_SET(param, value) \
  40809. WMI_SET_BITS(param, WMI_SIM_FRAME_SEQ_BIT_POS, 8, value)
  40810. #define WMI_SIM_FRAME_SEQ_GET(param) \
  40811. WMI_GET_BITS(param, WMI_SIM_FRAME_SEQ_BIT_POS, 8)
  40812. #define WMI_SIM_FRAME_OFFSET_SET(param, value) \
  40813. WMI_SET_BITS(param, WMI_SIM_FRAME_OFFSET_BIT_POS, 16, value)
  40814. #define WMI_SIM_FRAME_OFFSET_GET(param) \
  40815. WMI_GET_BITS(param, WMI_SIM_FRAME_OFFSET_BIT_POS, 16)
  40816. #define WMI_SIM_FRAME_LENGTH_SET(param, value) \
  40817. WMI_SET_BITS(param, WMI_SIM_FRAME_LENGTH_BIT_POS, 16, value)
  40818. #define WMI_SIM_FRAME_LENGTH_GET(param) \
  40819. WMI_GET_BITS(param, WMI_SIM_FRAME_LENGTH_BIT_POS, 16)
  40820. typedef struct {
  40821. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_simulation_test_cmd_fixed_param */
  40822. A_UINT32 tlv_header;
  40823. /** pdev_id for identifying the MAC.
  40824. * See macros starting with WMI_PDEV_ID_ for values.
  40825. * In non-DBDC case host should set it to 0.
  40826. */
  40827. A_UINT32 pdev_id;
  40828. /** vdev_id for identifying the vap simulation command needs to be applied.
  40829. * This is for future purpose, currently only 1 vap is supported for
  40830. * simulation test mode.
  40831. * Host will always set it to 0 for now.
  40832. */
  40833. A_UINT32 vdev_id;
  40834. /** peer MAC address for identifying the peer for which the simulation
  40835. * command needs to be applied.
  40836. * peer_macaddr needs to be set to '0' for simulation commands which
  40837. * needs to be applied at pdev or vdev level.
  40838. */
  40839. wmi_mac_addr peer_macaddr;
  40840. /** test command type, as per WMI_SIMULATION_TEST_CMD_TYPE */
  40841. A_UINT32 test_cmd_type;
  40842. /** test command type, as per WMI_SIMULATION_TEST_SUB_CMD_TYPE */
  40843. A_UINT32 test_subcmd_type;
  40844. /**
  40845. * The frame type, frame subtype, and frame sequence number
  40846. * are stored as bitfields within the below A_UINT32 "word".
  40847. * Use the WMI_SIM_xxx_GET/SET macros to read and
  40848. * write these bitfields.
  40849. **/
  40850. A_UINT32 frame_type_subtype_seq;
  40851. /**
  40852. * The frame offset and frame length,
  40853. * are stored as bitfields within the below A_UINT32 "word".
  40854. * Use the WMI_SIM_xxx_GET/SET macros to read and
  40855. * write these bitfields.
  40856. **/
  40857. A_UINT32 frame_offset_length;
  40858. /** buf_len: Buffer length in bytes
  40859. * In some cases buf_len == frame_length, but not always.
  40860. * For example, a DELAY_FRAME command will not involve any frame
  40861. * contents, so frame_length will be zero, but buf_len will be
  40862. * non-zero because it will contain command-specific parameters.
  40863. */
  40864. A_UINT32 buf_len;
  40865. /* This TLV is followed by array of bytes:
  40866. * A_UINT8 bufp[];
  40867. * For FRAME_CONTENT_CHANGE commands, bufp contains the first 64 bytes
  40868. * of the frame.
  40869. */
  40870. } wmi_simulation_test_cmd_fixed_param;
  40871. typedef struct {
  40872. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_rsnxe */
  40873. A_UINT32 tlv_header;
  40874. /* rsnxe_param
  40875. * Override RSNXE Used bit in FT reassoc request.
  40876. * Possible values from host are:
  40877. * 0 use default value based on capability
  40878. * 1 override with 1
  40879. * 2 override with 0
  40880. */
  40881. A_UINT32 rsnxe_param;
  40882. } wmi_wfa_config_rsnxe;
  40883. typedef struct {
  40884. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_csa */
  40885. A_UINT32 tlv_header;
  40886. /* ignore_csa
  40887. * Ignore CSA from AP and keep STA in current channel and don't deauth AP.
  40888. * Possible values from host are:
  40889. * 0 default behavior
  40890. * 1 ignore CSA
  40891. */
  40892. A_UINT32 ignore_csa;
  40893. } wmi_wfa_config_csa;
  40894. typedef enum {
  40895. WMI_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_REQ = 0x00000001,
  40896. WMI_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_RSP = 0x00000002,
  40897. WMI_WFA_CONFIG_OCV_FRMTYPE_FT_REASSOC_REQ = 0x00000004,
  40898. WMI_WFA_CONFIG_OCV_FRMTYPE_FILS_REASSOC_REQ = 0x00000008,
  40899. } WMI_WFA_CONFIG_OCV_FRMTYPE;
  40900. typedef struct {
  40901. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_ocv */
  40902. A_UINT32 tlv_header;
  40903. /* frame_types
  40904. * Override OCI channel number in specified frames.
  40905. * Possible frame types from host are enum WMI_WFA_CONFIG_OCV_FRMTYPE.
  40906. */
  40907. A_UINT32 frame_types;
  40908. /* Frequency value in mhz to override in specified frame type */
  40909. A_UINT32 chan_freq;
  40910. } wmi_wfa_config_ocv;
  40911. typedef struct {
  40912. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_saquery */
  40913. A_UINT32 tlv_header;
  40914. /* remain_connect_on_saquery_timeout
  40915. * Don't send deauth on SA Query response timeout.
  40916. * Possible values from host are:
  40917. * 0 default behavior
  40918. * 1 don't send deauth on SA Query response timeout
  40919. */
  40920. A_UINT32 remain_connect_on_saquery_timeout;
  40921. } wmi_wfa_config_saquery;
  40922. typedef struct {
  40923. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_ofdma */
  40924. A_UINT32 tlv_header;
  40925. /* force_he_trigger_to_eht_sta
  40926. * Possible values from host are:
  40927. * 0 default behavior
  40928. * 1 instead of sending EHT triggers to EHT stations, send HE triggers
  40929. */
  40930. A_UINT32 force_he_trigger_to_eht_sta;
  40931. } wmi_wfa_config_ofdma;
  40932. typedef struct {
  40933. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_cmd_fixed_param */
  40934. A_UINT32 tlv_header;
  40935. /** VDEV identifier */
  40936. A_UINT32 vdev_id;
  40937. /* The below TLV arrays follow this structure:
  40938. * wmi_wfa_config_rsnxe wfa_config_rsnxe[]; (0 or 1 elements)
  40939. * wmi_wfa_config_csa wfa_config_csa[]; (0 or 1 elements)
  40940. * wmi_wfa_config_ocv wfa_config_ocv[]; (0 or 1 elements)
  40941. * wmi_wfa_config_saquery wfa_config_saquery[]; (0 or 1 elements)
  40942. * wmi_wfa_config_ofdma wfa_config_ofdma[]; (0 or 1 elements)
  40943. */
  40944. } wmi_wfa_config_cmd_fixed_param;
  40945. #define WMI_TWT_SESSION_FLAG_FLOW_ID_GET(_var) WMI_GET_BITS(_var, 0, 16)
  40946. #define WMI_TWT_SESSION_FLAG_FLOW_ID_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  40947. #define WMI_TWT_SESSION_FLAG_BCAST_TWT_GET(_var) WMI_GET_BITS(_var, 16, 1)
  40948. #define WMI_TWT_SESSION_FLAG_BCAST_TWT_SET(_var, _val) WMI_SET_BITS(_var, 16, 1, _val)
  40949. #define WMI_TWT_SESSION_FLAG_TRIGGER_TWT_GET(_var) WMI_GET_BITS(_var, 17, 1)
  40950. #define WMI_TWT_SESSION_FLAG_TRIGGER_TWT_SET(_var, _val) WMI_SET_BITS(_var, 17, 1, _val)
  40951. #define WMI_TWT_SESSION_FLAG_ANNOUN_TWT_GET(_var) WMI_GET_BITS(_var, 18, 1)
  40952. #define WMI_TWT_SESSION_FLAG_ANNOUN_TWT_SET(_var, _val) WMI_SET_BITS(_var, 18, 1, _val)
  40953. #define WMI_TWT_SESSION_FLAG_TWT_PROTECTION_GET(_var) WMI_GET_BITS(_var, 19, 1)
  40954. #define WMI_TWT_SESSION_FLAG_TWT_PROTECTION_SET(_var, _val) WMI_SET_BITS(_var, 19, 1, _val)
  40955. #define WMI_TWT_SESSION_FLAG_TWT_INFO_FRAME_DISABLED_GET(_var) WMI_GET_BITS(_var, 20, 1)
  40956. #define WMI_TWT_SESSION_FLAG_TWT_INFO_FRAME_DISABLED_SET(_var, _val) WMI_SET_BITS(_var, 20, 1, _val)
  40957. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_VALID_GET(_var) WMI_GET_BITS(_var, 21, 1)
  40958. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_VALID_SET(_var, _val) WMI_SET_BITS(_var, 21, 1, _val)
  40959. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_GET(_var) WMI_GET_BITS(_var, 22, 1)
  40960. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_SET(_var, _val) WMI_SET_BITS(_var, 22, 1, _val)
  40961. #define WMI_TWT_SESSION_FLAG_RESTRICTED_TWT_GET(_var) WMI_GET_BITS(_var, 23, 1)
  40962. #define WMI_TWT_SESSION_FLAG_RESTRICTED_TWT_SET(_var, _val) WMI_SET_BITS(_var, 23, 1, _val)
  40963. typedef struct {
  40964. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_session_stats_info */
  40965. A_UINT32 tlv_hdr;
  40966. A_UINT32 vdev_id;
  40967. wmi_mac_addr peer_mac;
  40968. A_UINT32 event_type; /* event type - defined in enum wmi_twt_session_stats_type */
  40969. /*
  40970. * Flags to provide information on TWT session and session types.
  40971. * This field is filled with the bitwise combination of the flag values
  40972. * defined by WMI_TWT_SESSION_FLAG_xxx
  40973. */
  40974. A_UINT32 flow_id_flags;
  40975. A_UINT32 dialog_id;
  40976. A_UINT32 wake_dura_us;
  40977. A_UINT32 wake_intvl_us;
  40978. /* this long time after TWT resumed the 1st Service Period will start */
  40979. A_UINT32 sp_offset_us;
  40980. /* service period start TSF */
  40981. A_UINT32 sp_tsf_us_lo; /* bits 31:0 */
  40982. A_UINT32 sp_tsf_us_hi; /* bits 63:32 */
  40983. /* Current TSF */
  40984. A_UINT32 curr_tsf_us_lo; /* bits 31:0 */
  40985. A_UINT32 curr_tsf_us_hi; /* bits 63:32 */
  40986. } wmi_twt_session_stats_info;
  40987. enum wmi_twt_session_stats_type {
  40988. WMI_TWT_SESSION_SETUP = 1,
  40989. WMI_TWT_SESSION_TEARDOWN = 2,
  40990. WMI_TWT_SESSION_UPDATE = 3,
  40991. WMI_TWT_SESSION_QUERY_RSP = 4,
  40992. };
  40993. typedef struct {
  40994. /** TLV tag and len; tag equals
  40995. * WMITLV_TAG_STRUC_wmi_pdev_twt_session_stats_event_fixed_param */
  40996. A_UINT32 tlv_header;
  40997. A_UINT32 pdev_id; /* ID of the pdev this response belongs to */
  40998. /* The TLVs follows this structure:
  40999. * wmi_twt_session_stats_info twt_sessions[]; <--- Array of twt_session.
  41000. */
  41001. } wmi_pdev_twt_session_stats_event_fixed_param;
  41002. typedef struct wmi_pdev_vendor_event
  41003. {
  41004. /* type is WMITLV_TAG_STRUC_wmi_vendor_pdev_event_fixed_param */
  41005. A_UINT32 tlv_header;
  41006. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  41007. A_UINT32 pdev_id;
  41008. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41009. A_UINT32 sub_type;
  41010. wmi_pdev_vendor_event_val evt;
  41011. /* NOTE:
  41012. * Future changes may increase the size of pdev_vendor_event.
  41013. * Consequently, no fields can be added here after pdev_vendor_event,
  41014. * because their offsets within wmi_pdev_vendor_event_fixed_param
  41015. * would change, causing backwards incompatibilities.
  41016. */
  41017. /*
  41018. * This fixed_param TLV may be followed by the below TLVs:
  41019. * - A_UINT32 opaque_vendor_var_len_data[]:
  41020. * Variable-length array of opaque data.
  41021. * The _fixed_param.sub_type value clarifies how to interpret the
  41022. * contents of this opaque data.
  41023. */
  41024. } wmi_pdev_vendor_event_fixed_param;
  41025. typedef wmi_pdev_vendor_event_fixed_param wmi_vendor_pdev_event_fixed_param;
  41026. typedef struct wmi_vdev_vendor_event
  41027. {
  41028. /* type is WMITLV_TAG_STRUC_wmi_vendor_vdev_event_fixed_param */
  41029. A_UINT32 tlv_header;
  41030. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  41031. A_UINT32 pdev_id;
  41032. /* unique id identifying the VDEV, generated by the caller */
  41033. A_UINT32 vdev_id;
  41034. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41035. A_UINT32 sub_type;
  41036. wmi_vdev_vendor_event_val evt;
  41037. /* NOTE:
  41038. * Future changes may increase the size of vdev_vendor_event.
  41039. * Consequently, no fields can be added here after vdev_vendor_event,
  41040. * because their offsets within wmi_vdev_vendor_event_fixed_param
  41041. * would change, causing backwards incompatibilities.
  41042. */
  41043. /*
  41044. * This fixed_param TLV may be followed by the below TLVs:
  41045. * - A_UINT32 opaque_vendor_var_len_data[]:
  41046. * Variable-length array of opaque data.
  41047. * The _fixed_param.sub_type value clarifies how to interpret the
  41048. * contents of this opaque data.
  41049. */
  41050. } wmi_vdev_vendor_event_fixed_param;
  41051. typedef wmi_vdev_vendor_event_fixed_param wmi_vendor_vdev_event_fixed_param;
  41052. typedef struct wmi_peer_vendor_event
  41053. {
  41054. /* type is WMITLV_TAG_STRUC_wmi_vendor_peer_event_fixed_param */
  41055. A_UINT32 tlv_header;
  41056. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  41057. A_UINT32 pdev_id;
  41058. /* unique id identifying the VDEV, generated by the caller */
  41059. A_UINT32 vdev_id;
  41060. /* peer MAC address */
  41061. wmi_mac_addr peer_macaddr;
  41062. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41063. A_UINT32 sub_type;
  41064. wmi_peer_vendor_event_val evt;
  41065. /* NOTE:
  41066. * Future changes may increase the size of peer_vendor_event.
  41067. * Consequently, no fields can be added here after peer_vendor_event,
  41068. * because their offsets within wmi_peer_vendor_event_fixed_param
  41069. * would change, causing backwards incompatibilities.
  41070. */
  41071. /*
  41072. * This fixed_param TLV may be followed by the below TLVs:
  41073. * - A_UINT32 opaque_vendor_var_len_data[]:
  41074. * Variable-length array of opaque data.
  41075. * The _fixed_param.sub_type value clarifies how to interpret the
  41076. * contents of this opaque data.
  41077. */
  41078. } wmi_peer_vendor_event_fixed_param;
  41079. typedef wmi_peer_vendor_event_fixed_param wmi_vendor_peer_event_fixed_param;
  41080. typedef struct wmi_pdev_vendor_cmd
  41081. {
  41082. /* type is WMITLV_TAG_STRUC_wmi_vendor_pdev_cmd_fixed_param */
  41083. A_UINT32 tlv_header;
  41084. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  41085. A_UINT32 pdev_id;
  41086. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41087. A_UINT32 sub_type;
  41088. wmi_pdev_vendor_cmd_val cmd;
  41089. /* NOTE:
  41090. * Future changes may increase the size of pdev_vendor_cmd.
  41091. * Consequently, no fields can be added here after pdev_vendor_cmd,
  41092. * because their offsets within wmi_pdev_vendor_cmd_fixed_param
  41093. * would change, causing backwards incompatibilities.
  41094. */
  41095. /*
  41096. * This fixed_param TLV may be followed by the below TLVs:
  41097. * - A_UINT32 opaque_vendor_var_len_data[]:
  41098. * Variable-length array of opaque data.
  41099. * The _fixed_param.sub_type value clarifies how to interpret the
  41100. * contents of this opaque data.
  41101. */
  41102. } wmi_pdev_vendor_cmd_fixed_param;
  41103. typedef wmi_pdev_vendor_cmd_fixed_param wmi_vendor_pdev_cmd_fixed_param;
  41104. typedef struct wmi_vdev_vendor_cmd
  41105. {
  41106. /* type is WMITLV_TAG_STRUC_wmi_vendor_vdev_cmd_fixed_param */
  41107. A_UINT32 tlv_header;
  41108. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  41109. A_UINT32 pdev_id;
  41110. /* unique id identifying the VDEV, generated by the caller */
  41111. A_UINT32 vdev_id;
  41112. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41113. A_UINT32 sub_type;
  41114. wmi_vdev_vendor_cmd_val cmd;
  41115. /* NOTE:
  41116. * Future changes may increase the size of vdev_vendor_cmd.
  41117. * Consequently, no fields can be added here after vdev_vendor_cmd,
  41118. * because their offsets within wmi_vdev_vendor_cmd_fixed_param
  41119. * would change, causing backwards incompatibilities.
  41120. */
  41121. /*
  41122. * This fixed_param TLV may be followed by the below TLVs:
  41123. * - A_UINT32 opaque_vendor_var_len_data[]:
  41124. * Variable-length array of opaque data.
  41125. * The _fixed_param.sub_type value clarifies how to interpret the
  41126. * contents of this opaque data.
  41127. */
  41128. } wmi_vdev_vendor_cmd_fixed_param;
  41129. typedef wmi_vdev_vendor_cmd_fixed_param wmi_vendor_vdev_cmd_fixed_param;
  41130. typedef struct wmi_peer_vendor_cmd
  41131. {
  41132. /* type is WMITLV_TAG_STRUC_wmi_vendor_peer_cmd_fixed_param */
  41133. A_UINT32 tlv_header;
  41134. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  41135. A_UINT32 pdev_id;
  41136. /* unique id identifying the VDEV, generated by the caller */
  41137. A_UINT32 vdev_id;
  41138. /* peer MAC address */
  41139. wmi_mac_addr peer_macaddr;
  41140. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41141. A_UINT32 sub_type;
  41142. wmi_peer_vendor_cmd_val cmd;
  41143. /* NOTE:
  41144. * Future changes may increase the size of peer_vendor_cmd.
  41145. * Consequently, no fields can be added here after peer_vendor_cmd,
  41146. * because their offsets within wmi_peer_vendor_cmd_fixed_param
  41147. * would change, causing backwards incompatibilities.
  41148. */
  41149. /*
  41150. * This fixed_param TLV may be followed by the below TLVs:
  41151. * - A_UINT32 opaque_vendor_var_len_data[]:
  41152. * Variable-length array of opaque data.
  41153. * The _fixed_param.sub_type value clarifies how to interpret the
  41154. * contents of this opaque data.
  41155. */
  41156. } wmi_peer_vendor_cmd_fixed_param;
  41157. typedef wmi_peer_vendor_cmd_fixed_param wmi_vendor_peer_cmd_fixed_param;
  41158. typedef enum {
  41159. WMI_MLO_LINK_FORCE_ACTIVE = 1, /* Force specific links active */
  41160. WMI_MLO_LINK_FORCE_INACTIVE = 2, /* Force specific links inactive */
  41161. WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM = 3, /* Force active a number of links, firmware to decide which links to inactive */
  41162. WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM = 4, /* Force inactive a number of links, firmware to decide which links to inactive */
  41163. WMI_MLO_LINK_NO_FORCE = 5, /* Cancel the force operation of specific links, allow firmware to decide */
  41164. WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE = 6, /* combination of force specific links active & force specific links inactive */
  41165. WMI_MLO_LINK_NON_FORCE_UPDATE = 7, /* Used when host wants to update other fields like disallow_mlo_mode_bmap */
  41166. } WMI_MLO_LINK_FORCE_MODE;
  41167. typedef enum {
  41168. WMI_MLO_LINK_FORCE_REASON_NEW_CONNECT = 1, /* Set force specific links because of new connection */
  41169. WMI_MLO_LINK_FORCE_REASON_NEW_DISCONNECT = 2, /* Set force specific links because of new dis-connection */
  41170. WMI_MLO_LINK_FORCE_REASON_LINK_REMOVAL = 3, /* Set force specific links because of AP-side link removal */
  41171. WMI_MLO_LINK_FORCE_REASON_TDLS = 4, /* Set force specific links because of 11BE MLO TDLS setup/teardown */
  41172. WMI_MLO_LINK_FORCE_REASON_REVERT_FAILURE = 5, /* Set force specific links for revert previous failed due to host reject */
  41173. } WMI_MLO_LINK_FORCE_REASON;
  41174. #define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_ACTIVE(mlo_flags) \
  41175. WMI_GET_BITS(control_flags, 0, 1)
  41176. #define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_ACTIVE(mlo_flags, value) \
  41177. WMI_SET_BITS(control_flags, 0, 1, value)
  41178. #define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_INACTIVE(mlo_flags) \
  41179. WMI_GET_BITS(control_flags, 1, 1)
  41180. #define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_INACTIVE(mlo_flags, value) \
  41181. WMI_SET_BITS(control_flags, 1, 1, value)
  41182. #define WMI_MLO_CONTROL_FLAGS_GET_DYNAMIC_FORCE_LINK_NUM(mlo_flags) \
  41183. WMI_GET_BITS(control_flags, 2, 1)
  41184. #define WMI_MLO_CONTROL_FLAGS_SET_DYNAMIC_FORCE_LINK_NUM(mlo_flags, value) \
  41185. WMI_SET_BITS(control_flags, 2, 1, value)
  41186. /*
  41187. * This structure is used for passing wmi_mlo_control_flags.
  41188. *
  41189. * - When force_mode is WMI_MLO_LINK_FORCE_ACTIVE or
  41190. * WMI_MLO_LINK_FORCE_INACTIVE host can pass below control flags,
  41191. * to indicate if FW need to clear earlier force bitmap config.
  41192. *
  41193. * - When force mode is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  41194. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM, host can pass below control flags,
  41195. * to indicate if FW need to use force link number instead of force link
  41196. * bitmap.
  41197. */
  41198. typedef struct {
  41199. union {
  41200. struct {
  41201. A_UINT32 overwrite_force_active_bitmap:1, /* indicate overwrite all earlier force_active bitmaps */
  41202. overwrite_force_inactive_bitmap:1, /* indicate overwrite all earlier force_inactive bitmaps */
  41203. dynamic_force_link_num:1, /* indicate fw to use force link number instead of force link bitmap */
  41204. unused: 29;
  41205. };
  41206. A_UINT32 control_flags;
  41207. };
  41208. } wmi_mlo_control_flags;
  41209. typedef struct wmi_mlo_link_set_active_cmd
  41210. {
  41211. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_set_active_cmd_fixed_param; */
  41212. A_UINT32 tlv_header;
  41213. /** enum WMI_MLO_LINK_FORCE_MODE */
  41214. A_UINT32 force_mode;
  41215. /** reason of force link active / inactive, enum WMI_MLO_LINK_FORCE_REASON */
  41216. A_UINT32 reason;
  41217. /* indicate use vdev_id bitmap or link_id_bitmap */
  41218. A_UINT32 use_ieee_link_id_bitmap;
  41219. wmi_mac_addr ap_mld_mac_addr;
  41220. wmi_mlo_control_flags ctrl_flags;
  41221. /* The TLVs follows this structure:
  41222. * wmi_mlo_set_active_link_number_param link_number_param[];
  41223. * Link number parameters, optional TLV.
  41224. * Present when force type is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  41225. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM.
  41226. * In other cases the length of array should be 0.
  41227. *---
  41228. * If use_ieee_link_id_bitmap equals 0 vdev_id_bitmap[] & vdev_id_bitmap2[]
  41229. * are valid.
  41230. * A_UINT32 vdev_id_bitmap[];
  41231. * Optional TLV, present when force type is WMI_MLO_LINK_FORCE_ACTIVE
  41232. * or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE,
  41233. * to specific the vdevs to configure.
  41234. * For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE vdev_id_bitmap[]
  41235. * carry the active vdev bitmap.
  41236. * In other cases the length of the array should be 0.
  41237. * A_UINT32 vdev_id_bitmap2[];
  41238. * For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE vdev_id_bitmap2[]
  41239. * carry the inactive vdev bitmap.
  41240. * In other cases the length of the array should be 0.
  41241. *---
  41242. * If use_ieee_link_id_bitmap equals 1 ieee_link_id_bitmap[] &
  41243. * ieee_link_id_bitmap2[] are valid.
  41244. * A_UINT32 ieee_link_id_bitmap[];
  41245. * present for WMI_MLO_LINK_FORCE_ACTIVE
  41246. * or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE
  41247. * or WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  41248. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM
  41249. * A_UINT32 ieee_link_id_bitmap2[];
  41250. * For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE ieee_link_id_bitmap2[]
  41251. * carry the inactive linkid bitmap.
  41252. * In other cases the length of the array should be 0.
  41253. *---
  41254. * wmi_disallowed_mlo_mode_bitmap_param_t disallow_mlo_mode_bmap[];
  41255. */
  41256. } wmi_mlo_link_set_active_cmd_fixed_param;
  41257. typedef struct wmi_mlo_set_active_link_number_param
  41258. {
  41259. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_set_active_link_number_param */
  41260. A_UINT32 tlv_header;
  41261. /** number of link to be config */
  41262. A_UINT32 num_of_link;
  41263. /** VDEV type, see values for vdev_type (WMI_VDEV_TYPE_AP,WMI_VDEV_TYPE_STA,
  41264. * WMI_VDEV_TYPE_IBSS, WMI_VDEV_TYPE_MONITOR,WMI_VDEV_TYPE_NAN,WMI_VDEV_TYPE_NDI ...)
  41265. */
  41266. A_UINT32 vdev_type;
  41267. /** VDEV subtype, see values for vdev_subtype (WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE,
  41268. * WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT, WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO ...)*/
  41269. A_UINT32 vdev_subtype;
  41270. /** home channel frequency in MHz of the vdev*/
  41271. A_UINT32 home_freq;
  41272. } wmi_mlo_set_active_link_number_param;
  41273. #define WMI_MLO_MODE_MLMR 0x1
  41274. #define WMI_MLO_MODE_EMLSR 0x2
  41275. #define WMI_MLO_IEEE_LINK_ID_INVALID 0xFF
  41276. #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID1(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 0, 8)
  41277. #define WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, value) WMI_SET_BITS(ieee_link_id_comb, 0, 8, value)
  41278. #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID2(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 8, 8)
  41279. #define WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, value) WMI_SET_BITS(ieee_link_id_comb, 8, 8, value)
  41280. #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID3(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 16, 8)
  41281. #define WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID3(ieee_link_id_comb, value) WMI_SET_BITS(ieee_link_id_comb, 16, 8, value)
  41282. #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID4(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 24, 8)
  41283. #define WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID4(ieee_link_id_comb, value) WMI_SET_BITS(ieee_link_id_comb, 24, 8, value)
  41284. typedef struct wmi_disallowed_mlo_mode_bitmap_param
  41285. {
  41286. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_disallowed_mlo_mode_bitmap_param */
  41287. A_UINT32 tlv_header;
  41288. /** disallowed_mode_bitmap:
  41289. * Bitmap of MLO Modes like MLMR, eMLSR which are not allowed.
  41290. * Refer to WMI_MLO_MODE_*
  41291. * disallowed_mode_bitmap Meaning
  41292. * ====================== =================
  41293. * 0x0 No restriction
  41294. * 0x1 MLMR is not allowed
  41295. * 0x2 EMLSR is not allowed
  41296. * 0x3 MLMR and EMLSR are not allowed
  41297. */
  41298. A_UINT32 disallowed_mode_bitmap;
  41299. /** ieee_link_id_comb:
  41300. * Give combination of IEEE link IDs for which above disallowed_mode_bitmap
  41301. * is applicable.
  41302. * Each 8-bits in ieee_link_id_comb represents one link ID.
  41303. * A link ID is an integer value between 0 and 14.
  41304. * Please set WMI_MLO_IEEE_LINK_ID_INVALID (0xff) if 8-bits is not used.
  41305. * Use WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID* and _SET_LINK_ID* to get/set
  41306. * link IDs in this field.
  41307. */
  41308. A_UINT32 ieee_link_id_comb;
  41309. /** Example:
  41310. * Say there are 3 MLO links with ieee link IDs as 1,2 and 10.
  41311. * Say host wants to disallow MLMR between links with IDs 1 and 2,
  41312. * disallow eMLSR between links with IDs 1 and 10,
  41313. * disallow MLMR and eMLSR for links with IDs 2 and 10.
  41314. * There will be 3 TLVs of type wmi_disallowed_mlo_mode_bitmap_param
  41315. * like below.
  41316. *
  41317. * wmi_disallowed_mlo_mode_bitmap_param[0]:
  41318. * disallowed_mode_bitmap = 0x1,
  41319. * ieee_link_id_comb = 0xFFFF0201
  41320. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x01)
  41321. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x02)
  41322. *
  41323. * wmi_disallowed_mlo_mode_bitmap_param[1]
  41324. * disallowed_mode_bitmap = 0x2,
  41325. * ieee_link_id_comb = 0xFFFF0A01
  41326. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x01)
  41327. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x0a)
  41328. *
  41329. * wmi_disallowed_mlo_mode_bitmap_param[2]
  41330. * disallowed_mode_bitmap = 0x3,
  41331. * ieee_link_id_comb = 0xFFFF0A02
  41332. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x02)
  41333. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x0a)
  41334. */
  41335. } wmi_disallowed_mlo_mode_bitmap_param;
  41336. typedef enum {
  41337. WMI_MLO_LINK_SET_ACTIVE_STATUS_SUCCESS = 0,
  41338. WMI_MLO_LINK_SET_ACTIVE_STATUS_HOST_REJECT = 1,
  41339. } WMI_MLO_LINK_SET_ACTIVE_STATUS;
  41340. typedef struct wmi_mlo_link_set_active_resp_event
  41341. {
  41342. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_set_active_resp_event_fixed_param; */
  41343. A_UINT32 tlv_header;
  41344. /** Return status. 0 for success, non-zero otherwise */
  41345. A_UINT32 status;
  41346. /* indicate use vdev_id bitmap or link_id_bitmap */
  41347. A_UINT32 use_ieee_link_id_bitmap;
  41348. wmi_mac_addr ap_mld_mac_addr;
  41349. /* The TLVs follows this structure:
  41350. *---
  41351. * If use_ieee_link_id_bitmap equals 0, vdev_bitmap[] are valid.
  41352. * A_UINT32 force_active_vdev_bitmap[]; <-- current force active vdev.
  41353. * A_UINT32 force_inactive_vdev_bitmap[]; <-- current force inactive vdevs
  41354. *---
  41355. * If use_ieee_link_id_bitmap equals 1, ieee_link_id_bitmap[] are valid.
  41356. * A_UINT32 force_active_ieee_link_id_bitmap[];
  41357. * A_UINT32 force_inactive_ieee_link_id_bitmap[];
  41358. *---
  41359. * current active ieee link id bitmap & inactive ieee link id bitmap
  41360. * A_UINT32 current_active_ieee_link_id_bitmap[];
  41361. * A_UINT32 current_inactive_ieee_link_id_bitmap[];
  41362. */
  41363. } wmi_mlo_link_set_active_resp_event_fixed_param;
  41364. typedef struct {
  41365. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_setup_cmd_fixed_param; */
  41366. A_UINT32 tlv_header;
  41367. /** Unique ID representing the hw_links part of the MLD */
  41368. A_UINT32 mld_group_id;
  41369. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41370. A_UINT32 pdev_id;
  41371. /*
  41372. * Followed by TLVs:
  41373. * A_UINT32 hw_link_ids[];
  41374. */
  41375. } wmi_mlo_setup_cmd_fixed_param;
  41376. typedef struct {
  41377. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_setup_complete_event_fixed_param; */
  41378. A_UINT32 tlv_header;
  41379. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41380. A_UINT32 pdev_id;
  41381. /** Return status. 0 for success, non-zero otherwise */
  41382. A_UINT32 status;
  41383. /** max_ml_peer_ids:
  41384. * Max number of ml_peerids across the SOC, Derived as
  41385. * max_mlo_peer * num chips.
  41386. * (Max_mlo_peer and num_chips are provided by Host Platform
  41387. * in QMI exchange).
  41388. */
  41389. A_UINT32 max_ml_peer_ids;
  41390. } wmi_mlo_setup_complete_event_fixed_param;
  41391. typedef struct {
  41392. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ready_cmd_fixed_param; */
  41393. A_UINT32 tlv_header;
  41394. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41395. A_UINT32 pdev_id;
  41396. } wmi_mlo_ready_cmd_fixed_param;
  41397. typedef enum wmi_mlo_tear_down_reason_code_type {
  41398. WMI_MLO_TEARDOWN_REASON_SSR,
  41399. /* keep old name as alias for new name */
  41400. WMI_MLO_TEARDOWN_SSR_REASON = WMI_MLO_TEARDOWN_REASON_SSR,
  41401. WMI_MLO_TEARDOWN_REASON_HOST_INITIATED,
  41402. /* keep old name as alias for new name */
  41403. WMI_MLO_TEARDOWN_HOST_INITIATED_REASON =
  41404. WMI_MLO_TEARDOWN_REASON_HOST_INITIATED,
  41405. WMI_MLO_TEARDOWN_REASON_STANDBY_DOWN,
  41406. WMI_MLO_TEARDOWN_REASON_DYNAMIC_WSI_REMAP,
  41407. } WMI_MLO_TEARDOWN_REASON_TYPE;
  41408. typedef struct {
  41409. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_teardown_fixed_param; */
  41410. A_UINT32 tlv_header;
  41411. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41412. A_UINT32 pdev_id;
  41413. /** reason_code: of type WMI_TEARDOWN_REASON_TYPE */
  41414. A_UINT32 reason_code;
  41415. /* trigger_umac_reset : of type A_BOOL to indicate the umac reset for the partner chip. */
  41416. A_UINT32 trigger_umac_reset;
  41417. /* erp_standby_mode : of type A_BOOL to indicate the chip is going to be active in ERP */
  41418. A_UINT32 erp_standby_mode;
  41419. } wmi_mlo_teardown_fixed_param;
  41420. typedef struct {
  41421. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_teardown_complete_fixed_param; */
  41422. A_UINT32 tlv_header;
  41423. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41424. A_UINT32 pdev_id;
  41425. /** Return status. 0 for success, non-zero otherwise */
  41426. A_UINT32 status;
  41427. } wmi_mlo_teardown_complete_fixed_param;
  41428. typedef struct {
  41429. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_peer_recommended_links; */
  41430. A_UINT32 tlv_header;
  41431. /** AID (association id) of this station */
  41432. A_UINT32 assoc_id;
  41433. /** Request link id set to disable */
  41434. A_UINT32 linkid_bitmap;
  41435. } wmi_mlo_peer_recommended_links;
  41436. typedef struct {
  41437. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_recommendation_fixed_param */
  41438. A_UINT32 tlv_header;
  41439. /* unique id identifying the VDEV, generated by the caller */
  41440. A_UINT32 vdev_id;
  41441. /* DTIM specified in units of num beacon intervals */
  41442. A_UINT32 dtim_period;
  41443. /* The TLVs follows this structure:
  41444. * wmi_mlo_peer_recommended_links recommended_links[];
  41445. */
  41446. } wmi_mlo_link_recommendation_fixed_param;
  41447. #define WMI_TID_TO_LINK_MAP_TID_NUM_GET(_var) WMI_GET_BITS(_var, 0, 5)
  41448. #define WMI_TID_TO_LINK_MAP_TID_NUM_SET(_var, _val) WMI_SET_BITS(_var, 0, 5, _val)
  41449. #define WMI_TID_TO_LINK_MAP_DIR_GET(_var) WMI_GET_BITS(_var, 5, 2)
  41450. #define WMI_TID_TO_LINK_MAP_DIR_SET(_var, _val) WMI_SET_BITS(_var, 5, 2, _val)
  41451. #define WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET(_var) WMI_GET_BITS(_var, 7, 1)
  41452. #define WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET(_var, _val) WMI_SET_BITS(_var, 7, 1, _val)
  41453. #define WMI_TID_TO_LINK_MAP_LINK_MASK_GET(_var) WMI_GET_BITS(_var, 8, 16)
  41454. #define WMI_TID_TO_LINK_MAP_LINK_MASK_SET(_var, _val) WMI_SET_BITS(_var, 8, 16, _val)
  41455. enum {
  41456. WMI_TID_TO_LINK_MAP_DIR_DL,
  41457. WMI_TID_TO_LINK_MAP_DIR_UL,
  41458. WMI_TID_TO_LINK_MAP_DIR_BIDI,
  41459. };
  41460. typedef struct {
  41461. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tid_to_link_map */
  41462. A_UINT32 tlv_header;
  41463. /**
  41464. * A_UINT32
  41465. * WMI_TID_TO_LINK_MAP_TID_NUM_GET / WMI_TID_TO_LINK_MAP_TID_NUM_SET
  41466. * tid_num:5,
  41467. *
  41468. * WMI_TID_TO_LINK_MAP_DIR_GET / WMI_TID_TO_LINK_MAP_DIR_SET
  41469. * dir:2, // 0 - DL, 1 - UL, 2 - BiDi
  41470. *
  41471. * WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET /
  41472. * WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET
  41473. * default_link_mapping:1, // If this is set to 1, ignore
  41474. * // link_mapping_mask for the specific tid
  41475. *
  41476. * WMI_TID_TO_LINK_MAP_LINK_MASK_GET / WMI_TID_TO_LINK_MAP_LINK_MASK_SET
  41477. * link_mapping_mask:16,
  41478. *
  41479. * rsvd:8;
  41480. */
  41481. A_UINT32 tid_to_link_map_info;
  41482. } wmi_tid_to_link_map;
  41483. #define WMI_MAX_NUM_PREFERRED_LINKS 4
  41484. /* NOTE:
  41485. * wmi_peer_preferred_link_map will be deprecated and replaced
  41486. * by wmi_mlo_peer_link_control_param.
  41487. */
  41488. typedef struct {
  41489. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_preferred_link_map */
  41490. A_UINT32 tlv_header;
  41491. /* num_preferred_links:
  41492. * If it is 0, all links are equally preferred and which link to be used
  41493. * in each schedule is decided by FW.
  41494. */
  41495. A_UINT32 num_preferred_links;
  41496. /* [0] - highest preferred link, [1] - 2nd preferred link, etc. */
  41497. A_UINT32 preferred_link_order[WMI_MAX_NUM_PREFERRED_LINKS];
  41498. /* expected_max_latency_ms:
  41499. * 0 - Expected Max Latency to be estimated in Firmware
  41500. * Non 0 - Firmware should try to achieve given max latency
  41501. * in first preferred link.
  41502. * If unable to meet in first preferred link, start scheduling
  41503. * in next preferred link and so on.
  41504. */
  41505. A_UINT32 expected_max_latency_ms[WLAN_MAX_AC];
  41506. } wmi_peer_preferred_link_map;
  41507. #define WMI_MLO_PEER_LINK_CONTROL_PARAM_SET_TX_LINK_TUPLE_CONFIG(comp, value) \
  41508. WMI_SET_BITS(comp, 0, 1, value)
  41509. #define WMI_MLO_PEER_LINK_CONTROL_PARAM_GET_TX_LINK_TUPLE_CONFIG(comp) \
  41510. WMI_GET_BITS(comp, 0, 1)
  41511. #define WMI_MLO_PEER_LINK_CONTROL_PARAM_SET_PREFERRED_LINK_CONFIG(comp, value) \
  41512. WMI_SET_BITS(comp, 1, 1, value)
  41513. #define WMI_MLO_PEER_LINK_CONTROL_PARAM_GET_PREFERRED_LINK_CONFIG(comp) \
  41514. WMI_GET_BITS(comp, 1, 1)
  41515. #define WMI_MAX_NUM_MLO_LINKS 5
  41516. typedef struct {
  41517. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_preferred_link_map */
  41518. A_UINT32 tlv_header;
  41519. /** flags:
  41520. * Bit0 : tx_link_tuple enable/disable.
  41521. * When enabled, f/w picks the links in tx_link_tuple_bitmap
  41522. * for TX scheduling.
  41523. * Bit1 : preferred_link enable/disable.
  41524. * When enabled, f/w schedules the data on preferred link first.
  41525. * If it fails to deliver within a timeout, it additionally
  41526. * starts attempting TX on non-preferred links.
  41527. * Bit2-31 : reserved
  41528. */
  41529. A_UINT32 flags;
  41530. /* num_links: number of links present in link_priority_order array below.
  41531. * 0 - we dont have sorted list of link priority
  41532. * non zero - this should be the max number of links that the peer supports.
  41533. */
  41534. A_UINT32 num_links;
  41535. /* link_priority_order:
  41536. * [0] - ID of highest priority link,
  41537. * [1] - ID of 2nd highest priority link, etc.
  41538. */
  41539. A_UINT32 link_priority_order[WMI_MAX_NUM_MLO_LINKS];
  41540. /* tx_link_tuple_bitmap:
  41541. * bitmap of indices within link_priority_order array that needs to be
  41542. * selected in the TX link tuple.
  41543. * FW will not attempt scheduling on a link if it is not part of the
  41544. * tx_link_tuple.
  41545. */
  41546. A_UINT32 tx_link_tuple_bitmap;
  41547. /* max_timeout_ms: applicable only when preferred_link is enabled
  41548. * 0 - max_timeout_ms to be estimated in Firmware
  41549. * Non 0 - value beyond which, firmware should additionally start
  41550. * scheduling on non preferred links
  41551. */
  41552. A_UINT32 max_timeout_ms[WLAN_MAX_AC];
  41553. } wmi_mlo_peer_link_control_param;
  41554. typedef struct {
  41555. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_to_link_map_fixed_param */
  41556. A_UINT32 tlv_header;
  41557. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41558. A_UINT32 pdev_id;
  41559. /** MLO Peer's current link MAC address */
  41560. wmi_mac_addr link_macaddr;
  41561. /** mapping_switch_time from the T2LM IE */
  41562. A_UINT32 mapping_switch_time;
  41563. /** expected_duration from the T2LM IE, in units of TUs */
  41564. A_UINT32 expected_duration;
  41565. /**
  41566. * Following this structure is the TLV:
  41567. * - struct wmi_tid_to_link_map tid_to_link_map[];
  41568. * - struct wmi_peer_preferred_link_map peer_preferred_link_map[];
  41569. * Note - TLV array of peer_preferred_link_map has either 0 or 1
  41570. * entries, not multiple entries.
  41571. * - struct wmi_mlo_peer_link_control_param[];
  41572. * Note: can have 0 or 1 entry.
  41573. */
  41574. } wmi_peer_tid_to_link_map_fixed_param;
  41575. typedef struct{
  41576. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ap_vdev_tid_to_link_map_cmd_fixed_param */
  41577. A_UINT32 tlv_header;
  41578. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41579. A_UINT32 pdev_id;
  41580. /** vdev_id for identifying the MLO Vap */
  41581. A_UINT32 vdev_id;
  41582. /** DEPRECATED: disabled link bits */
  41583. A_UINT32 disabled_link_bitmap; /* DEPRECATED */
  41584. /**
  41585. * Following this structure is the TLV:
  41586. * struct wmi_mlo_ap_vdev_tid_to_link_map_ie_info[];
  41587. */
  41588. } wmi_mlo_ap_vdev_tid_to_link_map_cmd_fixed_param;
  41589. typedef enum {
  41590. /* Mapping Switch TSF */
  41591. WMI_MAP_SWITCH_TIMER_TSF,
  41592. /* Mapping Switch Timer Expired */
  41593. WMI_MAP_SWITCH_TIMER_EXPIRED,
  41594. /* Expected Duration Expired */
  41595. WMI_EXPECTED_DUR_EXPIRED,
  41596. } WMI_MLO_TID_TO_LINK_MAP_STATUS;
  41597. #define WMI_BCAST_T2LM_MAX 16 /* max number of vdevs covered by T2LM stats */
  41598. typedef struct {
  41599. /* TLV tag and len; tag equals
  41600. * WMITLV_TAG_STRUC_wmi_ctrl_path_t2lm_stats_struct
  41601. */
  41602. A_UINT32 tlv_header;
  41603. /*
  41604. * The below arrays store per-vdev counters, and are indexed by vdev ID.
  41605. * The number of valid elements is min(WMI_BCAST_T2LM_MAX, num vdevs).
  41606. */
  41607. A_UINT32 bcast_t2lm_wmi_cmd[WMI_BCAST_T2LM_MAX];
  41608. A_UINT32 bcast_t2lm_wmi_evt_map_swt_tme_tsf[WMI_BCAST_T2LM_MAX];
  41609. A_UINT32 bcast_t2lm_wmi_evt_map_swt_tme_exp[WMI_BCAST_T2LM_MAX];
  41610. A_UINT32 bcast_t2lm_wmi_evt_exp_dur_exp[WMI_BCAST_T2LM_MAX];
  41611. } wmi_ctrl_path_t2lm_stats_struct;
  41612. typedef struct{
  41613. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ap_vdev_tid_to_link_map_evt_fixed_param */
  41614. A_UINT32 tlv_header;
  41615. /* vdev_id of AP MLO vap */
  41616. A_UINT32 vdev_id;
  41617. /* containts mapping status of WMI_MLO_TID_TO_LINK_MAP_STATUS */
  41618. A_UINT32 status_type;
  41619. /* Mapping switch time of current TSF value */
  41620. A_UINT32 mapping_switch_tsf;
  41621. } wmi_mlo_ap_vdev_tid_to_link_map_evt_fixed_param;
  41622. /* CTRL Field bit-5-7 reserved */
  41623. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_GET(_var) WMI_GET_BITS(_var, 0, 2)
  41624. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_SET(_var, _val) WMI_SET_BITS(_var, 0, 2, _val)
  41625. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_GET(_var) WMI_GET_BITS(_var, 2, 1)
  41626. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_SET(_var, _val) WMI_SET_BITS(_var, 2, 1, _val)
  41627. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_GET(_var) WMI_GET_BITS(_var, 3, 1)
  41628. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_SET(_var, _val) WMI_SET_BITS(_var, 3, 1, _val)
  41629. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_GET(_var) WMI_GET_BITS(_var, 4, 1)
  41630. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_SET(_var, _val) WMI_SET_BITS(_var, 4, 1, _val)
  41631. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_GET(_var) WMI_GET_BITS(_var, 5, 1)
  41632. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_SET(_var, _val) WMI_SET_BITS(_var, 5, 1, _val)
  41633. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_GET(_var) WMI_GET_BITS(_var, 8, 8)
  41634. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_SET(_var, _val) WMI_SET_BITS(_var, 8, 8, _val)
  41635. /* IEEE Link ID 15 bits on each link id 1 bit is reserved */
  41636. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_GET(_var) WMI_GET_BITS(_var, 0, 15)
  41637. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_SET(_var, _val) WMI_SET_BITS(_var, 0, 15, _val)
  41638. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_GET(_var) WMI_GET_BITS(_var, 16, 15)
  41639. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_SET(_var, _val) WMI_SET_BITS(_var, 16, 15, _val)
  41640. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_GET(_var) WMI_GET_BITS(_var, 0, 15)
  41641. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_SET(_var, _val) WMI_SET_BITS(_var, 0, 15, _val)
  41642. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_GET(_var) WMI_GET_BITS(_var, 16, 15)
  41643. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_SET(_var, _val) WMI_SET_BITS(_var, 16, 15, _val)
  41644. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_GET(_var) WMI_GET_BITS(_var, 0, 15)
  41645. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_SET(_var, _val) WMI_SET_BITS(_var, 0, 15, _val)
  41646. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_GET(_var) WMI_GET_BITS(_var, 16, 15)
  41647. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_SET(_var, _val) WMI_SET_BITS(_var, 16, 15, _val)
  41648. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_GET(_var) WMI_GET_BITS(_var, 0, 15)
  41649. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_SET(_var, _val) WMI_SET_BITS(_var, 0, 15, _val)
  41650. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_GET(_var) WMI_GET_BITS(_var, 16, 15)
  41651. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_SET(_var, _val) WMI_SET_BITS(_var, 16, 15, _val)
  41652. /* HW Link ID each hw link with 16-bit */
  41653. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_GET(_var) WMI_GET_BITS(_var, 0, 16)
  41654. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  41655. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_GET(_var) WMI_GET_BITS(_var, 16, 16)
  41656. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_SET(_var, _val) WMI_SET_BITS(_var, 16, 16, _val)
  41657. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_GET(_var) WMI_GET_BITS(_var, 0, 16)
  41658. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  41659. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_GET(_var) WMI_GET_BITS(_var, 16, 16)
  41660. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_SET(_var, _val) WMI_SET_BITS(_var, 16, 16, _val)
  41661. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_GET(_var) WMI_GET_BITS(_var, 0, 16)
  41662. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  41663. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_GET(_var) WMI_GET_BITS(_var, 16, 16)
  41664. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_SET(_var, _val) WMI_SET_BITS(_var, 16, 16, _val)
  41665. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_GET(_var) WMI_GET_BITS(_var, 0, 16)
  41666. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  41667. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_GET(_var) WMI_GET_BITS(_var, 16, 16)
  41668. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_SET(_var, _val) WMI_SET_BITS(_var, 16, 16, _val)
  41669. typedef struct {
  41670. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tid_to_link_map */
  41671. A_UINT32 tlv_header;
  41672. /*
  41673. * A_UINT32
  41674. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_GET /
  41675. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_SET
  41676. * direction: 2 // 0 - DL, 1 - UL, 2 - BiDi
  41677. *
  41678. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_GET /
  41679. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_SET
  41680. * default_link_mapping:1 // 1 - Default Link Mapping Present
  41681. * // 0 - Default Link Mapping not present
  41682. *
  41683. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_GET /
  41684. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_SET
  41685. * mapping_switch_time_present:1 // 1 - Mapping Switch Time
  41686. * // Field Present
  41687. * // 0 - Mapping Switch Time
  41688. * // Field not Present
  41689. *
  41690. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_GET /
  41691. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_SET
  41692. * expected_duration_present:1 // 1 - Expected Duration Field Present
  41693. * // 0 - Expected Duration Field
  41694. * // not Present
  41695. *
  41696. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_GET
  41697. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_SET
  41698. * link_mapping_size:1 // 1 - Link Mapping Size 1 Octets
  41699. * // 0 - Link Mapping Size 2 Octets
  41700. *
  41701. * reserved:2
  41702. *
  41703. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_GET /
  41704. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_SET
  41705. * link_mapping_presence_indicator:8 // Link mapping presence indicator
  41706. *
  41707. * reserved2:16 // upper 16 bits are unused
  41708. */
  41709. A_UINT32 tid_to_link_map_ctrl;
  41710. /*
  41711. * Mapping Switch time represents TSF time for the New TID_TO_LINK Mapping
  41712. * will be established
  41713. * 16 bit of TSF time ( from bits 10 to 25)
  41714. *
  41715. * Default to Non-Default: One TID_TO_LINK Mapping IE
  41716. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41717. * Mapping switch time present for New Non-Default Mapping
  41718. *
  41719. * Non-Default to Non-Default: Two TID_TO_LINK Mapping IE
  41720. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41721. * Mapping switch time not present for 1st TID_TO_LINK Mapping
  41722. * (Current Non-Default Mapping) value would be zero
  41723. * Mapping switch time present for 2nd TID_TO_LINK Mapping
  41724. * (New Non-Default Mapping)
  41725. *
  41726. * Non_Default to Default: One TID_TO_LINK Mapping IE
  41727. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41728. * Mapping switch time not present value would be zero
  41729. */
  41730. A_UINT32 map_switch_time;
  41731. /*
  41732. * Expected duration would be either duration/remaining duration of Mapping
  41733. *
  41734. * Default to Non-Default: One TID_TO_LINK Mapping IE
  41735. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41736. * Expected duration represents duration of New Non-Default Mapping
  41737. * will be effective
  41738. *
  41739. * Non-Default to Non-Default: Two TID_TO_LINK Mapping IE
  41740. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41741. * Expected duration represents remaing duration of 1st TID_TO_LINK
  41742. * Mapping (Current Non-Default Mapping)
  41743. * Expected duration represents duration of the 2nd TID_TO_LINK
  41744. * Mapping (New Non-Default Mapping ) will be effective
  41745. *
  41746. * Non_Default to Default: One TID_TO_LINK Mapping IE
  41747. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41748. * Expected duration represents remaing duration of Current Non-Default
  41749. * Mapping
  41750. */
  41751. A_UINT32 expected_duration;
  41752. /*
  41753. * for default_link_mapping ieee_tid_0_1_link_map value would be zero
  41754. * which means IE should not include this param
  41755. * A_UINT32
  41756. *
  41757. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_GET /
  41758. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_SET
  41759. * tid_0_link_id:15 // TID_0 Link IDs (0 to 14)
  41760. * // Non-Zero value represents links mapped
  41761. * // to this TID.
  41762. * // Zero value represents links are not mapped
  41763. * // to this TID.
  41764. *
  41765. * reserved:1
  41766. *
  41767. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_GET /
  41768. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_SET
  41769. * tid_1_link_id:15 // TID_1 Link IDs (0 to 14)
  41770. * // Non-Zero value represents links mapped
  41771. * // to this TID.
  41772. * // Zero value represents links are not mapped
  41773. * // to this TID.
  41774. *
  41775. * reserved:1
  41776. */
  41777. A_UINT32 ieee_tid_0_1_link_map;
  41778. /*
  41779. * for default_link_mapping ieee_tid_2_3_link_map value would be zero
  41780. * which means IE should not include this param
  41781. * A_UINT32
  41782. *
  41783. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_GET /
  41784. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_SET
  41785. * tid_2_link_id:15 // TID_2 Link IDs (0 to 14)
  41786. * // Non-Zero value represents links mapped
  41787. * // to this TID.
  41788. * // Zero value represents links are not mapped
  41789. * // to this TID.
  41790. *
  41791. * reserved:1
  41792. *
  41793. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_GET /
  41794. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_SET
  41795. * tid_3_link_id:15 // TID_3 Link IDs (0 to 14)
  41796. * // Non-Zero value represents links mapped
  41797. * // to this TID.
  41798. * // Zero value represents links are not mapped
  41799. * // to this TID.
  41800. *
  41801. * reserved:1
  41802. */
  41803. A_UINT32 ieee_tid_2_3_link_map;
  41804. /*
  41805. * for default_link_mapping ieee_tid_4_5_link_map value would be zero
  41806. * which means IE should not include this param
  41807. * A_UINT32
  41808. *
  41809. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_GET /
  41810. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_SET
  41811. * tid_4_link_id:15 // TID_4 Link IDs (0 to 14)
  41812. * // Non-Zero value represents links mapped
  41813. * // to this TID.
  41814. * // Zero value represents links are not mapped
  41815. * // to this TID.
  41816. *
  41817. * reserved:1
  41818. *
  41819. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_GET /
  41820. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_SET
  41821. * tid_5_link_id:15 // TID_5 Link IDs (0 to 14)
  41822. * // Non-Zero value represents links mapped
  41823. * // to this TID.
  41824. * // Zero value represents links are not mapped
  41825. * // to this TID.
  41826. *
  41827. * reserved:1
  41828. */
  41829. A_UINT32 ieee_tid_4_5_link_map;
  41830. /*
  41831. * for default_link_mapping ieee_tid_6_7_link_map value would be zero
  41832. * which means IE should not include this param
  41833. * A_UINT32
  41834. *
  41835. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_GET /
  41836. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_SET
  41837. * tid_6_link_id:15 // TID_6 Link IDs (0 to 14)
  41838. * // Non-Zero value represents links mapped
  41839. * // to this TID.
  41840. * // Zero value represents links are not mapped
  41841. * // to this TID.
  41842. *
  41843. * reserved:1
  41844. *
  41845. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_GET /
  41846. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_SET
  41847. * tid_7_link_id:15 // TID_7 Link IDs (0 to 14)
  41848. * // Non-Zero value represents links mapped
  41849. * // to this TID.
  41850. * // Zero value represents links are not mapped
  41851. * // to this TID.
  41852. *
  41853. * reserved:1
  41854. */
  41855. A_UINT32 ieee_tid_6_7_link_map;
  41856. /*
  41857. * hw_link_map will be used by the FW to pause or unpause the TIDs
  41858. * in all the associated MLD STAs in the corresponsing MLD VAP
  41859. * A_UINT32
  41860. *
  41861. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_GET /
  41862. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_SET
  41863. * hw_tid_0_link_map:16
  41864. *
  41865. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_GET /
  41866. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_SET
  41867. * hw_tid_1_link_map:16
  41868. */
  41869. A_UINT32 hw_tid_0_1_link_map;
  41870. /*
  41871. * hw_link_map will be used by the FW to pause or unpause the TIDs
  41872. * in all the associated MLD STAs in the corresponsing MLD VAP
  41873. * A_UINT32
  41874. *
  41875. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_GET /
  41876. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_SET
  41877. * hw_tid_2_link_map:16
  41878. *
  41879. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_GET /
  41880. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_SET
  41881. * hw_tid_3_link_map:16
  41882. */
  41883. A_UINT32 hw_tid_2_3_link_map;
  41884. /*
  41885. * hw_link_map will be used by the FW to pause or unpause the TIDs
  41886. * in all the associated MLD STAs in the corresponsing MLD VAP
  41887. * A_UINT32
  41888. *
  41889. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_GET /
  41890. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_SET
  41891. * hw_tid_4_link_map:16
  41892. *
  41893. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_GET /
  41894. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_SET
  41895. * hw_tid_5_link_map:16
  41896. */
  41897. A_UINT32 hw_tid_4_5_link_map;
  41898. /*
  41899. * hw_link_map will be used by the FW to pause or unpause the TIDs
  41900. * in all the associated MLD STAs in the corresponsing MLD VAP
  41901. * A_UINT32
  41902. *
  41903. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_GET /
  41904. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_SET
  41905. * hw_tid_6_link_map:16
  41906. *
  41907. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_GET /
  41908. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_SET
  41909. * hw_tid_7_link_map:16
  41910. */
  41911. A_UINT32 hw_tid_6_7_link_map;
  41912. /* Indicates the disabled link map for 802.11be T2LM */
  41913. A_UINT32 disabled_link_bitmap;
  41914. } wmi_mlo_ap_vdev_tid_to_link_map_ie_info;
  41915. #define WMI_NUM_TID_PER_AC 2
  41916. typedef struct {
  41917. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_evt_fixed_param */
  41918. A_UINT32 tlv_header;
  41919. wmi_mac_addr mld_mac;
  41920. /* hwlink_priority:
  41921. * Based on capacity, hw chip is ordered here.
  41922. * hwlink_priority[0] holds the HW chip ID which is the top priority,
  41923. * hwlink_priority[1] holds the HW chip ID which is the 2nd priority,
  41924. * etc.
  41925. */
  41926. A_UINT32 hwlink_priority[WMI_MAX_NUM_MLO_LINKS];
  41927. /* link_bmap:
  41928. * Bitmap segments for the primary TIDs (0/1/4/6)
  41929. * are provided in link_bmap[0].
  41930. * Bitmap segments for the secondary TIDs (3/2/5/7)
  41931. * are provided in link_bmap[1].
  41932. * link_bmap[0]:
  41933. * bits 4:0 are used to indicate which links are used for TID 0
  41934. * bits 9:5 are used to indicate which links are used for TID 1
  41935. * bits 14:10 are used to indicate which links are used for TID 4
  41936. * bits 19:15 are used to indicate which links are used for TID 6
  41937. * bits 31:20 are unused
  41938. * link_bmap[0]:
  41939. * bits 4:0 are used to indicate which links are used for TID 3
  41940. * bits 9:5 are used to indicate which links are used for TID 2
  41941. * bits 14:10 are used to indicate which links are used for TID 5
  41942. * bits 19:15 are used to indicate which links are used for TID 7
  41943. * bits 31:20 are unused
  41944. */
  41945. A_UINT32 link_bmap[WMI_NUM_TID_PER_AC];
  41946. } wmi_mlo_tlt_selection_for_tid_spray_event_fixed_param;
  41947. #define WMI_IGMP_OFFLOAD_SUPPORT_DISABLE_BITMASK 0x0
  41948. #define WMI_IGMP_V1_OFFLOAD_SUPPORT_BITMASK 0x1
  41949. #define WMI_IGMP_V2_OFFLOAD_SUPPORT_BITMASK 0x2
  41950. #define WMI_IGMP_V3_OFFLOAD_SUPPORT_BITMASK 0x4
  41951. #define WMI_IGMP_OFFLOAD_SUPPORT_ALL_VERSION 0x7
  41952. typedef struct {
  41953. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_igmp_offload_fixed_param */
  41954. A_UINT32 vdev_id; /** VDEV identifier */
  41955. A_UINT32 enable; /** IGMP offload support enable/disable */
  41956. A_UINT32 version_support_bitmask; /** IGMP version support v1, v2 and/or v3*/
  41957. /* Following this structure are the TLVs:
  41958. * WMI_IPV4_ADDR grp_ip_address[num_mcast_ipv4_addr];
  41959. */
  41960. } wmi_igmp_offload_fixed_param;
  41961. /* flags for ICMP Offload IP4,IP6 */
  41962. #define WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT 0
  41963. #define WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT 1
  41964. /* set IPv4 enabled/disabled flag and get the flag */
  41965. #define WMI_SET_ICMP_OFFLOAD_IPV4_ENABLED_BIT(valid_bitmask) \
  41966. WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1, 1)
  41967. #define WMI_SET_ICMP_OFFLOAD_IPV4_DISABLED_BIT(valid_bitmask) \
  41968. WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1, 0)
  41969. #define WMI_GET_ICMP_OFFLOAD_IPV4_ENABLED(valid_bitmask) \
  41970. WMI_GET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1)
  41971. /* set IPv6 enabled flag, disabled and get the flag */
  41972. #define WMI_SET_ICMP_OFFLOAD_IPV6_ENABLED_BIT(valid_bitmask) \
  41973. WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1, 1)
  41974. #define WMI_SET_ICMP_OFFLOAD_IPV6_DISABLED_BIT(valid_bitmask) \
  41975. WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1, 0)
  41976. #define WMI_GET_ICMP_OFFLOAD_IPV6_ENABLED(valid_bitmask) \
  41977. WMI_GET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1)
  41978. typedef struct {
  41979. /** TLV tag and len; tag equals
  41980. * WMITLV_TAG_STRUC_wmi_vdev_icmp_offload_cmd_fixed_param
  41981. */
  41982. A_UINT32 tlv_header;
  41983. A_UINT32 vdev_id;
  41984. A_UINT32 enable;
  41985. /* bitmask for valid ipv4/ipv6 address */
  41986. A_UINT32 valid_bitmask;
  41987. WMI_IPV4_ADDR ipv4_addr;
  41988. /* Following this structure are the TLVs:
  41989. * WMI_IPV6_ADDR ipv6_addr[num_ipv6_addr];
  41990. */
  41991. } wmi_icmp_offload_fixed_param;
  41992. typedef struct {
  41993. /** TLV tag and len; tag equals
  41994. * WMITLV_TAG_STRUC_wmi_vdev_smart_monitor_event_fixed_param */
  41995. A_UINT32 tlv_header;
  41996. /* VDEV identifier */
  41997. A_UINT32 vdev_id;
  41998. /** Average RSSI value of Data Frames */
  41999. A_INT32 avg_rssi_data_dbm;
  42000. /** rx_vht_sgi:
  42001. * Short guard interval state of Data frames obtaining from rx PPDU TLV
  42002. * of VHTSIGA buf.
  42003. * 0: Default (No sgi set)
  42004. * 1: sgi set
  42005. */
  42006. A_UINT32 rx_vht_sgi;
  42007. } wmi_vdev_smart_monitor_event_fixed_param;
  42008. typedef struct {
  42009. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_set_param_cmd_fixed_param */
  42010. A_UINT32 pdev_id;
  42011. /** parameter id */
  42012. A_UINT32 param_id;
  42013. /** parameter value */
  42014. A_UINT32 param_value;
  42015. /* The TLVs follows this structure:
  42016. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  42017. */
  42018. } wmi_pdev_multiple_vdev_set_param_cmd_fixed_param;
  42019. typedef struct {
  42020. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_param_info */
  42021. /** ID of the parameter being set */
  42022. A_UINT32 param_id;
  42023. /** value of the parameter being set */
  42024. A_UINT32 param_value;
  42025. } wmi_set_param_info;
  42026. typedef struct {
  42027. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_multiple_pdev_vdev_param_cmd_fixed_param */
  42028. /** Command is for vdev or pdev: 0 = pdev, 1 = vdev */
  42029. A_UINT32 is_vdev;
  42030. /** unique dev_id identifying the VDEV/PDEV */
  42031. A_UINT32 dev_id;
  42032. /*
  42033. * Following this structure is the TLV:
  42034. * wmi_set_param_info param_info[];
  42035. */
  42036. } wmi_set_multiple_pdev_vdev_param_cmd_fixed_param;
  42037. typedef enum {
  42038. WMI_MU_SNIF_DISABLE,
  42039. WMI_MU_SNIF_USER_INPUT,
  42040. WMI_MU_SNIF_WILDCARD,
  42041. } WMI_MU_SNIF_MODE;
  42042. typedef struct {
  42043. /** TLV tag and len; tag equals
  42044. * WMITLV_TAG_STRUC_wmi_vdev_set_mu_snif_cmd_param */
  42045. A_UINT32 tlv_header;
  42046. /* VDEV identifier */
  42047. A_UINT32 vdev_id;
  42048. /* MU sniffer mode - refer to WMI_MU_SNIF_MODE enum */
  42049. A_UINT32 mode;
  42050. /* max num of user to decode */
  42051. A_UINT32 max_num_user;
  42052. /**
  42053. * TLV (tag length value) parameters follow setting MU sniffer command
  42054. * structure. The TLV's are:
  42055. * A_UINT32 aids[];
  42056. */
  42057. } wmi_vdev_set_mu_snif_cmd_param;
  42058. typedef struct {
  42059. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbs_or_sbs_cap_ext*/
  42060. A_UINT32 tlv_header;
  42061. /* hw_mode_id: refer to WMI_HW_MODE_CAPABILITIES */
  42062. A_UINT32 hw_mode_id;
  42063. /*
  42064. * If sbs_lower_band_end_freq is set to non-zero, it indicates
  42065. * async SBS mode is supported, and lower-band/higher band to MAC
  42066. * mapping is switch-able. unit: MHz. examples 5180, 5320
  42067. * If sbs_mid_band_end_freq is set to non-zero, it indicates
  42068. * async flexible SBS mode is supported, lower/higher band cutoff frequency
  42069. * can be selected from sbs_lower_band_end_freq or sbs_mid_band_end_freq.
  42070. * unit: MHz, examples 5900.
  42071. */
  42072. A_UINT32 sbs_lower_band_end_freq;
  42073. A_UINT32 sbs_mid_band_end_freq;
  42074. } wmi_dbs_or_sbs_cap_ext;
  42075. typedef struct {
  42076. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_cust_bdf_version_capabilities*/
  42077. /* Cust bdf Major version in bdf */
  42078. A_UINT32 cust_bdf_ver_major;
  42079. /* Cust bdf Minor version in bdf */
  42080. A_UINT32 cust_bdf_ver_minor;
  42081. } wmi_cust_bdf_version_capabilities;
  42082. enum WMI_CODEL_ENABLE_VALUES {
  42083. WMI_CODEL_DISABLED,
  42084. WMI_CODEL_ENABLED,
  42085. /* WMI_CODEL_DEBUG:
  42086. * partly enabled – track interval and check target, but don’t drop
  42087. */
  42088. WMI_CODEL_DEBUG,
  42089. };
  42090. typedef enum {
  42091. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MIN_THRUPUT = 0,
  42092. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MAX_THRUPUT = 0xffffffff,
  42093. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_BURST_SIZE = 0,
  42094. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_SVC_INTERVAL = 0xffffffff,
  42095. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_DELAY_BOUND = 0xffffffff,
  42096. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_TIME_TO_LIVE = 0xffffffff,
  42097. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_PRIORITY = 0,
  42098. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_TID = 0xffffffff,
  42099. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MSDU_LOSS_RATE = 0,
  42100. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_DISABLED_SCHED_MODE = 0,
  42101. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_ENABLED = WMI_CODEL_DISABLED,
  42102. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_LATENCY_TARGET_MS = 0xffffffff,
  42103. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_INTERVAL_MS = 0xffffffff,
  42104. } WMI_SAWF_SVC_CLASS_PARAM_DEFAULTS;
  42105. #define WMI_CODEL_INTERVAL_MAX_MS 0x0000ffff
  42106. #define WMI_CODEL_LATENCY_TARGET_MAX_MS 0x00003fff
  42107. typedef struct {
  42108. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sawf_svc_class_cfg_cmd_fixed_param */
  42109. A_UINT32 svc_class_id; /* which service class is being configured */
  42110. /*-----
  42111. * The below fields specify the values for the parameters of the
  42112. * service class being configured.
  42113. * Each such service class parameter has a default value specified in the
  42114. * above WMI_SAWF_SVC_CLASS_PARAM_DEFAULTS enum.
  42115. * This default value shall be specified for service classes where
  42116. * the parameter in question is not applicable.
  42117. * For example, for service classes that have no minimum throughput
  42118. * requirement, the min_thruput_kbps field should be set to
  42119. * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MIN_THRUPUT, i.e. 0.
  42120. *-----*/
  42121. /* min_thruput_kbps:
  42122. * How much throughput should be "guaranteed" for each MSDU queue
  42123. * belonging to this service class.
  42124. * Units are kilobits per second.
  42125. */
  42126. A_UINT32 min_thruput_kbps;
  42127. /* max_thruput_kbps:
  42128. * What upper limit on throughput shall be applied to MSDU queues belonging
  42129. * to this service class, if other peer-TIDs are not meeting their QoS
  42130. * service goals.
  42131. * Units are kilobits per second.
  42132. */
  42133. A_UINT32 max_thruput_kbps;
  42134. /* burst_size_bytes:
  42135. * How much data (i.e. how many MSDUs) should be pulled from a
  42136. * MSDU queue belonging to this service class to be formed into MPDUs
  42137. * and enqueued for transmission.
  42138. * Similarly, how long should a tx op be for MPDUs containing MSDUs from
  42139. * this service class, to ensure that the necessary amount of data gets
  42140. * delivered to the peer.
  42141. * Units are bytes.
  42142. */
  42143. A_UINT32 burst_size_bytes;
  42144. /* svc_interval_ms:
  42145. * How frequently MSDUs belonging to this service class should be
  42146. * formed into MPDUs and enqueued for transmission.
  42147. * The svc_interval_ms parameter is expected to be <= the delay_bound_ms
  42148. * parameter.
  42149. * Units are milliseconds.
  42150. */
  42151. A_UINT32 svc_interval_ms;
  42152. /* delay_bound_ms:
  42153. * How promptly the MSDUs belonging to this service class need to be
  42154. * delivered to the recipient peer.
  42155. * Units are milliseconds.
  42156. */
  42157. A_UINT32 delay_bound_ms;
  42158. /* time_to_live_ms:
  42159. * How long MSDUs belonging to this service class remain valid.
  42160. * If the MSDU has not been successfully transmitted before this
  42161. * time-to-live time has elapsed, the MSDU should be discarded.
  42162. * The time_to_live_ms parameter is expected to be >= the delay_bound_ms
  42163. * parameter.
  42164. * Units are milliseconds.
  42165. */
  42166. A_UINT32 time_to_live_ms;
  42167. /* priority:
  42168. * What degree of precedence shall the WLAN FW's tx scheduler use
  42169. * when considering whether to transmit MPDUs generated from MSDUs
  42170. * belonging to this service class.
  42171. */
  42172. A_UINT32 priority;
  42173. /* tid:
  42174. * Which WLAN TID shall be used for delivering traffic of this
  42175. * service class.
  42176. */
  42177. A_UINT32 tid;
  42178. /* msdu_loss_rate_ppm:
  42179. * This parameter indicates the acceptable rate of MSDU loss.
  42180. * Units are parts per million.
  42181. * E.g. if it is acceptable for 1 MSDU of every 10000 to be lost,
  42182. * the msdu_loss_rate_ppm value would be 100,
  42183. * since 100 / 1000000 = 1 / 10000.
  42184. */
  42185. A_UINT32 msdu_loss_rate_ppm;
  42186. /*
  42187. * The disabled DL and UL scheduler modes bitmap.
  42188. *
  42189. * Each bit in the "disabled_sched_modes" bitmap indicates whether a
  42190. * specific scheduler mode may be selected by the fast loop scheduler. A
  42191. * "1" bit indicates that mode is disabled, and a "0" bit indicates the
  42192. * mode is enabled.
  42193. *
  42194. * The WMI_SCHED_MODE_FLAGS enum defines the bit positions for each mode.
  42195. */
  42196. A_UINT32 disabled_sched_modes;
  42197. A_UINT32 codel_enabled; /* contains a WMI_CODEL_ENABLE_VALUES enum value */
  42198. /* codel_latency_target_ms:
  42199. * The codel_latency_target_ms field specifies the latency target for
  42200. * MSDU queues belonging to this service class.
  42201. * The latency of each such MSDU queue will periodically be checked
  42202. * (with the periodicity controlled by the code_interval_ms parameter).
  42203. * If the MSDU queue's latency is above this target latency, a MSDU will
  42204. * be dropped from the head of the queue, to attempt to get the flow's
  42205. * producer to scale down its rate of MSDU production.
  42206. * This value should be roughly 10% to 30% of the codel_interval_ms value.
  42207. * This value must be <= WMI_CODEL_LATENCY_TARGET_MAX_MS (or must equal
  42208. * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_LATENCY_TARGET_MS).
  42209. */
  42210. A_UINT32 codel_latency_target_ms;
  42211. /* codel_interval_ms:
  42212. * The codel_interval_ms field specifies the baseline interval between
  42213. * successive checks that a given MSDU queue's latency is under the
  42214. * CoDel target latency.
  42215. * If in a given interval a MSDU queue has a latency exceeding the target,
  42216. * the duration of the subsequent interval for that MSDU queue will be
  42217. * reduced. The interval will get reset to the baseline interval when
  42218. * the MSDU queue's latency is again under the CoDel target latency.
  42219. * This value must be <= WMI_CODEL_INTERVAL_MAX_MS (or must equal
  42220. * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_INTERVAL_MS).
  42221. */
  42222. A_UINT32 codel_interval_ms;
  42223. } wmi_sawf_svc_class_cfg_cmd_fixed_param;
  42224. typedef struct {
  42225. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sawf_svc_class_disable_cmd_fixed_param */
  42226. A_UINT32 svc_class_id; /* which service class is being disabled */
  42227. } wmi_sawf_svc_class_disable_cmd_fixed_param;
  42228. typedef struct {
  42229. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sw_cal_ver_cap */
  42230. A_UINT32 bdf_cal_ver; /* SW cal version in BDF */
  42231. A_UINT32 ftm_cal_ver; /* SW cal version in factory data */
  42232. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  42233. } wmi_sw_cal_ver_cap;
  42234. typedef struct {
  42235. /** TLV tag and len; tag equals
  42236. * WMITLV_TAG_STRUC_wmi_soc_tqm_reset_enable_disable_cmd_fixed_param
  42237. */
  42238. A_UINT32 tlv_header;
  42239. /** 0 - disable TQM-reset feature, 1 - enable TQM-reset feature */
  42240. A_UINT32 enable;
  42241. } wmi_soc_tqm_reset_enable_disable_cmd_fixed_param;
  42242. typedef struct {
  42243. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_multiple_peer_group_cmd_fixed_param */
  42244. A_UINT32 vdev_id;
  42245. A_UINT32 pdev_id;
  42246. /** Sub command id - populated with a WMI_CMD_ID value.
  42247. * Currently supported command ids are WMI_PEER_REMOVE_WDS_ENTRY_CMDID.
  42248. */
  42249. A_UINT32 sub_cmd_id;
  42250. /* The TLVs follows this structure:
  42251. * wmi_mac_addr wds_macaddr[]; <--- Array of wds mac addresses.
  42252. */
  42253. } wmi_vdev_multiple_peer_group_cmd_fixed_param;
  42254. /* WMI_VDEV_PN_MGMT_RX_FILTER_CMDID */
  42255. typedef struct {
  42256. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_pn_mgmt_rx_filter_cmd_fixed_param */
  42257. A_UINT32 vdev_id;
  42258. /* RX Filter - MGMT/Action frame type is specified in each bit as per 802.11 spec
  42259. * PN check will be done for all MGMT frames irrespective of RX Filter.
  42260. * Rx filter is only used to decide whether PN failed frames should be forwarded to host
  42261. * Example for forwarding beacon and de-auth pkt alone to host then bit 8(Beacon) and 12(De-auth) must be set */
  42262. A_UINT32 pn_rx_filter;
  42263. } wmi_vdev_pn_mgmt_rx_filter_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  42264. typedef struct {
  42265. A_UINT32 tlv_header;
  42266. /* egid_info:
  42267. * Identify which ESL group is active and the duty cycle configured
  42268. * for each group.
  42269. * This is a 128-bit bitmap to represent 16 ESL sets, with each set
  42270. * having 8 members.
  42271. * For a given set, the 1-values within the 8-bit bitmap identify
  42272. * which groups are active. The number of active groups within each
  42273. * set of 8 indirectly determines the WLAN/BT duty cycle:
  42274. * number of 1-bits |
  42275. * within 8-bit bitmap | WLAN / BT duty cycle
  42276. * --------------------+----------------
  42277. * 0 | 100 ms WLAN
  42278. * 1 | 87.5 ms WLAN, 12.5 ms BT
  42279. * 2 | 75 ms WLAN, 25 ms BT
  42280. * 3 | 62.5 ms WLAN, 37.5 ms BT
  42281. * 4 | 50 ms WLAN, 50 ms BT
  42282. * 5 | 37.5 ms WLAN, 62.5 ms BT
  42283. * 6 | 25 ms WLAN, 75 ms BT
  42284. * 7 | 12.5 ms WLAN, 87.5 ms BT
  42285. * 8 | 100 ms BT
  42286. * The lowest bits in the bitmap represent the highest ESL groups,
  42287. * E.g. bitmap bit 0 corresponds to ESL group 127, bit 1 corresponds
  42288. * to ESL group 126, bit 7 corresponds to ESL group 120, bit 8
  42289. * corresponds to ESL group 119, etc.
  42290. *
  42291. * So for example, if the lowest 8 bits of egid_info are 0x07, this
  42292. * indicates that groups 125-127 are active and 120-124 are inactive,
  42293. * and that the duty cycle is 62.5 ms WLAN + 37.5 ms BT.
  42294. */
  42295. A_UINT32 egid_info[4];
  42296. } wmi_esl_egid_cmd_fixed_param;
  42297. #define WMI_RTT_PASN_PEER_CREATE_SECURITY_MODE_GET(flag) WMI_GET_BITS(flag, 0, 2)
  42298. #define WMI_RTT_PASN_PEER_CREATE_SECURITY_MODE_SET(flag,val) WMI_SET_BITS(flag, 0, 2, val)
  42299. #define WMI_RTT_PASN_PEER_CREATE_FORCE_SELF_MAC_USE_GET(flag) WMI_GET_BITS(flag, 2, 1)
  42300. #define WMI_RTT_PASN_PEER_CREATE_FORCE_SELF_MAC_USE_SET(flag,val) WMI_SET_BITS(flag, 2, 1, val)
  42301. typedef struct {
  42302. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_create_req_event_fixed_param */
  42303. /** unique id identifying the VDEV, generated by the caller */
  42304. A_UINT32 vdev_id;
  42305. /**
  42306. * The following TLV will follow this fixed_param TLV:
  42307. *
  42308. * wmi_rtt_pasn_peer_create_req_param rtt_pasn_peer_param[]
  42309. */
  42310. } wmi_rtt_pasn_peer_create_req_event_fixed_param;
  42311. typedef struct {
  42312. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_create_req_param */
  42313. wmi_mac_addr self_mac_addr; /* self MAC address (can be vdev address or random mac address) */
  42314. wmi_mac_addr dest_mac_addr; /* MAC address of the peer */
  42315. A_UINT32 control_flag; /* some control information here */
  42316. /*********************************************************************************
  42317. * Bits 1:0: Security mode, check wmi_rtt_security_mode for detail.
  42318. * Host driver to request supplicant to derive and install PASN keys if security mode is set.
  42319. * Bit 2: Force_self_mac_addr_use, To indicate supplicant/hostapd to use this self mac addr to (re)generate PASN keys,
  42320. * and flush old cache( if it exists) for dest_mac_addr with old self_mac_addr.
  42321. * Bits 31:3: Reserved
  42322. */
  42323. } wmi_rtt_pasn_peer_create_req_param;
  42324. typedef struct {
  42325. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_auth_status_cmd_fixed_param */
  42326. /**
  42327. * The following TLV will follow this fixed_param TLV:
  42328. *
  42329. * wmi_rtt_pasn_auth_status_param pasn_auth_status_param[]
  42330. */
  42331. } wmi_rtt_pasn_auth_status_cmd_fixed_param;
  42332. typedef struct {
  42333. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_auth_status_param */
  42334. /* MAC address of the peer */
  42335. wmi_mac_addr peer_mac_addr;
  42336. /* Return status. 0 for success, non-zero otherwise */
  42337. A_UINT32 status;
  42338. /* Source address used for doing PASN authentication */
  42339. wmi_mac_addr source_mac_addr;
  42340. } wmi_rtt_pasn_auth_status_param;
  42341. #define WMI_RTT_PASN_PEER_DELETE_DELETED_BIT_GET(flag) WMI_GET_BITS(flag, 0, 1)
  42342. #define WMI_RTT_PASN_PEER_DELETE_DELETED_BIT_SET(flag,val) WMI_SET_BITS(flag, 0, 1, val)
  42343. #define WMI_RTT_PASN_PEER_DELETE_FLUSH_KEYS_GET(flag) WMI_GET_BITS(flag, 1, 1)
  42344. #define WMI_RTT_PASN_PEER_DELETE_FLUSH_KEYS_SET(flag,val) WMI_SET_BITS(flag, 1, 1, val)
  42345. typedef struct {
  42346. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_delete_event_fixed_param */
  42347. /** unique id identifying the VDEV, generated by the caller */
  42348. A_UINT32 vdev_id;
  42349. /**
  42350. * The following TLV will follow this fixed_param TLV:
  42351. *
  42352. * wmi_rtt_pasn_peer_delete_param rtt_pasn_peer_param[]
  42353. */
  42354. } wmi_rtt_pasn_peer_delete_event_fixed_param;
  42355. typedef struct {
  42356. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_delete_param */
  42357. /* MAC address of the peer */
  42358. wmi_mac_addr peer_mac_addr;
  42359. /* some control information here */
  42360. A_UINT32 control_flag;
  42361. /**********************************************************************************
  42362. * Bit 0: peer_deleted (This is set to 1 if peer has already been deleted by the target)
  42363. * Bit 1: flush keys (This is set to 1 if target wants the cached PASN keys to be flushed)
  42364. * Bits 31:2: reserved
  42365. */
  42366. } wmi_rtt_pasn_peer_delete_param;
  42367. typedef struct {
  42368. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_deauth_cmd_fixed_param */
  42369. /* MAC address of the peer */
  42370. wmi_mac_addr peer_mac_addr;
  42371. } wmi_rtt_pasn_deauth_cmd_fixed_param;
  42372. typedef struct {
  42373. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_info */
  42374. /** what the register is used for - see WFSS_PMM_SCRATCH_REG_PURPOSE enum */
  42375. A_UINT32 pmm_scratch_reg_purpose;
  42376. /** Address of scratch register */
  42377. A_UINT32 pmm_scratch_reg_address;
  42378. } wmi_pmm_scratch_reg_info;
  42379. typedef struct {
  42380. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_allocation_cmd_fixed_param */
  42381. /** pdev_id for identifying the MAC */
  42382. A_UINT32 pdev_id;
  42383. /*
  42384. * Following this structure is the TLV:
  42385. * wmi_pmm_scratch_reg_info scratch_reg_info[];
  42386. */
  42387. } wmi_pmm_scratch_reg_allocation_cmd_fixed_param;
  42388. typedef struct {
  42389. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_available_scratch_reg_info */
  42390. /** Scratch register address */
  42391. A_UINT32 pmm_scratch_reg_address;
  42392. } wmi_pmm_available_scratch_reg_info;
  42393. typedef struct {
  42394. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_available_scratch_reg_event_fixed_param */
  42395. /** pdev_id for identifying the MAC */
  42396. A_UINT32 pdev_id;
  42397. /*
  42398. * Following this structure is the TLV:
  42399. * wmi_pmm_available_scratch_reg_info pmm_available_scratch_reg_info[];
  42400. */
  42401. } wmi_pmm_available_scratch_reg_event_fixed_param;
  42402. typedef struct {
  42403. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_allocation_complete_event_fixed_param */
  42404. /** pdev_id for identifying the MAC */
  42405. A_UINT32 pdev_id;
  42406. /** 1 - success, 0 - failed */
  42407. A_UINT32 is_allocated;
  42408. } wmi_pmm_scratch_reg_allocation_complete_event_fixed_param;
  42409. typedef enum {
  42410. WMI_NO_FLUSH,
  42411. WMI_TWT_FLUSH,
  42412. /* Add new flush policies above */
  42413. WMI_MAX_FLUSH_POLICY
  42414. } wmi_peer_flush_policy;
  42415. typedef struct {
  42416. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_policy_cmd_fixed_param */
  42417. A_UINT32 vdev_id;
  42418. /** peer MAC address */
  42419. wmi_mac_addr peer_macaddr;
  42420. /** The tids to flush */
  42421. A_UINT32 peer_tid_bitmap;
  42422. /* wmi_peer_flush_policy */
  42423. A_UINT32 flush_policy;
  42424. /* n_TWT_SPs_to_expire:
  42425. * Expire / drop packets whose age is greater than this specified number
  42426. * of TWT service periods.
  42427. */
  42428. A_UINT32 n_TWT_SPs_to_expire;
  42429. } wmi_peer_flush_policy_cmd_fixed_param;
  42430. /* health monitor infra Def */
  42431. typedef struct {
  42432. /** TLV tag and len */
  42433. A_UINT32 tlv_header;
  42434. A_UINT32 ring_buf_paddr_low;
  42435. A_UINT32 ring_buf_paddr_high;
  42436. A_UINT32 initial_upload_period_ms;
  42437. } wmi_health_mon_init_done_fixed_param;
  42438. /** ODD **/
  42439. /* Livedump Data structures */
  42440. #define WMI_ODD_LIVEDUMP_RESP_SET_STATUS(status, val) \
  42441. WMI_SET_BITS(status, 0, 4, val)
  42442. #define WMI_ODD_LIVEDUMP_RESP_GET_STATUS(status) \
  42443. WMI_GET_BITS(status, 0, 4)
  42444. typedef enum {
  42445. ODD_LIVEDUMP_STATUS_SUCCESS = 0,
  42446. ODD_LIVEDUMP_STATUS_FAILURE,
  42447. ODD_MAX_LIVEDUMP_STATUS,
  42448. } odd_livedump_resp_status;
  42449. typedef struct {
  42450. A_UINT32 tlv_header;
  42451. A_UINT32 odd_livedump_request_id;
  42452. /* Following this structure is the TLV:
  42453. * A_UINT32 odd_livedump_id_list[]; <-- array livedump_id list
  42454. */
  42455. } wmi_livedump_request_cmd_fixed_param;
  42456. typedef struct {
  42457. A_UINT32 tlv_header;
  42458. /* odd_livedump_request_id:
  42459. * this echoes the request id that was sent in the wmi_livedump_cmd_param
  42460. */
  42461. A_UINT32 odd_livedump_request_id;
  42462. /*
  42463. * 4 LSB's to indicate status of the odd_livedump_request_id processed
  42464. * by the FW, the other 28bits to kept for future enhancements.
  42465. * The status will be defined in the enum odd_livedump_resp_status
  42466. * 0 - SUCCESS
  42467. * 1 - FAILURE
  42468. * Refer to the WMI_ODD_LIVEDUMP_RESP_SET,_GET_STATUS macros.
  42469. */
  42470. A_UINT32 status;
  42471. } wmi_livedump_response_event_fixed_param;
  42472. #define WMI_MLO_LINK_REMOVAL_GET_VDEVID(tbtt_info) WMI_GET_BITS(tbtt_info, 0, 8)
  42473. #define WMI_MLO_LINK_REMOVAL_SET_VDEVID(tbtt_info, value) WMI_SET_BITS(tbtt_info, 0, 8, value)
  42474. #define WMI_MLO_LINK_REMOVAL_GET_LINKID(tbtt_info) WMI_GET_BITS(tbtt_info, 8, 8)
  42475. #define WMI_MLO_LINK_REMOVAL_SET_LINKID(tbtt_info, value) WMI_SET_BITS(tbtt_info, 8, 8, value)
  42476. #define WMI_MLO_LINK_REMOVAL_GET_TBTT_COUNT(tbtt_info) WMI_GET_BITS(tbtt_info, 16, 16)
  42477. #define WMI_MLO_LINK_REMOVAL_SET_TBTT_COUNT(tbtt_info, value) WMI_SET_BITS(tbtt_info, 16, 16, value)
  42478. typedef struct {
  42479. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_tbtt_count; */
  42480. A_UINT32 tlv_header;
  42481. union {
  42482. struct {
  42483. A_UINT32 vdev_id:8,
  42484. link_id:8,
  42485. tbtt_count:16;
  42486. };
  42487. A_UINT32 tbtt_info;
  42488. };
  42489. } wmi_mlo_link_removal_tbtt_count;
  42490. typedef struct {
  42491. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_tbtt_update; */
  42492. A_UINT32 tlv_header;
  42493. A_UINT32 tbtt_count;
  42494. A_UINT32 qtimer_ts_low; /* lower-32 bits */
  42495. A_UINT32 qtimer_ts_high; /* higher-32 bits */
  42496. A_UINT32 tsf_low; /* lower-32 bits */
  42497. A_UINT32 tsf_high; /* higher-32 bits */
  42498. } wmi_mlo_link_removal_tbtt_update;
  42499. typedef struct {
  42500. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_evt_fixed_param; */
  42501. A_UINT32 tlv_header;
  42502. A_UINT32 vdev_id;
  42503. /*
  42504. * Followed by TLVs:
  42505. * wmi_mlo_link_removal_tbtt_update
  42506. */
  42507. } wmi_mlo_link_removal_evt_fixed_param;
  42508. typedef struct {
  42509. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_cmd_fixed_param */
  42510. A_UINT32 tlv_header;
  42511. A_UINT32 vdev_id;
  42512. A_UINT32 reconfig_ml_ie_num_bytes_valid;
  42513. /* This TLV is followed by array of bytes:
  42514. * A_UINT8 reconfig_ml_ie[]; <-- Entire reconfiguration element (multi-link control + common-info + 1 per-sta profile)
  42515. */
  42516. } wmi_mlo_link_removal_cmd_fixed_param;
  42517. typedef struct {
  42518. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_peer_sched_mode_disable */
  42519. /* Peer MAC Address */
  42520. wmi_mac_addr peer_macaddr;
  42521. /*
  42522. * The disabled DL and UL scheduler modes bitmap.
  42523. *
  42524. * This command is not supported in STA mode.
  42525. *
  42526. * A value of 1 in a given bit position disables the corresponding mode,
  42527. * and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS enum defines
  42528. * the bit positions for each mode.
  42529. *
  42530. * A single 32 bit value is used to store the following configuration
  42531. * bitmap.
  42532. *
  42533. * bit | sched mode
  42534. * ---------------
  42535. * 0 | DL MU-MIMO
  42536. * 1 | UL MU-MIMO
  42537. * 2 | DL OFDMA
  42538. * 3 | UL OFDMA
  42539. * 4..31 | RESERVED
  42540. */
  42541. A_UINT32 disabled_sched_modes;
  42542. } wmi_per_peer_sched_mode_disable;
  42543. typedef struct {
  42544. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sched_mode_disable_fixed_param */
  42545. A_UINT32 pdev_id;
  42546. /* The TLVs for each peer follows:
  42547. * wmi_per_peer_sched_mode_disable per_peer_sched_mode_disable[];
  42548. */
  42549. } wmi_peer_sched_mode_disable_fixed_param;
  42550. typedef enum {
  42551. /*
  42552. * No timestamp source is used, and the start_timestamp field should be
  42553. * ignored. FW will start the probing of the requested mode ASAP after
  42554. * receiving this message.
  42555. */
  42556. WMI_SCHED_MODE_PROBE_TSTAMP_SRC_NONE = 0,
  42557. } WMI_SCHED_MODE_PROBE_TSTAMP_SRC;
  42558. typedef struct {
  42559. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_sched_mode_probe_req_fixed_param */
  42560. A_UINT32 vdev_id;
  42561. /*
  42562. * The scheduler mode to probe. Only a single mode may currently be
  42563. * specified in this WMI command (separate commands must be sent to probe
  42564. * multiple modes). This limitation may be removed in a future version of
  42565. * FW.
  42566. *
  42567. * This command is not supported in STA mode.
  42568. *
  42569. * The WMI_SCHED_MODE_FLAGS enum defines the scheduler mode values.
  42570. */
  42571. A_UINT32 sched_mode_to_probe;
  42572. /*
  42573. * 32-bit cookie that will be sent back in the probing completion / stats
  42574. * WMI message. FW does not interpret any bits in this field, and simply
  42575. * replays it back to the host.
  42576. */
  42577. A_UINT32 cookie;
  42578. /*
  42579. * The clock reference to use for the start_timestamp field. The enum
  42580. * WMI_SCHED_MODE_PROBE_TSTAMP_SRC defines the valid timestamp sources.
  42581. */
  42582. A_UINT32 timestamp_source;
  42583. /*
  42584. * The start timestamp indicating when the FW scheduler should start the
  42585. * probing period. Note that although the FW tries to honor this start
  42586. * time, it may not always be possible to. For instance, if the command
  42587. * arrives after the indicated start timestamp, or if channel congestion
  42588. * delays the APs ability to transmit over the air.
  42589. *
  42590. * If the timestamp_source field is set to
  42591. * WMI_SCHED_MODE_PROBE_TSTAMP_SRC_NONE, then the value of this field is
  42592. * ignored by FW.
  42593. */
  42594. A_UINT32 start_timestamp_lo;
  42595. A_UINT32 start_timestamp_hi;
  42596. /*
  42597. * The on and off duration of the probing mode.
  42598. *
  42599. * The scheduler will turn the mode on first for the specified
  42600. * "on_duration_ms", and then turn it off for the specified
  42601. * "off_duration_ms".
  42602. *
  42603. * During the on and off duration, FW will collect delivered bytes
  42604. * statistics to estimate the vdev level throughput achieved for both the
  42605. * on and off region. These statistics will be delivered in the
  42606. * wmi_vdev_sched_mode_probe_resp WMI message after both the "on" and "off"
  42607. * durations have elapsed.
  42608. */
  42609. A_UINT32 on_duration_ms;
  42610. A_UINT32 off_duration_ms;
  42611. } wmi_vdev_sched_mode_probe_req_fixed_param;
  42612. typedef struct {
  42613. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_sched_mode_probe_resp_fixed_param */
  42614. A_UINT32 vdev_id;
  42615. /*
  42616. * The 32-bit cookie copied from the wmi_vdev_sched_mode_probe_req
  42617. * message.
  42618. */
  42619. A_UINT32 cookie;
  42620. /*
  42621. * The observed throughput at the vdev level during the mode-enabled
  42622. * portion of the mode probe.
  42623. */
  42624. A_UINT32 tput_mbps_on;
  42625. /*
  42626. * The observed throughput at the vdev level during the mode-disabled
  42627. * portion of the mode probe.
  42628. */
  42629. A_UINT32 tput_mbps_off;
  42630. } wmi_vdev_sched_mode_probe_resp_fixed_param;
  42631. /** Coordinated-AP TDMA **/
  42632. #define WMI_TDMA_MAX_ACTIVE_SCHEDULES 10
  42633. typedef struct {
  42634. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdma_schedule_request_cmd_fixed_param **/
  42635. /** pdev_id
  42636. * PDEV ID for identifying the MAC for which this schedule
  42637. * is being requested.
  42638. */
  42639. A_UINT32 pdev_id;
  42640. /** schedule_type
  42641. * 0 = Reserved
  42642. * 1 = Restricted
  42643. * UINT32_MAX = Cancel all TDMA schedules and ignore other parameters below.
  42644. */
  42645. A_UINT32 schedule_type;
  42646. /** schedule_handle_id
  42647. * Unique ID to identify this TDMA schedule
  42648. */
  42649. A_UINT32 schedule_handle_id;
  42650. /** owner_bssid
  42651. * The BSSID this TDMA schedule is reserved for
  42652. */
  42653. wmi_mac_addr owner_bssid;
  42654. /** start_time_tsf_low
  42655. * Lower 32-bits of Synchronized Start time for the first busy slot
  42656. * in this TDMA schedule.
  42657. * It should be a PMM global FW TSF reference
  42658. */
  42659. A_UINT32 start_time_tsf_low;
  42660. /** start_time_tsf_high
  42661. * Higher 32-bits of Synchronized Start time for the first busy slot
  42662. * in this TDMA schedule.
  42663. * It should be a PMM global FW TSF reference
  42664. */
  42665. A_UINT32 start_time_tsf_high;
  42666. /** num_busy_slots
  42667. * Number of busy periods in this schedule
  42668. */
  42669. A_UINT32 num_busy_slots;
  42670. /** busy_slot_dur_ms
  42671. * The fixed duration of each busy slot in milliseconds
  42672. */
  42673. A_UINT32 busy_slot_dur_ms;
  42674. /** busy_slot_intvl_ms
  42675. * The fixed interval between the start of two consecutive busy slots
  42676. * in milliseconds.
  42677. */
  42678. A_UINT32 busy_slot_intvl_ms;
  42679. /** edca_params_valid
  42680. * Indicates whether the following EDCA fields aifsn, ecwmin, ecwmax
  42681. * are valid or not
  42682. * 1 = Valid. 0 = Not Valid.
  42683. */
  42684. A_UINT32 edca_params_valid;
  42685. /** aifsn
  42686. * Arbitration inter frame spacing number for this schedule type.
  42687. * Range: 2-15.
  42688. * For voice, video, best-effort, background ACs
  42689. */
  42690. A_UINT32 aifsn[WMI_AC_MAX];
  42691. /** ecwmin
  42692. * Exponent form of Contention Window minimum value for this schedule type.
  42693. * Range: 2 - 1024.
  42694. * For voice, video, best-effort, background ACs
  42695. */
  42696. A_UINT32 ecwmin[WMI_AC_MAX];
  42697. /** ecwmax
  42698. * Exponent form of Contention Window maximum value for this schedule type.
  42699. * Range: 2 - 1024.
  42700. * For voice, video, best-effort, background ACs
  42701. */
  42702. A_UINT32 ecwmax[WMI_AC_MAX];
  42703. } wmi_tdma_schedule_request_cmd_fixed_param;
  42704. typedef struct {
  42705. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table _fixed_param */
  42706. A_UINT32 pdev_id;
  42707. /* freq_band:
  42708. * Indicates the intended FreqBand for updating targetPowerR2PTable.
  42709. * 0: 5G
  42710. * 1: 2G
  42711. * 2: 6G
  42712. */
  42713. A_UINT32 freq_band;
  42714. /* sub_band:
  42715. * Denotes band defined in targetPowerR2PFreqRangexG BDF fields.
  42716. * Valid values for each target is listed below
  42717. * For 11AX targets,
  42718. * 2G - 0
  42719. * 5G/6G - 0/1/2
  42720. *
  42721. * For 11BE targets,
  42722. * 2G - 0
  42723. * 5G/6G - 0/1
  42724. */
  42725. A_UINT32 sub_band;
  42726. /* is_ext:
  42727. * Applicable only for 11BE targets
  42728. * 0 - Default targetPowerR2PTable
  42729. * 1 - To update targetPowerR2PTable in extension fields
  42730. * For 11AX targets, value is expected to be 0.
  42731. */
  42732. A_UINT32 is_ext;
  42733. A_UINT32 target_type; /* 0 - IPQ95xx, 1 - QCN90xx, 0x10 - QCN92xx */
  42734. A_UINT32 r2p_array_len; /* length of targetPowerR2PTable */
  42735. /* end_of_r2ptable_update:
  42736. * This field can be used to indicate FW to trigger update of SW structures
  42737. * once user has updated for all the sub-bands of the Frequency band.
  42738. * This would be used when there are multiple sub-bands.
  42739. */
  42740. A_UINT32 end_of_r2ptable_update;
  42741. /*
  42742. * Following this structure is the TLV containing targetPowerR2PTablexG
  42743. * of type INT8 and with a unit of 0.25dBm.
  42744. */
  42745. } wmi_pdev_set_tgtr2p_table_cmd_fixed_param;
  42746. typedef enum {
  42747. WMI_PDEV_TGTR2P_SUCCESS = 0,
  42748. WMI_PDEV_TGTR2P_SUCCESS_WAITING_FOR_END_OF_UPDATE,
  42749. WMI_PDEV_TGTR2P_ERROR_INVALID_FREQ_BAND,
  42750. WMI_PDEV_TGTR2P_ERROR_INVALID_SUB_BAND,
  42751. WMI_PDEV_TGTR2P_ERROR_EXTENSION_FIELDS_NOT_ENABLED_IN_BDF,
  42752. WMI_PDEV_TGTR2P_ERROR_INVALID_TARGET_TPYE,
  42753. WMI_PDEV_TGTR2P_ERROR_R2P_ARRAY_LEN_MISMATCH,
  42754. } wmi_pdev_set_tgtr2p_event_status_type;
  42755. typedef struct {
  42756. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_event_fixed_param */
  42757. /* status:
  42758. * enum wmi_pdev_set_tgtr2p_event_status_type to indicate the status
  42759. * code/result
  42760. */
  42761. A_UINT32 status;
  42762. A_UINT32 pdev_id; /* to identify for which pdev the response is received */
  42763. } wmi_pdev_set_tgtr2p_table_event_fixed_param;
  42764. #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM 4
  42765. #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_2G_RATE_NUM 18
  42766. #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_2G_RATE_NUM_EXT 8
  42767. #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_5G_6G_RATE_NUM 24
  42768. typedef struct {
  42769. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_custom_tx_power_per_mcs_cmd_fixed_param */
  42770. A_UINT32 pdev_id;
  42771. /* Every band's bitmap is per chain per mcs, the bit set indicate the txpower value existed
  42772. * in txpower_array, otherwise, it means no setting from up-layer and need treat the setting
  42773. * txpower as zero
  42774. */
  42775. /* currently 2GHz band has 2 chains (though space is allocated for up
  42776. * to 4 chains) and each chain has 18 rates and 8 extended rates.
  42777. * bitmap_of_2GHz_band[0] -> chain 0 bitmap:
  42778. * |bit 0|bit 1|......|bit 17| bit 18 |......| bit 25 |
  42779. * |rate 0|rate 1|......|rate 17|ext rate 0|......|ext rate 7|
  42780. *
  42781. * bitmap_of_2GHz_band[1] -> chain 1 bitmap:
  42782. * |bit 0|bit 1|......|bit 17| bit 18 |......| bit 25 |
  42783. * |rate 0|rate 1|......|rate 17|ext rate 0|......|ext rate 7|
  42784. *
  42785. * bitmap_of_2GHz_band[2] -> reserved
  42786. * bitmap_of_2GHz_band[3] -> reserved
  42787. */
  42788. A_UINT32 bitmap_of_2GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
  42789. /* 5GHz band has 4 chains and each chain has 24 rates.
  42790. * bitmap_of_5GHz_band[0] -> chain 0 bitmap:
  42791. * |bit 0|bit 1|......|bit 23|
  42792. * |rate 0|rate 1|......|rate 23|
  42793. *
  42794. * bitmap_of_5GHz_band[1] -> chain 1 bitmap:
  42795. * |bit 0|bit 1|......|bit 23|
  42796. * |rate 0|rate 1|......|rate 23|
  42797. *
  42798. * bitmap_of_5GHz_band[2] -> chain 2 bitmap:
  42799. * |bit 0|bit 1|......|bit 23|
  42800. * |rate 0|rate 1|......|rate 23|
  42801. *
  42802. * bitmap_of_5GHz_band[3] -> chain 3 bitmap:
  42803. * |bit 0|bit 1|......|bit 23|
  42804. * |rate 0|rate 1|......|rate 23|
  42805. */
  42806. A_UINT32 bitmap_of_5GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
  42807. /* 6GHz band has 4 chains and each chain has 24 rates.
  42808. * bitmap_of_6GHz_band[0] -> chain 0 bitmap:
  42809. * |bit 0|bit 1|......|bit 23|
  42810. * |rate 0|rate 1|......|rate 23|
  42811. *
  42812. * bitmap_of_6GHz_band[1] -> chain 1 bitmap:
  42813. * |bit 0|bit 1|......|bit 23|
  42814. * |rate 0|rate 1|......|rate 23|
  42815. *
  42816. * bitmap_of_6GHz_band[2] -> chain 2 bitmap:
  42817. * |bit 0|bit 1|......|bit 23|
  42818. * |rate 0|rate 1|......|rate 23|
  42819. *
  42820. * bitmap_of_6GHz_band[3] -> chain 3 bitmap:
  42821. * |bit 0|bit 1|......|bit 23|
  42822. * |rate 0|rate 1|......|rate 23|
  42823. */
  42824. A_UINT32 bitmap_of_6GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
  42825. A_UINT32 txpower_array_len;
  42826. /* This TLV is followed by array of bytes:
  42827. * A_UINT8 txpower_bkoff_array[]:
  42828. * The txpower backoff value for each bit set within the per-band bitmaps
  42829. * above, in dB units.
  42830. * The elements from the 2GHz band occur first, then the elements from the
  42831. * 5GHz band, then the elements from the 6GHz band.
  42832. * Within each band, the elements from the lower chain numbers (i.e. the
  42833. * lower words within the bitmap array) occur first.
  42834. * Within each chain of each band, the element from the lower rate indices
  42835. * (i.e. the least significant bits within the bitmap word) occur first.
  42836. */
  42837. } wmi_pdev_set_custom_tx_power_per_mcs_cmd_fixed_param;
  42838. typedef struct {
  42839. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_get_link_info_cmd_fixed_param */
  42840. A_UINT32 vdev_id;
  42841. wmi_mac_addr mld_macaddr; /* MLD MAC address */
  42842. } wmi_mlo_vdev_get_link_info_cmd_fixed_param;
  42843. typedef enum {
  42844. WMI_LINK_INFO_EVENT_SUCCESS = 0,
  42845. /* reject due to common failure reason */
  42846. WMI_LINK_INFO_EVENT_REJECT_FAILURE,
  42847. /* reject as vdev is not up */
  42848. WMI_LINK_INFO_EVENT_REJECT_VDEV_NOT_UP,
  42849. /* reject as roaming is in progress */
  42850. WMI_LINK_INFO_EVENT_REJECT_ROAMING_IN_PROGRESS,
  42851. /* reject as it's not MLO connection */
  42852. WMI_LINK_INFO_EVENT_REJECT_NON_MLO_CONNECTION,
  42853. } wmi_mlo_vdev_link_info_event_status_type;
  42854. typedef struct {
  42855. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_link_info_event_fixed_param */
  42856. /* status:
  42857. * enum wmi_mlo_vdev_link_info_event_status_type to indicate the status
  42858. */
  42859. A_UINT32 status;
  42860. /* vdev_id:
  42861. * unique id identifying the VDEV, generated by the caller
  42862. */
  42863. A_UINT32 vdev_id;
  42864. wmi_mac_addr mld_macaddr; /* MLD MAC address */
  42865. /* hw_mode_index:
  42866. * current hardware mode index, see soc_hw_mode_t for values
  42867. */
  42868. A_UINT32 hw_mode_index;
  42869. } wmi_mlo_vdev_link_info_event_fixed_param;
  42870. #define WMI_MLO_VDEV_LINK_INFO_GET_VDEVID(link_info) WMI_GET_BITS(link_info, 0, 8)
  42871. #define WMI_MLO_VDEV_LINK_INFO_SET_VDEVID(link_info, value) WMI_SET_BITS(link_info, 0, 8, value)
  42872. #define WMI_MLO_VDEV_LINK_INFO_GET_LINKID(link_info) WMI_GET_BITS(link_info, 8, 8)
  42873. #define WMI_MLO_VDEV_LINK_INFO_SET_LINKID(link_info, value) WMI_SET_BITS(link_info, 8, 8, value)
  42874. #define WMI_MLO_VDEV_LINK_INFO_GET_LINK_STATUS(link_info) WMI_GET_BITS(link_info, 16, 2)
  42875. #define WMI_MLO_VDEV_LINK_INFO_SET_LINK_STATUS(link_info, value) WMI_SET_BITS(link_info, 16, 2, value)
  42876. typedef struct {
  42877. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_link_info */
  42878. union {
  42879. struct {
  42880. A_UINT32 vdev_id:8, /* vdev id for this link */
  42881. link_id:8, /* link id defined as in 802.11 BE spec. */
  42882. link_status:2, /* link_status - 0: inactive, 1: active */
  42883. reserved:14;
  42884. };
  42885. A_UINT32 link_info;
  42886. };
  42887. A_UINT32 chan_freq; /* Channel frequency in MHz */
  42888. } wmi_mlo_vdev_link_info;
  42889. /* Manual UL OFDMA trigger frame data structures */
  42890. typedef enum {
  42891. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_NONE,
  42892. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_RESP, /* response timeout, mismatch,
  42893. * BW mismatch, mimo ctrl mismatch,
  42894. * CRC error.. */
  42895. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_FILT, /* blocked by tx filtering */
  42896. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_FIFO, /* fifo, misc errors in HW */
  42897. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_SWABORT, /* software initiated abort
  42898. * (TX_ABORT) */
  42899. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_MAX = 0xff,
  42900. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_INVALID =
  42901. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_MAX
  42902. } wmi_ul_ofdma_manual_trig_txerr_t;
  42903. typedef struct {
  42904. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_feedback_evt_fixed_param */
  42905. A_UINT32 tlv_header;
  42906. /* VDEV identifier */
  42907. A_UINT32 vdev_id;
  42908. /* To indicate whether feedback event is for SU (0) or MU trigger (1) */
  42909. A_UINT32 feedback_trig_type;
  42910. /* Feedback Params */
  42911. A_UINT32 curr_su_manual_trig_count;
  42912. A_UINT32 remaining_su_manual_trig;
  42913. A_UINT32 remaining_mu_trig_peers;
  42914. A_UINT32 manual_trig_status; /* holds a wmi_ul_ofdma_manual_trig_txerr_t */
  42915. /**
  42916. * This TLV is followed by TLVs below:
  42917. * wmi_mac_addr peer_macaddr[];
  42918. * Array length corresponds to the number of triggered peers
  42919. */
  42920. } wmi_manual_ul_ofdma_trig_feedback_evt_fixed_param;
  42921. typedef struct {
  42922. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_manual_mu_trig_cmd_fixed_param */
  42923. A_UINT32 tlv_header;
  42924. /* VDEV identifier */
  42925. A_UINT32 vdev_id;
  42926. /* Configurable Parameters for manual UL OFDMA Multi-User Trigger frame */
  42927. A_UINT32 manual_trig_preferred_ac;
  42928. /**
  42929. * This TLV is followed by TLVs below:
  42930. * wmi_mac_addr peer_macaddr[];
  42931. * The array has one element for each peer to be included in the
  42932. * manually-triggered UL MU transmission.
  42933. */
  42934. } wmi_vdev_set_manual_mu_trig_cmd_fixed_param;
  42935. typedef struct {
  42936. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_manual_su_trig_cmd_fixed_param */
  42937. A_UINT32 tlv_header;
  42938. /* VDEV identifier */
  42939. A_UINT32 vdev_id;
  42940. /* Configurable Parameters for manual UL OFDMA Single-User Trigger frame */
  42941. wmi_mac_addr peer_macaddr;
  42942. A_UINT32 manual_trig_preferred_ac;
  42943. A_UINT32 num_su_manual_trig;
  42944. A_UINT32 manual_trig_length;
  42945. A_UINT32 manual_trig_mcs;
  42946. A_UINT32 manual_trig_nss;
  42947. A_INT32 manual_trig_target_rssi; /* units = dBm */
  42948. } wmi_vdev_set_manual_su_trig_cmd_fixed_param;
  42949. #define CQI_UPLOAD_META_DATA_NC_IDX(idx) \
  42950. (MAX_NUM_CQI_USERS_IN_STANDALONE_SND + (idx * 2))
  42951. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_ASNR_LENGTH(asnr_params, value) \
  42952. WMI_SET_BITS(asnr_params, 0, 16, value)
  42953. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_ASNR_LENGTH(asnr_params) \
  42954. WMI_GET_BITS(asnr_params, 0, 16)
  42955. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_ASNR_OFFSET(asnr_params, value) \
  42956. WMI_SET_BITS(asnr_params, 16, 16, value)
  42957. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_ASNR_OFFSET(asnr_params) \
  42958. WMI_GET_BITS(asnr_params, 16, 16)
  42959. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DSNR_LENGTH(dsnr_params, value) \
  42960. WMI_SET_BITS(dsnr_params, 0, 16, value)
  42961. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DSNR_LENGTH(dsnr_params) \
  42962. WMI_GET_BITS(dsnr_params, 0, 16)
  42963. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DSNR_OFFSET(dsnr_params, value) \
  42964. WMI_SET_BITS(dsnr_params, 16, 16, value)
  42965. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DSNR_OFFSET(dsnr_params) \
  42966. WMI_GET_BITS(dsnr_params, 16, 16)
  42967. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_FB_PARAMS_NC(fb_params, value) \
  42968. WMI_SET_BITS(fb_params, 0, 2, value)
  42969. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_FB_PARAMS_NC(fb_params) \
  42970. WMI_GET_BITS(fb_params, 0, 2)
  42971. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_FB_PARAMS_NSS_NUM(fb_params, value) \
  42972. WMI_SET_BITS(fb_params, 2, 2, value)
  42973. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_FB_PARAMS_NSS_NUM(fb_params) \
  42974. WMI_GET_BITS(fb_params, 2, 2)
  42975. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DDR_BUF_IDX(ddr_buffer_idx, value) \
  42976. WMI_SET_BITS(ddr_buffer_idx, 4, 2, value)
  42977. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DDR_BUF_IDX(ddr_buffer_idx) \
  42978. WMI_GET_BITS(ddr_buffer_idx, 4, 2)
  42979. #define WMI_SET_STANDALONE_SOUND_PARAMS_FB_TYPE(snd_params, value) \
  42980. WMI_SET_BITS(snd_params, 0, 2, value)
  42981. #define WMI_GET_STANDALONE_SOUND_PARAMS_FB_TYPE(snd_params) \
  42982. WMI_GET_BITS(snd_params, 0, 2)
  42983. #define WMI_SET_STANDALONE_SOUND_PARAMS_NG(snd_params, value) \
  42984. WMI_SET_BITS(snd_params, 2, 2, value)
  42985. #define WMI_GET_STANDALONE_SOUND_PARAMS_NG(snd_params) \
  42986. WMI_GET_BITS(snd_params, 2, 2)
  42987. #define WMI_SET_STANDALONE_SOUND_PARAMS_CB(snd_params, value) \
  42988. WMI_SET_BITS(snd_params, 4, 1, value)
  42989. #define WMI_GET_STANDALONE_SOUND_PARAMS_CB(snd_params) \
  42990. WMI_GET_BITS(snd_params, 4, 1)
  42991. #define WMI_SET_STANDALONE_SOUND_PARAMS_BW(snd_params, value) \
  42992. WMI_SET_BITS(snd_params, 5, 3, value)
  42993. #define WMI_GET_STANDALONE_SOUND_PARAMS_BW(snd_params) \
  42994. WMI_GET_BITS(snd_params, 5, 3)
  42995. #define WMI_SET_STANDALONE_SOUND_PARAMS_CQI_TYPE(snd_params, value) \
  42996. WMI_SET_BITS(snd_params, 8, 1, value)
  42997. #define WMI_GET_STANDALONE_SOUND_PARAMS_CQI_TYPE(snd_params) \
  42998. WMI_GET_BITS(snd_params, 8, 1)
  42999. #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_SET_FB_PARAMS_IS_VALID(fb_params_cqi, value, idx) \
  43000. WMI_SET_BITS(fb_params_cqi, idx, 1, value)
  43001. #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_GET_FB_PARAMS_IS_VALID(fb_params_cqi, idx) \
  43002. WMI_GET_BITS(fb_params_cqi, idx, 1)
  43003. #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_SET_FB_PARAMS_NC(fb_params_cqi, value, idx) \
  43004. WMI_SET_BITS(fb_params_cqi, CQI_UPLOAD_META_DATA_NC_IDX(idx), 2, value)
  43005. #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_GET_FB_PARAMS_NC(fb_params_cqi, idx) \
  43006. WMI_GET_BITS(fb_params_cqi, CQI_UPLOAD_META_DATA_NC_IDX(idx), 2)
  43007. typedef enum _WMI_STANDALONE_SOUND_STATUS_T {
  43008. WMI_STANDALONE_SOUND_STATUS_OK,
  43009. WMI_STANDALONE_SOUND_STATUS_ERR_NUM_PEERS_EXCEEDED,
  43010. WMI_STANDALONE_SOUND_STATUS_ERR_NG_INVALID,
  43011. WMI_STANDALONE_SOUND_STATUS_ERR_NUM_REPEAT_EXCEEDED,
  43012. WMI_STANDALONE_SOUND_STATUS_ERR_PEER_DOESNOT_SUPPORT_BW,
  43013. WMI_STANDALONE_SOUND_STATUS_ERR_INVALID_PEER,
  43014. WMI_STANDALONE_SOUND_STATUS_ERR_INVALID_VDEV,
  43015. WMI_STANDALONE_SOUND_STATUS_ERR_PEER_DOES_NOT_SUPPORT_MU_FB,
  43016. WMI_STANDALONE_SOUND_STATUS_ERR_DMA_NOT_CONFIGURED,
  43017. WMI_STANDALONE_SOUND_STATUS_ERR_COMPLETE_FAILURE,
  43018. } WMI_STANDALONE_SOUND_STATUS_T;
  43019. typedef struct {
  43020. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_cv_upload_meta_data */
  43021. /** Set if the CV is valid */
  43022. A_UINT32 is_valid;
  43023. /** Feedback type */
  43024. A_UINT32 fb_type;
  43025. /**
  43026. * [15:0] ASNR length
  43027. * [31:16] ASNR offset
  43028. */
  43029. A_UINT32 asnr_params;
  43030. /**
  43031. * [15:0] DSNR length
  43032. * [31:16] DSNR offset
  43033. */
  43034. A_UINT32 dsnr_params;
  43035. /** Peer mac address */
  43036. wmi_mac_addr peer_mac_address;
  43037. /** fb_params:
  43038. * [1:0] Nc
  43039. * Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_FB_PARAMS_NC
  43040. * [3:2] nss_num
  43041. * Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_FB_PARAMS_NSS_NUM
  43042. * [5:4] ddr_buffer_idx
  43043. * Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_DDR_BUF_IDX
  43044. */
  43045. A_UINT32 fb_params;
  43046. } wmi_dma_buf_release_cv_upload_meta_data;
  43047. typedef struct {
  43048. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_radar_meta_data */
  43049. /* timestamp at the time of the capture */
  43050. A_UINT32 timestamp_us;
  43051. /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h */
  43052. A_UINT32 phy_mode;
  43053. /* frequency (in MHz) of the primary 20 MHz channel */
  43054. A_UINT32 chan_mhz;
  43055. /* Center frequency 1 in MHz */
  43056. A_UINT32 band_center_freq1;
  43057. /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode */
  43058. A_UINT32 band_center_freq2;
  43059. /* tx chain mask */
  43060. A_UINT32 tx_chain_mask;
  43061. /* rx chain mask */
  43062. A_UINT32 rx_chain_mask;
  43063. /* number of LTFs sent for capture */
  43064. A_UINT32 num_ltf_tx;
  43065. /* number of LTFs skipped in rx */
  43066. A_UINT32 num_skip_ltf_rx;
  43067. /* number of LTFs used for accumulation */
  43068. A_UINT32 num_ltf_accumulation;
  43069. } wmi_dma_buf_release_wifi_radar_meta_data;
  43070. typedef struct {
  43071. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_cqi_upload_meta_data */
  43072. A_UINT32 tlv_header;
  43073. /**
  43074. * [15:0] ASNR length
  43075. * [31:16] ASNR offset
  43076. */
  43077. A_UINT32 asnr_params;
  43078. /** Peer mac address */
  43079. wmi_mac_addr peer_mac_address[MAX_NUM_CQI_USERS_IN_STANDALONE_SND];
  43080. /**
  43081. * [0] is_user0_valid
  43082. * [1] is_user1_valid
  43083. * [2] is_user2_valid
  43084. * [4:3] User0_Nc
  43085. * [6:5] User1_Nc
  43086. * [8:7] User2_Nc
  43087. */
  43088. A_UINT32 fb_params_cqi : 9,
  43089. reserved : 23;
  43090. } wmi_dma_buf_release_cqi_upload_meta_data;
  43091. typedef struct {
  43092. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_standalone_sounding_cmd_fixed_param */
  43093. /** vdev identifier */
  43094. A_UINT32 vdev_id;
  43095. /** sounding_params:
  43096. * [1:0] Feedback type
  43097. * [3:2] Ng
  43098. * [4] Codebook
  43099. * [7:5] BW
  43100. * 0 = 20 MHz
  43101. * 1 = 40 MHz
  43102. * 2 = 80 MHz
  43103. * 3 = 160 MHz
  43104. * 4 = 320 MHz
  43105. * [8] Triggered/Non-Triggered CQI
  43106. * [31:9] Reserved
  43107. */
  43108. A_UINT32 sounding_params;
  43109. /** The number of sounding repeats */
  43110. A_UINT32 num_sounding_repeats;
  43111. /**
  43112. * TLV (tag length value) parameters follow the
  43113. * structure. The TLV's are:
  43114. * wmi_mac_addr peer_list[num_peers];
  43115. */
  43116. } wmi_standalone_sounding_cmd_fixed_param;
  43117. typedef struct {
  43118. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_standalone_sounding_evt_fixed_param */
  43119. /** vdev identifier */
  43120. A_UINT32 vdev_id;
  43121. /** status:
  43122. * standalone sounding command status -
  43123. * refer to WMI_STANDALONE_SOUND_STATUS_T
  43124. */
  43125. A_UINT32 status;
  43126. /** number of CV buffers uploaded */
  43127. A_UINT32 buffer_uploaded;
  43128. /** TLV (tag length value) parameters follow the
  43129. * structure. The TLV's are:
  43130. * A_UINT32 snd_failed[num_sounding_repeats];
  43131. * snd_failed[] array's elements hold the number of failures
  43132. * for each sounding.
  43133. */
  43134. } wmi_standalone_sounding_evt_fixed_param;
  43135. typedef struct {
  43136. /*
  43137. * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rf_path_cmd_fixed_param
  43138. */
  43139. A_UINT32 tlv_header;
  43140. /* pdev_id for identifying the MAC */
  43141. A_UINT32 pdev_id;
  43142. /*
  43143. * rf_path :
  43144. * 0 - primary RF path
  43145. * 1 - secondary RF path
  43146. */
  43147. A_UINT32 rf_path;
  43148. } wmi_pdev_set_rf_path_cmd_fixed_param;
  43149. typedef struct {
  43150. /*
  43151. * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rf_path_event_fixed_param
  43152. */
  43153. A_UINT32 tlv_header;
  43154. /* pdev_id for identifying the MAC */
  43155. A_UINT32 pdev_id;
  43156. /*
  43157. * rf_path :
  43158. * 0 - primary RF path
  43159. * 1 - secondary RF path
  43160. */
  43161. A_UINT32 rf_path;
  43162. /*
  43163. * status :
  43164. * TRUE (0) - for recieved and cache the value in FW
  43165. * FALSE (1) :
  43166. * a. pdev_id for which secondary RF path is not available
  43167. * b. caching of the rf_path got failed in FW
  43168. */
  43169. A_UINT32 status;
  43170. } wmi_pdev_set_rf_path_event_fixed_param;
  43171. #define WMI_SET_RX_PEER_STATS_RESP_TYPE(rx_params, value) \
  43172. WMI_SET_BITS(rx_params, 0, 1, value)
  43173. #define WMI_GET_RX_PEER_STATS_RESP_TYPE(rx_params) \
  43174. WMI_GET_BITS(rx_params, 0, 1)
  43175. #define WMI_SET_RX_PEER_STATS_MCS(rx_params, value) \
  43176. WMI_SET_BITS(rx_params, 1, 5, value)
  43177. #define WMI_GET_RX_PEER_STATS_MCS(rx_params) \
  43178. WMI_GET_BITS(rx_params, 1, 5)
  43179. #define WMI_SET_RX_PEER_STATS_NSS(rx_params, value) \
  43180. WMI_SET_BITS(rx_params, 6, 4, value)
  43181. #define WMI_GET_RX_PEER_STATS_NSS(rx_params) \
  43182. WMI_GET_BITS(rx_params, 6, 4)
  43183. #define WMI_SET_RX_PEER_STATS_GI_LTF_TYPE(rx_params, value) \
  43184. WMI_SET_BITS(rx_params, 10, 4, value)
  43185. #define WMI_GET_RX_PEER_STATS_GI_LTF_TYPE(rx_params) \
  43186. WMI_GET_BITS(rx_params, 10, 4)
  43187. typedef enum {
  43188. WMI_PEER_RX_RESP_SU = 0,
  43189. WMI_PEER_RX_RESP_MIMO = 1,
  43190. WMI_PEER_RX_RESP_OFDMA = 2,
  43191. } WMI_PEER_RX_RESP_TYPE;
  43192. typedef struct {
  43193. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_rx_peer_userinfo */
  43194. A_UINT32 tlv_header;
  43195. /* Peer mac address */
  43196. wmi_mac_addr peer_macaddr;
  43197. /* Per peer RX parameters */
  43198. /* [0] - Flag to indicate if peer responded with QoS Data or QoS NULL.
  43199. * 0 -> indicates QoS NULL, 1-> indicates QoS Data response
  43200. * [5:1] - MCS - Peer response MCS
  43201. * [9:6] - NSS - Peer response NSS
  43202. * [13:10] - GI LTF Type - Peer response GI/LTF type
  43203. * 0 => gi == GI_1600 && ltf == 1x LTF
  43204. * 1 => gi == GI_1600 && ltf == 2x LTF
  43205. * 2 => gi == GI_3200 && ltf == 4x LTF
  43206. * [31:14] - Reserved
  43207. */
  43208. A_UINT32 rx_peer_stats;
  43209. /* Peer response per chain RSSI */
  43210. A_INT32 peer_per_chain_rssi[WMI_MAX_CHAINS];
  43211. } wmi_manual_ul_ofdma_trig_rx_peer_userinfo;
  43212. typedef struct {
  43213. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_rx_peer_userinfo_evt_fixed_param */
  43214. A_UINT32 tlv_header;
  43215. A_UINT32 vdev_id; /* VDEV identifier */
  43216. /* combined_rssi:
  43217. * RX Combined RSSI in dBm
  43218. * Value indicates the average RSSI per 20MHz by averaging the total RSSI
  43219. * across entire BW for each OFDMA STA
  43220. */
  43221. A_INT32 combined_rssi;
  43222. /* rx_ppdu_resp_type:
  43223. * RX PPDU Response Type
  43224. * Refer WMI_PEER_RX_RESP_TYPE for possible values
  43225. */
  43226. A_UINT32 rx_ppdu_resp_type;
  43227. /* rx_resp_bw:
  43228. * RX response bandwidth
  43229. * 0 = 20 MHz
  43230. * 1 = 40 MHz
  43231. * 2 = 80 MHz
  43232. * 3 = 160 MHz
  43233. * 4 = 320 MHz
  43234. */
  43235. A_UINT32 rx_resp_bw;
  43236. /**
  43237. * This TLV is followed by TLVs below:
  43238. * wmi_manual_ul_ofdma_trig_rx_peer_userinfo rx_peer_userinfo[]
  43239. * TLV length specified by number of peer responses for manual
  43240. * UL OFDMA trigger
  43241. */
  43242. } wmi_manual_ul_ofdma_trig_rx_peer_userinfo_evt_fixed_param;
  43243. typedef enum _WMI_VDEV_PAUSE_TYPE
  43244. {
  43245. WMI_VDEV_PAUSE_TYPE_UNKNOWN = 0,
  43246. WMI_VDEV_PAUSE_TYPE_MLO_LINK = 1,
  43247. WMI_VDEV_PAUSE_TYPE_TX = 2,
  43248. } WMI_VDEV_PAUSE_TYPE;
  43249. typedef struct {
  43250. /** TLV tag and len; tag equals
  43251. * WMITLV_TAG_STRUC_wmi_vdev_pause_cmd_fixed_param */
  43252. A_UINT32 tlv_header;
  43253. /* VDEV identifier */
  43254. A_UINT32 vdev_id;
  43255. /** type of pause, refer to WMI_VDEV_PAUSE_TYPE */
  43256. A_UINT32 pause_type;
  43257. /** duration of pause, in unit of ms */
  43258. A_UINT32 pause_dur_ms;
  43259. } wmi_vdev_pause_cmd_fixed_param;
  43260. typedef struct {
  43261. A_UINT32 tlv_header;
  43262. A_UINT32 ieee_link_id; /* key to identify a link */
  43263. wmi_channel wmi_chan;
  43264. } wmi_mlo_link_bss_param;
  43265. typedef struct {
  43266. A_UINT32 tlv_header;
  43267. wmi_mac_addr ap_mld_macaddr;
  43268. /* max num of active links recommended by AP or applications */
  43269. A_UINT32 recommended_max_num_simultaneous_links;
  43270. /*
  43271. * The TLVs listed below follow this fixed_param TLV:
  43272. * wmi_mlo_link_bss_param link_bss_params[]:
  43273. * an array of links to be updated
  43274. */
  43275. } wmi_mlo_set_link_bss_params_cmd_fixed_param;
  43276. typedef enum _WMI_LINK_SWITCH_REASON {
  43277. WMI_MLO_LINK_SWITCH_REASON_RSSI_CHANGE = 1,
  43278. WMI_MLO_LINK_SWITCH_REASON_LOW_QUALITY = 2,
  43279. WMI_MLO_LINK_SWITCH_REASON_C2_CHANGE = 3,
  43280. WMI_MLO_LINK_SWITCH_REASON_HOST_FORCE = 4,
  43281. WMI_MLO_LINK_SWITCH_REASON_T2LM = 5,
  43282. WMI_MLO_LINK_SWITCH_REASON_WLM = 6,
  43283. WMI_MLO_LINK_SWITCH_REASON_HOST_FORCE_FOLLOWUP = 7,
  43284. WMI_MLO_LINK_SWITCH_REASON_MAX,
  43285. } WMI_LINK_SWITCH_REASON;
  43286. typedef struct {
  43287. A_UINT32 tlv_header;
  43288. A_UINT32 vdev_id; /*the vdev id assigned to curr_ieee_link_id*/
  43289. A_UINT32 curr_ieee_link_id; /*current link id on above vdev_id*/
  43290. A_UINT32 new_ieee_link_id; /*new link id on above vdev_id*/
  43291. A_UINT32 new_primary_freq; /*primay_freq for the new link on the vdev, in units of MHZ*/
  43292. A_UINT32 new_phymode; /*phymode for the new link on the vdev, see WLAN_PHY_MODE for definitions*/
  43293. A_UINT32 reason; /*see WMI_LINK_SWITCH_REASON for definition*/
  43294. } wmi_mlo_link_switch_req_evt_fixed_param;
  43295. typedef enum _WMI_LINK_SWITCH_CNF_REASON{
  43296. WMI_MLO_LINK_SWITCH_CNF_REASON_BSS_PARAMS_CHANGED = 1,
  43297. WMI_MLO_LINK_SWITCH_CNF_REASON_CONCURRECNY_CONFLICT = 2,
  43298. WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_INTERNAL_ERROR = 3,
  43299. WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_RESTORE_FORCE = 4,
  43300. WMI_MLO_LINK_SWITCH_CNF_REASON_MAX,
  43301. } WMI_LINK_SWITCH_CNF_REASON;
  43302. typedef enum _WMI_LINK_SWITCH_CNF_STATUS{
  43303. WMI_MLO_LINK_SWITCH_CNF_STATUS_ACCEPT = 0,
  43304. WMI_MLO_LINK_SWITCH_CNF_STATUS_REJECT = 1,
  43305. } WMI_LINK_SWITCH_CNF_STATUS;
  43306. typedef struct {
  43307. A_UINT32 tlv_header;
  43308. A_UINT32 vdev_id;
  43309. A_UINT32 status; /* see definition of WMI_LINK_SWITCH_CNF_STATUS */
  43310. A_UINT32 reason; /* see definition of WMI_LINK_SWITCH_CNF_REASON */
  43311. /*
  43312. * The following optional TLVs may follow this fixed_praam TLV,
  43313. * depending on the value of the reason field.
  43314. *
  43315. * wmi_mlo_link_set_active_cmd_fixed_param set_link_params[];
  43316. * The set_link_params array has one element when reason is
  43317. * WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_RESTORE_FORCE and
  43318. * use_ieee_link_id_bitmap should always be filled with 1.
  43319. * In other cases the length of the set_link_params array shall be 0.
  43320. *
  43321. * wmi_mlo_set_active_link_number_param link_number_param[];
  43322. * Link number parameters, optional TLV.
  43323. * Present when force type is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  43324. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM.
  43325. * In other cases the length of array shall be 0.
  43326. *
  43327. * A_UINT32 ieee_link_id_bitmap[];
  43328. * present for WMI_MLO_LINK_FORCE_ACTIVE
  43329. * or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE
  43330. * or WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  43331. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM
  43332. * In other cases the length of array shall be 0.
  43333. *
  43334. * A_UINT32 ieee_link_id_bitmap2[];
  43335. * For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE ieee_link_id_bitmap2[]
  43336. * carries the inactive linkid bitmap.
  43337. * In other cases the length of the array shall be 0.
  43338. */
  43339. } wmi_mlo_link_switch_cnf_fixed_param;
  43340. typedef struct {
  43341. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_state_switch_req_evt_fixed_param */
  43342. A_UINT32 link_state_switch_count; /* Number of link state switch event pending, MAX 5 iteration */
  43343. } wmi_mlo_link_state_switch_req_evt_fixed_param;
  43344. typedef struct {
  43345. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_state_switch_trigger_reason_tlv_param */
  43346. A_UINT32 cur_active_ieee_bitmap; /* current active ieee linkbitmap */
  43347. A_UINT32 prev_active_ieee_bitmap; /* previous active iee linkbitmap */
  43348. A_UINT32 host_ref_fw_timestamp_ms; /* fw time stamp on refrence of TIME_STAMP_SYNC_CMD */
  43349. A_UINT32 reason_code; /* reason for link state switch trigger -
  43350. * refer to WMI_LINK_STATE_SWITCH_REASON
  43351. */
  43352. wmi_mac_addr ml_bssid; /* mac address of mld device */
  43353. } wmi_mlo_link_state_switch_trigger_reason;
  43354. typedef enum _WMI_LINK_STATE_SWITCH_REASON {
  43355. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_VDEV_READY = 0,
  43356. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_ULL_MODE = 1,
  43357. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_T2LM_ENABLED = 2,
  43358. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_T2LM_DISABLED = 3,
  43359. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_FORCE_ENABLED = 4,
  43360. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_FORCE_DISABLED = 5,
  43361. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_LINK_QUALITY = 6,
  43362. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_LINK_CAPACITY = 7,
  43363. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_RSSI = 8,
  43364. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_BMISS = 9,
  43365. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_BT_STATUS = 10,
  43366. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_MAX,
  43367. } WMI_LINK_STATE_SWITCH_REASON;
  43368. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_ML_PEER_ID_GET(new_link_info) WMI_GET_BITS(new_link_info, 0, 16)
  43369. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_ML_PEER_ID_SET(new_link_info, value) WMI_SET_BITS(new_link_info, 0, 16, value)
  43370. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_HW_LINK_ID_GET(new_link_info) WMI_GET_BITS(new_link_info, 16, 16)
  43371. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_HW_LINK_ID_SET(new_link_info, value) WMI_SET_BITS(new_link_info, 16, 16, value)
  43372. typedef struct {
  43373. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_new_primary_link_peer_info */
  43374. A_UINT32 tlv_header;
  43375. union {
  43376. A_UINT32 new_link_info;
  43377. struct {
  43378. A_UINT32 ml_peer_id :16,
  43379. hw_link_id :16;
  43380. };
  43381. };
  43382. } wmi_mlo_new_primary_link_peer_info;
  43383. typedef struct {
  43384. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_fixed_param */
  43385. A_UINT32 tlv_header;
  43386. A_UINT32 vdev_id;
  43387. /**
  43388. * Following this structure is
  43389. * the array of "wmi_mlo_new_primary_link_peer_info" TLVs.
  43390. */
  43391. } wmi_mlo_primary_link_peer_migration_fixed_param;
  43392. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_ML_PEER_ID_GET(status_info) WMI_GET_BITS(status_info, 0, 16)
  43393. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_ML_PEER_ID_SET(status_info, value) WMI_SET_BITS(status_info, 0, 16, value)
  43394. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_STATUS_GET(status_info) WMI_GET_BITS(status_info, 16, 8)
  43395. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_STATUS_SET(status_info, value) WMI_SET_BITS(status_info, 16, 8, value)
  43396. typedef enum {
  43397. WMI_PRIMARY_LINK_PEER_MIGRATION_SUCCESS,
  43398. WMI_PRIMARY_LINK_PEER_MIGRATION_IN_PROGRESS,
  43399. WMI_PRIMARY_LINK_PEER_MIGRATION_DELETE_IN_PROGRESS,
  43400. WMI_PRIMARY_LINK_PEER_MIGRATION_DELETED,
  43401. WMI_PRIMARY_LINK_PEER_MIGRATION_TX_PIPES_FAILED,
  43402. WMI_PRIMARY_LINK_PEER_MIGRATION_RX_PIPES_FAILED,
  43403. /* Add any new status above this line */
  43404. WMI_PRIMARY_LINK_PEER_MIGRATION_FAIL = 255,
  43405. } WMI_PRIMARY_LINK_PEER_MIGRATION_STATUS;
  43406. typedef struct {
  43407. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_status */
  43408. A_UINT32 tlv_header;
  43409. union {
  43410. A_UINT32 status_info;
  43411. struct {
  43412. A_UINT32 ml_peer_id :16,
  43413. status :8, /* WMI_PRIMARY_LINK_PEER_MIGRATION_STATUS */
  43414. reserved :8;
  43415. };
  43416. };
  43417. } wmi_mlo_primary_link_peer_migration_status;
  43418. typedef struct {
  43419. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_compl_fixed_param */
  43420. A_UINT32 tlv_header;
  43421. A_UINT32 vdev_id;
  43422. /**
  43423. * Following the fixed param is
  43424. * the array of TLVs "wmi_mlo_primary_link_peer_migration_status".
  43425. */
  43426. } wmi_mlo_primary_link_peer_migration_compl_fixed_param;
  43427. /* WMI_AUX_DEV_CAPS_SUPPORTED_MODE:
  43428. * How many bits to shift for each supported mode.
  43429. * This works just like Linux file permission bits
  43430. * (i.e. user|group|other values for each rwx perms).
  43431. */
  43432. typedef enum _WMI_AUX_DEV_CAPS_SUPPORTED_MODE {
  43433. WMI_AUX_DEV_SUPPORTED_MODE_SCAN = 0,
  43434. WMI_AUX_DEV_SUPPORTED_MODE_LISTEN = 1,
  43435. WMI_AUX_DEV_SUPPORTED_MODE_EMLSR = 2,
  43436. } WMI_AUX_DEV_CAPS_SUPPORTED_MODE;
  43437. /* wmi_aux_dev_capabilities:
  43438. * TLV representing AUX mode capabilities
  43439. * A one-dimensional "flattened" array of these structs shall represent
  43440. * all AUX capabilities regardless of the actual AUX count.
  43441. *
  43442. * For example, if 2x AUX are present, then the array is expected to look
  43443. * something like this:
  43444. * wmi_aux_dev_capabilities caps[] = {
  43445. * // 4 elements for AUX_0 - one element for each HW mode:
  43446. * AUX_0_single_mac,
  43447. * AUX_0_dual_mac,
  43448. * AUX_0_single_mac_emlsr,
  43449. * AUX_0_split_emlsr,
  43450. * // 4 elements for AUX_1:
  43451. * AUX_1_single_mac,
  43452. * AUX_1_dual_mac,
  43453. * AUX_1_single_mac_emlsr,
  43454. * AUX_1_split_emlsr,
  43455. * };
  43456. * In effect, indexes 0 to 3 (inclusive) represent the first AUX,
  43457. * 4 to 7 (inclusive) represent the second, and so on.
  43458. * Note that each element explicitly identifies which AUX and HW mode it
  43459. * corresponds to, via the aux_index and hw_mode_id fields respectively.
  43460. * So the receiver should not assume the ordering will be as shown above
  43461. * (AUX0 single, AUX0 dual, AUX0 single emlsr, AUX0 split emlsr,
  43462. * AUX1 single, AUX1 dual, AUX1 single emlsr, AUX1 split emlsr)
  43463. * but instead should directly check each element's aux_index and hw_mode_id
  43464. * fields.
  43465. */
  43466. typedef struct {
  43467. /* tlv_header -- WMITLV_TAG_STRUC_wmi_aux_dev_capabilities */
  43468. A_UINT32 tlv_header;
  43469. /* aux_index -- Which AUX this TLV applies to.
  43470. Ex: aux_index=0 is first AUX, aux_index=1 is second AUX, etc */
  43471. A_UINT32 aux_index;
  43472. /*
  43473. * This TLV represents which AUX capabilities are supported by
  43474. * which MAC for the given HW mode.
  43475. * pdev ID value of 0x0 denotes that the AUX mode is not applicable
  43476. * for the given HW mode.
  43477. *
  43478. * hw_mode_id | Single DBS_OR_SBS AUX eMLSR AUX eMLSR
  43479. * | Phy single split
  43480. * --------------------------------------------------------------
  43481. * supported_modes | SCAN/ SCAN/ EMLSR EMLSR
  43482. * | LISTEN LISTEN
  43483. * listen_pdev_id_map | 0x1 0x2 0x0 0x0
  43484. * emlsr_pdev_id_map | 0x0 0x0 0x1 0x2
  43485. */
  43486. /* hw_mode_id:
  43487. * Which HW mode this TLV applies to.
  43488. * HW mode values are defined in WMI_HW_MODE_CONFIG_TYPE.
  43489. */
  43490. A_UINT32 hw_mode_id;
  43491. /* supported_modes:
  43492. * Which mode this AUX supports for the HW mode defined in hw_mode_id.
  43493. * Shift amounts are defined in WMI_AUX_DEV_CAPS_SUPPORTED_MODE.
  43494. * This works just like user|group|other bits for Linux file permissions:
  43495. * 0x1 = SCAN (0 0 1)
  43496. * 0x2 = LISTEN (0 1 0)
  43497. * 0x3 = SCAN+LISTEN (0 1 1)
  43498. * 0x4 = EMLSR (1 0 0)
  43499. */
  43500. A_UINT32 supported_modes_bitmap;
  43501. /* listen_pdev_id_map:
  43502. * Which AUX MAC can listen/scan for the HW mode described in hw_mode_id.
  43503. * 0x0 - AUX cannot be used for listen mode.
  43504. * 0x1 - AUX can be attached to MAC-0 in AUX listen mode.
  43505. * 0x2 - AUX can be attached to MAC-1 in AUX listen mode.
  43506. */
  43507. A_UINT32 listen_pdev_id_map;
  43508. /* emlsr_pdev_id_map:
  43509. * Which AUX MAC can perform eMLSR for the HW mode described in hw_mode_id.
  43510. * 0x0 - AUX cannot be used for eMLSR mode.
  43511. * 0x1 - AUX can be attached to MAC-0 in AUX eMLSR mode.
  43512. * 0x2 - AUX can be attached to MAC-1 in AUX eMLSR mode.
  43513. */
  43514. A_UINT32 emlsr_pdev_id_map;
  43515. } wmi_aux_dev_capabilities;
  43516. typedef struct {
  43517. /** TLV tag and len; tag equals
  43518. * WMITLV_TAG_STRUC_wmi_pdev_wsi_stats_info_cmd_fixed_param
  43519. */
  43520. A_UINT32 tlv_header;
  43521. A_UINT32 pdev_id; /* for identifying the MAC */
  43522. A_UINT32 wsi_ingress_load_info;
  43523. A_UINT32 wsi_egress_load_info;
  43524. } wmi_pdev_wsi_stats_info_cmd_fixed_param;
  43525. typedef struct {
  43526. /** TLV tag and len; tag equals
  43527. * WMITLV_TAG_STRUC_wmi_csa_event_status_ind_fixed_param
  43528. */
  43529. A_UINT32 tlv_header;
  43530. A_UINT32 vdev_id;
  43531. A_UINT32 status; /* accept: 1 reject : 0 */
  43532. } wmi_csa_event_status_ind_fixed_param;
  43533. typedef struct {
  43534. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_utf_cmd_fixed_param */
  43535. A_UINT32 tlv_header;
  43536. A_UINT32 pdev_id;
  43537. } wmi_pdev_utf_cmd_fixed_param;
  43538. typedef struct {
  43539. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_utf_event_fixed_param */
  43540. A_UINT32 tlv_header;
  43541. A_UINT32 pdev_id;
  43542. } wmi_pdev_utf_event_fixed_param;
  43543. typedef struct {
  43544. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_led_blink_rate_table */
  43545. A_UINT32 tlv_header;
  43546. A_UINT32 on_time; /* units = milliseconds */
  43547. A_UINT32 off_time; /* units = milliseconds */
  43548. } wmi_led_blink_rate_table;
  43549. typedef struct {
  43550. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_led_blink_download_rate_table_fixed_param */
  43551. A_UINT32 tlv_header;
  43552. /* Pdev Id 0 or 1 based on split phy */
  43553. A_UINT32 pdev_id;
  43554. /* Feature enable or disable flag 0-disable 1-enable */
  43555. A_UINT32 blink_enable_flag;
  43556. /* Bandwidth (Mbps) of each index in the blink rate table.
  43557. * This quantum specification tells the FW which of the blink rate table
  43558. * elements to use; the FW will divide the data rate by this bw_per_index
  43559. * and round down, to obtain the index into the rate table for the blink
  43560. * rate corresponding to the data rate.
  43561. */
  43562. A_UINT32 bw_per_index;
  43563. /**
  43564. * Following this fixed_param TLV are the following additional TLVs:
  43565. * - wmi_led_blink_rate_table led_blink_rate_table[]
  43566. * The led_blink_rate_table[] elements need to be ordered by
  43567. * increasing data rate, so that by dividing the data rate by
  43568. * bw_per_index, the FW can find which index/element of the
  43569. * led_blink_rate_table[] array to use.
  43570. */
  43571. } wmi_enable_led_blink_download_rate_table_fixed_param;
  43572. typedef enum {
  43573. /* Used when peer attempts connection with vdev */
  43574. VDEV_OOB_CONNECT_REQUEST = 0,
  43575. /* Used when upper layers wanted to cancel the connect request */
  43576. VDEV_OOB_CONNECT_CANCEL = 1,
  43577. /* Used as a response from FW that start request is accepted */
  43578. VDEV_OOB_CONNECT_STARTED = 2,
  43579. /*
  43580. * Used as a response when connection is complete, or as a response
  43581. * to cancel command.
  43582. */
  43583. VDEV_OOB_CONNECT_COMPLETED = 3,
  43584. /* Used as a response if connect request can not be honored in FW */
  43585. VDEV_OOB_CONNECT_CANCELLED = 4,
  43586. VDEV_OOB_CONNECT_INVALID = 255,
  43587. } VDEV_OOB_CONNECT_REQ_RESP_TYPE;
  43588. typedef struct {
  43589. /** TLV tag and len; tag equals
  43590. * WMITLV_TAG_STRUC_wmi_vdev_oob_connection_req_cmd_fixed_param */
  43591. A_UINT32 tlv_header;
  43592. /* VDEV identifier */
  43593. A_UINT32 vdev_id;
  43594. /* OOB connection request type based on VDEV_OOB_CONNECT_REQ_RESP_TYPE */
  43595. A_UINT32 connect_req_type;
  43596. /* vdev_available_duration:
  43597. * specifies duration in msecs for which device needs to be available
  43598. * on vdev chan
  43599. */
  43600. A_UINT32 vdev_available_duration;
  43601. } wmi_vdev_oob_connection_req_cmd_fixed_param;
  43602. typedef struct {
  43603. /** TLV tag and len; tag equals
  43604. * WMITLV_TAG_STRUC_wmi_vdev_oob_connection_resp_event_fixed_param */
  43605. A_UINT32 tlv_header;
  43606. /* VDEV identifier */
  43607. A_UINT32 vdev_id;
  43608. /* OOB connection response type based on VDEV_OOB_CONNECT_REQ_RESP_TYPE */
  43609. A_UINT32 connect_resp_type;
  43610. } wmi_vdev_oob_connection_resp_event_fixed_param;
  43611. typedef enum {
  43612. WMI_AUDIO_TRANSPORT_SWITCH_STATUS_FAIL = 0,
  43613. WMI_AUDIO_TRANSPORT_SWITCH_STATUS_SUCCESS,
  43614. WMI_AUDIO_TRANSPORT_SWITCH_STATUS_TIMEOUT,
  43615. } WMI_AUDIO_TRANSPORT_SWITCH_RESPONSE_STATUS;
  43616. typedef enum {
  43617. WMI_AUDIO_TRANSPORT_SWITCH_TYPE_NON_WLAN = 0,
  43618. WMI_AUDIO_TRANSPORT_SWITCH_TYPE_WLAN = 1,
  43619. } WMI_AUDIO_TRANSPORT_SWITCH_TYPE;
  43620. typedef struct {
  43621. /** TLV tag and len; tag equals
  43622. * WMITLV_TAG_STRUC_wmi_audio_transport_switch_type_event_fixed_param */
  43623. A_UINT32 tlv_header;
  43624. /** This indicates whether FW is requesting for switch to WLAN(XPAN) or non-WLAN(BLE) */
  43625. A_UINT32 switch_type; /*see definition of WMI_AUDIO_TRANSPORT_SWITCH_TYPE */
  43626. } wmi_audio_transport_switch_type_event_fixed_param;
  43627. typedef struct {
  43628. /** TLV tag and len; tag equals
  43629. * WMITLV_TAG_STRUC_wmi_audio_transport_switch_resp_status_cmd_fixed_param */
  43630. A_UINT32 tlv_header;
  43631. /** This indicates whether switch response status is success, fail, timeout */
  43632. A_UINT32 switch_response_status; /* see definition of WMI_AUDIO_TRANSPORT_SWITCH_RESPONSE_STATUS */
  43633. /** This indicates for which switch type (WLAN(XPAN) or non-WLAN(BLE)) the switch response status is intended to */
  43634. A_UINT32 switch_type; /* see definition of WMI_AUDIO_TRANSPORT_SWITCH_TYPE */
  43635. } wmi_audio_transport_switch_resp_status_cmd_fixed_param;
  43636. enum wmi_wifi_radar_cmd {
  43637. wmi_wifi_radar_capture_disable,
  43638. wmi_wifi_radar_capture_enable,
  43639. wmi_wifi_radar_rx_cal,
  43640. wmi_wifi_radar_tx_cal,
  43641. wmi_wifi_radar_cmd_max = 0xff
  43642. };
  43643. typedef struct {
  43644. /** TLV tag and len; tag equals
  43645. * WMITLV_TAG_STRUC_wmi_pdev_enable_wifi_radar_cmd_fixed_param
  43646. */
  43647. A_UINT32 tlv_header;
  43648. /* host pdev id */
  43649. A_UINT32 pdev_id;
  43650. /* tx_chain_mask:
  43651. * tx chain mask to use for wifi radar tx.
  43652. * Only one chain is supposed to be set.
  43653. */
  43654. A_UINT32 tx_chain_mask;
  43655. /* rx chain mask for wifi radar capture. Can have multiple bits set. */
  43656. A_UINT32 rx_chain_mask;
  43657. /* number of LTFs to send for capture */
  43658. A_UINT32 num_ltf_tx;
  43659. /* number of extra LTFs that are to be skipped for accumulation */
  43660. A_UINT32 num_skip_ltf_rx;
  43661. /* number of LTFs to use for accumulation. Must be power of 2. */
  43662. A_UINT32 num_ltf_accumulation;
  43663. /* bandwidth to use for capture
  43664. * 0 = 20 MHz
  43665. * 1 = 40 MHz
  43666. * 2 = 80 MHz
  43667. * 3 = 160 MHz
  43668. * 4 = 320 MHz
  43669. */
  43670. A_UINT32 bw;
  43671. /* enum wmi_wifi_radar_cmd */
  43672. A_UINT32 capture_calibrate;
  43673. /* periodicity of capture in milliseconds */
  43674. A_UINT32 capture_interval_ms;
  43675. } wmi_pdev_enable_wifi_radar_cmd_fixed_param;
  43676. #define WMI_PDEV_WIFI_RADAR_CAL_COMPLETION_STATUS_GET(cal_status_array, txchnIdx, rxchnIdx) WMI_GET_BITS(*(cal_status_array + txchnIdx), rxchnIdx, 1)
  43677. #define WMI_PDEV_WIFI_RADAR_CAL_COMPLETION_STATUS_SET(cal_status_array, txchnIdx, rxchnIdx, value) WMI_SET_BITS(*(cal_status_array + txchnIdx), rxchnIdx, 1, value)
  43678. typedef struct {
  43679. /** TLV tag and len; tag equals
  43680. * WMITLV_TAG_STRUC_wmi_wifi_radar_cal_configuration
  43681. */
  43682. A_UINT32 tlv_header;
  43683. /* ID of pdev for which the calibration is completed */
  43684. A_UINT32 pdev_id;
  43685. /* Packet bandwidth of WiFi Radar packet used for calibration
  43686. * 0 = 20 MHz
  43687. * 1 = 40 MHz
  43688. * 2 = 80 MHz
  43689. * 3 = 160 MHz
  43690. * 4 = 320 MHz
  43691. */
  43692. A_UINT32 wifi_radar_pkt_bw;
  43693. /* Channel bandwidth
  43694. * 0 = 20 MHz
  43695. * 1 = 40 MHz
  43696. * 2 = 80 MHz
  43697. * 3 = 160 MHz
  43698. * 4 = 320 MHz
  43699. */
  43700. A_UINT32 channel_bw;
  43701. /* Channel Center frequency in MHz */
  43702. A_UINT32 band_center_freq;
  43703. /* Number of LTF configured in the WiFi Radar Tx packet during calibration */
  43704. A_UINT32 num_ltf_tx;
  43705. /* Number of LTF skipped during Rx of the calibration packet */
  43706. A_UINT32 num_skip_ltf_rx;
  43707. /* Number of LTF accumulated during Rx of the calibration packet */
  43708. A_UINT32 num_ltf_accumulation;
  43709. /* Calibration status for each chain combination
  43710. * Word 0: tx chain 0 cal statuses:
  43711. * Bit 0: rx chain 0 cal status
  43712. * Bit 1: rx chain 1 cal status
  43713. * etc.
  43714. * Word 1: tx chain 1 cal statuses:
  43715. * Bit 0: rx chain 0 cal status
  43716. * Bit 1: rx chain 1 cal status
  43717. * etc.
  43718. * etc.
  43719. * Cal status values: success = 1, Failure = 0
  43720. */
  43721. A_UINT32 per_chain_cal_status[WMI_MAX_CHAINS];
  43722. } wmi_pdev_wifi_radar_cal_completion_status_event_param;
  43723. typedef struct {
  43724. /* WMITLV_TAG_STRUC_wmi_pdev_enable_xlna_cmd_fixed_param */
  43725. A_UINT32 tlv_header;
  43726. /* ID of pdev for which the xLNA needs to be configured */
  43727. A_UINT32 pdev_id;
  43728. /* 1 - Enable, 0 - Disable */
  43729. A_UINT32 xLNA_enable;
  43730. } wmi_pdev_enable_xlna_cmd_fixed_param;
  43731. typedef struct {
  43732. /* WMITLV_TAG_STRUC_wmi_pdev_enable_xlna_event_fixed_param */
  43733. A_UINT32 tlv_header;
  43734. /* to identify for which pdev the response is received */
  43735. A_UINT32 pdev_id;
  43736. /* Return status: 0 - Success, else - Failure */
  43737. A_UINT32 status;
  43738. } wmi_pdev_enable_xlna_event_fixed_param;
  43739. /**
  43740. * bits 0-15 are used for non interative traffic types like video streaming,
  43741. * or ping
  43742. * bit 16-31 are reserved for interactive traffic types like gaming, VoIP,
  43743. * or video conferencing
  43744. */
  43745. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_STREAMING_M 0x00000001
  43746. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_STREAMING_S 0
  43747. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_PING_M 0x00000002
  43748. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_PING_S 1
  43749. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_BACKGROUND_M 0x00000004
  43750. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_BACKGROUND_S 2
  43751. /* bits 3-15 are reserved for new non-interactive traffic types */
  43752. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_GAMING_M 0x00010000
  43753. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_GAMING_S 16
  43754. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VOIP_M 0x00020000
  43755. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VOIP_S 17
  43756. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VIDEO_CONF_M 0x00040000
  43757. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VIDEO_CONF_S 18
  43758. /* bits 19-31 are reserved for new interactive traffic types */
  43759. typedef struct {
  43760. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_active_traffic_map_cmd_fixed_param */
  43761. A_UINT32 vdev_id;
  43762. wmi_mac_addr peer_macaddr; /* peer MAC address */
  43763. /* active_traffic_map:
  43764. * This field is a bitmap showing traffic types known to be currently
  43765. * present within the vdev.
  43766. * Refer to the WMI_PEER_ACTIVE_TRAFFIC_ definitions that specify which
  43767. * bits within the bitmap correspond to which traffic types.
  43768. */
  43769. A_UINT32 active_traffic_map;
  43770. } wmi_peer_active_traffic_map_cmd_fixed_param;
  43771. /*
  43772. * WMI_REQUEST_OPM_STATS_CMDID triggered by host to collect OPM stats for trafic types identified by STC
  43773. * in respose this FW will send OEM_respose_event_id WMI_OEM_DATA_CMD_OPM_STATS
  43774. *
  43775. */
  43776. typedef struct {
  43777. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_opm_stats_cmd_fixed_param */
  43778. A_UINT32 pdev_id; /** pdev_id for identifying the MAC */
  43779. } wmi_request_opm_stats_cmd_fixed_param;
  43780. /* wmi command to suspend SAP vdev */
  43781. typedef struct {
  43782. /** TLV tag and len; tag equals
  43783. * WMITLV_TAG_STRUC_wmi_set_ap_suspend_resume_cmd_fixed_param */
  43784. A_UINT32 tlv_header;
  43785. /* VDEV identifier */
  43786. A_UINT32 vdev_id; /* If 0xFF, find vdevs corresponding to MLD MAC address */
  43787. wmi_mac_addr mld_mac_address; /* MLD MAC address */
  43788. A_UINT32 is_ap_suspend; /* 1 = suspend, 0 = resume */
  43789. } wmi_set_ap_suspend_resume_fixed_param;
  43790. typedef struct {
  43791. /** TLV tag and len; tag equals
  43792. * WMITLV_TAG_STRUC_wmi_mgmt_srng_reap_event_fixed_param */
  43793. A_UINT32 tlv_header;
  43794. /** timestamp_tp_update_ms:
  43795. * This indicates the last time the tail pointer was updated by FW
  43796. * after filling MGMT SRNG entry.
  43797. * The timestamp is from the FW CPU's internal clock, in milliseconds units.
  43798. */
  43799. A_UINT32 timestamp_tp_update_ms;
  43800. /** This indicates the position of the tail pointer as last updated by FW */
  43801. A_UINT32 tail_pointer;
  43802. } wmi_mgmt_srng_reap_event_fixed_param;
  43803. typedef struct {
  43804. /** TLV tag and len; tag equals
  43805. * WMITLV_TAG_STRUC_wmi_mlo_peer_tid_to_link_map_event_fixed_param */
  43806. A_UINT32 tlv_header;
  43807. /* status takes values from WMI_MLO_TID_TO_LINK_MAP_STATUS */
  43808. A_UINT32 status;
  43809. } wmi_mlo_peer_tid_to_link_map_event_fixed_param;
  43810. /* ADD NEW DEFS HERE */
  43811. // {
  43812. /*****************************************************************************
  43813. * The following structures are deprecated. DO NOT USE THEM!
  43814. */
  43815. /** Max number of channels in the schedule. */
  43816. #define OCB_CHANNEL_MAX (5)
  43817. /* NOTE: Make sure these data structures are identical to those
  43818. * defined in sirApi.h */
  43819. typedef struct
  43820. {
  43821. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  43822. A_UINT32 aifsn;
  43823. /** Contention Window minimum. Range: 1 - 10 */
  43824. A_UINT32 cwmin;
  43825. /** Contention Window maximum. Range: 1 - 10 */
  43826. A_UINT32 cwmax;
  43827. } wmi_qos_params_t;
  43828. typedef struct {
  43829. A_UINT32 tlv_header;
  43830. A_UINT32 vdev_id;
  43831. A_UINT32 tidmap; /* Bitmap specifying the TIDs for which prohibit would be set/unset */
  43832. A_UINT32 prohibit_enable; /* 0 for Disable, 1 for Enable */
  43833. } wmi_vdev_param_enable_sr_prohibit_fixed_param;
  43834. typedef struct
  43835. {
  43836. /** Channel frequency in MHz */
  43837. A_UINT32 chan_freq;
  43838. /** Channel duration in ms */
  43839. A_UINT32 duration;
  43840. /** Start guard interval in ms */
  43841. A_UINT32 start_guard_interval;
  43842. /** End guard interval in ms */
  43843. A_UINT32 end_guard_interval;
  43844. /** Transmit power in dBm, range 0 - 23 */
  43845. A_UINT32 tx_power;
  43846. /** Transmit datarate in Mbps */
  43847. A_UINT32 tx_rate;
  43848. /** QoS parameters for each AC */
  43849. wmi_qos_params_t qos_params[WLAN_MAX_AC];
  43850. /** 1 to enable RX stats for this channel, 0 otherwise */
  43851. A_UINT32 rx_stats;
  43852. } wmi_ocb_channel_t;
  43853. typedef struct {
  43854. /** TLV tag and len; tag equals
  43855. * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
  43856. A_UINT32 tlv_header;
  43857. /* VDEV identifier */
  43858. A_UINT32 vdev_id;
  43859. /** Number of valid channels in the channels array */
  43860. A_UINT32 num_channels;
  43861. /** The array of channels */
  43862. wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
  43863. /** 1 to allow off-channel tx, 0 otherwise */
  43864. A_UINT32 off_channel_tx; /* Not supported */
  43865. } wmi_ocb_set_sched_cmd_fixed_param;
  43866. typedef struct {
  43867. /** Return status. 0 for success, non-zero otherwise */
  43868. A_UINT32 status;
  43869. } wmi_ocb_set_sched_event_fixed_param;
  43870. /*****************************************************************************
  43871. * END DEPRECATED
  43872. */
  43873. // }
  43874. /* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
  43875. #ifdef __cplusplus
  43876. }
  43877. #endif
  43878. #endif /*_WMI_UNIFIED_H_*/
  43879. /**@}*/