wmi_unified.h 2.0 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194451954519645197451984519945200452014520245203452044520545206452074520845209452104521145212452134521445215452164521745218452194522045221452224522345224452254522645227452284522945230452314523245233452344523545236452374523845239452404524145242452434524445245452464524745248452494525045251452524525345254452554525645257452584525945260452614526245263452644526545266452674526845269452704527145272452734527445275452764527745278452794528045281452824528345284452854528645287452884528945290452914529245293452944529545296452974529845299453004530145302453034530445305453064530745308453094531045311453124531345314453154531645317453184531945320453214532245323453244532545326453274532845329453304533145332453334533445335453364533745338453394534045341453424534345344453454534645347453484534945350453514535245353453544535545356453574535845359453604536145362453634536445365453664536745368453694537045371453724537345374453754537645377453784537945380453814538245383453844538545386453874538845389453904539145392453934539445395453964539745398453994540045401454024540345404454054540645407454084540945410454114541245413454144541545416454174541845419454204542145422454234542445425454264542745428454294543045431454324543345434454354543645437454384543945440454414544245443454444544545446454474544845449454504545145452454534545445455454564545745458454594546045461454624546345464454654546645467454684546945470454714547245473454744547545476454774547845479454804548145482454834548445485454864548745488454894549045491454924549345494454954549645497454984549945500455014550245503455044550545506455074550845509455104551145512455134551445515455164551745518455194552045521455224552345524455254552645527455284552945530455314553245533455344553545536455374553845539455404554145542455434554445545455464554745548455494555045551455524555345554455554555645557455584555945560455614556245563455644556545566455674556845569455704557145572455734557445575455764557745578455794558045581455824558345584455854558645587455884558945590455914559245593455944559545596455974559845599456004560145602456034560445605456064560745608456094561045611456124561345614456154561645617456184561945620456214562245623456244562545626456274562845629456304563145632456334563445635456364563745638456394564045641456424564345644456454564645647456484564945650456514565245653456544565545656456574565845659456604566145662456634566445665456664566745668456694567045671456724567345674456754567645677456784567945680456814568245683456844568545686456874568845689456904569145692456934569445695456964569745698456994570045701457024570345704457054570645707457084570945710457114571245713457144571545716457174571845719457204572145722457234572445725457264572745728457294573045731457324573345734457354573645737457384573945740457414574245743457444574545746457474574845749457504575145752457534575445755457564575745758457594576045761457624576345764457654576645767457684576945770457714577245773457744577545776457774577845779457804578145782457834578445785457864578745788457894579045791457924579345794457954579645797457984579945800458014580245803458044580545806458074580845809458104581145812458134581445815458164581745818458194582045821458224582345824458254582645827458284582945830458314583245833458344583545836458374583845839458404584145842458434584445845458464584745848458494585045851458524585345854458554585645857458584585945860458614586245863458644586545866458674586845869458704587145872458734587445875458764587745878458794588045881458824588345884458854588645887458884588945890458914589245893458944589545896458974589845899459004590145902459034590445905459064590745908459094591045911459124591345914459154591645917459184591945920459214592245923459244592545926459274592845929459304593145932459334593445935459364593745938459394594045941459424594345944459454594645947459484594945950459514595245953459544595545956459574595845959459604596145962459634596445965459664596745968459694597045971459724597345974459754597645977459784597945980459814598245983459844598545986459874598845989459904599145992459934599445995459964599745998459994600046001460024600346004460054600646007460084600946010460114601246013460144601546016460174601846019460204602146022460234602446025460264602746028460294603046031460324603346034460354603646037460384603946040460414604246043460444604546046460474604846049460504605146052460534605446055460564605746058460594606046061460624606346064460654606646067460684606946070460714607246073460744607546076460774607846079460804608146082460834608446085460864608746088460894609046091460924609346094460954609646097460984609946100461014610246103461044610546106461074610846109461104611146112461134611446115461164611746118461194612046121461224612346124461254612646127461284612946130461314613246133461344613546136461374613846139461404614146142461434614446145461464614746148461494615046151461524615346154461554615646157461584615946160461614616246163461644616546166461674616846169461704617146172461734617446175461764617746178461794618046181461824618346184461854618646187461884618946190461914619246193461944619546196461974619846199462004620146202462034620446205462064620746208462094621046211462124621346214462154621646217462184621946220462214622246223462244622546226462274622846229462304623146232462334623446235462364623746238462394624046241462424624346244462454624646247462484624946250462514625246253462544625546256462574625846259462604626146262462634626446265462664626746268462694627046271462724627346274462754627646277462784627946280462814628246283462844628546286462874628846289462904629146292462934629446295462964629746298462994630046301463024630346304463054630646307463084630946310463114631246313463144631546316463174631846319463204632146322463234632446325463264632746328463294633046331463324633346334463354633646337463384633946340463414634246343463444634546346463474634846349463504635146352463534635446355463564635746358463594636046361463624636346364463654636646367463684636946370463714637246373463744637546376463774637846379463804638146382463834638446385463864638746388463894639046391463924639346394463954639646397463984639946400464014640246403464044640546406464074640846409464104641146412464134641446415464164641746418464194642046421464224642346424464254642646427464284642946430464314643246433464344643546436464374643846439464404644146442464434644446445464464644746448464494645046451464524645346454464554645646457464584645946460464614646246463464644646546466464674646846469464704647146472464734647446475464764647746478464794648046481464824648346484464854648646487464884648946490464914649246493464944649546496464974649846499465004650146502465034650446505465064650746508465094651046511465124651346514465154651646517465184651946520465214652246523465244652546526465274652846529465304653146532465334653446535465364653746538465394654046541465424654346544465454654646547465484654946550465514655246553465544655546556465574655846559465604656146562465634656446565465664656746568465694657046571465724657346574465754657646577465784657946580465814658246583465844658546586465874658846589465904659146592465934659446595465964659746598465994660046601466024660346604466054660646607466084660946610466114661246613466144661546616466174661846619466204662146622466234662446625466264662746628466294663046631466324663346634466354663646637466384663946640466414664246643466444664546646466474664846649466504665146652466534665446655466564665746658466594666046661466624666346664466654666646667466684666946670466714667246673466744667546676466774667846679466804668146682466834668446685466864668746688466894669046691466924669346694466954669646697466984669946700467014670246703467044670546706467074670846709467104671146712467134671446715467164671746718467194672046721467224672346724467254672646727467284672946730467314673246733467344673546736467374673846739467404674146742467434674446745467464674746748467494675046751467524675346754467554675646757467584675946760467614676246763467644676546766467674676846769467704677146772467734677446775467764677746778467794678046781467824678346784467854678646787467884678946790467914679246793467944679546796467974679846799468004680146802468034680446805468064680746808468094681046811468124681346814468154681646817468184681946820468214682246823468244682546826468274682846829468304683146832468334683446835468364683746838468394684046841468424684346844468454684646847468484684946850468514685246853468544685546856468574685846859468604686146862468634686446865468664686746868468694687046871468724687346874468754687646877468784687946880468814688246883468844688546886468874688846889468904689146892468934689446895468964689746898468994690046901469024690346904469054690646907469084690946910469114691246913469144691546916469174691846919469204692146922469234692446925469264692746928469294693046931469324693346934469354693646937469384693946940469414694246943469444694546946469474694846949469504695146952469534695446955469564695746958469594696046961469624696346964469654696646967469684696946970469714697246973469744697546976469774697846979469804698146982469834698446985469864698746988469894699046991469924699346994469954699646997469984699947000470014700247003470044700547006470074700847009470104701147012470134701447015470164701747018470194702047021470224702347024470254702647027470284702947030470314703247033470344703547036470374703847039470404704147042470434704447045470464704747048470494705047051470524705347054470554705647057470584705947060470614706247063470644706547066470674706847069470704707147072470734707447075470764707747078470794708047081470824708347084470854708647087470884708947090470914709247093470944709547096470974709847099471004710147102471034710447105471064710747108471094711047111471124711347114471154711647117471184711947120471214712247123471244712547126471274712847129471304713147132471334713447135471364713747138471394714047141471424714347144471454714647147471484714947150471514715247153471544715547156471574715847159471604716147162471634716447165471664716747168471694717047171471724717347174471754717647177471784717947180471814718247183471844718547186471874718847189471904719147192471934719447195471964719747198471994720047201472024720347204472054720647207472084720947210472114721247213472144721547216472174721847219472204722147222472234722447225472264722747228472294723047231472324723347234472354723647237472384723947240472414724247243472444724547246472474724847249472504725147252472534725447255472564725747258472594726047261472624726347264472654726647267472684726947270472714727247273472744727547276472774727847279472804728147282472834728447285472864728747288472894729047291472924729347294472954729647297472984729947300473014730247303473044730547306473074730847309473104731147312473134731447315473164731747318473194732047321473224732347324473254732647327473284732947330473314733247333473344733547336473374733847339473404734147342473434734447345473464734747348473494735047351473524735347354473554735647357473584735947360473614736247363473644736547366473674736847369473704737147372473734737447375473764737747378473794738047381473824738347384473854738647387473884738947390473914739247393473944739547396473974739847399474004740147402474034740447405474064740747408474094741047411474124741347414474154741647417474184741947420474214742247423474244742547426474274742847429474304743147432474334743447435474364743747438474394744047441474424744347444474454744647447474484744947450474514745247453474544745547456474574745847459474604746147462474634746447465474664746747468474694747047471474724747347474474754747647477474784747947480474814748247483474844748547486474874748847489474904749147492474934749447495474964749747498474994750047501475024750347504475054750647507475084750947510475114751247513475144751547516475174751847519475204752147522475234752447525475264752747528475294753047531475324753347534475354753647537475384753947540475414754247543475444754547546475474754847549475504755147552475534755447555475564755747558475594756047561475624756347564475654756647567475684756947570475714757247573475744757547576475774757847579475804758147582475834758447585475864758747588475894759047591475924759347594475954759647597475984759947600476014760247603476044760547606476074760847609476104761147612476134761447615476164761747618476194762047621476224762347624476254762647627476284762947630476314763247633476344763547636476374763847639476404764147642476434764447645476464764747648476494765047651476524765347654476554765647657476584765947660476614766247663476644766547666476674766847669476704767147672476734767447675476764767747678476794768047681476824768347684476854768647687476884768947690476914769247693476944769547696476974769847699477004770147702477034770447705477064770747708477094771047711477124771347714477154771647717477184771947720477214772247723477244772547726477274772847729477304773147732477334773447735477364773747738477394774047741477424774347744477454774647747477484774947750477514775247753477544775547756477574775847759477604776147762477634776447765477664776747768477694777047771477724777347774477754777647777477784777947780477814778247783477844778547786477874778847789477904779147792477934779447795477964779747798477994780047801478024780347804478054780647807478084780947810478114781247813478144781547816478174781847819478204782147822478234782447825478264782747828478294783047831478324783347834478354783647837478384783947840478414784247843478444784547846478474784847849478504785147852478534785447855478564785747858478594786047861478624786347864478654786647867478684786947870478714787247873478744787547876478774787847879478804788147882478834788447885478864788747888478894789047891478924789347894478954789647897478984789947900479014790247903479044790547906479074790847909479104791147912479134791447915479164791747918479194792047921479224792347924479254792647927479284792947930479314793247933479344793547936479374793847939479404794147942479434794447945479464794747948479494795047951479524795347954479554795647957479584795947960479614796247963479644796547966479674796847969479704797147972479734797447975479764797747978479794798047981479824798347984479854798647987479884798947990479914799247993479944799547996479974799847999480004800148002480034800448005480064800748008480094801048011480124801348014480154801648017480184801948020480214802248023480244802548026480274802848029480304803148032480334803448035480364803748038480394804048041480424804348044480454804648047480484804948050480514805248053480544805548056480574805848059480604806148062480634806448065480664806748068480694807048071480724807348074480754807648077480784807948080480814808248083480844808548086480874808848089480904809148092480934809448095480964809748098480994810048101481024810348104481054810648107481084810948110481114811248113481144811548116481174811848119481204812148122481234812448125481264812748128481294813048131481324813348134481354813648137481384813948140481414814248143481444814548146481474814848149481504815148152481534815448155481564815748158481594816048161481624816348164481654816648167481684816948170481714817248173481744817548176481774817848179481804818148182481834818448185481864818748188481894819048191481924819348194481954819648197481984819948200482014820248203482044820548206482074820848209482104821148212482134821448215482164821748218482194822048221482224822348224482254822648227482284822948230482314823248233482344823548236482374823848239482404824148242482434824448245482464824748248482494825048251482524825348254482554825648257482584825948260482614826248263482644826548266482674826848269482704827148272482734827448275482764827748278482794828048281482824828348284482854828648287482884828948290482914829248293482944829548296482974829848299483004830148302483034830448305483064830748308483094831048311483124831348314483154831648317483184831948320483214832248323483244832548326483274832848329483304833148332483334833448335483364833748338483394834048341483424834348344483454834648347483484834948350483514835248353483544835548356483574835848359483604836148362483634836448365483664836748368483694837048371483724837348374483754837648377483784837948380483814838248383483844838548386483874838848389483904839148392483934839448395483964839748398483994840048401484024840348404484054840648407484084840948410484114841248413484144841548416484174841848419484204842148422484234842448425484264842748428484294843048431484324843348434484354843648437484384843948440484414844248443484444844548446484474844848449484504845148452484534845448455484564845748458484594846048461484624846348464484654846648467484684846948470484714847248473484744847548476484774847848479484804848148482484834848448485484864848748488484894849048491484924849348494484954849648497484984849948500485014850248503485044850548506485074850848509485104851148512485134851448515485164851748518485194852048521485224852348524485254852648527485284852948530485314853248533485344853548536485374853848539485404854148542485434854448545485464854748548485494855048551485524855348554485554855648557485584855948560485614856248563485644856548566485674856848569485704857148572485734857448575485764857748578485794858048581485824858348584485854858648587485884858948590485914859248593485944859548596485974859848599486004860148602486034860448605486064860748608486094861048611486124861348614486154861648617486184861948620486214862248623486244862548626486274862848629486304863148632486334863448635486364863748638486394864048641486424864348644486454864648647486484864948650486514865248653486544865548656486574865848659486604866148662486634866448665486664866748668486694867048671486724867348674486754867648677486784867948680486814868248683486844868548686486874868848689486904869148692486934869448695486964869748698486994870048701487024870348704487054870648707487084870948710487114871248713487144871548716487174871848719487204872148722487234872448725487264872748728487294873048731487324873348734487354873648737487384873948740487414874248743487444874548746487474874848749487504875148752487534875448755487564875748758487594876048761487624876348764487654876648767487684876948770487714877248773487744877548776487774877848779487804878148782487834878448785487864878748788487894879048791487924879348794487954879648797487984879948800488014880248803488044880548806488074880848809488104881148812488134881448815488164881748818488194882048821488224882348824488254882648827488284882948830488314883248833488344883548836488374883848839488404884148842488434884448845488464884748848488494885048851
  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. /*
  230. * The below function declarations are for implementations on some
  231. * platforms of the above macros, but in function form, to save code
  232. * memory by avoiding macro-inlining of a non-trivial amount of code.
  233. * These function versions of the above macros may not be available
  234. * on all host and target platforms.
  235. */
  236. void wmi_mac_addr_to_char_array(wmi_mac_addr *pwmi_mac_addr, A_UINT8 *c_macaddr);
  237. void wmi_char_array_to_mac_addr(A_UINT8 *c_macaddr, wmi_mac_addr *pwmi_mac_addr);
  238. /*
  239. * wmi command groups.
  240. */
  241. typedef enum {
  242. /* 0 to 2 are reserved */
  243. WMI_GRP_START = 0x3,
  244. WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
  245. WMI_GRP_PDEV, /* 0x4 */
  246. WMI_GRP_VDEV, /* 0x5 */
  247. WMI_GRP_PEER, /* 0x6 */
  248. WMI_GRP_MGMT, /* 0x7 */
  249. WMI_GRP_BA_NEG, /* 0x8 */
  250. WMI_GRP_STA_PS, /* 0x9 */
  251. WMI_GRP_DFS, /* 0xa */
  252. WMI_GRP_ROAM, /* 0xb */
  253. WMI_GRP_OFL_SCAN, /* 0xc */
  254. WMI_GRP_P2P, /* 0xd */
  255. WMI_GRP_AP_PS, /* 0xe */
  256. WMI_GRP_RATE_CTRL, /* 0xf */
  257. WMI_GRP_PROFILE, /* 0x10 */
  258. WMI_GRP_SUSPEND, /* 0x11 */
  259. WMI_GRP_BCN_FILTER, /* 0x12 */
  260. WMI_GRP_WOW, /* 0x13 */
  261. WMI_GRP_RTT, /* 0x14 */
  262. WMI_GRP_SPECTRAL, /* 0x15 */
  263. WMI_GRP_STATS, /* 0x16 */
  264. WMI_GRP_ARP_NS_OFL, /* 0x17 */
  265. WMI_GRP_NLO_OFL, /* 0x18 */
  266. WMI_GRP_GTK_OFL, /* 0x19 */
  267. WMI_GRP_CSA_OFL, /* 0x1a */
  268. WMI_GRP_CHATTER, /* 0x1b */
  269. WMI_GRP_TID_ADDBA, /* 0x1c */
  270. WMI_GRP_MISC, /* 0x1d */
  271. WMI_GRP_GPIO, /* 0x1e */
  272. WMI_GRP_FWTEST, /* 0x1f */
  273. WMI_GRP_TDLS, /* 0x20 */
  274. WMI_GRP_RESMGR, /* 0x21 */
  275. WMI_GRP_STA_SMPS, /* 0x22 */
  276. WMI_GRP_WLAN_HB, /* 0x23 */
  277. WMI_GRP_RMC, /* 0x24 */
  278. WMI_GRP_MHF_OFL, /* 0x25 */
  279. WMI_GRP_LOCATION_SCAN, /* 0x26 */
  280. WMI_GRP_OEM, /* 0x27 */
  281. WMI_GRP_NAN, /* 0x28 */
  282. WMI_GRP_COEX, /* 0x29 */
  283. WMI_GRP_OBSS_OFL, /* 0x2a */
  284. WMI_GRP_LPI, /* 0x2b */
  285. WMI_GRP_EXTSCAN, /* 0x2c */
  286. WMI_GRP_DHCP_OFL, /* 0x2d */
  287. WMI_GRP_IPA, /* 0x2e */
  288. WMI_GRP_MDNS_OFL, /* 0x2f */
  289. WMI_GRP_SAP_OFL, /* 0x30 */
  290. WMI_GRP_OCB, /* 0x31 */
  291. WMI_GRP_SOC, /* 0x32 */
  292. WMI_GRP_PKT_FILTER, /* 0x33 */
  293. WMI_GRP_MAWC, /* 0x34 */
  294. WMI_GRP_PMF_OFFLOAD, /* 0x35 */
  295. WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
  296. WMI_GRP_NAN_DATA, /* 0x37 */
  297. WMI_GRP_PROTOTYPE, /* 0x38 */
  298. WMI_GRP_MONITOR, /* 0x39 */
  299. WMI_GRP_REGULATORY, /* 0x3a */
  300. WMI_GRP_HW_DATA_FILTER, /* 0x3b */
  301. WMI_GRP_WLM, /* 0x3c WLAN Latency Manager */
  302. WMI_GRP_11K_OFFLOAD, /* 0x3d */
  303. WMI_GRP_TWT, /* 0x3e TWT (Target Wake Time) for STA and AP */
  304. WMI_GRP_MOTION_DET, /* 0x3f */
  305. WMI_GRP_SPATIAL_REUSE, /* 0x40 */
  306. WMI_GRP_ESP, /* 0x41 Estimate Service Parameters (802.11mc) */
  307. WMI_GRP_HPCS_PULSE, /* 0x42 */
  308. WMI_GRP_AUDIO, /* 0x43 */
  309. WMI_GRP_CFR_CAPTURE, /* 0x44 */
  310. WMI_GRP_ATM, /* 0x45 ATM (Air Time Management group) */
  311. WMI_GRP_VENDOR, /* 0x46 vendor specific group */
  312. WMI_GRP_LATENCY, /* 0x47 TID/AC level latency config */
  313. WMI_GRP_MLO, /* 0x48 MLO(Multiple Link Operation) management */
  314. WMI_GRP_SAWF, /* 0x49 SAWF (Service Aware WiFi) */
  315. WMI_GRP_QUIET_OFL, /* 0x4a Quiet offloads */
  316. WMI_GRP_ODD, /* 0x4b ODD */
  317. WMI_GRP_TDMA, /* 0x4c TDMA */
  318. WMI_GRP_MANUAL_UL_TRIG /* 0x4d Manual UL OFDMA Trigger */
  319. } WMI_GRP_ID;
  320. #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  321. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  322. /**
  323. * Command IDs and commange events
  324. */
  325. typedef enum {
  326. /** initialize the wlan sub system */
  327. WMI_INIT_CMDID = 0x1,
  328. /* Scan specific commands */
  329. /** start scan request to FW */
  330. WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
  331. /** stop scan request to FW */
  332. WMI_STOP_SCAN_CMDID,
  333. /** full list of channels as defined by the regulatory that will be used by scanner */
  334. WMI_SCAN_CHAN_LIST_CMDID,
  335. /** overwrite default priority table in scan scheduler */
  336. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  337. /** This command to adjust the priority and min.max_rest_time
  338. * of an on ongoing scan request.
  339. */
  340. WMI_SCAN_UPDATE_REQUEST_CMDID,
  341. /** set OUI to be used in probe request if enabled */
  342. WMI_SCAN_PROB_REQ_OUI_CMDID,
  343. /** config adaptive dwell scan */
  344. WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
  345. /** Only applicable to DBS capable product */
  346. WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID,
  347. /* PDEV(physical device) specific commands */
  348. /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
  349. WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
  350. /** set channel. mainly used for supporting monitor mode */
  351. WMI_PDEV_SET_CHANNEL_CMDID,
  352. /** set pdev specific parameters */
  353. WMI_PDEV_SET_PARAM_CMDID,
  354. /** enable packet log */
  355. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  356. /** disable packet log*/
  357. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  358. /** set wmm parameters */
  359. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  360. /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
  361. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  362. /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
  363. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  364. /** Command to send the DSCP-to-TID map to the target */
  365. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  366. /** set quiet ie parameters. primarily used in AP mode */
  367. WMI_PDEV_SET_QUIET_MODE_CMDID,
  368. /** Enable/Disable Green AP Power Save */
  369. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  370. /** get TPC config for the current operating channel */
  371. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  372. /** set the base MAC address for the physical device before a VDEV is created.
  373. * For firmware that doesn't support this feature and this command, the pdev
  374. * MAC address will not be changed. */
  375. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  376. /* eeprom content dump , the same to bdboard data */
  377. WMI_PDEV_DUMP_CMDID,
  378. /* set LED configuration */
  379. WMI_PDEV_SET_LED_CONFIG_CMDID,
  380. /* Get Current temperature of chip in Celcius degree*/
  381. WMI_PDEV_GET_TEMPERATURE_CMDID,
  382. /* Set LED flashing behavior */
  383. WMI_PDEV_SET_LED_FLASHING_CMDID,
  384. /** Enable/Disable Smart Antenna */
  385. WMI_PDEV_SMART_ANT_ENABLE_CMDID,
  386. /** Set Smart Antenna RX antenna*/
  387. WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  388. /** Override the antenna switch table */
  389. WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  390. /** Override the CTL table */
  391. WMI_PDEV_SET_CTL_TABLE_CMDID,
  392. /** Override the array gain table */
  393. WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  394. /** FIPS test mode command */
  395. WMI_PDEV_FIPS_CMDID,
  396. /** get CCK ANI level */
  397. WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
  398. /** get OFDM ANI level */
  399. WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
  400. /** NF Cal Power dBr/dBm */
  401. WMI_PDEV_GET_NFCAL_POWER_CMDID,
  402. /** TxPPDU TPC */
  403. WMI_PDEV_GET_TPC_CMDID,
  404. /** Set to enable MIB stats collection */
  405. WMI_MIB_STATS_ENABLE_CMDID,
  406. /** Set preferred channel list for DBS Mgr */
  407. WMI_PDEV_SET_PCL_CMDID,
  408. /** Set HW mode. Eg: single MAC, DBS & SBS, see soc_hw_mode_t for values */
  409. WMI_PDEV_SET_HW_MODE_CMDID,
  410. /** Set DFS, SCAN modes and other FW configurations */
  411. WMI_PDEV_SET_MAC_CONFIG_CMDID,
  412. /** Set per band and per pdev antenna chains */
  413. WMI_PDEV_SET_ANTENNA_MODE_CMDID,
  414. /** Periodic channel stats request command */
  415. WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
  416. /** WMI command for power debug framework */
  417. WMI_PDEV_WAL_POWER_DEBUG_CMDID,
  418. /** set per-AC rx reorder timeouts */
  419. WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
  420. /** WMI command for WOW gpio and type */
  421. WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
  422. /* Get current ANT's per chain's RSSI info */
  423. WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
  424. /** WMI command for getting Chip Power Stats */
  425. WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
  426. /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
  427. WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
  428. /** vdev restart request for multiple vdevs */
  429. WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID,
  430. /** Pdev update packet routing command */
  431. WMI_PDEV_UPDATE_PKT_ROUTING_CMDID,
  432. /** Get Calibration data version details */
  433. WMI_PDEV_CHECK_CAL_VERSION_CMDID,
  434. /** Set Diversity Gain */
  435. WMI_PDEV_SET_DIVERSITY_GAIN_CMDID,
  436. /** Get chain RSSI and antena index command */
  437. WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID,
  438. /** get bss chan info */
  439. WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
  440. /** update pmk cache info */
  441. WMI_PDEV_UPDATE_PMK_CACHE_CMDID,
  442. /** update fils HLP */
  443. WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID,
  444. /** update ctltable request **/
  445. WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID,
  446. /** Command to set beacon OUI **/
  447. WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID,
  448. /** enable/disable per-AC tx queue optimizations */
  449. WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID,
  450. /** enable/disable rx promiscuous mode */
  451. WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID,
  452. /* set a generic direct DMA ring config */
  453. WMI_PDEV_DMA_RING_CFG_REQ_CMDID,
  454. /* enable/disable Action frame response as HE TB PPDU */
  455. WMI_PDEV_HE_TB_ACTION_FRM_CMDID,
  456. /** filter packet log based on MAC address */
  457. WMI_PDEV_PKTLOG_FILTER_CMDID,
  458. /** wmi command for setting rogue ap configuration */
  459. WMI_PDEV_SET_RAP_CONFIG_CMDID,
  460. /** Specify DSM filters along with disallow bssid filters */
  461. WMI_PDEV_DSM_FILTER_CMDID,
  462. /** enable/disable periodic frame injection */
  463. WMI_PDEV_FRAME_INJECT_CMDID,
  464. /*
  465. * Pdev level command to:
  466. * a) solicit @WMI_TBTTOFFSET_EXT_UPDATE_EVENTID having TBTT in qtime
  467. * domain for all active vdevs or
  468. * b) update one pdevs tbtt offset to another pdev for use in
  469. * RNR TBTT offset calculation.
  470. */
  471. WMI_PDEV_TBTT_OFFSET_SYNC_CMDID,
  472. /** Bss color bitmap for SRG based spatial reuse feature */
  473. WMI_PDEV_SET_SRG_BSS_COLOR_BITMAP_CMDID,
  474. /** Partial BSSID bitmap for SRG based spatial reuse feature */
  475. WMI_PDEV_SET_SRG_PARTIAL_BSSID_BITMAP_CMDID,
  476. /** OBSS color enable bitmap for SRG based spatial reuse feature */
  477. WMI_PDEV_SET_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID,
  478. /** OBSS BSSID enable bitmap for SRG based spatial reuse feature */
  479. WMI_PDEV_SET_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID,
  480. /** OBSS color enable bitmap for NON_SRG based spatial reuse feature */
  481. WMI_PDEV_SET_NON_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID,
  482. /** OBSS BSSID enable bitmap for NON_SRG based spatial reuse feature */
  483. WMI_PDEV_SET_NON_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID,
  484. /** TPC stats display command */
  485. WMI_PDEV_GET_TPC_STATS_CMDID,
  486. /** ENABLE/DISABLE Duration based tx mode selection */
  487. WMI_PDEV_ENABLE_DURATION_BASED_TX_MODE_SELECTION_CMDID,
  488. /* Get DPD status from HALPHY */
  489. WMI_PDEV_GET_DPD_STATUS_CMDID,
  490. /* Set bios sar table */
  491. WMI_PDEV_SET_BIOS_SAR_TABLE_CMDID,
  492. /* Set bios geo table */
  493. WMI_PDEV_SET_BIOS_GEO_TABLE_CMDID,
  494. /* Get Calibration status from HALPHY */
  495. WMI_PDEV_GET_HALPHY_CAL_STATUS_CMDID,
  496. /* Set HALPHY CAL bitmap */
  497. WMI_PDEV_SET_HALPHY_CAL_BMAP_CMDID,
  498. /* WMI cmd to set a single vdev param for multiple vdevs */
  499. WMI_PDEV_MULTIPLE_VDEV_SET_PARAM_CMDID,
  500. /* Configure MEC AGING TIMER */
  501. WMI_PDEV_MEC_AGING_TIMER_CONFIG_CMDID,
  502. /* Set bios interface table */
  503. WMI_PDEV_SET_BIOS_INTERFACE_CMDID,
  504. WMI_PDEV_FIPS_EXTEND_CMDID,
  505. WMI_PDEV_FIPS_MODE_SET_CMDID,
  506. WMI_PDEV_FEATURESET_CMDID,
  507. /** tag as Filter Pass category and the filters set for FP mode */
  508. WMI_PDEV_MESH_RX_FILTER_ENABLE_CMDID,
  509. /* WMI cmd to set Target rate to power table */
  510. WMI_PDEV_SET_TGTR2P_TABLE_CMDID,
  511. /* WMI cmd to set RF path for PHY */
  512. WMI_PDEV_SET_RF_PATH_CMDID,
  513. /** WSI stats info WMI command */
  514. WMI_PDEV_WSI_STATS_INFO_CMDID,
  515. /*
  516. * WMI cmd to Enable LED blink based on Tx+Rx Data Rate
  517. * and download LED ON/OFF Rate table
  518. */
  519. WMI_PDEV_ENABLE_LED_BLINK_DOWNLOAD_TABLE_CMDID,
  520. /** WMI Command to enable wifi radar */
  521. WMI_PDEV_ENABLE_WIFI_RADAR_CMDID,
  522. /* WMI Command to enable xLNA */
  523. WMI_PDEV_ENABLE_XLNA_CMDID,
  524. /**
  525. * WMI cmd to set custom TX power backoff value per band/chain/MCS to PHY.
  526. */
  527. WMI_PDEV_SET_CUSTOM_TX_POWER_PER_MCS_CMDID,
  528. /* VDEV (virtual device) specific commands */
  529. /** vdev create */
  530. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
  531. /** vdev delete */
  532. WMI_VDEV_DELETE_CMDID,
  533. /** vdev start request */
  534. WMI_VDEV_START_REQUEST_CMDID,
  535. /** vdev restart request (RX only, NO TX, used for CAC period)*/
  536. WMI_VDEV_RESTART_REQUEST_CMDID,
  537. /** vdev up request */
  538. WMI_VDEV_UP_CMDID,
  539. /** vdev stop request */
  540. WMI_VDEV_STOP_CMDID,
  541. /** vdev down request */
  542. WMI_VDEV_DOWN_CMDID,
  543. /* set a vdev param */
  544. WMI_VDEV_SET_PARAM_CMDID,
  545. /* set a key (used for setting per peer unicast and per vdev multicast) */
  546. WMI_VDEV_INSTALL_KEY_CMDID,
  547. /* wnm sleep mode command */
  548. WMI_VDEV_WNM_SLEEPMODE_CMDID,
  549. WMI_VDEV_WMM_ADDTS_CMDID,
  550. WMI_VDEV_WMM_DELTS_CMDID,
  551. WMI_VDEV_SET_WMM_PARAMS_CMDID,
  552. WMI_VDEV_SET_GTX_PARAMS_CMDID,
  553. WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
  554. WMI_VDEV_PLMREQ_START_CMDID,
  555. WMI_VDEV_PLMREQ_STOP_CMDID,
  556. /* TSF timestamp action for specified vdev */
  557. WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
  558. /** set the additional IEs in probe requests for scan or
  559. * assoc req etc for frames FW locally generates */
  560. WMI_VDEV_SET_IE_CMDID,
  561. WMI_VDEV_RATEMASK_CMDID,
  562. /** ATF VDEV REQUEST commands. */
  563. WMI_VDEV_ATF_REQUEST_CMDID,
  564. /** Command to send the DSCP-to-TID map to the target for VAP */
  565. WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
  566. /* Configure filter for Neighbor Rx Pkt (smart mesh selective listening) */
  567. WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
  568. /** set quiet ie parameters. primarily used in AP mode */
  569. WMI_VDEV_SET_QUIET_MODE_CMDID,
  570. /** To set custom aggregation size for per vdev */
  571. WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
  572. /* DISA feature: Encrypt-decrypt data request */
  573. WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID,
  574. /** Command to enable mac randomizaton **/
  575. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID,
  576. /** WMI commands related to dbg arp stats */
  577. WMI_VDEV_SET_ARP_STAT_CMDID,
  578. WMI_VDEV_GET_ARP_STAT_CMDID,
  579. /** get tx power for the current vdev */
  580. WMI_VDEV_GET_TX_POWER_CMDID,
  581. /* limit STA offchannel activity */
  582. WMI_VDEV_LIMIT_OFFCHAN_CMDID,
  583. /** To set custom software retries per-AC for vdev */
  584. WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID,
  585. /** To set chainmask configuration for vdev */
  586. WMI_VDEV_CHAINMASK_CONFIG_CMDID,
  587. WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID,
  588. /* request LTE-Coex info */
  589. WMI_VDEV_GET_MWS_COEX_INFO_CMDID,
  590. /** delete all peer (excluding bss peer) */
  591. WMI_VDEV_DELETE_ALL_PEER_CMDID,
  592. /* To set bss max idle time related parameters */
  593. WMI_VDEV_BSS_MAX_IDLE_TIME_CMDID,
  594. /** Indicates FW to trigger Audio sync */
  595. WMI_VDEV_AUDIO_SYNC_TRIGGER_CMDID,
  596. /** Gives Qtimer value to FW */
  597. WMI_VDEV_AUDIO_SYNC_QTIMER_CMDID,
  598. /** Preferred channel list for each vdev */
  599. WMI_VDEV_SET_PCL_CMDID,
  600. /** VDEV_GET_BIG_DATA_CMD IS DEPRECATED - DO NOT USE */
  601. WMI_VDEV_GET_BIG_DATA_CMDID,
  602. /** Get per vdev BIG DATA stats phase 2 */
  603. WMI_VDEV_GET_BIG_DATA_P2_CMDID,
  604. /** set TPC PSD/non-PSD power */
  605. WMI_VDEV_SET_TPC_POWER_CMDID,
  606. /** IGMP OFFLOAD */
  607. WMI_VDEV_IGMP_OFFLOAD_CMDID,
  608. /** Enable/Disable Intra Bss for each vdev */
  609. WMI_VDEV_ENABLE_DISABLE_INTRA_BSS_CMDID,
  610. /* set vdev mu sniffer param */
  611. WMI_VDEV_SET_MU_SNIF_CMDID,
  612. /** ICMP OFFLOAD */
  613. WMI_VDEV_ICMP_OFFLOAD_CMDID,
  614. /** Update vdev mac address */
  615. WMI_VDEV_UPDATE_MAC_ADDR_CMDID,
  616. /* WMI cmd to perform operation on multiple peer based on subcmd type */
  617. WMI_VDEV_MULTIPLE_PEER_GROUP_CMDID,
  618. /** Set LTF key seed which will be further used to derive LTF keys */
  619. WMI_VDEV_SET_LTF_KEY_SEED_CMDID,
  620. WMI_VDEV_PN_MGMT_RX_FILTER_CMDID,
  621. /** Enable SR prohibit feature for TIDs of vdev */
  622. WMI_VDEV_PARAM_ENABLE_SR_PROHIBIT_CMDID,
  623. /** pause vdev's Tx, Rx, or both for a specific duration */
  624. WMI_VDEV_PAUSE_CMDID,
  625. /** WMI Command to set status of CSA event from HOST */
  626. WMI_CSA_EVENT_STATUS_INDICATION_CMDID,
  627. /** Request to firmware to probe scheduler modes */
  628. WMI_VDEV_SCHED_MODE_PROBE_REQ_CMDID,
  629. /** Connect request on the vdev */
  630. WMI_VDEV_OOB_CONNECTION_REQ_CMDID,
  631. /**
  632. * WMI command to inform the target of the AP's operating bandwidth
  633. * (only applicable for STA vdev)
  634. */
  635. WMI_VDEV_REPORT_AP_OPER_BW_CMDID,
  636. /* peer specific commands */
  637. /** create a peer */
  638. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
  639. /** delete a peer */
  640. WMI_PEER_DELETE_CMDID,
  641. /** flush specific tid queues of a peer */
  642. WMI_PEER_FLUSH_TIDS_CMDID,
  643. /** set a parameter of a peer */
  644. WMI_PEER_SET_PARAM_CMDID,
  645. /** set peer to associated state. will cary all parameters determined during assocication time */
  646. WMI_PEER_ASSOC_CMDID,
  647. /**add a wds (4 address) entry. used only for testing WDS feature on AP products */
  648. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  649. /**remove wds (4 address) entry. used only for testing WDS feature on AP products */
  650. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  651. /** set up mcast group info for multicast to unicast conversion */
  652. WMI_PEER_MCAST_GROUP_CMDID,
  653. /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
  654. WMI_PEER_INFO_REQ_CMDID,
  655. /** request the estimated link speed for the peer. FW shall respond with
  656. * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
  657. */
  658. WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
  659. /** Set the conditions to report peer justified rate to driver
  660. * The justified rate means the user-rate is justified by PER.
  661. */
  662. WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
  663. /** update a wds (4 address) entry */
  664. WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
  665. /** add a proxy sta entry */
  666. WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
  667. /** Set Smart Antenna TX antenna */
  668. WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  669. /** Set Smart Antenna TX train info */
  670. WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  671. /** Set SA node config options */
  672. WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  673. /** ATF PEER REQUEST commands */
  674. WMI_PEER_ATF_REQUEST_CMDID,
  675. /** bandwidth fairness (BWF) peer configuration request command */
  676. WMI_PEER_BWF_REQUEST_CMDID,
  677. /** rx reorder queue setup for peer/tid */
  678. WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  679. /** rx reorder queue remove for peer/tid */
  680. WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
  681. /** specify a limit for rx A-MPDU block size */
  682. WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
  683. /** request peer antdiv info from FW. FW shall respond with PEER_ANTDIV_INFO_EVENTID */
  684. WMI_PEER_ANTDIV_INFO_REQ_CMDID,
  685. /*
  686. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def was originally mistakenly
  687. * placed here, amongst the CMDID defs.
  688. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def has been moved to the
  689. * EVENTID section, but to preserve backwards compatibility, the value
  690. * here that had been used for WMI_PEER_OPER_MODE_CHANGE_EVENTID
  691. * is kept reserved/deprecated.
  692. *
  693. * This WMI_PEER_RESERVED0_CMDID value can be replaced with an actual
  694. * WMI peer event message ID, though it will be simpler to instead add
  695. * new WMI_PEER CMDID defs at the end of the WMI_GRP_PEER WMI_CMD_GRP.
  696. */
  697. WMI_PEER_RESERVED0_CMDID,
  698. /** Peer/Tid/Msduq threshold update */
  699. WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID,
  700. /** TID specific configurations per peer of type
  701. * wmi_peer_tid_configurations_cmd_fixed_param
  702. */
  703. WMI_PEER_TID_CONFIGURATIONS_CMDID,
  704. /** Peer configuration for Channel Frequency Response (CFR) capture
  705. * of type wmi_peer_cfr_capture_cmd.
  706. *
  707. * On targets that do not use the direct DMA framework,
  708. * completion of the CFR capture is communicated through
  709. * HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND.
  710. * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_MSG_TYPE_1
  711. * in WMI Service Ready.
  712. *
  713. * On targets that use direct DMA, completion of CFR capture is
  714. * communicated through WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID
  715. * using module ID WMI_DMA_RING_CONFIG_MODULE_RTT.
  716. * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_EVT_TYPE_1
  717. * in WMI Service Ready and enumerate WMI_DMA_RING_CONFIG_MODULE_RTT
  718. * in the dma_ring_caps entry of WMI_SERVICE_READY_EXT_EVENTID.
  719. * Additional MAC metadata is provided in WMI_PEER_CFR_CAPTURE_EVENTID.
  720. */
  721. WMI_PEER_CFR_CAPTURE_CMDID,
  722. /** WMI command related to AP channel width switching */
  723. WMI_PEER_CHAN_WIDTH_SWITCH_CMDID,
  724. /** WMI command to fetch current tx PN for the peer */
  725. WMI_PEER_TX_PN_REQUEST_CMDID,
  726. /** unmap response with peer ids */
  727. WMI_PEER_UNMAP_RESPONSE_CMDID,
  728. /** WMI command for per-peer configuration of VLAN header operations
  729. * during TX and RX
  730. */
  731. WMI_PEER_CONFIG_VLAN_CMDID,
  732. /** WMI command for per-peer configuration of PPE DS */
  733. WMI_PEER_CONFIG_PPE_DS_CMDID,
  734. /** Enable/Disable Intra Bss for the peer */
  735. WMI_PEER_ENABLE_DISABLE_INTRA_BSS_CMDID,
  736. WMI_PEER_RX_PN_REQUEST_CMDID,
  737. /* Mac addr based filtering*/
  738. WMI_PEER_TX_FILTER_CMDID,
  739. /** flush specific tid queues of a peer */
  740. WMI_PEER_FLUSH_POLICY_CMDID,
  741. /* Set disabled scheduler modes for one or more peers */
  742. WMI_PEER_SCHED_MODE_DISABLE_CMDID,
  743. /* Group SET cmd for PEERS */
  744. WMI_PEER_BULK_SET_CMDID,
  745. /* WMI command to setup reorder queue for multiple TIDs */
  746. WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID,
  747. /* beacon/management specific commands */
  748. /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
  749. WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
  750. /** transmit beacon by value */
  751. WMI_PDEV_SEND_BCN_CMDID,
  752. /** set the beacon template. used in beacon offload mode to setup the
  753. * the common beacon template with the FW to be used by FW to generate beacons */
  754. WMI_BCN_TMPL_CMDID,
  755. /** set beacon filter with FW */
  756. WMI_BCN_FILTER_RX_CMDID,
  757. /* enable/disable filtering of probe requests in the firmware */
  758. WMI_PRB_REQ_FILTER_RX_CMDID,
  759. /** transmit management frame by value. will be deprecated */
  760. WMI_MGMT_TX_CMDID,
  761. /** set the probe response template. used in beacon offload mode to setup the
  762. * the common probe response template with the FW to be used by FW to generate
  763. * probe responses */
  764. WMI_PRB_TMPL_CMDID,
  765. /** Transmit Mgmt frame by reference */
  766. WMI_MGMT_TX_SEND_CMDID,
  767. /** Transmit data frame by reference */
  768. WMI_OFFCHAN_DATA_TX_SEND_CMDID,
  769. /** transmit FILS Discovery frame by value */
  770. WMI_PDEV_SEND_FD_CMDID,
  771. /** Cmd to enable/disable offloaded beacons */
  772. WMI_BCN_OFFLOAD_CTRL_CMDID,
  773. /** Cmd to enable FW handling BSS color change notification from AP. */
  774. WMI_BSS_COLOR_CHANGE_ENABLE_CMDID,
  775. /** To configure Beacon offload quiet-ie params */
  776. WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID,
  777. /** set FILS Discovery frame template for FW to generate FD frames */
  778. WMI_FD_TMPL_CMDID,
  779. /** Transmit QoS null Frame over wmi interface */
  780. WMI_QOS_NULL_FRAME_TX_SEND_CMDID,
  781. /** WMI CMD to receive the management filter criteria from the host for RX REO */
  782. WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID,
  783. /** commands to directly control ba negotiation directly from host. only used in test mode */
  784. /** turn off FW Auto addba mode and let host control addba */
  785. WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
  786. /** send add ba request */
  787. WMI_ADDBA_SEND_CMDID,
  788. WMI_ADDBA_STATUS_CMDID,
  789. /** send del ba */
  790. WMI_DELBA_SEND_CMDID,
  791. /** set add ba response will be used by FW to generate addba response*/
  792. WMI_ADDBA_SET_RESP_CMDID,
  793. /** send single VHT MPDU with AMSDU */
  794. WMI_SEND_SINGLEAMSDU_CMDID,
  795. /** Station power save specific config */
  796. /** enable/disable station powersave */
  797. WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
  798. /** set station power save specific parameter */
  799. WMI_STA_POWERSAVE_PARAM_CMDID,
  800. /** set station mimo powersave mode */
  801. WMI_STA_MIMO_PS_MODE_CMDID,
  802. /** config station TX cycle percentage in a beacon interval */
  803. WMI_STA_TDCC_CONFIG_CMDID,
  804. /** DFS-specific commands */
  805. /** enable DFS (radar detection)*/
  806. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
  807. /** disable DFS (radar detection)*/
  808. WMI_PDEV_DFS_DISABLE_CMDID,
  809. /** enable DFS phyerr/parse filter offload */
  810. WMI_DFS_PHYERR_FILTER_ENA_CMDID,
  811. /** enable DFS phyerr/parse filter offload */
  812. WMI_DFS_PHYERR_FILTER_DIS_CMDID,
  813. /** enable DFS phyerr processing offload */
  814. WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID,
  815. /** disable DFS phyerr processing offload */
  816. WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID,
  817. /** set ADFS channel config */
  818. WMI_VDEV_ADFS_CH_CFG_CMDID,
  819. /** abort ADFS off-channel-availability-check currently in progress */
  820. WMI_VDEV_ADFS_OCAC_ABORT_CMDID,
  821. /* Roaming specific commands */
  822. /** set roam scan mode */
  823. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
  824. /** set roam scan RSSI threshold below which roam scan is enabled */
  825. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  826. /** set roam scan period for periodic roam scan mode */
  827. WMI_ROAM_SCAN_PERIOD,
  828. /** set roam scan trigger RSSI change threshold */
  829. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  830. /** set roam AP profile */
  831. WMI_ROAM_AP_PROFILE,
  832. /** set channel list for roam scans */
  833. WMI_ROAM_CHAN_LIST,
  834. /** Stop scan command */
  835. WMI_ROAM_SCAN_CMD,
  836. /** roaming sme offload sync complete */
  837. WMI_ROAM_SYNCH_COMPLETE,
  838. /** set ric request element for 11r roaming */
  839. WMI_ROAM_SET_RIC_REQUEST_CMDID,
  840. /** Invoke roaming forcefully */
  841. WMI_ROAM_INVOKE_CMDID,
  842. /** roaming filter cmd to allow further filtering of roaming candidate */
  843. WMI_ROAM_FILTER_CMDID,
  844. /** set gateway ip, mac and retries for subnet change detection */
  845. WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
  846. /** configure thresholds for MAWC */
  847. WMI_ROAM_CONFIGURE_MAWC_CMDID,
  848. /** configure MultiBand Operation(refer WFA MBO spec) parameter */
  849. WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
  850. /** configure packet error rate threshold for triggering roaming */
  851. WMI_ROAM_PER_CONFIG_CMDID,
  852. /** configure BSS Transition Management (BTM) offload for roaming */
  853. WMI_ROAM_BTM_CONFIG_CMDID,
  854. /** Enable or Disable Fast Initial Link Setup (FILS) feature */
  855. WMI_ENABLE_FILS_CMDID,
  856. /** Request for roam scan stats */
  857. WMI_REQUEST_ROAM_SCAN_STATS_CMDID,
  858. /** Configure BSS load parameters for roam trigger */
  859. WMI_ROAM_BSS_LOAD_CONFIG_CMDID,
  860. /** Configure deauth roam trigger parameters */
  861. WMI_ROAM_DEAUTH_CONFIG_CMDID,
  862. /** Configure idle roam trigger parameters */
  863. WMI_ROAM_IDLE_CONFIG_CMDID,
  864. /**
  865. * WMI_ROAM_DSM_FILTER_CMDID is deprecated and should be unused,
  866. * but leave it reserved just to be safe.
  867. */
  868. DEPRECATED__WMI_ROAM_DSM_FILTER_CMDID,
  869. /** Enable or disable roaming triggers */
  870. WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID,
  871. /** Pre-Authentication completion status command */
  872. WMI_ROAM_PREAUTH_STATUS_CMDID,
  873. /** Command to get roam scan channels list */
  874. WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID,
  875. /** configure MLO parameters for roaming */
  876. WMI_ROAM_MLO_CONFIG_CMDID,
  877. /** set roam params **/
  878. WMI_ROAM_SET_PARAM_CMDID,
  879. /** Enable or Disable roam vendor control */
  880. WMI_ROAM_ENABLE_VENDOR_CONTROL_CMDID,
  881. /** Get firmware ini value */
  882. WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID,
  883. /** offload scan specific commands */
  884. /** set offload scan AP profile */
  885. WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
  886. /** remove offload scan AP profile */
  887. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  888. /** set offload scan period */
  889. WMI_OFL_SCAN_PERIOD,
  890. /* P2P specific commands */
  891. /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
  892. * generated during p2p listen and for p2p discoverability */
  893. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
  894. /** enable/disable p2p discoverability on STA/AP VDEVs */
  895. WMI_P2P_DEV_SET_DISCOVERABILITY,
  896. /** set p2p ie to be carried in beacons generated by FW for GO */
  897. WMI_P2P_GO_SET_BEACON_IE,
  898. /** set p2p ie to be carried in probe response frames generated by FW for GO */
  899. WMI_P2P_GO_SET_PROBE_RESP_IE,
  900. /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
  901. * attribute in the beacons/probe responses received.
  902. * Note: This command is currently used only for Apple P2P implementation.
  903. */
  904. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  905. /** set the configure of p2p find offload */
  906. WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
  907. /** set the vendor specific p2p ie data for p2p find offload using */
  908. WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
  909. /** set the BSSID/device name pattern of p2p find offload */
  910. WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
  911. /** set OppPS related parameters **/
  912. WMI_P2P_SET_OPPPS_PARAM_CMDID,
  913. /** set listen offload start related parameters */
  914. WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
  915. /** set listen offload stop related parameters */
  916. WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
  917. /** set DFS master AP configuration */
  918. WMI_P2P_GO_DFS_AP_CONFIG_CMDID,
  919. /** AP power save specific config */
  920. /** set AP power save specific param */
  921. WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
  922. /** set AP UAPSD coex specific param */
  923. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  924. /** set Enhanced Green AP param */
  925. WMI_AP_PS_EGAP_PARAM_CMDID,
  926. /** Rate-control specific commands */
  927. WMI_PEER_RATE_RETRY_SCHED_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
  928. /** WLAN Profiling commands. */
  929. WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
  930. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  931. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  932. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  933. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  934. /** Suspend resume command Ids */
  935. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
  936. WMI_PDEV_RESUME_CMDID,
  937. /* Beacon filter commands */
  938. /** add a beacon filter */
  939. WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
  940. /** remove a beacon filter */
  941. WMI_RMV_BCN_FILTER_CMDID,
  942. /* WOW Specific WMI commands*/
  943. /** add pattern for awake */
  944. WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
  945. /** deleta a wake pattern */
  946. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  947. /** enable/deisable wake event */
  948. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  949. /** enable WOW */
  950. WMI_WOW_ENABLE_CMDID,
  951. /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
  952. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  953. /* IOAC add keep alive cmd. */
  954. WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
  955. /* IOAC del keep alive cmd. */
  956. WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
  957. /* IOAC add pattern for awake */
  958. WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
  959. /* IOAC deleta a wake pattern */
  960. WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
  961. /* D0-WOW enable or disable cmd */
  962. WMI_D0_WOW_ENABLE_DISABLE_CMDID,
  963. /* enable extend WoW */
  964. WMI_EXTWOW_ENABLE_CMDID,
  965. /* Extend WoW command to configure app type1 parameter */
  966. WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
  967. /* Extend WoW command to configure app type2 parameter */
  968. WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
  969. /* enable ICMPv6 Network advertisement filtering */
  970. WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
  971. /*
  972. * Set a pattern to match UDP packet in WOW mode.
  973. * If match, construct a tx frame in a local buffer
  974. * to send through the peer AP to the entity in the
  975. * IP network that sent the UDP packet to this STA.
  976. */
  977. WMI_WOW_UDP_SVC_OFLD_CMDID,
  978. /* configure WOW host wakeup PIN pattern */
  979. WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
  980. /* Set which action category should wake the host from suspend */
  981. WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
  982. /*
  983. * Set a pattern to match broadcast CoAP packet in WoW mode.
  984. * If match and verify pass, cache the packet and then reply
  985. * a unicast response in local with pre-configured packet.
  986. */
  987. WMI_WOW_COAP_ADD_PATTERN_CMDID,
  988. /* Delete a pattern match broadcast CoAP packet */
  989. WMI_WOW_COAP_DEL_PATTERN_CMDID,
  990. /*
  991. * Add a CoAP keepalive pattern to send a CoAP broadcast packet
  992. * when configured timeout occurred.
  993. */
  994. WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID,
  995. /* Delete a CoAP keepalive pattern */
  996. WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID,
  997. /* Host read the cached CoAP packets after resume */
  998. WMI_WOW_COAP_GET_BUF_INFO_CMDID,
  999. /* RTT measurement related cmd */
  1000. /** request to make an RTT measurement */
  1001. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
  1002. /** request to report a tsf measurement */
  1003. WMI_RTT_TSF_CMDID,
  1004. /** RTT 11az PASN authentication status */
  1005. WMI_RTT_PASN_AUTH_STATUS_CMD,
  1006. /** RTT 11az PASN deauthentication cmd */
  1007. WMI_RTT_PASN_DEAUTH_CMD,
  1008. /** spectral scan command */
  1009. /** configure spectral scan */
  1010. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
  1011. /** enable/disable spectral scan and trigger */
  1012. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  1013. /* F/W stats */
  1014. /** one time request for stats */
  1015. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
  1016. /** Push MCC Adaptive Scheduler Stats to Firmware */
  1017. WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
  1018. /** one time request for txrx stats */
  1019. WMI_REQUEST_STATS_EXT_CMDID,
  1020. /* Link Layer stats */
  1021. /** Request for link layer stats */
  1022. WMI_REQUEST_LINK_STATS_CMDID,
  1023. /** Request for setting params to link layer stats */
  1024. WMI_START_LINK_STATS_CMDID,
  1025. /** Request to clear stats*/
  1026. WMI_CLEAR_LINK_STATS_CMDID,
  1027. /** Request for getting the Firmware Memory Dump */
  1028. WMI_GET_FW_MEM_DUMP_CMDID,
  1029. /** Request to flush of the buffered debug messages */
  1030. WMI_DEBUG_MESG_FLUSH_CMDID,
  1031. /** Cmd to configure the verbose level */
  1032. WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
  1033. /** One time request for wlan stats */
  1034. WMI_REQUEST_WLAN_STATS_CMDID,
  1035. /** Request for getting RCPI of peer */
  1036. WMI_REQUEST_RCPI_CMDID,
  1037. /** One time request for peer stats info */
  1038. WMI_REQUEST_PEER_STATS_INFO_CMDID,
  1039. /** One time request for radio channel stats */
  1040. WMI_REQUEST_RADIO_CHAN_STATS_CMDID,
  1041. /** request for WLM (wlan latency manager) stats */
  1042. WMI_REQUEST_WLM_STATS_CMDID,
  1043. /** request for control path stats */
  1044. WMI_REQUEST_CTRL_PATH_STATS_CMDID,
  1045. /** unified request for LL stats and get station cmds */
  1046. WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID,
  1047. /** request for thermal stats */
  1048. WMI_REQUEST_THERMAL_STATS_CMDID,
  1049. /** request for HALPHY stats through ctrl path */
  1050. WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID,
  1051. /** ARP OFFLOAD REQUEST*/
  1052. WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
  1053. /** Proactive ARP Response Add Pattern Command*/
  1054. WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  1055. /** Proactive ARP Response Del Pattern Command*/
  1056. WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  1057. /** NS offload confid*/
  1058. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
  1059. /** APFIND Config */
  1060. WMI_APFIND_CMDID,
  1061. /** Passpoint list config */
  1062. WMI_PASSPOINT_LIST_CONFIG_CMDID,
  1063. /** configure suppressing parameters for MAWC */
  1064. WMI_NLO_CONFIGURE_MAWC_CMDID,
  1065. /* GTK offload Specific WMI commands*/
  1066. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
  1067. /* CSA offload Specific WMI commands*/
  1068. /** csa offload enable */
  1069. WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
  1070. /** chan switch command */
  1071. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  1072. /* Chatter commands*/
  1073. /* Change chatter mode of operation */
  1074. WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
  1075. /** chatter add coalescing filter command */
  1076. WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
  1077. /** chatter delete coalescing filter command */
  1078. WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
  1079. /** chatter coalecing query command */
  1080. WMI_CHATTER_COALESCING_QUERY_CMDID,
  1081. /**addba specific commands */
  1082. /** start the aggregation on this TID */
  1083. WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
  1084. /** stop the aggregation on this TID */
  1085. WMI_PEER_TID_DELBA_CMDID,
  1086. /** set station mimo powersave method */
  1087. WMI_STA_DTIM_PS_METHOD_CMDID,
  1088. /** Configure the Station UAPSD AC Auto Trigger Parameters */
  1089. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  1090. /** Configure the Keep Alive Parameters */
  1091. WMI_STA_KEEPALIVE_CMDID,
  1092. /* Request ssn from target for a sta/tid pair */
  1093. WMI_BA_REQ_SSN_CMDID,
  1094. /* misc command group */
  1095. /** echo command mainly used for testing */
  1096. WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
  1097. /* !!IMPORTANT!!
  1098. * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
  1099. * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
  1100. * as we MUST have a fixed value here to maintain compatibility between
  1101. * UTF and the ART2 driver
  1102. */
  1103. /** UTF WMI commands */
  1104. WMI_PDEV_UTF_CMDID,
  1105. /** set debug log config */
  1106. WMI_DBGLOG_CFG_CMDID,
  1107. /* QVIT specific command id */
  1108. WMI_PDEV_QVIT_CMDID,
  1109. /* Factory Testing Mode request command
  1110. * used for integrated chipsets */
  1111. WMI_PDEV_FTM_INTG_CMDID,
  1112. /* set and get keepalive parameters command */
  1113. WMI_VDEV_SET_KEEPALIVE_CMDID,
  1114. WMI_VDEV_GET_KEEPALIVE_CMDID,
  1115. /* For fw recovery test command */
  1116. WMI_FORCE_FW_HANG_CMDID,
  1117. /* Set Mcast/Bdcast filter */
  1118. WMI_SET_MCASTBCAST_FILTER_CMDID,
  1119. /** set thermal management params **/
  1120. WMI_THERMAL_MGMT_CMDID,
  1121. /** set host auto shutdown params **/
  1122. WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
  1123. /** set tpc chainmask config command */
  1124. WMI_TPC_CHAINMASK_CONFIG_CMDID,
  1125. /** set Antenna diversity command */
  1126. WMI_SET_ANTENNA_DIVERSITY_CMDID,
  1127. /** Set OCB Sched Request, deprecated */
  1128. WMI_OCB_SET_SCHED_CMDID,
  1129. /** Set RSSI monitoring config command */
  1130. WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
  1131. /** Enable/disable Large Receive Offload processing; provide cfg params */
  1132. WMI_LRO_CONFIG_CMDID,
  1133. /** transfer data from host to firmware to write flash */
  1134. WMI_TRANSFER_DATA_TO_FLASH_CMDID,
  1135. /** Command to enable/disable filtering of multicast IP with unicast mac */
  1136. WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
  1137. /** Command to control WISA mode */
  1138. WMI_VDEV_WISA_CMDID,
  1139. /** set debug log time stamp sync up with host */
  1140. WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
  1141. /** Command for host to set/delete multiple mcast filters */
  1142. WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
  1143. /** upload a requested section of data from firmware flash to host */
  1144. WMI_READ_DATA_FROM_FLASH_CMDID,
  1145. /* Thermal Throttling SET CONF commands */
  1146. WMI_THERM_THROT_SET_CONF_CMDID,
  1147. /* set runtime dpd recalibration params */
  1148. WMI_RUNTIME_DPD_RECAL_CMDID,
  1149. /* get TX power for input HALPHY parameters */
  1150. WMI_GET_TPC_POWER_CMDID,
  1151. /* Specify when to start monitoring for idle state */
  1152. WMI_IDLE_TRIGGER_MONITOR_CMDID,
  1153. /** set ELNA BYPASS status */
  1154. WMI_SET_ELNA_BYPASS_CMDID,
  1155. /** get ELNA BYPASS status */
  1156. WMI_GET_ELNA_BYPASS_CMDID,
  1157. /** get ANI level of the channels */
  1158. WMI_GET_CHANNEL_ANI_CMDID,
  1159. /** set OCL (One Chain Listen) mode */
  1160. WMI_SET_OCL_CMDID,
  1161. /** Consolidated params for pdev/vdev:
  1162. * Set multiple parameters at once for one pdev or vdev.
  1163. */
  1164. WMI_SET_MULTIPLE_PDEV_VDEV_PARAM_CMDID,
  1165. /* WMI cmd used to allocate HW scratch registers */
  1166. WMI_PMM_SCRATCH_REG_ALLOCATION_CMDID,
  1167. /* WMI cmd used to start/stop XGAP (XPAN Green AP) */
  1168. WMI_XGAP_ENABLE_CMDID,
  1169. /* H2T HPA message */
  1170. WMI_HPA_CMDID,
  1171. /* WMI comamnd for standalone sounding */
  1172. WMI_VDEV_STANDALONE_SOUND_CMDID,
  1173. /* WMI cmd used by host to send the switch response status to FW */
  1174. WMI_AUDIO_TRANSPORT_SWITCH_RESP_STATUS_CMDID,
  1175. /** WMI command to set active traffic type bitmap for a peer */
  1176. WMI_PEER_ACTIVE_TRAFFIC_MAP_CMDID,
  1177. /** WMI command to Request Opportunistic Power Mgmt (OPM) stats */
  1178. WMI_REQUEST_OPM_STATS_CMDID,
  1179. /** WMI command to Request SAP suspend/resume */
  1180. WMI_SET_AP_SUSPEND_RESUME_CMDID,
  1181. /* Offload 11k related requests */
  1182. WMI_11K_OFFLOAD_REPORT_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_11K_OFFLOAD),
  1183. /* invoke neighbor report from FW */
  1184. WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID,
  1185. /* GPIO Configuration */
  1186. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
  1187. WMI_GPIO_OUTPUT_CMDID,
  1188. /* Txbf configuration command */
  1189. WMI_TXBF_CMDID,
  1190. /* Antenna Controller, connected to wlan debug uart/GPIO. */
  1191. WMI_ANT_CONTROLLER_CMDID,
  1192. WMI_GPIO_STATE_REQ_CMDID,
  1193. /* FWTEST Commands */
  1194. WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
  1195. /** set NoA descs **/
  1196. WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
  1197. /* UNIT Tests */
  1198. WMI_UNIT_TEST_CMDID,
  1199. /* set debug and tuning parameters */
  1200. WMI_FWTEST_CMDID,
  1201. /* Q-Boost configuration test commands */
  1202. WMI_QBOOST_CFG_CMDID,
  1203. /* Simulation Test command */
  1204. WMI_SIMULATION_TEST_CMDID,
  1205. /* WFA test config command */
  1206. WMI_WFA_CONFIG_CMDID,
  1207. /** TDLS Configuration */
  1208. /** enable/disable TDLS */
  1209. WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
  1210. /** set tdls peer state */
  1211. WMI_TDLS_PEER_UPDATE_CMDID,
  1212. /** TDLS Offchannel control */
  1213. WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
  1214. /** Resmgr Configuration */
  1215. /** Adaptive OCS is enabled by default in the FW. This command is used to
  1216. * disable FW based adaptive OCS.
  1217. */
  1218. WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
  1219. /** set the requested channel time quota for the home channels */
  1220. WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
  1221. /** set the requested latency for the home channels */
  1222. WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
  1223. /** STA SMPS Configuration */
  1224. /** force SMPS mode */
  1225. WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
  1226. /** set SMPS parameters */
  1227. WMI_STA_SMPS_PARAM_CMDID,
  1228. /* Wlan HB commands*/
  1229. /* enable/disable wlan HB */
  1230. WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
  1231. /* set tcp parameters for wlan HB */
  1232. WMI_HB_SET_TCP_PARAMS_CMDID,
  1233. /* set tcp pkt filter for wlan HB */
  1234. WMI_HB_SET_TCP_PKT_FILTER_CMDID,
  1235. /* set udp parameters for wlan HB */
  1236. WMI_HB_SET_UDP_PARAMS_CMDID,
  1237. /* set udp pkt filter for wlan HB */
  1238. WMI_HB_SET_UDP_PKT_FILTER_CMDID,
  1239. /* OIC ping keep alive */
  1240. WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID,
  1241. WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID,
  1242. /* WMI commands related to DHCP Lease Renew Offload **/
  1243. WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID,
  1244. /** Wlan RMC commands*/
  1245. /** enable/disable RMC */
  1246. WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
  1247. /** configure action frame period */
  1248. WMI_RMC_SET_ACTION_PERIOD_CMDID,
  1249. /** For debug/future enhancement purposes only,
  1250. * configures/finetunes RMC algorithms */
  1251. WMI_RMC_CONFIG_CMDID,
  1252. /** select manual leader */
  1253. WMI_RMC_SET_MANUAL_LEADER_CMDID,
  1254. /** WLAN MHF offload commands */
  1255. /** enable/disable MHF offload */
  1256. WMI_MHF_OFFLOAD_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
  1257. /** Plumb routing table for MHF offload */
  1258. WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
  1259. /*location scan commands*/
  1260. /*start batch scan*/
  1261. WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  1262. /*stop batch scan*/
  1263. WMI_BATCH_SCAN_DISABLE_CMDID,
  1264. /*get batch scan result*/
  1265. WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
  1266. /* OEM related cmd */
  1267. WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
  1268. WMI_OEM_REQUEST_CMDID, /* UNUSED */
  1269. /* OEM related cmd used for Low Power ranging */
  1270. WMI_LPI_OEM_REQ_CMDID,
  1271. WMI_OEM_DMA_RING_CFG_REQ_CMDID,
  1272. /** Command to handle OEM's opaque data */
  1273. WMI_OEM_DATA_CMDID,
  1274. /** Nan Request */
  1275. WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
  1276. /** Command to handle OEM's NAN specific opaque data */
  1277. WMI_NAN_OEM_DATA_CMDID,
  1278. /** Modem power state command */
  1279. WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
  1280. WMI_CHAN_AVOID_UPDATE_CMDID,
  1281. WMI_COEX_CONFIG_CMDID,
  1282. WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
  1283. WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
  1284. WMI_SAR_LIMITS_CMDID,
  1285. WMI_SAR_GET_LIMITS_CMDID,
  1286. /** Dedicated BT Antenna Mode (DBAM) command */
  1287. WMI_COEX_DBAM_CMDID,
  1288. WMI_TAS_POWER_HISTORY_CMDID,
  1289. WMI_ESL_EGID_CMDID,
  1290. WMI_COEX_MULTIPLE_CONFIG_CMDID,
  1291. /**
  1292. * OBSS scan offload enable/disable commands
  1293. * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
  1294. * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
  1295. * 2. STA connect to a 2.4 GHz ht20/ht40 AP,
  1296. * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
  1297. * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
  1298. * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
  1299. */
  1300. WMI_OBSS_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
  1301. WMI_OBSS_SCAN_DISABLE_CMDID,
  1302. WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID,
  1303. /** LPI commands */
  1304. /** LPI mgmt snooping config command */
  1305. WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
  1306. /** LPI scan start command */
  1307. WMI_LPI_START_SCAN_CMDID,
  1308. /** LPI scan stop command */
  1309. WMI_LPI_STOP_SCAN_CMDID,
  1310. /** ExtScan commands */
  1311. WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
  1312. WMI_EXTSCAN_STOP_CMDID,
  1313. WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
  1314. WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
  1315. WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
  1316. WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
  1317. WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
  1318. WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
  1319. WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
  1320. WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
  1321. /** DHCP server offload commands */
  1322. WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
  1323. /** IPA Offload features related commands */
  1324. WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
  1325. /** mDNS responder offload commands */
  1326. WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1327. WMI_MDNS_SET_FQDN_CMDID,
  1328. WMI_MDNS_SET_RESPONSE_CMDID,
  1329. WMI_MDNS_GET_STATS_CMDID,
  1330. WMI_MDNS_SET_STAIP_CMDID,
  1331. /* enable/disable AP Authentication offload */
  1332. WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
  1333. WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
  1334. WMI_SAP_OBSS_DETECTION_CFG_CMDID,
  1335. /** Out-of-context-of-BSS (OCB) commands */
  1336. WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
  1337. WMI_OCB_SET_UTC_TIME_CMDID,
  1338. WMI_OCB_START_TIMING_ADVERT_CMDID,
  1339. WMI_OCB_STOP_TIMING_ADVERT_CMDID,
  1340. WMI_OCB_GET_TSF_TIMER_CMDID,
  1341. WMI_DCC_GET_STATS_CMDID,
  1342. WMI_DCC_CLEAR_STATS_CMDID,
  1343. WMI_DCC_UPDATE_NDL_CMDID,
  1344. /* System-On-Chip commands */
  1345. WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
  1346. WMI_SOC_SET_HW_MODE_CMDID,
  1347. WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
  1348. WMI_SOC_SET_ANTENNA_MODE_CMDID,
  1349. /** enable/disable TQM reset (SOC level) feature */
  1350. WMI_SOC_TQM_RESET_ENABLE_DISABLE_CMDID,
  1351. /*
  1352. * WMI Command to enable custom classification of packets in Tx path
  1353. * and specifiy packets of interest for classification.
  1354. */
  1355. WMI_SOC_TX_PACKET_CUSTOM_CLASSIFY_CMDID,
  1356. /* packet filter commands */
  1357. WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
  1358. WMI_PACKET_FILTER_ENABLE_CMDID,
  1359. /** Motion Aided WiFi Connectivity (MAWC) commands */
  1360. WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
  1361. /** WMI commands related to PMF 11w Offload */
  1362. WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
  1363. /** WMI commands related to pkt filter (BPF) offload */
  1364. WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1365. WMI_BPF_GET_VDEV_STATS_CMDID,
  1366. WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
  1367. WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
  1368. WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID,
  1369. WMI_BPF_SET_VDEV_ENABLE_CMDID,
  1370. WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID,
  1371. WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID,
  1372. /** WMI commands related to monitor mode. */
  1373. WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
  1374. /** WMI commands related to regulatory offload */
  1375. WMI_SET_CURRENT_COUNTRY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_REGULATORY),
  1376. WMI_11D_SCAN_START_CMDID,
  1377. WMI_11D_SCAN_STOP_CMDID,
  1378. WMI_SET_INIT_COUNTRY_CMDID,
  1379. WMI_AFC_CMDID,
  1380. /**
  1381. * Nan Data commands
  1382. * NDI - NAN Data Interface
  1383. * NDP - NAN Data Path
  1384. */
  1385. /* Commands in prototyping phase */
  1386. WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1387. WMI_NDP_INITIATOR_REQ_CMDID,
  1388. WMI_NDP_RESPONDER_REQ_CMDID,
  1389. WMI_NDP_END_REQ_CMDID,
  1390. WMI_NDP_CMDID,
  1391. /** WMI commands related to HW data filtering **/
  1392. WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
  1393. /** WMI commands related to WLAN latency module **/
  1394. WMI_WLM_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLM),
  1395. /** WMI commands related to STA & AP TWT module **/
  1396. WMI_TWT_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TWT),
  1397. WMI_TWT_DISABLE_CMDID,
  1398. WMI_TWT_ADD_DIALOG_CMDID,
  1399. WMI_TWT_DEL_DIALOG_CMDID,
  1400. WMI_TWT_PAUSE_DIALOG_CMDID,
  1401. WMI_TWT_RESUME_DIALOG_CMDID,
  1402. WMI_TWT_BTWT_INVITE_STA_CMDID,
  1403. WMI_TWT_BTWT_REMOVE_STA_CMDID,
  1404. WMI_TWT_NUDGE_DIALOG_CMDID,
  1405. WMI_VDEV_SET_TWT_EDCA_PARAMS_CMDID, /* XPAN TWT */
  1406. WMI_VDEV_GET_TWT_SESSION_STATS_INFO_CMDID,
  1407. WMI_TWT_VDEV_CONFIG_CMDID,
  1408. /** WMI commands related to motion detection **/
  1409. WMI_MOTION_DET_CONFIG_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MOTION_DET),
  1410. WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID,
  1411. WMI_MOTION_DET_START_STOP_CMDID,
  1412. WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID,
  1413. /** WMI commands related to OBSS PD Spatial Reuse **/
  1414. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPATIAL_REUSE),
  1415. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID,
  1416. /** WMI commands related to High Precision Clock Synchronization feature **/
  1417. WMI_HPCS_PULSE_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HPCS_PULSE),
  1418. /** WMI commands related to Audio Frame aggregation feature **/
  1419. WMI_AUDIO_AGGR_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AUDIO),
  1420. WMI_AUDIO_AGGR_ADD_GROUP_CMDID,
  1421. WMI_AUDIO_AGGR_DEL_GROUP_CMDID,
  1422. WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID,
  1423. WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID,
  1424. WMI_AUDIO_AGGR_SET_GROUP_AUTO_RATE_CMDID,
  1425. WMI_AUDIO_AGGR_SET_GROUP_PROBE_CMDID,
  1426. WMI_AUDIO_AGGR_UPDATE_STA_GROUP_INFO_CMDID,
  1427. WMI_AUDIO_AGGR_GET_STATISTICS_CMDID,
  1428. WMI_AUDIO_AGGR_RESET_STATISTICS_CMDID,
  1429. WMI_AUDIO_AGGR_SET_RTSCTS_CONFIG_CMDID,
  1430. WMI_AUDIO_AGGR_SET_SCHED_METHOD_CMDID,
  1431. WMI_AUDIO_AGGR_GET_SCHED_METHOD_CMDID,
  1432. /** WMI commands related to Channel Frequency Response Capture **/
  1433. WMI_CFR_CAPTURE_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CFR_CAPTURE),
  1434. /** WMI commands related to Air Time Management feature **/
  1435. /** ATF SSID GROUPING REQUEST command */
  1436. WMI_ATF_SSID_GROUPING_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ATM),
  1437. /** WMM ATF Configuration for groups */
  1438. WMI_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID,
  1439. /** ATF Peer Extended Request command */
  1440. WMI_PEER_ATF_EXT_REQUEST_CMDID,
  1441. /** Vendor Defined WMI commands **/
  1442. WMI_VENDOR_PDEV_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VENDOR),
  1443. WMI_VENDOR_VDEV_CMDID,
  1444. WMI_VENDOR_PEER_CMDID,
  1445. /** Further vendor cmd IDs can be added below **/
  1446. /** WMI commands specific to Tid level Latency config **/
  1447. /** VDEV Latency Config command */
  1448. WMI_VDEV_TID_LATENCY_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LATENCY),
  1449. /** TID Latency Request command */
  1450. WMI_PEER_TID_LATENCY_CONFIG_CMDID,
  1451. /** WMI commands specific to MLO **/
  1452. /** MLO link active / inactive Request command */
  1453. WMI_MLO_LINK_SET_ACTIVE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MLO),
  1454. /** WMI cmd used to indicate hw_links part of MLO */
  1455. WMI_MLO_SETUP_CMDID,
  1456. /** WMI cmd used for init synchronization of hw_links part of MLO */
  1457. WMI_MLO_READY_CMDID,
  1458. /** WMI cmd used for tearing down a hw_link part of MLO */
  1459. WMI_MLO_TEARDOWN_CMDID,
  1460. /** WMI cmd used to setup Tid to Link Mapping for a MLO Peer */
  1461. WMI_MLO_PEER_TID_TO_LINK_MAP_CMDID,
  1462. /** WMI cmd for dynamically deleting a link from a MLD VAP */
  1463. WMI_MLO_LINK_REMOVAL_CMDID,
  1464. /** WMI cmd used to setup Tid to Link Mapping for a MLO VAP */
  1465. WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID,
  1466. /** WMI cmd used to get mlo link information */
  1467. WMI_MLO_VDEV_GET_LINK_INFO_CMDID,
  1468. /** WMI cmd used to set link BSS parameters */
  1469. WMI_MLO_LINK_SET_BSS_PARAMS_CMDID,
  1470. /** WMI cmd to confirm the status of link switch request handling */
  1471. WMI_MLO_LINK_SWITCH_CONF_CMDID,
  1472. /** WMI cmd to migrate the primary link peer */
  1473. WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID,
  1474. /** WMI cmd to recommand preferred link */
  1475. WMI_MLO_LINK_RECOMMENDATION_CMDID,
  1476. /** WMI commands specific to Service Aware WiFi (SAWF) */
  1477. /** configure or reconfigure the parameters for a service class */
  1478. WMI_SAWF_SVC_CLASS_CFG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAWF),
  1479. /** disable a service class */
  1480. WMI_SAWF_SVC_CLASS_DISABLE_CMDID,
  1481. /* WMI commands specific to ODD */
  1482. WMI_ODD_LIVEDUMP_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ODD),
  1483. /* WMI commands specific to TDMA */
  1484. WMI_TDMA_SCHEDULE_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDMA),
  1485. /* WMI commands specific to manually-triggered UL */
  1486. /** WMI Command to set Manual SU UL OFDMA trigger parameters */
  1487. WMI_VDEV_SET_ULOFDMA_MANUAL_SU_TRIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MANUAL_UL_TRIG),
  1488. /** WMI Command to set Manual MU UL OFDMA trigger parameters */
  1489. WMI_VDEV_SET_ULOFDMA_MANUAL_MU_TRIG_CMDID,
  1490. } WMI_CMD_ID;
  1491. typedef enum {
  1492. /** WMI service is ready; after this event WMI messages can be sent/received */
  1493. WMI_SERVICE_READY_EVENTID = 0x1,
  1494. /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
  1495. WMI_READY_EVENTID,
  1496. /** Specify what WMI services the target supports (for services beyond
  1497. * what fits in the WMI_SERVICE_READY_EVENT message's wmi_service_bitmap)
  1498. */
  1499. WMI_SERVICE_AVAILABLE_EVENTID,
  1500. /** Specify what numbers and kinds of interfaces (a.k.a. vdevs)
  1501. * the target supports
  1502. */
  1503. WMI_IFACE_COMBINATION_IND_EVENTID,
  1504. /** Scan specific events */
  1505. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  1506. /** Spectral scan FW params to host */
  1507. WMI_PDEV_SSCAN_FW_PARAM_EVENTID,
  1508. /** Spectral scan related event start/stop trigger to host */
  1509. WMI_SSCAN_EVT_MESSAGE_EVENTID,
  1510. /** Spectral scan capabilities advertisement */
  1511. WMI_SPECTRAL_CAPABILITIES_EVENTID,
  1512. /* PDEV specific events */
  1513. /** TPC config for the current operating channel */
  1514. WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  1515. /** Channel stats event */
  1516. WMI_CHAN_INFO_EVENTID,
  1517. /** PHY Error specific WMI event */
  1518. WMI_PHYERR_EVENTID,
  1519. /** eeprom dump event */
  1520. WMI_PDEV_DUMP_EVENTID,
  1521. /** traffic pause event */
  1522. WMI_TX_PAUSE_EVENTID,
  1523. /** DFS radar event */
  1524. WMI_DFS_RADAR_EVENTID,
  1525. /** track L1SS entry and residency event */
  1526. WMI_PDEV_L1SS_TRACK_EVENTID,
  1527. /** Report current temperature of the chip in Celcius degree */
  1528. WMI_PDEV_TEMPERATURE_EVENTID,
  1529. /** Extension of WMI_SERVICE_READY msg with extra target capability info */
  1530. WMI_SERVICE_READY_EXT_EVENTID,
  1531. /** FIPS test mode event */
  1532. WMI_PDEV_FIPS_EVENTID,
  1533. /** Channel hopping avoidance */
  1534. WMI_PDEV_CHANNEL_HOPPING_EVENTID,
  1535. /** CCK ANI level event */
  1536. WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
  1537. /** OFDM ANI level event */
  1538. WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
  1539. /** Tx PPDU params */
  1540. WMI_PDEV_TPC_EVENTID,
  1541. /** NF Cal Power in DBR/DBM for all channels */
  1542. WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
  1543. /** SOC/PDEV events */
  1544. WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
  1545. WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
  1546. WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
  1547. /** Report ANT DIV feature's status */
  1548. WMI_PDEV_ANTDIV_STATUS_EVENTID,
  1549. /** Chip level Power stats */
  1550. WMI_PDEV_CHIP_POWER_STATS_EVENTID,
  1551. /** Power Save Failure Detected */
  1552. WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID,
  1553. /* Event to report the switch count in csa of one or more VDEVs */
  1554. WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID,
  1555. /** Report the caldata version to host */
  1556. WMI_PDEV_CHECK_CAL_VERSION_EVENTID,
  1557. /** Report chain RSSI and antenna index to host */
  1558. WMI_PDEV_DIV_RSSI_ANTID_EVENTID,
  1559. /** provide noise floor and cycle counts for a channel */
  1560. WMI_PDEV_BSS_CHAN_INFO_EVENTID,
  1561. /** Response received the ctl table to host */
  1562. WMI_PDEV_UPDATE_CTLTABLE_EVENTID,
  1563. WMI_PDEV_DMA_RING_CFG_RSP_EVENTID,
  1564. WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID,
  1565. /** WMI Event to deliver CTL Failsafe application */
  1566. WMI_PDEV_CTL_FAILSAFE_CHECK_EVENTID,
  1567. /* Event to report the switch count in BSS color of one or more VDEVs */
  1568. WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID,
  1569. /* Event to send cold boot calibration data */
  1570. WMI_PDEV_COLD_BOOT_CAL_DATA_EVENTID,
  1571. /* Event to report a rogue ap info that is detected in fw */
  1572. WMI_PDEV_RAP_INFO_EVENTID,
  1573. WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENTID,
  1574. /** 2nd extension of SERVICE_READY msg with extra target capability info */
  1575. WMI_SERVICE_READY_EXT2_EVENTID,
  1576. /**
  1577. * vdev restart response for multiple vdevs in response to
  1578. * MULTIPLE_VDEV_RESTART_REQUEST
  1579. */
  1580. WMI_PDEV_MULTIPLE_VDEV_RESTART_RESP_EVENTID,
  1581. /** WMI event in response to TPC STATS command */
  1582. WMI_PDEV_GET_TPC_STATS_EVENTID,
  1583. /* Event to get DPD status from HALPHY */
  1584. WMI_PDEV_GET_DPD_STATUS_EVENTID,
  1585. /* Event to get Calibration status from HALPHY */
  1586. WMI_PDEV_GET_HALPHY_CAL_STATUS_EVENTID,
  1587. /* Event to set halphy cal bitmap */
  1588. WMI_PDEV_SET_HALPHY_CAL_BMAP_EVENTID,
  1589. /* Event to get AOA phasedelta values from HALPHY */
  1590. WMI_PDEV_AOA_PHASEDELTA_EVENTID,
  1591. WMI_PDEV_FIPS_EXTEND_EVENTID,
  1592. /* Event to send packet log decode information */
  1593. WMI_PDEV_PKTLOG_DECODE_INFO_EVENTID,
  1594. /**
  1595. * RSSI dB to dBm conversion params info event
  1596. * sent to host after channel/bw/chainmask change per pdev.
  1597. */
  1598. WMI_PDEV_RSSI_DBM_CONVERSION_PARAMS_INFO_EVENTID,
  1599. /* Event to indicate Schedule tid queue suspended info */
  1600. WMI_PDEV_SCHED_TIDQ_SUSP_INFO_EVENTID,
  1601. /* Event to send target rate to power table update status */
  1602. WMI_PDEV_SET_TGTR2P_TABLE_EVENTID,
  1603. /* Event to indicate completion on RF path */
  1604. WMI_PDEV_SET_RF_PATH_RESP_EVENTID,
  1605. /* Event to get AOA phasedelta values for all gain tables from HALPHY */
  1606. WMI_PDEV_ENHANCED_AOA_PHASEDELTA_EVENTID,
  1607. /* Event to indicate the status of WiFi Radar calibration */
  1608. WMI_PDEV_WIFI_RADAR_CAL_COMPLETION_STATUS_EVENTID,
  1609. /* Event to indicate xLNA is enabled */
  1610. WMI_PDEV_ENABLE_XLNA_EVENTID,
  1611. /* VDEV specific events */
  1612. /** VDEV started event in response to VDEV_START request */
  1613. WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  1614. /** vdev stopped event , generated in response to VDEV_STOP request */
  1615. WMI_VDEV_STOPPED_EVENTID,
  1616. /* Indicate the set key (used for setting per
  1617. * peer unicast and per vdev multicast)
  1618. * operation has completed */
  1619. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  1620. /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
  1621. don't use this for any new implementations */
  1622. /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
  1623. This request is valid only for vdevs operating in soft AP or P2P GO mode */
  1624. WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
  1625. /* Return the TSF timestamp of specified vdev */
  1626. WMI_VDEV_TSF_REPORT_EVENTID,
  1627. /* FW response to Host for vdev delete cmdid */
  1628. WMI_VDEV_DELETE_RESP_EVENTID,
  1629. /* DISA feature: FW response to Host with encrypted/decrypted 802.11 DISA frame */
  1630. WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
  1631. /** event to report mac randomization success **/
  1632. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID,
  1633. /* event for ARP stats collection */
  1634. WMI_VDEV_GET_ARP_STAT_EVENTID,
  1635. /** get tx power event in response to VDEV_GET_TX_POWER request */
  1636. WMI_VDEV_GET_TX_POWER_EVENTID,
  1637. WMI_VDEV_BCN_RECEPTION_STATS_EVENTID,
  1638. /* provide LTE-Coex state */
  1639. WMI_VDEV_GET_MWS_COEX_STATE_EVENTID,
  1640. /* provide LTE-Coex Dynamic Power Back-off info */
  1641. WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID,
  1642. /* provide LTE-Coex TDM info */
  1643. WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID,
  1644. /* provide LTE-Coex IDRx info */
  1645. WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID,
  1646. /* provide LTE-Coex antenna sharing info */
  1647. WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID,
  1648. /* Event to handle FW offloaded mgmt packets */
  1649. WMI_VDEV_MGMT_OFFLOAD_EVENTID,
  1650. /* FW response to Host for delete all peer cmdid */
  1651. WMI_VDEV_DELETE_ALL_PEER_RESP_EVENTID,
  1652. /** Indicates host to start/stop strobing for QTIMER periodically */
  1653. WMI_VDEV_AUDIO_SYNC_START_STOP_EVENTID,
  1654. /** Sends the final offset in the QTIMERs of both master and slave */
  1655. WMI_VDEV_AUDIO_SYNC_Q_MASTER_SLAVE_OFFSET_EVENTID,
  1656. /** VDEV_SEND_BIG_DATA_EVENT IS DEPRECATED - DO NOT USE */
  1657. WMI_VDEV_SEND_BIG_DATA_EVENTID,
  1658. /** send BIG DATA stats to host phase 2 */
  1659. WMI_VDEV_SEND_BIG_DATA_P2_EVENTID,
  1660. /** Latency related information received from beacon IE */
  1661. WMI_VDEV_BCN_LATENCY_EVENTID,
  1662. /** Disconnect request from FW */
  1663. WMI_VDEV_DISCONNECT_EVENTID,
  1664. /** Send Smart Monitor related params to host */
  1665. WMI_VDEV_SMART_MONITOR_EVENTID,
  1666. /** Send status of vdev mac address update request to host */
  1667. WMI_VDEV_UPDATE_MAC_ADDR_CONF_EVENTID,
  1668. /** event to report latency level honored by FW */
  1669. WMI_VDEV_LATENCY_LEVEL_EVENTID,
  1670. /** Result from firmware about completed scheduler probing */
  1671. WMI_VDEV_SCHED_MODE_PROBE_RESP_EVENTID,
  1672. /** Connect response */
  1673. WMI_VDEV_OOB_CONNECTION_RESP_EVENTID,
  1674. /* peer specific events */
  1675. /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
  1676. WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  1677. /** Peer Info Event with data_rate, RSSI, tx_fail_cnt etc */
  1678. WMI_PEER_INFO_EVENTID,
  1679. /** Event indicating that TX fail count reaching threshold */
  1680. WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
  1681. /* Return the estimate link speed for the Peer specified in the
  1682. * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
  1683. */
  1684. WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
  1685. /* Return the peer state
  1686. * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
  1687. */
  1688. WMI_PEER_STATE_EVENTID,
  1689. /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
  1690. * After that, host will send Mx message.
  1691. * Otherwise, host will pause any Mx(STA:M2/M4) message
  1692. */
  1693. WMI_PEER_ASSOC_CONF_EVENTID,
  1694. /* FW response to Host for peer delete cmdid */
  1695. WMI_PEER_DELETE_RESP_EVENTID,
  1696. /** Valid rate code list for peer */
  1697. WMI_PEER_RATECODE_LIST_EVENTID,
  1698. WMI_WDS_PEER_EVENTID,
  1699. WMI_PEER_STA_PS_STATECHG_EVENTID,
  1700. /** Peer Ant Div Info Event with RSSI per chain, etc */
  1701. WMI_PEER_ANTDIV_INFO_EVENTID,
  1702. /*
  1703. * WMI_PEER_RESERVED_EVENTID
  1704. * These values are used for placeholders, to allow the subsequent
  1705. * WMI_PEER_OPER_MODE_CHANGE_EVENTID constant to have the same value
  1706. * as it had in its original location, when it was mistakenly placed
  1707. * amongst the WMI_PEER CMDID defs.
  1708. *
  1709. * These WMI_PEER_RESERVED values can be replaced with actual WMI peer
  1710. * event message IDs, though it will be simpler to instead add new
  1711. * WMI_PEER EVENTID defs at the end of the WMI_GRP_PEER WMI_EVT_GRP.
  1712. */
  1713. WMI_PEER_RESERVED0_EVENTID,
  1714. WMI_PEER_RESERVED1_EVENTID,
  1715. WMI_PEER_RESERVED2_EVENTID,
  1716. WMI_PEER_RESERVED3_EVENTID,
  1717. WMI_PEER_RESERVED4_EVENTID,
  1718. WMI_PEER_RESERVED5_EVENTID,
  1719. WMI_PEER_RESERVED6_EVENTID,
  1720. WMI_PEER_RESERVED7_EVENTID,
  1721. WMI_PEER_RESERVED8_EVENTID,
  1722. WMI_PEER_RESERVED9_EVENTID,
  1723. WMI_PEER_RESERVED10_EVENTID,
  1724. /** Peer operating mode change indication sent to host to update stats */
  1725. WMI_PEER_OPER_MODE_CHANGE_EVENTID,
  1726. /** report the current tx PN for the peer */
  1727. WMI_PEER_TX_PN_RESPONSE_EVENTID,
  1728. WMI_PEER_CFR_CAPTURE_EVENTID,
  1729. /* Peer Create Conf event to confirm fw had received WMI_PEER_CREATE_CMDID
  1730. * and status of WMI_PEER_CREATE_CMDID.
  1731. */
  1732. WMI_PEER_CREATE_CONF_EVENTID,
  1733. WMI_PEER_RX_PN_RESPONSE_EVENTID,
  1734. /* beacon/mgmt specific events */
  1735. /** RX management frame. the entire frame is carried along with the event. */
  1736. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  1737. /** software beacon alert event to Host requesting host to Queue a beacon for transmission
  1738. use only in host beacon mode */
  1739. WMI_HOST_SWBA_EVENTID,
  1740. /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theoretical value.
  1741. tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
  1742. staggered beacon transmission mode */
  1743. WMI_TBTTOFFSET_UPDATE_EVENTID,
  1744. /** event after the first beacon is transmitted following
  1745. a change in the template.*/
  1746. WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
  1747. /** event after the first probe response is transmitted following
  1748. a change in the template.*/
  1749. WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
  1750. /** Event for Mgmt TX completion event */
  1751. WMI_MGMT_TX_COMPLETION_EVENTID,
  1752. /** Event for Mgmt TX bundle completion event */
  1753. WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
  1754. /** vdev_map used in WMI_TBTTOFFSET_UPDATE_EVENTID supports max 32 vdevs.
  1755. * Use this event if number of vdevs > 32.
  1756. */
  1757. WMI_TBTTOFFSET_EXT_UPDATE_EVENTID,
  1758. /** Event for offchan data TX completion event */
  1759. WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID,
  1760. /** software FILS Discovery Frame alert event to Host, requesting host to Queue an FD frame for transmission */
  1761. WMI_HOST_SWFDA_EVENTID,
  1762. /** software beacon alert event to Host requesting host to Queue a beacon for transmission.
  1763. * Used only in host beacon mode. */
  1764. WMI_HOST_SWBA_V2_EVENTID,
  1765. /** Event for QoS null frame TX completion */
  1766. WMI_QOS_NULL_FRAME_TX_COMPLETION_EVENTID,
  1767. /** WMI event for Firmware Consumed/Dropped Rx management frames indication */
  1768. WMI_MGMT_RX_FW_CONSUMED_EVENTID,
  1769. /** WMI event for indication to Host to reap the MGMT SRNG */
  1770. WMI_MGMT_SRNG_REAP_EVENTID,
  1771. /* ADDBA Related WMI Events*/
  1772. /** Indication the completion of the prior
  1773. WMI_PEER_TID_DELBA_CMDID(initiator) */
  1774. WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  1775. /** Indication the completion of the prior
  1776. *WMI_PEER_TID_ADDBA_CMDID(initiator) */
  1777. WMI_TX_ADDBA_COMPLETE_EVENTID,
  1778. /* Seq num returned from hw for a sta/tid pair */
  1779. WMI_BA_RSP_SSN_EVENTID,
  1780. /* Aggregation state requested by BTC */
  1781. WMI_AGGR_STATE_TRIG_EVENTID,
  1782. /** Roam event to trigger roaming on host */
  1783. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  1784. /** matching AP found from list of profiles */
  1785. WMI_PROFILE_MATCH,
  1786. /** roam synch event */
  1787. WMI_ROAM_SYNCH_EVENTID,
  1788. /** roam synch frame event */
  1789. WMI_ROAM_SYNCH_FRAME_EVENTID,
  1790. /** various roam scan stats */
  1791. WMI_ROAM_SCAN_STATS_EVENTID,
  1792. /** Blacklisted AP information event */
  1793. WMI_ROAM_BLACKLIST_EVENTID,
  1794. /** Roam Pre-Authentication start event */
  1795. WMI_ROAM_PREAUTH_START_EVENTID,
  1796. /** Roaming PMKID request event */
  1797. WMI_ROAM_PMKID_REQUEST_EVENTID,
  1798. /** roam stats */
  1799. WMI_ROAM_STATS_EVENTID,
  1800. /** Roam scan channels list */
  1801. WMI_ROAM_SCAN_CHANNEL_LIST_EVENTID,
  1802. /** Firmware roam capability information */
  1803. WMI_ROAM_CAPABILITY_REPORT_EVENTID,
  1804. /** Send AP frame content like beacon/probe resp etc.. */
  1805. WMI_ROAM_FRAME_EVENTID,
  1806. /** Send firmware ini value corresponding to param_id */
  1807. WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID,
  1808. /** roam synch key event */
  1809. WMI_ROAM_SYNCH_KEY_EVENTID,
  1810. /** P2P disc found */
  1811. WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
  1812. /** send noa info to host when noa is changed for beacon tx offload enable */
  1813. WMI_P2P_NOA_EVENTID,
  1814. /** send p2p listen offload stopped event with different reason */
  1815. WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
  1816. /** send event to AP assisted P2P GO to change current DFS channel */
  1817. WMI_P2P_CLI_DFS_AP_BMISS_DETECTED_EVENTID,
  1818. /** Send EGAP Info to host */
  1819. WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
  1820. /* send pdev resume event to host after pdev resume. */
  1821. WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
  1822. /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
  1823. will cary wake reason */
  1824. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  1825. WMI_D0_WOW_DISABLE_ACK_EVENTID,
  1826. WMI_WOW_INITIAL_WAKEUP_EVENTID,
  1827. WMI_WOW_COAP_BUF_INFO_EVENTID,
  1828. /* RTT related event ID */
  1829. /** RTT measurement report */
  1830. WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  1831. /** TSF measurement report */
  1832. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  1833. /** RTT error report */
  1834. WMI_RTT_ERROR_REPORT_EVENTID,
  1835. /** RTT 11az PASN peer create request */
  1836. WMI_RTT_PASN_PEER_CREATE_REQ_EVENTID,
  1837. /** RTT 11az PASN peer delete event */
  1838. WMI_RTT_PASN_PEER_DELETE_EVENTID,
  1839. /*STATS specific events*/
  1840. /** txrx stats event requested by host */
  1841. WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
  1842. /** FW iface link stats Event */
  1843. WMI_IFACE_LINK_STATS_EVENTID,
  1844. /** FW iface peer link stats Event */
  1845. WMI_PEER_LINK_STATS_EVENTID,
  1846. /** FW Update radio stats Event */
  1847. WMI_RADIO_LINK_STATS_EVENTID,
  1848. /** Firmware memory dump Complete event*/
  1849. WMI_UPDATE_FW_MEM_DUMP_EVENTID,
  1850. /** Event indicating the DIAG logs/events supported by FW */
  1851. WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
  1852. /** Instantaneous RSSI event */
  1853. WMI_INST_RSSI_STATS_EVENTID,
  1854. /** FW update tx power levels event */
  1855. WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
  1856. /** This event is used to report wlan stats to host.
  1857. * It is triggered under 3 conditions:
  1858. * (a) Periodic timer timed out, based on the period specified
  1859. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  1860. * (b) Whenever any of the (enabled) stats thresholds specified
  1861. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  1862. * within the current stats period.
  1863. * (c) In response to the one-time wlan stats request of
  1864. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  1865. *
  1866. * If this event is triggered by condition a or b,
  1867. * the stats counters are cleared at the start of each period.
  1868. * But if it is triggered by condition c, stats counters won't be cleared.
  1869. */
  1870. WMI_REPORT_STATS_EVENTID,
  1871. /** Event indicating RCPI of the peer requested by host in the WMI_REQUEST_RCPI_CMDID */
  1872. WMI_UPDATE_RCPI_EVENTID,
  1873. /** This event is used to respond to WMI_REQUEST_PEER_STATS_INFO_CMDID
  1874. * and report peer stats info to host */
  1875. WMI_PEER_STATS_INFO_EVENTID,
  1876. /** This event is used to respond to WMI_REQUEST_RADIO_CHAN_STATS_CMDID
  1877. * and report radio channel stats to host */
  1878. WMI_RADIO_CHAN_STATS_EVENTID,
  1879. /** This event is used to respond to WMI_REQUEST_WLM_STATS_CMDID
  1880. * and report WLM (WLAN latency manager) stats info to host */
  1881. WMI_WLM_STATS_EVENTID,
  1882. /** This event is used to respond to WMI_REQUEST_CTRL_PATH_STATS_CMDID
  1883. * and report stats info to host */
  1884. WMI_CTRL_PATH_STATS_EVENTID,
  1885. /** This event is used to respond to
  1886. * WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID and report stats info to host
  1887. */
  1888. WMI_HALPHY_CTRL_PATH_STATS_EVENTID,
  1889. /** FW IPA link stats Event */
  1890. WMI_IPA_LINK_STATS_EVENTID,
  1891. /* NLO specific events */
  1892. /** NLO match event after the first match */
  1893. WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
  1894. /** NLO scan complete event */
  1895. WMI_NLO_SCAN_COMPLETE_EVENTID,
  1896. /** APFIND specific events */
  1897. WMI_APFIND_EVENTID,
  1898. /** passpoint network match event */
  1899. WMI_PASSPOINT_MATCH_EVENTID,
  1900. /** GTK offload stautus event requested by host */
  1901. WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  1902. /** GTK offload failed to rekey event */
  1903. WMI_GTK_REKEY_FAIL_EVENTID,
  1904. /* CSA handling event */
  1905. WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  1906. /* CSA IE received event */
  1907. WMI_CSA_IE_RECEIVED_EVENTID,
  1908. /*chatter query reply event*/
  1909. WMI_CHATTER_PC_QUERY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
  1910. /** DFS related events */
  1911. WMI_PDEV_DFS_RADAR_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_DFS),
  1912. /** Indicate channel-availability-check completion event to host */
  1913. WMI_VDEV_DFS_CAC_COMPLETE_EVENTID,
  1914. /** Indicate off-channel-availability-check completion event to host */
  1915. WMI_VDEV_ADFS_OCAC_COMPLETE_EVENTID,
  1916. /** echo event in response to echo command */
  1917. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  1918. /* !!IMPORTANT!!
  1919. * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
  1920. * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
  1921. * as we MUST have a fixed value here to maintain compatibility between
  1922. * UTF and the ART2 driver
  1923. */
  1924. /** UTF specific WMI event */
  1925. WMI_PDEV_UTF_EVENTID,
  1926. /** event carries buffered debug messages */
  1927. WMI_DEBUG_MESG_EVENTID,
  1928. /** FW stats(periodic or on shot) */
  1929. WMI_UPDATE_STATS_EVENTID,
  1930. /** debug print message used for tracing FW code while debugging */
  1931. WMI_DEBUG_PRINT_EVENTID,
  1932. /** DCS wlan or non-wlan interference event
  1933. */
  1934. WMI_DCS_INTERFERENCE_EVENTID,
  1935. /** VI spoecific event */
  1936. WMI_PDEV_QVIT_EVENTID,
  1937. /** FW code profile data in response to profile request */
  1938. WMI_WLAN_PROFILE_DATA_EVENTID,
  1939. /* Factory Testing Mode request event
  1940. * used for integrated chipsets */
  1941. WMI_PDEV_FTM_INTG_EVENTID,
  1942. /* avoid list of frequencies .
  1943. */
  1944. WMI_WLAN_FREQ_AVOID_EVENTID,
  1945. /* Indicate the keepalive parameters */
  1946. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  1947. /*Thermal Management event*/
  1948. WMI_THERMAL_MGMT_EVENTID,
  1949. /* Container for DIAG event and log data */
  1950. WMI_DIAG_DATA_CONTAINER_EVENTID,
  1951. /* host auto shutdown event */
  1952. WMI_HOST_AUTO_SHUTDOWN_EVENTID,
  1953. /*update mib counters together with WMI_UPDATE_STATS_EVENTID*/
  1954. WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
  1955. /*update ht/vht info based on vdev (rx and tx NSS and preamble)*/
  1956. WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
  1957. WMI_DIAG_EVENTID,
  1958. /** Set OCB Sched Response, deprecated */
  1959. WMI_OCB_SET_SCHED_EVENTID,
  1960. /** event to indicate the flush of the buffered debug messages is complete*/
  1961. WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
  1962. /** event to report mix/max RSSI breach events */
  1963. WMI_RSSI_BREACH_EVENTID,
  1964. /** event to report completion of data storage into flash memory */
  1965. WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
  1966. /** event to report SCPC calibrated data to host */
  1967. WMI_PDEV_UTF_SCPC_EVENTID,
  1968. /** event to provide requested data from the target's flash memory */
  1969. WMI_READ_DATA_FROM_FLASH_EVENTID,
  1970. /** event to report rx aggregation failure frame information */
  1971. WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
  1972. /** event to upload a PKGID to host to identify chip for various products */
  1973. WMI_PKGID_EVENTID,
  1974. /* Thermal Throttling stats event id for every pdev and zones, etc */
  1975. WMI_THERM_THROT_STATS_EVENTID,
  1976. /* WMI UNIT TEST event */
  1977. WMI_UNIT_TEST_EVENTID,
  1978. /** event to report result of host configure SAR2 */
  1979. WMI_SAR2_RESULT_EVENTID,
  1980. /** event to get TX power per input HALPHY parameters */
  1981. WMI_GET_TPC_POWER_EVENTID,
  1982. /** event to provide MU-EDCA Parameters (to update host's beacon config) */
  1983. WMI_MUEDCA_PARAMS_CONFIG_EVENTID,
  1984. /** event to get ELNA BYPASS status */
  1985. WMI_GET_ELNA_BYPASS_EVENTID,
  1986. /** event to report ANI level of the channels */
  1987. WMI_GET_CHANNEL_ANI_EVENTID,
  1988. /* WMI event to available scratch registers */
  1989. WMI_PMM_AVAILABLE_SCRATCH_REG_EVENTID,
  1990. /* WMI event to scratch registers allocation */
  1991. WMI_PMM_SCRATCH_REG_ALLOCATION_COMPLETE_EVENTID,
  1992. /* WMI event to indicate Helath Monitor Infra init done */
  1993. WMI_HEALTH_MON_INIT_DONE_EVENTID,
  1994. /* WMI XGAP enable command response event ID */
  1995. WMI_XGAP_ENABLE_COMPLETE_EVENTID,
  1996. /* T2H HPA message */
  1997. WMI_HPA_EVENTID,
  1998. /* WMI standalone command complete Event */
  1999. WMI_VDEV_STANDALONE_SOUND_COMPLETE_EVENTID,
  2000. /* WMI evt to indicate switch type either to WLAN(XPAN) or non_WLAN(BLE) */
  2001. WMI_AUDIO_TRANSPORT_SWITCH_TYPE_EVENTID,
  2002. /* GPIO Event */
  2003. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  2004. /** upload H_CV info WMI event
  2005. * to indicate uploaded H_CV info to host
  2006. */
  2007. WMI_UPLOADH_EVENTID,
  2008. /** capture H info WMI event
  2009. * to indicate captured H info to host
  2010. */
  2011. WMI_CAPTUREH_EVENTID,
  2012. /* hw RFkill */
  2013. WMI_RFKILL_STATE_CHANGE_EVENTID,
  2014. /* Smart Antenna Controller status */
  2015. WMI_SMARTANT_STATE_CHANGE_EVENTID,
  2016. WMI_GPIO_STATE_RES_EVENTID,
  2017. /* TDLS Event */
  2018. WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
  2019. /* Resmgr Event */
  2020. /* deliver the new channel time quota for home channels */
  2021. WMI_RESMGR_CHAN_TIME_QUOTA_CHANGED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RESMGR),
  2022. /** STA SMPS Event */
  2023. /** force SMPS mode */
  2024. WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
  2025. /*location scan event*/
  2026. /*report the firmware's capability of batch scan*/
  2027. WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  2028. /*batch scan result*/
  2029. WMI_BATCH_SCAN_RESULT_EVENTID,
  2030. /* OEM Event */
  2031. WMI_OEM_CAPABILITY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OEM), /*DEPRECATED*/
  2032. WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
  2033. WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
  2034. WMI_OEM_RESPONSE_EVENTID,
  2035. WMI_OEM_DMA_RING_CFG_RSP_EVENTID,
  2036. WMI_OEM_DMA_BUF_RELEASE_EVENTID,
  2037. WMI_OEM_DATA_EVENTID,
  2038. /* NAN Event */
  2039. WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
  2040. WMI_NAN_DISC_IFACE_CREATED_EVENTID,
  2041. WMI_NAN_DISC_IFACE_DELETED_EVENTID,
  2042. WMI_NAN_STARTED_CLUSTER_EVENTID,
  2043. WMI_NAN_JOINED_CLUSTER_EVENTID,
  2044. WMI_NAN_DMESG_EVENTID,
  2045. /** Event to deliver OEM's NAN specific opaque data */
  2046. WMI_NAN_OEM_DATA_EVENTID,
  2047. /* Coex Event */
  2048. WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
  2049. WMI_SAR_GET_LIMITS_EVENTID,
  2050. /** Dedicated BT Antenna Mode (DBAM) complete event */
  2051. WMI_COEX_DBAM_COMPLETE_EVENTID,
  2052. WMI_TAS_POWER_HISTORY_EVENTID,
  2053. /* LPI Event */
  2054. WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
  2055. WMI_LPI_STATUS_EVENTID,
  2056. WMI_LPI_HANDOFF_EVENTID,
  2057. /* ExtScan events */
  2058. WMI_EXTSCAN_START_STOP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
  2059. WMI_EXTSCAN_OPERATION_EVENTID,
  2060. WMI_EXTSCAN_TABLE_USAGE_EVENTID,
  2061. WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
  2062. WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
  2063. WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
  2064. WMI_EXTSCAN_CAPABILITIES_EVENTID,
  2065. WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
  2066. /* mDNS offload events */
  2067. WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
  2068. /* SAP Authentication offload events */
  2069. WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
  2070. WMI_SAP_OFL_DEL_STA_EVENTID,
  2071. WMI_SAP_OBSS_DETECTION_REPORT_EVENTID,
  2072. /* OBSS Offloads events */
  2073. WMI_OBSS_COLOR_COLLISION_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OBSS_OFL),
  2074. /** Out-of-context-of-bss (OCB) events */
  2075. WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
  2076. WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
  2077. WMI_DCC_GET_STATS_RESP_EVENTID,
  2078. WMI_DCC_UPDATE_NDL_RESP_EVENTID,
  2079. WMI_DCC_STATS_EVENTID,
  2080. /* System-On-Chip events */
  2081. WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
  2082. WMI_SOC_HW_MODE_TRANSITION_EVENTID,
  2083. WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
  2084. /** Motion Aided WiFi Connectivity (MAWC) events */
  2085. WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
  2086. /** pkt filter (BPF) offload relevant events */
  2087. WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  2088. WMI_BPF_VDEV_STATS_INFO_EVENTID,
  2089. WMI_BPF_GET_VDEV_WORK_MEMORY_RESP_EVENTID,
  2090. /* RMC specific event */
  2091. /* RMC manual leader selected event */
  2092. WMI_RMC_NEW_LEADER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
  2093. /** WMI events related to regulatory offload */
  2094. WMI_REG_CHAN_LIST_CC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_REGULATORY),
  2095. WMI_11D_NEW_COUNTRY_EVENTID,
  2096. WMI_REG_CHAN_LIST_CC_EXT_EVENTID,
  2097. WMI_AFC_EVENTID,
  2098. WMI_REG_CHAN_LIST_CC_EXT2_EVENTID, /* DEPRECATED */
  2099. /** Events for TWT(Target Wake Time) of STA and AP */
  2100. WMI_TWT_ENABLE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TWT),
  2101. WMI_TWT_DISABLE_COMPLETE_EVENTID,
  2102. WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID,
  2103. WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID,
  2104. WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID,
  2105. WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID,
  2106. WMI_TWT_BTWT_INVITE_STA_COMPLETE_EVENTID,
  2107. WMI_TWT_BTWT_REMOVE_STA_COMPLETE_EVENTID,
  2108. WMI_TWT_SESSION_STATS_EVENTID,
  2109. WMI_TWT_NUDGE_DIALOG_COMPLETE_EVENTID,
  2110. WMI_TWT_NOTIFY_EVENTID,
  2111. WMI_TWT_ACK_EVENTID,
  2112. /** Events in Prototyping phase */
  2113. WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
  2114. WMI_NDP_INITIATOR_RSP_EVENTID,
  2115. WMI_NDP_RESPONDER_RSP_EVENTID,
  2116. WMI_NDP_END_RSP_EVENTID,
  2117. WMI_NDP_INDICATION_EVENTID,
  2118. WMI_NDP_CONFIRM_EVENTID,
  2119. WMI_NDP_END_INDICATION_EVENTID,
  2120. WMI_WLAN_COEX_BT_ACTIVITY_EVENTID,
  2121. WMI_NDL_SCHEDULE_UPDATE_EVENTID,
  2122. WMI_NDP_EVENTID,
  2123. /** WMI events related to motion detection */
  2124. WMI_MOTION_DET_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MOTION_DET),
  2125. WMI_MOTION_DET_BASE_LINE_HOST_EVENTID,
  2126. /** WMI events related to Estimation of Service Parameters (802.11mc) */
  2127. WMI_ESP_ESTIMATE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ESP),
  2128. /** WMI events related to Audio Frame aggregation feature **/
  2129. WMI_AUDIO_AGGR_REPORT_STATISTICS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AUDIO),
  2130. WMI_AUDIO_AGGR_SCHED_METHOD_EVENTID,
  2131. /** Vendor defined WMI events **/
  2132. WMI_VENDOR_PDEV_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VENDOR),
  2133. WMI_VENDOR_VDEV_EVENTID,
  2134. WMI_VENDOR_PEER_EVENTID,
  2135. /** Further vendor event IDs can be added below **/
  2136. /** WMI event specific to MLO **/
  2137. /** MLO link active / inactive response event */
  2138. WMI_MLO_LINK_SET_ACTIVE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MLO),
  2139. /* Response event for MLO setup cmd */
  2140. WMI_MLO_SETUP_COMPLETE_EVENTID,
  2141. /* Response event for MLO teardown cmd */
  2142. WMI_MLO_TEARDOWN_COMPLETE_EVENTID,
  2143. /* Response event for Link Removal Cmd */
  2144. WMI_MLO_LINK_REMOVAL_EVENTID,
  2145. /* Response event for WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID */
  2146. WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_EVENTID,
  2147. /* Response event for WMI_MLO_VDEV_GET_LINK_INFO_CMDID */
  2148. WMI_MLO_VDEV_LINK_INFO_EVENTID,
  2149. /** request host to do T2LM neg to the un-disabled link */
  2150. WMI_MLO_LINK_DISABLE_REQUEST_EVENTID,
  2151. /** request host to switch to new link for specified vdev */
  2152. WMI_MLO_LINK_SWITCH_REQUEST_EVENTID,
  2153. /** Response event for WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID */
  2154. WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_EVENTID,
  2155. /** WMI Event to spcify reason for link state switch */
  2156. WMI_MLO_LINK_STATE_SWITCH_EVENTID,
  2157. /** WMI Event to sync link info to host */
  2158. WMI_MLO_LINK_INFO_SYNC_EVENTID,
  2159. /** WMI Event to announce host about the TLT update for TID */
  2160. WMI_MLO_TLT_SELECTION_FOR_TID_SPRAY_EVENTID,
  2161. /** WMI Event to send the status of T2LM configured */
  2162. WMI_MLO_PEER_TID_TO_LINK_MAP_EVENTID,
  2163. /* WMI event specific to Quiet handling */
  2164. WMI_QUIET_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_QUIET_OFL),
  2165. /* ODD events */
  2166. WMI_ODD_LIVEDUMP_RESPONSE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ODD),
  2167. /** WMI events specific to manually-triggered UL */
  2168. /**
  2169. * WMI Event to send Manual UL OFDMA Trigger frame status feedback to Host
  2170. */
  2171. WMI_MANUAL_UL_OFDMA_TRIG_FEEDBACK_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MANUAL_UL_TRIG),
  2172. /**
  2173. * WMI Event to send Manual UL OFDMA Trigger frame RX PPDU info to Host
  2174. */
  2175. WMI_MANUAL_UL_OFDMA_TRIG_RX_PEER_USERINFO_EVENTID,
  2176. } WMI_EVT_ID;
  2177. /* defines for OEM message sub-types */
  2178. #define WMI_OEM_CAPABILITY_REQ 0x01
  2179. #define WMI_OEM_CAPABILITY_RSP 0x02
  2180. #define WMI_OEM_MEASUREMENT_REQ 0x03
  2181. #define WMI_OEM_MEASUREMENT_RSP 0x04
  2182. #define WMI_OEM_ERROR_REPORT_RSP 0x05
  2183. #define WMI_OEM_NAN_MEAS_REQ 0x06
  2184. #define WMI_OEM_NAN_MEAS_RSP 0x07
  2185. #define WMI_OEM_NAN_PEER_INFO 0x08
  2186. #define WMI_OEM_CONFIGURE_LCR 0x09
  2187. #define WMI_OEM_CONFIGURE_LCI 0x0A
  2188. #define WMI_CHAN_LIST_TAG 0x1
  2189. #define WMI_SSID_LIST_TAG 0x2
  2190. #define WMI_BSSID_LIST_TAG 0x3
  2191. #define WMI_IE_TAG 0x4
  2192. #define WMI_SCAN_START_OFFSET_TAG 0x5
  2193. typedef struct {
  2194. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  2195. /** primary 20 MHz channel frequency in mhz */
  2196. A_UINT32 mhz;
  2197. /** Center frequency 1 in MHz*/
  2198. A_UINT32 band_center_freq1;
  2199. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  2200. A_UINT32 band_center_freq2;
  2201. /** channel info described below */
  2202. A_UINT32 info;
  2203. /** contains min power, max power, reg power and reg class id. */
  2204. A_UINT32 reg_info_1;
  2205. /** contains antennamax, max bandwidth */
  2206. A_UINT32 reg_info_2;
  2207. } wmi_channel;
  2208. typedef enum {
  2209. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  2210. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  2211. } wmi_channel_change_cause;
  2212. /** channel info consists of 6 bits of channel mode */
  2213. #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \
  2214. (pwmi_channel)->info &= 0xffffffc0; \
  2215. (pwmi_channel)->info |= (val); \
  2216. } while (0)
  2217. #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
  2218. #define WMI_CHAN_FLAG_HT40_PLUS 6
  2219. #define WMI_CHAN_FLAG_PASSIVE 7
  2220. #define WMI_CHAN_ADHOC_ALLOWED 8
  2221. #define WMI_CHAN_AP_DISABLED 9
  2222. #define WMI_CHAN_FLAG_DFS 10
  2223. #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
  2224. #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
  2225. #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
  2226. #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
  2227. #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
  2228. #define WMI_CHAN_FLAG_DFS_CFREQ2 16 /* Enable radar event reporting for sec80 in VHT80p80 */
  2229. #define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
  2230. #define WMI_CHAN_FLAG_PSC 18 /* Indicate it is a PSC (preferred scanning channel) */
  2231. #define WMI_CHAN_FLAG_NAN_DISABLED 19 /* Indicates that NAN operations are disabled on this channel */
  2232. #define WMI_CHAN_FLAG_STA_DFS 20 /* Indicates if STA should process radar signals */
  2233. #define WMI_CHAN_FLAG_ALLOW_EHT 21 /* EHT (11be) is allowed on this channel */
  2234. #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
  2235. (pwmi_channel)->info |= ((A_UINT32) 1 << flag); \
  2236. } while (0)
  2237. #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag) \
  2238. (((pwmi_channel)->info & ((A_UINT32) 1 << flag)) >> flag)
  2239. #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
  2240. (pwmi_channel)->reg_info_1 &= 0xffffff00; \
  2241. (pwmi_channel)->reg_info_1 |= (val & 0xff); \
  2242. } while (0)
  2243. #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
  2244. #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \
  2245. (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
  2246. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 8); \
  2247. } while (0)
  2248. #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
  2249. #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \
  2250. (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
  2251. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 16); \
  2252. } while (0)
  2253. #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
  2254. #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \
  2255. (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
  2256. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 24); \
  2257. } while (0)
  2258. #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
  2259. #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \
  2260. (pwmi_channel)->reg_info_2 &= 0xffffff00; \
  2261. (pwmi_channel)->reg_info_2 |= (val & 0xff); \
  2262. } while (0)
  2263. #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
  2264. /* max tx power is in 1 dBm units */
  2265. #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
  2266. (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
  2267. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 8); \
  2268. } while (0)
  2269. #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
  2270. /* max bw supported for each channel, enum wmi_channel_width as value */
  2271. #define WMI_SET_CHANNEL_MAX_BANDWIDTH(pwmi_channel,val) do { \
  2272. (pwmi_channel)->reg_info_2 &= 0xff00ffff; \
  2273. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 16); \
  2274. } while (0)
  2275. #define WMI_GET_CHANNEL_MAX_BANDWIDTH(pwmi_channel) ((((pwmi_channel)->reg_info_2) >> 16) & 0xff)
  2276. /** HT Capabilities*/
  2277. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  2278. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  2279. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  2280. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  2281. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  2282. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  2283. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  2284. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  2285. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  2286. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  2287. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  2288. #define WMI_HT_CAP_HT40_SGI 0x0800
  2289. #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
  2290. #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
  2291. /* These macros should be used when we wish to advertise STBC support for
  2292. * only 1SS or 2SS or 3SS. */
  2293. #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  2294. #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  2295. #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  2296. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  2297. WMI_HT_CAP_HT20_SGI | \
  2298. WMI_HT_CAP_HT40_SGI | \
  2299. WMI_HT_CAP_TX_STBC | \
  2300. WMI_HT_CAP_RX_STBC | \
  2301. WMI_HT_CAP_LDPC | \
  2302. WMI_HT_CAP_TX_LDPC | \
  2303. WMI_HT_CAP_RX_LDPC)
  2304. /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  2305. field. The fields not defined here are not supported, or reserved.
  2306. Do not change these masks and if you have to add new one follow the
  2307. bitmask as specified by 802.11ac draft.
  2308. */
  2309. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  2310. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  2311. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  2312. #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
  2313. #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
  2314. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  2315. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  2316. #define WMI_VHT_CAP_SGI_160MHZ 0x00000040
  2317. #define WMI_VHT_CAP_TX_STBC 0x00000080
  2318. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  2319. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  2320. #define WMI_VHT_CAP_SU_BFORMER 0x00000800
  2321. #define WMI_VHT_CAP_SU_BFORMEE 0x00001000
  2322. #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  2323. #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  2324. #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  2325. #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  2326. #define WMI_VHT_CAP_MU_BFORMER 0x00080000
  2327. #define WMI_VHT_CAP_MU_BFORMEE 0x00100000
  2328. #define WMI_VHT_CAP_TXOP_PS 0x00200000
  2329. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  2330. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  2331. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  2332. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  2333. #define WMI_VHT_EXTENDED_NSS_BW_MASK 0xC0000000
  2334. #define WMI_VHT_EXTENDED_NSS_BW_MASK_SHIFT 30
  2335. /* TEMPORARY:
  2336. * Preserve the incorrect old name as an alias for the correct new name
  2337. * until all references to the old name have been removed from all hosts
  2338. * and targets.
  2339. */
  2340. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
  2341. /* These macros should be used when we wish to advertise STBC support for
  2342. * only 1SS or 2SS or 3SS. */
  2343. #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
  2344. #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
  2345. #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
  2346. /* TEMPORARY:
  2347. * Preserve the incorrect old name as an alias for the correct new name
  2348. * until all references to the old name have been removed from all hosts
  2349. * and targets.
  2350. */
  2351. #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
  2352. /* TEMPORARY:
  2353. * Spec does not have VHT TX LDPC capability bit. To Maintain backward
  2354. * compatibility due to previous incorrect definition, the value is moved
  2355. * from 0x4 to 0x0. No new use of WMI_VHT_CAP_TX_LDPC should be added.
  2356. */
  2357. #define WMI_VHT_CAP_TX_LDPC 0x0
  2358. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  2359. WMI_VHT_CAP_SGI_80MHZ | \
  2360. WMI_VHT_CAP_TX_STBC | \
  2361. WMI_VHT_CAP_RX_STBC_MASK | \
  2362. WMI_VHT_CAP_RX_LDPC | \
  2363. WMI_VHT_CAP_TX_LDPC | \
  2364. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  2365. WMI_VHT_CAP_RX_FIXED_ANT | \
  2366. WMI_VHT_CAP_TX_FIXED_ANT)
  2367. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  2368. 802.11ac
  2369. */
  2370. #define WMI_VHT_MAX_MCS_EXT_SS_GET(vht_mcs_map, index) WMI_GET_BITS(vht_mcs_map, 16 + index, 1)
  2371. #define WMI_VHT_MAX_MCS_EXT_SS_SET(vht_mcs_map, index, value) WMI_SET_BITS(vht_mcs_map, 16 + index, 1, value)
  2372. /* Notification bit for Ext MCS 10/11 support */
  2373. #define WMI_VHT_MCS_NOTIFY_EXT_SS_GET(vht_mcs_map) WMI_GET_BITS(vht_mcs_map, 24, 1)
  2374. #define WMI_VHT_MCS_NOTIFY_EXT_SS_SET(vht_mcs_map, value) WMI_SET_BITS(vht_mcs_map, 24, 1, value)
  2375. #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  2376. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  2377. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  2378. /** 11ax capabilities */
  2379. #define WMI_HE_CAP_PPE_PRESENT 0x00000001
  2380. #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
  2381. #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
  2382. #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
  2383. #define WMI_HE_FRAG_SUPPORT_SHIFT 3
  2384. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT 0x00000001
  2385. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT 0x00000002
  2386. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT 0x00000004
  2387. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT 0x00000018
  2388. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT 0x00000030
  2389. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  2390. WMI_GET_BITS(he_cap_info_dword1, 0, 1)
  2391. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  2392. WMI_SET_BITS(he_cap_info_dword1, 0, 1, value)
  2393. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  2394. WMI_GET_BITS(he_cap_info_dword1, 1, 1)
  2395. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  2396. WMI_SET_BITS(he_cap_info_dword1, 1, 1, value)
  2397. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_GET(he_cap_info_dword1) \
  2398. WMI_GET_BITS(he_cap_info_dword1, 2, 1)
  2399. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_SET(he_cap_info_dword1, value) \
  2400. WMI_SET_BITS(he_cap_info_dword1, 2, 1, value)
  2401. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_GET(he_cap_info_dword1) \
  2402. WMI_GET_BITS(he_cap_info_dword1, 3, 2)
  2403. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_SET(he_cap_info_dword1, value) \
  2404. WMI_SET_BITS(he_cap_info_dword1, 3, 2, value)
  2405. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_GET(he_cap_info_dword1) \
  2406. WMI_GET_BITS(he_cap_info_dword1, 5, 2)
  2407. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_SET(he_cap_info_dword1, value) \
  2408. WMI_SET_BITS(he_cap_info_dword1, 5, 2, value)
  2409. /* Interested readers refer to Rx/Tx MCS Map definition as defined in 802.11ax
  2410. */
  2411. #define WMI_HE_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  2412. /*
  2413. * index ranges from 0 to 15, and is used for checking if MCS 12/13 is enabled
  2414. * for a particular NSS.
  2415. * The lower 8 bits (indices 0-7) within the 16 bits indicate MCS 12/13
  2416. * enablement for BW <= 80MHz; the upper 8 bits (indices 8-15) within
  2417. * the 16 bits indicate MCS 12/13 enablement for BW > 80MHz.
  2418. * The 16 bits for the index values are within the upper bits (bits 31:16)
  2419. * of a 32-bit word.
  2420. */
  2421. #define WMI_HE_EXTRA_MCS_SS_GET(he_mcs_map_ext, index) \
  2422. WMI_GET_BITS(he_mcs_map_ext, 16 + index, 1)
  2423. #define WMI_HE_EXTRA_MCS_SS_SET(he_mcs_map_ext, index, value) \
  2424. WMI_SET_BITS(he_mcs_map_ext, 16 + index, 1, value)
  2425. /* fragmentation support field value */
  2426. enum {
  2427. WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
  2428. WMI_HE_FRAG_SUPPORT_LEVEL1, /* support for fragments within a VHT single MPDU, no support for fragments within AMPDU */
  2429. WMI_HE_FRAG_SUPPORT_LEVEL2, /* support for up to 1 fragment per MSDU within a single A-MPDU */
  2430. WMI_HE_FRAG_SUPPORT_LEVEL3, /* support for multiple fragments per MSDU within an A-MPDU */
  2431. };
  2432. enum {
  2433. WMI_HE_RX_DL_OFDMA_SUPPORT_DEFAULT, /* Default */
  2434. WMI_HE_RX_DL_OFDMA_SUPPORT_DISABLE, /* RX DL OFDMA Support Disabled */
  2435. WMI_HE_RX_DL_OFDMA_SUPPORT_ENABLE, /* RX DL OFDMA Support Enabled */
  2436. WMI_HE_RX_DL_OFDMA_SUPPORT_INVALID, /* INVALID */
  2437. };
  2438. enum {
  2439. WMI_HE_RX_DL_MUMIMO_SUPPORT_DEFAULT, /* Default */
  2440. WMI_HE_RX_DL_MUMIMO_SUPPORT_DISABLE, /* RX DL MU-MIMO Support Disabled */
  2441. WMI_HE_RX_DL_MUMIMO_SUPPORT_ENABLE, /* RX DL MU-MIMO Support Enabled */
  2442. WMI_HE_RX_DL_MUMIMO_SUPPORT_INVALID, /* INVALID */
  2443. };
  2444. /** NOTE: This defs cannot be changed in the future without breaking WMI compatibility */
  2445. #define WMI_MAX_NUM_SS MAX_HE_NSS
  2446. #define WMI_MAX_NUM_RU MAX_HE_RU
  2447. /*
  2448. * Figure 8 554ae: -PPE Threshold Info field format
  2449. * we pack PPET16 and PPT8 for four RU's in one element of array.
  2450. *
  2451. * ppet16_ppet8_ru3_ru0 array element 0 holds:
  2452. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  2453. *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
  2454. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  2455. *
  2456. * ppet16_ppet8_ru3_ru0 array element 1 holds:
  2457. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  2458. *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
  2459. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  2460. *
  2461. * etc.
  2462. */
  2463. /*
  2464. * Note that in these macros, "ru" is one-based, not zero-based, while
  2465. * nssm1 is zero-based.
  2466. */
  2467. #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  2468. do { \
  2469. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6)); \
  2470. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet & 7) << (((ru-1) & 3) * 6)); \
  2471. } while (0)
  2472. #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  2473. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6)) & 7)
  2474. #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  2475. do { \
  2476. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6 + 3)); \
  2477. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1) & 3) * 6 + 3)); \
  2478. } while (0)
  2479. #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  2480. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6 + 3)) & 7)
  2481. typedef struct _wmi_ppe_threshold {
  2482. A_UINT32 numss_m1; /** NSS - 1*/
  2483. union {
  2484. A_UINT32 ru_count; /** RU COUNT OBSOLETE to be removed after few versions */
  2485. A_UINT32 ru_mask; /** RU index mask */
  2486. };
  2487. A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; /** ppet8 and ppet16 for max num ss */
  2488. /**************************************************
  2489. * As this struct is embedded inside other structs,
  2490. * it cannot be expanded without breaking backwards
  2491. * compatibility. Do not add new fields here.
  2492. **************************************************/
  2493. } wmi_ppe_threshold;
  2494. #define WMI_MAX_EHTCAP_MAC_SIZE 2
  2495. #define WMI_MAX_EHTCAP_PHY_SIZE 3
  2496. /*
  2497. * 0 – index indicated EHT-MCS map for 20Mhz only sta (4 bytes valid)
  2498. * 1 – index for <= 80MHz bw (only 3 bytes are valid and other is reserved)
  2499. * 2 – index for == 160Mhz bw (only 3 bytes are valid and other is reserved)
  2500. * 3 – index for == 320Mhz bw (only 3 bytes are valid and other is reserved)
  2501. */
  2502. enum {
  2503. WMI_EHT_SUPP_MCS_20MHZ_ONLY,
  2504. WMI_EHT_SUPP_MCS_LE_80MHZ,
  2505. WMI_EHT_SUPP_MCS_160MHZ,
  2506. WMI_EHT_SUPP_MCS_320MHZ,
  2507. };
  2508. #define WMI_MAX_EHT_SUPP_MCS_2G_SIZE 2
  2509. #define WMI_MAX_EHT_SUPP_MCS_5G_SIZE 4
  2510. /* WMI_SYS_CAPS_* refer to the capabilities that system support
  2511. */
  2512. #define WMI_SYS_CAP_ENABLE 0x00000001
  2513. #define WMI_SYS_CAP_TXPOWER 0x00000002
  2514. /*
  2515. * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
  2516. * Bits 5:0 are reserved
  2517. */
  2518. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
  2519. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
  2520. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
  2521. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
  2522. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
  2523. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
  2524. #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
  2525. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
  2526. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  2527. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  2528. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  2529. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  2530. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  2531. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  2532. #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  2533. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  2534. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
  2535. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
  2536. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
  2537. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
  2538. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
  2539. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
  2540. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
  2541. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
  2542. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
  2543. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
  2544. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
  2545. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
  2546. #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
  2547. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
  2548. #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
  2549. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
  2550. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
  2551. ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  2552. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
  2553. ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  2554. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
  2555. ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  2556. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
  2557. ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  2558. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
  2559. ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  2560. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
  2561. ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  2562. #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
  2563. ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  2564. #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
  2565. ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  2566. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
  2567. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
  2568. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
  2569. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS (28)
  2570. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS (27)
  2571. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  2572. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  2573. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  2574. #define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  2575. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  2576. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
  2577. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
  2578. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
  2579. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
  2580. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
  2581. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
  2582. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_SET(scan_cfg, value) \
  2583. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS, 1, value)
  2584. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_SET(scan_cfg, value) \
  2585. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS, 1, value)
  2586. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
  2587. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  2588. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
  2589. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  2590. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
  2591. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  2592. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_GET(scan_cfg) \
  2593. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  2594. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_GET(scan_cfg) \
  2595. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  2596. #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
  2597. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
  2598. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS (29)
  2599. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS (28)
  2600. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS (27)
  2601. #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS (26)
  2602. #define WMI_DBS_FW_MODE_CFG_DBS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  2603. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  2604. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  2605. #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)
  2606. #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)
  2607. #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_MASK ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS)
  2608. #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
  2609. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
  2610. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
  2611. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
  2612. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_SET(fw_mode, value) \
  2613. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS, 1, value)
  2614. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_SET(fw_mode, value) \
  2615. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS, 1, value)
  2616. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_SET(fw_mode, value) \
  2617. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS, 1, value)
  2618. #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_SET(fw_mode, value) \
  2619. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS, 1, value)
  2620. #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
  2621. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  2622. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
  2623. ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  2624. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_GET(fw_mode) \
  2625. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  2626. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_GET(fw_mode) \
  2627. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  2628. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_GET(fw_mode) \
  2629. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  2630. #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_GET(fw_mode) \
  2631. ((fw_mode & WMI_DBS_FW_MODE_CFG_ASYNC_SBS_MASK) >> WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS)
  2632. /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
  2633. typedef struct _wmi_abi_version {
  2634. A_UINT32 abi_version_0; /** WMI Major and Minor versions */
  2635. A_UINT32 abi_version_1; /** WMI change revision */
  2636. A_UINT32 abi_version_ns_0; /** ABI version namespace first four dwords */
  2637. A_UINT32 abi_version_ns_1; /** ABI version namespace second four dwords */
  2638. A_UINT32 abi_version_ns_2; /** ABI version namespace third four dwords */
  2639. A_UINT32 abi_version_ns_3; /** ABI version namespace fourth four dwords */
  2640. } wmi_abi_version;
  2641. /*
  2642. * maximum number of memory requests allowed from FW.
  2643. */
  2644. #define WMI_MAX_MEM_REQS 16
  2645. /* !!NOTE!!:
  2646. * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
  2647. * Please don't change it.
  2648. */
  2649. #define HW_BD_INFO_SIZE 5
  2650. /**
  2651. * PDEV ID to identify the physical device,
  2652. * value 0 reserved for SOC level commands/event
  2653. */
  2654. #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
  2655. #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
  2656. #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
  2657. #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
  2658. /*
  2659. * Enum regarding which BDF elements are provided in which elements of the
  2660. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  2661. */
  2662. typedef enum {
  2663. BDF_VERSION = 0,
  2664. REF_DESIGN_ID = 1,
  2665. CUSTOMER_ID = 2,
  2666. PROJECT_ID = 3,
  2667. BOARD_DATA_REV = 4,
  2668. } wmi_hw_bd_info_e;
  2669. /*
  2670. * Macros to get/set BDF details within the
  2671. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  2672. */
  2673. #define WMI_GET_BDF_VERSION(hw_bd_info) ((hw_bd_info)[BDF_VERSION])
  2674. #define WMI_GET_REF_DESIGN(hw_bd_info) ((hw_bd_info)[REF_DESIGN_ID])
  2675. #define WMI_GET_CUSTOMER_ID(hw_bd_info) ((hw_bd_info)[CUSTOMER_ID])
  2676. #define WMI_GET_PROJECT_ID(hw_bd_info) ((hw_bd_info)[PROJECT_ID])
  2677. #define WMI_GET_BOARD_DATA_REV(hw_bd_info) ((hw_bd_info)[BOARD_DATA_REV])
  2678. #define WMI_SET_BDF_VERSION(hw_bd_info, val) ((hw_bd_info)[BDF_VERSION] = (val))
  2679. #define WMI_SET_REF_DESIGN(hw_bd_info, val) ((hw_bd_info)[REF_DESIGN_ID] = (val))
  2680. #define WMI_SET_CUSTOMER_ID(hw_bd_info, val) ((hw_bd_info)[CUSTOMER_ID] = (val))
  2681. #define WMI_SET_PROJECT_ID(hw_bd_info, val) ((hw_bd_info)[PROJECT_ID] = (val))
  2682. #define WMI_SET_BOARD_DATA_REV(hw_bd_info, val) ((hw_bd_info)[BOARD_DATA_REV] = (val))
  2683. /*
  2684. * Enum to indicate which Tx power capability is provided in which element of
  2685. * hw_tx_power_signed
  2686. */
  2687. typedef enum {
  2688. WMI_HW_MIN_TX_POWER_SIGNED = 0,
  2689. WMI_HW_MAX_TX_POWER_SIGNED = 1,
  2690. WMI_HW_TX_POWER_CAPS_MAX,
  2691. } wmi_hw_tx_power_caps;
  2692. /**
  2693. * The following struct holds optional payload for
  2694. * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
  2695. * device capability to the host.
  2696. */
  2697. typedef struct {
  2698. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
  2699. A_UINT32 fw_build_vers; /* firmware build number */
  2700. wmi_abi_version fw_abi_vers;
  2701. A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
  2702. A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
  2703. A_UINT32 num_rf_chains;
  2704. /* The following field is only valid for service type WMI_SERVICE_11AC */
  2705. A_UINT32 ht_cap_info; /* WMI HT Capability */
  2706. A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
  2707. A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  2708. A_UINT32 hw_min_tx_power;
  2709. A_UINT32 hw_max_tx_power;
  2710. /* sys_cap_info:
  2711. * bits 1:0 - RXTX LED + RFKILL enable flags (see WMI_LEDRFKILL_FLAGS)
  2712. * bits 31:2 - reserved (must be set to zero)
  2713. */
  2714. A_UINT32 sys_cap_info;
  2715. A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  2716. /** Max beacon and Probe Response IE offload size (includes
  2717. * optional P2P IEs) */
  2718. A_UINT32 max_bcn_ie_size;
  2719. /*
  2720. * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
  2721. * FW uses this as FW extesnsion memory for saving its data structures. Only valid
  2722. * for low latency interfaces like PCIE where FW can access this memory directly (or)
  2723. * by DMA.
  2724. */
  2725. A_UINT32 num_mem_reqs;
  2726. /* Max No. scan channels target can support
  2727. * If FW is too old and doesn't indicate this number, host side value will default to
  2728. * 0, and host will take the original compatible value (62) for future scan channel
  2729. * setup.
  2730. */
  2731. A_UINT32 max_num_scan_channels;
  2732. /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
  2733. * Default 0 means that hw_bd_info[] is invalid (legacy board).
  2734. */
  2735. A_UINT32 hw_bd_id;
  2736. A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
  2737. /*
  2738. * Number of MACs supported, i.e. a DBS-capable device will return 2
  2739. */
  2740. A_UINT32 max_supported_macs;
  2741. /*
  2742. * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
  2743. */
  2744. A_UINT32 wmi_fw_sub_feat_caps; /* values from enum WMI_FW_SUB_FEAT_CAPS */
  2745. /*
  2746. * Number of Dual Band Simultaneous (DBS) hardware modes
  2747. */
  2748. A_UINT32 num_dbs_hw_modes;
  2749. /*
  2750. * txrx_chainmask
  2751. * [7:0] - 2G band tx chain mask
  2752. * [15:8] - 2G band rx chain mask
  2753. * [23:16] - 5G band tx chain mask
  2754. * [31:24] - 5G band rx chain mask
  2755. *
  2756. */
  2757. A_UINT32 txrx_chainmask;
  2758. /*
  2759. * default Dual Band Simultaneous (DBS) hardware mode
  2760. */
  2761. A_UINT32 default_dbs_hw_mode_index;
  2762. /*
  2763. * Number of msdu descriptors target would use
  2764. */
  2765. A_UINT32 num_msdu_desc;
  2766. /* This ready_event_fixed_param TLV is followed by the below TLVs:
  2767. * HAL_REG_CAPABILITIES hal_reg_capabilities;
  2768. * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  2769. * wlan_host_mem_req mem_reqs[];
  2770. * A_UINT32 wlan_dbs_hw_mode_list[];
  2771. */
  2772. } wmi_service_ready_event_fixed_param;
  2773. typedef enum {
  2774. WMI_RXTX_LED_ENABLE = 0x00000001,
  2775. WMI_RFKILL_ENABLE = 0x00000002,
  2776. } WMI_LEDRFKILL_FLAGS;
  2777. #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
  2778. typedef struct {
  2779. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param */
  2780. /*
  2781. * The wmi_service_segment offset field specifies the position within the
  2782. * logical bitmap of WMI service flags at which the WMI service flags
  2783. * specified within this message begin.
  2784. * Since the first 128 WMI service flags are specified within the
  2785. * wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT message,
  2786. * the wmi_service_segment_offset value is expected to be 128 or more.
  2787. */
  2788. A_UINT32 wmi_service_segment_offset;
  2789. A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
  2790. /*
  2791. * This TLV is followed by the below TLVs:
  2792. * A_UINT32 wmi_service_ext_bitmap[]
  2793. * The wmi_service_ext_bitmap covers WMI service flags at the offset where
  2794. * wmi_service_available_event_fixed_param.wmi_service_segment_bitmap
  2795. * leaves off.
  2796. * For example, if
  2797. * wmi_service_available_event_fixed_param.wmi_service_segment_offset
  2798. * is 128, then
  2799. * wmi_service_available_event_fixed_param.wmi_service_segment_bitmap
  2800. * will cover WMI service flags
  2801. * 128 to (128 + WMI_SERVICE_SEGMENT_BM_SIZE32 * 32) = 128 to 256
  2802. * and wmi_service_ext_bitmap will cover WMI service flags starting at 256.
  2803. */
  2804. } wmi_service_available_event_fixed_param;
  2805. /*
  2806. * HDL version GET/SET APIs
  2807. */
  2808. #define WMI_HDL_VERSION_BITPOS 0
  2809. #define WMI_HDL_VERSION_NUM_BITS 10
  2810. #define WMI_HDL_VERSION_GET(dword) WMI_GET_BITS(dword, WMI_HDL_VERSION_BITPOS, WMI_HDL_VERSION_NUM_BITS)
  2811. #define WMI_HDL_VERSION_SET(dword, value) WMI_SET_BITS(dword, WMI_HDL_VERSION_BITPOS, WMI_HDL_VERSION_NUM_BITS, value)
  2812. typedef struct {
  2813. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT */
  2814. /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
  2815. A_UINT32 default_conc_scan_config_bits;
  2816. /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
  2817. A_UINT32 default_fw_config_bits;
  2818. wmi_ppe_threshold ppet;
  2819. A_UINT32 he_cap_info; /* see section 8.4.2.213 from draft r8 of 802.11ax; see WMI_HE_FRAG_SUPPORT enum */
  2820. /*
  2821. * An HT STA shall not allow transmission of more than one MPDU start
  2822. * within the time limit described in the MPDU maximum density field.
  2823. */
  2824. A_UINT32 mpdu_density; /* units are microseconds */
  2825. /*
  2826. * Maximum no of BSSID based RX filters host can program
  2827. * Value 0 means FW hasn't given any limit to host.
  2828. */
  2829. A_UINT32 max_bssid_rx_filters;
  2830. /*
  2831. * Extended FW build version information:
  2832. * bits 9:0 -> HDL version info
  2833. * bits 12:10 -> CRM sub ID MSbs (refer to WMI_SVC_RDY_CRM_SUB_ID_GET/SET)
  2834. * bits 27:13 -> reserved
  2835. * bits 31:28 -> CRM sub ID LSbs (refer to WMI_SVC_RDY_CRM_SUB_ID_GET/SET)
  2836. */
  2837. A_UINT32 fw_build_vers_ext;
  2838. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  2839. * This limit is the maximum number of SSIDs that can be configured in the
  2840. * target for Network List Offload (i.e. scanning for a preferred network).
  2841. * If this value is 0x0, the target supports WMI_NLO_MAX_SSIDS (16).
  2842. * If this value is non-zero, the host should send back in the
  2843. * WMI_INIT message's wmi_resource_config.max_nlo_ssids a value that
  2844. * is equal to or less than the target capability limit reported here.
  2845. */
  2846. A_UINT32 max_nlo_ssids;
  2847. /* ref to section 8.4.2.48 Multiple BSSID element
  2848. * The Max BSSID Indicator field contains a value assigned to n,
  2849. * where 2^n is the maximum number of BSSIDs
  2850. */
  2851. A_UINT32 max_bssid_indicator;
  2852. /* 2nd DWORD of HE MAC Capabilities */
  2853. A_UINT32 he_cap_info_ext;
  2854. /**************************************************************************
  2855. * DON'T ADD ANY FURTHER FIELDS HERE -
  2856. * It would cause the size of the READY_EXT message within some targets
  2857. * to exceed the size of the buffer used for the message.
  2858. **************************************************************************/
  2859. /*
  2860. * A variable-length TLV array of wmi_chan_rf_characterization_info will
  2861. * follow this fixed_param TLV, containing rx characterization info for
  2862. * primary channels.
  2863. * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
  2864. */
  2865. } wmi_service_ready_ext_event_fixed_param;
  2866. #define WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX 28
  2867. #define WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS 4
  2868. #define WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX 10
  2869. #define WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS 3
  2870. #define WMI_SVC_RDY_CRM_SUB_ID_GET(var, val) \
  2871. WMI_APPEND_TWO_GET_BITS( \
  2872. var, \
  2873. WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX, \
  2874. WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS, \
  2875. WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX, \
  2876. WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS, \
  2877. val)
  2878. #define WMI_SVC_RDY_CRM_SUB_ID_SET(var, val) \
  2879. WMI_APPEND_TWO_SET_BITS( \
  2880. var, \
  2881. WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX, \
  2882. WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS, \
  2883. WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX, \
  2884. WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS, \
  2885. val)
  2886. /*
  2887. * regdb version GET/SET APIs
  2888. */
  2889. #define WMI_REG_DB_VERSION_MAJOR_BITPOS 0
  2890. #define WMI_REG_DB_VERSION_MINOR_BITPOS 8
  2891. #define WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS 16
  2892. #define WMI_BDF_REG_DB_VERSION_MINOR_BITPOS 24
  2893. #define WMI_REG_DB_VERSION_NUM_BITS 8
  2894. #define WMI_REG_DB_VERSION_MAJOR_GET(dword) \
  2895. WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2896. #define WMI_REG_DB_VERSION_MAJOR_SET(dword, value) \
  2897. WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2898. #define WMI_REG_DB_VERSION_MINOR_GET(dword) \
  2899. WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2900. #define WMI_REG_DB_VERSION_MINOR_SET(dword, value) \
  2901. WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2902. #define WMI_BDF_REG_DB_VERSION_MAJOR_GET(dword) \
  2903. WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2904. #define WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, value) \
  2905. WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2906. #define WMI_BDF_REG_DB_VERSION_MINOR_GET(dword) \
  2907. WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2908. #define WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, value) \
  2909. WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2910. #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) \
  2911. do { \
  2912. WMI_REG_DB_VERSION_MAJOR_SET(dword, reg_db_ver_major); \
  2913. WMI_REG_DB_VERSION_MINOR_SET(dword, reg_db_ver_minor); \
  2914. WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, bdf_reg_db_ver_major); \
  2915. WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, bdf_reg_db_ver_minor); \
  2916. } while (0)
  2917. #define WMI_HW_MIN_TX_POWER_BITPOS 0
  2918. #define WMI_HW_MAX_TX_POWER_BITPOS 16
  2919. #define WMI_HW_MIN_TX_POWER_GET(dword) \
  2920. ((A_INT16) WMI_GET_BITS(dword, WMI_HW_MIN_TX_POWER_BITPOS, 16))
  2921. #define WMI_HW_MIN_TX_POWER_SET(dword, value) \
  2922. WMI_SET_BITS(dword, WMI_HW_MIN_TX_POWER_BITPOS, 16, value)
  2923. #define WMI_HW_MAX_TX_POWER_GET(dword) \
  2924. ((A_INT16) WMI_GET_BITS(dword, WMI_HW_MAX_TX_POWER_BITPOS, 16))
  2925. #define WMI_HW_MAX_TX_POWER_SET(dword, value) \
  2926. WMI_SET_BITS(dword, WMI_HW_MAX_TX_POWER_BITPOS, 16, value)
  2927. #define WMI_MAX_USER_PER_PPDU_UL_OFDMA_GET(dword) \
  2928. WMI_GET_BITS(dword, 0, 16)
  2929. #define WMI_MAX_USER_PER_PPDU_UL_OFDMA_SET(dword, value) \
  2930. WMI_SET_BITS(dword, 0, 16, value)
  2931. #define WMI_MAX_USER_PER_PPDU_DL_OFDMA_GET(dword) \
  2932. WMI_GET_BITS(dword, 16, 16)
  2933. #define WMI_MAX_USER_PER_PPDU_DL_OFDMA_SET(dword, value) \
  2934. WMI_SET_BITS(dword, 16, 16, value)
  2935. #define WMI_MAX_USER_PER_PPDU_UL_MUMIMO_GET(dword) \
  2936. WMI_GET_BITS(dword, 0, 16)
  2937. #define WMI_MAX_USER_PER_PPDU_UL_MUMIMO_SET(dword, value) \
  2938. WMI_SET_BITS(dword, 0, 16, value)
  2939. #define WMI_MAX_USER_PER_PPDU_DL_MUMIMO_GET(dword) \
  2940. WMI_GET_BITS(dword, 16, 16)
  2941. #define WMI_MAX_USER_PER_PPDU_DL_MUMIMO_SET(dword, value) \
  2942. WMI_SET_BITS(dword, 16, 16, value)
  2943. #define WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_GET(target_cap_flags) \
  2944. WMI_GET_BITS(target_cap_flags, 0, 2)
  2945. #define WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_SET(target_cap_flags, value) \
  2946. WMI_SET_BITS(target_cap_flags, 0, 2, value)
  2947. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_2GHZ_GET(target_cap_flags) \
  2948. WMI_GET_BITS(target_cap_flags, 2, 1)
  2949. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_2GHZ_SET(target_cap_flags, value) \
  2950. WMI_SET_BITS(target_cap_flags, 2, 1, value)
  2951. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_2GHZ_GET(target_cap_flags) \
  2952. WMI_GET_BITS(target_cap_flags, 3, 1)
  2953. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_2GHZ_SET(target_cap_flags, value) \
  2954. WMI_SET_BITS(target_cap_flags, 3, 1, value)
  2955. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_5GHZ_GET(target_cap_flags) \
  2956. WMI_GET_BITS(target_cap_flags, 4, 1)
  2957. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_5GHZ_SET(target_cap_flags, value) \
  2958. WMI_SET_BITS(target_cap_flags, 4, 1, value)
  2959. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_5GHZ_GET(target_cap_flags) \
  2960. WMI_GET_BITS(target_cap_flags, 5, 1)
  2961. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_5GHZ_SET(target_cap_flags, value) \
  2962. WMI_SET_BITS(target_cap_flags, 5, 1, value)
  2963. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_6GHZ_GET(target_cap_flags) \
  2964. WMI_GET_BITS(target_cap_flags, 6, 1)
  2965. #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_6GHZ_SET(target_cap_flags, value) \
  2966. WMI_SET_BITS(target_cap_flags, 6, 1, value)
  2967. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_6GHZ_GET(target_cap_flags) \
  2968. WMI_GET_BITS(target_cap_flags, 7, 1)
  2969. #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_6GHZ_SET(target_cap_flags, value) \
  2970. WMI_SET_BITS(target_cap_flags, 7, 1, value)
  2971. #define WMI_TARGET_CAP_MAX_ML_BSS_NUM_GET(target_cap_flags) \
  2972. WMI_GET_BITS(target_cap_flags, 8, 3)
  2973. #define WMI_TARGET_CAP_MAX_ML_BSS_NUM_SET(target_cap_flags, value) \
  2974. WMI_SET_BITS(target_cap_flags, 8, 3, value)
  2975. #define WMI_TARGET_CAP_CONCURRENCE_SUPPORT_GET(target_cap_flags) \
  2976. WMI_GET_BITS(target_cap_flags, 11, 2)
  2977. #define WMI_TARGET_CAP_CONCURRENCE_SUPPORT_SET(target_cap_flags, value) \
  2978. WMI_SET_BITS(target_cap_flags, 11, 2, value)
  2979. #define WMI_TARGET_CAP_MULTIPASS_SAP_SUPPORT_GET(target_cap_flags) \
  2980. WMI_GET_BITS(target_cap_flags, 13, 1)
  2981. #define WMI_TARGET_CAP_MULTIPASS_SAP_SUPPORT_SET(target_cap_flags, value) \
  2982. WMI_SET_BITS(target_cap_flags, 13, 1, value)
  2983. /* ML FULL monitor mode */
  2984. #define WMI_TARGET_CAP_ML_MONITOR_MODE_SUPPORT_GET(target_cap_flags) \
  2985. WMI_GET_BITS(target_cap_flags, 14, 1)
  2986. #define WMI_TARGET_CAP_ML_MONITOR_MODE_SUPPORT_SET(target_cap_flags, value) \
  2987. WMI_SET_BITS(target_cap_flags, 14, 1, value)
  2988. #define WMI_TARGET_CAP_QDATA_TX_LCE_FILTER_SUPPORT_GET(target_cap_flags) \
  2989. WMI_GET_BITS(target_cap_flags, 15, 1)
  2990. #define WMI_TARGET_CAP_QDATA_TX_LCE_FILTER_SUPPORT_SET(target_cap_flags, value)\
  2991. WMI_SET_BITS(target_cap_flags, 15, 1, value)
  2992. /*
  2993. * wmi_htt_msdu_idx_to_htt_msdu_qtype GET/SET APIs
  2994. */
  2995. #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_INDEX_GET(index_and_type) \
  2996. WMI_GET_BITS(index_and_type, 0, 8)
  2997. #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_INDEX_SET(index_and_type, value) \
  2998. WMI_SET_BITS(index_and_type, 0, 8, value)
  2999. #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_TYPE_GET(index_and_type) \
  3000. WMI_GET_BITS(index_and_type, 8, 8)
  3001. #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_TYPE_SET(index_and_type, value) \
  3002. WMI_SET_BITS(index_and_type, 8, 8, value)
  3003. typedef struct {
  3004. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_htt_msdu_idx_to_htt_msdu_qtype.*/
  3005. /**
  3006. * index_and_type
  3007. *
  3008. * [7:0] : htt_msduq_index
  3009. * [15:8] : htt_msduq_type
  3010. * [31:16] : reserved
  3011. */
  3012. A_UINT32 index_and_type;
  3013. } wmi_htt_msdu_idx_to_htt_msdu_qtype;
  3014. typedef enum {
  3015. WMI_AFC_FEATURE_6G_DEPLOYMENT_UNSPECIFIED = 0,
  3016. WMI_AFC_FEATURE_6G_DEPLOYMENT_INDOOR_ONLY = 1,
  3017. WMI_AFC_FEATURE_6G_DEPLOYMENT_OUTDOOR_ONLY = 2,
  3018. } WMI_AFC_FEATURE_6G_DEPLOYMENT_TYPE;
  3019. typedef enum {
  3020. WMI_BDF_VERSION_CHECK_DISABLED = 0,
  3021. /* WMI_BDF_VERSION_CHECK_GOOD:
  3022. * BDF version is matched with FW.
  3023. */
  3024. WMI_BDF_VERSION_CHECK_GOOD = 1,
  3025. /* WMI_BDF_VERSION_TEMPLATE_TOO_OLD:
  3026. * BDF template version is older than the oldest version supported by FW.
  3027. */
  3028. WMI_BDF_VERSION_TEMPLATE_TOO_OLD = 2,
  3029. /* WMI_BDF_VERSION_TEMPLATE_TOO_NEW:
  3030. * BDF template version is newer than the newest version supported by FW.
  3031. */
  3032. WMI_BDF_VERSION_TEMPLATE_TOO_NEW = 3,
  3033. /* WMI_BDF_VERSION_FW_TOO_OLD:
  3034. * FW version is older than the major version supported by BDF.
  3035. */
  3036. WMI_BDF_VERSION_FW_TOO_OLD = 4,
  3037. /* WMI_BDF_VERSION_FW_TOO_NEW:
  3038. * FW version is newer than the minor version supported by BDF.
  3039. */
  3040. WMI_BDF_VERSION_FW_TOO_NEW = 5,
  3041. } wmi_bdf_version_status_type;
  3042. typedef struct {
  3043. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_ready_ext2_event_fixed_param.*/
  3044. /*
  3045. * regDB Version to be sent to Host on WMI service ready ext2 event.
  3046. * [7:0] - regDbVersionMajor
  3047. * [15:8] - regDbVersionMinor
  3048. * [23:16] - bdfRegDbVersionMajor
  3049. * [31:24] - bdfRegDbVersionMinor
  3050. * The WMI_*REG_DB_VERSION_[MAJOR,MINOR]_[SET,GET] macros are used to
  3051. * access these bitfields.
  3052. */
  3053. A_UINT32 reg_db_version;
  3054. /* Min & Max Tx power (in dBm) supported in 2.4 GHz band
  3055. * [15:0] - Min Tx Power in 2.4 GHz band
  3056. * [31:16] - Max Tx Power in 2.4 GHz band
  3057. * WMI_HW_[MIN,MAX]_TX_POWER_[GET,SET] macros are used to access
  3058. * these bitfields.
  3059. * If Min Tx Power = Max Tx Power = 0 means Min Tx Power & Max Tx Power
  3060. * are not specified.
  3061. */
  3062. A_UINT32 hw_min_max_tx_power_2g;
  3063. /* Min & Max Tx power (in dBm) supported in 5 GHz band
  3064. * [15:0] - Min Tx Power in 5 GHz band
  3065. * [31:16] - Max Tx Power in 5 GHz band
  3066. * WMI_HW_[MIN,MAX]_TX_POWER_[GET,SET] macros are used to access
  3067. * these bitfields.
  3068. * If Min Tx Power = Max Tx Power = 0 means Min Tx Power & Max Tx Power
  3069. * are not specified.
  3070. */
  3071. A_UINT32 hw_min_max_tx_power_5g;
  3072. /*
  3073. * Number of peers supported per WMI_PEER_CHAN_WIDTH_SWITCH_CMDID
  3074. * 0 - not enabled
  3075. */
  3076. A_UINT32 chwidth_num_peer_caps;
  3077. /*
  3078. * Whether preamble puncturing is supported by FW, and if so, for which
  3079. * bandwidths. The possible values for this field are listed below.
  3080. * 0: preamble puncturing is not supported
  3081. * 80: puncturing supported within channels of at least 80 MHz bandwidth
  3082. * 160: puncturing supported within channels of at least 160 MHz bandwidth
  3083. * 320: puncturing supported within 320 MHz channels
  3084. */
  3085. A_UINT32 preamble_puncture_bw;
  3086. /*
  3087. * [15:0] - ULOFDMA Refer WMI_MAX_USER_PER_PPDU_UL_OFDMA_GET & SET
  3088. * [31:16] - DLOFDMA Refer WMI_MAX_USER_PER_PPDU_DL_OFDMA_GET & SET
  3089. * If max_user_per_ppdu_ofdma == 0 the UL/DL max users are unspecified.
  3090. */
  3091. A_UINT32 max_user_per_ppdu_ofdma;
  3092. /*
  3093. * [15:0] - ULMUMIMO Refer WMI_MAX_USER_PER_PPDU_UL_MUMIMO_GET & SET
  3094. * [31:16] - DLMUMIMO Refer WMI_MAX_USER_PER_PPDU_DL_MUMIMO_GET & SET
  3095. * If max_user_per_ppdu_mumimo == 0 the UL/DL max users are unspecified.
  3096. */
  3097. A_UINT32 max_user_per_ppdu_mumimo;
  3098. /**
  3099. * @brief target_cap_flags - flags containing information about target capabilities.
  3100. * Bits 1:0
  3101. * Rx peer metadata version number used by target
  3102. * 0-> legacy case
  3103. * 1-> MLO support
  3104. * 2,3-> reserved
  3105. * Refer to WMI_TARGET_CAP_FLAGS_PEER_METADATA_VERSION macros.
  3106. * Bit 2 - UL MUMIMO Rx support on 2.4 GHz (AP Mode)
  3107. * Bit 3 - UL MUMIMO Tx support on 2.4 GHz (STA Mode)
  3108. * Bit 4 - UL MUMIMO Rx support on 5 GHz (AP Mode)
  3109. * Bit 5 - UL MUMIMO Tx support on 5 GHz (STA Mode)
  3110. * Bit 6 - UL MUMIMO Rx support on 6 GHz (AP Mode)
  3111. * Bit 7 - UL MUMIMO Tx support on 6 GHz (STA Mode)
  3112. * Bits 10:8 - max ML BSS number supported, range [0-7]
  3113. * Bits 12:11 concurrence support capability
  3114. * Bit11 - [ML-STA + SL-STA] 0: not supported; 1:supported
  3115. * Bit12 - [ML-STA + SL-SAP] 0: not supported; 1:supported
  3116. * Bit 13 - Support for multipass SAP
  3117. * Bit 14 - Support for ML monitor mode
  3118. * Bit 15 - Support for Qdata Tx LCE filter installation
  3119. * Bits 31:16 - Reserved
  3120. */
  3121. A_UINT32 target_cap_flags;
  3122. /* EHT MAC Capabilities: total WMI_MAX_EHTCAP_MAC_SIZE*A_UINT32 bits
  3123. * those bits actually are max mac capabilities = cap_mac_2g | cap_mac_5g
  3124. * The actual cap mac info per mac (2g/5g) in the TLV -- WMI_MAC_PHY_CAPABILITIES_EXT
  3125. */
  3126. A_UINT32 eht_cap_mac_info[WMI_MAX_EHTCAP_MAC_SIZE];
  3127. /* Following this struct are the TLV's:
  3128. * WMI_DMA_RING_CAPABILITIES;
  3129. * wmi_spectral_bin_scaling_params;
  3130. * WMI_MAC_PHY_CAPABILITIES_EXT; <-- EHT mac capabilities and phy capabilities info
  3131. * WMI_HAL_REG_CAPABILITIES_EXT2;
  3132. * wmi_nan_capabilities;
  3133. * WMI_SCAN_RADIO_CAPABILITIES_EXT2;
  3134. */
  3135. /*
  3136. * Max number of LinkView peers supported by target
  3137. */
  3138. A_UINT32 max_num_linkview_peers;
  3139. /*
  3140. * Max number of msduq's per TID per peer supported by target,
  3141. * defines LinkView peers number
  3142. */
  3143. A_UINT32 max_num_msduq_supported_per_tid;
  3144. /*
  3145. * Number of peers support default flowqs
  3146. */
  3147. A_UINT32 default_num_msduq_supported_per_tid;
  3148. /*
  3149. * Indoor/Outdoor specification for AFC support -
  3150. * refer to WMI_AFC_FEATURE_6G_DEPLOYMENT_TYPE enum
  3151. */
  3152. A_UINT32 afc_deployment_type;
  3153. /*
  3154. * Board data check report. Please see wmi_hw_bd_status_type enum values.
  3155. */
  3156. A_UINT32 hw_bd_status;
  3157. /*
  3158. * max block ack window size FW supports for tx.
  3159. */
  3160. A_UINT32 tx_aggr_ba_win_size_max;
  3161. /*
  3162. * max block ack window size FW supports for rx.
  3163. */
  3164. A_UINT32 rx_aggr_ba_win_size_max;
  3165. /*
  3166. * max link number per STA MLD FW supports.
  3167. */
  3168. A_UINT32 num_max_mlo_link_per_ml_bss_supp;
  3169. /*
  3170. * max link number per SAP MLD FW supports.
  3171. */
  3172. A_UINT32 num_max_mlo_link_per_ml_sap_supp;
  3173. /* Followed by next TLVs:
  3174. * WMI_DMA_RING_CAPABILITIES dma_ring_caps[];
  3175. * wmi_spectral_bin_scaling_params wmi_bin_scaling_params[];
  3176. * WMI_MAC_PHY_CAPABILITIES_EXT mac_phy_caps[];
  3177. * WMI_HAL_REG_CAPABILITIES_EXT2 hal_reg_caps[];
  3178. * wmi_nan_capabilities nan_cap;
  3179. * WMI_SCAN_RADIO_CAPABILITIES_EXT2 wmi_scan_radio_caps[];
  3180. * wmi_htt_msdu_idx_to_htt_msdu_qtype htt_msdu_idx_to_qtype_map[];
  3181. * wmi_dbs_or_sbs_cap_ext dbs_or_sbs_cap_ext;
  3182. * A_INT32 hw_tx_power_signed[WMI_HW_TX_POWER_CAPS_MAX];
  3183. * wmi_aux_dev_capabilities aux_dev_caps[];
  3184. */
  3185. } wmi_service_ready_ext2_event_fixed_param;
  3186. typedef struct {
  3187. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_rf_characterization_info_event_fixed_param */
  3188. /*
  3189. * A variable-length TLV array of wmi_chan_rf_characterization_info will
  3190. * follow this fixed_param TLV, containing rx characterization info for
  3191. * primary channels.
  3192. * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
  3193. */
  3194. } wmi_chan_rf_characterization_info_event_fixed_param;
  3195. typedef enum {
  3196. WMI_FW_STA_RTT_INITR = 0x00000001,
  3197. WMI_FW_STA_RTT_RESPR = 0x00000002,
  3198. WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
  3199. WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
  3200. WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
  3201. WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
  3202. WMI_FW_AP_RTT_INITR = 0x00000040,
  3203. WMI_FW_AP_RTT_RESPR = 0x00000080,
  3204. WMI_FW_NAN_RTT_INITR = 0x00000100,
  3205. WMI_FW_NAN_RTT_RESPR = 0x00000200,
  3206. WMI_FW_SCAN_DBS_POLICY = 0x00000400,
  3207. /*
  3208. * New fw sub feature capabilities before
  3209. * WMI_FW_MAX_SUB_FEAT_CAP
  3210. */
  3211. WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
  3212. } WMI_FW_SUB_FEAT_CAPS;
  3213. typedef enum {
  3214. WMI_HWBD_NONE = 0, /* No hw board information is given */
  3215. WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
  3216. WMI_HWBD_QCA2582 = 2, /* Killer 1525*/
  3217. } WMI_HWBD_ID;
  3218. #define ATH_BD_DATA_REV_MASK 0x000000FF
  3219. #define ATH_BD_DATA_REV_SHIFT 0
  3220. #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
  3221. #define ATH_BD_DATA_PROJ_ID_SHIFT 8
  3222. #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
  3223. #define ATH_BD_DATA_CUST_ID_SHIFT 16
  3224. #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
  3225. #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
  3226. #define SET_BD_DATA_REV(bd_data_ver, value) \
  3227. ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
  3228. #define GET_BD_DATA_REV(bd_data_ver) \
  3229. (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
  3230. #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
  3231. ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
  3232. #define GET_BD_DATA_PROJ_ID(bd_data_ver) \
  3233. (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
  3234. #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
  3235. ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
  3236. #define GET_BD_DATA_CUST_ID(bd_data_ver) \
  3237. (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
  3238. #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
  3239. ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
  3240. #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
  3241. (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
  3242. #ifdef ROME_LTE_COEX_FREQ_AVOID
  3243. typedef struct {
  3244. A_UINT32 start_freq; /* start frequency, not channel center freq */
  3245. A_UINT32 end_freq; /* end frequency */
  3246. } avoid_freq_range_desc;
  3247. typedef struct {
  3248. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  3249. A_UINT32 num_freq_ranges;
  3250. /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
  3251. avoid_freq_range_desc avd_freq_range[];
  3252. } wmi_wlan_avoid_freq_ranges_event;
  3253. #endif
  3254. /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that returned status */
  3255. #define WLAN_INIT_STATUS_SUCCESS 0x0
  3256. #define WLAN_INIT_STATUS_GEN_FAILED 0x1
  3257. #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  3258. #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  3259. typedef A_UINT32 WLAN_INIT_STATUS;
  3260. typedef struct {
  3261. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
  3262. wmi_abi_version fw_abi_vers;
  3263. /*
  3264. * mac_addr is always filled; in addition, there can be a mac_addr_list
  3265. * TLV following this fixed_param TLV to specify additional MAC addresses,
  3266. * for cases where the target specifies one MAC address per pdev
  3267. * (so the host can treat the pdevs within the target as separately
  3268. * as possible) rather than one MAC address for the whole SOC.
  3269. */
  3270. wmi_mac_addr mac_addr;
  3271. A_UINT32 status;
  3272. A_UINT32 num_dscp_table;
  3273. /* num_extra_mac_addr -
  3274. * how many additional MAC addresses besides the above mac_addr
  3275. * are provided in the subsequent mac_addr_list TLV
  3276. */
  3277. A_UINT32 num_extra_mac_addr;
  3278. /*
  3279. * Total number of "real" peers (remote peers of an AP vdev,
  3280. * BSS peer of a STA vdev, TDLS peer of a STA vdev) that FW supports.
  3281. * If 0, then Host can use param_tlv->resource_config->num_peers as
  3282. * total number of peers.
  3283. */
  3284. A_UINT32 num_total_peers;
  3285. /*
  3286. * Number of extra peers that Firmware adds.
  3287. * These are self peers and/or other FW only peers that don't represent
  3288. * a 802.11 transceiver, but instead are used for convenience, e.g. to
  3289. * provide a pseudo-peer object for an AP vdev's bcast/mcast tx queues,
  3290. * to allow each tx queue to belong to a peer object.
  3291. * Peer ID can be up to num_total_peers + num_extra_peers.
  3292. */
  3293. A_UINT32 num_extra_peers;
  3294. /*
  3295. * max_ast_index - max AST index that Firmware can generate
  3296. * max_ast_index = (ast_table_size-1), ast_table_size is dynamically chosen
  3297. * based on num_peers configuration from Host. Hence Host needs to know the
  3298. * max_ast_index that Firmware can generate.
  3299. * A 0x0 value for max_ast_index means the target has not specified a limit.
  3300. */
  3301. A_UINT32 max_ast_index;
  3302. /* pktlog_defs_checksum:
  3303. * checksum computed from the definitions of the enums and structs
  3304. * used within pktlog traces.
  3305. * This pktlog defs checksum needs to be embedded into pktlog trace files
  3306. * (specifically in ath_pktlog_bufhdr.version).
  3307. *
  3308. * If pktlog_defs_checksum is zero then it is invalid; it should be ignored
  3309. * and ath_pktlog_bufhdr.magic_num needs to be PKTLOG_MAGIC_NUM_LEGACY
  3310. * (i.e. 7735225).
  3311. *
  3312. * If pktlog_defs_checksum is non-zero then it is valid, and the host
  3313. * should put it into the pktlog trace file header and set
  3314. * ath_pktlog_bufhdr.magic_num as PKTLOG_MAGIC_NUM_VERSION_IS_CHECKSUM
  3315. * (i.e. 2453506), to indicate that the file header version field contains
  3316. * a checksum.
  3317. */
  3318. A_UINT32 pktlog_defs_checksum;
  3319. /*
  3320. * max_onchip_ast_index - max AST index that Firmware can generate
  3321. * max_onchip_ast_index = (ast_table_size-1), where ast_table_size is
  3322. * dynamically chosen based on num_peers configuration from Host.
  3323. * Hence Host needs to know the max_onchip_ast_index that Firmware can
  3324. * generate.
  3325. * A 0x0 value for max_onchip_ast_index means the target has not specified
  3326. * a limit.
  3327. */
  3328. A_UINT32 max_onchip_ast_index;
  3329. /*
  3330. * The maximum number of LinkView peers can be supported onsite of target,
  3331. * based on proposed by the host configuration,
  3332. * total number of available resources, configured peers number,
  3333. * number of MSDUQs per LinkView peer's TID.
  3334. * Target can reduce proposed by WMI_INIT_CMDID number, depending on
  3335. * the target's resources availability.
  3336. */
  3337. A_UINT32 num_of_linkview_peers;
  3338. /* Total number of "real" max_active_vdevs that FW supports. */
  3339. A_UINT32 num_max_active_vdevs;
  3340. /*
  3341. * This fixed_param TLV is followed by these additional TLVs:
  3342. * mac_addr_list[num_extra_mac_addr];
  3343. */
  3344. } wmi_ready_event_fixed_param;
  3345. typedef struct {
  3346. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
  3347. /**
  3348. * @brief num_vdev - number of virtual devices (VAPs) to support
  3349. */
  3350. A_UINT32 num_vdevs;
  3351. /**
  3352. * @brief num_peers - number of peer nodes to support
  3353. */
  3354. A_UINT32 num_peers;
  3355. /*
  3356. * @brief In offload mode target supports features like WOW, chatter and other
  3357. * protocol offloads. In order to support them some functionalities like
  3358. * reorder buffering, PN checking need to be done in target. This determines
  3359. * maximum number of peers supported by target in offload mode
  3360. */
  3361. A_UINT32 num_offload_peers;
  3362. /* @brief Number of reorder buffers available for doing target based reorder
  3363. * Rx reorder buffering
  3364. */
  3365. A_UINT32 num_offload_reorder_buffs;
  3366. /**
  3367. * @brief num_peer_keys - number of keys per peer
  3368. */
  3369. A_UINT32 num_peer_keys;
  3370. /**
  3371. * @brief num_peer_tids - number of TIDs to provide storage for per peer.
  3372. */
  3373. A_UINT32 num_tids;
  3374. /**
  3375. * @brief ast_skid_limit - max skid for resolving hash collisions
  3376. * @details
  3377. * The address search table is sparse, so that if two MAC addresses
  3378. * result in the same hash value, the second of these conflicting
  3379. * entries can slide to the next index in the address search table,
  3380. * and use it, if it is unoccupied. This ast_skid_limit parameter
  3381. * specifies the upper bound on how many subsequent indices to search
  3382. * over to find an unoccupied space.
  3383. */
  3384. A_UINT32 ast_skid_limit;
  3385. /**
  3386. * @brief tx_chain_mask - the nominal chain mask for transmit
  3387. * @details
  3388. * The chain mask may be modified dynamically, e.g. to operate AP tx with
  3389. * a reduced number of chains if no clients are associated.
  3390. * This configuration parameter specifies the nominal chain-mask that
  3391. * should be used when not operating with a reduced set of tx chains.
  3392. */
  3393. A_UINT32 tx_chain_mask;
  3394. /**
  3395. * @brief rx_chain_mask - the nominal chain mask for receive
  3396. * @details
  3397. * The chain mask may be modified dynamically, e.g. for a client to use
  3398. * a reduced number of chains for receive if the traffic to the client
  3399. * is low enough that it doesn't require downlink MIMO or antenna
  3400. * diversity.
  3401. * This configuration parameter specifies the nominal chain-mask that
  3402. * should be used when not operating with a reduced set of rx chains.
  3403. */
  3404. A_UINT32 rx_chain_mask;
  3405. /**
  3406. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  3407. * @details
  3408. * Each WMM access class (voice, video, best-effort, background) will
  3409. * have its own timeout value to dictate how long to wait for missing
  3410. * rx MPDUs to arrive before flushing subsequent MPDUs that have already
  3411. * been received.
  3412. * This parameter specifies the timeout in milliseconds for each class .
  3413. * NOTE: the number of class (defined as 4) cannot be
  3414. * changed in the future without breaking WMI compatibility.
  3415. */
  3416. A_UINT32 rx_timeout_pri[4];
  3417. /**
  3418. * @brief rx_decap mode - what mode the rx should decap packets to
  3419. * @details
  3420. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  3421. * THis setting also determines the default TX behavior, however TX
  3422. * behavior can be modified on a per VAP basis during VAP init
  3423. */
  3424. A_UINT32 rx_decap_mode;
  3425. /**
  3426. * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
  3427. */
  3428. A_UINT32 scan_max_pending_req;
  3429. /**
  3430. * @brief maximum VDEV that could use BMISS offload
  3431. */
  3432. A_UINT32 bmiss_offload_max_vdev;
  3433. /**
  3434. * @brief maximum VDEV that could use offload roaming
  3435. */
  3436. A_UINT32 roam_offload_max_vdev;
  3437. /**
  3438. * @brief maximum AP profiles that would push to offload roaming
  3439. */
  3440. A_UINT32 roam_offload_max_ap_profiles;
  3441. /**
  3442. * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
  3443. * @details
  3444. * The target's WAL maintains a table to hold information regarding which
  3445. * peers belong to a given multicast group, so that if multicast->unicast
  3446. * conversion is enabled, the target can convert multicast tx frames to a
  3447. * series of unicast tx frames, to each peer within the multicast group.
  3448. * This num_mcast_groups configuration parameter tells the target how
  3449. * many multicast groups to provide storage for within its multicast
  3450. * group membership table.
  3451. */
  3452. A_UINT32 num_mcast_groups;
  3453. /**
  3454. * @brief num_mcast_table_elems - size to alloc for the mcast membership table
  3455. * @details
  3456. * This num_mcast_table_elems configuration parameter tells the target
  3457. * how many peer elements it needs to provide storage for in its
  3458. * multicast group membership table.
  3459. * These multicast group membership table elements are shared by the
  3460. * multicast groups stored within the table.
  3461. */
  3462. A_UINT32 num_mcast_table_elems;
  3463. /**
  3464. * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
  3465. * @details
  3466. * This configuration parameter specifies whether the target should
  3467. * perform multicast --> unicast conversion on transmit, and if so,
  3468. * what to do if it finds no entries in its multicast group membership
  3469. * table for the multicast IP address in the tx frame.
  3470. * Configuration value:
  3471. * 0 -> Do not perform multicast to unicast conversion.
  3472. * 1 -> Convert multicast frames to unicast, if the IP multicast address
  3473. * from the tx frame is found in the multicast group membership
  3474. * table. If the IP multicast address is not found, drop the frame.
  3475. * 2 -> Convert multicast frames to unicast, if the IP multicast address
  3476. * from the tx frame is found in the multicast group membership
  3477. * table. If the IP multicast address is not found, transmit the
  3478. * frame as multicast.
  3479. */
  3480. A_UINT32 mcast2ucast_mode;
  3481. /**
  3482. * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
  3483. * @details
  3484. * This parameter controls how much memory the target will allocate to
  3485. * store a log of tx PPDU meta-information (how large the PPDU was,
  3486. * when it was sent, whether it was successful, etc.)
  3487. */
  3488. A_UINT32 tx_dbg_log_size;
  3489. /**
  3490. * @brief num_wds_entries - how many AST entries to be allocated for WDS
  3491. */
  3492. A_UINT32 num_wds_entries;
  3493. /**
  3494. * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
  3495. * this limit can be 0 -default, 1 256B
  3496. */
  3497. A_UINT32 dma_burst_size;
  3498. /**
  3499. * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
  3500. * to account for interface latency to avoid underrun.
  3501. */
  3502. A_UINT32 mac_aggr_delim;
  3503. /**
  3504. * @brief rx_skip_defrag_timeout_dup_detection_check
  3505. * @details
  3506. * determine whether target is responsible for detecting duplicate
  3507. * non-aggregate MPDU and timing out stale fragments.
  3508. *
  3509. * A-MPDU reordering is always performed on the target.
  3510. *
  3511. * 0: target responsible for frag timeout and dup checking
  3512. * 1: host responsible for frag timeout and dup checking
  3513. */
  3514. A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
  3515. /**
  3516. * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
  3517. * and Max no of descriptors for each Video link (node).
  3518. */
  3519. A_UINT32 vow_config;
  3520. /**
  3521. * @brief maximum VDEV that could use GTK offload
  3522. */
  3523. A_UINT32 gtk_offload_max_vdev;
  3524. /**
  3525. * @brief num_msdu_desc - Number of msdu descriptors target should use
  3526. */
  3527. A_UINT32 num_msdu_desc; /* Number of msdu desc */
  3528. /**
  3529. * @brief max_frag_entry - Max. number of Tx fragments per MSDU
  3530. * @details
  3531. * This parameter controls the max number of Tx fragments per MSDU.
  3532. * This is sent by the target as part of the WMI_SERVICE_READY event
  3533. * and is overridden by the OS shim as required.
  3534. */
  3535. A_UINT32 max_frag_entries;
  3536. /**
  3537. * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
  3538. * @brief num_msdu_desc - Number of vdev that can support beacon offload
  3539. */
  3540. A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
  3541. /**
  3542. * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
  3543. * @details
  3544. * Each TDLS enabled vdev can track outgoing transmits/RSSI/rates to/of
  3545. * peers in a connection tracking table for possible TDLS link creation
  3546. * or deletion. This controls the number of tracked peers per vdev.
  3547. */
  3548. A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
  3549. /**
  3550. * @brief beacon_tx_offload_max_vdev - Number of maximum beaconing vaps at any time.
  3551. */
  3552. A_UINT32 beacon_tx_offload_max_vdev;
  3553. A_UINT32 num_multicast_filter_entries;
  3554. A_UINT32 num_wow_filters; /*host can configure the number of wow filters*/
  3555. /**
  3556. * @brief num_keep_alive_pattern - Num of keep alive patterns configured
  3557. * from host.
  3558. */
  3559. A_UINT32 num_keep_alive_pattern;
  3560. /**
  3561. * @brief keep_alive_pattern_size - keep alive pattern size.
  3562. */
  3563. A_UINT32 keep_alive_pattern_size;
  3564. /**
  3565. * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
  3566. * @details
  3567. * Each TDLS STA can become a sleep STA independently. This parameter
  3568. * mentions how many such sleep STAs can be supported concurrently.
  3569. */
  3570. A_UINT32 max_tdls_concurrent_sleep_sta;
  3571. /**
  3572. * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
  3573. * @details
  3574. * Each TDLS STA can become a buffer STA independently. This parameter
  3575. * mentions how many such buffer STAs can be supported concurrently.
  3576. */
  3577. A_UINT32 max_tdls_concurrent_buffer_sta;
  3578. /**
  3579. * @brief wmi_send_separate - host configures fw to send the wmi separately
  3580. */
  3581. A_UINT32 wmi_send_separate;
  3582. /**
  3583. * @brief num_ocb_vdevs - Number of vdevs used for OCB support
  3584. */
  3585. A_UINT32 num_ocb_vdevs;
  3586. /**
  3587. * @brief num_ocb_channels - The supported number of simultaneous OCB channels
  3588. */
  3589. A_UINT32 num_ocb_channels;
  3590. /**
  3591. * @brief num_ocb_schedules - The supported number of OCB schedule segments
  3592. */
  3593. A_UINT32 num_ocb_schedules;
  3594. /**
  3595. * @brief specific configuration from host, such as per platform configuration
  3596. */
  3597. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
  3598. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
  3599. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
  3600. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
  3601. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
  3602. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
  3603. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
  3604. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
  3605. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
  3606. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
  3607. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
  3608. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
  3609. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
  3610. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
  3611. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
  3612. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
  3613. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
  3614. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
  3615. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
  3616. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
  3617. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_S 10
  3618. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_M 0x400
  3619. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_S 11
  3620. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_M 0x800
  3621. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_S 12
  3622. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_M 0x1000
  3623. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_S 13
  3624. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_M 0x2000
  3625. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_S 14
  3626. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_M 0x4000
  3627. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_S 15
  3628. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_M 0x8000
  3629. /*
  3630. * If the AC override valid bit is set then this field will specify the
  3631. * access category to use for EAPOL frames
  3632. * 0 - WMM_AC_BE
  3633. * 1 - WMM_AC_BK
  3634. * 2 - WMM_AC_VI
  3635. * 3 - WMM_AC_VO
  3636. */
  3637. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_S 16
  3638. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_M 0x30000
  3639. /*
  3640. * If TX_ACK_RSSI is set, then the target should populate the ack_rssi
  3641. * field within the WMI_MGMT_TX_COMPLETION_EVENT message, the ack_rssi
  3642. * TLV within the WMI_MGMT_TX_BUNDLE_COMPLETION_EVENT message, and the
  3643. * "MSDU ACK RSSI" array within the HTT_T2H TX_COMPL_IND message.
  3644. */
  3645. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_S 18
  3646. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_M 0x40000
  3647. /*
  3648. * If HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN is set, the host will not
  3649. * include the HTC header length in the payload length for all HTT_H2T
  3650. * messages.
  3651. * Otherwise, only when sending HTT_H2T_MSG_TYPE_TX_FRM message,
  3652. * payload length includes HTC header length. Other HTT_H2T messages'
  3653. * payload length does not include HTC header length.
  3654. * The host will only set this HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN flag
  3655. * if the target has set the WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN
  3656. * flag to indicate its support for this option.
  3657. */
  3658. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_S 19
  3659. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_M 0x80000
  3660. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_S 20
  3661. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_M 0x100000
  3662. /*
  3663. * If this HTT_PEER_STATS is set, then the target should use the
  3664. * the HTT_T2H_MSG_TYPE_PEER_STATS_IND message to upload peer stats;
  3665. * else the target should avoid sending the PEER_STATS_IND message.
  3666. */
  3667. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_S 21
  3668. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_M 0x200000
  3669. /*
  3670. * If this BIT is set, then the target should use peer_tid_ext to analyze
  3671. * per peer per tid extended configurations
  3672. */
  3673. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_S 22
  3674. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_M 0x400000
  3675. /*
  3676. * If the VIDEO_OVER_WIFI_ENABLE flag is set, the target will use a
  3677. * series of algorithmic adjustments to optimize Video performance
  3678. * by reducing latency, reducing latency jitter, and minimizing
  3679. * dropped packets.
  3680. */
  3681. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_S 23
  3682. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_M 0x800000
  3683. /*
  3684. * If the THREE_WAY_COEX_CONFIG_LEGACY flag is set, the target will use
  3685. * the configuration parameters given by Host driver to WLAN FW and
  3686. * apply them along with the existing CoEx Weights Override logic to
  3687. * prioritize the WLAN-BT-Zigbee packets accordingly.
  3688. *
  3689. * The host shall only set the THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT
  3690. * RSRC_CFG flag if the target has set the WMI_SERVICE
  3691. * THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT flag.
  3692. *
  3693. * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
  3694. */
  3695. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_S 24
  3696. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_M 0x1000000
  3697. /*
  3698. * If the THREE_WAY_COEX_CONFIG_OVERRIDE flag is set, the target will use
  3699. * the configuration parameters given by Host driver to WLAN FW and
  3700. * apply them by OVERRIDing the existing CoEx Weights Override logic to
  3701. * prioritize the WLAN-BT-Zigbee packets accordingly.
  3702. *
  3703. * The host shall only set the THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT
  3704. * RSRC_CFG flag if the target has set the WMI_SERVICE
  3705. * THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT flag.
  3706. *
  3707. * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
  3708. */
  3709. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_S 25
  3710. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_M 0x2000000
  3711. /*
  3712. * If the TX_COMPLETION_TX_TSF64 flag is set, the target should
  3713. * populate the htt_tx_compl_ind_append_tx_tsf64 array within the
  3714. * HTT_T2H TX_COMPL_IND message.
  3715. */
  3716. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_S 26
  3717. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_M 0x4000000
  3718. /*
  3719. * If this BIT is set, then the target should support Packet capture(SMART MU FR)
  3720. */
  3721. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_S 27
  3722. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_M 0x8000000
  3723. /*
  3724. * If this BIT is set, then target should support BSS Max Idle period.
  3725. */
  3726. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_S 28
  3727. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_M 0x10000000
  3728. /*
  3729. * If this bit is set, then target should use the audio sync feature.
  3730. * Host should only set this bit if the target has indicated via the
  3731. * WMI_SERVICE_AUDIO_SYNC_SUPPORT flag that it supports audio sync.
  3732. */
  3733. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_S 29
  3734. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_M 0x20000000
  3735. /*
  3736. * If this BIT is set, then the target should disable IPA
  3737. */
  3738. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_S 30
  3739. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_M 0x40000000
  3740. /*
  3741. * If this bit is set, target should use the PCIe GEN switching feature.
  3742. */
  3743. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_S 31
  3744. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_M 0x80000000
  3745. A_UINT32 flag1;
  3746. /** @brief smart_ant_cap - Smart Antenna capabilities information
  3747. * @details
  3748. * 1 - Smart antenna is enabled.
  3749. * 0 - Smart antenna is disabled.
  3750. * In future this can contain smart antenna specific capabilities.
  3751. */
  3752. A_UINT32 smart_ant_cap;
  3753. /**
  3754. * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
  3755. * during init
  3756. */
  3757. A_UINT32 BK_Minfree;
  3758. A_UINT32 BE_Minfree;
  3759. A_UINT32 VI_Minfree;
  3760. A_UINT32 VO_Minfree;
  3761. /**
  3762. * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
  3763. * descriptor memory allocation.
  3764. * 1 - Allocate fragment descriptor memory for data packet in firmware.
  3765. * If host wants to transmit data packet at its desired rate,
  3766. * this field must be set.
  3767. * 0 - Don't allocate fragment descriptor for data packet.
  3768. */
  3769. A_UINT32 alloc_frag_desc_for_data_pkt;
  3770. /** how much space to allocate for NDP NS (neighbor solicitation) specs */
  3771. A_UINT32 num_ns_ext_tuples_cfg;
  3772. /**
  3773. * size (in bytes) of the buffer the FW shall allocate per vdev
  3774. * firmware can dynamic allocate memory (or disable)
  3775. * packet filtering feature.
  3776. * 0 - fw chooses its default value
  3777. * -1 (0XFFFFFFFF) - disable APF
  3778. */
  3779. A_UINT32 bpf_instruction_size;
  3780. /**
  3781. * Maximum no of BSSID based RX filters host would program
  3782. * Value 0 means host doesn't given any limit to FW.
  3783. */
  3784. A_UINT32 max_bssid_rx_filters;
  3785. /**
  3786. * Use PDEV ID instead of MAC ID, added for backward compatibility with older host
  3787. * which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
  3788. */
  3789. A_UINT32 use_pdev_id;
  3790. /** Maximum number of scan clients whose DBS scan duty cycle can be configured */
  3791. A_UINT32 max_num_dbs_scan_duty_cycle;
  3792. /** Maximum number of Multi group key to support */
  3793. A_UINT32 max_num_group_keys;
  3794. union {
  3795. A_UINT32 peer_map_unmap_v2_support; /* old name */
  3796. /**
  3797. * HTT peer map/unmap format support (map 4bits and unmap 4bits)
  3798. * 0x00 -> host use default map/unmap only.
  3799. * 0x01 -> legacy value that is interpreted the same as 0x22.
  3800. * 0x22 -> host supports HTT peer map/unmap v2 format; the target is
  3801. * allowed but not required to use peer map/unmap v2 format.
  3802. * 0x32 -> host supports HTT peer map v3 format; the target is
  3803. * allowed but not required to use peer map v3 format and
  3804. * peer unmap v2 format.
  3805. */
  3806. A_UINT32 peer_map_unmap_versions;
  3807. };
  3808. /** Sched config params for all pdevs
  3809. * These tx scheduling configuration parameters are currently only
  3810. * used for internal testing purposes; therefore the non-default
  3811. * values for this field are not currently documented.
  3812. * For regular use, this field should be set to 0x0.
  3813. */
  3814. A_UINT32 sched_params;
  3815. /* Number of MAC on which AP TWT feature is supported */
  3816. A_UINT32 twt_ap_pdev_count;
  3817. /* Max no of STA with which TWT sessions can be formed by the AP */
  3818. A_UINT32 twt_ap_sta_count;
  3819. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  3820. * This parameter provides the final specification for the maximum number
  3821. * of SSIDs for the target to support for Network List Offload's scanning
  3822. * for preferred networks.
  3823. * This wmi_resource_config.max_nlo_ssids must be <= the max_nlo_ssids
  3824. * field from the target's WMI_SERVICE_READY_EXT_EVENT message.
  3825. * (If the target didn't provide a max_nlo_ssids field in the
  3826. * WMI_SERVICE_READY_EXT message, or if the SERVICE_READY_EXT msg's
  3827. * max_nlo_ssids value was 0x0, the target doesn't support dynamic
  3828. * negotiation of max NLO SSIDs, and WMI_NLO_MAX_SSIDS (=16) applies.)
  3829. * If this wmi_resource_config.max_nlo_ssids field is absent or 0x0,
  3830. * the host does not support dynamic negotiation of max NLO SSIDs.
  3831. * In such a case, the target will respond as follows:
  3832. * If the target supports at least WMI_NLO_MAX_SSIDS, the target will
  3833. * use the statically-configured WMI_NLO_MAX_SSIDS value.
  3834. * If the target supports less than WMI_NLO_MAX_SSIDS, the target will
  3835. * abort its boot-up, due to receiving an invalid/unsupported
  3836. * configuration specification.
  3837. */
  3838. A_UINT32 max_nlo_ssids;
  3839. /**
  3840. * num_packet_filters: the num that host requests fw to support for
  3841. * pktfilter in total, then firmware can dynamic allocate
  3842. * memory(or disable) pktfilter feature.
  3843. *
  3844. * 0 - fw chooses its default value.
  3845. * -1(0XFFFFFFFF)- disable pktfilter.
  3846. */
  3847. A_UINT32 num_packet_filters;
  3848. /**
  3849. * num_max_sta_vdevs: the max num for the sta vdevs
  3850. * fw will use it to config the memory of offload features that
  3851. * are only for sta vdevs.
  3852. * p2p client should be included.
  3853. *
  3854. * 0 - fw chooses its default value: 'num_vdevs' of this structure.
  3855. */
  3856. A_UINT32 num_max_sta_vdevs;
  3857. /* ref to section 8.4.2.48 Multiple BSSID element
  3858. * The Max BSSID Indicator field contains a value assigned to n,
  3859. * where 2^n is the maximum number of BSSIDs
  3860. */
  3861. A_UINT32 max_bssid_indicator;
  3862. /** @brief ul_resp_config - Configures the 11ax uplink ofdma feature on STA.
  3863. * I.e. sending uplink response to a trigger frame sent by AP.
  3864. * @details
  3865. * 0 - fw default behavior, based on chipset
  3866. * 1 - UL_RESP is disabled.
  3867. * 2 - UL_RESP is enabled.
  3868. * other - reserved.
  3869. */
  3870. A_UINT32 ul_resp_config;
  3871. /* msdu_flow_override_config0 - contains AST enable bitmask
  3872. * AST0 is unconditionally enabled, unless the MSDU flow override feature
  3873. * is entirely disabled.
  3874. * AST1 through AST3 are conditionally enabled, based on bits 0-2 in
  3875. * msdu_flow_override_config0.
  3876. * If all three bits are 0, no msdu flow override feature at all in FW.
  3877. *
  3878. * The WMI_MSDU_FLOW_AST_ENABLE_GET and WMI_MSDU_FLOW_AST_ENABLE_SET
  3879. * macros are used to read and write these bitfields.
  3880. */
  3881. A_UINT32 msdu_flow_override_config0;
  3882. /* msdu_flow_override_config1:
  3883. * Bits 3:0 - AST0_FLOW_MASK(4)
  3884. * Bits 7:4 - AST1_FLOW_MASK(4)
  3885. * Bits 11:8 - AST2_FLOW_MASK(4)
  3886. * Bits 15:12 - AST3_FLOW_MASK(4)
  3887. * Bits 23:16 - TID_VALID_HI_PRI (8)
  3888. * Bits 31:24 - TID_VALID_LOW_PRI (8)
  3889. *
  3890. * The macros
  3891. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET
  3892. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET
  3893. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET
  3894. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET
  3895. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET
  3896. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET
  3897. * are used to read and write these bitfields.
  3898. */
  3899. A_UINT32 msdu_flow_override_config1;
  3900. /** @brief flags2 - contains flags used for the following purposes:
  3901. * Configure 11ax uplink ofdma/MU-MIMO feature in FW, when chipsets
  3902. * are brought up in Repeater/STA mode.
  3903. *
  3904. * @details
  3905. * Bits 3:0
  3906. * Enable UL MU-OFDMA/MIMO for PDEVs WIFI0, WIFI1, WIFI2
  3907. * This flags should only be set when a pdev has STA VAP
  3908. * in repeater/self-organizing-network modes.
  3909. * E.g. to enable UL RESP for 5G and 2G radios, value shall be
  3910. * 0b00000000000000000000000000000011 = 0x3.
  3911. * Host shall use UCI config for a radio to populate this value,
  3912. * each radio entry shall have "config re_ul_resp 1" value set.
  3913. * Hence this can be configured dynamically.
  3914. *
  3915. * Refer to the below WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_GET/SET
  3916. * macros.
  3917. * Bits 5:4
  3918. * HTT rx peer metadata version number that host supports.
  3919. * Firmware initially sends the target supported version number
  3920. * as part of service_ready_ext2 message.
  3921. * Host can ack the version number that it is using as part of
  3922. * this message.
  3923. * 0-> legacy case
  3924. * 1-> MLO support
  3925. * 2-3-> Reserved
  3926. * Refer to the WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION macros.
  3927. * Bit 6 - is_sap_connected_d3wow_enabled
  3928. * Enable D3WoW for SAP w/ clients connected
  3929. * 0-> disable the feature
  3930. * 1-> enable the feature
  3931. * Refer to the WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED
  3932. * GET/SET macros.
  3933. * Bit 7 - is_go_connected_d3wow_enabled
  3934. * Enable D3WoW for GO w/ clients connected
  3935. * 0-> disable the feature
  3936. * 1-> enable the feature
  3937. * Refer to the WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED
  3938. * GET/SET macros.
  3939. * Bit 8 - enable_dynamic_pcie_gen_speed_switch
  3940. * enable dynamic pcie gen speed switch
  3941. * 0-> disable the feature
  3942. * 1-> enable the feature
  3943. * Refer to the WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED
  3944. * GET/SET macros.
  3945. * Bit 9 - calc_next_dtim_count
  3946. * 0 -> disable calculation of DTIM count for MBSSID_NON_TX_VAP
  3947. * 1 -> Used by some hosts to indicate calculation of DTIM count
  3948. * for MBSSID_NON_TX_VAP
  3949. * Refer to WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_GET/SET macros.
  3950. *
  3951. * Bit 10 - arp_ac_override_valid
  3952. * 0 -> arp_ac_override field is invalid
  3953. * 1 -> arp_ac_override field is valid
  3954. * Refer to WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_GET/SET macros.
  3955. * Bit 12:11 - arp_ac_override
  3956. * If the AC override valid bit is set then this field will specify the
  3957. * access category to use for ARP frames
  3958. * 0 - WMM_AC_BE
  3959. * 1 - WMM_AC_BK
  3960. * 2 - WMM_AC_VI
  3961. * 3 - WMM_AC_VO
  3962. * Refer to WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_GET/SET macros.
  3963. * Bit 13 - sawf_sched
  3964. * SAWF feature flag for scheduler
  3965. * 0 -> disable SAWF based scheduling
  3966. * 1 -> enable SAWF based scheduling
  3967. * Refer to WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_GET/SET macros.
  3968. * Bit 14 - notify_frame_support
  3969. * Flag to enable notify_frame_support from host.
  3970. * 0 -> disable notify_frame_support feature
  3971. * 1 -> enable_notify_frame_support feature
  3972. * Refer to WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_GET/SET
  3973. * macros.
  3974. * Bit 15 - disable_wds_mec_intrabss
  3975. * Flag to disable wds learning, MEC, intrabss offload.
  3976. * By default, it is enabled.
  3977. * 0 -> enable wds_mec_intrabss offload
  3978. * 1 -> disable wds_mec_intrabss offload
  3979. * Refer to WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_GET /
  3980. * SET macros.
  3981. * Bit 16 - latency_flowq_support
  3982. * Flag to indicate whether host supports latency tolerant queue.
  3983. * By default, it is disabled.
  3984. * 0 -> disable latency_flowq_support
  3985. * 1 -> enable latency_flowq_support
  3986. * Refer to WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_GET/SET macros.
  3987. * Bit 17 - rf_path_mode
  3988. * Flag to indicate overlapping_freq_mode
  3989. * By default, it will be primary mode (0)
  3990. * 0 - Primary
  3991. * 1 - Secondary
  3992. * Refer to WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_GET/SET macros.
  3993. * Bit 18 - disable_wds_peer_map_unmap_event
  3994. * Flag to indicate whether the WDS peer map/unmap event should be
  3995. * processed or ignored.
  3996. * 0 - leave the WDS peer map/unmap event enabled
  3997. * 1 - disable the WDS peer map/unmap event
  3998. * This flag shall only be set if the target has set the
  3999. * WMI_SERVICE_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_SUPPORT flag.
  4000. * Refer to WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_GET
  4001. * and _SET macros.
  4002. * Bit 19 - show whether the host supports 128 or 256 service classes
  4003. * This bit will be set when host supports for 256 service classes
  4004. * 0 -> host supports 128 service classes
  4005. * 1 -> host supports 255 [0-254] valid service classes,
  4006. * and 255 indicates an invalid service class
  4007. * Refer to WMI_RSRC_CFG_FLAGS2_SAWF_255_SVC_CLASS_SUPPORT_GET/SET
  4008. * macros.
  4009. * Bit 20 - enable feature EPM (Enhanced Power Management)
  4010. * 0 -> disable the feature
  4011. * 1 -> enable the feature
  4012. * Refer to the below WMI_RSRC_CFG_FLAGS2_EPM_GET/SET macros.
  4013. * Bit 21 - enable new MGMT SRNG for beacons and probe responses.
  4014. * 0 -> disable the feature
  4015. * 1 -> enable the feature
  4016. * Refer to the below WMI_RSRC_CFG_FLAGS2_IS_MGMT_SRNG_ENABLED_GET/SET
  4017. * macros.
  4018. * Bit 22 - enable 4address WDS support
  4019. * 0 -> disable the feature
  4020. * 1 -> enable the feature
  4021. * Refer to below WMI_RSRC_CFG_FLAGS2_ENABLE_WDS_NULL_FRAME_SUPPORT
  4022. *
  4023. * Bits 31:23 - Reserved
  4024. */
  4025. A_UINT32 flags2;
  4026. /** @brief host_service_flags - can be used by Host to indicate
  4027. * services that host can support.
  4028. *
  4029. * @details
  4030. * Bit 0
  4031. * The bit will be set when Host HDD supports separate iface creation
  4032. * for NAN. More specifically Host can support creation of NAN vdev
  4033. * in firmware.
  4034. *
  4035. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_GET/SET
  4036. * macros defined below.
  4037. * Bit 1
  4038. * The bit will be set when HOST is capable of processing multiple
  4039. * radio events per radio. More specifically whenever Firmware is
  4040. * sending multiple radio events (WMI_RADIO_LINK_STATS_EVENTID
  4041. * = 0x16004) for a single radio,
  4042. * Through this flag Firmware will know that HOST is able to support
  4043. * delivery of RADIO_LINK_STATS across multiple event messages,
  4044. * and Firmware can send multiple radio events.
  4045. *
  4046. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_GET/SET
  4047. * macros defined below.
  4048. * Bit 2
  4049. * This bit will be set when host is able to handle split AST feature.
  4050. * Refer to the below definitions of the
  4051. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_GET
  4052. * and _SET macros.
  4053. * Bit 3
  4054. * This bit will be set when host is able to enable EAPOL offload to
  4055. * FW for SAE roaming feature.
  4056. * Refer to the below definitions of the
  4057. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_GET
  4058. * and _SET macros.
  4059. * Bit 4
  4060. * This bit will be set when host is able to process the
  4061. * WMI_REG_CC_EXT_EVENT.
  4062. * Refer to the below definitions of the
  4063. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_GET
  4064. * and _SET macros.
  4065. * Bit 5
  4066. * This bit will be set when the host supports NAN channels.
  4067. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_GET/SET
  4068. * Bit 6
  4069. * This bit will be set when the host supports synchronous TWT events.
  4070. * Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_GET
  4071. * and _SET.
  4072. * Bit 7
  4073. * This bit will be set when host supports both LPI and SP mode.
  4074. * when this bit is set to 0 - Indicate LPI only mode
  4075. * when set to 1 - Indicate both SP mode and LPI mode
  4076. * both are supported
  4077. * Refer to the below definitions of the
  4078. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_GET
  4079. * and _SET macros.
  4080. * Bit 8
  4081. * This bit will be set when host wants to disable timer check in
  4082. * reg for AFC.
  4083. * when set to 1 - Disable timer check
  4084. * Refer to the below definitions of the
  4085. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_TIMER_CHECK_GET
  4086. * and _SET macros.
  4087. * Bit 9
  4088. * This bit will be set when host host wants to disable request id
  4089. * check in reg for AFC.
  4090. * when set to 1 - Disable Request ID check
  4091. * Refer to the below definitions of the
  4092. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_REQ_ID_CHECK_GET
  4093. * and _SET macros.
  4094. * Bit 10
  4095. * This bit will be set when host wants to enable indoor for AFC
  4096. * when this bit is set to 0 indoor mode not enabled
  4097. * when this bit is set to 1 indoor mode is enabled
  4098. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_GET
  4099. * and SET macros
  4100. * Bit 11
  4101. * This bit will be set when host wants to enable outdoor for AFC
  4102. * when this bit is set to 0 outdoor mode not enabled
  4103. * when this bit is set to 1 outdoor mode is enabled
  4104. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_GET
  4105. * and SET macros.
  4106. * Bit 12
  4107. * This bit will be set when host host wants to enable/disable
  4108. * REO QREF feature
  4109. * when set to 1 - Enable the REO QREF feature
  4110. * when set to 0 - Disable the REO QREF feature
  4111. * Refer to the below definitions of the
  4112. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_GET
  4113. * and _SET macros.
  4114. * Bit 13
  4115. * This bit will be set when host host wants to enable/disable
  4116. * bang radar 320M support feature
  4117. * when set to 1 - Enable the bang radar 320M support
  4118. * when set to 0 - Disable the bang radar 320M support
  4119. * Refer to the below definitions of the
  4120. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_GET
  4121. * and _SET macros.
  4122. * Bit 14
  4123. * This bit will be set when host wants to enable/disable
  4124. * full BW NOL feature.
  4125. * When set to 1: Enable full BW NOL feature.
  4126. * When set to 0: Disable the full BW NOL feature.
  4127. * Refer to the below definitions of the
  4128. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_GET
  4129. * and _SET macros.
  4130. * Bit 15
  4131. * This bit will be set if the host has smem_mailbox support enabled.
  4132. * Refer to the below definitions of the
  4133. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET
  4134. * and _SET macros.
  4135. * Bit 16
  4136. * ML FULL monitor mode
  4137. * This bit will be set by host to enable ML_FULL_MONITOR_MODE
  4138. * Refer to the below definitions of the
  4139. * WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_GET
  4140. * and _SET macros
  4141. * Bit 17
  4142. * This bit will set by host to inform FW that rx buffer refilling
  4143. * is supported by the host in Qdata feature (tx LCE consent pkt),
  4144. * So FW will start refilling the buffers.
  4145. * Refer to the below definitions of WMI_RSRC_CFG_HOST_SERVICE_FLAG
  4146. * OPT_DP_CTRL_REPLENISH_REFILL_RX_BUFFER_SUPPORT_GET and _SET macros.
  4147. * Bits 31:18 - Reserved
  4148. */
  4149. A_UINT32 host_service_flags;
  4150. /** @brief max_rnr_neighbours -
  4151. * The Maximum number of neighbour RNR's from other SoC.
  4152. * This limits the field @num_bss in @wmi_pdev_tbtt_offset_sync_cmd_fixed_param.
  4153. * Value of 0 means cross SoC TBTT offset synchronization not required and
  4154. * @PDEV_TBTT_OFFSET_SYNC_CMD wouldn't be used.
  4155. */
  4156. A_UINT32 max_rnr_neighbours;
  4157. /** @brief ema_max_vap_cnt - number of maximum EMA Tx vaps (VAPs having both
  4158. * VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set) at any instance
  4159. * of time across SOC. Legacy MBSS Vaps are not accounted in this field.
  4160. */
  4161. A_UINT32 ema_max_vap_cnt;
  4162. /** @brief ema_max_profile_period - maximum profile periodicity
  4163. * (maximum number of beacons after which VAP profiles repeat)
  4164. * for any EMA VAP on any pdev.
  4165. */
  4166. A_UINT32 ema_max_profile_period;
  4167. /** @brief max_ndp_sessions
  4168. * This is the max ndp sessions sent by the host which is the minimum
  4169. * of the value requested within the host's ini configurations and
  4170. * the max ndp sessions supported by the firmware (as reported in the
  4171. * SERVICE_READY_EXT2_EVENT message).
  4172. */
  4173. A_UINT32 max_ndp_sessions;
  4174. /** @brief max_ndi_supported
  4175. * This is the max ndi interfaces sent by the host based on the value
  4176. * specified by the host's ini configuration.
  4177. */
  4178. A_UINT32 max_ndi_interfaces;
  4179. /** @brief max_ap_vaps
  4180. * Maximum number of AP mode vdevs created at any time.
  4181. * This value is minimum of the number of AP vdevs supported by
  4182. * the target and host.
  4183. */
  4184. A_UINT32 max_ap_vaps;
  4185. /** @brief cbc_flow_ena
  4186. * When cbc_flow_ena is se, halphy will do Cold Boot Calibration flow.
  4187. * Otherwise, halphy will do normal flow.
  4188. */
  4189. A_UINT32 cbc_flow_ena;
  4190. /** @brief ema_init_config - can be used by Host to indicate beacon size
  4191. * @details
  4192. * Bit 0 : 15 - Size of beacon, currently it can be sent as
  4193. * 1500 or 2500 or 4000 bytes
  4194. * Bit 16 : 31 - Reserved
  4195. * In case of Backward compatibility, if this variable is 0 then
  4196. * default beacon size (1500) is used.
  4197. */
  4198. A_UINT32 ema_init_config;
  4199. /** @brief carrier_config
  4200. * Carrier profile configuration
  4201. * BIT 0 -> enable/disable charter configurations
  4202. * BIT 1 : 31 Reserved
  4203. */
  4204. A_UINT32 carrier_config;
  4205. /** @brief num_of_linkview_peers - proposed by the host value of
  4206. * the peers with the num_of_linkview_msduqs_per_tid allocation
  4207. * @details
  4208. * Host can request what the number of 'num_peers' should use
  4209. * num_of_linkview_msduqs_per_tid. All other peers will use
  4210. * default number of MSDUQs allocated.
  4211. */
  4212. A_UINT32 num_of_linkview_peers;
  4213. /** @brief num_of_linkview_msduqs_per_tid - proposed by the host value of
  4214. * MSDUQs per each LinkView peer's TID
  4215. * @details
  4216. * Host sends the number of MSDUQs per each LinkView peer's TID.
  4217. * This number will be used during resources allocation for
  4218. * LinkView peer in the target.
  4219. */
  4220. A_UINT32 num_of_linkview_msduqs_per_tid;
  4221. /**
  4222. * @brief num_max_active_vdevs -
  4223. * number of max active virtual devices (VAPs) to support
  4224. */
  4225. A_UINT32 num_max_active_vdevs;
  4226. /**
  4227. * @brief num_max_mlo_link_per_ml_bss
  4228. * number of max partner links of a ML BSS
  4229. */
  4230. A_UINT32 num_max_mlo_link_per_ml_bss;
  4231. /**
  4232. * @brief num_max_active_mlo_link_per_ml_bss
  4233. * number of max active partner links of a ML BSS
  4234. */
  4235. A_UINT32 num_max_active_mlo_link_per_ml_bss;
  4236. } wmi_resource_config;
  4237. #define WMI_MSDU_FLOW_AST_ENABLE_GET(msdu_flow_config0, ast_x) \
  4238. (((ast_x) == 0) ? 1 : ((msdu_flow_config0) & (1 << ((ast_x) - 1))))
  4239. #define WMI_MSDU_FLOW_AST_ENABLE_SET(msdu_flow_config0, ast_x, enable) \
  4240. do { \
  4241. if ((ast_x) == 0) break; \
  4242. if ((enable)) { \
  4243. (msdu_flow_config0) |= (1 << ((ast_x) - 1)); \
  4244. } else { \
  4245. (msdu_flow_config0) &= ~(1 << ((ast_x) - 1)); \
  4246. } \
  4247. } while(0)
  4248. #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x) \
  4249. (((msdu_flow_config1) & (0x0f << ((ast_x) * 4))) >> ((ast_x) * 4))
  4250. #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET( \
  4251. msdu_flow_config1, ast_x, mask) \
  4252. do { \
  4253. (msdu_flow_config1) &= ~(0xF << ((ast_x) * 4)); \
  4254. (msdu_flow_config1) |= ((mask) << ((ast_x) * 4)); \
  4255. } while(0)
  4256. #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1) \
  4257. (((msdu_flow_config1) & 0xff0000) >> 16)
  4258. #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask) \
  4259. do { \
  4260. (msdu_flow_config1) &= ~0xff0000; \
  4261. (msdu_flow_config1) |= ((mask) << 16); \
  4262. } while(0)
  4263. #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1) \
  4264. ((msdu_flow_config1 & 0xff000000) >> 24)
  4265. #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask) \
  4266. do { \
  4267. (msdu_flow_config1) &= ~0xff000000; \
  4268. (msdu_flow_config1) |= ((mask) << 24); \
  4269. } while(0)
  4270. #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
  4271. do { \
  4272. (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  4273. (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
  4274. WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  4275. } while (0)
  4276. #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
  4277. (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
  4278. WMI_RSRC_CFG_FLAG_ ## flag ## _S)
  4279. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
  4280. WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
  4281. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
  4282. WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
  4283. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
  4284. WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
  4285. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
  4286. WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
  4287. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
  4288. WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
  4289. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
  4290. WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
  4291. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
  4292. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
  4293. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
  4294. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
  4295. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
  4296. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
  4297. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
  4298. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
  4299. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
  4300. WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
  4301. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
  4302. WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
  4303. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
  4304. WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
  4305. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
  4306. WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
  4307. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
  4308. WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
  4309. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
  4310. WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
  4311. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
  4312. WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
  4313. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
  4314. WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
  4315. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
  4316. WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
  4317. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
  4318. WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
  4319. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_SET(word32, value) \
  4320. WMI_RSRC_CFG_FLAG_SET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT, (value))
  4321. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_GET(word32) \
  4322. WMI_RSRC_CFG_FLAG_GET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT)
  4323. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_SET(word32, value) \
  4324. WMI_RSRC_CFG_FLAG_SET((word32), TCL_CCE_DISABLE, (value))
  4325. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_GET(word32) \
  4326. WMI_RSRC_CFG_FLAG_GET((word32), TCL_CCE_DISABLE)
  4327. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_SET(word32, value) \
  4328. WMI_RSRC_CFG_FLAG_SET((word32), TIM_V2_SUPPORT_ENABLE, (value))
  4329. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_GET(word32) \
  4330. WMI_RSRC_CFG_FLAG_GET((word32), TIM_V2_SUPPORT_ENABLE)
  4331. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_SET(word32, value) \
  4332. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE, (value))
  4333. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_GET(word32) \
  4334. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE)
  4335. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_SET(word32, value) \
  4336. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE_VALID, (value))
  4337. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_GET(word32) \
  4338. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE_VALID)
  4339. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_SET(word32, value) \
  4340. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE, (value))
  4341. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_GET(word32) \
  4342. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE)
  4343. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_SET(word32, value) \
  4344. WMI_RSRC_CFG_FLAG_SET((word32), TX_ACK_RSSI, (value))
  4345. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_GET(word32) \
  4346. WMI_RSRC_CFG_FLAG_GET((word32), TX_ACK_RSSI)
  4347. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_SET(word32, value) \
  4348. WMI_RSRC_CFG_FLAG_SET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN, (value))
  4349. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_GET(word32) \
  4350. WMI_RSRC_CFG_FLAG_GET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN)
  4351. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_SET(word32, value) \
  4352. WMI_RSRC_CFG_FLAG_SET((word32), PEER_UNMAP_RESPONSE_SUPPORT, (value))
  4353. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_GET(word32) \
  4354. WMI_RSRC_CFG_FLAG_GET((word32), PEER_UNMAP_RESPONSE_SUPPORT)
  4355. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_SET(word32, value) \
  4356. WMI_RSRC_CFG_FLAG_SET((word32), HTT_PEER_STATS, (value))
  4357. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_GET(word32) \
  4358. WMI_RSRC_CFG_FLAG_GET((word32), HTT_PEER_STATS)
  4359. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_SET(word32, value) \
  4360. WMI_RSRC_CFG_FLAG_SET((word32), PEER_TID_EXT, (value))
  4361. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_GET(word32) \
  4362. WMI_RSRC_CFG_FLAG_GET((word32), PEER_TID_EXT)
  4363. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_SET(word32, value) \
  4364. WMI_RSRC_CFG_FLAG_SET((word32), VIDEO_OVER_WIFI_ENABLE, (value))
  4365. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_GET(word32) \
  4366. WMI_RSRC_CFG_FLAG_GET((word32), VIDEO_OVER_WIFI_ENABLE)
  4367. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_SET(word32, value) \
  4368. WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT, (value))
  4369. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_GET(word32) \
  4370. WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT)
  4371. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_SET(word32, value) \
  4372. WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT, (value))
  4373. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_GET(word32) \
  4374. WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT)
  4375. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_SET(word32, value) \
  4376. WMI_RSRC_CFG_FLAG_SET((word32), TX_COMPLETION_TX_TSF64_ENABLE, (value))
  4377. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_GET(word32) \
  4378. WMI_RSRC_CFG_FLAG_GET((word32), TX_COMPLETION_TX_TSF64_ENABLE)
  4379. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_SET(word32, value) \
  4380. WMI_RSRC_CFG_FLAG_SET((word32), PACKET_CAPTURE_SUPPORT, (value))
  4381. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_GET(word32) \
  4382. WMI_RSRC_CFG_FLAG_GET((word32), PACKET_CAPTURE_SUPPORT)
  4383. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_SET(word32, value) \
  4384. WMI_RSRC_CFG_FLAG_SET((word32), BSS_MAX_IDLE_TIME_SUPPORT, (value))
  4385. #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_GET(word32) \
  4386. WMI_RSRC_CFG_FLAG_GET((word32), BSS_MAX_IDLE_TIME_SUPPORT)
  4387. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_SET(word32, value) \
  4388. WMI_RSRC_CFG_FLAG_SET((word32), AUDIO_SYNC_SUPPORT, (value))
  4389. #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_GET(word32) \
  4390. WMI_RSRC_CFG_FLAG_GET((word32), AUDIO_SYNC_SUPPORT)
  4391. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_SET(word32, value) \
  4392. WMI_RSRC_CFG_FLAG_SET((word32), IPA_DISABLE, (value))
  4393. #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_GET(word32) \
  4394. WMI_RSRC_CFG_FLAG_GET((word32), IPA_DISABLE)
  4395. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_SET(word32, value) \
  4396. WMI_RSRC_CFG_FLAG_SET((word32), PCIE_GEN_SWITCH_CAPABLITY, (value))
  4397. #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_GET(word32) \
  4398. WMI_RSRC_CFG_FLAG_GET((word32), PCIE_GEN_SWITCH_CAPABLITY)
  4399. #define WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_GET(flags2, pdev_id) \
  4400. WMI_GET_BITS(flags2, pdev_id, 1)
  4401. #define WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_SET(flags2, pdev_id, value) \
  4402. WMI_SET_BITS(flags2, pdev_id, 1, value)
  4403. #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_GET(flags2) \
  4404. WMI_GET_BITS(flags2, 4, 2)
  4405. #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_SET(flags2, value) \
  4406. WMI_SET_BITS(flags2, 4, 2, value)
  4407. #define WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED_GET(flags2) \
  4408. WMI_GET_BITS(flags2, 6, 1)
  4409. #define WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED_SET(flags2, value) \
  4410. WMI_SET_BITS(flags2, 6, 1, value)
  4411. #define WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED_GET(flags2) \
  4412. WMI_GET_BITS(flags2, 7, 1)
  4413. #define WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED_SET(flags2, value) \
  4414. WMI_SET_BITS(flags2, 7, 1, value)
  4415. #define WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED_GET(flags2) \
  4416. WMI_GET_BITS(flags2, 8, 1)
  4417. #define WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED_SET(flags2, value) \
  4418. WMI_SET_BITS(flags2, 8, 1, value)
  4419. #define WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_GET(flags2) \
  4420. WMI_GET_BITS(flags2, 9, 1)
  4421. #define WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_SET(flags2, value) \
  4422. WMI_SET_BITS(flags2, 9, 1, value)
  4423. #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_GET(flags2) \
  4424. WMI_GET_BITS(flags2, 10, 1)
  4425. #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_SET(flags2, value) \
  4426. WMI_SET_BITS(flags2, 10, 1, value)
  4427. #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_GET(flags2) \
  4428. WMI_GET_BITS(flags2, 11, 2)
  4429. #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_SET(flags2, value) \
  4430. WMI_SET_BITS(flags2, 11, 2, value)
  4431. #define WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_GET(flags2) \
  4432. WMI_GET_BITS(flags2, 13, 1)
  4433. #define WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_SET(flags2, value) \
  4434. WMI_SET_BITS(flags2, 13, 1, value)
  4435. #define WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_GET(flags2) \
  4436. WMI_GET_BITS(flags2, 14, 1)
  4437. #define WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_SET(flags2, value) \
  4438. WMI_SET_BITS(flags2, 14, 1, value)
  4439. #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_GET(flags2) \
  4440. WMI_GET_BITS(flags2, 15, 1)
  4441. #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_SET(flags2, value) \
  4442. WMI_SET_BITS(flags2, 15, 1, value)
  4443. #define WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_GET(flags2) \
  4444. WMI_GET_BITS(flags2, 16, 1)
  4445. #define WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_SET(flags2, value) \
  4446. WMI_SET_BITS(flags2, 16, 1, value)
  4447. #define WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_GET(flags2) \
  4448. WMI_GET_BITS(flags2, 17, 1)
  4449. #define WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_SET(flags2, value) \
  4450. WMI_SET_BITS(flags2, 17, 1, value)
  4451. #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_GET(flags2) \
  4452. WMI_GET_BITS(flags2, 18, 1)
  4453. #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_SET(flags2, value) \
  4454. WMI_SET_BITS(flags2, 18, 1, value)
  4455. #define WMI_RSRC_CFG_FLAGS2_SAWF_255_SVC_CLASS_SUPPORT_GET(flags2) \
  4456. WMI_GET_BITS(flags2, 19, 1)
  4457. #define WMI_RSRC_CFG_FLAGS2_SAWF_255_SVC_CLASS_SUPPORT_SET(flags2, value) \
  4458. WMI_SET_BITS(flags2, 19, 1, value)
  4459. #define WMI_RSRC_CFG_FLAGS2_EPM_GET(flags2) \
  4460. WMI_GET_BITS(flags2, 20, 1)
  4461. #define WMI_RSRC_CFG_FLAGS2_EPM_SET(flags2, value) \
  4462. WMI_SET_BITS(flags2, 20, 1, value)
  4463. #define WMI_RSRC_CFG_FLAGS2_IS_MGMT_SRNG_ENABLED_GET(flags2) \
  4464. WMI_GET_BITS(flags2, 21, 1)
  4465. #define WMI_RSRC_CFG_FLAGS2_IS_MGMT_SRNG_ENABLED_SET(flags2, value) \
  4466. WMI_SET_BITS(flags2, 21, 1, value)
  4467. #define WMI_RSRC_CFG_FLAGS2_ENABLE_WDS_NULL_FRAME_SUPPORT_GET(flags2) \
  4468. WMI_GET_BITS(flags2, 22, 1)
  4469. #define WMI_RSRC_CFG_FLAGS2_ENABLE_WDS_NULL_FRAME_SUPPORT_SET(flags2, value) \
  4470. WMI_SET_BITS(flags2, 22, 1, value)
  4471. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_GET(host_service_flags) \
  4472. WMI_GET_BITS(host_service_flags, 0, 1)
  4473. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_SET(host_service_flags, val) \
  4474. WMI_SET_BITS(host_service_flags, 0, 1, val)
  4475. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_GET(host_service_flags) \
  4476. WMI_GET_BITS(host_service_flags, 1, 1)
  4477. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_SET(host_service_flags, val) \
  4478. WMI_SET_BITS(host_service_flags, 1, 1, val)
  4479. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_GET(host_service_flags) \
  4480. WMI_GET_BITS(host_service_flags, 2, 1)
  4481. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_SET(host_service_flags, val) \
  4482. WMI_SET_BITS(host_service_flags, 2, 1, val)
  4483. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_GET(host_service_flags) \
  4484. WMI_GET_BITS(host_service_flags, 3, 1)
  4485. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_SET(host_service_flags, val) \
  4486. WMI_SET_BITS(host_service_flags, 3, 1, val)
  4487. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_GET(host_service_flags) \
  4488. WMI_GET_BITS(host_service_flags, 4, 1)
  4489. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_SET(host_service_flags, val) \
  4490. WMI_SET_BITS(host_service_flags, 4, 1, val)
  4491. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_GET(host_service_flags) \
  4492. WMI_GET_BITS(host_service_flags, 5, 1)
  4493. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_SET(host_service_flags, val) \
  4494. WMI_SET_BITS(host_service_flags, 5, 1, val)
  4495. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_GET(host_service_flags) \
  4496. WMI_GET_BITS(host_service_flags, 6, 1)
  4497. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_SET(host_service_flags, val) \
  4498. WMI_SET_BITS(host_service_flags, 6, 1, val)
  4499. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_GET(host_service_flags) \
  4500. WMI_GET_BITS(host_service_flags, 7, 1)
  4501. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_SET(host_service_flags, val) \
  4502. WMI_SET_BITS(host_service_flags, 7, 1, val)
  4503. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_TIMER_CHECK_GET(host_service_flags) \
  4504. WMI_GET_BITS(host_service_flags, 8, 1)
  4505. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_TIMER_CHECK_SET(host_service_flags, val) \
  4506. WMI_SET_BITS(host_service_flags, 8, 1, val)
  4507. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_REQ_ID_CHECK_GET(host_service_flags) \
  4508. WMI_GET_BITS(host_service_flags, 9, 1)
  4509. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_REQ_ID_CHECK_SET(host_service_flags, val) \
  4510. WMI_SET_BITS(host_service_flags, 9, 1, val)
  4511. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_GET(host_service_flags) \
  4512. WMI_GET_BITS(host_service_flags, 10, 1)
  4513. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_SET(host_service_flags, val) \
  4514. WMI_SET_BITS(host_service_flags, 10, 1, val)
  4515. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_GET(host_service_flags) \
  4516. WMI_GET_BITS(host_service_flags, 11, 1)
  4517. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_SET(host_service_flags, val) \
  4518. WMI_SET_BITS(host_service_flags, 11, 1, val)
  4519. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_GET(host_service_flags) \
  4520. WMI_GET_BITS(host_service_flags, 12, 1)
  4521. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_SET(host_service_flags, val) \
  4522. WMI_SET_BITS(host_service_flags, 12, 1, val)
  4523. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_GET(host_service_flags) \
  4524. WMI_GET_BITS(host_service_flags, 13, 1)
  4525. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_SET(host_service_flags, val) \
  4526. WMI_SET_BITS(host_service_flags, 13, 1, val)
  4527. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_GET(host_service_flags) \
  4528. WMI_GET_BITS(host_service_flags, 14, 1)
  4529. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_SET(host_service_flags, val) \
  4530. WMI_SET_BITS(host_service_flags, 14, 1, val)
  4531. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET(host_service_flags) \
  4532. WMI_GET_BITS(host_service_flags, 15, 1)
  4533. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_SET(host_service_flags, val) \
  4534. WMI_SET_BITS(host_service_flags, 15, 1, val)
  4535. /*
  4536. * Temporarily retain deprecated old "QMS_DLKM" macro names as aliases
  4537. * for the new "SMEM_MAILBOX" macro names.
  4538. */
  4539. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_QMS_DLKM_SUPPORT_GET(host_service_flags) /* DEPRECATED */ \
  4540. WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET(host_service_flags)
  4541. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_QMS_DLKM_SUPPORT_SET(host_service_flags, val) /* DEPRECATED */ \
  4542. WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_SET(host_service_flags, val)
  4543. /* ML FULL monitor mode */
  4544. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_GET(host_service_flags) \
  4545. WMI_GET_BITS(host_service_flags, 16, 1)
  4546. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_SET(host_service_flags, val) \
  4547. WMI_SET_BITS(host_service_flags, 16, 1, val)
  4548. /* This bit is used to inform FW to provide refill buffers in Qdata feature */
  4549. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_OPT_DP_CTRL_REPLENISH_REFILL_RX_BUFFER_SUPPORT_GET(host_service_flags) \
  4550. WMI_GET_BITS(host_service_flags, 17, 1)
  4551. #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_OPT_DP_CTRL_REPLENISH_REFILL_RX_BUFFER_SUPPORT_SET(host_service_flags, val) \
  4552. WMI_SET_BITS(host_service_flags, 17, 1, val)
  4553. #define WMI_RSRC_CFG_CARRIER_CFG_CHARTER_ENABLE_GET(carrier_config) \
  4554. WMI_GET_BITS(carrier_config, 0, 1)
  4555. #define WMI_RSRC_CFG_CARRIER_CFG_CHARTER_ENABLE_SET(carrier_config, val) \
  4556. WMI_SET_BITS(carrier_config, 0, 1, val)
  4557. /** Top nibble can be used to diff between HE and EHT: 0xVXXXXXXX
  4558. * If V == 0b0000: format is HE.
  4559. * If V == 0b0001: format is EHT.
  4560. */
  4561. #define WMI_RSRC_CFG_IS_EHT_GET(param_value) \
  4562. WMI_GET_BITS(param_value, 28, 4)
  4563. #define WMI_RSRC_CFG_IS_EHT_SET(param_value, val) \
  4564. WMI_SET_BITS(param_value, 28, 4, val)
  4565. /* Used along with the above macro to set the value. */
  4566. #define WMI_RSRC_CFG_PARAM_VALUE_GET(param_value) \
  4567. WMI_GET_BITS(param_value, 0, 28)
  4568. #define WMI_RSRC_CFG_PARAM_VALUE_SET(param_value, val) \
  4569. WMI_SET_BITS(param_value, 0, 28, val)
  4570. typedef struct {
  4571. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
  4572. /** The following indicate the WMI versions to be supported by
  4573. * the host driver. Note that the host driver decide to
  4574. * "downgrade" its WMI version support and this may not be the
  4575. * native version of the host driver. */
  4576. wmi_abi_version host_abi_vers;
  4577. A_UINT32 num_host_mem_chunks; /** size of array host_mem_chunks[] */
  4578. /* This init_cmd_fixed_param TLV is followed by the below TLVs:
  4579. * wmi_resource_config resource_config;
  4580. * wlan_host_memory_chunk host_mem_chunks[];
  4581. * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
  4582. * Note that the hw_mode_config, in spite of its "pdev" name,
  4583. * applies to the entire target rather than for a single pdev
  4584. * within the target.
  4585. * To avoid specifying a HW mode for the target, the host should
  4586. * fill hw_mode_config's fields with 0x0.
  4587. * wmi_pdev_band_to_mac band_to_mac[];
  4588. * wmi_htt_msdu_idx_to_htt_msdu_qtype htt_msdu_idx_to_qtype_map[];
  4589. */
  4590. } wmi_init_cmd_fixed_param;
  4591. typedef enum {
  4592. WMI_WIFI_STANDARD_4 = 0,
  4593. WMI_WIFI_STANDARD_5 = 1,
  4594. WMI_WIFI_STANDARD_6 = 2,
  4595. WMI_WIFI_STANDARD_6E = 3,
  4596. WMI_WIFI_STANDARD_7 = 4,
  4597. } WMI_WIFI_STANDARD;
  4598. typedef enum {
  4599. WMI_HOST_NONE = 0, /* No concurrency mode supported */
  4600. WMI_HOST_DBS = 1, /* When 2.4G + 5G & 2.4G + 6G if 6G is supported */
  4601. WMI_HOST_DBS_SBS = 2, /* When 2.4G + 5G, 2.4G + 6G, 5G + 6G & 5G + 5G is supported */
  4602. } WMI_BAND_CONCURRENCY;
  4603. typedef enum {
  4604. WMI_SISO = 1, /* When 1x1 is supported */
  4605. WMI_MIMO_2X2 = 2, /* When 2x2 MIMO is supported */
  4606. } WMI_NUM_ANTENNAS;
  4607. typedef enum {
  4608. WMI_VENDOR1_REQ1_VERSION_3_00 = 0,
  4609. WMI_VENDOR1_REQ1_VERSION_3_01 = 1,
  4610. WMI_VENDOR1_REQ1_VERSION_3_20 = 2,
  4611. WMI_VENDOR1_REQ1_VERSION_3_30 = 3,
  4612. WMI_VENDOR1_REQ1_VERSION_3_40 = 4,
  4613. WMI_VENDOR1_REQ1_VERSION_4_00 = 5,
  4614. WMI_VENDOR1_REQ1_VERSION_4_10 = 6,
  4615. } WMI_VENDOR1_REQ1_VERSION;
  4616. typedef enum {
  4617. WMI_VENDOR1_REQ2_VERSION_3_00 = 0,
  4618. WMI_VENDOR1_REQ2_VERSION_3_01 = 1,
  4619. WMI_VENDOR1_REQ2_VERSION_3_20 = 2,
  4620. WMI_VENDOR1_REQ2_VERSION_3_50 = 3,
  4621. } WMI_VENDOR1_REQ2_VERSION;
  4622. typedef enum {
  4623. WMI_HOST_BAND_CAP_2GHZ = 0x01,
  4624. WMI_HOST_BAND_CAP_5GHZ = 0x02,
  4625. WMI_HOST_BAND_CAP_6GHZ = 0x04,
  4626. } WMI_HOST_BAND_CAP;
  4627. /* HW features supported info */
  4628. /* enum WMI_WIFI_STANDARD are possible values for WiFi standard bitfield */
  4629. #define WMI_GET_WIFI_STANDARD(var, feature_bitmap) \
  4630. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 0, 4)
  4631. #define WMI_SET_WIFI_STANDARD(feature_bitmap, val) \
  4632. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 0, 4, val)
  4633. /* enum WMI_BAND_CONCURRENCY are possible values for band concurrency support bitfield */
  4634. #define WMI_GET_BAND_CONCURRENCY_SUPPORT(var, feature_bitmap) \
  4635. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 4, 3)
  4636. #define WMI_SET_BAND_CONCURRENCY_SUPPORT(feature_bitmap, val) \
  4637. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 4, 3, val)
  4638. /* PNO feature supported info */
  4639. #define WMI_GET_PNO_SCAN_IN_UNASSOC_STATE(var, feature_bitmap) \
  4640. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 7, 1)
  4641. #define WMI_SET_PNO_SCAN_IN_UNASSOC_STATE(feature_bitmap, val) \
  4642. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 7, 1, val)
  4643. #define WMI_GET_PNO_SCAN_IN_ASSOC_STATE(var, feature_bitmap) \
  4644. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 8, 1)
  4645. #define WMI_SET_PNO_SCAN_IN_ASSOC_STATE(feature_bitmap, val) \
  4646. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 8, 1, val)
  4647. /* TWT feature supported info */
  4648. #define WMI_GET_TWT_FEATURE_SUPPORT(var, feature_bitmap) \
  4649. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 9, 1)
  4650. #define WMI_SET_TWT_FEATURE_SUPPORT(feature_bitmap, val) \
  4651. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 9, 1, val)
  4652. #define WMI_GET_TWT_REQUESTOR(var, feature_bitmap) \
  4653. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 10, 1)
  4654. #define WMI_SET_TWT_REQUESTER(feature_bitmap, val) \
  4655. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 10, 1, val)
  4656. #define WMI_GET_TWT_BROADCAST(var, feature_bitmap) \
  4657. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 11, 1)
  4658. #define WMI_SET_TWT_BROADCAST(feature_bitmap, val) \
  4659. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 11, 1, val)
  4660. #define WMI_GET_TWT_FLEXIBLE(var, feature_bitmap) \
  4661. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 12, 1)
  4662. #define WMI_SET_TWT_FLEXIBLE(feature_bitmap, val) \
  4663. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 12, 1, val)
  4664. /* WIFI optimizer feature supported info */
  4665. #define WMI_GET_WIFI_OPT_FEATURE_SUPPORT(var, feature_bitmap) \
  4666. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 13, 1)
  4667. #define WMI_SET_WIFI_OPT_FEATURE_SUPPORT(feature_bitmap, val) \
  4668. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 13, 1, val)
  4669. /* RFC8325 feature supported info */
  4670. #define WMI_GET_RFC8325_FEATURE_SUPPORT(var, feature_bitmap) \
  4671. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 14, 1)
  4672. #define WMI_SET_RFC8325_FEATURE_SUPPORT(feature_bitmap, val) \
  4673. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 14, 1, val)
  4674. /* MHS feature supported info */
  4675. #define WMI_GET_MHS_5G_SUPPORT(var, feature_bitmap) \
  4676. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 15, 1)
  4677. #define WMI_SET_MHS_5G_SUPPORT(feature_bitmap, val) \
  4678. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 15, 1, val)
  4679. #define WMI_GET_MHS_6G_SUPPORT(var, feature_bitmap) \
  4680. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 16, 1)
  4681. #define WMI_SET_MHS_6G_SUPPORT(feature_bitmap, val) \
  4682. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 16, 1, val)
  4683. #define WMI_GET_MHS_MAX_CLIENTS_SUPPORT(var, feature_bitmap) \
  4684. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 17, 8)
  4685. #define WMI_SET_MHS_MAX_CLIENTS_SUPPORT(feature_bitmap, val) \
  4686. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 17, 8, val)
  4687. #define WMI_GET_MHS_SET_COUNTRY_CODE_HAL_SUPPORT(var, feature_bitmap) \
  4688. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 25, 1)
  4689. #define WMI_SET_MHS_SET_COUNTRY_CODE_HAL_SUPPORT(feature_bitmap, val) \
  4690. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 25, 1, val)
  4691. #define WMI_GET_MHS_GETVALID_CHANNELS_SUPPORT(var, feature_bitmap) \
  4692. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 26, 1)
  4693. #define WMI_SET_MHS_GETVALID_CHANNELS_SUPPORT(feature_bitmap, val) \
  4694. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 26, 1, val)
  4695. /* enum WMI_WIFI_STANDARD are possible values for MHS DOT11 mode support bitfield */
  4696. #define WMI_GET_MHS_DOT11_MODE_SUPPORT(var, feature_bitmap) \
  4697. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 27, 4)
  4698. #define WMI_SET_MHS_DOT11_MODE_SUPPORT(feature_bitmap, val) \
  4699. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 27, 4, val)
  4700. #define WMI_GET_MHS_WPA3_SUPPORT(var, feature_bitmap) \
  4701. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 31, 1)
  4702. #define WMI_SET_MHS_WPA3_SUPPORT(feature_bitmap, val) \
  4703. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 31, 1, val)
  4704. /* Vendor requirement1 supported version info */
  4705. /* enum's WMI_VENDORxx_REQxx_VERSION are the possible vaues for below bitfield*/
  4706. #define WMI_GET_VENDOR_REQ_1_VERSION(var, feature_bitmap) \
  4707. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 32, 8)
  4708. #define WMI_SET_VENDOR_REQ_1_VERSION(feature_bitmap, val) \
  4709. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 32, 8, val)
  4710. /* Roaming feature supported info */
  4711. #define WMI_GET_ROAMING_HIGH_CU_ROAM_TRIGGER(var, feature_bitmap) \
  4712. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 40, 1)
  4713. #define WMI_SET_ROAMING_HIGH_CU_ROAM_TRIGGER(feature_bitmap, val) \
  4714. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 40, 1, val)
  4715. #define WMI_GET_ROAMING_EMERGENCY_TRIGGER(var, feature_bitmap) \
  4716. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 41, 1)
  4717. #define WMI_SET_ROAMING_EMERGENCY_TRIGGER(feature_bitmap, val) \
  4718. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 41, 1, val)
  4719. #define WMI_GET_ROAMING_BTM_TRIGGER(var, feature_bitmap) \
  4720. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 42, 1)
  4721. #define WMI_SET_ROAMING_BTM_TRIGGER(feature_bitmap, val) \
  4722. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 42, 1, val)
  4723. #define WMI_GET_ROAMING_IDLE_TRIGGER(var, feature_bitmap) \
  4724. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 43, 1)
  4725. #define WMI_SET_ROAMING_IDLE_TRIGGER(feature_bitmap, val) \
  4726. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 43, 1, val)
  4727. #define WMI_GET_ROAMING_WTC_TRIGGER(var, feature_bitmap) \
  4728. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 44, 1)
  4729. #define WMI_SET_ROAMING_WTC_TRIGGER(feature_bitmap, val) \
  4730. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 44, 1, val)
  4731. #define WMI_GET_ROAMING_BTCOEX_TRIGGER(var, feature_bitmap) \
  4732. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 45, 1)
  4733. #define WMI_SET_ROAMING_BTCOEX_TRIGGER(feature_bitmap, val) \
  4734. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 45, 1, val)
  4735. #define WMI_GET_ROAMING_BTW_WPA_WPA2(var, feature_bitmap) \
  4736. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 46, 1)
  4737. #define WMI_SET_ROAMING_BTW_WPA_WPA2(feature_bitmap, val) \
  4738. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 46, 1, val)
  4739. #define WMI_GET_ROAMING_MANAGE_CHAN_LIST_API(var, feature_bitmap) \
  4740. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 47, 1)
  4741. #define WMI_SET_ROAMING_MANAGE_CHAN_LIST_API(feature_bitmap, val) \
  4742. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 47, 1, val)
  4743. #define WMI_GET_ROAMING_ADAPTIVE_11R(var, feature_bitmap) \
  4744. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 48, 1)
  4745. #define WMI_SET_ROAMING_ADAPTIVE_11R(feature_bitmap, val) \
  4746. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 48, 1, val)
  4747. #define WMI_GET_ROAMING_CTRL_API_GET_SET(var, feature_bitmap) \
  4748. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 49, 1)
  4749. #define WMI_SET_ROAMING_CTRL_API_GET_SET(feature_bitmap, val) \
  4750. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 49, 1, val)
  4751. #define WMI_GET_ROAMING_CTRL_API_REASSOC(var, feature_bitmap) \
  4752. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 50, 1)
  4753. #define WMI_SET_ROAMING_CTRL_API_REASSOC(feature_bitmap, val) \
  4754. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 50, 1, val)
  4755. #define WMI_GET_ROAMING_CTRL_GET_CU(var, feature_bitmap) \
  4756. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 51, 1)
  4757. #define WMI_SET_ROAMING_CTRL_GET_CU(feature_bitmap, val) \
  4758. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 51, 1, val)
  4759. /* Vendor requirement2 supported version info */
  4760. /* enum's WMI_VENDORxx_REQxx_VERSION are the possible vaues for below bitfield*/
  4761. #define WMI_GET_VENDOR_REQ_2_VERSION(var, feature_bitmap) \
  4762. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 52, 8)
  4763. #define WMI_SET_VENDOR_REQ_2_VERSION(feature_bitmap, val) \
  4764. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 52, 8, val)
  4765. #define WMI_GET_ASSURANCE_DISCONNECT_REASON_API(var, feature_bitmap) \
  4766. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 60, 1)
  4767. #define WMI_SET_ASSURANCE_DISCONNECT_REASON_API(feature_bitmap, val) \
  4768. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 60, 1, val)
  4769. /* Frame pcap logging */
  4770. #define WMI_GET_FRAME_PCAP_LOG_MGMT(var, feature_bitmap) \
  4771. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 61, 1)
  4772. #define WMI_SET_FRAME_PCAP_LOG_MGMT(feature_bitmap, val) \
  4773. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 61, 1, val)
  4774. #define WMI_GET_FRAME_PCAP_LOG_CTRL(var, feature_bitmap) \
  4775. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 62, 1)
  4776. #define WMI_SET_FRAME_PCAP_LOG_CTRL(feature_bitmap, val) \
  4777. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 62, 1, val)
  4778. #define WMI_GET_FRAME_PCAP_LOG_DATA(var, feature_bitmap) \
  4779. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 63, 1)
  4780. #define WMI_SET_FRAME_PCAP_LOG_DATA(feature_bitmap, val) \
  4781. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 63, 1, val)
  4782. /* Security features supported info */
  4783. #define WMI_GET_SECURITY_WPA3_SAE_H2E(var, feature_bitmap) \
  4784. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 64, 1)
  4785. #define WMI_SET_SECURITY_WPA3_SAE_H2E(feature_bitmap, val) \
  4786. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 64, 1, val)
  4787. #define WMI_GET_SECURITY_WPA3_SAE_FT(var, feature_bitmap) \
  4788. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 65, 1)
  4789. #define WMI_SET_SECURITY_WPA3_SAE_FT(feature_bitmap, val) \
  4790. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 65, 1, val)
  4791. #define WMI_GET_SECURITY_WPA3_ENTERP_SUITEB(var, feature_bitmap) \
  4792. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 66, 1)
  4793. #define WMI_SET_SECURITY_WPA3_ENTERP_SUITEB(feature_bitmap, val) \
  4794. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 66, 1, val)
  4795. #define WMI_GET_SECURITY_WPA3_ENTERP_SUITEB_192bit(var, feature_bitmap) \
  4796. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 67, 1)
  4797. #define WMI_SET_SECURITY_WPA3_ENTERP_SUITEB_192bit(feature_bitmap, val) \
  4798. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 67, 1, val)
  4799. #define WMI_GET_SECURITY_FILS_SHA256(var, feature_bitmap) \
  4800. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 68, 1)
  4801. #define WMI_SET_SECURITY_FILS_SHA256(feature_bitmap, val) \
  4802. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 68, 1, val)
  4803. #define WMI_GET_SECURITY_FILS_SHA384(var, feature_bitmap) \
  4804. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 69, 1)
  4805. #define WMI_SET_SECURITY_FILS_SHA384(feature_bitmap, val) \
  4806. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 69, 1, val)
  4807. #define WMI_GET_SECURITY_FILS_SHA256_FT(var, feature_bitmap) \
  4808. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 70, 1)
  4809. #define WMI_SET_SECURITY_FILS_SHA256_FT(feature_bitmap, val) \
  4810. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 70, 1, val)
  4811. #define WMI_GET_SECURITY_FILS_SHA384_FT(var, feature_bitmap) \
  4812. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 71, 1)
  4813. #define WMI_SET_SECURITY_FILS_SHA384_FT(feature_bitmap, val) \
  4814. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 71, 1, val)
  4815. #define WMI_GET_SECURITY_ENCHANCED_OPEN(var, feature_bitmap) \
  4816. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 72, 1)
  4817. #define WMI_SET_SECURITY_ENCHANCED_OPEN(feature_bitmap, val) \
  4818. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 72, 1, val)
  4819. /* Peer protocol features supported info */
  4820. #define WMI_GET_NAN_SUPPORT(var, feature_bitmap) \
  4821. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 73, 1)
  4822. #define WMI_SET_NAN_SUPPORT(feature_bitmap, val) \
  4823. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 73, 1, val)
  4824. #define WMI_GET_TDLS_SUPPORT(var, feature_bitmap) \
  4825. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 74, 1)
  4826. #define WMI_SET_TDLS_SUPPORT(feature_bitmap, val) \
  4827. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 74, 1, val)
  4828. #define WMI_GET_P2P6E_SUPPORT(var, feature_bitmap) \
  4829. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 75, 1)
  4830. #define WMI_SET_P2P6E_SUPPORT(feature_bitmap, val) \
  4831. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 75, 1, val)
  4832. #define WMI_GET_TDLS_OFFCHAN_SUPPORT(var, feature_bitmap) \
  4833. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 76, 1)
  4834. #define WMI_SET_TDLS_OFFCHAN_SUPPORT(feature_bitmap, val) \
  4835. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 76, 1, val)
  4836. #define WMI_GET_TDLS_CAP_ENHANCE(var, feature_bitmap) \
  4837. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 77, 1)
  4838. #define WMI_SET_TDLS_CAP_ENHANCE(feature_bitmap, val) \
  4839. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 77, 1, val)
  4840. #define WMI_GET_MAX_TDLS_PEERS_SUPPORT(var, feature_bitmap) \
  4841. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 78, 4)
  4842. #define WMI_SET_MAX_TDLS_PEERS_SUPPORT(feature_bitmap, val) \
  4843. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 78, 4, val)
  4844. #define WMI_GET_STA_DUAL_P2P_SUPPORT(var, feature_bitmap) \
  4845. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 82, 1)
  4846. #define WMI_SET_STA_DUAL_P2P_SUPPORT(feature_bitmap, val) \
  4847. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 82, 1, val)
  4848. /* Big data feature supported info */
  4849. #define WMI_GET_PEER_BIGDATA_GETBSSINFO_API_SUPPORT(var, feature_bitmap) \
  4850. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 83, 1)
  4851. #define WMI_SET_PEER_BIGDATA_GETBSSINFO_API_SUPPORT(feature_bitmap, val) \
  4852. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 83, 1, val)
  4853. #define WMI_GET_PEER_BIGDATA_GETASSOCREJECTINFO_API_SUPPORT(var, feature_bitmap) \
  4854. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 84, 1)
  4855. #define WMI_SET_PEER_BIGDATA_GETASSOCREJECTINFO_API_SUPPORT(feature_bitmap, val) \
  4856. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 84, 1, val)
  4857. #define WMI_GET_PEER_BIGDATA_GETSTAINFO_API_SUPPORT(var, feature_bitmap) \
  4858. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 85, 1)
  4859. #define WMI_SET_PEER_BIGDATA_GETSTAINFO_API_SUPPORT(feature_bitmap, val) \
  4860. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 85, 1, val)
  4861. /* Feature set requirement supported version info */
  4862. #define WMI_GET_FEATURE_SET_VERSION(var, feature_bitmap) \
  4863. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 86, 16)
  4864. #define WMI_SET_FEATURE_SET_VERSION(feature_bitmap, val) \
  4865. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 86, 16, val)
  4866. /*
  4867. * enum WMI_NUM_ANTENNAS are possible values for number of antennas supported bitfield.
  4868. * Bitfield value 0 means invalid, 1 means SISO, 2 means MIMO, and values 3+ are reserved.
  4869. */
  4870. #define WMI_GET_NUM_ANTENNAS(var, feature_bitmap) \
  4871. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 102, 4)
  4872. #define WMI_SET_NUM_ANTENNAS(feature_bitmap, val) \
  4873. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 102, 4, val)
  4874. /* enum WMI_HOST_BAND_CAP are possible values for below bitfield */
  4875. #define WMI_GET_HOST_BAND_CAP(var, feature_bitmap) \
  4876. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 106, 6)
  4877. #define WMI_SET_HOST_BAND_CAP(feature_bitmap, val) \
  4878. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 106, 6, val)
  4879. #define WMI_GET_STA_DUMP_SUPPORT(var, feature_bitmap) \
  4880. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 112, 1)
  4881. #define WMI_SET_STA_DUMP_SUPPORT(feature_bitmap, val) \
  4882. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 112, 1, val)
  4883. /* Peer protocol features supported info (contd) */
  4884. #define WMI_GET_STA_P2P_SUPPORT(var, feature_bitmap) \
  4885. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 113, 1)
  4886. #define WMI_SET_STA_P2P_SUPPORT(feature_bitmap, val) \
  4887. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 113, 1, val)
  4888. #define WMI_GET_STA_SAP_SUPPORT(var, feature_bitmap) \
  4889. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 114, 1)
  4890. #define WMI_SET_STA_SAP_SUPPORT(feature_bitmap, val) \
  4891. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 114, 1, val)
  4892. #define WMI_GET_STA_NAN_SUPPORT(var, feature_bitmap) \
  4893. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 115, 1)
  4894. #define WMI_SET_STA_NAN_SUPPORT(feature_bitmap, val) \
  4895. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 115, 1, val)
  4896. #define WMI_GET_STA_TDLS_SUPPORT(var, feature_bitmap) \
  4897. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 116, 1)
  4898. #define WMI_SET_STA_TDLS_SUPPORT(feature_bitmap, val) \
  4899. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 116, 1, val)
  4900. /* Reserving 16 bits for accomodating other 2 port concurrencies later */
  4901. #define WMI_GET_STA_SAP_P2P_SUPPORT(var, feature_bitmap) \
  4902. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 133, 1)
  4903. #define WMI_SET_STA_SAP_P2P_SUPPORT(feature_bitmap, val) \
  4904. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 133, 1, val)
  4905. #define WMI_GET_STA_SAP_NAN_SUPPORT(var, feature_bitmap) \
  4906. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 134, 1)
  4907. #define WMI_SET_STA_SAP_NAN_SUPPORT(feature_bitmap, val) \
  4908. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 134, 1, val)
  4909. #define WMI_GET_STA_P2P_NAN_SUPPORT(var, feature_bitmap) \
  4910. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 135, 1)
  4911. #define WMI_SET_STA_P2P_NAN_SUPPORT(feature_bitmap, val) \
  4912. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 135, 1, val)
  4913. #define WMI_GET_STA_P2P_TDLS_SUPPORT(var, feature_bitmap) \
  4914. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 136, 1)
  4915. #define WMI_SET_STA_P2P_TDLS_SUPPORT(feature_bitmap, val) \
  4916. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 136, 1, val)
  4917. #define WMI_GET_STA_SAP_TDLS_SUPPORT(var, feature_bitmap) \
  4918. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 137, 1)
  4919. #define WMI_SET_STA_SAP_TDLS_SUPPORT(feature_bitmap, val) \
  4920. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 137, 1, val)
  4921. #define WMI_GET_STA_NAN_TDLS_SUPPORT(var, feature_bitmap) \
  4922. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 138, 1)
  4923. #define WMI_SET_STA_NAN_TDLS_SUPPORT(feature_bitmap, val) \
  4924. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 138, 1, val)
  4925. /* Reserving 16 bits for accomodating other 3 port concurrencies later */
  4926. #define WMI_GET_STA_SAP_P2P_TDLS_SUPPORT(var, feature_bitmap) \
  4927. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 155, 1)
  4928. #define WMI_SET_STA_SAP_P2P_TDLS_SUPPORT(feature_bitmap, val) \
  4929. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 155, 1, val)
  4930. #define WMI_GET_STA_SAP_NAN_TDLS_SUPPORT(var, feature_bitmap) \
  4931. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 156, 1)
  4932. #define WMI_SET_STA_SAP_NAN_TDLS_SUPPORT(feature_bitmap, val) \
  4933. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 156, 1, val)
  4934. #define WMI_GET_STA_P2P_P2P_TDLS_SUPPORT(var, feature_bitmap) \
  4935. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 157, 1)
  4936. #define WMI_SET_STA_P2P_P2P_TDLS_SUPPORT(feature_bitmap, val) \
  4937. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 157, 1, val)
  4938. #define WMI_GET_STA_P2P_NAN_TDLS_SUPPORT(var, feature_bitmap) \
  4939. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 158, 1)
  4940. #define WMI_SET_STA_P2P_NAN_TDLS_SUPPORT(feature_bitmap, val) \
  4941. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 158, 1, val)
  4942. /* NAN EHT supported info */
  4943. #define WMI_GET_NAN_EHT_SUPPORT(var, feature_bitmap) \
  4944. WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 159, 1)
  4945. #define WMI_SET_NAN_EHT_SUPPORT(feature_bitmap, val) \
  4946. WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 159, 1, val)
  4947. /*
  4948. * Specify how many A_UINT32 words are needed to hold the feature bitmap flags.
  4949. * This value may change over time.
  4950. * It is not directly used in any WMI message definition.
  4951. * It is provided simply as a convenience for the feature_set_bitmap sender to
  4952. * know how many 32-bit words to allocate for the bitmap.
  4953. */
  4954. #define WMI_FEATURE_SET_BITMAP_ARRAY_LEN32 6
  4955. /**
  4956. * TLV for channel list
  4957. */
  4958. typedef struct {
  4959. /** WMI_CHAN_LIST_TAG */
  4960. A_UINT32 tag;
  4961. /** # of channels to scan */
  4962. A_UINT32 num_chan;
  4963. /** channels in Mhz */
  4964. WMI_VAR_LEN_ARRAY1(A_UINT32, channel_list);
  4965. } wmi_chan_list;
  4966. /**
  4967. * TLV for bssid list
  4968. */
  4969. typedef struct {
  4970. /** WMI_BSSID_LIST_TAG */
  4971. A_UINT32 tag;
  4972. /** number of bssids */
  4973. A_UINT32 num_bssid;
  4974. /** bssid list */
  4975. WMI_VAR_LEN_ARRAY1(wmi_mac_addr, bssid_list);
  4976. } wmi_bssid_list;
  4977. /**
  4978. * TLV for ie data.
  4979. */
  4980. typedef struct {
  4981. /** WMI_IE_TAG */
  4982. A_UINT32 tag;
  4983. /** number of bytes in ie data */
  4984. A_UINT32 ie_len;
  4985. /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4) */
  4986. WMI_VAR_LEN_ARRAY1(A_UINT32, ie_data);
  4987. } wmi_ie_data;
  4988. /**
  4989. * TLV used for length/buffer
  4990. */
  4991. typedef struct {
  4992. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_buf_len_param */
  4993. A_UINT32 buf_len; /** Length of buf */
  4994. /**
  4995. * Following this structure is the TLV byte stream of buf of length buf_len:
  4996. * A_UINT8 buf[];
  4997. *
  4998. */
  4999. } wmi_tlv_buf_len_param;
  5000. /**
  5001. * TLV used for specifying the dimensions of a multi-dimensional array
  5002. * that has been stored in a flat buffer
  5003. */
  5004. typedef struct {
  5005. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_arrays_len_param */
  5006. /**
  5007. * d1_len, d2_len, d3_len, and d4_len are the lengths of each dimension
  5008. * for a multi-dimensional array.
  5009. * If the length of outer dimension is not 1, the inner dimension
  5010. * shouldn't be 1.
  5011. * If the multi-dimensional array has less than 4 dimensions, the outer
  5012. * dimensions' lengths should be 1. For example, a buf[3][4] array
  5013. * would have d1_len = 4, d2_len = 3, d3_len = 1, d4_len = 1.
  5014. * The outermost dimension of the array can be inferred from the array
  5015. * length; thus, this struct supports up to 5-D arrays. For a 5-D array,
  5016. * the outermost (5th) dimension would be
  5017. * array length / (d1_len * d2_len * d3_len * d4_len)
  5018. *
  5019. * For security (to ensure no out-of-bounds memory access),
  5020. * the receiver shall validate that the product of all dimensions
  5021. * is equal to (or less than) the array length.
  5022. */
  5023. A_UINT32 d1_len; /* the length of 1st (innermost) dimension array */
  5024. A_UINT32 d2_len; /* the length of 2nd dimension array */
  5025. A_UINT32 d3_len; /* the length of 3rd dimension array */
  5026. A_UINT32 d4_len; /* the length of 4th dimension array */
  5027. /**
  5028. * Following this structure is the TLV multi-dimension array buffer:
  5029. * <type> buf[L1*L2*L3*L4];
  5030. * where, L1, L2, L3, and L4 are the values of
  5031. * d1_len, d2_len, d3_len and d4_len.
  5032. * To access the 4-D element a[i][j][k][l], the buf[] array would be
  5033. * indexed as buf[i*L3*L2*L1 + j*L2*L1 + k*L1 + l].
  5034. */
  5035. } wmi_tlv_arrays_len_param;
  5036. typedef struct {
  5037. /** Len of the SSID */
  5038. A_UINT32 ssid_len;
  5039. /** SSID */
  5040. A_UINT32 ssid[8];
  5041. } wmi_ssid;
  5042. typedef struct {
  5043. /** WMI_SSID_LIST_TAG */
  5044. A_UINT32 tag;
  5045. A_UINT32 num_ssids;
  5046. WMI_VAR_LEN_ARRAY1(wmi_ssid, ssids);
  5047. } wmi_ssid_list;
  5048. typedef struct {
  5049. /** WMI_SCAN_START_OFFSET_TAG */
  5050. A_UINT32 tag;
  5051. /** Number of start TSF offsets */
  5052. A_UINT32 num_offset;
  5053. /** Array of start TSF offsets provided in milliseconds */
  5054. WMI_VAR_LEN_ARRAY1(A_UINT32, start_tsf_offset);
  5055. } wmi_scan_start_offset;
  5056. /**
  5057. * WLAN_SCAN_CHAN_MODE Macros defined for A_UINT8 phymode_list[]
  5058. */
  5059. /** enum WLAN_PHY_MODE _mode starts from 0, but the WMI message requires
  5060. * 0 to be used to represent unspecified / don't care / default values.
  5061. * Therefore, WMI phy mode = WLAN phy mode + 1.
  5062. */
  5063. /** If the received WMI phy mode is 0 then it is ignored by the FW,
  5064. * and the FW will use any mode as long as the frequency matches.
  5065. */
  5066. /** The number of phy_mode's (BW+mode) passed in the TLV phymode_list[] must
  5067. * be equal to num_chan. (Unless the host does not specify phymode_list values
  5068. * at all, in which case the number of phymode_list elements will be zero.)
  5069. * The indexing of the phymode_list[] array corresponds to same index of
  5070. * the chan_list[] array.
  5071. */
  5072. #define WMI_SCAN_CHAN_SET_MODE(_c) ((_c) + 1)
  5073. #define WMI_SCAN_CHAN_GET_MODE(_c) ((_c) - 1)
  5074. #define WMI_SCAN_CHAN_MODE_IS_SET(_c) (_c)
  5075. typedef struct {
  5076. /*
  5077. * freq unit: MHz (upper 16bits -- value)
  5078. * flags (lower 16bits -- bitfield): valid for the freq short ssid
  5079. * The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
  5080. */
  5081. A_UINT32 freq_flags;
  5082. /* per spec, only 4 bytes*/
  5083. A_UINT32 short_ssid;
  5084. } wmi_hint_freq_short_ssid;
  5085. /** following bssid mac address same as wmi_mac_addr
  5086. * one example: freq -- 5980(0x175c), flags -- 0x1, mac -- 00:03:7f:12:34:56
  5087. * freq_flags will be: 0x175c0001
  5088. * macaddr31to00 will be: 0x127f0300
  5089. * macaddr47to32 will be: 0x00005634
  5090. */
  5091. typedef struct {
  5092. /*
  5093. * freq unit: MHz (upper 16bits -- value)
  5094. * flags (lower 16bits -- bitfield): valid for the freq bssid
  5095. * The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
  5096. */
  5097. A_UINT32 freq_flags;
  5098. /* legacy bssid addr, use same macro to convert: WMI_MAC_ADDR_TO_CHAR_ARRAY, WMI_CHAR_ARRAY_TO_MAC_ADDR */
  5099. wmi_mac_addr bssid;
  5100. } wmi_hint_freq_bssid;
  5101. /** macro to get freq and corresponding flags from wmi_hint_freq_short_ssid */
  5102. #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)
  5103. #define WMI_GET_FLAGS_FROM_HINT_FREQ_SHORT_SSID(pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) & 0xffff)
  5104. /** macro to set freq and corresponding flags in wmi_hint_freq_short_ssid */
  5105. #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))
  5106. #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))
  5107. /** macro to get freq and corresponding flags from wmi_hint_freq_bssid */
  5108. #define WMI_GET_FREQ_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) ((((pwmi_hint_freq_bssid_addr)->freq_flags) >> 16) & 0xffff)
  5109. #define WMI_GET_FLAGS_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) & 0xffff)
  5110. /** macro to set freq and corresponding flags in wmi_hint_freq_bssid */
  5111. #define WMI_SET_FREQ_IN_HINT_FREQ_BSSID(freq, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= ((freq) << 16))
  5112. #define WMI_SET_FLAGS_IN_HINT_FREQ_BSSID(flags, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= (flags))
  5113. /** other macro for 6 GHZ, TU (time unit), 20TU normally it is 20ms */
  5114. #define MAX_NUM_20TU_EACH_CH 6
  5115. #define MAX_NUM_S_SSID_EACH_20TU 1
  5116. #define MAX_NUM_BSSID_EACH_20TU 3
  5117. /* prefix used by scan requestor ids on the host */
  5118. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  5119. /* prefix used by scan request ids generated on the host */
  5120. /* host cycles through the lower 12 bits to generate ids */
  5121. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  5122. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  5123. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  5124. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
  5125. /* NOTE: This constant cannot be changed without breaking WMI compatibility */
  5126. #define WMI_IE_BITMAP_SIZE 8
  5127. #define WMI_SCAN_MLD_PARAM_MLD_ID_GET(mld_param) WMI_GET_BITS(mld_param, 0, 8)
  5128. #define WMI_SCAN_MLD_PARAM_MLD_ID_SET(mld_param, val) WMI_SET_BITS(mld_param, 0, 8, val)
  5129. typedef struct {
  5130. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  5131. /** Scan ID (lower 16 bits) MSB 4 bits is used to identify scan client based on enum WMI_SCAN_CLIENT_ID */
  5132. A_UINT32 scan_id;
  5133. /** Scan requestor ID (lower 16 bits) is used by scan client to classify the scan source, reason, ...etc */
  5134. A_UINT32 scan_req_id;
  5135. /** VDEV id(interface) that is requesting scan */
  5136. A_UINT32 vdev_id;
  5137. /** Scan Priority, input to scan scheduler */
  5138. A_UINT32 scan_priority;
  5139. /** Scan events subscription */
  5140. A_UINT32 notify_scan_events;
  5141. /** dwell time in msec on active channels */
  5142. A_UINT32 dwell_time_active;
  5143. /** dwell time in msec on passive channels */
  5144. A_UINT32 dwell_time_passive;
  5145. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  5146. A_UINT32 min_rest_time;
  5147. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  5148. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  5149. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  5150. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  5151. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  5152. * irrespective of activity. activity is determined by the idle_time parameter.
  5153. */
  5154. A_UINT32 max_rest_time;
  5155. /** time before sending next set of probe requests.
  5156. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  5157. * The number of probe requests specified depends on the ssid_list and bssid_list
  5158. */
  5159. A_UINT32 repeat_probe_time;
  5160. /** time in msec between 2 consecutive probe requests with in a set. */
  5161. A_UINT32 probe_spacing_time;
  5162. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  5163. A_UINT32 idle_time;
  5164. /** maximum time in msec allowed for scan */
  5165. A_UINT32 max_scan_time;
  5166. /** delay in msec before sending first probe request after switching to a channel */
  5167. A_UINT32 probe_delay;
  5168. /** Scan control flags */
  5169. A_UINT32 scan_ctrl_flags;
  5170. /** Burst duration time in msec*/
  5171. A_UINT32 burst_duration;
  5172. /** # if channels to scan. In the TLV channel_list[] */
  5173. A_UINT32 num_chan;
  5174. /** number of bssids. In the TLV bssid_list[] */
  5175. A_UINT32 num_bssid;
  5176. /** number of ssid. In the TLV ssid_list[] */
  5177. A_UINT32 num_ssids;
  5178. /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
  5179. A_UINT32 ie_len;
  5180. /** Max number of probes to be sent */
  5181. A_UINT32 n_probes;
  5182. /** MAC Address to use in Probe Req as SA **/
  5183. wmi_mac_addr mac_addr;
  5184. /** Mask on which MAC has to be randomized **/
  5185. wmi_mac_addr mac_mask;
  5186. /** ie bitmap to use in probe req **/
  5187. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  5188. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  5189. A_UINT32 num_vendor_oui;
  5190. /** Scan control flags extended **/
  5191. A_UINT32 scan_ctrl_flags_ext;
  5192. /** dwell time in msec on active 2G channels, if it's not zero */
  5193. A_UINT32 dwell_time_active_2g;
  5194. /**
  5195. * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
  5196. * as an active channel
  5197. */
  5198. A_UINT32 dwell_time_active_6ghz;
  5199. /**
  5200. * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
  5201. * as a passive channel
  5202. */
  5203. A_UINT32 dwell_time_passive_6ghz;
  5204. /**
  5205. * Offset time is in milliseconds per channel.
  5206. */
  5207. A_UINT32 scan_start_offset;
  5208. /**
  5209. * minimum dwell time in msec for 6 GHz channel
  5210. * We'll listen for this time on the channel; if no beacon /
  5211. * probe response / FILS frame are received during this time
  5212. * we'll move to next channel.
  5213. */
  5214. A_UINT32 min_dwell_time_6ghz;
  5215. /**
  5216. * dwell time in msec for 6 GHz channel of spectral scan channel list
  5217. */
  5218. A_UINT32 dwell_time_spectral_ch;
  5219. /**
  5220. * B0-B7: mld id to be inserted in ML probe request
  5221. * B8-B31: reserved
  5222. */
  5223. A_UINT32 mld_parameter;
  5224. /**
  5225. * TLV (tag length value) parameters follow the scan_cmd
  5226. * structure. The TLV's are:
  5227. * channel_list:
  5228. * If FW supports WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL,
  5229. * then channel_list may fill the upper 12 bits with channel flags,
  5230. * while using only the lower 20 bits for channel frequency.
  5231. * Check WMI_SCAN_CHANNEL_FLAG macros for the channel flags
  5232. * If FW doesn't support WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL,
  5233. * then channel_list only holds the frequency value
  5234. * Use WMI_SCAN_CHANNEL_FREQ_MASK & WMI_SCAN_CHANNEL_FLAGS_MASK
  5235. * A_UINT32 channel_list[num_chan]; // in MHz
  5236. * wmi_ssid ssid_list[num_ssids];
  5237. * wmi_mac_addr bssid_list[num_bssid];
  5238. * A_UINT8 ie_data[ie_len];
  5239. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  5240. * A_UINT8 phymode_list[0 or num_chan]; // see WMI_SCAN_CHAN_MODE macros
  5241. * wmi_hint_freq_short_ssid hint_freq_short_ssid[num]; // the num can be calculated by TLV len
  5242. * wmi_hint_freq_bssid hint_freq_bssid[num]; // the num can be calculated by TLV len
  5243. * A_UINT32 spectral_chan_list[num]; // in MHz, the num can be calculated by TLV len
  5244. * *** NOTE:
  5245. * *** Use caution when using further TLVs, in case the additional
  5246. * *** TLVs cause the message size to exceed the of the buffer to
  5247. * *** hold the message.
  5248. */
  5249. } wmi_start_scan_cmd_fixed_param;
  5250. /**
  5251. * scan control flags.
  5252. */
  5253. /** passively scan all channels including active channels */
  5254. #define WMI_SCAN_FLAG_PASSIVE 0x1
  5255. /** add wild card ssid probe request even though ssid_list is specified. */
  5256. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  5257. /** add cck rates to rates/xrate ie for the generated probe request */
  5258. #define WMI_SCAN_ADD_CCK_RATES 0x4
  5259. /** add ofdm rates to rates/xrate ie for the generated probe request */
  5260. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  5261. /** To enable indication of Chan load and Noise floor to host */
  5262. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  5263. /** Filter Probe request frames */
  5264. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  5265. /**When set, not to scan DFS channels*/
  5266. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  5267. /**When set, certain errors are ignored and scan continues.
  5268. * Different FW scan engine may use its own logic to decide what errors to ignore*/
  5269. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  5270. /** Enable promiscuous mode for CCXv4 */
  5271. #define WMI_SCAN_FILTER_PROMISCOUS 0x100
  5272. /** allow to send probe req on DFS channel */
  5273. #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
  5274. /** add TPC content in probe req frame */
  5275. #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
  5276. /** add DS content in probe req frame */
  5277. #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
  5278. /** use random mac address for TA for probe request frame and add
  5279. * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
  5280. * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
  5281. #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
  5282. /** allow mgmt transmission during off channel scan */
  5283. #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
  5284. /** allow data transmission during off channel scan */
  5285. #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
  5286. /** allow capture ppdu with phy errors */
  5287. #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
  5288. /** always do passive scan on passive channels */
  5289. #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x10000
  5290. /** set HALF (10MHz) rate support */
  5291. #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
  5292. /** set Quarter (5MHz) rate support */
  5293. #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
  5294. #define WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ 0x80000
  5295. #define WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ 0x100000
  5296. /** pause home channel when scan channel is same as home channel */
  5297. #define WMI_SCAN_FLAG_PAUSE_HOME_CHANNEL 0x200000
  5298. /**
  5299. * report CCA busy for each possible 20Mhz subbands of the wideband scan channel
  5300. */
  5301. #define WMI_SCAN_FLAG_REPORT_CCA_BUSY_FOREACH_20MHZ 0x400000
  5302. /** for adaptive scan mode using 3 bits (21 - 23 bits) */
  5303. #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
  5304. #define WMI_SCAN_DWELL_MODE_SHIFT 21
  5305. typedef enum {
  5306. WMI_SCAN_DWELL_MODE_DEFAULT = 0,
  5307. WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
  5308. WMI_SCAN_DWELL_MODE_MODERATE = 2,
  5309. WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
  5310. WMI_SCAN_DWELL_MODE_STATIC = 4,
  5311. } WMI_SCAN_DWELL_MODE;
  5312. #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
  5313. do { \
  5314. (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
  5315. WMI_SCAN_DWELL_MODE_MASK); \
  5316. } while (0)
  5317. #define WMI_SCAN_GET_DWELL_MODE(flag) \
  5318. (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
  5319. /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  5320. #define WMI_SCAN_CLASS_MASK 0xFF000000
  5321. /*
  5322. * Masks identifying types/ID of scans
  5323. * Scan_Stop macros should be the same value as below defined in UMAC
  5324. * #define IEEE80211_SPECIFIC_SCAN 0x00000000
  5325. * #define IEEE80211_VAP_SCAN 0x01000000
  5326. * #define IEEE80211_ALL_SCANS 0x04000000
  5327. */
  5328. /* WMI_SCAN_STOP_ONE:
  5329. * Stop one scan which matches with scan_id provided in scan stop command.
  5330. */
  5331. #define WMI_SCAN_STOP_ONE 0x00000000
  5332. /* WMI_SCN_STOP_VAP_ALL:
  5333. * Stop all scans (host scans and FW internal scans) on provided vdev.
  5334. */
  5335. #define WMI_SCN_STOP_VAP_ALL 0x01000000
  5336. /* WMI_SCN_STOP_HOST_VAP_ALL:
  5337. * Stop all host scans on provided vdev.
  5338. */
  5339. #define WMI_SCN_STOP_HOST_VAP_ALL 0x02000000
  5340. /* WMI_SCAN_STOP_ALL:
  5341. * Stop all scans (host scans and FW internal scans) on all vdevs.
  5342. */
  5343. #define WMI_SCAN_STOP_ALL 0x04000000
  5344. /** extended Scan ctrl flags **/
  5345. #define WMI_SCAN_FLAG_EXT_DBS_SCAN_POLICY_MASK 0x00000003 /* Bit 0-1 reserved for DBS scan selection policy.*/
  5346. #define WMI_SCAN_DBS_POLICY_DEFAULT 0x0 /** Select duty cycle if configured, else fall back to whatever
  5347. policy scan manager computes */
  5348. #define WMI_SCAN_DBS_POLICY_FORCE_NONDBS 0x1 /** Force to select Non-DBS scan */
  5349. #define WMI_SCAN_DBS_POLICY_IGNORE_DUTY 0x2 /** Ignore duty cycle even if configured and fall back to whatever
  5350. policy scan manager computes*/
  5351. #define WMI_SCAN_DBS_POLICY_RESERVED 0x3
  5352. #define WMI_SCAN_DBS_POLICY_MAX 0x3
  5353. /* Enable Reception of Public Action frame with this flag */
  5354. #define WMI_SCAN_FLAG_EXT_FILTER_PUBLIC_ACTION_FRAME 0x00000004
  5355. /* Indicate to scan all PSC channel */
  5356. #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_PSC_CH 0x00000008
  5357. /* Indicate to scan all NON-PSC channel */
  5358. #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_NON_PSC_CH 0x00000010
  5359. /* Indicate to save scan result matching hint from scan client */
  5360. #define WMI_SCAN_FLAG_EXT_6GHZ_MATCH_HINT 0x00000020
  5361. /* Skip any ch on which no any RNR had been received */
  5362. #define WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH 0x00000040
  5363. /* Indicate client hint req is high priority than fw rnr or FILS disc */
  5364. #define WMI_SCAN_FLAG_EXT_6GHZ_CLIENT_HIGH_PRIORITY 0x00000080
  5365. /* Force all 6 GHz scan channels to active channel */
  5366. #define WMI_SCAN_FLAG_EXT_6GHZ_FORCE_CHAN_ACTIVE 0x00000100
  5367. /* Force broadcast address in RA even though specified bssid */
  5368. #define WMI_SCAN_FLAG_EXT_FORCE_BRCAST_RA 0x00000200
  5369. /* Extend 6 GHz channel measure time */
  5370. #define WMI_SCAN_FLAG_EXT_6GHZ_EXTEND_MEASURE_TIME 0x00000400
  5371. /**
  5372. * Currently passive scan has higher priority than beacon and
  5373. * beacon miss would happen irrespective of dwell time.
  5374. * Below flag ensures there would not be beacon miss if the dwell
  5375. * time is lesser than beacon interval - channel switch time combined.
  5376. * For dwell time greater than beacon interval, bmiss is expected.
  5377. */
  5378. #define WMI_SCAN_FLAG_EXT_PASSIVE_SCAN_START_TIME_ENHANCE 0x00000800
  5379. /* Force unicast address in RA */
  5380. #define WMI_SCAN_FLAG_EXT_FORCE_UNICAST_RA 0x00001000
  5381. /**
  5382. * Indicate to add 10 Mhz offset to spectral scan center frequencies
  5383. * sent by Host when checking against support channel list in FW
  5384. */
  5385. #define WMI_SCAN_FLAG_EXT_SPECTRAL_CFREQ_PLUS_10MHZ_IN_SUPP_CH_LIST 0x00002000
  5386. /* Include MLO IE in Probe req */
  5387. #define WMI_SCAN_FLAG_EXT_INCL_MLIE_PRB_REQ 0x00004000
  5388. #define WMI_SCAN_FLAG_EXT_LOW_LATENCY_SCAN 0x00008000
  5389. #define WMI_SCAN_FLAG_EXT_RELIABLE_SCAN 0x00010000
  5390. #define WMI_SCAN_FLAG_EXT_FAST_SCAN 0x00020000
  5391. #define WMI_SCAN_FLAG_EXT_LOW_POWER_SCAN 0x00040000
  5392. #define WMI_SCAN_FLAG_EXT_STOP_IF_BSSID_FOUND 0x00080000
  5393. #define WMI_SCAN_FLAG_EXT_P2P_SCAN 0x00100000
  5394. /**
  5395. * new 6 GHz flags per chan (short ssid or bssid) in struct
  5396. * wmi_hint_freq_short_ssid or wmi_hint_freq_bssid
  5397. */
  5398. /* Indicate not to send probe req for short_ssid or bssid on that channel */
  5399. #define WMI_SCAN_HINT_FLAG_SKIP_TX_PROBE_REQ 0x00000001
  5400. /* Force channel in WMI hint to active channel */
  5401. #define WMI_SCAN_HINT_FLAG_FORCE_CHAN_ACTIVE 0x00000002
  5402. /* Combine short SSID with legacy bssid list */
  5403. #define WMI_SCAN_HINT_FLAG_COMBINE_BSSID_LIST 0x00000004
  5404. #define WMI_SCAN_CHANNEL_FREQ_MASK 0x000FFFFF
  5405. #define WMI_SCAN_CHANNEL_FLAGS_MASK 0xFFF00000
  5406. /**
  5407. * Per channel configuration flags
  5408. */
  5409. /**
  5410. * WMI_SCAN_CHANNEL_FLAG_SCAN_ONLY_IF_RNR_FOUND:
  5411. * If this flag is set, then scan only if the corresponding channel
  5412. * is found via RNR IE during 2g/5g scan.
  5413. * If this flag is not set, then FW always scans the channel
  5414. * irrespective of RNR and also FW ignores
  5415. * WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH flag
  5416. */
  5417. #define WMI_SCAN_CHANNEL_FLAG_SCAN_ONLY_IF_RNR_FOUND 0x001
  5418. typedef struct {
  5419. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  5420. /** requestor requesting cancel */
  5421. A_UINT32 requestor;
  5422. /** Scan ID */
  5423. A_UINT32 scan_id;
  5424. /**
  5425. * Req Type
  5426. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  5427. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id (on a specific pdev in DBDC)
  5428. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  5429. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine (on a specific pdev in DBDC)
  5430. */
  5431. A_UINT32 req_type;
  5432. /**
  5433. * vDev ID
  5434. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  5435. */
  5436. A_UINT32 vdev_id;
  5437. /** pdev_id for identifying the MAC
  5438. * See macros starting with WMI_PDEV_ID_ for values.
  5439. * In non-DBDC case host should set it to 0
  5440. */
  5441. A_UINT32 pdev_id;
  5442. } wmi_stop_scan_cmd_fixed_param;
  5443. #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
  5444. #define WMI_APPEND_TO_EXISTING_CHAN_LIST 0x1
  5445. #define WMI_CHANNEL_MAX_BANDWIDTH_VALID 0x2
  5446. #define WMI_HONOR_HOST_6GHZ_CHANNEL_PASSIVE 0x4
  5447. /*
  5448. * To preserve backwards compatibility, retain old names (without WMI_ prefix)
  5449. * as aliases for the corrected names (with WMI_ prefix).
  5450. */
  5451. #define APPEND_TO_EXISTING_CHAN_LIST WMI_APPEND_TO_EXISTING_CHAN_LIST
  5452. #define CHANNEL_MAX_BANDWIDTH_VALID WMI_CHANNEL_MAX_BANDWIDTH_VALID
  5453. typedef struct {
  5454. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
  5455. A_UINT32 num_scan_chans; /** no of elements in chan_info[] */
  5456. A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
  5457. 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. */
  5458. /** Followed by the variable length TLV chan_info:
  5459. * wmi_channel chan_info[] */
  5460. } wmi_scan_chan_list_cmd_fixed_param;
  5461. /*
  5462. * Priority numbers must be sequential, starting with 0.
  5463. */
  5464. /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
  5465. typedef enum {
  5466. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  5467. WMI_SCAN_PRIORITY_LOW,
  5468. WMI_SCAN_PRIORITY_MEDIUM,
  5469. WMI_SCAN_PRIORITY_HIGH,
  5470. WMI_SCAN_PRIORITY_VERY_HIGH,
  5471. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  5472. } wmi_scan_priority;
  5473. /* Five Levels for Requested Priority */
  5474. /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
  5475. typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
  5476. /**
  5477. * 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
  5478. * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
  5479. * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
  5480. */
  5481. typedef struct {
  5482. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
  5483. /**
  5484. * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
  5485. * 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
  5486. */
  5487. A_UINT32 vdev_type;
  5488. /**
  5489. * number of rows in mapping_table for a specific vdev
  5490. * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
  5491. */
  5492. A_UINT32 number_rows;
  5493. /**
  5494. * pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values.
  5495. * In non-DBDC case host should set it to 0
  5496. */
  5497. A_UINT32 pdev_id;
  5498. /** mapping_table for a specific vdev follows this TLV
  5499. * WLAN_PRIORITY_MAPPING mapping_table[]; */
  5500. } wmi_scan_sch_priority_table_cmd_fixed_param;
  5501. /** update flags */
  5502. #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
  5503. #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
  5504. #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
  5505. typedef struct {
  5506. A_UINT32 tlv_header;
  5507. /** requestor requesting update scan request */
  5508. A_UINT32 requestor;
  5509. /** Scan ID of the scan request that need to be update */
  5510. A_UINT32 scan_id;
  5511. /** update flags, indicating which of the following fields are valid and need to be updated*/
  5512. A_UINT32 scan_update_flags;
  5513. /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
  5514. A_UINT32 scan_priority;
  5515. /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
  5516. A_UINT32 min_rest_time;
  5517. /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
  5518. A_UINT32 max_rest_time;
  5519. /** 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 */
  5520. A_UINT32 pdev_id;
  5521. } wmi_scan_update_request_cmd_fixed_param;
  5522. #define WMI_SCAN_PROBE_OUI_SPOOFED_MAC_IN_PROBE_REQ 0x1
  5523. #define WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ 0x2
  5524. #define WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ 0x4
  5525. typedef struct _wmi_vendor_oui {
  5526. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_oui */
  5527. A_UINT32 oui_type_subtype; /** Vendor OUI type and subtype, lower 3 bytes is type and highest byte is subtype**/
  5528. }wmi_vendor_oui;
  5529. typedef struct {
  5530. A_UINT32 tlv_header;
  5531. /** oui to be used in probe request frame when random mac addresss is
  5532. * requested part of scan parameters. this is applied to both FW internal scans and
  5533. * host initated scans. host can request for random mac address with
  5534. * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
  5535. A_UINT32 prob_req_oui;
  5536. A_UINT32 vdev_id;
  5537. /** Control Flags **/
  5538. A_UINT32 flags;
  5539. /** ie bitmap to use in probe req **/
  5540. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  5541. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  5542. A_UINT32 num_vendor_oui;
  5543. /** 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 */
  5544. A_UINT32 pdev_id;
  5545. /* Following this tlv, there comes an array of structure of type wmi_vendor_oui
  5546. wmi_vendor_oui vendor_oui[];*/
  5547. } wmi_scan_prob_req_oui_cmd_fixed_param;
  5548. enum wmi_scan_event_type {
  5549. WMI_SCAN_EVENT_STARTED = 0x1,
  5550. WMI_SCAN_EVENT_COMPLETED = 0x2,
  5551. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  5552. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  5553. WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
  5554. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
  5555. WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
  5556. WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
  5557. WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  5558. WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
  5559. WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
  5560. WMI_SCAN_EVENT_MAX = 0x8000
  5561. };
  5562. enum wmi_scan_completion_reason {
  5563. /** scan related events */
  5564. WMI_SCAN_REASON_NONE = 0xFF,
  5565. WMI_SCAN_REASON_COMPLETED = 0,
  5566. WMI_SCAN_REASON_CANCELLED = 1,
  5567. WMI_SCAN_REASON_PREEMPTED = 2,
  5568. WMI_SCAN_REASON_TIMEDOUT = 3,
  5569. WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
  5570. WMI_SCAN_REASON_SUSPENDED = 5,
  5571. WMI_SCAN_REASON_DFS_VIOLATION = 6, /* Failure when tried to SCAN channel in NOL list */
  5572. WMI_SCAN_REASON_MAX,
  5573. };
  5574. #define WMI_SCAN_EVT_IS_SCAN_TYPE_P2P_FLAG_SET(flag, value) \
  5575. WMI_SET_BITS(flag, 0, 1, value)
  5576. #define WMI_SCAN_EVT_IS_SCAN_TYPE_P2P_FLAG_GET(flag) \
  5577. WMI_GET_BITS(flag, 0, 1)
  5578. typedef struct {
  5579. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
  5580. /** scan event (wmi_scan_event_type) */
  5581. A_UINT32 event;
  5582. /** status of the scan completion event */
  5583. A_UINT32 reason;
  5584. /** channel freq , only valid for FOREIGN channel event*/
  5585. A_UINT32 channel_freq;
  5586. /**id of the requestor whose scan is in progress */
  5587. A_UINT32 requestor;
  5588. /**id of the scan that is in progress */
  5589. A_UINT32 scan_id;
  5590. /**id of VDEV that requested the scan */
  5591. A_UINT32 vdev_id;
  5592. /** TSF Timestamp when the scan event (wmi_scan_event_type) is completed
  5593. * In case of AP it is TSF of the AP vdev
  5594. * In case of STA connected state this is the TSF of the AP
  5595. * In case of STA not connected it will be the free running HW timer
  5596. */
  5597. A_UINT32 tsf_timestamp;
  5598. /** flags:
  5599. * Bit[0] - indicate if scan type is for p2p
  5600. * Bit[1:31] - reserved
  5601. */
  5602. A_UINT32 flags;
  5603. } wmi_scan_event_fixed_param;
  5604. /* WMI Diag event */
  5605. typedef struct {
  5606. A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
  5607. A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
  5608. A_UINT32 count; /* Number of diag frames added to current event */
  5609. A_UINT32 dropped;
  5610. /* followed by WMITLV_TAG_ARRAY_BYTE */
  5611. } wmi_diag_event_fixed_param;
  5612. #define WMI_11K_OFFLOAD_BITMAP_NEIGHBOR_REPORT_REQ 0x1
  5613. typedef struct {
  5614. A_UINT32 time_offset; /* positive offset in secs from the time 11k offload command has been received, 0xFFFFFFFF if offset is not valid */
  5615. 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 */
  5616. A_UINT32 bmiss_count_trigger; /* value 1 is to send neighbor report at 1st BMISS, 0xFFFFFFFF if input is not valid */
  5617. A_UINT32 per_threshold_offset; /* percentage offset from the current per_threshold, 0xFFFFFFFF if input is not valid */
  5618. 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 */
  5619. 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
  5620. * neighbor report requests that will be sent by FW after every roam */
  5621. wmi_ssid ssid; /* ssid of current connected AP FW might choose to use this SSID in the neighbor report req frame if it is
  5622. * interested in candidate of the same SSID */
  5623. } wmi_neighbor_report_offload;
  5624. typedef struct {
  5625. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param */
  5626. A_UINT32 vdev_id;
  5627. A_UINT32 offload_11k; /* bitmask to indicate to FW what all 11k features are offloaded */
  5628. } wmi_11k_offload_report_fixed_param;
  5629. typedef struct {
  5630. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_neighbor_report_offload_tlv_param */
  5631. wmi_neighbor_report_offload neighbor_rep_ofld_params;
  5632. } wmi_neighbor_report_11k_offload_tlv_param;
  5633. #define WMI_INVOKE_NEIGHBOR_REPORT_FLAGS_SEND_RESP_TO_HOST 0x1
  5634. typedef struct {
  5635. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param */
  5636. A_UINT32 vdev_id;
  5637. A_UINT32 flags;
  5638. wmi_ssid ssid; /* if ssid.len == 0, firmware doesn't include ssid sub-element.
  5639. * In that case AP gives all the candidates in ESS without SSID filter
  5640. * If host wants to insert ssid subelement in the neighbor report request frame, then it can specify the ssid here */
  5641. } wmi_11k_offload_invoke_neighbor_report_fixed_param;
  5642. #define WMI_MAX_PMKID_LEN 16
  5643. #define WMI_MAX_PMK_LEN 64
  5644. #define WMI_PMK_CACHE_CAT_FLAG_BSSID 0x1
  5645. #define WMI_PMK_CACHE_CAT_FLAG_SSID_CACHE_ID 0x2
  5646. #define WMI_PMK_CACHE_ACTION_FLAG_ADD_ENTRY 0x1
  5647. #define WMI_PMK_CACHE_ACTION_FLAG_DEL_ENTRY 0x2
  5648. typedef struct {
  5649. A_UINT32 tlv_header;
  5650. A_UINT32 pmk_len;
  5651. 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,
  5652. in spite of the automatic byte-swap applied to WMI messages during download*/
  5653. A_UINT32 pmkid_len;
  5654. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  5655. wmi_mac_addr bssid;
  5656. wmi_ssid ssid;
  5657. A_UINT32 cache_id;
  5658. A_UINT32 cat_flag; // whether (bssid) or (ssid,cache_id) is valid
  5659. A_UINT32 action_flag; // add/delete the entry
  5660. } wmi_pmk_cache;
  5661. #define WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL 0x1
  5662. typedef struct {
  5663. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pmk_cache_cmd_fixed_param */
  5664. A_UINT32 op_flag; //option to flush all the cache at once
  5665. A_UINT32 vdev_id;
  5666. A_UINT32 num_cache;
  5667. /**
  5668. * TLV (tag length value) parameters follow the update_pmk_cache cmd
  5669. * structure. The TLV's are:
  5670. * wmi_pmk_cache cache_list[];
  5671. */
  5672. } wmi_pdev_update_pmk_cache_cmd_fixed_param;
  5673. #define WMI_FILS_MAX_USERNAME_LEN 16
  5674. #define WMI_FILS_MAX_REALM_LEN 256
  5675. #define WMI_FILS_MAX_RRK_LEN 64
  5676. #define WMI_FILS_MAX_RIK_LEN 64
  5677. /* for big-endian hosts, manual endian conversion will be needed to keep the array values in their original order,
  5678. in spite of the automatic byte-swap applied to WMI messages during download*/
  5679. typedef struct {
  5680. A_UINT8 username[WMI_FILS_MAX_USERNAME_LEN];
  5681. A_UINT32 username_length;
  5682. A_UINT32 next_erp_seq_num;
  5683. A_UINT8 rRk[WMI_FILS_MAX_RRK_LEN];
  5684. A_UINT32 rRk_length;
  5685. A_UINT8 rIk[WMI_FILS_MAX_RIK_LEN];
  5686. A_UINT32 rIk_length;
  5687. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  5688. A_UINT32 realm_len;
  5689. } wmi_erp_info;
  5690. enum wmi_fils_hlp_pkt_type {
  5691. WMI_FILS_HLP_PKT_TYPE_DHCP_DISCOVER = 1,
  5692. };
  5693. typedef struct {
  5694. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_offload_tlv_param */
  5695. A_UINT32 flags;
  5696. wmi_erp_info vdev_erp_info;
  5697. } wmi_roam_fils_offload_tlv_param;
  5698. typedef struct {
  5699. A_UINT32 tlv_header; /** tag WMITLV_TAG_STRUC_wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param**/
  5700. A_UINT32 flags;
  5701. A_UINT32 vdev_id;
  5702. A_UINT32 size;
  5703. A_UINT32 pkt_type; // filled using enum wmi_fils_hlp_pkt_type
  5704. // A_UINT8 fils_hlp_pkt[];
  5705. } wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param;
  5706. #define WMI_MAX_KEK_LEN 64
  5707. #define GTK_OFFLOAD_KEK_EXTENDED_BYTES WMI_MAX_KEK_LEN /*KEK len has been increased to 64 to support FILS security.
  5708. To not break backward compatibility, new GTK_OFFLOAD_KEK_EXTENDED_BYTES has been defined without modifying old GTK_OFFLOAD_KEK_BYTES */
  5709. typedef struct {
  5710. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_synch_tlv_param */
  5711. A_UINT32 update_erp_next_seq_num;// Boolean denoting whether next erp_seq_num changed or not.
  5712. A_UINT32 next_erp_seq_num;
  5713. A_UINT32 kek_len;
  5714. A_UINT8 kek[WMI_MAX_KEK_LEN];
  5715. A_UINT32 pmk_len;
  5716. A_UINT8 pmk[WMI_MAX_PMK_LEN];
  5717. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  5718. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  5719. A_UINT32 realm_len;
  5720. } wmi_roam_fils_synch_tlv_param;
  5721. /*
  5722. * FW sends PMK cache of roamed candidate to host to sync pmk cache with host
  5723. */
  5724. typedef struct {
  5725. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmk_cache_synch_tlv_param */
  5726. A_UINT32 pmk_len;
  5727. A_UINT8 pmk[WMI_MAX_PMK_LEN];
  5728. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  5729. } wmi_roam_pmk_cache_synch_tlv_param;
  5730. /**
  5731. * WMI_ROAM_LINK_FLAG_XXX definition:
  5732. */
  5733. #define WMI_ROAM_LINK_FLAG_DISABLE 0x1 /* link is disabled, host can overwrite it later. */
  5734. typedef struct {
  5735. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ml_setup_links_param */
  5736. A_UINT32 vdev_id; /* when vdev_id is 0xffffffff, means the link_id hasn't attached to vdev */
  5737. A_UINT32 link_id; /* link id defined as in 802.11 BE spec. */
  5738. wmi_channel channel; /* link primary channel */
  5739. /**
  5740. * link flags: refer WMI_ROAM_LINK_FLAG_XXX.
  5741. */
  5742. A_UINT32 flags;
  5743. wmi_mac_addr link_addr; /* link address */
  5744. wmi_mac_addr self_link_addr; /* self-link address */
  5745. } wmi_roam_ml_setup_links_param;
  5746. /*
  5747. * If FW has multiple active channels due to MCC(multi channel concurrency),
  5748. * then these stats are combined stats for all the active channels.
  5749. */
  5750. typedef struct {
  5751. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
  5752. /** ack count, it is an incremental number, not accumulated number */
  5753. A_UINT32 ackRcvBad;
  5754. /** bad rts count, it is an incremental number, not accumulated number */
  5755. A_UINT32 rtsBad;
  5756. /** good rts, it is an incremental number, not accumulated number */
  5757. A_UINT32 rtsGood;
  5758. /** fcs count, it is an incremental number, not accumulated number */
  5759. A_UINT32 fcsBad;
  5760. /** beacon count, it is an incremental number, not accumulated number */
  5761. A_UINT32 noBeacons;
  5762. } wmi_update_whal_mib_stats_event_fixed_param;
  5763. /*
  5764. * This defines how much headroom is kept in the
  5765. * receive frame between the descriptor and the
  5766. * payload, in order for the WMI PHY error and
  5767. * management handler to insert header contents.
  5768. *
  5769. * This is in bytes.
  5770. */
  5771. #define WMI_MGMT_RX_HDR_HEADROOM (sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr))
  5772. /** This event will be used for sending scan results
  5773. * as well as rx mgmt frames to the host. The rx buffer
  5774. * will be sent as part of this WMI event. It would be a
  5775. * good idea to pass all the fields in the RX status
  5776. * descriptor up to the host.
  5777. */
  5778. /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
  5779. #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
  5780. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
  5781. #define WMI_MGMT_RX_HDR_EXTSCAN 0x01
  5782. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of matched network by FW ENLO */
  5783. #define WMI_MGMT_RX_HDR_ENLO 0x02
  5784. #define MAX_ANTENNA_EIGHT 8
  5785. /** Helper macro for params GET/SET of MGMT_RX_FW_CONSUMED_EVENTID */
  5786. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_PEER_ID_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 0, 16)
  5787. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_PEER_ID_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 0, 16, value)
  5788. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_IEEE_LINK_ID_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 16, 3)
  5789. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_IEEE_LINK_ID_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 16, 3, value)
  5790. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_SUBTYPE_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 28, 4)
  5791. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_SUBTYPE_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 28, 4, value)
  5792. #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)
  5793. #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)
  5794. #define WMI_MGMT_RX_FW_CONSUMED_PARAM_MGMT_PKT_CTR_GET(mgmt_pkt_ctr_info) WMI_GET_BITS(mgmt_pkt_ctr_info, 16, 16)
  5795. #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)
  5796. typedef struct {
  5797. A_UINT32 tlv_header; /* WMITLV_TAG_STRUCT_wmi_mgmt_rx_fw_consumed_hdr */
  5798. A_UINT32 rx_tsf_l32; /* h/w assigned timestamp of the rx frame in micro sec */
  5799. A_UINT32 rx_tsf_u32 ;/* h/w assigned timestamp of the rx frame in micro sec */
  5800. A_UINT32 pdev_id; /* pdev_id for identifying the MAC the rx mgmt frame was received by */
  5801. /**
  5802. * peer_info_subtype
  5803. *
  5804. * [15:0]: ml_peer_id, ML peer_id unique across chips
  5805. * [18:16]: ieee_link_id, protocol link id on which the rx frame is received
  5806. * [27:19]: reserved
  5807. * [31:28]: subtype, subtype of the received MGMT frame
  5808. */
  5809. A_UINT32 peer_info_subtype;
  5810. A_UINT32 chan_freq; /* frequency in MHz of the channel on which this frame was received */
  5811. /* Timestamp (in micro sec) of the last fw consumed/dropped mgmt. frame, same across chips */
  5812. A_UINT32 global_timestamp;
  5813. /**
  5814. * mgmt_pkt_ctr_info
  5815. *
  5816. * [14:0]: reserved
  5817. * [15]: mgmt_pkt_ctr_valid
  5818. * [31:16]: mgmt_pkt_ctr, Sequence number of the last fw consumed mgmt frame
  5819. */
  5820. A_UINT32 mgmt_pkt_ctr_info;
  5821. A_UINT32 rx_ppdu_duration_us; /* receive duration in us */
  5822. A_UINT32 mpdu_end_timestamp; /* mpdu end timestamp in us (based on HWMLO timer) */
  5823. } wmi_mgmt_rx_fw_consumed_hdr;
  5824. /** Helper macro for param GET/SET of mgmt_rx_reo_params */
  5825. #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)
  5826. #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)
  5827. #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)
  5828. #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)
  5829. #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)
  5830. #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)
  5831. /** Data structure of the TLV to add in RX EVENTID for providing REO params
  5832. * like global_timestamp and mgmt_pkt_ctr
  5833. */
  5834. typedef struct {
  5835. A_UINT32 tlv_header; /*TLV WMITLV_TAG_STRUC_wmi_mgmt_rx_reo_params*/
  5836. /* Timestamp (in micro sec) of the last fw forwarded mgmt. frame, same across chips */
  5837. A_UINT32 global_timestamp;
  5838. /**
  5839. * mgmt_pkt_ctr_link_info
  5840. *
  5841. * [11:0]: reserved
  5842. * [14:12]: ieee_link_id, protocol link id on which the rx frame is received
  5843. * [15]: mgmt_pkt_ctr_valid
  5844. * [31:16]: mgmt_pkt_ctr, Sequence number of the last fw forwarded mgmt frame
  5845. */
  5846. A_UINT32 mgmt_pkt_ctr_link_info;
  5847. A_UINT32 rx_ppdu_duration_us; /* receive duration in us */
  5848. A_UINT32 mpdu_end_timestamp; /* mpdu end timestamp in us (based on HWMLO timer) */
  5849. } wmi_mgmt_rx_reo_params;
  5850. /** Helper macro for param GET/SET */
  5851. #define WMI_RX_PARAM_EXT_META_ID_GET(mgmt_rx_params_ext_dword0) WMI_GET_BITS(mgmt_rx_params_ext_dword0, 0, 3)
  5852. #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)
  5853. #define WMI_RX_PARAM_EXT_BA_WIN_SIZE_GET(mgmt_rx_params_ext_dword1) WMI_GET_BITS(mgmt_rx_params_ext_dword1, 0, 16)
  5854. #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)
  5855. #define WMI_RX_PARAM_EXT_REO_WIN_SIZE_GET(mgmt_rx_params_ext_dword1) WMI_GET_BITS(mgmt_rx_params_ext_dword1, 16, 16)
  5856. #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)
  5857. typedef enum {
  5858. WMI_RX_PARAMS_EXT_META_ADDBA = 0x0,
  5859. WMI_RX_PARAMS_EXT_META_TWT = 0x1,
  5860. } wmi_mgmt_rx_params_ext_meta_t;
  5861. typedef struct {
  5862. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_mgmt_rx_params_ext) and len */
  5863. union {
  5864. struct {
  5865. A_UINT32
  5866. /* Describes the representation of the data in rx_param_ext_dword1
  5867. * Full set shown in wmi_mgmt_rx_params_ext_meta_t */
  5868. meta_id : 3,
  5869. /* Dedicated for commonly used parameters only */
  5870. reserved_0 : 29;
  5871. };
  5872. A_UINT32 mgmt_rx_params_ext_dword0;
  5873. };
  5874. union {
  5875. struct {
  5876. /* WMI_RX_PARAMS_EXT_META_ADDBA */
  5877. A_UINT32
  5878. ba_win_size :16, /* negotiated BA window size */
  5879. reo_win_size :16; /* 2x the negotiated BA window size to handle any latency across MLO */
  5880. };
  5881. A_UINT32 mgmt_rx_params_ext_dword1;
  5882. };
  5883. union {
  5884. struct {
  5885. /* WMI_RX_PARAMS_EXT_META_TWT */
  5886. A_UINT32 twt_ie_buf_len; /* IE length */
  5887. /* Following this structure is the TLV byte stream of IE data
  5888. * of length twt_ie_buf_len:
  5889. * A_UINT8 ie_data[]; <-- length in bytes given by field
  5890. * twt_ie_buf_len.
  5891. * This ie_data[] would contain only the TWT IE information
  5892. * when twt_ie_buf_len is non zero.
  5893. */
  5894. };
  5895. A_UINT32 mgmt_rx_params_ext_dword2;
  5896. };
  5897. } wmi_mgmt_rx_params_ext;
  5898. typedef struct {
  5899. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
  5900. /** channel on which this frame is received (channel number) */
  5901. A_UINT32 channel;
  5902. /** snr information used to cal RSSI */
  5903. A_UINT32 snr;
  5904. /** Rate kbps */
  5905. A_UINT32 rate;
  5906. /** rx phy mode WLAN_PHY_MODE */
  5907. A_UINT32 phy_mode;
  5908. /** length of the frame */
  5909. A_UINT32 buf_len;
  5910. /** rx status */
  5911. A_UINT32 status; /* capture mode indication */
  5912. /** RSSI of PRI 20MHz for each chain. */
  5913. A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
  5914. /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
  5915. A_UINT32 flags;
  5916. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  5917. A_INT32 rssi;
  5918. /** delta between local TSF(TSF timestamp when frame was RXd)
  5919. * and remote TSF(TSF timestamp in the IE for mgmt frame -
  5920. * beacon,proberesp for e.g). If remote TSF is not available,
  5921. * delta set to 0.
  5922. * Although tsf_delta is stored as A_UINT32, it can be negative,
  5923. * and thus would need to be sign-extended if added to a value
  5924. * larger than 32 bits.
  5925. */
  5926. A_UINT32 tsf_delta;
  5927. /* The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
  5928. * TSF timestamp in the RX MAC descriptor provided by HW.
  5929. */
  5930. A_UINT32 rx_tsf_l32;
  5931. /* The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
  5932. * after the packet is received.
  5933. */
  5934. A_UINT32 rx_tsf_u32;
  5935. /** pdev_id for identifying the MAC the rx mgmt frame was received by
  5936. * See macros starting with WMI_PDEV_ID_ for values.
  5937. */
  5938. A_UINT32 pdev_id;
  5939. /** freq in MHz of the channel on which this frame was received */
  5940. A_UINT32 chan_freq;
  5941. /* This TLV is followed by array of bytes:
  5942. * A_UINT8 bufp[]; <-- management frame buffer
  5943. */
  5944. /* This TLV is optionally followed by array of struct:
  5945. * wmi_rssi_ctl_ext rssi_ctl_ext;
  5946. */
  5947. /*
  5948. * This TLV is followed by struct:
  5949. * wmi_mgmt_rx_reo_params reo_params;// MGMT rx REO params
  5950. */
  5951. /*
  5952. * This TLV is optionally followed by struct:
  5953. * wmi_mgmt_rx_params_ext mgmt_rx_params_ext[0 or 1];
  5954. */
  5955. } wmi_mgmt_rx_hdr;
  5956. /* WMI CMD to receive the management filter criteria from the host */
  5957. typedef struct {
  5958. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_mgmt_reo_filter_cmd_fixed_param */
  5959. A_UINT32 pdev_id; /* pdev_id for identifying the MAC */
  5960. /* filter:
  5961. * Each bit represents the possible combination of frame type (2 bits)
  5962. * and subtype (4 bits)
  5963. * There would be 64 such combinations as per the 802.11 standard
  5964. * For Exp : We have beacon frame, we will take the type and subtype
  5965. * of this frame and concatenate the bits, it will give 6 bits
  5966. * number. We need to go to that bit position in the below
  5967. * 2 filter_low and filter_high bitmap and set the bit.
  5968. */
  5969. A_UINT32 filter_low;
  5970. A_UINT32 filter_high;
  5971. } wmi_mgmt_rx_reo_filter_configuration_cmd_fixed_param;
  5972. typedef struct {
  5973. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_frame_pn_params) and len */
  5974. A_UINT8 cur_pn[WMI_MAX_PN_LEN];
  5975. A_UINT8 prev_pn[WMI_MAX_PN_LEN];
  5976. } wmi_frame_pn_params;
  5977. typedef struct {
  5978. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_is_my_frame) */
  5979. A_UINT32 mgmt_frm_sub_type; /* to indicate which sub-type of MGMT frame */
  5980. A_UINT32 is_my_frame; /* to indicate frame is sent to this BSSID */
  5981. } wmi_is_my_mgmt_frame;
  5982. typedef struct {
  5983. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_ml_info */
  5984. /**
  5985. * CU vdev map to initmate about the on-going Critical update
  5986. * per-link contains 16 VAPs at max.
  5987. */
  5988. /*
  5989. * bits : 0-15 | 16-31
  5990. * link-id : 0 | 1
  5991. */
  5992. A_UINT32 cu_vdev_map_1;
  5993. /*
  5994. * bits : 0-15 | 16-31
  5995. * link-id : 2 | 3
  5996. */
  5997. A_UINT32 cu_vdev_map_2;
  5998. /*
  5999. * bits : 0-15 | 16-31
  6000. * link-id : 4 | 5
  6001. */
  6002. A_UINT32 cu_vdev_map_3;
  6003. /*
  6004. * bits : 0-15 | 16-31
  6005. * link-id : 6 | 7
  6006. */
  6007. A_UINT32 cu_vdev_map_4; /* bits 63:32 */
  6008. /**
  6009. * This is followed by byte array that contains BPCC value per MLO VAP.
  6010. * There will be 16 byte entries for each link corresponding to VAP-ID.
  6011. * So number of byte entries will be (num of max links supported by AP * 16)
  6012. * Note: num of max links supported = 8
  6013. */
  6014. } wmi_mgmt_ml_info;
  6015. #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET(_var) WMI_GET_BITS(_var, 0, 8)
  6016. #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET(_var, _val) WMI_SET_BITS(_var, 0, 8, _val)
  6017. #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_EXP_DUR_GET(_var) WMI_GET_BITS(_var, 8, 24)
  6018. #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_EXP_DUR_SET(_var, _val) WMI_SET_BITS(_var, 8, 24, _val)
  6019. typedef struct {
  6020. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_bcast_t2lm_info */
  6021. /*
  6022. * Vdev_id for MLO vap
  6023. * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET /
  6024. * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET
  6025. * vdev_id :8
  6026. *
  6027. * Duration time for MLO Vap
  6028. * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET /
  6029. * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET
  6030. * expected_duration :24
  6031. */
  6032. A_UINT32 vdev_id_expec_dur;
  6033. } wmi_mlo_bcast_t2lm_info;
  6034. typedef enum {
  6035. PKT_CAPTURE_MODE_DISABLE = 0,
  6036. PKT_CAPTURE_MODE_MGMT_ONLY,
  6037. PKT_CAPTURE_MODE_DATA_ONLY,
  6038. PKT_CAPTURE_MODE_DATA_MGMT,
  6039. } WMI_PKT_CAPTURE_MODE_CONFIG;
  6040. /* This information sending to host during offloaded MGMT local TX and host TX */
  6041. typedef struct {
  6042. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_hdr */
  6043. /* channel frequency in MHz */
  6044. A_UINT32 chan_freq;
  6045. /** snr information used to cal RSSI in dB */
  6046. A_UINT32 snr;
  6047. /** Rate kbps */
  6048. A_UINT32 rate_kbps;
  6049. /** phy mode WLAN_PHY_MODE */
  6050. A_UINT32 phy_mode;
  6051. /** length of the frame in bytes */
  6052. A_UINT32 buf_len;
  6053. /** status:
  6054. * 0x00: CRC ERR
  6055. * 0x08: DECRYPT ERR
  6056. * 0x10: MIC ERR
  6057. * 0x20: KEY CACHE MISS
  6058. */
  6059. A_UINT32 status;
  6060. /** flags:
  6061. * Information about the management frame e.g. can give a scan source
  6062. * for a scan result mgmt frame
  6063. * Refer to WMI_MGMT_RX_HDR_ definitions.
  6064. * ex: WMI_MGMT_RX_HDR_EXTSCAN,WMI_MGMT_RX_HDR_ENLO
  6065. */
  6066. A_UINT32 flags;
  6067. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  6068. A_INT32 rssi;
  6069. /** delta between local TSF (TSF timestamp when frame was RXd)
  6070. * and remote TSF (TSF timestamp in the IE for mgmt frame -
  6071. * beacon, proberesp for example). If remote TSF is not available,
  6072. * delta is set to 0.
  6073. * Although tsf_delta is stored as A_UINT32, it can be negative,
  6074. * and thus would need to be sign-extended if added to a value
  6075. * larger than 32 bits.
  6076. */
  6077. A_UINT32 tsf_delta;
  6078. /* The lower 32 bits of the TSF (tsf_l32) is copied by FW from
  6079. * TSF timestamp in the TX MAC descriptor provided by HW.
  6080. */
  6081. A_UINT32 tsf_l32;
  6082. /* The upper 32 bits of the TSF (tsf_u32) is copied by FW from
  6083. * TSF timestamp in the TX MAC descriptor provided by HW.
  6084. */
  6085. A_UINT32 tsf_u32;
  6086. /** pdev_id for identifying the MAC the tx mgmt frame transmitted.
  6087. * See macros starting with WMI_PDEV_ID_ for values.
  6088. */
  6089. A_UINT32 pdev_id;
  6090. A_UINT32 direction; /* tx:0,rx:1*/
  6091. /** tx_status:
  6092. * 0: xmit ok
  6093. * 1: excessive retries
  6094. * 2: blocked by tx filtering
  6095. * 4: fifo underrun
  6096. * 8: swabort
  6097. */
  6098. A_UINT32 tx_status;
  6099. A_UINT32
  6100. /* tx_retry_cnt:
  6101. * Indicates retry count of offloaded/local & host mgmt tx frames.
  6102. * The WMI_MGMT_HDR_TX_RETRY_[SET,GET] macros can be used to access
  6103. * this bitfield in a portable manner.
  6104. */
  6105. tx_retry_cnt:6, /* [5:0] */
  6106. reserved_1:26; /* [31:6] */
  6107. /* This TLV may be followed by array of bytes:
  6108. * A_UINT8 bufp[]; <-- management frame buffer
  6109. */
  6110. } wmi_mgmt_hdr;
  6111. /* Tx retry cnt set & get bits*/
  6112. #define WMI_MGMT_HDR_TX_RETRY_CNT_SET(tx_retry_cnt, value) \
  6113. WMI_SET_BITS(tx_retry_cnt, 0, 6, value)
  6114. #define WMI_MGMT_HDR_TX_RETRY_CNT_GET(tx_retry_cnt) \
  6115. WMI_GET_BITS(tx_retry_cnt, 0, 6)
  6116. /*
  6117. * Instead of universally increasing the RX_HDR_HEADROOM size which may cause problems for older targets,
  6118. * this new ext_hdr can be used for extending the header and will be only applicable for new targets.
  6119. */
  6120. typedef struct
  6121. {
  6122. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_rssi_ctl_ext */
  6123. /** RSSI of PRI 20MHz for each chain, in dB w.r.t. noise floor */
  6124. A_UINT32 rssi_ctl_ext[MAX_ANTENNA_EIGHT - ATH_MAX_ANTENNA];
  6125. } wmi_rssi_ctl_ext;
  6126. typedef struct {
  6127. /** TSF timestamp */
  6128. A_UINT32 tsf_timestamp;
  6129. /**
  6130. * Current freq1, freq2
  6131. *
  6132. * [7:0]: freq1[lo]
  6133. * [15:8] : freq1[hi]
  6134. * [23:16]: freq2[lo]
  6135. * [31:24]: freq2[hi]
  6136. */
  6137. A_UINT32 freq_info_1;
  6138. /**
  6139. * Combined RSSI over all chains and channel width for this PHY error
  6140. *
  6141. * [7:0]: RSSI combined
  6142. * [15:8]: Channel width (MHz)
  6143. * [23:16]: PHY error code
  6144. * [24:16]: reserved (future use)
  6145. */
  6146. A_UINT32 freq_info_2;
  6147. /**
  6148. * RSSI on chain 0 through 3
  6149. *
  6150. * This is formatted the same as the PPDU_START RX descriptor
  6151. * field:
  6152. *
  6153. * [7:0]: pri20
  6154. * [15:8]: sec20
  6155. * [23:16]: sec40
  6156. * [31:24]: sec80
  6157. */
  6158. A_UINT32 rssi_chain0;
  6159. A_UINT32 rssi_chain1;
  6160. A_UINT32 rssi_chain2;
  6161. A_UINT32 rssi_chain3;
  6162. /**
  6163. * Last calibrated NF value for chain 0 through 3
  6164. *
  6165. * nf_list_1:
  6166. *
  6167. * + [15:0] - chain 0
  6168. * + [31:16] - chain 1
  6169. *
  6170. * nf_list_2:
  6171. *
  6172. * + [15:0] - chain 2
  6173. * + [31:16] - chain 3
  6174. */
  6175. A_UINT32 nf_list_1;
  6176. A_UINT32 nf_list_2;
  6177. /** Length of the frame */
  6178. A_UINT32 buf_len;
  6179. } wmi_single_phyerr_rx_hdr;
  6180. typedef struct {
  6181. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_single_phyerr_ext_rx_hdr */
  6182. /**
  6183. * RSSI on chain 4 through 7 in dB w.r.t noise floor.
  6184. *
  6185. * This is formatted the same as the PPDU_START RX descriptor
  6186. * field:
  6187. *
  6188. * [7:0]: pri20
  6189. * [15:8]: sec20
  6190. * [23:16]: sec40
  6191. * [31:24]: sec80
  6192. */
  6193. A_UINT32 rssi_chain4;
  6194. A_UINT32 rssi_chain5;
  6195. A_UINT32 rssi_chain6;
  6196. A_UINT32 rssi_chain7;
  6197. /**
  6198. * Last calibrated NF value for chain 4 through 7 in dBm
  6199. *
  6200. * nf_list_3:
  6201. * + [15:0] - chain 4
  6202. * + [31:16] - chain 5
  6203. *
  6204. * nf_list_4:
  6205. * + [15:0] - chain 6
  6206. * + [31:16] - chain 7
  6207. *
  6208. * Each chain's noise floor is stored as a sign-extended (negative)
  6209. * value in dBm units.
  6210. */
  6211. A_UINT32 nf_list_3;
  6212. A_UINT32 nf_list_4;
  6213. } wmi_single_phyerr_ext_rx_hdr;
  6214. #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
  6215. #define WMI_UNIFIED_FREQINFO_1_LO_S 0
  6216. #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
  6217. #define WMI_UNIFIED_FREQINFO_1_HI_S 8
  6218. #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
  6219. #define WMI_UNIFIED_FREQINFO_2_LO_S 16
  6220. #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
  6221. #define WMI_UNIFIED_FREQINFO_2_HI_S 24
  6222. /*
  6223. * Please keep in mind that these _SET macros break macro side effect
  6224. * assumptions; don't be clever with them.
  6225. */
  6226. #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
  6227. (WMI_F_MS((hdr)->freq_info_1, \
  6228. WMI_UNIFIED_FREQINFO_##f##_LO) \
  6229. | (WMI_F_MS((hdr)->freq_info_1, \
  6230. WMI_UNIFIED_FREQINFO_##f##_HI) << 8))
  6231. #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
  6232. do { \
  6233. WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
  6234. WMI_UNIFIED_FREQINFO_##f##_LO); \
  6235. WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
  6236. WMI_UNIFIED_FREQINFO_##f##_HI); \
  6237. } while (0)
  6238. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
  6239. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
  6240. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
  6241. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
  6242. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
  6243. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
  6244. #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
  6245. ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
  6246. WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
  6247. #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
  6248. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  6249. WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
  6250. #define WMI_UNIFIED_CHWIDTH_GET(hdr) \
  6251. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
  6252. #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
  6253. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  6254. WMI_UNIFIED_FREQINFO_2_CHWIDTH);
  6255. #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
  6256. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
  6257. #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
  6258. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  6259. WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
  6260. #define WMI_UNIFIED_CHAIN_0 0x0000ffff
  6261. #define WMI_UNIFIED_CHAIN_0_S 0
  6262. #define WMI_UNIFIED_CHAIN_1 0xffff0000
  6263. #define WMI_UNIFIED_CHAIN_1_S 16
  6264. #define WMI_UNIFIED_CHAIN_2 0x0000ffff
  6265. #define WMI_UNIFIED_CHAIN_2_S 0
  6266. #define WMI_UNIFIED_CHAIN_3 0xffff0000
  6267. #define WMI_UNIFIED_CHAIN_3_S 16
  6268. #define WMI_UNIFIED_CHAIN_4 0x0000ffff
  6269. #define WMI_UNIFIED_CHAIN_4_S 0
  6270. #define WMI_UNIFIED_CHAIN_5 0xffff0000
  6271. #define WMI_UNIFIED_CHAIN_5_S 16
  6272. #define WMI_UNIFIED_CHAIN_6 0x0000ffff
  6273. #define WMI_UNIFIED_CHAIN_6_S 0
  6274. #define WMI_UNIFIED_CHAIN_7 0xffff0000
  6275. #define WMI_UNIFIED_CHAIN_7_S 16
  6276. #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
  6277. #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
  6278. #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
  6279. #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
  6280. #define WMI_UNIFIED_CHAIN_4_FIELD nf_list_3
  6281. #define WMI_UNIFIED_CHAIN_5_FIELD nf_list_3
  6282. #define WMI_UNIFIED_CHAIN_6_FIELD nf_list_4
  6283. #define WMI_UNIFIED_CHAIN_7_FIELD nf_list_4
  6284. #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
  6285. ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, \
  6286. WMI_UNIFIED_CHAIN_##c)))
  6287. #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
  6288. WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, (nf) & 0xffff, \
  6289. WMI_UNIFIED_CHAIN_##c);
  6290. /*
  6291. * For now, this matches what the underlying hardware is doing.
  6292. * Update ar6000ProcRxDesc() to use these macros when populating
  6293. * the rx descriptor and then we can just copy the field over
  6294. * to the WMI PHY notification without worrying about breaking
  6295. * things.
  6296. */
  6297. #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
  6298. #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
  6299. #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
  6300. #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
  6301. #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
  6302. #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
  6303. #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
  6304. #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
  6305. #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
  6306. WMI_F_RMW((hdr)->rssi_chain##c, (rssi) & 0xff, \
  6307. WMI_UNIFIED_RSSI_CHAN_##ch);
  6308. #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
  6309. ((int8_t) (WMI_F_MS((hdr)->rssi_chain##c, \
  6310. WMI_UNIFIED_RSSI_CHAN_##ch)))
  6311. #define WMI_UNIFIED_CHAIN_RSSI_GET(tlv, chain_idx, band) \
  6312. ((A_INT8) WMI_F_MS((tlv)->chain_rssi[chain_idx], WMI_UNIFIED_RSSI_CHAN_ ## band))
  6313. typedef struct {
  6314. /** Phy error event header */
  6315. wmi_single_phyerr_rx_hdr hdr;
  6316. /** frame buffer */
  6317. WMI_VAR_LEN_ARRAY1(A_UINT8, bufp);
  6318. } wmi_single_phyerr_rx_event;
  6319. /* PHY ERROR MASK 0 */
  6320. /* bits 1:0 defined but not published */
  6321. #define WMI_PHY_ERROR_MASK0_RADAR (1 << 2)
  6322. /* bits 23:3 defined but not published */
  6323. #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1 << 24)
  6324. /* bits 25:24 defined but not published */
  6325. #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1 << 26)
  6326. /* bits 31:27 defined but not published */
  6327. /* PHY ERROR MASK 1 */
  6328. /* bits 13:0 defined but not published */
  6329. /* bits 31:14 reserved */
  6330. /* PHY ERROR MASK 2 */
  6331. /* bits 31:0 reserved */
  6332. typedef struct {
  6333. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
  6334. /** Phy error phy error count */
  6335. A_UINT32 num_phyerr_events;
  6336. A_UINT32 tsf_l32;
  6337. A_UINT32 tsf_u32;
  6338. A_UINT32 buf_len;
  6339. union {
  6340. A_UINT32 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  6341. /** pdev_id for identifying the MAC
  6342. * See macros starting with WMI_PDEV_ID_ for values.
  6343. */
  6344. A_UINT32 pdev_id;
  6345. };
  6346. A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
  6347. A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
  6348. A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
  6349. /* This TLV is followed by array of bytes:
  6350. * frame buffer - contains multiple payloads in the order:
  6351. * header - payload, header - payload...
  6352. * (The header is of type: wmi_single_phyerr_rx_hdr)
  6353. * A_UINT8 bufp[];
  6354. * The extension hdr will repeat num_phyerr_events of times
  6355. * and will have 1:1 mapping with above header. i.e the 1st
  6356. * ext_rx_hdr will belong to 1st phyerr_rx_hdr and so on.
  6357. * wmi_single_phyerr_ext_rx_hdr single_phyerr_ext;
  6358. */
  6359. } wmi_comb_phyerr_rx_hdr;
  6360. /* WMI MGMT TX */
  6361. typedef struct {
  6362. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
  6363. /** unique id identifying the VDEV, generated by the caller */
  6364. A_UINT32 vdev_id;
  6365. /** peer MAC address */
  6366. wmi_mac_addr peer_macaddr;
  6367. /** xmit rate */
  6368. A_UINT32 tx_rate;
  6369. /** xmit power */
  6370. A_UINT32 tx_power;
  6371. /** Buffer length in bytes */
  6372. A_UINT32 buf_len;
  6373. /* This TLV is followed by array of bytes:
  6374. * A_UINT8 bufp[]; <-- management frame buffer
  6375. */
  6376. } wmi_mgmt_tx_hdr;
  6377. #define WMI_TX_SEND_PARAM_EXT_META_ID_GET(tx_param_ext_dword0) WMI_GET_BITS(tx_param_dword0, 0, 3)
  6378. #define WMI_TX_SEND_PARAM_EXT_META_ID_SET(tx_param_ext_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 3, value)
  6379. #define WMI_TX_SEND_PARAM_EXT_WIN_SIZE_GET(tx_param_ext_dword1) WMI_GET_BITS(tx_param_dword1, 0, 16)
  6380. #define WMI_TX_SEND_PARAM_EXT_WIN_SIZE_SET(tx_param_ext_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 16, value)
  6381. typedef enum {
  6382. WMI_TX_SEND_PARAMS_EXT_META_ADDBA = 0x0,
  6383. WMI_TX_SEND_PARAMS_EXT_META_DELBA = 0x1,
  6384. } wmi_tx_send_params_ext_meta_t;
  6385. typedef struct {
  6386. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_tx_send_params_ext) and len */
  6387. union {
  6388. struct {
  6389. 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 */
  6390. reserved_0 : 29; /* Dedicated for commonly used parameters only */
  6391. };
  6392. A_UINT32 tx_param_ext_dword0;
  6393. };
  6394. union {
  6395. struct {
  6396. /* WMI_TX_SEND_PARAMS_EXT_META_ADDBA */
  6397. A_UINT32 win_size : 16,
  6398. reserved_1 : 16;
  6399. };
  6400. A_UINT32 tx_param_ext_dword1;
  6401. };
  6402. } wmi_tx_send_params_ext;
  6403. #define WMI_TX_SEND_PARAM_PWR_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 0, 8)
  6404. #define WMI_TX_SEND_PARAM_PWR_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 8, value)
  6405. #define WMI_TX_SEND_PARAM_MCS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 8, 12)
  6406. #define WMI_TX_SEND_PARAM_MCS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 8, 12, value)
  6407. #define WMI_TX_SEND_PARAM_NSS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 20, 8)
  6408. #define WMI_TX_SEND_PARAM_NSS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 20, 8, value)
  6409. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 28, 4)
  6410. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 28, 4, value)
  6411. #define WMI_TX_SEND_PARAM_CHAIN_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 0, 8)
  6412. #define WMI_TX_SEND_PARAM_CHAIN_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 8, value)
  6413. #define WMI_TX_SEND_PARAM_BW_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 8, 7)
  6414. #define WMI_TX_SEND_PARAM_BW_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 8, 7, value)
  6415. #define WMI_TX_SEND_PARAM_PREAMBLE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 15, 5)
  6416. #define WMI_TX_SEND_PARAM_PREAMBLE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 15, 5, value)
  6417. #define WMI_TX_SEND_PARAM_FRAME_TYPE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 20, 1)
  6418. #define WMI_TX_SEND_PARAM_FRAME_TYPE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 20, 1, value)
  6419. #define WMI_TX_SEND_PARAM_CFR_CAPTURE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 21, 1)
  6420. #define WMI_TX_SEND_PARAM_CFR_CAPTURE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 21, 1, value)
  6421. #define WMI_TX_SEND_PARAM_BEAMFORM_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 22, 1)
  6422. #define WMI_TX_SEND_PARAM_BEAMFORM_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 22, 1, value)
  6423. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_EXT_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 23, 3)
  6424. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_EXT_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 23, 3, value)
  6425. /* TX_SEND flags:
  6426. * Bit 0: set wrong txkey
  6427. * There is one special WFA test case in STA or AP, setting wrong txkey
  6428. * in disassoc or deauth with PMF enabled to verify if peer disconnected
  6429. * Bit 1: set ps buffering for SA query frame
  6430. */
  6431. #define WMI_TX_SEND_FLAG_SET_WRONG_KEY 0x00000001
  6432. #define WMI_TX_SEND_FLAG_SET_WRONG_KEY_GET(tx_flags) WMI_GET_BITS(tx_flags, 0, 1)
  6433. #define WMI_TX_SEND_FLAG_SET_WRONG_KEY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 0, 1, value)
  6434. #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY 0x00000002
  6435. #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY_GET(tx_flags) WMI_GET_BITS(tx_flags, 1, 1)
  6436. #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 1, 1, value)
  6437. #define WMI_TX_SEND_FLAG_SET_IS_SA_QUERY 0x00000004
  6438. #define WMI_TX_SEND_FLAG_SET_IS_SA_QUERY_GET(tx_flags) WMI_GET_BITS(tx_flags, 2, 1)
  6439. #define WMI_TX_SEND_FLAG_SET_IS_SA_QUERY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 2, 1, value)
  6440. #define WMI_TX_SEND_FLAG_SET_P2P_FRAME_ON_STA_VDEV 0x00000008
  6441. #define WMI_TX_SEND_FLAG_SET_P2P_FRAME_ON_STA_VDEV_GET(tx_flags) WMI_GET_BITS(tx_flags, 3, 1)
  6442. #define WMI_TX_SEND_FLAG_SET_P2P_FRAME_ON_STA_VDEV_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 3, 1, value)
  6443. typedef struct {
  6444. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_send_params */
  6445. union {
  6446. struct {
  6447. /* DWORD 0: tx power, tx rate, retry_limit */
  6448. A_UINT32
  6449. /* pwr -
  6450. * Specify what power the tx frame needs to be transmitted at.
  6451. * The power a signed (two's complement) value is in units of 0.5 dBm.
  6452. * The value needs to be appropriately sign-extended when extracting
  6453. * the value from the message and storing it in a variable that is
  6454. * larger than A_INT8. (fw automatically handles this sign-extension.)
  6455. * If the transmission uses multiple tx chains, this power spec is
  6456. * the total transmit power, assuming incoherent combination of
  6457. * per-chain power to produce the total power.
  6458. */
  6459. pwr: 8,
  6460. /* mcs_mask -
  6461. * Specify the allowable values for MCS index (modulation and coding)
  6462. * to use for transmitting the frame.
  6463. *
  6464. * For HT / VHT preamble types, this mask directly corresponds to
  6465. * the HT or VHT MCS indices that are allowed. For each bit N set
  6466. * within the mask, MCS index N is allowed for transmitting the frame.
  6467. * For legacy CCK and OFDM rates, separate bits are provided for CCK
  6468. * rates versus OFDM rates, so the host has the option of specifying
  6469. * that the target must transmit the frame with CCK or OFDM rates
  6470. * (not HT or VHT), but leaving the decision to the target whether
  6471. * to use CCK or OFDM.
  6472. *
  6473. * For CCK and OFDM, the bits within this mask are interpreted as
  6474. * follows:
  6475. * bit 0 -> CCK 1 Mbps rate is allowed
  6476. * bit 1 -> CCK 2 Mbps rate is allowed
  6477. * bit 2 -> CCK 5.5 Mbps rate is allowed
  6478. * bit 3 -> CCK 11 Mbps rate is allowed
  6479. * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
  6480. * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
  6481. * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
  6482. * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
  6483. * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
  6484. * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
  6485. * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
  6486. * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
  6487. *
  6488. * The MCS index specification needs to be compatible with the
  6489. * bandwidth mask specification. For example, a MCS index == 9
  6490. * specification is inconsistent with a preamble type == VHT,
  6491. * Nss == 1, and channel bandwidth == 20 MHz.
  6492. *
  6493. * Furthermore, the host has only a limited ability to specify to
  6494. * the target to select from HT + legacy rates, or VHT + legacy rates,
  6495. * since this mcs_mask can specify either HT/VHT rates or legacy rates.
  6496. * If no bits are set, target can choose what MCS type to use.
  6497. */
  6498. mcs_mask: 12,
  6499. /* nss_mask -
  6500. * Specify which numbers of spatial streams (MIMO factor) are permitted.
  6501. * Each bit in this mask corresponds to a Nss value:
  6502. * bit 0: if set, Nss = 1 (non-MIMO) is permitted
  6503. * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
  6504. * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
  6505. * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
  6506. * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
  6507. * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
  6508. * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
  6509. * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
  6510. * The values in the Nss mask must be suitable for the recipient, e.g.
  6511. * a value of 0x4 (Nss = 3) cannot be specified for a tx frame to a
  6512. * recipient which only supports 2x2 MIMO.
  6513. * If no bits are set, target can choose what NSS type to use.
  6514. */
  6515. nss_mask: 8,
  6516. /* retry_limit -
  6517. * Specify the maximum number of transmissions, including the
  6518. * initial transmission, to attempt before giving up if no ack
  6519. * is received.
  6520. * If the tx rate is specified, then all retries shall use the
  6521. * same rate as the initial transmission.
  6522. * If no tx rate is specified, the target can choose whether to
  6523. * retain the original rate during the retransmissions, or to
  6524. * fall back to a more robust rate.
  6525. */
  6526. retry_limit: 4;
  6527. };
  6528. A_UINT32 tx_param_dword0;
  6529. };
  6530. union {
  6531. struct {
  6532. /* DWORD 1: tx chain mask, preamble_type, tx BW */
  6533. A_UINT32
  6534. /* chain_mask - specify which chains to transmit from
  6535. * If not set, target will choose what chain_mask to use.
  6536. */
  6537. chain_mask: 8,
  6538. /* The bits in this mask correspond to the values as below
  6539. * bit 0 -> 5MHz
  6540. * bit 1 -> 10MHz
  6541. * bit 2 -> 20MHz
  6542. * bit 3 -> 40MHz
  6543. * bit 4 -> 80MHz
  6544. * bit 5 -> 160MHz
  6545. * bit 6 -> 80_80MHz
  6546. * If no bits are set, target can choose what BW to use.
  6547. */
  6548. bw_mask: 7,
  6549. /* preamble_type_mask -
  6550. * Specify which preamble types (CCK, OFDM, HT, VHT) the target
  6551. * may choose from for transmitting this frame.
  6552. * Each bit in this mask corresponds to a preamble_type value:
  6553. * bit 0: if set, OFDM
  6554. * bit 1: if set, CCK
  6555. * bit 2: if set, HT
  6556. * bit 3: if set, VHT
  6557. * bit 4: if set, HE
  6558. * If no bits are set, target can choose what preamble type to use.
  6559. */
  6560. preamble_type: 5,
  6561. /* Data:1 Mgmt:0 */
  6562. frame_type: 1,
  6563. /* Capture CFR when bit is set */
  6564. cfr_capture: 1,
  6565. /* Enables Beamforming when bit is set */
  6566. en_beamforming: 1,
  6567. /*
  6568. * Extra 3 bits of retry limit defined in tx_param_dword0,
  6569. * to allow maximum 127 retries for specific frames.
  6570. */
  6571. retry_limit_ext: 3,
  6572. reserved1_31_26: 6;
  6573. };
  6574. A_UINT32 tx_param_dword1;
  6575. };
  6576. } wmi_tx_send_params;
  6577. #define WMI_MLO_MGMT_TID 0xFFFFFFFF
  6578. typedef struct {
  6579. A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_mlo_tx_send_params) and len */
  6580. A_UINT32 hw_link_id; /** Unique link id across SOCs, provided by QMI handshake.
  6581. * If WMI_MLO_MGMT_TID then the frame will be queued in the MLO queue
  6582. * If valid hw_link_id
  6583. */
  6584. } wmi_mlo_tx_send_params;
  6585. typedef struct {
  6586. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param */
  6587. A_UINT32 vdev_id;
  6588. A_UINT32 desc_id; /* echoed in tx_compl_event */
  6589. A_UINT32 chanfreq; /* MHz units */
  6590. /* WMI_MGMT_TX_SEND_CMDID is used for both pass by value and
  6591. * pass by reference WMI management frames.
  6592. *
  6593. * a) If the command is for pass by reference,
  6594. * paddr_lo and padd_hi will hold the address of remote/host buffer
  6595. * b) If the command is for pass by value,
  6596. * paddr_lo and paddr_hi will be NULL.
  6597. */
  6598. A_UINT32 paddr_lo;
  6599. A_UINT32 paddr_hi;
  6600. A_UINT32 frame_len;
  6601. A_UINT32 buf_len; /** Buffer length in bytes */
  6602. /*
  6603. * The frame which will have tx_params_valid set will be always be RAW
  6604. * frame, as it will be tx'ed on non-pause tid
  6605. */
  6606. A_UINT32 tx_params_valid;
  6607. /* tx_flags:
  6608. * Extra flags when tx_params_valid is 0.
  6609. * Refer to WMI_TX_SEND_FLAG_xxx defs regarding the meaning of the
  6610. * bits within this field.
  6611. */
  6612. A_UINT32 tx_flags;
  6613. /* peer_rssi:
  6614. * If non-zero, indicates saved peer beacon/probe resp RSSI (dBm units)
  6615. * ONLY for init connection auth/assoc pkt.
  6616. */
  6617. A_INT32 peer_rssi;
  6618. /* This TLV is followed by array of bytes: First 64 bytes of management frame
  6619. * A_UINT8 bufp[];
  6620. */
  6621. /* This TLV is followed by wmi_tx_send_params
  6622. * wmi_tx_send_params tx_send_params;
  6623. * wmi_mlo_tx_send_params mlo_tx_send_params[];
  6624. * Note: WMI_MLO_MGMT_TID path validated for specific scenario
  6625. * (BTM Usecase). Full support is not available.
  6626. * wmi_tx_send_params_ext tx_send_params_ext[0 or 1];
  6627. */
  6628. } wmi_mgmt_tx_send_cmd_fixed_param;
  6629. typedef struct {
  6630. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_send_cmd_fixed_param */
  6631. A_UINT32 vdev_id;
  6632. A_UINT32 desc_id; /* echoed in tx_compl_event */
  6633. A_UINT32 chanfreq; /* MHz units */
  6634. A_UINT32 paddr_lo;
  6635. A_UINT32 paddr_hi;
  6636. A_UINT32 frame_len;
  6637. A_UINT32 buf_len; /** Buffer length in bytes */
  6638. /* The frame which will have tx_params_valid set will be always be RAW
  6639. * frame, as it will be tx'ed on non-pause tid
  6640. */
  6641. A_UINT32 tx_params_valid;
  6642. /* This TLV is followed by array of bytes: First 64 bytes of frame
  6643. * A_UINT8 bufp[];
  6644. */
  6645. /* This TLV is followed by wmi_tx_send_params
  6646. * wmi_tx_send_params tx_send_params;
  6647. */
  6648. } wmi_offchan_data_tx_send_cmd_fixed_param;
  6649. typedef struct {
  6650. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_qos_null_frame_tx_send_cmd_fixed_param */
  6651. A_UINT32 vdev_id;
  6652. A_UINT32 desc_id; /* echoed in tx_compl_event */
  6653. A_UINT32 paddr_lo; /* paddr_lo and padd_hi will hold the address of remote/host buffer, which is physical address of frame */
  6654. A_UINT32 paddr_hi;
  6655. A_UINT32 frame_len; /* Actual length of frame in bytes*/
  6656. A_UINT32 buf_len; /** Buffer length in bytes, length of data DMA'ed to FW from host */
  6657. /* This fixed_param TLV is followed by the TLVs listed below:
  6658. * 1. ARRAY_BYTE TLV: First buf_len (expected to be 64) bytes of frame
  6659. * A_UINT8 bufp[];
  6660. * 2. wmi_tx_send_params tx_send_params;
  6661. */
  6662. } wmi_qos_null_frame_tx_send_cmd_fixed_param;
  6663. typedef struct {
  6664. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
  6665. A_UINT32 value;
  6666. } wmi_echo_event_fixed_param;
  6667. typedef struct {
  6668. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
  6669. A_UINT32 value;
  6670. } wmi_echo_cmd_fixed_param;
  6671. typedef struct {
  6672. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to WMITLV_TAG_STRUC_wmi_mlo_link_disable_request_event_fixed_param */
  6673. /** AP MLD address request to be disabled some set of link */
  6674. wmi_mac_addr mld_addr;
  6675. /** Request link id set to disable */
  6676. A_UINT32 linkid_bitmap;
  6677. } wmi_mlo_link_disable_request_event_fixed_param;
  6678. typedef enum {
  6679. /**
  6680. * Projects support to offload regulatory database by default.
  6681. * If don`t offload regulatory database, host can set this bit.
  6682. */
  6683. WMI_REGDOMAIN_DATABASE_NO_OFFLOAD_BITMASK = 0x00000001,
  6684. } WMI_REGDOMAIN_BITMASK;
  6685. typedef struct {
  6686. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
  6687. /** pdev_id for identifying the MAC
  6688. * See macros starting with WMI_PDEV_ID_ for values.
  6689. */
  6690. A_UINT32 pdev_id;
  6691. /** reg domain code */
  6692. A_UINT32 reg_domain;
  6693. A_UINT32 reg_domain_2G; /* fulfil 2G domain ID */
  6694. A_UINT32 reg_domain_5G; /* fulfil 5G domain ID */
  6695. A_UINT32 conformance_test_limit_2G; /* 2G whole band CTL index */
  6696. A_UINT32 conformance_test_limit_5G; /* 5G whole band CTL index */
  6697. A_UINT32 dfs_domain;
  6698. /**
  6699. * The below conformance_test_limit index fields are for supporting the
  6700. * 5G sub-band CTL feature.
  6701. * Conformance test limits (CTLs) are the product-specific
  6702. * regulatory-compliant powers stored in the board data file (BDF).
  6703. * These CTLs within the BDF are identified by CTL index values.
  6704. * For example, the BDF file is expected to contain CTL data for
  6705. * FCC (CTL index = 0x10), ETSI (CTL index = 0x30),
  6706. * Japan/MKK (CTL index = 0x40), Korea (CTL index = 0x50),
  6707. * and China (CTL index = 0x60) CTL regions.
  6708. * The target FW will use the CTL indices specified in this message to
  6709. * find a BDF CTL entry with a matching CTL index value, and then use
  6710. * that CTL as one of the inputs into the tx power limit computation.
  6711. * A CTL index value of 0x0 is invalid, and will be ignored by the FW.
  6712. */
  6713. A_UINT32 conformance_test_limit_5G_subband_UNII1;
  6714. A_UINT32 conformance_test_limit_5G_subband_UNII2a;
  6715. A_UINT32 conformance_test_limit_5G_subband_UNII2c;
  6716. A_UINT32 conformance_test_limit_5G_subband_UNII3;
  6717. A_UINT32 conformance_test_limit_5G_subband_UNII4;
  6718. /**
  6719. * The below conformance_test_limit index fields are like the above,
  6720. * but are for supporting the 6G sub-band CTL feature.
  6721. */
  6722. A_UINT32 conformance_test_limit_6G_subband_UNII5;
  6723. A_UINT32 conformance_test_limit_6G_subband_UNII6;
  6724. A_UINT32 conformance_test_limit_6G_subband_UNII7;
  6725. A_UINT32 conformance_test_limit_6G_subband_UNII8;
  6726. /**
  6727. * In 6G sub-band CTL, fulfil 6G domain id and whole band CTL index firstly.
  6728. * Unlike 5G sub-band CTL index fields, role ap and role client have
  6729. * different indices.
  6730. * Each role has 3 sub-band indices due to different power_mode type.
  6731. * Below 3 represent for power_mode types: 0-LPI, 1-SP, 2-VLP
  6732. * Below 2 represent for client_max: 0-default, 1-subordinate
  6733. */
  6734. A_UINT32 reg_domain_6G; /* fulfil 6G domain id */
  6735. A_UINT32 conformance_test_limit_6G; /* 6G whole band CTL index */
  6736. A_UINT32 conformance_test_limit_6G_subband_UNII5_ap[3];
  6737. A_UINT32 conformance_test_limit_6G_subband_UNII6_ap[3];
  6738. A_UINT32 conformance_test_limit_6G_subband_UNII7_ap[3];
  6739. A_UINT32 conformance_test_limit_6G_subband_UNII8_ap[3];
  6740. A_UINT32 conformance_test_limit_6G_subband_UNII5_client[3][2];
  6741. A_UINT32 conformance_test_limit_6G_subband_UNII6_client[3][2];
  6742. A_UINT32 conformance_test_limit_6G_subband_UNII7_client[3][2];
  6743. A_UINT32 conformance_test_limit_6G_subband_UNII8_client[3][2];
  6744. /** reg domain bitmap */
  6745. A_UINT32 regdomain_bitmap;
  6746. } wmi_pdev_set_regdomain_cmd_fixed_param;
  6747. typedef struct {
  6748. /** TRUE for scan start and flase for scan end */
  6749. A_UINT32 scan_start;
  6750. } wmi_pdev_scan_cmd;
  6751. /* WMI support for setting ratemask in target */
  6752. typedef struct {
  6753. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param */
  6754. A_UINT32 vdev_id;
  6755. /*
  6756. * 0 - cck/ofdm
  6757. * 1 - HT
  6758. * 2 - VHT
  6759. * 3 - HE
  6760. * 4 - EHT
  6761. *
  6762. * Rate Bit mask format:
  6763. * <MCS in NSS MAX> ...
  6764. * <MCS MAX, ..., 2, 1, 0 : NSS2>
  6765. * <MCS MAX, ..., 2, 1, 0 : NSS1>
  6766. * EHT Rate Bit Mask format:
  6767. * <MCS in NSS MAX> ...
  6768. * <MCS MAX, ... 2, 1, 0, -1, -2 : NSS2>
  6769. * <MCS MAX, ..., 2, 1, 0, -1(DCM), -2(EHT Dup) : NSS1>
  6770. */
  6771. A_UINT32 type;
  6772. A_UINT32 mask_lower32;
  6773. A_UINT32 mask_higher32;
  6774. A_UINT32 mask_lower32_2;
  6775. A_UINT32 mask_higher32_2;
  6776. } wmi_vdev_config_ratemask_cmd_fixed_param;
  6777. /* nrp action - Filter Neighbor Rx Packets - add/remove filter */
  6778. enum {
  6779. WMI_FILTER_NRP_ACTION_ADD = 0x1,
  6780. WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
  6781. WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
  6782. }; /* nrp - Neighbor Rx Packets */
  6783. /* nrp type - Filter Neighbor Rx Packets - ap/client addr */
  6784. enum {
  6785. WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
  6786. WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
  6787. };
  6788. /* nrp flag - Filter Neighbor Rx Packets
  6789. * (capture flag, 2 & 3 not initially supported)
  6790. */
  6791. enum {
  6792. WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
  6793. WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
  6794. WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
  6795. };
  6796. typedef struct {
  6797. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param */
  6798. A_UINT32 vdev_id;
  6799. /* AP Bssid or Client Mac-addr */
  6800. wmi_mac_addr addr;
  6801. /* Add/Remove NRF Filter */
  6802. A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
  6803. /* client/ap filter */
  6804. A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
  6805. /* optional - tx/rx capture */
  6806. A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
  6807. /* BSSID index - index of the BSSID register */
  6808. A_UINT32 bssid_idx;
  6809. } wmi_vdev_filter_nrp_config_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  6810. /* tx peer filter action - Filter Tx Packets - add/remove filter */
  6811. enum {
  6812. WMI_PEER_TX_FILTER_ACTION_ADD = 1,
  6813. WMI_PEER_TX_FILTER_ACTION_REMOVE = 2,
  6814. WMI_PEER_TX_FILTER_ACTION_ADD_AND_ENABLE_FILTERING = 3,
  6815. WMI_PEER_TX_FILTER_ACTION_REMOVE_AND_CLEAR_FILTERING = 4,
  6816. };
  6817. typedef struct {
  6818. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tx_filter_cmd_fixed_param */
  6819. A_UINT32 vdev_id;
  6820. /* Client MAC addr */
  6821. wmi_mac_addr addr;
  6822. /* Add/Remove monitor_sta Filter */
  6823. A_UINT32 action; /* WMI_PEER_TX_FILTER_ACTION enum */
  6824. } wmi_peer_tx_filter_cmd_fixed_param; /* Filter for TX Packets */
  6825. /* Command to set/unset chip in quiet mode */
  6826. typedef struct {
  6827. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
  6828. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  6829. A_UINT32 period; /*period in TUs*/
  6830. A_UINT32 duration; /*duration in TUs*/
  6831. A_UINT32 next_start; /*offset in TUs*/
  6832. A_UINT32 enabled; /*enable/disable*/
  6833. } wmi_pdev_set_quiet_cmd_fixed_param;
  6834. typedef struct {
  6835. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param */
  6836. A_UINT32 vdev_id; /* Virtual interface ID */
  6837. A_UINT32 period; /* period in TUs */
  6838. A_UINT32 duration; /* duration in TUs */
  6839. A_UINT32 next_start; /* offset in TUs */
  6840. A_UINT32 enabled; /* enable/disable */
  6841. } wmi_vdev_set_quiet_cmd_fixed_param;
  6842. /*
  6843. * START_STOP flag value: 1 - Start, 0 - Stop
  6844. */
  6845. #define WMI_OFFLOAD_QUIET_FLAG_START_STOP 0x00000001
  6846. /*
  6847. * ONE_SHOT flag value: 1 - One shot, 0 - Repeat
  6848. * This flag is only relevant if the START_STOP flag == 1 (start).
  6849. */
  6850. #define WMI_OFFLOAD_QUIET_FLAG_ONE_SHOT 0x00000002
  6851. /*
  6852. * Enable/Disable sending Quiet IE info in SWBA event from the target
  6853. * 0 - Don't include Quiet IE in WMI SWBA Event
  6854. * 1 - Include Quiet IE in WMI SWBA Event
  6855. */
  6856. #define WMI_OFFLOAD_QUIET_FLAG_INFO_IN_SWBA_START_STOP 0x00000004
  6857. typedef struct {
  6858. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_ml_quiet_config_params */
  6859. A_UINT32 vdev_id; /* partner vdev_id */
  6860. A_UINT32 hw_link_id; /* hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
  6861. A_UINT32 beacon_interval; /* beacon interval in TU from received beacon of the partner link */
  6862. A_UINT32 period; /* period in TUs */
  6863. A_UINT32 duration; /* duration in TUs */
  6864. A_UINT32 next_start; /* offset in TUs from beacon */
  6865. A_UINT32 flags; /* STOP or START (and single vs. repeated) Quiet IE
  6866. * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
  6867. */
  6868. } wmi_vdev_bcn_offload_ml_quiet_config_params;
  6869. typedef struct {
  6870. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param */
  6871. A_UINT32 vdev_id; /* Virtual interface ID */
  6872. A_UINT32 period; /* period in TUs */
  6873. A_UINT32 duration; /* duration in TUs */
  6874. A_UINT32 next_start; /* offset in TUs from beacon */
  6875. A_UINT32 flags; /* STOP or START (and single vs. repeated) Quiet IE
  6876. * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
  6877. */
  6878. /*
  6879. * This TLV is optionally followed by array of wmi_vdev_bcn_offload_ml_quiet_config_params struct
  6880. * wmi_vdev_bcn_offload_ml_quiet_config_params will have multiple instances equal to num of links in an AP MLD
  6881. * wmi_vdev_bcn_offload_ml_quiet_config_params ml_quiet_param[];
  6882. */
  6883. } wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param;
  6884. typedef struct {
  6885. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
  6886. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom aggregation size will be applied. */
  6887. /* Size for tx aggregation for the vdev mentioned in vdev id
  6888. * (max MPDUs per A-MPDU or max MSDUs per A-MSDU based on aggr_type field)
  6889. */
  6890. A_UINT32 tx_aggr_size;
  6891. A_UINT32 rx_aggr_size; /* Size for rx aggregation (block ack window size limit) for the vdev mentioned in vdev id */
  6892. /*
  6893. * To set TX aggregation size limits per VDEV per AC
  6894. * bits 1:0 (ac):
  6895. * Access Category (0x0=BE, 0x1=BK, 0x2=VI, 0x3=VO)
  6896. * If tx_ac_enable bit is not set, tx_aggr_size is applied
  6897. * for all Access Categories
  6898. * bit 2 (aggr_type): TX Aggregation Type (0=A-MPDU, 1=A-MSDU)
  6899. * bit 3 (tx_aggr_size_disable): If set tx_aggr_size is invalid
  6900. * bit 4 (rx_aggr_size_disable): If set rx_aggr_size is invalid
  6901. * bit 5 (tx_ac_enable): If set, above ac bitmap is valid.
  6902. * bit 6 (256 BA support enable) If set, Default 256 BA size is expected
  6903. * from host
  6904. * bit 7 (1024 BA support enable) If set, Default 1024 BA size is expected
  6905. * from host
  6906. * bits 31:8: Reserved bits. should be set to zero.
  6907. */
  6908. A_UINT32 enable_bitmap;
  6909. } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
  6910. typedef enum {
  6911. WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU = 0,
  6912. WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU = 1,
  6913. WMI_VDEV_CUSTOM_AGGR_TYPE_MAX,
  6914. } wmi_vdev_custom_aggr_type_t;
  6915. #define WMI_VDEV_CUSTOM_AGGR_AC_BITPOS 0
  6916. #define WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS 2
  6917. #define WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS 2
  6918. #define WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS 1
  6919. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS 3
  6920. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS 1
  6921. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS 4
  6922. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS 1
  6923. #define WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS 5
  6924. #define WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS 1
  6925. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS 6
  6926. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS 1
  6927. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS 7
  6928. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS 1
  6929. #define WMI_VDEV_CUSTOM_AGGR_AC_SET(param, value) \
  6930. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  6931. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS, value)
  6932. #define WMI_VDEV_CUSTOM_AGGR_AC_GET(param) \
  6933. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  6934. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS)
  6935. #define WMI_VDEV_CUSTOM_AGGR_TYPE_SET(param, value) \
  6936. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  6937. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS, value)
  6938. #define WMI_VDEV_CUSTOM_AGGR_TYPE_GET(param) \
  6939. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  6940. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS)
  6941. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_SET(param, value) \
  6942. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  6943. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS, value)
  6944. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_GET(param) \
  6945. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  6946. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS)
  6947. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_SET(param, value) \
  6948. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  6949. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS, value)
  6950. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_GET(param) \
  6951. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  6952. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS)
  6953. #define WMI_VDEV_CUSTOM_TX_AC_EN_SET(param, value) \
  6954. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  6955. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS, value)
  6956. #define WMI_VDEV_CUSTOM_TX_AC_EN_GET(param) \
  6957. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  6958. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS)
  6959. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_SET(param, value) \
  6960. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS, \
  6961. WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS, value)
  6962. #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_GET(param) \
  6963. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS, \
  6964. WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS)
  6965. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_SET(param, value) \
  6966. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS, \
  6967. WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS, value)
  6968. #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_GET(param) \
  6969. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS, \
  6970. WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS)
  6971. typedef enum {
  6972. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_NONAGGR = 0,
  6973. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR = 1,
  6974. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_MAX,
  6975. } wmi_vdev_custom_sw_retry_type_t;
  6976. typedef struct {
  6977. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param */
  6978. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom software retries will be applied. */
  6979. A_UINT32 ac_type; /* access category (VI, VO, BE, BK) enum wmi_traffic_ac */
  6980. A_UINT32 sw_retry_type; /* 0 = non-aggr retry, 1 = aggr retry (wmi_vdev_custom_sw_retry_type_t enum) */
  6981. A_UINT32 sw_retry_th; /* max retry count per AC base on ac_type for the vdev mentioned in vdev id*/
  6982. } wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param;
  6983. typedef struct {
  6984. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_chainmask_config_cmd_fixed_param */
  6985. A_UINT32 tlv_header;
  6986. /* vdev id indicating to which the vdev, this chainmask configuration will be applied. */
  6987. A_UINT32 vdev_id;
  6988. /* number of chains to use for transmissions in 2.4 GHz band
  6989. * If vdev is MLO vdev, below 2g params apply to all 2.4 GHz band links
  6990. * If vdev is MLO vdev, below 5g params apply to all 5/6 GHz band links
  6991. */
  6992. A_UINT32 num_tx_chains_2g;
  6993. /* number of chains to use for reception in 2.4 GHz band */
  6994. A_UINT32 num_rx_chains_2g;
  6995. /* nss to use for transmissions in 2.4 GHz band */
  6996. A_UINT32 tx_nss_2g;
  6997. /* nss to use for reception in 2.4 GHz band */
  6998. A_UINT32 rx_nss_2g;
  6999. /* number of chains to use for 11b transmissions. Valid only in 2.4 GHz */
  7000. A_UINT32 num_tx_chains_b;
  7001. /* number of chains to use for 11g transmissions. Valid only in 2.4 GHz */
  7002. A_UINT32 num_tx_chains_g;
  7003. /* number of chains to use for transmissions in 5 GHz band */
  7004. A_UINT32 num_tx_chains_5g;
  7005. /* number of chains to use for reception in 5 GHz band */
  7006. A_UINT32 num_rx_chains_5g;
  7007. /* nss to use for transmissions in 5 GHz band */
  7008. A_UINT32 tx_nss_5g;
  7009. /* nss to use for reception in 5 GHz band */
  7010. A_UINT32 rx_nss_5g;
  7011. /* number of chains to use for 11a transmissions. Valid only in 5 GHz */
  7012. A_UINT32 num_tx_chains_a;
  7013. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 2.4 GHz */
  7014. A_UINT32 disable_tx_mrc_2g;
  7015. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 2.4 GHz */
  7016. A_UINT32 disable_rx_mrc_2g;
  7017. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 5 GHz */
  7018. A_UINT32 disable_tx_mrc_5g;
  7019. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 5 GHz */
  7020. A_UINT32 disable_rx_mrc_5g;
  7021. /* Whether fast chain selection is needed when TX chain num is 1 */
  7022. A_UINT32 fast_chain_selection;
  7023. /* RSSI delta threshold to determine better chain, units: dB */
  7024. A_UINT32 better_chain_rssi_threshold;
  7025. } wmi_vdev_chainmask_config_cmd_fixed_param;
  7026. /*
  7027. * Command to enable/disable Green AP Power Save.
  7028. * This helps conserve power during AP operation. When the AP has no
  7029. * stations associated with it, the host can enable Green AP Power Save
  7030. * to request the firmware to shut down all but one transmit and receive
  7031. * chains.
  7032. */
  7033. typedef struct {
  7034. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
  7035. /** pdev_id for identifying the MAC
  7036. * See macros starting with WMI_PDEV_ID_ for values.
  7037. */
  7038. A_UINT32 pdev_id;
  7039. A_UINT32 enable; /*1:enable, 0:disable*/
  7040. } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
  7041. #define MAX_HT_IE_LEN 32
  7042. /* DEPRECATED */
  7043. typedef struct {
  7044. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
  7045. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  7046. A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
  7047. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  7048. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  7049. /** The TLV for the HT IE follows:
  7050. * A_UINT32 ie_data[];
  7051. */
  7052. } wmi_pdev_set_ht_ie_cmd_fixed_param;
  7053. #define MAX_VHT_IE_LEN 32
  7054. /* DEPRECATED */
  7055. typedef struct {
  7056. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
  7057. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  7058. A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
  7059. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  7060. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  7061. /** The TLV for the VHT IE follows:
  7062. * A_UINT32 ie_data[];
  7063. */
  7064. } wmi_pdev_set_vht_ie_cmd_fixed_param;
  7065. typedef struct {
  7066. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
  7067. /** pdev_id for identifying the MAC
  7068. * See macros starting with WMI_PDEV_ID_ for values.
  7069. */
  7070. A_UINT32 pdev_id;
  7071. wmi_mac_addr base_macaddr;
  7072. } wmi_pdev_set_base_macaddr_cmd_fixed_param;
  7073. enum wmi_spectral_scan_mode {
  7074. WMI_SPECTRAL_SCAN_NORMAL_MODE,
  7075. WMI_SPECTRAL_SCAN_AGILE_MODE,
  7076. WMI_SPECTRAL_SCAN_MAX_MODE /* keep this last */
  7077. };
  7078. /*
  7079. * For now, the spectral configuration is global rather than
  7080. * per-vdev. The vdev is a placeholder and will be ignored
  7081. * by the firmware.
  7082. */
  7083. typedef struct {
  7084. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
  7085. A_UINT32 vdev_id;
  7086. A_UINT32 spectral_scan_count;
  7087. A_UINT32 spectral_scan_period;
  7088. A_UINT32 spectral_scan_priority;
  7089. A_UINT32 spectral_scan_fft_size;
  7090. A_UINT32 spectral_scan_gc_ena;
  7091. A_UINT32 spectral_scan_restart_ena;
  7092. A_UINT32 spectral_scan_noise_floor_ref;
  7093. A_UINT32 spectral_scan_init_delay;
  7094. A_UINT32 spectral_scan_nb_tone_thr;
  7095. A_UINT32 spectral_scan_str_bin_thr;
  7096. A_UINT32 spectral_scan_wb_rpt_mode;
  7097. A_UINT32 spectral_scan_rssi_rpt_mode;
  7098. A_UINT32 spectral_scan_rssi_thr;
  7099. A_UINT32 spectral_scan_pwr_format;
  7100. A_UINT32 spectral_scan_rpt_mode;
  7101. A_UINT32 spectral_scan_bin_scale;
  7102. A_UINT32 spectral_scan_dBm_adj;
  7103. A_UINT32 spectral_scan_chn_mask;
  7104. /* See enum wmi_spectral_scan_mode */
  7105. A_UINT32 spectral_scan_mode;
  7106. union {
  7107. /**
  7108. * Two center frequencies are required for agile channel switch
  7109. * supporting True 160 and Restricted 160 ((80+80) or 165) MHz.
  7110. * This parameter specifies the center frequency for cases with a
  7111. * contiguous channel, and the center frequency of the primary
  7112. * portion of a non-contiguous (80+80 or 165 MHz) channel.
  7113. */
  7114. A_UINT32 spectral_scan_center_freq;
  7115. A_UINT32 spectral_scan_center_freq1;
  7116. };
  7117. /* agile span primary channel frequency (MHz), 0 for normal scan*/
  7118. A_UINT32 spectral_scan_chan_freq;
  7119. /* agile scan bandwidth (20, 40, 80, 80+80, 160), enum wmi_channel_width */
  7120. A_UINT32 spectral_scan_chan_width;
  7121. /**
  7122. * Adding freq2 to support True 160 and restricted 160 ((80+80) or 165) MHz.
  7123. * agile span center frequency2 (MHz), 0 for normal scan.
  7124. */
  7125. A_UINT32 spectral_scan_center_freq2;
  7126. /**
  7127. * Flag to enable re-capture of FFT sample if the previous sample has
  7128. * AGC gain change bit set.
  7129. * Re-capture will be enabled only if scan period is greater than 50us.
  7130. */
  7131. A_UINT32 recapture_sample_on_gain_change;
  7132. } wmi_vdev_spectral_configure_cmd_fixed_param;
  7133. /*
  7134. * Enabling, disabling and triggering the spectral scan
  7135. * is a per-vdev operation. That is, it will set channel
  7136. * flags per vdev rather than globally; so concurrent scan/run
  7137. * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
  7138. */
  7139. typedef struct {
  7140. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
  7141. A_UINT32 vdev_id;
  7142. /* 0 - ignore; 1 - trigger, 2 - clear trigger */
  7143. A_UINT32 trigger_cmd;
  7144. /* 0 - ignore; 1 - enable, 2 - disable */
  7145. A_UINT32 enable_cmd;
  7146. /* See enum wmi_spectral_scan_mode */
  7147. A_UINT32 spectral_scan_mode;
  7148. } wmi_vdev_spectral_enable_cmd_fixed_param;
  7149. typedef struct {
  7150. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_tx_power_cmd_fixed_param */
  7151. A_UINT32 vdev_id;
  7152. } wmi_vdev_get_tx_power_cmd_fixed_param;
  7153. /* Primary 80 bin values */
  7154. #define WMI_SSCAN_PRI80_START_BIN_GET(pri80_bins) WMI_GET_BITS(pri80_bins, 0, 16)
  7155. #define WMI_SSCAN_PRI80_START_BIN_SET(pri80_bins, value) WMI_SET_BITS(pri80_bins, 0, 16, value)
  7156. #define WMI_SSCAN_PRI80_END_BIN_GET(pri80_bins) WMI_GET_BITS(pri80_bins, 16, 16)
  7157. #define WMI_SSCAN_PRI80_END_BIN_SET(pri80_bins, value) WMI_SET_BITS(pri80_bins, 16, 16, value)
  7158. /* Secondary 80 bin values */
  7159. #define WMI_SSCAN_SEC80_START_BIN_GET(sec80_bins) WMI_GET_BITS(sec80_bins, 0, 16)
  7160. #define WMI_SSCAN_SEC80_START_BIN_SET(sec80_bins, value) WMI_SET_BITS(sec80_bins, 0, 16, value)
  7161. #define WMI_SSCAN_SEC80_END_BIN_GET(sec80_bins) WMI_GET_BITS(sec80_bins, 16, 16)
  7162. #define WMI_SSCAN_SEC80_END_BIN_SET(sec80_bins, value) WMI_SET_BITS(sec80_bins, 16, 16, value)
  7163. /* 5MHz bin values */
  7164. #define WMI_SSCAN_MID_5MHZ_START_BIN_GET(mid_5mhz_bins) WMI_GET_BITS(mid_5mhz_bins, 0, 16)
  7165. #define WMI_SSCAN_MID_5MHZ_START_BIN_SET(mid_5mhz_bins, value) WMI_SET_BITS(mid_5mhz_bins, 0, 16, value)
  7166. #define WMI_SSCAN_MID_5MHZ_END_BIN_GET(mid_5mhz_bins) WMI_GET_BITS(mid_5mhz_bins, 16, 16)
  7167. #define WMI_SSCAN_MID_5MHZ_END_BIN_SET(mid_5mhz_bins, value) WMI_SET_BITS(mid_5mhz_bins, 16, 16, value)
  7168. typedef struct {
  7169. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_fw_cmd_fixed_param */
  7170. A_UINT32 pdev_id;
  7171. /* See enum wmi_spectral_scan_mode */
  7172. A_UINT32 spectral_scan_mode;
  7173. /**
  7174. * This fixed_param TLV is followed by the below TLVs:
  7175. *
  7176. * wmi_pdev_sscan_fft_bin_index fft_bin_index[]; // array len = 0 or 1
  7177. * If present (array length is 1) this TLV specifies the primary
  7178. * and secondary channels FFT bin indices for True 160 and
  7179. * Restricted 160 (80+80 or 165) MHz BW cases.
  7180. */
  7181. } wmi_pdev_sscan_fw_cmd_fixed_param;
  7182. /**
  7183. * The below structure is used only to send the FFT bin numbers for
  7184. * True 160 and Restricted 160(80+80 or 165) MHz from FW to HOST
  7185. */
  7186. typedef struct {
  7187. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_fft_bin_index */
  7188. /**
  7189. * Bit 15 - 0 : primary 80 start bin number
  7190. * Bit 31 - 16 : primary 80 end bin number
  7191. * Refer to WMI_SSCAN_PRI80_[START,END]_BIN_[GET,SET] macros.
  7192. * Only for True 160 and Restricted 160(80+80 or 165) MHz this
  7193. * will be filled.
  7194. */
  7195. A_UINT32 pri80_bins;
  7196. /**
  7197. * Bit 15 - 0 : secondary 80 start bin number
  7198. * Bit 31 - 16 : secondary 80 end bin number
  7199. * Refer to WMI_SSCAN_SEC80_[START,END]_BIN_[GET,SET] macros.
  7200. * Only for True 160 and Restricted 160(80+80 or 165) MHz this
  7201. * will be filled.
  7202. */
  7203. A_UINT32 sec80_bins;
  7204. /**
  7205. * Bit 15 - 0 : 5Mhz start bin number
  7206. * Bit 31 - 16 : 5Mhz end bin number
  7207. * Refer to WMI_SSCAN_MID_5MHZ_[START,END]_BIN_[GET,SET] macros.
  7208. * Only for Restricted 160(80+80 or 165), otherwise 0.
  7209. */
  7210. A_UINT32 mid_5mhz_bins;
  7211. } wmi_pdev_sscan_fft_bin_index;
  7212. #define WMI_SPECTRAL_CHAN_PUNCTURE_BMAP_GET(puncture_bmap) WMI_GET_BITS(puncture_bmap, 0, 16)
  7213. #define WMI_SPECTRAL_CHAN_PUNCTURE_BMAP_SET(puncture_bmap, value) WMI_SET_BITS(puncture_bmap, 0 , 16, value)
  7214. typedef struct {
  7215. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_chan_info */
  7216. /*
  7217. * For contiguous channels, cfreq1 should be represent the center of the entire span and
  7218. * cfreq2 should be 0 whereas for non-contiguous channels, cfreq1 should represent the
  7219. * center of primary segment whereas cfreq2 should represent the center of secondary segment
  7220. */
  7221. /* Information corresponding to operating channel */
  7222. A_UINT32 operating_pri20_freq; /* In MHz */
  7223. A_UINT32 operating_cfreq1; /* In MHz */
  7224. A_UINT32 operating_cfreq2; /* In MHz */
  7225. A_UINT32 operating_bw; /* as per enum wmi_channel_width */
  7226. /*
  7227. * bits [15:0] are used to represent puncture modes where each bit indicates
  7228. * whether that 20MHz channel is punctured.
  7229. * bits [31:16] are reserved.
  7230. */
  7231. A_UINT32 operating_puncture_20mhz_bitmap;
  7232. /* Information corresponding to channel in which spectral scan is done */
  7233. A_UINT32 sscan_cfreq1; /* In MHz */
  7234. A_UINT32 sscan_cfreq2; /* In MHz */
  7235. A_UINT32 sscan_bw; /* as per enum wmi_channel_width */
  7236. /*
  7237. * bits [15:0] are used to represent puncture modes where each bit indicates
  7238. * whether that 20MHz channel is punctured.
  7239. * bits [31:16] are reserved.
  7240. */
  7241. A_UINT32 sscan_puncture_20mhz_bitmap;
  7242. } wmi_pdev_sscan_chan_info;
  7243. typedef struct
  7244. {
  7245. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_per_detector_info */
  7246. A_UINT32 detector_id; /** ID of the detector involved in the spectral scan */
  7247. /*
  7248. * Start/End frequency (in MHz) to indicate the frequency range to which the detector is listening
  7249. */
  7250. A_UINT32 start_freq; /* in MHz */
  7251. A_UINT32 end_freq; /* in MHz */
  7252. } wmi_pdev_sscan_per_detector_info;
  7253. typedef enum {
  7254. /** Enum to indicate bmsk of spectral scan stop evt on scan count max out */
  7255. WMI_SSCAN_EVT_BMSK_SCAN_STOP_SCOUNT = 0X00000001,
  7256. /** Add more event code bmsks above this */
  7257. WMI_SSCAN_EVT_BMSK_MAX = 0Xffffffff,
  7258. } wmi_sscan_evt_message_code;
  7259. /**
  7260. * The below structure is used to send the start/stop triggers
  7261. * for events related to spectral scan activity from
  7262. * FW to host
  7263. */
  7264. typedef struct {
  7265. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sscan_evt_message_fixed_param */
  7266. A_UINT32 pdev_id;
  7267. /** Refer Enum wmi_sscan_evt_message_code */
  7268. A_UINT32 sscan_evt_code;
  7269. } wmi_sscan_evt_message_fixed_param;
  7270. #define WMI_BEACON_CTRL_TX_DISABLE 0
  7271. #define WMI_BEACON_CTRL_TX_ENABLE 1
  7272. #define WMI_BEACON_CTRL_SWBA_EVENT_DISABLE 2
  7273. #define WMI_BEACON_CTRL_SWBA_EVENT_ENABLE 3
  7274. typedef struct {
  7275. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_offload_ctrl_cmd_fixed_param */
  7276. /** unique id identifying the VDEV, generated by the caller */
  7277. A_UINT32 vdev_id;
  7278. A_UINT32 bcn_ctrl_op; /* fw default 1 (see WMI_BEACON_CTRL defs) */
  7279. } wmi_bcn_offload_ctrl_cmd_fixed_param;
  7280. /** common structure used for wmi_vedv_get_tx_power_event */
  7281. typedef struct {
  7282. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tx_power_event_fixed_param */
  7283. A_UINT32 tx_power; /** units: 0.5 dBm, per-chain tx power */
  7284. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  7285. } wmi_vdev_get_tx_power_event_fixed_param;
  7286. typedef enum {
  7287. /** Limit the offchannel duration */
  7288. WMI_VDEV_LIMIT_OFFCHAN_ENABLE = 0x1,
  7289. /** Skip DFS channels from Scan channel list.
  7290. * valid for both host scans and FW scans */
  7291. WMI_VDEV_LIMIT_OFFCHAN_SKIP_DFS = 0x2,
  7292. } wmi_vdev_limit_offchan_flags;
  7293. typedef struct {
  7294. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_limit_offchan_cmd_fixed_param */
  7295. /** Limit the duration of offchannel events requested by the vdev corresponding to the specified vdev_id */
  7296. A_UINT32 vdev_id;
  7297. /** see enum wmi_vdev_limit_offchan_flags */
  7298. A_UINT32 flags;
  7299. /** max offchannel time allowed in msec when WMI_VDEV_LIMIT_OFFCHAN_ENABLE flag is set */
  7300. A_UINT32 max_offchan_time;
  7301. /** rest time in msec on the BSS channel */
  7302. A_UINT32 rest_time;
  7303. } wmi_vdev_limit_offchan_cmd_fixed_param;
  7304. #define WMI_CSA_EVENT_QSBW_ISE_ID_MASK 0x000000FF /* information sub element id for QSBW, expected value is 0x02 */
  7305. #define WMI_CSA_EVENT_QSBW_ISE_LEN_MASK 0x0000FF00 /* length of QSBW ISE data, expected value is 0x02 */
  7306. #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) */
  7307. #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) */
  7308. #define WMI_CSA_EVENT_QSBW_ISE_ID 0x02
  7309. #define WMI_CSA_EVENT_QSBW_ISE_LEN 0x02
  7310. #define WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK 0x01
  7311. #define WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK 0x02
  7312. #define WMI_CSA_EVENT_QSBW_ISE_CAP_5M(qsbw_ise) \
  7313. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  7314. #define WMI_CSA_EVENT_QSBW_ISE_CAP_10M(qsbw_ise) \
  7315. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  7316. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_5M(qsbw_ise) \
  7317. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  7318. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \
  7319. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  7320. typedef enum {
  7321. WMI_CSA_IE_PRESENT = 0x00000001,
  7322. WMI_XCSA_IE_PRESENT = 0x00000002,
  7323. WMI_WBW_IE_PRESENT = 0x00000004,
  7324. WMI_CSWRAP_IE_PRESENT = 0x00000008,
  7325. WMI_CSWARP_IE_PRESENT = WMI_CSWRAP_IE_PRESENT, /* deprecated: typo */
  7326. WMI_QSBW_ISE_PRESENT = 0x00000010,
  7327. WMI_CSWRAP_IE_EXTENDED_PRESENT = 0x00000020, /* Added bitmask to verify if the additional information is filled in */
  7328. WMI_CSWRAP_IE_EXT_VER_2_PRESENT = 0x00000040 /* Added bitmask to see if additional info is present in CS wrap IE */
  7329. } WMI_CSA_EVENT_IES_PRESENT_FLAG;
  7330. /* wmi CSA receive event from beacon frame */
  7331. typedef struct {
  7332. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
  7333. A_UINT32 i_fc_dur; /* Bit 0-15: FC, Bit 16-31: DUR */
  7334. wmi_mac_addr i_addr1;
  7335. wmi_mac_addr i_addr2;
  7336. /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
  7337. * changed in the future without breaking WMI compatibility */
  7338. A_UINT32 csa_ie[2];
  7339. A_UINT32 xcsa_ie[2];
  7340. A_UINT32 wb_ie[2];
  7341. union {
  7342. A_UINT32 cswrap_ie; /* use this */
  7343. A_UINT32 cswarp_ie; /* deprecated (typo) */
  7344. };
  7345. A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
  7346. A_UINT32 qsbw_ise;
  7347. /* cswrap_ie_extended:
  7348. * Stores full IEEE80211_ELEMID_CHAN_SWITCH_WRAP information element.
  7349. * The first two octets host the Element ID and Length fields.
  7350. * The IE comprises New Country Subelement (optional and max length 6),
  7351. * Wide Bandwidth Channel Subelement (optional and max length 5) and
  7352. * New Transmit Power Envelope subelement (optional and max length 7)
  7353. * The 4-byte words within cswrap_ie_extended[] use little endian ordering;
  7354. * the first octect of the IE resides in bits 7:0 of cswrap_ie_extended[0],
  7355. * the second octet resides in bits 15:8 of cswrap_ie_extended[0] and so on.
  7356. */
  7357. A_UINT32 cswrap_ie_extended[5];
  7358. /* num_bytes_valid_in_cswrap_ie_ext_ver2:
  7359. * This fixed_param TLV can be followed by a VAR length TLV
  7360. * variable-length byte-array TLV for CS WRAP IE.
  7361. * Since the variable-length byte-array TLVs are always padded, if needed,
  7362. * to contain a multiple of 4 bytes, this field shows how many of the bytes
  7363. * contain valid data, versus how many are only for alignment padding.
  7364. */
  7365. A_UINT32 num_bytes_valid_in_cswrap_ie_ext_ver2;
  7366. /*
  7367. * Add link id, mld address and link address
  7368. * fields for N link CSA support
  7369. */
  7370. A_UINT32 link_id; /* Link id associated with AP */
  7371. wmi_mac_addr mld_mac_address; /* AP mld mac address */
  7372. wmi_mac_addr link_mac_address; /* AP link mac address */
  7373. A_UINT32 mld_mac_address_present :1,
  7374. link_mac_address_present :1,
  7375. link_id_present :1,
  7376. reserved :29;
  7377. /*
  7378. * This initial fixed_param TLV may be followed by the below TLVs:
  7379. * - cs_wrap_ie variable-length byte-array TLV
  7380. */
  7381. } wmi_csa_event_fixed_param;
  7382. #define WMI_GET_MLD_MAC_ADDRESS_PRESENT(mld_mac_address_present) \
  7383. WMI_GET_BITS(mld_mac_address_present, 0, 1)
  7384. #define WMI_SET_MLD_MAC_ADDRESS_PRESENT(mld_mac_address_present, value) \
  7385. WMI_SET_BITS(mld_mac_address_present, 0, 1, value)
  7386. #define WMI_GET_LINK_ADDRESS_PRESENT(link_mac_address_present) \
  7387. WMI_GET_BITS(link_mac_address_present, 1, 1)
  7388. #define WMI_SET_LINK_ADDRESS_PRESENT(link_mac_address_present, value) \
  7389. WMI_SET_BITS(link_mac_address_present, 1, 1, value)
  7390. #define WMI_GET_LINK_ID_PRESENT(link_id_present) \
  7391. WMI_GET_BITS(link_id_present, 2, 1)
  7392. #define WMI_SET_LINK_ID_PRESENT(link_id_present, value) \
  7393. WMI_SET_BITS(link_id_present, 2, 1, value)
  7394. typedef enum {
  7395. WMI_QUIET_EVENT_START = 0,
  7396. WMI_QUIET_EVENT_STOP = 1,
  7397. } WMI_QUIET_EVENT_FLAG;
  7398. /* WMI Quiet receive event from beacon frame */
  7399. typedef struct {
  7400. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_event_fixed_param */
  7401. wmi_mac_addr mld_mac_address; /* AP mld mac address */
  7402. wmi_mac_addr link_mac_address; /* AP link mac address */
  7403. A_UINT32 linkid; /* Link id associated with AP */
  7404. A_UINT32 mld_mac_address_present :1,
  7405. link_mac_address_present :1,
  7406. linkid_present :1,
  7407. reserved :29;
  7408. A_UINT32 quiet_status; /* WMI_QUIET_EVENT_FLAG: quiet start or stop */
  7409. } wmi_quiet_event_fixed_param;
  7410. typedef enum {
  7411. WAL_PEER_MCAST2UCAST_DISABLED = 0,
  7412. WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1, /* Drop the frames if match is not found */
  7413. WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, /* Send as mcast if match is not found */
  7414. } WMI_PEER_MCAST2UCAST_MODE;
  7415. typedef enum {
  7416. PKT_PWR_SAVE_NAP_ENABLE = 0x00000001,
  7417. PKT_PWR_SAVE_LS_ENABLE = 0x00000002,
  7418. PKT_PWR_SAVE_DS_ENABLE = 0x00000004,
  7419. PKT_PWR_SAVE_BTCOEX_ENABLE = 0x00000008,
  7420. PKT_PWR_SAVE_FSM_ENABLE = 0x80000000,
  7421. } WMI_PDEV_PKT_PWR_SAVE_LEVEL;
  7422. /** MACROs to get user setting for enabling/disabling Secondary Rate Feature set
  7423. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  7424. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  7425. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  7426. * Bit 3-5 : "Xretry threshold" to use
  7427. * Bit 6~31 : reserved for future use.
  7428. */
  7429. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT_S 0
  7430. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT 0x00000001
  7431. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT_S 1
  7432. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT 0x00000002
  7433. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION_S 2
  7434. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION 0x00000004
  7435. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD_S 3
  7436. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD 0x00000038
  7437. #define WMI_PDEV_PARAM_IS_SECONDARY_RATE_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT)
  7438. #define WMI_PDEV_PARAM_IS_RTS_BL_WL_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT)
  7439. #define WMI_PDEV_PARAM_IS_HIGHER_MCS_XRETRY_RESTRICTION_SET(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION)
  7440. #define WMI_PDEV_PARAM_GET_XRETRY_THRESHOLD(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_XRETRY_THRESHOLD)
  7441. /*
  7442. * The WMI_SCHED_MODE_FLAGS enum is used by the following WMI commands:
  7443. *
  7444. * WMI_VDEV_PARAM_SET_DISABLED_SCHED_MODES
  7445. * WMI_PDEV_PARAM_SET_DISABLED_SCHED_MODES
  7446. * WMI_PEER_SCHED_MODE_DISABLE_CMDID
  7447. * WMI_SAWF_SVC_CLASS_CFG_CMDID
  7448. */
  7449. typedef enum {
  7450. WMI_SCHED_MODE_DL_MU_MIMO = 0x00000001,
  7451. WMI_SCHED_MODE_UL_MU_MIMO = 0x00000002,
  7452. WMI_SCHED_MODE_DL_OFDMA = 0x00000004,
  7453. WMI_SCHED_MODE_UL_OFDMA = 0x00000008,
  7454. } WMI_SCHED_MODE_FLAGS;
  7455. typedef enum {
  7456. /** TX chain mask */
  7457. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  7458. /** RX chain mask */
  7459. WMI_PDEV_PARAM_RX_CHAIN_MASK, /* 0x2 */
  7460. /** TX power limit for 2G Radio */
  7461. WMI_PDEV_PARAM_TXPOWER_LIMIT2G, /* 0x3 */
  7462. /** TX power limit for 5G Radio */
  7463. WMI_PDEV_PARAM_TXPOWER_LIMIT5G, /* 0x4 */
  7464. /** TX power scale */
  7465. WMI_PDEV_PARAM_TXPOWER_SCALE, /* 0x5 */
  7466. /** Beacon generation mode . 0: host, 1: target */
  7467. WMI_PDEV_PARAM_BEACON_GEN_MODE, /* 0x6 */
  7468. /** Beacon generation mode . 0: staggered 1: bursted */
  7469. WMI_PDEV_PARAM_BEACON_TX_MODE, /* 0x7 */
  7470. /** Resource manager off chan mode .
  7471. * 0: turn off off chan mode. 1: turn on offchan mode
  7472. */
  7473. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, /* 0x8 */
  7474. /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
  7475. WMI_PDEV_PARAM_PROTECTION_MODE, /* 0x9 */
  7476. /** Dynamic bandwidth 0: disable 1: enable */
  7477. WMI_PDEV_PARAM_DYNAMIC_BW, /* 0xa */
  7478. /** Non aggregrate/ 11g sw retry threshold.0-disable */
  7479. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0xb */
  7480. /** aggregrate sw retry threshold. 0-disable*/
  7481. WMI_PDEV_PARAM_AGG_SW_RETRY_TH, /* 0xc */
  7482. /** Station kickout threshold (non of consecutive failures).0-disable */
  7483. WMI_PDEV_PARAM_STA_KICKOUT_TH, /* 0xd */
  7484. /** Aggerate size scaling configuration per AC */
  7485. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, /* 0xe */
  7486. /** LTR enable */
  7487. WMI_PDEV_PARAM_LTR_ENABLE, /* 0xf */
  7488. /** LTR latency for BE, in us */
  7489. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, /* 0x10 */
  7490. /** LTR latency for BK, in us */
  7491. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, /* 0x11 */
  7492. /** LTR latency for VI, in us */
  7493. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, /* 0x12 */
  7494. /** LTR latency for VO, in us */
  7495. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, /* 0x13 */
  7496. /** LTR AC latency timeout, in ms */
  7497. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, /* 0x14 */
  7498. /** LTR platform latency override, in us */
  7499. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, /* 0x15 */
  7500. /** LTR-M override, in us */
  7501. WMI_PDEV_PARAM_LTR_RX_OVERRIDE, /* 0x16 */
  7502. /** Tx activity timeout for LTR, in us */
  7503. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, /* 0x17 */
  7504. /** L1SS state machine enable */
  7505. WMI_PDEV_PARAM_L1SS_ENABLE, /* 0x18 */
  7506. /** Deep sleep state machine enable */
  7507. WMI_PDEV_PARAM_DSLEEP_ENABLE, /* 0x19 */
  7508. /** RX buffering flush enable */
  7509. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, /* 0x1a */
  7510. /** RX buffering matermark */
  7511. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, /* 0x1b */
  7512. /** RX buffering timeout enable */
  7513. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, /* 0x1c */
  7514. /** RX buffering timeout value */
  7515. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, /* 0x1d */
  7516. /** pdev level stats update period in ms */
  7517. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, /* 0x1e */
  7518. /** vdev level stats update period in ms */
  7519. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, /* 0x1f */
  7520. /** peer level stats update period in ms */
  7521. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, /* 0x20 */
  7522. /** beacon filter status update period */
  7523. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, /* 0x21 */
  7524. /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  7525. WMI_PDEV_PARAM_PMF_QOS, /* 0x22 */
  7526. /** Access category on which ARP frames are sent */
  7527. WMI_PDEV_PARAM_ARP_AC_OVERRIDE, /* 0x23 */
  7528. /** DCS configuration */
  7529. WMI_PDEV_PARAM_DCS, /* 0x24 */
  7530. /** Enable/Disable ANI on target */
  7531. WMI_PDEV_PARAM_ANI_ENABLE, /* 0x25 */
  7532. /** configure the ANI polling period */
  7533. WMI_PDEV_PARAM_ANI_POLL_PERIOD, /* 0x26 */
  7534. /** configure the ANI listening period */
  7535. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, /* 0x27 */
  7536. /** configure OFDM immunity level */
  7537. WMI_PDEV_PARAM_ANI_OFDM_LEVEL, /* 0x28 */
  7538. /** configure CCK immunity level */
  7539. WMI_PDEV_PARAM_ANI_CCK_LEVEL, /* 0x29 */
  7540. /** Enable/Disable CDD for 1x1 STAs in rate control module */
  7541. WMI_PDEV_PARAM_DYNTXCHAIN, /* 0x2a */
  7542. /** Enable/Disable proxy STA */
  7543. WMI_PDEV_PARAM_PROXY_STA, /* 0x2b */
  7544. /** Enable/Disable low power state when all VDEVs are inactive/idle. */
  7545. WMI_PDEV_PARAM_IDLE_PS_CONFIG, /* 0x2c */
  7546. /** Enable/Disable power gating sleep */
  7547. WMI_PDEV_PARAM_POWER_GATING_SLEEP, /* 0x2d */
  7548. /** Enable/Disable Rfkill */
  7549. WMI_PDEV_PARAM_RFKILL_ENABLE, /* 0x2e */
  7550. /** Set Bursting DUR */
  7551. WMI_PDEV_PARAM_BURST_DUR, /* 0x2f */
  7552. /** Set Bursting ENABLE */
  7553. WMI_PDEV_PARAM_BURST_ENABLE, /* 0x30 */
  7554. /** HW rfkill config */
  7555. WMI_PDEV_PARAM_HW_RFKILL_CONFIG, /* 0x31 */
  7556. /** Enable radio low power features */
  7557. WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE, /* 0x32 */
  7558. /** L1SS entry and residency time track */
  7559. WMI_PDEV_PARAM_L1SS_TRACK, /* 0x33 */
  7560. /** set hyst at runtime, requirement from SS */
  7561. WMI_PDEV_PARAM_HYST_EN, /* 0x34 */
  7562. /** Enable/ Disable POWER COLLAPSE */
  7563. WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE, /* 0x35 */
  7564. /** configure LED system state */
  7565. WMI_PDEV_PARAM_LED_SYS_STATE, /* 0x36 */
  7566. /** Enable/Disable LED */
  7567. WMI_PDEV_PARAM_LED_ENABLE, /* 0x37 */
  7568. /** set DIRECT AUDIO time latency */
  7569. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */ /* 0x38 */
  7570. /** set DIRECT AUDIO Feature ENABLE */
  7571. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */ /* 0x39 */
  7572. /** pdev level whal mib stats update enable */
  7573. WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE, /* 0x3a */
  7574. /** ht/vht info based on vdev */
  7575. WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD, /* 0x3b */
  7576. /** Set CTS channel BW for dynamic BW adjustment feature */
  7577. WMI_PDEV_PARAM_CTS_CBW, /* 0x3c */
  7578. /** Set GPIO pin info used by WNTS */
  7579. WMI_PDEV_PARAM_WNTS_CONFIG, /* 0x3d */
  7580. /** Enable/Disable hardware adaptive early rx feature */
  7581. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE, /* 0x3e */
  7582. /** The minimum early rx duration, to ensure early rx duration is non-zero */
  7583. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP, /* 0x3f */
  7584. /** Increasing/decreasing step used by hardware */
  7585. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP, /* 0x40 */
  7586. /** The fixed early rx duration when adaptive early rx is disabled */
  7587. WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP, /* 0x41 */
  7588. /** Enable/Disable bmiss based adaptive beacon timeout feature */
  7589. WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE, /* 0x42 */
  7590. /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
  7591. WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT, /* 0x43 */
  7592. /** Increasing/decreasing step used by hardware */
  7593. WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP, /* 0x44 */
  7594. /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
  7595. WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT, /* 0x45 */
  7596. /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
  7597. WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE, /* 0x46 */
  7598. /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
  7599. WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE, /* 0x47 */
  7600. /** 2G TX chain mask */
  7601. WMI_PDEV_PARAM_TX_CHAIN_MASK_2G, /* 0x48 */
  7602. /** 2G RX chain mask */
  7603. WMI_PDEV_PARAM_RX_CHAIN_MASK_2G, /* 0x49 */
  7604. /** 5G TX chain mask */
  7605. WMI_PDEV_PARAM_TX_CHAIN_MASK_5G, /* 0x4a */
  7606. /** 5G RX chain mask */
  7607. WMI_PDEV_PARAM_RX_CHAIN_MASK_5G, /* 0x4b */
  7608. /* Set tx chain mask for CCK rates */
  7609. WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK, /* 0x4c */
  7610. /* Set tx chain mask for 1SS stream */
  7611. WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS, /* 0x4d */
  7612. /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected */
  7613. WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG, /* 0x4e */
  7614. /** TX power backoff in dB: tx power -= param value
  7615. * Host passes values(DB) to Halphy, Halphy reduces the power table by
  7616. * the values. Safety check will happen in Halphy
  7617. */
  7618. WMI_PDEV_PARAM_TXPOWER_DECR_DB, /* 0x4f */
  7619. /** enable and disable aggregate burst along with duration */
  7620. WMI_PDEV_PARAM_AGGR_BURST, /* 0x50 */
  7621. /** Set the global RX decap mode */
  7622. WMI_PDEV_PARAM_RX_DECAP_MODE, /* 0x51 */
  7623. /** Enable/Disable Fast channel reset */
  7624. WMI_PDEV_PARAM_FAST_CHANNEL_RESET, /* 0x52 */
  7625. /** Default antenna for Smart antenna */
  7626. WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, /* 0x53 */
  7627. /** Set the user-specified antenna gain */
  7628. WMI_PDEV_PARAM_ANTENNA_GAIN, /* 0x54 */
  7629. /** Set the user-specified RX filter */
  7630. WMI_PDEV_PARAM_RX_FILTER, /* 0x55 */
  7631. /** configure the user-specified MCAST tid for managed mcast feature
  7632. * 0-15 is the valid range. 0xff will clear the tid setting */
  7633. WMI_PDEV_SET_MCAST_TO_UCAST_TID, /* 0x56 */
  7634. /** Enable/Disable Proxy sta mode */
  7635. WMI_PDEV_PARAM_PROXY_STA_MODE, /* 0x57 */
  7636. /** configure the mcast2ucast mode for the pdev->peer_mcast.
  7637. * See WMI_PEER_MCAST2UCAST_MODE for possible values */
  7638. WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE, /* 0x58 */
  7639. /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
  7640. WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, /* 0x59 */
  7641. /** Remove the Mcast buffers added by host */
  7642. WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, /* 0x5a */
  7643. /** En/disable station power save state indication */
  7644. WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE, /* 0x5b */
  7645. /** Access category on which ARP frames are sent */
  7646. WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE, /* 0x5c */
  7647. /** allow or disallow interbss frame forwarding */
  7648. WMI_PDEV_PARAM_BLOCK_INTERBSS, /* 0x5d */
  7649. /** Enable/Disable reset */
  7650. WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID, /* 0x5e */
  7651. /** Enable/Disable/Set MSDU_TTL in milliseconds. */
  7652. WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID, /* 0x5f */
  7653. /** Set global PPDU duration limit (usec). */
  7654. WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID, /* 0x60 */
  7655. /** set txbf sounding period of vap in milliseconds */
  7656. WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID, /* 0x61 */
  7657. /** Set promiscuous mode */
  7658. WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID, /* 0x62 */
  7659. /** Set burst mode */
  7660. WMI_PDEV_PARAM_SET_BURST_MODE_CMDID, /* 0x63 */
  7661. /** enable enhanced stats */
  7662. WMI_PDEV_PARAM_EN_STATS, /* 0x64 */
  7663. /** Set mu-grouping policy */
  7664. WMI_PDEV_PARAM_MU_GROUP_POLICY, /* 0x65 */
  7665. /** Channel Hopping Enable */
  7666. WMI_PDEV_PARAM_NOISE_DETECTION, /* 0x66 */
  7667. /** Set Channel Hopping NF threshold in dBm */
  7668. WMI_PDEV_PARAM_NOISE_THRESHOLD, /* 0x67 */
  7669. /** Set PAPRD policy */
  7670. WMI_PDEV_PARAM_DPD_ENABLE, /* 0x68 */
  7671. /** Enable/disable mcast/bcast echo, used by ProxySTA */
  7672. WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO, /* 0x69 */
  7673. /** ATF enable/disable strict schedule */
  7674. WMI_PDEV_PARAM_ATF_STRICT_SCH, /* 0x6a */
  7675. /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
  7676. WMI_PDEV_PARAM_ATF_SCHED_DURATION, /* 0x6b */
  7677. /** Default antenna polarization */
  7678. WMI_PDEV_PARAM_ANT_PLZN, /* 0x6c */
  7679. /** Set mgmt retry limit */
  7680. WMI_PDEV_PARAM_MGMT_RETRY_LIMIT, /* 0x6d */
  7681. /** Set CCA sensitivity level in dBm */
  7682. WMI_PDEV_PARAM_SENSITIVITY_LEVEL, /* 0x6e */
  7683. /** Set 2G positive and negative Tx power in 0.5dBm units */
  7684. WMI_PDEV_PARAM_SIGNED_TXPOWER_2G, /* 0x6f */
  7685. /** Set 5G positive and negative Tx power in 0.5dBm
  7686. * units */
  7687. WMI_PDEV_PARAM_SIGNED_TXPOWER_5G, /* 0x70 */
  7688. /** Enable/disable AMSDU for tids */
  7689. WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU, /* 0x71 */
  7690. /** Enable/disable AMPDU for tids */
  7691. WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU, /* 0x72 */
  7692. /** Set CCA threshold in dBm */
  7693. WMI_PDEV_PARAM_CCA_THRESHOLD, /* 0x73 */
  7694. /** RTS Fixed rate setting */
  7695. WMI_PDEV_PARAM_RTS_FIXED_RATE, /* 0x74 */
  7696. /** Pdev reset */
  7697. WMI_PDEV_PARAM_PDEV_RESET, /* 0x75 */
  7698. /** wapi mbssid offset **/
  7699. WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET, /* 0x76 */
  7700. /** ARP DEBUG source address*/
  7701. WMI_PDEV_PARAM_ARP_DBG_SRCADDR, /* 0x77 */
  7702. /** ARP DEBUG destination address*/
  7703. WMI_PDEV_PARAM_ARP_DBG_DSTADDR, /* 0x78 */
  7704. /** ATF enable/disable obss noise scheduling */
  7705. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH, /* 0x79 */
  7706. /** ATF obss noise scaling factor */
  7707. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR, /* 0x7a */
  7708. /**
  7709. * TX power reduction scaling exponent - final tx power is the
  7710. * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
  7711. * 2^(scale exponent). For example:
  7712. * If this scale exponent is 0, the power is unchanged (divided by 2^0)
  7713. * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
  7714. * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
  7715. * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
  7716. */
  7717. WMI_PDEV_PARAM_CUST_TXPOWER_SCALE, /* 0x7b */
  7718. /** ATF enabe/disable dynamically */
  7719. WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE, /* 0x7c */
  7720. /** Set tx retry limit for control frames. 0 = disable, 31 = max */
  7721. WMI_PDEV_PARAM_CTRL_RETRY_LIMIT, /* 0x7d */
  7722. /** Set propagation delay for 2G / 5G band.
  7723. * The propagation delay is fundamentally a per-peer property, but
  7724. * the target may not support per-peer settings for ack timeouts.
  7725. * This pdev parameter allows the MAC-level ack timeout to be set to
  7726. * a value suitable for the worst-case propagation delay of any peer
  7727. * within that pdev.
  7728. * Units are microseconds.
  7729. */
  7730. WMI_PDEV_PARAM_PROPAGATION_DELAY, /* 0x7e */
  7731. /**
  7732. * Host can enable/disable ANT DIV feature
  7733. * if it's been enabled in BDF
  7734. */
  7735. WMI_PDEV_PARAM_ENA_ANT_DIV, /* 0x7f */
  7736. /** Host can force one chain to select a specific ANT */
  7737. WMI_PDEV_PARAM_FORCE_CHAIN_ANT, /* 0x80 */
  7738. /**
  7739. * Start a cycle ANT self test periodically.
  7740. * In the test, the FW would select each ANT pair
  7741. * one by one, the cycle time could be configured
  7742. * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
  7743. */
  7744. WMI_PDEV_PARAM_ANT_DIV_SELFTEST, /* 0x81 */
  7745. /**
  7746. * Configure the cycle time of ANT self test,
  7747. * the unit is micro second. Per the timer
  7748. * limitation, too small value could be not so
  7749. * accurate.
  7750. */
  7751. WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL, /* 0x82 */
  7752. /**
  7753. * wlan stats observation period, the unit is millisecond.
  7754. * The value of 0 is used to turn off periodic stats report.
  7755. */
  7756. WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD, /* 0x83 */
  7757. /**
  7758. * Set tx_ppdu_delay[] bin size to specify how many
  7759. * milliseconds each bin of the wmi_tx_stats.tx_ppdu_delay[]
  7760. * histogram represents.
  7761. */
  7762. WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS, /* 0x84 */
  7763. /** set wmi_tx_stats.tx_ppdu_delay[] array length */
  7764. WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN, /* 0x85 */
  7765. /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
  7766. WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN, /* 0x86 */
  7767. /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
  7768. WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN, /* 0x87 */
  7769. /** Set TX delay value in TX sch module, unit is microseconds */
  7770. WMI_PDEV_PARAM_TX_SCH_DELAY, /* 0x88 */
  7771. /** Set RTS enable for SIFS bursting */
  7772. WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING, /* 0x89 */
  7773. /** Set Maximum number of MPDUs in an AMPDU*/
  7774. WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU, /* 0x8a */
  7775. /** Enable/disable peer stats info mechanism
  7776. * A zero value disables; a non-zero value enables.
  7777. */
  7778. WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE, /* 0x8b */
  7779. /** Configure Fast PWR Transition mode
  7780. * 0x0 -> inidcates Fast PWR transition disabled
  7781. * 0x1 -> indicates Static mode enabled
  7782. * 0x2 -> indicates Dynamic mode enabled
  7783. */
  7784. WMI_PDEV_PARAM_FAST_PWR_TRANSITION, /* 0x8c */
  7785. /** Enable/disable radio channel stats mechanism
  7786. * A zero value disables; a non-zero value enables.
  7787. */
  7788. WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE, /* 0x8d */
  7789. /** Enable/disable radio diagnosis feature
  7790. * which allows retrieving the status of radio.
  7791. * A zero value disables; a non-zero value enables.
  7792. */
  7793. WMI_PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE, /* 0x8e */
  7794. /** Enable/Disable mesh mcast traffic
  7795. * 1 - Allow mesh mcast traffic
  7796. * 0 - Disallow mesh mcast traffic
  7797. */
  7798. WMI_PDEV_PARAM_MESH_MCAST_ENABLE, /* 0x8f */
  7799. /** Enable/Disable smart chainmask scheme
  7800. * 1 - Enable smart chainmask scheme
  7801. * 0 - Disable smart chainmask scheme
  7802. */
  7803. WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME, /* 0x90 */
  7804. /** Enable/Disable alternate chainmask scheme
  7805. * 1 - Enable alternate chainmask scheme
  7806. * 0 - Disable alternate chainmask scheme
  7807. */
  7808. WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME, /* 0x91 */
  7809. /** User configured parameters for antenna diversity algorithm
  7810. * BIT[25..13]: Probe period (milliseconds units)
  7811. * BIT[12..0]: Stay period (milliseconds units)
  7812. */
  7813. WMI_PDEV_PARAM_ANT_DIV_USRCFG, /* 0x92 */
  7814. /** pdev packet power save levels,
  7815. * refer to WMI_PDEV_PKT_PWR_SAVE_LEVEL
  7816. */
  7817. WMI_PDEV_PARAM_PACKET_POWER_SAVE_LEVEL, /* 0x93 */
  7818. /** Define IOT pattern to be enabled/disabled
  7819. * bit values: 0 - disable, 1 - enable
  7820. * BIT[0..31]: each bit represents an IOT pattern
  7821. * -----
  7822. * Bit 0 - avoid SMPS with certain APs
  7823. * Bits 31:1 - reserved
  7824. */
  7825. WMI_PDEV_PARAM_SET_IOT_PATTERN, /* 0x94 */
  7826. /** ACK timeout - change wireless packet ack timeout configuration,
  7827. * units are microseconds
  7828. */
  7829. WMI_PDEV_PARAM_ACK_TIMEOUT, /* 0x95 */
  7830. /** Number of TX chains to use for a/b/g rates.
  7831. * bit 0~15 : 11b mode TX chain number.
  7832. * bit 16~31 : 11ag mode TX chain number.
  7833. */
  7834. WMI_PDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x96 */
  7835. /** Enable/Disable cck txfir override
  7836. * bit 0 - enable (1) or disable (0) CCK tx FIR
  7837. * bits 31:1 - unused / reserved (set to 0)
  7838. */
  7839. WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE, /* 0x97 */
  7840. /** Enable/Disable DTIM Synth
  7841. * 1- Enable DTIM Synth
  7842. * 0- Disable DTIM Synth
  7843. */
  7844. WMI_PDEV_PARAM_DTIM_SYNTH, /* 0x98 */
  7845. /** Configure auto detect power failure feature.
  7846. * 0 - FW will trigger crash if power failure happens.
  7847. * 1 - FW will send a failure notification to host, and the host
  7848. * framework determines how to respond to the power failure
  7849. * 2 - Silently rejuvenate if power failure occurs.
  7850. * 3 - Feature disabled.
  7851. */
  7852. WMI_PDEV_AUTO_DETECT_POWER_FAILURE, /* 0x99 */
  7853. /** Configure operating voltage corner mode based on phymode and bw.
  7854. * bit 0-1 - operating voltage corner mode for 11a/b.
  7855. * bit 2-3 - operating voltage corner mode for 11g.
  7856. * bit 4-5 - operating voltage corner mode for 11n, 20MHz, 1x1.
  7857. * bit 6-7 - operating voltage corner mode for 11n, 20MHz, 2x2.
  7858. * bit 8-9 - operating voltage corner mode for 11n, 40MHz, 1x1.
  7859. * bit 10-11 - operating voltage corner mode for 11n, 40MHz, 2x2.
  7860. * bit 12-13 - operating voltage corner mode for 11ac, 20MHz, 1x1.
  7861. * bit 14-15 - operating voltage corner mode for 11ac, 20MHz, 2x2.
  7862. * bit 16-17 - operating voltage corner mode for 11ac, 40MHz, 1x1.
  7863. * bit 18-19 - operating voltage corner mode for 11ac, 40MHz, 2x2.
  7864. * bit 20-21 - operating voltage corner mode for 11ac, 80MHz, 1x1.
  7865. * bit 22-23 - operating voltage corner mode for 11ac, 80MHz, 2x2.
  7866. * bit 24-25 - operating voltage corner mode for 11ac, 160MHz, 1x1.
  7867. * bit 26-27 - operating voltage corner mode for 11ac, 160MHz, 2x2.
  7868. * ---------------------------------------------
  7869. * 00 - Static voltage corner SVS
  7870. * 01 - static voltage corner LOW SVS
  7871. * 10 - Dynamic voltage corner selection based on TPUT
  7872. * 11 - Dynamic voltage corner selection based on TPUT and Tx Flush counters
  7873. */
  7874. WMI_PDEV_UPDATE_WDCVS_ALGO, /* 0x9a */
  7875. /* Enable/Disable data stall detection */
  7876. WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE, /* 0x9b */
  7877. /* GCMP Support indication to FW */
  7878. WMI_PDEV_PARAM_GCMP_SUPPORT_ENABLE, /* 0x9c */
  7879. /** Enable/Disable chain selection optimization for one chain dtim
  7880. * non-zero - Enable optimization and use this non-zero value as the
  7881. * chain imbalance threshold for optimization to kick in
  7882. * (units = dB)
  7883. * 0- Disable optimization
  7884. */
  7885. WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION,/* 0x9d */
  7886. /*
  7887. * Override default FW behavior and explicitly enable / disable
  7888. * the use of CCK for PPDU transmissions.
  7889. *
  7890. * When CCK transmissions are disabled, the default OFDM legacy
  7891. * rate will be used instead.
  7892. */
  7893. WMI_PDEV_PARAM_CCK_TX_ENABLE, /* 0x9e */
  7894. /*
  7895. * Set the user-specified antenna gain, but in 0.5 dB units.
  7896. * This is a finer-granularity version of WMI_PDEV_PARAM_ANTENNA_GAIN.
  7897. * E.g. to set a gain of 15.5 dB, a value of 31 could be provided as the
  7898. * value accompanying the PDEV_PARAM_ANTENNA_GAIN_HALF_DB parameter type.
  7899. */
  7900. WMI_PDEV_PARAM_ANTENNA_GAIN_HALF_DB, /* 0x9f */
  7901. /*
  7902. * Global Enable/Disable control for Secondary Retry Feature Set
  7903. *
  7904. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  7905. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  7906. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  7907. * Bit 3-5: "Xretry threshold" to use
  7908. */
  7909. WMI_PDEV_PARAM_SECONDARY_RETRY_ENABLE, /* 0xA0 */
  7910. /** Set global uplink triggered PPDU duration limit (usec). */
  7911. WMI_PDEV_PARAM_SET_UL_PPDU_DURATION, /* 0xA1 */
  7912. /** Set target buffer status report trigger interval (ms) */
  7913. WMI_PDEV_PARAM_SET_UL_BSR_TRIG_INTERVAL, /* 0xA2 */
  7914. /** Use simplified equal RU allocation for DL and UL OFDMA */
  7915. WMI_PDEV_PARAM_EQUAL_RU_ALLOCATION_ENABLE, /* 0xA3 */
  7916. /** Enable/disable MWS-COEX 4G (LTE) Quick FTDM.
  7917. * 0 - Don't allow quick FTDM Policy (Default)
  7918. * 1 - Allow quick FTDM policy.
  7919. */
  7920. WMI_PDEV_PARAM_MWSCOEX_4G_ALLOW_QUICK_FTDM, /* 0xA4 */
  7921. /** Set MWS-COEX 5G-NR power limit.
  7922. * 0: Don't apply user specific power limit,
  7923. * use internal power limit (Default)
  7924. * 1-2: invalid value (ignored)
  7925. * 3-21: apply the specified value as the external power limit, in dBm
  7926. * >21: invalid value (ignored)
  7927. */
  7928. WMI_PDEV_PARAM_MWSCOEX_SET_5GNR_PWR_LIMIT, /* 0xA5 */
  7929. /** Set max msdus available for cong ctrl in target */
  7930. WMI_PDEV_PARAM_SET_CONG_CTRL_MAX_MSDUS, /* 0xA6 */
  7931. /*
  7932. * Configures the Estimated Throughput Calculation indication (802.11mc) settings.
  7933. * The accompanying A_UINT32 parameter, in units of seconds, specifies how often FW needs to send the ESP estimation indication to the host.
  7934. * Value 0: Disable this feature
  7935. * Non zero Value: Periodicity (seconds)
  7936. */
  7937. WMI_PDEV_PARAM_ESP_INDICATION_PERIOD, /* 0xA7 */
  7938. /*
  7939. * Enable/Disable periodic peer CFR capture
  7940. * WMI_PEER_CFR_CAPTURE_ENABLE - Enable per peer periodic CFR capture
  7941. * WMI_PEER_CFR_CAPTURE_DISABLE - Disable per peer periodic CFR capture
  7942. */
  7943. WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE,
  7944. /*
  7945. * Set the base timer for the periodic CFR capture. By default this is 10ms.
  7946. * The period ('periodicity' param in wmi_peer_cfr_capture_cmd) of
  7947. * CFR measurement of other peers will be in multiples of this base timer.
  7948. * The unit is in milliseconds.
  7949. */
  7950. WMI_PDEV_PARAM_PERIODIC_CFR_BASE_TIMER,
  7951. /*
  7952. * Once the periodic capture is enabled using
  7953. * WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE, the timer starts running in
  7954. * the target. This parameter will ensure that the timer stops if there are
  7955. * no active peers in the capture list. Once the peers are added again to
  7956. * the capture list, the timer will not start again. The timer has to be
  7957. * started again using WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE.
  7958. * Value 1: Enable this feature
  7959. * Value 0: Disable this feature
  7960. */
  7961. WMI_PDEV_PARAM_ENABLE_OPTIMIZED_PERIODIC_CFR_TIMER,
  7962. /*
  7963. * Configures a portion of the Estimated Service Params indication
  7964. * (802.11mc) settings, which together specify estimated throughput.
  7965. * The accompanying A_UINT32 parameter is the ESP BA WINDOW size advertised
  7966. * Value 0: Disable this feature
  7967. * Non zero Value: ESP BA WINDOW size
  7968. */
  7969. WMI_PDEV_PARAM_ESP_BA_WINDOW,
  7970. /*
  7971. * Configures a portion of the Estimated Service Params indication
  7972. * (802.11mc) settings, which together specify estimated throughput.
  7973. * The accompanying A_UINT32 parameter is the air time fraction to be
  7974. * advertised in the ESP IE
  7975. * Value 0: Disable this feature
  7976. * Non zero Value: Air time fraction in percentage
  7977. */
  7978. WMI_PDEV_PARAM_ESP_AIRTIME_FRACTION,
  7979. /*
  7980. * Configures a portion of the Estimated Service Params indication
  7981. * (802.11mc) settings, which together specify estimated throughput.
  7982. * The accompanying A_UINT32 parameter specifies PPDU duration in units
  7983. * of milliseconds.
  7984. * Value 0: Disable this feature
  7985. * Non zero Value: PPDU duration in milliseconds
  7986. */
  7987. WMI_PDEV_PARAM_ESP_PPDU_DURATION,
  7988. /*
  7989. * Enable/Disable NOL(Non Occupancy list) in firmware
  7990. * 1- Use NOL in firmware
  7991. * 0- Don't use NOL in firmware
  7992. */
  7993. WMI_PDEV_PARAM_USE_NOL,
  7994. /*
  7995. * Allow / Not Allow RU26 in any user's RU allocation field in UL OFDMA
  7996. * trigger frames sent by AP
  7997. * 1 - Allow RU26
  7998. * 0 - Do not allow RU26
  7999. */
  8000. WMI_PDEV_PARAM_UL_RU26_ALLOWED,
  8001. /*
  8002. * Enable/Disable sub channel marking
  8003. * 1 - Enable sub channel marking
  8004. * 0 - Disable sub channel marking (default value)
  8005. */
  8006. WMI_PDEV_PARAM_SUB_CHANNEL_MARKING,
  8007. /*
  8008. * Enable/Disable/Set MGMT_TTL in milliseconds.
  8009. * non_zero - Enable, with the specified value
  8010. * 0 - Disable
  8011. */
  8012. WMI_PDEV_PARAM_SET_MGMT_TTL,
  8013. /*
  8014. * Enable/Disable/Set PROBE_RESP_TTL in milliseconds.
  8015. * non_zero - Enable, with the specified value
  8016. * 0 - Disable
  8017. */
  8018. WMI_PDEV_PARAM_SET_PROBE_RESP_TTL,
  8019. /*
  8020. * TBTT_CTRL_CFG
  8021. * BITS 0 - 2 (refer to WMI_TBTT_CTRL_CFG enum)
  8022. * 0 - DEFAULT -> HW_TBTT
  8023. * 1 - SW_TBTT -> HW_TBTT disabled,
  8024. * software would truncate BURST near TBTT
  8025. * 2 - IGNORE_TBTT
  8026. *
  8027. * BITS 3 - 31 Reserved, must be set to 0x0
  8028. */
  8029. WMI_PDEV_PARAM_SET_TBTT_CTRL,
  8030. /*
  8031. * BITS0 ~1 (refer to enum)
  8032. * 0 - default --> always update
  8033. * 1 - ignore to update
  8034. * 2 - update if larger than threshould
  8035. * 3 - update if less or equal than threshould
  8036. *
  8037. * BITS 2 ~ 31 Threshould
  8038. */
  8039. WMI_PDEV_PARAM_NAV_OVERRIDE_CONFIG,
  8040. /* Set global MU PPDU duration for DL (usec units) */
  8041. WMI_PDEV_PARAM_SET_MU_PPDU_DURATION,
  8042. /*
  8043. * Enable / disable test mode configuration.
  8044. * By default FW will always send triggers dynamically (mix of BSR/Basic).
  8045. * The below testmode are only used for certain tests.
  8046. * A value of 1 in a given bit enables corresponding test mode.
  8047. * bit | test mode
  8048. * ---------------
  8049. * 0 | FW only sends BSR triggers.
  8050. * 1 | FW only sends Basic triggers.
  8051. * 2 | If set, FW enables MU-RTS trigger.
  8052. * | If cleared, FW uses implementation-specific internal default setting.
  8053. * 3 | FW enables unicast embedded trigger in HE MU PPDU.
  8054. * 4-31| reserved.
  8055. */
  8056. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_TYPE_ENABLE,
  8057. /*
  8058. * Configure test command to set LSIG len.
  8059. * Value 0: Dynamic LSIG based on STA's qdepth.
  8060. * Non zero Value: LSIG length to be configured
  8061. * as part of trigger frame.
  8062. * bit |
  8063. * ---------------
  8064. * 0 - 30 | Bits storing the host supplied <value>.
  8065. * 31 | If set: The legitimate value closest to the value specified in
  8066. * | in bits 30:0 is directly set in UL len in trigger frame.
  8067. * | The FW performs calculations to determine which legitimate
  8068. * | value is closest to the specified value, if the specified
  8069. * | value is not already legitimate.
  8070. * | If not set: The value in lower bits is the duration (in ms),
  8071. * | from which the UL len is derived.
  8072. * | Example: if host sets 2000 (2ms), then UL Len in trigger
  8073. * | will be derived to accommodate the given duration.
  8074. */
  8075. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_LSIG_LEN,
  8076. /*
  8077. * Configure test cmd for fixed rate setting used for UL Trigger
  8078. * (only Basic/BSR triggers).
  8079. * The top nibble is used to select which format to use for encoding
  8080. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  8081. * format.
  8082. * If V == 0b0001: format is: 0x1000RRRR.
  8083. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  8084. *
  8085. */
  8086. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_FIXED_RATE,
  8087. /*
  8088. * Configure test command to set the mac padding duration.
  8089. * 0 - FW set Mac Padding to 0us
  8090. * 1 - FW set Mac Padding to 8us
  8091. * 2 - FW set Mac Padding to 16us
  8092. */
  8093. WMI_PDEV_PARAM_SET_TEST_CMD_UL_MAC_PADDING,
  8094. /*
  8095. * Configure test command to set the fc duration in BSR trigger frame.
  8096. * value 0 - FW calculates the duration (default).
  8097. * Non zero Value: Duration to be configured.
  8098. */
  8099. WMI_PDEV_PARAM_SET_TEST_CMD_UL_BSR_FC_DURATION,
  8100. /* Parameter used for configuring TWT scheduling properties
  8101. * bit | config_mode
  8102. * -----------------
  8103. * 0 | Disables DL MU for TWT peers within TWT SP
  8104. * 1 | Disables UL MU for TWT peers within TWT SP
  8105. * 2 | Disables scheduling from WMM sched context for TWT peers
  8106. * 3 | If set, FW only sends Basic triggers in TWT SP.
  8107. * 4-31| reserved.
  8108. */
  8109. WMI_PDEV_PARAM_SET_TEST_CMD_TWT_SCHED_CONFIG,
  8110. /* Parameter used to configure OBSS Packet Detect threshold
  8111. * for Non-SRG / SRG based Spatial Reuse feature.
  8112. * (SRG = Spatial Reuse Group)
  8113. * The accepted values are in between 0x00 and 0xFF, inclusive.
  8114. * The parameter value is programmed into the appropriate spatial reuse
  8115. * register, to specify how low the background signal strength from
  8116. * neighboring BSS cells must be, for this AP to employ spatial reuse.
  8117. *
  8118. * The value of the parameter is compared against the OBSS RSSI in dB.
  8119. * It is a 8-bit value whose
  8120. * range is -128 to 127 (after two's complement operation).
  8121. * For example, if the parameter value is 0xF5, the target will
  8122. * allow spatial reuse if the RSSI detected from other BSS
  8123. * is below -10 dB.
  8124. * Similarly, if the parameter value is 0x0A, the target will
  8125. * allow spatial reuse only if the RSSI detected from neighboring
  8126. * BSS cells is no more than 10 dB.
  8127. *
  8128. * If Bit 29 is set, then input value will be in dBm. This is used
  8129. * for chipsets that uses dBm for comparison across MAC/Phy blocks.
  8130. * Older chipsets support input in dB units. For newer chipsets, dBm
  8131. * units will be used.
  8132. * The host will use the WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT
  8133. * service ready bit to differentiate between providing input as dB or dBm.
  8134. *
  8135. * bit | purpose
  8136. * -----------------
  8137. * 0 - 7 | Param Value for non-SRG based Spatial Reuse
  8138. * 8 - 15| Param value for SRG based Spatial Reuse
  8139. * 16 - 28| Reserved
  8140. * 29 | Param value is in dBm units rather than dB units
  8141. * 30 | Enable/Disable SRG based spatial reuse.
  8142. * | If set to 0, ignore bits 8-15.
  8143. * 31 | Enable/Disable Non-SRG based spatial reuse.
  8144. * | If set to 0, ignore bits 0-7.
  8145. */
  8146. WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD,
  8147. /* Parameter used for enabling/disabling non wlan coex from boot */
  8148. WMI_PDEV_PARAM_ENABLE_NON_WLAN_COEX_FROM_BOOT,
  8149. /* Parameter used to configure OBSS Packet Detection per Access Category
  8150. * for SRP based and OBSS_PD based spatial reuse feature.
  8151. * (SRP = Spatial Reuse Parameter)
  8152. * Based on the bits set, the corresponding Access Category Queues will have
  8153. * spatial reuse enabled / disabled.
  8154. * bit | AC
  8155. * ------------
  8156. * 0 | BK for SRG/Non-SRG
  8157. * 1 | BE for SRG/Non-SRG
  8158. * 2 | VI for SRG/Non-SRG
  8159. * 3 | VO for SRG/Non-SRG
  8160. * 4 - 15 | Reserved
  8161. * 16 | BK for SRP
  8162. * 17 | BE for SRP
  8163. * 18 | VI for SRP
  8164. * 19 | VO for SRP
  8165. * 20 - 31 | Reserved
  8166. */
  8167. WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC,
  8168. /*
  8169. * Parameter used to enable/disable FW control of MU-EDCA and AP back-off
  8170. * parameters.
  8171. * If set to zero, FW mode is disabled; if set to 1, FW mode is enabled.
  8172. * Default setting is to have it enabled, and user can disable it in
  8173. * favor of manual mode or host control mode.
  8174. */
  8175. WMI_PDEV_PARAM_ENABLE_FW_DYNAMIC_HE_EDCA,
  8176. /*
  8177. * Parameter used to set default 6 GHz rate.
  8178. * Applies to all non data transmissions in 6 GHz unless
  8179. * overwritten by respective VDEV params.
  8180. */
  8181. WMI_PDEV_PARAM_DEFAULT_6GHZ_RATE,
  8182. /*
  8183. * Configures the duration (in seconds) to delay the channel avoidance
  8184. * indication at WLAN firmware before indicating it to WLAN host,
  8185. * when WWAN (LTE/5GNR) PCC is in conflict due to WWAN-WLAN coexistence.
  8186. * Default value is 60 seconds.
  8187. * If set to zero, FW sends channel avoidance indcation immediately to Host.
  8188. */
  8189. WMI_PDEV_PARAM_MWSCOEX_PCC_CHAVD_DELAY,
  8190. /*
  8191. * Configures the duration (in seconds) to delay the channel avoidance
  8192. * indication at WLAN firmware before indicating it to WLAN host,
  8193. * when WWAN (LTE/5GNR) SCC is in conflict due to WWAN-WLAN coexistence.
  8194. * Default value is 120 seconds.
  8195. * If set to zero, FW sends channel avoidance indcation immediately to Host.
  8196. */
  8197. WMI_PDEV_PARAM_MWSCOEX_SCC_CHAVD_DELAY,
  8198. /*
  8199. * Parameter used to set ageout timer value from host (units = seconds).
  8200. * If not set, FW use default value 2 seconds.
  8201. * ageout time: the time upto which DFS channel information such as
  8202. * beacon found is remembered
  8203. */
  8204. WMI_PDEV_PARAM_SET_DFS_CHAN_AGEOUT_TIME,
  8205. /* Parameter used for enabling/disabling xlna bypass for SAP mode*/
  8206. WMI_PDEV_PARAM_SET_SAP_XLNA_BYPASS,
  8207. /* Parameter used to enable/disable SRP feature */
  8208. WMI_PDEV_PARAM_ENABLE_SRP,
  8209. /* Parameter used to enable/disable SR prohibit feature */
  8210. WMI_PDEV_PARAM_ENABLE_SR_PROHIBIT,
  8211. /*
  8212. * Parameter used to enable/disable UL OFDMA mBSSID support for
  8213. * trigger frames. It is disabled by default.
  8214. * bit | config_mode
  8215. * -----------------
  8216. * 0 | Enable/Disable mBSSID trigger support for basic triggers.
  8217. * 1 | Enable/Disable mBSSID trigger support for BSR triggers.
  8218. * 2 | Enable/Disable mBSSID trigger support for MU RTS.
  8219. * 3 | Enable/Disable mBSSID trigger support for UL MUMIMO triggers.
  8220. */
  8221. WMI_PDEV_PARAM_ENABLE_MBSSID_CTRL_FRAME,
  8222. /*
  8223. * Parameter to set preamble punctured band as a bitmask, i.e.
  8224. * which 20MHz in the 80MHz bandwidth or 40MHz in 160MHz bandwidth.
  8225. * E.g. if first 20MHz is the primary and preamble puncturing is
  8226. * desired for 3rd 20Mhz, then the host will send 0x0100.
  8227. * FW doesn't expect the primary 20MHz to be punctured.
  8228. * This param is required only for 11ax release.
  8229. */
  8230. WMI_PDEV_PARAM_SET_PREAM_PUNCT_BW,
  8231. /*
  8232. * Parameter used to set the Margin dB value to be included for calculating
  8233. * the spatial reuse value in common info field of the UL Trigger frame.
  8234. * Accepted value as per Spec are 0 to 5 dB (inclusive).
  8235. */
  8236. WMI_PDEV_PARAM_SR_TRIGGER_MARGIN,
  8237. /* Param to enable/disable PCIE HW ILP */
  8238. WMI_PDEV_PARAM_PCIE_HW_ILP,
  8239. /*
  8240. * Configure the TXTD_START_TIMESTAMP parameters
  8241. * The timestamp units are nanoseconds.
  8242. * This parameter can be used to adjust at what point the TXTD module
  8243. * will start operating after the STA connects to an AP.
  8244. */
  8245. WMI_PDEV_PARAM_SET_TXTD_START_TIMESTAMP,
  8246. /*
  8247. * Parameter to configure and enable/disable features for mesh usecases
  8248. * bit | config_mode
  8249. * -----------------
  8250. * 0 | Set to 1 to disable BSSID based spatial reuse.
  8251. * 1-31 | Reserved.
  8252. */
  8253. WMI_PDEV_PARAM_SET_MESH_PARAMS,
  8254. /* Param to enable low latency mode */
  8255. WMI_PDEV_PARAM_LOW_LATENCY_SCHED_MODE,
  8256. /* Param to enable per USERPD SSR - for MultiPD enabled chips */
  8257. WMI_PDEV_PARAM_MPD_USERPD_SSR,
  8258. /*
  8259. * Param to disable Hardware Assist feature,
  8260. * i.e. Disables HW feature that reconstructs the PPDU
  8261. * by picking failing MPDUs from prior FES attempt.
  8262. */
  8263. WMI_PDEV_PARAM_DISABLE_HW_ASSIST,
  8264. /*
  8265. * Param to Enable/Disable Tx on DFS for Scan Radio RDP
  8266. * Send MGMT frames on the DFS channel before Tx on the said channel
  8267. * when in monitor mode.
  8268. * Scan Radio RDP should do Tx on DFS channel based on available
  8269. * Tx frame on DFS without doing CAC.
  8270. * Host should ensure to send this param only for Scan Radio RDP.
  8271. * This param used to inform Scan Radio Supports Tx on DFS channel.
  8272. */
  8273. WMI_PDEV_PARAM_SCAN_RADIO_TX_ON_DFS,
  8274. /*
  8275. * Param to configure Minimum OBSS ppdu time below which
  8276. * spatial reuse will not happen over the TXOP duration of the OBSS frame.
  8277. * If the incoming OBSS frame ppdu duration is greater then the value
  8278. * configured, then spatial reuse can happen over the OBSS PPDU.
  8279. * The value is configured in microseconds.
  8280. */
  8281. WMI_PDEV_PARAM_OBSS_MIN_DURATION_CHECK_FOR_SR,
  8282. /*
  8283. * Param to Enable/Disable Truncate SR feature.
  8284. * PPDUs transmitted using SR opportunity will be truncated at the end
  8285. * of OBSS frame duration and will not extend beyond.
  8286. */
  8287. WMI_PDEV_PARAM_TRUNCATE_SR,
  8288. /* Parameter used to configure separate NON_SRG/SRG OBSS PD threshold for
  8289. * for Control Frame.
  8290. * (SRG = Spatial Reuse Group)
  8291. * The accepted values are in between 0x00 and 0xFF, inclusive.
  8292. * The parameter value is checked against the RSSI of the OBSS Control
  8293. * frame. If RSSI is below the parameter value, then the Control frame is
  8294. * aborted and NAV is ignored. Separate OBSS PD threshold for Control frame
  8295. * is added to account for the higher TX power used for such control frames
  8296. * when compared with data frames.
  8297. *
  8298. * The input value will be interpreted as a signed value in dBm units.
  8299. *
  8300. * The values will be reflected in the registers only if
  8301. * SRG / non-srg based spatial reuse is enabled via
  8302. * WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD cmd.
  8303. * bit | purpose
  8304. * -----------------
  8305. * 0 - 7 | Param Value for non-srg OBSS PD threshold for non-SRG
  8306. * | control frames
  8307. * 8 - 15| Param Value for srg OBSS PD threshold for SRG control frames
  8308. * 16 - 29| Reserved
  8309. * 30 | Enable/Disable separate SRG based spatial reuse for OBSS
  8310. * | control frames.
  8311. * | If set to 0, ignore bits 8-15.
  8312. * 31 | Enable/Disable separate non-SRG based spatial reuse for OBSS
  8313. * | control frames.
  8314. * | If set to 0, ignore bits 0-7.
  8315. */
  8316. WMI_PDEV_PARAM_CTRL_FRAME_OBSS_PD_THRESHOLD,
  8317. /* Param to configure the access category for the TWT queue */
  8318. WMI_PDEV_PARAM_TWT_AC_CONFIG,
  8319. /*
  8320. * TX xretry extension parameter to allow product specific adjustment.
  8321. * I.e. multiply the xretry counter by N% for a requirement from framework.
  8322. */
  8323. WMI_PDEV_PARAM_PDEV_STATS_TX_XRETRY_EXT,
  8324. /*
  8325. * Per PDEV level, set the highest rate cap allowed.
  8326. * The accepted input values NSS are between 1-8, inclusive.
  8327. * The accepted input values MCS are between 0-15, inclusive.
  8328. * FW will use the input values as is.
  8329. * The rate cap is specified in NSS, MCS format each 4bits.
  8330. * i.e., NSS and MCS combined as shown below:
  8331. * b'0-b'7 indicate the NSS (NSS value can be from 1-8)
  8332. * b'8-b'15 indicate the MCS (MCS value can be from 0-15)
  8333. * b'16 Enable or disable nss cap
  8334. * b'17 Enable or disable mcs cap
  8335. * b'18 To determine the direction for caping DL_direction
  8336. * b'19 To determine the direction for caping UL_direction
  8337. *
  8338. * For backwards compatibility, if bits 18+19 are both
  8339. * cleared, then the rate cap applies to both DL and UL.
  8340. * To summarize:
  8341. * bit 19 | bit 18 | rate cap applied
  8342. * -------+--------+------------------
  8343. * 0 | 0 | cap rates only for DL
  8344. * 0 | 1 | cap rates only for DL
  8345. * 1 | 0 | cap rates only for UL
  8346. * 1 | 1 | cap rates for both UL and DL
  8347. */
  8348. WMI_PDEV_PARAM_RATE_UPPER_CAP,
  8349. /*
  8350. * Per PDEV level, set number of MCS to be dropped based
  8351. * on configured retries.
  8352. * bit | config_mode
  8353. * -----------------
  8354. * 0-7 | param value for number MCS to be dropped
  8355. * 8-15| param value for excess retries
  8356. * 16 | If set to 0, number of MCS to be dropped is disabled, i.e.
  8357. * | fall back to default mode.
  8358. * | The default value of MCS to be dropped is 1.
  8359. * 17 | if set to 0, retries is disabled/use default retries.
  8360. * | The default value of retries is 3.
  8361. */
  8362. WMI_PDEV_PARAM_SET_RATE_DROP_DOWN_RETRY_THRESH,
  8363. /*
  8364. * Param value to configure min/max probe interval for MCS of current NSS.
  8365. * If probe interval expired, ratectrl will probe for MCS of current NSS.
  8366. * If probe was successful, rate control updates the probe time with a
  8367. * min of probe interval.
  8368. * If probe failed for MCS of current NSS, rate control updates the probe
  8369. * time by multiplying the probe period with 2, which is not greater than
  8370. * max probe interval.
  8371. * units = milliseconds
  8372. * bits | config_mode
  8373. * 0-15 | minimum probe time for MCS
  8374. * 16-31| maximum probe time for MCS
  8375. */
  8376. WMI_PDEV_PARAM_MIN_MAX_MCS_PROBE_INTERVAL,
  8377. /* Param value to configure min/max probe interval for NSS.
  8378. * Rate control will probe for alternate NSS if probe time is expired.
  8379. * If probe for an alternate NSS was successful, rate control updates
  8380. * the probe time with a min of probe interval.
  8381. * If probe failed for alternate NSS, rate control updates the probe time
  8382. * by multiplying the probe period with 2, which is not greater than
  8383. * max probe interval.
  8384. * units = milliseconds
  8385. * bits | config_mode
  8386. * 0-15 | minimum probe time for alternate NSS
  8387. * 16-32| maximum probe time for alternate NSS
  8388. */
  8389. WMI_PDEV_PARAM_MIN_MAX_NSS_PROBE_INTERVAL,
  8390. /* Param to enable/disable probing on all BW */
  8391. WMI_PDEV_PARAM_EN_PROBE_ALL_BW,
  8392. /* Param to enable/disable updating scrambler seed feature */
  8393. WMI_PDEV_PARAM_EN_UPDATE_SCRAM_SEED,
  8394. /*
  8395. * Param to set the GPIO Drive Configuration value for
  8396. * Smart Antenna Parallel Mode
  8397. */
  8398. WMI_PDEV_PARAM_SA_PARALLEL_MODE_GPIO_DRIVE_CFG,
  8399. /*
  8400. * Param to disable LPI antenna optimizations
  8401. * In 6G LPI mode, additional antenna optimizations are done to
  8402. * improve range. Param is provided to disable the added
  8403. * optimizations.
  8404. */
  8405. WMI_PDEV_PARAM_DISABLE_LPI_ANT_OPTIMIZATION,
  8406. /*
  8407. * Param to configure exclusive RSID range for 11az TB ranging.
  8408. * RSID's are subset of total AID space and must not be used
  8409. * for any other purpose by Host. FW uses these IDs for trigger
  8410. * based ranging.
  8411. */
  8412. WMI_PDEV_PARAM_RTT_11AZ_RSID_RANGE,
  8413. /*
  8414. * Disable the indicated DL and UL scheduler for the PDEV.
  8415. *
  8416. * This command is not supported in STA mode.
  8417. *
  8418. * A value of 1 in a given bit position disables the corresponding mode,
  8419. * and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS enum defines
  8420. * the bit positions for each mode.
  8421. *
  8422. * A single 32 bit value is used to store the following configuration
  8423. * bitmap.
  8424. *
  8425. * This command differs from WMI_VDEV_PARAM_SET_HEMU_MODE and
  8426. * WMI_VDEV_PARAM_SET_EHT_MU_MODE in that it is intended for use during
  8427. * normal AP operation, and will never cause a VAP restart or other
  8428. * capability bit modification. It simply controls the scheduler
  8429. * behavior.
  8430. *
  8431. * bit | sched mode
  8432. * ---------------
  8433. * 0 | DL MU-MIMO
  8434. * 1 | UL MU-MIMO
  8435. * 2 | DL OFDMA
  8436. * 3 | UL OFDMA
  8437. * 4..31 | RESERVED
  8438. */
  8439. WMI_PDEV_PARAM_SET_DISABLED_SCHED_MODES,
  8440. /*
  8441. * Override default FW behavior and explicitly enable / disable
  8442. * to allow frames without encryption when no encryption is set.
  8443. *
  8444. */
  8445. WMI_PDEV_PARAM_BYPASS_ENCRYPTION,
  8446. /*
  8447. * Param to Enable/Disable scan blanking feature on the Scan Radio
  8448. * Host should ensure to send this param only for Scan Radio
  8449. * The WMI_SCAN_BLANKING_MODE enum specifies the possible values for this parameter.
  8450. * Based on the received input, the scan blanking feature will be carried out as explained in the enum WMI_SCAN_BLANKING_MODE
  8451. */
  8452. WMI_PDEV_PARAM_SET_SCAN_BLANKING_MODE,
  8453. /*
  8454. * Parameter to enable/disable Multi-Channel Concurrency low latency mode
  8455. * bit | config_mode
  8456. * -----------------
  8457. * 0 | 0:disable, 1:enable.
  8458. * 1-31 | Reserved.
  8459. */
  8460. WMI_PDEV_PARAM_SET_CONC_LOW_LATENCY_MODE,
  8461. /*
  8462. * Parameter to enable/disable low power listen mode
  8463. * bit | config_mode
  8464. * -----------------
  8465. * 0 | 0:disable, 1:enable.
  8466. * 1-31 | Reserved.
  8467. */
  8468. WMI_PDEV_PARAM_LPL_SETTING,
  8469. /** Set Probe Resp retry limit */
  8470. WMI_PDEV_PARAM_PROBE_RESP_RETRY_LIMIT,
  8471. /*
  8472. * Parameter for configure PCIE
  8473. *
  8474. * 0 - Default Value(FW Control).
  8475. * 1 - Force PCIE Gen Speed and Lane Width to maximum supported value.
  8476. */
  8477. WMI_PDEV_PARAM_PCIE_CONFIG,
  8478. /** CTS timeout - change wireless packet cts timeout configuration,
  8479. * units are microseconds
  8480. */
  8481. WMI_PDEV_PARAM_CTS_TIMEOUT,
  8482. /** Slot time - change wireless packet slot time value dynamically,
  8483. * units are microseconds
  8484. */
  8485. WMI_PDEV_PARAM_SLOT_TIME,
  8486. /** VO dedicated time -
  8487. * allocate dedicated time slots for VO access category across all
  8488. * ATF groups in a pdev.
  8489. * Note :
  8490. * 1. Per AC airtime per group is already available through
  8491. * ATF WMM WMI commands
  8492. * 2. The dedicated time slot is applicable per second
  8493. * 3. Units are in milli-seconds
  8494. */
  8495. WMI_PDEV_PARAM_ATF_VO_DEDICATED_TIME,
  8496. /** VI dedicated time -
  8497. * allocate dedicated time slots for VI access category across all
  8498. * ATF groups in a pdev.
  8499. * Note :
  8500. * 1. Per AC airtime per group is already given through ATF WMM WMI cmds
  8501. * 2. The dedicated time slot is applicable per second
  8502. * 3. Units are in milli-seconds
  8503. */
  8504. WMI_PDEV_PARAM_ATF_VI_DEDICATED_TIME,
  8505. /** Parameter used for enabling/disabling RFA toggle for SAP mode */
  8506. WMI_PDEV_PARAM_SET_SAP_RFA_TOGGLE,
  8507. /** Parameter to set PDEV level UL OFDMA RTD */
  8508. WMI_PDEV_PARAM_UL_OFDMA_RTD,
  8509. /** Parameter to enable/disable tid0 and tid3 mapping to work 3 Link MLO */
  8510. WMI_PDEV_PARAM_TID_MAPPING_3LINK_MLO,
  8511. /** Parameter to enable/disable small OFDMA M-RUs **/
  8512. WMI_PDEV_PARAM_ENABLE_SMALL_MRU,
  8513. /** Parameter to enable/disable large OFDMA M-RUs **/
  8514. WMI_PDEV_PARAM_ENABLE_LARGE_MRU,
  8515. /** Parameter to enable/disable delayed LMR feedback.
  8516. * Note: Delayed LMR feedback is supported only up to two ranging peers to
  8517. * enable Location certification
  8518. * 0 - Immediate LMR feedback is enabled for all ranging peers.
  8519. * 1 (non zero) - delayed LMR feedback is enabled. Third peer onward will
  8520. * default to immediate LMR feedback.
  8521. **/
  8522. WMI_PDEV_PARAM_ENABLE_DELAYED_LMR_FEEDBACK,
  8523. /* DFS_RADAR_MASK: Radar mask setting programmed in HW registers.
  8524. * bit | config_mode
  8525. * -----------------------
  8526. * 0 - 15 | Each bit represents a 20 MHz portion of the channel.
  8527. * | 0-Unmasked 1-Masked
  8528. * 16 - 31 | Reserved.
  8529. * Bit 0 represents the highest 20 MHz portion within the channel.
  8530. * For example...
  8531. * For a 80 MHz channel, bit0 = highest 20 MHz, bit3 = lowest 20 MHz
  8532. * For a 320 MHz channel, bit0 = highest 20 MHz, bit15 = lowest 20 MHz
  8533. */
  8534. WMI_PDEV_PARAM_DFS_RADAR_MASK,
  8535. /** PWR_REDUCTION_IN_QUARTER_DB:
  8536. * Reduce final Tx power (derived after all considerations)
  8537. * by specified value in units of 0.25 dB.
  8538. * E.g. a value of 4 will result in a 1.0 dB tx power reduction.
  8539. */
  8540. WMI_PDEV_PARAM_PWR_REDUCTION_IN_QUARTER_DB,
  8541. WMI_PDEV_PARAM_ENABLE_CHIPSET_LOGGING,
  8542. /** SCAN MODE:
  8543. * bit | scan_mode
  8544. * -----------------
  8545. * 0 | SISO SCAN - 1x1 scan
  8546. * | If this bit is 0, then use default scan (NxN).
  8547. * 1-31 | Reserved.
  8548. */
  8549. WMI_PDEV_PARAM_SCAN_MODE,
  8550. /** configure datastall consecutive no ack interval (units = ms) */
  8551. WMI_PDEV_PARAM_DSTALL_CONSECUTIVE_TX_NO_ACK_INTERVAL,
  8552. /** configure datastall consecutive no ack threshold */
  8553. WMI_PDEV_PARAM_DSTALL_CONSECUTIVE_TX_NO_ACK_THRESHOLD,
  8554. WMI_PDEV_PARAM_MGMT_SRNG_REAP_EVENT_THRESHOLD,
  8555. } WMI_PDEV_PARAM;
  8556. #define WMI_PDEV_ONLY_BSR_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 0, 1)
  8557. #define WMI_PDEV_ONLY_BSR_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 1)
  8558. #define WMI_PDEV_ONLY_BSR_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 0)
  8559. #define WMI_PDEV_ONLY_BASIC_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 1, 1)
  8560. #define WMI_PDEV_ONLY_BASIC_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 1)
  8561. #define WMI_PDEV_ONLY_BASIC_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 0)
  8562. #define WMI_PDEV_MU_RTS_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 2, 1)
  8563. #define WMI_PDEV_MU_RTS_ENABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 1)
  8564. #define WMI_PDEV_MU_RTS_DISABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 0)
  8565. #define WMI_PDEV_EMBEDDED_TRIGGER_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 3, 1)
  8566. #define WMI_PDEV_EMBEDDED_TRIGGER_ENABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 1)
  8567. #define WMI_PDEV_EMBEDDED_TRIGGER_DISABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 0)
  8568. #define WMI_PDEV_TWT_SCHED_CFG_IS_DL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 0, 1)
  8569. #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 1)
  8570. #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 0)
  8571. #define WMI_PDEV_TWT_SCHED_CFG_IS_UL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 1, 1)
  8572. #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 1)
  8573. #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 0)
  8574. #define WMI_PDEV_TWT_SCHED_CFG_IS_WMM_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 2, 1)
  8575. #define WMI_PDEV_TWT_SCHED_CFG_WMM_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 1)
  8576. #define WMI_PDEV_TWT_SCHED_CFG_WMM_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 0)
  8577. #define WMI_PDEV_TWT_SCHED_CFG_IS_USE_ONLY_BASIC_TRIGGER_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 3, 1)
  8578. #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 1)
  8579. #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 0)
  8580. #define WMI_PDEV_LSIG_LEN_DURATION_ENABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 1)
  8581. #define WMI_PDEV_LSIG_LEN_DURATION_DISABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 0)
  8582. #define WMI_PDEV_LSIG_LEN_DURATION_GET(lsig_len) WMI_GET_BITS(lsig_len, 0, 30)
  8583. #define WMI_PDEV_LSIG_LEN_DURATION_SET(lsig_len, value) WMI_SET_BITS(lsig_len, 0, 30, value)
  8584. #define WMI_PDEV_IS_NON_SRG_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 31, 1)
  8585. #define WMI_PDEV_NON_SRG_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 1)
  8586. #define WMI_PDEV_NON_SRG_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 0)
  8587. #define WMI_PDEV_NON_SRG_PD_THRESHOLD_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 0, 8, value)
  8588. #define WMI_PDEV_NON_SRG_PD_THRESHOLD_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 0, 8)
  8589. #define WMI_PDEV_IS_SRG_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 30, 1)
  8590. #define WMI_PDEV_SRG_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 1)
  8591. #define WMI_PDEV_SRG_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 0)
  8592. #define WMI_PDEV_SRG_PD_THRESHOLD_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 8, 8, value)
  8593. #define WMI_PDEV_SRG_PD_THRESHOLD_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 8, 8)
  8594. #define WMI_PDEV_IS_PD_THRESHOLD_IN_DBM(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 29, 1)
  8595. #define WMI_PDEV_SET_PD_THRESHOLD_IN_DBM(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 29, 1, 1)
  8596. #define WMI_PDEV_OBSS_PD_ENABLE_PER_AC_SET(per_ac_cfg, value) WMI_SET_BITS(per_ac_cfg, 0, 4, value)
  8597. #define WMI_PDEV_OBSS_PD_ENABLE_PER_AC_GET(per_ac_cfg) WMI_GET_BITS(per_ac_cfg, 0, 4)
  8598. #define WMI_PDEV_SRP_ENABLE_PER_AC_SET(per_ac_cfg, value) WMI_SET_BITS(per_ac_cfg, 16, 4, value)
  8599. #define WMI_PDEV_SRP_ENABLE_PER_AC_GET(per_ac_cfg) WMI_GET_BITS(per_ac_cfg, 16, 4)
  8600. #define WMI_PDEV_IS_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 31, 1)
  8601. #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 1)
  8602. #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 0)
  8603. #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 0, 8, value)
  8604. #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 0, 8)
  8605. #define WMI_PDEV_IS_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 30, 1)
  8606. #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 1)
  8607. #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 0)
  8608. #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 8, 8, value)
  8609. #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 8, 8)
  8610. #define WMI_PDEV_UPPER_CAP_NSS_GET(value) WMI_GET_BITS(value, 0, 8)
  8611. #define WMI_PDEV_UPPER_CAP_NSS_SET(_value, value) WMI_SET_BITS(_value, 0, 8, value)
  8612. #define WMI_PDEV_UPPER_CAP_MCS_GET(value) WMI_GET_BITS(value, 8, 8)
  8613. #define WMI_PDEV_UPPER_CAP_MCS_SET(_value, value) WMI_SET_BITS(_value, 8, 8, value)
  8614. #define WMI_PDEV_UPPER_CAP_NSS_VALID_GET(value) WMI_GET_BITS(value, 16, 1)
  8615. #define WMI_PDEV_UPPER_CAP_NSS_VALID_SET(_value, value) WMI_SET_BITS(_value, 16, 1, value)
  8616. #define WMI_PDEV_UPPER_CAP_MCS_VALID_GET(value) WMI_GET_BITS(value, 17, 1)
  8617. #define WMI_PDEV_UPPER_CAP_MCS_VALID_SET(_value, value) WMI_SET_BITS(_value, 17, 1, value)
  8618. #define WMI_PDEV_UPPER_CAP_DL_DIR_GET(value) WMI_GET_BITS(value, 18, 1)
  8619. #define WMI_PDEV_UPPER_CAP_DL_DIR_SET(_value, value) WMI_SET_BITS(_value, 18, 1, value)
  8620. #define WMI_PDEV_UPPER_CAP_UL_DIR_GET(value) WMI_GET_BITS(value, 19, 1)
  8621. #define WMI_PDEV_UPPER_CAP_UL_DIR_SET(_value, value) WMI_SET_BITS(_value, 19, 1, value)
  8622. #define WMI_PDEV_RATE_DROP_NUM_MCS_GET(value) WMI_GET_BITS(value, 0, 8)
  8623. #define WMI_PDEV_RATE_DROP_NUM_MCS_SET(_value, value) WMI_SET_BITS(_value, 0, 8, value)
  8624. #define WMI_PDEV_RATE_DROP_RETRY_THRSH_GET(value) WMI_GET_BITS(value, 8, 8)
  8625. #define WMI_PDEV_RATE_DROP_RETRY_THRSH_SET(_value, value) WMI_SET_BITS(_value, 8, 8, value)
  8626. #define WMI_PDEV_RATE_DROP_NUM_MCS_VALID_GET(value) WMI_GET_BITS(value, 16, 1)
  8627. #define WMI_PDEV_RATE_DROP_NUM_MCS_VALID_SET(_value, value) WMI_SET_BITS(_value, 16, 1, value)
  8628. #define WMI_PDEV_RATE_DROP_RETRY_THRSH_VALID_GET(value) WMI_GET_BITS(value, 17, 1)
  8629. #define WMI_PDEV_RATE_DROP_RETRY_THRSH_VALID_SET(_value, value) WMI_SET_BITS(_value, 17, 1, value)
  8630. #define WMI_PDEV_RATE_MIN_MCS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 0, 16)
  8631. #define WMI_PDEV_RATE_MIN_MCS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 0, 16, value)
  8632. #define WMI_PDEV_RATE_MAX_MCS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 16, 16)
  8633. #define WMI_PDEV_RATE_MAX_MCS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 16, 16, value)
  8634. #define WMI_PDEV_RATE_MIN_NSS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 0, 16)
  8635. #define WMI_PDEV_RATE_MIN_NSS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 0, 16, value)
  8636. #define WMI_PDEV_RATE_MAX_NSS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 16, 16)
  8637. #define WMI_PDEV_RATE_MAX_NSS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 16, 16, value)
  8638. #define WMI_MBSSID_CTRL_FRAME_BASIC_TRIGGER ((A_UINT32) 1 << 0)
  8639. #define WMI_MBSSID_CTRL_FRAME_BSR_TRIGGER ((A_UINT32) 1 << 1)
  8640. #define WMI_MBSSID_CTRL_FRAME_MU_RTS_TRIGGER ((A_UINT32) 1 << 2)
  8641. #define WMI_MBSSID_CTRL_FRAME_UL_MU_MIMO_TRIGGER ((A_UINT32) 1 << 3)
  8642. typedef struct {
  8643. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
  8644. /** pdev_id for identifying the MAC
  8645. * See macros starting with WMI_PDEV_ID_ for values.
  8646. */
  8647. A_UINT32 pdev_id;
  8648. /** parameter id */
  8649. A_UINT32 param_id; /* WMI_PDEV_PARAM */
  8650. /** parameter value */
  8651. A_UINT32 param_value;
  8652. } wmi_pdev_set_param_cmd_fixed_param;
  8653. /* param values for WMI_PDEV_PARAM_SET_TBTT_CTRL's TBTT_CTRL_CFG bit-field */
  8654. typedef enum {
  8655. WMI_TBTT_CTRL_HW_TRUNCATE = 0,
  8656. WMI_TBTT_CTRL_SW_TRUNCATE,
  8657. WMI_TBTT_CTRL_IGNORE_TBTT,
  8658. WMI_TBTT_CTRL_MAX = 0x7,
  8659. } WMI_TBTT_CTRL_CFG;
  8660. /** MACRO to set / get TBTT_CTRL_CFG bit-field within
  8661. * WMI_PDEV_PARAM_SET_TBTT_CTRL:
  8662. * bits 0~2 : TBTT_CTRL_CFG
  8663. * bits 3~31: Reserved (set to 0x0)
  8664. */
  8665. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG_S 0
  8666. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG 0x00000007
  8667. #define WMI_PDEV_PARAM_GET_TBTT_CTRL_CFG(word32) \
  8668. WMI_F_MS(word32, WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  8669. #define WMI_PDEV_PARAM_SET_TBTT_CTRL_CFG(word32, value) \
  8670. WMI_F_RMW(word32,value,WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  8671. /** MACRO define to set / get 11b and 11ag mode TX chain number:
  8672. * bit 0~15 : 11b mode TX chain number.
  8673. * bit 16~31: 11ag mode TX chain number.
  8674. */
  8675. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM_S 0
  8676. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM 0x0000FFFF
  8677. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM_S 16
  8678. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM 0xFFFF0000
  8679. #define WMI_PDEV_PARAM_GET_11B_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  8680. #define WMI_PDEV_PARAM_SET_11B_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  8681. #define WMI_PDEV_PARAM_GET_11AG_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  8682. #define WMI_PDEV_PARAM_SET_11AG_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  8683. /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
  8684. typedef enum {
  8685. WMI_CTS_CBW_INVALID = 0,
  8686. WMI_CTS_CBW_20,
  8687. WMI_CTS_CBW_40,
  8688. WMI_CTS_CBW_80,
  8689. WMI_CTS_CBW_80_80,
  8690. WMI_CTS_CBW_160,
  8691. } WMI_CTS_CBW;
  8692. typedef struct {
  8693. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
  8694. /** pdev_id for identifying the MAC
  8695. * See macros starting with WMI_PDEV_ID_ for values.
  8696. */
  8697. A_UINT32 pdev_id;
  8698. /** parameter */
  8699. A_UINT32 param;
  8700. } wmi_pdev_get_tpc_config_cmd_fixed_param;
  8701. typedef struct {
  8702. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_div_get_rssi_antid_fixed_param */
  8703. /** pdev_id for identifying the MAC */
  8704. A_UINT32 pdev_id;
  8705. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  8706. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  8707. /** index of the last-used antenna for each chain */
  8708. A_UINT32 ant_id[WMI_MAX_CHAINS];
  8709. /** mac address of diversity peer */
  8710. wmi_mac_addr macaddr;
  8711. } wmi_pdev_div_get_rssi_antid_fixed_param;
  8712. typedef enum {
  8713. WMI_TPC_STATS_EVENT_SEND_REG = 0x00000001,
  8714. WMI_TPC_STATS_EVENT_SEND_RATE = 0x00000002,
  8715. WMI_TPC_STATS_EVENT_SEND_CTL = 0x00000004,
  8716. WMI_TPC_STATS_EVENT_SEND_REG_RATE_CTL = 0x00000007, /* REG | RATE | CTL */
  8717. } WMI_PDEV_TPC_STATS_PARAMS;
  8718. typedef enum {
  8719. WMI_HALPHY_TPC_STATS_SUPPORT_160 = 0,
  8720. WMI_HALPHY_TPC_STATS_SUPPORT_320,
  8721. WMI_HALPHY_TPC_STATS_SUPPORT_AX,
  8722. WMI_HALPHY_TPC_STATS_SUPPORT_AX_EXTRA_MCS,
  8723. WMI_HALPHY_TPC_STATS_SUPPORT_BE,
  8724. WMI_HALPHY_TPC_STATS_SUPPORT_BE_PUNC,
  8725. WMI_HALPHY_TPC_STATS_SUPPORT_CTL_DESIGN_1,
  8726. } WMI_HALPHY_TPC_STATS_SUPPORT_BITF; /* support bit fields */
  8727. typedef struct {
  8728. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_stats_cmd_fixed_param */
  8729. /** pdev_id for identifying the MAC
  8730. * See macros starting with WMI_PDEV_ID_ for values.
  8731. */
  8732. A_UINT32 pdev_id;
  8733. /** parameter -
  8734. * This is to specify whether we want only the target power
  8735. * information (rates array) or the CTL power or the regulatory
  8736. * power information. At present, we send all of them.
  8737. */
  8738. A_UINT32 param; /* Currently expect WMI_TPC_STATS_EVENT_SEND_REG_RATE_CTL
  8739. * as a host specification that rates array, regulatory
  8740. * power array, and ctl power array are all to be sent.
  8741. * See WMI_PDEV_TPC_STATS_PARAMS.
  8742. */
  8743. } wmi_pdev_get_tpc_stats_cmd_fixed_param;
  8744. typedef struct {
  8745. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_stats_event_fixed_param */
  8746. A_UINT32 pdev_id; /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values */
  8747. 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 */
  8748. A_UINT32 event_count; /* Incremented for every event chunk for Host to know the sequence */
  8749. /* wmi_tpc_configs TLV to optionally follow */
  8750. /* wmi_max_reg_power_allowed TLVs to optionally follow */
  8751. /* wmi_tpc_rates_array TLVs to optionally follow */
  8752. /* wmi_tpc_ctl_pwr_table TLVs to optionally follow */
  8753. } wmi_pdev_get_tpc_stats_event_fixed_param;
  8754. typedef struct {
  8755. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_configs */
  8756. A_UINT32 regDomain;
  8757. A_UINT32 chanFreq; /* current channel in MHz */
  8758. A_UINT32 phyMode; /* current phy mode - See WLAN_PHY_MODE for the different phy modes */
  8759. A_UINT32 maxAntennaGain; /* Maximum antenna gain for the current regulatory in 0.25 dBm steps */
  8760. A_UINT32 twiceMaxRDPower; /* Maximum transmit power allowed in the regulatory domain in 0.25 dBm steps */
  8761. A_INT32 userAntennaGain; /* User specified antenna gain in 0.25 dBm steps */
  8762. A_UINT32 powerLimit; /* The overall power limit in 0.25 dBm steps */
  8763. A_UINT32 rateMax; /* The total number of rates supported */
  8764. A_UINT32 numTxChain; /* The total number of active chains */
  8765. A_UINT32 ctl; /* See CONFORMANCE_TEST_LIMITS enumeration */
  8766. A_UINT32 flags; /* See WMI_TPC_CONFIG_EVENT_FLAG */
  8767. /* support_bits:
  8768. * Tells info about BE, HE, HE_EXTRA_MCS, 160, 320, 11BE PUNC.
  8769. * Refer to enum WMI_HALPHY_TPC_STATS_SUPPORT_BITF.
  8770. */
  8771. A_UINT32 support_bits;
  8772. A_UINT32 nss; /* target specific NUM_SPATIAL_STREAM flag */
  8773. } wmi_tpc_configs;
  8774. typedef struct {
  8775. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_max_reg_power_allowed */
  8776. A_UINT32 reg_power_type; /* 0: maxRegAllowedPower (1D array),
  8777. * 1: maxRegAllowedPowerAGCDD (2D array),
  8778. * 2: maxRegAllowedPowerAGSTBC (2D array),
  8779. * 3: maxRegAllowedPowerAGTXBF (2D array)
  8780. */
  8781. A_UINT32 reg_power_array_len; /* Length of the regulatory power array being sent in bytes */
  8782. A_UINT32 d1; /* the length of 1st (innermost) dimension array */
  8783. A_UINT32 d2; /* the length of 2nd dimension array */
  8784. A_UINT32 d3; /* the length of 3rd dimension array (for future use) */
  8785. A_UINT32 d4; /* the length of 4th dimension array (for future use) */
  8786. /*
  8787. * This TLV is followed by an A_INT16 TLV-array that will carry
  8788. * one of the four types of regulatory power arrays.
  8789. *
  8790. * The multi-dimensional regulatory power array will be communicated
  8791. * as a flat array: Host to stitch it back as 2D array.
  8792. * For an array[a][b][c][d], d1 = d, d2 = c, d3 = b, d4 = a
  8793. * For a 2D array, array[a][b], d1 = b, d2 = a, d3 = 1, d4 = 1
  8794. * The possible types of following A_INT16 TLV arrays are
  8795. * 1. A_INT16 maxRegAllowedPower[WHAL_TPC_TX_NUM_CHAIN];
  8796. * 2. A_INT16 maxRegAllowedPowerAGCDD[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
  8797. * 3. A_INT16 maxRegAllowedPowerAGSTBC[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
  8798. * 4. A_INT16 maxRegAllowedPowerAGTXBF[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
  8799. * where WHAL_TPC_TX_NUM_CHAIN=2 for CYP and 8 for HK.
  8800. */
  8801. } wmi_max_reg_power_allowed;
  8802. typedef struct {
  8803. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_rates_array */
  8804. A_UINT32 rate_array_type; /* 0: ratesArray,
  8805. * 1: ratesArray2 (for chain > 4),
  8806. * 2: dl_ofdma rate array
  8807. */
  8808. A_UINT32 rate_array_len;
  8809. /* This TLV will be followed by an A_UINT16 TLV array that will
  8810. * carry one of the types of TPC rate arrays.
  8811. * All the rates arrays are 1D arrays.
  8812. * The possible types of following A_UINT16 TLV arrays are
  8813. * 1. A_UINT16 ratesArray[WHAL_TPC_RATE_MAX];
  8814. * This array has to be referred when number of active chains is < 4
  8815. * 2. A_UINT16 ratesArray2[WHAL_TPC_RATE_MAX];
  8816. * This array has to be referred when number of active chains is > 4
  8817. * 3. A_UINT16 ratesArray_DL_OFDMA[72];
  8818. * WHAL_TPC_RATE_MAX is 748 for HK (considering PHY A0 8x8)
  8819. * WHAL_TPC_RATE_MAX is 188 for CYP (considering PHY A0 2x2)
  8820. * Each 16 bit value in the rates array carries both SU and MU
  8821. * target power information.
  8822. * Bits 0:7 contained the SU target power (signed value, 0.25 dBm units),
  8823. * bits 8:15 denote the MU target power (signed value, 0.25 dBm units).
  8824. */
  8825. } wmi_tpc_rates_array;
  8826. typedef struct {
  8827. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_ctl_pwr_table */
  8828. A_UINT32 ctl_array_type; /* 0: ctl_array,
  8829. * 1: ctl_160 array,
  8830. * 2: ctl_dlOfdma array,
  8831. * 3: ctl_ulOfdma array
  8832. */
  8833. A_UINT32 ctl_array_len; /* Length of the CTL array being sent in bytes */
  8834. A_UINT32 end_of_ctl_pwr; /* Message MAY be split into smaller chunks
  8835. * to fit in the WMI svc msg size limit:
  8836. * 0 indicates more chunks of CTL info to follow,
  8837. * 1 indicates end of CTL info.
  8838. */
  8839. A_UINT32 ctl_pwr_count; /* Incremented for every CTL info chunk
  8840. * for Host to know the sequence.
  8841. */
  8842. A_UINT32 d1; /* the length of 1st (innermost) dimension array */
  8843. A_UINT32 d2; /* the length of 2nd dimension array */
  8844. A_UINT32 d3; /* the length of 3rd dimension array */
  8845. A_UINT32 d4; /* the length of 4th dimension array */
  8846. /* This TLV will be followed by an A_INT8 TLV-array that will
  8847. * carry one the types of CTL power arrays.
  8848. * The CTL array will be multi-dimensional, but will be communicated as
  8849. * a flat array; the host has to stitch it back into a 4D array.
  8850. * The possible types of following A_INT8 arrays are
  8851. * 1. A_INT8 ctlEdgePwrBF[WHAL_MAX_NUM_CHAINS][2][10][8];
  8852. * 2. A_INT8 ctlEdgePwr160[WHAL_MAX_NUM_CHAINS/2][2][2][4];
  8853. * 3. A_INT8 ctlEdgePwrBF_dlOFDMA[WHAL_MAX_NUM_CHAINS][2][3][8];
  8854. * For e.g., in ctlEdgePwrBF
  8855. * D4 = WHAL_MAX_NUM_CHAINS = 8 for HK, 2 for CYP, 4 for Pine
  8856. * D3 = BF on/off = 2
  8857. * D2 = 10 which the number of different tx modes,
  8858. * like cck, legacy, HT20, HT40, VHT80, etc.
  8859. * D1 = NSS = 8, number of spatial streams
  8860. * Total number of elements = D4*D3*D2*D1
  8861. * The same will apply for ctl_dlOfdma array, except that the values
  8862. * of d1,d2,d3,d4 will be different.
  8863. */
  8864. } wmi_tpc_ctl_pwr_table;
  8865. typedef struct {
  8866. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_request_fixed_param */
  8867. A_UINT32 param; /* 1 = read only, 2= read and clear */
  8868. A_UINT32 pdev_id; /* pdev_id for identifying mac */
  8869. } wmi_pdev_bss_chan_info_request_fixed_param;
  8870. typedef struct {
  8871. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_request_fixed_param */
  8872. A_UINT32 total_len; /* the total number of ctl table bytes to be transferred */
  8873. A_UINT32 len; /* the number of ctltable bytes in current payload */
  8874. A_UINT32 seq; /* the number of current transfers */
  8875. /*
  8876. * This TLV is followed by the following additional TLVs:
  8877. * ARRAY_BYTE TLV of ctltable_data
  8878. */
  8879. } wmi_pdev_update_ctltable_request_fixed_param;
  8880. #define WMI_ESP_ESTIMATE_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  8881. #define WMI_ESP_ESTIMATE_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  8882. #define WMI_ESP_ESTIMATE_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  8883. #define WMI_ESP_ESTIMATE_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  8884. #define WMI_ESP_ESTIMATE_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  8885. #define WMI_ESP_ESTIMATE_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  8886. #define WMI_ESP_ESTIMATE_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  8887. #define WMI_ESP_ESTIMATE_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  8888. typedef struct {
  8889. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_esp_estimate_event_fixed_param */
  8890. /** pdev_id for identifying the MAC
  8891. * See macros starting with WMI_PDEV_ID_ for values.
  8892. * In non-DBDC case host should set it to 0
  8893. */
  8894. A_UINT32 pdev_id;
  8895. /*
  8896. * Percentage of air time available for each AC
  8897. * BIT[0-7] : AC_BE
  8898. * BIT[8-15] : AC_BK
  8899. * BIT[16-23] : AC_VI
  8900. * BIT[24-31] : AC_VO
  8901. */
  8902. A_UINT32 ac_airtime_percentage;
  8903. } wmi_esp_estimate_event_fixed_param;
  8904. #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
  8905. #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
  8906. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
  8907. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  8908. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
  8909. (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  8910. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
  8911. do { \
  8912. (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  8913. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
  8914. WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  8915. } while (0)
  8916. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
  8917. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  8918. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
  8919. (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  8920. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
  8921. do { \
  8922. (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  8923. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
  8924. WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  8925. } while (0)
  8926. typedef struct {
  8927. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
  8928. union {
  8929. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  8930. /** pdev_id for identifying the MAC
  8931. * See macros starting with WMI_PDEV_ID_ for values.
  8932. */
  8933. A_UINT32 pdev_id;
  8934. };
  8935. /**
  8936. * The following "value" field is divided into bit fields as follows:
  8937. * bits | purpose
  8938. * -----+---------------------------------------
  8939. * 0 | enable/disable FAST diversity
  8940. * 1 | enable/disable SLOW diversity
  8941. * 5:2 | chain0 slow-diversity weighting factor
  8942. * 9:6 | chain1 slow-diversity weighting factor
  8943. * 31:10| currently unused (set to 0x0)
  8944. * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
  8945. */
  8946. A_UINT32 value;
  8947. } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
  8948. #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
  8949. typedef struct {
  8950. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
  8951. A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
  8952. A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
  8953. A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
  8954. A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
  8955. A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
  8956. 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] */
  8957. 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] */
  8958. A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event */
  8959. A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
  8960. } wmi_rssi_breach_monitor_config_fixed_param;
  8961. typedef struct {
  8962. /** parameter */
  8963. A_UINT32 param;
  8964. } wmi_pdev_dump_cmd;
  8965. typedef enum {
  8966. PAUSE_TYPE_CHOP = 0x1, /** for MCC (switch channel), only vdev_map is valid */
  8967. PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
  8968. PAUSE_TYPE_UAPSD = 0x3, /** for uapsd, only peer_id and tid_map are valid. */
  8969. PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, /** only vdev_map is valid, actually only one vdev id is set at one time */
  8970. PAUSE_TYPE_P2P_GO_PS = 0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
  8971. PAUSE_TYPE_STA_ADD_BA = 0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
  8972. PAUSE_TYPE_AP_PS = 0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
  8973. PAUSE_TYPE_IBSS_PS = 0x8, /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
  8974. PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, /** for TDLS offchannel MCC (switch channel), only vdev_map is valid, TDLS connection tracker needs to be notified */
  8975. PAUSE_TYPE_HOST = 0x15, /* host is requesting vdev pause */
  8976. } wmi_tx_pause_type;
  8977. typedef enum {
  8978. ACTION_PAUSE = 0x0,
  8979. ACTION_UNPAUSE = 0x1,
  8980. } wmi_tx_pause_action;
  8981. typedef struct {
  8982. A_UINT32 tlv_header;
  8983. A_UINT32 pause_type;
  8984. A_UINT32 action;
  8985. A_UINT32 vdev_map;
  8986. A_UINT32 peer_id;
  8987. A_UINT32 tid_map;
  8988. } wmi_tx_pause_event_fixed_param;
  8989. typedef enum {
  8990. WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
  8991. WMI_MGMT_TX_COMP_TYPE_DISCARD,
  8992. WMI_MGMT_TX_COMP_TYPE_INSPECT,
  8993. WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
  8994. WMI_MGMT_TX_COMP_TYPE_MAX,
  8995. } WMI_MGMT_TX_COMP_STATUS_TYPE;
  8996. #define WMI_VDEV_ID_VALID_FROM_INFO_GET(info) \
  8997. WMI_GET_BITS(info, 3, 1)
  8998. #define WMI_VDEV_ID_VALID_FROM_INFO_SET(info,val) \
  8999. WMI_SET_BITS(info, 3, 1, val)
  9000. #define WMI_VDEV_ID_FROM_INFO_GET(info) \
  9001. WMI_GET_BITS(info, 4, 8)
  9002. #define WMI_VDEV_ID_FROM_INFO_SET(info,val) \
  9003. WMI_SET_BITS(info, 4, 8, val)
  9004. typedef struct {
  9005. A_UINT32 tlv_header;
  9006. A_UINT32 desc_id; /* from tx_send_cmd */
  9007. A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
  9008. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  9009. * See macros starting with WMI_PDEV_ID_ for values.
  9010. */
  9011. A_UINT32 pdev_id;
  9012. /* ppdu_id
  9013. * Hardware PPDU ID for tracking the completion stats
  9014. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  9015. */
  9016. A_UINT32 ppdu_id;
  9017. /* ack_rssi
  9018. * TX mgmt ack RSSI report to host.
  9019. * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
  9020. * ACK RSSI is reported as SNR dB, i.e. how many dB the RSSI is above
  9021. * the noise floor.
  9022. */
  9023. A_UINT32 ack_rssi;
  9024. /* xmit rate in kbps */
  9025. A_UINT32 tx_rate;
  9026. /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h */
  9027. A_UINT32 peer_phymode;
  9028. A_UINT32 retries_count;
  9029. /* current 64 bit TSF timestamp */
  9030. A_UINT32 tx_tsf_l32;
  9031. A_UINT32 tx_tsf_u32;
  9032. /* info:
  9033. * Bit[0:2] - band on which frame is sent, band value will be
  9034. * one of the wmi_mlo_band_info_t enum constants.
  9035. * Macros WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET,SET
  9036. * can be reused for setting mlo band info.
  9037. * Bit[3] - set when vdev_id_info is populated in Bit[4:11]
  9038. * macros WMI_VDEV_ID_VALID_FROM_INFO_GET,SET can be used
  9039. * Bit[4:11] - vdev_id on which frame is sent,
  9040. * Macros WMI_VDEV_ID_FROM_INFO_GET,SET can be used
  9041. * Bit[12:31] - reserved
  9042. */
  9043. A_UINT32 info;
  9044. } wmi_mgmt_tx_compl_event_fixed_param;
  9045. typedef struct {
  9046. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_compl_event_fixed_param */
  9047. A_UINT32 desc_id; /* from tx_send_cmd */
  9048. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  9049. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  9050. * See macros starting with WMI_PDEV_ID_ for values.
  9051. */
  9052. A_UINT32 pdev_id;
  9053. /* ppdu_id
  9054. * Hardware PPDU ID for tracking the completion stats
  9055. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  9056. */
  9057. A_UINT32 ppdu_id;
  9058. } wmi_offchan_data_tx_compl_event_fixed_param;
  9059. typedef struct {
  9060. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_qos_null_frame_tx_compl_event_fixed_param */
  9061. A_UINT32 desc_id; /* echoed from tx_send_cmd */
  9062. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  9063. /** pdev_id for identifying the MAC that transmitted the QoS NULL frame
  9064. * See macros starting with WMI_PDEV_ID_ for values.
  9065. */
  9066. A_UINT32 pdev_id;
  9067. /* ppdu_id
  9068. * Hardware PPDU ID for tracking the completion stats
  9069. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  9070. */
  9071. A_UINT32 ppdu_id;
  9072. /* ack_rssi
  9073. * TX mgmt ack RSSI report to host.
  9074. * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
  9075. * ack_rssi is reported in dBm.
  9076. */
  9077. A_INT32 ack_rssi;
  9078. } wmi_qos_null_frame_tx_compl_event_fixed_param;
  9079. typedef struct {
  9080. A_UINT32 tlv_header;
  9081. A_UINT32 num_reports;
  9082. /* tlv for completion
  9083. * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
  9084. * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
  9085. * A_UINT32 ppdu_id[num_reports]; <- list of PPDU IDs
  9086. * A_UINT32 ack_rssi[num_reports]; <- list of ack RSSI
  9087. * RSSI units = dB w.r.t. noise floor
  9088. */
  9089. } wmi_mgmt_tx_compl_bundle_event_fixed_param;
  9090. #define WMI_TPC_RATE_MAX 160
  9091. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  9092. #define WMI_TPC_TX_NUM_CHAIN 4
  9093. typedef enum {
  9094. /* bits 0-7 for table flags */
  9095. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  9096. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  9097. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  9098. /* bits 8-11 for interface version flags */
  9099. WMI_TPC_CONFIG_EVENT_FLAG_IF_MASK = 0x0F00,
  9100. WMI_TPC_CONFIG_EVENT_FLAG_IF_V1 = 0x0100,
  9101. } WMI_TPC_CONFIG_EVENT_FLAG;
  9102. typedef struct {
  9103. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */
  9104. A_UINT32 regDomain;
  9105. A_UINT32 chanFreq;
  9106. A_UINT32 phyMode;
  9107. A_UINT32 twiceAntennaReduction;
  9108. A_UINT32 twiceMaxRDPower;
  9109. A_INT32 twiceAntennaGain;
  9110. A_UINT32 powerLimit;
  9111. A_UINT32 rateMax;
  9112. A_UINT32 numTxChain;
  9113. A_UINT32 ctl;
  9114. A_UINT32 flags;
  9115. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  9116. A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
  9117. A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  9118. A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  9119. A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  9120. /** pdev_id for identifying the MAC
  9121. * See macros starting with WMI_PDEV_ID_ for values.
  9122. */
  9123. A_UINT32 pdev_id;
  9124. /* This TLV is followed by further TLVs:
  9125. * 1. byte array:
  9126. * A_UINT8 ratesArray[];
  9127. * 2a. multi-dimensional array dimension spec:
  9128. * wmi_tlv_arrays_len_param ctlPwrTbl_param[0 or 1]
  9129. *
  9130. * 2b. ctl power table
  9131. * A_UINT8 ctlPwrTbl_buf[bf][modes][nss], i.e.
  9132. * A_UINT8 ctlPwrTbl_buf[d3_len * d2_len * d1_len]
  9133. * bf is [0 or 1] for [on or off].
  9134. * For 2G, modes is [0, 1, 2, or 3] for
  9135. * [cck, legacy, (v)ht20, or (v)ht40]
  9136. * For 5G, modes is [0, 1, 2, or 3] for
  9137. * [legacy, (v)ht20, (v)ht40, or vht80]
  9138. * nss is [0, 1, 2, or 3] for the number of streams 1~4.
  9139. */
  9140. } wmi_pdev_tpc_config_event_fixed_param;
  9141. typedef struct {
  9142. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_div_rssi_antid_event_fixed_param */
  9143. A_UINT32 tlv_header;
  9144. /** how many elements in the MAX_CHAINS arrays below contain valid info */
  9145. A_UINT32 num_chains_valid;
  9146. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  9147. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  9148. /** index of the last-used antenna for each chain */
  9149. A_UINT32 ant_id[WMI_MAX_CHAINS];
  9150. /** mac address of diversity peer */
  9151. wmi_mac_addr macaddr;
  9152. /* EVM value for stream0 and stream1 20Mhz, dB units */
  9153. A_INT32 chain_evm[WMI_MAX_CHAINS];
  9154. } wmi_pdev_div_rssi_antid_event_fixed_param;
  9155. typedef struct {
  9156. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_event_fixed_param */
  9157. A_UINT32 freq; /* Units in MHz */
  9158. A_INT32 noise_floor; /* units are dBm */
  9159. /* rx clear - how often the channel was unused */
  9160. A_UINT32 rx_clear_count_low; /* low 31 bits of rx_clear cnt in 64bits format */
  9161. A_UINT32 rx_clear_count_high; /* high 31 bits of rx_clear cnt in 64bits format */
  9162. /* cycle count - elapsed time during the measured period, in clock ticks */
  9163. A_UINT32 cycle_count_low; /* low 31 bits of cycle cnt in 64bits format */
  9164. A_UINT32 cycle_count_high; /* high 31 bits of cycle cnt in 64bits format */
  9165. /* tx cycle count - elapsed time spent in tx, in clock ticks */
  9166. A_UINT32 tx_cycle_count_low; /* low 31 bits of tx_cycle cnt in 64bits format */
  9167. A_UINT32 tx_cycle_count_high; /* high 31 bits of tx_cycle cnt in 64bits format */
  9168. /* rx cycle count - elapsed time spent in rx, in clock ticks */
  9169. A_UINT32 rx_cycle_count_low; /* low 31 bits of rx_cycle cnt in 64bits format */
  9170. A_UINT32 rx_cycle_count_high; /* high 31 bits of rx_cycle cnt in 64bits format */
  9171. A_UINT32 rx_bss_cycle_count_low; /* low 31 bits of rx cycle cnt for my bss in 64bits format */
  9172. A_UINT32 rx_bss_cycle_count_high; /* high 31 bits of rx_cycle cnt for my bss in 64bits format */
  9173. A_UINT32 pdev_id; /* pdev_id for identifying the MAC */
  9174. } wmi_pdev_bss_chan_info_event_fixed_param;
  9175. typedef struct {
  9176. /* WMI event response update ctltable request to host */
  9177. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_event_fixed_param */
  9178. A_UINT32 total_len; /* the total number of bytes to be transferred */
  9179. A_UINT32 len; /* the number of FW received bytes from host */
  9180. A_UINT32 seq; /* the number of current transfers */
  9181. } wmi_pdev_update_ctltable_event_fixed_param;
  9182. typedef struct {
  9183. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
  9184. A_UINT32 periodCnt;
  9185. A_UINT32 L1Cnt;
  9186. A_UINT32 L11Cnt;
  9187. A_UINT32 L12Cnt;
  9188. A_UINT32 L1Entry;
  9189. A_UINT32 L11Entry;
  9190. A_UINT32 L12Entry;
  9191. /** pdev_id for identifying the MAC
  9192. * See macros starting with WMI_PDEV_ID_ for values.
  9193. */
  9194. A_UINT32 pdev_id;
  9195. } wmi_pdev_l1ss_track_event_fixed_param;
  9196. typedef struct {
  9197. A_UINT32 len;
  9198. A_UINT32 msgref;
  9199. A_UINT32 segmentInfo;
  9200. } wmi_pdev_seg_hdr_info;
  9201. /*
  9202. * Transmit power scale factor.
  9203. *
  9204. */
  9205. typedef enum {
  9206. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  9207. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  9208. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  9209. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  9210. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  9211. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  9212. } WMI_TP_SCALE;
  9213. #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
  9214. typedef struct {
  9215. /** message buffer, NULL terminated */
  9216. char bufp[WMI_MAX_DEBUG_MESG];
  9217. } wmi_debug_mesg_event;
  9218. enum {
  9219. /** P2P device */
  9220. VDEV_SUBTYPE_P2PDEV = 0,
  9221. /** P2P client */
  9222. VDEV_SUBTYPE_P2PCLI,
  9223. /** P2P GO */
  9224. VDEV_SUBTYPE_P2PGO,
  9225. /** BT3.0 HS */
  9226. VDEV_SUBTYPE_BT,
  9227. };
  9228. typedef struct {
  9229. /** idnore power , only use flags , mode and freq */
  9230. wmi_channel chan;
  9231. } wmi_pdev_set_channel_cmd;
  9232. typedef struct {
  9233. A_UINT32 tlv_header;
  9234. /* DBW puncture bitmap */
  9235. A_UINT32 dbw_puncture_20mhz_bitmap;
  9236. } wmi_dbw_chan_info;
  9237. typedef enum {
  9238. WMI_PKTLOG_EVENT_RX = 0x00000001,
  9239. WMI_PKTLOG_EVENT_TX = 0x00000002,
  9240. WMI_PKTLOG_EVENT_RCF = 0x00000004, /* Rate Control Find */
  9241. WMI_PKTLOG_EVENT_RCU = 0x00000008, /* Rate Control Update */
  9242. /* 0x10 used by deprecated DBG_PRINT */
  9243. WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x00000020, /* To support Smart Antenna */
  9244. WMI_PKTLOG_EVENT_SW = 0x00000040, /* To support SW defined events */
  9245. WMI_PKTLOG_EVENT_PHY = 0x00000080, /* To support PHY stats */
  9246. WMI_PKTLOG_EVENT_CBF = 0x00000100, /* To support CBF's filter in */
  9247. /* To support hybrid of events from FW and tx monitor status ring */
  9248. WMI_PKTLOG_EVENT_HYBRID_TX = 0x00000200,
  9249. } WMI_PKTLOG_EVENT;
  9250. typedef enum {
  9251. WMI_PKTLOG_ENABLE_AUTO = 0, /* (default) FW will decide under what conditions to enable pktlog */
  9252. WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
  9253. } WMI_PKTLOG_ENABLE;
  9254. typedef enum {
  9255. WMI_PKTLOG_FILTER_IN = 0, /* capture only for the MAC addresses in pktlog_mac_addr_list*/
  9256. WMI_PKTLOG_FILTER_OUT = 1, /* capture for all MAC addresses except those in pktlog_mac_addr_list */
  9257. } WMI_PKTLOG_FILTER_TYPE;
  9258. typedef struct {
  9259. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
  9260. /** pdev_id for identifying the MAC
  9261. * See macros starting with WMI_PDEV_ID_ for values.
  9262. */
  9263. A_UINT32 pdev_id;
  9264. A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
  9265. A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
  9266. } wmi_pdev_pktlog_enable_cmd_fixed_param;
  9267. typedef struct {
  9268. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
  9269. /** pdev_id for identifying the MAC
  9270. * See macros starting with WMI_PDEV_ID_ for values.
  9271. */
  9272. A_UINT32 pdev_id;
  9273. } wmi_pdev_pktlog_disable_cmd_fixed_param;
  9274. typedef struct {
  9275. /** TLV tag and len; tag equals
  9276. * WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_info */
  9277. A_UINT32 tlv_header;
  9278. /** mac addr of the peer to be filtered */
  9279. wmi_mac_addr peer_mac_address;
  9280. } wmi_pdev_pktlog_filter_info;
  9281. typedef struct {
  9282. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_cmd_fixed_param */
  9283. /** pdev_id for identifying the MAC
  9284. * See macros starting with WMI_PDEV_ID_ for values.
  9285. */
  9286. A_UINT32 pdev_id;
  9287. /** 0 - disable filtering, 1 - enable filtering */
  9288. A_UINT32 enable;
  9289. A_UINT32 filter_type; /* WMI_PKTLOG_FILTER_TYPE */
  9290. A_UINT32 num_of_mac_addresses;
  9291. /* This TLV is followed by another TLV of array of structs
  9292. * wmi_pdev_pktlog_filter_info pdev_pktlog_filter_info[];
  9293. */
  9294. } wmi_pdev_pktlog_filter_cmd_fixed_param;
  9295. /**
  9296. * WMI event to send packet log decode information to Host.
  9297. * This sends the metadata which will be embedded by Host in the file-level
  9298. * header of the pktlog trace file (i.e. the ath_pktlog_bufhdr struct).
  9299. * This will be later used by the pktlog post-processing scripts to get
  9300. * prerequisite pktlog_defs*.JSON files for decoding the trace.
  9301. */
  9302. typedef struct {
  9303. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_decode_info_evt_fixed_param */
  9304. /** pdev_id for identifying the MAC
  9305. * See macros starting with WMI_PDEV_ID_ for values.
  9306. */
  9307. A_UINT32 pdev_id;
  9308. /** Forty byte field for storing software image as null terminated string */
  9309. A_UINT8 software_image[40];
  9310. /** Forty byte field for storing chip info as null terminated string */
  9311. A_UINT8 chip_info[40];
  9312. /** Four byte field for storing JSON version */
  9313. A_UINT32 pktlog_defs_json_version;
  9314. } wmi_pdev_pktlog_decode_info_evt_fixed_param;
  9315. typedef enum {
  9316. WMI_ROGUE_AP_ON_STA_PS = 1, /* rogue ap on sta ps module */
  9317. } WMI_ROGUE_AP_TYPE;
  9318. typedef struct {
  9319. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_fixed_param */
  9320. /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
  9321. * See macros starting with WMI_PDEV_ID_ for values.
  9322. */
  9323. A_UINT32 pdev_id;
  9324. /** rogue ap type, see WMI_ROGUE_AP_TYPE */
  9325. A_UINT32 type;
  9326. /** Enable detection of rogue ap in the ps module
  9327. *
  9328. * 0 -> disabled
  9329. * 1 -> enabled (default)
  9330. */
  9331. A_UINT32 sta_ps_detection_enabled;
  9332. /* This TLV is followed by rap_param for each rogue ap:
  9333. * wmi_pdev_set_rap_config_on_sta_ps_tlv_param rap_param[];
  9334. */
  9335. } wmi_pdev_set_rap_config_fixed_param;
  9336. typedef struct {
  9337. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_on_sta_ps_tlv_param */
  9338. /** bssid of rogue ap */
  9339. wmi_mac_addr bssid;
  9340. } wmi_pdev_set_rap_config_on_sta_ps_tlv_param;
  9341. typedef struct {
  9342. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
  9343. /** pdev_id for identifying the MAC
  9344. * See macros starting with WMI_PDEV_ID_ for values.
  9345. */
  9346. A_UINT32 pdev_id;
  9347. A_UINT32 enable_Mib; /** enable for mib stats collection. Stats are delivered to host in wmi_mib_stats structure.
  9348. * If enable_Mib=1, stats collection is enabled. If enable_Mib=0, stats collection does not happen */
  9349. } wmi_mib_stats_enable_cmd_fixed_param;
  9350. /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
  9351. * NOTE: This constant cannot be changed without breaking
  9352. * WMI Compatibility. */
  9353. #define WMI_DSCP_MAP_MAX (64)
  9354. /*
  9355. * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
  9356. * @details
  9357. * Create an API for sending the custom DSCP-to-TID map to the target
  9358. * If this is a request from the user space or from above the UMAC
  9359. * then the best place to implement this is in the umac_if_offload of the OL path.
  9360. * Provide a place holder for this API in the ieee80211com (ic).
  9361. *
  9362. * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
  9363. * in the target should be directed to the function pointer in the ic.
  9364. *
  9365. * Implementation details of the API to send the map to the target are as described-
  9366. *
  9367. * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
  9368. * DSCP-to-TID map is a one dimensional u_int32_t array of length 64 to
  9369. * accommodate 64 TID values for 2^6 (64) DSCP ids.
  9370. * Example:
  9371. * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
  9372. * 0, 0, 0, 0, 0, 0, 0, 0,
  9373. * 1, 1, 1, 1, 1, 1, 1, 1,
  9374. * 2, 2, 2, 2, 2, 2, 2, 2,
  9375. * 3, 3, 3, 3, 3, 3, 3, 3,
  9376. * 4, 4, 4, 4, 4, 4, 4, 4,
  9377. * 5, 5, 5, 5, 5, 5, 5, 5,
  9378. * 6, 6, 6, 6, 6, 6, 6, 6,
  9379. * 7, 7, 7, 7, 7, 7, 7, 7,
  9380. * };
  9381. *
  9382. * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
  9383. *
  9384. * 3. Copy the DSCP-to-TID map into the WMI buffer.
  9385. *
  9386. * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
  9387. * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
  9388. * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
  9389. * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
  9390. *
  9391. */
  9392. /* DEPRECATED - use VDEV level command instead
  9393. * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
  9394. */
  9395. typedef struct {
  9396. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
  9397. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  9398. /* map indicating DSCP to TID conversion */
  9399. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  9400. } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
  9401. typedef struct {
  9402. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param */
  9403. A_UINT32 vdev_id;
  9404. /** map indicating DSCP to TID conversion */
  9405. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  9406. A_UINT32 enable_override;
  9407. } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
  9408. enum WMI_WAKE_GPIO_TYPE {
  9409. WMI_WAKE_GPIO_LOW = 1,
  9410. WMI_WAKE_GPIO_HIGH = 2,
  9411. WMI_WAKE_GPIO_RISING_EDGE = 3,
  9412. WMI_WAKE_GPIO_FALLING_EDGE = 4,
  9413. };
  9414. /**
  9415. * Set GPIO numbers used to wakeup host and wakeup target.
  9416. */
  9417. typedef struct {
  9418. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param */
  9419. A_UINT32 host_wakeup_gpio; /* gpio num used to wakeup host, 0xff disable wakeup gpio */
  9420. A_UINT32 host_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  9421. A_UINT32 target_wakeup_gpio; /* gpio num used to wakeup target, 0xff disable wakeup gpio */
  9422. A_UINT32 target_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  9423. } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
  9424. /** Fixed rate (rate-code) for broadcast/ multicast data frames */
  9425. /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
  9426. * @details
  9427. * Create an API for setting the custom rate for the MCAST and BCAST frames
  9428. * in the target. If this is a request from the user space or from above the UMAC
  9429. * then the best place to implement this is in the umac_if_offload of the OL path.
  9430. * Provide a place holder for this API in the ieee80211com (ic).
  9431. *
  9432. * Implementation details of the API to set custom rates for MCAST and BCAST in
  9433. * the target are as described-
  9434. *
  9435. * 1. The function will have 3 arguments-
  9436. * vap structure,
  9437. * MCAST/ BCAST identifier code,
  9438. * 8 bit rate code
  9439. *
  9440. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  9441. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  9442. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  9443. * b'3-b'0 indicate the rate, which is indicated as follows:
  9444. * OFDM : 0: OFDM 48 Mbps
  9445. * 1: OFDM 24 Mbps
  9446. * 2: OFDM 12 Mbps
  9447. * 3: OFDM 6 Mbps
  9448. * 4: OFDM 54 Mbps
  9449. * 5: OFDM 36 Mbps
  9450. * 6: OFDM 18 Mbps
  9451. * 7: OFDM 9 Mbps
  9452. * CCK (pream == 1)
  9453. * 0: CCK 11 Mbps Long
  9454. * 1: CCK 5.5 Mbps Long
  9455. * 2: CCK 2 Mbps Long
  9456. * 3: CCK 1 Mbps Long
  9457. * 4: CCK 11 Mbps Short
  9458. * 5: CCK 5.5 Mbps Short
  9459. * 6: CCK 2 Mbps Short
  9460. * HT/VHT (pream == 2/3)
  9461. * 0..7: MCS0..MCS7 (HT)
  9462. * 0..9: MCS0..MCS9 (VHT)
  9463. *
  9464. * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
  9465. * to the target.
  9466. * Arguments to the API are-
  9467. * wmi handle,
  9468. * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
  9469. * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
  9470. * rate value.
  9471. */
  9472. typedef enum {
  9473. WMI_SET_MCAST_RATE,
  9474. WMI_SET_BCAST_RATE
  9475. } MCAST_BCAST_RATE_ID;
  9476. typedef struct {
  9477. MCAST_BCAST_RATE_ID rate_id;
  9478. A_UINT32 rate;
  9479. } mcast_bcast_rate;
  9480. typedef struct {
  9481. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
  9482. A_UINT32 cwmin;
  9483. A_UINT32 cwmax;
  9484. A_UINT32 aifs;
  9485. A_UINT32 txoplimit;
  9486. A_UINT32 acm;
  9487. A_UINT32 no_ack;
  9488. } wmi_wmm_params;
  9489. /* DEPRECATED - use VDEV level command instead
  9490. * (wmi_vdev_set_wmm_params_cmd_fixed_param)
  9491. */
  9492. typedef struct {
  9493. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
  9494. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  9495. A_UINT32 dg_type;
  9496. /* The TLVs for the 4 AC follows:
  9497. * wmi_wmm_params wmm_params_ac_be;
  9498. * wmi_wmm_params wmm_params_ac_bk;
  9499. * wmi_wmm_params wmm_params_ac_vi;
  9500. * wmi_wmm_params wmm_params_ac_vo;
  9501. */
  9502. } wmi_pdev_set_wmm_params_cmd_fixed_param;
  9503. typedef struct {
  9504. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pifs_params */
  9505. /* The unit of this offset is PIFS slot time */
  9506. A_UINT32 sap_pifs_offset;
  9507. A_UINT32 leb_pifs_offset;
  9508. A_UINT32 reb_pifs_offset;
  9509. } wmi_pifs_params;
  9510. typedef enum {
  9511. WMI_EDCA_PARAM_TYPE_AGGRESSIVE = 0,
  9512. WMI_EDCA_PARAM_TYPE_PIFS = 1,
  9513. } WMI_EDCA_PARAM_TYPE;
  9514. typedef struct {
  9515. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_twt_edca_params_cmd_fixed_param */
  9516. A_UINT32 tlv_header;
  9517. A_UINT32 vdev_id;
  9518. A_UINT32 type; /* contains a WMI_EDCA_PARAM_TYPE value */
  9519. /*
  9520. * This TLV is (optionally) followed by other TLVs as below:
  9521. * wmi_wmm_params wmm_params[0/1];
  9522. * present if type is WMI_EDCA_PARAM_TYPE_AGGRESSIVE
  9523. * wmi_pifs_params pifs_params[0/1];
  9524. * present if type is WMI_EDCA_PARAM_TYPE_PIFS
  9525. */
  9526. } wmi_vdev_set_twt_edca_params_cmd_fixed_param;
  9527. typedef struct {
  9528. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_twt_session_stats_info_cmd_fixed_param */
  9529. A_UINT32 tlv_header;
  9530. A_UINT32 vdev_id;
  9531. } wmi_vdev_get_twt_session_stats_info_cmd_fixed_param;
  9532. typedef enum {
  9533. WMI_REQUEST_PEER_STAT = 0x00001,
  9534. WMI_REQUEST_AP_STAT = 0x00002,
  9535. WMI_REQUEST_PDEV_STAT = 0x00004,
  9536. WMI_REQUEST_VDEV_STAT = 0x00008,
  9537. WMI_REQUEST_BCNFLT_STAT = 0x00010,
  9538. WMI_REQUEST_VDEV_RATE_STAT = 0x00020,
  9539. WMI_REQUEST_INST_STAT = 0x00040,
  9540. WMI_REQUEST_MIB_STAT = 0x00080,
  9541. WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x00100,
  9542. WMI_REQUEST_CONGESTION_STAT = 0x00200,
  9543. WMI_REQUEST_PEER_EXTD_STAT = 0x00400,
  9544. WMI_REQUEST_BCN_STAT = 0x00800,
  9545. WMI_REQUEST_BCN_STAT_RESET = 0x01000,
  9546. WMI_REQUEST_PEER_EXTD2_STAT = 0x02000,
  9547. WMI_REQUEST_MIB_EXTD_STAT = 0x04000,
  9548. WMI_REQUEST_PMF_BCN_PROTECT_STAT = 0x08000,
  9549. WMI_REQUEST_VDEV_EXTD_STAT = 0x10000,
  9550. WMI_REQUEST_PDEV_EXTD_STAT = 0x20000,
  9551. WMI_REQUEST_PDEV_TELEMETRY_STAT = 0x40000,
  9552. } wmi_stats_id;
  9553. /*
  9554. * cfg_retry_count is set to max number of times the AP should try sending
  9555. * QoS Null frames to the STA for measuring the instantaneous RSSI
  9556. *
  9557. * retry_count is used to maintain the number of times the AP has tried sending
  9558. * QoS Null frames to the STA for measuring the instantaneous RSSI
  9559. */
  9560. typedef struct {
  9561. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_sub_struc_param */
  9562. A_UINT32 cfg_retry_count;
  9563. A_UINT32 retry_count;
  9564. } wmi_inst_rssi_stats_params;
  9565. typedef struct {
  9566. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
  9567. wmi_stats_id stats_id;
  9568. /** unique id identifying the VDEV, generated by the caller */
  9569. A_UINT32 vdev_id;
  9570. /** peer MAC address */
  9571. wmi_mac_addr peer_macaddr;
  9572. 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. */
  9573. /*
  9574. * This TLV is (optionally) followed by other TLVs:
  9575. * wmi_inst_rssi_stats_params inst_rssi_params;
  9576. * A_UINT32 vdev_id_bitmap[];
  9577. * This array is present and non-zero length in MLO case, stats should
  9578. * only be provided from the vdev_id_bitmap in the bitmap when it is
  9579. * present.
  9580. * wmi_mac_addr mld_macaddr[];
  9581. * This array is present and non-zero length in MLO case, stats should
  9582. * only be provided from the peers with the MLD MAC addresses specified
  9583. * in the array.
  9584. */
  9585. } wmi_request_stats_cmd_fixed_param;
  9586. /* stats type bitmap */
  9587. #define WMI_LINK_STATS_RADIO 0x00000001
  9588. #define WMI_LINK_STATS_IFACE 0x00000002
  9589. #define WMI_LINK_STATS_ALL_PEER 0x00000004
  9590. #define WMI_LINK_STATS_PER_PEER 0x00000008
  9591. #define WMI_LINK_STATS_IPA 0x00000010
  9592. /* wifi clear statistics bitmap */
  9593. #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
  9594. #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
  9595. #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
  9596. #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
  9597. #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
  9598. #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
  9599. #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
  9600. #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
  9601. #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
  9602. #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
  9603. /** Default value for stats if the stats collection has not started */
  9604. #define WMI_STATS_VALUE_INVALID 0xffffffff
  9605. #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
  9606. #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
  9607. #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
  9608. #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
  9609. #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  9610. #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  9611. typedef struct {
  9612. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
  9613. A_UINT32 num_of_diag_events_logs;
  9614. /* The TLVs will follow.
  9615. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  9616. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  9617. * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
  9618. */
  9619. } wmi_diag_event_log_config_fixed_param;
  9620. #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  9621. #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  9622. #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
  9623. #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
  9624. typedef struct {
  9625. A_UINT32 tlv_header;
  9626. A_UINT32 num_of_diag_events_logs;
  9627. /* The TLVs will follow.
  9628. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  9629. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  9630. * Bit 17 - Frequency of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
  9631. * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
  9632. */
  9633. } wmi_diag_event_log_supported_event_fixed_params;
  9634. typedef struct {
  9635. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
  9636. A_UINT32 reserved0; /** placeholder for future */
  9637. } wmi_debug_mesg_flush_fixed_param;
  9638. typedef struct {
  9639. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_data_stall_param */
  9640. A_UINT32 vdev_id_bitmap; /** bitmap representation for vdev_id's where data stall happened */
  9641. A_UINT32 data_stall_type; /** wlan_dbg_data_stall_type_e */
  9642. /** reason_code1:
  9643. * The information stored in reason_code1 varies based on the data stally
  9644. * type values:
  9645. * data_stall_type | reason_code1
  9646. * -----------------------------------------------------
  9647. * HWSCHED_CMD_FLUSH | flush req reason (0-40)
  9648. * RX_REFILL_FAILED | ring_id (0-7)
  9649. * RX_FCS_LEN_ERROR | exact error type
  9650. */
  9651. A_UINT32 reason_code1;
  9652. A_UINT32 reason_code2; /** on which tid/hwq stall happened */
  9653. A_UINT32 recovery_type; /** wlan_dbg_data_stall_recovery_type_e */
  9654. } wmi_debug_mesg_fw_data_stall_param;
  9655. typedef struct {
  9656. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_cal_failure_param */
  9657. A_UINT32 tlv_header;
  9658. /* wmi_ctrl_path_stats_cal_type_ids enum defines possible cal type IDs */
  9659. A_UINT32 cal_type;
  9660. /* wmi_cal_failure_reason_code enum defines possible failure reason codes */
  9661. A_UINT32 cal_failure_reason_code;
  9662. } wmi_debug_mesg_fw_cal_failure_param;
  9663. typedef struct {
  9664. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
  9665. A_UINT32 reserved0; /** placeholder for future */
  9666. } wmi_debug_mesg_flush_complete_fixed_param;
  9667. typedef struct {
  9668. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
  9669. /* vdev_id, where RSSI breach event occurred */
  9670. A_UINT32 vdev_id;
  9671. /* request id */
  9672. A_UINT32 request_id;
  9673. /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
  9674. A_UINT32 event_bitmap;
  9675. /* rssi at the time of RSSI breach. Unit dBm */
  9676. A_UINT32 rssi;
  9677. /* bssid of the monitored AP's */
  9678. wmi_mac_addr bssid;
  9679. } wmi_rssi_breach_event_fixed_param;
  9680. typedef struct {
  9681. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
  9682. /** unique id identifying the segment */
  9683. A_UINT32 seg_id;
  9684. /** Start address of the segment to be read */
  9685. A_UINT32 seg_start_addr_lo;
  9686. A_UINT32 seg_start_addr_hi;
  9687. /** Length of the segment to be read */
  9688. A_UINT32 seg_length;
  9689. /** Host bufeer address to which the segment will be read and dumped */
  9690. A_UINT32 dest_addr_lo;
  9691. A_UINT32 dest_addr_hi;
  9692. } wmi_fw_mem_dump;
  9693. /* Command to get firmware memory dump*/
  9694. typedef struct {
  9695. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
  9696. /** unique id identifying the request */
  9697. A_UINT32 request_id;
  9698. /** number of memory dump segments */
  9699. A_UINT32 num_fw_mem_dump_segs;
  9700. /**
  9701. * This TLV is followed by another TLV
  9702. * wmi_fw_mem_dump fw_mem_dump[];
  9703. */
  9704. } wmi_get_fw_mem_dump_fixed_param;
  9705. /** Event to indicate the completion of fw mem dump */
  9706. typedef struct {
  9707. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
  9708. /** unique id identifying the request, given in the request stats command */
  9709. A_UINT32 request_id;
  9710. /*In case of Firmware memory dump */
  9711. A_UINT32 fw_mem_dump_complete;
  9712. } wmi_update_fw_mem_dump_fixed_param;
  9713. typedef enum {
  9714. WMI_ROAMING_IDLE = 0,
  9715. WMI_ROAMING_ACTIVE = 1,
  9716. } wmi_roam_state;
  9717. /* access categories */
  9718. typedef enum {
  9719. WMI_AC_VO = 0,
  9720. WMI_AC_VI = 1,
  9721. WMI_AC_BE = 2,
  9722. WMI_AC_BK = 3,
  9723. WMI_AC_MAX = 4,
  9724. } wmi_traffic_ac;
  9725. typedef enum {
  9726. WMI_STA_STATS = 0,
  9727. WMI_SOFTAP_STATS = 1,
  9728. WMI_IBSS_STATS = 2,
  9729. WMI_P2P_CLIENT_STATS = 3,
  9730. WMI_P2P_GO_STATS = 4,
  9731. WMI_NAN_STATS = 5,
  9732. WMI_MESH_STATS = 6,
  9733. } wmi_link_iface_type;
  9734. /* channel operating width */
  9735. typedef enum {
  9736. WMI_CHAN_WIDTH_20 = 0,
  9737. WMI_CHAN_WIDTH_40 = 1,
  9738. WMI_CHAN_WIDTH_80 = 2,
  9739. WMI_CHAN_WIDTH_160 = 3,
  9740. WMI_CHAN_WIDTH_80P80 = 4,
  9741. WMI_CHAN_WIDTH_5 = 5,
  9742. WMI_CHAN_WIDTH_10 = 6,
  9743. WMI_CHAN_WIDTH_165 = 7,
  9744. WMI_CHAN_WIDTH_160P160 = 8,
  9745. WMI_CHAN_WIDTH_320 = 9,
  9746. WMI_CHAN_WIDTH_MAX,
  9747. } wmi_channel_width;
  9748. /* Clear stats */
  9749. typedef struct {
  9750. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
  9751. /** unique id identifying the VDEV, generated by the caller */
  9752. A_UINT32 vdev_id;
  9753. /** stop_stats_collection_req = 1 will imply stop the statistics collection */
  9754. A_UINT32 stop_stats_collection_req;
  9755. /** identifies what stats to be cleared */
  9756. A_UINT32 stats_clear_req_mask;
  9757. /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
  9758. wmi_mac_addr peer_macaddr;
  9759. /*
  9760. * This TLV is (optionally) followed by other TLVs:
  9761. * A_UINT32 vdev_id_bitmap[];
  9762. * This array is present and non-zero length in MLO case, stats should
  9763. * only be cleared for the VDEVs in vdev_id_bitmap in the bitmap when
  9764. * it is present.
  9765. * wmi_mac_addr mld_macaddr[];
  9766. * This array is present and non-zero length in MLO case, stats should
  9767. * only be cleared for the peers with the MLD MAC addresses specified
  9768. * in the array.
  9769. */
  9770. } wmi_clear_link_stats_cmd_fixed_param;
  9771. /* Link Stats configuration params. Trigger the link layer statistics collection*/
  9772. typedef struct {
  9773. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
  9774. /** threshold to classify the pkts as short or long */
  9775. A_UINT32 mpdu_size_threshold;
  9776. /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
  9777. A_UINT32 aggressive_statistics_gathering;
  9778. } wmi_start_link_stats_cmd_fixed_param;
  9779. typedef struct {
  9780. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
  9781. /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  9782. A_UINT32 stats_type;
  9783. /** unique id identifying the VDEV, generated by the caller */
  9784. A_UINT32 vdev_id;
  9785. /** unique id identifying the request, generated by the caller */
  9786. A_UINT32 request_id;
  9787. /** peer MAC address */
  9788. wmi_mac_addr peer_macaddr;
  9789. /*
  9790. * This TLV is (optionally) followed by other TLVs:
  9791. * A_UINT32 vdev_id_bitmap[];
  9792. * This array is present and non-zero length in MLO case, stats should only
  9793. * be provided from the vdev_id_bitmap in the bitmap when it is present.
  9794. * wmi_mac_addr mld_macaddr[];
  9795. * This array is present and non-zero length in MLO case, stats should only
  9796. * be provided from the peers with the MLD MAC addresses specified
  9797. * in the array.
  9798. */
  9799. } wmi_request_link_stats_cmd_fixed_param;
  9800. typedef struct {
  9801. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unified_request_ll_get_sta_cmd_fixed_param */
  9802. /** Type of stats required. This is a bitmask of WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  9803. A_UINT32 link_stats_type;
  9804. /** unique id identifying the VDEV, generated by the caller */
  9805. A_UINT32 vdev_id;
  9806. /** unique id identifying the request, generated by the caller */
  9807. A_UINT32 request_id;
  9808. /** peer MAC address */
  9809. wmi_mac_addr peer_macaddr;
  9810. /** Type of stats required for get station cmd (see wmi_stats_id enum) */
  9811. A_UINT32 get_sta_stats_id;
  9812. /** 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. */
  9813. A_UINT32 pdev_id;
  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_unified_ll_get_sta_cmd_fixed_param;
  9825. #define WLM_STATS_REQ_LINK 0x00000001
  9826. typedef struct {
  9827. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param */
  9828. /** unique id identifying the VDEV, generated by the caller */
  9829. A_UINT32 vdev_id;
  9830. /** WLM event request bitmask
  9831. * Used by host to customize the wlm stats report.
  9832. * Filled with a combination of WLM_STATS_xxx values.
  9833. */
  9834. A_UINT32 request_bitmask;
  9835. } wmi_request_wlm_stats_cmd_fixed_param;
  9836. /* channel statistics */
  9837. typedef struct {
  9838. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
  9839. /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
  9840. A_UINT32 channel_width;
  9841. /** Primary 20 MHz channel */
  9842. A_UINT32 center_freq;
  9843. /** center frequency (MHz) first segment */
  9844. A_UINT32 center_freq0;
  9845. /** center frequency (MHz) second segment */
  9846. A_UINT32 center_freq1;
  9847. /** msecs the radio is awake (32 bits number accruing over time) */
  9848. A_UINT32 radio_awake_time;
  9849. /** msecs the CCA register is busy (32 bits number accruing over time)
  9850. * Includes rx_time but not tx_time.
  9851. */
  9852. A_UINT32 cca_busy_time;
  9853. /** msecs the radio is transmitting (32 bits number accruing over time) */
  9854. A_UINT32 tx_time;
  9855. /** msecs the radio is in active receive (32 bits number accruing over time) */
  9856. A_UINT32 rx_time;
  9857. /*** NOTE ***
  9858. * Be cautious about adding new fields in wmi_channel_stats.
  9859. * STA-centric targets may instantiate many instances of per-channel
  9860. * stats, and consequently may consume a non-trivial amount of on-chip
  9861. * memory for storing the channel stats.
  9862. */
  9863. } wmi_channel_stats;
  9864. /* this structure used for pass vdev id in stats events */
  9865. typedef struct {
  9866. union {
  9867. struct {
  9868. A_UINT32 id : 31, /* the vdev ID */
  9869. validate: 1; /* validate bit, the vdev ID is only valid if this bit set as 1 */
  9870. };
  9871. A_UINT32 vdev_id;
  9872. };
  9873. } wmi_vdev_id_info;
  9874. #define WMI_VDEV_ID_INFO_GET_VDEV_ID(vdev_id_info) WMI_GET_BITS(vdev_id_info, 0, 31)
  9875. #define WMI_VDEV_ID_INFO_SET_VDEV_ID(vdev_id_info, value) WMI_SET_BITS(vdev_id_info, 0, 31, value)
  9876. #define WMI_VDEV_ID_INFO_GET_VALIDATE(vdev_id_info) WMI_GET_BITS(vdev_id_info, 31, 1)
  9877. #define WMI_VDEV_ID_INFO_SET_VALIDATE(vdev_id_info, value) WMI_SET_BITS(vdev_id_info, 31, 1, value)
  9878. typedef struct {
  9879. union {
  9880. struct {
  9881. A_UINT32
  9882. id: 8, /* the vdev ID */
  9883. /* validate:
  9884. * validate bit, the vdev ID (id and link_status) is only valid
  9885. * if this bit set as 1.
  9886. */
  9887. validate: 1,
  9888. /* link_status:
  9889. * 0 -> link inactive
  9890. * 1 -> link active
  9891. */
  9892. link_status: 1,
  9893. reserved:22;
  9894. };
  9895. A_UINT32 vdev_info_word0;
  9896. };
  9897. } wmi_vdev_id_info_v2;
  9898. #define WMI_VDEV_ID_INFO_V2_GET_VDEV_ID(vdev_id_info_v2) WMI_GET_BITS(vdev_id_info_v2, 0, 8)
  9899. #define WMI_VDEV_ID_INFO_V2_SET_VDEV_ID(vdev_id_info_v2, value) WMI_SET_BITS(vdev_id_info_v2, 0, 8, value)
  9900. #define WMI_VDEV_ID_INFO_V2_GET_VALIDATE(vdev_id_info_v2) WMI_GET_BITS(vdev_id_info_v2, 8, 1)
  9901. #define WMI_VDEV_ID_INFO_V2_SET_VALIDATE(vdev_id_info_v2, value) WMI_SET_BITS(vdev_id_info_v2, 8, 1, value)
  9902. #define WMI_VDEV_ID_INFO_V2_GET_LINK_STATUS(vdev_id_info_v2) WMI_GET_BITS(vdev_id_info_v2, 9, 1)
  9903. #define WMI_VDEV_ID_INFO_V2_SET_LINK_STATUS(vdev_id_info_v2, value) WMI_SET_BITS(vdev_id_info_v2, 9, 1, value)
  9904. /*
  9905. * Each step represents 0.5 dB. The starting value is 0 dBm.
  9906. * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
  9907. */
  9908. #define MAX_TPC_LEVELS 64
  9909. /* radio statistics */
  9910. typedef struct {
  9911. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
  9912. /** Wifi radio (if multiple radio supported) */
  9913. A_UINT32 radio_id;
  9914. /** msecs the radio is awake (32 bits number accruing over time) */
  9915. A_UINT32 on_time;
  9916. /** msecs the radio is transmitting (32 bits number accruing over time) */
  9917. A_UINT32 tx_time;
  9918. /** msecs the radio is in active receive (32 bits number accruing over time) */
  9919. A_UINT32 rx_time;
  9920. /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
  9921. A_UINT32 on_time_scan;
  9922. /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
  9923. A_UINT32 on_time_nbd;
  9924. /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
  9925. A_UINT32 on_time_gscan;
  9926. /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
  9927. A_UINT32 on_time_roam_scan;
  9928. /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
  9929. A_UINT32 on_time_pno_scan;
  9930. /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
  9931. A_UINT32 on_time_hs20;
  9932. /** number of channels */
  9933. A_UINT32 num_channels;
  9934. /** tx time per TPC level - DEPRECATED
  9935. * This field is deprecated.
  9936. * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID message.
  9937. */
  9938. A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
  9939. /** msecs the radio is awake due to Host initiated scan (accruing over time) */
  9940. A_UINT32 on_time_host_scan;
  9941. /** msecs the radio is awake due to LPI scan (accruing over time) */
  9942. A_UINT32 on_time_lpi_scan;
  9943. } wmi_radio_link_stats;
  9944. /** tx time per power level statistics */
  9945. typedef struct {
  9946. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */
  9947. /** total number of tx power levels */
  9948. A_UINT32 total_num_tx_power_levels;
  9949. /** number of tx power levels that are carried in this event */
  9950. A_UINT32 num_tx_power_levels;
  9951. /** offset of current stats
  9952. * If ((num_tx_power_levels + power_level_offset)) ==
  9953. * total_num_tx_power_levels)
  9954. * this message completes the report of tx time per power levels.
  9955. * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID messages
  9956. * will be sent by the target to deliver the remainder of the tx time
  9957. * per power level stats.
  9958. */
  9959. A_UINT32 power_level_offset;
  9960. /* radio id for this tx time per power level statistics (if multiple radio supported) */
  9961. A_UINT32 radio_id;
  9962. /** Indicates the vdev id of the stats for MLO stats query */
  9963. wmi_vdev_id_info vdev_id_info;
  9964. /*
  9965. * This TLV will be followed by a TLV containing a variable-length array of
  9966. * A_UINT32 with tx time per power level data
  9967. * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
  9968. * The tx time is in units of milliseconds.
  9969. * The power levels are board-specific values; a board-specific translation
  9970. * has to be applied to determine what actual power corresponds to each
  9971. * power level.
  9972. * Just as the host has a BDF file available, the host should also have
  9973. * a data file available that provides the power level to power translations.
  9974. */
  9975. } wmi_tx_power_level_stats_evt_fixed_param;
  9976. /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
  9977. typedef struct {
  9978. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats_event_fixed_param */
  9979. /** unique id identifying the request, given in the request stats command */
  9980. A_UINT32 request_id;
  9981. /** Number of radios*/
  9982. A_UINT32 num_radio;
  9983. /** more_data will be set depending on the number of radios */
  9984. A_UINT32 more_radio_events;
  9985. /*
  9986. * For the event WMI_RADIO_LINK_STATS_EVENTID = 0x16004,
  9987. * FW may not be able to send all the channels (2 GHz, 5 GHz & 6 GHz)
  9988. * together in one event message, due to buffer size limitations.
  9989. * To avoid this limitation, FW will send multiple events to HOST
  9990. * depending upon the number of channels.
  9991. * If more_channels is set to 0 means FW has indicated all the
  9992. * channels for this radio.
  9993. * If more_channels is set to 1, it indicates FW will send another
  9994. * event having additional channels for the same radio.
  9995. */
  9996. A_UINT32 more_channels;
  9997. /** Indicates the vdev id of the stats for MLO stats query */
  9998. wmi_vdev_id_info vdev_id_info;
  9999. /*
  10000. * This TLV is followed by another TLV of array of bytes
  10001. * size of(struct wmi_radio_link_stats);
  10002. *
  10003. * This TLV is followed by another TLV of array of bytes
  10004. * num_channels * size of(struct wmi_channel_stats)
  10005. */
  10006. } wmi_radio_link_stats_event_fixed_param;
  10007. /* per rate statistics */
  10008. typedef struct {
  10009. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
  10010. /** rate information
  10011. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  10012. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  10013. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  10014. * b'3-b'0 indicate the rate, which is indicated as follows:
  10015. * OFDM : 0: OFDM 48 Mbps
  10016. * 1: OFDM 24 Mbps
  10017. * 2: OFDM 12 Mbps
  10018. * 3: OFDM 6 Mbps
  10019. * 4: OFDM 54 Mbps
  10020. * 5: OFDM 36 Mbps
  10021. * 6: OFDM 18 Mbps
  10022. * 7: OFDM 9 Mbps
  10023. * CCK (pream == 1)
  10024. * 0: CCK 11 Mbps Long
  10025. * 1: CCK 5.5 Mbps Long
  10026. * 2: CCK 2 Mbps Long
  10027. * 3: CCK 1 Mbps Long
  10028. * 4: CCK 11 Mbps Short
  10029. * 5: CCK 5.5 Mbps Short
  10030. * 6: CCK 2 Mbps Short
  10031. * HT/VHT (pream == 2/3)
  10032. * 0..7: MCS0..MCS7 (HT)
  10033. * 0..9: MCS0..MCS9 (VHT)
  10034. */
  10035. A_UINT32 rate;
  10036. /** units of 100 Kbps */
  10037. A_UINT32 bitrate;
  10038. /** number of successfully transmitted data pkts (ACK rcvd) */
  10039. A_UINT32 tx_mpdu;
  10040. /** number of received data pkts */
  10041. A_UINT32 rx_mpdu;
  10042. /** number of data packet losses (no ACK) */
  10043. A_UINT32 mpdu_lost;
  10044. /** total number of data pkt retries */
  10045. A_UINT32 retries;
  10046. /** number of short data pkt retries */
  10047. A_UINT32 retries_short;
  10048. /** number of long data pkt retries */
  10049. A_UINT32 retries_long;
  10050. } wmi_rate_stats;
  10051. typedef struct {
  10052. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
  10053. /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
  10054. A_UINT32 peer_type;
  10055. /** mac address */
  10056. wmi_mac_addr peer_mac_address;
  10057. /** peer wmi_CAPABILITY_XXX */
  10058. A_UINT32 capabilities;
  10059. /** number of rates */
  10060. A_UINT32 num_rates;
  10061. } wmi_peer_link_stats;
  10062. /** PEER statistics (once started) reset and start afresh after each connection */
  10063. typedef struct {
  10064. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
  10065. /** unique id identifying the request, given in the request stats command */
  10066. A_UINT32 request_id;
  10067. /** number of peers accomidated in this particular event */
  10068. A_UINT32 num_peers;
  10069. /** Indicates the fragment number */
  10070. A_UINT32 peer_event_number;
  10071. /** Indicates if there are more peers which will be sent as separate peer_stats event */
  10072. A_UINT32 more_data;
  10073. /** Indicates the vdev id of the stats for MLO stats query */
  10074. wmi_vdev_id_info vdev_id_info;
  10075. /**
  10076. * This TLV is followed by another TLV
  10077. * num_peers * size of(struct wmi_peer_stats)
  10078. * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
  10079. */
  10080. } wmi_peer_stats_event_fixed_param;
  10081. /* per access category statistics */
  10082. typedef struct {
  10083. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
  10084. /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
  10085. A_UINT32 ac_type;
  10086. /** number of successfully transmitted unicast data pkts (ACK rcvd) */
  10087. A_UINT32 tx_mpdu;
  10088. /** number of received unicast mpdus */
  10089. A_UINT32 rx_mpdu;
  10090. /** number of successfully transmitted multicast data packets */
  10091. /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
  10092. A_UINT32 tx_mcast;
  10093. /** number of received multicast data packets */
  10094. A_UINT32 rx_mcast;
  10095. /** number of received unicast a-mpdus */
  10096. A_UINT32 rx_ampdu;
  10097. /** number of transmitted unicast a-mpdus */
  10098. A_UINT32 tx_ampdu;
  10099. /** number of data pkt losses (no ACK) */
  10100. A_UINT32 mpdu_lost;
  10101. /** total number of data pkt retries */
  10102. A_UINT32 retries;
  10103. /** number of short data pkt retries */
  10104. A_UINT32 retries_short;
  10105. /** number of long data pkt retries */
  10106. A_UINT32 retries_long;
  10107. /** data pkt min contention time (usecs) */
  10108. A_UINT32 contention_time_min;
  10109. /** data pkt max contention time (usecs) */
  10110. A_UINT32 contention_time_max;
  10111. /** data pkt avg contention time (usecs) */
  10112. A_UINT32 contention_time_avg;
  10113. /** num of data pkts used for contention statistics */
  10114. A_UINT32 contention_num_samples;
  10115. /** number of pending pkts */
  10116. A_UINT32 tx_pending_msdu;
  10117. } wmi_wmm_ac_stats;
  10118. /* interface statistics */
  10119. typedef struct {
  10120. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
  10121. /** access point beacon received count from connected AP */
  10122. A_UINT32 beacon_rx;
  10123. /** access point mgmt frames received count from connected AP (including Beacon) */
  10124. A_UINT32 mgmt_rx;
  10125. /** action frames received count */
  10126. A_UINT32 mgmt_action_rx;
  10127. /** action frames transmit count */
  10128. A_UINT32 mgmt_action_tx;
  10129. /** access Point Beacon and Management frames RSSI (averaged) */
  10130. A_UINT32 rssi_mgmt;
  10131. /** access Point Data Frames RSSI (averaged) from connected AP */
  10132. A_UINT32 rssi_data;
  10133. /** access Point ACK RSSI (averaged) from connected AP */
  10134. A_UINT32 rssi_ack;
  10135. /** number of peers */
  10136. A_UINT32 num_peers;
  10137. /** Indicates how many peer_stats events will be sent depending on the num_peers. */
  10138. A_UINT32 num_peer_events;
  10139. /** number of ac */
  10140. A_UINT32 num_ac;
  10141. /** Roaming Stat */
  10142. A_UINT32 roam_state;
  10143. /** Average Beacon spread offset is the averaged time delay between TBTT and beacon TSF */
  10144. /** Upper 32 bits of averaged 64 bit beacon spread offset */
  10145. A_UINT32 avg_bcn_spread_offset_high;
  10146. /** Lower 32 bits of averaged 64 bit beacon spread offset */
  10147. A_UINT32 avg_bcn_spread_offset_low;
  10148. /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
  10149. A_UINT32 is_leaky_ap;
  10150. /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
  10151. A_UINT32 avg_rx_frms_leaked;
  10152. /** Rx leak watch window currently in force to minimize data loss because of leaky AP. Rx leak window is the
  10153. time driver waits before shutting down the radio or switching the channel and after receiving an ACK for
  10154. a data frame with PM bit set) */
  10155. A_UINT32 rx_leak_window;
  10156. A_UINT32 tx_rts_succ_cnt;
  10157. A_UINT32 tx_rts_fail_cnt;
  10158. A_UINT32 tx_ppdu_succ_cnt;
  10159. A_UINT32 tx_ppdu_fail_cnt;
  10160. /** msecs the interface is in Connected state (accruing over time) */
  10161. A_UINT32 connected_duration;
  10162. /** msecs the interface is in DisConnected state (accruing over time) */
  10163. A_UINT32 disconnected_duration;
  10164. /** msecs the interface is doing RTT ranging (accruing over time) */
  10165. A_UINT32 rtt_ranging_duration;
  10166. /** msecs the interface is in RTT responder mode (accruing over time) */
  10167. A_UINT32 rtt_responder_duration;
  10168. /** Number of Probes (Tx) sent on the interface (accruing over time) */
  10169. A_UINT32 num_probes_tx;
  10170. /** Number of Beacon misses on this interface (accruing over time) */
  10171. A_UINT32 num_beacon_miss;
  10172. /** time slice duty cycle percentage of this interface */
  10173. A_UINT32 time_slice_duty_cycle;
  10174. /**
  10175. * Current home channel noise floor value report to host
  10176. * Units are dBm, values 0x0000ffff and 0x0 are invalid.
  10177. */
  10178. A_INT32 nf_cal_val;
  10179. } wmi_iface_link_stats;
  10180. typedef enum {
  10181. WMI_OFFLOAD_STATS_TYPE_SOC_BCAST = 0,
  10182. WMI_OFFLOAD_STATS_TYPE_SOC_MCAST = 1,
  10183. WMI_OFFLOAD_STATS_TYPE_SOC_UCAST = 2,
  10184. WMI_OFFLOAD_STATS_TYPE_ARP = 3,
  10185. WMI_OFFLOAD_STATS_TYPE_NS = 4,
  10186. WMI_OFFLOAD_STATS_TYPE_APF_BCAST = 5,
  10187. WMI_OFFLOAD_STATS_TYPE_APF_MCAST = 6,
  10188. WMI_OFFLOAD_STATS_TYPE_APF_UCAST = 7,
  10189. /* Add New offload stat type here */
  10190. WMI_OFFLOAD_STATS_TYPE_MAX,
  10191. } wmi_offload_stats_type;
  10192. typedef struct {
  10193. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_offload_stats */
  10194. /** Type of offload stat. enum wmi_offload_stats_type **/
  10195. A_UINT32 type;
  10196. /** Number of (MSDUs) frames Received **/
  10197. A_UINT32 rx_count;
  10198. /** Number of frames Dropped **/
  10199. A_UINT32 drp_count;
  10200. /** Number of frames for which FW Responded (Valid for ARP and NS only). (or)
  10201. * Number of frames forwarded to Host (Valid for stats type except ARP and NS). **/
  10202. A_UINT32 fwd_count;
  10203. } wmi_iface_offload_stats;
  10204. typedef struct {
  10205. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_powersave_stats */
  10206. /** Total TIM beacon event that wlan ps received **/
  10207. A_UINT32 tot_tim_bcn;
  10208. /** Total error TIM beacon found by wlan ps including no rx in TIM wakeup and TIM event in active state **/
  10209. A_UINT32 tot_err_tim_bcn;
  10210. } wmi_iface_powersave_stats;
  10211. typedef struct {
  10212. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_link_stats */
  10213. /** IPA tx channel 0 buffer hp/tp */
  10214. A_UINT32 wbm2sw_ring_ch0_hp;
  10215. A_UINT32 wbm2sw_ring_ch0_tp;
  10216. /** IPA tx channel 1 buffer hp/tp */
  10217. A_UINT32 wbm2sw_ring_ch1_hp;
  10218. A_UINT32 wbm2sw_ring_ch1_tp;
  10219. /** IPA rx channel 0 buffer hp/tp */
  10220. A_UINT32 reo2sw_ring_ch0_hp;
  10221. A_UINT32 reo2sw_ring_ch0_tp;
  10222. /** IPA rx channel 1 buffer hp/tp */
  10223. A_UINT32 reo2sw_ring_ch1_hp;
  10224. A_UINT32 reo2sw_ring_ch1_tp;
  10225. /** IPA rx channel 0 ring full counter */
  10226. A_UINT32 reo2sw_ch0_producer_full_cnt;
  10227. /** IPA rx channel 1 ring full counter */
  10228. A_UINT32 reo2sw_ch1_producer_full_cnt;
  10229. /** IPA rx path drop feature enable */
  10230. A_UINT32 ipa_drop_enabled;
  10231. /** Counter for IPA rx path switch to drop-enabled state */
  10232. A_UINT32 ipa_switch_to_drop_cnt;
  10233. /** Counter for IPA rx path switch from drop-enabled state to normal state */
  10234. A_UINT32 ipa_switch_from_drop_cnt;
  10235. } wmi_ipa_link_stats;
  10236. typedef struct {
  10237. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_per_mac_stats */
  10238. /** TCL total enqueued packet number */
  10239. A_UINT32 tcl_enqueue_packets;
  10240. /** TCL total discarded packet number during enqueue */
  10241. A_UINT32 tcl_enqueue_discard;
  10242. /** Total tx duration time, usec */
  10243. A_UINT32 total_ppdu_duration_us;
  10244. /** IPA rx no resource debug counter */
  10245. A_UINT32 wmac_no_resource_drop_ppdu_cnt_ix0;
  10246. A_UINT32 wmac_no_resource_drop_ppdu_cnt_ix1;
  10247. A_UINT32 wmac_no_resource_drop_mpdu_cnt_ix0;
  10248. A_UINT32 wmac_no_resource_drop_mpdu_cnt_ix1;
  10249. A_UINT32 wmac_rxdma2reo_producer_full_cnt;
  10250. } wmi_ipa_per_mac_stats;
  10251. /** IPA statistics (once started) reset and start afresh after each connection */
  10252. typedef struct {
  10253. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_link_stats_event_fixed_param */
  10254. /** unique id identifying the request, given in the request stats command */
  10255. A_UINT32 request_id;
  10256. /** number of MACs */
  10257. A_UINT32 num_macs;
  10258. /*
  10259. * This TLV is followed by other TLVs:
  10260. * wmi_ipa_link_stats ipa_link_stats;
  10261. * wmi_ipa_per_mac_stats ipa_per_mac_stats[num_macs];
  10262. */
  10263. } wmi_ipa_link_stats_event_fixed_param;
  10264. /** Interface statistics (once started) reset and start afresh after each connection */
  10265. typedef struct {
  10266. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
  10267. /** unique id identifying the request, given in the request stats command */
  10268. A_UINT32 request_id;
  10269. /** unique id identifying the VDEV, generated by the caller */
  10270. A_UINT32 vdev_id;
  10271. /** Number of offload stats **/
  10272. A_UINT32 num_offload_stats;
  10273. /*
  10274. * This TLV is followed by other TLVs:
  10275. * wmi_iface_link_stats iface_link_stats;
  10276. * num_ac * size of(struct wmi_wmm_ac_stats)
  10277. * wmi_iface_offload_stats iface_offload_stats[num_offload_stats]
  10278. * wmi_iface_powersave_stats iface_powersave_stats[]
  10279. */
  10280. } wmi_iface_link_stats_event_fixed_param;
  10281. typedef struct {
  10282. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param */
  10283. /** bitmask listing which WLM stats are provided.
  10284. * Copied from wlm_stats_cmd_fixed_param.
  10285. * (This field is provided for convenience rather than necessity, since
  10286. * the recipient can directly check which TLV arrays have non-zero length.)
  10287. */
  10288. A_UINT32 request_bitmask;
  10289. /** unique id identifying the VDEV, generated by the caller */
  10290. A_UINT32 vdev_id;
  10291. /**
  10292. * timestamp of event report, in microseconds units
  10293. * This timestamp is for debugging purposes only.
  10294. * It can be used to correlate this WLM stats event data with
  10295. * other WLM information uploaded through other means.
  10296. */
  10297. A_UINT32 timestamp;
  10298. /**
  10299. * Interval between two consecutive WLM stats query requests,
  10300. * in microseconds units.
  10301. * This interval is used for converting the scan_period and pwr_on_period
  10302. * values from within wmi_wlm_link_stats from percentage units to time
  10303. * units.
  10304. */
  10305. A_UINT32 req_interval;
  10306. /*
  10307. * This TLV is followed by an A_UINT32 array TLV carrying an opaque payload.
  10308. */
  10309. } wmi_wlm_stats_event_fixed_param;
  10310. /** Suspend option */
  10311. enum {
  10312. WMI_PDEV_SUSPEND, /* suspend */
  10313. WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
  10314. };
  10315. typedef struct {
  10316. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
  10317. /* suspend option sent to target */
  10318. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  10319. A_UINT32 suspend_opt;
  10320. } wmi_pdev_suspend_cmd_fixed_param;
  10321. typedef struct {
  10322. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
  10323. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  10324. } wmi_pdev_resume_cmd_fixed_param;
  10325. typedef struct {
  10326. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
  10327. A_UINT32 num_vdev_stats; /* number of vdevs */
  10328. } wmi_vdev_rate_stats_event_fixed_param;
  10329. typedef struct {
  10330. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info*/
  10331. A_UINT32 vdevid; /* Id of the wlan vdev*/
  10332. A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted*/
  10333. A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above*/
  10334. A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
  10335. A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
  10336. } wmi_vdev_rate_ht_info;
  10337. typedef struct {
  10338. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param */
  10339. A_UINT32 num_failure_info; /* How many holes on rx aggregation */
  10340. } wmi_rx_aggr_failure_event_fixed_param;
  10341. typedef struct {
  10342. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_wmi_rx_aggr_failure_info */
  10343. A_UINT32 start_seq; /* start sequence number of the hole */
  10344. A_UINT32 end_seq; /* end sequence number of the hole */
  10345. } wmi_rx_aggr_failure_info;
  10346. typedef struct {
  10347. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_request_cmd_fixed_param */
  10348. /** unique id identifying the VDEV, generated by the caller */
  10349. A_UINT32 vdev_id;
  10350. /** peer MAC address */
  10351. wmi_mac_addr peer_macaddr;
  10352. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  10353. /** key index **/
  10354. A_UINT32 key_ix;
  10355. } wmi_peer_tx_pn_request_cmd_fixed_param;
  10356. typedef struct {
  10357. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_pn_request_cmd_fixed_param */
  10358. /** unique id identifying the VDEV, generated by the caller */
  10359. A_UINT32 vdev_id;
  10360. /** peer MAC address */
  10361. wmi_mac_addr peer_macaddr;
  10362. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  10363. /** key index **/
  10364. A_UINT32 key_ix;
  10365. } wmi_peer_rx_pn_request_cmd_fixed_param;
  10366. typedef struct {
  10367. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_response_event_fixed_param */
  10368. /** unique id identifying the VDEV, generated by the caller */
  10369. A_UINT32 vdev_id;
  10370. /** peer MAC address */
  10371. wmi_mac_addr peer_macaddr;
  10372. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  10373. /** Packet Number
  10374. * The PN is provided in little endian order, with bits 7:0 of the PN
  10375. * residing in pn[0].
  10376. * The key_type indirectly specifies the packet number length, and thus
  10377. * how many bytes within pn[] are filled with valid data.
  10378. */
  10379. A_UINT8 pn[16];
  10380. /** key index **/
  10381. A_UINT32 key_ix;
  10382. } wmi_peer_tx_pn_response_event_fixed_param;
  10383. typedef struct {
  10384. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_pn_response_event_fixed_param */
  10385. /** unique id identifying the VDEV, generated by the caller */
  10386. A_UINT32 vdev_id;
  10387. /** peer MAC address */
  10388. wmi_mac_addr peer_macaddr;
  10389. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  10390. A_UINT32 key_idx;
  10391. /** Packet Number
  10392. * The PN is provided in little endian order, with bits 7:0 of the PN
  10393. * residing in pn[0].
  10394. * The key_type indirectly specifies the packet number length, and thus
  10395. * how many bytes within pn[] are filled with valid data.
  10396. */
  10397. A_UINT8 pn[WMI_MAX_PN_LEN];
  10398. } wmi_peer_rx_pn_response_event_fixed_param;
  10399. typedef struct {
  10400. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  10401. wmi_stats_id stats_id;
  10402. /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
  10403. A_UINT32 num_pdev_stats;
  10404. /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
  10405. A_UINT32 num_vdev_stats;
  10406. /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
  10407. A_UINT32 num_peer_stats;
  10408. A_UINT32 num_bcnflt_stats;
  10409. /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
  10410. A_UINT32 num_chan_stats;
  10411. /** number of MIB stats event structures (wmi_mib_stats) */
  10412. A_UINT32 num_mib_stats;
  10413. 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. */
  10414. /** number of beacon stats event structures (wmi_bcn_stats) */
  10415. A_UINT32 num_bcn_stats;
  10416. /** number of extended peer stats event structures (wmi_peer_extd_stats) */
  10417. A_UINT32 num_peer_extd_stats;
  10418. /** number of extd2 peer stats event structures (wmi_peer_extd2_stats) */
  10419. A_UINT32 num_peer_extd2_stats;
  10420. /** last_event
  10421. * The most significant bit is set to 1 to indicate whether the last_event
  10422. * field contains valid data. The least significant bit is set to 1 to
  10423. * indicate this is the final WMI_STATS_EVENT in a series.
  10424. */
  10425. A_UINT32 last_event;
  10426. /** number of extended MIB stats event structures (wmi_mib_extd_stats) */
  10427. A_UINT32 num_mib_extd_stats;
  10428. /** Indicates the vdev id of the stats for MLO stats query */
  10429. wmi_vdev_id_info vdev_id_info;
  10430. /** Indicates the vdev id of the stats for MLO stats query v2 */
  10431. wmi_vdev_id_info_v2 vdev_id_info_v2;
  10432. /* This TLV is followed by another TLV of array of bytes
  10433. * A_UINT8 data[];
  10434. * This data array contains
  10435. * num_pdev_stats * size of(struct wmi_pdev_stats)
  10436. * num_vdev_stats * size of(struct wmi_vdev_stats)
  10437. * num_peer_stats * size of(struct wmi_peer_stats)
  10438. * num_bcnflt_stats * size_of()
  10439. * num_chan_stats * size of(struct wmi_chan_stats)
  10440. * num_mib_stats * size of(struct wmi_mib_stats)
  10441. * num_bcn_stats * size of(struct wmi_bcn_stats)
  10442. */
  10443. /* If WMI_REQUEST_PEER_EXTD_STAT is set in stats_id,
  10444. * the data[] array also contains num_peer_stats * size of wmi_peer_extd_stats
  10445. * following the information elements listed above.
  10446. */
  10447. /* If WMI_REQUEST_MIB_EXTD_STAT is set in stats_id,
  10448. * the data[] array also contains
  10449. * num_mib_extd_stats * size of(struct wmi_mib_extd_stats)
  10450. * following the information elements listed above.
  10451. */
  10452. /* If WMI_REQUEST_PMF_BCN_PROTECT_STAT is set in stats_id, then TLV
  10453. * wmi_pmf_bcn_protect_stats pmf_bcn_protect_stats[]
  10454. * follows the other TLVs
  10455. */
  10456. /* If WMI_REQUEST_VDEV_EXTD_STAT is set in stats_id, then TLV
  10457. * wmi_vdev_extd_stats wmi_vdev_extd_stats[]
  10458. * follows the other TLVs
  10459. */
  10460. /* If WMI_REQUEST_PDEV_EXTD_STAT is set in stats_id, then TLV
  10461. * wmi_pdev_extd_stats wmi_pdev_extd_stats[]
  10462. * follows the other TLVs
  10463. */
  10464. /* If WMI_REQUEST_PDEV_TELEMETRY_STAT is set in stats_id, then TLV
  10465. * wmi_pdev_telemetry_stats wmi_pdev_telemetry_stats[]
  10466. * follows the other TLVs
  10467. */
  10468. } wmi_stats_event_fixed_param;
  10469. /* WLAN channel CCA stats bitmap */
  10470. #define WLAN_STATS_IDLE_TIME_SHIFT 0
  10471. #define WLAN_STATS_IDLE_TIME_TIME 0x00000001
  10472. #define WLAN_STATS_TX_TIME_SHIFT 1
  10473. #define WLAN_STATS_TX_TIME_MASK 0x00000002
  10474. #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
  10475. #define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
  10476. #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
  10477. #define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
  10478. #define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
  10479. #define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
  10480. #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
  10481. #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
  10482. #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
  10483. #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
  10484. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
  10485. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
  10486. /* WLAN peer signal stats bitmap */
  10487. #define WLAN_STATS_PER_CHAIN_SNR_SHIFT 0
  10488. #define WLAN_STATS_PER_CHAIN_SNR_MASK 0x00000001
  10489. #define WLAN_STATS_PER_CHAIN_NF_SHIFT 1
  10490. #define WLAN_STATS_PER_CHAIN_NF_MASK 0x00000002
  10491. /* WLAN TX stats bitmap */
  10492. #define WLAN_STATS_TX_MSDU_CNT_SHIFT 0
  10493. #define WLAN_STATS_TX_MSDU_CNT_MASK 0x00000001
  10494. #define WLAN_STATS_TX_MPDU_CNT_SHIFT 1
  10495. #define WLAN_STATS_TX_MPDU_CNT_MASK 0x00000002
  10496. #define WLAN_STATS_TX_PPDU_CNT_SHIFT 2
  10497. #define WLAN_STATS_TX_PPDU_CNT_MASK 0x00000004
  10498. #define WLAN_STATS_TX_BYTES_SHIFT 3
  10499. #define WLAN_STATS_TX_BYTES_MASK 0x00000008
  10500. #define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT 4
  10501. #define WLAN_STATS_TX_MSDU_DROP_CNT_MASK 0x00000010
  10502. #define WLAN_STATS_TX_DROP_BYTES_SHIFT 5
  10503. #define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000020
  10504. #define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT 6
  10505. #define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK 0x00000040
  10506. #define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT 7
  10507. #define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK 0x00000080
  10508. #define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT 8
  10509. #define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK 0x00000100
  10510. #define WLAN_STATS_TX_MPDU_AGGR_SHIFT 9
  10511. #define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000200
  10512. #define WLAN_STATS_TX_SUCC_MCS_SHIFT 10
  10513. #define WLAN_STATS_TX_SUCC_MCS_MASK 0x00000400
  10514. #define WLAN_STATS_TX_FAIL_MCS_SHIFT 11
  10515. #define WLAN_STATS_TX_FAIL_MCS_MASK 0x00000800
  10516. #define WLAN_STATS_TX_PPDU_DELAY_SHIFT 12
  10517. #define WLAN_STATS_TX_PPDU_DELAY_MASK 0x00001000
  10518. /* WLAN RX stats bitmap */
  10519. #define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT 0
  10520. #define WLAN_STATS_MAC_RX_MPDU_CNT_MASK 0x00000001
  10521. #define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
  10522. #define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
  10523. #define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT 2
  10524. #define WLAN_STATS_PHY_RX_PPDU_CNT_MASK 0x00000004
  10525. #define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
  10526. #define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
  10527. #define WLAN_STATS_RX_DISORDER_CNT_SHIFT 4
  10528. #define WLAN_STATS_RX_DISORDER_CNT_MASK 0x00000010
  10529. #define WLAN_STATS_RX_MPDU_RETRY_CNT_SHIFT 5
  10530. #define WLAN_STATS_RX_MPDU_RETRY_CNT_MASK 0x00000020
  10531. #define WLAN_STATS_RX_MPDU_DUP_CNT_SHIFT 6
  10532. #define WLAN_STATS_RX_MPDU_DUP_CNT_MASK 0x00000040
  10533. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_SHIFT 7
  10534. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_MASK 0x00000080
  10535. #define WLAN_STATS_RX_MPDU_AGGR_SHIFT 8
  10536. #define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00000100
  10537. #define WLAN_STATS_RX_MCS_SHIFT 9
  10538. #define WLAN_STATS_RX_MCS_MASK 0x00000200
  10539. #define WLAN_STATS_STA_PS_INDS_SHIFT 10
  10540. #define WLAN_STATS_STA_PS_INDS_MASK 0x00000400
  10541. #define WLAN_STATS_STA_PS_DURS_SHIFT 11
  10542. #define WLAN_STATS_STA_PS_DURS_MASK 0x00000800
  10543. #define WLAN_STATS_RX_PROBE_REQS_SHIFT 12
  10544. #define WLAN_STATS_RX_PROBE_REQS_MASK 0x00001000
  10545. #define WLAN_STATS_RX_OTH_MGMTS_SHIFT 13
  10546. #define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00002000
  10547. typedef struct
  10548. {
  10549. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
  10550. A_UINT32 vdev_id;
  10551. /** Percentage of idle time, no TX, no RX, no interference */
  10552. A_UINT32 idle_time;
  10553. /** Percentage of time transmitting packets */
  10554. A_UINT32 tx_time;
  10555. /** Percentage of time receiving packets in current BSSs */
  10556. A_UINT32 rx_in_bss_time;
  10557. /** Percentage of time receiving packets not in current BSSs */
  10558. A_UINT32 rx_out_bss_time;
  10559. /** Percentage of time interference detected. */
  10560. A_UINT32 rx_busy_time;
  10561. /** Percentage of time receiving packets with errors
  10562. * or packets flagged as retransmission or seqnum discontinued. */
  10563. A_UINT32 rx_in_bad_cond_time;
  10564. /** Percentage of time the device transmitted packets that haven't been ACKed. */
  10565. A_UINT32 tx_in_bad_cond_time;
  10566. /** Percentage of time the chip is unable to work in normal conditions. */
  10567. A_UINT32 wlan_not_avail_time;
  10568. } wmi_chan_cca_stats;
  10569. /** Thresholds of cca stats, stands for percentages of stats variation.
  10570. * Check wmi_chan_cca_stats for each stats's meaning.
  10571. */
  10572. typedef struct
  10573. {
  10574. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
  10575. A_UINT32 idle_time; /* units = percent */
  10576. A_UINT32 tx_time; /* units = percent */
  10577. A_UINT32 rx_in_bss_time; /* units = percent */
  10578. A_UINT32 rx_out_bss_time; /* units = percent */
  10579. A_UINT32 rx_busy_time; /* units = percent */
  10580. A_UINT32 rx_in_bad_cond_time; /* units = percent */
  10581. A_UINT32 tx_in_bad_cond_time; /* units = percent */
  10582. A_UINT32 wlan_not_avail_time; /* units = percent */
  10583. } wmi_chan_cca_stats_thresh;
  10584. typedef struct
  10585. {
  10586. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
  10587. A_UINT32 vdev_id;
  10588. A_UINT32 peer_id;
  10589. /** per chain SNR in current bss, units are dB */
  10590. A_INT32 per_chain_snr[WMI_MAX_CHAINS];
  10591. /** per chain background noise, units are dBm */
  10592. A_INT32 per_chain_nf[WMI_MAX_CHAINS];
  10593. /** per antenna rx MPDUs */
  10594. A_UINT32 per_antenna_rx_mpdus[WMI_MAX_CHAINS];
  10595. /** per antenna tx MPDUs */
  10596. A_UINT32 per_antenna_tx_mpdus[WMI_MAX_CHAINS];
  10597. /** num of valid chains for per antenna rx/tx MPDU cnts*/
  10598. A_UINT32 num_chains_valid;
  10599. } wmi_peer_signal_stats;
  10600. /** Thresholds of signal stats, stand for percentage of stats variation.
  10601. * Check wmi_peer_signal_stats for each stats's meaning.
  10602. */
  10603. typedef struct
  10604. {
  10605. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh */
  10606. A_UINT32 per_chain_snr; /* units = dB */
  10607. A_UINT32 per_chain_nf; /* units = dBm */
  10608. } wmi_peer_signal_stats_thresh;
  10609. typedef struct
  10610. {
  10611. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
  10612. /** Number of total TX MSDUs on MAC layer in the period */
  10613. A_UINT32 tx_msdu_cnt;
  10614. /** Number of total TX MPDUs on MAC layer in the period */
  10615. A_UINT32 tx_mpdu_cnt;
  10616. /** Number of total TX PPDUs on MAC layer in the period */
  10617. A_UINT32 tx_ppdu_cnt;
  10618. /** Bytes of tx data on MAC layer in the period */
  10619. A_UINT32 tx_bytes;
  10620. /** Number of TX MSDUs cancelled due to any reason in the period,
  10621. * such as WMM limitation/bandwidth limitation/radio congestion */
  10622. A_UINT32 tx_msdu_drop_cnt;
  10623. /** Bytes of dropped TX packets in the period */
  10624. A_UINT32 tx_drop_bytes;
  10625. /** Number of unacked transmissions of MPDUs */
  10626. A_UINT32 tx_mpdu_retry_cnt;
  10627. /** Number of MPDUs have not been ACKed despite retried */
  10628. A_UINT32 tx_mpdu_fail_cnt;
  10629. /** Number of PPDUs which received no block ack */
  10630. A_UINT32 tx_ppdu_fail_cnt;
  10631. /* This TLV is followed by TLVs below: :
  10632. * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
  10633. * A_UINT32 tx_succ_mcs[tx_succ_mcs_array_len];
  10634. * A_UINT32 tx_fail_mcs[tx_fail_mcs_array_len];
  10635. * A_UINT32 tx_ppdu_delay[tx_ppdu_delay_array_len];
  10636. */
  10637. } wmi_tx_stats;
  10638. /** Thresholds of tx stats, stand for percentage of stats variation.
  10639. * Check wmi_tx_stats for each stats's meaning.
  10640. */
  10641. typedef struct
  10642. {
  10643. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
  10644. A_UINT32 tx_msdu_cnt;
  10645. A_UINT32 tx_mpdu_cnt;
  10646. A_UINT32 tx_ppdu_cnt;
  10647. A_UINT32 tx_bytes;
  10648. A_UINT32 tx_msdu_drop_cnt;
  10649. A_UINT32 tx_drop_bytes;
  10650. A_UINT32 tx_mpdu_retry_cnt;
  10651. A_UINT32 tx_mpdu_fail_cnt;
  10652. A_UINT32 tx_ppdu_fail_cnt;
  10653. A_UINT32 tx_mpdu_aggr;
  10654. A_UINT32 tx_succ_mcs;
  10655. A_UINT32 tx_fail_mcs;
  10656. A_UINT32 tx_ppdu_delay;
  10657. } wmi_tx_stats_thresh;
  10658. typedef struct
  10659. {
  10660. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
  10661. A_UINT32 vdev_id;
  10662. A_UINT32 peer_id;
  10663. /* The TLVs for the 4 AC follows:
  10664. * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
  10665. */
  10666. } wmi_peer_ac_tx_stats;
  10667. typedef struct
  10668. {
  10669. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
  10670. /** Number of RX MPDUs on MAC layer */
  10671. A_UINT32 mac_rx_mpdu_cnt;
  10672. /** Bytes of RX packets on MAC layer */
  10673. A_UINT32 mac_rx_bytes;
  10674. /** Number of RX PPDU on PHY layer */
  10675. A_UINT32 phy_rx_ppdu_cnt;
  10676. /** Bytes of RX packets on PHY layer */
  10677. A_UINT32 phy_rx_bytes;
  10678. /** Number of discontinuity in seqnum */
  10679. A_UINT32 rx_disorder_cnt;
  10680. /** Number of RX MPDUs flagged as retransmissions */
  10681. A_UINT32 rx_mpdu_retry_cnt;
  10682. /** Number of RX MPDUs identified as duplicates */
  10683. A_UINT32 rx_mpdu_dup_cnt;
  10684. /** Number of RX MPDUs discarded */
  10685. A_UINT32 rx_mpdu_discard_cnt;
  10686. /* This TLV is followed by TLVs below:
  10687. * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
  10688. * A_UINT32 rx_mcs[rx_mcs_array_len];
  10689. */
  10690. } wmi_rx_stats;
  10691. /** Thresholds of rx stats, stands for percentage of stats variation.
  10692. * Check wmi_rx_stats for each stats's meaning.
  10693. */
  10694. typedef struct
  10695. {
  10696. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
  10697. A_UINT32 mac_rx_mpdu_cnt;
  10698. A_UINT32 mac_rx_bytes;
  10699. A_UINT32 phy_rx_ppdu_cnt;
  10700. A_UINT32 phy_rx_bytes;
  10701. A_UINT32 rx_disorder_cnt;
  10702. A_UINT32 rx_mpdu_retry_cnt;
  10703. A_UINT32 rx_mpdu_dup_cnt;
  10704. A_UINT32 rx_mpdu_discard_cnt;
  10705. A_UINT32 rx_mpdu_aggr;
  10706. A_UINT32 rx_mcs;
  10707. A_UINT32 sta_ps_inds;
  10708. A_UINT32 sta_ps_durs;
  10709. A_UINT32 rx_probe_reqs;
  10710. A_UINT32 rx_oth_mgmts;
  10711. } wmi_rx_stats_thresh;
  10712. typedef struct
  10713. {
  10714. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
  10715. A_UINT32 vdev_id;
  10716. A_UINT32 peer_id;
  10717. /** How many times STAs go to sleep */
  10718. A_UINT32 sta_ps_inds;
  10719. /** Total sleep time of STAs, milliseconds units */
  10720. A_UINT32 sta_ps_durs;
  10721. /** Number of probe requests received */
  10722. A_UINT32 rx_probe_reqs;
  10723. /** Number of other management frames received, not including probe requests */
  10724. A_UINT32 rx_oth_mgmts;
  10725. /* The TLVs for the 4 AC follows:
  10726. * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
  10727. */
  10728. } wmi_peer_ac_rx_stats;
  10729. typedef struct
  10730. {
  10731. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_period */
  10732. /*
  10733. * This struct provides the timestamps from a low-frequency timer
  10734. * for the start and end of a stats period.
  10735. * Each timestamp is reported twice, with different units.
  10736. * The _msec timestamp is in millisecond units.
  10737. * The _count timestamp is in clock tick units.
  10738. * The timestamp is reported in clock ticks as well as in milliseconds
  10739. * so that if the stats start and end times fall within the same
  10740. * millisecond, the clock tick timestamps can still be used to
  10741. * determine what fraction of a millisecond the stats period occupied.
  10742. */
  10743. A_UINT32 start_low_freq_msec;
  10744. A_UINT32 start_low_freq_count;
  10745. A_UINT32 end_low_freq_msec;
  10746. A_UINT32 end_low_freq_count;
  10747. } wmi_stats_period;
  10748. typedef enum {
  10749. /** Periodic timer timed out, based on the period specified
  10750. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  10751. */
  10752. TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
  10753. /** Any of the (enabled) stats thresholds specified
  10754. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  10755. * within the current stats period.
  10756. */
  10757. TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
  10758. /** In Response to the one-time wlan stats request of
  10759. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  10760. */
  10761. TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
  10762. } wmi_report_stats_event_trigger_cond_id;
  10763. typedef struct
  10764. {
  10765. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_interference */
  10766. /** For cases where a single rx chain has options to be connected to
  10767. * different rx antennas, show which rx antennas were in use during
  10768. * receipt of a given PPDU.
  10769. * This sa_ant_matrix provides a bitmask of the antennas used while
  10770. * receiving this frame.
  10771. */
  10772. A_UINT32 sa_ant_matrix;
  10773. /** Count how many times the hal_rxerr_phy is marked, in this time period.
  10774. * The counter value is reset each period. The host specifies the period
  10775. * via WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD.
  10776. */
  10777. A_UINT32 phyerr_count;
  10778. /** The timestamp at which the WMI event is reported.
  10779. * In targets that have a WBTIMER_1 timer, this timestamp is taken
  10780. * from WBTIMER_1.
  10781. */
  10782. A_UINT32 timestamp;
  10783. } wmi_stats_interference;
  10784. typedef struct {
  10785. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
  10786. /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
  10787. A_UINT32 trigger_cond_id;
  10788. /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
  10789. A_UINT32 cca_chgd_bitmap;
  10790. /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
  10791. A_UINT32 sig_chgd_bitmap;
  10792. /** Bitmap to indicate changed TX counters which exceeded the thresholds */
  10793. A_UINT32 tx_chgd_bitmap;
  10794. /** Bitmap to indicate changed RX counters which exceeded the thresholds */
  10795. A_UINT32 rx_chgd_bitmap;
  10796. /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
  10797. A_UINT32 num_chan_cca_stats;
  10798. /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
  10799. A_UINT32 num_peer_signal_stats;
  10800. /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
  10801. A_UINT32 num_peer_ac_tx_stats;
  10802. /** Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  10803. * The array indicates number of MPDUs sent on specified aggregation size
  10804. * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
  10805. * Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN */
  10806. A_UINT32 tx_mpdu_aggr_array_len;
  10807. /** Array length of tx_succ_mcs[] which is histogram of encoding rate.
  10808. * The array indicates number of acked PPDUs sent at a specific rate */
  10809. A_UINT32 tx_succ_mcs_array_len;
  10810. /** Array length of tx_fail_mcs[] which is histogram of encoding rate.
  10811. * The array indicates number of unacked PPDUs sent at a specific rate */
  10812. A_UINT32 tx_fail_mcs_array_len;
  10813. /** tx_ppdu_delay[]is a histogram of delays on MAC layer.
  10814. * The array counts numbers of PPDUs encountering different TX time delays.
  10815. * TX delay here means time interval between the time a PPDU is queued
  10816. * to the MAC HW for transmission and the time the lower layers of
  10817. * tx FW return a tx status.
  10818. *
  10819. * The bin size tx_ppdu_delay_bin_size_ms specifies how many milliseconds
  10820. * each bin of the tx_ppdu_delay histogram represents.
  10821. * By default the bin size is 10ms.
  10822. * tx_ppdu_delay[0] -> delays between 0-9 ms
  10823. * tx_ppdu_delay[1] -> delays between 10-19 ms
  10824. * ...
  10825. * tx_ppdu_delay[9] -> delays between 90-99 ms
  10826. * tx_ppdu_delay[10] -> delays >= 100 ms
  10827. * Bin size can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS.
  10828. */
  10829. A_UINT32 tx_ppdu_delay_bin_size_ms;
  10830. /** Array length of tx_ppdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN */
  10831. A_UINT32 tx_ppdu_delay_array_len;
  10832. /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
  10833. A_UINT32 num_peer_ac_rx_stats;
  10834. /** Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  10835. * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN */
  10836. A_UINT32 rx_mpdu_aggr_array_len;
  10837. /** Array size of rx_mcs[] which is histogram of encoding rate.
  10838. * The array indicates number of PPDUs received at a specific rate */
  10839. A_UINT32 rx_mcs_array_len;
  10840. /** Array size of stats_period[] which contains several stats periods. */
  10841. A_UINT32 stats_period_array_len;
  10842. /** Indicates the vdev id for MLO case */
  10843. wmi_vdev_id_info vdev_id_info;
  10844. /**
  10845. * This TLV is followed by TLVs below:
  10846. * wmi_chan_cca_stats chan_cca_stats[]; Array length is specified by num_chan_cca_stats
  10847. * wmi_peer_signal_stats peer_signal_stats[]; Array length is specified by num_peer_signal_stats
  10848. * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array length is specified by num_peer_ac_tx_stats
  10849. * 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)
  10850. * A_UINT32 tx_mpdu_aggr[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
  10851. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
  10852. * A_UINT32 tx_succ_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
  10853. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
  10854. * A_UINT32 tx_fail_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
  10855. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
  10856. * A_UINT32 tx_ppdu_delay[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_ppdu_delay_array_len,
  10857. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_ppdu_delay_array_len + tx delay index
  10858. * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array length is specified by num_peer_ac_rx_stats
  10859. * 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)
  10860. * A_UINT32 rx_mpdu_aggr[][][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
  10861. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
  10862. * A_UINT32 rx_mcs[][][]; Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
  10863. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
  10864. * wmi_stats_period stats_period[]; Array length is specified by stats_period_array_len
  10865. * 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.
  10866. **/
  10867. } wmi_report_stats_event_fixed_param;
  10868. typedef struct {
  10869. /** TLV tag and len; tag equals
  10870. * WMITLV_TAG_STRUC_wmi_peer_stats_info */
  10871. A_UINT32 tlv_header;
  10872. /** peer MAC address */
  10873. wmi_mac_addr peer_macaddr;
  10874. /** bytes (size of MPDUs) transmitted to this peer */
  10875. struct {
  10876. /* lower 32 bits of the tx_bytes value */
  10877. A_UINT32 low_32;
  10878. /* upper 32 bits of the tx_bytes value */
  10879. A_UINT32 high_32;
  10880. } tx_bytes;
  10881. /** packets (MSDUs) transmitted to this peer */
  10882. struct {
  10883. /* lower 32 bits of the tx_packets value */
  10884. A_UINT32 low_32;
  10885. /* upper 32 bits of the tx_packets value */
  10886. A_UINT32 high_32;
  10887. } tx_packets;
  10888. /** bytes (size of MPDUs) received from this peer */
  10889. struct {
  10890. /* lower 32 bits of the rx_bytes value */
  10891. A_UINT32 low_32;
  10892. /* upper 32 bits of the rx_bytes value */
  10893. A_UINT32 high_32;
  10894. } rx_bytes;
  10895. /** packets (MSDUs) received from this peer */
  10896. struct {
  10897. /* lower 32 bits of the rx_packets value */
  10898. A_UINT32 low_32;
  10899. /* upper 32 bits of the rx_packets value */
  10900. A_UINT32 high_32;
  10901. } rx_packets;
  10902. /** cumulative retry counts (MPDUs) */
  10903. A_UINT32 tx_retries;
  10904. /** number of failed transmissions (MPDUs) (retries exceeded, no ACK) */
  10905. A_UINT32 tx_failed;
  10906. /** rate information, it is output of WMI_ASSEMBLE_RATECODE_V1
  10907. * (in format of 0x1000RRRR)
  10908. * The rate-code is a 4-bytes field in which,
  10909. * for given rate, nss and preamble
  10910. *
  10911. * b'31-b'29 unused / reserved
  10912. * b'28 indicate the version of rate-code (1 = RATECODE_V1)
  10913. * b'27-b'11 unused / reserved
  10914. * b'10-b'8 indicate the preamble (0 OFDM, 1 CCK, 2 HT, 3 VHT)
  10915. * b'7-b'5 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  10916. * b'4-b'0 indicate the rate, which is indicated as follows:
  10917. * OFDM : 0: OFDM 48 Mbps
  10918. * 1: OFDM 24 Mbps
  10919. * 2: OFDM 12 Mbps
  10920. * 3: OFDM 6 Mbps
  10921. * 4: OFDM 54 Mbps
  10922. * 5: OFDM 36 Mbps
  10923. * 6: OFDM 18 Mbps
  10924. * 7: OFDM 9 Mbps
  10925. * CCK (pream == 1)
  10926. * 0: CCK 11 Mbps Long
  10927. * 1: CCK 5.5 Mbps Long
  10928. * 2: CCK 2 Mbps Long
  10929. * 3: CCK 1 Mbps Long
  10930. * 4: CCK 11 Mbps Short
  10931. * 5: CCK 5.5 Mbps Short
  10932. * 6: CCK 2 Mbps Short
  10933. * HT/VHT (pream == 2/3)
  10934. * 0..7: MCS0..MCS7 (HT)
  10935. * 0..9: MCS0..MCS9 (11AC VHT)
  10936. * 0..11: MCS0..MCS11 (11AX VHT)
  10937. */
  10938. /** rate-code of the last transmission */
  10939. A_UINT32 last_tx_rate_code;
  10940. /** rate-code of the last received PPDU */
  10941. A_UINT32 last_rx_rate_code;
  10942. /** bitrate of the last transmission, in units of kbps */
  10943. A_UINT32 last_tx_bitrate_kbps;
  10944. /** bitrate of the last received PPDU, in units of kbps */
  10945. A_UINT32 last_rx_bitrate_kbps;
  10946. /** combined RSSI of the last received PPDU, in unit of dBm */
  10947. A_INT32 peer_rssi;
  10948. /** number of succeed transmissions (MPDUs) (ACK) */
  10949. A_UINT32 tx_succeed;
  10950. /**
  10951. * The RSSI values are in dBm units, and are exponentially time-averaged.
  10952. * The averaging is performed on the dB values (rather than the linear
  10953. * values).
  10954. */
  10955. A_INT32 peer_rssi_per_chain[WMI_MAX_CHAINS];
  10956. /* show how many elements in the tx_rate_counts array belong to this peer */
  10957. A_UINT32 num_tx_rate_counts;
  10958. /* show how many elements in the rx_rate_counts array belong to this peer */
  10959. A_UINT32 num_rx_rate_counts;
  10960. /* This TLV array is followed by other TLVs:
  10961. * A_UINT32 tx_rate_counts[sum(num_tx_rate_counts)];
  10962. * The above num_tx_rate_counts field shows which elements
  10963. * within the tx_rate_counts array belong to a given peer.
  10964. * Elements tx_rate_counts[0] to tx_rate_counts[N0-1] belong to
  10965. * peer 0, where N0 = peer_stats_info[0].num_tx_rate_counts.
  10966. * Elements tx_rate_counts[N0] to tx_rate_counts[N0+N1-1] belong to
  10967. * peer 1, where N1 = peer_stats_info[1].num_tx_rate_counts.
  10968. * etc.
  10969. * A_UINT32 rx_rate_counts[sum(num_rx_rate_counts)];
  10970. * The above num_rx_rate_counts field shows which elements
  10971. * within the rx_rate_counts array belong to a given peer.
  10972. * Elements rx_rate_counts[0] to rx_rate_counts[N0-1] belong to
  10973. * peer 0, where N0 = peer_stats_info[0].num_rx_rate_counts.
  10974. * Elements rx_rate_counts[N0] to rx_rate_counts[N0+N1-1] belong to
  10975. * peer 1, where N1 = peer_stats_info[1].num_rx_rate_counts.
  10976. * etc.
  10977. */
  10978. } wmi_peer_stats_info;
  10979. typedef struct {
  10980. /** TLV tag and len; tag equals
  10981. * WMITLV_TAG_STRUC_wmi_peer_stats_info_event_fixed_param */
  10982. A_UINT32 tlv_header;
  10983. /** VDEV to which the peers belong to */
  10984. A_UINT32 vdev_id;
  10985. /** number of peers in peer_stats_info[] */
  10986. A_UINT32 num_peers;
  10987. /** flag to indicate if there are more peers which will
  10988. * be sent a following separate peer_stats_info event */
  10989. A_UINT32 more_data;
  10990. /* This TLV is followed by another TLV of array of structs
  10991. * wmi_peer_stats_info peer_stats_info[];
  10992. */
  10993. } wmi_peer_stats_info_event_fixed_param;
  10994. /**
  10995. * WMI arrays of length WMI_MGMT_FRAME_SUBTYPE_MAX use the
  10996. * IEEE802.11 standard's enumeration of mgmt frame subtypes:
  10997. * 0 -> IEEE80211_FC0_SUBTYPE_ASSOC_REQ
  10998. * 1 -> IEEE80211_FC0_SUBTYPE_ASSOC_RESP
  10999. * 2 -> IEEE80211_FC0_SUBTYPE_REASSOC_REQ
  11000. * 3 -> IEEE80211_FC0_SUBTYPE_REASSOC_RESP
  11001. * 4 -> IEEE80211_FC0_SUBTYPE_PROBE_REQ
  11002. * 5 -> IEEE80211_FC0_SUBTYPE_PROBE_RESP
  11003. * 6 -> Reserved
  11004. * 7 -> Reserved
  11005. * 8 -> IEEE80211_FC0_SUBTYPE_BEACON
  11006. * 9 -> IEEE80211_FC0_SUBTYPE_ATIM
  11007. * 10 -> IEEE80211_FC0_SUBTYPE_DISASSOC
  11008. * 11 -> IEEE80211_FC0_SUBTYPE_AUTH
  11009. * 12 -> IEEE80211_FC0_SUBTYPE_DEAUTH
  11010. * 13 -> IEEE80211_FCO_SUBTYPE_ACTION
  11011. * 14 -> IEEE80211_FC0_SUBTYPE_ACTION_NOACK
  11012. * 15 -> IEEE80211_FC0_SUBTYPE_RESERVED
  11013. */
  11014. #define WMI_MGMT_FRAME_SUBTYPE_MAX 16
  11015. typedef struct {
  11016. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_pdev_stats_struct*/
  11017. A_UINT32 tlv_header;
  11018. /** pdev_id for identifying the MAC */
  11019. A_UINT32 pdev_id;
  11020. /** counter of how many times this pdev has
  11021. * transmitted each management frame sub-type */
  11022. A_UINT32 tx_mgmt_subtype[WMI_MGMT_FRAME_SUBTYPE_MAX];
  11023. /** counter of how many times this pdev has
  11024. * received each management frame sub-type */
  11025. A_UINT32 rx_mgmt_subtype[WMI_MGMT_FRAME_SUBTYPE_MAX];
  11026. /** scan fail dfs violation time in ms */
  11027. A_UINT32 scan_fail_dfs_violation_time_ms;
  11028. /** NOL check failed latest channel frequency in MHz */
  11029. A_UINT32 nol_check_fail_last_chan_freq;
  11030. /** NOL check failed timestamp in ms */
  11031. A_UINT32 nol_check_fail_time_stamp_ms;
  11032. /** total peer create count */
  11033. A_UINT32 total_peer_create_cnt;
  11034. /** total peer delete count */
  11035. A_UINT32 total_peer_delete_cnt;
  11036. /** total peer delete response count */
  11037. A_UINT32 total_peer_delete_resp_cnt;
  11038. /** sched algo FIFO full count */
  11039. A_UINT32 vdev_pause_fail_rt_to_sched_algo_fifo_full_cnt;
  11040. /** total number of qos null tx frame queued over WMI */
  11041. A_UINT32 qos_null_tx_over_wmi;
  11042. /** total qos null tx frame completion received count */
  11043. A_UINT32 qos_null_tx_send_compl_over_wmi;
  11044. /** total event alloc failure count for qos null tx send */
  11045. A_UINT32 qos_null_tx_send_event_alloc_failed;
  11046. /** wlan_pdev fields num_macs, vdev_up_count and vdev_active_count
  11047. * num_macs_phy_vdev_up_active:
  11048. * This word contains the following bitfields:
  11049. * number of macs from wlan_pdev
  11050. * (WMI_PDEV_STATS_NUM_MACS_SET,GET)
  11051. * number of vdev up count
  11052. * (WMI_PDEV_STATS_VDEV_UP_CNT_SET,GET)
  11053. * number of vdev active count
  11054. * (WMI_PDEV_STATS_VDEV_UP_CNT_SET,GET)
  11055. */
  11056. A_UINT32 opaque_debug_num_macs_phy_vdev_up_active;
  11057. /** refer wlan_pdev ic flags */
  11058. A_UINT32 opaque_debug_ic_flags;
  11059. /** vdev_id that are paused per pdev */
  11060. A_UINT32 opaque_debug_paused_ap_vdev_bitmap;
  11061. /** opaque_debug_flags:
  11062. * refer to WLAN_PS_DESC_BIN_HWM_HIT or WLAN_PS_DESC_BIN_LWM_HIT
  11063. */
  11064. A_UINT32 opaque_debug_flags;
  11065. /** wlan_pdev fields remote_peer_cnt, max_rf_chains_2G and max_rf_chains_5G
  11066. * remote_peer_cnt_max_rf_chains_2G_5G:
  11067. * This word contains the following bitfields:
  11068. * max chains supported in the 2.4 GHz band
  11069. * (WMI_PDEV_STATS_MAX_RF_CHAIN_2G_SET,GET)
  11070. * max chains supported in the 5 GHz band,
  11071. * (WMI_PDEV_STATS_MAX_RF_CHAIN_5G_SET,GET)
  11072. * number of remote peers
  11073. * (WMI_PDEV_STATS_REMOTE_PEER_CNT_SET,GET)
  11074. */
  11075. A_UINT32 opaque_debug_remote_peer_cnt_max_rf_chains_2G_5G;
  11076. /** wlan_pdev max HT Capability info, WMI_HT_CAP defines */
  11077. A_UINT32 opaque_debug_max_ht_cap_info;
  11078. /** wlan_pdev max VHT capability info, WMI_VHT_CAP defines */
  11079. A_UINT32 opaque_debug_max_vht_cap_info;
  11080. /** opaque_debug_max_vht_supp_mcs:
  11081. * wlan_pdev max VHT Supported MCS which is
  11082. * vht_supp_mcs_2G or vht_supp_mcs_5G
  11083. */
  11084. A_UINT32 opaque_debug_max_vht_supp_mcs;
  11085. /** wlan_pdev max HE capability info, WMI_HE_CAP defines */
  11086. A_UINT32 opaque_debug_max_he_cap_info;
  11087. A_UINT32 opaque_debug_max_he_cap_info_ext;
  11088. /** the nominal chain mask for transmit */
  11089. A_UINT32 opaque_debug_tx_chain_mask;
  11090. /** the nominal chain mask for receive */
  11091. A_UINT32 opaque_debug_rx_chain_mask;
  11092. /** opaque_debug_ema_flags:
  11093. * This word contains the following bitfields:
  11094. * ema_flags: ema_max_vap_cnt and ema_max_profile_period from wlan_pdev
  11095. * ema_max_vap_cnt- number of maximum EMA Tx vaps (VAPs having both
  11096. * VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set)
  11097. * (WMI_PDEV_STATS_EMA_MAX_VAP_CNT_SET,GET)
  11098. * ema_max_profile_period - maximum profile periodicity
  11099. * (maximum number of beacons after which VAP profiles repeat)
  11100. * for any EMA VAP on any pdev.
  11101. * (WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_SET,GET)
  11102. */
  11103. A_UINT32 opaque_debug_ema_flags;
  11104. /** wlan_pdev - maximum ML peers supported */
  11105. A_UINT32 opaque_debug_num_ml_peer_entries;
  11106. /** This word contains the following bitfields:
  11107. * wlan_pdev fields - num_max_hw_links, current_chip_id and max_num_chips
  11108. * (related to MLO)
  11109. * Max number of HW links
  11110. * (WMI_PDEV_STATS_NUM_MAX_HW_LINKS_SET,GET)
  11111. * Current Chip Id
  11112. * (WMI_PDEV_STATS_CURRENT_CHIP_ID_SET,GET)
  11113. * Max number of chips
  11114. * (WMI_PDEV_STATS_MAX_NUM_CHIPS_SET,GET)
  11115. */
  11116. A_UINT32 opaque_debug_mlo_flags;
  11117. /** Indicate beacon size in bytes */
  11118. A_UINT32 opaque_debug_large_bcn_size;
  11119. /** proposed by the host value of MSDUQs per each LinkView peer's TID */
  11120. A_UINT32 opaque_debug_num_of_linkview_msduqs_per_tid;
  11121. /** bcn_filter_context variables */
  11122. A_UINT32 opaque_debug_bcns_dropped;
  11123. A_UINT32 opaque_debug_bcns_recvd;
  11124. A_UINT32 opaque_debug_bcns_delivered;
  11125. /** Tids that are paused/unpaused based on module_id */
  11126. A_UINT32 opaque_debug_vdev_all_tid_pause_bitmap;
  11127. /** Tids that are blocked/unblocked based on module_id */
  11128. A_UINT32 opaque_debug_vdev_all_tid_block_bitmap;
  11129. /** wal_pdev rx filter, WAL_RX_FILTER_FLAGS defines */
  11130. A_UINT32 opaque_debug_rx_filter;
  11131. /** This word contains the following bitfields:
  11132. * aggr_nonaggr_retry_th:
  11133. * wal_pdev fields - agg_retry_th and non_agg_retry_th
  11134. * This value holds max retry threshold up to which a Data packet
  11135. * will be retried when ack is not received.
  11136. * agg_retry_th - Threshold value used when aggregation is enabled
  11137. * (WMI_PDEV_STATS_AGG_RETRY_TH_SET,GET)
  11138. * non_agg_retry_th - Threshold value used for non-aggregation.
  11139. * (WMI_PDEV_STATS_NON_AGG_RETRY_TH_SET)
  11140. */
  11141. A_UINT32 opaque_debug_aggr_nonaggr_retry_th;
  11142. /** This word contains the following bitfields:
  11143. * num_max_rx_ba_sessions:
  11144. * Number of rx BA session establised
  11145. * (WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_SET,GET)
  11146. * Max number of rx BA session from wal_pdev
  11147. * (WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_SET,GET)
  11148. */
  11149. A_UINT32 opaque_debug_num_max_rx_ba_sessions;
  11150. /** It holds WHAL_CHANNEL_SWITCH_FLAGS values */
  11151. A_UINT32 opaque_debug_chan_switch_flags;
  11152. /** reset_cause holds PDEV_RESET_CONSEC_FAILURE or PDEV_RESET_TXQ_TIMEOUT */
  11153. A_UINT32 opaque_debug_consecutive_failure_reset_cause;
  11154. /** PPDU duration limit, in us */
  11155. A_UINT32 opaque_debug_mu_ppdu_dur_limit_us;
  11156. /** pdev reset in progress */
  11157. A_UINT32 opaque_debug_reset_in_progress;
  11158. /** wal_dev - vdev_migrate_state refer to WAL_VDEV_MIGRATE_STATE */
  11159. A_UINT32 opaque_debug_vdev_migrate_state;
  11160. /** opaque_debug_rts_rc_flag:
  11161. * wal_pdev rts ratecode - this value reflects whatever
  11162. * WMI_PDEV_PARAM_RTS_FIXED_RATE value the host has specified for the pdev.
  11163. */
  11164. A_UINT32 opaque_debug_rts_rc_flag;
  11165. /* Num of peer delete in progress */
  11166. A_UINT32 opaque_debug_num_of_peer_delete_in_progress;
  11167. /** wal_pdev total number of active vdev count */
  11168. A_UINT32 opaque_debug_total_active_vdev_cnt;
  11169. /** wal_pdev - max number of vdevs per pdev */
  11170. A_UINT32 opaque_debug_max_vdevs;
  11171. /* NonOccupancyList(NOL) context */
  11172. A_UINT32 opaque_debug_dfs_nol_count;
  11173. /** NOL timeout in seconds */
  11174. A_UINT32 opaque_debug_dfs_nol_timeout;
  11175. A_UINT32 opaque_debug_dfs_use_nol;
  11176. /** channel availability check mode, refer enum WMI_ADFS_OCAC_MODE */
  11177. A_UINT32 opaque_debug_cac_mode;
  11178. A_UINT32 opaque_debug_dyn_ppdu_dur; /* in ms */
  11179. /** This word contains the following bitfields:
  11180. * wal_pdev home channel info
  11181. * home_chan_mhz_flags:
  11182. * primary channel frequency in mhz
  11183. * (WMI_PDEV_STATS_HOME_CHAN_MHZ_SET,GET)
  11184. * flags to specify other channel attributes
  11185. * (WMI_PDEV_STATS_HOME_CHAN_FLAGS_SET, GET)
  11186. */
  11187. A_UINT32 opaque_debug_home_chan_mhz_flags;
  11188. /** home channel center frequency in MHz */
  11189. A_UINT32 opaque_debug_home_band_center_freq;
  11190. /** home channel phy_mode, refer enum WLAN_PHY_MODE */
  11191. A_UINT32 opaque_debug_home_phy_mode;
  11192. /** This word contains the following bitfields:
  11193. * wal_pdev current channel info
  11194. * cur_chan_mhz_flags:
  11195. * primary channel frequency in mhz
  11196. * (WMI_PDEV_STATS_CUR_CHAN_MHZ_SET,GET)
  11197. * flags to specify other channel attributes
  11198. * (WMI_PDEV_STATS_CUR_CHAN_FLAGS_SET,GET)
  11199. */
  11200. A_UINT32 opaque_debug_cur_chan_mhz_flags;
  11201. /** current channel center frequency in MHz */
  11202. A_UINT32 opaque_debug_cur_band_center_freq;
  11203. /** current channel phy_mode, refer enum WLAN_PHY_MODE */
  11204. A_UINT32 opaque_debug_cur_phy_mode;
  11205. /* Beacon context info */
  11206. A_UINT32 opaque_debug_bcn_q_num_bcns_queued_to_hw;
  11207. /** beacon queue AIFS */
  11208. A_UINT32 opaque_debug_aifs;
  11209. /** beacon queue cwmin */
  11210. A_UINT32 opaque_debug_cwmin;
  11211. /** beacon queue cwmax */
  11212. A_UINT32 opaque_debug_cwmax;
  11213. /** FILS discovery period in TU */
  11214. A_UINT32 opaque_debug_fils_period;
  11215. /** Beacon interval in TU */
  11216. A_UINT32 opaque_debug_beacon_period;
  11217. A_UINT32 opaque_debug_staggered_beacon_intvl;
  11218. /** wal_pdev tx context, refer enum WAL_TX_CTXT_FLAGS */
  11219. A_UINT32 opaque_debug_tx_ctxt_flags;
  11220. /** opaque_debug_burst_mode_pending_isr
  11221. * wal_pdev tx_ctxt fields - burst_mode refer enum WAL_TX_BURST_MODE
  11222. * and pending_isr_status count
  11223. */
  11224. A_UINT32 opaque_debug_burst_mode_pending_isr;
  11225. /** max burst duration from ppdu duration in us */
  11226. A_UINT32 opaque_debug_burst_dur;
  11227. /** counter for tx hw stuck */
  11228. A_UINT32 opaque_debug_tx_hw_stuck_cnt;
  11229. /** counter for tx consecutive lifetime expiry */
  11230. A_UINT32 opaque_debug_consecutive_lifetime_expiries;
  11231. /** wal_pdev rx context, refer enum WAL_RX_CTXT_FLAGS */
  11232. A_UINT32 opaque_debug_rx_ctxt_flags;
  11233. /** wal_pdev fields in rx context for rx_suspend or resume count */
  11234. A_UINT32 opaque_debug_rx_suspend_cnt;
  11235. A_UINT32 opaque_debug_rx_resume_cnt;
  11236. A_UINT32 opaque_debug_rx_pcie_suspend_cnt;
  11237. A_UINT32 opaque_debug_rx_pcie_resume_cnt;
  11238. /** This word contains the following bitfields:
  11239. * wal_pdev fields
  11240. * pdev paused - WMI_PDEV_STATS_PAUSED_SET,GET
  11241. * pdev suspend - WMI_PDEV_STATS_SUSPENDED_SET,GET
  11242. * cac_enabed - MI_PDEV_STATS_CAC_ENABLED_SET,GET
  11243. * monitor VAP present - WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_SET,GET
  11244. * beacon tx mode - WMI_PDEV_STATS_BCN_TX_MODE_SET,GET
  11245. * isTXsuspended - WMI_PDEV_STATS_IS_TXSUSPENDED_SET,GET
  11246. * isSCHEDsuspended - WMI_PDEV_STATS_IS_SCHEDSUSPENDED_SET,GET
  11247. * sched_algo_resume_needed -
  11248. * WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_SET,GET
  11249. * abort_reason - WMI_PDEV_STATS_ABORT_REASON_SET,GET
  11250. * atf_cfg - WMI_PDEV_STATS_ATF_CONFIG_SET,GET
  11251. * Green AP TX chainmask valid - WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_SET,GET
  11252. * Green AP RX chainmask valid - WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_SET,GET
  11253. * Green AP Phy mode valid - WMI_PDEV_STATS_GAP_PHY_MODE_VALID_SET,GET
  11254. * burst_enable - WMI_PDEV_STATS_BURST_ENABLE_SET,GET
  11255. */
  11256. A_UINT32 opaque_debug_wal_pdev_bitfield;
  11257. /** This word contains the following bitfields:
  11258. * gap_phy_mode_freq:
  11259. * When GreenAP is enabled, phy_mode (WMI_PDEV_STATS_GAP_PHY_MODE_SET,GET)
  11260. * and center freq(MHz) (WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_SET,GET)
  11261. * in GAP context is displayed
  11262. */
  11263. A_UINT32 opaque_debug_gap_phy_mode_freq;
  11264. /**
  11265. * The following 5 opaque_debug_reserved_field variables are provided
  11266. * purely for debugging by technicians who have outside knowledge of
  11267. * what kind of values the target has placed into these fields.
  11268. */
  11269. A_UINT32 opaque_debug_reserved_field_1;
  11270. A_UINT32 opaque_debug_reserved_field_2;
  11271. A_UINT32 opaque_debug_reserved_field_3;
  11272. A_UINT32 opaque_debug_reserved_field_4;
  11273. A_UINT32 opaque_debug_reserved_field_5;
  11274. } wmi_ctrl_path_pdev_stats_struct;
  11275. #define WMI_PDEV_STATS_NUM_MACS_GET(flag) \
  11276. WMI_GET_BITS(flag, 0, 8)
  11277. #define WMI_PDEV_STATS_NUM_MACS_SET(flag, val) \
  11278. WMI_SET_BITS(flag, 0, 8, val)
  11279. #define WMI_PDEV_STATS_NUM_PHY_GET(flag) \
  11280. WMI_GET_BITS(flag, 8, 8)
  11281. #define WMI_PDEV_STATS_NUM_PHY_SET(flag, val) \
  11282. WMI_SET_BITS(flag, 8, 8, val)
  11283. #define WMI_PDEV_STATS_VDEV_UP_CNT_GET(flag) \
  11284. WMI_GET_BITS(flag, 16, 8)
  11285. #define WMI_PDEV_STATS_VDEV_UP_CNT_SET(flag, val) \
  11286. WMI_SET_BITS(flag, 16, 8, val)
  11287. #define WMI_PDEV_STATS_VDEV_ACTIVE_CNT_GET(flag) \
  11288. WMI_GET_BITS(flag, 24, 8)
  11289. #define WMI_PDEV_STATS_VDEV_ACTIVE_CNT_SET(flag, val) \
  11290. WMI_SET_BITS(flag, 24, 8, val)
  11291. #define WMI_PDEV_STATS_REMOTE_PEER_CNT_GET(flag) \
  11292. WMI_GET_BITS(flag, 0, 16)
  11293. #define WMI_PDEV_STATS_REMOTE_PEER_CNT_SET(flag, val) \
  11294. WMI_SET_BITS(flag, 0, 16, val)
  11295. #define WMI_PDEV_STATS_MAX_RF_CHAIN_2G_GET(flag) \
  11296. WMI_GET_BITS(flag, 16, 8)
  11297. #define WMI_PDEV_STATS_MAX_RF_CHAIN_2G_SET(flag, val) \
  11298. WMI_SET_BITS(flag, 16, 8, val)
  11299. #define WMI_PDEV_STATS_MAX_RF_CHAIN_5G_GET(flag) \
  11300. WMI_GET_BITS(flag, 24, 8)
  11301. #define WMI_PDEV_STATS_MAX_RF_CHAIN_5G_SET(flag, val) \
  11302. WMI_SET_BITS(flag, 24, 8, val)
  11303. #define WMI_PDEV_STATS_EMA_MAX_VAP_CNT_GET(flag) \
  11304. WMI_GET_BITS(flag, 0, 8 )
  11305. #define WMI_PDEV_STATS_EMA_MAX_VAP_CNT_SET(flag, val) \
  11306. WMI_SET_BITS(flag, 0, 8 , val)
  11307. #define WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_GET(flag) \
  11308. WMI_GET_BITS(flag, 8, 8)
  11309. #define WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_SET(flag, val) \
  11310. WMI_SET_BITS(flag, 8, 8, val)
  11311. #define WMI_PDEV_STATS_NUM_SELF_PEERS_GET(flag) \
  11312. WMI_GET_BITS(flag, 16, 8)
  11313. #define WMI_PDEV_STATS_NUM_SELF_PEERS_SET(flag, val) \
  11314. WMI_SET_BITS(flag, 16, 8, val)
  11315. #define WMI_PDEV_STATS_MAX_ACTIVE_VDEVS_GET(flag) \
  11316. WMI_GET_BITS(flag, 24, 8)
  11317. #define WMI_PDEV_STATS_MAX_ACTIVE_VDEVS_SET(flag, val) \
  11318. WMI_SET_BITS(flag, 24, 8, val)
  11319. #define WMI_PDEV_STATS_NUM_MAX_HW_LINKS_GET(flag) \
  11320. WMI_GET_BITS(flag, 0, 8)
  11321. #define WMI_PDEV_STATS_NUM_MAX_HW_LINKS_SET(flag, val) \
  11322. WMI_SET_BITS(flag, 0, 8, val)
  11323. #define WMI_PDEV_STATS_CURRENT_CHIP_ID_GET(flag) \
  11324. WMI_GET_BITS(flag, 8, 8)
  11325. #define WMI_PDEV_STATS_CURRENT_CHIP_ID_SET(flag, val) \
  11326. WMI_SET_BITS(flag, 8, 8, val)
  11327. #define WMI_PDEV_STATS_MAX_NUM_CHIPS_GET(flag) \
  11328. WMI_GET_BITS(flag, 16, 8)
  11329. #define WMI_PDEV_STATS_MAX_NUM_CHIPS_SET(flag, val) \
  11330. WMI_SET_BITS(flag, 16, 8, val)
  11331. #define WMI_PDEV_STATS_NUM_HOME_CHANS_GET(flag) \
  11332. WMI_GET_BITS(flag, 24, 8)
  11333. #define WMI_PDEV_STATS_NUM_HOME_CHANS_SET(flag, val) \
  11334. WMI_SET_BITS(flag, 24, 8, val)
  11335. #define WMI_PDEV_STATS_AGG_RETRY_TH_GET(flag) \
  11336. WMI_GET_BITS(flag, 0, 8)
  11337. #define WMI_PDEV_STATS_AGG_RETRY_TH_SET(flag, val) \
  11338. WMI_SET_BITS(flag, 0, 8, val)
  11339. #define WMI_PDEV_STATS_NON_AGG_RETRY_TH_GET(flag) \
  11340. WMI_GET_BITS(flag, 8, 8)
  11341. #define WMI_PDEV_STATS_NON_AGG_RETRY_TH_SET(flag, val) \
  11342. WMI_SET_BITS(flag, 8, 8, val)
  11343. #define WMI_PDEV_STATS_MAX_NON_DATA_RETRY_TH_GET(flag) \
  11344. WMI_GET_BITS(flag, 16, 8)
  11345. #define WMI_PDEV_STATS_MAX_NON_DATA_RETRY_TH_SET(flag, val) \
  11346. WMI_SET_BITS(flag, 16, 8, val)
  11347. #define WMI_PDEV_STATS_NUM_CONSECUTIVE_BCN_TX_FILT_GET(flag) \
  11348. WMI_GET_BITS(flag, 24, 8)
  11349. #define WMI_PDEV_STATS_NUM_CONSECUTIVE_BCN_TX_FILT_SET(flag, val) \
  11350. WMI_SET_BITS(flag, 24, 8, val)
  11351. #define WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_GET(flag) \
  11352. WMI_GET_BITS(flag, 0, 16)
  11353. #define WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_SET(flag, val) \
  11354. WMI_SET_BITS(flag, 0, 16, val)
  11355. #define WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_GET(flag) \
  11356. WMI_GET_BITS(flag, 16, 16)
  11357. #define WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_SET(flag, val) \
  11358. WMI_SET_BITS(flag, 16, 16, val)
  11359. #define WMI_PDEV_STATS_PPDU_DUR_LIMIT_US_GET(flag) \
  11360. WMI_GET_BITS(flag, 0, 16)
  11361. #define WMI_PDEV_STATS_PPDU_DUR_LIMIT_US_SET(flag, val) \
  11362. WMI_SET_BITS(flag, 0, 16, val)
  11363. #define WMI_PDEV_STATS_MU_PPDU_DUR_LIMIT_US_GET(flag) \
  11364. WMI_GET_BITS(flag, 16, 16)
  11365. #define WMI_PDEV_STATS_MU_PPDU_DUR_LIMIT_US_SET(flag, val) \
  11366. WMI_SET_BITS(flag, 16, 16, val)
  11367. #define WMI_PDEV_STATS_RTS_RC_FLAGS_GET(flag) \
  11368. WMI_GET_BITS(flag, 0, 8)
  11369. #define WMI_PDEV_STATS_RTS_RC_FLAGS_SET(flag, val) \
  11370. WMI_SET_BITS(flag, 0, 8, val)
  11371. #define WMI_PDEV_STATS_RTS_RC_SET(flag, val) \
  11372. WMI_SET_BITS(flag, 8, 8, val)
  11373. #define WMI_PDEV_STATS_RTS_RC_GET(flag) \
  11374. WMI_GET_BITS(flag, 8, 8)
  11375. #define WMI_PDEV_STATS_GAP_TX_CH_MASK_SET(flag, val) \
  11376. WMI_SET_BITS(flag, 16, 8, val)
  11377. #define WMI_PDEV_STATS_GAP_TX_CH_MASK_GET(flag) \
  11378. WMI_GET_BITS(flag, 16, 8)
  11379. #define WMI_PDEV_STATS_GAP_RX_CH_MASK_SET(flag, val) \
  11380. WMI_SET_BITS(flag, 24, 8, val)
  11381. #define WMI_PDEV_STATS_GAP_RX_CH_MASK_GET(flag) \
  11382. WMI_GET_BITS(flag, 24, 8)
  11383. #define WMI_PDEV_STATS_GAP_PHY_MODE_SET(flag, val) \
  11384. WMI_SET_BITS(flag, 0, 16, val)
  11385. #define WMI_PDEV_STATS_GAP_PHY_MODE_GET(flag) \
  11386. WMI_GET_BITS(flag, 0, 16)
  11387. #define WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_SET(flag, val) \
  11388. WMI_SET_BITS(flag, 16, 16, val)
  11389. #define WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_GET(flag) \
  11390. WMI_GET_BITS(flag, 16, 16)
  11391. #define WMI_PDEV_STATS_CONSECUTIVE_FAILURE_SET(flag, val) \
  11392. WMI_SET_BITS(flag, 0, 16, val)
  11393. #define WMI_PDEV_STATS_CONSECUTIVE_FAILURE_GET(flag) \
  11394. WMI_GET_BITS(flag, 0, 16)
  11395. #define WMI_PDEV_STATS_NUM_FILS_DISC_ENQD_GET(flag) \
  11396. WMI_GET_BITS(flag, 24, 8)
  11397. #define WMI_PDEV_STATS_NUM_FILS_DISC_ENQD_SET(flag, val) \
  11398. WMI_SET_BITS(flag, 24, 8, val)
  11399. #define WMI_PDEV_STATS_RESET_CAUSE_BITMAP_GET(flag) \
  11400. WMI_GET_BITS(flag, 16, 8)
  11401. #define WMI_PDEV_STATS_RESET_CAUSE_BITMAP_SET(flag, val) \
  11402. WMI_SET_BITS(flag, 16, 8, val)
  11403. #define WMI_PDEV_STATS_SWBA_NUM_OF_VDEVS_GET(flag) \
  11404. WMI_GET_BITS(flag, 24, 8)
  11405. #define WMI_PDEV_STATS_SWBA_NUM_OF_VDEVS_SET(flag, val) \
  11406. WMI_SET_BITS(flag, 24, 8, val)
  11407. #define WMI_PDEV_STATS_HOME_CHAN_MHZ_GET(flag) \
  11408. WMI_GET_BITS(flag, 0, 16)
  11409. #define WMI_PDEV_STATS_HOME_CHAN_MHZ_SET(flag, val) \
  11410. WMI_SET_BITS(flag, 0, 16, val)
  11411. #define WMI_PDEV_STATS_HOME_CHAN_FLAGS_GET(flag) \
  11412. WMI_GET_BITS(flag, 16, 16)
  11413. #define WMI_PDEV_STATS_HOME_CHAN_FLAGS_SET(flag, val) \
  11414. WMI_SET_BITS(flag, 16, 16, val)
  11415. #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_1_GET(flag) \
  11416. WMI_GET_BITS(flag, 0, 16)
  11417. #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_1_SET(flag,val) \
  11418. WMI_SET_BITS(flag, 0, 16, val)
  11419. #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_2_GET(flag) \
  11420. WMI_GET_BITS(flag, 16, 16)
  11421. #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_2_SET(flag, val) \
  11422. WMI_SET_BITS(flag, 16, 16, val)
  11423. #define WMI_PDEV_STATS_CUR_CHAN_MHZ_GET(flag) \
  11424. WMI_GET_BITS(flag, 0, 16)
  11425. #define WMI_PDEV_STATS_CUR_CHAN_MHZ_SET(flag, val) \
  11426. WMI_SET_BITS(flag, 0, 16, val)
  11427. #define WMI_PDEV_STATS_CUR_CHAN_FLAGS_GET(flag) \
  11428. WMI_GET_BITS(flag, 16, 16)
  11429. #define WMI_PDEV_STATS_CUR_CHAN_FLAGS_SET(flag, val) \
  11430. WMI_SET_BITS(flag, 16, 16, val)
  11431. #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_1_GET(flag) \
  11432. WMI_GET_BITS(flag, 0, 16)
  11433. #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_1_SET(flag,val) \
  11434. WMI_SET_BITS(flag, 0, 16, val)
  11435. #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_2_GET(flag) \
  11436. WMI_GET_BITS(flag, 16, 16)
  11437. #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_2_SET(flag, val) \
  11438. WMI_SET_BITS(flag, 16, 16, val)
  11439. #define WMI_PDEV_STATS_BURST_MODE_GET(flag) \
  11440. WMI_GET_BITS(flag, 0, 8)
  11441. #define WMI_PDEV_STATS_BURST_MODE_SET(flag, val) \
  11442. WMI_SET_BITS(flag, 0, 8, val)
  11443. #define WMI_PDEV_STATS_PENDING_ISR_STATUS_GET(flag) \
  11444. WMI_GET_BITS(flag, 8, 16)
  11445. #define WMI_PDEV_STATS_PENDING_ISR_STATUS_SET(flag, val) \
  11446. WMI_SET_BITS(flag, 8, 16, val)
  11447. #define WMI_PDEV_STATS_BCN_Q_NUM_GET(flag) \
  11448. WMI_GET_BITS(flag, 0, 8)
  11449. #define WMI_PDEV_STATS_BCN_Q_NUM_SET(flag, val) \
  11450. WMI_SET_BITS(flag, 0, 8, val)
  11451. #define WMI_PDEV_STATS_NUM_BCNS_QUEUED_TO_HW_GET(flag) \
  11452. WMI_GET_BITS(flag, 8, 8)
  11453. #define WMI_PDEV_STATS_NUM_BCNS_QUEUED_TO_HW_SET(flag, val) \
  11454. WMI_SET_BITS(flag, 8, 8, val)
  11455. #define WMI_PDEV_STATS_SWFDA_VDEV_ID_GET(flag) \
  11456. WMI_GET_BITS(flag, 16, 8)
  11457. #define WMI_PDEV_STATS_SWFDA_VDEV_ID_SET(flag, val) \
  11458. WMI_SET_BITS(flag, 16, 8, val)
  11459. #define WMI_PDEV_STATS_ABORT_RESULT_GET(flag) \
  11460. WMI_GET_BITS(flag, 0, 1)
  11461. #define WMI_PDEV_STATS_ABORT_RESULT_SET(flag, val) \
  11462. WMI_SET_BITS(flag, 0, 1, val)
  11463. #define WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_GET(flag) \
  11464. WMI_GET_BITS(flag, 1, 1)
  11465. #define WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_SET(flag, val) \
  11466. WMI_SET_BITS(flag, 1, 1, val)
  11467. #define WMI_PDEV_STATS_ABORT_REASON_GET(flag) \
  11468. WMI_GET_BITS(flag, 2, 3)
  11469. #define WMI_PDEV_STATS_ABORT_REASON_SET(flag, val) \
  11470. WMI_SET_BITS(flag, 2, 3, val)
  11471. #define WMI_PDEV_STATS_IS_TXSUSPENDED_GET(flag) \
  11472. WMI_GET_BITS(flag, 5, 1)
  11473. #define WMI_PDEV_STATS_IS_TXSUSPENDED_SET(flag, val) \
  11474. WMI_SET_BITS(flag, 5, 1, val)
  11475. #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_GET(flag) \
  11476. WMI_GET_BITS(flag, 6, 1)
  11477. #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_SET(flag, val) \
  11478. WMI_SET_BITS(flag, 6, 1, val)
  11479. #define WMI_PDEV_STATS_IS_TXSUSPENDED_WITH_AFC_GET(flag) \
  11480. WMI_GET_BITS(flag, 7, 1)
  11481. #define WMI_PDEV_STATS_IS_TXSUSPENDED_WITH_AFC_SET(flag, val) \
  11482. WMI_SET_BITS(flag, 7, 1, val)
  11483. #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_WITH_AFC_GET(flag) \
  11484. WMI_GET_BITS(flag, 8, 1)
  11485. #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_WITH_AFC_SET(flag, val) \
  11486. WMI_SET_BITS(flag, 8, 1, val)
  11487. #define WMI_PDEV_STATS_SW_RETRY_MPDU_COUNT_TH_GET(flag) \
  11488. WMI_GET_BITS(flag, 9, 1)
  11489. #define WMI_PDEV_STATS_SW_RETRY_MPDU_COUNT_TH_SET(flag, val) \
  11490. WMI_SET_BITS(flag, 9, 1, val)
  11491. #define WMI_PDEV_STATS_SENDBAR_COMPL_IN_PROGRESS_GET(flag) \
  11492. WMI_GET_BITS(flag, 10, 1)
  11493. #define WMI_PDEV_STATS_SENDBAR_COMPL_IN_PROGRESS_SET(flag, val) \
  11494. WMI_SET_BITS(flag, 10, 1, val)
  11495. #define WMI_PDEV_STATS_CAC_ENABLED_GET(flag) \
  11496. WMI_GET_BITS(flag, 11, 1)
  11497. #define WMI_PDEV_STATS_CAC_ENABLED_SET(flag, val) \
  11498. WMI_SET_BITS(flag, 11, 1, val)
  11499. #define WMI_PDEV_STATS_PAUSED_GET(flag) \
  11500. WMI_GET_BITS(flag, 12, 1)
  11501. #define WMI_PDEV_STATS_PAUSED_SET(flag, val) \
  11502. WMI_SET_BITS(flag, 12, 1, val)
  11503. #define WMI_PDEV_STATS_SUSPENDED_GET(flag) \
  11504. WMI_GET_BITS(flag, 13, 1)
  11505. #define WMI_PDEV_STATS_SUSPENDED_SET(flag, val) \
  11506. WMI_SET_BITS(flag, 13, 1, val)
  11507. #define WMI_PDEV_STATS_MAC_COLD_RESET_GET(flag) \
  11508. WMI_GET_BITS(flag, 14, 1)
  11509. #define WMI_PDEV_STATS_MAC_COLD_RESET_SET(flag, val) \
  11510. WMI_SET_BITS(flag, 14, 1, val)
  11511. #define WMI_PDEV_STATS_SAFE_TO_ACCESS_HW_GET(flag) \
  11512. WMI_GET_BITS(flag, 15, 1)
  11513. #define WMI_PDEV_STATS_SAFE_TO_ACCESS_HW_SET(flag, val) \
  11514. WMI_SET_BITS(flag, 15, 1, val)
  11515. #define WMI_PDEV_STATS_STA_PS_STATECHG_ENABLE_GET(flag) \
  11516. WMI_GET_BITS(flag, 16, 1)
  11517. #define WMI_PDEV_STATS_STA_PS_STATECHG_ENABLE_SET(flag, val) \
  11518. WMI_SET_BITS(flag, 16, 1, val)
  11519. #define WMI_PDEV_STATS_WAL_HOST_SCAN_IN_PROGRESS_GET(flag) \
  11520. WMI_GET_BITS(flag, 17, 1)
  11521. #define WMI_PDEV_STATS_WAL_HOST_SCAN_IN_PROGRESS_SET(flag, val) \
  11522. WMI_SET_BITS(flag, 17, 1, val)
  11523. #define WMI_PDEV_STATS_ATF_CONFIG_GET(flag) \
  11524. WMI_GET_BITS(flag, 18, 1)
  11525. #define WMI_PDEV_STATS_ATF_CONFIG_SET(flag, val) \
  11526. WMI_SET_BITS(flag, 18, 1, val)
  11527. #define WMI_PDEV_STATS_EAPOL_AC_OVERRIDE_GET(flag) \
  11528. WMI_GET_BITS(flag, 19, 1)
  11529. #define WMI_PDEV_STATS_EAPOL_AC_OVERRIDE_SET(flag, val) \
  11530. WMI_SET_BITS(flag, 19, 1, val)
  11531. #define WMI_PDEV_STATS_CALC_NEXT_DTIM_CNT_GET(flag) \
  11532. WMI_GET_BITS(flag, 20, 1)
  11533. #define WMI_PDEV_STATS_CALC_NEXT_DTIM_CNT_SET(flag, val) \
  11534. WMI_SET_BITS(flag, 20, 1, val)
  11535. #define WMI_PDEV_STATS_ATF_STRICT_SCH_GET(flag) \
  11536. WMI_GET_BITS(flag, 21, 1)
  11537. #define WMI_PDEV_STATS_ATF_STRICT_SCH_SET(flag, val) \
  11538. WMI_SET_BITS(flag, 21, 1, val)
  11539. #define WMI_PDEV_STATS_BCN_TX_MODE_GET(flag) \
  11540. WMI_GET_BITS(flag, 22, 2)
  11541. #define WMI_PDEV_STATS_BCN_TX_MODE_SET(flag, val) \
  11542. WMI_SET_BITS(flag, 22, 2, val)
  11543. #define WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_GET(flag) \
  11544. WMI_GET_BITS(flag, 24, 1)
  11545. #define WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_SET(flag, val) \
  11546. WMI_SET_BITS(flag, 24, 1, val)
  11547. #define WMI_PDEV_STATS_DYN_BW_GET(flag) \
  11548. WMI_GET_BITS(flag, 25, 1)
  11549. #define WMI_PDEV_STATS_DYN_BW_SET(flag, val) \
  11550. WMI_SET_BITS(flag, 25, 1, val)
  11551. #define WMI_PDEV_STATS_IS_MLO_SUPPORTED_GET(flag) \
  11552. WMI_GET_BITS(flag, 26, 1)
  11553. #define WMI_PDEV_STATS_IS_MLO_SUPPORTED_SET(flag, val) \
  11554. WMI_SET_BITS(flag, 26, 1, val)
  11555. #define WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_GET(flag) \
  11556. WMI_GET_BITS(flag, 27, 1)
  11557. #define WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_SET(flag, val) \
  11558. WMI_SET_BITS(flag, 27, 1, val)
  11559. #define WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_GET(flag) \
  11560. WMI_GET_BITS(flag, 28, 1)
  11561. #define WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_SET(flag, val) \
  11562. WMI_SET_BITS(flag, 28, 1, val)
  11563. #define WMI_PDEV_STATS_GAP_PHY_MODE_VALID_GET(flag) \
  11564. WMI_GET_BITS(flag, 29, 1)
  11565. #define WMI_PDEV_STATS_GAP_PHY_MODE_VALID_SET(flag, val) \
  11566. WMI_SET_BITS(flag, 29, 1, val)
  11567. #define WMI_PDEV_STATS_GAP_CLKGATE_VALID_GET(flag) \
  11568. WMI_GET_BITS(flag, 30, 1)
  11569. #define WMI_PDEV_STATS_GAP_CLKGATE_VALID_SET(flag, val) \
  11570. WMI_SET_BITS(flag, 30, 1, val)
  11571. #define WMI_PDEV_STATS_BURST_ENABLE_GET(flag) \
  11572. WMI_GET_BITS(flag, 31, 1)
  11573. #define WMI_PDEV_STATS_BURST_ENABLE_SET(flag, val) \
  11574. WMI_SET_BITS(flag, 31, 1, val)
  11575. typedef struct {
  11576. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_btcoex_stats_struct*/
  11577. A_UINT32 tlv_header;
  11578. /** pdev_id for identifying the MAC */
  11579. A_UINT32 pdev_id;
  11580. /** Counts the number of BT TX requests */
  11581. A_UINT32 bt_tx_req_cntr;
  11582. /** Counts the number of BT RX requests */
  11583. A_UINT32 bt_rx_req_cntr;
  11584. /** Counts the number of BT requests that got NACKed */
  11585. A_UINT32 bt_req_nack_cntr;
  11586. /** Counts the number of WLAN TX request denied due to scheduled BT activity */
  11587. A_UINT32 wl_tx_req_nack_schd_bt_reason_cntr;
  11588. /** Counts the number of WLAN TX request denied due to current BT activity */
  11589. A_UINT32 wl_tx_req_nack_current_bt_reason_cntr;
  11590. /** Counts the number of WLAN TX request denied due to other WLAN in TX reason */
  11591. A_UINT32 wl_tx_req_nack_other_wlan_tx_reason_cntr;
  11592. /** Counts the number of times the WLAN in TX is aborted after getting ACKed */
  11593. A_UINT32 wl_in_tx_abort_cntr;
  11594. /** Counts the number of Auto Response WLAN TX requests */
  11595. A_UINT32 wl_tx_auto_resp_req_cntr;
  11596. /** Counts the number of ACKed WLAN TX requests */
  11597. A_UINT32 wl_tx_req_ack_cntr;
  11598. /** Counts the number of WLAN TX requests */
  11599. A_UINT32 wl_tx_req_cntr;
  11600. } wmi_ctrl_path_btcoex_stats_struct;
  11601. /* Send diag event based on trigger reasons */
  11602. typedef enum {
  11603. WMI_DIAG_TRIGGER_MIN = 0x1000,
  11604. WMI_DIAG_TRIGGER_HOST_REQUESTED = WMI_DIAG_TRIGGER_MIN,
  11605. WMI_DIAG_TRIGGER_BEACON_MISS,
  11606. WMI_DIAG_TRIGGER_SCAN_FAIL,
  11607. WMI_DIAG_TRIGGER_DISCONNECT,
  11608. WMI_DIAG_TRIGGER_ENTER_BMPS_IMPS_FAIL,
  11609. WMI_DIAG_TRIGGER_BUFFER_FULL,
  11610. WMI_DIAG_TRIGGER_DATA_STALL,
  11611. WMI_DIAG_TRIGGER_TIMER_TRIGGERED,
  11612. WMI_DIAG_TRIGGER_REMOTE_COPY,
  11613. WMI_DIAG_TRIGGER_CAL_FAILURE,
  11614. WMI_DIAG_TRIGGER_FES_BKPRESS_DEV_RESET_IND,
  11615. WMI_DIAG_TRIGGER_MAX,
  11616. } wmi_diag_trigger_e;
  11617. typedef enum {
  11618. WMI_CTRL_PATH_STATS_ARENA_HRAM,
  11619. WMI_CTRL_PATH_STATS_ARENA_HCRAM,
  11620. WMI_CTRL_PATH_STATS_ARENA_HREMOTE,
  11621. WMI_CTRL_PATH_STATS_ARENA_HCREMOTE,
  11622. WMI_CTRL_PATH_STATS_ARENA_REMOTE,
  11623. WMI_CTRL_PATH_STATS_ARENA_SRAM,
  11624. WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX,
  11625. WMI_CTRL_PATH_STATS_ARENA_PAGEABLE,
  11626. WMI_CTRL_PATH_STATS_ARENA_CMEM,
  11627. WMI_CTRL_PATH_STATS_ARENA_TRAM,
  11628. WMI_CTRL_PATH_STATS_ARENA_HWIO,
  11629. WMI_CTRL_PATH_STATS_ARENA_CALDB,
  11630. WMI_CTRL_PATH_STATS_ARENA_M3,
  11631. WMI_CTRL_PATH_STATS_ARENA_ETMREMOTE,
  11632. WMI_CTRL_PATH_STATS_ARENA_M3_DUMP,
  11633. WMI_CTRL_PATH_STATS_ARENA_EMUPHY,
  11634. WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM,
  11635. WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM_AUX,
  11636. WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX_OVERFLOW,
  11637. WMI_CTRL_PATH_STATS_ARENA_AMSS,
  11638. WMI_CTRL_PATH_STATS_ARENA_MLO_SHMEM,
  11639. WMI_CTRL_PATH_STATS_ARENA_MLO_H_SHMEM,
  11640. WMI_CTRL_PATH_STATS_ARENA_MLO_HC_SHMEM,
  11641. WMI_CTRL_PATH_STATS_ARENA_RRI_CMD,
  11642. WMI_CTRL_PATH_STATS_ARENA_SRAM_CLADE,
  11643. WMI_CTRL_PATH_STATS_ARENA_MAX,
  11644. } wmi_ctrl_path_fw_arena_ids;
  11645. /*
  11646. * Used by some hosts to print names of arenas, based on
  11647. * wmi_ctrl_path_fw_arena_ids values specified in
  11648. * wmi_ctrl_path_mem_stats_struct in ctrl_path_stats event msg.
  11649. */
  11650. static INLINE A_UINT8 *wmi_ctrl_path_fw_arena_id_to_name(A_UINT32 arena_id)
  11651. {
  11652. switch(arena_id)
  11653. {
  11654. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HRAM);
  11655. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HCRAM);
  11656. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HREMOTE);
  11657. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HCREMOTE);
  11658. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_REMOTE);
  11659. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM);
  11660. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX);
  11661. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_PAGEABLE);
  11662. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_CMEM);
  11663. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_TRAM);
  11664. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HWIO);
  11665. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_CALDB);
  11666. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_M3);
  11667. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_ETMREMOTE);
  11668. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_M3_DUMP);
  11669. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_EMUPHY);
  11670. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM);
  11671. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM_AUX);
  11672. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX_OVERFLOW);
  11673. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_AMSS);
  11674. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_SHMEM);
  11675. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_H_SHMEM);
  11676. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_HC_SHMEM);
  11677. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_RRI_CMD);
  11678. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_CLADE);
  11679. }
  11680. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_ARENA_UNKNOWN";
  11681. }
  11682. typedef struct {
  11683. /** TLV tag and len; tag equals
  11684. * WMITLV_TAG_STRUC_wmi_ctrl_path_mem_stats_struct */
  11685. A_UINT32 tlv_header;
  11686. A_UINT32 arena_id; /* see wmi_ctrl_path_fw_arena_ids */
  11687. A_UINT32 total_bytes; /* total bytes in each arena */
  11688. A_UINT32 allocated_bytes; /* allocated bytes in each arena */
  11689. } wmi_ctrl_path_mem_stats_struct;
  11690. /* status code of Get stats TWT dialog */
  11691. typedef enum _WMI_GET_STATS_TWT_STATUS_T {
  11692. WMI_GET_STATS_TWT_STATUS_OK, /* Get status TWT dialog successfully completed */
  11693. WMI_GET_STATS_TWT_STATUS_DIALOG_ID_NOT_EXIST,/* TWT dialog ID does not exist */
  11694. WMI_GET_STATS_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  11695. } WMI_GET_STATS_TWT_STATUS_T;
  11696. /* Resp type of ODD command operation */
  11697. typedef enum _WMI_ODD_ADDR_READ_OPTION_TYPE_T {
  11698. WMI_ODD_ADDR_READ_OPTION_TYPE_ADD_ADDR_COMMAND, /* Resp for the command to add/configure address space */
  11699. WMI_ODD_ADDR_READ_OPTION_TYPE_DEL_ADDR_COMMAND, /* Resp for the command to del/reset address space */
  11700. WMI_ODD_ADDR_READ_OPTION_TYPE_DISP_ADDR_COMMAND, /* Resp for the command to display address space */
  11701. WMI_ODD_ADDR_READ_OPTION_TYPE_DISP_VAL_COMMAND, /* Resp for the command to display value at address space */
  11702. } WMI_ODD_ADDR_READ_OPTION_TYPE_T;
  11703. typedef struct {
  11704. /** TLV tag and len; tag equals
  11705. * WMITLV_TAG_STRUC_wmi_ctrl_path_twt_stats_struct */
  11706. A_UINT32 tlv_header;
  11707. A_UINT32 dialog_id; /* TWT dialog ID */
  11708. A_UINT32 status; /* refer to WMI_GET_STATS_TWT_STATUS_T */
  11709. A_UINT32 num_sp_cycles; /* Number of TWT SP's*/
  11710. A_UINT32 avg_sp_dur_us; /* Average SP time */
  11711. A_UINT32 min_sp_dur_us; /* Minimum SP time */
  11712. A_UINT32 max_sp_dur_us; /* Maximum SP time */
  11713. A_UINT32 tx_mpdu_per_sp; /* Average pkts tx per SP */
  11714. A_UINT32 rx_mpdu_per_sp; /* Average pkts rx per SP */
  11715. A_UINT32 tx_bytes_per_sp; /* Average tx bytes per SP */
  11716. A_UINT32 rx_bytes_per_sp; /* Average rx bytes per SP */
  11717. } wmi_ctrl_path_twt_stats_struct;
  11718. #define BMISS_STATS_RSSI_SAMPLE_MAX 10
  11719. typedef struct {
  11720. A_INT32 rssi; /* dBm units */
  11721. A_UINT32 sample_time; /* timestamp from host/target shared qtimer */
  11722. } bmiss_stats_rssi_samples_t;
  11723. typedef struct {
  11724. A_UINT32 num_of_bmiss_sequences; /* number of consecutive bmiss > 2 */
  11725. A_UINT32 num_bitmask_wraparound; /* number of times bitmask wrapped around */
  11726. A_UINT32 num_bcn_hist_lost; /* number of beacons history we have lost */
  11727. } consecutive_bmiss_stats_t;
  11728. typedef struct {
  11729. /** TLV tag and len; tag equals
  11730. * WMITLV_TAG_STRUC_wmi_ctrl_path_bmiss_stats_struct */
  11731. A_UINT32 tlv_header;
  11732. A_UINT32 num_pre_bmiss; /* number of pre_bmiss */
  11733. bmiss_stats_rssi_samples_t rssi_samples[BMISS_STATS_RSSI_SAMPLE_MAX]; /* RSSI samples at pre bmiss*/
  11734. /* rssi_sample_curr_index:
  11735. * index of the element in rssi_samples array containing the oldest sample
  11736. */
  11737. A_UINT32 rssi_sample_curr_index;
  11738. A_UINT32 num_first_bmiss; /* number of first bmiss */
  11739. A_UINT32 num_final_bmiss; /* number of final bmiss */
  11740. A_UINT32 num_null_sent_in_first_bmiss; /* number of null frames sent in first bmiss */
  11741. A_UINT32 num_null_failed_in_first_bmiss; /* number of failed null frames in first bmiss */
  11742. A_UINT32 num_null_sent_in_final_bmiss; /* number of null frames sent in final bmiss */
  11743. A_UINT32 num_null_failed_in_final_bmiss; /* number of failed null frames in final bmiss */
  11744. consecutive_bmiss_stats_t cons_bmiss_stats;
  11745. } wmi_ctrl_path_bmiss_stats_struct;
  11746. typedef enum {
  11747. WMI_CTRL_PATH_STATS_CAL_PROFILE_COLD_BOOT_CAL = 0x0,
  11748. WMI_CTRL_PATH_STATS_CAL_PROFILE_FULL_CHAN_SWITCH = 0x1,
  11749. WMI_CTRL_PATH_STATS_CAL_PROFILE_SCAN_CHAN_SWITCH = 0x2,
  11750. WMI_CTRL_PATH_STATS_CAL_PROFILE_DPD_SPLIT_CAL = 0x3,
  11751. WMI_CTRL_PATH_STATS_CAL_PROFILE_TEMP_TRIGEER_CAL = 0x4,
  11752. WMI_CTRL_PATH_STATS_CAL_PROFILE_POWER_SAVE_WAKE_UP = 0x5,
  11753. WMI_CTRL_PATH_STATS_CAL_PROFILE_TIMER_TRIGGER_CAL = 0x6,
  11754. WMI_CTRL_PATH_STATS_CAL_PROFILE_FTM_TRIGGER_CAL = 0x7,
  11755. WMI_CTRL_PATH_STATS_CAL_PROFILE_AGILE_OR_POWER_DOWN_DTIM = 0x8,
  11756. WMI_CTRL_PATH_STATS_CAL_PROFILE_NOISY_ENV_RXDO = 0x9,
  11757. /* add new cal profiles above this line */
  11758. WMI_CTRL_PATH_STATS_CAL_PROFILE_INVALID = 0x1F
  11759. } wmi_ctrl_path_stats_cal_profile_ids;
  11760. typedef enum {
  11761. WMI_CTRL_PATH_STATS_CAL_TYPE_ADC = 0x0,
  11762. WMI_CTRL_PATH_STATS_CAL_TYPE_DAC = 0x1,
  11763. WMI_CTRL_PATH_STATS_CAL_TYPE_PROCESS = 0x2,
  11764. WMI_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR = 0x3,
  11765. WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO = 0x4,
  11766. WMI_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ = 0x5,
  11767. WMI_CTRL_PATH_STATS_CAL_TYPE_TXLO = 0x6,
  11768. WMI_CTRL_PATH_STATS_CAL_TYPE_TXIQ = 0x7,
  11769. WMI_CTRL_PATH_STATS_CAL_TYPE_RXIQ = 0x8,
  11770. WMI_CTRL_PATH_STATS_CAL_TYPE_IM2 = 0x9,
  11771. WMI_CTRL_PATH_STATS_CAL_TYPE_LNA = 0xa,
  11772. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO = 0xb,
  11773. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ = 0xc,
  11774. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS = 0xd,
  11775. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY = 0xe,
  11776. WMI_CTRL_PATH_STATS_CAL_TYPE_IBF = 0xf,
  11777. WMI_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL = 0x10,
  11778. WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ = 0x11,
  11779. WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM = 0x12,
  11780. WMI_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL = 0x13,
  11781. WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ = 0x14,
  11782. WMI_CTRL_PATH_STATS_CAL_TYPE_BWFILTER = 0x15,
  11783. WMI_CTRL_PATH_STATS_CAL_TYPE_PEF = 0x16,
  11784. WMI_CTRL_PATH_STATS_CAL_TYPE_PADROOP = 0x17,
  11785. WMI_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC = 0x18,
  11786. WMI_CTRL_PATH_STATS_CAL_TYPE_RXSPUR = 0x19,
  11787. /* add new cal types above this line */
  11788. WMI_CTRL_PATH_STATS_CAL_TYPE_INVALID = 0xFF
  11789. } wmi_ctrl_path_stats_cal_type_ids;
  11790. typedef enum {
  11791. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_NOISE_FLOOR = 0x0,
  11792. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORYLESS = 0x1,
  11793. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORY = 0x2,
  11794. /* add new periodic cal types above this line */
  11795. WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_INVALID = 0xFF
  11796. } wmi_ctrl_path_stats_periodic_cal_type_ids;
  11797. typedef enum {
  11798. WMI_CAL_FAILURE_REASON_ERROR_MIN = 0x0,
  11799. /* DPD failure reasons */
  11800. WMI_CAL_FAILURE_REASON_DPD_NMSE_FAIL = 0x1,
  11801. WMI_CAL_FAILURE_REASON_DPD_SQ_FAIL = 0x2,
  11802. WMI_CAL_FAILURE_REASON_DPD_HW_FAIL = 0x3,
  11803. WMI_CAL_FAILURE_REASON_DPD_EXCESSIVE_RETRY = 0x4,
  11804. /* RXDCO failure reasons */
  11805. WMI_CAL_FAILURE_REASON_RXDCO_HW_CAL_EXCESSIVE_RETRY = 0x5,
  11806. WMI_CAL_FAILURE_REASON_RXDCO_INVALID_HW_CAL = 0x6,
  11807. WMI_CAL_FAILURE_REASON_RXDCO_HW_AND_SWPP_FAILURE = 0x7,
  11808. /* ADC failure reasons */
  11809. WMI_CAL_FAILURE_REASON_TIADC_INVALID_BAND = 0x8,
  11810. /* BWFILTER failure reasons */
  11811. WMI_CAL_FAILURE_REASON_TXBBF = 0x9,
  11812. WMI_CAL_FAILURE_REASON_RXBBF = 0xa,
  11813. /* PKDET failure reasons */
  11814. WMI_CAL_FAILURE_REASON_PKDET = 0xb,
  11815. /* COMBCAL failure reasons */
  11816. WMI_CAL_FAILURE_REASON_COMB = 0xc,
  11817. /* add new cal failure error reasons above this line */
  11818. WMI_CAL_FAILURE_REASON_ERROR_MAX = 0xff,
  11819. } wmi_cal_failure_reason_code;
  11820. /*
  11821. * Used by some hosts to print names of cal profile, based on
  11822. * wmi_ctrl_path_cal_profile_ids values specified in
  11823. * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  11824. */
  11825. static INLINE
  11826. A_UINT8 *wmi_ctrl_path_cal_profile_id_to_name(A_UINT32 cal_profile_id)
  11827. {
  11828. switch (cal_profile_id)
  11829. {
  11830. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_COLD_BOOT_CAL);
  11831. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_FULL_CHAN_SWITCH);
  11832. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_SCAN_CHAN_SWITCH);
  11833. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_DPD_SPLIT_CAL);
  11834. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_TEMP_TRIGEER_CAL);
  11835. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_POWER_SAVE_WAKE_UP);
  11836. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_TIMER_TRIGGER_CAL);
  11837. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_FTM_TRIGGER_CAL);
  11838. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_AGILE_OR_POWER_DOWN_DTIM);
  11839. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_NOISY_ENV_RXDO);
  11840. }
  11841. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_CAL_PROFILE_UNKNOWN";
  11842. }
  11843. /*
  11844. * Used by some hosts to print names of cal type, based on
  11845. * wmi_ctrl_path_cal_type_ids values specified in
  11846. * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  11847. */
  11848. static INLINE A_UINT8 *wmi_ctrl_path_cal_type_id_to_name(A_UINT32 cal_type_id)
  11849. {
  11850. switch (cal_type_id)
  11851. {
  11852. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_ADC);
  11853. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DAC);
  11854. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PROCESS);
  11855. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR);
  11856. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO);
  11857. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ);
  11858. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TXLO);
  11859. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TXIQ);
  11860. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXIQ);
  11861. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_IM2);
  11862. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_LNA);
  11863. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO);
  11864. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ);
  11865. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS);
  11866. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY);
  11867. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_IBF);
  11868. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL);
  11869. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ);
  11870. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM);
  11871. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL);
  11872. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ);
  11873. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_BWFILTER);
  11874. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PEF);
  11875. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PADROOP);
  11876. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC);
  11877. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXSPUR);
  11878. }
  11879. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_CAL_TYPE_UNKNOWN";
  11880. }
  11881. /*
  11882. * Used by some hosts to print names of peridodic cal type, based on
  11883. * wmi_ctrl_path_periodic_cal_type_ids values specified in
  11884. * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
  11885. */
  11886. static INLINE A_UINT8 *wmi_ctrl_path_periodic_cal_type_id_to_name(A_UINT32 periodic_cal_type_id)
  11887. {
  11888. switch (periodic_cal_type_id)
  11889. {
  11890. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_NOISE_FLOOR);
  11891. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORYLESS);
  11892. WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORY);
  11893. }
  11894. return (A_UINT8 *) "WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_UNKNOWN";
  11895. }
  11896. /*
  11897. * Used by some hosts to print names of cal failure reason code, based on
  11898. * wmi_ctrl_path_cal_failure_reason_codes values specified in cal fail event msg
  11899. */
  11900. static INLINE A_UINT8 *wmi_cal_failure_reason_code_to_name(A_UINT32 cal_failure_reason_code)
  11901. {
  11902. switch (cal_failure_reason_code)
  11903. {
  11904. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_ERROR_MIN);
  11905. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_NMSE_FAIL);
  11906. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_SQ_FAIL);
  11907. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_HW_FAIL);
  11908. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_EXCESSIVE_RETRY);
  11909. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_HW_CAL_EXCESSIVE_RETRY);
  11910. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_INVALID_HW_CAL);
  11911. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_HW_AND_SWPP_FAILURE);
  11912. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_TIADC_INVALID_BAND);
  11913. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_TXBBF);
  11914. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXBBF);
  11915. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_PKDET);
  11916. WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_COMB);
  11917. }
  11918. return (A_UINT8 *) "WMI_CAL_FAILURE_REASON_UNKNOWN";
  11919. }
  11920. typedef struct {
  11921. /** TLV tag and len; tag equals
  11922. * WMITLV_TAG_STRUC_wmi_ctrl_path_calibration_stats_struct*/
  11923. A_UINT32 tlv_header;
  11924. /** pdev_id for identifying the MAC/PHY */
  11925. A_UINT32 pdev_id;
  11926. /** Bit 0 - 7 : cal type / periodic cal type
  11927. * These bits hold either a wmi_ctrl_path_stats_cal_type_ids
  11928. * value for generic cal (if bit 13 is cleared) or a
  11929. * wmi_ctrl_path_stats_periodic_cal_type_ids value for
  11930. * periodic cal (if bit 13 is set).
  11931. * Signifies the type of calibration
  11932. * cal_type : 8
  11933. * Bit 8 - 12 : These bits hold a wmi_ctrl_path_stats_cal_profile_ids value.
  11934. * Signifies the type of cal profile
  11935. * cal_profile : 5
  11936. * Bit 13 : Signifies whether stats is for generic cal or periodic cal
  11937. * is_cal_periodic : 1
  11938. * 0 -> generic cal
  11939. * 1 -> periodic cal
  11940. * Bit 14 - 31: Reserved for future
  11941. */
  11942. A_UINT32 cal_info;
  11943. A_UINT32 cal_triggered_cnt; /* Count of number of times calibration triggered */
  11944. A_UINT32 cal_fail_cnt; /* Count of number of times calibration failed */
  11945. A_UINT32 cal_fcs_cnt; /* Count of number of times FCS done for cal */
  11946. A_UINT32 cal_fcs_fail_cnt; /* Count of number of times FCS failed for cal */
  11947. } wmi_ctrl_path_calibration_stats_struct;
  11948. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_GET(cal_info) WMI_GET_BITS(cal_info, 0, 8)
  11949. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_SET(cal_info, cal_type) WMI_SET_BITS(cal_info, 0, 8, cal_type)
  11950. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_PROFILE_GET(cal_info) WMI_GET_BITS(cal_info, 8, 5)
  11951. #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_PROFILE_SET(cal_info, cal_profile) WMI_SET_BITS(cal_info, 8, 5, cal_profile)
  11952. #define WMI_CTRL_PATH_CALIBRATION_STATS_IS_PERIODIC_CAL_GET(cal_info) WMI_GET_BITS(cal_info, 13, 1)
  11953. #define WMI_CTRL_PATH_CALIBRATION_STATS_IS_PERIODIC_CAL_SET(cal_info, is_periodic) WMI_SET_BITS(cal_info, 13, 1, is_periodic)
  11954. /* 0=20MHz, 1=40MHz, 2=80MHz, 3=160MHz, 4=240MHz, 5=320MHz */
  11955. #define WMI_AWGN_MAX_BW 6
  11956. typedef struct {
  11957. /* TLV tag and len; tag equals
  11958. * WMITLV_TAG_STRUC_wmi_ctrl_path_awgn_stats_struct
  11959. * For 6G FCC test we have to monitor channel interference and switch
  11960. * to non-interference channel.
  11961. * Additive White Gaussian Noise (AWGN) interference detection logic
  11962. * is used to detect interference based upon CCA / BW drop / packet drop.
  11963. * Once AWGN interference is detected, the target sends
  11964. * WMI_DCS_INTERFERENCE_EVENTID to host for channel change/BW change.
  11965. * This stats struct is used to get info about how many times these
  11966. * CCA_Interference/BW_Drop/Pkt_Drop indicators of AWGN occur.
  11967. */
  11968. A_UINT32 tlv_header;
  11969. /*
  11970. * AWGN WMI event sent count
  11971. * This is used to inform how many WMI_DCS_INTERFERENCE_EVENTID have been
  11972. * sent to the host.
  11973. * WMI_DCS_INTERFERENCE_EVENTID is sent whenever one or more of
  11974. * CCA_Int/BW_Drop/Channel_Change(Pkt_Drop) happen.
  11975. */
  11976. A_UINT32 awgn_send_evt_cnt;
  11977. /* AWGN primary int count */
  11978. A_UINT32 awgn_pri_int_cnt;
  11979. /* AWGN secondary int count */
  11980. A_UINT32 awgn_sec_int_cnt;
  11981. /*
  11982. * AWGN pkt drop trigger count
  11983. * This shows how many times the presence of interference on the
  11984. * primary BW has been inferred due to pkt drops.
  11985. * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is
  11986. * interference on Primary Channel.
  11987. */
  11988. A_UINT32 awgn_pkt_drop_trigger_cnt;
  11989. /* awgn pkt drop trigger reset count */
  11990. A_UINT32 awgn_pkt_drop_trigger_reset_cnt;
  11991. /*
  11992. * AWGN bandwidth drop count
  11993. * This is used to inform count for any frame transmitted on lower BW
  11994. * than configured BW.
  11995. * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is BW drop.
  11996. */
  11997. A_UINT32 awgn_bw_drop_cnt;
  11998. /* AWGN bandwidth drop reset count */
  11999. A_UINT32 awgn_bw_drop_reset_cnt;
  12000. /*
  12001. * AWGN CCA int count
  12002. * This is used to inform the interference based on CCA registers.
  12003. * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is CCA
  12004. * interference.
  12005. */
  12006. A_UINT32 awgn_cca_int_cnt;
  12007. /* AWGN cca int reset count */
  12008. A_UINT32 awgn_cca_int_reset_cnt;
  12009. /* AWGN cca ack blk count */
  12010. A_UINT32 awgn_cca_ack_blk_cnt;
  12011. /* AWGN cca ack blk reset count */
  12012. A_UINT32 awgn_cca_ack_reset_cnt;
  12013. /*
  12014. * AWGN int BW cnt used to store interference occurred at 20/40/80/160MHz
  12015. * awgn_int_bw_cnt[0] counts interference detections in 20 MHz BW,
  12016. * awgn_int_bw_cnt[1] counts interference detections in 40 MHz BW,
  12017. * awgn_int_bw_cnt[2] counts interference detections in 80 MHz BW,
  12018. * awgn_int_bw_cnt[3] counts interference detections in 160 MHz BW,
  12019. * awgn_int_bw_cnt[4] is reserved for 240 MHz BW,
  12020. * awgn_int_bw_cnt[5] counts interference detections in 320 MHz BW.
  12021. */
  12022. A_UINT32 awgn_int_bw_cnt[WMI_AWGN_MAX_BW];
  12023. /* Number of OBSS interference occurred */
  12024. A_UINT32 obss_int_cnt;
  12025. /* Number of OBSS interference Sent to host */
  12026. A_UINT32 obss_int_evt_sent_host_cnt;
  12027. /* Number of OBSS interference skiped due to AWGN as high priority */
  12028. A_UINT32 obss_int_evt_skip_awgn_cnt;
  12029. /* Number of OBSS interference skiped due to duplicate OBSS interference */
  12030. A_UINT32 obss_int_evt_skip_dup_cnt;
  12031. /* Current OBSS interference segment details
  12032. * chan_bw_interference_bitmap:
  12033. * Indicates which 20MHz segments contain interference
  12034. * 320 MHz: bits 0-15
  12035. * 160 MHz: bits 0-7
  12036. * 80 MHz: bits 0-3
  12037. * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
  12038. * second lowest 20Mhz and so on.
  12039. * Each bit position will indicate 20MHz in which interference is seen.
  12040. * (Valid 16 bits out of 32 bit integer)
  12041. */
  12042. A_UINT32 obss_int_cur_int_seg;
  12043. /* Previous OBSS Int Segment details
  12044. * chan_bw_interference_bitmap:
  12045. * Indicates which 20MHz segments contain interference
  12046. * 320 MHz: bits 0-15
  12047. * 160 MHz: bits 0-7
  12048. * 80 MHz: bits 0-3
  12049. * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
  12050. * second lowest 20Mhz and so on.
  12051. * Each bit position will indicate 20MHz in which interference is seen.
  12052. * (Valid 16 bits out of 32 bit integer)
  12053. */
  12054. A_UINT32 obss_int_prv_int_seg;
  12055. /*
  12056. * OBSS int BW cnt used to store interference occurred at 20/40/80/160MHz
  12057. * obss_int_bw_cnt[0] counts interference detections in 20 MHz BW,
  12058. * obss_int_bw_cnt[1] counts interference detections in 40 MHz BW,
  12059. * obss_int_bw_cnt[2] counts interference detections in 80 MHz BW,
  12060. * obss_int_bw_cnt[3] counts interference detections in 160 MHz BW,
  12061. * obss_int_bw_cnt[4] counts interference detections in 240 MHz BW,
  12062. * obss_int_bw_cnt[5] counts interference detections in 320 MHz BW,
  12063. */
  12064. A_UINT32 obss_int_bw_cnt[WMI_AWGN_MAX_BW];
  12065. } wmi_ctrl_path_awgn_stats_struct;
  12066. typedef struct {
  12067. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_dfs_channel_stats_struct*/
  12068. A_UINT32 tlv_header;
  12069. /** pdev_id for identifying the PHY */
  12070. A_UINT32 pdev_id;
  12071. /** nol element num */
  12072. A_UINT32 nol;
  12073. /** Channel in MHz */
  12074. A_UINT32 channel;
  12075. /** Channel width in MHz */
  12076. A_UINT32 chwidth;
  12077. /** Time left for the channel to remain in NOL list (in seconds) */
  12078. A_UINT32 timeleft;
  12079. } wmi_ctrl_path_dfs_channel_stats_struct;
  12080. typedef struct {
  12081. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_odd_addr_read_struct*/
  12082. A_UINT32 tlv_header;
  12083. /* resp_type:
  12084. * Response type for each sub option:
  12085. * Add address space, display address, display data, delete address space.
  12086. * Refer to WMI_ODD_ADDR_READ_OPTION_TYPE_T.
  12087. */
  12088. A_UINT32 resp_type;
  12089. /* User configured Entry id */
  12090. A_UINT32 entry_id;
  12091. /* address:
  12092. * User configured Address Space.
  12093. * Any unused elements will be filled with 0x0.
  12094. */
  12095. A_UINT32 address[WMI_MAX_ADDRESS_SPACE];
  12096. /* data
  12097. * Data/Value at the User configured Address Space.
  12098. * Any unused elements will be filled with 0x0.
  12099. */
  12100. A_UINT32 data[WMI_MAX_ADDRESS_SPACE];
  12101. /* Status of the operation performed: 0 = failure, 1 = success */
  12102. A_UINT32 is_success;
  12103. } wmi_ctrl_path_odd_addr_read_struct;
  12104. /*
  12105. * The wmi_ctrl_path_afc_stats_struct is used to send AFC stats within
  12106. * the WMI_CTRL_PATH_STATS_EVENT message, in response to a
  12107. * WMI_REQUEST_CTRL_PATH_STATS_CMD message for the stat type
  12108. * WMI_REQUEST_CTRL_PATH_AFC_STAT.
  12109. */
  12110. typedef struct {
  12111. /* TLV tag and len; tag equals
  12112. * WMITLV_TAG_STRUC_wmi_ctrl_path_afc_stats_struct */
  12113. A_UINT32 tlv_header;
  12114. A_UINT32 pdev_id; /* pdev_id for identifying the MAC/PHY */
  12115. /* Count of new request ID every time it is generated */
  12116. A_UINT32 request_id_count;
  12117. /* Count of total number of AFC payload received */
  12118. A_UINT32 response_count;
  12119. /* Count of total number of invalid AFC response */
  12120. A_UINT32 invalid_response_count;
  12121. /* Count of total number of AFC resets received */
  12122. A_UINT32 reset_count;
  12123. /* AFC Response error counters*/
  12124. /*
  12125. * Count of total number of incorrect payload received due to
  12126. * request ID and response
  12127. * Increments when request ID doesn't match with response.
  12128. */
  12129. A_UINT32 id_mismatch_count;
  12130. /*
  12131. * Count of total number of "local_error_code" success event
  12132. * received as part of the AFC response payload in the below struct
  12133. * "afc_spectrum_inquiry_resp_bin_type"
  12134. */
  12135. A_UINT32 local_err_code_success;
  12136. /*
  12137. * Count of total number of "local_error_code" failure event
  12138. * received as part of the AFC response payload in the below struct
  12139. * "afc_spectrum_inquiry_resp_bin_type"
  12140. */
  12141. A_UINT32 local_err_code_failure;
  12142. /*
  12143. * The below fields are used to denote the count of
  12144. * different server response code received in "afc_serv_resp_code"
  12145. * received as part of "afc_spectrum_inquiry_resp_bin_type"
  12146. * These resp codes are as per the WFA spec
  12147. */
  12148. /* afc_serv_resp_code = version not supported */
  12149. A_UINT32 serv_resp_code_100;
  12150. /* afc_serv_resp_code = Device disallowed */
  12151. A_UINT32 serv_resp_code_101;
  12152. /* afc_serv_resp_code = Missing param */
  12153. A_UINT32 serv_resp_code_102;
  12154. /* afc_serv_resp_code = invalid value */
  12155. A_UINT32 serv_resp_code_103;
  12156. /* afc_serv_resp_code = unexpected param */
  12157. A_UINT32 serv_resp_code_106;
  12158. /* afc_serv_resp_code = unsupported spectrum */
  12159. A_UINT32 serv_resp_code_300;
  12160. /*
  12161. * AFC Compliance tracker
  12162. */
  12163. /* proxy_standalone_0
  12164. * This field displays the value of Request ID check disable received
  12165. * as part of the INI knob
  12166. */
  12167. A_UINT32 proxy_standalone_0;
  12168. /* proxy_standalone_1
  12169. * This field displays the value of Timer check disable received
  12170. * as part of the INI knob
  12171. */
  12172. A_UINT32 proxy_standalone_1;
  12173. /* Count of successful power events sent to host */
  12174. A_UINT32 power_event_counter;
  12175. /* Count of total force LPI power mode switch when grace count expires */
  12176. A_UINT32 force_LPI_counter;
  12177. /*
  12178. * Count of total number of successful host set
  12179. * TPC command received within the compliance timer
  12180. */
  12181. A_UINT32 tpc_wmi_success_count;
  12182. /*
  12183. * Count of total number of failed host set
  12184. * TPC command. This is incremented when compliance timer expires
  12185. */
  12186. A_UINT32 tpc_wmi_failure_count;
  12187. /*
  12188. * These counters are incremented as part of the
  12189. * Regulatory Compliance check done on the AFC payload
  12190. * received from server
  12191. */
  12192. /* Incorrect PSD value received in freq Obj */
  12193. A_UINT32 psd_failure_count;
  12194. /* Incorrect End freq received in freq Obj */
  12195. A_UINT32 psd_end_freq_failure_count;
  12196. /* Incorrect Start freq received in freq Obj */
  12197. A_UINT32 psd_start_freq_failure_count;
  12198. /* Incorrect EIRP received in channel obj */
  12199. A_UINT32 eirp_failure_count;
  12200. /* Incorrect centre freq channel received in channel obj */
  12201. A_UINT32 cfreq_failure_count;
  12202. /*
  12203. * AFC Current status
  12204. */
  12205. /* Current Request ID */
  12206. A_UINT32 request_id;
  12207. /* grace_timer_count
  12208. * This grace counter increments only after TTL expiry.
  12209. * Cleared to zero once valid payload is received.
  12210. */
  12211. A_UINT32 grace_timer_count;
  12212. /* Current TTL Time in seconds from last valid payload response */
  12213. A_UINT32 cur_ttl_timer;
  12214. /* deployment_mode
  12215. * 6G AP deployment mode denoting indoor or outdoor
  12216. * Indoor = 1, Outdoor = 2
  12217. */
  12218. A_UINT32 deployment_mode;
  12219. /*
  12220. * Proxy mode AFC-Response payload clear count
  12221. */
  12222. A_UINT32 payload_clear_count;
  12223. } wmi_ctrl_path_afc_stats_struct;
  12224. /* AT - Airtime */
  12225. /* AA - Available Airtime */
  12226. #define WMI_PMLO_UL_DL_INBSS_AT_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  12227. #define WMI_PMLO_UL_DL_INBSS_AT_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  12228. #define WMI_PMLO_UL_DL_INBSS_AT_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  12229. #define WMI_PMLO_UL_DL_INBSS_AT_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  12230. #define WMI_PMLO_UL_DL_INBSS_AT_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  12231. #define WMI_PMLO_UL_DL_INBSS_AT_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  12232. #define WMI_PMLO_UL_DL_INBSS_AT_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  12233. #define WMI_PMLO_UL_DL_INBSS_AT_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  12234. #define WMI_PMLO_LINK_OBSS_AT_GET(airtime) WMI_GET_BITS(airtime, 0, 8)
  12235. #define WMI_PMLO_LINK_OBSS_AT_SET(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  12236. #define WMI_PMLO_LINK_AA_GET(airtime) WMI_GET_BITS(airtime, 8, 8)
  12237. #define WMI_PMLO_LINK_AA_SET(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  12238. #define WMI_PMLO_UL_AIRTIME_NON_AC_GET(airtime) WMI_GET_BITS(airtime, 16, 8)
  12239. #define WMI_PMLO_UL_AIRTIME_NON_AC_SET(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  12240. #define WMI_PMLO_DL_AIRTIME_NON_AC_GET(airtime) WMI_GET_BITS(airtime, 24, 8)
  12241. #define WMI_PMLO_DL_AIRTIME_NON_AC_SET(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  12242. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  12243. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  12244. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  12245. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  12246. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  12247. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  12248. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  12249. #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  12250. /** Traffic condition used in estimating the available airtime value */
  12251. typedef enum {
  12252. WMI_PDEV_TRAFFIC_LIGHT = 0,
  12253. WMI_PDEV_TRAFFIC_MEDIUM = 1,
  12254. WMI_PDEV_TRAFFIC_HEAVY = 2,
  12255. WMI_PDEV_TRAFFIC_SATURATION = 3,
  12256. WMI_PDEV_TRAFFIC_MEDIUM_AND_OBSS = 4,
  12257. } wmi_pdev_traffic_condition;
  12258. /*
  12259. * The wmi_ctrl_path_pmlo_stats_struct is used to send Provisional MLO stats
  12260. * the WMI_CTRL_PATH_STATS_EVENT message, in response to a
  12261. * WMI_REQUEST_CTRL_PATH_STATS_CMD message for the stat type
  12262. * WMI_REQUEST_CTRL_PATH_PMLO_STAT.
  12263. */
  12264. typedef struct {
  12265. /* TLV tag and len; tag equals
  12266. * WMITLV_TAG_STRUC_wmi_ctrl_path_pmlo_stats_struct */
  12267. A_UINT32 tlv_header;
  12268. /** pdev_id for identifying the PHY */
  12269. A_UINT32 pdev_id;
  12270. /*
  12271. * Percentage of downlink air time used in each access category
  12272. * calculated InBSS, units in percentage.
  12273. * BIT[0-7] : AC_BE
  12274. * BIT[8-15] : AC_BK
  12275. * BIT[16-23] : AC_VI
  12276. * BIT[24-31] : AC_VO
  12277. * Please refer to WMI_PMLO_UL_DL_INBSS_AT_* macros
  12278. * to retrieve values for each access category in dl_inbss_airtime_per_ac.
  12279. */
  12280. union {
  12281. struct {
  12282. A_UINT32
  12283. dl_inbss_airtime_ac_be: 8,
  12284. dl_inbss_airtime_ac_bk: 8,
  12285. dl_inbss_airtime_ac_vi: 8,
  12286. dl_inbss_airtime_ac_vo: 8;
  12287. };
  12288. A_UINT32 dl_inbss_airtime_per_ac;
  12289. };
  12290. /*
  12291. * Percentage of uplink air time used in each access category
  12292. * calculated InBSS, units in percentage.
  12293. * BIT[0-7] : AC_BE
  12294. * BIT[8-15] : AC_BK
  12295. * BIT[16-23] : AC_VI
  12296. * BIT[24-31] : AC_VO
  12297. * Please refer to WMI_PMLO_UL_DL_INBSS_AT_* macros
  12298. * to set/get values for each access category in ul_inbss_airtime_per_ac.
  12299. */
  12300. union {
  12301. struct {
  12302. A_UINT32
  12303. ul_inbss_airtime_ac_be: 8,
  12304. ul_inbss_airtime_ac_bk: 8,
  12305. ul_inbss_airtime_ac_vi: 8,
  12306. ul_inbss_airtime_ac_vo: 8;
  12307. };
  12308. A_UINT32 ul_inbss_airtime_per_ac;
  12309. };
  12310. /*
  12311. * Percentage of air time available for each AC, units in percentage.
  12312. * BIT[0-7] : AC_BE
  12313. * BIT[8-15] : AC_BK
  12314. * BIT[16-23] : AC_VI
  12315. * BIT[24-31] : AC_VO
  12316. * Please refer to WMI_ESP_ESTIMATE_GET_* and WMI_ESP_ESTIMATE_SET_* macros
  12317. * to retrieve values for each access category in estimated_air_time_per_ac.
  12318. */
  12319. union {
  12320. struct {
  12321. A_UINT32
  12322. estimated_air_time_ac_be: 8,
  12323. estimated_air_time_ac_bk: 8,
  12324. estimated_air_time_ac_vi: 8,
  12325. estimated_air_time_ac_vo: 8;
  12326. };
  12327. A_UINT32 estimated_air_time_per_ac;
  12328. };
  12329. /*
  12330. * Average channel latency per AC, units in micro seconds.
  12331. * avg_chan_lat_per_ac[0] : AC_VO
  12332. * avg_chan_lat_per_ac[1] : AC_VI
  12333. * avg_chan_lat_per_ac[2] : AC_BE
  12334. * avg_chan_lat_per_ac[3] : AC_BK
  12335. */
  12336. A_UINT32 avg_chan_lat_per_ac[WMI_AC_MAX];
  12337. /*
  12338. * link_obss_airtime: Percentage of OBSS used air time per link,
  12339. * units in percentage.
  12340. * Refer to WMI_PMLO_LINK_OBSS_AT_* Macro to set/get values.
  12341. * link_idle_airtime: Idle/free airtime per link, units in percentage.
  12342. * Refer to WMI_PMLO_LINK_AA_* macro to set/get values.
  12343. * ul_inbss_airtime_non_ac: ul inBSS airtime occupied by non-AC traffic,
  12344. * units in percentage.
  12345. * Refer to WMI_PMLO_UL_AIRTIME_NON_AC_* macro to set/get values.
  12346. * dl_inbss_airtime_non_ac: dl inBSS airtime occupied by non-AC traffic,
  12347. * units in percentage.
  12348. * Refer to WMI_PMLO_DL_AIRTIME_NON_AC_* macro to set/get values.
  12349. */
  12350. union {
  12351. struct {
  12352. A_UINT32 link_obss_airtime: 8,
  12353. link_idle_airtime: 8,
  12354. ul_inbss_airtime_non_ac: 8,
  12355. dl_inbss_airtime_non_ac: 8;
  12356. };
  12357. A_UINT32 ul_dl_obss_free_aa_word32;
  12358. };
  12359. /*
  12360. * Traffic condition used in estimating the available airtime value.
  12361. * Refer to enum wmi_pdev_traffic_condition
  12362. * traffic_condition_used_per_ac[0] : AC_VO
  12363. * traffic_condition_used_per_ac[1] : AC_VI
  12364. * traffic_condition_used_per_ac[2] : AC_BE
  12365. * traffic_condition_used_per_ac[3] : AC_BK
  12366. * Saturation Traffic condition is evaluated to true when the number
  12367. * of associated stations and the number of active TIDs per access
  12368. * category crosses a threshold.
  12369. * Light Traffic condition is evaluated to true when the obss_rx_airtime
  12370. * is less than a threshold and the free channel is greater than the sum
  12371. * of DL and UL airtime per client.
  12372. * Heavy Traffic condition is evaluated to true when the free channel is
  12373. * less than a particular threshold and the number of active TIDs per
  12374. * access category crosses a threshold.
  12375. * OBSS (Medium) Traffic condition is evaluated to true when the
  12376. * obss_rx_airtime crosses a threshold.
  12377. * Medium Traffic case is carried out if all the above mentioned
  12378. * conditions evaluate to false.
  12379. */
  12380. A_UINT32 traffic_condition_used_per_ac[WMI_AC_MAX];
  12381. /*
  12382. * Every PPDU has an associated txop overhead value in its PPDU duration.
  12383. * In order to consider only the duration taken to transfer the actual
  12384. * data, we estimate the payload ratio.
  12385. * The packet overhead is accumulated for each PPDU, where it is recorded
  12386. * for each access category separately.
  12387. * The payload_ratio_dl values indicate the percentage of actual data
  12388. * packets' duration in the entire TX duration by omitting the overhead
  12389. * (units are percentage).
  12390. * By estimating the payload ratio, we would be able to further measure
  12391. * the free channel with increased accuracy.
  12392. *
  12393. * BIT[0-7] : AC_BE
  12394. * BIT[8-15] : AC_BK
  12395. * BIT[16-23] : AC_VI
  12396. * BIT[24-31] : AC_VO
  12397. * Please refer to WMI_PMLO_UL_DL_PAYLOAD_RATIO_* macros
  12398. * to retrieve values for each access category in payload_ratio_dl_per_ac.
  12399. */
  12400. union {
  12401. struct {
  12402. A_UINT32
  12403. payload_ratio_dl_ac_be: 8,
  12404. payload_ratio_dl_ac_bk: 8,
  12405. payload_ratio_dl_ac_vi: 8,
  12406. payload_ratio_dl_ac_vo: 8;
  12407. };
  12408. A_UINT32 payload_ratio_dl_per_ac;
  12409. };
  12410. /*
  12411. * Every PPDU has an associated txop overhead value in its PPDU duration.
  12412. * In order to consider only the duration taken to transfer the actual
  12413. * data, we estimate the payload ratio.
  12414. * The packet overhead is accumulated for each PPDU, where it is recorded
  12415. * for each access category separately.
  12416. * The payload_ratio_ul values indicate the percentage of actual data
  12417. * packets' duration in the entire RX duration by omitting the overhead
  12418. * (Units are percentage).
  12419. * By estimating the payload ratio, we would be able to further measure
  12420. * the free channel with increased accuracy.
  12421. *
  12422. * BIT[0-7] : AC_BE
  12423. * BIT[8-15] : AC_BK
  12424. * BIT[16-23] : AC_VI
  12425. * BIT[24-31] : AC_VO
  12426. * Please refer to WMI_PMLO_UL_DL_PAYLOAD_RATIO_* macros
  12427. * to retrieve values for each access category in payload_ratio_ul_per_ac.
  12428. */
  12429. union {
  12430. struct {
  12431. A_UINT32
  12432. payload_ratio_ul_ac_be: 8,
  12433. payload_ratio_ul_ac_bk: 8,
  12434. payload_ratio_ul_ac_vi: 8,
  12435. payload_ratio_ul_ac_vo: 8;
  12436. };
  12437. A_UINT32 payload_ratio_ul_per_ac;
  12438. };
  12439. /*
  12440. * Error margin of the estimated available airtime per AC,
  12441. * units are percentage.
  12442. * error_margin_per_ac[0] : AC_VO
  12443. * error_margin_per_ac[1] : AC_VI
  12444. * error_margin_per_ac[2] : AC_BE
  12445. * error_margin_per_ac[3] : AC_BK
  12446. */
  12447. A_UINT32 error_margin_per_ac[WMI_AC_MAX];
  12448. /*
  12449. * This parameter indicates the number of clients which would be
  12450. * considered to estimate the available airtime value during
  12451. * imbalanced traffic scenarios
  12452. * Value 0 indicates that we do not have imbalanced traffic.
  12453. * num_of_ul/dl_asymmetric_clients_per_ac[0] : AC_VO
  12454. * num_of_ul/dl_asymmetric_clients_per_ac[1] : AC_VI
  12455. * num_of_ul/dl_asymmetric_clients_per_ac[2] : AC_BE
  12456. * num_of_ul/dl_asymmetric_clients_per_ac[3] : AC_BK
  12457. */
  12458. A_UINT32 num_of_ul_asymmetric_clients_per_ac[WMI_AC_MAX];
  12459. A_UINT32 num_of_dl_asymmetric_clients_per_ac[WMI_AC_MAX];
  12460. } wmi_ctrl_path_pmlo_stats_struct;
  12461. typedef struct {
  12462. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_cfr_stats_struct */
  12463. A_UINT32 tlv_header;
  12464. /*
  12465. * This index is used for formatting the printout of this stats TLV.
  12466. * A stats header is added when the index=0.
  12467. */
  12468. A_UINT32 index;
  12469. wmi_mac_addr cfr_peer_mac_addr;
  12470. A_UINT32 peer_in_use;
  12471. A_UINT32 capture_in_progress;
  12472. /* capture_method: 0 means oneshot request, otherwise periodic request */
  12473. A_UINT32 capture_method;
  12474. A_UINT32 periodicity; /* Time in ms */
  12475. A_UINT32 latest_req_timestamp; /* Time in ms */
  12476. A_UINT32 latest_resp_timestamp; /* Time in ms */
  12477. A_UINT32 cfr_req_count;
  12478. A_UINT32 cfr_resp_success_count;
  12479. A_UINT32 cfr_resp_failure_count;
  12480. } wmi_ctrl_path_cfr_stats_struct;
  12481. #define WMI_MAX_MLO_LINKS 5
  12482. #define WMI_HE_MAP_COUNT 3
  12483. #define WMI_EHT_MAP_COUNT 3
  12484. typedef struct {
  12485. /* TLV tag and len; tag equals
  12486. * WMITLV_TAG_STRUC_wmi_ctrl_path_peer_stats_struct
  12487. */
  12488. A_UINT32 tlv_header;
  12489. /* mac address - part of wlan_peer */
  12490. wmi_mac_addr mac_addr;
  12491. /* wlan_peer flags - refer to IEEE80211_NODE_* flags in wlan_peer.h */
  12492. A_UINT32 opaque_debug_flags;
  12493. /* opaque_debug_vht_caps:
  12494. * Negotiated VHT capabilities in the wlan_peer struct
  12495. * Refer to ieee80211_defs.h.
  12496. */
  12497. A_UINT32 opaque_debug_vht_caps;
  12498. /* opaque_debug_flags_ext:
  12499. * Extended flags in the wlan_peer struct
  12500. * Refer to IEEE80211_NODE_* flags in wlan_peer.h.
  12501. */
  12502. A_UINT32 opaque_debug_flags_ext;
  12503. /* TID queues marked for TWT flush, present in wlan_peer */
  12504. A_UINT32 opaque_debug_twt_flush_tidmap;
  12505. /* Number of TWT SPs to be expired, present in wlan_peer */
  12506. A_UINT32 opaque_debug_n_TWT_SPs_to_expire;
  12507. /* opaque_debug_rc_flags:
  12508. * Peer rate information, part of struct rate_node
  12509. * Refer to whal_rate_api.h for complete RC_FLAGS details.
  12510. */
  12511. A_UINT32 opaque_debug_rc_flags;
  12512. /* opaque_debug_sm_event_mask_eosp_cnt:
  12513. * This word contains the following bitfields:
  12514. * - Power save state machine event mask,
  12515. * part of wal_ps_buf_peer_handle_t.
  12516. * Refer to enum wal_ps_buf_peer_reg_ev_handlers.
  12517. * Use WMI_PEER_STATS_SM_MASK_SET,GET macros.
  12518. * - End of service period (EOSP) sent retry counter,
  12519. * part of wal_ps_buf_peer_handle_t.
  12520. * Use WMI_PEER_STATS_EOSP_RETRY_CNT_SET,GET macros.
  12521. */
  12522. A_UINT32 opaque_debug_sm_event_mask_eosp_cnt;
  12523. /* opaque_debug_ps_buf_peer_flag1:
  12524. * Power save related send_n, ps_poll, unscheduled service period
  12525. * related fields;
  12526. * Part of wal_ps_buf_peer_handle_t.
  12527. * Refer to wal_ps_buf_peer_ctx struct definition.
  12528. */
  12529. A_UINT32 opaque_debug_ps_buf_peer_flag1;
  12530. /* opaque_debug_ps_buf_peer_flag2:
  12531. * Power save related trigger/delivery tid related fields.
  12532. * part of wal_ps_buf_peer_handle_t.
  12533. * Refer to wal_ps_buf_peer_ctx struct definition.
  12534. */
  12535. A_UINT32 opaque_debug_ps_buf_peer_flag2;
  12536. /* opaque_debug_ps_buf_peer_flag3:
  12537. * Power save related last trigger related information,
  12538. * part of wal_ps_buf_peer_handle_t.
  12539. * Refer to wal_ps_buf_peer_ctx struct definition.
  12540. */
  12541. A_UINT32 opaque_debug_ps_buf_peer_flag3;
  12542. /* opaque_debug_last_rx_trigger_time:
  12543. * Time of the most recently received uplink trigger frame,
  12544. * part of wal_ps_buf_peer_handle_t - in microseconds units.
  12545. */
  12546. A_UINT32 opaque_debug_last_rx_trigger_time;
  12547. /* opaque_debug_last_poll_time:
  12548. * TSF of the most recently received uplink PS-Poll,
  12549. * part of wal_ps_buf_peer_handle_t - in TU
  12550. */
  12551. A_UINT32 opaque_debug_last_poll_time;
  12552. /* opaque_debug_oldest_tx_buffered_waiting_ms:
  12553. * Enqueue time of most recent MSDU that AP has buffered for
  12554. * sleeping station, part of wal_ps_buf_peer_handle_t, in ms units.
  12555. */
  12556. A_UINT32 opaque_debug_oldest_tx_buffered_waiting_ms;
  12557. /* opaque_debug_last_rxtx_activity:
  12558. * The last time when there was a rx or tx traffic from a client,
  12559. * part of wal_ps_buf_peer_handle_t, in ms units.
  12560. */
  12561. A_UINT32 opaque_debug_last_rxtx_activity;
  12562. /* opaque_debug_twt_flush_expiry_timestamp:
  12563. * Peer's TWT flush expiry timestamp in us,
  12564. * part of peer_twt_flush struct.
  12565. */
  12566. A_UINT32 opaque_debug_twt_flush_expiry_timestamp;
  12567. /* opaque_debug_hw_link_id:
  12568. * Unique link id across SOCs, determined during QMI handshake,
  12569. * part of wlan_peer_ml_info_t.
  12570. */
  12571. A_UINT32 opaque_debug_hw_link_id;
  12572. /* opaque_debug_ml_partner_hw_link_id_bitmap:
  12573. * Hardware link id of the of partner links that are to be cleaned up.
  12574. * This is filled by host during peer delete cmd.
  12575. * It it part of wlan_peer_ml_info_t.
  12576. */
  12577. A_UINT32 opaque_debug_ml_partner_hw_link_id_bitmap;
  12578. /* opaque_debug_link_flags:
  12579. * MLO link flags: related to assoc, anchor, master and primary UMAC links.
  12580. * Refer to resmgr_mlo_link_flags.
  12581. * Part of wlan_peer_ml_info_t.
  12582. */
  12583. A_UINT32 opaque_debug_link_flags;
  12584. /* MLO peer id - part of wlan_ml_peer_t */
  12585. A_UINT32 opaque_debug_ml_peer_id;
  12586. /* MLD mac address - part of wlan_ml_peer_t */
  12587. wmi_mac_addr opaque_debug_mld_mac_addr;
  12588. /* opaque_debug_assoc_id_usage_cnt:
  12589. * Part of wlan_peer.
  12590. * This word contains the following bitfields:
  12591. * - assoc id of the peer
  12592. * Use WMI_PEER_STATS_ASSOCIATE_ID_SET,GET macros.
  12593. * - peer usage count to track if peer alloc command is sent
  12594. * for new or existing peer,
  12595. * Use WMI_PEER_STATS_USAGE_CNT_SET,GET macros.
  12596. */
  12597. A_UINT32 opaque_debug_assoc_id_usage_cnt;
  12598. /* opaque_debug_default_ht_caps:
  12599. * Part of wlan_peer.
  12600. * This word contains the following bitfields:
  12601. * - default peer capabilities of the peer - refer ieee80211_defs.h
  12602. * Use WMI_PEER_STATS_DEF_CAPS_SET,GET macros.
  12603. * - HT capabilities of the peer - refer ieee80211_defs.h
  12604. * Use WMI_PEER_STATS_HT_CAPS_SET,GET macros.
  12605. */
  12606. A_UINT32 opaque_debug_default_ht_caps;
  12607. /* opaque_debug_inact_gen:
  12608. * Part of wlan_peer.
  12609. * This word contains the following bitfields:
  12610. * - Overall tx/rx inactivity time of the peer in seconds
  12611. * Use WMI_PEER_STATS_INACT_GEN_SET,GET macros.
  12612. * - Data tx/rx inactivity time of the peer in seconds.
  12613. * Use WMI_PEER_STATS_DATA_INACT_GEN_SET,GET macros.
  12614. */
  12615. A_UINT32 opaque_debug_inact_gen;
  12616. /* opaque_debug_id_type:
  12617. * Part of wlan_peer.
  12618. * This word contains the following bitfields:
  12619. * - Type of peer whether it is bss,self or remote peer.
  12620. * Refer to enum wmi_peer_type.
  12621. * Use WMI_PEER_STATS_TYPE_SET,GET macros.
  12622. * - MAC ID that the peer belongs to
  12623. * Use WMI_PEER_STATS_MAC_ID_SET,GET macros.
  12624. * - sw peer id of the peer
  12625. * Use WMI_PEER_STATS_ID_SET,GET macros.
  12626. */
  12627. A_UINT32 opaque_debug_id_type;
  12628. /* Deleted tids bitmask within the peer - part of wal_peer */
  12629. A_UINT32 opaque_debug_deleted_tidmask;
  12630. /* number of local pending frames for completions - part of wal_peer */
  12631. A_UINT32 opaque_debug_num_of_local_frames_pending;
  12632. /* flags part of wal_peer - refer to wal_peer_flags_t */
  12633. A_UINT32 opaque_debug_wal_peer_flags;
  12634. /* opaque_debug_keyid0_ast_index:
  12635. * The AST index for key id 0 which is always allocated,
  12636. * part of wal_peer.
  12637. */
  12638. A_UINT32 opaque_debug_keyid0_ast_index;
  12639. /* opaque_debug_all_tids_block_module_bitmap:
  12640. * Bitmap of block IDs requesting block of all TIDs,
  12641. * part of wal_peer.
  12642. * Refer to enum WLAN_PAUSE_ID.
  12643. * This block/pause ID can be mapped to a WLAN_MODULE_ID module ID.
  12644. */
  12645. A_UINT32 opaque_debug_all_tids_block_module_bitmap;
  12646. /* opaque_debug_all_tids_pause_module_bitmap:
  12647. * Bitmap of pause IDs requesting block of all TIDs,
  12648. * part of wal_peer.
  12649. * Refer to enum WLAN_PAUSE_ID.
  12650. * This pause ID can be mapped to a WLAN_MODULE_ID module ID.
  12651. */
  12652. A_UINT32 opaque_debug_all_tids_pause_module_bitmap;
  12653. /* opaque_debug_data_tids_block_module_bitmap:
  12654. * Bitmap of block ids requesting block of data tids,
  12655. * part of wal_peer.
  12656. * Refer to enum WLAN_PAUSE_ID.
  12657. * This block/pause ID can be mapped to a WLAN_MODULE_ID module ID.
  12658. */
  12659. A_UINT32 opaque_debug_data_tids_block_module_bitmap;
  12660. /* opaque_debug_data_tids_pause_module_bitmap:
  12661. * Bitmap of pause ids requesting block of data tids,
  12662. * part of wal_peer.
  12663. * Refer to enum WLAN_PAUSE_ID.
  12664. * This pause ID can be mapped to a WLAN_MODULE_ID module ID.
  12665. */
  12666. A_UINT32 opaque_debug_data_tids_pause_module_bitmap;
  12667. /* The time stamp when first ppdu fails in us, part of wal_peer */
  12668. A_UINT32 opaque_debug_ppdu_fail_time;
  12669. /* opaque_debug_rate_params:
  12670. * This word contains the following bitfields:
  12671. * - Non data rate code of the peer - part of wal_peer
  12672. * Use WMI_PEER_STATS_BSS_NON_DATA_RC_SET,GET macros.
  12673. * - channel bandwidth supported by the peer, part of wal_peer.
  12674. * The mapping is as follows:
  12675. * 0 = 20 MHz, 1 = 40 MHz, 2 = 80 MHz, 3 = 160 MHz, 4 = 320 MHz
  12676. * Use WMI_PEER_STATS_CH_WIDTH_SET,GET macros.
  12677. * - MCS used for the last PPDU received from the peer, part of wal_peer
  12678. * Use WMI_PEER_STATS_RX_MCS_SET,GET macros.
  12679. */
  12680. A_UINT32 opaque_debug_rate_params;
  12681. /* consecutive QOS null frame tx fail count, part of wal_peer */
  12682. A_UINT32 opaque_debug_consecutive_null_failure;
  12683. /* peer delete state refer enum PEER_DELETE_SM_STATE, part of wal_peer */
  12684. A_UINT32 opaque_debug_peer_delete_sm_state;
  12685. /* opaque_debug_cache_rate_info_low32,_high32:
  12686. * Lower/upper 32 bits respectively of cached rate info variable
  12687. * updated by the HTT metadata.
  12688. * This rate_info is based on the values from struct
  12689. * htt_tx_msdu_desc_ext2_t .
  12690. * If htt_tx_desc_ext2->update_peer_cache is set to 1 and
  12691. * HTT_TX_TCL_METADATA_PEER_ID_GET(tcl_cmd_num) returns valid peer ID
  12692. * then rate_info cache of the peer is updated.
  12693. * Part of wal_peer.
  12694. */
  12695. A_UINT32 opaque_debug_cache_rate_info_low32;
  12696. A_UINT32 opaque_debug_cache_rate_info_high32;
  12697. /* opaque_debug_peer_delete_rc4_rekey:
  12698. * This word contains the following bitfields:
  12699. * - Flag that denotes if Peer delete all is in progress or not,
  12700. * part of wal_peer.
  12701. * Use WMI_PEER_STATS_DELETE_ALL_FLAG_SET,GET macros.
  12702. * - RC4 rekey counter, part of wal_peer.
  12703. * Use WMI_PEER_STATS_RC4_REKEY_CNT_SET,GET macros.
  12704. */
  12705. A_UINT32 opaque_debug_peer_delete_rc4_rekey;
  12706. /* opaque_debug_mcbc_tids_pause_bitmap:
  12707. * Bitmap containing Multicast and broadcast tids that are paused,
  12708. * part of wal_peer.
  12709. */
  12710. A_UINT32 opaque_debug_mcbc_tids_pause_bitmap;
  12711. /* opaque_debug_next_to_last_pn_low32,_high32:
  12712. * Lower/upper 32 bits respectively of last used PN value received,
  12713. * part of wal_peer.
  12714. */
  12715. A_UINT32 opaque_debug_next_to_last_pn_low32;
  12716. A_UINT32 opaque_debug_next_to_last_pn_high32;
  12717. /* opaque_debug_last_pn_low32,_high32:
  12718. * Lower/upper 32 bits respectively of current PN value received,
  12719. * part of wal_peer.
  12720. */
  12721. A_UINT32 opaque_debug_last_pn_low32;
  12722. A_UINT32 opaque_debug_last_pn_high32;
  12723. /* opaque_debug_twt_ap_peer_ctx_flags:
  12724. * This word contains the following bitfields:
  12725. * - TWT AP peer's context flags, part of twt_ap_peer_handle_t struct.
  12726. * Refer twt_ap_twt_session_t definition.
  12727. * Use WMI_PEER_STATS_TWT_AP_FLAGS_SET,GET macros.
  12728. * - TWT session counter, part of twt_ap_peer_handle_t struct.
  12729. * Use WMI_PEER_STATS_TWT_AP_SESSION_CNT_SET,GET macros.
  12730. * - TWT frame retry counter, part of twt_ap_peer_handle_t struct.
  12731. * Use WMI_PEER_STATS_TWT_FRM_RETRY_SET,GET macros.
  12732. */
  12733. A_UINT32 opaque_debug_twt_ap_peer_ctx_flags;
  12734. /* opaque_debug_twt_ap_counters:
  12735. * This word contains the following bitfields:
  12736. * - TWT UL trigger counter, part of twt_ap_peer_handle_t struct.
  12737. * Use WMI_PEER_STATS_TWT_UL_TRIGGER_SET,GET macros.
  12738. * - TWT Broadcast session counter, part of twt_ap_peer_handle_t struct.
  12739. * Use WMI_PEER_STATS_TWT_BC_SESSION_SET,GET macros.
  12740. * - TWT pending report counter, part of twt_ap_peer_handle_t struct.
  12741. * Use WMI_PEER_STATS_TWT_PENDING_REPORT_SET,GET macros.
  12742. * - TWT flow IDs, part of twt_ap_peer_handle_t struct.
  12743. * Use WMI_PEER_STATS_TWT_FLOW_IDS_SET,GET macros.
  12744. */
  12745. A_UINT32 opaque_debug_twt_ap_counters;
  12746. /* opaque_debug_tx_state_bmap_low32,_high32:
  12747. * Lower/upper 32 bits respectively of list of currently running
  12748. * BA Tx states for tids in this peer, part of wal_ba_peer_handle_t.
  12749. */
  12750. A_UINT32 opaque_debug_tx_state_bmap_low32;
  12751. A_UINT32 opaque_debug_tx_state_bmap_high32;
  12752. /* opaque_debug_addba_mode:
  12753. * This word contains the following bitfields:
  12754. * - ADDBA mode whether its automatic or manual,
  12755. * WAL_BA_ADDBA_MODE_AUTO = 0 and WAL_BA_ADDBA_MODE_MANUAL = 1
  12756. * Part of wal_ba_peer_handle_t.
  12757. * Use WMI_PEER_STATS_ADDBBA_TX_MODE_SET,GET macros.
  12758. * - ADDBA request's response code, part of wal_ba_peer_handle_t.
  12759. * Use WMI_PEER_STATS_ADDBBA_RESP_MODE_SET,GET macros.
  12760. */
  12761. A_UINT32 opaque_debug_addba_mode;
  12762. /* opaque_debug_tx_retry_bmap:
  12763. * Bitmap of tids and their TX BlockAck retry counters.
  12764. * Each TID uses 2 bits for its BA retry counter.
  12765. * Part of wal_ba_peer_handle_t.
  12766. */
  12767. A_UINT32 opaque_debug_tx_retry_bmap;
  12768. /* opaque_debug_rx_state_bmap:
  12769. * Bitmap of tids and their RX BlockAck retry counters.
  12770. * 00 - BA not setup
  12771. * 01 - BA in progress
  12772. * 10 - reserved
  12773. * 11 - BA setup.
  12774. * Each TID uses 2 bits for its BA RX state;
  12775. * for instance TID 0's BA info occupies bits 1:0 and so on.
  12776. * Part of wal_ba_peer_handle_t.
  12777. */
  12778. A_UINT32 opaque_debug_rx_state_bmap;
  12779. /* opaque_debug_tx_pending_delba_tid_bmap:
  12780. * TID bitmap containaing information DELBA tx pending,
  12781. * part of wal_ba_peer_handle_t.
  12782. */
  12783. A_UINT32 opaque_debug_tx_pending_delba_tid_bmap;
  12784. /* opaque_debug_link_monitor_tid_num:
  12785. * link monitor tid num in bss_peer ba_peer_handle,
  12786. * part of wal_ba_peer_handle_t.
  12787. */
  12788. A_UINT32 opaque_debug_link_monitor_tid_num;
  12789. /* opaque_debug_rc4_eapol_key_complete:
  12790. * Flag that denotes rc4 eapol key exchange is complete,
  12791. * part of wal_peer_ext.
  12792. */
  12793. A_UINT32 opaque_debug_rc4_eapol_key_complete;
  12794. /* qcache peer flags, refer to qpeer_flags_t */
  12795. A_UINT32 opaque_debug_qpeer_flags;
  12796. /* bitmap of TIDs requested for flush, part of wal_qcache_peer */
  12797. A_UINT32 opaque_debug_delete_requested_tidmask;
  12798. /* bitmap of created TIDs, part of wal_qcache_peer */
  12799. A_UINT32 opaque_debug_tid_created_tidmask;
  12800. /* opaque_debug_qpeer_rt_flags0,_flags1,_flags2:
  12801. * RT thread related fields in qpeer, refer to _wal_qcache_peer.
  12802. */
  12803. A_UINT32 opaque_debug_qpeer_rt_flags0;
  12804. A_UINT32 opaque_debug_qpeer_rt_flags1;
  12805. A_UINT32 opaque_debug_qpeer_rt_flags2;
  12806. /* opaque_debug_qpeer_sa_flags0,_flags1:
  12807. * SA thread related fields in qpeer, refer to _wal_qcache_peer.
  12808. */
  12809. A_UINT32 opaque_debug_qpeer_sa_flags0;
  12810. A_UINT32 opaque_debug_qpeer_sa_flags1;
  12811. /* BE thread related fields in qpeer, refer to _wal_qcache_peer */
  12812. A_UINT32 opaque_debug_qpeer_be_flags;
  12813. /* qpeer event bitmap, refer to wal_peer_event_type */
  12814. A_UINT32 opaque_debug_event_bitmap;
  12815. /* tx fail count for a peer, part of dcache peer */
  12816. A_UINT32 opaque_debug_seq_no_tx_fail_cnt;
  12817. /* Last transmission rate in kbps for a peer, part of dcache peer */
  12818. A_UINT32 opaque_debug_last_tx_rate_kbps;
  12819. /* opaque_debug_amsdu_size:
  12820. * This word contains the following bitfields:
  12821. * - MAX AMSDU size of the peer, part of dcache peer.
  12822. * Use WMI_PEER_STATS_MAX_AMSDU_SIZE_SET,GET macros.
  12823. */
  12824. A_UINT32 opaque_debug_amsdu_size;
  12825. /* opaque_debug_fake_sleep_time:
  12826. * Time elapsed in ms after entering into fake sleep after xretry failure,
  12827. * part of dcache peer.
  12828. */
  12829. A_UINT32 opaque_debug_fake_sleep_time;
  12830. /* opaque_debug_tx_frame_qos_ctrl:
  12831. * This word contains the following bitfields:
  12832. * - Tx frame control FC flags in ieee80211_defs.h, part of dcache peer.
  12833. * Use WMI_PEER_STATS_TX_FRAME_CTRL_SET,GET macros.
  12834. * - Tx QOS control FC flags in ieee80211_defs.h, part of dcache peer.
  12835. * Use WMI_PEER_STATS_TX_QOS_CTRL_SET,GET macros.
  12836. */
  12837. A_UINT32 opaque_debug_tx_frame_qos_ctrl;
  12838. /* opaque_debug_consec_fail_subfrm_sz:
  12839. * This word contains the following bitfields:
  12840. * - Consecutive tx fail count for the peer, part of dcache peer.
  12841. * Use WMI_PEER_STATS_CONSEC_FAIL_SET,GET macros.
  12842. * - subframe size configured for the peer, part of dcache peer.
  12843. * Use WMI_PEER_STATS_SUBFRAME_SIZE_SET,GET macros.
  12844. */
  12845. A_UINT32 opaque_debug_consec_fail_subfrm_sz;
  12846. /* opaque_debug_tx_fail_partial_aid:
  12847. * This word contains the following bitfields:
  12848. * - tx fail count for the peer, part of dcache peer.
  12849. * Use WMI_PEER_STATS_TX_FAIL_CNT_SET,GET macros.
  12850. * - Partial AID of the peer, part of dcache peer.
  12851. * Use WMI_PEER_STATS_TX_PARTIAL_AID_SET,GET macros.
  12852. */
  12853. A_UINT32 opaque_debug_tx_fail_partial_aid;
  12854. /* opaque_debug_max_nss:
  12855. * Part of dcache peer.
  12856. * This word contains the following bitfields:
  12857. * - Peer NSS value sent by host during WMI_PEER_ASSOC cmd.
  12858. * Use WMI_PEER_STATS_MAX_NSS_SET,GET macros.
  12859. */
  12860. A_UINT32 opaque_debug_max_nss;
  12861. /* opaque_debug_he_cap_info:
  12862. * Peer HE capabilities info sent during peer assoc cmd.
  12863. * Refer to WMI_HECAP_* macros in wmi_unified.h.
  12864. * Part of dcache peer.
  12865. */
  12866. A_UINT32 opaque_debug_he_cap_info;
  12867. /* opaque_debug_he_cap_info_ext:
  12868. * Peer extended HE capabilities info sent during peer assoc cmd.
  12869. * Refer to WMI_HECAP_* macros in wmi_unified.h.
  12870. * Part of dcache peer.
  12871. */
  12872. A_UINT32 opaque_debug_he_cap_info_ext;
  12873. /* opaque_debug_eht_cap_info:
  12874. * Peer EHT capabilities info.
  12875. * Refer to ieee80211_defs.h, part of dcache peer.
  12876. */
  12877. A_UINT32 opaque_debug_eht_cap_info;
  12878. /* TAC thread related fields in dcache peer refer wal_dcache_peer_t */
  12879. A_UINT32 opaque_debug_dcache_tac_flags;
  12880. /* RT thread related fields in dcache peer refer wal_dcache_peer_t */
  12881. A_UINT32 opaque_debug_dcache_rt_flags;
  12882. /* Supported RC modes for the peer refer enum RC_MODE, part of dcache */
  12883. A_UINT32 opaque_debug_rc_mode_supported_mask;
  12884. /* opaque_debug_wlan_peer_bitfield_mask:
  12885. * Part of wlan peer. This word contains the following bitfields:
  12886. * - Flag that denotes whether peer delete response is being sent
  12887. * to host or not.
  12888. * Use WMI_PEER_STATS_DEL_RESP_TO_HOST_SET,GET macros.
  12889. * - Flag that denotes if peer delete is in progress or not.
  12890. * Use WMI_PEER_STATS_DELETE_IN_PROGRESS_SET,GET macros.
  12891. * - Flag that denotes if peer migration is in progress or not.
  12892. * Use WMI_PEER_STATS_MIGRATION_IN_PROGRESS_SET,GET macros.
  12893. * - Flag that denotes peer's connection/authorized state.
  12894. * Refer WAL_PEER_STATE_* macros in wal_peer.h.
  12895. * Use WMI_PEER_STATS_CONN_STATE_SET,GET macros.
  12896. * - TX chain mask at 160MHz of the peer set during peer assoc command.
  12897. * Use WMI_PEER_STATS_TX_CHAIN_MASK_160_SET,GET macros.
  12898. * - Tx chain mask set during peer assoc command.
  12899. * Use WMI_PEER_STATS_TX_CHAIN_MASK_SET,GET macros.
  12900. * - copy of tx chain mask of peer saved for AP MIMO PS.
  12901. * Use WMI_PEER_STATS_ASSOC_CHAIN_MASK_SET,GET macros.
  12902. */
  12903. A_UINT32 opaque_debug_wlan_peer_bitfield_mask;
  12904. /* opaque_debug_wal_peer_bitfields:
  12905. * Part of wal_peer. This word contains the following bitfields:
  12906. * - Flag that denotes if QOS null is sent over WMI or not.
  12907. * Use WMI_PEER_STATS_QOS_NULL_OVER_WMI_SET,GET macros.
  12908. * - Flag that denotes whether peer assoc is received
  12909. * for the first time or not.
  12910. * Use WMI_PEER_STATS_NEW_ASSOC_SET,GET macros.
  12911. * - Flag that denotes whether TWT filter is enabled or not.
  12912. * Use WMI_PEER_STATS_TWT_FILT_FLAG_SET,GET macros.
  12913. * - Flag that denotes whether TWT is registered or not.
  12914. * Use WMI_PEER_STATS_TWT_REG_FLAG_SET,GET macros.
  12915. * - Flag that denotes whether WMM txQ uplink trigger is disabled or not.
  12916. * Use WMI_PEER_STATS_WMM_UL_TRIG_FLAG_SET,GET macros.
  12917. * - Number of active TIDs that do not have BA setup.
  12918. * Use WMI_PEER_STATS_ACTIVE_NOT_BA_TID_SET,GET macros.
  12919. */
  12920. A_UINT32 opaque_debug_wal_peer_bitfields;
  12921. /* flags in RT context refer wal_peer_ext_t */
  12922. A_UINT32 opaque_debug_wal_peer_rt_flags;
  12923. /* opaque_debug_ml_attributes:
  12924. * Part of wal_ml_peer. This word contains the following bitfields:
  12925. * - Num of MLO links
  12926. * Use WMI_PEER_STATS_NUM_LINKS_SET,GET macros.
  12927. * - ML peer id
  12928. * Use WMI_PEER_STATS_ML_PEER_ID_SET,GET macros.
  12929. * - Primary link ID
  12930. * Use WMI_PEER_STATS_PRI_LINK_ID_SET,GET macros.
  12931. * - Primary chip ID
  12932. * Use WMI_PEER_STATS_PRI_CHIP_ID_SET,GET macros.
  12933. * - Initial link count
  12934. * Use WMI_PEER_STATS_LINK_INIT_CNT_SET,GET macros.
  12935. * - Number of local links
  12936. * Use WMI_PEER_STATS_NUM_LOCAL_LINKS_SET,GET macros.
  12937. * - Bitmap of participating chips
  12938. * Use WMI_PEER_STATS_CHIPS_BITMAP_SET,GET macros.
  12939. */
  12940. A_UINT32 opaque_debug_ml_attributes;
  12941. /* wal peer MLO flags refer ml_peer_flags_t */
  12942. A_UINT32 opaque_debug_ml_flags;
  12943. /* opaque_debug_ml_link_info_flags:
  12944. * Part of link_info in wlan_peer_ml_info_t.
  12945. * This word contains the following bitfields:
  12946. * - flag denoting if MLO-link is valid or not
  12947. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_SET,GET macros.
  12948. * - flag denoting if MLO-link is active or not
  12949. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_SET,GET macros.
  12950. * - flag denoting if MLO-link is primary or not
  12951. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_SET,GET macros.
  12952. * - flag denoting if MLO-link is assoc link or not
  12953. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_SET,GET macros.
  12954. * - Chip ID of the MLO-link
  12955. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_SET,GET macros.
  12956. * - IEEE link ID of the MLO-link
  12957. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_SET,GET macros.
  12958. * - HW link ID of the MLO-link
  12959. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_SET,GET macros.
  12960. * - logical link ID of the MLO-link
  12961. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_SET,GET macros.
  12962. * - flag denoting if MLO-link is master link or not
  12963. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_SET,GET macros.
  12964. * - flag denoting if MLO-link is anchor link or not
  12965. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_SET,GET macros.
  12966. * - flag denoting if MLO-link is initialized or not
  12967. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_SET,GET macros.
  12968. */
  12969. A_UINT32 opaque_debug_ml_link_info_flags[WMI_MAX_MLO_LINKS];
  12970. /* opaque_debug_ml_link_info_id:
  12971. * Part of link_info in wlan_peer_ml_info_t.
  12972. * This word contains the following bitfields:
  12973. * - sw_peer_id corresponding to the link
  12974. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_SET,GET macros.
  12975. * - vdev id corresponding to the link
  12976. * Use WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_SET,GET macros.
  12977. */
  12978. A_UINT32 opaque_debug_ml_link_info_id[WMI_MAX_MLO_LINKS];
  12979. /* MLO link info primary tid mask, part of link_info in wlan_peer_ml_info_t */
  12980. A_UINT32 opaque_debug_ml_link_info_pri_tidmask[WMI_MAX_MLO_LINKS];
  12981. /* opaque_debug_rc_node_params:
  12982. * Part of struct TX_PEER_PARAMS.
  12983. * This word contains the following bitfields:
  12984. * - NSS of the peer in 160MHZ
  12985. * Use WMI_PEER_STATS_NSS_160_SET,GET macros.
  12986. * - phymode of the peer - refer enum WLAN_PHY_MODE
  12987. * Use WMI_PEER_STATS_RC_PHYMODE_SET,GET macros.
  12988. * - legacy rate set for the peer
  12989. * Use WMI_PEER_STATS_LEGACY_RATE_SET,GET macros.
  12990. */
  12991. A_UINT32 opaque_debug_rc_node_params;
  12992. /* opaque_debug_rc_vht_mcs_set:
  12993. * Rate node param - negotiated VHT MCS map,
  12994. * part of struct TX_PEER_PARAMS
  12995. */
  12996. A_UINT32 opaque_debug_rc_vht_mcs_set;
  12997. /* opaque_debug_rc_node_params1:
  12998. * Part of link_info in wlan_peer_ml_info_t.
  12999. * This word contains the following bitfields:
  13000. * - Minimum data rate set for the peer in Mbps
  13001. * Use WMI_PEER_STATS_MIN_DATA_RATE_SET,GET macros.
  13002. * - Max VHT rate set for the peer
  13003. * Use WMI_PEER_STATS_VHT_MAX_RATE_SET,GET macros.
  13004. * - Max VHT streams set for the peer
  13005. * Use WMI_PEER_STATS_VHT_MAX_STREAMS_SET,GET macros.
  13006. * - BSS - Channel frequency set for the peer in MHz
  13007. * Use WMI_PEER_STATS_RC_CHAN_FREQ_SET,GET macros.
  13008. */
  13009. A_UINT32 opaque_debug_rc_node_params1;
  13010. /* opaque_debug_he_mcs_nss_set_tx,_rx:
  13011. * Rate node param - negotiated HE MCS tx+rx maps,
  13012. * part of struct TX_PEER_PARAMS.
  13013. * The lower 8 bits (bits 23:16) within the upper 16 bits indicate
  13014. * MCS 12/13 enablement for BW <= 80MHz; the upper 8 bits (bits 31:24)
  13015. * within the 16 bits indicate MCS 12/13 enablement for BW > 80MHz.
  13016. * The 16 bits for the index values are within the upper bits (bits 31:16)
  13017. * of a 32-bit word. and WMI_HE_MAP_COUNT is based on HE_MCS_MAP_CNT
  13018. * in ieee80211_defs.h.
  13019. */
  13020. A_UINT32 opaque_debug_he_mcs_nss_set_tx[WMI_HE_MAP_COUNT];
  13021. A_UINT32 opaque_debug_he_mcs_nss_set_rx[WMI_HE_MAP_COUNT];
  13022. /* opaque_debug_eht_mcs_nss_set_tx,_rx:
  13023. * Rate node param - negotiated EHT MCS tx+rx maps,
  13024. * part of struct TX_PEER_PARAMS.
  13025. * B0-B3 indicates max NSS that supports mcs 0-7
  13026. * B4-B7 indicates max NSS that supports mcs 8-9
  13027. * B8-B11 indicates max NSS that supports mcs 10-11
  13028. * B12-B15 indicates max NSS that supports mcs 12-13
  13029. * B16-B31 reserved.
  13030. * WMI_EHT_MAP_COUNT is based on EHT_MCS_MAP_CNT in ieee80211_defs.h.
  13031. */
  13032. A_UINT32 opaque_debug_eht_mcs_nss_set_tx[WMI_EHT_MAP_COUNT];
  13033. A_UINT32 opaque_debug_eht_mcs_nss_set_rx[WMI_EHT_MAP_COUNT];
  13034. /* opaque_debug_rc_user_start_mcs_rate:
  13035. * Rate node user_start_rate is MCS value set based on phymode.
  13036. * For possible values refer "INITIAL_" macros in ratectrl.h.
  13037. * Part of struct TX_PEER_PARAMS.
  13038. * This is the starting value of MCS that was used by rate control
  13039. * for the first transmissions to the peer, until PER information
  13040. * from the peer allowed the rate control algorithm to determine
  13041. * the suitable MCS.
  13042. */
  13043. A_UINT32 opaque_debug_rc_user_start_mcs_rate;
  13044. /*
  13045. * The following 4 opaque_debug_field variables are provided purely
  13046. * for debugging by technicians who have outside knowledge of what
  13047. * kind of values the target has placed into these fields.
  13048. * They are not to be interpreted by the host driver in any manner.
  13049. */
  13050. A_UINT32 opaque_debug_field_1;
  13051. A_UINT32 opaque_debug_field_2;
  13052. A_UINT32 opaque_debug_field_3;
  13053. A_UINT32 opaque_debug_field_4;
  13054. } wmi_ctrl_path_peer_stats_struct;
  13055. #define WMI_PEER_STATS_SM_MASK_SET(flag, val) \
  13056. WMI_SET_BITS(flag, 0, 16, val)
  13057. #define WMI_PEER_STATS_SM_MASK_GET(flag) \
  13058. WMI_GET_BITS(flag, 0, 16)
  13059. #define WMI_PEER_STATS_EOSP_RETRY_CNT_SET(flag, val) \
  13060. WMI_SET_BITS(flag, 16, 8, val)
  13061. #define WMI_PEER_STATS_EOSP_RETRY_CNT_GET(flag) \
  13062. WMI_GET_BITS(flag, 16, 8)
  13063. /* bits 31:24 unused/reserved */
  13064. #define WMI_PEER_STATS_ASSOCIATE_ID_SET(flag, val) \
  13065. WMI_SET_BITS(flag, 0, 16, val)
  13066. #define WMI_PEER_STATS_ASSOCIATE_ID_GET(flag) \
  13067. WMI_GET_BITS(flag, 0, 16)
  13068. #define WMI_PEER_STATS_USAGE_CNT_SET(flag, val) \
  13069. WMI_SET_BITS(flag, 16, 16, val)
  13070. #define WMI_PEER_STATS_USAGE_CNT_GET(flag) \
  13071. WMI_GET_BITS(flag, 16, 16)
  13072. #define WMI_PEER_STATS_DEF_CAPS_SET(flag, val) \
  13073. WMI_SET_BITS(flag, 0, 16, val)
  13074. #define WMI_PEER_STATS_DEF_CAPS_GET(flag) \
  13075. WMI_GET_BITS(flag, 0, 16)
  13076. #define WMI_PEER_STATS_HT_CAPS_SET(flag, val) \
  13077. WMI_SET_BITS(flag, 16, 16, val)
  13078. #define WMI_PEER_STATS_HT_CAPS_GET(flag) \
  13079. WMI_GET_BITS(flag, 16, 16)
  13080. #define WMI_PEER_STATS_INACT_GEN_SET(flag, val) \
  13081. WMI_SET_BITS(flag, 0, 16, val)
  13082. #define WMI_PEER_STATS_INACT_GEN_GET(flag) \
  13083. WMI_GET_BITS(flag, 0, 16)
  13084. #define WMI_PEER_STATS_DATA_INACT_GEN_SET(flag, val) \
  13085. WMI_SET_BITS(flag, 16, 16, val)
  13086. #define WMI_PEER_STATS_DATA_INACT_GEN_GET(flag) \
  13087. WMI_GET_BITS(flag, 16, 16)
  13088. #define WMI_PEER_STATS_PEER_TYPE_SET(flag, val) \
  13089. WMI_SET_BITS(flag, 0, 8, val)
  13090. #define WMI_PEER_STATS_PEER_TYPE_GET(flag) \
  13091. WMI_GET_BITS(flag, 0, 8)
  13092. #define WMI_PEER_STATS_MAC_ID_SET(flag, val) \
  13093. WMI_SET_BITS(flag, 8, 8, val)
  13094. #define WMI_PEER_STATS_MAC_ID_GET(flag) \
  13095. WMI_GET_BITS(flag, 8, 8)
  13096. #define WMI_PEER_STATS_PEER_ID_SET(flag, val) \
  13097. WMI_SET_BITS(flag, 16, 16, val)
  13098. #define WMI_PEER_STATS_PEER_ID_GET(flag) \
  13099. WMI_GET_BITS(flag, 16, 16)
  13100. #define WMI_PEER_STATS_BSS_NON_DATA_RC_SET(flag, val) \
  13101. WMI_SET_BITS(flag, 0, 8, val)
  13102. #define WMI_PEER_STATS_BSS_NON_DATA_RC_GET(flag) \
  13103. WMI_GET_BITS(flag, 0, 8)
  13104. #define WMI_PEER_STATS_CH_WIDTH_SET(flag, val) \
  13105. WMI_SET_BITS(flag, 8, 8, val)
  13106. #define WMI_PEER_STATS_CH_WIDTH_GET(flag) \
  13107. WMI_GET_BITS(flag, 8, 8)
  13108. #define WMI_PEER_STATS_RX_MCS_SET(flag, val) \
  13109. WMI_SET_BITS(flag, 16, 8, val)
  13110. #define WMI_PEER_STATS_RX_MCS_GET(flag) \
  13111. WMI_GET_BITS(flag, 16, 8)
  13112. /* bits 31:24 unused/reserved */
  13113. #define WMI_PEER_STATS_DELETE_ALL_FLAG_SET(flag, val) \
  13114. WMI_SET_BITS(flag, 0, 8, val)
  13115. #define WMI_PEER_STATS_DELETE_ALL_FLAG_GET(flag) \
  13116. WMI_GET_BITS(flag, 0, 8)
  13117. #define WMI_PEER_STATS_RC4_REKEY_CNT_SET(flag, val) \
  13118. WMI_SET_BITS(flag, 8, 8, val)
  13119. #define WMI_PEER_STATS_RC4_REKEY_CNT_GET(flag) \
  13120. WMI_GET_BITS(flag, 8, 8)
  13121. /* bits 31:16 unused/reserved */
  13122. #define WMI_PEER_STATS_TWT_AP_FLAGS_SET(flag, val) \
  13123. WMI_SET_BITS(flag, 0, 16, val)
  13124. #define WMI_PEER_STATS_TWT_AP_FLAGS_GET(flag) \
  13125. WMI_GET_BITS(flag, 0, 16)
  13126. #define WMI_PEER_STATS_TWT_AP_SESSION_CNT_SET(flag, val) \
  13127. WMI_SET_BITS(flag, 16, 8, val)
  13128. #define WMI_PEER_STATS_TWT_AP_SESSION_CNT_GET(flag) \
  13129. WMI_GET_BITS(flag, 16, 8)
  13130. #define WMI_PEER_STATS_TWT_FRM_RETRY_SET(flag, val) \
  13131. WMI_SET_BITS(flag, 24, 8, val)
  13132. #define WMI_PEER_STATS_TWT_FRM_RETRY_GET(flag) \
  13133. WMI_GET_BITS(flag, 24, 8)
  13134. #define WMI_PEER_STATS_TWT_UL_TRIGGER_SET(flag, val) \
  13135. WMI_SET_BITS(flag, 0, 8, val)
  13136. #define WMI_PEER_STATS_TWT_UL_TRIGGER_GET(flag) \
  13137. WMI_GET_BITS(flag, 0, 8)
  13138. #define WMI_PEER_STATS_TWT_BC_SESSION_SET(flag, val) \
  13139. WMI_SET_BITS(flag, 8, 8, val)
  13140. #define WMI_PEER_STATS_TWT_BC_SESSION_GET(flag) \
  13141. WMI_GET_BITS(flag, 8, 8)
  13142. #define WMI_PEER_STATS_TWT_PENDING_REPORT_SET(flag, val) \
  13143. WMI_SET_BITS(flag, 16, 8, val)
  13144. #define WMI_PEER_STATS_TWT_PENDING_REPORT_GET(flag) \
  13145. WMI_GET_BITS(flag, 16, 8)
  13146. #define WMI_PEER_STATS_TWT_FLOW_IDS_SET(flag, val) \
  13147. WMI_SET_BITS(flag, 24, 8, val)
  13148. #define WMI_PEER_STATS_TWT_FLOW_IDS_GET(flag) \
  13149. WMI_GET_BITS(flag, 24, 8)
  13150. #define WMI_PEER_STATS_ADDBBA_TX_MODE_SET(flag, val) \
  13151. WMI_SET_BITS(flag, 0, 16, val)
  13152. #define WMI_PEER_STATS_ADDBBA_TX_MODE_GET(flag) \
  13153. WMI_GET_BITS(flag, 0, 16)
  13154. #define WMI_PEER_STATS_ADDBBA_RESP_MODE_SET(flag, val) \
  13155. WMI_SET_BITS(flag, 16, 16, val)
  13156. #define WMI_PEER_STATS_ADDBBA_RESP_MODE_GET(flag) \
  13157. WMI_GET_BITS(flag, 16, 16)
  13158. #define WMI_PEER_STATS_MAX_AMSDU_SIZE_SET(flag, val) \
  13159. WMI_SET_BITS(flag, 0, 16, val)
  13160. #define WMI_PEER_STATS_MAX_AMSDU_SIZE_GET(flag) \
  13161. WMI_GET_BITS(flag, 0, 16)
  13162. /* bits 31:16 unused/reserved */
  13163. #define WMI_PEER_STATS_TX_FRAME_CTRL_SET(flag, val) \
  13164. WMI_SET_BITS(flag, 0, 16, val)
  13165. #define WMI_PEER_STATS_TX_FRAME_CTRL_GET(flag) \
  13166. WMI_GET_BITS(flag, 0, 16)
  13167. #define WMI_PEER_STATS_TX_QOS_CTRL_SET(flag, val) \
  13168. WMI_SET_BITS(flag, 16, 16, val)
  13169. #define WMI_PEER_STATS_TX_QOS_CTRL_GET(flag) \
  13170. WMI_GET_BITS(flag, 16, 16)
  13171. #define WMI_PEER_STATS_CONSEC_FAIL_SET(flag, val) \
  13172. WMI_SET_BITS(flag, 0, 16, val)
  13173. #define WMI_PEER_STATS_CONSEC_FAIL_GET(flag) \
  13174. WMI_GET_BITS(flag, 0, 16)
  13175. #define WMI_PEER_STATS_SUBFRAME_SIZE_SET(flag, val) \
  13176. WMI_SET_BITS(flag, 16, 16, val)
  13177. #define WMI_PEER_STATS_SUBFRAME_SIZE_GET(flag) \
  13178. WMI_GET_BITS(flag, 16, 16)
  13179. #define WMI_PEER_STATS_TX_FAIL_CNT_SET(flag, val) \
  13180. WMI_SET_BITS(flag, 0, 16, val)
  13181. #define WMI_PEER_STATS_TX_FAIL_CNT_GET(flag) \
  13182. WMI_GET_BITS(flag, 0, 16)
  13183. #define WMI_PEER_STATS_TX_PARTIAL_AID_SET(flag, val) \
  13184. WMI_SET_BITS(flag, 16, 16, val)
  13185. #define WMI_PEER_STATS_TX_PARTIAL_AID_GET(flag) \
  13186. WMI_GET_BITS(flag, 16, 16)
  13187. #define WMI_PEER_STATS_MAX_NSS_SET(flag, val) \
  13188. WMI_SET_BITS(flag, 0, 8, val)
  13189. #define WMI_PEER_STATS_MAX_NSS_GET(flag) \
  13190. WMI_GET_BITS(flag, 0, 8)
  13191. /* bits 31:8 unused/reserved */
  13192. #define WMI_PEER_STATS_DEL_RESP_TO_HOST_SET(flag, val) \
  13193. WMI_SET_BITS(flag, 0, 1, val)
  13194. #define WMI_PEER_STATS_DEL_RESP_TO_HOST_GET(flag) \
  13195. WMI_GET_BITS(flag, 0, 1)
  13196. #define WMI_PEER_STATS_DELETE_IN_PROGRESS_SET(flag, val) \
  13197. WMI_SET_BITS(flag, 1, 1, val)
  13198. #define WMI_PEER_STATS_DELETE_IN_PROGRESS_GET(flag) \
  13199. WMI_GET_BITS(flag, 1, 1)
  13200. #define WMI_PEER_STATS_MIGRATION_IN_PROGRESS_SET(flag, val) \
  13201. WMI_SET_BITS(flag, 2, 1, val)
  13202. #define WMI_PEER_STATS_MIGRATION_IN_PROGRESS_GET(flag) \
  13203. WMI_GET_BITS(flag, 2, 1)
  13204. #define WMI_PEER_STATS_CONN_STATE_SET(flag, val) \
  13205. WMI_SET_BITS(flag, 3, 4, val)
  13206. #define WMI_PEER_STATS_CONN_STATE_GET(flag) \
  13207. WMI_GET_BITS(flag, 3, 4)
  13208. #define WMI_PEER_STATS_TX_CHAIN_MASK_160_SET(flag, val) \
  13209. WMI_SET_BITS(flag, 8, 8, val)
  13210. #define WMI_PEER_STATS_TX_CHAIN_MASK_160_GET(flag) \
  13211. WMI_GET_BITS(flag, 8, 8)
  13212. #define WMI_PEER_STATS_TX_CHAIN_MASK_SET(flag, val) \
  13213. WMI_SET_BITS(flag, 16, 8, val)
  13214. #define WMI_PEER_STATS_TX_CHAIN_MASK_GET(flag) \
  13215. WMI_GET_BITS(flag, 16, 8)
  13216. #define WMI_PEER_STATS_ASSOC_CHAIN_MASK_SET(flag, val) \
  13217. WMI_SET_BITS(flag, 24, 8, val)
  13218. #define WMI_PEER_STATS_ASSOC_CHAIN_MASK_GET(flag) \
  13219. WMI_GET_BITS(flag, 24, 8)
  13220. #define WMI_PEER_STATS_QOS_NULL_OVER_WMI_SET(flag, val) \
  13221. WMI_SET_BITS(flag, 0, 1, val)
  13222. #define WMI_PEER_STATS_QOS_NULL_OVER_WMI_GET(flag) \
  13223. WMI_GET_BITS(flag, 0, 1)
  13224. #define WMI_PEER_STATS_NEW_ASSOC_SET(flag, val) \
  13225. WMI_SET_BITS(flag, 1, 1, val)
  13226. #define WMI_PEER_STATS_NEW_ASSOC_GET(flag) \
  13227. WMI_GET_BITS(flag, 1, 1)
  13228. #define WMI_PEER_STATS_TWT_FILT_FLAG_SET(flag, val) \
  13229. WMI_SET_BITS(flag, 2, 1, val)
  13230. #define WMI_PEER_STATS_TWT_FILT_FLAG_GET(flag) \
  13231. WMI_GET_BITS(flag, 2, 1)
  13232. #define WMI_PEER_STATS_TWT_REG_FLAG_SET(flag, val) \
  13233. WMI_SET_BITS(flag, 3, 1, val)
  13234. #define WMI_PEER_STATS_TWT_REG_FLAG_GET(flag) \
  13235. WMI_GET_BITS(flag, 3, 1)
  13236. #define WMI_PEER_STATS_WMM_UL_TRIG_FLAG_SET(flag, val) \
  13237. WMI_SET_BITS(flag, 4, 1, val)
  13238. #define WMI_PEER_STATS_WMM_UL_TRIG_FLAG_GET(flag) \
  13239. WMI_GET_BITS(flag, 4, 1)
  13240. #define WMI_PEER_STATS_ACTIVE_NOT_BA_TID_SET(flag, val) \
  13241. WMI_SET_BITS(flag, 5, 4, val)
  13242. #define WMI_PEER_STATS_ACTIVE_NOT_BA_TID_GET(flag) \
  13243. WMI_GET_BITS(flag, 5, 4)
  13244. /* bits 31:10 unused/reserved */
  13245. #define WMI_PEER_STATS_NUM_LINKS_SET(flag, val) \
  13246. WMI_SET_BITS(flag, 0, 2, val)
  13247. #define WMI_PEER_STATS_NUM_LINKS_GET(flag) \
  13248. WMI_GET_BITS(flag, 0, 2)
  13249. #define WMI_PEER_STATS_ML_PEER_ID_SET(flag, val) \
  13250. WMI_SET_BITS(flag, 2, 12, val)
  13251. #define WMI_PEER_STATS_ML_PEER_ID_GET(flag) \
  13252. WMI_GET_BITS(flag, 2, 12)
  13253. #define WMI_PEER_STATS_PRI_LINK_ID_SET(flag, val) \
  13254. WMI_SET_BITS(flag, 14, 3, val)
  13255. #define WMI_PEER_STATS_PRI_LINK_ID_GET(flag) \
  13256. WMI_GET_BITS(flag, 14, 3)
  13257. #define WMI_PEER_STATS_PRI_CHIP_ID_SET(flag, val) \
  13258. WMI_SET_BITS(flag, 17, 2, val)
  13259. #define WMI_PEER_STATS_PRI_CHIP_ID_GET(flag) \
  13260. WMI_GET_BITS(flag, 17, 2)
  13261. #define WMI_PEER_STATS_LINK_INIT_CNT_SET(flag, val) \
  13262. WMI_SET_BITS(flag, 19, 3, val)
  13263. #define WMI_PEER_STATS_LINK_INIT_CNT_GET(flag) \
  13264. WMI_GET_BITS(flag, 19, 3)
  13265. #define WMI_PEER_STATS_NUM_LOCAL_LINKS_SET(flag, val) \
  13266. WMI_SET_BITS(flag, 22, 2, val)
  13267. #define WMI_PEER_STATS_NUM_LOCAL_LINKS_GET(flag) \
  13268. WMI_GET_BITS(flag, 22, 2)
  13269. #define WMI_PEER_STATS_CHIPS_BITMAP_SET(flag, val) \
  13270. WMI_SET_BITS(flag, 24, 8, val)
  13271. #define WMI_PEER_STATS_CHIPS_BITMAP_GET(flag) \
  13272. WMI_GET_BITS(flag, 24, 8)
  13273. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_SET(flag, val) \
  13274. WMI_SET_BITS(flag, 0, 1, val)
  13275. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_GET(flag) \
  13276. WMI_GET_BITS(flag, 0, 1)
  13277. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_SET(flag, val) \
  13278. WMI_SET_BITS(flag, 1, 1, val)
  13279. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_GET(flag) \
  13280. WMI_GET_BITS(flag, 1, 1)
  13281. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_SET(flag, val) \
  13282. WMI_SET_BITS(flag, 2, 1, val)
  13283. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_GET(flag) \
  13284. WMI_GET_BITS(flag, 2, 1)
  13285. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_SET(flag, val) \
  13286. WMI_SET_BITS(flag, 3, 1, val)
  13287. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_GET(flag) \
  13288. WMI_GET_BITS(flag, 3, 1)
  13289. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_SET(flag, val) \
  13290. WMI_SET_BITS(flag, 4, 3, val)
  13291. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_GET(flag) \
  13292. WMI_GET_BITS(flag, 4, 3)
  13293. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_SET(flag, val) \
  13294. WMI_SET_BITS(flag, 7, 8, val)
  13295. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_GET(flag) \
  13296. WMI_GET_BITS(flag, 7, 8)
  13297. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_SET(flag, val) \
  13298. WMI_SET_BITS(flag, 15, 3, val)
  13299. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_GET(flag) \
  13300. WMI_GET_BITS(flag, 15, 3)
  13301. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_SET(flag, val) \
  13302. WMI_SET_BITS(flag, 18, 2, val)
  13303. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_GET(flag) \
  13304. WMI_GET_BITS(flag, 18, 2)
  13305. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_SET(flag, val) \
  13306. WMI_SET_BITS(flag, 20, 1, val)
  13307. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_GET(flag) \
  13308. WMI_GET_BITS(flag, 20, 1)
  13309. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_SET(flag, val) \
  13310. WMI_SET_BITS(flag, 21, 1, val)
  13311. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_GET(flag) \
  13312. WMI_GET_BITS(flag, 21, 1)
  13313. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_SET(flag, val) \
  13314. WMI_SET_BITS(flag, 22, 1, val)
  13315. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_GET(flag) \
  13316. WMI_GET_BITS(flag, 22, 1)
  13317. /* bits 31:23 unused/reserved */
  13318. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_SET(flag, val) \
  13319. WMI_SET_BITS(flag, 0, 16, val)
  13320. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_GET(flag) \
  13321. WMI_GET_BITS(flag, 0, 16)
  13322. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_SET(flag, val) \
  13323. WMI_SET_BITS(flag, 16, 8, val)
  13324. #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_GET(flag) \
  13325. WMI_GET_BITS(flag, 16, 8)
  13326. /* bits 31:24 unused/reserved */
  13327. #define WMI_PEER_STATS_NSS_160_SET(flag, val) \
  13328. WMI_SET_BITS(flag, 0, 8, val)
  13329. #define WMI_PEER_STATS_NSS_160_GET(flag) \
  13330. WMI_GET_BITS(flag, 0, 8)
  13331. #define WMI_PEER_STATS_RC_PHYMODE_SET(flag, val) \
  13332. WMI_SET_BITS(flag, 8, 8, val)
  13333. #define WMI_PEER_STATS_RC_PHYMODE_GET(flag) \
  13334. WMI_GET_BITS(flag, 8, 8)
  13335. #define WMI_PEER_STATS_LEGACY_RATE_SET(flag, val) \
  13336. WMI_SET_BITS(flag, 16, 16, val)
  13337. #define WMI_PEER_STATS_LEGACY_RATE_GET(flag) \
  13338. WMI_GET_BITS(flag, 16, 16)
  13339. #define WMI_PEER_STATS_MIN_DATA_RATE_SET(flag, val) \
  13340. WMI_SET_BITS(flag, 0, 8, val)
  13341. #define WMI_PEER_STATS_MIN_DATA_RATE_GET(flag) \
  13342. WMI_GET_BITS(flag, 0, 8)
  13343. #define WMI_PEER_STATS_VHT_MAX_RATE_SET(flag, val) \
  13344. WMI_SET_BITS(flag, 8, 4, val)
  13345. #define WMI_PEER_STATS_VHT_MAX_RATE_GET(flag) \
  13346. WMI_GET_BITS(flag, 8, 4)
  13347. #define WMI_PEER_STATS_VHT_MAX_STREAMS_SET(flag, val) \
  13348. WMI_SET_BITS(flag, 12, 4, val)
  13349. #define WMI_PEER_STATS_VHT_MAX_STREAMS_GET(flag) \
  13350. WMI_GET_BITS(flag, 12, 4)
  13351. #define WMI_PEER_STATS_RC_CHAN_FREQ_SET(flag, val) \
  13352. WMI_SET_BITS(flag, 16, 16, val)
  13353. #define WMI_PEER_STATS_RC_CHAN_FREQ_GET(flag) \
  13354. WMI_GET_BITS(flag, 16, 16)
  13355. typedef struct {
  13356. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_cfr_stats_struct */
  13357. A_UINT32 tlv_header;
  13358. /* blanking_mode:
  13359. * blanking configuration. Refer to WMI_SCAN_BLANKING_MODE
  13360. */
  13361. A_UINT32 blanking_mode;
  13362. /* is_blanking_enabled:
  13363. * current blanking status. 0 = disabled, 1 = enabled
  13364. */
  13365. A_UINT32 is_blanking_enabled;
  13366. A_UINT32 gate_2g_enabled; /* 2.4GHZ gate pin state */
  13367. A_UINT32 gate_5g_enabled; /* 5GHz gate pin state */
  13368. A_UINT32 gate_6g_enabled; /* 6GHz gate pin state */
  13369. A_UINT32 blanking_count; /* scan radio blanking count */
  13370. A_UINT32 blanking_duration; /* scan radio blanking duration in us */
  13371. } wmi_ctrl_path_blanking_stats_struct;
  13372. typedef struct {
  13373. /** TLV tag and len; tag equals
  13374. * WMITLV_TAG_STRUC_wmi_ctrl_path_stats_event_fixed_param */
  13375. A_UINT32 tlv_header;
  13376. /** Request ID */
  13377. A_UINT32 request_id;
  13378. /** more flag
  13379. * 1 - More events sent after this event.
  13380. * 0 - no more events after this event.
  13381. */
  13382. A_UINT32 more;
  13383. /** status:
  13384. * The status field's value shows whether the WMI_REQUEST_CTRL_PATH_STATS
  13385. * request was completed successfully,
  13386. * 0 - status is success
  13387. * 1 - status is failure
  13388. */
  13389. A_UINT32 status;
  13390. /** This TLV is (optionally) followed by TLV arrays containing
  13391. * different types of stats:
  13392. * 1. wmi_ctrl_path_pdev_stats_struct ctrl_path_pdev_stats[];
  13393. * This TLV array contains zero or more pdev stats instances.
  13394. * 2. wmi_vdev_extd_stats vdev_extd_stats[];
  13395. * This TLV array contains zero or more vdev_extd_stats instances.
  13396. */
  13397. } wmi_ctrl_path_stats_event_fixed_param;
  13398. typedef struct {
  13399. /** TLV tag and len; tag equals
  13400. * WMITLV_TAG_STRUC_wmi_halphy_ctrl_path_stats_event_fixed_param
  13401. */
  13402. A_UINT32 tlv_header;
  13403. /** Process id requested */
  13404. A_UINT32 request_id;
  13405. /* end_of_event - single event or Multiple Event */
  13406. A_UINT32 end_of_event;
  13407. /*
  13408. * event_count - If Multiple Events are send, this is to identify
  13409. * particular event out of Multiple Events that are send to host
  13410. */
  13411. A_UINT32 event_count;
  13412. /** Pdev id requested */
  13413. A_UINT32 pdev_id;
  13414. } wmi_halphy_ctrl_path_stats_event_fixed_param;
  13415. typedef struct {
  13416. /** TLV tag and len; tag equals
  13417. * WMITLV_TAG_STRUC_wmi_radio_chan_stats */
  13418. A_UINT32 tlv_header;
  13419. /** primary channel freq of the channel whose stats is sent */
  13420. A_UINT32 chan_mhz;
  13421. /** accumulation of time the radio is tuned to this channel,
  13422. * in units of microseconds */
  13423. A_UINT32 on_chan_us;
  13424. /** accumulation of the TX PPDU duration over the measurement period,
  13425. * in units of microseconds */
  13426. A_UINT32 tx_duration_us;
  13427. /** accumulation of the RX PPDU duration over the measurement period,
  13428. * in units of microseconds */
  13429. A_UINT32 rx_duration_us;
  13430. /** ratio of channel busy time to on_chan_us, in units of percent */
  13431. A_UINT32 chan_busy_ratio;
  13432. /** ratio of on_chan_us to the measurement period, in units of percent */
  13433. A_UINT32 on_chan_ratio;
  13434. /** measurement period, in units of microseconds */
  13435. A_UINT32 measurement_period_us;
  13436. /** MPDUs transmitted on this channel */
  13437. A_UINT32 tx_mpdus;
  13438. /** MSDUs transmitted on this channel */
  13439. A_UINT32 tx_msdus;
  13440. /** MPDUS successfully received on this channel */
  13441. A_UINT32 rx_succ_mpdus;
  13442. /** Failed MPDUs (CRC failures) received on this channel */
  13443. A_UINT32 rx_fail_mpdus;
  13444. } wmi_radio_chan_stats;
  13445. typedef struct {
  13446. /** TLV tag and len; tag equals
  13447. * WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param */
  13448. A_UINT32 tlv_header;
  13449. /** number of channel stats in radio_chan_stats[] */
  13450. A_UINT32 num_chans;
  13451. /* This TLV is followed by another TLV of array of structs
  13452. * wmi_radio_chan_stats radio_chan_stats[];
  13453. */
  13454. } wmi_radio_chan_stats_event_fixed_param;
  13455. /**
  13456. * PDEV statistics
  13457. *
  13458. * This struct incorporates the wlan_dbg_stats struct, which is
  13459. * conditionally defined, based on the AR900B flag.
  13460. * The below _v1 struct variant is the unconditional definition
  13461. * that matches what would be conditionally defined by builds that
  13462. * don't use the AR900B flag. The _v2 struct variant is the
  13463. * unconditional definition that matches what would be conditionally
  13464. * defined by builds that use the AR900B flag.
  13465. * The _v2 struct def can be used within host or target builds
  13466. * that don't use the AR900B flag, but needs to interoperate with a
  13467. * target or host build that does use the AR900B flag.
  13468. * Similarly, the _v1 struct def can be used by a host or target build
  13469. * that does use the AR900B flag, but needs to interoperate with a
  13470. * target or host build that doesn't use the AR900B flag.
  13471. *
  13472. * For backwards compatibility, wmi_pdev_stats is still (conditionally)
  13473. * defined, as an alias for either the _v1 or _v2 variant.
  13474. */
  13475. typedef struct {
  13476. /** Channel noise floor */
  13477. A_INT32 chan_nf;
  13478. /** TX frame count */
  13479. A_UINT32 tx_frame_count;
  13480. /** RX frame count */
  13481. A_UINT32 rx_frame_count;
  13482. /** rx clear count */
  13483. A_UINT32 rx_clear_count;
  13484. /** cycle count */
  13485. A_UINT32 cycle_count;
  13486. /** Phy error count */
  13487. A_UINT32 phy_err_count;
  13488. /** Channel Tx Power */
  13489. A_UINT32 chan_tx_pwr;
  13490. /** WAL dbg stats */
  13491. struct wlan_dbg_stats_v1 pdev_stats;
  13492. } wmi_pdev_stats_v1;
  13493. typedef struct {
  13494. /** Channel noise floor */
  13495. A_INT32 chan_nf;
  13496. /** TX frame count */
  13497. A_UINT32 tx_frame_count;
  13498. /** RX frame count */
  13499. A_UINT32 rx_frame_count;
  13500. /** rx clear count */
  13501. A_UINT32 rx_clear_count;
  13502. /** cycle count */
  13503. A_UINT32 cycle_count;
  13504. /** Phy error count */
  13505. A_UINT32 phy_err_count;
  13506. /** Channel Tx Power */
  13507. A_UINT32 chan_tx_pwr;
  13508. /** WAL dbg stats */
  13509. struct wlan_dbg_stats_v2 pdev_stats;
  13510. } wmi_pdev_stats_v2;
  13511. #if defined(AR900B)
  13512. #define wmi_pdev_stats wmi_pdev_stats_v2
  13513. #else
  13514. #define wmi_pdev_stats wmi_pdev_stats_v1
  13515. #endif
  13516. /**
  13517. * pdev extension statistics
  13518. */
  13519. typedef struct {
  13520. A_UINT32 tlv_header;
  13521. /* pdev id */
  13522. A_UINT32 pdev_id;
  13523. /** my_rx_count
  13524. * What portion of time, as measured by the MAC HW clock was occupied
  13525. * by receiving PPDUs addressed to one of the vdevs within this pdev.
  13526. */
  13527. A_UINT32 my_rx_count;
  13528. /** rx_matched_11ax_msdu_cnt
  13529. * number of Rx 11ax MSDUs with matching BSS color counter
  13530. * updated at EOP (end of packet)
  13531. */
  13532. A_UINT32 rx_matched_11ax_msdu_cnt;
  13533. /** rx_other_11ax_msdu_cnt
  13534. * number of Rx 11ax MSDUs with other BSS color counter updated at EOP
  13535. * (end of packet)
  13536. */
  13537. A_UINT32 rx_other_11ax_msdu_cnt;
  13538. } wmi_pdev_extd_stats;
  13539. /**
  13540. * pdev telemetry statistics
  13541. */
  13542. typedef struct{
  13543. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_telemetry_stats */
  13544. A_UINT32 pdev_id;
  13545. /*
  13546. * Average channel latency per AC, units in micro seconds.
  13547. * avg_chan_lat_per_ac[0] : AC_VO
  13548. * avg_chan_lat_per_ac[1] : AC_VI
  13549. * avg_chan_lat_per_ac[2] : AC_BE
  13550. * avg_chan_lat_per_ac[3] : AC_BK
  13551. */
  13552. A_UINT32 avg_chan_lat_per_ac[WMI_AC_MAX];
  13553. /*
  13554. * Percentage of air time available for each AC, units in percentage.
  13555. * BIT[0-7] : AC_BE
  13556. * BIT[8-15] : AC_BK
  13557. * BIT[16-23] : AC_VI
  13558. * BIT[24-31] : AC_VO
  13559. * Please refer to WMI_ESP_ESTIMATE_GET_* and WMI_ESP_ESTIMATE_SET_* macros
  13560. * to retrieve values for each access category in estimated_air_time_per_ac.
  13561. */
  13562. A_UINT32 estimated_air_time_per_ac;
  13563. } wmi_pdev_telemetry_stats;
  13564. /**
  13565. * VDEV statistics
  13566. * @todo
  13567. * add all VDEV stats here
  13568. */
  13569. typedef struct {
  13570. A_INT32 bcn_snr;
  13571. A_INT32 dat_snr;
  13572. } wmi_snr_info;
  13573. typedef struct {
  13574. /** unique id identifying the VDEV, generated by the caller */
  13575. A_UINT32 vdev_id;
  13576. wmi_snr_info vdev_snr;
  13577. 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) */
  13578. A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
  13579. A_UINT32 multiple_retry_cnt[WLAN_MAX_AC]; /* The number of MSDU packets and MMPDU frames per AC
  13580. that the 802.11 station successfully transmitted after more than one retransmission attempt */
  13581. A_UINT32 fail_cnt[WLAN_MAX_AC]; /* Total number packets(per AC) failed to transmit */
  13582. A_UINT32 rts_fail_cnt; /* Total number of RTS/CTS sequence failures for transmission of a packet */
  13583. A_UINT32 rts_succ_cnt; /* Total number of RTS/CTS sequence success for transmission of a packet */
  13584. A_UINT32 rx_err_cnt; /* The receive error count. HAL will provide the RxP FCS error global */
  13585. A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
  13586. A_UINT32 ack_fail_cnt; /* Total number packets failed transmit because of no ACK from the remote entity */
  13587. A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES];/*History of last ten transmit rate, in units of 500 kbit/sec */
  13588. A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES];/*History of last ten Beacon RSSI of the connected Bss */
  13589. } wmi_vdev_stats;
  13590. /*
  13591. * vdev ext stats with additional bcn stats
  13592. * (Due to backward compatibility requirements, these new stats fields cannot be
  13593. * added inside wmi_vdev_stats.)
  13594. */
  13595. typedef struct {
  13596. A_UINT32 vdev_id;
  13597. A_UINT32 tx_bcn_succ_cnt; /* Total number of beacon frame transmitted successfully */
  13598. A_UINT32 tx_bcn_outage_cnt; /* Total number of failed beacons */
  13599. } wmi_bcn_stats;
  13600. #define WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_BIT 0
  13601. #define WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_MASK \
  13602. (1 << WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_BIT)
  13603. #define WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_BIT 1
  13604. #define WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_MASK \
  13605. (1 << WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_BIT)
  13606. /**
  13607. * vdev extension statistics
  13608. */
  13609. typedef struct {
  13610. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_vdev_extd_stats */
  13611. A_UINT32 tlv_header;
  13612. /* vdev id */
  13613. A_UINT32 vdev_id;
  13614. /* Total number of Fils Discovery frames transmitted successfully */
  13615. A_UINT32 fd_succ_cnt;
  13616. /* Total number of Fils Discovery frames failed */
  13617. A_UINT32 fd_fail_cnt;
  13618. /* Total number of unsolicited probe response frames transmitted successfully */
  13619. A_UINT32 unsolicited_prb_succ_cnt;
  13620. /* Total number of unsolicited probe response frames failed */
  13621. A_UINT32 unsolicited_prb_fail_cnt;
  13622. /* vdev info flags:
  13623. * bit 0: WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID,
  13624. * 0: the "is link active" flag is not valid
  13625. * 1: the "is link active" flag is valid
  13626. * bit 1: WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE,
  13627. * 1:link_active; 0:link_inactive
  13628. * Refer to WMI_VDEV_STATS_FLAGS_ defs.
  13629. */
  13630. A_UINT32 flags;
  13631. A_INT32 vdev_tx_power; /* dBm units */
  13632. } wmi_vdev_extd_stats;
  13633. /**
  13634. * Vdev debug stats to be used for wmi control path stats.
  13635. * This is an extension to vdev_extd_stats,
  13636. * vdev_extd_stats display is part of apstats.
  13637. */
  13638. typedef struct {
  13639. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_vdev_stats_struct */
  13640. A_UINT32 tlv_header;
  13641. /* vdev id */
  13642. A_UINT32 vdev_id;
  13643. /** opaque_debug_wal_vdev_flags:
  13644. * This will contain the value from wal_vdev wal vdev flags for vdev state
  13645. */
  13646. A_UINT32 opaque_debug_wal_vdev_flags;
  13647. /** control flags for this vdev */
  13648. A_UINT32 opaque_debug_vdev_flags;
  13649. /** vdevid of transmitted AP (mbssid case) */
  13650. A_UINT32 opaque_debug_vdevid_trans;
  13651. /** opaque_debug_profile_idx:
  13652. * the profile index of the connected non-trans ap (mbssid case).
  13653. * 0 means invalid.
  13654. */
  13655. A_UINT32 opaque_debug_profile_idx;
  13656. /** opaque_debug_profile_num:
  13657. * the total profile numbers of non-trans aps (mbssid case).
  13658. * 0 means legacy AP.
  13659. */
  13660. A_UINT32 opaque_debug_profile_num;
  13661. /* Contains the value of multi_vdev_restart status */
  13662. A_UINT32 opaque_debug_multi_vdev_restart;
  13663. /* Contains the value of created mac_id from wal_vdev */
  13664. A_UINT32 opaque_debug_created_mac_id;
  13665. /* Contains the value of consecutive count of the leaky AP */
  13666. A_UINT32 opaque_debug_consec_detect_leaky_ap_cnt;
  13667. /* Contains the value of Vdev manager debug flags */
  13668. A_UINT32 opaque_debug_vdev_mgr_dbg_flags;
  13669. /* Contains the value of max vdev pause delay in microseconds */
  13670. A_UINT32 opaque_debug_max_pause_delay_us;
  13671. /* opaque_debug_sta_offset:
  13672. * Contains the value of the offset of vdev TSF with BI (vdev_tsf%BI)
  13673. * for STA vdev.
  13674. */
  13675. A_UINT32 opaque_debug_sta_offset;
  13676. /* Contains the value of vdev pn sequence receive filter */
  13677. A_UINT32 opaque_debug_vdev_pn_rx_filter;
  13678. /* Contains the value of config params */
  13679. A_UINT32 opaque_debug_traffic_config;
  13680. /* opaque_debug_he_bss_rts_thld_tu:
  13681. * Contains Period of time in units for a non-AP STA to reserve the medium.
  13682. */
  13683. A_UINT32 opaque_debug_he_bss_rts_thld_tu;
  13684. /* opaque_debug_rts_threshold:
  13685. * Contains the value of Request to Send (RTS) Threshold of the packet size.
  13686. */
  13687. A_UINT32 opaque_debug_rts_threshold; /* dot11RTSThreshold */
  13688. /* Contains the value of Tx failure count threshold */
  13689. A_UINT32 opaque_debug_tx_fail_cnt_thres;
  13690. /* Contains the value of ratio = HI_WORD/LO_WORD */
  13691. A_UINT32 opaque_debug_mu_edca_sifs_ratio;
  13692. /* opaque_debug_kickout_th:
  13693. * Contains the value of kickout threshold that denotes units of
  13694. * lost block acks of consecutive tx failure threshold.
  13695. */
  13696. A_UINT32 opaque_debug_kickout_th;
  13697. /* opaque_debug_rate_dd_bmap:
  13698. * Contains the value of per vap config related to VAP aggregation
  13699. * of ratectrl drop-down limits.
  13700. */
  13701. A_UINT32 opaque_debug_rate_dd_bmap;
  13702. /* Contains the value of Maximum Transmission Unit frame size */
  13703. A_UINT32 opaque_debug_mtu_size;
  13704. /* Contains the value of vdev event bitmap from wal_vdev */
  13705. A_UINT32 opaque_debug_event_bitmap;
  13706. /* Contains the value of peer event bitmap from wal_vdev */
  13707. A_UINT32 opaque_debug_peer_event_bitmap;
  13708. /* Contains the value of Sched config of vdev allowed time during ATF */
  13709. A_UINT32 opaque_debug_atf_vdev_allowed_time;
  13710. /* opaque_debug_atf_vdev_used_unallocated_time:
  13711. * Contains the value of Sched config of vdev used unallocated time
  13712. * during ATF.
  13713. */
  13714. A_UINT32 opaque_debug_atf_vdev_used_unallocated_time;
  13715. /* Contains the value of Sched config of vdev unused time during ATF */
  13716. A_UINT32 opaque_debug_atf_vdev_unused_time;
  13717. /* Contains the value of Carrier frequency offset last programmed time */
  13718. A_UINT32 opaque_debug_last_prog_time;
  13719. /* Contains the value of Carrier frequency offset last receive time */
  13720. A_UINT32 opaque_debug_last_recv_time;
  13721. /* Contains the value of Packet count of received frames on the channel */
  13722. A_UINT32 opaque_debug_rx_pkt_on_channel;
  13723. /* Contains the value of Target beacon transmission time offset value */
  13724. A_UINT32 opaque_debug_tbtt_offset;
  13725. /* Contains the value of tid pause bitmap of the peer from wal_vdev */
  13726. A_UINT32 opaque_debug_peer_all_tid_pause_bitmap;
  13727. /* Contains the value of tid block bitmap of the peer from wal_vdev */
  13728. A_UINT32 opaque_debug_peer_all_tid_block_bitmap;
  13729. /* Contains the value of tdls peer kickout threshold */
  13730. A_UINT32 opaque_debug_tdls_peer_kickout_th;
  13731. /* opaque_debug_num_of_remote_peers_connected:
  13732. * Contains the value of num_of_remote_peers_connected;
  13733. * Below field is valid only for AP vap.
  13734. */
  13735. A_UINT32 opaque_debug_num_of_remote_peers_connected;
  13736. /* Contains the value of num of Multi group key support */
  13737. A_UINT32 opaque_debug_num_group_key_enabled;
  13738. /* Contains the value of delete all peer command flags */
  13739. A_UINT32 opaque_debug_delete_all_peer_flags;
  13740. /* Contains the value of Keepalive ARP sender address time */
  13741. A_UINT32 opaque_debug_keepalive_arp_sender_ipv4;
  13742. /* Contains the value of Keepalive ARP Target address time */
  13743. A_UINT32 opaque_debug_keepalive_arp_target_ipv4;
  13744. /* Contains the value of Keepalive interval duration time */
  13745. A_UINT32 opaque_debug_keepalive_interval;
  13746. /* Contains the value of Keepalive start timer timestamp */
  13747. A_UINT32 opaque_debug_keepalive_timer_start_timestamp;
  13748. /* Contains the value of max idle interval and status of STA */
  13749. A_UINT32 opaque_debug_sta_maxidle_interval;
  13750. A_UINT32 opaque_debug_sta_maxidle_method;
  13751. /* Contains the value of Timing synchronization function (TSF) time diff */
  13752. A_UINT32 opaque_debug_tsf_curr_time_diff;
  13753. /* opaque_debug_sleep_duration_us:
  13754. * Contains the value of Time in microsends to detect sleep duration
  13755. * of the client.
  13756. */
  13757. A_UINT32 opaque_debug_sleep_duration_us;
  13758. /* Contains the value of pause start time and to calculate pause delay */
  13759. A_UINT32 opaque_debug_pause_start_time_us;
  13760. A_UINT32 opaque_debug_pause_delay_us;
  13761. /* Contains the value of number of supported group key */
  13762. A_UINT32 opaque_debug_num_supported_group_key;
  13763. /* opaque_debug_avg_data_null_tx_delay:
  13764. * Contains the value of Average time taken to calculate data frame
  13765. * tx delay.
  13766. */
  13767. A_UINT32 opaque_debug_avg_data_null_tx_delay;
  13768. /* opaque_debug_avg_rx_leak_window:
  13769. * Contains the value of Average time taken to calculate data frame
  13770. * in receive window.
  13771. */
  13772. A_UINT32 opaque_debug_avg_rx_leak_window;
  13773. /* Contains the value of count for number of received deauth frames */
  13774. A_UINT32 opaque_debug_num_recv_deauth;
  13775. /* Contains the value of Beacon interval in microseconds */
  13776. A_UINT32 opaque_debug_bcn_intval_us;
  13777. /* opaque_debug_fils_period
  13778. * Contains the value of us, period configured through
  13779. * WMI_ENABLE_FILS_CMDID.
  13780. */
  13781. A_UINT32 opaque_debug_fils_period;
  13782. /* Contains the value of previous Timing synchronization function (TSF) */
  13783. A_UINT32 opaque_debug_prev_tsf;
  13784. /* Contains the value of time taken during client sleep */
  13785. A_UINT32 opaque_debug_sleep_entry_time;
  13786. /* Contains the value of Total sleep duration from wal_vdev */
  13787. A_UINT32 opaque_debug_tot_sleep_dur;
  13788. /* Contains the value of Vdev pause bitmap from wal_vdev */
  13789. A_UINT32 opaque_debug_pause_bitmap;
  13790. /* opaque_debug_last_send_to_host_deauth_tsf:
  13791. * Contains the value of Last TSF time last_send_to_host_deauth_tsf
  13792. * from wlan_vdev.
  13793. */
  13794. A_UINT32 opaque_debug_last_send_to_host_deauth_tsf;
  13795. /* Contains the value of debug_short_ssid from wlan_vdev */
  13796. A_UINT32 opaque_debug_short_ssid;
  13797. /* Bitfield macro's expansion variables */
  13798. /* opaque_debug_vdev_amsdu_bitfield:
  13799. * bit 7:0 - Contains the value of dis_dyn_bw_rts from wlan_vdev,
  13800. * 15:8 - max_amsdu,
  13801. * 23:16 - def_amsdu,
  13802. * 31:24 - he_bss_color
  13803. */
  13804. A_UINT32 opaque_debug_vdev_amsdu_bitfield;
  13805. /* opaque_debug_vdev_ac_failure_configs:
  13806. * bit 7:0 - Contains the value of dhe_def_pe_duratio from wal_vdev,
  13807. * 15:8 - minimum_allowed_mcs,
  13808. * 23:16 - max_11ac_to_leg_rts_fallback_th,
  13809. * 31:24 - max_11ac_rts_consec_failure_th
  13810. */
  13811. A_UINT32 opaque_debug_vdev_ac_failure_configs;
  13812. /* opaque_debug_vdev_pkt_type_info:
  13813. * bit 7:0 - Contains the value of input_pkt_type from wal_vdev,
  13814. * 15:8 - recv_pkt_type,
  13815. * 23:16 - disable_intra_fwd,
  13816. * 31:24 - ps_awake
  13817. */
  13818. A_UINT32 opaque_debug_vdev_pkt_type_info;
  13819. /* opaque_debug_vdev_ba_param_bitfield:
  13820. * bit 7:0 - Contains the value of snr_cal_count from wal_vdev,
  13821. * 15:8 - amsdu_auto_enable,
  13822. * 23:16 - param_ba_timeout,
  13823. * 31:24 - param_ba_buffer_size
  13824. */
  13825. A_UINT32 opaque_debug_vdev_ba_param_bitfield;
  13826. /* opaque_debug_vdev_aggr_bitfield:
  13827. * bit 7:0 - Contains the value of param_amsdu_support from wal_vdev,
  13828. * 15:8 - param_ba_retry_max,
  13829. * 23:16 - tx_aggr_size,
  13830. * 31:24 - rx_aggr_size
  13831. */
  13832. A_UINT32 opaque_debug_vdev_aggr_bitfield;
  13833. /* opaque_debug_vdev_event_delivery:
  13834. * bit 7:0 - Contains the value of tqm_bypass_enabled from wal_vdev,
  13835. * 15:8 - wmmac_timer_vote_cnt,
  13836. * 23:16 - peer_event_delivery_in_progress,
  13837. * 31:24 - vdev_event_delivery_in_progress
  13838. */
  13839. A_UINT32 opaque_debug_vdev_event_delivery;
  13840. /* opaque_debug_vdev_cap_slot_bitfield:
  13841. * bit 7:0 - Contains the value of bcn_max_slot from wal_vdev,
  13842. * 15:8 - bcn_curr_slot,
  13843. * 23:16 - mgmt_tx_power,
  13844. * 31:24 - mbssid_capable_association
  13845. */
  13846. A_UINT32 opaque_debug_vdev_cap_slot_bitfield;
  13847. /* opaque_debug_vdev_bcn_configs:
  13848. * bit 7:0 - Contains the value of mbssid_txbssid_association from
  13849. * wal_vdev,
  13850. * 15:8 - consec_beacon_skip,
  13851. * 23:16 - consec_beacon_skip_cnt,
  13852. * 31:24 - max_consec_beacon_skip
  13853. */
  13854. A_UINT32 opaque_debug_vdev_bcn_configs;
  13855. /* Contains the value of opaque_debug_vdev_cmd_info */
  13856. A_UINT32 opaque_debug_vdev_cmd_info;
  13857. /* opaque_debug_vdev_mac_configs:
  13858. * bit 7:0 - Contains the value of pause_cnt from wlan_vdev,
  13859. * 15:8 - e_mac_id,
  13860. * 23:16 - is_transmit_bssid,
  13861. * 31:24 - rts_rc_flag
  13862. */
  13863. A_UINT32 opaque_debug_vdev_mac_configs;
  13864. /* opaque_debug_vdev_mode_configs:
  13865. * bit 7:0 - Contains the value of ic_opmode from wlan_vdev,
  13866. * 15:8 - ic_subopmode,
  13867. * 23:16 - ic_curmode,
  13868. * 31:24 - vdev_up_cmd_cnt
  13869. */
  13870. A_UINT32 opaque_debug_vdev_mode_configs;
  13871. /* opaque_debug_vdev_keepalive_bitfields:
  13872. * bit 7:0 - keepalive_method
  13873. * 15:8 - keepalive_prohibit_data_mgmt
  13874. * 23:16 - resp_type
  13875. * 31:24 - ap_detect_out_of_sync_sleeping_sta_time_secs
  13876. */
  13877. A_UINT32 opaque_debug_vdev_keepalive_bitfields;
  13878. /* opaque_debug_vdev_bcn_drift_info:
  13879. * bit 7:0 - bcn_drift_cnt
  13880. * 15:8 - bcn_drift_calibration
  13881. * 23:16 - rts_cts_default
  13882. * 31:24 - vdev_down_cmd_cnt
  13883. */
  13884. A_UINT32 opaque_debug_vdev_bcn_drift_info;
  13885. /* opaque_debug_vdev_arp_configs:
  13886. * bit 7:0 - Contains the value of tbtt_link_type from wlan_vdev,
  13887. * 15:8 - is_arp_in_air,
  13888. * 23:16 - is_ns_in_air,
  13889. * 31:24 - num_of_keepalive_attempts
  13890. */
  13891. A_UINT32 opaque_debug_vdev_arp_configs;
  13892. /* opaque_debug_vdev_streams_configs:
  13893. * bit 7:0 - n_beacons_since_last_rssi_report
  13894. * 15:8 - num_ofld_peer_alloced
  13895. * 23:16 - preferred_tx_streams
  13896. * 31:24 - preferred_rx_streams
  13897. */
  13898. A_UINT32 opaque_debug_vdev_streams_configs;
  13899. /* opaque_debug_vdev_chains_configs:
  13900. * bit 7:0 - Contains the value of preferred_tx_streams_160 from
  13901. * wlan_vdev,
  13902. * 15:8 - preferred_rx_streams_160,
  13903. * 23:16 - tx_chains_num_11b,
  13904. * 31:24 - tx_chains_num_11ag
  13905. */
  13906. A_UINT32 opaque_debug_vdev_chains_configs;
  13907. /* opaque_debug_vdev_power_cap_configs:
  13908. * bit 7:0 - Contains the value of supp_op_cls_ie_len from wlan_vdev,
  13909. * 15:8 - rm_en_cap_ie_len,
  13910. * 23:16 - power_cap_ie_len,
  13911. * 31:24 - supp_channel_ie_len
  13912. */
  13913. A_UINT32 opaque_debug_vdev_power_cap_configs;
  13914. /* opaque_debug_vdev_wmm_mbo_configs:
  13915. * bit 7:0 - Contains the value of wmm_tspec_ie_len from wlan_vdev,
  13916. * 15:8 - ccx_version_ie_len,
  13917. * 23:16 - extn_dh_ie_len,
  13918. * 31:24 - mbo_ie_len
  13919. */
  13920. A_UINT32 opaque_debug_vdev_wmm_mbo_configs;
  13921. /* opaque_debug_vdev_remote_configs:
  13922. * bit 7:0 - Contains the value of rsnxe_ie_len from wlan_vdev,
  13923. * 15:8 - remote_peer_cnt
  13924. * 23:16 - p2p_cli_pause_type
  13925. * 31:24 - mu_edca_update_count
  13926. */
  13927. A_UINT32 opaque_debug_vdev_remote_configs;
  13928. /* opaque_debug_vdev_stats_id_configs:
  13929. * bit 7:0 - vdev_stats_id
  13930. * 15:8 - vdev_stats_id_valid
  13931. * 23:16 - preferred_tx_streams_320
  13932. * 31:24 - preferred_rx_streams_320
  13933. */
  13934. A_UINT32 opaque_debug_vdev_stats_id_configs;
  13935. /* opaque_debug_vdev_assoc_peer_configs:
  13936. * bit 7:0 - unused / reserved
  13937. * 15:8 - group_cipher
  13938. * 31:16 - assoc_id
  13939. */
  13940. A_UINT32 opaque_debug_vdev_assoc_peer_configs;
  13941. /* opaque_debug_vdev_mhz_fils_configs:
  13942. * bit 15:0 - Contains the value of bss_channel_mhz from wal_vdev,
  13943. * 31:16 - config_fils_period
  13944. */
  13945. A_UINT32 opaque_debug_vdev_mhz_fils_configs;
  13946. /* opaque_debug_vdev_fils_period:
  13947. * bit 15:0 - Contains the value of calc_fils_period from wal_vdev,
  13948. * 31:16 - ic_txseqs_cmn
  13949. */
  13950. A_UINT32 opaque_debug_vdev_fils_period;
  13951. /* opaque_debug_vdev_inactive_time:
  13952. * bit 15:0 - Contains the value of
  13953. * ap_keepalive_min_idle_inactive_time_secs from wlan_vdev,
  13954. * 31:16 - ap_keepalive_max_idle_inactive_time_secs
  13955. */
  13956. A_UINT32 opaque_debug_vdev_inactive_time;
  13957. /* opaque_debug_vdev_chain_mask_configs:
  13958. * bit 15:0 - Contains the value of
  13959. * ap_keepalive_max_unresponsive_time_secs from wlan_vdev,
  13960. * 31:16 - chain_mask
  13961. */
  13962. A_UINT32 opaque_debug_vdev_chain_mask_configs;
  13963. /* opaque_debug_vdev_ie_len_configs:
  13964. * bit 15:0 - num_mcast_filters
  13965. * 31:16 - ext_cap_ie_len
  13966. */
  13967. A_UINT32 opaque_debug_vdev_ie_len_configs;
  13968. /* opaque_debug_vdev_fils_configs:
  13969. * bit 15:0 - Contains the value of fils_channel_guard_time from wlan_vdev,
  13970. * 31:16 - fd_tmpl_len
  13971. */
  13972. A_UINT32 opaque_debug_vdev_fils_configs;
  13973. /* opaque_debug_vdev_chan_configs:
  13974. * bit 15:0 - Contains the value of common_rsn_caps from wlan_vdev,
  13975. * 31:16 - off_ch_active_dwell_time
  13976. */
  13977. A_UINT32 opaque_debug_vdev_chan_configs;
  13978. /* opaque_debug_vdev_dwell_configs:
  13979. * bit 15:0 - Contains the value of off_ch_passive_dwell_time from
  13980. * wlan_vdev,
  13981. * 31:16 - current_pause_request_id
  13982. */
  13983. A_UINT32 opaque_debug_vdev_dwell_configs;
  13984. /* opaque_debug_vdev_wmi_configs:
  13985. * bit 0 - Contains the value of hide_ssid_enable from wlan_vdev,
  13986. * 1 - b_none_protocol_paused
  13987. * 2 - dpd_cal_state
  13988. * 4 - req_bcn_q_unpause
  13989. * 5 - bt_coex_enable_cts2s
  13990. * 6 - dpd_delay_n_beacon
  13991. * 8 - b_need_check_first_beacon
  13992. * 9 - ap_peer_keepalive_max_idle_time_reached
  13993. * 10 - leakyap_cts2s_enable
  13994. * 11 - stasapscc_in_mcc
  13995. * 12 - stasapscc_in_mcc_cts2s_enable
  13996. * 13 - is_vdev_stopping
  13997. * 14 - is_wmi_vdev_down
  13998. * 15 - is_vdev_down_pending
  13999. * 16 - vdev_delete_in_progress
  14000. * 17 - cac_enabled
  14001. * 18 - is_quaterrate
  14002. * 19 - is_halfrate
  14003. * 20 - stop_resp_event_blocked
  14004. * 21 - use_enhanced_mcast_filter
  14005. * 22 - is_start_pending_on_asm
  14006. * 23 - no_null_to_ap_for_roaming
  14007. * 24 - is_loopback_cal_pending
  14008. * 25 - vdev_delete_acked
  14009. * 26 - bc_proberesp_enable
  14010. * 27 - is_wmm_param
  14011. * 28 - is_connect_in_progress
  14012. * 29 - is_mu_edca_param
  14013. * 30 - send_del_resp_tohost
  14014. * 31 - is_restart_different_ch
  14015. */
  14016. A_UINT32 opaque_debug_vdev_wmi_configs;
  14017. /* opaque_debug_vdev_hu_mu_configs:
  14018. * bit 0 - Contains the value of proto_ps_status from wlan_vdev,
  14019. * 1 - smps_intolerant
  14020. * 2 - is_offload_registered_for_connection
  14021. * 3 - is_bss_beacon_offload_registered
  14022. * 4 - is_prob_resp_offload_registered
  14023. * 5 - is_ibss_beacon_offload_registered
  14024. * 6 - is_keepalive_attempts_exhausted
  14025. * 7 - is_bcn_tx_ie_changed_log
  14026. * 8 - he_su_bfee
  14027. * 9 - he_su_bfer
  14028. * 10 - he_mu_bfee
  14029. * 11 - he_mu_bfer
  14030. * 12 - he_dl_ofdma
  14031. * 13 - he_ul_ofdma
  14032. * 14 - he_ul_mumimo
  14033. * 15 - ul_mu_resp
  14034. * 23:16 - alt_rssi_non_srg
  14035. * 31:24 - alt_rssi_srg
  14036. */
  14037. A_UINT32 opaque_debug_vdev_hu_mu_configs;
  14038. /* opaque_debug_vdev_sm_chan_configs:
  14039. * bit 0 - Contains the value of he_bss_color_en from wlan_vdev,
  14040. * 1 - he_txbf_ofdma
  14041. * 2 - non_srg_enable
  14042. * 3 - srg_enable
  14043. * 4 - srp_enable
  14044. * 5 - sr_initialized
  14045. * 6 - sr_rings_initialized
  14046. * 10:7 - per_ac_obss_pd_enable
  14047. * 11 - ifup
  14048. * 12 - ifactive
  14049. * 13 - ifpaused
  14050. * 14 - ifoutofsync
  14051. * 15 - is_free
  14052. * 16 - is_nawds
  14053. * 17 - hw_flag
  14054. * 18 - ch_req_flag
  14055. * 20 - restart_resp
  14056. * 21 - first_beacon_recv_wait
  14057. * 22 - erpenabled
  14058. * 23 - start_responded
  14059. * 24 - bcn_sync_crit_req_act
  14060. * 25 - recal_notif_registered
  14061. * 26 - bcn_tx_paused
  14062. * 27 - he_bss_color_en_bypass
  14063. * 28 - default_ba_mode
  14064. * 29 - ba_256_bitmap_enable
  14065. * 30 - ba_256_bitmap_tx_disable
  14066. * 31 - is_multi_group_key_enabled
  14067. */
  14068. A_UINT32 opaque_debug_vdev_sm_chan_configs;
  14069. /*
  14070. * The following 4 opaque_debug variables are provided purely for
  14071. * debugging by technicians who have outside knowledge of what kind of
  14072. * values the target has placed into these fields.
  14073. * The host must not interpret the values of these fields, since the
  14074. * meaning of the values provided in these fields may change without
  14075. * regard for backwards compatibility or interoperability.
  14076. */
  14077. A_UINT32 opaque_debug_field_1;
  14078. A_UINT32 opaque_debug_field_2;
  14079. A_UINT32 opaque_debug_field_3;
  14080. A_UINT32 opaque_debug_field_4;
  14081. } wmi_ctrl_path_vdev_stats_struct;
  14082. #define WMI_VDEV_STATS_DIS_DYN_BW_RTS_SET(flag, val) \
  14083. WMI_SET_BITS(flag, 0, 8, val)
  14084. #define WMI_VDEV_STATS_DIS_DYN_BW_RTS_GET(flag) \
  14085. WMI_GET_BITS(flag, 0, 8)
  14086. #define WMI_VDEV_STATS_MAX_AMSDU_SET(flag, val) \
  14087. WMI_SET_BITS(flag, 8, 8, val)
  14088. #define WMI_VDEV_STATS_MAX_AMSDU_GET(flag) \
  14089. WMI_GET_BITS(flag, 8, 8)
  14090. #define WMI_VDEV_STATS_DEF_AMSDU_SET(flag, val) \
  14091. WMI_SET_BITS(flag, 16, 8, val)
  14092. #define WMI_VDEV_STATS_DEF_AMSDU_GET(flag) \
  14093. WMI_GET_BITS(flag, 16, 8)
  14094. #define WMI_VDEV_STATS_HW_BSS_COLOR_SET(flag, val) \
  14095. WMI_SET_BITS(flag, 24, 8, val)
  14096. #define WMI_VDEV_STATS_HW_BSS_COLOR_GET(flag) \
  14097. WMI_GET_BITS(flag, 24, 8)
  14098. #define WMI_VDEV_STATS_HE_DEF_PE_DURATION_SET(flag, val) \
  14099. WMI_SET_BITS(flag, 0, 8, val)
  14100. #define WMI_VDEV_STATS_HE_DEF_PE_DURATION_GET(flag) \
  14101. WMI_GET_BITS(flag, 0, 8)
  14102. #define WMI_VDEV_STATS_MINIMUM_ALLOWED_MCS_SET(flag, val) \
  14103. WMI_SET_BITS(flag, 8, 8, val)
  14104. #define WMI_VDEV_STATS_MINIMUM_ALLOWED_MCS_GET(flag) \
  14105. WMI_GET_BITS(flag, 8, 8)
  14106. #define WMI_VDEV_STATS_MAX_11AC_TO_LEG_RTS_FALLBACK_TH_SET(flag, val) \
  14107. WMI_SET_BITS(flag, 16, 8, val)
  14108. #define WMI_VDEV_STATS_MAX_11AC_TO_LEG_RTS_FALLBACK_TH_GET(flag) \
  14109. WMI_GET_BITS(flag, 16, 8)
  14110. #define WMI_VDEV_STATS_MAX_11AC_RTS_CONSEC_FAILURE_SET(flag, val) \
  14111. WMI_SET_BITS(flag, 24, 8, val)
  14112. #define WMI_VDEV_STATS_MAX_11AC_RTS_CONSEC_FAILURE_GET(flag) \
  14113. WMI_GET_BITS(flag, 24, 8)
  14114. #define WMI_VDEV_STATS_INPUT_PKT_TYPE_SET(flag, val) \
  14115. WMI_SET_BITS(flag, 0, 8, val)
  14116. #define WMI_VDEV_STATS_INPUT_PKT_TYPE_GET(flag) \
  14117. WMI_GET_BITS(flag, 0, 8)
  14118. #define WMI_VDEV_STATS_RECV_PKT_TYPE_SET(flag, val) \
  14119. WMI_SET_BITS(flag, 8, 8, val)
  14120. #define WMI_VDEV_STATS_RECV_PKT_TYPE_GET(flag) \
  14121. WMI_GET_BITS(flag, 8, 8)
  14122. #define WMI_VDEV_STATS_DISABLE_INTRA_FWD_SET(flag, val) \
  14123. WMI_SET_BITS(flag, 16, 8, val)
  14124. #define WMI_VDEV_STATS_DISABLE_INTRA_FWD_GET(flag) \
  14125. WMI_GET_BITS(flag, 16, 8)
  14126. #define WMI_VDEV_STATS_PS_AWAKE_SET(flag, val) \
  14127. WMI_SET_BITS(flag, 24, 8, val)
  14128. #define WMI_VDEV_STATS_PS_AWAKE_GET(flag) \
  14129. WMI_GET_BITS(flag, 24, 8)
  14130. #define WMI_VDEV_STATS_SNR_CAL_COUNT_SET(flag, val) \
  14131. WMI_SET_BITS(flag, 0, 8, val)
  14132. #define WMI_VDEV_STATS_SNR_CAL_COUNT_GET(flag) \
  14133. WMI_GET_BITS(flag, 0, 8)
  14134. #define WMI_VDEV_STATS_AMSDU_AUTO_ENABLE_SET(flag, val) \
  14135. WMI_SET_BITS(flag, 8, 8, val)
  14136. #define WMI_VDEV_STATS_AMSDU_AUTO_ENABLE_GET(flag) \
  14137. WMI_GET_BITS(flag, 8, 8)
  14138. #define WMI_VDEV_STATS_PARAM_BA_TIMEOUT_SET(flag, val) \
  14139. WMI_SET_BITS(flag, 16, 8, val)
  14140. #define WMI_VDEV_STATS_PARAM_BA_TIMEOUT_GET(flag) \
  14141. WMI_GET_BITS(flag, 16, 8)
  14142. #define WMI_VDEV_STATS_PARAM_BA_BUFFER_SIZE_SET(flag, val) \
  14143. WMI_SET_BITS(flag, 24, 8, val)
  14144. #define WMI_VDEV_STATS_PARAM_BA_BUFFER_SIZE_GET(flag) \
  14145. WMI_GET_BITS(flag, 24, 8)
  14146. #define WMI_VDEV_STATS_PARAM_AMSDU_SUPPORT_SET(flag, val) \
  14147. WMI_SET_BITS(flag, 0, 8, val)
  14148. #define WMI_VDEV_STATS_PARAM_AMSDU_SUPPORT_GET(flag) \
  14149. WMI_GET_BITS(flag, 0, 8)
  14150. #define WMI_VDEV_STATS_PARAM_BA_RETRY_MAX_SET(flag, val) \
  14151. WMI_SET_BITS(flag, 8, 8, val)
  14152. #define WMI_VDEV_STATS_PARAM_BA_RETRY_MAX_GET(flag) \
  14153. WMI_GET_BITS(flag, 8, 8)
  14154. #define WMI_VDEV_STATS_TX_AGGR_SIZE_SET(flag, val) \
  14155. WMI_SET_BITS(flag, 16, 8, val)
  14156. #define WMI_VDEV_STATS_TX_AGGR_SIZE_GET(flag) \
  14157. WMI_GET_BITS(flag, 16, 8)
  14158. #define WMI_VDEV_STATS_RX_AGGR_SIZE_SET(flag, val) \
  14159. WMI_SET_BITS(flag, 24, 8, val)
  14160. #define WMI_VDEV_STATS_RX_AGGR_SIZE_GET(flag) \
  14161. WMI_GET_BITS(flag, 24, 8)
  14162. #define WMI_VDEV_STATS_TQM_BYPASS_ENABLED_SET(flag, val) \
  14163. WMI_SET_BITS(flag, 0, 8, val)
  14164. #define WMI_VDEV_STATS_TQM_BYPASS_ENABLED_GET(flag) \
  14165. WMI_GET_BITS(flag, 0, 8)
  14166. #define WMI_VDEV_STATS_WMMAC_TIMER_VOTE_CNT_SET(flag, val) \
  14167. WMI_SET_BITS(flag, 8, 8, val)
  14168. #define WMI_VDEV_STATS_WMMAC_TIMER_VOTE_CNT_GET(flag) \
  14169. WMI_GET_BITS(flag, 8, 8)
  14170. #define WMI_VDEV_STATS_PEER_EVENT_DELIVERY_IN_PROGRESS_SET(flag, val) \
  14171. WMI_SET_BITS(flag, 16, 8, val)
  14172. #define WMI_VDEV_STATS_PEER_EVENT_DELIVERY_IN_PROGRESS_GET(flag) \
  14173. WMI_GET_BITS(flag, 16, 8)
  14174. #define WMI_VDEV_STATS_VDEV_EVENT_DELIVERY_IN_PROGRESS_SET(flag, val) \
  14175. WMI_SET_BITS(flag, 24, 8, val)
  14176. #define WMI_VDEV_STATS_VDEV_EVENT_DELIVERY_IN_PROGRESS_GET(flag) \
  14177. WMI_GET_BITS(flag, 24, 8)
  14178. #define WMI_VDEV_STATS_BCN_MAX_SLOT_SET(flag, val) \
  14179. WMI_SET_BITS(flag, 0, 8, val)
  14180. #define WMI_VDEV_STATS_BCN_MAX_SLOT_GET(flag) \
  14181. WMI_GET_BITS(flag, 0, 8)
  14182. #define WMI_VDEV_STATS_BCN_CURR_SLOT_SET(flag, val) \
  14183. WMI_SET_BITS(flag, 8, 8, val)
  14184. #define WMI_VDEV_STATS_BCN_CURR_SLOT_GET(flag) \
  14185. WMI_GET_BITS(flag, 8, 8)
  14186. #define WMI_VDEV_STATS_MGMT_TX_POWER_SET(flag, val) \
  14187. WMI_SET_BITS(flag, 16, 8, val)
  14188. #define WMI_VDEV_STATS_MGMT_TX_POWER_GET(flag) \
  14189. WMI_GET_BITS(flag, 16, 8)
  14190. #define WMI_VDEV_STATS_MBSSID_CAPABLE_ASSOCIATION_SET(flag, val) \
  14191. WMI_SET_BITS(flag, 24, 8, val)
  14192. #define WMI_VDEV_STATS_MBSSID_CAPABLE_ASSOCIATION_GET(flag) \
  14193. WMI_GET_BITS(flag, 24, 8)
  14194. #define WMI_VDEV_STATS_MBSSID_TXBSSID_ASSOCIATION_SET(flag, val) \
  14195. WMI_SET_BITS(flag, 0, 8, val)
  14196. #define WMI_VDEV_STATS_MBSSID_TXBSSID_ASSOCIATION_GET(flag) \
  14197. WMI_GET_BITS(flag, 0, 8)
  14198. #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_SET(flag, val) \
  14199. WMI_SET_BITS(flag, 8, 8, val)
  14200. #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_GET(flag) \
  14201. WMI_GET_BITS(flag, 8, 8)
  14202. #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_CNT_SET(flag, val) \
  14203. WMI_SET_BITS(flag, 16, 8, val)
  14204. #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_CNT_GET(flag) \
  14205. WMI_GET_BITS(flag, 16, 8)
  14206. #define WMI_VDEV_STATS_MAX_CONSEC_BEACON_SKIP_SET(flag, val) \
  14207. WMI_SET_BITS(flag, 24, 8, val)
  14208. #define WMI_VDEV_STATS_MAX_CONSEC_BEACON_SKIP_GET(flag) \
  14209. WMI_GET_BITS(flag, 24, 8)
  14210. #define WMI_VDEV_STATS_BCN_DRIFT_CNT_SET(flag, val) \
  14211. WMI_SET_BITS(flag, 0, 8, val)
  14212. #define WMI_VDEV_STATS_BCN_DRIFT_CNT_GET(flag) \
  14213. WMI_GET_BITS(flag, 0, 8)
  14214. #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_SET(flag, val) \
  14215. WMI_SET_BITS(flag, 8, 8, val)
  14216. #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_GET(flag) \
  14217. WMI_GET_BITS(flag, 8, 8)
  14218. #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_SET(flag, val) \
  14219. WMI_SET_BITS(flag, 16, 8, val)
  14220. #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_GET(flag) \
  14221. WMI_GET_BITS(flag, 16, 8)
  14222. #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_SET(flag, val) \
  14223. WMI_SET_BITS(flag, 24, 8, val)
  14224. #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_GET(flag) \
  14225. WMI_GET_BITS(flag, 24, 8)
  14226. #define WMI_VDEV_STATS_PAUSE_CNT_SET(flag, val) \
  14227. WMI_SET_BITS(flag, 0, 8, val)
  14228. #define WMI_VDEV_STATS_PAUSE_CNT_GET(flag) \
  14229. WMI_GET_BITS(flag, 0, 8)
  14230. #define WMI_VDEV_STATS_E_MAC_ID_SET(flag, val) \
  14231. WMI_SET_BITS(flag, 8, 8, val)
  14232. #define WMI_VDEV_STATS_E_MAC_ID_GET(flag) \
  14233. WMI_GET_BITS(flag, 8, 8)
  14234. #define WMI_VDEV_STATS_IS_TRANSMIT_BSSID_SET(flag, val) \
  14235. WMI_SET_BITS(flag, 16, 8, val)
  14236. #define WMI_VDEV_STATS_IS_TRANSMIT_BSSID_GET(flag) \
  14237. WMI_GET_BITS(flag, 16, 8)
  14238. #define WMI_VDEV_STATS_RTS_RC_FLAG_SET(flag, val) \
  14239. WMI_SET_BITS(flag, 24, 8, val)
  14240. #define WMI_VDEV_STATS_RTS_RC_FLAG_GET(flag) \
  14241. WMI_GET_BITS(flag, 24, 8)
  14242. #define WMI_VDEV_STATS_IC_OPMODE_SET(flag, val) \
  14243. WMI_SET_BITS(flag, 0, 8, val)
  14244. #define WMI_VDEV_STATS_IC_OPMODE_GET(flag) \
  14245. WMI_GET_BITS(flag, 0, 8)
  14246. #define WMI_VDEV_STATS_IC_SUBOPMODE_SET(flag, val) \
  14247. WMI_SET_BITS(flag, 8, 8, val)
  14248. #define WMI_VDEV_STATS_IC_SUBOPMODE_GET(flag) \
  14249. WMI_GET_BITS(flag, 8, 8)
  14250. #define WMI_VDEV_STATS_IC_CURMODE_SET(flag, val) \
  14251. WMI_SET_BITS(flag, 16, 8, val)
  14252. #define WMI_VDEV_STATS_IC_CURMODE_GET(flag) \
  14253. WMI_GET_BITS(flag, 16, 8)
  14254. #define WMI_VDEV_STATS_VDEV_UP_CMD_CNT_SET(flag, val) \
  14255. WMI_SET_BITS(flag, 24, 8, val)
  14256. #define WMI_VDEV_STATS_VDEV_UP_CMD_CNT_GET(flag) \
  14257. WMI_GET_BITS(flag, 24, 8)
  14258. #define WMI_VDEV_STATS_KEEPALIVE_METHOD_SET(flag, val) \
  14259. WMI_SET_BITS(flag, 0, 8, val)
  14260. #define WMI_VDEV_STATS_KEEPALIVE_METHOD_GET(flag) \
  14261. WMI_GET_BITS(flag, 0, 8)
  14262. #define WMI_VDEV_STATS_KEEPALIVE_PROHIBIT_DATA_MGMT_SET(flag, val) \
  14263. WMI_SET_BITS(flag, 8, 8, val)
  14264. #define WMI_VDEV_STATS_KEEPALIVE_PROHIBIT_DATA_MGMT_GET(flag) \
  14265. WMI_GET_BITS(flag, 8, 8)
  14266. #define WMI_VDEV_STATS_RESP_TYPE_SET(flag, val) \
  14267. WMI_SET_BITS(flag, 16, 8, val)
  14268. #define WMI_VDEV_STATS_RESP_TYPE_GET(flag) \
  14269. WMI_GET_BITS(flag, 16, 8)
  14270. #define WMI_VDEV_STATS_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS_SET(flag, val) \
  14271. WMI_SET_BITS(flag, 24, 8, val)
  14272. #define WMI_VDEV_STATS_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS_GET(flag) \
  14273. WMI_GET_BITS(flag, 24, 8)
  14274. #define WMI_VDEV_STATS_BCN_DRIFT_CNT_SET(flag, val) \
  14275. WMI_SET_BITS(flag, 0, 8, val)
  14276. #define WMI_VDEV_STATS_BCN_DRIFT_CNT_GET(flag) \
  14277. WMI_GET_BITS(flag, 0, 8)
  14278. #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_SET(flag, val) \
  14279. WMI_SET_BITS(flag, 8, 8, val)
  14280. #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_GET(flag) \
  14281. WMI_GET_BITS(flag, 8, 8)
  14282. #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_SET(flag, val) \
  14283. WMI_SET_BITS(flag, 16, 8, val)
  14284. #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_GET(flag) \
  14285. WMI_GET_BITS(flag, 16, 8)
  14286. #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_SET(flag, val) \
  14287. WMI_SET_BITS(flag, 24, 8, val)
  14288. #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_GET(flag) \
  14289. WMI_GET_BITS(flag, 24, 8)
  14290. #define WMI_VDEV_STATS_TBTT_LINK_TYPE_SET(flag, val) \
  14291. WMI_SET_BITS(flag, 0, 8, val)
  14292. #define WMI_VDEV_STATS_TBTT_LINK_TYPE_GET(flag) \
  14293. WMI_GET_BITS(flag, 0, 8)
  14294. #define WMI_VDEV_STATS_IS_ARP_IN_AIR_SET(flag, val) \
  14295. WMI_SET_BITS(flag, 8, 8, val)
  14296. #define WMI_VDEV_STATS_IS_ARP_IN_AIR_GET(flag) \
  14297. WMI_GET_BITS(flag, 8, 8)
  14298. #define WMI_VDEV_STATS_IS_NS_IN_AIR_SET(flag, val) \
  14299. WMI_SET_BITS(flag, 16, 8, val)
  14300. #define WMI_VDEV_STATS_IS_NS_IN_AIR_GET(flag) \
  14301. WMI_GET_BITS(flag, 16, 8)
  14302. #define WMI_VDEV_STATS_NUM_OF_KEEPALIVE_ATTEMPTS_SET(flag, val) \
  14303. WMI_SET_BITS(flag, 24, 8, val)
  14304. #define WMI_VDEV_STATS_NUM_OF_KEEPALIVE_ATTEMPTS_GET(flag) \
  14305. WMI_GET_BITS(flag, 24, 8)
  14306. #define WMI_VDEV_STATS_N_BEACONS_SINCE_LAST_RSSI_REPORT_SET(flag, val) \
  14307. WMI_SET_BITS(flag, 0, 8, val)
  14308. #define WMI_VDEV_STATS_N_BEACONS_SINCE_LAST_RSSI_REPORT_GET(flag) \
  14309. WMI_GET_BITS(flag, 0, 8)
  14310. #define WMI_VDEV_STATS_NUM_OFLD_PEER_ALLOCED_SET(flag, val) \
  14311. WMI_SET_BITS(flag, 8, 8, val)
  14312. #define WMI_VDEV_STATS_NUM_OFLD_PEER_ALLOCED_GET(flag) \
  14313. WMI_GET_BITS(flag, 8, 8)
  14314. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_SET(flag, val) \
  14315. WMI_SET_BITS(flag, 16, 8, val)
  14316. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_GET(flag) \
  14317. WMI_GET_BITS(flag, 16, 8)
  14318. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_SET(flag, val) \
  14319. WMI_SET_BITS(flag, 24, 8, val)
  14320. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_GET(flag) \
  14321. WMI_GET_BITS(flag, 24, 8)
  14322. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_160_SET(flag, val) \
  14323. WMI_SET_BITS(flag, 0, 8, val)
  14324. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_160_GET(flag) \
  14325. WMI_GET_BITS(flag, 0, 8)
  14326. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_160_SET(flag, val) \
  14327. WMI_SET_BITS(flag, 8, 8, val)
  14328. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_160_GET(flag) \
  14329. WMI_GET_BITS(flag, 8, 8)
  14330. #define WMI_VDEV_STATS_TX_CHAINS_NUM_11B_SET(flag, val) \
  14331. WMI_SET_BITS(flag, 16, 8, val)
  14332. #define WMI_VDEV_STATS_TX_CHAINS_NUM_11B_GET(flag) \
  14333. WMI_GET_BITS(flag, 16, 8)
  14334. #define WMI_VDEV_STATS_TX_CHAINS_NUM_11AG_SET(flag, val) \
  14335. WMI_SET_BITS(flag, 24, 8, val)
  14336. #define WMI_VDEV_STATS_TX_CHAINS_NUM_11AG_GET(flag) \
  14337. WMI_GET_BITS(flag, 24, 8)
  14338. #define WMI_VDEV_STATS_SUPP_OP_CLS_IE_LEN_SET(flag, val) \
  14339. WMI_SET_BITS(flag, 0, 8, val)
  14340. #define WMI_VDEV_STATS_SUPP_OP_CLS_IE_LEN_GET(flag) \
  14341. WMI_GET_BITS(flag, 0, 8)
  14342. #define WMI_VDEV_STATS_RM_EN_CAP_IE_LEN_SET(flag, val) \
  14343. WMI_SET_BITS(flag, 8, 8, val)
  14344. #define WMI_VDEV_STATS_RM_EN_CAP_IE_LEN_GET(flag) \
  14345. WMI_GET_BITS(flag, 8, 8)
  14346. #define WMI_VDEV_STATS_POWER_CAP_IE_LEN_SET(flag, val) \
  14347. WMI_SET_BITS(flag, 16, 8, val)
  14348. #define WMI_VDEV_STATS_POWER_CAP_IE_LEN_GET(flag) \
  14349. WMI_GET_BITS(flag, 16, 8)
  14350. #define WMI_VDEV_STATS_SUPP_CHANNEL_IE_LEN_SET(flag, val) \
  14351. WMI_SET_BITS(flag, 24, 8, val)
  14352. #define WMI_VDEV_STATS_SUPP_CHANNEL_IE_LEN_GET(flag) \
  14353. WMI_GET_BITS(flag, 24, 8)
  14354. #define WMI_VDEV_STATS_WMM_TSPEC_IE_LEN_SET(flag, val) \
  14355. WMI_SET_BITS(flag, 0, 8, val)
  14356. #define WMI_VDEV_STATS_WMM_TSPEC_IE_LEN_GET(flag) \
  14357. WMI_GET_BITS(flag, 0, 8)
  14358. #define WMI_VDEV_STATS_CCX_VERSION_IE_LEN_SET(flag, val) \
  14359. WMI_SET_BITS(flag, 8, 8, val)
  14360. #define WMI_VDEV_STATS_CCX_VERSION_IE_LEN_GET(flag) \
  14361. WMI_GET_BITS(flag, 8, 8)
  14362. #define WMI_VDEV_STATS_EXTN_DH_IE_LEN_SET(flag, val) \
  14363. WMI_SET_BITS(flag, 16, 8, val)
  14364. #define WMI_VDEV_STATS_EXTN_DH_IE_LEN_GET(flag) \
  14365. WMI_GET_BITS(flag, 16, 8)
  14366. #define WMI_VDEV_STATS_MBO_IE_LEN_SET(flag, val) \
  14367. WMI_SET_BITS(flag, 24, 8, val)
  14368. #define WMI_VDEV_STATS_MBO_IE_LEN_GET(flag) \
  14369. WMI_GET_BITS(flag, 24, 8)
  14370. #define WMI_VDEV_STATS_RSNXE_IE_LEN_SET(flag, val) \
  14371. WMI_SET_BITS(flag, 0, 8, val)
  14372. #define WMI_VDEV_STATS_RSNXE_IE_LEN_GET(flag) \
  14373. WMI_GET_BITS(flag, 0, 8)
  14374. #define WMI_VDEV_STATS_REMOTE_PEER_CNT_SET(flag, val) \
  14375. WMI_SET_BITS(flag, 8, 8, val)
  14376. #define WMI_VDEV_STATS_REMOTE_PEER_CNT_GET(flag) \
  14377. WMI_GET_BITS(flag, 8, 8)
  14378. #define WMI_VDEV_STATS_P2P_CLI_PAUSE_TYPE_SET(flag, val) \
  14379. WMI_SET_BITS(flag, 16, 8, val)
  14380. #define WMI_VDEV_STATS_P2P_CLI_PAUSE_TYPE_GET(flag) \
  14381. WMI_GET_BITS(flag, 16, 8)
  14382. #define WMI_VDEV_STATS_MU_EDCA_UPDATE_COUNT_SET(flag, val) \
  14383. WMI_SET_BITS(flag, 24, 8, val)
  14384. #define WMI_VDEV_STATS_MU_EDCA_UPDATE_COUNT_GET(flag) \
  14385. WMI_GET_BITS(flag, 24, 8)
  14386. #define WMI_VDEV_STATS_ID_SET(flag, val) \
  14387. WMI_SET_BITS(flag, 0, 8, val)
  14388. #define WMI_VDEV_STATS_ID_GET(flag) \
  14389. WMI_GET_BITS(flag, 0, 8)
  14390. #define WMI_VDEV_STATS_ID_VALID_SET(flag, val) \
  14391. WMI_SET_BITS(flag, 8, 8, val)
  14392. #define WMI_VDEV_STATS_ID_VALID_GET(flag) \
  14393. WMI_GET_BITS(flag, 8, 8)
  14394. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_320_SET(flag, val) \
  14395. WMI_SET_BITS(flag, 16, 8, val)
  14396. #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_320_GET(flag) \
  14397. WMI_GET_BITS(flag, 16, 8)
  14398. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_320_SET(flag, val) \
  14399. WMI_SET_BITS(flag, 24, 8, val)
  14400. #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_320_GET(flag) \
  14401. WMI_GET_BITS(flag, 24, 8)
  14402. /* bits 7:0 unused / reserved */
  14403. #define WMI_VDEV_STATS_GROUP_CIPHER_SET(flag, val) \
  14404. WMI_SET_BITS(flag, 8, 8, val)
  14405. #define WMI_VDEV_STATS_GROUP_CIPHER_GET(flag) \
  14406. WMI_GET_BITS(flag, 8, 8)
  14407. #define WMI_VDEV_STATS_ASSOC_ID_SET(flag, val) \
  14408. WMI_SET_BITS(flag, 16, 16, val)
  14409. #define WMI_VDEV_STATS_ASSOC_ID_GET(flag) \
  14410. WMI_GET_BITS(flag, 16, 16)
  14411. #define WMI_VDEV_STATS_BSS_CHANNEL_MHZ_SET(flag, val) \
  14412. WMI_SET_BITS(flag, 0, 16, val)
  14413. #define WMI_VDEV_STATS_BSS_CHANNEL_MHZ_GET(flag) \
  14414. WMI_GET_BITS(flag, 0, 16)
  14415. #define WMI_VDEV_STATS_CONFIG_FILS_PERIOD_SET(flag, val) \
  14416. WMI_SET_BITS(flag, 16, 16, val)
  14417. #define WMI_VDEV_STATS_CONFIG_FILS_PERIOD_GET(flag) \
  14418. WMI_GET_BITS(flag, 16, 16)
  14419. #define WMI_VDEV_STATS_CALC_FILS_PERIOD_SET(flag, val) \
  14420. WMI_SET_BITS(flag, 0, 16, val)
  14421. #define WMI_VDEV_STATS_CALC_FILS_PERIOD_GET(flag) \
  14422. WMI_GET_BITS(flag, 0, 16)
  14423. #define WMI_VDEV_STATS_IC_TXSEQS_CMN_SET(flag, val) \
  14424. WMI_SET_BITS(flag, 16, 16, val)
  14425. #define WMI_VDEV_STATS_IC_TXSEQS_CMN_GET(flag) \
  14426. WMI_GET_BITS(flag, 16, 16)
  14427. #define WMI_VDEV_STATS_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS_SET(flag, val) \
  14428. WMI_SET_BITS(flag, 0, 16, val)
  14429. #define WMI_VDEV_STATS_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS_GET(flag) \
  14430. WMI_GET_BITS(flag, 0, 16)
  14431. #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS_SET(flag, val) \
  14432. WMI_SET_BITS(flag, 16, 16, val)
  14433. #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS_GET(flag) \
  14434. WMI_GET_BITS(flag, 16, 16)
  14435. #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS_SET(flag, val) \
  14436. WMI_SET_BITS(flag, 0, 16, val)
  14437. #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS_GET(flag) \
  14438. WMI_GET_BITS(flag, 0, 16)
  14439. #define WMI_VDEV_STATS_CHAIN_MASK_SET(flag, val) \
  14440. WMI_SET_BITS(flag, 16, 16, val)
  14441. #define WMI_VDEV_STATS_CHAIN_MASK_GET(flag) \
  14442. WMI_GET_BITS(flag, 16, 16)
  14443. #define WMI_VDEV_STATS_NUM_MCAST_FILTERS_SET(flag, val) \
  14444. WMI_SET_BITS(flag, 0, 16, val)
  14445. #define WMI_VDEV_STATS_NUM_MCAST_FILTERS_GET(flag) \
  14446. WMI_GET_BITS(flag, 0, 16)
  14447. #define WMI_VDEV_STATS_EXT_CAP_IE_LEN_SET(flag, val) \
  14448. WMI_SET_BITS(flag, 16, 16, val)
  14449. #define WMI_VDEV_STATS_EXT_CAP_IE_LEN_GET(flag) \
  14450. WMI_GET_BITS(flag, 16, 16)
  14451. #define WMI_VDEV_STATS_FILS_CHANNEL_GUARD_TIME_SET(flag, val) \
  14452. WMI_SET_BITS(flag, 0, 16, val)
  14453. #define WMI_VDEV_STATS_FILS_CHANNEL_GUARD_TIME_GET(flag) \
  14454. WMI_GET_BITS(flag, 0, 16)
  14455. #define WMI_VDEV_STATS_FD_TMPL_LEN_SET(flag, val) \
  14456. WMI_SET_BITS(flag, 16, 16, val)
  14457. #define WMI_VDEV_STATS_FD_TMPL_LEN_GET(flag) \
  14458. WMI_GET_BITS(flag, 16, 16)
  14459. #define WMI_VDEV_STATS_COMMON_RSN_CAPS_SET(flag, val) \
  14460. WMI_SET_BITS(flag, 0, 16, val)
  14461. #define WMI_VDEV_STATS_COMMON_RSN_CAPS_GET(flag) \
  14462. WMI_GET_BITS(flag, 0, 16)
  14463. #define WMI_VDEV_STATS_OFF_CH_ACTIVE_DWELL_TIME_SET(flag, val) \
  14464. WMI_SET_BITS(flag, 16, 16, val)
  14465. #define WMI_VDEV_STATS_OFF_CH_ACTIVE_DWELL_TIME_GET(flag) \
  14466. WMI_GET_BITS(flag, 16, 16)
  14467. #define WMI_VDEV_STATS_OFF_CH_PASSIVE_DWELL_TIME_SET(flag, val) \
  14468. WMI_SET_BITS(flag, 0, 16, val)
  14469. #define WMI_VDEV_STATS_OFF_CH_PASSIVE_DWELL_TIME_GET(flag) \
  14470. WMI_GET_BITS(flag, 0, 16)
  14471. #define WMI_VDEV_STATS_CURRENT_PAUSE_REQUEST_ID_SET(flag, val) \
  14472. WMI_SET_BITS(flag, 16, 16, val)
  14473. #define WMI_VDEV_STATS_CURRENT_PAUSE_REQUEST_ID_GET(flag) \
  14474. WMI_GET_BITS(flag, 16, 16)
  14475. #define WMI_VDEV_STATS_HIDE_SSID_ENABLE_SET(flag, val) \
  14476. WMI_SET_BITS(flag, 0, 1, val)
  14477. #define WMI_VDEV_STATS_HIDE_SSID_ENABLE_GET(flag) \
  14478. WMI_GET_BITS(flag, 0, 1)
  14479. #define WMI_VDEV_STATS_B_NONE_PROTOCOL_PAUSED_SET(flag, val) \
  14480. WMI_SET_BITS(flag, 1, 1, val)
  14481. #define WMI_VDEV_STATS_B_NONE_PROTOCOL_PAUSED_GET(flag) \
  14482. WMI_GET_BITS(flag, 1, 1)
  14483. #define WMI_VDEV_STATS_DPD_CAL_STATE_SET(flag, val) \
  14484. WMI_SET_BITS(flag, 2, 2, val)
  14485. #define WMI_VDEV_STATS_DPD_CAL_STATE_GET(flag) \
  14486. WMI_GET_BITS(flag, 2, 2)
  14487. #define WMI_VDEV_STATS_REQ_BCN_Q_UNPAUSE_SET(flag, val) \
  14488. WMI_SET_BITS(flag, 4, 1, val)
  14489. #define WMI_VDEV_STATS_REQ_BCN_Q_UNPAUSE_GET(flag) \
  14490. WMI_GET_BITS(flag, 4, 1)
  14491. #define WMI_VDEV_STATS_BT_COEX_ENABLE_CTS2S_SET(flag, val) \
  14492. WMI_SET_BITS(flag, 5, 1, val)
  14493. #define WMI_VDEV_STATS_BT_COEX_ENABLE_CTS2S_GET(flag) \
  14494. WMI_GET_BITS(flag, 5, 1)
  14495. #define WMI_VDEV_STATS_DPD_DELAY_N_BEACON_SET(flag, val) \
  14496. WMI_SET_BITS(flag, 6, 2, val)
  14497. #define WMI_VDEV_STATS_DPD_DELAY_N_BEACON_GET(flag) \
  14498. WMI_GET_BITS(flag, 6, 2)
  14499. #define WMI_VDEV_STATS_B_NEED_CHECK_FIRST_BEACON_SET(flag, val) \
  14500. WMI_SET_BITS(flag, 8, 1, val)
  14501. #define WMI_VDEV_STATS_B_NEED_CHECK_FIRST_BEACON_GET(flag) \
  14502. WMI_GET_BITS(flag, 8, 1)
  14503. #define WMI_VDEV_STATS_AP_PEER_KEEPALIVE_MAX_IDLE_TIME_REACHED_SET(flag, val) \
  14504. WMI_SET_BITS(flag, 9, 1, val)
  14505. #define WMI_VDEV_STATS_AP_PEER_KEEPALIVE_MAX_IDLE_TIME_REACHED_GET(flag) \
  14506. WMI_GET_BITS(flag, 9, 1)
  14507. #define WMI_VDEV_STATS_LEAKYAP_CTS2S_ENABLE_SET(flag, val) \
  14508. WMI_SET_BITS(flag, 10, 1, val)
  14509. #define WMI_VDEV_STATS_LEAKYAP_CTS2S_ENABLE_GET(flag) \
  14510. WMI_GET_BITS(flag, 10, 1)
  14511. #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_SET(flag, val) \
  14512. WMI_SET_BITS(flag, 11, 1, val)
  14513. #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_GET(flag) \
  14514. WMI_GET_BITS(flag, 11, 1)
  14515. #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_CTS2S_ENABLE_SET(flag, val) \
  14516. WMI_SET_BITS(flag, 12, 1, val)
  14517. #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_CTS2S_ENABLE_GET(flag) \
  14518. WMI_GET_BITS(flag, 12, 1)
  14519. #define WMI_VDEV_STATS_IS_VDEV_STOPPING_SET(flag, val) \
  14520. WMI_SET_BITS(flag, 13, 1, val)
  14521. #define WMI_VDEV_STATS_IS_VDEV_STOPPING_GET(flag) \
  14522. WMI_GET_BITS(flag, 13, 1)
  14523. #define WMI_VDEV_STATS_IS_WMI_VDEV_DOWN_SET(flag, val) \
  14524. WMI_SET_BITS(flag, 14, 1, val)
  14525. #define WMI_VDEV_STATS_IS_WMI_VDEV_DOWN_GET(flag) \
  14526. WMI_GET_BITS(flag, 14, 1)
  14527. #define WMI_VDEV_STATS_IS_VDEV_DOWN_PENDING_SET(flag, val) \
  14528. WMI_SET_BITS(flag, 15, 1, val)
  14529. #define WMI_VDEV_STATS_IS_VDEV_DOWN_PENDING_GET(flag) \
  14530. WMI_GET_BITS(flag, 15, 1)
  14531. #define WMI_VDEV_STATS_VDEV_DELETE_IN_PROGRESS_SET(flag, val) \
  14532. WMI_SET_BITS(flag, 16, 1, val)
  14533. #define WMI_VDEV_STATS_VDEV_DELETE_IN_PROGRESS_GET(flag) \
  14534. WMI_GET_BITS(flag, 16, 1)
  14535. #define WMI_VDEV_STATS_CAC_ENABLED_SET(flag, val) \
  14536. WMI_SET_BITS(flag, 17, 1, val)
  14537. #define WMI_VDEV_STATS_CAC_ENABLED_GET(flag) \
  14538. WMI_GET_BITS(flag, 17, 1)
  14539. #define WMI_VDEV_STATS_IS_QUATERRATE_SET(flag, val) \
  14540. WMI_SET_BITS(flag, 18, 1, val)
  14541. #define WMI_VDEV_STATS_IS_QUATERRATE_GET(flag) \
  14542. WMI_GET_BITS(flag, 18, 1)
  14543. #define WMI_VDEV_STATS_IS_HALFRATE_SET(flag, val) \
  14544. WMI_SET_BITS(flag, 19, 1, val)
  14545. #define WMI_VDEV_STATS_IS_HALFRATE_GET(flag) \
  14546. WMI_GET_BITS(flag, 19, 1)
  14547. #define WMI_VDEV_STATS_STOP_RESP_EVENT_BLOCKED_SET(flag, val) \
  14548. WMI_SET_BITS(flag, 20, 1, val)
  14549. #define WMI_VDEV_STATS_STOP_RESP_EVENT_BLOCKED_GET(flag) \
  14550. WMI_GET_BITS(flag, 20, 1)
  14551. #define WMI_VDEV_STATS_USE_ENHANCED_MCAST_FILTER_SET(flag, val) \
  14552. WMI_SET_BITS(flag, 21, 1, val)
  14553. #define WMI_VDEV_STATS_USE_ENHANCED_MCAST_FILTER_GET(flag) \
  14554. WMI_GET_BITS(flag, 21, 1)
  14555. #define WMI_VDEV_STATS_IS_START_PENDING_ON_ASM_SET(flag, val) \
  14556. WMI_SET_BITS(flag, 22, 1, val)
  14557. #define WMI_VDEV_STATS_IS_START_PENDING_ON_ASM_GET(flag) \
  14558. WMI_GET_BITS(flag, 22, 1)
  14559. #define WMI_VDEV_STATS_NO_NULL_TO_AP_FOR_ROAMING_SET(flag, val) \
  14560. WMI_SET_BITS(flag, 23, 1, val)
  14561. #define WMI_VDEV_STATS_NO_NULL_TO_AP_FOR_ROAMING_GET(flag) \
  14562. WMI_GET_BITS(flag, 23, 1)
  14563. #define WMI_VDEV_STATS_IS_LOOPBACK_CAL_PENDING_SET(flag, val) \
  14564. WMI_SET_BITS(flag, 24, 1, val)
  14565. #define WMI_VDEV_STATS_IS_LOOPBACK_CAL_PENDING_GET(flag) \
  14566. WMI_GET_BITS(flag, 24, 1)
  14567. #define WMI_VDEV_STATS_VDEV_DELETE_ACKED_SET(flag, val) \
  14568. WMI_SET_BITS(flag, 25, 1, val)
  14569. #define WMI_VDEV_STATS_VDEV_DELETE_ACKED_GET(flag) \
  14570. WMI_GET_BITS(flag, 25, 1)
  14571. #define WMI_VDEV_STATS_BC_PROBERESP_ENABLE_SET(flag, val) \
  14572. WMI_SET_BITS(flag, 26, 1, val)
  14573. #define WMI_VDEV_STATS_BC_PROBERESP_ENABLE_GET(flag) \
  14574. WMI_GET_BITS(flag, 26, 1)
  14575. #define WMI_VDEV_STATS_IS_WMM_PARAM_SET_SET(flag, val) \
  14576. WMI_SET_BITS(flag, 27, 1, val)
  14577. #define WMI_VDEV_STATS_IS_WMM_PARAM_SET_GET(flag) \
  14578. WMI_GET_BITS(flag, 27, 1)
  14579. #define WMI_VDEV_STATS_IS_CONNECT_IN_PROGRESS_SET(flag, val) \
  14580. WMI_SET_BITS(flag, 28, 1, val)
  14581. #define WMI_VDEV_STATS_IS_CONNECT_IN_PROGRESS_GET(flag) \
  14582. WMI_GET_BITS(flag, 28, 1)
  14583. #define WMI_VDEV_STATS_IS_MU_EDCA_PARAM_SET_SET(flag, val) \
  14584. WMI_SET_BITS(flag, 29, 1, val)
  14585. #define WMI_VDEV_STATS_IS_MU_EDCA_PARAM_SET_GET(flag) \
  14586. WMI_GET_BITS(flag, 29, 1)
  14587. #define WMI_VDEV_STATS_SEND_DEL_RESP_TOHOST_SET(flag, val) \
  14588. WMI_SET_BITS(flag, 30, 1, val)
  14589. #define WMI_VDEV_STATS_SEND_DEL_RESP_TOHOST_GET(flag) \
  14590. WMI_GET_BITS(flag, 30, 1)
  14591. #define WMI_VDEV_STATS_IS_RESTART_DIFFERENT_CH_SET(flag, val) \
  14592. WMI_SET_BITS(flag, 31, 1, val)
  14593. #define WMI_VDEV_STATS_IS_RESTART_DIFFERENT_CH_GET(flag) \
  14594. WMI_GET_BITS(flag, 31, 1)
  14595. #define WMI_VDEV_STATS_PROTO_PS_STATUS_SET(flag, val) \
  14596. WMI_SET_BITS(flag, 0, 1, val)
  14597. #define WMI_VDEV_STATS_PROTO_PS_STATUS_GET(flag) \
  14598. WMI_GET_BITS(flag, 0, 1)
  14599. #define WMI_VDEV_STATS_SMPS_INTOLERANT_SET(flag, val) \
  14600. WMI_SET_BITS(flag, 1, 1, val)
  14601. #define WMI_VDEV_STATS_SMPS_INTOLERANT_GET(flag) \
  14602. WMI_GET_BITS(flag, 1, 1)
  14603. #define WMI_VDEV_STATS_IS_OFFLOAD_REGISTERED_FOR_CONNECTION_SET(flag, val) \
  14604. WMI_SET_BITS(flag, 2, 1, val)
  14605. #define WMI_VDEV_STATS_IS_OFFLOAD_REGISTERED_FOR_CONNECTION_GET(flag) \
  14606. WMI_GET_BITS(flag, 2, 1)
  14607. #define WMI_VDEV_STATS_IS_BSS_BEACON_OFFLOAD_REGISTERED_SET(flag, val) \
  14608. WMI_SET_BITS(flag, 3, 1, val)
  14609. #define WMI_VDEV_STATS_IS_BSS_BEACON_OFFLOAD_REGISTERED_GET(flag) \
  14610. WMI_GET_BITS(flag, 3, 1)
  14611. #define WMI_VDEV_STATS_IS_PROB_RESP_OFFLOAD_REGISTERED_SET(flag, val) \
  14612. WMI_SET_BITS(flag, 4, 1, val)
  14613. #define WMI_VDEV_STATS_IS_PROB_RESP_OFFLOAD_REGISTERED_GET(flag) \
  14614. WMI_GET_BITS(flag, 4, 1)
  14615. #define WMI_VDEV_STATS_IS_IBSS_BEACON_OFFLOAD_REGISTERED_SET(flag, val) \
  14616. WMI_SET_BITS(flag, 5, 1, val)
  14617. #define WMI_VDEV_STATS_IS_IBSS_BEACON_OFFLOAD_REGISTERED_GET(flag) \
  14618. WMI_GET_BITS(flag, 5, 1)
  14619. #define WMI_VDEV_STATS_IS_KEEPALIVE_ATTEMPTS_EXHAUSTED_SET(flag, val) \
  14620. WMI_SET_BITS(flag, 6, 1, val)
  14621. #define WMI_VDEV_STATS_IS_KEEPALIVE_ATTEMPTS_EXHAUSTED_GET(flag) \
  14622. WMI_GET_BITS(flag, 6, 1)
  14623. #define WMI_VDEV_STATS_IS_BCN_TX_IE_CHANGED_LOG_SET(flag, val) \
  14624. WMI_SET_BITS(flag, 7, 1, val)
  14625. #define WMI_VDEV_STATS_IS_BCN_TX_IE_CHANGED_LOG_GET(flag) \
  14626. WMI_GET_BITS(flag, 7, 1)
  14627. #define WMI_VDEV_STATS_HE_SU_BFEE_SET(flag, val) \
  14628. WMI_SET_BITS(flag, 8, 1, val)
  14629. #define WMI_VDEV_STATS_HE_SU_BFEE_GET(flag) \
  14630. WMI_GET_BITS(flag, 8, 1)
  14631. #define WMI_VDEV_STATS_HE_SU_BFER_SET(flag, val) \
  14632. WMI_SET_BITS(flag, 9, 1, val)
  14633. #define WMI_VDEV_STATS_HE_SU_BFER_GET(flag) \
  14634. WMI_GET_BITS(flag, 9, 1)
  14635. #define WMI_VDEV_STATS_HE_MU_BFEE_SET(flag, val) \
  14636. WMI_SET_BITS(flag, 10, 1, val)
  14637. #define WMI_VDEV_STATS_HE_MU_BFEE_GET(flag) \
  14638. WMI_GET_BITS(flag, 10, 1)
  14639. #define WMI_VDEV_STATS_HE_MU_BFER_SET(flag, val) \
  14640. WMI_SET_BITS(flag, 11, 1, val)
  14641. #define WMI_VDEV_STATS_HE_MU_BFER_GET(flag) \
  14642. WMI_GET_BITS(flag, 11, 1)
  14643. #define WMI_VDEV_STATS_HE_DL_OFDMA_SET(flag, val) \
  14644. WMI_SET_BITS(flag, 12, 1, val)
  14645. #define WMI_VDEV_STATS_HE_DL_OFDMA_GET(flag) \
  14646. WMI_GET_BITS(flag, 12, 1)
  14647. #define WMI_VDEV_STATS_HE_UL_OFDMA_SET(flag, val) \
  14648. WMI_SET_BITS(flag, 13, 1, val)
  14649. #define WMI_VDEV_STATS_HE_UL_OFDMA_GET(flag) \
  14650. WMI_GET_BITS(flag, 13, 1)
  14651. #define WMI_VDEV_STATS_HE_UL_MUMIMO_SET(flag, val) \
  14652. WMI_SET_BITS(flag, 14, 1, val)
  14653. #define WMI_VDEV_STATS_HE_UL_MUMIMO_GET(flag) \
  14654. WMI_GET_BITS(flag, 14, 1)
  14655. #define WMI_VDEV_STATS_UL_MU_RESP_SET(flag, val) \
  14656. WMI_SET_BITS(flag, 15, 1, val)
  14657. #define WMI_VDEV_STATS_UL_MU_RESP_GET(flag) \
  14658. WMI_GET_BITS(flag, 15, 1)
  14659. #define WMI_VDEV_STATS_ALT_RSSI_NON_SRG_SET(flag, val) \
  14660. WMI_SET_BITS(flag, 16, 8, val)
  14661. #define WMI_VDEV_STATS_ALT_RSSI_NON_SRG_GET(flag) \
  14662. WMI_GET_BITS(flag, 16, 8)
  14663. #define WMI_VDEV_STATS_ALT_RSSI_SRG_SET(flag, val) \
  14664. WMI_SET_BITS(flag, 24, 8, val)
  14665. #define WMI_VDEV_STATS_ALT_RSSI_SRG_GET(flag) \
  14666. WMI_GET_BITS(flag, 24, 8)
  14667. #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_SET(flag, val) \
  14668. WMI_SET_BITS(flag, 0, 1, val)
  14669. #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_GET(flag) \
  14670. WMI_GET_BITS(flag, 0, 1)
  14671. #define WMI_VDEV_STATS_HE_TXBF_OFDMA_SET(flag, val) \
  14672. WMI_SET_BITS(flag, 1, 1, val)
  14673. #define WMI_VDEV_STATS_HE_TXBF_OFDMA_GET(flag) \
  14674. WMI_GET_BITS(flag, 1, 1)
  14675. #define WMI_VDEV_STATS_NON_SRG_ENABLE_SET(flag, val) \
  14676. WMI_SET_BITS(flag, 2, 1, val)
  14677. #define WMI_VDEV_STATS_NON_SRG_ENABLE_GET(flag) \
  14678. WMI_GET_BITS(flag, 2, 1)
  14679. #define WMI_VDEV_STATS_SRG_ENABLE_SET(flag, val) \
  14680. WMI_SET_BITS(flag, 3, 1, val)
  14681. #define WMI_VDEV_STATS_SRG_ENABLE_GET(flag) \
  14682. WMI_GET_BITS(flag, 3, 1)
  14683. #define WMI_VDEV_STATS_SRP_ENABLE_SET(flag, val) \
  14684. WMI_SET_BITS(flag, 4, 1, val)
  14685. #define WMI_VDEV_STATS_SRP_ENABLE_GET(flag) \
  14686. WMI_GET_BITS(flag, 4, 1)
  14687. #define WMI_VDEV_STATS_SR_INITIALIZED_SET(flag, val) \
  14688. WMI_SET_BITS(flag, 5, 1, val)
  14689. #define WMI_VDEV_STATS_SR_INITIALIZED_GET(flag) \
  14690. WMI_GET_BITS(flag, 5, 1)
  14691. #define WMI_VDEV_STATS_SR_RINGS_INITIALIZED_SET(flag, val) \
  14692. WMI_SET_BITS(flag, 6, 1, val)
  14693. #define WMI_VDEV_STATS_SR_RINGS_INITIALIZED_GET(flag) \
  14694. WMI_GET_BITS(flag, 6, 1)
  14695. #define WMI_VDEV_STATS_PER_AC_OBSS_PD_ENABLE_SET(flag, val) \
  14696. WMI_SET_BITS(flag, 7, 4, val)
  14697. #define WMI_VDEV_STATS_PER_AC_OBSS_PD_ENABLE_GET(flag) \
  14698. WMI_GET_BITS(flag, 7, 4)
  14699. #define WMI_VDEV_STATS_IFUP_SET(flag, val) \
  14700. WMI_SET_BITS(flag, 11, 1, val)
  14701. #define WMI_VDEV_STATS_IFUP_GET(flag) \
  14702. WMI_GET_BITS(flag, 11, 1)
  14703. #define WMI_VDEV_STATS_IFACTIVE_SET(flag, val) \
  14704. WMI_SET_BITS(flag, 12, 1, val)
  14705. #define WMI_VDEV_STATS_IFACTIVE_GET(flag) \
  14706. WMI_GET_BITS(flag, 12, 1)
  14707. #define WMI_VDEV_STATS_IFPAUSED_SET(flag, val) \
  14708. WMI_SET_BITS(flag, 13, 1, val)
  14709. #define WMI_VDEV_STATS_IFPAUSED_GET(flag) \
  14710. WMI_GET_BITS(flag, 13, 1)
  14711. #define WMI_VDEV_STATS_IFOUTOFSYNC_SET(flag, val) \
  14712. WMI_SET_BITS(flag, 14, 1, val)
  14713. #define WMI_VDEV_STATS_IFOUTOFSYNC_GET(flag) \
  14714. WMI_GET_BITS(flag, 14, 1)
  14715. #define WMI_VDEV_STATS_IS_FREE_SET(flag, val) \
  14716. WMI_SET_BITS(flag, 15, 1, val)
  14717. #define WMI_VDEV_STATS_IS_FREE_GET(flag) \
  14718. WMI_GET_BITS(flag, 15, 1)
  14719. #define WMI_VDEV_STATS_IS_NAWDS_SET(flag, val) \
  14720. WMI_SET_BITS(flag, 16, 1, val)
  14721. #define WMI_VDEV_STATS_IS_NAWDS_GET(flag) \
  14722. WMI_GET_BITS(flag, 16, 1)
  14723. #define WMI_VDEV_STATS_HW_FLAG_SET(flag, val) \
  14724. WMI_SET_BITS(flag, 17, 1, val)
  14725. #define WMI_VDEV_STATS_HW_FLAG_GET(flag) \
  14726. WMI_GET_BITS(flag, 17, 1)
  14727. #define WMI_VDEV_STATS_CH_REQ_FLAG_SET(flag, val) \
  14728. WMI_SET_BITS(flag, 18, 2, val)
  14729. #define WMI_VDEV_STATS_CH_REQ_FLAG_GET(flag) \
  14730. WMI_GET_BITS(flag, 18, 2)
  14731. #define WMI_VDEV_STATS_RESTART_RESP_SET(flag, val) \
  14732. WMI_SET_BITS(flag, 20, 1, val)
  14733. #define WMI_VDEV_STATS_RESTART_RESP_GET(flag) \
  14734. WMI_GET_BITS(flag, 20, 1)
  14735. #define WMI_VDEV_STATS_FIRST_BEACON_RECV_WAIT_SET(flag, val) \
  14736. WMI_SET_BITS(flag, 21, 1, val)
  14737. #define WMI_VDEV_STATS_FIRST_BEACON_RECV_WAIT_GET(flag) \
  14738. WMI_GET_BITS(flag, 21, 1)
  14739. #define WMI_VDEV_STATS_ERPENABLED_SET(flag, val) \
  14740. WMI_SET_BITS(flag, 22, 1, val)
  14741. #define WMI_VDEV_STATS_ERPENABLED_GET(flag) \
  14742. WMI_GET_BITS(flag, 22, 1)
  14743. #define WMI_VDEV_STATS_START_RESPONDED_SET(flag, val) \
  14744. WMI_SET_BITS(flag, 23, 1, val)
  14745. #define WMI_VDEV_STATS_START_RESPONDED_GET(flag) \
  14746. WMI_GET_BITS(flag, 23, 1)
  14747. #define WMI_VDEV_STATS_BCN_SYNC_CRIT_REQ_ACT_SET(flag, val) \
  14748. WMI_SET_BITS(flag, 24, 1, val)
  14749. #define WMI_VDEV_STATS_BCN_SYNC_CRIT_REQ_ACT_GET(flag) \
  14750. WMI_GET_BITS(flag, 24, 1)
  14751. #define WMI_VDEV_STATS_RECAL_NOTIF_REGISTERED_SET(flag, val) \
  14752. WMI_SET_BITS(flag, 25, 1, val)
  14753. #define WMI_VDEV_STATS_RECAL_NOTIF_REGISTERED_GET(flag) \
  14754. WMI_GET_BITS(flag, 25, 1)
  14755. #define WMI_VDEV_STATS_BCN_TX_PAUSED_SET(flag, val) \
  14756. WMI_SET_BITS(flag, 26, 1, val)
  14757. #define WMI_VDEV_STATS_BCN_TX_PAUSED_GET(flag) \
  14758. WMI_GET_BITS(flag, 26, 1)
  14759. #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_BYPASS_SET(flag, val) \
  14760. WMI_SET_BITS(flag, 27, 1, val)
  14761. #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_BYPASS_GET(flag) \
  14762. WMI_GET_BITS(flag, 27, 1)
  14763. #define WMI_VDEV_STATS_DEFAULT_BA_MODE_SET(flag, val) \
  14764. WMI_SET_BITS(flag, 28, 1, val)
  14765. #define WMI_VDEV_STATS_DEFAULT_BA_MODE_GET(flag) \
  14766. WMI_GET_BITS(flag, 28, 1)
  14767. #define WMI_VDEV_STATS_BA_256_BITMAP_ENABLE_SET(flag, val) \
  14768. WMI_SET_BITS(flag, 29, 1, val)
  14769. #define WMI_VDEV_STATS_BA_256_BITMAP_ENABLE_GET(flag) \
  14770. WMI_GET_BITS(flag, 29, 1)
  14771. #define WMI_VDEV_STATS_BA_256_BITMAP_TX_DISABLE_SET(flag, val) \
  14772. WMI_SET_BITS(flag, 30, 1, val)
  14773. #define WMI_VDEV_STATS_BA_256_BITMAP_TX_DISABLE_GET(flag) \
  14774. WMI_GET_BITS(flag, 30, 1)
  14775. #define WMI_VDEV_STATS_IS_MULTI_GROUP_KEY_ENABLED_SET(flag, val) \
  14776. WMI_SET_BITS(flag, 31, 1, val)
  14777. #define WMI_VDEV_STATS_IS_MULTI_GROUP_KEY_ENABLED_GET(flag) \
  14778. WMI_GET_BITS(flag, 31, 1)
  14779. typedef struct {
  14780. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_sta_rrm_stats_struct */
  14781. A_UINT32 tlv_header;
  14782. A_UINT32 dot11GroupTransmittedFrameCount;
  14783. A_UINT32 dot11GroupReceivedFrameCount;
  14784. A_UINT32 dot11TransmittedFrameCount;
  14785. A_UINT32 dot11AckFailureCount;
  14786. A_UINT32 dot11FailedCount;
  14787. A_UINT32 dot11FCSErrorCount;
  14788. A_UINT32 dot11RTSSuccessCount;
  14789. A_UINT32 dot11RTSFailureCount;
  14790. } wmi_ctrl_path_sta_rrm_stats_struct;
  14791. typedef struct {
  14792. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_vdev_bcn_stats_struct */
  14793. A_UINT32 tlv_header;
  14794. A_UINT32 vdev_id;
  14795. A_UINT32 beacon_succ_cnt;
  14796. A_UINT32 beacon_outage_cnt;
  14797. A_UINT32 beacon_cons_miss_cnt;
  14798. A_UINT32 beacon_curr_miss_cnt;
  14799. A_UINT32 beacon_sw_abort_cnt;
  14800. A_UINT32 beacon_tx_filter_cnt;
  14801. A_UINT32 beacon_tx_xretry_cnt;
  14802. A_UINT32 beacon_tx_drop_cnt;
  14803. A_UINT32 beacon_tx_abort_cnt;
  14804. A_UINT32 beacon_tx_tid_del_cnt;
  14805. A_UINT32 beacon_tx_mig_drop_cnt;
  14806. A_UINT32 beacon_fail_others_cnt;
  14807. A_UINT32 beacon_stuck_cnt;
  14808. A_UINT32 beacon_tbtt_skip_cnt;
  14809. A_UINT32 beacon_swba_cnt;
  14810. A_UINT32 beacon_enque_fail;
  14811. A_UINT32 scan_time_exceed_cnt;
  14812. A_UINT32 beacon_miss_systime_gap_us;
  14813. A_UINT32 beacon_last_miss_time_low_us;
  14814. A_UINT32 beacon_last_miss_time_high_us;
  14815. A_UINT32 last_tbtt_time_low_us;
  14816. A_UINT32 last_tbtt_time_high_us;
  14817. A_UINT32 last_tbtt_update_low_us;
  14818. A_UINT32 last_tbtt_update_high_us;
  14819. } wmi_ctrl_path_vdev_bcn_tx_stats_struct;
  14820. typedef struct {
  14821. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_pdev_bcn_stats_struct */
  14822. A_UINT32 tlv_header;
  14823. A_UINT32 pdev_id;
  14824. A_UINT32 beacon_succ_cnt;
  14825. A_UINT32 beacon_outage_cnt;
  14826. A_UINT32 beacon_sw_abort_cnt;
  14827. A_UINT32 beacon_tx_filter_cnt;
  14828. A_UINT32 beacon_tx_xretry_cnt;
  14829. A_UINT32 beacon_tx_drop_cnt;
  14830. A_UINT32 beacon_tx_abort_cnt;
  14831. A_UINT32 beacon_tx_tid_del_cnt;
  14832. A_UINT32 beacon_tx_mig_drop_cnt;
  14833. A_UINT32 beacon_fail_others_cnt;
  14834. A_UINT32 beacon_stuck_cnt;
  14835. A_UINT32 beacon_swba_cnt;
  14836. A_UINT32 beacon_enque_fail;
  14837. } wmi_ctrl_path_pdev_bcn_tx_stats_struct;
  14838. /**
  14839. * peer statistics.
  14840. */
  14841. typedef struct {
  14842. /** peer MAC address */
  14843. wmi_mac_addr peer_macaddr;
  14844. /** RSSI */
  14845. A_UINT32 peer_rssi;
  14846. /** last tx data rate used for peer */
  14847. A_UINT32 peer_tx_rate;
  14848. /** last rx data rate used for peer */
  14849. A_UINT32 peer_rx_rate;
  14850. } wmi_peer_stats;
  14851. /**
  14852. * Peer extension statistics
  14853. */
  14854. typedef struct {
  14855. /** peer MAC address */
  14856. wmi_mac_addr peer_macaddr;
  14857. /* lower 32 bits of rx duration in microseconds */
  14858. A_UINT32 rx_duration;
  14859. /** Total TX bytes (including dot11 header) sent to peer */
  14860. A_UINT32 peer_tx_bytes;
  14861. /** Total RX bytes (including dot11 header) received from peer */
  14862. A_UINT32 peer_rx_bytes;
  14863. /** last TX ratecode */
  14864. A_UINT32 last_tx_rate_code;
  14865. /** TX power used by peer - units are 0.5 dBm */
  14866. A_INT32 last_tx_power;
  14867. /* Total number of received multicast & broadcast data frames corresponding to this peer */
  14868. A_UINT32 rx_mc_bc_cnt; /* 1 in the MSB of rx_mc_bc_cnt represents a valid data */
  14869. /* upper 32 bits of rx duration in microseconds */
  14870. A_UINT32 rx_duration_u32; /* 1 in the most significant bit indicates this field contains valid data */
  14871. A_UINT32 reserved[2]; /** for future use - add new peer stats here */
  14872. } wmi_peer_extd_stats;
  14873. typedef struct {
  14874. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_extd2_stats */
  14875. /** peer MAC address */
  14876. wmi_mac_addr peer_macaddr;
  14877. /*
  14878. * The following rx_bytes field (lower/upper pair) counts only the
  14879. * MSDU bytes (after 802.11 decap, if applicable), and thus doesn't
  14880. * count the 802.11 header, unlike the wmi_peer_extd_stats.peer_rx_bytes
  14881. * and wmi_peer_stats_info.rx_bytes fields.
  14882. */
  14883. /** Lower 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  14884. A_UINT32 rx_bytes_l32;
  14885. /** Upper 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  14886. A_UINT32 rx_bytes_u32;
  14887. /** Number of MPDUS received with FCS error from this peer */
  14888. A_UINT32 rx_fcs_err;
  14889. /** Number of MPDUs(both data and non data) received from this peer */
  14890. A_UINT32 rx_mpdus;
  14891. /** nss of last tx data to peer */
  14892. A_UINT32 last_tx_nss;
  14893. /** nss of last rx data from peer */
  14894. A_UINT32 last_rx_nss;
  14895. /** chain mask used for last tx data to peer */
  14896. A_UINT32 last_tx_chain_mask;
  14897. /** chain mask used for last rx data from peer */
  14898. A_UINT32 last_rx_chain_mask;
  14899. } wmi_peer_extd2_stats;
  14900. typedef struct {
  14901. /** Primary channel freq of the channel for which stats are sent */
  14902. A_UINT32 chan_mhz;
  14903. /** Time spent on the channel */
  14904. A_UINT32 sampling_period_us;
  14905. /** Aggregate duration over a sampling period for which channel activity was observed */
  14906. A_UINT32 rx_clear_count;
  14907. /** Accumalation of the TX PPDU duration over a sampling period */
  14908. A_UINT32 tx_duration_us;
  14909. /** Accumalation of the RX PPDU duration over a sampling period */
  14910. A_UINT32 rx_duration_us;
  14911. } wmi_chan_stats;
  14912. /**
  14913. * MIB statistics. See 802.11 spec for the meaning of each field.
  14914. */
  14915. typedef struct {
  14916. A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
  14917. A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
  14918. A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
  14919. A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
  14920. A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
  14921. A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
  14922. A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
  14923. A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
  14924. A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
  14925. A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
  14926. A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
  14927. A_UINT32 tx_Qos_mpdu_grp_frag_cnt; /*dot11QosTransmittedFragmentCount */
  14928. A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
  14929. A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
  14930. A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
  14931. A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
  14932. A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
  14933. A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
  14934. A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
  14935. A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
  14936. A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
  14937. A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
  14938. A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; /*dot11RSNAStatsRobustMgmtCCMPReplays*/
  14939. A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
  14940. A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
  14941. A_UINT32 rsna_CCMP_decrypt_err_cnt; /*dot11RSNAStatsCCMPDecryptErrors*/
  14942. A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
  14943. A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
  14944. A_UINT32 tx_mpdu_cnt_in_ampdu; /*dot11TransmittedMPDUsInAMPDUCount*/
  14945. union {
  14946. A_UINT64 counter; /* for use by target only */
  14947. struct {
  14948. A_UINT32 low;
  14949. A_UINT32 high;
  14950. } upload; /* for use by host */
  14951. } tx_octets_in_ampdu; /*dot11TransmittedOctetsInAMPDUCount*/
  14952. A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
  14953. A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
  14954. union {
  14955. A_UINT64 counter; /* for use by target only */
  14956. struct {
  14957. A_UINT32 rx_octets_in_ampdu_low;
  14958. A_UINT32 rx_octets_in_ampdu_high;
  14959. } upload; /* for use by host */
  14960. } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
  14961. A_UINT32 reserved_1;
  14962. A_UINT32 reserved_2;
  14963. A_UINT32 reserved_3;
  14964. A_UINT32 reserved_4;
  14965. } wmi_mib_stats;
  14966. /**
  14967. * MIB extension statistics.
  14968. */
  14969. typedef struct {
  14970. A_UINT32 tx_msdu_multi_retry_cnt; /*dot11MultipleRetryCount*/
  14971. A_UINT32 tx_ack_fail_cnt; /*dot11ACKFailureCount*/
  14972. A_UINT32 tx_qos_msdu_multi_retry_up; /*dot11QosMultipleRetryCount*/
  14973. A_UINT32 tx_qos_ack_fail_cnt_up; /*dot11QosACKFailureCount*/
  14974. A_UINT32 rsna_cmac_icv_err_cnt; /*dot11RSNAStatsCMACICVErrors*/
  14975. A_UINT32 rsna_cmac_replay_err_cnt; /*dot11RSNAStatsCMACReplays*/
  14976. A_UINT32 rx_ampdu_deli_crc_err_cnt; /*dot11AMPDUDelimiterCRCErrorCount*/
  14977. A_UINT32 reserved[8]; /* Reserve more fields for future extension */
  14978. } wmi_mib_extd_stats;
  14979. /**
  14980. * Beacon protection statistics.
  14981. */
  14982. typedef struct {
  14983. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmf_bcn_protect_stats */
  14984. A_UINT32 igtk_mic_fail_cnt; /* MIC failure count of management packets using IGTK */
  14985. A_UINT32 igtk_replay_cnt; /* Replay detection count of management packets using IGTK */
  14986. A_UINT32 bcn_mic_fail_cnt; /* MIC failure count of beacon packets using BIGTK */
  14987. A_UINT32 bcn_replay_cnt; /* Replay detection count of beacon packets using BIGTK */
  14988. } wmi_pmf_bcn_protect_stats;
  14989. typedef struct {
  14990. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
  14991. A_UINT32 vdev_id;
  14992. A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
  14993. A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
  14994. wmi_mac_addr peer_macaddr;
  14995. } wmi_rssi_stats;
  14996. typedef struct {
  14997. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_congestion_stats */
  14998. A_UINT32 vdev_id;
  14999. /* congestion -
  15000. * This field holds the congestion percentage = (busy_time/total_time)*100
  15001. * for the interval from when the vdev was started to the current time
  15002. * (or the time at which the vdev was stopped).
  15003. */
  15004. A_UINT32 congestion;
  15005. } wmi_congestion_stats;
  15006. typedef struct {
  15007. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats */
  15008. A_UINT32 num_per_chain_rssi_stats;
  15009. /* This TLV is followed by another TLV of array of structs:
  15010. * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
  15011. */
  15012. } wmi_per_chain_rssi_stats;
  15013. /* vdev control flags (per bits) */
  15014. #define VDEV_FLAGS_NON_MBSSID_AP 0x00000001 /* legacy AP */
  15015. #define VDEV_FLAGS_TRANSMIT_AP 0x00000002 /* indicate if this vdev is transmitting AP */
  15016. #define VDEV_FLAGS_NON_TRANSMIT_AP 0x00000004 /* explicitly indicate this vdev is non-transmitting AP */
  15017. #define VDEV_FLAGS_EMA_MODE 0x00000008 /* vdev is EMA and supports multiple beacon profiles.
  15018. * Once this flag set, flags VDEV_FLAGS_TRANSMIT_AP and
  15019. * VDEV_FLAGS_NON_TRANSMIT_AP classify it as either Tx vap
  15020. * or non Tx vap.
  15021. */
  15022. #define VDEV_FLAGS_SCAN_MODE_VAP 0x00000010 /* for Scan Radio vdev will be special vap.
  15023. * There will not be WMI_VDEV_UP_CMD, there will be only WMI_VDEV_CREATE_CMD
  15024. * and WMI_VDEV_START_REQUEST_CMD. Based on this parameter need to make decision like
  15025. * vdev Pause/Unpause at WMI_VDEV_START_REQUEST_CMD.
  15026. */
  15027. /* get/set/check macros for VDEV_FLAGS_SCAN_MODE_VAP flag */
  15028. #define WMI_SCAN_MODE_VDEV_FLAG_GET(flag) WMI_GET_BITS(flag, 4, 1)
  15029. #define WMI_SCAN_MODE_VDEV_FLAG_SET(flag, val) WMI_SET_BITS(flag, 4, 1, val)
  15030. #define WMI_SCAN_MODE_VDEV_FLAG_ENABLED(flag) ((flag & VDEV_FLAGS_SCAN_MODE_VAP) ? 1 : 0)
  15031. typedef struct {
  15032. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
  15033. /** unique id identifying the VDEV, generated by the caller */
  15034. A_UINT32 vdev_id;
  15035. /** VDEV type (AP,STA,IBSS,MONITOR) */
  15036. A_UINT32 vdev_type;
  15037. /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0, BRIDGE) */
  15038. A_UINT32 vdev_subtype;
  15039. /** VDEV MAC address */
  15040. wmi_mac_addr vdev_macaddr;
  15041. /** Number of configured txrx streams */
  15042. A_UINT32 num_cfg_txrx_streams;
  15043. /**
  15044. * pdev_id for identifying the MAC,
  15045. * See macros starting with WMI_PDEV_ID_ for values.
  15046. */
  15047. A_UINT32 pdev_id;
  15048. /** control flags for this vdev (DEPRECATED)
  15049. * Use @mbss_capability_flags in vdev start instead.
  15050. */
  15051. A_UINT32 flags;
  15052. /** vdevid of transmitted AP (mbssid case) (DEPRECATED)
  15053. * Use @vdevid_trans in vdev start instead.
  15054. */
  15055. A_UINT32 vdevid_trans;
  15056. /* vdev_stats_id_valid indicates whether vdev_stats_id is valid */
  15057. A_UINT32 vdev_stats_id_valid;
  15058. /**
  15059. * vdev_stats_id indicates the ID for the REO Rx stats collection
  15060. * For Beryllium: 0-47 is the valid range and >=48 is invalid
  15061. * This vdev_stats_id field should be ignored unless the
  15062. * vdev_stats_id_valid field is non-zero.
  15063. */
  15064. A_UINT32 vdev_stats_id;
  15065. /* This TLV is followed by another TLV of array of structures
  15066. * wmi_vdev_txrx_streams cfg_txrx_streams[];
  15067. * wmi_vdev_create_mlo_params mlo_params[0,1];
  15068. * optional TLV, only present for MLO vdev;
  15069. * if the vdev is not MLO the array length should be 0.
  15070. */
  15071. } wmi_vdev_create_cmd_fixed_param;
  15072. typedef struct {
  15073. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_txrx_streams */
  15074. /* band - Should take values from wmi_channel_band_mask */
  15075. A_UINT32 band;
  15076. /* max supported tx streams per given band for this vdev */
  15077. A_UINT32 supported_tx_streams;
  15078. /* max supported rx streams per given band for this vdev */
  15079. A_UINT32 supported_rx_streams;
  15080. } wmi_vdev_txrx_streams;
  15081. /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
  15082. typedef struct {
  15083. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
  15084. A_UINT32 type_count; /** 255: continuous schedule, 0: reserved */
  15085. A_UINT32 duration; /** Absent period duration in micro seconds */
  15086. A_UINT32 interval; /** Absent period interval in micro seconds */
  15087. A_UINT32 start_time; /** 32 bit tsf time when in starts */
  15088. } wmi_p2p_noa_descriptor;
  15089. /*
  15090. * mlo_flags sub-fields:
  15091. * bits 0 - mlo enable flag;
  15092. * bits 1 - assoc link flag;
  15093. * bits 2 - primary_umac flag;
  15094. * bits 3 - is logical link index valid
  15095. * bits 4 - is mlo peer id valid
  15096. */
  15097. #define WMI_MLO_FLAGS_GET_ENABLED(mlo_flags) WMI_GET_BITS(mlo_flags, 0, 1)
  15098. #define WMI_MLO_FLAGS_SET_ENABLED(mlo_flags, value) WMI_SET_BITS(mlo_flags, 0, 1, value)
  15099. #define WMI_MLO_FLAGS_GET_ASSOC_LINK(mlo_flags) WMI_GET_BITS(mlo_flags, 1, 1)
  15100. #define WMI_MLO_FLAGS_SET_ASSOC_LINK(mlo_flags, value) WMI_SET_BITS(mlo_flags, 1, 1, value)
  15101. #define WMI_MLO_FLAGS_GET_PRIMARY_UMAC(mlo_flags) WMI_GET_BITS(mlo_flags, 2, 1)
  15102. #define WMI_MLO_FLAGS_SET_PRIMARY_UMAC(mlo_flags, value) WMI_SET_BITS(mlo_flags, 2, 1, value)
  15103. #define WMI_MLO_FLAGS_GET_LINK_INDEX_VALID(mlo_flags) WMI_GET_BITS(mlo_flags, 3, 1)
  15104. #define WMI_MLO_FLAGS_SET_LINK_INDEX_VALID(mlo_flags, value) WMI_SET_BITS(mlo_flags, 3, 1, value)
  15105. #define WMI_MLO_FLAGS_GET_PEER_ID_VALID(mlo_flags) WMI_GET_BITS(mlo_flags, 4, 1)
  15106. #define WMI_MLO_FLAGS_SET_PEER_ID_VALID(mlo_flags, value) WMI_SET_BITS(mlo_flags, 4, 1, value)
  15107. #define WMI_MLO_FLAGS_GET_MCAST_VDEV(mlo_flags) WMI_GET_BITS(mlo_flags, 5, 1)
  15108. #define WMI_MLO_FLAGS_SET_MCAST_VDEV(mlo_flags, value) WMI_SET_BITS(mlo_flags, 5, 1, value)
  15109. #define WMI_MLO_FLAGS_GET_EMLSR_SUPPORT(mlo_flags) WMI_GET_BITS(mlo_flags, 6, 1)
  15110. #define WMI_MLO_FLAGS_SET_EMLSR_SUPPORT(mlo_flags, value) WMI_SET_BITS(mlo_flags, 6, 1, value)
  15111. #define WMI_MLO_FLAGS_GET_FORCE_LINK_INACTIVE(mlo_flags) WMI_GET_BITS(mlo_flags, 7, 1)
  15112. #define WMI_MLO_FLAGS_SET_FORCE_LINK_INACTIVE(mlo_flags, value) WMI_SET_BITS(mlo_flags, 7, 1, value)
  15113. #define WMI_MLO_FLAGS_GET_LINK_ADD(mlo_flags) WMI_GET_BITS(mlo_flags, 8, 1)
  15114. #define WMI_MLO_FLAGS_SET_LINK_ADD(mlo_flags, value) WMI_SET_BITS(mlo_flags, 8, 1, value)
  15115. #define WMI_MLO_FLAGS_GET_LINK_DEL(mlo_flags) WMI_GET_BITS(mlo_flags, 9, 1)
  15116. #define WMI_MLO_FLAGS_SET_LINK_DEL(mlo_flags, value) WMI_SET_BITS(mlo_flags, 9, 1, value)
  15117. #define WMI_MLO_FLAGS_GET_BRIDGE_PEER(mlo_flags) WMI_GET_BITS(mlo_flags, 10, 1)
  15118. #define WMI_MLO_FLAGS_SET_BRIDGE_PEER(mlo_flags, value) WMI_SET_BITS(mlo_flags, 10, 1, value)
  15119. #define WMI_MLO_FLAGS_GET_NSTR_BITMAP_PRESENT(mlo_flags) WMI_GET_BITS(mlo_flags, 11, 1)
  15120. #define WMI_MLO_FLAGS_SET_NSTR_BITMAP_PRESENT(mlo_flags, value) WMI_SET_BITS(mlo_flags, 11, 1, value)
  15121. #define WMI_MLO_FLAGS_GET_NSTR_BITMAP_SIZE(mlo_flags) WMI_GET_BITS(mlo_flags, 12, 1)
  15122. #define WMI_MLO_FLAGS_SET_NSTR_BITMAP_SIZE(mlo_flags, value) WMI_SET_BITS(mlo_flags, 12, 1, value)
  15123. #define WMI_MLO_FLAGS_GET_MLO_LINK_SWITCH(mlo_flags) WMI_GET_BITS(mlo_flags, 13, 1)
  15124. #define WMI_MLO_FLAGS_SET_MLO_LINK_SWITCH(mlo_flags, value) WMI_SET_BITS(mlo_flags, 13, 1, value)
  15125. #define WMI_MLO_FLAGS_GET_MLO_BRIDGE_LINK(mlo_flags) WMI_GET_BITS(mlo_flags, 14, 1)
  15126. #define WMI_MLO_FLAGS_SET_MLO_BRIDGE_LINK(mlo_flags, value) WMI_SET_BITS(mlo_flags, 14, 1, value)
  15127. /* this structure used for pass mlo flags*/
  15128. typedef struct {
  15129. union {
  15130. struct {
  15131. A_UINT32 mlo_enabled:1, /* indicate is MLO enabled */
  15132. mlo_assoc_link:1, /* indicate is the link used to initialize the association of mlo connection */
  15133. mlo_primary_umac:1, /* indicate is the link on primary UMAC, WIN only flag */
  15134. mlo_logical_link_index_valid:1, /* indicate if the logial link index in wmi_peer_assoc_mlo_params is valid */
  15135. mlo_peer_id_valid:1, /* indicate if the mlo peer id in wmi_peer_assoc_mlo_params is valid */
  15136. mlo_mcast_vdev:1, /* indicate this is the MLO mcast primary vdev */
  15137. emlsr_support:1, /* indicate that eMLSR is supported */
  15138. mlo_force_link_inactive:1, /* indicate this link is forced inactive */
  15139. mlo_link_add:1, /* Indicate dynamic link addition in an MLD VAP */
  15140. mlo_link_del:1, /* Indicate dynamic link deletion in an MLD VAP */
  15141. mlo_bridge_peer:1, /* Indicate if this link has bridge_peer */
  15142. nstr_bitmap_present:1, /* Indicate if at least one NSTR link pair is present in the MLD */
  15143. /* nstr_bitmap_size:
  15144. * Set to 1 if the length of the corresponding NSTR
  15145. * Indication Bitmap subfield is equal to 2 octets.
  15146. * Set to 0 if the length of the corresponding NSTR
  15147. * Indication Bitmap subfield is equal to 1 octet.
  15148. */
  15149. nstr_bitmap_size:1,
  15150. mlo_link_switch: 1, /* indicate the command is a part of link switch procedure */
  15151. mlo_bridge_link:1, /* indicate link is bridge link */
  15152. unused: 17;
  15153. };
  15154. A_UINT32 mlo_flags;
  15155. };
  15156. /* NOTE:
  15157. * Since this struct is embedded inside WMI TLV structs, it cannot
  15158. * have any fields added, as expanding this struct would break
  15159. * backwards-compatibility by changing the offsets of the subsequent
  15160. * fields in the structs that contain this struct.
  15161. */
  15162. } wmi_mlo_flags;
  15163. typedef struct {
  15164. A_UINT32 tlv_header;/** TLV tag (WMITLV_TAG_STRUC_wmi_partner_link_params) and len;*/
  15165. A_UINT32 vdev_id; /** partner vdev_id */
  15166. A_UINT32 hw_link_id; /** hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
  15167. wmi_mac_addr vdev_macaddr; /** VDEV MAC address */
  15168. wmi_mlo_flags mlo_flags;
  15169. } wmi_partner_link_params;
  15170. /* this TLV structure used for pass mlo parameters on vdev create*/
  15171. typedef struct {
  15172. A_UINT32 tlv_header; /** TLV tag and len; */
  15173. /** MLD MAC address */
  15174. wmi_mac_addr mld_macaddr;
  15175. } wmi_vdev_create_mlo_params;
  15176. /* this TLV structure used for pass mlo parameters on vdev start*/
  15177. typedef struct {
  15178. A_UINT32 tlv_header; /** TLV tag and len; */
  15179. wmi_mlo_flags mlo_flags; /*only mlo enable and assoc link flag need by vdev start*/
  15180. } wmi_vdev_start_mlo_params;
  15181. /* this TLV structure used for passing mlo parameters on vdev stop */
  15182. typedef struct {
  15183. A_UINT32 tlv_header; /** TLV tag and len; */
  15184. wmi_mlo_flags mlo_flags; /* only mlo_link_switch flag needed by vdev stop */
  15185. } wmi_vdev_stop_mlo_params;
  15186. typedef struct {
  15187. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_update_mac_addr_cmd_fixed_param */
  15188. /** Unique id identifying the VDEV to update mac addr */
  15189. A_UINT32 vdev_id;
  15190. /** New VDEV MAC address to configure */
  15191. wmi_mac_addr vdev_macaddr;
  15192. /** New MLD MAC address to configure */
  15193. wmi_mac_addr mld_macaddr;
  15194. } wmi_vdev_update_mac_addr_cmd_fixed_param;
  15195. typedef struct {
  15196. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_update_mac_addr_conf_event_fixed_param */
  15197. /** Unique id identifying the VDEV */
  15198. A_UINT32 vdev_id;
  15199. /*
  15200. * Status of mac address update request.
  15201. * Refer to wmi_vdev_update_mac_addr_conf_status.
  15202. */
  15203. A_UINT32 status;
  15204. } wmi_vdev_update_mac_addr_conf_event_fixed_param;
  15205. /** VDEV update mac address event response status codes */
  15206. typedef enum {
  15207. /** VDEV mac address updated successfully */
  15208. WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_SUCCESS = 0,
  15209. /** Requested VDEV not found */
  15210. WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_INVALID_VDEVID = 1,
  15211. /** Unsupported VDEV combination.eg: received cmd in VDEV connected state */
  15212. WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_NOT_SUPPORTED = 2,
  15213. /** FW internal failure to update mac address */
  15214. WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_INTERNAL_FAIL = 3,
  15215. } wmi_vdev_update_mac_addr_conf_status;
  15216. /** values for vdev_type */
  15217. #define WMI_VDEV_TYPE_AP 0x1
  15218. #define WMI_VDEV_TYPE_STA 0x2
  15219. #define WMI_VDEV_TYPE_IBSS 0x3
  15220. #define WMI_VDEV_TYPE_MONITOR 0x4
  15221. /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
  15222. * by FW to execute the NAN specific WMI commands and also implement NAN specific
  15223. * operations like Network discovery, service provisioning and service
  15224. * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
  15225. * WMI command to create this VDEV once during initialization and host is not
  15226. * expected to use any VDEV specific WMI commands on this VDEV.
  15227. **/
  15228. #define WMI_VDEV_TYPE_NAN 0x5
  15229. #define WMI_VDEV_TYPE_OCB 0x6
  15230. /* NAN Data Interface */
  15231. #define WMI_VDEV_TYPE_NDI 0x7
  15232. #define WMI_VDEV_TYPE_MESH_POINT 0x8
  15233. /*
  15234. * Param values to be sent for WMI_VDEV_PARAM_SGI command
  15235. * which are used in 11ax, 11be systems
  15236. */
  15237. #define WMI_SGI_LEGACY 0x1 /* for HT and VHT */
  15238. #define WMI_SGI_HE_400_NS 0x2 /* for HE 400 nsec */
  15239. #define WMI_SGI_HE_800_NS 0x4 /* for HE 800 nsec */
  15240. #define WMI_SGI_HE_1600_NS 0x8 /* for HE 1600 nsec */
  15241. #define WMI_SGI_HE_3200_NS 0x10 /* for HE 3200 nsec */
  15242. #define WMI_SGI_EHT_800_NS 0x20 /* for EHT 800 nsec */
  15243. #define WMI_SGI_EHT_1600_NS 0x40 /* for EHT 1600 nsec */
  15244. #define WMI_SGI_EHT_3200_NS 0x80 /* for EHT 3200 nsec */
  15245. /*
  15246. * Param values to be sent for WMI_VDEV_PARAM_HE_LTF command
  15247. * which are used in 11ax systems
  15248. */
  15249. #define WMI_HE_LTF_DEFAULT 0x0
  15250. #define WMI_HE_LTF_1X 0x1
  15251. #define WMI_HE_LTF_2X 0x2
  15252. #define WMI_HE_LTF_4X 0x3
  15253. /*
  15254. * Param values to be sent for WMI_VDEV_EHT_PARAM_LTF command
  15255. * which are used in 11be systems
  15256. */
  15257. #define WMI_EHT_LTF_DEFAULT 0x4
  15258. #define WMI_EHT_LTF_1X 0x5
  15259. #define WMI_EHT_LTF_2X 0x6
  15260. #define WMI_EHT_LTF_4X 0x7
  15261. /** values for vdev_subtype */
  15262. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
  15263. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
  15264. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
  15265. #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
  15266. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
  15267. /* new subtype for 11S mesh is required as 11S functionality differs
  15268. * in many ways from proprietary mesh
  15269. * 11S uses 6-addr frame format and supports peering between mesh
  15270. * stations and dynamic best path selection between mesh stations.
  15271. * While in proprietary mesh, neighboring mesh station MAC is manually
  15272. * added to AST table for traffic flow between mesh stations
  15273. */
  15274. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
  15275. /* Subtype to indicate that the AP VAP is in smart monitor mode
  15276. * This is needed to differentiate in firmware between normal AP mode
  15277. * with smart monitor AP mode
  15278. */
  15279. #define WMI_UNIFIED_VDEV_SUBTYPE_SMART_MON 0x7
  15280. /* Subtype to indicate that the VDEV is in Bridge mode.
  15281. * Bridge VDEV is dummy VDEV required for 4 chip MLO scenario.
  15282. * Bridge Peer will be connected to Bridge VDEV.
  15283. * Bridge VDEV/PEER will be required to seamlessly transmit
  15284. * to diagonal links in 4 chip MLO.
  15285. */
  15286. #define WMI_UNIFIED_VDEV_SUBTYPE_BRIDGE 0x8
  15287. /** values for vdev_start_request flags */
  15288. /** Indicates that AP VDEV uses hidden ssid. only valid for
  15289. * AP/GO */
  15290. #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
  15291. /** Indicates if robust management frame/management frame
  15292. * protection is enabled. For GO/AP vdevs, it indicates that
  15293. * it may support station/client associations with RMF enabled.
  15294. * For STA/client vdevs, it indicates that sta will
  15295. * associate with AP with RMF enabled. */
  15296. #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
  15297. /*
  15298. * Host is sending bcn_tx_rate to override the beacon tx rates.
  15299. */
  15300. #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
  15301. /** Indicates if LDPC RX will be advertized inside HT/VHT Capabilities IE
  15302. * of assoc request/response
  15303. */
  15304. #define WMI_UNIFIED_VDEV_START_LDPC_RX_ENABLED (1<<3)
  15305. /** Indicates HW encryption is disabled, and SW encryption is enabled.
  15306. * If This flag is set, indicates that HW encryption will be disabled
  15307. * and SW encryption will be enabled.
  15308. * If SW encryption is enabled, key plumbing will not happen in FW.
  15309. */
  15310. #define WMI_UNIFIED_VDEV_START_HW_ENCRYPTION_DISABLED (1<<4)
  15311. /** Indicates VAP is used for MLO repurpose.
  15312. * This Indicates that vap can be brought up as 11ax or 11be and can be
  15313. * repurposed based on the above stack on the fly to change from MLO to
  15314. * non MLO, currently we support only 11ax and 11be transition.
  15315. */
  15316. #define WMI_UNIFIED_VDEV_START_MLO_REPURPOSE_VAP (1<<5)
  15317. /* BSS color 0-6 */
  15318. #define WMI_HEOPS_COLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 0, 6)
  15319. #define WMI_HEOPS_COLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
  15320. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  15321. #define WMI_HEOPS_DEFPE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 6, 3)
  15322. #define WMI_HEOPS_DEFPE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
  15323. /* TWT required */
  15324. #define WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops) WMI_GET_BITS(he_ops, 9, 1)
  15325. #define WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
  15326. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET instead */
  15327. #define WMI_HEOPS_TWT_GET_D2(he_ops) \
  15328. WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops)
  15329. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET instead */
  15330. #define WMI_HEOPS_TWT_SET_D2(he_ops, value) \
  15331. WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value)
  15332. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  15333. #define WMI_HEOPS_RTSTHLD_GET_D2(he_ops) WMI_GET_BITS(he_ops, 10, 10)
  15334. #define WMI_HEOPS_RTSTHLD_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 10, 10, value)
  15335. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  15336. #define WMI_HEOPS_PARTBSSCOLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 20, 1)
  15337. #define WMI_HEOPS_PARTBSSCOLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 20, 1, value)
  15338. /* MAX BSS supported by MultiBSS element */
  15339. #define WMI_HEOPS_MAXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 21, 8)
  15340. #define WMI_HEOPS_MAXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 21, 8, value)
  15341. /* Tx BSSID Indicator indicates whether HE AP corresponds to transmitted BSSID */
  15342. #define WMI_HEOPS_TXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 29, 1)
  15343. #define WMI_HEOPS_TXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 29, 1, value)
  15344. /* when set to 1 disables use of BSS color */
  15345. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  15346. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  15347. /**--- HEOPS_DUALBEACON: DO NOT USE - DEPRECATED ---*/
  15348. /* When set to 1 HE AP transmits beacons using two PHY formats,
  15349. * one in non-HE format and other in an HE_EXT_SU PHY format
  15350. */
  15351. #define WMI_HEOPS_DUALBEACON_GET_D2(he_ops) (0)
  15352. #define WMI_HEOPS_DUALBEACON_SET_D2(he_ops, value) {;}
  15353. #define WMI_MAX_HECAP_PHY_SIZE (3)
  15354. /* Dual Band both 2.4 GHz and 5 GHz Supported */
  15355. #define WMI_HECAP_PHY_DB_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
  15356. #define WMI_HECAP_PHY_DB_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
  15357. /*
  15358. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  15359. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  15360. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  15361. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  15362. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  15363. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  15364. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  15365. * 242-tone RU mapping in 40 MHz and 80
  15366. * MHz channel width in 5 GHz. Otherwise Reserved.
  15367. * B6: Reserved
  15368. */
  15369. #define WMI_HECAP_PHY_CBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  15370. #define WMI_HECAP_PHY_CBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  15371. /*
  15372. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  15373. * where in the preamble only the secondary 20 MHz is punctured
  15374. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  15375. * where in the preamble only one of the two 20 MHz sub-channels in the
  15376. * secondary 40 MHz is punctured
  15377. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  15378. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  15379. * secondary 20 MHz is punctured
  15380. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  15381. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  15382. * primary 40 MHz is present
  15383. */
  15384. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  15385. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  15386. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  15387. #define WMI_HECAP_PHY_COD_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  15388. #define WMI_HECAP_PHY_COD_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  15389. /* Indicates support of transmission and reception of LDPC encoded packets */
  15390. #define WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  15391. #define WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  15392. /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LDPC instead */
  15393. #define WMI_HECAP_PHY_TXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  15394. #define WMI_HECAP_PHY_TXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  15395. /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LDPC instead */
  15396. #define WMI_HECAP_PHY_RXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  15397. #define WMI_HECAP_PHY_RXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  15398. /*
  15399. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  15400. */
  15401. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  15402. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  15403. /*
  15404. * When the Doppler Rx subfield is 1, indicates the maximum number of space-
  15405. * time streams supported for reception when midamble is used in the Data field.
  15406. */
  15407. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  15408. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  15409. /*
  15410. * B0: For a transmitting STA acting as beamformee, it indicates support of
  15411. * NDP reception using 4x LTF and 3.2 us guard interval duration
  15412. */
  15413. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  15414. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  15415. /* indicates support for the transmission of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  15416. #define WMI_HECAP_PHY_TXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  15417. #define WMI_HECAP_PHY_TXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  15418. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  15419. #define WMI_HECAP_PHY_RXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  15420. #define WMI_HECAP_PHY_RXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  15421. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  15422. #define WMI_HECAP_PHY_TXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  15423. #define WMI_HECAP_PHY_TXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  15424. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  15425. #define WMI_HECAP_PHY_RXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  15426. #define WMI_HECAP_PHY_RXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  15427. /*
  15428. * If the transmitting STA is an AP:
  15429. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  15430. * transmission.
  15431. * If the transmitting STA is a non-AP STA:
  15432. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  15433. * transmission.
  15434. */
  15435. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  15436. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  15437. /*
  15438. * If the transmitting STA is an AP:
  15439. * indicates STA supports of reception of UL MUMIMO transmission on an
  15440. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  15441. * If the transmitting STA is a non-AP STA:
  15442. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  15443. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  15444. */
  15445. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  15446. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  15447. /* Tx DCM
  15448. * B0:B1
  15449. * 00: Does not support DCM
  15450. * 01: BPSK
  15451. * 10: QPSK
  15452. * 11: 16-QAM
  15453. * B2 signals maximum number of spatial streams with DCM
  15454. * 0: 1 spatial stream
  15455. * 1: 2 spatial streams
  15456. */
  15457. #define WMI_HECAP_PHY_DCMTX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  15458. #define WMI_HECAP_PHY_DCMTX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  15459. /* Rx DCM
  15460. * B0:B1
  15461. * 00: Does not support DCM
  15462. * 01: BPSK
  15463. * 10: QPSK
  15464. * 11: 16-QAM
  15465. * B2 signals maximum number of spatial streams with DCM
  15466. * 0: 1 spatial stream
  15467. * 1: 2 spatial streams
  15468. */
  15469. #define WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  15470. #define WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  15471. /*
  15472. * Indicates that the STA supports the reception of an HE MU PPDU payload
  15473. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  15474. */
  15475. #define WMI_HECAP_PHY_ULHEMU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  15476. #define WMI_HECAP_PHY_ULHEMU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  15477. /* Indicates support for operation as an SU beamformer */
  15478. #define WMI_HECAP_PHY_SUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  15479. #define WMI_HECAP_PHY_SUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  15480. /* Indicates support for operation as an SU beamformee */
  15481. #define WMI_HECAP_PHY_SUBFME_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  15482. #define WMI_HECAP_PHY_SUBFME_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  15483. /* Indicates support for operation as an MU Beamformer */
  15484. #define WMI_HECAP_PHY_MUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  15485. #define WMI_HECAP_PHY_MUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  15486. /*
  15487. * Num STS -1 for <= 80MHz (min val 3)
  15488. * The maximum number of space-time streams minus 1 that the STA can
  15489. * receive in an HE NDP
  15490. */
  15491. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  15492. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  15493. /*
  15494. * Num STS -1 for > 80MHz (min val 3)
  15495. * The maximum number of space-time streams minus 1 that the STA can
  15496. * receive in an HE NDP
  15497. */
  15498. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  15499. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  15500. /*
  15501. * Number Of Sounding Dimensions For <= 80 MHz
  15502. * If SU beamformer capable, set to the maximum supported value of the
  15503. * TXVECTOR parameter NUM_STS minus 1.
  15504. * Otherwise, reserved.
  15505. */
  15506. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  15507. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  15508. /*
  15509. * Number Of Sounding Dimensions For > 80 MHz
  15510. * If SU beamformer capable, set to the maximum supported value of the
  15511. * TXVECTOR parameter NUM_STS minus 1.
  15512. * Otherwise, reserved.
  15513. */
  15514. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  15515. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  15516. /*
  15517. * Indicates if the HE beamformee is capable of feedback with tone
  15518. * grouping of 16 in the HE Compressed Beamforming Report field for
  15519. * a SU-type feedback.
  15520. */
  15521. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  15522. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  15523. /*
  15524. * Indicates if the HE beamformee is capable of feedback with tone
  15525. * grouping of 16 in the HE Compressed Beamforming Report field for
  15526. * a MU-type feedback.
  15527. */
  15528. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  15529. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  15530. /*
  15531. * Indicates if HE beamformee is capable of feedback with codebook
  15532. * size {4, 2} in the HECompressed Beamforming Report field for
  15533. * a SU-type feedback.
  15534. */
  15535. #define WMI_HECAP_PHY_CODBK42SU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  15536. #define WMI_HECAP_PHY_CODBK42SU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  15537. /*
  15538. * Indicates if HE beamformee is capable of feedback with codebook
  15539. * size {7, 5} in the HE Compressed Beamforming Report field for
  15540. * a MU-type feedback.
  15541. */
  15542. #define WMI_HECAP_PHY_CODBK75MU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  15543. #define WMI_HECAP_PHY_CODBK75MU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  15544. /*
  15545. * Beamforming Feedback With Trigger Frame
  15546. * If the transmitting STA is an AP STA:
  15547. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  15548. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  15549. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  15550. * If the transmitting STA is a non-AP STA:
  15551. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  15552. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  15553. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  15554. */
  15555. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  15556. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  15557. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  15558. * over the right 106-tone RU or partial BW ER
  15559. */
  15560. #define WMI_HECAP_PHY_HEERSU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  15561. #define WMI_HECAP_PHY_HEERSU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  15562. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  15563. * where the RU does not span the entire PPDU bandwidth.
  15564. */
  15565. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  15566. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  15567. /* Indicates whether or not the PPE Threshold field is present */
  15568. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  15569. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  15570. /* Indicates that the STA supports SRP-based SR operation */
  15571. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  15572. #define WMI_HECAP_PHY_SRPPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  15573. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  15574. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  15575. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  15576. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  15577. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  15578. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  15579. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  15580. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  15581. * minus 1. Otherwise, reserved.
  15582. */
  15583. #define WMI_HECAP_PHY_MAXNC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  15584. #define WMI_HECAP_PHY_MAXNC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  15585. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  15586. * STBC with one spatial stream
  15587. */
  15588. #define WMI_HECAP_PHY_STBCTXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  15589. #define WMI_HECAP_PHY_STBCTXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  15590. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  15591. * STBC with one spatial stream
  15592. */
  15593. #define WMI_HECAP_PHY_STBCRXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  15594. #define WMI_HECAP_PHY_STBCRXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  15595. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  15596. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  15597. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  15598. /*
  15599. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  15600. * 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.
  15601. */
  15602. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  15603. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  15604. /*
  15605. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  15606. * 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.
  15607. */
  15608. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  15609. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  15610. /*
  15611. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  15612. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  15613. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  15614. * 160 MHz HE TB PPDU.
  15615. */
  15616. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  15617. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  15618. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  15619. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  15620. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  15621. /*
  15622. * When the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF
  15623. * 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
  15624. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  15625. */
  15626. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  15627. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  15628. /*HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field*/
  15629. #define WMI_HECAP_MAC_HECTRL_GET_D2(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  15630. #define WMI_HECAP_MAC_HECTRL_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  15631. /* set to 1 to for TWT Requestor support*/
  15632. #define WMI_HECAP_MAC_TWTREQ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  15633. #define WMI_HECAP_MAC_TWTREQ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  15634. /* set to 1 to for TWT Responder support*/
  15635. #define WMI_HECAP_MAC_TWTRSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  15636. #define WMI_HECAP_MAC_TWTRSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  15637. /* Level of frag support
  15638. Set to 0 for no support for dynamic fragmentation.
  15639. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  15640. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  15641. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  15642. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  15643. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  15644. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  15645. */
  15646. #define WMI_HECAP_MAC_HEFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  15647. #define WMI_HECAP_MAC_HEFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  15648. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs*/
  15649. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  15650. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  15651. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  15652. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  15653. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  15654. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  15655. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  15656. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  15657. /*number of TIDs minus 1 of QoS Data frames that HE STA can aggregate in multi-TID AMPDU*/
  15658. #define WMI_HECAP_MAC_MTID_GET_D2(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  15659. #define WMI_HECAP_MAC_MTID_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  15660. /*
  15661. * Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  15662. * a QoS Data frame for which no block ack agreement exists.
  15663. */
  15664. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 15, 1)
  15665. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
  15666. /*--- HECAP_MAC_HELKAD: DO NOT USE - DEPRECATED ---*/
  15667. /*0=No Feedback,2=Unsolicited,3=Both*/
  15668. #define WMI_HECAP_MAC_HELKAD_GET_D2(he_cap) (0)
  15669. #define WMI_HECAP_MAC_HELKAD_SET_D2(he_cap, value) {;}
  15670. /* bit 16 reserved. */
  15671. /*Set to 1 for reception of AllAck support*/
  15672. #define WMI_HECAP_MAC_AACK_GET_D2(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  15673. #define WMI_HECAP_MAC_AACK_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  15674. /*Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field*/
  15675. #define WMI_HECAP_MAC_ULMURSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  15676. #define WMI_HECAP_MAC_ULMURSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  15677. /*Set to 1 if the STA supports the BSR A-Control field functionality.*/
  15678. #define WMI_HECAP_MAC_BSR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  15679. #define WMI_HECAP_MAC_BSR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  15680. /*Set to 1 when the STA supports broadcast TWT functionality.*/
  15681. #define WMI_HECAP_MAC_BCSTTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  15682. #define WMI_HECAP_MAC_BCSTTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  15683. /*Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap*/
  15684. #define WMI_HECAP_MAC_32BITBA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  15685. #define WMI_HECAP_MAC_32BITBA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  15686. /*Set to 1 if the STA supports MU cascading operation*/
  15687. #define WMI_HECAP_MAC_MUCASCADE_GET_D2(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  15688. #define WMI_HECAP_MAC_MUCASCADE_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  15689. /*Set to 1 when the STA supports reception of this multi-TID A-MPDU format*/
  15690. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  15691. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  15692. /*Set to 1 when the STA supports its reception*/
  15693. #define WMI_HECAP_MAC_GROUPMSTABA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 24, 1)
  15694. #define WMI_HECAP_MAC_GROUPMSTABA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 24, 1, value)
  15695. /*Set to 1 if the STA supports reception of the OMI A-Control field*/
  15696. #define WMI_HECAP_MAC_OMI_GET_D2(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  15697. #define WMI_HECAP_MAC_OMI_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  15698. /*1 if OFDMA Random Access Supported*/
  15699. #define WMI_HECAP_MAC_OFDMARA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  15700. #define WMI_HECAP_MAC_OFDMARA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  15701. /* Maximum AMPDU Length Exponent.
  15702. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  15703. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  15704. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  15705. * padding is not included in this limit.
  15706. */
  15707. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  15708. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  15709. /*A-MSDU Fragmentation Support*/
  15710. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  15711. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  15712. /*Flexible TWT Schedule Support*/
  15713. #define WMI_HECAP_MAC_FLEXTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  15714. #define WMI_HECAP_MAC_FLEXTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  15715. /*Rx Control Frame to MultiBSS*/
  15716. #define WMI_HECAP_MAC_MBSS_GET_D2(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  15717. #define WMI_HECAP_MAC_MBSS_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  15718. /* BSRP A-MPDU Aggregation
  15719. * maintaining compatibility since we don't support this now so not wasting memory
  15720. */
  15721. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D2(he_cap) (0)
  15722. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D2(he_cap, value) {;}
  15723. /* Quiet Time Period (QTP) operation
  15724. * maintaining compatibility since we don't support this now so not wasting memory
  15725. */
  15726. #define WMI_HECAP_MAC_QTP_GET_D2(he_cap) (0)
  15727. #define WMI_HECAP_MAC_QTP_SET_D2(he_cap, value) {;}
  15728. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  15729. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  15730. * that contains a BQR in the A-Control subfield
  15731. * maintaining compatibility since we don't support this now so not wasting memory
  15732. */
  15733. #define WMI_HECAP_MAC_ABQR_GET_D2(he_cap) (0)
  15734. #define WMI_HECAP_MAC_ABQR_SET_D2(he_cap, value) {;}
  15735. /*Indicates support by the STA for the role of SR Responder.*/
  15736. #define WMI_HECAP_MAC_SRRESP_GET_D2(he_cap) (0)
  15737. #define WMI_HECAP_MAC_SRRESP_SET_D2(he_cap, value) {;}
  15738. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  15739. * frames or TIM frames as described in AP operation for opportunistic power save.
  15740. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  15741. */
  15742. #define WMI_HECAP_MAC_OPS_GET_D2(he_cap) (0)
  15743. #define WMI_HECAP_MAC_OPS_SET_D2(he_cap, value) {;}
  15744. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  15745. * the NDP Feedback Report Poll Trigger frame.
  15746. */
  15747. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D2(he_cap) (0)
  15748. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D2(he_cap, value) {;}
  15749. /* BELOW MACROS ARE DEPRECATED Also we are not defining bits for capabilities
  15750. * beyond bit 31 we donot support as it adds additional dword to our struct which may be later
  15751. * removed by standard
  15752. */
  15753. #define WMI_HECAP_MAC_MBAHECTRL_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  15754. #define WMI_HECAP_MAC_MBAHECTRL_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  15755. #define WMI_HECAP_MAC_MURTS_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  15756. #define WMI_HECAP_MAC_MURTS_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  15757. /*Deprecate use WMI_HECAP_PHY_PREAMBLEPUNCRX instead*/
  15758. #define WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy) WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy)
  15759. #define WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value)
  15760. /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LTFGIFORHE_GET instead */
  15761. #define WMI_HECAP_PHY_OLTF_GET_D2(he_cap_phy) WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy)
  15762. #define WMI_HECAP_PHY_OLTF_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value)
  15763. /*DEPRECATED - USE WMI_HECAP_PHY_BFMENLTSGT80MHZ*/
  15764. #define WMI_HECAP_PHY_SUBFMESTS_GET_D2(he_cap_phy) WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy)
  15765. #define WMI_HECAP_PHY_SUBFMESTS_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value)
  15766. /*DEPRECATED - use WMI_HECAP_PHY_PETHRESPRESENT**/
  15767. #define WMI_HECAP_PHY_PADDING_GET_D2(he_cap_phy) WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy)
  15768. #define WMI_HECAP_PHY_PADDING_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value)
  15769. /**DO NOT USE - DEPRECATED*/
  15770. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2(he_cap_phy) (0)
  15771. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2(he_cap_phy, value) {;}
  15772. /*DO NOT USE - DEPRECATED**/
  15773. #define WMI_HECAP_PHY_32GI_GET_D2(he_cap_phy) (0)
  15774. #define WMI_HECAP_PHY_32GI_SET_D2(he_cap_phy, value) {;}
  15775. /*DO NOT USE - DEPRECATED**/
  15776. #define WMI_HECAP_PHY_NOSUNDIMENS_GET_D2(he_cap_phy) (0)
  15777. #define WMI_HECAP_PHY_NOSUNDIMENS_SET_D2(he_cap_phy, value) {;}
  15778. /*DO NOT USE - DEPRECATED**/
  15779. #define WMI_HECAP_PHY_40MHZNSS_GET_D2(he_cap_phy)(0)
  15780. #define WMI_HECAP_PHY_40MHZNSS_SET_D2(he_cap_phy, value) {;}
  15781. /* START TEMPORARY WORKAROUND -
  15782. * Leave legacy names as aliases for new names, until all references to the
  15783. * legacy names have been removed.
  15784. */
  15785. #define WMI_HECAP_PHY_ULOFDMA_GET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  15786. #define WMI_HECAP_PHY_ULOFDMA_SET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  15787. /* END TEMPORARY WORKAROUND */
  15788. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  15789. #define WMI_HECAP_PHY_DCM_GET_D2(he_cap_phy) WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy)
  15790. #define WMI_HECAP_PHY_DCM_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value)
  15791. /*
  15792. * The maximum value for NSTS-1<=80MHz,(min val 3)total that can be sent
  15793. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  15794. */
  15795. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  15796. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  15797. /*
  15798. * The maximum value for NSTS-1 > 80MHz (min val 3) total that can be sent
  15799. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  15800. */
  15801. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  15802. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  15803. /*
  15804. * Indicates the spatial multiplexing power save mode after receiving a
  15805. * Trigger frame that is in operation immediately after (re)association.
  15806. */
  15807. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2(he_cap2) (0)
  15808. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2(he_cap2, value) {;}
  15809. /* Indicates support for Punctured Sounding */
  15810. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D2(he_cap2) (0)
  15811. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D2(he_cap2, value) {;}
  15812. /*
  15813. * Indicates support for receiving a Trigger frame in an HT PPDU and
  15814. * receiving a Trigger frame in a VHT PPDU
  15815. */
  15816. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2(he_cap2) (0)
  15817. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2(he_cap2, value) {;}
  15818. #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode) (((_rcode) >> 8) & 0x7)
  15819. #define WMI_GET_HW_RATECODE_NSS_V1(_rcode) (((_rcode) >> 5) & 0x7)
  15820. #define WMI_GET_HW_RATECODE_RATE_V1(_rcode) (((_rcode) >> 0) & 0x1F)
  15821. #define WMI_ASSEMBLE_RATECODE_V1(_rate, _nss, _pream) \
  15822. (((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
  15823. typedef struct {
  15824. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
  15825. /** unique id identifying the VDEV, generated by the caller */
  15826. A_UINT32 vdev_id;
  15827. /** requestor id identifying the caller module */
  15828. A_UINT32 requestor_id;
  15829. /** beacon interval from received beacon */
  15830. A_UINT32 beacon_interval;
  15831. /** DTIM Period from the received beacon */
  15832. A_UINT32 dtim_period;
  15833. /** Flags */
  15834. A_UINT32 flags;
  15835. /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  15836. wmi_ssid ssid;
  15837. /** beacon/probe response xmit rate. Applicable for SoftAP. */
  15838. /** This field will be invalid and ignored unless the */
  15839. /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
  15840. /** When valid, this field contains the fixed tx rate for the beacon */
  15841. /** and probe response frames send by the GO or SoftAP */
  15842. A_UINT32 bcn_tx_rate;
  15843. /** beacon/probe response xmit power. Applicable for SoftAP. */
  15844. A_UINT32 bcn_txPower;
  15845. /** number of p2p NOA descriptor(s) from scan entry */
  15846. A_UINT32 num_noa_descriptors;
  15847. /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  15848. During CAC, Our HW shouldn't ack ditected frames */
  15849. A_UINT32 disable_hw_ack;
  15850. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  15851. /** The DBS policy manager indicates the preferred number of transmit streams. */
  15852. A_UINT32 preferred_tx_streams;
  15853. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  15854. /** the DBS policy manager indicates the preferred number of receive streams. */
  15855. A_UINT32 preferred_rx_streams;
  15856. A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
  15857. A_UINT32 cac_duration_ms; /* in milliseconds */
  15858. A_UINT32 regdomain;
  15859. /* min data rate to be used in BSS in Mbps */
  15860. A_UINT32 min_data_rate;
  15861. /** @mbss_capability_flags: Bitmap of vdev's MBSS/EMA capability.
  15862. * Capabilities are combination of below flags:
  15863. * VDEV_FLAGS_NON_MBSSID_AP
  15864. * VDEV_FLAGS_TRANSMIT_AP
  15865. * VDEV_FLAGS_NON_TRANSMIT_AP
  15866. * VDEV_FLAGS_EMA_MODE
  15867. * VDEV_FLAGS_SCAN_MODE_VAP - if the vdev is used for scan radio
  15868. */
  15869. A_UINT32 mbss_capability_flags;
  15870. /** vdevid of transmitting VAP (mbssid case). Ignored for non mbssid case */
  15871. A_UINT32 vdevid_trans;
  15872. A_UINT32 eht_ops;
  15873. A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20 MHz BW punctured */
  15874. A_UINT32 mbssid_multi_group_flag; /* Flag to identify whether multi group mbssid is supported */
  15875. A_UINT32 mbssid_multi_group_id; /* Group id of current vdev only valid when multi group mbssid is supported */
  15876. /* Target TSF value by which VDEV restart procedure should be completed in FW */
  15877. A_UINT32 target_tsf_us_lo; /* bits 31:0 */
  15878. A_UINT32 target_tsf_us_hi; /* bits 63:32 */
  15879. /* The TLVs follows this structure:
  15880. * wmi_channel chan; <-- WMI channel
  15881. * wmi_p2p_noa_descriptor noa_descriptors[]; <-- actual p2p NOA descriptor from scan entry
  15882. * wmi_vdev_start_mlo_params mlo_params[0,1]; <-- vdev start MLO parameters
  15883. * optional TLV, only present for MLO vdevs,
  15884. * If the vdev is non-MLO the array length should be 0.
  15885. * wmi_partner_link_info link_info[]; <-- partner link info
  15886. * optional TLV, only present for MLO vdevs,
  15887. * If the vdev is non-MLO the array length should be 0.
  15888. * wmi_channel dbw_chan; <-- WMI channel
  15889. * optional TLV for dbw_chan
  15890. * wmi_dbw_chan_info dbw_chan_info
  15891. * optional TLV used for dbw_chan_info
  15892. */
  15893. } wmi_vdev_start_request_cmd_fixed_param;
  15894. typedef struct {
  15895. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
  15896. /** unique id identifying the VDEV, generated by the caller */
  15897. A_UINT32 vdev_id;
  15898. } wmi_vdev_delete_cmd_fixed_param;
  15899. typedef struct {
  15900. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_dfs_ap_config_fixed_param */
  15901. /** unique id identifying the VDEV, generated by the caller */
  15902. A_UINT32 vdev_id;
  15903. /** "set" field:
  15904. * HOST to specify a non-zero value if DFS master AP config is to be added,
  15905. * or a zero value if it is to be removed.
  15906. */
  15907. A_UINT32 set;
  15908. /* The TLVs follows this structure:
  15909. * wmi_mac_addr bssid; <-- bssid for P2P GO's STA's connected AP,
  15910. * STA's connected AP is DFS master
  15911. * optional TLV used for bssid
  15912. * wmi_mac_addr non_tx_bssid; <-- bssid for P2P GO's STA's connected AP,
  15913. * if connected to non TX VAP
  15914. * optional TLV used for bssid
  15915. */
  15916. } wmi_p2p_go_dfs_ap_config_fixed_param;
  15917. enum WMI_VDEV_UP_FLAGS {
  15918. /** EMA_MBSSID_AP
  15919. * Valid only for STA VDEV.
  15920. * This flag will be set when STA connected MBSSID AP is EMA capable.
  15921. * EMA - Enhanced Multiple BSS Advertisemet.
  15922. */
  15923. WMI_VDEV_UP_FLAG_EMA_MBSSID_AP = 0x00000001,
  15924. };
  15925. typedef struct {
  15926. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
  15927. /** unique id identifying the VDEV, generated by the caller */
  15928. A_UINT32 vdev_id;
  15929. /** aid (assoc id) received in association response for STA VDEV */
  15930. A_UINT32 vdev_assoc_id;
  15931. /** bssid of the BSS the VDEV is joining */
  15932. wmi_mac_addr vdev_bssid;
  15933. /** bssid of transmitted AP (mbssid case) */
  15934. wmi_mac_addr trans_bssid;
  15935. /** the profile index of the connected non-trans ap (mbssid case). 0 means invalid */
  15936. A_UINT32 profile_idx;
  15937. /** the total profile numbers of non-trans aps (mbssid case). 0 means legacy AP */
  15938. A_UINT32 profile_num;
  15939. /** flags - this is a bitwise-or combination of WMI_VDEV_UP_FLAGS values */
  15940. A_UINT32 flags;
  15941. } wmi_vdev_up_cmd_fixed_param;
  15942. typedef struct {
  15943. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
  15944. /** unique id identifying the VDEV, generated by the caller */
  15945. A_UINT32 vdev_id;
  15946. /* The TLVs follows this structure:
  15947. * - wmi_vdev_stop_mlo_params mlo_params[0/1];
  15948. * optional TLV, host may provide this TLV to indicate the vdev stop
  15949. * is done for link switch.
  15950. */
  15951. } wmi_vdev_stop_cmd_fixed_param;
  15952. typedef struct {
  15953. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
  15954. /** unique id identifying the VDEV, generated by the caller */
  15955. A_UINT32 vdev_id;
  15956. } wmi_vdev_down_cmd_fixed_param;
  15957. typedef struct {
  15958. /** unique id identifying the VDEV, generated by the caller */
  15959. A_UINT32 vdev_id;
  15960. } wmi_vdev_standby_response_cmd;
  15961. typedef struct {
  15962. /** unique id identifying the VDEV, generated by the caller */
  15963. A_UINT32 vdev_id;
  15964. } wmi_vdev_resume_response_cmd;
  15965. typedef struct {
  15966. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  15967. /** unique id identifying the VDEV, generated by the caller */
  15968. A_UINT32 vdev_id;
  15969. /** parameter id */
  15970. A_UINT32 param_id;
  15971. /** parameter value */
  15972. A_UINT32 param_value;
  15973. } wmi_vdev_set_param_cmd_fixed_param;
  15974. typedef struct {
  15975. A_UINT32 key_seq_counter_l;
  15976. A_UINT32 key_seq_counter_h;
  15977. } wmi_key_seq_counter;
  15978. #define WMI_CIPHER_NONE 0x0 /* clear key */
  15979. #define WMI_CIPHER_WEP 0x1
  15980. #define WMI_CIPHER_TKIP 0x2
  15981. #define WMI_CIPHER_AES_OCB 0x3
  15982. #define WMI_CIPHER_AES_CCM 0x4
  15983. #define WMI_CIPHER_WAPI 0x5
  15984. #define WMI_CIPHER_CKIP 0x6
  15985. #define WMI_CIPHER_AES_CMAC 0x7
  15986. #define WMI_CIPHER_ANY 0x8
  15987. #define WMI_CIPHER_AES_GCM 0x9
  15988. #define WMI_CIPHER_AES_GMAC 0xa
  15989. #define WMI_CIPHER_WAPI_GCM_SM4 0xb
  15990. #define WMI_CIPHER_BIP_CMAC_128 0xc
  15991. #define WMI_CIPHER_BIP_CMAC_256 0xd
  15992. #define WMI_CIPHER_BIP_GMAC_128 0xe
  15993. #define WMI_CIPHER_BIP_GMAC_256 0xf
  15994. typedef struct {
  15995. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
  15996. /** unique id identifying the VDEV, generated by the caller */
  15997. A_UINT32 vdev_id;
  15998. /** MAC address used for installing */
  15999. wmi_mac_addr peer_macaddr;
  16000. /** key index */
  16001. A_UINT32 key_ix;
  16002. /** key flags */
  16003. A_UINT32 key_flags;
  16004. /** key cipher, defined above */
  16005. A_UINT32 key_cipher;
  16006. /** key rsc counter */
  16007. wmi_key_seq_counter key_rsc_counter;
  16008. /** global key rsc counter */
  16009. wmi_key_seq_counter key_global_rsc_counter;
  16010. /** global key tsc counter */
  16011. wmi_key_seq_counter key_tsc_counter;
  16012. /** WAPI key rsc counter */
  16013. A_UINT8 wpi_key_rsc_counter[16];
  16014. /** WAPI key tsc counter */
  16015. A_UINT8 wpi_key_tsc_counter[16];
  16016. /** key length */
  16017. A_UINT32 key_len;
  16018. /** key tx mic length */
  16019. A_UINT32 key_txmic_len;
  16020. /** key rx mic length */
  16021. A_UINT32 key_rxmic_len;
  16022. /** specifies if the group_key_ix is valid, filled by the sender */
  16023. A_UINT32 is_group_key_ix_valid;
  16024. /** Multi group key ID */
  16025. A_UINT32 group_key_ix;
  16026. /*
  16027. * Following this struct are this TLV.
  16028. * A_UINT8 key_data[]; <-- actual key data; contains key followed by tx mic followed by rx mic
  16029. */
  16030. } wmi_vdev_install_key_cmd_fixed_param;
  16031. typedef struct {
  16032. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ltf_key_seed_cmd_fixed_param */
  16033. /** unique id identifying the VDEV, generated by the caller */
  16034. A_UINT32 vdev_id;
  16035. /** MAC address used for deriving */
  16036. wmi_mac_addr peer_macaddr;
  16037. /** authentication mode */
  16038. A_UINT32 rsn_authmode;
  16039. /** LTF key seed length */
  16040. A_UINT32 key_seed_len;
  16041. /*
  16042. * Following this struct are this TLV.
  16043. * A_UINT8 key_seed[key_seed_len]; <-- actual LTF key seed;
  16044. */
  16045. } wmi_vdev_set_ltf_key_seed_cmd_fixed_param;
  16046. /** Preamble types to be used with VDEV fixed rate configuration */
  16047. typedef enum {
  16048. WMI_RATE_PREAMBLE_OFDM,
  16049. WMI_RATE_PREAMBLE_CCK,
  16050. WMI_RATE_PREAMBLE_HT,
  16051. WMI_RATE_PREAMBLE_VHT,
  16052. WMI_RATE_PREAMBLE_HE,
  16053. WMI_RATE_PREAMBLE_EHT,
  16054. } WMI_RATE_PREAMBLE;
  16055. /** Value to disable fixed rate setting */
  16056. #define WMI_FIXED_RATE_NONE (0xff)
  16057. #define WMI_GI_400_NS 1
  16058. #define WMI_GI_800_NS 0
  16059. #define WMI_GI_1600_NS 2
  16060. #define WMI_GI_3200_NS 3
  16061. /** OCE(Optimized Connectivity_Experience) Feature flags */
  16062. #define WMI_VDEV_OCE_PROBE_REQUEST_RATE_FEATURE_BITMAP 0x1
  16063. #define WMI_VDEV_OCE_PROBE_RESPONSE_RATE_FEATURE_BITMAP 0x2
  16064. #define WMI_VDEV_OCE_BEACON_RATE_FEATURE_BITMAP 0x4
  16065. #define WMI_VDEV_OCE_PROBE_REQUEST_DEFERRAL_FEATURE_BITMAP 0x8
  16066. #define WMI_VDEV_OCE_FILS_DISCOVERY_FRAME_FEATURE_BITMAP 0x10
  16067. #define WMI_VDEV_OCE_ESP_FEATURE_BITMAP 0x20
  16068. #define WMI_VDEV_OCE_REASSOC_REJECT_FEATURE_BITMAP 0x40
  16069. /** 6 GHZ params **/
  16070. /* Control to enable/disable beacon tx in non-HT duplicate */
  16071. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BEACON 0x1
  16072. /* Control to enable/disable broadcast probe response tx in non-HT duplicate */
  16073. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BCAST_PROBE_RSP 0x2
  16074. /* Control to enable/disable FILS discovery frame tx in non-HT duplicate */
  16075. #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_FD_FRAME 0x4
  16076. /* Control to enable/disable periodic FILS discovery frame transmission */
  16077. #define WMI_VDEV_6GHZ_BITMAP_FD_FRAME 0x8 /* deprecated */
  16078. /* Control to enable/disable periodic broadcast probe response transmission */
  16079. #define WMI_VDEV_6GHZ_BITMAP_BCAST_PROBE_RSP 0x10 /* deprecated */
  16080. /** ROAM_11KV control params */
  16081. /* WMI_VDEV_ROAM_11KV_CTRL_DISABLE_FW_TRIGGER_ROAMING:
  16082. * Disable all FW-triggered roaming (e.g. low RSSI/final bmiss/BTM/PER)
  16083. * while still allowing host-invoked roaming.
  16084. */
  16085. #define WMI_VDEV_ROAM_11KV_CTRL_DISABLE_FW_TRIGGER_ROAMING 0x1
  16086. /* WMI_VDEV_ROAM_11KV_CTRL_KEEP_CONN_RECV_BTM_REQ:
  16087. * DUT do not scan or roaming when receiving BTM req frame
  16088. */
  16089. #define WMI_VDEV_ROAM_11KV_CTRL_KEEP_CONN_RECV_BTM_REQ 0x2
  16090. /* WMI_VDEV_ROAM_11KV_CTRL_DONOT_SEND_DISASSOC_ON_BTM_DI_SET:
  16091. * DUT do not send disasoc frame to AP when receiving BTM req with
  16092. * Disassoc Imminent bit set to 1.
  16093. */
  16094. #define WMI_VDEV_ROAM_11KV_CTRL_DONOT_SEND_DISASSOC_ON_BTM_DI_SET 0x4
  16095. /** NAN vdev config Feature flags */
  16096. #define WMI_VDEV_NAN_ALLOW_DW_CONFIG_CHANGE_IN_SYNC_ROLE 0x1
  16097. #define WMI_VDEV_NAN_FORCE_CONGIG_WOW_DB_INTERVAL 0x2
  16098. /** the definition of different VDEV parameters */
  16099. typedef enum {
  16100. /** RTS Threshold */
  16101. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  16102. /** Fragmentation threshold */
  16103. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, /* 0x2 */
  16104. /** beacon interval in TUs */
  16105. WMI_VDEV_PARAM_BEACON_INTERVAL, /* 0x3 */
  16106. /** Listen interval in TUs */
  16107. WMI_VDEV_PARAM_LISTEN_INTERVAL, /* 0x4 */
  16108. /** multicast rate in Mbps */
  16109. WMI_VDEV_PARAM_MULTICAST_RATE, /* 0x5 */
  16110. /** management frame rate in Mbps */
  16111. WMI_VDEV_PARAM_MGMT_TX_RATE, /* 0x6 */
  16112. /** slot time (long vs short) */
  16113. WMI_VDEV_PARAM_SLOT_TIME, /* 0x7 */
  16114. /** preamble (long vs short) */
  16115. WMI_VDEV_PARAM_PREAMBLE, /* 0x8 */
  16116. /** SWBA time (time before tbtt in msec) */
  16117. WMI_VDEV_PARAM_SWBA_TIME, /* 0x9 */
  16118. /** time period for updating VDEV stats */
  16119. WMI_VDEV_STATS_UPDATE_PERIOD, /* 0xa */
  16120. /** age out time in msec for frames queued for station in power save*/
  16121. WMI_VDEV_PWRSAVE_AGEOUT_TIME, /* 0xb */
  16122. /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
  16123. WMI_VDEV_HOST_SWBA_INTERVAL, /* 0xc */
  16124. /** DTIM period (specified in units of num beacon intervals) */
  16125. WMI_VDEV_PARAM_DTIM_PERIOD, /* 0xd */
  16126. /** scheduler air time limit for this VDEV. used by off chan scheduler */
  16127. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, /* 0xe */
  16128. /** enable/disable WDS for this VDEV */
  16129. WMI_VDEV_PARAM_WDS, /* 0xf */
  16130. /** ATIM Window */
  16131. WMI_VDEV_PARAM_ATIM_WINDOW, /* 0x10 */
  16132. /** BMISS max */
  16133. WMI_VDEV_PARAM_BMISS_COUNT_MAX, /* 0x11 */
  16134. /** BMISS first time */
  16135. WMI_VDEV_PARAM_BMISS_FIRST_BCNT, /* 0x12 */
  16136. /** BMISS final time */
  16137. WMI_VDEV_PARAM_BMISS_FINAL_BCNT, /* 0x13 */
  16138. /** WMM enables/disabled */
  16139. WMI_VDEV_PARAM_FEATURE_WMM, /* 0x14 */
  16140. /** Channel width */
  16141. WMI_VDEV_PARAM_CHWIDTH, /* 0x15 */
  16142. /** Channel Offset */
  16143. WMI_VDEV_PARAM_CHEXTOFFSET, /* 0x16 */
  16144. /** Disable HT Protection */
  16145. WMI_VDEV_PARAM_DISABLE_HTPROTECTION, /* 0x17 */
  16146. /** Quick STA Kickout */
  16147. WMI_VDEV_PARAM_STA_QUICKKICKOUT, /* 0x18 */
  16148. /** Rate to be used with Management frames */
  16149. WMI_VDEV_PARAM_MGMT_RATE, /* 0x19 */
  16150. /** Protection Mode */
  16151. WMI_VDEV_PARAM_PROTECTION_MODE, /* 0x1a */
  16152. /** Fixed rate setting
  16153. * The top nibble is used to select which format to use for encoding
  16154. * the rate specification: 0xVXXXXXXX
  16155. * If V == 0b0000: format is same as before: 0x000000RR
  16156. * If V == 0b0001: format is: 0x1000RRRR.
  16157. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  16158. * The host shall use the new V1 format (and set V = 0x1) if the target
  16159. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  16160. * system is configured with Nss > 4 (either at compile time within the
  16161. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  16162. * by the target).
  16163. */
  16164. WMI_VDEV_PARAM_FIXED_RATE, /* 0x1b */
  16165. /**
  16166. * 11AX: GI =
  16167. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  16168. * 11N: SGI=WMI_GI_400_NS
  16169. */
  16170. WMI_VDEV_PARAM_SGI, /* 0x1c */
  16171. /** Enable LDPC */
  16172. WMI_VDEV_PARAM_LDPC, /* 0x1d */
  16173. /** Enable Tx STBC */
  16174. WMI_VDEV_PARAM_TX_STBC, /* 0x1e */
  16175. /** Enable Rx STBC */
  16176. WMI_VDEV_PARAM_RX_STBC, /* 0x1f */
  16177. /** Intra BSS forwarding */
  16178. WMI_VDEV_PARAM_INTRA_BSS_FWD, /* 0x20 */
  16179. /** Setting Default xmit key for Vdev */
  16180. WMI_VDEV_PARAM_DEF_KEYID, /* 0x21 */
  16181. /** NSS width */
  16182. WMI_VDEV_PARAM_NSS, /* 0x22 */
  16183. /** Set the custom rate for the broadcast data frames */
  16184. WMI_VDEV_PARAM_BCAST_DATA_RATE, /* 0x23 */
  16185. /** Set the custom rate (rate-code) for multicast data frames */
  16186. WMI_VDEV_PARAM_MCAST_DATA_RATE, /* 0x24 */
  16187. /** Tx multicast packet indicate Enable/Disable */
  16188. WMI_VDEV_PARAM_MCAST_INDICATE, /* 0x25 */
  16189. /** Tx DHCP packet indicate Enable/Disable */
  16190. WMI_VDEV_PARAM_DHCP_INDICATE, /* 0x26 */
  16191. /** Enable host inspection of Tx unicast packet to unknown destination */
  16192. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, /* 0x27 */
  16193. /* The minimum amount of time AP begins to consider STA inactive */
  16194. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, /* 0x28 */
  16195. /* An associated STA is considered inactive when there is no recent TX/RX
  16196. * activity and no downlink frames are buffered for it. Once a STA exceeds
  16197. * the maximum idle inactive time, the AP will send an 802.11 data-null as
  16198. * a keep alive to verify the STA is still associated. If the STA does ACK
  16199. * the data-null, or if the data-null is buffered and the STA does not
  16200. * retrieve it, the STA will be considered unresponsive (see
  16201. * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
  16202. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, /* 0x29 */
  16203. /* An associated STA is considered unresponsive if there is no recent
  16204. * TX/RX activity and downlink frames are buffered for it. Once a STA
  16205. * exceeds the maximum unresponsive time, the AP will send a
  16206. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  16207. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, /* 0x2a */
  16208. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  16209. WMI_VDEV_PARAM_AP_ENABLE_NAWDS, /* 0x2b */
  16210. /** Enable/Disable RTS-CTS */
  16211. WMI_VDEV_PARAM_ENABLE_RTSCTS, /* 0x2c */
  16212. /* Enable TXBFee/er */
  16213. WMI_VDEV_PARAM_TXBF, /* 0x2d */
  16214. /**Set packet power save */
  16215. WMI_VDEV_PARAM_PACKET_POWERSAVE, /* 0x2e */
  16216. /**Drops un-encrypted packets if any received in an encryted connection
  16217. * otherwise forwards to host
  16218. */
  16219. WMI_VDEV_PARAM_DROP_UNENCRY, /* 0x2f */
  16220. /*
  16221. * Set TX encap type.
  16222. *
  16223. * enum wmi_pkt_type is to be used as the parameter
  16224. * specifying the encap type.
  16225. */
  16226. WMI_VDEV_PARAM_TX_ENCAP_TYPE, /* 0x30 */
  16227. /*
  16228. * Try to detect stations that woke-up and exited power save but did not
  16229. * successfully transmit data-null with PM=0 to AP. When this happens,
  16230. * STA and AP power save state are out-of-sync. Use buffered but
  16231. * undelivered MSDU to the STA as a hint that the STA is really awake
  16232. * and expecting normal ASAP delivery, rather than retrieving BU with
  16233. * PS-Poll, U-APSD trigger, etc.
  16234. *
  16235. * 0 disables out-of-sync detection. Maximum time is 255 seconds.
  16236. */
  16237. WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, /* 0x31 */
  16238. /* Enable/Disable early rx dynamic adjust feature.
  16239. * Early-rx dynamic adjust is a advance power save feature.
  16240. * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
  16241. * timing discrepancies in the system.
  16242. * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
  16243. * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
  16244. * properly to minimum the power consume.*/
  16245. WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, /* 0x32 */
  16246. /* set target bmiss number per sample cycle if bmiss adjust was chosen.
  16247. * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
  16248. * which can be set by user through WMI command.
  16249. */
  16250. WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, /* 0x33 */
  16251. /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
  16252. WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, /* 0x34 */
  16253. /* set slop_step */
  16254. WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP, /* 0x35 */
  16255. /* set init slop */
  16256. WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP, /* 0x36 */
  16257. /* pause adjust enable/disable */
  16258. WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, /* 0x37 */
  16259. /* Set channel pwr limit value of the vdev the minimal value of all
  16260. * vdevs operating on this channel will be set as channel tx power
  16261. * limit, which is used to configure ratearray
  16262. */
  16263. WMI_VDEV_PARAM_TX_PWRLIMIT, /* 0x38 */
  16264. /* set the count of snr value for calculation in snr monitor */
  16265. WMI_VDEV_PARAM_SNR_NUM_FOR_CAL, /* 0x39 */
  16266. /** Roaming offload */
  16267. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, /* 0x3a */
  16268. /** Enable Leader request RX functionality for RMC */
  16269. WMI_VDEV_PARAM_ENABLE_RMC, /* 0x3b */
  16270. /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
  16271. * by himself. If the beacon lost time exceed this threshold, the peer is
  16272. * thought to be gone. */
  16273. WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS, /* 0x3c */
  16274. /** max rate in kpbs, transmit rate can't go beyond it */
  16275. WMI_VDEV_PARAM_MAX_RATE, /* 0x3d */
  16276. /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift*/
  16277. WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE, /* 0x3e */
  16278. /* set Tx failure count threshold for the vdev */
  16279. WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR, /* 0x3f */
  16280. /* set ebt resync timeout value, in the unit of TU */
  16281. WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT, /* 0x40 */
  16282. /* Enable Aggregation State Trigger Event */
  16283. WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE, /* 0x41 */
  16284. /* This parameter indicates whether IBSS station can enter into power save
  16285. * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
  16286. * awake all the time and should never set PM=1 in its transmitted frames.
  16287. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
  16288. * is non-zero. */
  16289. WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED, /* 0x42 */
  16290. /* This parameter indicates if this station can enter into power collapse
  16291. * for the remaining beacon interval after the ATIM window.
  16292. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
  16293. * is set to TRUE. */
  16294. WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED, /* 0x43 */
  16295. /* This parameter indicates whether IBSS station exit power save mode and
  16296. * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
  16297. * whenever there is a TX/RX activity. */
  16298. WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED, /* 0x44 */
  16299. /* If Awake on TX/RX activity is enabled, this parameter indicates
  16300. * the data inactivity time in number of beacon intervals after which
  16301. * IBSS station reenters power save by sending Null frame with PM=1. */
  16302. WMI_VDEV_PARAM_INACTIVITY_CNT, /* 0x45 */
  16303. /* Inactivity time in msec after which TX Service Period (SP) is
  16304. * terminated by sending a Qos Null frame with EOSP.
  16305. * If value is 0, TX SP is terminated with the last buffered packet itself
  16306. * instead of waiting for the inactivity timeout. */
  16307. WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS, /* 0x46 */
  16308. /** DTIM policy */
  16309. WMI_VDEV_PARAM_DTIM_POLICY, /* 0x47 */
  16310. /* When IBSS network is initialized, PS-supporting device
  16311. * does not enter protocol sleep state during first
  16312. * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
  16313. WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS, /* 0x48 */
  16314. /* Enable/Disable 1 RX chain usage during the ATIM window */
  16315. WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE, /* 0x49 */
  16316. /* RX Leak window is the time driver waits before shutting down
  16317. * the radio or switching the channel and after receiving an ACK
  16318. * for a data frame with PM bit set) */
  16319. WMI_VDEV_PARAM_RX_LEAK_WINDOW, /* 0x4a */
  16320. /** Averaging factor(16 bit value) is used in the calculations to
  16321. * perform averaging of different link level statistics like average
  16322. * beacon spread or average number of frames leaked */
  16323. WMI_VDEV_PARAM_STATS_AVG_FACTOR, /* 0x4b */
  16324. /** disconnect threshold, once the consecutive error for specific peer
  16325. * exceed this threshold, FW will send kickout event to host */
  16326. WMI_VDEV_PARAM_DISCONNECT_TH, /* 0x4c */
  16327. /** The rate_code of RTS_CTS changed by host. Now FW can support
  16328. * more non-HT rates rather than 1Mbps or 6Mbps */
  16329. WMI_VDEV_PARAM_RTSCTS_RATE, /* 0x4d */
  16330. /** This parameter indicates whether using a long duration RTS-CTS
  16331. * protection when a SAP goes off channel in MCC mode */
  16332. WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE, /* 0x4e */
  16333. /** This parameter indicates whether using a broadcast probe response
  16334. * to increase the detectability of SAP in MCC mode */
  16335. WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE, /* 0x4f */
  16336. /** This parameter indicates the power backoff in percentage
  16337. * currently supports 100%, 50%, 25%, 12.5%, and minimum
  16338. * Host passes 0, 1, 2, 3, 4 to Firmware
  16339. * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
  16340. * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
  16341. */
  16342. WMI_VDEV_PARAM_TXPOWER_SCALE, /* 0x50 */
  16343. /** TX power backoff in dB: tx power -= param value
  16344. * Host passes values(DB) to Halphy, Halphy reduces the power table
  16345. * by the values. Safety check will happen in Halphy.
  16346. */
  16347. WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB, /* 0x51 */
  16348. /** Multicast to Unicast conversion setting */
  16349. WMI_VDEV_PARAM_MCAST2UCAST_SET, /* 0x52 */
  16350. /** Total number of HW retries */
  16351. WMI_VDEV_PARAM_RC_NUM_RETRIES, /* 0x53 */
  16352. /** Max tx percentage for cabq */
  16353. WMI_VDEV_PARAM_CABQ_MAXDUR, /* 0x54 */
  16354. /** MFPTEST settings */
  16355. WMI_VDEV_PARAM_MFPTEST_SET, /* 0x55 */
  16356. /** RTS Fixed rate setting */
  16357. WMI_VDEV_PARAM_RTS_FIXED_RATE, /* 0x56 */
  16358. /** VHT SGI MASK */
  16359. WMI_VDEV_PARAM_VHT_SGIMASK, /* 0x57 */
  16360. /** VHT80 Auto Rate MASK */
  16361. WMI_VDEV_PARAM_VHT80_RATEMASK, /* 0x58 */
  16362. /** set Proxy STA features for this vap */
  16363. WMI_VDEV_PARAM_PROXY_STA, /* 0x59 */
  16364. /** set virtual cell mode - enable/disable */
  16365. WMI_VDEV_PARAM_VIRTUAL_CELL_MODE, /* 0x5a */
  16366. /** Set receive packet type */
  16367. WMI_VDEV_PARAM_RX_DECAP_TYPE, /* 0x5b */
  16368. /** Set ratemask with specific Bandwidth and NSS */
  16369. WMI_VDEV_PARAM_BW_NSS_RATEMASK, /* 0x5c */
  16370. /** Set SENSOR Support */
  16371. WMI_VDEV_PARAM_SENSOR_AP, /* 0x5d */
  16372. /** Set beacon rate */
  16373. WMI_VDEV_PARAM_BEACON_RATE, /* 0x5e */
  16374. /** Enable CTS to self for DTIM beacon */
  16375. WMI_VDEV_PARAM_DTIM_ENABLE_CTS, /* 0x5f */
  16376. /** Disable station kickout at Vap level */
  16377. WMI_VDEV_PARAM_STA_KICKOUT, /* 0x60 */
  16378. /* VDEV capabilities */
  16379. WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */ /* 0x61 */
  16380. /**
  16381. * Increment TSF in micro seconds to avoid beacon collision on mesh VAP.
  16382. * The host must ensure that either no other vdevs share the TSF with
  16383. * this vdev, or else that it is acceptable to apply this TSF adjustment
  16384. * to all vdevs sharing the TSF.
  16385. */
  16386. WMI_VDEV_PARAM_TSF_INCREMENT, /* 0x62 */
  16387. /** Disable/Enable AMPDU of vdev per AC:
  16388. * bit | AC
  16389. * --------
  16390. * 0 | VO
  16391. * 1 | VI
  16392. * 2 | BE
  16393. * 3 | BK
  16394. * A value of 0 in a given bit disables A-MPDU aggregation for
  16395. * that AC; a value of 1 enables A-MPDU aggregation
  16396. */
  16397. WMI_VDEV_PARAM_AMPDU_PER_AC, /* 0x63 */
  16398. /**
  16399. * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
  16400. * Used mainly for mesh-vap.
  16401. * The parameter value delivered with the RX_FILTER vdev param contains
  16402. * a bit-or mask of wmi_vdev_param_filter enum values.
  16403. */
  16404. WMI_VDEV_PARAM_RX_FILTER, /* 0x64 */
  16405. /** vdev-specific mgmt tx power in dBm units (signed integer value) */
  16406. WMI_VDEV_PARAM_MGMT_TX_POWER, /* 0x65 */
  16407. /** Vdev level non aggregration/11g sw retry threshold. 0-disable, min:0, max:31, default:15 */
  16408. WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0x66 */
  16409. /** Vdev level aggregration sw retry threshold. 0-disable, min:0, max:31, default:15 */
  16410. WMI_VDEV_PARAM_AGG_SW_RETRY_TH, /* 0x67 */
  16411. /** disable dynamic bw RTS **/
  16412. WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS, /* 0x68 */
  16413. /** per ssid (vdev) based ATF strict/fair scheduling policy
  16414. * param values are WMI_ATF_SSID_FAIR_SCHED, WMI_ATF_SSID_STRICT_SCHED,
  16415. * or WMI_ATF_SSID_FAIR_SCHED_WITH_UB
  16416. */
  16417. WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY, /* 0x69 */
  16418. /** Enable or disable Dual carrier modulation
  16419. * valid values: 0-Disable DCM, 1-Enable DCM.
  16420. */
  16421. WMI_VDEV_PARAM_HE_DCM, /* 0x6a */
  16422. /** Enable or disable Extended range
  16423. * valid values: 0-Disable ER, 1-Enable ER.
  16424. */
  16425. WMI_VDEV_PARAM_HE_RANGE_EXT, /* 0x6b */
  16426. /* enable or disable BCAST probe response feature */
  16427. WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE, /* 0x6c */
  16428. /* param to specify probe request Tx delay during Fast Initial Link Setup */
  16429. WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME, /* units = milliseconds */ /* 0x6d */
  16430. /* enable or disable NOA for P2P GO */
  16431. WMI_VDEV_PARAM_DISABLE_NOA_P2P_GO, /* 0x6e */
  16432. /** Per band user management frame fix rate setting
  16433. * BIT 31: enable (1) or disable (0) mgmt fix rate for 5G
  16434. * BIT 30: enable (1) or disable (0) mgmt fix rate for 2G
  16435. *
  16436. * BIT 23: 11ax (1) or legacy (0) rate code
  16437. * BITS [22..12]: rate code for 5G
  16438. *
  16439. * BIT 11: 11ax (1) or legacy (0) rate code
  16440. * BITS [10..0]: rate code for 2G
  16441. */
  16442. WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE, /* 0x6f */
  16443. /* This should be called before WMI_VDEV_PARAM_TXBF */
  16444. WMI_VDEV_PARAM_11AX_TXBF, /* 0x70 */
  16445. /** This parameter indicates whether VDEV is SMPS intolerant.
  16446. * I.e. - SMPS action frame cannot be transmitted by the VDEV to
  16447. * dynamically change the RX NSS.
  16448. *
  16449. * valid values: 1 - VDEV is SMPS intolerant, 0 - VDEV is SMPS tolerant
  16450. */
  16451. WMI_VDEV_PARAM_SMPS_INTOLERANT, /* 0x71 */
  16452. /** specify probe request Tx delay for scans triggered on this VDEV */
  16453. WMI_VDEV_PARAM_PROBE_DELAY, /* units = milliseconds */ /* 0x72 */
  16454. /** specify the time gap between each set of probe request transmissions.
  16455. * The number of probe requests in each set depends on the ssid_list and
  16456. * bssid_list in the scan request.
  16457. * This parameter will be applied only for scans triggered on this VDEV.
  16458. */
  16459. WMI_VDEV_PARAM_REPEAT_PROBE_TIME, /* units = milliseconds */ /* 0x73 */
  16460. /** specify the HE LTF setting that should be used for fixed rate
  16461. * transmissions.
  16462. *
  16463. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  16464. * or WMI_HE_LTF_4X.
  16465. */
  16466. WMI_VDEV_PARAM_HE_LTF, /* 0x74 */
  16467. /** VDEV parameter to configure the number of TX chains to use for
  16468. * a/b/g rates.
  16469. * bit 0~15 : 11b mode TX chain number.
  16470. * bit 16~31 : 11ag mode TX chain number.
  16471. *
  16472. * valid values:
  16473. * Should not exceed the maximum number of supported TX Chains
  16474. * 0 - Used to reset the vote. Acts as Don't Care
  16475. */
  16476. WMI_VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x75 */
  16477. /**
  16478. * Enable or disable the multi group key feature on this VDEV.
  16479. * used for NAN APP and VLAN Tagging
  16480. */
  16481. WMI_VDEV_PARAM_ENABLE_MULTI_GROUP_KEY, /* 0x76 */
  16482. /*
  16483. * Specify the total number of multi group key on this VDEV.
  16484. */
  16485. WMI_VDEV_PARAM_NUM_GROUP_KEYS, /* 0x77 */
  16486. /** VDEV parameter to enable or disable various OCE features */
  16487. WMI_VDEV_PARAM_ENABLE_DISABLE_OCE_FEATURES, /* 0x78 */
  16488. /*
  16489. * Set/Clear 3 least-significant bits to
  16490. * Disable or Enable rate drop down for MGMT, SU data and MU data pkts
  16491. *
  16492. * bit 0 -> If set MGMT Pkt rate drop down is enabled else disabled
  16493. * bit 1 -> If set SU data Pkt rate drop down is enabled else disabled
  16494. * bit 2 -> If set MU data Pkt rate drop down is enabled else disabled
  16495. * bits 31:3 -> Reserved bits. should be set to zero.
  16496. */
  16497. WMI_VDEV_PARAM_RATE_DROPDOWN_BMAP, /* 0x79 */
  16498. /** VDEV parameter to config modulated DTIM count */
  16499. WMI_VDEV_PARAM_MODDTIM_CNT, /* 0x7a */
  16500. /**
  16501. * VDEV parameter to config max listen interval,
  16502. * when modulated DTIM is enabled.
  16503. * Units are 100TU.
  16504. */
  16505. WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM, /* 0x7b */
  16506. /** VDEV parameter to config dynamic DTIM count */
  16507. WMI_VDEV_PARAM_DYNDTIM_CNT, /* 0x7c */
  16508. /** VDEV parameter to enable or disable RTT responder role
  16509. * A value of 0 in a given bit disables corresponding mode.
  16510. * bit | Responder mode support
  16511. * -----------------------------------------
  16512. * 0 | responder mode for 11MC ranging
  16513. * 1 | responder mode for 11AZ NTB ranging
  16514. * 2 | responder mode for 11AZ TB ranging
  16515. */
  16516. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE, /* 0x7d */
  16517. /** Parameter to configure BA mode.
  16518. * Valid values: 0- Auto mode,
  16519. * 1- Manual mode(addba req not sent).
  16520. * 2- buffer size 64
  16521. * 3- buffer size 256
  16522. * 4- buffer size 128 // placeholder, not valid
  16523. * 5- buffer size 512
  16524. * 6- buffer size 1024
  16525. */
  16526. WMI_VDEV_PARAM_BA_MODE, /* 0x7e */
  16527. /**
  16528. * VDEV parameter to force to set modulate DTIM count as listen interval,
  16529. * no matter whether WoW is enabled
  16530. * Default: Disabled.
  16531. * Valid values: 0- Disabled,
  16532. * 1- Enabled.
  16533. */
  16534. WMI_VDEV_PARAM_FORCED_MODDTIM_ENABLE, /* 0x7f */
  16535. /** specify the setting that are valid for auto rate transmissions.
  16536. * bits 7:0 (LTF): When bitmask is set, then corresponding LTF value is
  16537. * used for auto rate.
  16538. * BIT0 = 1 (WMI_HE_LTF_1X or WMI_EHT_LTF_1X depending on
  16539. * current rate’s preamble type HE or EHT)
  16540. * BIT1 = 1 (WMI_HE_LTF_2X or WMI_EHT_LTF_2X)
  16541. * BIT2 = 1 (WMI_HE_LTF_4X or WMI_EHT_LTF_4X)
  16542. * BIT3-7 = Reserved bits.
  16543. * bits 15:8 (SGI): When bitmask is set, then corresponding SGI value is
  16544. * used for auto rate.
  16545. * BIT8 = 1 (400 NS)
  16546. * BIT9 = 1 (800 NS)
  16547. * BIT10 = 1 (1600 NS)
  16548. * BIT11 = 1 (3200 NS)
  16549. * BIT12-15 = Reserved bits.
  16550. * bits 31:16: Reserved bits. should be set to zero.
  16551. */
  16552. WMI_VDEV_PARAM_AUTORATE_MISC_CFG, /* 0x80 */
  16553. /** VDEV parameter to enable or disable RTT initiator mac address
  16554. * randomization.
  16555. * Default: Disabled.
  16556. * valid values: 0-Disable random mac 1-Enable random mac
  16557. */
  16558. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC, /* 0x81 */
  16559. /**
  16560. * For each AC, configure how many tx retries to send without RTS
  16561. * before enabling RTS
  16562. * bits 0:7 :BE
  16563. * bits 8:15 :BK
  16564. * bits 16:23 :VI
  16565. * bits 24:31 :VO
  16566. * A value of 0 in specific AC means default configuration for that AC.
  16567. */
  16568. WMI_VDEV_PARAM_TX_RETRIES_BEFORE_RTS_PER_AC, /* 0x82 */
  16569. /**
  16570. * Parameter to enable/disable AMSDU aggregation size auto-selection logic.
  16571. * We have logic where AMSDU aggregation size is dynamically decided
  16572. * based on MCS. That logic is enabled by default.
  16573. * For certain tests, we need a method to disable this optimization,
  16574. * and base AMSDU size only on the peer's capability rather than our logic.
  16575. * A value of 0 means disable internal optimization,
  16576. * 1 means enable internal optimzation.
  16577. */
  16578. WMI_VDEV_PARAM_AMSDU_AGGREGATION_SIZE_OPTIMIZATION, /* 0x83 */
  16579. /**
  16580. * In RAW mode, FW will not know whether the encryption is enabled
  16581. * on this vdev or not.
  16582. * Because of this, FW will not program the right info into the
  16583. * RawNwifi TLV resulting in the connection failure in RAW mode.
  16584. * So to program the right info, FW should know whether the security
  16585. * is enabled on this VDEV.
  16586. * Host will send this VDEV param command (With Value = 1) in case of
  16587. * RAW secure mode.
  16588. */
  16589. WMI_VDEV_PARAM_RAW_IS_ENCRYPTED, /* 0x84 */
  16590. /**
  16591. * Dynamically enable/disable green tx (GTX) on supported rates.
  16592. * Host will set this param to 1 for enabling GTX & 0 for disabling it.
  16593. * Note: If GTX was already running (since the global GTX control
  16594. * resides with default BDF setting) & host wants to disable GTX,
  16595. * the VDEV does not exercise any more TPC changes on the GTX supported
  16596. * rates & goes to a default GTX SM where all PPDU's sent on default TPC.
  16597. * Whenever, host wants to re-enable GTX, the enable command resumes the
  16598. * GTX functionality & TPC convergence to lower power levels can be
  16599. * attained as long as PER on GTX supported rates is within the pre-defined
  16600. * PER margin configured through the BDF.
  16601. */
  16602. WMI_VDEV_PARAM_GTX_ENABLE, /* 0x85 */
  16603. /*
  16604. * Enable/Disable multicast buffer.
  16605. * A FLAG to enable & disable buffering of multicast frames at AP
  16606. * when stations are in Power Save mode.
  16607. * Once AP disables buffering of multicast frame,
  16608. * clients which goes into Power save mode will not receive these frames.
  16609. * by default MCAST buffering will be enabled.
  16610. * (CABQ = Content After Beacon Queue = multicast queue)
  16611. * Host will send this VDEV param command,
  16612. * With Value = 1 means fw will disable the MCAST buffering
  16613. * With Value = 0 means fw will enable the MCAST buffering.
  16614. */
  16615. WMI_VDEV_PARAM_DISABLE_CABQ, /* 0x86 */
  16616. /**
  16617. * For SU and MU sounding
  16618. * switch between su ac/ax sounding and mu ac/ax sounding
  16619. * switch between triggered/ non-triggered on ax sounding enabled.
  16620. * each bit toggles the corresponding modes by enabling/disabling
  16621. *
  16622. * Bit 1 doesn't carry any operation for now and may change later,
  16623. * so reserved.
  16624. *
  16625. *-----------------------
  16626. * bit(0) | mode
  16627. *-----------------------
  16628. * 0 | AC
  16629. * 1 | AX
  16630. *-----------------------
  16631. *
  16632. * bit(1) | Reserved
  16633. *
  16634. *-----------------------
  16635. * bit(2) | mode
  16636. *-----------------------
  16637. * 0 | SU
  16638. * 1 | MU
  16639. *-----------------------
  16640. * bit(3) | mode
  16641. *-----------------------
  16642. * 0 | non -triggered
  16643. * 1 | triggered
  16644. */
  16645. WMI_VDEV_PARAM_SET_HE_SOUNDING_MODE, /* 0x87 */
  16646. /** Fixed rate setting used in UL Trigger
  16647. * The top nibble is used to select which format to use for encoding
  16648. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  16649. * format.
  16650. * If V == 0b0001: format is: 0x1000RRRR.
  16651. * ("RRRR" ratecode already has those preamble bits,
  16652. * which can specify HE or EHT)
  16653. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  16654. *
  16655. * This parameter controls the UL OFDMA and UL MU-MIMO vdev fixed rate.
  16656. */
  16657. WMI_VDEV_PARAM_UL_FIXED_RATE, /* 0x88 */
  16658. /**
  16659. * Uplink MU-MIMO & OFDMA GI configuration used in UL Trigger
  16660. * 11AX: GI =
  16661. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  16662. * 11N: SGI=WMI_GI_400_NS
  16663. */
  16664. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16665. * If V == 0b0000: format is HE.
  16666. * If V == 0b0001: format is EHT.
  16667. */
  16668. WMI_VDEV_PARAM_UL_GI, /* 0x89 */
  16669. /** Enable/Disable LDPC in UL Trigger */
  16670. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16671. * If V == 0b0000: format is HE.
  16672. * If V == 0b0001: format is EHT.
  16673. */
  16674. WMI_VDEV_PARAM_UL_LDPC, /* 0x8A */
  16675. /** Max NSS allowed in UL Trigger */
  16676. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16677. * If V == 0b0000: format is HE.
  16678. * If V == 0b0001: format is EHT.
  16679. */
  16680. WMI_VDEV_PARAM_UL_NSS, /* 0x8B */
  16681. /** Enable/Disable STBC in UL Trigger */
  16682. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16683. * If V == 0b0000: format is HE.
  16684. * If V == 0b0001: format is EHT.
  16685. */
  16686. WMI_VDEV_PARAM_UL_STBC, /* 0x8C */
  16687. /** specify the HE LTF setting that should be used for fixed rate
  16688. * uplink transmissions.
  16689. *
  16690. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  16691. * or WMI_HE_LTF_4X.
  16692. */
  16693. WMI_VDEV_PARAM_UL_HE_LTF, /* 0x8D */
  16694. /** Uplink OFDMA PPDU bandwidth */
  16695. /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
  16696. * If V == 0b0000: format is HE.
  16697. * (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz)
  16698. * If V == 0b0001: format is EHT.
  16699. * (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz, 4: 320MHz)
  16700. */
  16701. WMI_VDEV_PARAM_UL_PPDU_BW, /* 0x8E */
  16702. /** Enable/Disable FW handling MU EDCA change from AP (1: En, 0:Dis) */
  16703. WMI_VDEV_PARAM_MU_EDCA_FW_UPDATE_EN, /* 0x8F */
  16704. /** Update dot11ObssNbruToleranceTime in fw. Param value: seconds */
  16705. WMI_VDEV_PARAM_UPDATE_OBSS_RU_TOLERANCE_TIME, /* 0x90 */
  16706. /** Parameter used when MTU size is sent by the host
  16707. * In particular, this configuration message is used for cases where the
  16708. * encapsulation header results in a larger max frame size than the
  16709. * typical 802.3 + SNAP/LLC frame.
  16710. */
  16711. WMI_VDEV_PARAM_MAX_MTU_SIZE, /* 0x91 */
  16712. /** Send every nth beacon to host
  16713. * if value of n is 0, it means this Nth beacon upload is disabled
  16714. */
  16715. WMI_VDEV_PARAM_NTH_BEACON_TO_HOST, /* 0x92 */
  16716. /**
  16717. * To capture the MGMT OR DATA OR BOTH packets.
  16718. * Refer to enum WMI_PKT_CAPTURE_MODE_CONFIG for specifications of
  16719. * which parameter value enables which kind of packet captures.
  16720. */
  16721. WMI_VDEV_PARAM_PACKET_CAPTURE_MODE, /* 0x93 */
  16722. /**
  16723. * To configure duration of how many seconds without tx unicast traffic is
  16724. * considered stale for mcast rate adaptation
  16725. */
  16726. WMI_VDEV_PARAM_MCAST_RC_STALE_PERIOD, /* 0x94 */
  16727. /*
  16728. * Bits 3:0 - AST0_FLOW_MASK(4)
  16729. * Bits 7:4 - AST1_FLOW_MASK(4)
  16730. * Bits 11:8 - AST2_FLOW_MASK(4)
  16731. * Bits 15:12 - AST3_FLOW_MASK(4)
  16732. * Bits 23:16 - TID_VALID_HI_PRI(8)
  16733. * Bits 31:24 - TID_VALID_LOW_PRI(8)
  16734. *
  16735. * The below macros can be used to set/get the relevant fields.
  16736. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x)
  16737. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET(msdu_flow_config1, ast_x, mask)
  16738. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1)
  16739. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask)
  16740. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1)
  16741. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask)
  16742. */
  16743. WMI_VDEV_PARAM_MSDU_FLOW_OVERRIDE_CONFIG, /* 0x95 */
  16744. /* Enable/Disable using NULL frame for leaky AP */
  16745. WMI_VDEV_PARAM_ENABLE_NULL_FOR_LEAKY_AP, /* 0x96 */
  16746. /**
  16747. * To configure duration of how many seconds without TX/RX data traffic,
  16748. * NDI vdev can kickout the connected peer (i.e. NDP Termination).
  16749. */
  16750. WMI_VDEV_PARAM_NDP_INACTIVITY_TIMEOUT, /* 0x97 */
  16751. /* To enable/disable multicast rate adaptation feature at vdev level */
  16752. WMI_VDEV_PARAM_ENABLE_MCAST_RC, /* 0x98 */
  16753. /*
  16754. * Params related to 6 GHz operation
  16755. * The parameter value is formed from WMI_VDEV_6GHZ_BITMAP flags.
  16756. */
  16757. WMI_VDEV_PARAM_6GHZ_PARAMS, /* 0x99 */
  16758. /**
  16759. * VDEV parameter to enable or disable RTT initiator role
  16760. * Default : Enabled
  16761. * valid values: 0-Disable initiator role, 1-Enable initiator role.
  16762. */
  16763. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_ROLE, /* 0x9A */
  16764. /**
  16765. * To configure duration of how many seconds to wait to kickout peer
  16766. * if peer is not reachable
  16767. */
  16768. WMI_VDEV_PARAM_NDP_KEEPALIVE_TIMEOUT, /* 0x9B*/
  16769. /**
  16770. * To support discovery of NAN cluster with Master Preference (MP) as 0
  16771. * when a new device is enabling NAN
  16772. */
  16773. WMI_VDEV_PARAM_ALLOW_NAN_INITIAL_DISCOVERY_OF_MP0_CLUSTER, /* 0x9C */
  16774. /**
  16775. * VDEV parameter to enable or disable roaming reason VSIE in
  16776. * re-association request
  16777. *
  16778. * Default : Disabled
  16779. * valid values: 0 - Disable 1 - Enable
  16780. */
  16781. WMI_VDEV_PARAM_ENABLE_DISABLE_ROAM_REASON_VSIE, /* 0x9D */
  16782. /* Parameter used to configure OBSS Packet Detect threshold
  16783. * for Non-SRG / SRG based Spatial Reuse feature.
  16784. * (SRG = Spatial Reuse Group)
  16785. * The accepted values are in between 0x00 and 0xFF, inclusive.
  16786. * The parameter value is programmed into the appropriate spatial reuse
  16787. * register, to specify how low the background signal strength from
  16788. * neighboring BSS cells must be, for this AP to employ spatial reuse.
  16789. *
  16790. * The value of the parameter is compared against the OBSS RSSI in dB.
  16791. * It is a 8-bit value whose
  16792. * range is -128 to 127 (after two's complement operation).
  16793. * For example, if the parameter value is 0xF5, the target will
  16794. * allow spatial reuse if the RSSI detected from other BSS
  16795. * is below -10 dB.
  16796. * Similarly, if the parameter value is 0x0A, the target will
  16797. * allow spatial reuse only if the RSSI detected from neighboring
  16798. * BSS cells is no more than 10 dB.
  16799. *
  16800. * If Bit 29 is set, then input value will be in dBm. This is used
  16801. * for chipsets that use dBm for comparison across MAC/Phy blocks.
  16802. * Older chipsets support input in dB units. For newer chipsets, dBm
  16803. * units will be used.
  16804. * The host will use the WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT
  16805. * service ready bit to differentiate between providing input as dB or dBm.
  16806. *
  16807. * bit | purpose
  16808. * -----------------
  16809. * 0 - 7 | Param Value for non-SRG based Spatial Reuse
  16810. * 8 - 15| Param value for SRG based Spatial Reuse
  16811. * 16 - 28| Reserved
  16812. * 29 | Param value is in dBm units rather than dB units
  16813. * 30 | Enable/Disable SRG based spatial reuse.
  16814. * | If set to 0, ignore bits 8-15.
  16815. * 31 | Enable/Disable Non-SRG based spatial reuse.
  16816. * | If set to 0, ignore bits 0-7.
  16817. *
  16818. * The WMI_VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD setting will only
  16819. * take effect if the WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD
  16820. * setting is also set for the pdev that the vdev belongs to.
  16821. */
  16822. WMI_VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD, /* 0x9E */
  16823. /* Parameter used to configure OBSS Packet Detection per Access Category
  16824. * for SRP based and OBSS_PD based spatial reuse feature.
  16825. * (SRP = Spatial Reuse Parameter)
  16826. * Based on the bits set, the corresponding Access Category Queues will have
  16827. * spatial reuse enabled / disabled.
  16828. * bit | AC
  16829. * ------------
  16830. * 0 | BK for SRG/Non-SRG
  16831. * 1 | BE for SRG/Non-SRG
  16832. * 2 | VI for SRG/Non-SRG
  16833. * 3 | VO for SRG/Non-SRG
  16834. * 4 - 15 | Reserved
  16835. * 16 | BK for SRP
  16836. * 17 | BE for SRP
  16837. * 18 | VI for SRP
  16838. * 19 | VO for SRP
  16839. * 20 - 31 | Reserved
  16840. *
  16841. * The WMI_VDEV_PARAM_SET_CMD_OBSS_PD_PER_AC setting will only take effect
  16842. * if the WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC setting is also set for
  16843. * the pdev that the vdev belongs to.
  16844. */
  16845. WMI_VDEV_PARAM_SET_CMD_OBSS_PD_PER_AC, /* 0x9F */
  16846. /**
  16847. * VDEV parameter to indicate RSN (Robust Security Network) capability.
  16848. * This value will be intersection of the local vdev's (STA's)
  16849. * RSN capability and the peer's (AP's) RSN capability.
  16850. */
  16851. WMI_VDEV_PARAM_RSN_CAPABILITY, /* 0xA0 */
  16852. /* Parameter used to enable/disable SRP feature */
  16853. WMI_VDEV_PARAM_ENABLE_SRP, /* 0xA1 */
  16854. /*
  16855. * Parameter used to control roaming/11kv (BTM) / etc. behavior
  16856. * bit | purpose
  16857. * -----------------
  16858. * 0 | Disable any FW side roaming except host invoke roaming
  16859. * 1 | Do not trans away on receiving BTM req
  16860. * 2 | Do not send disassoc to AP when receiving BTM req with
  16861. * | Disassoc Imminent bit set to 1
  16862. * 3 - 31 | Reserved
  16863. */
  16864. WMI_VDEV_PARAM_ROAM_11KV_CTRL, /* 0xA2 */
  16865. /* vdev param to enable or disable various NAN config features
  16866. * param value bitmap set to 1 for enable and 0 for disable respectively
  16867. */
  16868. WMI_VDEV_PARAM_ENABLE_DISABLE_NAN_CONFIG_FEATURES, /* 0xA3 */
  16869. /* vdev param to enable the SAP HW offload
  16870. * Bit : 0 - enable/disable SHO
  16871. * Bit : 1 - enable for Sta connected state as well.
  16872. * Bit : 2-31 - reserved
  16873. */
  16874. WMI_VDEV_PARAM_SHO_CONFIG, /* 0xA4 */
  16875. /** Enable or disable Non-data HE Extended range
  16876. * valid values: 0-Disable ER, 1-Enable ER.
  16877. */
  16878. WMI_VDEV_PARAM_NON_DATA_HE_RANGE_EXT, /* 0xA5 */
  16879. /** Prohibit data & mgmt except keepalive pkt */
  16880. WMI_VDEV_PARAM_PROHIBIT_DATA_MGMT, /* 0xA6 */
  16881. /** Enable or disable Txop requirement feature
  16882. * 0 - Disable feature
  16883. * 1 - Enable feature
  16884. */
  16885. WMI_VDEV_PARAM_WMM_TXOP_ENABLE, /* 0xA7 */
  16886. /** Value of DTIM to be applied in Suspend mode
  16887. */
  16888. WMI_VDEV_PARAM_FORCE_DTIM_CNT, /* 0xA8 */
  16889. /* vdev param to configure the Smart Monitor features
  16890. * Bit : 0 - enable/disable Trigger frames
  16891. * Bit : 1 - enable/disable QOS frames
  16892. * Bit : 2-4 - if 1, fwd beacon frames from connected AP
  16893. * - if 2, fwd beacon frames from unconnected AP
  16894. * during roam scan/host scan
  16895. * - if 3, fwd beacons from unconnected AP during
  16896. * roam scan/host scan and from connected AP
  16897. * - if 4, don't fwd any beacon frame
  16898. * Bit : 5-31 - reserved
  16899. */
  16900. WMI_VDEV_PARAM_SMART_MONITOR_CONFIG, /* 0xA9 */
  16901. /** Value of MAX modulated DTIM in ms to be applied
  16902. * in Suspend mode. This parameter will override
  16903. * the value of WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM
  16904. */
  16905. WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM_MS, /* 0xAA */
  16906. /*
  16907. * Security config advertised in beacons
  16908. * bit 0: URNM_MFPR in RSNXE
  16909. * bit 1: MFPC in RSN CAP
  16910. * bit 2: MFPR in RSN CAP
  16911. * bit 3: URNM_MFPR_X20 in RSNXE
  16912. * bit 4: RSTA_EXTCAP_I2R_LMR_FB
  16913. * bit 31:5 Reserved
  16914. */
  16915. WMI_VDEV_PARAM_11AZ_SECURITY_CONFIG, /* 0xAB */
  16916. /*
  16917. * Latency Level Flags
  16918. */
  16919. WMI_VDEV_PARAM_NORMAL_LATENCY_FLAGS_CONFIGURATION, /* 0xAC */
  16920. WMI_VDEV_PARAM_XR_LATENCY_FLAGS_CONFIGURATION, /* 0xAD */
  16921. WMI_VDEV_PARAM_LOW_LATENCY_FLAGS_CONFIGURATION, /* 0xAE */
  16922. WMI_VDEV_PARAM_ULTRA_LOW_LATENCY_FLAGS_CONFIGURATION, /* 0xAF */
  16923. /*
  16924. * Latency level UL/DL
  16925. * 0-15 bits: UL
  16926. * 16-31 bits: DL
  16927. */
  16928. WMI_VDEV_PARAM_NORMAL_LATENCY_UL_DL_CONFIGURATION, /* 0xB0 */
  16929. WMI_VDEV_PARAM_XR_LATENCY_UL_DL_CONFIGURATION, /* 0xB1 */
  16930. WMI_VDEV_PARAM_LOW_LATENCY_UL_DL_CONFIGURATION, /* 0xB2 */
  16931. WMI_VDEV_PARAM_ULTRA_LOW_LATENCY_UL_DL_CONFIGURATION, /* 0xB3 */
  16932. /*
  16933. * Ini to
  16934. * Configure default latency level for all clients
  16935. */
  16936. WMI_VDEV_PARAM_DEFAULT_LATENCY_LEVEL_CONFIGURATION, /* 0xB4 */
  16937. /*
  16938. * Ini to
  16939. * Configure multi client Low latency Feature
  16940. */
  16941. WMI_VDEV_PARAM_MULTI_CLIENT_LL_FEATURE_CONFIGURATION, /* 0xB5 */
  16942. /*
  16943. * traffic config for per vdev
  16944. * bit 0: low latency vdev
  16945. * bit 1: high tput vdev
  16946. * bit 31:2 Reserved
  16947. */
  16948. WMI_VDEV_PARAM_VDEV_TRAFFIC_CONFIG, /* 0xB6 */
  16949. /* Final bmiss time for Non WOW mode in sec */
  16950. WMI_VDEV_PARAM_FINAL_BMISS_TIME_SEC, /* 0xB7 */
  16951. /* Final bmiss time for WOW mode in sec */
  16952. WMI_VDEV_PARAM_FINAL_BMISS_TIME_WOW_SEC, /* 0xB8 */
  16953. /*
  16954. * Param to disable LPI antenna optimizations at Vdev level.
  16955. * In 6G LPI mode, additional antenna optimizations are done to
  16956. * improve range. Param is provided to disable the added
  16957. * optimizations.
  16958. */
  16959. WMI_VDEV_PARAM_DISABLE_LPI_ANT_OPTIMIZATION, /* 0xB9 */
  16960. /*
  16961. * Param to update connected VDEV channel bandwidth.
  16962. * Target firmware should take care of notifying associated peers
  16963. * (except TDLS) about change in bandwidth, through OMN/OMI notification
  16964. * before performing bandwidth update internally.
  16965. * Please note incase of STA VDEV only BSS peer gets updated,
  16966. * associated TDLS peer bandwidth won't be impacted.
  16967. *
  16968. * The updated bandwidth is specified with a wmi_channel_width value.
  16969. */
  16970. WMI_VDEV_PARAM_CHWIDTH_WITH_NOTIFY, /* 0xBA */
  16971. /*
  16972. * Min time between measurment for 11AZ NTB ranging
  16973. * in units of 100 microseconds
  16974. */
  16975. WMI_VDEV_PARAM_RTT_11AZ_NTB_MIN_TIME_BW_MEAS, /* 0xBB */
  16976. /*
  16977. * Max time between measurment for 11AZ NTB ranging
  16978. * in units of 10 milliseconds
  16979. */
  16980. WMI_VDEV_PARAM_RTT_11AZ_NTB_MAX_TIME_BW_MEAS, /* 0xBC */
  16981. /*
  16982. * Max session expiry for 11AZ TB ranging.
  16983. * Session expiry value is computed as 2^(Max Session Exp + 8) ms.
  16984. */
  16985. WMI_VDEV_PARAM_RTT_11AZ_TB_MAX_SESSION_EXPIRY, /* 0xBD */
  16986. /*
  16987. * WiFi Standard version to be supported.
  16988. * Value is from enum WMI_WIFI_STANDARD
  16989. */
  16990. WMI_VDEV_PARAM_WIFI_STANDARD_VERSION, /* 0xBE */
  16991. /*
  16992. * Allow to disable TWT on 2G channel
  16993. * if corresponding INI is set
  16994. */
  16995. WMI_VDEV_PARAM_DISABLE_2G_TWT, /* 0xBF */
  16996. /*
  16997. * Disable FW initiated Information frame for TWT
  16998. */
  16999. WMI_VDEV_PARAM_DISABLE_TWT_INFO_FRAME, /* 0xC0 */
  17000. /*
  17001. * Set the Recommended Max allowed active links
  17002. */
  17003. WMI_VDEV_PARAM_MLO_MAX_RECOM_ACTIVE_LINKS, /* 0xC1 */
  17004. /* DCS stats enable configuration at VDEV level */
  17005. WMI_VDEV_PARAM_DCS, /* 0xC2 */
  17006. /* VDEV parameter to configure Telescopic DTIM count */
  17007. WMI_VDEV_PARAM_TELESDTIM_CNT, /* 0xC3 */
  17008. /* Configure minimum DTIM level used by Telescopic DTIM */
  17009. WMI_VDEV_PARAM_MIN_TELES_DTIM_LVL, /* 0xC4 */
  17010. /* Set HW CTS2SELF before DL OFDMA Sequence */
  17011. WMI_VDEV_PARAM_HWCTS2SELF_OFDMA, /* 0xC5 */
  17012. /* Update TWT_UNAVAIL_MODE */
  17013. WMI_VDEV_PARAM_TWT_UNAVAIL_MODE, /* 0xC6 */
  17014. /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
  17015. * The below vdev param types are used for prototyping, and are
  17016. * prone to change.
  17017. */
  17018. WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
  17019. /* 11AX SPECIFIC defines */
  17020. /* USE this for BSS color change */
  17021. WMI_VDEV_PARAM_BSS_COLOR, /* 0x8001 */
  17022. /*
  17023. * Enable / disable trigger access for a AP vdev's peers.
  17024. * For a STA mode vdev this will enable/disable triggered access
  17025. * and enable/disable Multi User mode of operation.
  17026. * A value of 0 in a given bit disables corresponding mode.
  17027. * bit | hemu mode
  17028. * ---------------
  17029. * 0 | HE SUBFEE
  17030. * 1 | HE SUBFER
  17031. * 2 | HE MUBFEE
  17032. * 3 | HE MUBFER
  17033. * 4 | DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
  17034. * 5 | UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
  17035. * | trigger receive & UL response
  17036. * 6 | UL MUMIMO
  17037. * 7 | TXBF+OFDMA
  17038. */
  17039. WMI_VDEV_PARAM_SET_HEMU_MODE, /* 0x8002 */
  17040. WMI_VDEV_PARAM_HEOPS_0_31, /* 0x8003 */
  17041. WMI_VDEV_PARAM_OBSSPD, /* 0x8004 */
  17042. /*
  17043. * Enable / disable trigger access for a AP vdev's peers.
  17044. * For a STA mode vdev this will enable/disable triggered access
  17045. * and enable/disable Multi User mode of operation.
  17046. * A value of 0 in a given bit disables corresponding mode.
  17047. * bit | EHT mu mode
  17048. * ---------------
  17049. * 0 | EHT SUBFEE
  17050. * 1 | EHT SUBFER
  17051. * 2 | EHT MUBFEE
  17052. * 3 | EHT MUBFER
  17053. * 4 | EHT DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
  17054. * 5 | EHT UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
  17055. * | trigger receive & UL response
  17056. * 6 | EHT MUMIMO
  17057. * 7 | EHT DL OFDMA + TXBF
  17058. * 8 | EHT DL OFDMA + MU-MIMO
  17059. * 9 | EHT UL OFDMA + MU-MIMO
  17060. */
  17061. WMI_VDEV_PARAM_SET_EHT_MU_MODE, /* 0x8005 */
  17062. /**
  17063. * Specify the EHT LTF setting that should be used for fixed rate
  17064. * transmissions.
  17065. *
  17066. * Expects values of WMI_EHT_LTF_DEFAULT, WMI_EHT_LTF_1X,
  17067. * WMI_EHT_LTF_2X, or WMI_EHT_LTF_4X.
  17068. */
  17069. WMI_VDEV_PARAM_EHT_LTF, /* 0x8006 */
  17070. /**
  17071. * Expects values of WMI_EHT_LTF_DEFAULT, WMI_EHT_LTF_1X,
  17072. * WMI_EHT_LTF_2X, or WMI_EHT_LTF_4X.
  17073. */
  17074. WMI_VDEV_PARAM_UL_EHT_LTF, /* 0x8007 */
  17075. /**
  17076. * Enable or disable Dual Carrier Modulation
  17077. * valid values: 0-Disable EHT DCM, 1-Enable EHT DCM.
  17078. */
  17079. WMI_VDEV_PARAM_EHT_DCM, /* 0x8008 */
  17080. /**
  17081. * Enable or disable Extended range
  17082. * valid values: 0-Disable ER, 1-Enable ER.
  17083. */
  17084. WMI_VDEV_PARAM_EHT_RANGE_EXT, /* 0x8009 */
  17085. /**
  17086. * Enable or disable Non-data EHT Extended range
  17087. * valid values: 0-Disable ER, 1-Enable ER.
  17088. */
  17089. WMI_VDEV_PARAM_NON_DATA_EHT_RANGE_EXT, /* 0x800A */
  17090. /*
  17091. * 0 - fixed pattern disable,
  17092. * 1 - Fixed pattern enable and value pointed by
  17093. * WMI_VDEV_PARAM_FIXED_PUNCTURE_PATTERN
  17094. * punctured mode for 11be systems
  17095. */
  17096. WMI_VDEV_PARAM_FIXED_PUNCTURE_PATTERN, /* 0x800B */
  17097. WMI_VDEV_PARAM_EHTOPS_0_31, /* 0x800C */
  17098. /*
  17099. * 0 - eht 11be puncturing disable,
  17100. * 1 - eht 11be puncturing enable
  17101. */
  17102. WMI_VDEV_PARAM_SET_EHT_PUNCTURING_MODE, /* 0x800D */
  17103. /*
  17104. * 0 - Disable MCAST Beamforming
  17105. * 1 - Enable MCAST Beamforming
  17106. */
  17107. WMI_VDEV_PARAM_MCAST_STEERING, /* 0x800E */
  17108. /*
  17109. * bit 0: 0 - XR SAP profile disabled
  17110. * 1 - XR SAP profile enabled
  17111. * bit 1: 0 - XPAN profile disabled
  17112. * 1 - XPAN profile enabled
  17113. * bits 31:2 - reserved
  17114. */
  17115. WMI_VDEV_PARAM_SET_PROFILE, /* 0x800F */
  17116. /*
  17117. * for valid vdev id
  17118. * for vdev offload stats
  17119. */
  17120. WMI_VDEV_PARAM_VDEV_STATS_ID_UPDATE, /* 0x8010 */
  17121. /*
  17122. * Enable or disable Extra LTF capability in Auto rate and
  17123. * Fixed rate EHT data packet transmissions.
  17124. * Even when this vdev param is enabled, Extra LTF may not be
  17125. * enabled for all rates in auto rate mode based on other conditions.
  17126. * valid values: 0 - Disable Extra LTF, 1- Enable Extra LTF.
  17127. */
  17128. WMI_VDEV_PARAM_EXTRA_EHT_LTF, /* 0x8011 */
  17129. /*
  17130. * Disable the indicated DL and UL scheduler for the VDEV.
  17131. *
  17132. * This command is not supported in STA mode.
  17133. *
  17134. * A value of 1 in a given bit position disables the corresponding
  17135. * mode, and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS
  17136. * enum defines the bit positions for each mode.
  17137. *
  17138. * A single 32 bit value is used to store the following configuration
  17139. * bitmap.
  17140. *
  17141. * This command differs from WMI_VDEV_PARAM_SET_HEMU_MODE and
  17142. * WMI_VDEV_PARAM_SET_EHT_MU_MODE in that it is intended for use during
  17143. * normal AP operation, and will never cause a VAP restart or other
  17144. * capability bit modification. It simply controls the scheduler
  17145. * behavior.
  17146. *
  17147. * bit | sched mode
  17148. * ---------------
  17149. * 0 | DL MU-MIMO
  17150. * 1 | UL MU-MIMO
  17151. * 2 | DL OFDMA
  17152. * 3 | UL OFDMA
  17153. * 4..31 | RESERVED
  17154. */
  17155. WMI_VDEV_PARAM_SET_DISABLED_SCHED_MODES, /* 0x8012 */
  17156. /*
  17157. * SAP Power save with TWT vdev param command
  17158. * 0 - Disable SAP Power save TWT
  17159. * 1 - Enable SAP Power save TWT
  17160. */
  17161. WMI_VDEV_PARAM_SET_SAP_PS_WITH_TWT, /* 0x8013 */
  17162. /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
  17163. } WMI_VDEV_PARAM;
  17164. /* EHT Modes */
  17165. #define WMI_VDEV_EHT_SUBFEE_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 0, 1)
  17166. #define WMI_VDEV_EHT_SUBFEE_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 0, 1, 1)
  17167. #define WMI_VDEV_EHT_SUBFEE_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 0, 1, 0)
  17168. #define WMI_VDEV_EHT_SUBFER_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 1, 1)
  17169. #define WMI_VDEV_EHT_SUBFER_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 1, 1, 1)
  17170. #define WMI_VDEV_EHT_SUBFER_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 1, 1, 0)
  17171. #define WMI_VDEV_EHT_MUBFEE_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 2, 1)
  17172. #define WMI_VDEV_EHT_MUBFEE_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 2, 1, 1)
  17173. #define WMI_VDEV_EHT_MUBFEE_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 2, 1, 0)
  17174. #define WMI_VDEV_EHT_MUBFER_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 3, 1)
  17175. #define WMI_VDEV_EHT_MUBFER_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 3, 1, 1)
  17176. #define WMI_VDEV_EHT_MUBFER_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 3, 1, 0)
  17177. #define WMI_VDEV_EHT_DLOFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 4, 1)
  17178. #define WMI_VDEV_EHT_DLOFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 4, 1, 1)
  17179. #define WMI_VDEV_EHT_DLOFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 4, 1, 0)
  17180. #define WMI_VDEV_EHT_ULOFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 5, 1)
  17181. #define WMI_VDEV_EHT_ULOFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 5, 1, 1)
  17182. #define WMI_VDEV_EHT_ULOFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 5, 1, 0)
  17183. #define WMI_VDEV_EHT_ULMUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 6, 1)
  17184. #define WMI_VDEV_EHT_ULMUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 6, 1, 1)
  17185. #define WMI_VDEV_EHT_ULMUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 6, 1, 0)
  17186. #define WMI_VDEV_EHT_TXBF_OFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 7, 1)
  17187. #define WMI_VDEV_EHT_TXBF_OFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 7, 1, 1)
  17188. #define WMI_VDEV_EHT_TXBF_OFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 7, 1, 0)
  17189. #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 8, 1)
  17190. #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 8, 1, 1)
  17191. #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 8, 1, 0)
  17192. #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 9, 1)
  17193. #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 9, 1, 1)
  17194. #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 9, 1, 0)
  17195. /* HE Modes */
  17196. #define WMI_VDEV_HE_SUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 0, 1)
  17197. #define WMI_VDEV_HE_SUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 1)
  17198. #define WMI_VDEV_HE_SUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 0)
  17199. #define WMI_VDEV_HE_SUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 1, 1)
  17200. #define WMI_VDEV_HE_SUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 1)
  17201. #define WMI_VDEV_HE_SUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 0)
  17202. #define WMI_VDEV_HE_MUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 2, 1)
  17203. #define WMI_VDEV_HE_MUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 1)
  17204. #define WMI_VDEV_HE_MUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 0)
  17205. #define WMI_VDEV_HE_MUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 3, 1)
  17206. #define WMI_VDEV_HE_MUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 1)
  17207. #define WMI_VDEV_HE_MUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 0)
  17208. #define WMI_VDEV_HE_DLOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 4, 1)
  17209. #define WMI_VDEV_HE_DLOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 1)
  17210. #define WMI_VDEV_HE_DLOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 0)
  17211. #define WMI_VDEV_HE_ULOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 5, 1)
  17212. #define WMI_VDEV_HE_ULOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 1)
  17213. #define WMI_VDEV_HE_ULOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 0)
  17214. #define WMI_VDEV_HE_ULMUMIMO_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 6, 1)
  17215. #define WMI_VDEV_HE_ULMUMIMO_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 1)
  17216. #define WMI_VDEV_HE_ULMUMIMO_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 0)
  17217. #define WMI_VDEV_HE_TXBF_OFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 7, 1)
  17218. #define WMI_VDEV_HE_TXBF_OFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 7, 1, 1)
  17219. #define WMI_VDEV_HE_TXBF_OFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 7, 1, 0)
  17220. #define WMI_VDEV_HE_AX_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 0, 1)
  17221. #define WMI_VDEV_HE_MU_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 2, 1)
  17222. #define WMI_VDEV_HE_AX_TRIG_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 3, 1)
  17223. /* Indicates RTT Responder mode support for 11MC, 11AZ NTB, 11AZ TB ranging */
  17224. #define WMI_VDEV_11MC_RESP_ENABLED(param) WMI_GET_BITS(param, 0, 1)
  17225. #define WMI_VDEV_11AZ_NTB_RESP_ENABLED(param) WMI_GET_BITS(param, 1, 1)
  17226. #define WMI_VDEV_11AZ_TB_RESP_ENABLED(param) WMI_GET_BITS(param, 2, 1)
  17227. /* vdev capabilities bit mask */
  17228. #define WMI_VDEV_BEACON_SUPPORT 0x1
  17229. #define WMI_VDEV_WDS_LRN_ENABLED 0x2
  17230. #define WMI_VDEV_VOW_ENABLED 0x4
  17231. #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
  17232. #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
  17233. #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
  17234. /* Per VAP rate dropdown masks */
  17235. #define WMI_VDEV_MGMT_RATE_DROPDOWN_M 0x01
  17236. #define WMI_VDEV_MGMT_RATE_DROPDOWN_S 0
  17237. #define WMI_VDEV_MGMT_RATE_DROPDOWN (WMI_VDEV_MGMT_RATE_DROPDOWN_M << WMI_VDEV_MGMT_RATE_DROPDOWN_S)
  17238. #define WMI_VDEV_MGMT_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MGMT_RATE_DROPDOWN)
  17239. #define WMI_VDEV_MGMT_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MGMT_RATE_DROPDOWN)
  17240. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_M 0x01
  17241. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_S 1
  17242. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN (WMI_VDEV_SU_DATA_RATE_DROPDOWN_M << WMI_VDEV_SU_DATA_RATE_DROPDOWN_S)
  17243. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  17244. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  17245. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_M 0x01
  17246. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_S 2
  17247. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN (WMI_VDEV_MU_DATA_RATE_DROPDOWN_M << WMI_VDEV_MU_DATA_RATE_DROPDOWN_S)
  17248. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  17249. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  17250. /* TXBF capabilities masks */
  17251. #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
  17252. #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
  17253. #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << WMI_TXBF_CONF_SU_TX_BFEE_S)
  17254. #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFEE)
  17255. #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFEE)
  17256. #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
  17257. #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
  17258. #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << WMI_TXBF_CONF_MU_TX_BFEE_S)
  17259. #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFEE)
  17260. #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFEE)
  17261. #define WMI_TXBF_CONF_SU_TX_BFER_S 2
  17262. #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
  17263. #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << WMI_TXBF_CONF_SU_TX_BFER_S)
  17264. #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFER)
  17265. #define WMI_TXBF_CONF_SU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFER)
  17266. #define WMI_TXBF_CONF_MU_TX_BFER_S 3
  17267. #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
  17268. #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << WMI_TXBF_CONF_MU_TX_BFER_S)
  17269. #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFER)
  17270. #define WMI_TXBF_CONF_MU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFER)
  17271. #define WMI_TXBF_CONF_STS_CAP_S 4
  17272. #define WMI_TXBF_CONF_STS_CAP_M 0x7
  17273. #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << WMI_TXBF_CONF_STS_CAP_S)
  17274. #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_STS_CAP);
  17275. #define WMI_TXBF_CONF_STS_CAP_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_STS_CAP)
  17276. #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
  17277. #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
  17278. #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << WMI_TXBF_CONF_IMPLICIT_BF_S)
  17279. #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_IMPLICIT_BF)
  17280. #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_IMPLICIT_BF)
  17281. #define WMI_TXBF_CONF_BF_SND_DIM_S 8
  17282. #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
  17283. #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << WMI_TXBF_CONF_BF_SND_DIM_S)
  17284. #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_BF_SND_DIM)
  17285. #define WMI_TXBF_CONF_BF_SND_DIM_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_BF_SND_DIM)
  17286. /* commands for 11ax TXBF capabilities */
  17287. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_GET(x) WMI_GET_BITS((x,0,1)
  17288. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_SET(x,z) WMI_SET_BITS(x,0,1,z)
  17289. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_GET(x) WMI_GET_BITS((x,1,1)
  17290. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_SET(x,z) WMI_SET_BITS(x,1,1,z)
  17291. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_GET(x) WMI_GET_BITS((x,2,1)
  17292. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_SET(x,z) WMI_SET_BITS(x,2,1,z)
  17293. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_GET(x) WMI_GET_BITS((x,3,3)
  17294. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,3,3,z)
  17295. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_GET(x) WMI_GET_BITS((x,6,3)
  17296. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,6,3,z)
  17297. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_GET(x) WMI_GET_BITS((x,9,3)
  17298. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_SET(x,z) WMI_SET_BITS(x,9,3,z)
  17299. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_GET(x) WMI_GET_BITS((x,12,3)
  17300. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_SET(x,z) WMI_SET_BITS(x,12,3,z)
  17301. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_GET(x) WMI_GET_BITS((x,15,3)
  17302. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,15,3,z)
  17303. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_GET(x) WMI_GET_BITS((x,18,3)
  17304. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,18,3,z)
  17305. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,21,1)
  17306. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,21,1,z)
  17307. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,22,1)
  17308. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,22,1,z)
  17309. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_GET(x) WMI_GET_BITS((x,23,1)
  17310. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_SET(x,z) WMI_SET_BITS(x,23,1,z)
  17311. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_GET(x) WMI_GET_BITS((x,24,1)
  17312. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_SET(x,z) WMI_SET_BITS(x,24,1,z)
  17313. #define WMI_TXBF_CONF_AX_FDBK_TRIG_GET(x) WMI_GET_BITS((x,25,1)
  17314. #define WMI_TXBF_CONF_AX_FDBK_TRIG_SET(x,z) WMI_SET_BITS(x,25,1,z)
  17315. /* TXBF capabilities */
  17316. typedef struct {
  17317. A_UINT32 txbf_cap;
  17318. } wmi_vdev_txbf_cap;
  17319. /* vdev rx filters (for mesh) */
  17320. typedef enum {
  17321. WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0, /* Don't drop any frames - Default */
  17322. WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1, /* Drop FromDS frames */
  17323. WMI_VDEV_RX_FILTER_OUT_TODS = 0x2, /* Drop ToDS frames */
  17324. WMI_VDEV_RX_FILTER_OUT_NODS = 0x4, /* Drop NODS frames */
  17325. WMI_VDEV_RX_FILTER_OUT_RA = 0x8, /* Drop RA frames */
  17326. WMI_VDEV_RX_FILTER_OUT_TA = 0x10, /* Drop TA frames */
  17327. } wmi_vdev_param_filter;
  17328. /* Length of ATIM Window in TU */
  17329. #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
  17330. enum wmi_pkt_type {
  17331. WMI_PKT_TYPE_RAW = 0,
  17332. WMI_PKT_TYPE_NATIVE_WIFI = 1,
  17333. WMI_PKT_TYPE_ETHERNET = 2,
  17334. };
  17335. /*******************************************************************
  17336. * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
  17337. * Do not use it!
  17338. *******************************************************************/
  17339. typedef struct {
  17340. A_UINT8 sutxbfee : 1,
  17341. mutxbfee : 1,
  17342. sutxbfer : 1,
  17343. mutxbfer : 1,
  17344. txb_sts_cap : 3,
  17345. implicit_bf : 1;
  17346. } wmi_vdev_txbf_en;
  17347. /** Upto 8 bits are available for Roaming module to be sent along with
  17348. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
  17349. /* Bit 0: Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
  17350. #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
  17351. /* Bit 1: Enable Roaming module in FW to do scan based on Final BMISS */
  17352. #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
  17353. /* Bit 2:
  17354. * To enable/disable EAPOL_4WAY_HANDSHAKE process while roaming.
  17355. * param value = 0 --> Enable EAPOL 4way handshake
  17356. * param value = 1 --> Skip EAPOL 4way handshake
  17357. */
  17358. #define WMI_VDEV_PARAM_SKIP_ROAM_EAPOL_4WAY_HANDSHAKE 0x4
  17359. /* Bit 3:
  17360. * Scan type when WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG is set:
  17361. * value = 0 --> Chanmap scan followed by one full scan if no candidate found.
  17362. * value = 1 --> Chanmap scan only
  17363. */
  17364. #define WMI_ROAM_BMISS_FINAL_SCAN_TYPE_FLAG 0x8
  17365. /* Bit 4:
  17366. * To enable/disable feature: EAPOL offload to FW while SAE roaming.
  17367. * param value = 0 --> Enable EAPOL offload to FW for SAE roaming
  17368. * param value = 1 --> Disable EAPOL offload to FW for SAE roaming
  17369. */
  17370. #define WMI_VDEV_PARAM_SKIP_SAE_ROAM_4WAY_HANDSHAKE 0x10
  17371. /** slot time long */
  17372. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  17373. /** slot time short */
  17374. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  17375. /** preablbe long */
  17376. #define WMI_VDEV_PREAMBLE_LONG 0x1
  17377. /** preablbe short */
  17378. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  17379. /** the definition of different START/RESTART Event response */
  17380. typedef enum {
  17381. /* Event response of START CMD */
  17382. WMI_VDEV_START_RESP_EVENT = 0,
  17383. /* Event response of RESTART CMD */
  17384. WMI_VDEV_RESTART_RESP_EVENT,
  17385. } WMI_START_EVENT_PARAM;
  17386. typedef struct {
  17387. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
  17388. /** unique id identifying the VDEV, generated by the caller */
  17389. A_UINT32 vdev_id;
  17390. /** requestor id that requested the VDEV start request */
  17391. A_UINT32 requestor_id;
  17392. /* Respose of Event type START/RESTART */
  17393. WMI_START_EVENT_PARAM resp_type;
  17394. /** status of the response */
  17395. A_UINT32 status;
  17396. /** Vdev chain mask */
  17397. A_UINT32 chain_mask;
  17398. /** Vdev mimo power save mode */
  17399. A_UINT32 smps_mode;
  17400. union {
  17401. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17402. /** pdev_id for identifying the MAC
  17403. * See macros starting with WMI_PDEV_ID_ for values.
  17404. */
  17405. A_UINT32 pdev_id;
  17406. };
  17407. /** Configured Transmit Streams **/
  17408. A_UINT32 cfgd_tx_streams;
  17409. /** Configured Receive Streams **/
  17410. A_UINT32 cfgd_rx_streams;
  17411. /**
  17412. * maximum allowed Tx power (in dBm) for this connection.
  17413. * max_allowed_tx_power = 0 dBm means value is not specified.
  17414. */
  17415. A_INT32 max_allowed_tx_power;
  17416. /** unique id to identify mac's TSF register */
  17417. A_UINT32 mac_tsf_id;
  17418. /** ignore mac_tsf_id unless mac_tsf_id_valid is set */
  17419. A_UINT32 mac_tsf_id_valid;
  17420. /** min_device_tx_pwr_valid = 0 means value is not specified. */
  17421. A_UINT32 min_device_tx_pwr_valid;
  17422. /** minimum allowed device Tx power (in dBm) for this connection. */
  17423. A_INT32 min_device_tx_pwr;
  17424. } wmi_vdev_start_response_event_fixed_param;
  17425. typedef struct {
  17426. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
  17427. /** unique id identifying the VDEV, generated by the caller */
  17428. A_UINT32 vdev_id;
  17429. } wmi_vdev_stopped_event_fixed_param;
  17430. typedef struct {
  17431. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
  17432. /** unique id identifying the VDEV, generated by the caller */
  17433. A_UINT32 vdev_id;
  17434. } wmi_vdev_delete_resp_event_fixed_param;
  17435. /** common structure used for simple events (stopped, resume_req, standby response) */
  17436. typedef struct {
  17437. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
  17438. /** unique id identifying the VDEV, generated by the caller */
  17439. A_UINT32 vdev_id;
  17440. } wmi_vdev_simple_event_fixed_param;
  17441. /* Commands for getting and setting protected bit : bss max idle time */
  17442. #define WMI_BSS_MAX_IDLE_TIME_PROTECTED_GET(idle_options) \
  17443. WMI_GET_BITS(idle_options, 0, 1)
  17444. #define WMI_BSS_MAX_IDLE_TIME_PROTECTED_SET(idle_options, val) \
  17445. WMI_SET_BITS(idle_options, 0, 1, val)
  17446. typedef struct {
  17447. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_VDEV_BSS_MAX_IDLE_TIME_fixed_param */
  17448. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  17449. A_UINT32 max_idle_period; /* time interval in seconds */
  17450. /* idle_options:
  17451. * bit 0 - Protected bit
  17452. * Refer to WMI_BSS_MAX_IDLE_TIME_PROTECTED_GET,SET macros.
  17453. * bit 31:1 - Reserved bits
  17454. */
  17455. A_UINT32 idle_options;
  17456. } wmi_vdev_bss_max_idle_time_cmd_fixed_param;
  17457. /** VDEV start response status codes */
  17458. #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV successfully started */
  17459. #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
  17460. #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
  17461. #define WMI_VDEV_START_RESPONSE_DFS_VIOLATION 0x3 /** DFS_VIOLATION since channel in the NOL is selected */
  17462. #define WMI_VDEV_START_RESPONSE_INVALID_REGDOMAIN 0x4 /** Invalid regulatory domain in VDEV start */
  17463. #define WMI_VDEV_START_RESPONSE_INVALID_BAND 0x5 /** Band unsupported by current hw mode in VDEV start */
  17464. #define WMI_VDEV_START_RESPONSE_INVALID_PREFERRED_TX_RX_STREAMS 0x6 /** Invalid preferred tx/rx streams */
  17465. #define WMI_VDEV_START_RESPONSE_INVALID_TX_VAP_CONFIG 0x7 /** Invalid tx_vap config in VDEV start */
  17466. /** Beacon processing related command and event structures */
  17467. typedef struct {
  17468. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
  17469. /** unique id identifying the VDEV, generated by the caller */
  17470. A_UINT32 vdev_id;
  17471. /** xmit rate */
  17472. A_UINT32 tx_rate;
  17473. /** xmit power */
  17474. A_UINT32 txPower;
  17475. /** beacon buffer length in bytes */
  17476. A_UINT32 buf_len;
  17477. /* This TLV is followed by array of bytes:
  17478. * A_UINT8 bufp[]; <-- beacon frame buffer
  17479. */
  17480. } wmi_bcn_tx_hdr;
  17481. /* Beacon filter */
  17482. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  17483. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  17484. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  17485. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  17486. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  17487. typedef struct {
  17488. /** Filter ID */
  17489. A_UINT32 bcn_filter_id;
  17490. /** Filter type - wmi_bcn_filter */
  17491. A_UINT32 bcn_filter;
  17492. /** Buffer len */
  17493. A_UINT32 bcn_filter_len;
  17494. /** Filter info (threshold, BSSID, RSSI) */
  17495. A_UINT8 *bcn_filter_buf;
  17496. } wmi_bcn_filter_rx_cmd;
  17497. /** Capabilities and IEs to be passed to firmware */
  17498. typedef struct {
  17499. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
  17500. /** Capabilities */
  17501. A_UINT32 caps;
  17502. /** ERP info */
  17503. A_UINT32 erp;
  17504. /** Advanced capabilities */
  17505. /** HT capabilities */
  17506. /** HT Info */
  17507. /** ibss_dfs */
  17508. /** wpa Info */
  17509. /** rsn Info */
  17510. /** rrm info */
  17511. /** ath_ext */
  17512. /** app IE */
  17513. } wmi_bcn_prb_info;
  17514. enum wmi_frame_inject_type {
  17515. /* Transmit QoS null frame each period */
  17516. WMI_FRAME_INJECT_TYPE_QOS_NULL,
  17517. /* Transmit CTS to self each period */
  17518. WMI_FRAME_INJECT_TYPE_CTS_TO_SELF,
  17519. /* Transmit HOST provided buffer instead of forming frame in FW */
  17520. WMI_FRAME_INJECT_TYPE_HOST_BUFFER,
  17521. /* Max valid frame inject type for sanity checks*/
  17522. WMI_FRAME_INJECT_TYPE_MAX,
  17523. };
  17524. typedef struct {
  17525. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_frame_inject_cmd_fixed_param */
  17526. A_UINT32 tlv_header;
  17527. /** unique id identifying the VDEV, generated by the caller.
  17528. * At any time only one vdev per mac can have this feature enabled.
  17529. * Two consecutive enable commands on same mac will result in previous
  17530. * command being disabled and new one being enabled.
  17531. */
  17532. A_UINT32 vdev_id;
  17533. /** enable or disable injection */
  17534. A_UINT32 enable;
  17535. /** frame type to be used for frame injection. possible values are
  17536. * defined in enum wmi_frame_inject_type.
  17537. */
  17538. A_UINT32 frame_type;
  17539. /** periodicity of frame injection in milliseconds */
  17540. A_UINT32 frame_inject_period;
  17541. /** Destination address of frame */
  17542. wmi_mac_addr frame_addr1;
  17543. /** Frame control duration field to be set in CTS_TO_SELF.
  17544. * Applicable to frame_type WMI_FRAME_INJECT_TYPE_CTS_TO_SELF only.
  17545. */
  17546. A_UINT32 fc_duration;
  17547. /** variable buffer length. Can be used for frame template.
  17548. * data is in TLV data[]
  17549. */
  17550. A_UINT32 buf_len;
  17551. /** bw:
  17552. * Bandwidth to use for the injected frame, of type wmi_channel_width.
  17553. * This bw spec shall be ignored unless the bw_valid flag is set.
  17554. */
  17555. A_UINT32 bw;
  17556. /*
  17557. * The TLVs follows:
  17558. * A_UINT8 data[]; <-- Variable length data
  17559. */
  17560. } wmi_frame_inject_cmd_fixed_param;
  17561. #define WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS (0)
  17562. #define WMI_BEACON_TMPLT_PROFILE_PERIOD_MASK (0xff << WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS)
  17563. #define WMI_BEACON_TMPLT_SET_PROFILE_PERIOD(_ema_param, _val) \
  17564. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS, 8, _val)
  17565. #define WMI_BEACON_TMPLT_GET_PROFILE_PERIOD(_ema_param) \
  17566. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS, 8)
  17567. #define WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS (8)
  17568. #define WMI_BEACON_TMPLT_TEMPLATE_INDEX_MASK (0xff << WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS)
  17569. #define WMI_BEACON_TMPLT_SET_TEMPLATE_INDEX(_ema_param, _val) \
  17570. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS, 8, _val)
  17571. #define WMI_BEACON_TMPLT_GET_TEMPLATE_INDEX(_ema_param) \
  17572. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS, 8)
  17573. #define WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS (16)
  17574. #define WMI_BEACON_TMPLT_FIRST_TEMPLATE_MASK (0xff << WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS)
  17575. #define WMI_BEACON_TMPLT_SET_FIRST_TEMPLATE(_ema_param, _val) \
  17576. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS, 8, _val)
  17577. #define WMI_BEACON_TMPLT_GET_FIRST_TEMPLATE(_ema_param) \
  17578. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS, 8)
  17579. #define WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS (24)
  17580. #define WMI_BEACON_TMPLT_LAST_TEMPLATE_MASK (0xff << WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS)
  17581. #define WMI_BEACON_TMPLT_SET_LAST_TEMPLATE(_ema_param, _val) \
  17582. WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS, 8, _val)
  17583. #define WMI_BEACON_TMPLT_GET_LAST_TEMPLATE(_ema_param) \
  17584. WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS, 8)
  17585. typedef struct {
  17586. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_ml_info */
  17587. /** hw_link_id:
  17588. * Unique link id across SOCs, got as part of QMI handshake
  17589. */
  17590. A_UINT32 hw_link_id;
  17591. /**
  17592. * CU vdev map for the Critical update category-1
  17593. * (Inclusion of CU IES)
  17594. */
  17595. A_UINT32 cu_vdev_map_cat1_lo; /* bits 31:0 */
  17596. A_UINT32 cu_vdev_map_cat1_hi; /* bits 63:32 */
  17597. /**
  17598. * CU vdev map for the Critical update category-2
  17599. * (modification of CU IES)
  17600. */
  17601. A_UINT32 cu_vdev_map_cat2_lo; /* bits 31:0 */
  17602. A_UINT32 cu_vdev_map_cat2_hi; /* bits 63:32 */
  17603. } wmi_bcn_tmpl_ml_info;
  17604. typedef struct {
  17605. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_ml_params */
  17606. A_UINT32 vdev_id; /* partner vdev_id */
  17607. A_UINT32 hw_link_id; /* hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
  17608. A_UINT32 beacon_interval; /* beacon interval in TU from received beacon of the partner link */
  17609. /** CSA IE switch count offset from the beginning of data[]
  17610. * Value 0 indicates CSA IE is not present in beacon template.
  17611. */
  17612. A_UINT32 csa_switch_count_offset; /* units = bytes */
  17613. /** Extended CSA IE switch count offset from the beginning of data[]
  17614. * Value 0 indicates ECSA IE is not present in beacon template.
  17615. */
  17616. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  17617. /** Per-STA profile Subelement offset from the beginning of the template. */
  17618. A_UINT32 per_sta_profile_offset;
  17619. /** Quiet IE offset from the beginning of the template. */
  17620. A_UINT32 quiet_ie_offset;
  17621. /** Flag to check if other IEs are present in per-sta profile */
  17622. A_UINT32 is_other_ie_present;
  17623. } wmi_bcn_tmpl_ml_params;
  17624. typedef struct {
  17625. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
  17626. /** unique id identifying the VDEV, generated by the caller */
  17627. A_UINT32 vdev_id;
  17628. /** TIM IE offset from the beginning of the template. */
  17629. A_UINT32 tim_ie_offset;
  17630. /** beacon buffer length. data is in TLV data[] */
  17631. A_UINT32 buf_len;
  17632. /** CSA IE switch count offset from the beginning of data[]
  17633. * Value 0 indicates CSA IE is not present in beacon template.
  17634. */
  17635. A_UINT32 csa_switch_count_offset; /* units = bytes */
  17636. /** Extended CSA IE switch count offset from the beginning of data[]
  17637. * Value 0 indicates CSA IE is not present in beacon template.
  17638. */
  17639. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  17640. /** Specify when to send the CSA switch count status from FW to host.
  17641. * See WMI_CSA_EVENT_BMAP* below for more information.
  17642. * E.g. if CSA switch count event is needed to be sent when the switch count
  17643. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  17644. */
  17645. A_UINT32 csa_event_bitmap;
  17646. /** offset (in octets/bytes) of MBSSID IE in beacon frame */
  17647. A_UINT32 mbssid_ie_offset;
  17648. /** offset (in octets/bytes) of ESP IE in beacon frame */
  17649. A_UINT32 esp_ie_offset;
  17650. /** CSC IE color switch count offset from the beginning of data[]
  17651. * Value 0 indicates CSC IE is not present in beacon template.
  17652. */
  17653. A_UINT32 csc_switch_count_offset; /* units = bytes */
  17654. /** Specify when to send the CSC switch count status from FW to host.
  17655. * See WMI_CSC_EVENT_BMAP* below for more information.
  17656. * E.g. if CSA switch count event is needed to be sent when the switch count
  17657. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  17658. */
  17659. A_UINT32 csc_event_bitmap;
  17660. /** Specify offset for FW to overwrite MU EDCA parameters in the beacon.
  17661. * This is done during FW tuning of EDCA parameters.
  17662. * Based on number of HE and Legacy stations.
  17663. * If mu_edca_ie_offset == 0, it is ignored.
  17664. * Only non-zero values are considered.
  17665. */
  17666. A_UINT32 mu_edca_ie_offset;
  17667. /** Specify features that need to be enabled/disabled for the beacon.
  17668. *
  17669. * Bit 0:
  17670. * Beacon Protection feature enable/disable indication.
  17671. * Refer to WMI_BEACON_PROTECTION_EN_SET/GET macros.
  17672. *
  17673. * More features can be added to this bitmap.
  17674. */
  17675. A_UINT32 feature_enable_bitmap;
  17676. /**
  17677. * @ema_params: Applicable only for EMA tx VAPs (VAPs having both flags
  17678. * VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set) and should
  17679. * remain 0 otherwise. For EMA vaps it carries below information
  17680. * encoded in each byte:
  17681. * Byte 0: (@ema_beacon_profile_periodicity) - beacon profile periodicity
  17682. * (number of beacons) after which nontransmitted MBSS info repeats.
  17683. * Assumes values [1, N] inclusive.
  17684. * Refer to WMI_BEACON_TMPLT_[SET,GET]_PROFILE_PERIOD macros.
  17685. * Byte 1: (@ema_beacon_tmpl_idx) - Specifies the position of beacon
  17686. * templates within profile periodicity.
  17687. * Assumes values [0, ema_beacon_profile_periodicity-1] inclusive.
  17688. * Multiple templates having same @ema_beacon_max_tmpl_idx will
  17689. * overwrite previous template.
  17690. * Refer to WMI_BEACON_TMPLT_[SET,GET]_TEMPLATE_INDEX macros.
  17691. * Byte 2: (@ema_first_tmpl) - Specifies whether it's a last template in
  17692. * sequence of @ema_beacon_profile_periodicity templates
  17693. * (end of new template update exchange).
  17694. * If this template is the only template being updated,
  17695. * @ema_first_tmpl and @ema_last_tmpl both shall be set to 1.
  17696. * Refer to WMI_BEACON_TMPLT_[SET,GET]_FIRST_TEMPLATE macros.
  17697. * Byte 3: (@ema_last_tmpl) - pecifies whether it's a last template in
  17698. * sequence of @ema_beacon_profile_periodicity templates
  17699. * (end of new template update exchange).
  17700. * If this template is the only template being updated,
  17701. * @ema_first_tmpl and @ema_last_tmpl both shall be set to 1.
  17702. * Refer to WMI_BEACON_TMPLT_[SET,GET]_LAST_TEMPLATE macros.
  17703. */
  17704. A_UINT32 ema_params;
  17705. /*
  17706. * The TLVs follows:
  17707. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  17708. * A_UINT8 data[]; <-- Variable length data
  17709. * wmi_bcn_tmpl_ml_params ml_bcn_param[]; <-- per-MLO-link beacon data
  17710. * wmi_bcn_tmpl_ml_params will have multiple instances equal to
  17711. * the number of links in an AP MLD
  17712. */
  17713. } wmi_bcn_tmpl_cmd_fixed_param;
  17714. #define WMI_CSA_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSA switch count event */
  17715. #define WMI_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  17716. Same can also be achieved by setting bitmap to 0X80000001 */
  17717. #define WMI_CSA_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSA switch count event for every update to switch count */
  17718. #define WMI_CSC_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSC switch count event */
  17719. #define WMI_CSC_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  17720. Same can also be achieved by setting bitmap to 0X80000001 */
  17721. #define WMI_CSC_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSC switch count event for every update to switch count */
  17722. #define WMI_BEACON_PROTECTION_BIT_POS 0 /* Beacon Protection enable/disable indication */
  17723. #define WMI_BEACON_PROTECTION_EN_SET(param, value) \
  17724. WMI_SET_BITS(param, WMI_BEACON_PROTECTION_BIT_POS, 1, value)
  17725. #define WMI_BEACON_PROTECTION_EN_GET(param) \
  17726. WMI_GET_BITS(param, WMI_BEACON_PROTECTION_BIT_POS, 1)
  17727. typedef struct {
  17728. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_resp_tmpl_ml_info */
  17729. /** hw_link_id:
  17730. * Unique link id across SOCs, got as part of QMI handshake
  17731. */
  17732. A_UINT32 hw_link_id;
  17733. /**
  17734. * CU vdev map for the Critical update category-1
  17735. * (Inclusion of CU IES)
  17736. */
  17737. A_UINT32 cu_vdev_map_cat1_lo; /* bits 31:0 */
  17738. A_UINT32 cu_vdev_map_cat1_hi; /* bits 63:32 */
  17739. /**
  17740. * CU vdev map for the Critical update category-2
  17741. * (modification of CU IES)
  17742. */
  17743. A_UINT32 cu_vdev_map_cat2_lo; /* bits 31:0 */
  17744. A_UINT32 cu_vdev_map_cat2_hi; /* bits 63:32 */
  17745. } wmi_prb_resp_tmpl_ml_info;
  17746. /** indicates P2P GO only case not replay probe req */
  17747. #define WMI_PRB_TMPL_IGNORE_NONP2P_PRB_REQ 0x1
  17748. typedef struct {
  17749. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
  17750. /** unique id identifying the VDEV, generated by the caller */
  17751. A_UINT32 vdev_id;
  17752. /** beacon buffer length. data is in TLV data[] */
  17753. A_UINT32 buf_len;
  17754. /** flags to control probe tmpl:
  17755. * Bit 0: If set, FW should ignore non-P2P probe req
  17756. * Bits 31-1: Reserved
  17757. */
  17758. A_UINT32 flags;
  17759. /*
  17760. * The TLVs follows:
  17761. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  17762. * A_UINT8 data[]; <-- Variable length data
  17763. */
  17764. } wmi_prb_tmpl_cmd_fixed_param;
  17765. typedef struct {
  17766. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_tmpl_cmd_fixed_param */
  17767. /** unique id identifying the VDEV, generated by the caller */
  17768. A_UINT32 vdev_id;
  17769. /** fd frame buffer length. data is in TLV data[] */
  17770. A_UINT32 buf_len;
  17771. /*
  17772. * The TLVs follows:
  17773. * A_UINT8 data[]; <-- Variable length data
  17774. */
  17775. } wmi_fd_tmpl_cmd_fixed_param;
  17776. typedef struct {
  17777. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
  17778. A_UINT32 tlv_header;
  17779. /** unique id identifying the VDEV */
  17780. A_UINT32 vdev_id;
  17781. /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
  17782. A_UINT32 tx_status;
  17783. } wmi_offload_bcn_tx_status_event_fixed_param;
  17784. enum wmi_sta_ps_mode {
  17785. /** enable power save for the given STA VDEV */
  17786. WMI_STA_PS_MODE_DISABLED = 0,
  17787. /** disable power save for a given STA VDEV */
  17788. WMI_STA_PS_MODE_ENABLED = 1,
  17789. };
  17790. typedef struct {
  17791. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
  17792. /** unique id identifying the VDEV, generated by the caller */
  17793. A_UINT32 vdev_id;
  17794. /** Power save mode
  17795. *
  17796. * (see enum wmi_sta_ps_mode)
  17797. */
  17798. A_UINT32 sta_ps_mode;
  17799. } wmi_sta_powersave_mode_cmd_fixed_param;
  17800. typedef struct {
  17801. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_tdcc_config_cmd_fixed_param */
  17802. /** Set a max tx period: percentage of one beacon interval. range: 0 - 100 */
  17803. A_UINT32 tx_cycle_percentage;
  17804. /** Enable/disable TX Duty Cycle Control powersave */
  17805. A_UINT32 enabled;
  17806. } wmi_sta_tdcc_config_cmd_fixed_param;
  17807. enum wmi_csa_offload_en {
  17808. WMI_CSA_OFFLOAD_DISABLE = 0,
  17809. WMI_CSA_OFFLOAD_ENABLE = 1,
  17810. };
  17811. typedef struct {
  17812. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
  17813. A_UINT32 vdev_id;
  17814. A_UINT32 csa_offload_enable;
  17815. } wmi_csa_offload_enable_cmd_fixed_param;
  17816. typedef struct {
  17817. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
  17818. A_UINT32 vdev_id;
  17819. /*
  17820. * The TLVs follows:
  17821. * wmi_channel chan;
  17822. */
  17823. } wmi_csa_offload_chanswitch_cmd_fixed_param;
  17824. /**
  17825. * This parameter controls the policy for retrieving frames from AP while the
  17826. * STA is in sleep state.
  17827. *
  17828. * Only takes affect if the sta_ps_mode is enabled
  17829. */
  17830. enum wmi_sta_ps_param_rx_wake_policy {
  17831. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  17832. * the Power save SM(state machine) will come out of sleep by either
  17833. * sending null frame (or) a data frame (with PS==0) in response to TIM
  17834. * bit set in the received beacon frame from AP.
  17835. */
  17836. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  17837. /* Here the power save state machine will not wakeup in response to TIM
  17838. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  17839. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  17840. * access categories are delivery-enabled, the station will send a UAPSD
  17841. * trigger frame, otherwise it will send a PS-Poll.
  17842. */
  17843. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  17844. };
  17845. /** Number of tx frames/beacon that cause the power save SM to wake up.
  17846. *
  17847. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  17848. * meaning, It will cause the SM to never wake up. This is useful if you want
  17849. * to keep the system to sleep all the time for some kind of test mode . host
  17850. * can change this parameter any time. It will affect at the next tx frame.
  17851. */
  17852. enum wmi_sta_ps_param_tx_wake_threshold {
  17853. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  17854. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  17855. /* Values greater than one indicate that many TX attempts per beacon
  17856. * interval before the STA will wake up
  17857. */
  17858. };
  17859. /**
  17860. * The maximum number of PS-Poll frames the FW will send in response to
  17861. * traffic advertised in TIM before waking up (by sending a null frame with PS
  17862. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  17863. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  17864. * parameter is used when the RX wake policy is
  17865. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  17866. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  17867. */
  17868. enum wmi_sta_ps_param_pspoll_count {
  17869. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  17870. /* Values greater than 0 indicate the maximum number of PS-Poll frames FW
  17871. * will send before waking up.
  17872. */
  17873. };
  17874. /*
  17875. * This will include the delivery and trigger enabled state for every AC.
  17876. * This is the negotiated state with AP. The host MLME needs to set this based
  17877. * on AP capability and the state Set in the association request by the
  17878. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  17879. */
  17880. #define WMI_UAPSD_AC_TYPE_DELI 0
  17881. #define WMI_UAPSD_AC_TYPE_TRIG 1
  17882. #define WMI_UAPSD_AC_BIT_MASK(ac,type) \
  17883. ((type == WMI_UAPSD_AC_TYPE_DELI) ? \
  17884. (1 << (ac<<1)) : \
  17885. (1 << ((ac<<1)+1)))
  17886. enum wmi_sta_ps_param_uapsd {
  17887. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  17888. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  17889. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  17890. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  17891. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  17892. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  17893. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  17894. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  17895. };
  17896. enum wmi_sta_ps_scheme_cfg {
  17897. WMI_STA_PS_OPM_CONSERVATIVE = 0,
  17898. WMI_STA_PS_OPM_AGGRESSIVE = 1,
  17899. WMI_STA_PS_USER_DEF = 2,
  17900. };
  17901. enum wmi_sta_powersave_param {
  17902. /**
  17903. * Controls how frames are retrievd from AP while STA is sleeping
  17904. *
  17905. * (see enum wmi_sta_ps_param_rx_wake_policy)
  17906. */
  17907. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  17908. /**
  17909. * The STA will go active after this many TX
  17910. *
  17911. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  17912. */
  17913. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  17914. /**
  17915. * Number of PS-Poll to send before STA wakes up
  17916. *
  17917. * (see enum wmi_sta_ps_param_pspoll_count)
  17918. *
  17919. */
  17920. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  17921. /**
  17922. * TX/RX inactivity time in msec before going to sleep.
  17923. *
  17924. * The power save SM will monitor tx/rx activity on the VDEV, if no
  17925. * activity for the specified msec of the parameter the Power save SM will
  17926. * go to sleep.
  17927. */
  17928. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  17929. /**
  17930. * Set uapsd configuration.
  17931. *
  17932. * (see enum wmi_sta_ps_param_uapsd)
  17933. */
  17934. WMI_STA_PS_PARAM_UAPSD = 4,
  17935. /**
  17936. * Number of PS-Poll to send before STA wakes up in QPower Mode
  17937. */
  17938. WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
  17939. /**
  17940. * Enable OPM
  17941. */
  17942. WMI_STA_PS_ENABLE_QPOWER = 6,
  17943. WMI_STA_PS_ENABLE_OPM = WMI_STA_PS_ENABLE_QPOWER, /* alias */
  17944. /**
  17945. * Number of TX frames before the entering the Active state
  17946. */
  17947. WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
  17948. /**
  17949. * QPower SPEC PSPOLL interval
  17950. */
  17951. WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
  17952. /**
  17953. * Max SPEC PSPOLL to be sent when the PSPOLL response has
  17954. * no-data bit set
  17955. */
  17956. WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
  17957. /**
  17958. * Max value of ITO reset when there is no tx-rx
  17959. * after AP has set the TIM bit
  17960. */
  17961. WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX = 10,
  17962. /**
  17963. * Flag to enable/disable Powersave Optimization
  17964. * in WOW
  17965. */
  17966. WMI_STA_PS_PARAM_ENABLE_PS_OPT_IN_WOW = 11,
  17967. /**
  17968. * Speculative interval in ms
  17969. */
  17970. WMI_STA_PS_PARAM_SPEC_WAKE_INTERVAL = 12,
  17971. };
  17972. typedef struct {
  17973. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
  17974. /** unique id identifying the VDEV, generated by the caller */
  17975. A_UINT32 vdev_id;
  17976. /** station power save parameter (see enum wmi_sta_powersave_param) */
  17977. A_UINT32 param;
  17978. A_UINT32 value;
  17979. } wmi_sta_powersave_param_cmd_fixed_param;
  17980. /** No MIMO power save */
  17981. #define WMI_STA_MIMO_PS_MODE_DISABLE
  17982. /** mimo powersave mode static*/
  17983. #define WMI_STA_MIMO_PS_MODE_STATIC
  17984. /** mimo powersave mode dynamic */
  17985. #define WMI_STA_MIMO_PS_MODE_DYNAMI
  17986. typedef struct {
  17987. /** unique id identifying the VDEV, generated by the caller */
  17988. A_UINT32 vdev_id;
  17989. /** mimo powersave mode as defined above */
  17990. A_UINT32 mimo_pwrsave_mode;
  17991. } wmi_sta_mimo_ps_mode_cmd;
  17992. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  17993. enum wmi_ap_ps_param_uapsd {
  17994. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  17995. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  17996. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  17997. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  17998. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  17999. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  18000. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  18001. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  18002. };
  18003. /** U-APSD maximum service period of peer station */
  18004. enum wmi_ap_ps_peer_param_max_sp {
  18005. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  18006. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  18007. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  18008. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  18009. /* keep last! */
  18010. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  18011. };
  18012. /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
  18013. enum wmi_ap_ps_param_sifs_resp_frmtype {
  18014. WMI_SIFS_RESP_PSPOLL = (1 << 0),
  18015. WMI_SIFS_RESP_UAPSD = (1 << 1),
  18016. WMI_SIFS_RESP_QBST_EXP = (1 << 2),
  18017. WMI_SIFS_RESP_QBST_DATA = (1 << 3),
  18018. WMI_SIFS_RESP_QBST_BAR = (1 << 4),
  18019. };
  18020. /**
  18021. * AP power save parameter
  18022. * Set a power save specific parameter for a peer station
  18023. */
  18024. enum wmi_ap_ps_peer_param {
  18025. /** Set uapsd configuration for a given peer.
  18026. *
  18027. * This will include the delivery and trigger enabled state for every AC.
  18028. * The host MLME needs to set this based on AP capability and stations
  18029. * request Set in the association request received from the station.
  18030. *
  18031. * Lower 8 bits of the value specify the UAPSD configuration.
  18032. *
  18033. * (see enum wmi_ap_ps_param_uapsd)
  18034. * The default value is 0.
  18035. */
  18036. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  18037. /**
  18038. * Set the service period for a UAPSD capable station
  18039. *
  18040. * The service period from wme ie in the (re)assoc request frame.
  18041. *
  18042. * (see enum wmi_ap_ps_peer_param_max_sp)
  18043. */
  18044. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  18045. /** Time in seconds for aging out buffered frames for STA in power save */
  18046. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  18047. /**
  18048. * Specify frame types that are considered SIFS RESP trigger frame
  18049. * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
  18050. */
  18051. WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  18052. /** Specifies the trigger state of TID. Valid only for UAPSD frame type */
  18053. WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  18054. /** Specifies the WNM sleep state of a STA */
  18055. WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  18056. };
  18057. typedef struct {
  18058. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
  18059. /** unique id identifying the VDEV, generated by the caller */
  18060. A_UINT32 vdev_id;
  18061. /** peer MAC address */
  18062. wmi_mac_addr peer_macaddr;
  18063. /** AP powersave param (see enum wmi_ap_ps_peer_param) */
  18064. A_UINT32 param;
  18065. /** AP powersave param value (see defines) */
  18066. A_UINT32 value;
  18067. } wmi_ap_ps_peer_cmd_fixed_param;
  18068. /** Configure peer station 11v U-APSD coexistence
  18069. *
  18070. * Two parameters from uaspd coexistence ie info (as specified in 11v) are
  18071. * sent down to FW along with this command.
  18072. *
  18073. * The semantics of these fields are described in the following text extracted
  18074. * from 802.11v.
  18075. *
  18076. * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
  18077. * U-APSD Coexistence element, the AP should not transmit frames to the
  18078. * non-AP STA outside of the U-APSD Coexistence Service Period, which
  18079. * begins when the AP receives the U-APSD trigger frame and ends after
  18080. * the transmission period specified by the result of the following
  18081. * calculation:
  18082. *
  18083. * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
  18084. *
  18085. * Where T is the time the U-APSD trigger frame was received at the AP
  18086. * Interval is the UAPSD Coexistence element Duration/Interval field
  18087. * value (see 7.3.2.91) or upon the successful transmission of a frame
  18088. * with EOSP bit set to 1, whichever is earlier.
  18089. *
  18090. *
  18091. * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
  18092. * Coexistence element, the AP should not transmit frames to the non-AP
  18093. * STA outside of the U-APSD Coexistence Service Period, which begins
  18094. * when the AP receives a U-APSD trigger frame and ends after the
  18095. * transmission period specified by the result of the following
  18096. * calculation: End of transmission period = T + Duration
  18097. */
  18098. typedef struct {
  18099. /** unique id identifying the VDEV, generated by the caller */
  18100. A_UINT32 vdev_id;
  18101. /** peer MAC address */
  18102. wmi_mac_addr peer_macaddr;
  18103. /** Enable U-APSD coexistence support for this peer
  18104. *
  18105. * 0 -> disabled (default)
  18106. * 1 -> enabled
  18107. */
  18108. A_UINT32 enabled;
  18109. /** Duration/Interval as defined by 11v U-ASPD coexistence */
  18110. A_UINT32 duration_interval;
  18111. /** Upper 32 bits of 64-bit TSF offset */
  18112. A_UINT32 tsf_offset_high;
  18113. /** Lower 32 bits of 64-bit TSF offset */
  18114. A_UINT32 tsf_offset_low;
  18115. } wmi_ap_powersave_peer_uapsd_coex_cmd;
  18116. typedef enum {
  18117. WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
  18118. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
  18119. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
  18120. WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
  18121. } wmi_ap_ps_egap_flag_type;
  18122. #define WMI_EGAP_GET_REDUCED_2G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 0, 8)
  18123. #define WMI_EGAP_GET_REDUCED_2G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 8, 8)
  18124. #define WMI_EGAP_GET_REDUCED_5G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 16, 8)
  18125. #define WMI_EGAP_GET_REDUCED_5G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 24, 8)
  18126. #define WMI_EGAP_SET_REDUCED_2G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 0, 8, val)
  18127. #define WMI_EGAP_SET_REDUCED_2G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 8, 8, val)
  18128. #define WMI_EGAP_SET_REDUCED_5G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 16, 8, val)
  18129. #define WMI_EGAP_SET_REDUCED_5G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 24, 8, val)
  18130. /**
  18131. * configure enhanced green ap parameters
  18132. */
  18133. typedef struct {
  18134. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  18135. /** Enable enhanced green ap
  18136. * 0 -> disabled
  18137. * 1 -> enabled
  18138. */
  18139. A_UINT32 enable;
  18140. /** The param indicates a duration that all STAs connected
  18141. * to S-AP have no traffic.
  18142. */
  18143. A_UINT32 inactivity_time; /* in unit of milliseconds */
  18144. /** The param indicates a duration that all STAs connected
  18145. * to S-AP have no traffic, after all STAs have entered powersave.
  18146. */
  18147. A_UINT32 wait_time; /* in unit of milliseconds */
  18148. /** The param is used to turn on/off some functions within E-GAP.
  18149. */
  18150. A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
  18151. /** Reduced_txrx_chainmask
  18152. * [7:0] - 2G band tx chain mask
  18153. * [15:8] - 2G band rx chain mask
  18154. * [23:16] - 5G band tx chain mask
  18155. * [31:24] - 5G band rx chain mask
  18156. */
  18157. A_UINT32 reduced_txrx_chainmask;
  18158. } wmi_ap_ps_egap_param_cmd_fixed_param;
  18159. typedef enum {
  18160. WMI_AP_PS_EGAP_STATUS_IDLE = 1,
  18161. WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
  18162. WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
  18163. WMI_AP_PS_EGAP_STATUS_MAX = 15
  18164. } wmi_ap_ps_egap_status_type;
  18165. /**
  18166. * send enhanced green ap status to host
  18167. */
  18168. typedef struct
  18169. {
  18170. /** TLV tag and len; tag equals
  18171. * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list */
  18172. A_UINT32 tlv_header;
  18173. union {
  18174. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18175. /** pdev_id for identifying the MAC
  18176. * See macros starting with WMI_PDEV_ID_ for values.
  18177. */
  18178. A_UINT32 pdev_id;
  18179. };
  18180. /** The param indicates the current tx chainmask with the mac id. */
  18181. A_UINT32 tx_chainmask;
  18182. /** The param indicates the current rx chainmask with the mac id. */
  18183. A_UINT32 rx_chainmask;
  18184. } wmi_ap_ps_egap_info_chainmask_list;
  18185. typedef struct {
  18186. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  18187. /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
  18188. A_UINT32 status;
  18189. /* This TLV is followed by
  18190. * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
  18191. */
  18192. } wmi_ap_ps_egap_info_event_fixed_param;
  18193. /* 128 clients = 4 words */
  18194. /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
  18195. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  18196. typedef struct {
  18197. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  18198. /** TIM bitmap len (in bytes) */
  18199. A_UINT32 tim_len;
  18200. /** TIM Partial Virtual Bitmap */
  18201. A_UINT32 tim_mcast;
  18202. A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  18203. A_UINT32 tim_changed;
  18204. A_UINT32 tim_num_ps_pending;
  18205. /** Use the vdev_id only if vdev_id_valid is set */
  18206. A_UINT32 vdev_id_valid;
  18207. /** unique id identifying the VDEV */
  18208. A_UINT32 vdev_id;
  18209. } wmi_tim_info;
  18210. typedef struct {
  18211. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  18212. /** TIM Partial Virtual Bitmap */
  18213. A_UINT32 tim_mcast;
  18214. A_UINT32 tim_changed;
  18215. A_UINT32 tim_num_ps_pending;
  18216. /** Use the vdev_id only if vdev_id_valid is set */
  18217. A_UINT32 vdev_id_valid;
  18218. /** unique id identifying the VDEV */
  18219. A_UINT32 vdev_id;
  18220. /** TIM bitmap len (in bytes) */
  18221. A_UINT32 tim_len;
  18222. /* followed by WMITLV_TAG_ARRAY_BYTE holding the TIM bitmap */
  18223. } wmi_tim_info_v2;
  18224. typedef struct {
  18225. /** Flag to enable quiet period IE support */
  18226. A_UINT32 is_enabled;
  18227. /** Quiet start */
  18228. A_UINT32 tbttcount;
  18229. /** Beacon intervals between quiets*/
  18230. A_UINT32 period;
  18231. /** TUs of each quiet*/
  18232. A_UINT32 duration;
  18233. /** TUs of from TBTT of quiet start*/
  18234. A_UINT32 offset;
  18235. } wmi_quiet_info;
  18236. /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
  18237. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
  18238. typedef struct {
  18239. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
  18240. /** Bit 0: Flag to indicate an update in NOA schedule
  18241. * Bits 7-1: Reserved
  18242. * Bits 15-8: Index (identifies the instance of NOA sub element)
  18243. * Bit 16: Opp PS state of the AP
  18244. * Bits 23-17: Ctwindow in TUs
  18245. * Bits 31-24: Number of NOA descriptors
  18246. */
  18247. A_UINT32 noa_attributes;
  18248. wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  18249. /** Use the vdev_id only if vdev_id_valid is set */
  18250. A_UINT32 vdev_id_valid;
  18251. /** unique id identifying the VDEV */
  18252. A_UINT32 vdev_id;
  18253. } wmi_p2p_noa_info;
  18254. typedef struct {
  18255. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_offload_info */
  18256. A_UINT32 vdev_id; /* unique id identifying the VDEV */
  18257. A_UINT8 tbttcount; /* quiet start */
  18258. A_UINT8 period; /* beacon intervals between quiets */
  18259. A_UINT16 duration; /* TUs of each quiet */
  18260. A_UINT16 offset; /* TUs of from TBTT of quiet start */
  18261. } wmi_quiet_offload_info;
  18262. #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
  18263. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
  18264. #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
  18265. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
  18266. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
  18267. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  18268. WMI_UNIFIED_NOA_ATTR_MODIFIED);
  18269. #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
  18270. #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
  18271. #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
  18272. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
  18273. #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
  18274. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  18275. WMI_UNIFIED_NOA_ATTR_INDEX);
  18276. #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
  18277. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
  18278. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
  18279. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
  18280. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
  18281. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  18282. WMI_UNIFIED_NOA_ATTR_OPP_PS);
  18283. #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
  18284. #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
  18285. #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
  18286. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
  18287. #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
  18288. WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
  18289. WMI_UNIFIED_NOA_ATTR_CTWIN);
  18290. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
  18291. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
  18292. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
  18293. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
  18294. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
  18295. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  18296. WMI_UNIFIED_NOA_ATTR_NUM_DESC);
  18297. typedef struct {
  18298. /** TIM info */
  18299. wmi_tim_info tim_info;
  18300. /** P2P NOA info */
  18301. wmi_p2p_noa_info p2p_noa_info;
  18302. /* TBD: More info elements to be added later */
  18303. } wmi_bcn_info;
  18304. typedef struct {
  18305. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
  18306. /** bitmap identifying the VDEVs, generated by the caller */
  18307. A_UINT32 vdev_map;
  18308. /** how many vdev's info is included in this message
  18309. * If this field is zero, then the number of vdevs is specified by
  18310. * the number of bits set in the vdev_map bitmap.
  18311. */
  18312. A_UINT32 num_vdevs;
  18313. /* This TLV is followed by tim_info and p2p_noa_info for each vdev:
  18314. * wmi_tim_info tim_info[];
  18315. * wmi_p2p_noa_info p2p_noa_info[];
  18316. * wmi_quiet_offload_info quiet_offload_info[0/1];
  18317. *
  18318. */
  18319. } wmi_host_swba_event_fixed_param;
  18320. #define WMI_MAX_AP_VDEV 16
  18321. typedef struct {
  18322. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swfda_event_fixed_param */
  18323. /** vdev_id identifying the VDEV for which FILS should be generated */
  18324. A_UINT32 vdev_id;
  18325. /** time (in TU) at which current FILS Discovery frame is scheduled for Tx */
  18326. A_UINT32 fils_tt;
  18327. /** next TBTT time (in TU) for this vdev */
  18328. A_UINT32 tbtt;
  18329. } wmi_host_swfda_event_fixed_param;
  18330. typedef struct {
  18331. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
  18332. /** bimtap of VDEVs that has tbtt offset updated */
  18333. A_UINT32 vdev_map;
  18334. /* The TLVs for tbttoffset_list, tbtt_qtime_low_us_list, and
  18335. * tbtt_qtime_high_us_list will follow this TLV.
  18336. * - tbtt offset list in the order of the LSb to MSb in the vdev_map bitmap
  18337. * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
  18338. * - tbtt qtime_low_us list(Lower 32 bit of qtime us) in the order of the
  18339. * LSb to MSb in the vdev_map bitmap
  18340. * A_UINT32 tbtt_qtime_low_us_list[WMI_MAX_AP_VDEV];
  18341. * - tbtt qtime_high_us list(Higher 32 bit of qtime us) in the order of the
  18342. * LSb to MSb in the vdev_map bitmap
  18343. * A_UINT32 tbtt_qtime_high_us_list[WMI_MAX_AP_VDEV];
  18344. */
  18345. } wmi_tbtt_offset_event_fixed_param;
  18346. #define WMI_TBTT_OFFSET_INVALID 0xffffffff /* tbttoffset is not updated by FW */
  18347. typedef struct {
  18348. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
  18349. /** unique id identifying the VDEV */
  18350. A_UINT32 vdev_id;
  18351. /** tbttoffset in TUs */
  18352. A_UINT32 tbttoffset;
  18353. /** absolute tbtt time in qtime us */
  18354. A_UINT32 tbtt_qtime_low_us; /* bits 31:0 of qtime */
  18355. A_UINT32 tbtt_qtime_high_us; /* bits 63:32 of qtime */
  18356. } wmi_tbtt_offset_info;
  18357. /** Use this event if number of vdevs > 32 */
  18358. typedef struct {
  18359. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param */
  18360. A_UINT32 num_vdevs;
  18361. /*
  18362. * The TLVs for tbttoffset will follow this TLV.
  18363. * Of size num_vdevs * wmi_tbtt_offset_info
  18364. */
  18365. } wmi_tbtt_offset_ext_event_fixed_param;
  18366. /* Peer Specific commands and events */
  18367. typedef struct {
  18368. A_UINT32 percentage; /* in unit of 12.5% */
  18369. A_UINT32 min_delta; /* in unit of Mbps */
  18370. } rate_delta_t;
  18371. #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
  18372. #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
  18373. #define MAX_NUM_OF_RATE_THRESH 4
  18374. typedef struct {
  18375. A_UINT32 val_cond_flags; /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  18376. Any of these two conditions or both of them can be set. */
  18377. rate_delta_t rate_delta;
  18378. A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; /* In unit of Mbps. There are at most 4 thresholds.
  18379. If the threshold count is less than 4, set zero to
  18380. the one following the last threshold */
  18381. } report_cond_per_phy_t;
  18382. enum peer_rate_report_cond_phy_type {
  18383. PEER_RATE_REPORT_COND_11B = 0,
  18384. PEER_RATE_REPORT_COND_11A_G,
  18385. PEER_RATE_REPORT_COND_11N,
  18386. PEER_RATE_REPORT_COND_11AC,
  18387. PEER_RATE_REPORT_COND_MAX_NUM
  18388. };
  18389. typedef struct {
  18390. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condition_fixed_param */
  18391. A_UINT32 enable_rate_report; /* 1= enable, 0=disable */
  18392. A_UINT32 report_backoff_time; /* in unit of msecond */
  18393. A_UINT32 report_timer_period; /* in unit of msecond */
  18394. /* In the following field, the array index means the phy type,
  18395. * please see enum peer_rate_report_cond_phy_type for detail */
  18396. report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
  18397. } wmi_peer_set_rate_report_condition_fixed_param;
  18398. /* Peer Type:
  18399. * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
  18400. * on address and vdev opmode. This is largely here to allow host to indicate that
  18401. * peer is explicitly a TDLS peer
  18402. */
  18403. enum wmi_peer_type {
  18404. WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
  18405. WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
  18406. WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
  18407. WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
  18408. WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
  18409. WMI_PEER_TYPE_TRANS_BSS = 5, /* For creating BSS peer when connecting with non-transmit AP */
  18410. WMI_PEER_TYPE_PASN = 6, /* Peer is used for Pre-Association Security Negotiation */
  18411. WMI_PEER_TYPE_BRIDGE = 7, /* For creating Dummy Peer in case of 4 Link MLO */
  18412. WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
  18413. /* Reserved from 128 - 255 for target internal use.*/
  18414. WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
  18415. };
  18416. /* this TLV structure used for providing mlo parameters on peer create */
  18417. typedef struct {
  18418. A_UINT32 tlv_header; /** TLV tag and len */
  18419. wmi_mlo_flags mlo_flags; /* only mlo enable flag need by STA mode peer create */
  18420. } wmi_peer_create_mlo_params;
  18421. typedef struct {
  18422. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
  18423. /** unique id identifying the VDEV, generated by the caller */
  18424. A_UINT32 vdev_id;
  18425. /** peer MAC address */
  18426. wmi_mac_addr peer_macaddr;
  18427. /** peer type: see enum values above */
  18428. A_UINT32 peer_type;
  18429. /* The TLVs follows this structure:
  18430. * wmi_peer_create_mlo_params mlo_params[]; <-- MLO flags on peer_create
  18431. * Optional TLV, only present for MLO peers.
  18432. * If the peer is non-MLO, the array length should be 0.
  18433. * Only mlo_enable flag required by MCC to decide MAC address to be used.
  18434. */
  18435. } wmi_peer_create_cmd_fixed_param;
  18436. /* this TLV structure is used for providing MLO parameters on peer delete */
  18437. typedef struct {
  18438. A_UINT32 tlv_header; /** TLV tag and len */
  18439. A_UINT32 mlo_hw_link_id_bitmap; /* Hardware link id of the link which has crashed or was not created in the first place */
  18440. wmi_mlo_flags mlo_flags; /* to indicate whether peer delete is due to link switch */
  18441. } wmi_peer_delete_mlo_params;
  18442. typedef struct {
  18443. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
  18444. /** unique id identifying the VDEV, generated by the caller */
  18445. A_UINT32 vdev_id;
  18446. /** peer MAC address */
  18447. wmi_mac_addr peer_macaddr;
  18448. /* The TLVs follows this structure:
  18449. * wmi_peer_delete_mlo_params mlo_params[]; <-- MLO flags on peer_delete
  18450. * Optional TLV, only present for MLO peers.
  18451. * If the peer is non-MLO, the array length should be 0.
  18452. * Used for Link peer deleted.
  18453. */
  18454. } wmi_peer_delete_cmd_fixed_param;
  18455. #define WMI_VDEV_ALL_PEER_MAX_BITMAP_WORD32 ((WMI_PEER_TYPE_HOST_MAX+31) / 32)
  18456. #define WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET(param, peer_type) \
  18457. WMI_SET_BITS(param[peer_type / 32], (peer_type % 32), 1, 1)
  18458. #define WMI_VDEV_DELETE_ALL_PEER_BITMAP_GET(param, peer_type) \
  18459. WMI_GET_BITS(param[peer_type / 32], (peer_type % 32), 1)
  18460. typedef struct {
  18461. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delete_all_peer_cmd_fixed_param */
  18462. /** unique id identifying the VDEV, generated by the caller */
  18463. A_UINT32 vdev_id;
  18464. /**
  18465. * Host can request for deletion of peers specific to wmi_peer_type
  18466. * through below bitmap.
  18467. * Macro's WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET &
  18468. * WMI_VDEV_DELETE_ALL_PEER_BITMAP_GET are used for accessing purpose.
  18469. * And if bitmap array is filled with zeros, firmware needs to delete
  18470. * all peers.
  18471. */
  18472. A_UINT32 peer_type_bitmap[WMI_VDEV_ALL_PEER_MAX_BITMAP_WORD32];
  18473. } wmi_vdev_delete_all_peer_cmd_fixed_param;
  18474. typedef struct {
  18475. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param */
  18476. A_UINT32 tlv_header;
  18477. /*
  18478. * Following this struct is the TLV:
  18479. * A_UINT32 peer_ids[]; <-- variable-length array of peer_ids
  18480. * that have been unmapped by the host
  18481. */
  18482. } wmi_peer_unmap_response_cmd_fixed_param;
  18483. typedef struct {
  18484. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
  18485. /** unique id identifying the VDEV, generated by the caller */
  18486. A_UINT32 vdev_id;
  18487. /** peer MAC address */
  18488. wmi_mac_addr peer_macaddr;
  18489. /**
  18490. * maximum block ack window size to use during a rx block ack negotiation,
  18491. * i.e. the maximum number of MPDUs per A-MPDU that will be received
  18492. */
  18493. A_UINT32 rx_block_ack_win_limit;
  18494. } wmi_peer_set_rx_blocksize_cmd_fixed_param;
  18495. typedef struct {
  18496. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
  18497. /** unique id identifying the VDEV, generated by the caller */
  18498. A_UINT32 vdev_id;
  18499. /** peer MAC address */
  18500. wmi_mac_addr peer_macaddr;
  18501. /** tid bitmap identifying the tids to flush */
  18502. A_UINT32 peer_tid_bitmap;
  18503. } wmi_peer_flush_tids_cmd_fixed_param;
  18504. typedef struct {
  18505. /** rate mode . 0: disable fixed rate (auto rate)
  18506. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  18507. * 2: ht20 11n rate specified as mcs index
  18508. * 3: ht40 11n rate specified as mcs index
  18509. */
  18510. A_UINT32 rate_mode;
  18511. /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  18512. * and series 3 is stored at byte 3 (MSB) */
  18513. A_UINT32 rate_series;
  18514. /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
  18515. * and retry count for rate 3 is stored at byte 3 (MSB) */
  18516. A_UINT32 rate_retries;
  18517. } wmi_fixed_rate;
  18518. typedef struct {
  18519. /** unique id identifying the VDEV, generated by the caller */
  18520. A_UINT32 vdev_id;
  18521. /** peer MAC address */
  18522. wmi_mac_addr peer_macaddr;
  18523. /** fixed rate */
  18524. wmi_fixed_rate peer_fixed_rate;
  18525. } wmi_peer_fixed_rate_cmd;
  18526. #define WMI_MGMT_TID 17
  18527. typedef struct {
  18528. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
  18529. /** unique id identifying the VDEV, generated by the caller */
  18530. A_UINT32 vdev_id;
  18531. /** peer MAC address */
  18532. wmi_mac_addr peer_macaddr;
  18533. } wmi_addba_clear_resp_cmd_fixed_param;
  18534. typedef struct {
  18535. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
  18536. /** unique id identifying the VDEV, generated by the caller */
  18537. A_UINT32 vdev_id;
  18538. /** peer MAC address */
  18539. wmi_mac_addr peer_macaddr;
  18540. /** Tid number */
  18541. A_UINT32 tid;
  18542. /** Buffer/Window size*/
  18543. A_UINT32 buffersize;
  18544. } wmi_addba_send_cmd_fixed_param;
  18545. typedef struct {
  18546. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
  18547. /** unique id identifying the VDEV, generated by the caller */
  18548. A_UINT32 vdev_id;
  18549. /** peer MAC address */
  18550. wmi_mac_addr peer_macaddr;
  18551. /** Tid number */
  18552. A_UINT32 tid;
  18553. /** Is Initiator */
  18554. A_UINT32 initiator;
  18555. /** Reason code */
  18556. A_UINT32 reasoncode;
  18557. } wmi_delba_send_cmd_fixed_param;
  18558. typedef struct {
  18559. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
  18560. /** unique id identifying the vdev, generated by the caller */
  18561. A_UINT32 vdev_id;
  18562. /** peer mac address */
  18563. wmi_mac_addr peer_macaddr;
  18564. /** Tid number */
  18565. A_UINT32 tid;
  18566. /** status code */
  18567. A_UINT32 statuscode;
  18568. } wmi_addba_setresponse_cmd_fixed_param;
  18569. typedef struct {
  18570. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
  18571. /** unique id identifying the vdev, generated by the caller */
  18572. A_UINT32 vdev_id;
  18573. /** peer mac address */
  18574. wmi_mac_addr peer_macaddr;
  18575. /** Tid number */
  18576. A_UINT32 tid;
  18577. } wmi_send_singleamsdu_cmd_fixed_param;
  18578. /* Type of Station DTIM Power Save method */
  18579. enum {
  18580. /* For NORMAL DTIM, the parameter is the number of beacon intervals and
  18581. * also the same value as the listen interval. For this method, the
  18582. * station will wake up based on the listen interval. If this
  18583. * listen interval is not equal to DTIM, then the station may
  18584. * miss certain DTIM beacons. If this value is 1, then the
  18585. * station will wake up for every beacon.
  18586. */
  18587. WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
  18588. /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
  18589. * When this value is 1, then the station will wake at every DTIM beacon.
  18590. * If this value is >1, then the station will skip certain DTIM beacons.
  18591. * This value is the multiple of DTIM intervals that the station will
  18592. * wake up to receive the DTIM beacons.
  18593. */
  18594. WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
  18595. };
  18596. /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
  18597. typedef struct {
  18598. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
  18599. /** unique id identifying the VDEV, generated by the caller */
  18600. A_UINT32 vdev_id;
  18601. /** Station DTIM Power Save method as defined above */
  18602. A_UINT32 dtim_pwrsave_method;
  18603. /** DTIM PS value. Contents depends on the method */
  18604. A_UINT32 value;
  18605. /** Modulated DTIM value */
  18606. A_UINT32 MaxLIModulatedDTIM;
  18607. } wmi_sta_dtim_ps_method_cmd_fixed_param;
  18608. /*
  18609. * For Station UAPSD Auto Trigger feature, the Firmware monitors the
  18610. * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
  18611. * If there is no uplink/download for the specified service interval (field service_interval),
  18612. * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
  18613. * specified in the UP (field user_priority).
  18614. * Firmware also monitors the responses for these QOS-NULL triggers.
  18615. * If the peer does not have any delivery frames, it will respond with
  18616. * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
  18617. * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
  18618. * are unused and should be set to 0.
  18619. * When service_interval is 0, then the firmware will not send any trigger frames. This is for
  18620. * certain host-based implementations that don't want this firmware offload.
  18621. * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
  18622. * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
  18623. * and rest of the AC default to 300 ms.
  18624. *
  18625. * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
  18626. * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
  18627. * the more advanced monitoring method.
  18628. * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
  18629. * suspend interval (field suspend_interval), firmware will change its auto trigger interval
  18630. * to delay interval (field delay_interval). This way, when there is no traffic, the station
  18631. * will save more power by waking up less and sending less trigger frames.
  18632. * The (service_interval < suspend_interval) and (service_interval < delay_interval).
  18633. * If this variable auto trigger is not required, then the suspend_interval and delay_interval
  18634. * should be 0.
  18635. */
  18636. typedef struct {
  18637. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
  18638. /** WMM Access category from 0 to 3 */
  18639. A_UINT32 wmm_ac;
  18640. /** User priority to use in trigger frames. It is the TID
  18641. * value. This field needs to be specified and may not be
  18642. * equivalent to AC since some implementation may use the TSPEC
  18643. * to enable UAPSD and negotiate a particular user priority. */
  18644. A_UINT32 user_priority;
  18645. /** service interval in ms */
  18646. A_UINT32 service_interval;
  18647. /** Suspend interval in ms */
  18648. A_UINT32 suspend_interval;
  18649. /** delay interval in ms */
  18650. A_UINT32 delay_interval;
  18651. } wmi_sta_uapsd_auto_trig_param;
  18652. typedef struct {
  18653. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
  18654. /** unique id identifying the VDEV, generated by the caller */
  18655. A_UINT32 vdev_id;
  18656. /** peer mac address */
  18657. wmi_mac_addr peer_macaddr;
  18658. /** Number of AC to specify */
  18659. A_UINT32 num_ac;
  18660. /*
  18661. * Following this struct is the TLV:
  18662. * wmi_sta_uapsd_auto_trig_param ac_param[]; <-- Variable number of AC parameters (defined by field num_ac)
  18663. */
  18664. } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
  18665. /** mimo powersave state */
  18666. #define WMI_PEER_MIMO_PS_STATE 0x1
  18667. /** enable/disable AMPDU . initial value (enabled) */
  18668. #define WMI_PEER_AMPDU 0x2
  18669. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  18670. #define WMI_PEER_AUTHORIZE 0x3
  18671. /** peer channel bandwidth */
  18672. #define WMI_PEER_CHWIDTH 0x4
  18673. /** peer NSS */
  18674. #define WMI_PEER_NSS 0x5
  18675. /** USE 4 ADDR */
  18676. #define WMI_PEER_USE_4ADDR 0x6
  18677. /* set group membership status */
  18678. #define WMI_PEER_MEMBERSHIP 0x7
  18679. #define WMI_PEER_USERPOS 0x8
  18680. /*
  18681. * A critical high-level protocol is being used with this peer. Target
  18682. * should take appropriate measures (if possible) to ensure more
  18683. * reliable link with minimal latency. This *may* include modifying the
  18684. * station power save policy, enabling more RX chains, increased
  18685. * priority of channel scheduling, etc.
  18686. *
  18687. * NOTE: This parameter should only be considered a hint as specific
  18688. * behavior will depend on many factors including current network load
  18689. * and vdev/peer configuration.
  18690. *
  18691. * For STA VDEV this peer corresponds to the AP's BSS peer.
  18692. * For AP VDEV this peer corresponds to the remote peer STA.
  18693. */
  18694. #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
  18695. /* set Tx failure count threshold for the peer - Currently unused */
  18696. #define WMI_PEER_TX_FAIL_CNT_THR 0xA
  18697. /* Enable H/W retry and Enable H/W Send CTS2S before Data */
  18698. #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
  18699. /* Set peer advertised IBSS atim window length */
  18700. #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
  18701. /** peer phy mode */
  18702. #define WMI_PEER_PHYMODE 0xD
  18703. /** Use FIXED Pwr */
  18704. #define WMI_PEER_USE_FIXED_PWR 0xE
  18705. /** Set peer fixed rate
  18706. * The top nibble is used to select which format to use for encoding
  18707. * the rate specification: 0xVXXXXXXX
  18708. * If V == 0b0000: format is same as before: 0x000000RR
  18709. * If V == 0b0001: format is: 0x1000RRRR.
  18710. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  18711. * The host shall use the new V1 format (and set V = 0x1) if the target
  18712. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  18713. * system is configured with Nss > 4 (either at compile time within the
  18714. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  18715. * by the target).
  18716. */
  18717. #define WMI_PEER_PARAM_FIXED_RATE 0xF
  18718. /** Allowlist peer TIDs */
  18719. #define WMI_PEER_SET_MU_ALLOWLIST 0x10
  18720. /* retain definition of deprecated prior name, for backwards compatibility */
  18721. #define WMI_PEER_SET_MU_WHITELIST WMI_PEER_SET_MU_ALLOWLIST
  18722. /** Set peer max tx rate (MCS) in adaptive rate ctrl */
  18723. #define WMI_PEER_SET_MAX_TX_RATE 0x11
  18724. /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
  18725. #define WMI_PEER_SET_MIN_TX_RATE 0x12
  18726. /**
  18727. * default ring routing for peer data packets,
  18728. * param_value = bit 0 for hash based routing enabled or not
  18729. * (value 1 is enabled, value 0 is disabled)
  18730. * bits 1:5 are for ring 32 (i.e. ring id value
  18731. * selected from 0 to 31 values)
  18732. * bits 6:7 are for LMAC/peer based routing.
  18733. * bit 8 for peer based ring selection enabled or not
  18734. * (value 1 is enabled, value 0 is disabled
  18735. * bits 9-15 are valid when bit 8 is set to 1)
  18736. * bit 9 is for ring selection enabled for filter-pass
  18737. * unicast or not (value 1 is enabled, value 0 is disabled)
  18738. * bit 10 is for ring selection enabled for filter-pass
  18739. * mcast or not (value 1 is enabled, value 0 is disabled)
  18740. * bit 11 is for ring selection enabled for filter-pass
  18741. * BAR or not (value 1 is enabled, value 0 is disabled)
  18742. * bit 12-14 is for source ring selection value
  18743. * (value 0 for wbm2rxdma buf ring,
  18744. * value 1 for fw2rxdma buf ring,
  18745. * value 2 for sw2rxdma buf ring,
  18746. * value 3 for no buf ring,
  18747. * value 4 for sw2rxdma_exception buf ring,
  18748. * value 5 for fw2rxdma buf ring)
  18749. * bit 15-17 is for destination ring selection value
  18750. * (value 0 for wbm release ring,
  18751. * value 1 for rxdma2fw ring,
  18752. * value 2 for rxdma2sw ring,
  18753. * value 3 for rxdma2reo ring,
  18754. * value 4 for rxdma2fw_pmac1_ring,
  18755. * value 5 for rxdma2reo_remote0_ring,
  18756. * value 6 for rxdma2reo_remote1_ring)
  18757. */
  18758. #define WMI_PEER_HASH_BASED_ROUTING_GET(value32) WMI_GET_BITS(value32, 0x0, 1)
  18759. #define WMI_PEER_ROUTING_RING_ID_GET(value32) WMI_GET_BITS(value32, 0x1, 5)
  18760. #define WMI_PEER_LMAC_BASED_ROUTING_GET(value32) WMI_GET_BITS(value32, 0x6, 2)
  18761. #define WMI_PEER_BASED_RING_SELECTION_GET(value32) WMI_GET_BITS(value32, 0x8, 1)
  18762. #define WMI_PEER_FILTER_PASS_UNICAST_GET(value32) WMI_GET_BITS(value32, 0x9, 1)
  18763. #define WMI_PEER_FILTER_PASS_MCAST_GET(value32) WMI_GET_BITS(value32, 0xA, 1)
  18764. #define WMI_PEER_FILTER_PASS_BAR_GET(value32) WMI_GET_BITS(value32, 0xB, 1)
  18765. #define WMI_PEER_FILTER_PASS_SRC_RING_VAL_GET(value32) WMI_GET_BITS(value32, 0xC, 3)
  18766. #define WMI_PEER_FILTER_PASS_DEST_RING_VAL_GET(value32) WMI_GET_BITS(value32, 0xF, 3)
  18767. #define WMI_PEER_SET_DEFAULT_ROUTING 0x13
  18768. /* peer NSS for VHT160 - Extended NSS support */
  18769. #define WMI_PEER_NSS_VHT160 0x14
  18770. /* peer NSS for VHT160 - Extended NSS support */
  18771. #define WMI_PEER_NSS_VHT80_80 0x15
  18772. /* Peer SU TXBF sounding interval */
  18773. #define WMI_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL 0x16
  18774. /* Peer MU TXBF sounding interval */
  18775. #define WMI_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL 0x17
  18776. /* Peer TXBF sounding enable or disable */
  18777. #define WMI_PEER_PARAM_TXBF_SOUNDING_ENABLE 0x18
  18778. /* Per peer 11ax OFDMA enable or disable */
  18779. #define WMI_PEER_PARAM_OFDMA_ENABLE 0x19
  18780. /* Per peer 11ax/11ac MU enable or disable */
  18781. #define WMI_PEER_PARAM_MU_ENABLE 0x1a
  18782. /** Set peer fixed rate used in UL Trigger
  18783. * The top nibble is used to select which format to use for encoding
  18784. * the rate specification: 0xVXXXXXXX, V must be 1 for this parameter.
  18785. * If V == 0b0001: format is: 0x1000RRRR.
  18786. * ("RRRR" rate code already has those preamble bits,
  18787. * which can specify EHT or HE)
  18788. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  18789. *
  18790. * This parameter controls the UL OFDMA and UL MU-MIMO peer fixed rate.
  18791. */
  18792. #define WMI_PEER_PARAM_UL_FIXED_RATE 0x1b
  18793. /** send specific OMI to peer via QoS-null frame
  18794. * param_value = follow 11ax spec definition
  18795. * bit0:VHT(1), bit1:HE(1), bit2-31:A-Control
  18796. */
  18797. #define WMI_PEER_PARAM_XMIT_OMI 0x1c
  18798. #define WMI_PEER_RARAM_XMIT_OMI WMI_PEER_PARAM_XMIT_OMI /* alias due to prior typo */
  18799. /* Disable burst and assist */
  18800. #define WMI_PEER_PARAM_DISABLE_AGGRESSIVE_TX 0x1d
  18801. /* Enable 11r FT Roaming */
  18802. #define WMI_PEER_PARAM_ENABLE_FT 0x1e
  18803. /* update peer flag for ptk 4 way handshake */
  18804. #define WMI_PEER_PARAM_NEED_PTK_4_WAY 0x1f
  18805. /* update peer flag for gtk 2 way handshake */
  18806. #define WMI_PEER_PARAM_NEED_GTK_2_WAY 0x20
  18807. /* update peer flag for M4 sent */
  18808. #define WMI_PEER_PARAM_M4_SENT 0x21
  18809. /* Per peer MISC stats enable or disable */
  18810. #define WMI_PEER_PARAM_MISC_STATS_ENABLE 0x22
  18811. /* Per peer FW congestion enable or disable:
  18812. * A parameter value of 1 will disable FW tx congestion control for the peer,
  18813. * a parameter value 0f 0 will enable FW tx congestion control for the peer.
  18814. */
  18815. #define WMI_PEER_PARAM_FW_CONGESTION_DISABLE 0x23
  18816. /* Per peer dynamically change max Nss limit in supported tx modes.
  18817. * Whereas WMI_PEER_NSS cmd needs to reset PER tables and start peer rate
  18818. * control again.
  18819. * Currently supported only for 2x2 case, and also only supports setting
  18820. * all NSS up to current NSS.
  18821. * Mask is used so we can extend in future if needed.
  18822. *
  18823. * Expected values in bits:
  18824. * 00: Use autorate
  18825. * 01: Enable only 1SS
  18826. * 10: Enable only 2SS
  18827. * 11: Disable NSS clamp feature or Fallback to autorate
  18828. */
  18829. #define WMI_PEER_PARAM_DYN_NSS_EN_MASK 0x24
  18830. /* Per peer enable/disable RTS/CTS for unicast management frames.
  18831. * Enabling RTS/CTS only applicable after association process of the peer.
  18832. * Currently supported for spruce(2x2) chipset.
  18833. * Expected values:
  18834. * 0 : Disable RTS/CTS for unicast management frames.
  18835. * 1 : Enable RTS/CTS for unicast management frames.
  18836. */
  18837. #define WMI_PEER_PARAM_EN_RTSCTS_FOR_UNICAST_MGMT 0x25
  18838. /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
  18839. #define WMI_PEER_MIMO_PS_NONE 0x0
  18840. #define WMI_PEER_MIMO_PS_STATIC 0x1
  18841. #define WMI_PEER_MIMO_PS_DYNAMIC 0x2
  18842. /*
  18843. * Each bit indicates one 20 MHz subchannel is punctured or not.
  18844. * A bit in the bitmap is set to 1 to indicate that the corresponding 20 MHz
  18845. * subchannel is not punctured and is set to 0 to indicate that it is punctured.
  18846. */
  18847. #define WMI_PEER_PUNCTURE_20MHZ_BITMAP 0x26
  18848. #define WMI_PEER_CHWIDTH_PUNCTURE_BITMAP_GET_CHWIDTH(value32) WMI_GET_BITS(value32, 0x0, 8)
  18849. #define WMI_PEER_CHWIDTH_PUNCTURE_BITMAP_GET_PUNCTURE_BMAP(value32) WMI_GET_BITS(value32, 0x8, 16)
  18850. /*
  18851. * peer channel bandwidth and puncture_bitmap
  18852. * BIT 0-7 - Peer channel width
  18853. * This bitfield holds a wmi_channel_width enum value.
  18854. * BIT 8-23 - Peer Puncture bitmap where each bit indicates whether
  18855. * a 20 MHz BW is punctured.
  18856. * The variable should be read from left, LSb (bit 8) will
  18857. * represent the lowest-frequency 20 MHz portion.
  18858. * Bit value: 0 - 20 MHz channel is punctured, 1 - not punctured
  18859. */
  18860. #define WMI_PEER_CHWIDTH_PUNCTURE_20MHZ_BITMAP 0x27
  18861. #define WMI_PEER_SET_TX_POWER 0x28
  18862. #define WMI_PEER_FT_ROAMING_PEER_UPDATE 0x29
  18863. #define WMI_PEER_PARAM_DMS_SUPPORT 0x2A
  18864. #define WMI_PEER_PARAM_UL_OFDMA_RTD 0x2B
  18865. typedef struct {
  18866. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
  18867. /** unique id identifying the VDEV, generated by the caller */
  18868. A_UINT32 vdev_id;
  18869. /** peer MAC address */
  18870. wmi_mac_addr peer_macaddr;
  18871. /** parameter id */
  18872. A_UINT32 param_id;
  18873. /** parameter value */
  18874. A_UINT32 param_value;
  18875. } wmi_peer_set_param_cmd_fixed_param;
  18876. typedef union {
  18877. /*
  18878. * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
  18879. * by the target or a little-endian host.
  18880. * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
  18881. * macros on the A_UINT32 "value" field.
  18882. */
  18883. struct {
  18884. A_UINT16 mode; /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
  18885. A_UINT16 tx_rate; /* see per-mode specs below */
  18886. };
  18887. A_UINT32 value; /* for use by big-endian host */
  18888. } wmi_peer_max_min_tx_rate;
  18889. /*
  18890. * Any access to the mode/tx_rate in an big endian system should use
  18891. * the below Macros on the wmi_peer_max_min_tx_rate.value field.
  18892. */
  18893. #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
  18894. #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
  18895. #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
  18896. #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
  18897. /* CCK max/min tx Rate description
  18898. * tx_rate = 0: 1 Mbps
  18899. * tx_rate = 1: 2 Mbps
  18900. * tx_rate = 2: 5.5 Mbps
  18901. * tx_rate = 3: 11 Mbps
  18902. * tx_rate = else: invalid
  18903. */
  18904. enum {
  18905. WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate available */
  18906. WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate available */
  18907. WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate available */
  18908. WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate available */
  18909. WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
  18910. };
  18911. /* OFDM max/min tx Rate description
  18912. * tx_rate = 0: 6 Mbps
  18913. * tx_rate = 1: 9 Mbps
  18914. * tx_rate = 2: 12 Mbps
  18915. * tx_rate = 3: 18 Mbps
  18916. * tx_rate = 4: 24 Mbps
  18917. * tx_rate = 5: 32 Mbps
  18918. * tx_rate = 6: 48 Mbps
  18919. * tx_rate = 7: 54 Mbps
  18920. * tx_rate = else: invalid
  18921. */
  18922. enum {
  18923. WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate available */
  18924. WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate available */
  18925. WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate available */
  18926. WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate available */
  18927. WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate available */
  18928. WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate available */
  18929. WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate available */
  18930. WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate available */
  18931. WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
  18932. };
  18933. /* HT max/min tx rate description
  18934. * tx_rate = 0~7 : MCS Rate 0~7
  18935. * tx_rate=else : invalid.
  18936. */
  18937. #define WMI_MAX_HT_TX_MCS 0x07
  18938. /* VHT max/min tx rate description
  18939. * tx_rate = 0~9 : MCS Rate 0~9
  18940. * tx_rate=else : invalid.
  18941. */
  18942. #define WMI_MAX_VHT_TX_MCS 0x09
  18943. #define MAX_SUPPORTED_RATES 128
  18944. typedef struct {
  18945. /** total number of rates */
  18946. A_UINT32 num_rates;
  18947. /**
  18948. * rates (each 8bit value) packed into a 32 bit word.
  18949. * the rates are filled from least significant byte to most
  18950. * significant byte.
  18951. */
  18952. A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
  18953. } wmi_rate_set;
  18954. /* NOTE: It would bea good idea to represent the Tx MCS
  18955. * info in one word and Rx in another word. This is split
  18956. * into multiple words for convenience
  18957. */
  18958. typedef struct {
  18959. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
  18960. A_UINT32 rx_max_rate; /* Max Rx data rate */
  18961. A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
  18962. A_UINT32 tx_max_rate; /* Max Tx data rate */
  18963. /*
  18964. * bit [15:0] indicates MCS 0 to 9
  18965. * bit [23:16] indicates MCS 10 & 11
  18966. * bit [24] indicates whether MCS 10 & 11 is notified in bit [23:16]
  18967. */
  18968. A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
  18969. A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
  18970. } wmi_vht_rate_set;
  18971. /* NOTE: It would bea good idea to represent the Tx MCS
  18972. * info in one word and Rx in another word. This is split
  18973. * into multiple words for convenience
  18974. * 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
  18975. */
  18976. typedef struct {
  18977. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_he_rate_set */
  18978. /* HE Supported MCS Set field Rx
  18979. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  18980. * value 0 - MCS 0-7 enabled for this NSS
  18981. * value 1 - MCS 0-9 enabled for this NSS
  18982. * value 2 - MCS 0-11 enabled for this NSS
  18983. * value 3 - NSS disabled
  18984. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  18985. */
  18986. A_UINT32 rx_mcs_set; /* Negotiated RX HE rates (i.e. rate this node can RX from peer)*/
  18987. /* HE Supported MCS Set field Tx
  18988. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  18989. * value 0 - MCS 0-7 enabled for this NSS
  18990. * value 1 - MCS 0-9 enabled for this NSS
  18991. * value 2 - MCS 0-11 enabled for this NSS
  18992. * value 3 - NSS disabled
  18993. * WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  18994. *
  18995. * - 8 bits x 2 are used for each Nss value for 2 categories of bandwidths,
  18996. * to indicate whether MCS 12 and 13 are enabled.
  18997. * Bits [16:23] used for checking if MCS 12/13 is enabled for a
  18998. * particular NSS (BW <= 80MHz)
  18999. * Bits [24:31] used for checking if MCS 12/13 is enabled for a
  19000. * particular NSS (BW > 80MHz)
  19001. * The WMI_HE_EXTRA_MCS_SS_[GET,SET] macros can be used for accessing
  19002. * these bit-fields.
  19003. */
  19004. A_UINT32 tx_mcs_set; /* Negotiated TX HE rates(i.e. rate this node can TX to peer) */
  19005. } wmi_he_rate_set;
  19006. typedef struct {
  19007. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_eht_rate_set */
  19008. /*
  19009. * B0-B3 indicates max NSS that supports mcs 0-7
  19010. * B4-B7 indicates max NSS that supports mcs 8-9
  19011. * B8-B11 indicates max NSS that supports mcs 10-11
  19012. * B12-B15 indicates max NSS that supports mcs 12-13
  19013. * B16-B31 reserved
  19014. */
  19015. A_UINT32 rx_mcs_set; /* Rx max NSS set */
  19016. A_UINT32 tx_mcs_set; /* Tx max NSS set */
  19017. } wmi_eht_rate_set;
  19018. /*
  19019. * IMPORTANT: Make sure the bit definitions here are consistent
  19020. * with the ni_flags definitions in wlan_peer.h
  19021. */
  19022. #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
  19023. #define WMI_PEER_QOS 0x00000002 /* QoS enabled */
  19024. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
  19025. #define WMI_PEER_GK_INST 0x00000008 /* group Key Installed */
  19026. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
  19027. #define WMI_PEER_PRIV 0x00000020 /* Encryption Enabled */
  19028. #define WMI_PEER_PK_INST 0x00000040 /* Pairwise Key Installed */
  19029. #define WMI_PEER_TKIP_CM_ENABLED 0x00000080 /* TKIP CounterMeasures */
  19030. #define WMI_PEER_SW_DEMIC_FRAG 0x00000100 /* S/W Demic of Frag Train */
  19031. #define WMI_PEER_CCX_ENABLED 0x00000200 /* CCX enabled */
  19032. #define WMI_PEER_HE 0x00000400 /* HE Enabled */
  19033. #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
  19034. #define WMI_PEER_HT 0x00001000 /* HT enabled */
  19035. #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
  19036. #define WMI_PEER_INTER_BSS_PEER 0x00004000 /* Inter BSS peer */
  19037. #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
  19038. #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
  19039. #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
  19040. #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
  19041. #define WMI_PEER_DIS_MIMOPS 0x00080000 /* MIMO PS DISABLED */
  19042. #define WMI_PEER_SPATIAL_EXP 0x00100000 /* Enable spatial expansion for
  19043. * single stream rates to avoid
  19044. * unintentional beamforming */
  19045. #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
  19046. #define WMI_PEER_TWT_REQ 0x00400000 /* TWT Requester Support bit in Extended Capabilities element */
  19047. #define WMI_PEER_TWT_RESP 0x00800000 /* TWT Responder Support bit in Extended Capabilities element */
  19048. #define WMI_PEER_MULTI_BSSID 0x01000000 /* Multiple BSSID Support bit in Extended Capabilities element */
  19049. #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
  19050. #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
  19051. #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
  19052. #define WMI_PEER_F_PS_PRESEND_REQUIRED 0x10000000 /* Use this flag to avoid calling powersave API when STA is awake */
  19053. #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
  19054. #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
  19055. #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
  19056. /** define for peer_flags_ext */
  19057. #define WMI_PEER_EXT_EHT 0x00000001 /* EHT enabled */
  19058. #define WMI_PEER_EXT_320MHZ 0x00000002 /* 320Mhz enabled */
  19059. #define WMI_PEER_EXT_DMS_CAPABLE 0x00000004
  19060. #define WMI_PEER_EXT_HE_CAPS_6GHZ_VALID 0x00000008 /* param he_caps_6ghz is valid or not */
  19061. #define WMI_PEER_EXT_IS_QUALCOMM_NODE 0x00000010 /* Indicates if the peer connecting is a qualcomm node */
  19062. #define WMI_PEER_EXT_IS_MESH_NODE 0x00000020 /* Indicates if the peer connecting is a mesh node */
  19063. #define WMI_PEER_EXT_F_CRIT_PROTO_HINT_ENABLED 0x40000000
  19064. /**
  19065. * Peer rate capabilities.
  19066. *
  19067. * This is of interest to the ratecontrol
  19068. * module which resides in the firmware. The bit definitions are
  19069. * consistent with that defined in if_athrate.c.
  19070. *
  19071. * @todo
  19072. * Move this to a common header file later so there is no need to
  19073. * duplicate the definitions or maintain consistency.
  19074. */
  19075. #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
  19076. #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
  19077. #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  19078. #define WMI_RC_HT_FLAG 0x08 /* HT */
  19079. #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  19080. #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  19081. #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
  19082. #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  19083. #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  19084. #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  19085. #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
  19086. #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  19087. enum WMI_PEER_STA_TYPE {
  19088. WMI_PEER_STA_TYPE_INVALID = 0, /* Invalid type*/
  19089. WMI_PEER_STA_TYPE_ONLY_STAVDEV = 1, /* AP has only STAVDEV and APVDEV is not present on any radio */
  19090. WMI_PEER_STA_TYPE_APVDEV_ON_OTHER_RADIO = 2, /* AP has STAVDEV on one radio and APVDEV on other radios */
  19091. WMI_PEER_STA_TYPE_FH_APVDEV_ON_SAME_RADIO = 3, /* AP has STAVDEV and APVDEV on same radio. During STAVDEV connection,
  19092. * no repeater client is connected with this repeater APVDEV
  19093. */
  19094. WMI_PEER_STA_TYPE_BH_APVDEV_ON_SAME_RADIO = 4, /* AP has STAVDEV and APVDEV on same radio. During STAVDEV connection,
  19095. * at least one repeater client is connected with this repeater APVDEV
  19096. * (daisy chain config)
  19097. */
  19098. };
  19099. #define WMI_PEER_STA_TYPE_GET(dword) WMI_GET_BITS(dword, 0, 8)
  19100. #define WMI_PEER_STA_TYPE_SET(dword, value) WMI_SET_BITS(dword, 0, 8, value)
  19101. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS (0)
  19102. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_MASK (0x1 << WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS)
  19103. #define WMI_PEER_ASSOC_SET_BSS_MAX_IDLE_OPTION(_dword, _val) \
  19104. WMI_SET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS, 1, _val)
  19105. #define WMI_PEER_ASSOC_GET_BSS_MAX_IDLE_OPTION(_dword) \
  19106. WMI_GET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS, 1)
  19107. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS (16)
  19108. #define WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_MASK (0xFFFF << WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS)
  19109. #define WMI_PEER_ASSOC_SET_BSS_MAX_IDLE_PERIOD(_dword, _val) \
  19110. WMI_SET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS, 16, _val)
  19111. #define WMI_PEER_ASSOC_GET_BSS_MAX_IDLE_PERIOD(_dword) \
  19112. WMI_GET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS, 16)
  19113. typedef struct {
  19114. A_UINT32 tlv_header; /** TLV tag (MITLV_TAG_STRUC_wmi_peer_assoc_mlo_partner_link_params) and len */
  19115. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller. Set to 0xFFFFFFFF if no vdev is allocated. */
  19116. A_UINT32 hw_mld_link_id; /** Unique link id across SOCs, got as part of QMI handshake. */
  19117. wmi_mlo_flags mlo_flags; /** MLO flags */
  19118. A_UINT32 logical_link_index; /** Unique index for links of the mlo. Starts with Zero */
  19119. A_UINT32 ieee_link_id; /*link id in the 802.11 frames*/
  19120. wmi_mac_addr bss_id;
  19121. wmi_channel wmi_chan;
  19122. wmi_mac_addr self_mac;
  19123. } wmi_peer_assoc_mlo_partner_link_params;
  19124. /* This TLV structure used to pass mlo Parameters on peer assoc, only apply for mlo-peers */
  19125. typedef struct {
  19126. A_UINT32 tlv_header; /** TLV tag and len; */
  19127. /** MLO flags */
  19128. wmi_mlo_flags mlo_flags;
  19129. /** MLD MAC address */
  19130. wmi_mac_addr mld_macaddr;
  19131. /** Unique index for links of the mlo. Starts with Zero */
  19132. A_UINT32 logical_link_index;
  19133. /** ML Peer ID
  19134. * In WIN systems, mld_peer_id is generated by Host.
  19135. * In MCL systems, mld_peer_id will be set to invalid peer id.
  19136. */
  19137. A_UINT32 mld_peer_id;
  19138. /** Link-ID of the AP to which STA is associated */
  19139. A_UINT32 ieee_link_id;
  19140. /** eMLSR transition timeout in microseconds */
  19141. A_UINT32 emlsr_trans_timeout_us;
  19142. /** eMLSR transition delay in microseconds */
  19143. A_UINT32 emlsr_trans_delay_us;
  19144. /** eMLSR padding delay in microseconds */
  19145. A_UINT32 emlsr_padding_delay_us;
  19146. union {
  19147. /** Medium Synchronization Duration field in units of 32 microseconds */
  19148. A_UINT32 msd_dur_subfield;
  19149. /** DEPRECATED - DO NOT USE.
  19150. * Medium Synchronization Duration in microseconds */
  19151. A_UINT32 msd_dur_us;
  19152. };
  19153. /** Medium Synchronization OFDM ED Threshold */
  19154. A_UINT32 msd_ofdm_ed_thr;
  19155. /** Medium Synchronization Max Num of TXOPs */
  19156. A_UINT32 msd_max_num_txops;
  19157. /** max_num_simultaneous_links:
  19158. * The maximum number of affiliated STAs in the non-AP MLD that
  19159. * support simultaneous transmission or reception of frames.
  19160. */
  19161. A_UINT32 max_num_simultaneous_links;
  19162. /** NSTR indication bitmap received in assoc req */
  19163. A_UINT32 nstr_indication_bitmap;
  19164. /** max num of active links recommended by AP or applications */
  19165. A_UINT32 recommended_max_num_simultaneous_links;
  19166. } wmi_peer_assoc_mlo_params;
  19167. typedef struct {
  19168. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_tid_to_link_map */
  19169. A_UINT32 tlv_header;
  19170. /**
  19171. * A_UINT32
  19172. * WMI_TID_TO_LINK_MAP_TID_NUM_GET / WMI_TID_TO_LINK_MAP_TID_NUM_SET
  19173. * tid_num:5,
  19174. *
  19175. * WMI_TID_TO_LINK_MAP_DIR_GET / WMI_TID_TO_LINK_MAP_DIR_SET
  19176. * dir:2, // 0 - DL, 1 - UL, 2 - BiDi
  19177. *
  19178. * WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET /
  19179. * WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET
  19180. * default_link_mapping:1, // If this is set to 1, ignore
  19181. * // link_mapping_mask for the specific tid
  19182. *
  19183. * WMI_TID_TO_LINK_MAP_LINK_MASK_GET / WMI_TID_TO_LINK_MAP_LINK_MASK_SET
  19184. * link_mapping_mask:16,
  19185. *
  19186. * rsvd:8;
  19187. */
  19188. A_UINT32 tid_to_link_map_info;
  19189. } wmi_peer_assoc_tid_to_link_map;
  19190. #define WMI_PDEV_MESH_RX_FILTER_GET(enable) WMI_GET_BITS(enable,0,1)
  19191. #define WMI_PDEV_MESH_RX_FILTER_SET(enable,value) WMI_SET_BITS(enable,0,1,value)
  19192. typedef struct {
  19193. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_mesh_rx_filter_enable_fixed_param **/
  19194. A_UINT32 tlv_header;
  19195. A_UINT32 pdev_id;
  19196. union {
  19197. struct {
  19198. A_UINT32 enable: 1, /** denotes enable/disable mesh rx filter, refer to WMI_PDEV_MESH_RX_FILTER_GET/SET macros */
  19199. reserved: 31;
  19200. };
  19201. A_UINT32 enable_word32;
  19202. };
  19203. /** Mac_Add for the RX filter **/
  19204. wmi_mac_addr link_macaddr;
  19205. } wmi_pdev_mesh_rx_filter_enable_fixed_param;
  19206. /*
  19207. * PEER assoc_flags for assoc complete:
  19208. * Bit 0: Set for peer data flush
  19209. */
  19210. #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA 0x00000001
  19211. #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA_GET(assoc_flags) WMI_GET_BITS(assoc_flags, 0, 1)
  19212. #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA_SET(assoc_flags, value) WMI_GET_BITS(assoc_flags, 0, 1, value)
  19213. typedef struct {
  19214. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
  19215. /** peer MAC address */
  19216. wmi_mac_addr peer_macaddr;
  19217. /** VDEV id */
  19218. A_UINT32 vdev_id;
  19219. /** assoc = 1 reassoc = 0 */
  19220. A_UINT32 peer_new_assoc;
  19221. /** peer associd (16 bits) */
  19222. A_UINT32 peer_associd;
  19223. /** peer station flags: see definition above */
  19224. A_UINT32 peer_flags;
  19225. /** negotiated capabilities (lower 16 bits)*/
  19226. A_UINT32 peer_caps;
  19227. /** Listen interval */
  19228. A_UINT32 peer_listen_intval;
  19229. /** HT capabilities of the peer */
  19230. A_UINT32 peer_ht_caps;
  19231. /** maximum rx A-MPDU length */
  19232. A_UINT32 peer_max_mpdu;
  19233. /** mpdu density of the peer in usec(0 to 16) */
  19234. A_UINT32 peer_mpdu_density;
  19235. /** peer rate capabilities see flags above */
  19236. A_UINT32 peer_rate_caps;
  19237. /** num spatial streams */
  19238. A_UINT32 peer_nss;
  19239. /** VHT capabilities of the peer */
  19240. A_UINT32 peer_vht_caps;
  19241. /** phy mode */
  19242. A_UINT32 peer_phymode;
  19243. /** HT Operation Element of the peer. Five bytes packed in 2
  19244. * INT32 array and filled from lsb to msb.
  19245. * Note that the size of array peer_ht_info[] cannotbe changed
  19246. * without breaking WMI Compatibility. */
  19247. A_UINT32 peer_ht_info[2];
  19248. /** total number of negotiated legacy rate set. Also the sizeof
  19249. * peer_legacy_rates[] */
  19250. A_UINT32 num_peer_legacy_rates;
  19251. /** total number of negotiated ht rate set. Also the sizeof
  19252. * peer_ht_rates[] */
  19253. A_UINT32 num_peer_ht_rates;
  19254. /**
  19255. * Bitmap providing the mapping of bandwidths to max Rx NSS for this peer
  19256. * in VHT160 / VHT80+80 Mode.
  19257. * As per the New IEEE 802.11 Update, the AP & Peer could advertise and
  19258. * handshake with the Max Rx NSS differing for different bandwidths
  19259. * instead of a single max Rx NSS Value.
  19260. * Some QCA chipsets have to advertise a different max Rx NSS value for
  19261. * 160 MHz and 80MHz.
  19262. *
  19263. * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
  19264. * bit[5:3] : Represents value of Rx NSS for VHT 80_80 MHz -
  19265. * Extended NSS support
  19266. * bit[30:6]: Reserved
  19267. * bit[31] : MSB(0/1): 1 in case of valid data sent from Host
  19268. */
  19269. A_UINT32 peer_bw_rxnss_override;
  19270. /* 802.11ax capabilities */
  19271. wmi_ppe_threshold peer_ppet;
  19272. A_UINT32 peer_he_cap_info; /* protocol-defined HE / 11ax capability flags */
  19273. A_UINT32 peer_he_ops; /* HE operation contains BSS color */
  19274. A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
  19275. A_UINT32 peer_he_mcs; /* Indicates number of HE MCS TLV present */
  19276. /* 2nd DWORD of 11ax MAC Capabilities */
  19277. A_UINT32 peer_he_cap_info_ext;
  19278. /*
  19279. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  19280. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  19281. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  19282. * bit[4:3] : Indicates support for DL OFDMA
  19283. * Refer to enum WMI_HE_RX_DL_OFDMA_SUPPORT_x
  19284. * bit[6:5] : Indicates support for DL MU-MIMO
  19285. * Refer to enum WMI_HE_RX_DL_MUMIMO_SUPPORT_x
  19286. * bit[31:7] : Reserved
  19287. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  19288. */
  19289. A_UINT32 peer_he_cap_info_internal;
  19290. /* min data rate to be used in Mbps */
  19291. A_UINT32 min_data_rate;
  19292. /** HE 6 GHz Band Capabilities of the peer.
  19293. * (Defined in 9.4.2.261 HE 6 GHz Band Capabilities element in
  19294. * 802.11ax_D5.0.)
  19295. * valid when WMI_PEER_HE is set and WMI_PEER_VHT/HT are not set.
  19296. */
  19297. A_UINT32 peer_he_caps_6ghz;
  19298. /* bit[0-7] : sta_type
  19299. * bit[8-31]: reserved
  19300. * Refer to enum WMI_PEER_STA_TYPE for sta_type values.
  19301. * Refer to WMI_PEER_STA_TYPE_GET/SET macros.
  19302. */
  19303. A_UINT32 sta_type;
  19304. /*
  19305. * @bss_max_idle_option - Parameters exchanged for BSS Max Idle capability.
  19306. * bit 0 : If set, only a protected frame indicates activity.
  19307. * If cleared, either an unprotected or a protected frame
  19308. * indicates activity.
  19309. * Refer to the WMI_PEER_ASSOC_[SET,GET]_BSS_MAX_IDLE_OPTION
  19310. * macros.
  19311. * bit [1:15] : Reserved
  19312. * bit [16:31] : Max idle period in units of 1000 TUs
  19313. * Refer to the WMI_PEER_ASSOC_[SET,GET]_BSS_MAX_IDLE_PERIOD
  19314. * macros.
  19315. */
  19316. A_UINT32 bss_max_idle_option;
  19317. /*
  19318. * Connected AP auth mode values are from WMI_AUTH_ enum.
  19319. * The target shall ignore an auth_mode value of 0 / WMI_AUTH_NONE,
  19320. * due to ambiguity whether a zero value was provided explicitly or
  19321. * simply as a default.
  19322. */
  19323. A_UINT32 auth_mode;
  19324. /* Refer to WMI_PEER_EXT_xxx defs */
  19325. A_UINT32 peer_flags_ext;
  19326. /* 802.11be capabilities and other params */
  19327. A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20Mhz bw puntured */
  19328. /* EHT mac capabilities from BSS beacon EHT cap IE, total WMI_MAX_EHTCAP_MAC_SIZE*A_UINT32 bits */
  19329. A_UINT32 peer_eht_cap_mac[WMI_MAX_EHTCAP_MAC_SIZE];
  19330. /* EHT phy capabilities from BSS beacon EHT cap IE, total WMI_MAX_EHTCAP_PHY_SIZE*A_UINT32 bits */
  19331. A_UINT32 peer_eht_cap_phy[WMI_MAX_EHTCAP_PHY_SIZE];
  19332. A_UINT32 peer_eht_ops;
  19333. wmi_ppe_threshold peer_eht_ppet;
  19334. A_UINT32 assoc_flags;
  19335. /* Following this struct are the TLV's:
  19336. * A_UINT8 peer_legacy_rates[];
  19337. * A_UINT8 peer_ht_rates[];
  19338. * wmi_vht_rate_set peer_vht_rates; <-- VHT capabilities of the peer
  19339. * WMI_he_rate_set_peer_he_rates; <-- HE capabilities of the peer
  19340. * wmi_peer_assoc_mlo_params mlo_params[0,1]; <-- MLO parameters opt. TLV
  19341. * Only present for MLO peers.
  19342. * For non-MLO peers the array length should be 0.
  19343. * wmi_eht_rate_set peer_eht_rates; <-- EHT capabilities of the peer
  19344. * wmi_peer_assoc_mlo_partner_link_params link_info[] <-- partner link info
  19345. * wmi_peer_assoc_tid_to_link_map[] <-- tid to link_map info
  19346. */
  19347. } wmi_peer_assoc_complete_cmd_fixed_param;
  19348. typedef struct {
  19349. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_ap_oper_bw_cmd_fixed_param */
  19350. A_UINT32 vdev_id;
  19351. A_UINT32 ap_phymode; /* contains a WLAN_PHY_MODE value */
  19352. } wmi_vdev_report_ap_oper_bw_cmd_fixed_param;
  19353. /* WDS Entry Flags */
  19354. #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
  19355. typedef struct {
  19356. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
  19357. /** peer MAC address */
  19358. wmi_mac_addr peer_macaddr;
  19359. /** wds MAC addr */
  19360. wmi_mac_addr wds_macaddr;
  19361. /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
  19362. A_UINT32 flags;
  19363. A_UINT32 vdev_id;
  19364. } wmi_peer_add_wds_entry_cmd_fixed_param;
  19365. #define WMI_CHAN_INFO_START_RESP 0
  19366. #define WMI_CHAN_INFO_END_RESP 1
  19367. /* deprecated but maintained as aliases: old names containing typo */
  19368. #define WMI_CHAN_InFO_START_RESP WMI_CHAN_INFO_START_RESP
  19369. #define WMI_CHAN_InFO_END_RESP WMI_CHAN_INFO_END_RESP
  19370. /* end deprecated */
  19371. #define WMI_CHAN_INFO_ENTRY_RESP 2
  19372. typedef struct {
  19373. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
  19374. /** wds MAC addr */
  19375. wmi_mac_addr wds_macaddr;
  19376. A_UINT32 vdev_id;
  19377. } wmi_peer_remove_wds_entry_cmd_fixed_param;
  19378. typedef struct {
  19379. /** peer MAC address */
  19380. wmi_mac_addr peer_macaddr;
  19381. } wmi_peer_q_empty_callback_event;
  19382. /*
  19383. * Command to update an already existing WDS entry. Different address setting
  19384. * combinations are possible.
  19385. *
  19386. * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
  19387. * Valid wds and null peer -> Associated WDS entry flags will be updated.
  19388. * Null wds and Valid peer -> Flags will be updated for all WDS entries behind the peer.
  19389. * Null wds and peer -> Flags will be updated for all WDS entries.
  19390. */
  19391. typedef struct {
  19392. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param */
  19393. /** peer MAC address */
  19394. wmi_mac_addr peer_macaddr;
  19395. /** wds MAC addr */
  19396. wmi_mac_addr wds_macaddr;
  19397. /* Flags associated with WDS entry */
  19398. A_UINT32 flags;
  19399. A_UINT32 vdev_id;
  19400. } wmi_peer_update_wds_entry_cmd_fixed_param;
  19401. /**
  19402. * Channel info WMI event
  19403. */
  19404. typedef struct {
  19405. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
  19406. /** Error code */
  19407. A_UINT32 err_code;
  19408. /** Channel freq */
  19409. A_UINT32 freq;
  19410. /** Read flags */
  19411. A_UINT32 cmd_flags;
  19412. /** Noise Floor value */
  19413. A_UINT32 noise_floor;
  19414. /** rx clear count */
  19415. A_UINT32 rx_clear_count;
  19416. /** cycle count */
  19417. A_UINT32 cycle_count;
  19418. /** channel tx power per range in 0.5dBm steps */
  19419. A_UINT32 chan_tx_pwr_range;
  19420. /** channel tx power per throughput */
  19421. A_UINT32 chan_tx_pwr_tp;
  19422. /** rx frame count (cumulative) */
  19423. A_UINT32 rx_frame_count;
  19424. /** BSS rx cycle count */
  19425. A_UINT32 my_bss_rx_cycle_count;
  19426. /** b-mode data rx time (units are microseconds) */
  19427. A_UINT32 rx_11b_mode_data_duration;
  19428. /** tx frame count */
  19429. A_UINT32 tx_frame_cnt;
  19430. /** mac clock */
  19431. A_UINT32 mac_clk_mhz;
  19432. /** unique id identifying the VDEV */
  19433. A_UINT32 vdev_id;
  19434. /**
  19435. * Noise Floor value for all chain in dBm.
  19436. * If per_chain_noise_floor value is 0 then it should be ignored.
  19437. */
  19438. A_UINT32 per_chain_noise_floor[WMI_MAX_CHAINS];
  19439. /**
  19440. * Following this structure is the optional TLV:
  19441. * struct wmi_scan_blanking_params_info[0/1];
  19442. * struct wmi_cca_busy_subband_info[];
  19443. * Reporting subband CCA busy info in host requested manner.
  19444. */
  19445. } wmi_chan_info_event_fixed_param;
  19446. typedef struct {
  19447. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_cca_busy_subband_info */
  19448. A_UINT32 tlv_header;
  19449. /** rx clear count */
  19450. A_UINT32 rx_clear_count;
  19451. } wmi_cca_busy_subband_info;
  19452. /**
  19453. * The below structure contains parameters related to the scan radio
  19454. * blanking feature
  19455. */
  19456. typedef struct {
  19457. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_blanking_params_info */
  19458. A_UINT32 tlv_header;
  19459. /* scan_radio_blanking_duration:
  19460. * Cumulative scan disabled duration which indicates the total time in
  19461. * micro seconds where rx blanking was enabled on the scan radio due to
  19462. * simultaneous transmissions on the same band in the serving radio.
  19463. */
  19464. A_UINT32 scan_radio_blanking_duration;
  19465. /* scan_radio_blanking_count:
  19466. * Count of the number of times rx blanking was enabled on the scan radio
  19467. * due to simultaneous transmissions on the same band in the serving radio.
  19468. */
  19469. A_UINT32 scan_radio_blanking_count;
  19470. } wmi_scan_blanking_params_info;
  19471. typedef enum {
  19472. /* Blanking feature will be disabled */
  19473. WMI_SCAN_BLANKING_DISABLED = 0,
  19474. /* Blanking enabled only on current operating band */
  19475. WMI_SCAN_BLANKING_ENABLED,
  19476. /*
  19477. * Blanking enabled on both 5GHz and 6GHz bands when scan radio
  19478. * home channel is on either 5GHz or 6GHz bands
  19479. */
  19480. WMI_SCAN_BLANKING_ENABLED_NO_ISOLATION,
  19481. WMI_SCAN_BLANKING_MAX,
  19482. } WMI_SCAN_BLANKING_MODE;
  19483. /**
  19484. * The below three structures are the params used for converting RSSI
  19485. * from dB to dBm units.
  19486. */
  19487. typedef struct {
  19488. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_params_info */
  19489. /* Current operating bandwidth as per wmi_channel_width */
  19490. A_UINT32 curr_bw;
  19491. /* Current rx chainmask */
  19492. A_UINT32 curr_rx_chainmask;
  19493. /* 3 Bytes of xbar_config are used for RF to BB mapping*/
  19494. /* Samples of xbar_config,
  19495. * If xbar_config is 0xFAC688(hex):
  19496. * RF chains 0-7 are connected to BB chains 0-7
  19497. * here,
  19498. * bits 0 to 2 = 0, maps BB chain 0 for RF chain 0
  19499. * bits 3 to 5 = 1, maps BB chain 1 for RF chain 1
  19500. * bits 6 to 8 = 2, maps BB chain 2 for RF chain 2
  19501. * bits 9 to 11 = 3, maps BB chain 3 for RF chain 3
  19502. * bits 12 to 14 = 4, maps BB chain 4 for RF chain 4
  19503. * bits 15 to 17 = 5, maps BB chain 5 for RF chain 5
  19504. * bits 18 to 20 = 6, maps BB chain 6 for RF chain 6
  19505. * bits 21 to 23 = 7, maps BB chain 7 for RF chain 7
  19506. *
  19507. * If xbar_config is 0x688FAC(hex):
  19508. * RF chains 0-3 are connected to BB chains 4-7
  19509. * RF chains 4-7 are connected to BB chains 0-3
  19510. * here,
  19511. * bits 0 to 2 = 4, maps BB chain 4 for RF chain 0
  19512. * bits 3 to 5 = 5, maps BB chain 5 for RF chain 1
  19513. * bits 6 to 8 = 6, maps BB chain 6 for RF chain 2
  19514. * bits 9 to 11 = 7, maps BB chain 7 for RF chain 3
  19515. * bits 12 to 14 = 0, maps BB chain 0 for RF chain 4
  19516. * bits 15 to 17 = 1, maps BB chain 1 for RF chain 5
  19517. * bits 18 to 20 = 2, maps BB chain 2 for RF chain 6
  19518. * bits 21 to 23 = 3, maps BB chain 3 for RF chain 7
  19519. */
  19520. A_UINT32 xbar_config;
  19521. /* The below xlna_bypass params needed in old target architecture
  19522. * generation, not applicable for current target architecture generation.
  19523. * Values will be zero for current target architectures. */
  19524. /* Low noise amplifier bypass offset; signed integer; units are in dB */
  19525. A_INT32 xlna_bypass_offset;
  19526. /* Low noise amplifier bypass threshold; signed integer; units are in dB */
  19527. A_INT32 xlna_bypass_threshold;
  19528. /* nf_hw_dbm:
  19529. * 2D byte array of HW noise floor in dBm per chain, per 20MHz subband
  19530. * This array is filled in little endian format.
  19531. * for big-endian hosts, manual endian conversion is needed to obtain
  19532. * correct sequence of values.
  19533. */
  19534. A_INT8 nf_hw_dbm[MAX_ANTENNA_EIGHT][MAX_20MHZ_SEGMENTS];
  19535. } wmi_rssi_dbm_conversion_params_info;
  19536. typedef struct {
  19537. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_temp_offset_info */
  19538. /**
  19539. * RSSI offset based on the current temperature, signed integer,
  19540. * units are in dB
  19541. */
  19542. A_INT32 rssi_temp_offset;
  19543. } wmi_rssi_dbm_conversion_temp_offset_info;
  19544. /**
  19545. * RSSI dB to dBm conversion params event to host
  19546. */
  19547. typedef struct {
  19548. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_fixed_param */
  19549. /* PDEV id */
  19550. A_UINT32 pdev_id;
  19551. /**
  19552. * Followed by these TLVs below.
  19553. * wmi_rssi_dbm_conversion_params_info rssi_dbm_conversion_param[0 or 1]
  19554. * wmi_rssi_dbm_conversion_params_info will be sent in case of
  19555. * channel, BW, rx_chainmask change.
  19556. * wmi_rssi_dbm_conversion_temp_offset_info rssi_temp_offset[0 or 1]
  19557. * wmi_rssi_dbm_conversion_temp_offset_info will be sent when the
  19558. * RSSI temp offset changes.
  19559. */
  19560. } wmi_rssi_dbm_conversion_params_info_event_fixed_param;
  19561. /**
  19562. * Non wlan interference event
  19563. */
  19564. typedef struct {
  19565. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_cw_int */
  19566. A_UINT32 channel; /* either number or freq in mhz*/
  19567. } wlan_dcs_cw_int;
  19568. #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
  19569. /**
  19570. * wlan_dcs_im_tgt_stats
  19571. *
  19572. */
  19573. typedef struct _wlan_dcs_im_tgt_stats {
  19574. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t */
  19575. /** current running TSF from the TSF-1 */
  19576. A_UINT32 reg_tsf32;
  19577. /** Known last frame RSSI, in case of multiple stations, if
  19578. * and at different ranges, this would not guarantee that
  19579. * this is the least RSSI.
  19580. */
  19581. A_UINT32 last_ack_rssi;
  19582. /** Sum of all the failed durations in the last one second interval.
  19583. */
  19584. A_UINT32 tx_waste_time;
  19585. /** count how many times the hal_rxerr_phy is marked, in this
  19586. * time period
  19587. */
  19588. A_UINT32 rx_time;
  19589. A_UINT32 phyerr_cnt;
  19590. /**
  19591. * WLAN IM stats from target to host
  19592. *
  19593. * Below statistics are sent from target to host periodically.
  19594. * These are collected at target as long as target is running
  19595. * and target chip is not in sleep.
  19596. *
  19597. */
  19598. /** listen time from ANI */
  19599. A_INT32 listen_time;
  19600. /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
  19601. A_UINT32 reg_tx_frame_cnt;
  19602. /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
  19603. A_UINT32 reg_rx_frame_cnt;
  19604. /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
  19605. A_UINT32 reg_rxclr_cnt;
  19606. /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
  19607. A_UINT32 reg_cycle_cnt; /* delta cycle count */
  19608. /** extension channel rx clear count */
  19609. A_UINT32 reg_rxclr_ext_cnt;
  19610. /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
  19611. A_UINT32 reg_ofdm_phyerr_cnt;
  19612. /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
  19613. A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
  19614. /** Channel noise floor (units are dBm) */
  19615. A_INT32 chan_nf;
  19616. /** BSS rx cycle count */
  19617. A_UINT32 my_bss_rx_cycle_count;
  19618. } wlan_dcs_im_tgt_stats_t;
  19619. typedef struct wlan_dcs_awgn_info {
  19620. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_awgn_int_t */
  19621. A_UINT32 tlv_header;
  19622. /** Channel width (20, 40, 80, 80+80, 160, 320 ) enum wmi_channel_width */
  19623. A_UINT32 channel_width;
  19624. /** Primary channel frequency (MHz) */
  19625. A_UINT32 chan_freq;
  19626. /** center frequency (MHz) first segment */
  19627. A_UINT32 center_freq0;
  19628. /** center frequency (MHz) second segment */
  19629. A_UINT32 center_freq1;
  19630. /*
  19631. * Indicates which 20MHz segments contain interference
  19632. * 320 MHz: bits 0-15
  19633. * 160 MHz: bits 0-7
  19634. * 80 MHz: bits 0-3
  19635. * Bitmap - Each bit position will indicate 20MHz in which
  19636. * interference is seen. (Valid 16 bits out of 32 bit integer)
  19637. * Note: for 11be, the interference present 20MHz can be punctured
  19638. * for better channel utilization.
  19639. */
  19640. A_UINT32 chan_bw_interference_bitmap;
  19641. } wmi_dcs_awgn_int_t;
  19642. typedef struct wlan_dcs_obss_info {
  19643. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_obss_int_t */
  19644. A_UINT32 tlv_header;
  19645. /** Channel width (20, 40, 80, 80+80, 160, 320) enum wmi_channel_width */
  19646. A_UINT32 channel_width;
  19647. /** Primary channel frequency (MHz) */
  19648. A_UINT32 chan_freq;
  19649. /** center frequency (MHz) first segment */
  19650. A_UINT32 center_freq0;
  19651. /** center frequency (MHz) second segment */
  19652. A_UINT32 center_freq1;
  19653. /* chan_bw_interference_bitmap:
  19654. * Indicates which 20MHz segments contain interference
  19655. * 320 MHz: bits 0-15
  19656. * 160 MHz: bits 0-7
  19657. * 80 MHz: bits 0-3
  19658. * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
  19659. * second lowest 20Mhz and so on.
  19660. * Each bit position will indicate 20MHz in which interference is seen.
  19661. * (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_obss_int_t;
  19667. /**
  19668. * wmi_dcs_interference_event_t
  19669. *
  19670. * Right now this is event and stats together. Partly this is
  19671. * because cw interference is handled in target now. This
  19672. * can be done at host itself, if we can carry the NF alone
  19673. * as a stats event. In future this would be done and this
  19674. * event would carry only stats.
  19675. */
  19676. typedef struct {
  19677. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
  19678. /**
  19679. * Type of the event present, either the cw interference event, or the wlan_im stats, or AWGN int
  19680. * ATH_CAP_DCS_CWIM 0x01
  19681. * ATH_CAP_DCS_WLANIM 0x02
  19682. * ATH_CAP_DCS_AGWNIM 0x04
  19683. * reserved (AFC) 0x08
  19684. * ATH_CAP_DCS_OBSSIM 0x10
  19685. */
  19686. A_UINT32 interference_type; /* type of interference, wlan, cw, or AWGN */
  19687. /** pdev_id for identifying the MAC
  19688. * See macros starting with WMI_PDEV_ID_ for values.
  19689. */
  19690. A_UINT32 pdev_id;
  19691. /** VDEV ID for identifying DCS stats reported at VDEV level.
  19692. * Should be interpreted only when WMI_SERVICE_VDEV_DCS_STATS_SUPPORT
  19693. * service cap is advertized by target.
  19694. * And value would be 0xFF if DCS stats is still configured at PDEV level.
  19695. */
  19696. A_UINT32 vdev_id;
  19697. /*
  19698. * Following this struct are these TLVs. Note that they are both array of structures
  19699. * but can have at most one element. Which TLV is empty or has one element depends
  19700. * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
  19701. * elements (not arrays). union { wlan_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event;
  19702. *
  19703. * wlan_dcs_cw_int cw_int[]; <-- cw_interference event
  19704. * wlan_dcs_im_tgt_stats_t wlan_stat[]; <-- wlan im interference stats
  19705. * wmi_dcs_awgn_int_t awgn_int[]; <-- Additive white Gaussian noise (AWGN) interference
  19706. * wmi_dcs_obss_int_t obss_int[]; <-- Overlapping Basic Service Set (OBSS) interference
  19707. */
  19708. } wmi_dcs_interference_event_fixed_param;
  19709. enum wmi_peer_mcast_group_action {
  19710. wmi_peer_mcast_group_action_add = 0,
  19711. wmi_peer_mcast_group_action_del = 1
  19712. };
  19713. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
  19714. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
  19715. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
  19716. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
  19717. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 /* flag to exclude an ip while filtering. set to exclude */
  19718. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
  19719. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 /* flag to say ipv4/ipv6. Will be set for ipv6 */
  19720. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
  19721. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 /* delete all mcast table entries. */
  19722. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
  19723. /* multicast group membership commands */
  19724. /* TODO: Converting this will be tricky since it uses an union.
  19725. Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
  19726. typedef struct {
  19727. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
  19728. A_UINT32 flags;
  19729. wmi_mac_addr ucast_mac_addr;
  19730. /* in network byte order */
  19731. /* for ipv4, bytes (12-15) should contain ip address and other lower bytes 0. ipv6 should have all bytes valid */
  19732. A_UINT8 mcast_ip_addr[16];
  19733. /* for ipv6, all 16 bytes has to be valid; for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s */
  19734. A_UINT8 mcast_ip_mask[16];/* zero out lower bytes if ipv4*/
  19735. /* number of address filters - irrespective of ipv4/ipv6 addresses */
  19736. A_UINT32 num_filter_addr;
  19737. /* this array should contain the src IPs that are to be filtered during find
  19738. The array should be packed.
  19739. If there are 2 ipv4 addresses, there should be 8 bytes and rest all 0s */
  19740. A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
  19741. A_UINT8 vdev_id; /* vdev of this mcast group */
  19742. } wmi_peer_mcast_group_cmd_fixed_param;
  19743. /** Offload Scan and Roaming related commands */
  19744. /** The FW performs 2 different kinds of offload scans independent
  19745. * of host. One is Roam scan which is primarily performed on a
  19746. * station VDEV after association to look for a better AP that
  19747. * the station VDEV can roam to. The second scan is connect scan
  19748. * which is mainly performed when the station is not associated
  19749. * and to look for a matching AP profile from a list of
  19750. * configured profiles. */
  19751. /* flags for roam_scan_mode_cmd
  19752. * indicate the status (success/fail) of wmi_roam_scan_mode cmd through WMI_ROAM_EVENTID */
  19753. #define WMI_ROAM_SCAN_MODE_FLAG_REPORT_STATUS 0x1
  19754. /**
  19755. * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
  19756. * the roam scan mode is one of the periodic, RSSI change, both, none.
  19757. * None : Disable Roam scan. No Roam scan at all.
  19758. * Periodic : Scan periodically with a configurable period.
  19759. * Rssi change : Scan when ever RSSI to current AP changes by the threshold value
  19760. * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
  19761. * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
  19762. *
  19763. */
  19764. typedef struct {
  19765. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
  19766. A_UINT32 roam_scan_mode;
  19767. A_UINT32 vdev_id;
  19768. A_UINT32 flags; /* see WMI_ROAM_SCAN_MODE_FLAG defs */
  19769. /*
  19770. * Minimum duration allowed between two consecutive roam scans.
  19771. * Roam scan is not allowed, if duration between two consecutive
  19772. * roam scans is less than this time.
  19773. */
  19774. A_UINT32 min_delay_btw_scans; /* In msec */
  19775. /*
  19776. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  19777. * positions) showing for which roam_trigger_reasons the
  19778. * min_delay_btw_scans constraint should be applied.
  19779. * 0x0 means there is no time restrictions between successive roam scans.
  19780. */
  19781. A_UINT32 min_delay_roam_trigger_reason_bitmask;
  19782. } wmi_roam_scan_mode_fixed_param;
  19783. #define WMI_ROAM_SCAN_MODE_NONE 0x0
  19784. #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
  19785. #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
  19786. #define WMI_ROAM_SCAN_MODE_BOTH 0x3
  19787. /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
  19788. #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
  19789. typedef struct {
  19790. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
  19791. A_UINT32 vdev_id;
  19792. A_UINT32 command_arg;
  19793. } wmi_roam_scan_cmd_fixed_param;
  19794. #define WMI_ROAM_SCAN_STOP_CMD 0x1
  19795. /** flags for WMI_ROAM_SCAN_RSSI_THRESHOLD command:
  19796. * BIT 0 -> Indicate High RSSI Trigger support is enabled for roaming
  19797. * from 5 GHz to 6 GHz Band
  19798. * BIT 1-31 -> Reserved
  19799. */
  19800. #define WMI_ROAM_SCAN_RSSI_THRESHOLD_FLAG_ROAM_HI_RSSI_EN_ON_5G 0x1
  19801. /**
  19802. * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan RSSI threshold
  19803. * scan RSSI threshold is the RSSI threshold below which the FW will start running Roam scans.
  19804. * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
  19805. */
  19806. typedef struct {
  19807. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
  19808. /** unique id identifying the VDEV, generated by the caller */
  19809. A_UINT32 vdev_id;
  19810. /** roam scan RSSI threshold */
  19811. A_UINT32 roam_scan_rssi_thresh;
  19812. /** When using Hw generated beacon RSSI interrupts */
  19813. A_UINT32 roam_rssi_thresh_diff;
  19814. /** 5G scan max count */
  19815. A_UINT32 hirssi_scan_max_count;
  19816. /** 5G scan RSSI change threshold value */
  19817. A_UINT32 hirssi_scan_delta;
  19818. /** 5G scan upper bound */
  19819. A_UINT32 hirssi_upper_bound;
  19820. /** roam scan RSSI threshold for 5G band.
  19821. * offset from roam_scan_rssi_thres, in dB units
  19822. */
  19823. A_INT32 rssi_thresh_offset_5g;
  19824. /** flags for WMI_ROAM_SCAN_RSSI_THRESHOLD Command */
  19825. A_UINT32 flags; /* see WMI_ROAM_SCAN_RSSI_THRESHOLD_FLAG defs */
  19826. /* The TLVs will follow.
  19827. * wmi_roam_scan_extended_threshold_param extended_param;
  19828. * wmi_roam_earlystop_rssi_thres_param earlystop_param;
  19829. * wmi_roam_dense_thres_param dense_param;
  19830. * wmi_roam_bg_scan_roaming_param bg_scan_param;
  19831. * wmi_roam_data_rssi_roaming_param data_rssi_param;
  19832. */
  19833. } wmi_roam_scan_rssi_threshold_fixed_param;
  19834. /**
  19835. * WMI_ROAM_BTM_CONFIG_CMDID : set BTM (BSS Transition Management. 802.11v) offload config
  19836. * Applicable only when WMI_ROAM_SCAN_MODE is enabled with WMI_ROAM_SCAN_MODE_ROAMOFFLOAD
  19837. */
  19838. /**
  19839. * btm_config.flags
  19840. * BIT 0 : Enable/Disable the BTM offload.
  19841. * BIT 1-2 : Action on non matching candidate with cache. Used WMI_ROAM_BTM_OFLD_NON_MATCHING_CND_XXX
  19842. * BIT 3-5 : Roaming handoff decisions. Use WMI_ROAM_BTM_OFLD_CNDS_MATCH_XXX
  19843. * BIT 6 : Enable/Disable solicited BTM
  19844. * BIT 7 : Roam BTM candidates based on the roam score instead of BTM preferred value
  19845. * BIT 8 : BTM query preference over 11k neighbor report request
  19846. * BIT 9 : Send BTM query with preferred candidates list
  19847. * BIT 10 : Forward MBO BTM Request to Host if MBO ASSOC RETRY attribute is set
  19848. * BIT 11-31 : Reserved
  19849. */
  19850. #define WMI_ROAM_BTM_SET_ENABLE(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  19851. #define WMI_ROAM_BTM_GET_ENABLE(flags) WMI_GET_BITS(flags, 0, 1)
  19852. #define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val) WMI_SET_BITS(flags, 1, 2, val)
  19853. #define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags) WMI_GET_BITS(flags, 1, 2)
  19854. #define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val) WMI_SET_BITS(flags, 3, 3, val)
  19855. #define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags) WMI_GET_BITS(flags, 3, 3)
  19856. #define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val) WMI_SET_BITS(flags, 6, 1, val)
  19857. #define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags) WMI_GET_BITS(flags, 6, 1)
  19858. #define WMI_ROAM_BTM_SET_CNDS_SELECT_BASED_ON_SCORE(flags, val) WMI_SET_BITS(flags, 7, 1, val)
  19859. #define WMI_ROAM_BTM_GET_CNDS_SELECT_BASED_ON_SCORE(flags) WMI_GET_BITS(flags, 7, 1)
  19860. #define WMI_ROAM_BTM_SET_BTM_QUERY_PREFERENCE_OVER_11K(flags, val) WMI_SET_BITS(flags, 8, 1, val)
  19861. #define WMI_ROAM_BTM_GET_BTM_QUERY_PREFERENCE_OVER_11K(flags) WMI_GET_BITS(flags, 8, 1)
  19862. #define WMI_ROAM_BTM_SET_BTM_QUERY_WITH_CANDIDATE_LIST(flags, val) WMI_SET_BITS(flags, 9, 1, val)
  19863. #define WMI_ROAM_BTM_GET_BTM_QUERY_WITH_CANDIDATE_LIST(flags) WMI_GET_BITS(flags, 9, 1)
  19864. #define WMI_ROAM_BTM_SET_FORWARD_MBO_ASSOC_RETRY_BTM_REQUEST_TO_HOST(flags, val) WMI_SET_BITS(flags, 10, 1, val)
  19865. #define WMI_ROAM_BTM_GET_FORWARD_MBO_ASSOC_RETRY_BTM_REQUEST_TO_HOST(flags) WMI_GET_BITS(flags, 10, 1)
  19866. /** 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 */
  19867. #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 */
  19868. #define WMI_ROAM_BTM_NON_MATCHING_CNDS_NO_SCAN_FORWARD 1 /** Does not allow roam scan and forward BTM frame to host */
  19869. /** reserved upto 3 */
  19870. /** 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 */
  19871. #define WMI_ROAM_BTM_CNDS_MATCH_EXACT 0 /** Exactly matched with roam candidate list to BTM candidates */
  19872. #define WMI_ROAM_BTM_CNDS_MATCH_AT_LEAST_TOP 1 /** At least one or more top priority bssid matched */
  19873. /** reserved upto 7 */
  19874. typedef struct {
  19875. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_btm_config_fixed_param */
  19876. A_UINT32 tlv_header;
  19877. /** unique id identifying the VDEV on which BTM is enabled/disabled */
  19878. A_UINT32 vdev_id;
  19879. /** BTM configuration control flags */
  19880. A_UINT32 flags;
  19881. /* BTM query timeout, unit: milliseconds
  19882. * valid value range: 1-10000,
  19883. * default value: 100 will be set if invalid value is given
  19884. */
  19885. A_UINT32 solicited_timeout_ms;
  19886. /* Maximum attempt of solicited BTM
  19887. * If continuous failure reach to this value, solicited BTM to current
  19888. * ESS will be disabled.
  19889. * valid value range: 1 - (2^32-1). (2^32)-1 means sending forever
  19890. * Default value: 3 will be set if invalid value is given
  19891. */
  19892. A_UINT32 max_attempt_cnt;
  19893. /* Time to stick to current AP after BTM, unit: seconds
  19894. * valid value range: 0 -(2^16-1).
  19895. * Either 0 or (2^16)-1 means stick to AP forever.
  19896. * Default value: 300 will be set if invalid value is given
  19897. */
  19898. A_UINT32 stick_time_seconds;
  19899. /* Disassoc time threshold in milliseconds
  19900. * This time threshold allows the target to judge whether the STA
  19901. * should can move to another AP immediately, or if the STA has time
  19902. * to calculate roaming candidates.
  19903. * If the disassoc_timer_threshold value is 0x0, the field should be
  19904. * disregarded.
  19905. */
  19906. A_UINT32 disassoc_timer_threshold;
  19907. /*
  19908. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  19909. * positions) showing for which roam_trigger_reasons the
  19910. * btm query needs to be sent.
  19911. * If roam trigger reasons are unspecified, btm_bitmap will be 0x0.
  19912. */
  19913. A_UINT32 btm_bitmap;
  19914. /*
  19915. * Consider AP as roam candidate only if AP score is better than
  19916. * btm_candidate_min_score for BTM roam trigger
  19917. */
  19918. A_UINT32 btm_candidate_min_score;
  19919. } wmi_btm_config_fixed_param;
  19920. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
  19921. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
  19922. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
  19923. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
  19924. typedef struct {
  19925. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
  19926. A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
  19927. A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
  19928. A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  19929. A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
  19930. A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  19931. A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
  19932. A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
  19933. A_UINT32 max_penalty_5g; /** maximum penalty that can be applied to a 5GHz RSSI */
  19934. A_UINT32 good_rssi_threshold; /** RSSI below which roam is kicked in by background scan, although RSSI is still good */
  19935. } wmi_roam_scan_extended_threshold_param;
  19936. /**
  19937. * WMI_ROAM_SCAN_PERIOD: period for roam scan.
  19938. * Applicable when the scan mode is Periodic or both.
  19939. */
  19940. typedef struct {
  19941. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
  19942. /** unique id identifying the VDEV, generated by the caller */
  19943. A_UINT32 vdev_id;
  19944. /** roam scan period value */
  19945. A_UINT32 roam_scan_period; /* units = milliseconds */
  19946. /** Aging for Roam scans */
  19947. A_UINT32 roam_scan_age;
  19948. /** Inactivity monitoring time to consider device is in inactive state with data count is less than roam_inactive_count */
  19949. A_UINT32 inactivity_time_period; /* units = milliseconds */
  19950. /** Maximum allowed data packets count during inactivity_time_period */
  19951. A_UINT32 roam_inactive_count;
  19952. /** New roam scan period after device is in inactivity state */
  19953. A_UINT32 roam_scan_period_after_inactivity; /* units = milliseconds */
  19954. /** roam full scan period value */
  19955. A_UINT32 roam_full_scan_period; /* units = milliseconds */
  19956. } wmi_roam_scan_period_fixed_param;
  19957. /**
  19958. * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : RSSI delta to trigger the roam scan.
  19959. * Rssi change threshold used when mode is Rssi change (or) Both.
  19960. * The FW will run the roam scan when ever the RSSI changes (up or down) by the value set by this parameter.
  19961. * Note scan is triggered based on the RSSI threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
  19962. */
  19963. typedef struct {
  19964. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
  19965. /** unique id identifying the VDEV, generated by the caller */
  19966. A_UINT32 vdev_id;
  19967. /** roam scan RSSI change threshold value */
  19968. A_UINT32 roam_scan_rssi_change_thresh;
  19969. /** When using Hw generated beacon RSSI interrupts */
  19970. A_UINT32 bcn_rssi_weight;
  19971. /** Minimum delay between two 5G scans */
  19972. A_UINT32 hirssi_delay_btw_scans;
  19973. } wmi_roam_scan_rssi_change_threshold_fixed_param;
  19974. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
  19975. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
  19976. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
  19977. #define WMI_ROAM_SCAN_LIST_FLAG_FLUSH_STATIC 0x1 /* Flush static roam scan channel list in FW */
  19978. #define WMI_ROAM_SCAN_LIST_FLAG_FLUSH_DYNAMIC 0x2 /* Flush dynamic roam scan channel list in FW */
  19979. /**
  19980. * TLV for roaming channel list
  19981. */
  19982. typedef struct {
  19983. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
  19984. /** unique id identifying the VDEV, generated by the caller */
  19985. A_UINT32 vdev_id;
  19986. /** WMI_CHAN_LIST_TAG */
  19987. A_UINT32 chan_list_type;
  19988. /** # if channels to scan */
  19989. A_UINT32 num_chan;
  19990. A_UINT32 flags; /* refer to WMI_ROAM_SCAN_LIST_FLAG_xxx defs */
  19991. /**
  19992. * TLV (tag length value) parameters follow the wmi_roam_chan_list
  19993. * structure. The TLV's are:
  19994. * A_UINT32 channel_list[]; // in MHz
  19995. **/
  19996. } wmi_roam_chan_list_fixed_param;
  19997. /** Authentication modes */
  19998. enum {
  19999. WMI_AUTH_NONE, /* no upper level auth */
  20000. WMI_AUTH_OPEN, /* open */
  20001. WMI_AUTH_SHARED, /* shared-key */
  20002. WMI_AUTH_8021X, /* 802.1x */
  20003. WMI_AUTH_AUTO, /* Auto */
  20004. WMI_AUTH_WPA, /* WPA */
  20005. WMI_AUTH_RSNA, /* WPA2/RSNA */
  20006. WMI_AUTH_CCKM, /* CCKM */
  20007. WMI_AUTH_WAPI, /* WAPI */
  20008. WMI_AUTH_AUTO_PSK,
  20009. WMI_AUTH_WPA_PSK,
  20010. WMI_AUTH_RSNA_PSK,
  20011. WMI_AUTH_WAPI_PSK,
  20012. WMI_AUTH_FT_RSNA, /* 11r FT */
  20013. WMI_AUTH_FT_RSNA_PSK,
  20014. WMI_AUTH_RSNA_PSK_SHA256,
  20015. WMI_AUTH_RSNA_8021X_SHA256,
  20016. WMI_AUTH_CCKM_WPA,
  20017. WMI_AUTH_CCKM_RSNA,
  20018. WMI_AUTH_RSNA_FILS_SHA256,
  20019. WMI_AUTH_RSNA_FILS_SHA384,
  20020. WMI_AUTH_RSNA_SUITE_B_8021X_SHA256,
  20021. WMI_AUTH_RSNA_SUITE_B_8021X_SHA384,
  20022. WMI_AUTH_FT_RSNA_SAE,
  20023. WMI_AUTH_FT_RSNA_SUITE_B_8021X_SHA384,
  20024. WMI_AUTH_FT_RSNA_FILS_SHA256,
  20025. WMI_AUTH_FT_RSNA_FILS_SHA384,
  20026. WMI_AUTH_WPA3_SAE,
  20027. WMI_AUTH_WPA3_OWE,
  20028. WMI_AUTH_PASN,
  20029. WMI_AUTH_RSNA_8021X_SHA384,
  20030. WMI_AUTH_WPA3_SAE_SHA384,
  20031. WMI_AUTH_FT_RSNA_SAE_SHA384,
  20032. };
  20033. typedef enum {
  20034. WMI_SCAN_CLIENT_NLO = 0x1, /* 1 */
  20035. WMI_SCAN_CLIENT_EXTSCAN, /* 2 */
  20036. WMI_SCAN_CLIENT_ROAM, /* 3 */
  20037. WMI_SCAN_CLIENT_P2P, /* 4 */
  20038. WMI_SCAN_CLIENT_LPI, /* 5 */
  20039. WMI_SCAN_CLIENT_NAN, /* 6 */
  20040. WMI_SCAN_CLIENT_ANQP, /* 7 */
  20041. WMI_SCAN_CLIENT_OBSS, /* 8 */
  20042. WMI_SCAN_CLIENT_PLM, /* 9 */
  20043. WMI_SCAN_CLIENT_HOST, /* 10 */
  20044. } WMI_SCAN_CLIENT_ID;
  20045. typedef struct {
  20046. /** authentication mode (defined above) */
  20047. A_UINT32 rsn_authmode;
  20048. /** unicast cipher set */
  20049. A_UINT32 rsn_ucastcipherset;
  20050. /** mcast/group cipher set */
  20051. A_UINT32 rsn_mcastcipherset;
  20052. /** mcast/group management frames cipher set */
  20053. A_UINT32 rsn_mcastmgmtcipherset;
  20054. } wmi_rsn_params;
  20055. /** looking for a wps enabled AP */
  20056. #define WMI_AP_PROFILE_FLAG_WPS 0x1
  20057. /** looking for a secure AP */
  20058. #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
  20059. /** looking for a PMF enabled AP */
  20060. #define WMI_AP_PROFILE_FLAG_PMF 0x4
  20061. /** If this flag is set roam to SAE_H2E (Hash to Element) enabled APs only */
  20062. #define WMI_AP_PROFILE_FLAG_SAE_H2E 0x8
  20063. /* the value used in wmi_roam_cnd_scoring_param->disable_bitmap */
  20064. #define WLAN_ROAM_SCORING_RSSI_DISABLE 0x00000001
  20065. #define WLAN_ROAM_SCORING_HT_DISABLE 0x00000002
  20066. #define WLAN_ROAM_SCORING_VHT_DISABLE 0x00000004
  20067. #define WLAN_ROAM_SCORING_BW_DISABLE 0x00000008
  20068. #define WLAN_ROAM_SCORING_BAND_DISABLE 0x00000010
  20069. #define WLAN_ROAM_SCORING_NSS_DISABLE 0x00000020
  20070. #define WLAN_ROAM_SCORING_CHAN_CONGESTION_DISABLE 0x00000040
  20071. #define WLAN_ROAM_SCORING_BEAMFORMING_DISABLE 0x00000080
  20072. #define WLAN_ROAM_SCORING_PCL_DISABLE 0x00000100
  20073. #define WLAN_ROAM_SCORING_HE_DISABLE 0x00000200
  20074. #define WLAN_ROAM_SCORING_OCE_WAN_DISABLE 0x00000400
  20075. #define WLAN_ROAM_SCORING_ETH_DISABLE 0x00000800
  20076. #define WLAN_ROAM_SCORING_MLO_DISABLE 0x00001000
  20077. #define WLAN_ROAM_SCORING_DISABLE_ALL 0xFFFFFFFF
  20078. #define WLAN_ROAM_SCORING_DEFAULT_PARAM_ALLOW 0x0
  20079. #define WLAN_ROAM_MAX_SELECTION_SCORE 10000
  20080. #define WLAN_ROAM_SCORE_20MHZ_BW_INDEX 0
  20081. #define WLAN_ROAM_SCORE_40MHZ_BW_INDEX 1
  20082. #define WLAN_ROAM_SCORE_80MHZ_BW_INDEX 2
  20083. #define WLAN_ROAM_SCORE_160MHZ_BW_INDEX 3
  20084. #define WLAN_ROAM_SCORE_MAX_BW_INDEX 4
  20085. #define WMI_ROAM_GET_BW_SCORE_PERCENTAGE(value32, bw_index) WMI_GET_BITS(value32, (8 * (bw_index)), 8)
  20086. #define WMI_ROAM_SET_BW_SCORE_PERCENTAGE(value32, score_pcnt, bw_index) WMI_SET_BITS(value32, (8 * (bw_index)), 8, score_pcnt)
  20087. #define WLAN_ROAM_SCORE_NSS_1x1_INDEX 0
  20088. #define WLAN_ROAM_SCORE_NSS_2x2_INDEX 1
  20089. #define WLAN_ROAM_SCORE_NSS_3x3_INDEX 2
  20090. #define WLAN_ROAM_SCORE_NSS_4x4_INDEX 3
  20091. #define WLAN_ROAM_SCORE_MAX_NSS_INDEX 4
  20092. #define WMI_ROAM_GET_NSS_SCORE_PERCENTAGE(value32, nss_index) WMI_GET_BITS(value32, (8 * (nss_index)), 8)
  20093. #define WMI_ROAM_SET_NSS_SCORE_PERCENTAGE(value32, score_pcnt, nss_index) WMI_SET_BITS(value32, (8 * (nss_index)), 8, score_pcnt)
  20094. #define WLAN_ROAM_SCORE_BAND_2G_INDEX 0
  20095. #define WLAN_ROAM_SCORE_BAND_5G_INDEX 1
  20096. #define WLAN_ROAM_SCORE_BAND_6G_INDEX 2
  20097. /* 3 is reserved */
  20098. #define WLAN_ROAM_SCORE_MAX_BAND_NUM_INDICES 4
  20099. #define WLAN_ROAM_SCORE_MAX_BAND_INDEX WLAN_ROAM_SCORE_MAX_BAND_NUM_INDICES
  20100. #define WLAN_ROAM_SCORE_SECURITY_WPA_INDEX 0
  20101. #define WLAN_ROAM_SCORE_SECURITY_WPA2_INDEX 1
  20102. #define WLAN_ROAM_SCORE_SECURITY_WPA3_INDEX 2
  20103. /* 3 is reserved */
  20104. #define WLAN_ROAM_SCORE_SECURITY_MAX_NUM_INDICES 4
  20105. #define WMI_ROAM_GET_BAND_SCORE_PERCENTAGE(value32, band_index) WMI_GET_BITS(value32, (8 * (band_index)), 8)
  20106. #define WMI_ROAM_SET_BAND_SCORE_PERCENTAGE(value32, score_pcnt, band_index) WMI_SET_BITS(value32, (8 * (band_index)), 8, score_pcnt)
  20107. #define WLAN_ROAM_SCORE_MAX_CHAN_CONGESTION_SLOT 16
  20108. #define WLAN_ROAM_SCORE_DEFAULT_CONGESTION_SLOT 0
  20109. #define WLAN_ROAM_SCORE_MAX_OCE_WAN_SLOT 16
  20110. #define WLAN_ROAM_SCORE_DEFAULT_OCE_WAN_SLOT 0
  20111. #define WLAN_ROAM_SCORE_320MHZ_BW_EXT_INDEX 0
  20112. #define WLAN_ROAM_SCORE_MAX_BW_EXT_INDEX 4
  20113. #define WLAN_ROAM_SCORE_MLSR_INDEX 0
  20114. #define WLAN_ROAM_SCORE_MLMR_INDEX 1
  20115. #define WLAN_ROAM_SCORE_EMLSR_INDEX 2
  20116. #define WLAN_ROAM_SCORE_EMLMR_INDEX 3
  20117. #define WLAN_ROAM_SCORE_MLO_INDEX 4
  20118. #define WMI_ROAM_GET_MLO_SCORE_PERCENTAGE(value32, mlo_index) WMI_GET_BITS(value32, (8 * (mlo_index)), 8)
  20119. #define WMI_ROAM_SET_MLO_SCORE_PERCENTAGE(value32, score_pcnt, mlo_index) WMI_SET_BITS(value32, (8 * (mlo_index)), 8, score_pcnt)
  20120. #define WMI_ROAM_GET_SECURITY_SCORE_PERCENTAGE(value32, security_index) \
  20121. WMI_GET_BITS(value32, (8 * (security_index)), 8)
  20122. #define WMI_ROAM_SET_SECURITY_SCORE_PERCENTAGE(value32, score_pcnt, security_index) \
  20123. WMI_SET_BITS(value32, (8 * (security_index)), 8, score_pcnt)
  20124. /**
  20125. best_rssi_threshold: Roamable AP RSSI equal or better than this threshold, full RSSI score 100. Units in dBm.
  20126. good_rssi_threshold: Below this threshold, scoring linear percentage between rssi_good_pcnt and 100. Units in dBm.
  20127. bad_rssi_threshold: Between good and bad RSSI threshold, scoring linear percentage between rssi_bad_pcnt and rssi_good_pcnt. Units in dBm.
  20128. good_rssi_pcnt: Used to assigned scoring percentage of each slot between best to good RSSI threshold. Units in percentage.
  20129. bad_rssi_pcnt: Used to assigned scoring percentage of each slot between good to bad RSSI threshold. Units in percentage.
  20130. good_bucket_size : bucket size of slot in good zone. Units in dB.
  20131. bad_bucket_size : bucket size of slot in bad zone. Units in dB.
  20132. rssi_pref_5g_rssi_thresh: Below RSSI threshold, 5G AP have given preference of band percentage. Units in dBm.
  20133. */
  20134. /**
  20135. The graph below explains how RSSI scoring percentage is calculated
  20136. as the RSSI improves. In the graph, the derived parameters good_buckets
  20137. and bad_buckets are used. These derived parameters are related to the
  20138. specified parameters as follows:
  20139. good_buckets =
  20140. (best_rssi_threshold - good_rssi_threshold) / good_bucket_size
  20141. bad_buckets =
  20142. (good_rssi_threshold - bad_rssi_threshold) / bad_bucket_size
  20143. | (x0,y0) (x0 = best_rssi, y0 = 100)
  20144. p 100 |-------o
  20145. e | |<--------- (100 - good_rssi_pct)/good_buckets
  20146. r | |___ ,---- good_bucket_size
  20147. c | | |
  20148. e | |_V_
  20149. n | |
  20150. t | |___o (x1,y1) (x1 = good_rssi, y1 = good_rssi_pcnt)
  20151. 80 | |
  20152. % | |<------ (good_rssi_pcnt - bad_rssi_pcnt)/bad_buckets
  20153. | |_____
  20154. | | ,-- bad_bucket_size
  20155. | | |
  20156. | |__v__
  20157. | |
  20158. | |
  20159. 40 | o------------
  20160. | (x2,y2) (x2 = bad_rssi, y2 = bad_rssi_pcnt)
  20161. +------o------------o-----------o------------->
  20162. -50 -70 -80 RSSI dBm
  20163. | excellent | good | bad | poor
  20164. | zone | zone | zone | zone
  20165. V V V
  20166. BEST_THRES GOOD_THRES BAD_THRES
  20167. */
  20168. typedef struct {
  20169. A_INT32 best_rssi_threshold;
  20170. A_INT32 good_rssi_threshold;
  20171. A_INT32 bad_rssi_threshold;
  20172. A_UINT32 good_rssi_pcnt;
  20173. A_UINT32 bad_rssi_pcnt;
  20174. A_UINT32 good_bucket_size;
  20175. A_UINT32 bad_bucket_size;
  20176. A_INT32 rssi_pref_5g_rssi_thresh;
  20177. } wmi_roam_cnd_rssi_scoring;
  20178. /**
  20179. Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the
  20180. value respectively of bw_scoring
  20181. BITS 0-7 :- It contains scoring percentage of 20MHz BW
  20182. BITS 8-15 :- It contains scoring percentage of 40MHz BW
  20183. BITS 16-23 :- It contains scoring percentage of 80MHz BW
  20184. BITS 24-31 :- It contains scoring percentage of 160MHz BW
  20185. Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the
  20186. value respectively of ext_bw_scoring:
  20187. BITS 0-7 :- It contains scoring percentage of 320MHz BW
  20188. BITS 8-15 :- reserved
  20189. BITS 16-23 :- reserved
  20190. BITS 24-31 :- reserved
  20191. The value of each index must be 0-100
  20192. */
  20193. typedef struct {
  20194. A_UINT32 score_pcnt;
  20195. } wmi_roam_cnd_bw_scoring;
  20196. /**
  20197. Use macro WMI_ROAM_CND_GET/SET_BAND_SCORE_PERCENTAGE to get and set the value respectively.
  20198. BITS 0-7 :- It contains scoring percentage of 2G
  20199. BITS 8-15 :- It contains scoring percentage of 5G
  20200. BITS 16-23 :- reserved
  20201. BITS 24-31 :- reserved
  20202. The value of each index must be 0-100
  20203. */
  20204. typedef struct {
  20205. A_UINT32 score_pcnt;
  20206. } wmi_roam_cnd_band_scoring;
  20207. /**
  20208. Use macro WMI_ROAM_CND_GET/SET_NSS_SCORE_PERCENTAGE to get and set the value respectively.
  20209. BITS 0-7 :- It contains scoring percentage of 1x1
  20210. BITS 8-15 :- It contains scoring percentage of 2x2
  20211. BITS 16-23 :- It contains scoring percentage of 3x3
  20212. BITS 24-31 :- It contains scoring percentage of 4x4
  20213. The value of each index must be 0-100
  20214. */
  20215. typedef struct {
  20216. A_UINT32 score_pcnt;
  20217. } wmi_roam_cnd_nss_scoring;
  20218. /**
  20219. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  20220. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  20221. BITS 8-15 :- SLOT_1
  20222. BITS 16-23 :- SLOT_2
  20223. BITS 24-31 :- SLOT_3
  20224. BITS 32- ...
  20225. num_slot will equally divide 100. e.g, if num_slot = 4
  20226. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  20227. */
  20228. typedef struct {
  20229. A_UINT32 num_slot; /* max 15 */
  20230. A_UINT32 score_pcnt3_to_0;
  20231. A_UINT32 score_pcnt7_to_4;
  20232. A_UINT32 score_pcnt11_to_8;
  20233. A_UINT32 score_pcnt15_to_12;
  20234. } wmi_roam_cnd_esp_qbss_scoring;
  20235. /**
  20236. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  20237. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  20238. BITS 8-15 :- SLOT_1
  20239. BITS 16-23 :- SLOT_2
  20240. BITS 24-31 :- SLOT_3
  20241. BITS 32- ...
  20242. num_slot will equally divide 100. e.g, if num_slot = 4
  20243. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  20244. */
  20245. typedef struct {
  20246. A_UINT32 num_slot; /* max 15 */
  20247. A_UINT32 score_pcnt3_to_0;
  20248. A_UINT32 score_pcnt7_to_4;
  20249. A_UINT32 score_pcnt11_to_8;
  20250. A_UINT32 score_pcnt15_to_12;
  20251. } wmi_roam_cnd_oce_wan_scoring;
  20252. /**
  20253. * Use macro WMI_ROAM_CND_GET/SET_SECURITY_SCORE_PERCENTAGE
  20254. * to get and set the value respectively.
  20255. * BITS 0-7 :- It contains scoring percentage of WPA security
  20256. * BITS 8-15 :- It contains scoring percentage of WPA2 security
  20257. * BITS 16-23 :- It contains scoring percentage of WPA3 security
  20258. * BITS 24-31 :- reserved
  20259. *
  20260. * The value of each score must be 0-100
  20261. */
  20262. typedef struct {
  20263. A_UINT32 score_pcnt;
  20264. } wmi_roam_cnd_security_scoring;
  20265. typedef enum {
  20266. WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_NONE = 0, /* Legacy roam score algorithm */
  20267. WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_RSSI_CU_BASED = 1, /* Roam score algorithm based on RSSI and CU */
  20268. } WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID;
  20269. /**
  20270. disable_bitmap :- Each bit will be either allow(0)/disallow(1) to considered the roam score param.
  20271. rssi_weightage_pcnt :- RSSI weightage out of total score in percentage
  20272. ht_weightage_pcnt :- HT weightage out of total score in percentage.
  20273. vht_weightage_pcnt :- VHT weightage out of total score in percentage.
  20274. he_weightage_pcnt :- 11ax weightage out of total score in percentage.
  20275. bw_weightage_pcnt :- Bandwidth weightage out of total score in percentage.
  20276. band_weightage_pcnt :- Band(2G/5G) weightage out of total score in percentage.
  20277. nss_weightage_pcnt:- NSS(1x1 / 2x2) weightage out of total score in percentage.
  20278. esp_qbss_weightage_pcnt: ESP/QBSS weightage out of total score in percentage.
  20279. beamforming_weightage_pcnt :- Beamforming weightage out of total score in percentage.
  20280. pcl_weightage_pcnt :- PCL weightage out of total score in percentage.
  20281. oce_wan_weightage_pcnt :- OCE WAN metrics weightage out of total score in percentage.
  20282. rssi_scoring :- RSSI scoring information.
  20283. bw_scoring :- channel BW scoring percentage information.
  20284. band_scoring : - band scording percentage information.
  20285. nss_scoring :- NSS scoring percentage information.
  20286. esp_qbss_scoring :- ESP/QBSS scoring percentage information
  20287. oce_wan_scoring : OCE WAN metrics percentage information
  20288. 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
  20289. 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.
  20290. */
  20291. typedef struct {
  20292. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_scoring_param */
  20293. A_UINT32 disable_bitmap;
  20294. A_INT32 rssi_weightage_pcnt;
  20295. A_INT32 ht_weightage_pcnt;
  20296. A_INT32 vht_weightage_pcnt;
  20297. A_INT32 he_weightage_pcnt;
  20298. A_INT32 bw_weightage_pcnt;
  20299. A_INT32 band_weightage_pcnt;
  20300. A_INT32 nss_weightage_pcnt;
  20301. A_INT32 esp_qbss_weightage_pcnt;
  20302. A_INT32 beamforming_weightage_pcnt;
  20303. A_INT32 pcl_weightage_pcnt;
  20304. A_INT32 oce_wan_weightage_pcnt;
  20305. wmi_roam_cnd_rssi_scoring rssi_scoring;
  20306. wmi_roam_cnd_bw_scoring bw_scoring;
  20307. wmi_roam_cnd_band_scoring band_scoring;
  20308. wmi_roam_cnd_nss_scoring nss_scoring;
  20309. wmi_roam_cnd_esp_qbss_scoring esp_qbss_scoring;
  20310. wmi_roam_cnd_oce_wan_scoring oce_wan_scoring;
  20311. A_UINT32 roam_score_delta_pcnt;
  20312. A_UINT32 roam_score_delta_mask;
  20313. /* Vendor specific roam score algorithm ID from WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID enum */
  20314. A_UINT32 vendor_roam_score_algorithm_id;
  20315. /*
  20316. * During CU and low RSSI based roam triggers, consider AP as
  20317. * roam candidate only if its roam score is better than connected AP score
  20318. * by at least candidate_min_roam_score_delta.
  20319. */
  20320. A_UINT32 candidate_min_roam_score_delta;
  20321. /*
  20322. * For OCE Release 2, give weightage to roam candidate tx power if
  20323. * oce_ap_tx_pwr_weightage_pcnt != 0.
  20324. */
  20325. A_UINT32 oce_ap_tx_pwr_weightage_pcnt;
  20326. /*
  20327. * For OCE Release 2, give weightage to roam candidate based on
  20328. * advertised subnet id.
  20329. * Only used if oce_ap_subnet_id_weightage_pcnt != 0.
  20330. */
  20331. A_UINT32 oce_ap_subnet_id_weightage_pcnt;
  20332. /*
  20333. * Give weightage to SAE-PK (Simultaneous Authentication of Equals -
  20334. * Public Key) enabled network APs.
  20335. * Only used if sae_pk_ap_weightage_pcnt != 0.
  20336. */
  20337. A_UINT32 sae_pk_ap_weightage_pcnt;
  20338. /*
  20339. * Give weightage to bandwidth which is greater than 160Mhz.
  20340. */
  20341. wmi_roam_cnd_bw_scoring ext_bw_scoring;
  20342. /*
  20343. * eht_weightage_pcnt :- 11be weightage out of total score in percentage.
  20344. */
  20345. A_UINT32 eht_weightage_pcnt;
  20346. /*
  20347. * mlo_weightage_pcnt :- give weightage to candidate based on MLO support.
  20348. */
  20349. A_UINT32 mlo_weightage_pcnt;
  20350. /*
  20351. * btc_score_factor :- Scale down 2.4GHz AP total score by btc_score_factor
  20352. * during BT coex.
  20353. * Value 0 should be ignored
  20354. */
  20355. A_UINT32 btc_score_factor;
  20356. /*
  20357. * btc_etp_factor :- Scale down 2.4GHz AP total etp value by btc_etp_factor
  20358. * during BT coex.
  20359. * Value 0 should be ignored
  20360. */
  20361. A_UINT32 btc_etp_factor;
  20362. /* Scoring for security mode */
  20363. A_INT32 security_weightage_pcnt;
  20364. wmi_roam_cnd_security_scoring security_scoring;
  20365. /* mlo_etp_weightage_pcnt:
  20366. * Give etp weightage to candidate based on MLO support.
  20367. * In host INI configuration, it will give boost(+) or reduction(-)
  20368. * percentage value and host will deliver actual weighted number
  20369. * based on 100. For example:
  20370. * If percentage value in INI is 20, then host will give 120 (100 * 1.2)
  20371. * as mlo_etp_weightage_pcnt.
  20372. * If percentage value in INI is -20, then host will give 80 (100 * 0.8)
  20373. * as mlo_etp_weightage_pcnt.
  20374. */
  20375. A_UINT32 mlo_etp_weightage_pcnt;
  20376. } wmi_roam_cnd_scoring_param;
  20377. typedef struct {
  20378. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_score_delta_param */
  20379. /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
  20380. A_UINT32 roam_trigger_reason;
  20381. /* Roam score delta in %.
  20382. * Consider AP as roam candidate only if AP score is at least
  20383. * roam_score_delta % better than connected AP score.
  20384. * Ex: roam_score_delta = 20, and connected AP score is 4000,
  20385. * then consider candidate AP only if its score is at least
  20386. * 4800 (= 4000 * 120%)
  20387. */
  20388. A_UINT32 roam_score_delta;
  20389. } wmi_roam_score_delta_param;
  20390. typedef struct {
  20391. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_min_rssi_param */
  20392. /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
  20393. A_UINT32 roam_trigger_reason;
  20394. /*
  20395. * Consider AP as roam candidate only if AP RSSI is better than
  20396. * candidate_min_rssi
  20397. */
  20398. A_UINT32 candidate_min_rssi; /* units = dBm */
  20399. } wmi_roam_cnd_min_rssi_param;
  20400. /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
  20401. * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
  20402. * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
  20403. * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
  20404. */
  20405. typedef struct {
  20406. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
  20407. /** flags as defined above */
  20408. A_UINT32 flags;
  20409. /**
  20410. * RSSI threshold value in dB: the value of the candidate AP should
  20411. * higher by this threshold than the RSSI of the currently associated AP.
  20412. */
  20413. A_UINT32 rssi_threshold;
  20414. /**
  20415. * ssid value to be matched.
  20416. */
  20417. wmi_ssid ssid;
  20418. /**
  20419. * security params to be matched.
  20420. */
  20421. /** authentication mode (defined above) */
  20422. A_UINT32 rsn_authmode;
  20423. /** unicast cipher set */
  20424. A_UINT32 rsn_ucastcipherset;
  20425. /** mcast/group cipher set */
  20426. A_UINT32 rsn_mcastcipherset;
  20427. /** mcast/group management frames cipher set */
  20428. A_UINT32 rsn_mcastmgmtcipherset;
  20429. /**
  20430. * rssi_abs_threshold value: the value of the candidate AP should
  20431. * higher than this absolute RSSI threshold.
  20432. * Zero means no absolute minimum RSSI is required.
  20433. * units are the offset from the noise floor in dB.
  20434. */
  20435. A_UINT32 rssi_abs_thresh;
  20436. /**
  20437. * bg_rssi_threshold value in dB: For background scan the value of
  20438. * the candidate AP should be higher by this threshold than the RSSI
  20439. * of the currently associated AP.
  20440. */
  20441. A_UINT32 bg_rssi_threshold;
  20442. } wmi_ap_profile;
  20443. typedef struct {
  20444. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_owe_ap_profile */
  20445. /* OPEN SSID value when STA is connected to OWE transition AP in OWE security */
  20446. wmi_ssid open_ssid_for_owe_transition;
  20447. } wmi_owe_ap_profile;
  20448. typedef struct {
  20449. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_vendor_scoring_param */
  20450. A_UINT32 tlv_header;
  20451. /** Indicates the channel band for which these vendor scoring params needs to be applied.
  20452. * Refer WLAN_ROAM_SCORE_MAX_BAND_INDEX for possible band_idx values.
  20453. */
  20454. A_UINT32 band_idx;
  20455. /** Below RSSI/CU factor_value & factor_score param values are configured by vendor */
  20456. A_UINT32 rssi_factor_value1;
  20457. A_UINT32 rssi_factor_value2;
  20458. A_UINT32 rssi_factor_value3;
  20459. A_UINT32 rssi_factor_value4;
  20460. A_UINT32 rssi_factor_value5;
  20461. A_UINT32 rssi_factor_score1;
  20462. A_UINT32 rssi_factor_score2;
  20463. A_UINT32 rssi_factor_score3;
  20464. A_UINT32 rssi_factor_score4;
  20465. A_UINT32 rssi_factor_score5;
  20466. A_UINT32 cu_factor_value1;
  20467. A_UINT32 cu_factor_value2;
  20468. A_UINT32 cu_factor_score1;
  20469. A_UINT32 cu_factor_score2;
  20470. } wmi_roam_cnd_vendor_scoring_param;
  20471. /** Support early stop roaming scanning when finding a strong candidate AP
  20472. * A 'strong' candidate is
  20473. * 1) Is eligible candidate
  20474. * (all conditions are met in existing candidate selection).
  20475. * 2) Its RSSI is better than earlystop threshold.
  20476. * Earlystop threshold will be relaxed as each channel is scanned.
  20477. */
  20478. typedef struct {
  20479. A_UINT32 tlv_header;
  20480. /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
  20481. A_UINT32 roam_earlystop_thres_min;
  20482. /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
  20483. A_UINT32 roam_earlystop_thres_max;
  20484. } wmi_roam_earlystop_rssi_thres_param;
  20485. typedef struct {
  20486. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param */
  20487. A_UINT32 tlv_header;
  20488. /** RSSI threshold offset under trffic and dense env */
  20489. A_UINT32 roam_dense_rssi_thres_offset;
  20490. /** minimum number of APs to determine dense env */
  20491. A_UINT32 roam_dense_min_aps;
  20492. /** initial dense status detected by host at the time of initial connection */
  20493. A_UINT32 roam_dense_status;
  20494. /* traffic threshold to enable aggressive roaming in dense env; units are percent of medium occupancy, 0 - 100 */
  20495. A_UINT32 roam_dense_traffic_thres;
  20496. } wmi_roam_dense_thres_param;
  20497. /* Definition for flags in wmi_roam_bg_scan_roaming_param
  20498. * Bit 0: BG roaming enabled when we connect to 2G AP only and roaming to 5G AP only.
  20499. * Bit 1-31: Reserved
  20500. */
  20501. #define WMI_ROAM_BG_SCAN_FLAGS_2G_TO_5G_ONLY 1
  20502. typedef struct {
  20503. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bg_scan_roaming_param */
  20504. A_UINT32 tlv_header;
  20505. /** RSSI threshold in dBm below which roaming will be triggered during background scan(non-roam scan). 0 will disable this threshold */
  20506. A_UINT32 roam_bg_scan_bad_rssi_thresh;
  20507. /** 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 */
  20508. A_UINT32 roam_bg_scan_client_bitmap;
  20509. /** roam scan RSSI threshold for 2 GHz band.
  20510. * offset from roam_bg_scan_bad_rssi_thresh, in dB units
  20511. */
  20512. A_INT32 bad_rssi_thresh_offset_2g;
  20513. /* flags for background roaming */
  20514. A_UINT32 flags;
  20515. } wmi_roam_bg_scan_roaming_param;
  20516. /*
  20517. * If there's rx activity during rx_inactivity_ms and avg of data_rssi
  20518. * is better than roam_data_rssi_thres, then suppress low rssi roaming.
  20519. */
  20520. #define WMI_ROAM_DATA_RSSI_FLAG_LOW_RSSI 0x00000001
  20521. /*
  20522. * If there's no rx activity during rx_inactivity_ms or avg of data_rssi
  20523. * is better than roam_data_rssi_thres, then suppress this background roaming.
  20524. */
  20525. #define WMI_ROAM_DATA_RSSI_FLAG_BACKGROUND 0x00000002
  20526. typedef struct {
  20527. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_data_rssi_roaming_param */
  20528. A_UINT32 tlv_header;
  20529. /* flags for when consider data_rssi,
  20530. * valid values are OR operation of WMI_ROAM_DATA_RSSI_FLAG_ .
  20531. * value 0 to disable the feature.
  20532. */
  20533. A_UINT32 flags;
  20534. /**
  20535. * RSSI threshold in dBm above which roaming scan will be suppressed
  20536. * during some roaming trigger.
  20537. */
  20538. A_INT32 roam_data_rssi_thres;
  20539. /** rx inactivity time, in unit of milliseconds. */
  20540. A_UINT32 rx_inactivity_ms;
  20541. } wmi_roam_data_rssi_roaming_param;
  20542. /** Beacon filter wmi command info */
  20543. #define BCN_FLT_MAX_SUPPORTED_IES 256
  20544. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES/32)
  20545. typedef struct bss_bcn_stats {
  20546. A_UINT32 vdev_id;
  20547. A_UINT32 bss_bcnsdropped;
  20548. A_UINT32 bss_bcnsdelivered;
  20549. } wmi_bss_bcn_stats_t;
  20550. typedef struct bcn_filter_stats {
  20551. A_UINT32 bcns_dropped;
  20552. A_UINT32 bcns_delivered;
  20553. A_UINT32 activefilters;
  20554. wmi_bss_bcn_stats_t bss_stats;
  20555. } wmi_bcnfilter_stats_t;
  20556. typedef struct wmi_add_bcn_filter_cmd {
  20557. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
  20558. A_UINT32 vdev_id;
  20559. /*
  20560. * Following this structure is the TLV:
  20561. * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  20562. */
  20563. } wmi_add_bcn_filter_cmd_fixed_param;
  20564. typedef struct wmi_rmv_bcn_filter_cmd {
  20565. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
  20566. A_UINT32 vdev_id;
  20567. } wmi_rmv_bcn_filter_cmd_fixed_param;
  20568. #define WMI_BCN_SEND_DTIM_ZERO 1
  20569. #define WMI_BCN_SEND_DTIM_BITCTL_SET 2
  20570. typedef struct wmi_bcn_send_from_host {
  20571. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
  20572. A_UINT32 vdev_id;
  20573. A_UINT32 data_len;
  20574. union {
  20575. A_UINT32 frag_ptr; /* Physical address of the frame */
  20576. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  20577. };
  20578. A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
  20579. A_UINT32 dtim_flag; /* to control CABQ traffic */
  20580. A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
  20581. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  20582. } wmi_bcn_send_from_host_cmd_fixed_param;
  20583. /* cmd to support bcn snd for all vaps at once */
  20584. typedef struct wmi_pdev_send_bcn {
  20585. A_UINT32 num_vdevs;
  20586. WMI_VAR_LEN_ARRAY1(wmi_bcn_send_from_host_cmd_fixed_param, bcn_cmd);
  20587. } wmi_pdev_send_bcn_cmd_t;
  20588. typedef struct wmi_fd_send_from_host {
  20589. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_send_from_host_cmd_fixed_param */
  20590. A_UINT32 vdev_id;
  20591. A_UINT32 data_len;
  20592. union {
  20593. A_UINT32 frag_ptr; /* Physical address of the frame */
  20594. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  20595. };
  20596. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  20597. A_UINT32 frame_ctrl; /* frame ctrl to setup PPDU desc */
  20598. } wmi_fd_send_from_host_cmd_fixed_param;
  20599. /*
  20600. * Control to send broadcast probe response instead of FD frames.
  20601. * When this flag is not set then FD frame will be transmitted when
  20602. * fd_period is non-zero
  20603. */
  20604. #define WMI_FILS_FLAGS_BITMAP_BCAST_PROBE_RSP 0x1
  20605. /*
  20606. * WMI command structure for FILS feature enable/disable
  20607. */
  20608. typedef struct {
  20609. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_fils_cmd_fixed_param */
  20610. /* VDEV identifier */
  20611. A_UINT32 vdev_id;
  20612. A_UINT32 fd_period; /* non-zero - enable Fils Discovery frames or broadcast probe response with this period (in TU),
  20613. * 0 - disable FD and broadcast probe response frames */
  20614. A_UINT32 flags; /* WMI_FILS_FLAGS_BITMAP flags */
  20615. } wmi_enable_fils_cmd_fixed_param;
  20616. /*
  20617. * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
  20618. */
  20619. typedef struct {
  20620. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
  20621. /** id of AP criteria */
  20622. A_UINT32 id;
  20623. /** unique id identifying the VDEV, generated by the caller */
  20624. A_UINT32 vdev_id;
  20625. /*
  20626. * Following this structure are the TLVs:
  20627. * wmi_ap_profile ap_profile; <-- AP profile info
  20628. * wmi_roam_cnd_scoring_param roam_cnd_scoring_param
  20629. * wmi_roam_score_delta_param roam_score_delta_param_list[]
  20630. * wmi_roam_cnd_min_rssi_param roam_cnd_min_rssi_param_list[]
  20631. * wmi_roam_cnd_vendor_scoring_param roam_cnd_vendor_scoring_param[]
  20632. * wmi_owe_ap_profile owe_ap_profile[]
  20633. * A_UINT32 authmode_list[] <-- List of authmode allowed for roaming.
  20634. * Refer WMI_AUTH_ for authmode values.
  20635. */
  20636. } wmi_roam_ap_profile_fixed_param;
  20637. /**
  20638. * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
  20639. */
  20640. typedef struct {
  20641. /** id of AP criteria */
  20642. A_UINT32 id;
  20643. /** unique id identifying the VDEV, generated by the caller */
  20644. A_UINT32 vdev_id;
  20645. /** AP profile info */
  20646. wmi_ap_profile ap_profile;
  20647. } wmi_ofl_scan_add_ap_profile;
  20648. /**
  20649. * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
  20650. */
  20651. typedef struct {
  20652. /** id of AP criteria */
  20653. A_UINT32 id;
  20654. /** unique id identifying the VDEV, generated by the caller */
  20655. A_UINT32 vdev_id;
  20656. } wmi_ofl_scan_remove_ap_profile;
  20657. /**
  20658. * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
  20659. * 0 will disable ofload scan and a very low value will perform a continuous
  20660. * scan.
  20661. */
  20662. typedef struct {
  20663. /** offload scan period value, used for scans used when not connected */
  20664. A_UINT32 ofl_scan_period;
  20665. } wmi_ofl_scan_period;
  20666. /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
  20667. #define ROAM_OFFLOAD_PMK_BYTES (32)
  20668. #define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
  20669. #define ROAM_OFFLOAD_KRK_BYTES (16)
  20670. #define ROAM_OFFLOAD_BTK_BYTES (32)
  20671. #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
  20672. #define ROAM_OFFLOAD_NUM_MCS_SET (16)
  20673. /* This TLV will be filled only in case roam offload for wpa2-psk/okc/ese/11r is enabled */
  20674. typedef struct {
  20675. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
  20676. A_UINT32 rssi_cat_gap; /* gap for every category bucket */
  20677. A_UINT32 prefer_5g; /* prefer select 5G candidate */
  20678. A_UINT32 select_5g_margin;
  20679. A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
  20680. A_UINT32 capability;
  20681. A_UINT32 ht_caps_info;
  20682. A_UINT32 ampdu_param;
  20683. A_UINT32 ht_ext_cap;
  20684. A_UINT32 ht_txbf;
  20685. A_UINT32 asel_cap;
  20686. A_UINT32 qos_enabled;
  20687. A_UINT32 qos_caps;
  20688. A_UINT32 wmm_caps;
  20689. A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned, we don't declare it as tlv array */
  20690. A_UINT32 handoff_delay_for_rx; /* In msec. Delay Hand-Off by this duration to receive pending Rx frames from current BSS */
  20691. A_UINT32 max_mlme_sw_retries; /* maximum number of software retries for preauth and reassoc req */
  20692. A_UINT32 no_ack_timeout; /* In msec. duration to wait before another SW retry made if no ack seen for previous frame */
  20693. 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. */
  20694. A_UINT32 roam_to_current_bss_disable; /* Disable roaming to current bss */
  20695. } wmi_roam_offload_tlv_param;
  20696. /* flags for 11i offload */
  20697. #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
  20698. #define WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED 1 /* pmk caching is disabled */
  20699. #define WMI_ROAM_OFFLOAD_FLAG_SAE_SAME_PMKID 2 /* Use same PMKID for WPA3 SAE roaming */
  20700. /* from bit 3 to bit 31 are reserved */
  20701. #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
  20702. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  20703. } while (0)
  20704. #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
  20705. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  20706. } while (0)
  20707. #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
  20708. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
  20709. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_ENABLED(flag) \
  20710. do { \
  20711. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  20712. } while (0)
  20713. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  20714. do { \
  20715. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  20716. } while (0)
  20717. #define WMI_GET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  20718. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED))
  20719. /* This TLV will be filled only in case of wpa-psk/wpa2-psk/wpa3 */
  20720. typedef struct {
  20721. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
  20722. A_UINT32 flags; /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
  20723. A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
  20724. A_UINT32 pmk_len; /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
  20725. A_UINT32 pmk_ext_len; /** the length of extended pmk. in normal case it should be 0, but for suiteB, it should be 16*/
  20726. A_UINT32 pmk_ext[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk ext offload. 16 bytes for suiteB */
  20727. } wmi_roam_11i_offload_tlv_param;
  20728. /* This TLV will be filled only in case of 11R*/
  20729. typedef struct {
  20730. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
  20731. A_UINT32 mdie_present;
  20732. A_UINT32 mdid;
  20733. A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN>>2];
  20734. A_UINT32 r0kh_id_len;
  20735. 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 */
  20736. A_UINT32 psk_msk_len; /**length of psk_msk*/
  20737. A_UINT32 psk_msk_ext_len; /**length of psk_msk_ext*/
  20738. A_UINT32 psk_msk_ext[ROAM_OFFLOAD_PSK_MSK_BYTES>>2];
  20739. A_UINT32 adaptive_11r; /* FW needs to perform adaptive 11r roaming */
  20740. /*
  20741. * FW needs to perform FT initial moiblity association instead of
  20742. * FT roaming for deauth roam trigger
  20743. * 0 - To disable FT-IM
  20744. * 1 - To enable FT-IM
  20745. */
  20746. A_UINT32 ft_im_for_deauth;
  20747. /*
  20748. * FW can prefer doing over-the-ds fast BSS transition instead of
  20749. * over-the-air if associated and target AP are both capable of FT over DS.
  20750. * 0 - To disable FT-over-DS
  20751. * 1 - To enable FT-over-DS
  20752. */
  20753. A_UINT32 ft_over_ds_enable;
  20754. } wmi_roam_11r_offload_tlv_param;
  20755. /* This TLV will be filled only in case of ESE */
  20756. typedef struct {
  20757. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
  20758. A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
  20759. A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
  20760. } wmi_roam_ese_offload_tlv_param;
  20761. typedef struct {
  20762. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_sae_offload_tlv_param */
  20763. /* SAE SPMK timeout value in seconds after which FW need to perform SAE full authentication to derive new SPMK */
  20764. A_UINT32 spmk_timeout;
  20765. } wmi_roam_sae_offload_tlv_param;
  20766. typedef enum {
  20767. WMI_BL_REASON_NUD_FAILURE = 1,
  20768. WMI_BL_REASON_STA_KICKOUT,
  20769. WMI_BL_REASON_ROAM_HO_FAILURE,
  20770. /* Assoc resp with status code 71 - POOR RSSI CONDITIONS */
  20771. WMI_BL_REASON_ASSOC_REJECT_POOR_RSSI,
  20772. /* Assoc resp with status code 34 - DENIED_POOR_CHANNEL_CONDITIONS */
  20773. WMI_BL_REASON_ASSOC_REJECT_OCE,
  20774. WMI_BL_REASON_USERSPACE_BL,
  20775. WMI_BL_REASON_USERSPACE_AVOID_LIST,
  20776. WMI_BL_REASON_BTM_DIASSOC_IMMINENT,
  20777. WMI_BL_REASON_BTM_BSS_TERMINATION,
  20778. WMI_BL_REASON_BTM_MBO_RETRY,
  20779. /* Reassoc resp with status code 34 - DENIED_POOR_CHANNEL_CONDITIONS */
  20780. WMI_BL_REASON_REASSOC_RSSI_REJECT,
  20781. /* Reassoc resp with status code 17 - DENIED_NO_MORE_STAS */
  20782. WMI_BL_REASON_REASSOC_NO_MORE_STAS,
  20783. WMI_BL_REASON_BASIC_RATES_MIS_MATCH, /* Status code 18 */
  20784. WMI_BL_REASON_EHT_NOT_SUPPORTED, /* Status code 135 */
  20785. WMI_BL_REASON_EXISTING_MLD_ASSOCIATION, /* Status code 130 */
  20786. WMI_BL_REASON_LINK_TRANSMITTED_NOT_ACCEPTED, /* Status code 139 */
  20787. WMI_BL_REASON_DENIED_OTHER_REASON,
  20788. WMI_BL_REASON_BTM_LOAD_BALANCE,
  20789. } WMI_BLACKLIST_REASON_ID;
  20790. typedef enum {
  20791. WMI_BL_SOURCE_HOST = 1,
  20792. WMI_BL_SOURCE_FW,
  20793. } WMI_BLACKLIST_SOURCE_ID;
  20794. #define WMI_MAX_FAILED_LINK_COMBO_COUNT 10
  20795. typedef struct {
  20796. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_with_timeout_tlv_param */
  20797. A_UINT32 tlv_header;
  20798. /** Blaclisted AP mac address */
  20799. wmi_mac_addr bssid;
  20800. /** How much time in milliseconds to keep AP in blacklist */
  20801. A_UINT32 timeout;
  20802. /** RSSI (dBm units) when put in blacklist */
  20803. A_INT32 rssi;
  20804. /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
  20805. A_UINT32 reason;
  20806. /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
  20807. A_UINT32 source;
  20808. /*
  20809. * timestamp is the absolute time w.r.t host timer which is synchronized
  20810. * between the host and target.
  20811. * This timestamp indicates the time when AP added to blacklist.
  20812. */
  20813. A_UINT32 timestamp;
  20814. /* Original timeout value in milli seconds when AP added to BL */
  20815. A_UINT32 original_timeout;
  20816. /*
  20817. * The disallow link ID bitmap indicates links which should not be allowed
  20818. * for any assoc or partner link combination.
  20819. * If all links for MLD AP are disallowed, then the value shall be
  20820. * 0xffffffff.
  20821. */
  20822. A_UINT32 disallow_linkid_bitmap;
  20823. /* MLD address of AP */
  20824. wmi_mac_addr mld;
  20825. /* List of link combinations for which association is failed */
  20826. A_UINT32 ml_failed_links_combo_bitmap[WMI_MAX_FAILED_LINK_COMBO_COUNT];
  20827. /* Failed link combo count filled in ml_failed_links_combo_bitmap[] */
  20828. A_UINT32 ml_failed_link_combo_count;
  20829. } wmi_roam_blacklist_with_timeout_tlv_param;
  20830. /** WMI_ROAM_BLACKLIST_EVENT: generated whenever STA needs to move AP to blacklist for a particluar time
  20831. * Ex: AP which sends BTM request with disassoc imminent is set should be
  20832. * moved to blacklist until disassociation timer expires
  20833. */
  20834. typedef struct {
  20835. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param */
  20836. A_UINT32 vdev_id;
  20837. /* This TLV is followed by further TLVs:
  20838. * wmi_roam_blacklist_with_timeout_tlv_param blacklist_with_timeout[]
  20839. */
  20840. } wmi_roam_blacklist_event_fixed_param;
  20841. typedef struct {
  20842. A_UINT32 tlv_header;
  20843. /** candidate AP mac address */
  20844. wmi_mac_addr bssid;
  20845. } wmi_roam_pmkid_request_tlv_param;
  20846. /** WMI_ROAM_PMKID_REQUEST_EVENT: generated whenever FW needs the PMKID while roaming **/
  20847. typedef struct {
  20848. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmkid_request_event_fixed_param */
  20849. A_UINT32 vdev_id;
  20850. /* This TLV is followed by further TLVs:
  20851. * wmi_roam_pmkid_request_tlv_param pmkid_request[]
  20852. */
  20853. } wmi_roam_pmkid_request_event_fixed_param;
  20854. /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
  20855. * generated when ever a better AP is found in the recent roam scan (or)
  20856. * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
  20857. * from the current AP.
  20858. */
  20859. typedef struct {
  20860. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
  20861. /** unique id identifying the VDEV, generated by the caller */
  20862. A_UINT32 vdev_id;
  20863. /** reason for roam event */
  20864. A_UINT32 reason;
  20865. /** associated AP's RSSI calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI */
  20866. A_UINT32 rssi;
  20867. /** roam notification */
  20868. A_UINT32 notif;
  20869. /** roam notification param
  20870. * Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params value.
  20871. * notif_params contains roam invoke fail reason from
  20872. * wmi_roam_invoke_error_t if reason is WMI_ROAM_REASON_INVOKE_ROAM_FAIL.
  20873. */
  20874. A_UINT32 notif_params;
  20875. /** roam notification param1
  20876. * Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params1 value.
  20877. * notif_params1 is exact frame length of deauth or disassoc if reason
  20878. * is WMI_ROAM_REASON_DEAUTH.
  20879. */
  20880. A_UINT32 notif_params1;
  20881. } wmi_roam_event_fixed_param;
  20882. #define WMI_ROAM_BSS_INFO_FLAG_IS_MLD 0
  20883. typedef struct {
  20884. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_info_param */
  20885. /*
  20886. * bit0: WMI_ROAM_BSS_INFO_FLAG_IS_MLD
  20887. */
  20888. A_UINT32 flags;
  20889. /*
  20890. * mld score if WMI_ROAM_BSS_INFO_FLAG_IS_MLD set, otherwise link score
  20891. */
  20892. A_UINT32 score;
  20893. /*
  20894. * mld address if WMI_ROAM_BSS_INFO_FLAG_IS_MLD set, otherwise link address
  20895. */
  20896. wmi_mac_addr mac_addr;
  20897. } wmi_roam_bss_info_param;
  20898. /* roam_reason: bits 0-3 */
  20899. #define WMI_ROAM_REASON_INVALID 0x0 /** invalid reason. Do not interpret reason field */
  20900. #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
  20901. #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
  20902. #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low RSSI condition detected */
  20903. #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
  20904. SSID and Security profile in
  20905. WMI_ROAM_AP_PROFILE, found during scan
  20906. triggered upon FINAL_BMISS **/
  20907. #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
  20908. /** WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
  20909. * Result code of WMI_ROAM_INVOKE_CMDID.
  20910. * Any roaming failure before reassociation will be indicated to host
  20911. * with this reason.
  20912. * Any roaming failure after reassociation will be indicated to host with
  20913. * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
  20914. */
  20915. #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
  20916. #define WMI_ROAM_REASON_RSO_STATUS 0x7
  20917. #define WMI_ROAM_REASON_BTM 0x8 /** Roaming because of BTM request received */
  20918. #define WMI_ROAM_REASON_DEAUTH 0x9 /** deauth/disassoc received */
  20919. /* reserved up through 0xF */
  20920. /* subnet status: bits 4-5 */
  20921. typedef enum
  20922. {
  20923. WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
  20924. WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
  20925. WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
  20926. } wmi_roam_subnet_change_status;
  20927. #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
  20928. #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
  20929. #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
  20930. do { \
  20931. (roam_reason) |= \
  20932. (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
  20933. WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
  20934. } while (0)
  20935. #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
  20936. (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
  20937. WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
  20938. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK 0x40
  20939. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT 6
  20940. #define WMI_SET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason, status) \
  20941. do { \
  20942. (roam_reason) |= \
  20943. (((status) << WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT) & \
  20944. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK); \
  20945. } while (0)
  20946. #define WMI_GET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason) \
  20947. (((roam_reason) & WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK) >> \
  20948. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT)
  20949. /* Bits 0-3: stores 4 LSbs of trigger reason.
  20950. * Old host will get trigger reasons <= 15 from this bitfield.
  20951. * Bit 7 will be 1 always to indicate that bits 8-15 are valid.
  20952. * Bits 8-15: full trigger_reason, including values > 15.
  20953. * New host will gett full trigger_reason from this bitfield.
  20954. * Bits 8-11 and bits 0-3 store matching values.
  20955. */
  20956. #define WMI_SET_ROAM_EXT_TRIGGER_REASON(roam_reason, trigger_reason) \
  20957. do { \
  20958. (roam_reason) |= (trigger_reason & 0xf); \
  20959. (roam_reason) |= 0x80; \
  20960. (roam_reason) |= ((trigger_reason & 0xff) << 8); \
  20961. } while (0)
  20962. /* roaming notification */
  20963. #define WMI_ROAM_NOTIF_INVALID 0x0 /** invalid notification. Do not interpret notif field */
  20964. #define WMI_ROAM_NOTIF_ROAM_START 0x1 /** indicate that roaming is started. sent only in non WOW state */
  20965. #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2 /** indicate that roaming is aborted. sent only in non WOW state */
  20966. #define WMI_ROAM_NOTIF_ROAM_REASSOC 0x3 /** indicate that reassociation is done. sent only in non WOW state */
  20967. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS 0x4 /** indicate that roaming scan mode is successful */
  20968. #define WMI_ROAM_NOTIF_SCAN_MODE_FAIL 0x5 /** indicate that roaming scan mode is failed due to internal roaming state */
  20969. #define WMI_ROAM_NOTIF_DISCONNECT 0x6 /** indicate that roaming not allowed due BTM req */
  20970. #define WMI_ROAM_NOTIF_SUBNET_CHANGED 0x7 /** indicate that subnet has changed */
  20971. #define WMI_ROAM_NOTIF_SCAN_START 0x8 /** indicate roam scan start, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
  20972. #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 */
  20973. #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 */
  20974. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS_WITH_HO_FAIL 0xb /** indicate that roaming scan mode is successful but cause disconnection and subsequent
  20975. ** WMI_ROAM_REASON_HO_FAILED is event expected */
  20976. #define WMI_ROAM_NOTIF_SCAN_END 0xc /** indicate roam scan end, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
  20977. /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
  20978. * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on this information
  20979. */
  20980. typedef struct
  20981. {
  20982. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
  20983. A_UINT32 vdev_id; /**unique id identifying the VDEV, generated by the caller*/
  20984. A_UINT32 num_ric_request; /**number of ric request ie send to firmware.(max value is 2 now)*/
  20985. A_UINT32 is_add_ric; /**support add ric or delete ric*/
  20986. } wmi_ric_request_fixed_param;
  20987. /** tspec element: refer to 8.4.2.32 of 802.11 2012 spec
  20988. * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
  20989. */
  20990. typedef struct {
  20991. A_UINT32 tlv_header;
  20992. A_UINT32 ts_info; /** bits value of TS Info field.*/
  20993. A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
  20994. A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
  20995. A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
  20996. A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
  20997. A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
  20998. A_UINT32 suspension_interval; /**The Suspension Interval field*/
  20999. A_UINT32 svc_start_time; /**The Service Start Time field*/
  21000. A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
  21001. A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
  21002. A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
  21003. A_UINT32 max_burst_size; /**The Burst Size field*/
  21004. A_UINT32 delay_bound; /**The Delay Bound field*/
  21005. A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
  21006. A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
  21007. A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
  21008. } wmi_ric_tspec;
  21009. /* flags for roam_invoke_cmd */
  21010. /* add this channel into roam cache channel list after this command is finished */
  21011. #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
  21012. /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
  21013. #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
  21014. /* during host-invoked roaming, don't send null data frame to AP */
  21015. #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
  21016. /* start extra full scan if no candidate found in previous scan */
  21017. #define WMI_ROAM_INVOKE_FLAG_FULL_SCAN_IF_NO_CANDIDATE 3
  21018. /* when bit is set:
  21019. * Candidate selection algo will based on fw score algo.
  21020. * Which means configurations like wmi_roam_score_delta_param,
  21021. * wmi_configure_roam_trigger_parameters is also configurable for
  21022. * host_invoke roam, as well as consider current BSS score as
  21023. * score algo input.
  21024. * when bit is not set:
  21025. * Candidate selection algo will ignore score and above configurations
  21026. * and ignore current BSS score.
  21027. */
  21028. #define WMI_ROAM_INVOKE_FLAG_SELECT_CANDIDATE_CONSIDER_SCORE 4
  21029. /* from bit 5 to bit 31 are reserved */
  21030. #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  21031. (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  21032. } while (0)
  21033. #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  21034. (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  21035. } while (0)
  21036. #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
  21037. ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
  21038. #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
  21039. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
  21040. #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
  21041. #define WMI_ROAM_INVOKE_SCAN_MODE_SKIP 3 /* no scan is performed. use beacon/probe resp given by the host */
  21042. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_MAP 4 /* scan cached channel map */
  21043. #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
  21044. #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
  21045. enum wlan_roam_invoke_reason {
  21046. ROAM_INVOKE_REASON_UNDEFINED = 0,
  21047. /* FW will use default parameters to do roam scan, ignore other parameters like WLM, etc. */
  21048. ROAM_INVOKE_REASON_NUD_FAILURE, /* Neighbor Unreachable Detection */
  21049. ROAM_INVOKE_REASON_USER_SPACE,
  21050. };
  21051. /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
  21052. *
  21053. if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
  21054. if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
  21055. This command can be used to add specific channel into roam cached channel list by following
  21056. <roam_scan_ch_mode> = 0
  21057. <roam_ap_sel_mode> = 0
  21058. <roam_delay> = 0
  21059. <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
  21060. <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
  21061. <channel_no> = channel list to be added
  21062. */
  21063. typedef struct {
  21064. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
  21065. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
  21066. A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
  21067. A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
  21068. A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
  21069. A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
  21070. A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
  21071. A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
  21072. A_UINT32 num_buf; /** number of buffers In the TLV bcn_prb_buf_list[] */
  21073. A_UINT32 reason; /** reason of invoke roam, see enum wlan_roam_invoke_reason */
  21074. /**
  21075. * TLV (tag length value) parameters follows roam_invoke_req
  21076. * The TLV's are:
  21077. * A_UINT32 channel_list[]; // in MHz
  21078. * wmi_mac_addr bssid_list[];
  21079. * wmi_tlv_buf_len_param bcn_prb_buf_list[];
  21080. * A_UINT8 bcn_prb_frm[];
  21081. */
  21082. } wmi_roam_invoke_cmd_fixed_param;
  21083. /* Definition for op_bitmap */
  21084. enum {
  21085. ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
  21086. ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
  21087. ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
  21088. ROAM_FILTER_OP_BITMAP_LCA_DISALLOW = 0x8,
  21089. ROAM_FILTER_OP_BITMAP_RSSI_REJECTION_OCE = 0x10,
  21090. };
  21091. /** lca_enable_source_bitmap */
  21092. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PER 0x1
  21093. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BMISS 0x2
  21094. #define WMI_ROAM_LCA_DISALLOW_SOURCE_LOW_RSSI 0x4
  21095. #define WMI_ROAM_LCA_DISALLOW_SOURCE_HIGH_RSSI 0x8
  21096. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PERIODIC 0x10
  21097. #define WMI_ROAM_LCA_DISALLOW_SOURCE_MAWC 0x20 /* MAWC = Motion Aided Wifi connectivity */
  21098. #define WMI_ROAM_LCA_DISALLOW_SOURCE_DENSE 0x40
  21099. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BACKGROUND 0x80
  21100. #define WMI_ROAM_LCA_DISALLOW_SOURCE_FORCED 0x100
  21101. typedef struct {
  21102. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_rejection_list_config_param */
  21103. A_UINT32 tlv_header;
  21104. /** BSSID of AP, who reject (re-)assoc due to low RSSI */
  21105. wmi_mac_addr bssid;
  21106. /** Disallowed AP for certain duration, in units of milliseconds */
  21107. A_UINT32 remaining_disallow_duration;
  21108. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  21109. A_INT32 requested_rssi;
  21110. } wmi_roam_rejection_list_config_param;
  21111. 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 */
  21112. typedef struct {
  21113. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
  21114. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
  21115. A_UINT32 flags; /** flags for filter */
  21116. A_UINT32 op_bitmap; /** 32 bit bitmap to be set on. bit0 = first param, bit 1 = second param...etc. Can be or'ed */
  21117. A_UINT32 num_bssid_black_list; /* number of blacklist in the TLV variable bssid_black_list */
  21118. A_UINT32 num_ssid_white_list; /* number of whitelist in the TLV variable ssid_white_list */
  21119. A_UINT32 num_bssid_preferred_list; /* only for lfr 3.0. number of preferred list & factor in the TLV */
  21120. A_UINT32 num_rssi_rejection_ap; /** number of list of AP who rejected STA due to low RSSI */
  21121. A_UINT32 delta_rssi; /** (dB units) when AB in RSSI blacklist improved by at least delta_rssi, it will be removed from blacklist */
  21122. /**
  21123. * TLV (tag length value) parameters follows roam_filter_list_cmd
  21124. * The TLV's are:
  21125. * wmi_mac_addr bssid_black_list[];
  21126. * wmi_ssid ssid_white_list[];
  21127. * wmi_mac_addr bssid_preferred_list[];
  21128. * A_UINT32 bssid_preferred_factor[];
  21129. * wmi_roam_lca_disallow_config_tlv_param lca_disallow_param[0/1] (opt)
  21130. * wmi_roam_rejection_list_config_param rssi_rejection_list[]
  21131. */
  21132. } wmi_roam_filter_fixed_param;
  21133. typedef struct {
  21134. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param */
  21135. A_UINT32 disallow_duration; /** How long LCA AP will be disallowed before it can be a roaming candidate again, in units of seconds */
  21136. 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 */
  21137. A_UINT32 num_disallowed_aps; /** How many APs the target should maintain in its LCA (Last Connected AP) list */
  21138. 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) */
  21139. } wmi_roam_lca_disallow_config_tlv_param;
  21140. typedef struct {
  21141. A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
  21142. } WMI_IPV4_ADDR;
  21143. typedef struct _WMI_IPV6_ADDR {
  21144. A_UINT8 address[16]; /* IPV6 in Network Byte Order */
  21145. } WMI_IPV6_ADDR;
  21146. /* flags for subnet change detection */
  21147. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
  21148. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
  21149. /* bit 2 to bit 31 are reserved */
  21150. /* set IPv4 enabled/disabled flag and get the flag */
  21151. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
  21152. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  21153. } while (0)
  21154. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
  21155. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  21156. } while (0)
  21157. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
  21158. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
  21159. /* set IPv6 enabled flag, disabled and get the flag */
  21160. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
  21161. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  21162. } while (0)
  21163. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
  21164. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  21165. } while (0)
  21166. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
  21167. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
  21168. /**
  21169. * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
  21170. * to FW. FW uses these parameters for subnet change detection.
  21171. */
  21172. typedef struct {
  21173. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
  21174. /** unique id identifying the VDEV, generated by the caller */
  21175. A_UINT32 vdev_id;
  21176. /** IPv4/IPv6 enabled/disabled */
  21177. /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/DISABLED */
  21178. A_UINT32 flag;
  21179. /** Gateway MAC address */
  21180. wmi_mac_addr inet_gw_mac_addr;
  21181. /** IP addresses */
  21182. WMI_IPV4_ADDR inet_gw_ip_v4_addr;
  21183. WMI_IPV6_ADDR inet_gw_ip_v6_addr;
  21184. /** Number of software retries for ARP/Neighbor solicitation request */
  21185. A_UINT32 max_retries;
  21186. /** timeout in milliseconds for each ARP request*/
  21187. A_UINT32 timeout;
  21188. /** number of skipped aps **/
  21189. A_UINT32 num_skip_subnet_change_detection_bssid_list;
  21190. /**
  21191. * TLV (tag length value) parameters follows roam_subnet_change_config_cmd
  21192. * structure. The TLV's are:
  21193. * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
  21194. **/
  21195. } wmi_roam_subnet_change_config_fixed_param;
  21196. typedef enum {
  21197. /** No change in scan mode, use legacy modes */
  21198. ROAM_TRIGGER_SCAN_MODE_NONE = 0,
  21199. /** Trigger only partial roam scan */
  21200. ROAM_TRIGGER_SCAN_MODE_PARTIAL,
  21201. /** Trigger only FULL roam scan */
  21202. ROAM_TRIGGER_SCAN_MODE_FULL,
  21203. /** Don't trigger any roam scan and disconnect from AP */
  21204. ROAM_TRIGGER_SCAN_MODE_NO_SCAN_DISCONNECTION,
  21205. } WMI_ROAM_TRIGGER_SCAN_MODE;
  21206. typedef struct {
  21207. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_configure_roam_trigger_parameters */
  21208. A_UINT32 trigger_reason; /** Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID */
  21209. A_UINT32 enable; /** 0 - Disable, non-zero - enable */
  21210. A_UINT32 scan_mode; /** Scan mode from WMI_ROAM_TRIGGER_SCAN_MODE */
  21211. /** consider roam trigger if connected AP RSSI is worse than trigger_rssi_threshold */
  21212. A_INT32 trigger_rssi_threshold; /* Units in dBm */
  21213. /*
  21214. * Consider 2.4GHz AP as roam candidate only if AP RSSI is better than
  21215. * cand_ap_min_rssi_threshold
  21216. * If valid (non-zero) cand_ap_min_rssi_threshold_5g and
  21217. * cand_ap_min_rssi_threshold_6g values are provided,
  21218. * then cand_ap_min_rssi_threshold should only be applied to 2.4 GHz APs.
  21219. * But if cand_ap_min_rssi_threshold_5g and cand_ap_min_rssi_threshold_6g
  21220. * are zeros, then cand_ap_min_rssi_threshold should be applied to all APs.
  21221. */
  21222. A_INT32 cand_ap_min_rssi_threshold; /* Units in dBm */
  21223. /* Roam score delta in %.
  21224. * Consider AP as roam candidate only if AP score is at least
  21225. * roam_score_delta % better than connected AP score.
  21226. * Ex: roam_score_delta = 20, and connected AP score is 4000,
  21227. * then consider candidate AP only if its score is at least
  21228. * 4800 (= 4000 * 120%)
  21229. */
  21230. A_UINT32 roam_score_delta_percentage;
  21231. /* Reason code to be filled in the response frame from STA.
  21232. Ex: Reason code in the BTM response frame
  21233. Valid values are 0 - 255 */
  21234. A_UINT32 reason_code;
  21235. /*
  21236. * Consider 5GHz AP as roam candidate only if AP RSSI is better than
  21237. * cand_ap_min_rssi_threshold_5g
  21238. */
  21239. A_INT32 cand_ap_min_rssi_threshold_5g; /* Units in dBm */
  21240. /*
  21241. * Consider 6 GHz AP as roam candidate only if AP RSSI is better than
  21242. * cand_ap_min_rssi_threshold_6g
  21243. */
  21244. A_INT32 cand_ap_min_rssi_threshold_6g; /* Units in dBm */
  21245. } wmi_configure_roam_trigger_parameters;
  21246. /**
  21247. * WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON:
  21248. * Enable or disable roaming triggers in FW.
  21249. */
  21250. typedef struct {
  21251. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_enable_disable_trigger_reason_fixed_param */
  21252. /** unique id identifying the VDEV, generated by the caller */
  21253. A_UINT32 vdev_id;
  21254. /**
  21255. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  21256. * positions) showing for which roam_trigger_reasons are enabled by
  21257. * bit value equal 0x1, and which roam_trigger_reasons are disabled by
  21258. * bit value equal 0x0.
  21259. */
  21260. A_UINT32 trigger_reason_bitmask;
  21261. /**
  21262. * The following TLVs will follow this fixed_param TLV:
  21263. *
  21264. * wmi_configure_roam_trigger_parameters config_roam_trigger_param[]
  21265. * Roam trigger configuration per roam trigger.
  21266. * The number of elements in this TLV array is limited to
  21267. * WMI_ROAM_TRIGGER_EXT_REASON_MAX
  21268. */
  21269. } wmi_roam_enable_disable_trigger_reason_fixed_param;
  21270. /** WMI_PROFILE_MATCH_EVENT: offload scan
  21271. * generated when ever atleast one of the matching profiles is found
  21272. * in recent NLO scan. no data is carried with the event.
  21273. */
  21274. /** P2P specific commands */
  21275. /**
  21276. * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
  21277. * FW to generate P2P IE tobe carried in probe response frames.
  21278. * FW will respond to probe requests while in listen state.
  21279. */
  21280. typedef struct {
  21281. /* number of secondary device types,supported */
  21282. A_UINT32 num_secondary_dev_types;
  21283. /**
  21284. * followed by 8 bytes of primary device id and
  21285. * num_secondary_dev_types * 8 bytes of secondary device
  21286. * id.
  21287. */
  21288. } wmi_p2p_dev_set_device_info;
  21289. /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
  21290. * state. if enabled, an active STA/AP will respond to P2P probe requests on
  21291. * the operating channel of the VDEV.
  21292. */
  21293. typedef struct {
  21294. /* 1:enable disoverability, 0:disable discoverability */
  21295. A_UINT32 enable_discoverability;
  21296. } wmi_p2p_set_discoverability;
  21297. /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
  21298. * beacons generated by FW. used in FW beacon mode.
  21299. * the FW will add this IE to beacon in addition to the beacon
  21300. * template set by WMI_BCN_TMPL_CMDID command.
  21301. */
  21302. typedef struct {
  21303. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
  21304. /** unique id identifying the VDEV, generated by the caller */
  21305. A_UINT32 vdev_id;
  21306. /* ie length */
  21307. A_UINT32 ie_buf_len;
  21308. /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  21309. * A_UINT8 ie_data[]; <-- length in byte given by field num_data.
  21310. */
  21311. } wmi_p2p_go_set_beacon_ie_fixed_param;
  21312. /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
  21313. * probe response generated by FW. used in FW beacon mode.
  21314. * the FW will add this IE to probe response in addition to the probe response
  21315. * template set by WMI_PRB_TMPL_CMDID command.
  21316. */
  21317. typedef struct {
  21318. /** unique id identifying the VDEV, generated by the caller */
  21319. A_UINT32 vdev_id;
  21320. /* ie length */
  21321. A_UINT32 ie_buf_len;
  21322. /*followed by byte stream of ie data of length ie_buf_len */
  21323. } wmi_p2p_go_set_probe_resp_ie;
  21324. /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
  21325. * be used by the FW to parse the P2P NoA attribute in beacons, probe responses
  21326. * and action frames received by the P2P Client.
  21327. * Note: This command is currently used only for Apple P2P implementation.
  21328. */
  21329. typedef struct {
  21330. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
  21331. /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
  21332. A_UINT32 p2p_ie_oui_type;
  21333. /** OS specific NoA Attribute ID */
  21334. A_UINT32 p2p_noa_attribute;
  21335. } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
  21336. /*----P2P disc offload definition ----*/
  21337. typedef struct {
  21338. A_UINT32 pattern_type;
  21339. /**
  21340. * TLV (tag length value) parameters follow the pattern structure.
  21341. * TLV can contain bssid list, ssid list and
  21342. * ie. the TLV tags are defined above;
  21343. */
  21344. } wmi_p2p_disc_offload_pattern_cmd;
  21345. typedef struct {
  21346. /* unique id identifying the VDEV, generated by the caller */
  21347. A_UINT32 vdev_id;
  21348. /* mgmt type of the ie*/
  21349. A_UINT32 mgmt_type;
  21350. /* ie length */
  21351. A_UINT32 ie_buf_len;
  21352. /*followed by byte stream of ie data of length ie_buf_len */
  21353. } wmi_p2p_disc_offload_appie_cmd;
  21354. typedef struct {
  21355. /* enable/disable p2p find offload*/
  21356. A_UINT32 enable;
  21357. /* unique id identifying the VDEV, generated by the caller */
  21358. A_UINT32 vdev_id;
  21359. /* p2p find type */
  21360. A_UINT32 disc_type;
  21361. /* p2p find perodic */
  21362. A_UINT32 perodic;
  21363. /* p2p find listen channel in MHz */
  21364. A_UINT32 listen_channel;
  21365. /* p2p find full channel number */
  21366. A_UINT32 num_scan_chans;
  21367. /**
  21368. * TLV (tag length value) parameters follow the pattern structure.
  21369. * TLV contain channel list in MHz
  21370. */
  21371. } wmi_p2p_disc_offload_config_cmd;
  21372. /*----P2P OppPS definition ----*/
  21373. typedef struct {
  21374. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
  21375. A_UINT32 tlv_header;
  21376. /* unique id identifying the VDEV, generated by the caller */
  21377. A_UINT32 vdev_id;
  21378. /* OppPS attributes */
  21379. /** Bit 0: Indicate enable/disable of OppPS
  21380. * Bits 7-1: Ctwindow in TUs
  21381. * Bits 31-8: Reserved
  21382. */
  21383. A_UINT32 oppps_attr;
  21384. } wmi_p2p_set_oppps_cmd_fixed_param;
  21385. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
  21386. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
  21387. #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
  21388. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
  21389. #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
  21390. WMI_F_RMW((hdr)->oppps_attr, 0x1, \
  21391. WMI_UNIFIED_OPPPS_ATTR_ENALBED);
  21392. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
  21393. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
  21394. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
  21395. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
  21396. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
  21397. WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
  21398. WMI_UNIFIED_OPPPS_ATTR_CTWIN);
  21399. typedef enum p2p_lo_start_ctrl_flags_e {
  21400. P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0, /* flush prob. req when host is awake */
  21401. } p2p_lo_start_ctrl_flags;
  21402. #define P2P_LO_PER_DEV_TYPE_LEN 8
  21403. #define P2P_LO_DEV_TYPES_COUNT_MAX 10
  21404. #define P2P_LO_DEV_TYPES_LEN_MAX (P2P_LO_PER_DEV_TYPE_LEN * P2P_LO_DEV_TYPES_COUNT_MAX)
  21405. #define P2P_LO_PROB_RESP_MAX_LEN 512
  21406. typedef struct {
  21407. A_UINT32 tlv_header;
  21408. A_UINT32 vdev_id;
  21409. A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
  21410. A_UINT32 channel; /* MHz */
  21411. A_UINT32 period; /* ms */
  21412. A_UINT32 interval; /* ms, interval should be larger than period */
  21413. A_UINT32 count; /* 0 means forever */
  21414. /*
  21415. * device_types_len specifies the number of bytes in the
  21416. * device_types_data[] byte-array TLV that follows this TLV.
  21417. * The data in device_types_data[] is in 8-byte elements, so
  21418. * device_types_len will be a multiple of 8.
  21419. * Refer to P2P_LO_DEV_TYPES_LEN_MAX
  21420. */
  21421. A_UINT32 device_types_len;
  21422. /*
  21423. * prob_resp_len specifies the number of bytes in the
  21424. * prob_resp_data[] byte-array TLV that follows this TLV.
  21425. * Refer to P2P_LO_PROB_RESP_MAX_LEN
  21426. */
  21427. A_UINT32 prob_resp_len;
  21428. /* MAC address to be used for P2P discovery */
  21429. wmi_mac_addr p2p_disc_mac_addr;
  21430. /*
  21431. * Two other TLVs follow this TLV:
  21432. * A_UINT8 device_types_data[device_types_len];
  21433. * A_UINT8 prob_resp_data[prob_resp_len];
  21434. * The information in device_types_data[] and prob_resp_data[]
  21435. * needs to be provided to the target in over-the-air byte order.
  21436. * On a big-endian host, if device_types_data and prob_resp_data
  21437. * are initially in the correct over-the-air byte order,
  21438. * the automatic byteswap for endianness-correction during WMI
  21439. * message download will mess up the byte order.
  21440. * Thus, a big-endian host needs to explicitly byte-swap the bytes
  21441. * within each quad-byte segment of device_types_data[] and
  21442. * prob_resp_data[], so that the automatic byte-swap applied during
  21443. * WMI download from a big-endian host to the little-endian target
  21444. * will restore device_types_data and prob_resp_data into the
  21445. * correct byte ordering.
  21446. */
  21447. } wmi_p2p_lo_start_cmd_fixed_param;
  21448. typedef struct {
  21449. A_UINT32 tlv_header;
  21450. A_UINT32 vdev_id;
  21451. } wmi_p2p_lo_stop_cmd_fixed_param;
  21452. typedef enum p2p_lo_stopped_reason_e {
  21453. P2P_LO_STOPPED_REASON_COMPLETE = 0, /* finished as scheduled */
  21454. P2P_LO_STOPPED_REASON_RECV_STOP_CMD, /* host stops it */
  21455. P2P_LO_STOPPED_REASON_INVALID_LO_PAR, /* invalid listen offload par */
  21456. P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, /* vdev cannot support it right now */
  21457. } p2p_lo_stopped_reason;
  21458. typedef struct {
  21459. A_UINT32 tlv_header;
  21460. A_UINT32 vdev_id;
  21461. A_UINT32 reason;/* refer to p2p_lo_stopped_reason_e */
  21462. } wmi_p2p_lo_stopped_event_fixed_param;
  21463. typedef enum {
  21464. WMI_MNT_FILTER_CONFIG_MANAGER,
  21465. WMI_MNT_FILTER_CONFIG_CONTROL,
  21466. WMI_MNT_FILTER_CONFIG_DATA,
  21467. WMI_MNT_FILTER_CONFIG_ALL,
  21468. WMI_MNT_FILTER_CONFIG_UNKNOWN,
  21469. } WMI_MNT_FILTER_CONFIG_TYPE;
  21470. typedef struct {
  21471. A_UINT32 tlv_header;
  21472. A_UINT32 vdev_id;
  21473. A_UINT32 clear_or_set;
  21474. A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
  21475. } wmi_mnt_filter_cmd_fixed_param;
  21476. typedef struct {
  21477. A_UINT32 time32; /* upper 32 bits of time stamp */
  21478. A_UINT32 time0; /* lower 32 bits of time stamp */
  21479. } A_TIME64;
  21480. typedef enum wmi_peer_sta_kickout_reason {
  21481. WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
  21482. WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
  21483. WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
  21484. WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
  21485. WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
  21486. WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
  21487. WMI_PEER_STA_KICKOUT_REASON_ROAMING_EVENT = 6, /* Directly connected peer has roamed to a repeater */
  21488. WMI_PEER_STA_KICKOUT_REASON_PMF_ERROR = 7, /* PMF error threshold is hit */
  21489. } PEER_KICKOUT_REASON;
  21490. typedef struct {
  21491. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
  21492. /** peer mac address */
  21493. wmi_mac_addr peer_macaddr;
  21494. /** Reason code, defined as above */
  21495. A_UINT32 reason;
  21496. /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
  21497. A_UINT32 rssi;
  21498. } wmi_peer_sta_kickout_event_fixed_param;
  21499. #define WMI_WLAN_PROFILE_MAX_HIST 3
  21500. #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
  21501. typedef struct _wmi_wlan_profile_t {
  21502. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
  21503. A_UINT32 id;
  21504. A_UINT32 cnt;
  21505. A_UINT32 tot;
  21506. A_UINT32 min;
  21507. A_UINT32 max;
  21508. A_UINT32 hist_intvl;
  21509. A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
  21510. } wmi_wlan_profile_t;
  21511. typedef struct _wmi_wlan_profile_ctx_t {
  21512. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
  21513. A_UINT32 tot; /* time in us */
  21514. A_UINT32 tx_msdu_cnt;
  21515. A_UINT32 tx_mpdu_cnt;
  21516. A_UINT32 tx_ppdu_cnt;
  21517. A_UINT32 rx_msdu_cnt;
  21518. A_UINT32 rx_mpdu_cnt;
  21519. A_UINT32 bin_count;
  21520. } wmi_wlan_profile_ctx_t;
  21521. typedef struct {
  21522. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
  21523. A_UINT32 enable;
  21524. } wmi_wlan_profile_trigger_cmd_fixed_param;
  21525. typedef struct {
  21526. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
  21527. A_UINT32 value;
  21528. } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
  21529. typedef struct {
  21530. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
  21531. A_UINT32 profile_id;
  21532. A_UINT32 value;
  21533. } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
  21534. typedef struct {
  21535. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
  21536. A_UINT32 profile_id;
  21537. A_UINT32 enable;
  21538. } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
  21539. /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
  21540. 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
  21541. when comparing wifi header.*/
  21542. /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
  21543. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
  21544. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
  21545. #define WOW_DEFAULT_BITMASK_SIZE 146
  21546. #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
  21547. #define WOW_MAX_BITMAP_FILTERS 32
  21548. #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
  21549. #define WOW_EXTEND_PATTERN_MATCH_CNT 16
  21550. #define WOW_SHORT_PATTERN_MATCH_CNT 8
  21551. #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
  21552. The 148 comes from (128 - 14) payload size + 8bytes LLC + 26bytes MAC header*/
  21553. #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
  21554. #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
  21555. #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
  21556. #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
  21557. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
  21558. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
  21559. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
  21560. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
  21561. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
  21562. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
  21563. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
  21564. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
  21565. typedef enum pattern_type_e {
  21566. WOW_PATTERN_MIN = 0,
  21567. WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
  21568. WOW_IPV4_SYNC_PATTERN,
  21569. WOW_IPV6_SYNC_PATTERN,
  21570. WOW_WILD_CARD_PATTERN,
  21571. WOW_TIMER_PATTERN,
  21572. WOW_MAGIC_PATTERN,
  21573. WOW_IPV6_RA_PATTERN,
  21574. WOW_IOAC_PKT_PATTERN,
  21575. WOW_IOAC_TMR_PATTERN,
  21576. WOW_IOAC_SOCK_PATTERN,
  21577. WOW_PATTERN_MAX
  21578. } WOW_PATTERN_TYPE;
  21579. typedef enum event_type_e {
  21580. WOW_BMISS_EVENT = 0, /* 0 */
  21581. WOW_BETTER_AP_EVENT, /* 1 */
  21582. WOW_DEAUTH_RECVD_EVENT, /* 2 */
  21583. WOW_MAGIC_PKT_RECVD_EVENT, /* 3 */
  21584. WOW_GTK_ERR_EVENT, /* 4 */
  21585. WOW_FOURWAY_HSHAKE_EVENT, /* 5 */
  21586. WOW_EAPOL_RECVD_EVENT, /* 6 */
  21587. WOW_NLO_DETECTED_EVENT, /* 7 */
  21588. WOW_DISASSOC_RECVD_EVENT, /* 8 */
  21589. WOW_PATTERN_MATCH_EVENT, /* 9 */
  21590. WOW_CSA_IE_EVENT, /* 10 */
  21591. WOW_PROBE_REQ_WPS_IE_EVENT, /* 11 */
  21592. WOW_AUTH_REQ_EVENT, /* 12 */
  21593. WOW_ASSOC_REQ_EVENT, /* 13 */
  21594. WOW_HTT_EVENT, /* 14 */
  21595. WOW_RA_MATCH_EVENT, /* 15 */
  21596. WOW_HOST_AUTO_SHUTDOWN_EVENT, /* 16 */
  21597. WOW_IOAC_MAGIC_EVENT, /* 17 */
  21598. WOW_IOAC_SHORT_EVENT, /* 18 */
  21599. WOW_IOAC_EXTEND_EVENT, /* 19 */
  21600. WOW_IOAC_TIMER_EVENT, /* 20 */
  21601. WOW_DFS_PHYERR_RADAR_EVENT, /* 21 */
  21602. WOW_BEACON_EVENT, /* 22 */
  21603. WOW_CLIENT_KICKOUT_EVENT, /* 23 */
  21604. WOW_NAN_EVENT, /* 24 */
  21605. WOW_EXTSCAN_EVENT, /* 25 */
  21606. WOW_IOAC_REV_KA_FAIL_EVENT, /* 26 */
  21607. WOW_IOAC_SOCK_EVENT, /* 27 */
  21608. WOW_NLO_SCAN_COMPLETE_EVENT, /* 28 */
  21609. WOW_NAN_DATA_EVENT, /* 29 */
  21610. WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED; 30 */
  21611. WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, /* reuse deprecated event value; 30 */
  21612. WOW_TDLS_CONN_TRACKER_EVENT, /* 31 */
  21613. WOW_CRITICAL_LOG_EVENT, /* 32 + 0 */
  21614. WOW_CHIP_POWER_FAILURE_DETECT_EVENT, /* 32 + 1 */
  21615. WOW_11D_SCAN_EVENT, /* 32 + 2 */
  21616. WOW_SAP_OBSS_DETECTION_EVENT, /* 32 + 3 */
  21617. WOW_BSS_COLOR_COLLISION_DETECT_EVENT, /* 32 + 4 */
  21618. WOW_TKIP_MIC_ERR_FRAME_RECVD_EVENT, /* 32 + 5 */
  21619. WOW_ROAM_PREAUTH_START_EVENT, /* 32 + 6 */
  21620. WOW_ROAM_PMKID_REQUEST_EVENT, /* 32 + 7 */
  21621. WOW_DFS_CAC_COMPLETE_EVENT, /* 32 + 8 */
  21622. WOW_VDEV_DISCONNECT_EVENT, /* 32 + 9 */
  21623. WOW_TWT_EVENT, /* 32 + 10 */
  21624. WOW_DCS_INTERFERENCE_DET, /* 32 + 11 */
  21625. WOW_ROAM_STATS_EVENT, /* 32 + 12 */
  21626. WOW_RTT_11AZ_EVENT, /* 32 + 13 */
  21627. WOW_P2P_NOA_EVENT, /* 32 + 14 */
  21628. WOW_XGAP_EVENT, /* 32 + 15 */
  21629. } WOW_WAKE_EVENT_TYPE;
  21630. typedef enum wake_reason_e {
  21631. WOW_REASON_UNSPECIFIED = -1,
  21632. WOW_REASON_NLOD = 0,
  21633. WOW_REASON_AP_ASSOC_LOST,
  21634. WOW_REASON_LOW_RSSI,
  21635. WOW_REASON_DEAUTH_RECVD,
  21636. WOW_REASON_DISASSOC_RECVD,
  21637. WOW_REASON_GTK_HS_ERR,
  21638. WOW_REASON_EAP_REQ,
  21639. WOW_REASON_FOURWAY_HS_RECV,
  21640. WOW_REASON_TIMER_INTR_RECV,
  21641. WOW_REASON_PATTERN_MATCH_FOUND,
  21642. WOW_REASON_RECV_MAGIC_PATTERN,
  21643. WOW_REASON_P2P_DISC,
  21644. WOW_REASON_WLAN_HB,
  21645. WOW_REASON_CSA_EVENT,
  21646. WOW_REASON_PROBE_REQ_WPS_IE_RECV,
  21647. WOW_REASON_AUTH_REQ_RECV,
  21648. WOW_REASON_ASSOC_REQ_RECV,
  21649. WOW_REASON_HTT_EVENT,
  21650. WOW_REASON_RA_MATCH,
  21651. WOW_REASON_HOST_AUTO_SHUTDOWN,
  21652. WOW_REASON_IOAC_MAGIC_EVENT,
  21653. WOW_REASON_IOAC_SHORT_EVENT,
  21654. WOW_REASON_IOAC_EXTEND_EVENT,
  21655. WOW_REASON_IOAC_TIMER_EVENT,
  21656. WOW_REASON_ROAM_HO,
  21657. WOW_REASON_DFS_PHYERR_RADADR_EVENT,
  21658. WOW_REASON_BEACON_RECV,
  21659. WOW_REASON_CLIENT_KICKOUT_EVENT,
  21660. WOW_REASON_NAN_EVENT,
  21661. WOW_REASON_EXTSCAN,
  21662. WOW_REASON_RSSI_BREACH_EVENT,
  21663. WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
  21664. WOW_REASON_IOAC_SOCK_EVENT,
  21665. WOW_REASON_NLO_SCAN_COMPLETE,
  21666. WOW_REASON_PACKET_FILTER_MATCH,
  21667. WOW_REASON_ASSOC_RES_RECV,
  21668. WOW_REASON_REASSOC_REQ_RECV,
  21669. WOW_REASON_REASSOC_RES_RECV,
  21670. WOW_REASON_ACTION_FRAME_RECV,
  21671. WOW_REASON_BPF_ALLOW,
  21672. WOW_REASON_NAN_DATA,
  21673. WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
  21674. WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, /* reuse deprecated reason value */
  21675. WOW_REASON_TDLS_CONN_TRACKER_EVENT,
  21676. WOW_REASON_CRITICAL_LOG,
  21677. WOW_REASON_P2P_LISTEN_OFFLOAD,
  21678. WOW_REASON_NAN_EVENT_WAKE_HOST,
  21679. WOW_REASON_CHIP_POWER_FAILURE_DETECT,
  21680. WOW_REASON_11D_SCAN,
  21681. WOW_REASON_THERMAL_CHANGE,
  21682. WOW_REASON_OIC_PING_OFFLOAD,
  21683. WOW_REASON_WLAN_DHCP_RENEW,
  21684. WOW_REASON_SAP_OBSS_DETECTION,
  21685. WOW_REASON_BSS_COLOR_COLLISION_DETECT,
  21686. WOW_REASON_TKIP_MIC_ERR_FRAME_RECVD_DETECT,
  21687. WOW_REASON_WLAN_MD, /* motion detected */
  21688. WOW_REASON_WLAN_BL, /* baselining done */
  21689. WOW_REASON_NTH_BCN_OFLD, /* nth beacon forward to host */
  21690. WOW_REASON_PKT_CAPTURE_MODE_WAKE,
  21691. WOW_REASON_PAGE_FAULT, /* Host wake up due to page fault */
  21692. WOW_REASON_ROAM_PREAUTH_START,
  21693. WOW_REASON_ROAM_PMKID_REQUEST,
  21694. WOW_REASON_RFKILL,
  21695. WOW_REASON_DFS_CAC,
  21696. WOW_REASON_VDEV_DISCONNECT,
  21697. WOW_REASON_LOCAL_DATA_UC_DROP,
  21698. WOW_REASON_GENERIC_WAKE, /* A generic reason that host should be woken up */
  21699. WOW_REASON_ERR_PKT_TRIGGERED_WAKEUP,
  21700. WOW_REASON_TWT,
  21701. WOW_REASON_FATAL_EVENT_WAKE,
  21702. WOW_REASON_DCS_INT_DET,
  21703. WOW_REASON_ROAM_STATS,
  21704. WOW_REASON_MDNS_WAKEUP,
  21705. WOW_REASON_RTT_11AZ,
  21706. WOW_REASON_P2P_NOA_UPDATE,
  21707. /* When Host configured timer elapsed for delayed wakeup */
  21708. WOW_REASON_DELAYED_WAKEUP_HOST_CFG_TIMER_ELAPSED,
  21709. /* Data store list is full, so Host wakeup should be triggered */
  21710. WOW_REASON_DELAYED_WAKEUP_DATA_STORE_LIST_FULL,
  21711. /* Sched PM FW initiated termination event */
  21712. WOW_REASON_SCHED_PM_TERMINATED,
  21713. /* XGAP entry/exit response */
  21714. WOW_REASON_XGAP,
  21715. /* COEX channel avoid event */
  21716. WOW_REASON_COEX_CHAVD,
  21717. /* vdev repurpose request event */
  21718. WOW_REASON_VDEV_REPURPOSE,
  21719. /* STX High duty cycle event */
  21720. WOW_REASON_STX_WOW_HIGH_DUTY_CYCLE,
  21721. /* WoW exit reason MCC lite */
  21722. WOW_REASON_MCC_LITE,
  21723. /* add new WOW_REASON_ defs before this line */
  21724. WOW_REASON_MAX,
  21725. WOW_REASON_DEBUG_TEST = 0xFF,
  21726. } WOW_WAKE_REASON_TYPE;
  21727. typedef enum {
  21728. WOW_IFACE_PAUSE_ENABLED,
  21729. WOW_IFACE_PAUSE_DISABLED
  21730. } WOW_IFACE_STATUS;
  21731. enum {
  21732. WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, /* some win10 platform will not assert pcie_reset for wow.*/
  21733. /* WMI_WOW_FLAG_SEND_PM_PME
  21734. * Some platforms have issues if the PM_PME message is sent after WoW,
  21735. * so don't send PM_PME after WoW unless the host uses this flag
  21736. * to request it.
  21737. */
  21738. WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
  21739. /* Flag to indicate unit test */
  21740. WMI_WOW_FLAG_UNIT_TEST_ENABLE = 0x00000004,
  21741. /* Force HTC wakeup */
  21742. WMI_WOW_FLAG_DO_HTC_WAKEUP = 0x00000008,
  21743. /* Enable L1SS sleep for PCIE DRV case */
  21744. WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP = 0x00000010,
  21745. /*
  21746. * To differentiate system suspend Vs RTPM BIT set -
  21747. * System Suspend WOW, BIT Reset- RTPM (DRV)
  21748. */
  21749. WMI_WOW_FLAG_SYSTEM_SUSPEND_WOW = 0x00000020,
  21750. /*
  21751. * Feature flag for INI enable_mod_dtim_on_system_suspend
  21752. * This flag/bit will be set if INI settings enable mod_dtim_on_sys_suspend.
  21753. */
  21754. WMI_WOW_FLAG_MOD_DTIM_ON_SYS_SUSPEND = 0x00000040,
  21755. /*
  21756. * Forced dtim in suspend mode enable Flag.
  21757. * setDtimInSuspendMode
  21758. */
  21759. WMI_WOW_FLAG_FORCED_DTIM_ON_SYS_SUSPEND = 0x00000080,
  21760. /* Flag to force DPD lock. */
  21761. WMI_WOW_FLAG_FORCED_DPD_LOCK = 0x00000100,
  21762. /*
  21763. * Feature flag for INI 'enable_teles_dtim_on_system_suspend'
  21764. * This flag/bit will be set if INI 'enable_teles_dtim_on_system_suspend'
  21765. * is enabled.
  21766. */
  21767. WMI_WOW_FLAG_TELES_DTIM_ON_SYS_SUSPEND = 0x00000200,
  21768. };
  21769. typedef struct {
  21770. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
  21771. A_UINT32 enable;
  21772. A_UINT32 pause_iface_config;
  21773. A_UINT32 flags; /* WMI_WOW_FLAG enums */
  21774. } wmi_wow_enable_cmd_fixed_param;
  21775. typedef enum {
  21776. WMI_WOW_RESUME_FLAG_TX_DATA = 0x00000001, /* TX data pending to be sent in resume */
  21777. } WMI_WOW_RESUME_FLAG_ENUM;
  21778. /* wow nack reason codes */
  21779. typedef enum {
  21780. /* WoW error due to unnkown reason */
  21781. WMI_WOW_NON_ACK_REASON_UNKNOWN = 0,
  21782. /* WoW error due to TX failure */
  21783. WMI_WOW_NON_ACK_REASON_TX = 1,
  21784. /* WoW error due to some data blocked */
  21785. WMI_WOW_NON_ACK_REASON_IS_BLOCK = 2,
  21786. /* WoW error in WFA mode */
  21787. WMI_WOW_NON_ACK_REASON_NOT_ALLOW = 3,
  21788. /* WoW error mac operation fail */
  21789. WMI_WOW_NON_ACK_REASON_HW_FAIL = 4,
  21790. /* WoW error due to timeout */
  21791. WMI_WOW_NON_ACK_REASON_TIMEOUT = 5,
  21792. /* WoW error due to RTT or CFR capture active */
  21793. WMI_WOW_NON_ACK_REASON_RTT_DMA = 6,
  21794. /* WoW error due to roam module holding lock */
  21795. WMI_WOW_NON_ACK_REASON_ROAM = 7,
  21796. /* WoW error remote peer not sleeping */
  21797. WMI_WOW_NON_ACK_REASON_PEER_ACTIVE = 8,
  21798. /* WoW error due to WoW entry defer failed */
  21799. WMI_WOW_NON_ACK_REASON_DEFER_FAILURE = 9,
  21800. /* WoW error due to WoW entry defer timeout */
  21801. WMI_WOW_NON_ACK_REASON_DEFER_TIMEOUT = 10,
  21802. /* WoW error due to FATAL event */
  21803. WMI_WOW_NON_ACK_REASON_FATAL_EVENT = 11,
  21804. /* WoW error if close to TBTT */
  21805. WMI_WOW_NON_ACK_REASON_CLOSE_TO_TBTT = 12,
  21806. } WMI_WOW_NACK_STATUS;
  21807. typedef struct {
  21808. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
  21809. /* reserved0:
  21810. * This "reserved" field is not actually reserved any more.
  21811. * It is being used in certain FW branches to hold flags, whose values
  21812. * are defined by WMI_WOW_RESUME_FLAG_ENUM.
  21813. */
  21814. union {
  21815. A_UINT32 reserved0;
  21816. A_UINT32 flags;
  21817. };
  21818. } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
  21819. #define WOW_ICMPV6_NA_FILTER_DISABLE 0
  21820. #define WOW_ICMPV6_NA_FILTER_ENABLE 1
  21821. typedef struct {
  21822. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param */
  21823. A_UINT32 vdev_id;
  21824. A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
  21825. } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
  21826. typedef struct bitmap_pattern_s {
  21827. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
  21828. A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
  21829. A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
  21830. A_UINT32 pattern_offset;
  21831. A_UINT32 pattern_len;
  21832. A_UINT32 bitmask_len;
  21833. A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
  21834. } WOW_BITMAP_PATTERN_T;
  21835. typedef struct ipv4_sync_s {
  21836. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
  21837. A_UINT32 ipv4_src_addr;
  21838. A_UINT32 ipv4_dst_addr;
  21839. A_UINT32 tcp_src_prt;
  21840. A_UINT32 tcp_dst_prt;
  21841. } WOW_IPV4_SYNC_PATTERN_T;
  21842. typedef struct ipv6_sync_s {
  21843. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
  21844. A_UINT32 ipv6_src_addr[4];
  21845. A_UINT32 ipv6_dst_addr[4];
  21846. A_UINT32 tcp_src_prt;
  21847. A_UINT32 tcp_dst_prt;
  21848. } WOW_IPV6_SYNC_PATTERN_T;
  21849. typedef struct WOW_MAGIC_PATTERN_CMD
  21850. {
  21851. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
  21852. wmi_mac_addr macaddr;
  21853. } WOW_MAGIC_PATTERN_CMD;
  21854. typedef enum wow_ioac_pattern_type {
  21855. WOW_IOAC_MAGIC_PATTERN = 1,
  21856. WOW_IOAC_SHORT_PATTERN,
  21857. WOW_IOAC_EXTEND_PATTERN,
  21858. } WOW_IOAC_PATTERN_TYPE;
  21859. typedef struct ioac_sock_pattern_s {
  21860. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T */
  21861. A_UINT32 id;
  21862. A_UINT32 local_ipv4;
  21863. A_UINT32 remote_ipv4;
  21864. A_UINT32 local_port;
  21865. A_UINT32 remote_port;
  21866. A_UINT32 pattern_len; /* units = bytes */
  21867. A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
  21868. WMI_IPV6_ADDR local_ipv6;
  21869. WMI_IPV6_ADDR remote_ipv6;
  21870. A_UINT32 ack_nak_len;
  21871. A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  21872. A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  21873. } WOW_IOAC_SOCK_PATTERN_T;
  21874. typedef struct ioac_pkt_pattern_s {
  21875. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
  21876. A_UINT32 pattern_type;
  21877. A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
  21878. A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
  21879. A_UINT32 pattern_len;
  21880. A_UINT32 random_len;
  21881. } WOW_IOAC_PKT_PATTERN_T;
  21882. typedef struct ioac_tmr_pattern_s {
  21883. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
  21884. A_UINT32 wake_in_s;
  21885. A_UINT32 vdev_id;
  21886. } WOW_IOAC_TMR_PATTERN_T;
  21887. typedef struct {
  21888. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
  21889. A_UINT32 nID;
  21890. } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
  21891. typedef struct {
  21892. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
  21893. A_UINT32 nID;
  21894. } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
  21895. typedef struct ioac_keepalive_s {
  21896. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
  21897. A_UINT32 keepalive_pkt_buf[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
  21898. A_UINT32 keepalive_pkt_len;
  21899. A_UINT32 period_in_ms;
  21900. A_UINT32 vdev_id;
  21901. A_UINT32 max_loss_cnt;
  21902. A_UINT32 local_ipv4;
  21903. A_UINT32 remote_ipv4;
  21904. A_UINT32 local_port;
  21905. A_UINT32 remote_port;
  21906. A_UINT32 recv_period_in_ms;
  21907. A_UINT32 rev_ka_size;
  21908. A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
  21909. WMI_IPV6_ADDR local_ipv6;
  21910. WMI_IPV6_ADDR remote_ipv6;
  21911. } WMI_WOW_IOAC_KEEPALIVE_T;
  21912. typedef struct {
  21913. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
  21914. A_UINT32 vdev_id;
  21915. A_UINT32 pattern_type;
  21916. /*
  21917. * Following this struct are these TLVs. Note that they are all array of structures
  21918. * but can have at most one element. Which TLV is empty or has one element depends
  21919. * on the field pattern_type. This is to emulate an union.
  21920. * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
  21921. * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
  21922. */
  21923. } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
  21924. typedef struct {
  21925. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
  21926. A_UINT32 vdev_id;
  21927. A_UINT32 pattern_type;
  21928. A_UINT32 pattern_id;
  21929. } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
  21930. typedef struct {
  21931. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
  21932. A_UINT32 vdev_id;
  21933. A_UINT32 pattern_id;
  21934. A_UINT32 pattern_type;
  21935. /*
  21936. * Following this struct are these TLVs. Note that they are all array of structures
  21937. * but can have at most one element. Which TLV is empty or has one element depends
  21938. * on the field pattern_type. This is to emulate an union.
  21939. * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
  21940. * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
  21941. * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
  21942. * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
  21943. * A_UINT32 pattern_info_timeout[];
  21944. * A_UINT32 ra_ratelimit_interval;
  21945. */
  21946. } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
  21947. typedef struct {
  21948. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
  21949. A_UINT32 vdev_id;
  21950. A_UINT32 pattern_id;
  21951. A_UINT32 pattern_type;
  21952. } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
  21953. #define WMI_WOW_MAX_EVENT_BM_LEN 4
  21954. typedef struct {
  21955. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
  21956. A_UINT32 vdev_id;
  21957. A_UINT32 is_add;
  21958. union {
  21959. A_UINT32 event_bitmap;
  21960. A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
  21961. };
  21962. } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
  21963. /*
  21964. * This structure is used to set the pattern to check UDP packet in WOW mode.
  21965. * If match, construct a tx frame in a local buffer to send through the peer
  21966. * AP to the entity in the IP network that sent the UDP packet to this STA.
  21967. */
  21968. typedef struct {
  21969. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param */
  21970. A_UINT32 vdev_id;
  21971. A_UINT32 enable; /* 1: enable, 0: disable*/
  21972. /* dest_port -
  21973. * bits 7:0 contain the LSB of the UDP dest port,
  21974. * bits 15:8 contain the MSB of the UDP dest port
  21975. */
  21976. A_UINT32 dest_port;
  21977. A_UINT32 pattern_len; /* length in byte of pattern[] */
  21978. A_UINT32 response_len; /* length in byte of response[] */
  21979. /* Following this struct are the TLV's:
  21980. * A_UINT8 pattern[]; <-- payload of UDP packet to be checked, network byte order
  21981. * A_UINT8 response[]; <-- payload of UDP packet to be response, network byte order
  21982. */
  21983. } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
  21984. /*
  21985. * This structure is used to set the pattern for WOW host wakeup pin pulse pattern confirguration.
  21986. */
  21987. typedef struct {
  21988. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param */
  21989. A_UINT32 enable; /* 1: enable, 0: disable */
  21990. A_UINT32 pin; /* pin for host wakeup */
  21991. A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
  21992. A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
  21993. A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
  21994. A_UINT32 init_state; /* Sense of the GPIO pin used for host wakeups.
  21995. * If init_state is 0, a low --> high transition
  21996. * causes a host wakeup interrupt.
  21997. * If init_state is 1, a high --> low transition
  21998. * causes a host wakeup interrupt.
  21999. */
  22000. } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
  22001. #define MAX_SUPPORTED_ACTION_CATEGORY 256
  22002. #define MAX_SUPPORTED_ACTION_SUBCATEGORY 32
  22003. #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
  22004. typedef enum {
  22005. WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
  22006. WOW_ACTION_WAKEUP_OPERATION_SET,
  22007. WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
  22008. WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
  22009. } WOW_ACTION_WAKEUP_OPERATION;
  22010. typedef struct {
  22011. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param */
  22012. A_UINT32 vdev_id;
  22013. A_UINT32 operation; /* 0 reset to fw default, 1 set the bits, 2 add the setting bits, 3 delete the setting bits */
  22014. A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
  22015. /* This fixed_param TLV is followed by these additional TLV's
  22016. * action_bitmaps_per_category -
  22017. * Each element is a 32-bit bitmap indicating which subcategories
  22018. * for that particular action category are considered for WoW wakeup
  22019. * (if the subcategory's bit is 0) or ignored for WoW wakeup (if the
  22020. * subcategory's bit is 1).
  22021. *
  22022. * A_UINT32 action_bitmaps_per_category[]; <-- variable length array
  22023. */
  22024. } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
  22025. typedef union {
  22026. /* the bytes within these IP addresses are arranged in network byte order */
  22027. A_UINT8 ipv4_addr[4];
  22028. A_UINT8 ipv6_addr[16];
  22029. } WMI_IP_ADDR;
  22030. #define WMI_COAP_IPTV6_BIT_POS 0
  22031. #define WMI_COAP_ADDR_TYPE_BIT_POS 1
  22032. #define WMI_COAP_IPV6_SET(param, value) \
  22033. WMI_SET_BITS(param, WMI_COAP_IPTV6_BIT_POS, 1, value)
  22034. #define WMI_COAP_IPV6_GET(param) \
  22035. WMI_GET_BITS(param, WMI_COAP_IPTV6_BIT_POS, 1)
  22036. #define WMI_COAP_ADDR_TYPE_SET(param, value) \
  22037. WMI_SET_BITS(param, WMI_COAP_ADDR_TYPE_BIT_POS, 1, value)
  22038. #define WMI_COAP_ADDR_TYPE_GET(param) \
  22039. WMI_GET_BITS(param, WMI_COAP_ADDR_TYPE_BIT_POS, 1)
  22040. typedef struct {
  22041. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param */
  22042. A_UINT32 vdev_id;
  22043. A_UINT32 pattern_id;
  22044. /* pattern_type:
  22045. * Indicates the type of pattern to be enabled
  22046. * Bit 0: Indicate pattern IP ADDR is IPV6 or IPV4
  22047. * Bit 1: Indicate pattern ADDR TYPE is BC or UC/MC
  22048. * Bits 31:2 Reserved for future use
  22049. *
  22050. * Refer to WMI_COAP_IPV6_SET,GET and WMI_COAP_ADDR_TYPE_SET,GET macros
  22051. */
  22052. A_UINT32 pattern_type;
  22053. A_UINT32 timeout; /* the cached packet expire timeout in ms */
  22054. /* the dst ip address(uc/mc/bc), dst port to match CoAP message */
  22055. WMI_IP_ADDR match_udp_ip; /* network byte order */
  22056. A_UINT32 match_udp_port;
  22057. /* DUT ip address and port for CoAP replay message */
  22058. WMI_IP_ADDR udp_local_ip; /* network byte order */
  22059. A_UINT32 udp_local_port;
  22060. A_UINT32 verify_offset; /* UDP payload offset to verify */
  22061. A_UINT32 verify_len; /* UDP payload length to verofy*/
  22062. A_UINT32 coapmsg_len; /* CoAP reply message length */
  22063. /* The below TLV (tag length value) parameters follow this fixed_param TLV:
  22064. * A_UINT8 verify_string[]; verify content,
  22065. * length identified by verify_len;
  22066. * A_UINT8 coapmsg[]; CoAP reply message,
  22067. * length identified by coapmsg_len;
  22068. */
  22069. } WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param;
  22070. typedef struct {
  22071. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param */
  22072. A_UINT32 vdev_id;
  22073. A_UINT32 pattern_id;
  22074. } WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param;
  22075. typedef struct {
  22076. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param */
  22077. A_UINT32 vdev_id;
  22078. A_UINT32 pattern_id;
  22079. /* pattern_type:
  22080. * Indicates the type of pattern to be enabled
  22081. * Bit 0: Indicate pattern IP ADDR is IPV6 or IPV4
  22082. * Bit 1: Indicate pattern ADDR TYPE is BC or UC/MC
  22083. * Bits 31:2 Reserved for future use
  22084. *
  22085. * Refer to WMI_COAP_IPV6_SET,GET and WMI_COAP_ADDR_TYPE_SET,GET macros
  22086. */
  22087. A_UINT32 pattern_type;
  22088. /* ip address and port for CoAP send keepalive message */
  22089. WMI_IP_ADDR udp_local_ip; /* network byte order */
  22090. A_UINT32 udp_local_port;
  22091. WMI_IP_ADDR udp_remote_ip; /* network byte order */
  22092. A_UINT32 udp_remote_port;
  22093. A_UINT32 timeout; /* the periorid to send keepalive message in ms */
  22094. A_UINT32 coapmsg_len; /* keeplive CoAP message length */
  22095. /* The below TLV (tag length value) parameters follow this fixed_param TLV:
  22096. * A_UINT8 coapmsg[]; CoAP keepalive message,
  22097. * length specified by coapmsg_len field
  22098. */
  22099. } WMI_WOW_COAP_ADD_KEEPALIVE_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_KEEPALIVE_PATTERN_CMD_fixed_param */
  22102. A_UINT32 vdev_id;
  22103. A_UINT32 pattern_id;
  22104. } WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param;
  22105. typedef struct {
  22106. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param */
  22107. A_UINT32 vdev_id;
  22108. A_UINT32 pattern_id;
  22109. } WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param;
  22110. typedef struct {
  22111. A_UINT32 tlv_hdr; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_coap_tuple */
  22112. A_UINT64 tsf; /* host and firmware sync tsf */
  22113. /* flag:
  22114. * Indicates the type of ip address
  22115. * Bit 0: Indicate ip address is IPV6 or IPV4
  22116. * Bits 31:1 Reserved for future use
  22117. *
  22118. * Refer to WMI_COAP_IPV6_SET,GET macros
  22119. */
  22120. A_UINT32 flag;
  22121. WMI_IP_ADDR src_ip; /* network byte order */
  22122. A_UINT32 payload_len;
  22123. } wmi_coap_tuple;
  22124. typedef struct {
  22125. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_BUF_INFO_fixed_param */
  22126. A_UINT32 vdev_id;
  22127. A_UINT32 pattern_id;
  22128. /** more_data will be set depending on the number of tuples need transmit */
  22129. A_UINT32 more_tuples;
  22130. /* The below TLV (tag length value) parameters follow this fixed_param TLV:
  22131. * wmi_coap_tuple coap_tuple[]; <-- Array of coap_tuple.
  22132. * A_UINT32 payloads[] <-- the cached received CoAP messages.
  22133. * The number of message payloads combined into the payloads[]
  22134. * array matches the number of coap tuples.
  22135. * The length of each message payload is specified by the
  22136. * "payload_len" field in the corresponding coap_tuple.
  22137. * The subsequent message payload starts at the next 4-byte aligned
  22138. * position within payloads[].
  22139. * For example, if there are 3 coap_tuples, with
  22140. * coap_tuples[0].payload_len = 12
  22141. * coap_tuples[1].payload_len = 23
  22142. * coap_tuples[2].payload_len = 34
  22143. * then msg 0 payload will be stored in payloads[0] - payloads[11]
  22144. * message 1 payload will be stored in payloads[12] - payloads[34]
  22145. * message 2 payload will be stored in payloads[36] - payloads[69]
  22146. */
  22147. } WMI_WOW_COAP_BUF_INFO_EVENT_fixed_param;
  22148. typedef struct wow_event_info_s {
  22149. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
  22150. A_UINT32 vdev_id;
  22151. A_UINT32 flag; /*This is current reserved.*/
  22152. A_INT32 wake_reason;
  22153. A_UINT32 data_len;
  22154. A_UINT32 delayed_pkt_count;
  22155. } WOW_EVENT_INFO_fixed_param;
  22156. typedef struct wow_initial_wakeup_event_s {
  22157. A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param */
  22158. A_UINT32 vdev_id;
  22159. } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
  22160. typedef enum {
  22161. WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
  22162. WOW_EVENT_INFO_TYPE_BITMAP,
  22163. WOW_EVENT_INFO_TYPE_GTKIGTK,
  22164. } WOW_EVENT_INFO_TYPE;
  22165. typedef struct wow_event_info_section_s {
  22166. A_UINT32 data_type;
  22167. A_UINT32 data_len;
  22168. } WOW_EVENT_INFO_SECTION;
  22169. typedef struct wow_event_info_section_packet_s {
  22170. A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
  22171. } WOW_EVENT_INFO_SECTION_PACKET;
  22172. typedef struct wow_event_info_section_bitmap_s {
  22173. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
  22174. A_UINT32 flag; /*This is current reserved.*/
  22175. A_UINT32 value; /*This could be the pattern id for bitmap pattern.*/
  22176. A_UINT32 org_len; /*The length of the original packet.*/
  22177. } WOW_EVENT_INFO_SECTION_BITMAP;
  22178. /**
  22179. * This command is sent from WLAN host driver to firmware to
  22180. * enable or disable D0-WOW. D0-WOW means APSS suspend with
  22181. * PCIe link and DDR being active.
  22182. *
  22183. *
  22184. * Entering D0-WOW Mode (based on kernel suspend request):
  22185. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
  22186. * target: Take action (e.g. dbglog suspend)
  22187. * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
  22188. *
  22189. * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
  22190. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
  22191. * target: Take action (e.g. dbglog resume)
  22192. * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
  22193. *
  22194. * This command is applicable only on the PCIE LL systems
  22195. * Host can enter either D0-WOW or WOW mode, but NOT both at same time
  22196. * Decision to enter D0-WOW or WOW is based on active interfaces
  22197. *
  22198. */
  22199. typedef struct {
  22200. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
  22201. A_UINT32 enable; /* 1 = enable, 0 = disable */
  22202. } wmi_d0_wow_enable_disable_cmd_fixed_param;
  22203. typedef enum extend_wow_type_e {
  22204. EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
  22205. EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
  22206. EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
  22207. EXTWOW_TYPE_APP_PULSETEST,
  22208. EXTWOW_DISABLED = 255,
  22209. } EXTWOW_TYPE;
  22210. typedef struct {
  22211. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
  22212. A_UINT32 vdev_id;
  22213. A_UINT32 type;
  22214. A_UINT32 wakeup_pin_num;
  22215. A_UINT32 swol_pulsetest_type;
  22216. A_UINT32 swol_pulsetest_application;
  22217. } wmi_extwow_enable_cmd_fixed_param;
  22218. #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
  22219. #define SWOL_INDOOR_KEY_LEN 16
  22220. typedef struct {
  22221. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
  22222. A_UINT32 vdev_id;
  22223. wmi_mac_addr wakee_mac;
  22224. A_UINT8 ident[8];
  22225. A_UINT8 passwd[16];
  22226. A_UINT32 ident_len;
  22227. A_UINT32 passwd_len;
  22228. /* indoor check parameters */
  22229. /* key for mac addresses specified in swol_indoor_key_mac
  22230. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  22231. * segment of this array, so the bytes will return to their original
  22232. * order when the entire WMI message contents are byte-swapped to
  22233. * convert from big-endian to little-endian format.
  22234. */
  22235. A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
  22236. /* key length for specified mac address index
  22237. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  22238. * segment of this array, so the bytes will return to their original
  22239. * order when the entire WMI message contents are byte-swapped to
  22240. * convert from big-endian to little-endian format.
  22241. */
  22242. A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  22243. /* mac address array allowed to wakeup host*/
  22244. wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  22245. /* app mask for the mac addresses specified in swol_indoor_key_mac */
  22246. A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  22247. A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
  22248. A_UINT32 swol_indoor_pw_check; /* whether to check password */
  22249. A_UINT32 swol_indoor_pattern; /* wakeup pattern */
  22250. A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
  22251. A_UINT32 swol_indoor_exception_app;
  22252. A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
  22253. } wmi_extwow_set_app_type1_params_cmd_fixed_param;
  22254. typedef struct {
  22255. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
  22256. A_UINT32 vdev_id;
  22257. A_UINT8 rc4_key[16];
  22258. A_UINT32 rc4_key_len;
  22259. /** ip header parameter */
  22260. A_UINT32 ip_id; /* NC id */
  22261. A_UINT32 ip_device_ip; /* NC IP address */
  22262. A_UINT32 ip_server_ip; /* Push server IP address */
  22263. /** tcp header parameter */
  22264. A_UINT16 tcp_src_port; /* NC TCP port */
  22265. A_UINT16 tcp_dst_port; /* Push server TCP port */
  22266. A_UINT32 tcp_seq;
  22267. A_UINT32 tcp_ack_seq;
  22268. A_UINT32 keepalive_init; /* Initial ping interval */
  22269. A_UINT32 keepalive_min; /* Minimum ping interval */
  22270. A_UINT32 keepalive_max; /* Maximum ping interval */
  22271. A_UINT32 keepalive_inc; /* Increment of ping interval */
  22272. wmi_mac_addr gateway_mac;
  22273. A_UINT32 tcp_tx_timeout_val;
  22274. A_UINT32 tcp_rx_timeout_val;
  22275. /** add extra parameter for backward-compatible */
  22276. /*
  22277. * For all byte arrays, natural order is used. E.g.
  22278. * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
  22279. * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
  22280. */
  22281. /* used to encrypt transmit packet such as keep-alive */
  22282. A_UINT8 rc4_write_sandbox[256];
  22283. A_UINT32 rc4_write_x;
  22284. A_UINT32 rc4_write_y;
  22285. /* used to decrypt received packet such as wow data */
  22286. A_UINT8 rc4_read_sandbox[256];
  22287. A_UINT32 rc4_read_x;
  22288. A_UINT32 rc4_read_y;
  22289. /* used to calculate HMAC hash for transmit packet such as keep-alive */
  22290. A_UINT8 ssl_write_seq[8];
  22291. A_UINT8 ssl_sha1_write_key[64];
  22292. A_UINT32 ssl_sha1_write_key_len;
  22293. /* used to calculate HAMC hash for receive packet such as wow data */
  22294. A_UINT8 ssl_read_seq[8];
  22295. A_UINT8 ssl_sha1_read_key[64];
  22296. A_UINT32 ssl_sha1_read_key_len;
  22297. /* optional element for specifying TCP options data to include in
  22298. * transmit packets such as keep-alive
  22299. */
  22300. A_UINT32 tcp_options_len;
  22301. A_UINT8 tcp_options[40];
  22302. A_UINT32 async_id; /* keep-alive request id */
  22303. } wmi_extwow_set_app_type2_params_cmd_fixed_param;
  22304. #define WMI_RXERR_CRC 0x01 /* CRC error on frame */
  22305. #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  22306. #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  22307. #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  22308. #define WMI_RX_OFFLOAD_MON_MODE 0x40 /* Offload dropped mgmt pkt's for only in capture mode*/
  22309. #define WMI_RXERR_PN 0x80 /* Invalid PN number on frame */
  22310. typedef enum {
  22311. PKT_PWR_SAVE_PAID_MATCH = 0x00000001,
  22312. PKT_PWR_SAVE_GID_MATCH = 0x00000002,
  22313. PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x00000004,
  22314. PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x00000008,
  22315. PKT_PWR_SAVE_EOF_PAD_DELIM = 0x00000010,
  22316. PKT_PWR_SAVE_MACADDR_MISMATCH = 0x00000020,
  22317. PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x00000040,
  22318. PKT_PWR_SAVE_GID_NSTS_ZERO = 0x00000080,
  22319. PKT_PWR_SAVE_RSSI_CHECK = 0x00000100,
  22320. PKT_PWR_SAVE_5G_EBT = 0x00000200,
  22321. PKT_PWR_SAVE_2G_EBT = 0x00000400,
  22322. PKT_PWR_SAVE_BSS_COLOR_MISMATCH = 0x00000800,
  22323. PKT_PWR_SAVE_UL_FLAG = 0x00001000,
  22324. PKT_PWR_SAVE_STA_ID_MISMATCH = 0x00002000,
  22325. PKT_PWR_SAVE_MACADDR_MISMATCH_FCS = 0x00004000,
  22326. PKT_PWR_SAVE_ENABLE = 0x80000000,
  22327. } WMI_PKT_PWR_SAVE_TYPE;
  22328. typedef struct {
  22329. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
  22330. A_UINT32 num_data; /** length in byte of data[]. */
  22331. /** pdev_id for identifying the MAC
  22332. * See macros starting with WMI_PDEV_ID_ for values.
  22333. */
  22334. A_UINT32 pdev_id;
  22335. /* This structure is used to send Factory Test Mode [FTM] command
  22336. * from host to firmware for integrated chips which are binary blobs.
  22337. * Following this structure is the TLV:
  22338. * A_UINT8 data[]; <-- length in byte given by field num_data.
  22339. */
  22340. } wmi_ftm_intg_cmd_fixed_param;
  22341. typedef struct {
  22342. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
  22343. A_UINT32 num_data; /** length in byte of data[]. */
  22344. /* This structure is used to receive Factory Test Mode [FTM] event
  22345. * from firmware to host for integrated chips which are binary blobs.
  22346. * Following this structure is the TLV:
  22347. * A_UINT8 data[]; <-- length in byte given by field num_data.
  22348. */
  22349. } wmi_ftm_intg_event_fixed_param;
  22350. #define WMI_MAX_NS_OFFLOADS 2
  22351. #define WMI_MAX_ARP_OFFLOADS 2
  22352. #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  22353. #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  22354. #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  22355. typedef struct {
  22356. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
  22357. A_UINT32 flags; /* flags */
  22358. A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node*/
  22359. A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
  22360. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  22361. } WMI_ARP_OFFLOAD_TUPLE;
  22362. #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  22363. #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  22364. #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  22365. #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3) /* whether the configured IPv6 address is anycast */
  22366. #define WMI_NSOFF_MAX_TARGET_IPS 2
  22367. typedef struct {
  22368. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
  22369. A_UINT32 flags; /* flags */
  22370. /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
  22371. WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
  22372. WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
  22373. WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
  22374. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  22375. } WMI_NS_OFFLOAD_TUPLE;
  22376. typedef struct {
  22377. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
  22378. A_UINT32 flags;
  22379. A_UINT32 vdev_id;
  22380. A_UINT32 num_ns_ext_tuples;
  22381. /* Following this structure are the TLVs:
  22382. * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
  22383. * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
  22384. * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; <-- size based on num_ns_ext_tuples
  22385. */
  22386. } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
  22387. typedef struct {
  22388. A_UINT32 tlv_header;
  22389. A_UINT32 vdev_id;
  22390. A_UINT32 pattern_id;
  22391. A_UINT32 timeout;
  22392. A_UINT32 length;
  22393. /*Following this would be the pattern
  22394. A_UINT8 pattern[] of length specified by length
  22395. field in the structure.*/
  22396. } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  22397. typedef struct {
  22398. A_UINT32 tlv_header;
  22399. A_UINT32 vdev_id;
  22400. A_UINT32 pattern_id;
  22401. } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  22402. typedef struct {
  22403. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
  22404. /** unique id identifying the VDEV, generated by the caller */
  22405. A_UINT32 vdev_id;
  22406. /** peer MAC address */
  22407. wmi_mac_addr peer_macaddr;
  22408. /** Tid number */
  22409. A_UINT32 tid;
  22410. /** Initiator (1) or Responder (0) for this aggregation */
  22411. A_UINT32 initiator;
  22412. /** size of the negotiated window */
  22413. A_UINT32 window_size;
  22414. /** starting sequence number (only valid for initiator) */
  22415. A_UINT32 ssn;
  22416. /** timeout field represents the time to wait for Block Ack in
  22417. * initiator case and the time to wait for BAR in responder
  22418. * case. 0 represents no timeout. */
  22419. A_UINT32 timeout;
  22420. /* BA policy: immediate ACK (0) or delayed ACK (1) */
  22421. A_UINT32 policy;
  22422. } wmi_peer_tid_addba_cmd_fixed_param;
  22423. typedef struct {
  22424. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
  22425. /** unique id identifying the VDEV, generated by the caller */
  22426. A_UINT32 vdev_id;
  22427. /** peer MAC address */
  22428. wmi_mac_addr peer_macaddr;
  22429. /** Tid number */
  22430. A_UINT32 tid;
  22431. /** Initiator (1) or Responder (0) for this aggregation */
  22432. A_UINT32 initiator;
  22433. } wmi_peer_tid_delba_cmd_fixed_param;
  22434. typedef struct {
  22435. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
  22436. /** unique id identifying the VDEV, generated by the caller */
  22437. A_UINT32 vdev_id;
  22438. /** peer MAC address */
  22439. wmi_mac_addr peer_macaddr;
  22440. /** Tid number */
  22441. A_UINT32 tid;
  22442. /** Event status */
  22443. A_UINT32 status;
  22444. } wmi_tx_addba_complete_event_fixed_param;
  22445. typedef struct {
  22446. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
  22447. /** unique id identifying the VDEV, generated by the caller */
  22448. A_UINT32 vdev_id;
  22449. /** peer MAC address */
  22450. wmi_mac_addr peer_macaddr;
  22451. /** Tid number */
  22452. A_UINT32 tid;
  22453. /** Event status */
  22454. A_UINT32 status;
  22455. } wmi_tx_delba_complete_event_fixed_param;
  22456. /*
  22457. * Structure to request sequence numbers for a given
  22458. * peer station on different TIDs. The TIDs are
  22459. * indicated in the tidBitMap, tid 0 would
  22460. * be represented by LSB bit 0. tid 1 would be
  22461. * represented by LSB bit 1 etc.
  22462. * The target will retrieve the current sequence
  22463. * numbers for the peer on all the TIDs requested
  22464. * and send back a response in a WMI event.
  22465. */
  22466. typedef struct
  22467. {
  22468. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  22469. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
  22470. wmi_mac_addr peer_macaddr;
  22471. A_UINT32 tidBitmap;
  22472. } wmi_ba_req_ssn;
  22473. typedef struct {
  22474. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  22475. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
  22476. /** unique id identifying the VDEV, generated by the caller */
  22477. A_UINT32 vdev_id;
  22478. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  22479. A_UINT32 num_ba_req_ssn;
  22480. /* Following this struct are the TLV's:
  22481. * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
  22482. */
  22483. } wmi_ba_req_ssn_cmd_fixed_param;
  22484. /*
  22485. * Max transmit categories
  22486. *
  22487. * Note: In future if we need to increase WMI_MAX_TC definition
  22488. * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
  22489. */
  22490. #define WMI_MAX_TC 8
  22491. /*
  22492. * Structure to send response sequence numbers
  22493. * for a give peer and tidmap.
  22494. */
  22495. typedef struct
  22496. {
  22497. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  22498. WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
  22499. wmi_mac_addr peer_macaddr;
  22500. /* A boolean to indicate if ssn is present */
  22501. A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
  22502. /* The ssn from target, valid only if
  22503. * ssn_present_for_tid[tidn] equals 1
  22504. */
  22505. A_UINT32 ssn_for_tid[WMI_MAX_TC];
  22506. } wmi_ba_event_ssn;
  22507. typedef struct {
  22508. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  22509. WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
  22510. /** unique id identifying the VDEV, generated by the caller */
  22511. A_UINT32 vdev_id;
  22512. /** Event status, success or failure of the overall operation */
  22513. A_UINT32 status;
  22514. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  22515. A_UINT32 num_ba_event_ssn;
  22516. /* Following this struct are the TLV's:
  22517. * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
  22518. */
  22519. } wmi_ba_rsp_ssn_event_fixed_param;
  22520. enum wmi_aggr_state_req_type {
  22521. WMI_DISABLE_AGGREGATION,
  22522. WMI_ENABLE_AGGREGATION
  22523. };
  22524. /*
  22525. * This event is generated by the COEX module
  22526. * when esco call is begins the coex module in fw generated this event to host to
  22527. * disable the RX aggregation and after completion of the esco call fw will indicate to
  22528. * enable back the Rx aggregation .
  22529. */
  22530. typedef struct {
  22531. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
  22532. /** unique id identifying the VDEV, generated by the caller */
  22533. A_UINT32 vdev_id;
  22534. /** req_type contains values from enum
  22535. * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
  22536. A_UINT32 req_type;
  22537. } wmi_aggr_state_trig_event_fixed_param;
  22538. typedef struct {
  22539. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
  22540. /** unique id identifying the VDEV, generated by the caller */
  22541. A_UINT32 vdev_id;
  22542. /** MAC address used for installing */
  22543. wmi_mac_addr peer_macaddr;
  22544. /** key index */
  22545. A_UINT32 key_ix;
  22546. /** key flags */
  22547. A_UINT32 key_flags;
  22548. /** Event status */
  22549. A_UINT32 status;
  22550. } wmi_vdev_install_key_complete_event_fixed_param;
  22551. typedef enum {
  22552. /* CSA_SA_QUERY_TIMEOUT:
  22553. * Disconnect due to SA query timeout after moving to new channel
  22554. * due to CSA in OCV enabled case.
  22555. */
  22556. WLAN_DISCONNECT_REASON_CSA_SA_QUERY_TIMEOUT = 1,
  22557. /* MOVE_TO_CELLULAR:
  22558. * Disconnect from WiFi to move to cellular
  22559. */
  22560. WLAN_DISCONNECT_REASON_MOVE_TO_CELLULAR,
  22561. } WMI_VDEV_DISCONNECT_REASON_ID;
  22562. typedef struct {
  22563. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_disconnect_event_fixed_param */
  22564. /** unique id identifying the VDEV, generated by the caller */
  22565. A_UINT32 vdev_id;
  22566. /* Disconnect reason from WMI_VDEV_DISCONNECT_REASON_ID */
  22567. A_UINT32 reason;
  22568. } wmi_vdev_disconnect_event_fixed_param;
  22569. typedef enum _WMI_NLO_AUTH_ALGORITHM {
  22570. WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
  22571. WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
  22572. WMI_NLO_AUTH_ALGO_WPA = 3,
  22573. WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
  22574. WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
  22575. WMI_NLO_AUTH_ALGO_RSNA = 6,
  22576. WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
  22577. } WMI_NLO_AUTH_ALGORITHM;
  22578. typedef enum _WMI_NLO_CIPHER_ALGORITHM {
  22579. WMI_NLO_CIPHER_ALGO_NONE = 0x00,
  22580. WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
  22581. WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
  22582. WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
  22583. WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
  22584. WMI_NLO_CIPHER_ALGO_BIP = 0x06,
  22585. WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  22586. WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  22587. WMI_NLO_CIPHER_ALGO_WEP = 0x101,
  22588. } WMI_NLO_CIPHER_ALGORITHM;
  22589. /* SSID broadcast type passed in NLO params */
  22590. typedef enum _WMI_NLO_SSID_BcastNwType
  22591. {
  22592. WMI_NLO_BCAST_UNKNOWN = 0,
  22593. WMI_NLO_BCAST_NORMAL = 1,
  22594. WMI_NLO_BCAST_HIDDEN = 2,
  22595. } WMI_NLO_SSID_BcastNwType;
  22596. #define WMI_NLO_MAX_SSIDS 16
  22597. #define WMI_NLO_MAX_CHAN 48
  22598. #define WMI_NLO_CONFIG_STOP (0x1 << 0)
  22599. #define WMI_NLO_CONFIG_START (0x1 << 1)
  22600. #define WMI_NLO_CONFIG_RESET (0x1 << 2)
  22601. #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
  22602. #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
  22603. #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
  22604. /* This bit is used to indicate if EPNO Profile is enabled */
  22605. #define WMI_NLO_CONFIG_ENLO (0x1 << 7)
  22606. #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
  22607. #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
  22608. #define WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ (0x1 << 10)
  22609. #define WMI_NLO_CONFIG_RANDOM_SEQ_NO_IN_PROBE_REQ (0x1 << 11)
  22610. #define WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ (0x1 << 12)
  22611. #define WMI_NLO_CONFIG_ENABLE_CNLO_RSSI_CONFIG (0x1 << 13)
  22612. /*
  22613. * This bit is used to indicate if MRSNO IE parsing for WiFi6 standard
  22614. * is enabled.
  22615. */
  22616. #define WMI_NLO_CONFIG_ENABLE_MRSNO_WIFI6 (0x1 << 14)
  22617. /*
  22618. * This bit is used to indicate if MRSNO IE parsing for WiFi7 standard
  22619. * is enabled.
  22620. */
  22621. #define WMI_NLO_CONFIG_ENABLE_MRSNO_WIFI7 (0x1 << 15)
  22622. /* Whether directed scan needs to be performed (for hidden SSIDs) */
  22623. #define WMI_ENLO_FLAG_DIRECTED_SCAN 1
  22624. /* Whether PNO event shall be triggered if the network is found on A band */
  22625. #define WMI_ENLO_FLAG_A_BAND 2
  22626. /* Whether PNO event shall be triggered if the network is found on G band */
  22627. #define WMI_ENLO_FLAG_G_BAND 4
  22628. /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
  22629. #define WMI_ENLO_FLAG_STRICT_MATCH 8
  22630. /* Code for matching the beacon AUTH IE - additional codes TBD */
  22631. /* open */
  22632. #define WMI_ENLO_AUTH_CODE_OPEN 1
  22633. /* WPA_PSK or WPA2PSK */
  22634. #define WMI_ENLO_AUTH_CODE_PSK 2
  22635. /* any EAPOL */
  22636. #define WMI_ENLO_AUTH_CODE_EAPOL 4
  22637. /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
  22638. typedef struct wmi_nlo_ssid_param
  22639. {
  22640. A_UINT32 valid;
  22641. wmi_ssid ssid;
  22642. } wmi_nlo_ssid_param;
  22643. /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
  22644. typedef struct wmi_nlo_enc_param
  22645. {
  22646. A_UINT32 valid;
  22647. A_UINT32 enc_type;
  22648. } wmi_nlo_enc_param;
  22649. /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
  22650. typedef struct wmi_nlo_auth_param
  22651. {
  22652. A_UINT32 valid;
  22653. A_UINT32 auth_type;
  22654. } wmi_nlo_auth_param;
  22655. /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
  22656. typedef struct wmi_nlo_bcast_nw_param
  22657. {
  22658. A_UINT32 valid;
  22659. /* If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value should be true/false
  22660. Otherwise EPNO is enabled. bcast_nw_type would be used as a bit flag contains WMI_ENLO_FLAG_XXX */
  22661. A_UINT32 bcast_nw_type;
  22662. } wmi_nlo_bcast_nw_param;
  22663. /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
  22664. typedef struct wmi_nlo_rssi_param
  22665. {
  22666. A_UINT32 valid;
  22667. A_INT32 rssi;
  22668. } wmi_nlo_rssi_param;
  22669. typedef struct nlo_configured_parameters {
  22670. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
  22671. wmi_nlo_ssid_param ssid;
  22672. wmi_nlo_enc_param enc_type;
  22673. wmi_nlo_auth_param auth_type;
  22674. wmi_nlo_rssi_param rssi_cond;
  22675. wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
  22676. } nlo_configured_parameters;
  22677. /* Support channel prediction for PNO scan after scanning top_k_num channels
  22678. * if stationary_threshold is met.
  22679. */
  22680. typedef struct nlo_channel_prediction_cfg {
  22681. A_UINT32 tlv_header;
  22682. /* Enable or disable this feature. */
  22683. A_UINT32 enable;
  22684. /* Top K channels will be scanned before deciding whether to further scan
  22685. * or stop. Minimum value is 3 and maximum is 5. */
  22686. A_UINT32 top_k_num;
  22687. /* Preconfigured stationary threshold.
  22688. * Lesser value means more conservative. Bigger value means more aggressive.
  22689. * Maximum is 100 and minimum is 0. */
  22690. A_UINT32 stationary_threshold;
  22691. /* Periodic full channel scan in milliseconds unit.
  22692. * After full_scan_period_ms since last full scan, channel prediction
  22693. * scan is suppressed and will do full scan.
  22694. * This is to help detecting sudden AP power-on or -off. Value 0 means no
  22695. * full scan at all (not recommended).
  22696. */
  22697. A_UINT32 full_scan_period_ms;
  22698. } nlo_channel_prediction_cfg;
  22699. typedef struct enlo_candidate_score_params_t {
  22700. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param */
  22701. A_INT32 min5GHz_rssi; /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
  22702. A_INT32 min24GHz_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
  22703. A_UINT32 initial_score_max; /* the maximum score that a network can have before bonuses */
  22704. /* current_connection_bonus:
  22705. * only report when there is a network's score this much higher
  22706. * than the current connection
  22707. */
  22708. A_UINT32 current_connection_bonus;
  22709. A_UINT32 same_network_bonus; /* score bonus for all networks with the same network flag */
  22710. A_UINT32 secure_bonus; /* score bonus for networks that are not open */
  22711. A_UINT32 band5GHz_bonus; /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
  22712. } enlo_candidate_score_params;
  22713. typedef struct connected_nlo_bss_band_rssi_pref_t {
  22714. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_bss_band_rssi_pref */
  22715. /** band which needs to get preference over other band - see wmi_set_vdev_ie_band enum */
  22716. A_UINT32 band;
  22717. /* Amount of RSSI preference (in dB) that can be given to band (mentioned above) over other band */
  22718. A_INT32 rssi_pref;
  22719. } connected_nlo_bss_band_rssi_pref;
  22720. typedef struct connected_nlo_rssi_params_t {
  22721. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_rssi_params */
  22722. /* Relative RSSI threshold (in dB) by which new BSS should have better RSSI than
  22723. * the current connected BSS.
  22724. */
  22725. A_INT32 relative_rssi;
  22726. /* The amount of RSSI preference (in dB) that can be given to a 5G BSS over 2.4G BSS. */
  22727. A_INT32 relative_rssi_5g_pref;
  22728. } connected_nlo_rssi_params;
  22729. typedef struct wmi_nlo_config {
  22730. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
  22731. A_UINT32 flags;
  22732. A_UINT32 vdev_id;
  22733. A_UINT32 fast_scan_max_cycles;
  22734. A_UINT32 active_dwell_time;
  22735. A_UINT32 passive_dwell_time; /* PDT in msecs */
  22736. A_UINT32 probe_bundle_size;
  22737. A_UINT32 rest_time; /* ART = IRT */
  22738. A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
  22739. A_UINT32 scan_backoff_multiplier; /* SBM */
  22740. A_UINT32 fast_scan_period; /* SCBM */
  22741. A_UINT32 slow_scan_period; /* specific to windows */
  22742. A_UINT32 no_of_ssids;
  22743. A_UINT32 num_of_channels;
  22744. A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
  22745. /** MAC Address to use in Probe Req as SA **/
  22746. wmi_mac_addr mac_addr;
  22747. /** Mask on which MAC has to be randomized **/
  22748. wmi_mac_addr mac_mask;
  22749. /** IE bitmap to use in Probe Req **/
  22750. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  22751. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  22752. A_UINT32 num_vendor_oui;
  22753. /** Number of connected NLO band preferences **/
  22754. A_UINT32 num_cnlo_band_pref;
  22755. /** dwell time in msec on active 2GHz channels */
  22756. A_UINT32 active_dwell_time_2ghz;
  22757. /** dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked as an active channel */
  22758. A_UINT32 active_dwell_time_6ghz;
  22759. /** dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked as a passive channel */
  22760. A_UINT32 passive_dwell_time_6ghz;
  22761. /* The TLVs will follow.
  22762. * nlo_configured_parameters nlo_list[];
  22763. * A_UINT32 channel_list[num_of_channels]; // in MHz
  22764. * channel_list:
  22765. * If FW supports WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL,
  22766. * then channel_list may fill the upper 12 bits with channel flags,
  22767. * while using only the lower 20 bits for channel frequency.
  22768. * Check WMI_SCAN_CHANNEL_FLAG macros for the channel flags
  22769. * If FW doesn't support WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL,
  22770. * then channel_list only holds the frequency value
  22771. * nlo_channel_prediction_cfg ch_prediction_cfg;
  22772. * enlo_candidate_score_params candidate_score_params;
  22773. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  22774. * connected_nlo_rssi_params cnlo_rssi_params;
  22775. * connected_nlo_bss_band_rssi_pref cnlo_bss_band_rssi_pref[num_cnlo_band_pref];
  22776. * A_UINT32 preferred_chan_list[]; // in MHz
  22777. */
  22778. } wmi_nlo_config_cmd_fixed_param;
  22779. typedef struct wmi_nlo_event
  22780. {
  22781. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
  22782. A_UINT32 vdev_id;
  22783. } wmi_nlo_event;
  22784. /* WMI_PASSPOINT_CONFIG_SET
  22785. * Sets a list for passpoint networks for PNO purposes;
  22786. * it should be matched against any passpoint networks found
  22787. * during regular PNO scan.
  22788. */
  22789. #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
  22790. /* WMI_PASSPOINT_CONFIG_RESET
  22791. * Reset passpoint network list -
  22792. * no Passpoint networks should be matched after this.
  22793. */
  22794. #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
  22795. #define PASSPOINT_REALM_LEN 256
  22796. #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
  22797. #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  22798. #define PASSPOINT_PLMN_ID_LEN 3
  22799. #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
  22800. (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
  22801. /*
  22802. * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
  22803. * A_UINT8 realm[PASSPOINT_REALM_LEN]
  22804. * array will end on a 4-byte boundary.
  22805. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  22806. */
  22807. A_COMPILE_TIME_ASSERT(
  22808. check_passpoint_realm_size,
  22809. (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
  22810. /*
  22811. * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
  22812. * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
  22813. * roaming_consortium_ids array below will end on a 4-byte boundary.
  22814. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  22815. */
  22816. A_COMPILE_TIME_ASSERT(
  22817. check_passpoint_roaming_consortium_ids_size,
  22818. ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
  22819. /* wildcard ID to allow an action (reset) to apply to all networks */
  22820. #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
  22821. typedef struct wmi_passpoint_config {
  22822. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
  22823. /* (network) id
  22824. * identifier of the matched network, report this in event
  22825. * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
  22826. * that indicates the action should be applied to all networks.
  22827. * Currently, the only action that is applied to all networks is "reset".
  22828. * If a non-wildcard ID is specified, that particular network is configured.
  22829. * If a wildcard ID is specified, all networks are reset.
  22830. */
  22831. A_UINT32 id;
  22832. A_UINT32 req_id;
  22833. A_UINT8 realm[PASSPOINT_REALM_LEN]; /*null terminated UTF8 encoded realm, 0 if unspecified*/
  22834. A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; /*roaming consortium ids to match, 0s if unspecified*/
  22835. /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
  22836. A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
  22837. } wmi_passpoint_config_cmd_fixed_param;
  22838. typedef struct {
  22839. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_event_hdr */
  22840. A_UINT32 id; /* identifier of the matched network */
  22841. A_UINT32 vdev_id;
  22842. A_UINT32 timestamp; /* time since boot (in microsecond) when the result was retrieved*/
  22843. wmi_ssid ssid;
  22844. wmi_mac_addr bssid; /* bssid of the network */
  22845. A_UINT32 channel_mhz; /* channel frequency in MHz */
  22846. A_UINT32 rssi; /* RSSI value */
  22847. A_UINT32 rtt; /* timestamp in nanoseconds*/
  22848. A_UINT32 rtt_sd; /* standard deviation in rtt */
  22849. A_UINT32 beacon_period; /* beacon advertised in the beacon */
  22850. A_UINT32 capability; /* capabilities advertised in the beacon */
  22851. A_UINT32 ie_length; /* size of the ie_data blob */
  22852. A_UINT32 anqp_length; /* length of ANQP blob */
  22853. /* Following this structure is the byte stream of ie data of length ie_buf_len:
  22854. * A_UINT8 ie_data[]; <-- length in byte given by field ie_length, blob of ie data in beacon
  22855. * A_UINT8 anqp_ie[]; <-- length in byte given by field anqp_len, blob of anqp data of IE
  22856. * 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.
  22857. */
  22858. } wmi_passpoint_event_hdr;
  22859. #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
  22860. /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
  22861. #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
  22862. /** Disable GTK offload */
  22863. #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
  22864. /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
  22865. #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
  22866. enum wmi_chatter_mode {
  22867. /* Chatter enter/exit happens
  22868. * automatically based on preset
  22869. * params
  22870. */
  22871. WMI_CHATTER_MODE_AUTO,
  22872. /* Chatter enter is triggered
  22873. * manually by the user
  22874. */
  22875. WMI_CHATTER_MODE_MANUAL_ENTER,
  22876. /* Chatter exit is triggered
  22877. * manually by the user
  22878. */
  22879. WMI_CHATTER_MODE_MANUAL_EXIT,
  22880. /* Placeholder max value, always last*/
  22881. WMI_CHATTER_MODE_MAX
  22882. };
  22883. enum wmi_chatter_query_type {
  22884. /*query coalescing filter match counter*/
  22885. WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
  22886. WMI_CHATTER_QUERY_MAX
  22887. };
  22888. typedef struct {
  22889. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
  22890. A_UINT32 chatter_mode;
  22891. } wmi_chatter_set_mode_cmd_fixed_param;
  22892. /** maximum number of filter supported*/
  22893. #define CHATTER_MAX_COALESCING_RULES 11
  22894. /** maximum number of field tests per filter*/
  22895. #define CHATTER_MAX_FIELD_TEST 5
  22896. /** maximum field length in number of DWORDS*/
  22897. #define CHATTER_MAX_TEST_FIELD_LEN32 2
  22898. /** field test kinds*/
  22899. #define CHATTER_COALESCING_TEST_EQUAL 1
  22900. #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
  22901. #define CHATTER_COALESCING_TEST_NOT_EQUAL 3
  22902. /** packet type*/
  22903. #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
  22904. #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
  22905. #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
  22906. /** coalescing field test*/
  22907. typedef struct _chatter_pkt_coalescing_hdr_test {
  22908. /** offset from start of mac header, for windows native wifi host driver
  22909. * should assume standard 802.11 frame format without QoS info and address4
  22910. * FW would account for any non-stand fields for final offset value.
  22911. */
  22912. A_UINT32 offset;
  22913. A_UINT32 length; /* length of test field*/
  22914. A_UINT32 test; /*equal, not equal or masked equal*/
  22915. A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream*/
  22916. A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream*/
  22917. } chatter_pkt_coalescing_hdr_test;
  22918. /** packet coalescing filter*/
  22919. typedef struct _chatter_pkt_coalescing_filter {
  22920. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
  22921. A_UINT32 filter_id; /* unique id assigned by OS */
  22922. A_UINT32 max_coalescing_delay; /* max milliseconds 1st pkt can be held */
  22923. A_UINT32 pkt_type; /* unicast/multicast/broadcast */
  22924. A_UINT32 num_of_test_field; /* number of field test in table */
  22925. chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /* field test tbl */
  22926. } chatter_pkt_coalescing_filter;
  22927. /** packet coalescing filter add command*/
  22928. typedef struct {
  22929. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
  22930. A_UINT32 num_of_filters;
  22931. /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
  22932. chatter_pkt_coalescing_filter rx_filter[1];*/
  22933. } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
  22934. /** packet coalescing filter delete command*/
  22935. typedef struct {
  22936. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
  22937. A_UINT32 filter_id; /*filter id which will be deleted*/
  22938. } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
  22939. /** packet coalescing query command*/
  22940. typedef struct {
  22941. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
  22942. A_UINT32 type; /*type of query*/
  22943. } wmi_chatter_coalescing_query_cmd_fixed_param;
  22944. /** chatter query reply event*/
  22945. typedef struct {
  22946. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
  22947. A_UINT32 type; /*query type*/
  22948. A_UINT32 filter_match_cnt; /*coalescing filter match counter*/
  22949. } wmi_chatter_query_reply_event_fixed_param;
  22950. /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
  22951. * cannot be changed without breaking WMI compatibility. */
  22952. #define GTK_OFFLOAD_KEK_BYTES 16
  22953. #define GTK_OFFLOAD_KCK_BYTES 16
  22954. /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
  22955. #define GTK_REPLAY_COUNTER_BYTES 8
  22956. #define WMI_MAX_KEY_LEN 32
  22957. #define IGTK_PN_SIZE 6
  22958. typedef struct {
  22959. /**
  22960. * WMITLV_TAG_STRUC_wmi_roam_ml_key_material_param will exist when link is not created by fw.
  22961. */
  22962. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ml_link_key_material_param */
  22963. 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 */
  22964. /** key index */
  22965. A_UINT32 key_ix;
  22966. /** key cipher, defined as WMI_CIPHER_ */
  22967. A_UINT32 key_cipher;
  22968. A_UINT8 pn[WMI_MAX_PN_LEN];
  22969. A_UINT8 key_buff[WMI_MAX_KEY_LEN];
  22970. /*
  22971. * When link_id is 0xf, this field will be MLD address.
  22972. * Otherwise, it will be bssid which specified with link_id.
  22973. */
  22974. wmi_mac_addr mac_addr;
  22975. A_UINT32 key_len; /* number of valid bytes within key_buff */
  22976. A_UINT32 key_flags;
  22977. } wmi_roam_ml_key_material_param;
  22978. typedef struct {
  22979. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
  22980. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  22981. A_UINT32 flags; /* status flags */
  22982. A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
  22983. /*
  22984. * As with all WMI messages, this message uses little-endian byte
  22985. * ordering within each A_UINT32 field.
  22986. * If a big-endian host is using automatic swapping of the bytes within
  22987. * each 4-byte A_UINT32 to automatically correct the endianness of the
  22988. * A_UINT32 fields as the message is uploaded from target --> host, the
  22989. * big-endian host will have to undo the automatic byte swapping for the
  22990. * below A_UINT8 fields, to restore them to their original order.
  22991. */
  22992. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
  22993. A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  22994. A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  22995. A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  22996. A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  22997. A_UINT8 gtk_keyIndex; /* GTK key index */
  22998. A_UINT8 gtk_keyLength; /* GTK key length */
  22999. A_UINT8 gtk_keyRSC[GTK_REPLAY_COUNTER_BYTES]; /* GTK key replay sequence counter */
  23000. A_UINT8 gtk_key[WMI_MAX_KEY_LEN]; /* GTK key data */
  23001. A_UINT8 bigtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  23002. A_UINT8 bigtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  23003. A_UINT8 bigtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  23004. A_UINT8 bigtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  23005. } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
  23006. typedef struct {
  23007. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
  23008. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  23009. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  23010. /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
  23011. A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
  23012. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  23013. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  23014. /*
  23015. * Following structure will be appended when fils:
  23016. * wmi_gtk_offload_fils_tlv_param wmi_fils_gtk_info;
  23017. * Following structure will be appended to the above KEK[] when kek length
  23018. * is larger than GTK_OFFLOAD_KEK_BYTES:
  23019. * A_UINT8 kek_ext[];
  23020. * Following structure will be appended to the above KCK[] when kck length
  23021. * is larger than GTK_OFFLOAD_KCK_BYTES:
  23022. * A_UINT8 kck_ext[];
  23023. */
  23024. } WMI_GTK_OFFLOAD_CMD_fixed_param;
  23025. typedef struct {
  23026. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_offload_extended_tlv_param */
  23027. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  23028. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  23029. A_UINT32 kek_len;
  23030. A_UINT8 KEK[GTK_OFFLOAD_KEK_EXTENDED_BYTES]; /* key encryption key */
  23031. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  23032. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  23033. } wmi_gtk_offload_fils_tlv_param;
  23034. typedef struct {
  23035. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param */
  23036. A_UINT32 vdev_id;
  23037. A_UINT32 sa_query_retry_interval; /* in msec */
  23038. A_UINT32 sa_query_max_retry_count;
  23039. } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
  23040. typedef enum {
  23041. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
  23042. WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
  23043. WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
  23044. WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
  23045. WMI_STA_KEEPALIVE_METHOD_MGMT_VENDOR_ACTION = 5, /* vendor action frame */
  23046. } WMI_STA_KEEPALIVE_METHOD;
  23047. typedef struct {
  23048. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
  23049. WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
  23050. WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
  23051. wmi_mac_addr dest_mac_addr; /* destination MAC address */
  23052. } WMI_STA_KEEPALVE_ARP_RESPONSE;
  23053. typedef struct {
  23054. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
  23055. A_UINT32 vdev_id;
  23056. A_UINT32 enable; /* 1 - Enable, 0 - disable */
  23057. A_UINT32 method; /* keep alive method */
  23058. A_UINT32 interval; /* time interval in seconds */
  23059. /*
  23060. * NOTE: following this structure is the TLV for ARP Response:
  23061. * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; <-- ARP response
  23062. */
  23063. } WMI_STA_KEEPALIVE_CMD_fixed_param;
  23064. typedef struct {
  23065. A_UINT32 tlv_header;
  23066. A_UINT32 vdev_id;
  23067. A_UINT32 action;
  23068. } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
  23069. typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
  23070. typedef struct {
  23071. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
  23072. A_UINT32 vdev_id;
  23073. A_UINT32 keepaliveInterval; /* seconds */
  23074. A_UINT32 keepaliveMethod;
  23075. } wmi_vdev_set_keepalive_cmd_fixed_param;
  23076. typedef struct {
  23077. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
  23078. A_UINT32 vdev_id;
  23079. } wmi_vdev_get_keepalive_cmd_fixed_param;
  23080. typedef struct {
  23081. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
  23082. A_UINT32 vdev_id;
  23083. A_UINT32 keepaliveInterval; /* seconds */
  23084. A_UINT32 keepaliveMethod; /* seconds */
  23085. } wmi_vdev_get_keepalive_event_fixed_param;
  23086. typedef enum {
  23087. WMI_CLEAR_ARP_STATS_COLLECTED = 0x0,
  23088. WMI_START_ARP_STATS_COLLECTION,
  23089. } WMI_ARP_STATS_ACTION;
  23090. typedef enum {
  23091. WMI_ARP_STATS_RX_PKT_TYPE_ARP = 0x1,
  23092. } WMI_ARP_STATS_RX_PKT_TYPE;
  23093. typedef enum {
  23094. WMI_BA_SESSION_ESTABLISHMENT_STATUS_SUCCESS = 0x0,
  23095. WMI_BA_SESSION_ESTABLISHMENT_STATUS_FAILURE,
  23096. } WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS;
  23097. typedef enum {
  23098. WMI_CONNECTION_STATUS_FAILURE = 0x0,
  23099. WMI_CONNECTION_STATUS_SUCCESS,
  23100. } WMI_ARP_STATS_CONNECTION_STATUS;
  23101. /* ARP stats set (configure) req */
  23102. typedef struct {
  23103. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param */
  23104. A_UINT32 vdev_id;
  23105. A_UINT32 set_clr; /* WMI_ARP_STATS_ACTION */
  23106. A_UINT32 pkt_type; /* WMI_ARP_STATS_RX_PKT_TYPE */
  23107. A_UINT32 ipv4; /* target will maintain ARP stats (only) for frames containing this IP address */
  23108. } wmi_vdev_set_arp_stats_cmd_fixed_param;
  23109. /* ARP stats get req */
  23110. typedef struct {
  23111. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param */
  23112. A_UINT32 vdev_id;
  23113. } wmi_vdev_get_arp_stats_cmd_fixed_param;
  23114. /* per vdev based ARP stats */
  23115. typedef struct {
  23116. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param */
  23117. A_UINT32 vdev_id;
  23118. A_UINT32 arp_req_enqueue;
  23119. A_UINT32 arp_req_tx_success;
  23120. A_UINT32 arp_req_tx_failure; /* number of times a tx MPDU containing a unicast ARP request went unacked */
  23121. A_UINT32 arp_rsp_recvd;
  23122. A_UINT32 out_of_order_arp_rsp_drop_cnt;
  23123. A_UINT32 dad_detected; /* duplicate address detection */
  23124. A_UINT32 connect_status; /* WMI_ARP_STATS_CONNECTION_STATUS */
  23125. A_UINT32 ba_session_establishment_status; /* WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS */
  23126. } wmi_vdev_get_arp_stats_event_fixed_param;
  23127. typedef struct {
  23128. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_connectivity_check_stats */
  23129. A_UINT32 pkt_type_bitmap; /* WMI_IP_CONNECTIVITY_STATS_RX_PKT_TYPE_BITMAP - only for DNS, TCP and ICMP */
  23130. A_UINT32 tcp_src_port; /* target will maintain TCP stats (only) for frames with this src port */
  23131. A_UINT32 tcp_dst_port; /* target will maintain TCP stats (only) for frames with this dst port */
  23132. A_UINT32 icmp_ipv4; /* target will maintain ICMPv4 stats (only) for frames containing this IP address */
  23133. } wmi_vdev_set_connectivity_check_stats;
  23134. /* per vdev dns/icmp/tcp based stats*/
  23135. typedef struct {
  23136. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_connectivity_check_stats */
  23137. A_UINT32 tcp_ack_recvd; /* number of tcp syn ack's received by FW */
  23138. A_UINT32 icmpv4_rsp_recvd; /* number of icmpv4 responses received by FW */
  23139. } wmi_vdev_get_connectivity_check_stats;
  23140. typedef struct {
  23141. A_UINT32 tlv_header;
  23142. A_UINT32 vdev_id;
  23143. #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
  23144. #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
  23145. A_UINT32 action;
  23146. } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
  23147. typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
  23148. typedef struct {
  23149. A_UINT32 tlv_header;
  23150. A_UINT32 vdev_id;
  23151. A_UINT32 mcc_tbttmode;
  23152. wmi_mac_addr mcc_bssid;
  23153. } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
  23154. #define WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION 10
  23155. #define WMI_MAX_VENDOR_OUI_DATA_LENGTH 20
  23156. typedef enum
  23157. {
  23158. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1 = 0, /* Connect in 1X1 only */
  23159. 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 */
  23160. WMI_VENDOR_OUI_ACTION_CCKM_1X1 = 2, /* TX (only) CCKM rates with 1 chain only */
  23161. WMI_VENDOR_OUI_ACTION_ALT_ITO = 3, /* inactivity time-out */
  23162. WMI_VENDOR_OUI_ACTION_SWITCH_TO_11N_MODE = 4, /* Switch from 11ac to 11n mode to avoid IOT issues with ONM frame */
  23163. /* WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1
  23164. * Connect in 1x1 only and Use only one chain for both Tx and Rx
  23165. * to avoid IOT issues due to change in number of Tx and Rx chains
  23166. */
  23167. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1 = 5,
  23168. /* Disable burst and assist, and restrict A-MPDU size to 32 */
  23169. WMI_VENDOR_OUI_ACTION_DISABLE_AGGRESSIVE_TX = 6,
  23170. /* Disable FW triggered TWT if vendor OUI is received in beacon */
  23171. WMI_VENDOR_OUI_ACTION_DISABLE_FW_TRIGGERED_TWT = 7,
  23172. /* Extend ITO under WOW mode if vendor OUI is received in beacon */
  23173. WMI_VENDOR_OUI_ACTION_EXTEND_WOW_ITO = 8,
  23174. /*
  23175. * Turn on station 80211BE feature if AP's vendor OUI is in the list
  23176. * for specific customer
  23177. */
  23178. WMI_VENDOR_OUI_ACTION_ALLOW_11BE = 9,
  23179. /*
  23180. * Turn off FW's dynamic qos null tx rate if specific vendor OUI
  23181. * received in beacon.
  23182. */
  23183. WMI_VENDOR_OUI_ACTION_DISABLE_DYNAMIC_QOS_NULL_TX_RATE = 10,
  23184. /*
  23185. * Enable CTS2SELF with QoS null frame if specific vendor OUI
  23186. * received in beacon.
  23187. */
  23188. WMI_VENDOR_OUI_ACTION_ENABLE_CTS2SELF_WITH_QOS_NULL = 11,
  23189. /*
  23190. * Send SMPS frame following OMN frame on VHT conncection if specific
  23191. * vendor OUI received in beacon.
  23192. */
  23193. WMI_VENDOR_OUI_ACTION_SEND_SMPS_FRAME_WITH_OMN = 12,
  23194. /* Restrict SLO if specific vendor OUI received in beacon. */
  23195. WMI_VENDOR_OUI_ACTION_RESTRICT_SLO = 13,
  23196. /*
  23197. * Force MLSR mode if specific vendor OUI received in beacon
  23198. * when connect with MLO.
  23199. */
  23200. WMI_VENDOR_OUI_ACTION_FORCE_MLSR = 14,
  23201. /* Add any action before this line */
  23202. WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID
  23203. } wmi_vendor_oui_action_id;
  23204. typedef struct {
  23205. A_UINT32 tlv_header;
  23206. /** vendor OUI actions */
  23207. A_UINT32 action_id; /* enum wmi_vendor_oui_action_id */
  23208. A_UINT32 total_num_vendor_oui; /* total number of OUI present in ini for all actions.
  23209. ** For first command, this value will be used for allocating memory in FW accordingly */
  23210. A_UINT32 num_vendor_oui_ext; /* the number of wmi_vendor_oui_ext for action_id */
  23211. /* followed by TLVs, an array of structure of type wmi_vendor_oui_ext
  23212. ** wmi_vendor_oui_ext vendor_oui_ext[num_vendor_oui_ext];
  23213. */
  23214. /* followed by A_UINT8 data[] of concatenated data for each vendor_oui_ext[] element
  23215. ** first byte contains the index i of structure vendor_oui_ext[]
  23216. ** for which data is coming and length of the data is extracted as
  23217. ** wmi_vendor_oui_ext[i].buf_data_length. No padding between data of
  23218. ** N th OUI and (N+1) th OUI.
  23219. ** For example, if vendor_oui_ext[0].buf_data_length is 18, then
  23220. ** data[0] will hold the index value 0, data[1] through data[17]
  23221. ** will hold the OUI data for this first OUI, data[18] will hold
  23222. ** the index value 1, and the OUI data for the second OUI will
  23223. ** begin at data[19].
  23224. */
  23225. } wmi_pdev_config_vendor_oui_action_fixed_param;
  23226. typedef struct {
  23227. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param */
  23228. /** pdev_id for identifying the MAC
  23229. * See macros starting with WMI_PDEV_ID_ for values.
  23230. */
  23231. A_UINT32 pdev_id;
  23232. /** AC number */
  23233. A_UINT32 ac; /* refer to wmi_traffic_ac */
  23234. /**
  23235. * Enable/disable tx queue optimizations (such as dropping stale tx frms)
  23236. * for the specified AC.
  23237. */
  23238. A_UINT32 ac_tx_queue_optimize_enable;
  23239. } wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param;
  23240. typedef struct {
  23241. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param */
  23242. /** pdev_id for identifying the MAC
  23243. * See macros starting with WMI_PDEV_ID_ for values.
  23244. */
  23245. A_UINT32 pdev_id;
  23246. /** Enable/disable rx filter promiscuous */
  23247. A_UINT32 rx_filter_promiscuous_enable;
  23248. } wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param;
  23249. typedef enum {
  23250. WMI_BEACON_INFO_PRESENCE_OUI_EXT = 1 << 0,
  23251. WMI_BEACON_INFO_PRESENCE_MAC_ADDRESS = 1 << 1,
  23252. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_NSS = 1 << 2,
  23253. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_HT = 1 << 3,
  23254. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_VHT = 1 << 4,
  23255. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_BAND = 1 << 5,
  23256. } wmi_beacon_info_presence_items;
  23257. typedef struct _wmi_vendor_oui_ext {
  23258. A_UINT32 tlv_header;
  23259. A_UINT32 buf_data_length; /* length of data in bytes for this OUI including index byte */
  23260. A_UINT32 info_presence_bit_mask; /* see enum wmi_beacon_info_presence_items */
  23261. A_UINT32 oui_header_length; /* either 3 or 5 bytes */
  23262. 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 */
  23263. A_UINT32 mac_address_length; /* MAC address length in bytes
  23264. ** (This value will always be 6,
  23265. ** but is explicitly specified for sake
  23266. ** of uniformity and completeness).
  23267. */
  23268. A_UINT32 capability_data_length; /* length of capability in bytes */
  23269. } wmi_vendor_oui_ext;
  23270. #define WMI_INFO_CAPABILITY_NSS_MASK 0x0f
  23271. #define WMI_INFO_CAPABILITY_NSS_OFFSET 0
  23272. #define WMI_INFO_CAPABILITY_HT_ENABLE_MASK 0x10
  23273. #define WMI_INFO_CAPABILITY_HT_ENABLE_OFFSET 4
  23274. #define WMI_INFO_CAPABILITY_VHT_ENABLE_MASK 0x20
  23275. #define WMI_INFO_CAPABILITY_VHT_ENABLE_OFFSET 5
  23276. #define WMI_INFO_CAPABILITY_BAND_MASK 0xc0
  23277. #define WMI_INFO_CAPABILITY_BAND_OFFSET 6
  23278. /* definition of WMI_INFO_CAPABILITY_NSS_MASK */
  23279. #define WMI_INFO_CAPABILITY_NSS_1X1 1
  23280. #define WMI_INFO_CAPABILITY_NSS_2X2 2
  23281. #define WMI_INFO_CAPABILITY_NSS_3X3 3
  23282. #define WMI_INFO_CAPABILITY_NSS_4X4 4
  23283. /* definition of WMI_INFO_CAPABILITY_BAND_MASK */
  23284. #define WMI_INFO_CAPABILITY_2G_BAND_MASK (1 << 0)
  23285. #define WMI_INFO_CAPABILITY_5G_BAND_MASK (1 << 1)
  23286. typedef struct {
  23287. A_UINT32 tlv_header;
  23288. A_UINT32 vdev_id; /* home vdev id */
  23289. A_UINT32 meas_token; /* from measure request frame */
  23290. A_UINT32 dialog_token;
  23291. A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
  23292. A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst*/
  23293. A_UINT32 burst_cycle; /* times cycle through within one burst */
  23294. A_UINT32 tx_power; /* for path frame */
  23295. A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
  23296. wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
  23297. A_UINT32 num_chans;
  23298. /*
  23299. * This fixed_param TLV is followed by other TLVs:
  23300. * A_UINT32 channel_list[num_chans]; // in MHz
  23301. */
  23302. } wmi_vdev_plmreq_start_cmd_fixed_param;
  23303. typedef struct {
  23304. A_UINT32 tlv_header;
  23305. A_UINT32 vdev_id;
  23306. A_UINT32 meas_token; /* same value from req*/
  23307. } wmi_vdev_plmreq_stop_cmd_fixed_param;
  23308. typedef struct {
  23309. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
  23310. A_UINT32 tlv_header;
  23311. /* unique id identifying the VDEV, generated by the caller */
  23312. A_UINT32 vdev_id;
  23313. /* enable/disable NoA */
  23314. A_UINT32 enable;
  23315. /** number of NoA desc. In the TLV noa_descriptor[] */
  23316. A_UINT32 num_noa;
  23317. /**
  23318. * TLV (tag length value) parameters follow the pattern structure.
  23319. * TLV contain NoA desc with num of num_noa
  23320. */
  23321. } wmi_p2p_set_noa_cmd_fixed_param;
  23322. typedef struct {
  23323. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
  23324. A_UINT32 tlv_header;
  23325. /* unique id identifying the VDEV, generated by the caller */
  23326. A_UINT32 vdev_id;
  23327. /* Identify the wlan module */
  23328. A_UINT32 module_id;
  23329. /* Num of test arguments passed */
  23330. A_UINT32 num_args;
  23331. /* unique id identifying the unit test cmd, generated by the caller */
  23332. A_UINT32 diag_token;
  23333. /**
  23334. * TLV (tag length value) parameters follow the wmi_unit_test_cmd_fixed_param
  23335. * structure. The TLV's are:
  23336. * A_UINT32 args[];
  23337. **/
  23338. } wmi_unit_test_cmd_fixed_param;
  23339. /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
  23340. * after it received WMI_ROAM_SYNCH_EVENTID.
  23341. */
  23342. typedef struct {
  23343. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
  23344. /** unique id identifying the VDEV, generated by the caller */
  23345. A_UINT32 vdev_id;
  23346. } wmi_roam_synch_complete_fixed_param;
  23347. typedef enum {
  23348. RECOVERY_SIM_ASSERT = 0x01,
  23349. RECOVERY_SIM_NO_DETECT = 0x02,
  23350. RECOVERY_SIM_CTR_EP_FULL = 0x03,
  23351. RECOVERY_SIM_EMPTY_POINT = 0x04,
  23352. RECOVERY_SIM_STACK_OV = 0x05,
  23353. RECOVERY_SIM_INFINITE_LOOP = 0x06,
  23354. RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
  23355. RECOVERY_SIM_SELF_RECOVERY = 0x08,
  23356. RECOVERY_SIM_BT_RECOVERY = 0x09,
  23357. } RECOVERY_SIM_TYPE;
  23358. /* WMI_FORCE_FW_HANG_CMDID */
  23359. typedef struct {
  23360. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
  23361. A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:...*/
  23362. A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
  23363. } WMI_FORCE_FW_HANG_CMD_fixed_param;
  23364. typedef enum {
  23365. WMI_MCAST_FILTER_SET = 1,
  23366. WMI_MCAST_FILTER_DELETE
  23367. } WMI_SET_SINGLE_MCAST_FILTER_OP;
  23368. typedef struct {
  23369. A_UINT32 tlv_header;
  23370. A_UINT32 vdev_id;
  23371. A_UINT32 index;
  23372. A_UINT32 action;
  23373. wmi_mac_addr mcastbdcastaddr;
  23374. } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
  23375. typedef enum {
  23376. WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
  23377. WMI_MULTIPLE_MCAST_FILTER_SET, /* clear all previous mc list, and set new list */
  23378. WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
  23379. WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
  23380. } WMI_MULTIPLE_MCAST_FILTER_OP;
  23381. typedef struct {
  23382. A_UINT32 tlv_header;
  23383. A_UINT32 vdev_id;
  23384. A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
  23385. A_UINT32 num_mcastaddrs; /* number of elements in the subsequent mcast addr list */
  23386. /**
  23387. * TLV (tag length value) parameters follow the
  23388. * structure. The TLV's are:
  23389. * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
  23390. */
  23391. } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
  23392. /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
  23393. typedef enum {
  23394. WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
  23395. WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
  23396. } WMI_TIME_STAMP_SYNC_MODE;
  23397. typedef struct {
  23398. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param */
  23399. A_UINT32 mode; /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
  23400. A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
  23401. A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
  23402. } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
  23403. /* GPIO Command and Event data structures */
  23404. /* WMI_GPIO_CONFIG_CMDID */
  23405. enum {
  23406. WMI_GPIO_PULL_NONE, /** Do not specify a pull. */
  23407. WMI_GPIO_PULL_UP, /** Pull the GPIO up. */
  23408. WMI_GPIO_PULL_DOWN, /** Pull the GPIO down. */
  23409. WMI_GPIO_PULL_KEEPER, /** Designate as a keeper. */
  23410. };
  23411. enum wmi_gpio_drive_strength {
  23412. WMI_GPIO_2MA, /** Specify a 2 mA drive. */
  23413. WMI_GPIO_4MA, /** Specify a 4 mA drive. */
  23414. WMI_GPIO_6MA, /** Specify a 6 mA drive. */
  23415. WMI_GPIO_8MA, /** Specify an 8 mA drive. */
  23416. WMI_GPIO_10MA, /** Specify a 10 mA drive. */
  23417. WMI_GPIO_12MA, /** Specify a 12 mA drive. */
  23418. WMI_GPIO_14MA, /** Specify a 14 mA drive. */
  23419. WMI_GPIO_16MA, /** Specify a 16 mA drive. */
  23420. };
  23421. enum wmi_tlmm_gpio_config {
  23422. WMI_TLMM_GPIO_DISABLE, /** Use the internal inactive configuration. */
  23423. WMI_TLMM_GPIO_ENABLE, /** Use the configuration passed as parameter. */
  23424. };
  23425. enum {
  23426. WMI_GPIO_INTTYPE_DISABLE,
  23427. WMI_GPIO_INTTYPE_RISING_EDGE,
  23428. WMI_GPIO_INTTYPE_FALLING_EDGE,
  23429. WMI_GPIO_INTTYPE_BOTH_EDGE,
  23430. WMI_GPIO_INTTYPE_LEVEL_LOW,
  23431. WMI_GPIO_INTTYPE_LEVEL_HIGH
  23432. };
  23433. typedef struct {
  23434. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
  23435. A_UINT32 gpio_num; /* GPIO number to be setup */
  23436. A_UINT32 input; /* 0 - Output/ 1 - Input */
  23437. A_UINT32 pull_type; /* Pull type defined above */
  23438. A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
  23439. /* mux_config_val - configure pin MUX
  23440. * A value of 0x0 for this field means to use the default MUX configuration.
  23441. * Valid non-zero values are as follows:
  23442. * Rome:
  23443. * 0x4 - use the pin as GPIO (rather than UART)
  23444. */
  23445. A_UINT32 mux_config_val;
  23446. /*
  23447. * The drive strength to use in the configuration of a GPIO.
  23448. * Refer to the wmi_gpio_drive_strength enum.
  23449. */
  23450. A_UINT32 drive;
  23451. /*
  23452. * Use the internal inactive configuration or configuration passed
  23453. * as parameter.
  23454. * Refer to the wmi_tlmm_gpio_config enum.
  23455. */
  23456. A_UINT32 init_enable;
  23457. } wmi_gpio_config_cmd_fixed_param;
  23458. /* WMI_GPIO_OUTPUT_CMDID */
  23459. typedef struct {
  23460. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
  23461. A_UINT32 gpio_num; /* GPIO number to be setup */
  23462. A_UINT32 set; /* Set the GPIO pin*/
  23463. } wmi_gpio_output_cmd_fixed_param;
  23464. /* WMI_GPIO_STATE_REQ_CMDID */
  23465. typedef struct {
  23466. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_state_req_cmd_fixed_param */
  23467. A_UINT32 gpio_num; /* GPIO number to get state */
  23468. } wmi_gpio_state_req_cmd_fixed_param;
  23469. /* WMI_GPIO_INPUT_EVENTID */
  23470. typedef struct {
  23471. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
  23472. A_UINT32 gpio_num; /* GPIO number which changed state */
  23473. } wmi_gpio_input_event_fixed_param;
  23474. typedef enum {
  23475. /**
  23476. * The following wmi_gpio_state_type is mutually exclusive.
  23477. * 0: gpio_invalid_state
  23478. * 1: gpio_state is LO
  23479. * 2: gpio_state is HIGH
  23480. */
  23481. WMI_GPIO_STATE_INVALID, /* GPIO state is invalid. */
  23482. WMI_GPIO_STATE_LOW, /* GPIO state is low. */
  23483. WMI_GPIO_STATE_HIGH, /* GPIO state is high. */
  23484. } WMI_GPIO_STATE_TYPE;
  23485. /* WMI_GPIO_STATE_RES_EVENTID */
  23486. typedef struct {
  23487. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_state_res_event_fixed_param */
  23488. A_UINT32 gpio_num; /* GPIO number */
  23489. A_UINT32 gpio_state; /* state of GPIO pin defined in WMI_GPIO_STATE_TYPE 0 invalid 1 - LO, 2 -HI*/
  23490. } wmi_gpio_state_res_event_fixed_param;
  23491. /* WMI_ANT_CONTROLLER_CMDID */
  23492. typedef struct {
  23493. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ant_controller_cmd_fixed_param */
  23494. A_UINT32 ant_controller_enable;
  23495. } wmi_ant_controller_cmd_fixed_param;
  23496. /* WMI_P2P_DISC_EVENTID */
  23497. enum {
  23498. P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
  23499. P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
  23500. };
  23501. enum {
  23502. P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload*/
  23503. P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload*/
  23504. P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload*/
  23505. };
  23506. enum {
  23507. P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
  23508. P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
  23509. };
  23510. typedef struct {
  23511. A_UINT32 vdev_id;
  23512. A_UINT32 reason; /* P2P DISC wake up reason*/
  23513. } wmi_p2p_disc_event;
  23514. typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param WOW_EVENT_INFO_SECTION_GTKIGTK;
  23515. typedef enum {
  23516. WMI_FAKE_TXBFER_SEND_NDPA,
  23517. WMI_FAKE_TXBFER_SEND_MU,
  23518. WMI_FAKE_TXBFER_NDPA_FBTYPE,
  23519. WMI_FAKE_TXBFER_NDPA_NCIDX,
  23520. WMI_FAKE_TXBFER_NDPA_POLL,
  23521. WMI_FAKE_TXBFER_NDPA_BW,
  23522. WMI_FAKE_TXBFER_NDPA_PREAMBLE,
  23523. WMI_FAKE_TXBFER_NDPA_RATE,
  23524. WMI_FAKE_TXBFER_NDP_BW,
  23525. WMI_FAKE_TXBFER_NDP_NSS,
  23526. WMI_TXBFEE_ENABLE_UPLOAD_H,
  23527. WMI_TXBFEE_ENABLE_CAPTURE_H,
  23528. WMI_TXBFEE_SET_CBF_TBL,
  23529. WMI_TXBFEE_CBF_TBL_LSIG,
  23530. WMI_TXBFEE_CBF_TBL_SIGA1,
  23531. WMI_TXBFEE_CBF_TBL_SIGA2,
  23532. WMI_TXBFEE_CBF_TBL_SIGB,
  23533. WMI_TXBFEE_CBF_TBL_PAD,
  23534. WMI_TXBFEE_CBF_TBL_DUR,
  23535. WMI_TXBFEE_SU_NCIDX,
  23536. WMI_TXBFEE_CBIDX,
  23537. WMI_TXBFEE_NGIDX,
  23538. } WMI_TXBF_PARAM_ID;
  23539. typedef struct {
  23540. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
  23541. /** parameter id */
  23542. A_UINT32 param_id;
  23543. /** parameter value */
  23544. A_UINT32 param_value;
  23545. } wmi_txbf_cmd_fixed_param;
  23546. typedef struct {
  23547. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
  23548. A_UINT32 h_length;
  23549. A_UINT32 cv_length;
  23550. /* This TLV is followed by array of bytes:
  23551. * A_UINT8 bufp[]; <-- h_cv info buffer
  23552. */
  23553. } wmi_upload_h_hdr;
  23554. typedef struct {
  23555. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
  23556. A_UINT32 svd_num;
  23557. A_UINT32 tone_num;
  23558. A_UINT32 reserved;
  23559. } wmi_capture_h_event_hdr;
  23560. typedef struct {
  23561. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
  23562. A_UINT32 start_freq; /* start frequency, not channel center freq */
  23563. A_UINT32 end_freq; /* end frequency */
  23564. } wmi_avoid_freq_range_desc;
  23565. typedef struct {
  23566. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
  23567. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  23568. A_UINT32 num_freq_ranges;
  23569. /* The TLVs will follow.
  23570. * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
  23571. * wmi_avoid_freq_range_desc avd_freq_range[]; <-- message buffer, NULL terminated
  23572. */
  23573. } wmi_avoid_freq_ranges_event_fixed_param;
  23574. enum {
  23575. WMI_SAR2_SUCCESS = 0,
  23576. WMI_SAR2_INVALID_ANTENNA_INDEX = 1,
  23577. WMI_SAR2_INVALID_TABLE_INDEX = 2,
  23578. WMI_SAR2_STATE_ERROR = 4,
  23579. WMI_SAR2_BDF_NO_TABLE = 8,
  23580. };
  23581. typedef struct {
  23582. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param */
  23583. A_UINT32 result; /* refer to the above WMI_SAR2_ result definitions */
  23584. } wmi_sar2_result_event_fixed_param;
  23585. typedef struct {
  23586. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
  23587. /** Reserved for future use */
  23588. A_UINT32 reserved0;
  23589. A_UINT32 vdev_id;
  23590. } wmi_gtk_rekey_fail_event_fixed_param;
  23591. typedef enum WLAN_COEX_EVENT {
  23592. WLAN_COEX_EVENT_BT_NONE = 0,
  23593. WLAN_COEX_EVENT_BT_A2DP_PROFILE_ADD = 1,
  23594. WLAN_COEX_EVENT_BT_A2DP_PROFILE_REMOVE = 2,
  23595. WLAN_COEX_EVENT_BT_VOICE_PROFILE_ADD = 3,
  23596. WLAN_COEX_EVENT_BT_VOICE_PROFILE_REMOVE = 4,
  23597. WLAN_COEX_EVENT_BT_SCAN_START = 5,
  23598. WLAN_COEX_EVENT_BT_SCAN_STOP = 6,
  23599. WLAN_COEX_EVENT_BT_PROFILE_CONNECTED = 7,
  23600. WLAN_COEX_EVENT_BT_PROFILE_DISCONNECTED = 8,
  23601. } WLAN_COEX_EVENT;
  23602. typedef struct {
  23603. A_UINT32 tlv_header;
  23604. A_UINT32 coex_profile_evt; //uses the enum values from WLAN_COEX_EVENT
  23605. } wmi_coex_bt_activity_event_fixed_param;
  23606. enum wmm_ac_downgrade_policy {
  23607. WMM_AC_DOWNGRADE_DEPRIO,
  23608. WMM_AC_DOWNGRADE_DROP,
  23609. WMM_AC_DOWNGRADE_INVALID,
  23610. };
  23611. /* WMM EDCA Params type */
  23612. #define WMM_PARAM_TYPE_LEGACY 0
  23613. /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
  23614. #define WMM_PARAM_TYPE_11AX_EDCA 1
  23615. typedef struct {
  23616. A_UINT32 tlv_header;
  23617. A_UINT32 cwmin;
  23618. A_UINT32 cwmax;
  23619. A_UINT32 aifs;
  23620. union {
  23621. A_UINT32 txoplimit;
  23622. A_UINT32 mu_edca_timer;
  23623. };
  23624. A_UINT32 acm;
  23625. A_UINT32 no_ack;
  23626. } wmi_wmm_vparams;
  23627. typedef struct {
  23628. A_UINT32 tlv_header;
  23629. A_UINT32 vdev_id;
  23630. wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
  23631. A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
  23632. } wmi_vdev_set_wmm_params_cmd_fixed_param;
  23633. typedef struct {
  23634. A_UINT32 tlv_header;
  23635. A_UINT32 vdev_id;
  23636. A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
  23637. A_UINT32 userGtxMask; /* host request for GTX mask */
  23638. A_UINT32 gtxPERThreshold; /* default: 10% */
  23639. A_UINT32 gtxPERMargin; /* default: 2% */
  23640. A_UINT32 gtxTPCstep; /* default: 1 */
  23641. A_UINT32 gtxTPCMin; /* default: 5 */
  23642. A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
  23643. } wmi_vdev_set_gtx_params_cmd_fixed_param;
  23644. typedef struct
  23645. {
  23646. A_UINT32 tlv_header;
  23647. A_UINT32 vdev_id;
  23648. A_UINT32 ac;
  23649. A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
  23650. A_UINT32 downgrade_type;
  23651. } wmi_vdev_wmm_addts_cmd_fixed_param;
  23652. typedef struct
  23653. {
  23654. A_UINT32 tlv_header;
  23655. A_UINT32 vdev_id;
  23656. A_UINT32 ac;
  23657. } wmi_vdev_wmm_delts_cmd_fixed_param;
  23658. /* DEPRECATED */
  23659. typedef struct {
  23660. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
  23661. /** Reserved for future use */
  23662. A_UINT32 reserved0;
  23663. } wmi_pdev_dfs_enable_cmd_fixed_param;
  23664. /* DEPRECATED */
  23665. typedef struct {
  23666. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
  23667. /** pdev_id for identifying the MAC
  23668. * See macros starting with WMI_PDEV_ID_ for values.
  23669. */
  23670. A_UINT32 pdev_id;
  23671. } wmi_pdev_dfs_disable_cmd_fixed_param;
  23672. typedef struct {
  23673. /** TLV tag and len; tag equals
  23674. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
  23675. */
  23676. A_UINT32 tlv_header;
  23677. /** pdev_id for identifying the MAC
  23678. * See macros starting with WMI_PDEV_ID_ for values.
  23679. */
  23680. A_UINT32 pdev_id;
  23681. } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
  23682. typedef struct {
  23683. /** TLV tag and len; tag equals
  23684. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
  23685. */
  23686. A_UINT32 tlv_header;
  23687. /** pdev_id for identifying the MAC
  23688. * See macros starting with WMI_PDEV_ID_ for values.
  23689. */
  23690. A_UINT32 pdev_id;
  23691. } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
  23692. typedef struct {
  23693. A_UINT32 tlv_header;
  23694. A_UINT32 pdev_id;
  23695. } wmi_pdev_dfs_phyerr_offload_enable_cmd_fixed_param;
  23696. typedef struct {
  23697. A_UINT32 tlv_header;
  23698. A_UINT32 pdev_id;
  23699. } wmi_pdev_dfs_phyerr_offload_disable_cmd_fixed_param;
  23700. typedef enum {
  23701. QUICK_OCAC = 0,
  23702. EXTENSIVE_OCAC,
  23703. QUICK_RCAC,
  23704. } WMI_ADFS_OCAC_MODE;
  23705. typedef struct {
  23706. A_UINT32 tlv_header;
  23707. A_UINT32 vdev_id;
  23708. A_UINT32 ocac_mode; /* WMI_ADFS_OCAC_MODE */
  23709. A_UINT32 min_duration_ms; /* in milliseconds */
  23710. A_UINT32 max_duration_ms; /* in milliseconds */
  23711. A_UINT32 chan_freq; /* in MHz */
  23712. A_UINT32 chan_width; /* in MHz */
  23713. /*
  23714. * Two center frequencies are required since agile channel switch
  23715. * has to support 160/165 MHz for products like Pine.
  23716. * For agile which supports only up to 80MHz (HK),
  23717. * freq2 will be 0 and ignored.
  23718. */
  23719. union {
  23720. A_UINT32 center_freq; /* in MHz */ /* old name */
  23721. A_UINT32 center_freq1; /* in MHz */ /* new name */
  23722. };
  23723. A_UINT32 center_freq2; /* in MHz */
  23724. } wmi_vdev_adfs_ch_cfg_cmd_fixed_param;
  23725. typedef struct {
  23726. A_UINT32 tlv_header;
  23727. A_UINT32 vdev_id;
  23728. } wmi_vdev_adfs_ocac_abort_cmd_fixed_param;
  23729. typedef enum {
  23730. IN_SERVICE_MODE = 0,
  23731. OCAC_MODE,
  23732. } WMI_DFS_RADAR_DETECTION_MODE;
  23733. typedef struct {
  23734. A_UINT32 tlv_header;
  23735. A_UINT32 pdev_id;
  23736. /* In-service mode or O-CAC mode */
  23737. A_UINT32 detection_mode; /* WMI_DFS_RADAR_DETECTION_MODE */
  23738. A_UINT32 chan_freq; /* in MHz */
  23739. A_UINT32 chan_width; /* in MHz */
  23740. A_UINT32 detector_id;
  23741. A_UINT32 segment_id;
  23742. A_UINT32 timestamp;
  23743. A_UINT32 is_chirp;
  23744. A_INT32 freq_offset; /* in MHz */
  23745. A_INT32 sidx; /* segment index (where was the radar within the channel) */
  23746. } wmi_pdev_dfs_radar_detection_event_fixed_param;
  23747. typedef struct {
  23748. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_RADAR_FLAGS */
  23749. /*
  23750. * Bit 0:
  23751. * 0 - need check sub channel marking
  23752. * 1 - full bandwidth need put to NOL
  23753. * Refer to WMI_RADAR_FLAGS_FULL_BW_NOL_GET and _SET macros
  23754. * [1:31] reserved
  23755. */
  23756. A_UINT32 flags;
  23757. } WMI_RADAR_FLAGS;
  23758. #define WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS 0
  23759. #define WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS 1
  23760. #define WMI_RADAR_FLAGS_FULL_BW_NOL_GET(flag) \
  23761. WMI_GET_BITS(flag, \
  23762. WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS, \
  23763. WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS)
  23764. #define WMI_RADAR_FLAGS_FULL_BW_NOL_SET(flag, val) \
  23765. WMI_SET_BITS(flag, \
  23766. WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS, \
  23767. WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS, val)
  23768. typedef enum {
  23769. OCAC_COMPLETE = 0,
  23770. OCAC_ABORT,
  23771. } WMI_VDEV_OCAC_COMPLETE_STATUS;
  23772. typedef struct {
  23773. A_UINT32 tlv_header;
  23774. A_UINT32 vdev_id;
  23775. A_UINT32 chan_freq; /* in MHz */
  23776. A_UINT32 chan_width; /* in MHz */
  23777. /*
  23778. * Two center frequencies are required since agile channel switch
  23779. * has to support 160/165 MHz for products like Pine.
  23780. * For agile which supports only up to 80MHz (HK),
  23781. * freq2 will be 0 and ignored.
  23782. */
  23783. union {
  23784. A_UINT32 center_freq; /* in MHz */ /* old name */
  23785. A_UINT32 center_freq1; /* in MHz */ /* new name */
  23786. };
  23787. A_UINT32 status; /* WMI_VDEV_OCAC_COMPLETE_STATUS */
  23788. A_UINT32 center_freq2; /* in MHz */
  23789. } wmi_vdev_adfs_ocac_complete_event_fixed_param;
  23790. typedef struct {
  23791. A_UINT32 tlv_header;
  23792. A_UINT32 vdev_id;
  23793. } wmi_vdev_dfs_cac_complete_event_fixed_param;
  23794. /** TDLS COMMANDS */
  23795. /* WMI_TDLS_SET_STATE_CMDID */
  23796. /* TDLS State */
  23797. enum wmi_tdls_state {
  23798. /** TDLS disable */
  23799. WMI_TDLS_DISABLE,
  23800. /** TDLS enabled - no firmware connection tracking/notifications */
  23801. WMI_TDLS_ENABLE_PASSIVE,
  23802. /** TDLS enabled - with firmware connection tracking/notifications */
  23803. WMI_TDLS_ENABLE_ACTIVE,
  23804. /** TDLS enabled - firmware waits for peer mac for connection tracking */
  23805. WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
  23806. /** TDLS enabled - TDLS connection tracking is done in host */
  23807. WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
  23808. };
  23809. /* TDLS Options */
  23810. #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
  23811. #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
  23812. #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
  23813. typedef struct {
  23814. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
  23815. A_UINT32 tlv_header;
  23816. /** unique id identifying the VDEV */
  23817. A_UINT32 vdev_id;
  23818. /** Enable/Disable TDLS (wmi_tdls_state) */
  23819. A_UINT32 state;
  23820. /** Duration (in ms) over which to calculate tx/rx threshold to trigger TDLS Discovery */
  23821. A_UINT32 notification_interval_ms;
  23822. /** number of packets OVER which notify/suggest TDLS Discovery:
  23823. * if current tx pps counter / notification interval >= threshold
  23824. * then a notification will be sent to host to advise TDLS Discovery */
  23825. A_UINT32 tx_discovery_threshold;
  23826. /** number of packets UNDER which notify/suggest TDLS Teardown:
  23827. * if current tx pps counter / notification interval < threshold
  23828. * then a notification will be sent to host to advise TDLS Tear down */
  23829. A_UINT32 tx_teardown_threshold;
  23830. /** Absolute RSSI value under which notify/suggest TDLS Teardown */
  23831. A_INT32 rssi_teardown_threshold;
  23832. /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
  23833. A_INT32 rssi_delta;
  23834. /** TDLS Option Control
  23835. * Off-Channel, Buffer STA, (later)Sleep STA support */
  23836. A_UINT32 tdls_options;
  23837. /* Buffering time in number of beacon intervals */
  23838. A_UINT32 tdls_peer_traffic_ind_window;
  23839. /* Wait time for PTR frame */
  23840. A_UINT32 tdls_peer_traffic_response_timeout_ms;
  23841. /* Self PUAPSD mask */
  23842. A_UINT32 tdls_puapsd_mask;
  23843. /* Inactivity timeout */
  23844. A_UINT32 tdls_puapsd_inactivity_time_ms;
  23845. /* Max of rx frame during SP */
  23846. A_UINT32 tdls_puapsd_rx_frame_threshold;
  23847. /**Duration (in ms) over which to check whether TDLS link needs to be torn down */
  23848. A_UINT32 teardown_notification_ms;
  23849. /** STA kickout threshold for TDLS peer */
  23850. A_UINT32 tdls_peer_kickout_threshold;
  23851. /* TDLS discovery WAKE timeout in ms.
  23852. * DUT will wake until this timeout to receive TDLS discovery response
  23853. * from peer.
  23854. * If tdls_discovery_wake_timeout is 0x0, the DUT will choose autonomously
  23855. * what wake timeout value to use.
  23856. */
  23857. A_UINT32 tdls_discovery_wake_timeout;
  23858. } wmi_tdls_set_state_cmd_fixed_param;
  23859. /* WMI_TDLS_PEER_UPDATE_CMDID */
  23860. enum wmi_tdls_peer_state {
  23861. /** tx peer TDLS link setup now starting, traffic to DA should be
  23862. * paused (except TDLS frames) until state is moved to CONNECTED (or
  23863. * TEARDOWN on setup failure) */
  23864. WMI_TDLS_PEER_STATE_PEERING,
  23865. /** tx peer TDLS link established, running (all traffic to DA unpaused) */
  23866. WMI_TDLS_PEER_STATE_CONNECTED,
  23867. /** tx peer TDLS link tear down started (link paused, any frames
  23868. * queued for DA will be requeued back through the AP)*/
  23869. WMI_TDLS_PEER_STATE_TEARDOWN,
  23870. /** Add peer mac into connection table */
  23871. WMI_TDLS_PEER_ADD_MAC_ADDR,
  23872. /** Remove peer mac from connection table */
  23873. WMI_TDLS_PEER_REMOVE_MAC_ADDR,
  23874. };
  23875. /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
  23876. #define WMI_TDLS_MAX_SUPP_CHANNELS 128
  23877. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  23878. typedef struct {
  23879. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
  23880. A_UINT32 tlv_header;
  23881. /* Peer's QoS Info - for U-APSD */
  23882. /* AC FLAGS - accessed through macros below */
  23883. /* Ack, SP, More Data Ack - accessed through macros below */
  23884. A_UINT32 peer_qos;
  23885. /*TDLS Peer's U-APSD Buffer STA Support*/
  23886. A_UINT32 buff_sta_support;
  23887. /*TDLS off channel related params */
  23888. A_UINT32 off_chan_support;
  23889. A_UINT32 peer_curr_operclass;
  23890. A_UINT32 self_curr_operclass;
  23891. /* Number of channels available for off channel operation */
  23892. A_UINT32 peer_chan_len;
  23893. A_UINT32 peer_operclass_len;
  23894. A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  23895. /* Is peer initiator or responder of TDLS setup request */
  23896. A_UINT32 is_peer_responder;
  23897. /* Preferred off channel number as configured by user */
  23898. A_UINT32 pref_offchan_num;
  23899. /* Preferred off channel bandwidth as configured by user */
  23900. A_UINT32 pref_offchan_bw;
  23901. /* Preferred off channel frequency in MHz as configured by user */
  23902. A_UINT32 pref_offchan_freq;
  23903. /** Followed by the variable length TLV peer_chan_list:
  23904. * wmi_channel peer_chan_list[].
  23905. * Array size would be peer_chan_len.
  23906. * This array is intersected channels which is supported by both peer
  23907. * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
  23908. * FW shall compute BW for an offchan based on peer's ht/vht cap
  23909. * received in peer_assoc cmd during change STA operation
  23910. */
  23911. } wmi_tdls_peer_capabilities;
  23912. #define WMI_TDLS_QOS_VO_FLAG 0
  23913. #define WMI_TDLS_QOS_VI_FLAG 1
  23914. #define WMI_TDLS_QOS_BK_FLAG 2
  23915. #define WMI_TDLS_QOS_BE_FLAG 3
  23916. #define WMI_TDLS_QOS_ACK_FLAG 4
  23917. #define WMI_TDLS_QOS_SP_FLAG 5
  23918. #define WMI_TDLS_QOS_MOREDATA_FLAG 7
  23919. #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \
  23920. (ppeer_caps)->peer_qos |= (1 << flag); \
  23921. } while (0)
  23922. #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag) \
  23923. (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
  23924. #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  23925. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  23926. #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  23927. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  23928. #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  23929. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  23930. #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  23931. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  23932. #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  23933. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  23934. #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  23935. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  23936. #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  23937. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  23938. #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  23939. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  23940. #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  23941. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  23942. #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  23943. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  23944. /* SP has 2 bits */
  23945. #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \
  23946. (ppeer_caps)->peer_qos |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  23947. } while (0)
  23948. #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
  23949. (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  23950. #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  23951. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  23952. #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  23953. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  23954. #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \
  23955. (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
  23956. } while (0)
  23957. #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag) \
  23958. (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
  23959. #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  23960. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  23961. #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  23962. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  23963. #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  23964. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  23965. #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  23966. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  23967. #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
  23968. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  23969. #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
  23970. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  23971. #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  23972. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  23973. #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  23974. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  23975. #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  23976. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  23977. #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  23978. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  23979. /* SP has 2 bits */
  23980. #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \
  23981. (pset_cmd)->tdls_puapsd_mask |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  23982. } while (0)
  23983. #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
  23984. (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  23985. #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  23986. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  23987. #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  23988. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  23989. typedef struct {
  23990. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
  23991. A_UINT32 tlv_header;
  23992. /** unique id identifying the VDEV */
  23993. A_UINT32 vdev_id;
  23994. /** peer MAC address */
  23995. wmi_mac_addr peer_macaddr;
  23996. /** new TDLS state for peer (wmi_tdls_peer_state) */
  23997. A_UINT32 peer_state;
  23998. /* The TLV for wmi_tdls_peer_capabilities will follow.
  23999. * wmi_tdls_peer_capabilities peer_caps;
  24000. */
  24001. /** Followed by the variable length TLV chan_info:
  24002. * wmi_channel chan_info[] */
  24003. } wmi_tdls_peer_update_cmd_fixed_param;
  24004. /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
  24005. /* bitmap 20, 40, 80 or 160 MHz wide channel */
  24006. #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
  24007. #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
  24008. #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
  24009. #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
  24010. enum wmi_tdls_offchan_mode {
  24011. WMI_TDLS_ENABLE_OFFCHANNEL,
  24012. WMI_TDLS_DISABLE_OFFCHANNEL, /* passive offchannel disable */
  24013. WMI_TDLS_ACTIVE_DISABLE_OFFCHANNEL,
  24014. };
  24015. typedef struct {
  24016. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
  24017. A_UINT32 tlv_header;
  24018. /** unique id identifying the VDEV */
  24019. A_UINT32 vdev_id;
  24020. /** Enable/Disable TDLS offchannel */
  24021. A_UINT32 offchan_mode;
  24022. /** peer MAC address */
  24023. wmi_mac_addr peer_macaddr;
  24024. /* Is peer initiator or responder of TDLS setup request */
  24025. A_UINT32 is_peer_responder;
  24026. /* off channel number*/
  24027. A_UINT32 offchan_num;
  24028. /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
  24029. A_UINT32 offchan_bw_bitmap;
  24030. /* operating class for offchan */
  24031. A_UINT32 offchan_oper_class;
  24032. /* off channel frequency in MHz */
  24033. A_UINT32 offchan_freq;
  24034. /** This fixed_param TLV is followed by the below additional TLVs:
  24035. * - wmi_channel peer_chan_info[]: optional per-peer chan_info
  24036. */
  24037. } wmi_tdls_set_offchan_mode_cmd_fixed_param;
  24038. /** TDLS EVENTS */
  24039. enum wmi_tdls_peer_notification {
  24040. /** tdls discovery recommended for peer (based
  24041. * on tx bytes per second > tx_discover threshold) */
  24042. WMI_TDLS_SHOULD_DISCOVER,
  24043. /** tdls link tear down recommended for peer
  24044. * due to tx bytes per second below tx_teardown_threshold
  24045. * NB: this notification sent once */
  24046. WMI_TDLS_SHOULD_TEARDOWN,
  24047. /** tx peer TDLS link tear down complete */
  24048. WMI_TDLS_PEER_DISCONNECTED,
  24049. /** TDLS/BT role change notification for connection tracker */
  24050. WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
  24051. };
  24052. enum wmi_tdls_peer_reason {
  24053. /** tdls teardown recommended due to low transmits */
  24054. WMI_TDLS_TEARDOWN_REASON_TX,
  24055. /** tdls link tear down recommended due to poor RSSI */
  24056. WMI_TDLS_TEARDOWN_REASON_RSSI,
  24057. /** tdls link tear down recommended due to offchannel scan */
  24058. WMI_TDLS_TEARDOWN_REASON_SCAN,
  24059. /** tdls peer disconnected due to peer deletion */
  24060. WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
  24061. /** tdls peer disconnected due to PTR timeout */
  24062. WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
  24063. /** tdls peer disconnected due wrong PTR format */
  24064. WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
  24065. /** tdls peer not responding */
  24066. WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
  24067. /** tdls entered buffer STA role, TDLS connection tracker needs to handle this */
  24068. WMI_TDLS_ENTER_BUF_STA,
  24069. /** tdls exited buffer STA role, TDLS connection tracker needs to handle this */
  24070. WMI_TDLS_EXIT_BUF_STA,
  24071. /** BT entered busy mode, TDLS connection tracker needs to handle this */
  24072. WMI_TDLS_ENTER_BT_BUSY_MODE,
  24073. /** BT exited busy mode, TDLS connection tracker needs to handle this */
  24074. WMI_TDLS_EXIT_BT_BUSY_MODE,
  24075. /** TDLS module received a scan start event, TDLS connection tracker needs to handle this */
  24076. WMI_TDLS_SCAN_STARTED_EVENT,
  24077. /** TDLS module received a scan complete event, TDLS connection tracker needs to handle this */
  24078. WMI_TDLS_SCAN_COMPLETED_EVENT,
  24079. };
  24080. /* WMI_TDLS_PEER_EVENTID */
  24081. typedef struct {
  24082. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
  24083. A_UINT32 tlv_header;
  24084. /** peer MAC address */
  24085. wmi_mac_addr peer_macaddr;
  24086. /** TDLS peer status (wmi_tdls_peer_notification)*/
  24087. A_UINT32 peer_status;
  24088. /** TDLS peer reason (wmi_tdls_peer_reason) */
  24089. A_UINT32 peer_reason;
  24090. /** unique id identifying the VDEV */
  24091. A_UINT32 vdev_id;
  24092. } wmi_tdls_peer_event_fixed_param;
  24093. /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
  24094. don't use this for any new implementations */
  24095. typedef struct {
  24096. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
  24097. /** unique id identifying the VDEV, generated by the caller */
  24098. A_UINT32 vdev_id;
  24099. /* New beacon interval to be used for the specified VDEV suggested by firmware */
  24100. A_UINT32 new_bcn_intvl;
  24101. } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
  24102. /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
  24103. typedef struct {
  24104. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
  24105. A_UINT32 tlv_header;
  24106. /** 1: enable fw based adaptive ocs,
  24107. * 0: disable fw based adaptive ocs
  24108. */
  24109. A_UINT32 enable;
  24110. /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
  24111. union {
  24112. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  24113. /** pdev_id for identifying the MAC
  24114. * See macros starting with WMI_PDEV_ID_ for values.
  24115. */
  24116. A_UINT32 pdev_id;
  24117. };
  24118. } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
  24119. /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
  24120. typedef struct {
  24121. /* Frequency of the channel for which the quota is set */
  24122. A_UINT32 chan_mhz;
  24123. /* Requested channel time quota expressed as percentage */
  24124. A_UINT32 channel_time_quota;
  24125. } wmi_resmgr_chan_time_quota;
  24126. typedef struct {
  24127. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_chan_time_quota_tlv */
  24128. A_UINT32 tlv_header;
  24129. wmi_resmgr_chan_time_quota chan_time_quota;
  24130. } wmi_resmgr_chan_time_quota_tlv;
  24131. typedef struct {
  24132. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
  24133. A_UINT32 tlv_header;
  24134. /** number of channel time quota command structures
  24135. * (wmi_resmgr_chan_time_quota) 1 or 2
  24136. */
  24137. A_UINT32 num_chans;
  24138. /* This TLV is followed by another TLV of array of bytes
  24139. * A_UINT8 data[];
  24140. * This data array contains
  24141. * num_chans * size of(struct wmi_resmgr_chan_time_quota)
  24142. */
  24143. } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
  24144. typedef enum {
  24145. WMI_RESMGR_QUOTA_TYPE_CLEAR = 0,
  24146. WMI_RESMGR_QUOTA_TYPE_FIXED = 1,
  24147. WMI_RESMGR_QUOTA_TYPE_DYNAMIC = 2,
  24148. } wmi_resmgr_quota_type;
  24149. typedef struct {
  24150. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_chan_time_quota_changed_event_fixed_param */
  24151. A_UINT32 tlv_header;
  24152. /** quota_type: refer to wmi_resmgr_quota_type
  24153. * 0 : clear quota
  24154. * 1 : fixed quota
  24155. * 2 : dynamic quota
  24156. */
  24157. A_UINT32 quota_type;
  24158. /* This TLV is followed by another TLV of array of struct
  24159. * wmi_resmgr_chan_time_quota_tlv chan_quota[num_chans];
  24160. */
  24161. } wmi_resmgr_chan_time_quota_changed_event_fixed_param;
  24162. /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
  24163. typedef struct {
  24164. /* Frequency of the channel for which the latency is set */
  24165. A_UINT32 chan_mhz;
  24166. /* Requested channel latency in milliseconds */
  24167. A_UINT32 latency;
  24168. } wmi_resmgr_chan_latency;
  24169. typedef struct {
  24170. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
  24171. A_UINT32 tlv_header;
  24172. /** number of channel latency command structures
  24173. * (wmi_resmgr_chan_latency) 1 or 2
  24174. */
  24175. A_UINT32 num_chans;
  24176. /* This TLV is followed by another TLV of array of bytes
  24177. * A_UINT8 data[];
  24178. * This data array contains
  24179. * num_chans * size of(struct wmi_resmgr_chan_latency)
  24180. */
  24181. } wmi_resmgr_set_chan_latency_cmd_fixed_param;
  24182. /* WMI_STA_SMPS_FORCE_MODE_CMDID */
  24183. /** STA SMPS Forced Mode */
  24184. typedef enum {
  24185. WMI_SMPS_FORCED_MODE_NONE = 0,
  24186. WMI_SMPS_FORCED_MODE_DISABLED,
  24187. WMI_SMPS_FORCED_MODE_STATIC,
  24188. WMI_SMPS_FORCED_MODE_DYNAMIC
  24189. } wmi_sta_smps_forced_mode;
  24190. typedef struct {
  24191. /** TLV tag and len; tag equals
  24192. * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
  24193. A_UINT32 tlv_header;
  24194. /** Unique id identifying the VDEV */
  24195. A_UINT32 vdev_id;
  24196. /** The mode of SMPS that is to be forced in the FW. */
  24197. A_UINT32 forced_mode;
  24198. } wmi_sta_smps_force_mode_cmd_fixed_param;
  24199. /** wlan HB commands */
  24200. #define WMI_WLAN_HB_ITEM_UDP 0x1
  24201. #define WMI_WLAN_HB_ITEM_TCP 0x2
  24202. #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE,
  24203. must be a multiple of 4 bytes */
  24204. typedef struct {
  24205. /** TLV tag and len; tag equals
  24206. * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
  24207. A_UINT32 tlv_header; /** TLV header*/
  24208. A_UINT32 vdev_id; /** Vdev ID */
  24209. A_UINT32 enable; /** 1: Enable, 0: Disable`*/
  24210. A_UINT32 item; /** 1: UDP, 2: TCP */
  24211. A_UINT32 session; /** Session ID from HOST */
  24212. } wmi_hb_set_enable_cmd_fixed_param;
  24213. typedef struct {
  24214. /** TLV tag and len; tag equals
  24215. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
  24216. A_UINT32 tlv_header; /** TLV header*/
  24217. A_UINT32 vdev_id; /** Vdev ID */
  24218. A_UINT32 srv_ip; /** Server IP address (IPv4) */
  24219. A_UINT32 dev_ip; /** Device IP address (IPv4) */
  24220. A_UINT32 seq; /** TCP Sequence no */
  24221. A_UINT32 src_port; /** Source port */
  24222. A_UINT32 dst_port; /** Destination port */
  24223. A_UINT32 interval; /** Keep alive interval */
  24224. A_UINT32 timeout; /** Timeout if keep alive fails */
  24225. A_UINT32 session; /** Session ID from HOST */
  24226. wmi_mac_addr gateway_mac; /** Server Mac Address */
  24227. } wmi_hb_set_tcp_params_cmd_fixed_param;
  24228. typedef struct {
  24229. /** TLV tag and len; tag equals
  24230. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
  24231. A_UINT32 tlv_header;
  24232. A_UINT32 vdev_id;
  24233. A_UINT32 length;
  24234. A_UINT32 offset;
  24235. A_UINT32 session;
  24236. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  24237. } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
  24238. typedef struct {
  24239. /** TLV tag and len; tag equals
  24240. * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
  24241. A_UINT32 tlv_header;
  24242. A_UINT32 vdev_id;
  24243. A_UINT32 srv_ip;
  24244. A_UINT32 dev_ip;
  24245. A_UINT32 src_port;
  24246. A_UINT32 dst_port;
  24247. A_UINT32 interval;
  24248. A_UINT32 timeout;
  24249. A_UINT32 session;
  24250. wmi_mac_addr gateway_mac;
  24251. } wmi_hb_set_udp_params_cmd_fixed_param;
  24252. typedef struct {
  24253. /** TLV tag and len; tag equals
  24254. * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
  24255. A_UINT32 tlv_header;
  24256. A_UINT32 vdev_id;
  24257. A_UINT32 length;
  24258. A_UINT32 offset;
  24259. A_UINT32 session;
  24260. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  24261. } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
  24262. /** wlan HB events */
  24263. typedef enum {
  24264. WMI_WLAN_HB_REASON_UNKNOWN = 0,
  24265. WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
  24266. WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
  24267. } WMI_HB_WAKEUP_REASON;
  24268. typedef struct {
  24269. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
  24270. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  24271. A_UINT32 session; /** Session ID from HOST */
  24272. A_UINT32 reason; /** wakeup reason */
  24273. } wmi_hb_ind_event_fixed_param;
  24274. typedef struct {
  24275. /** TLV tag and len; tag equals
  24276. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  24277. A_UINT32 tlv_header; /** TLV Header */
  24278. A_UINT32 vdev_id; /** Vdev ID */
  24279. A_UINT32 session; /** Session number from the HOST */
  24280. A_UINT32 srv_ip; /** IPv4 address of the OCF server */
  24281. A_UINT32 dev_ip; /** IPv4 address of the device */
  24282. A_UINT32 tcp_tx_seq; /** TCP sequence number */
  24283. A_UINT32 src_port; /** Source port */
  24284. A_UINT32 dst_port; /** Destination port */
  24285. A_UINT32 protocol; /** Protocol used: TCP:0, UDP:1 */
  24286. 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 */
  24287. A_UINT32 timeout_retries; /** timeout[31:16]: TCP ACK timeout, time to wait for a TCP ACK in ms
  24288. retries[15:0]: Number of TCP level retries of OIC ping request */
  24289. wmi_mac_addr peer_macaddr; /** MAC address of the OCF server */
  24290. A_UINT32 oic_ping_pkt0; /** OIC ping packet content [Byte03:Byte00] */
  24291. A_UINT32 oic_ping_pkt1; /** OIC ping packet content [Byte07:Byte04] */
  24292. A_UINT32 oic_ping_pkt2; /** OIC ping packet content [Byte11:Byte08] */
  24293. A_UINT32 oic_ping_pkt3; /** OIC ping packet content [Byte15:Byte12] */
  24294. A_UINT32 tls_cipher_suite_version; /** Cipher suite [31:16] as defined in https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml
  24295. TLS version [15:00] */
  24296. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  24297. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  24298. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  24299. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  24300. A_UINT32 tls_tx_key0; /** client_write_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  24301. A_UINT32 tls_tx_key1; /** client_write_key[Byte07:Byte04] */
  24302. A_UINT32 tls_tx_key2; /** client_write_key[Byte11:Byte08] */
  24303. A_UINT32 tls_tx_key3; /** client_write_key[Byte15:Byte12] */
  24304. A_UINT32 tls_rx_key0; /** server_write_key[Byte03:Byte00] */
  24305. A_UINT32 tls_rx_key1; /** server_write_key[Byte07:Byte04] */
  24306. A_UINT32 tls_rx_key2; /** server_write_key[Byte11:Byte08] */
  24307. A_UINT32 tls_rx_key3; /** server_write_key[Byte15:Byte12] */
  24308. A_UINT32 tls_MAC_write_key0; /** client_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  24309. A_UINT32 tls_MAC_write_key1; /** client_write_MAC_key[Byte07:Byte04] */
  24310. A_UINT32 tls_MAC_write_key2; /** client_write_MAC_key[Byte11:Byte08] */
  24311. A_UINT32 tls_MAC_write_key3; /** client_write_MAC_key[Byte15:Byte12] */
  24312. A_UINT32 tls_MAC_write_key4; /** client_write_MAC_key[Byte19:Byte16] */
  24313. A_UINT32 tls_MAC_write_key5; /** client_write_MAC_key[Byte23:Byte20] */
  24314. A_UINT32 tls_MAC_write_key6; /** client_write_MAC_key[Byte27:Byte24] */
  24315. A_UINT32 tls_MAC_write_key7; /** client_write_MAC_key[Byte31:Byte28] */
  24316. A_UINT32 tls_MAC_read_key0; /** server_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  24317. A_UINT32 tls_MAC_read_key1; /** server_write_MAC_key[Byte07:Byte04] */
  24318. A_UINT32 tls_MAC_read_key2; /** server_write_MAC_key[Byte11:Byte08] */
  24319. A_UINT32 tls_MAC_read_key3; /** server_write_MAC_key[Byte15:Byte12] */
  24320. A_UINT32 tls_MAC_read_key4; /** server_write_MAC_key[Byte19:Byte16] */
  24321. A_UINT32 tls_MAC_read_key5; /** server_write_MAC_key[Byte23:Byte20] */
  24322. A_UINT32 tls_MAC_read_key6; /** server_write_MAC_key[Byte27:Byte24] */
  24323. A_UINT32 tls_MAC_read_key7; /** server_write_MAC_key[Byte31:Byte28] */
  24324. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  24325. GCM Mode: GCMNonce.salt [Byte03:Byte00] refer Section 3 of RFC 5288 */
  24326. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  24327. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  24328. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  24329. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  24330. GCM Mode: GCMNonce.salt [Byte4: Byte0] refer Section 3 of RFC 5288 */
  24331. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  24332. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  24333. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  24334. } wmi_oic_ping_offload_params_cmd_fixed_param;
  24335. typedef struct {
  24336. /** TLV tag and len; tag equals
  24337. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  24338. A_UINT32 tlv_header; /** TLV Header*/
  24339. A_UINT32 vdev_id; /** Interface number */
  24340. A_UINT32 session; /** Session ID*/
  24341. A_UINT32 enable; /** 1: Enable , 0: Disable */
  24342. } wmi_oic_ping_offload_set_enable_cmd_fixed_param;
  24343. /** wlan OIC events */
  24344. typedef enum {
  24345. WMI_WLAN_OIC_REASON_UNKNOWN = 0, /** Unknown */
  24346. WMI_WLAN_OIC_REASON_HOST_WAKE = 1, /** No error , but host is woken up due to other reasons */
  24347. WMI_WLAN_OIC_REASON_TCP_TIMEOUT = 2, /** TCP Timeout */
  24348. WMI_WLAN_OIC_REASON_PING_TIMEOUT = 3, /** OIC Ping resposnse timeout */
  24349. WMI_WLAN_OIC_REASON_TLS_ERROR = 4, /** TLS decryption error */
  24350. } WMI_OIC_WAKEUP_REASON;
  24351. typedef struct {
  24352. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oic_ind_event_fixed_param */
  24353. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  24354. A_UINT32 session; /** Session ID from driver */
  24355. A_UINT32 reason; /** wakeup reason as per WMI_OIC_WAKEUP_REASON */
  24356. A_UINT32 tcp_tx_seq; /** Current TCP sequence number */
  24357. A_UINT32 tcp_ack_num; /** Current TCP Acknowledgement number */
  24358. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  24359. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  24360. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  24361. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  24362. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  24363. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  24364. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  24365. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  24366. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  24367. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  24368. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  24369. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  24370. } wmi_oic_ping_handoff_event;
  24371. typedef struct {
  24372. /** TLV tag and len; tag equals
  24373. * WMITLV_TAG_STRUC_wmi_dhcp_lease_renew_offload_fixed_param */
  24374. A_UINT32 tlv_header; /** TLV Header*/
  24375. A_UINT32 vdev_id; /** Vdev ID */
  24376. A_UINT32 enable; /** 1: Enable 0: Disable*/
  24377. A_UINT32 srv_ip; /** DHCP Server IP address (IPv4) */
  24378. A_UINT32 client_ip; /** Device IP address (IPv4) */
  24379. wmi_mac_addr srv_mac; /** DHCP Server MAC address */
  24380. A_UINT32 parameter_list; /** Optional Parameter list. RFC 1533 gives the complete set of options defined for use with DHCP */
  24381. } wmi_dhcp_lease_renew_offload_cmd_fixed_param;
  24382. /** WLAN DHCP Lease Renew Events */
  24383. typedef enum {
  24384. WMI_WLAN_DHCP_RENEW_REASON_UNKNOWN = 0, /** Unknown */
  24385. WMI_WLAN_DHCP_RENEW_REASON_ACK_TIMEOUT = 1, /** DHCP ACK Timeout */
  24386. WMI_WLAN_DHCP_RENEW_REASON_NACK = 2, /** DHCP error */
  24387. } WMI_DHCP_RENEW_WAKEUP_REASON;
  24388. typedef struct {
  24389. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dhcp_renew_ind_event_fixed_param */
  24390. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  24391. A_UINT32 reason; /** wakeup reason as per enum WMI_DHCP_RENEW_WAKEUP_REASON*/
  24392. } wmi_dhcp_lease_renew_event;
  24393. /** WMI_STA_SMPS_PARAM_CMDID */
  24394. typedef enum {
  24395. /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
  24396. WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
  24397. /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
  24398. * to enter D-SMPS mode from Stalled-D-SMPS mode */
  24399. WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
  24400. /** RSSI threshold to disable SMPS modes */
  24401. WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
  24402. /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
  24403. WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
  24404. /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
  24405. WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
  24406. /** Enable/Disable DTIM 1chRx feature */
  24407. WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5,
  24408. /** Enable/Disable dynamic bw feature */
  24409. WMI_STA_SMPS_PARAM_DYNAMIC_BW_SWITCH = 6,
  24410. } wmi_sta_smps_param;
  24411. typedef struct {
  24412. /** TLV tag and len; tag equals
  24413. * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
  24414. A_UINT32 tlv_header;
  24415. /** Unique id identifying the VDEV */
  24416. A_UINT32 vdev_id;
  24417. /** SMPS parameter (see wmi_sta_smps_param) */
  24418. A_UINT32 param;
  24419. /** Value of SMPS parameter */
  24420. A_UINT32 value;
  24421. } wmi_sta_smps_param_cmd_fixed_param;
  24422. typedef struct {
  24423. /** TLV tag and len; tag equals
  24424. * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
  24425. A_UINT32 tlv_header;
  24426. /* TX stats */
  24427. A_UINT32 txBytesPushed;
  24428. A_UINT32 txPacketsPushed;
  24429. /* RX stats */
  24430. A_UINT32 rxBytesRcvd;
  24431. A_UINT32 rxPacketsRcvd;
  24432. A_UINT32 rxTimeTotal;
  24433. /** peer MAC address */
  24434. wmi_mac_addr peer_macaddr;
  24435. } wmi_mcc_sched_sta_traffic_stats;
  24436. typedef struct {
  24437. /** TLV tag and len; tag equals
  24438. * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
  24439. A_UINT32 tlv_header;
  24440. /** Duration over which the host stats were collected */
  24441. A_UINT32 duration;
  24442. /** Number of stations filled in following stats array */
  24443. A_UINT32 num_sta;
  24444. /* Following this struct are the TLVs:
  24445. * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
  24446. */
  24447. } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
  24448. typedef struct
  24449. {
  24450. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
  24451. /* unique id identifying the VDEV, generated by the caller */
  24452. A_UINT32 vdev_id;
  24453. /*Batch scan enable command parameters*/
  24454. A_UINT32 scanInterval;
  24455. A_UINT32 numScan2Batch;
  24456. A_UINT32 bestNetworks;
  24457. A_UINT32 rfBand;
  24458. A_UINT32 rtt;
  24459. } wmi_batch_scan_enable_cmd_fixed_param;
  24460. typedef struct
  24461. {
  24462. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
  24463. A_UINT32 supportedMscan;
  24464. } wmi_batch_scan_enabled_event_fixed_param;
  24465. typedef struct
  24466. {
  24467. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
  24468. /* unique id identifying the VDEV, generated by the caller */
  24469. A_UINT32 vdev_id;
  24470. A_UINT32 param;
  24471. } wmi_batch_scan_disable_cmd_fixed_param;
  24472. typedef struct
  24473. {
  24474. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
  24475. /** unique id identifying the VDEV, generated by the caller */
  24476. A_UINT32 vdev_id;
  24477. A_UINT32 param;
  24478. } wmi_batch_scan_trigger_result_cmd_fixed_param;
  24479. typedef struct
  24480. {
  24481. A_UINT32 tlv_header;
  24482. wmi_mac_addr bssid; /* BSSID */
  24483. wmi_ssid ssid; /* SSID */
  24484. A_UINT32 ch; /* Channel number */
  24485. A_UINT32 rssi; /* RSSI or Level */
  24486. /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
  24487. A_UINT32 timestamp;
  24488. A_UINT32 ch_freq; /* Channel frequency in MHz */
  24489. } wmi_batch_scan_result_network_info;
  24490. typedef struct
  24491. {
  24492. A_UINT32 tlv_header;
  24493. A_UINT32 scanId; /* Scan List ID. */
  24494. /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
  24495. A_UINT32 numNetworksInScanList;
  24496. A_UINT32 netWorkStartIndex; /* indicate the start index of network info*/
  24497. } wmi_batch_scan_result_scan_list;
  24498. #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. */
  24499. #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /* send true or false based on scan response frame being a Probe Rsp or not */
  24500. #define LPI_IE_BITMAP_SSID 0x00000004 /* send ssid from received scan response frame */
  24501. #define LPI_IE_BITMAP_RSSI 0x00000008 /* send RSSI value reported by HW for the received scan response after adjusting with noise floor */
  24502. #define LPI_IE_BITMAP_CHAN 0x00000010 /* send channel number from the received scan response */
  24503. #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* send Tx power from TPC IE of scan rsp */
  24504. #define LPI_IE_BITMAP_TX_RATE 0x00000040 /* send rate of the received frame as reported by HW. */
  24505. #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. */
  24506. #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /* send timestamp reported in the received scan rsp frame. */
  24507. #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. */
  24508. /*
  24509. * TEMPORARY alias of incorrect old name the correct name.
  24510. * This alias will be removed once all references to the old name have been fixed.
  24511. */
  24512. #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
  24513. #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false. */
  24514. #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP */
  24515. #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled */
  24516. #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device. */
  24517. #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel */
  24518. #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received. */
  24519. #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz */
  24520. #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above */
  24521. #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations */
  24522. #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan */
  24523. #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. */
  24524. #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 */
  24525. #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 */
  24526. #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. */
  24527. #define LPI_IE_BITMAP_CHRE_RADIO_CHAIN 0x01000000 /* include radio chain and RSSI per chain information if this bit is set - for CHRE */
  24528. #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 */
  24529. #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 */
  24530. /* 0x08000000 is unused / available */
  24531. #define LPI_IE_BITMAP_CHRE_ESS 0x10000000 /* ESS capability info for CHRE */
  24532. #define LPI_IE_BITMAP_CHRE_SEC_MODE 0x20000000 /* Security capability info for CHRE */
  24533. #define LPI_IE_BITMAP_CHRE_SUPPORTED_RATE 0x40000000 /* Highest MCS corresponding NCC for TX and RX */
  24534. #define LPI_IE_BITMAP_ALL 0xFFFFFFFF
  24535. typedef struct {
  24536. A_UINT32 tlv_header;
  24537. /**A_BOOL indicates LPI mgmt snooping enable/disable*/
  24538. A_UINT32 enable;
  24539. /**LPI snooping mode*/
  24540. A_UINT32 snooping_mode;
  24541. /** LPI interested IEs in snooping context */
  24542. A_UINT32 ie_bitmap;
  24543. } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
  24544. typedef struct {
  24545. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  24546. /** Scan ID */
  24547. A_UINT32 scan_id;
  24548. /** Scan requestor ID */
  24549. A_UINT32 scan_req_id;
  24550. /** VDEV id(interface) that is requesting scan */
  24551. A_UINT32 vdev_id;
  24552. /** LPI interested IEs in scan context */
  24553. A_UINT32 ie_bitmap;
  24554. /** Scan Priority, input to scan scheduler */
  24555. A_UINT32 scan_priority;
  24556. /** dwell time in msec on active channels */
  24557. A_UINT32 dwell_time_active;
  24558. /** dwell time in msec on passive channels */
  24559. A_UINT32 dwell_time_passive;
  24560. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  24561. A_UINT32 min_rest_time;
  24562. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  24563. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  24564. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  24565. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  24566. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  24567. * irrespective of activity. activity is determined by the idle_time parameter.
  24568. */
  24569. A_UINT32 max_rest_time;
  24570. /** time before sending next set of probe requests.
  24571. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  24572. * The number of probe requests specified depends on the ssid_list and bssid_list
  24573. */
  24574. A_UINT32 repeat_probe_time;
  24575. /** time in msec between 2 consecutive probe requests with in a set. */
  24576. A_UINT32 probe_spacing_time;
  24577. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  24578. A_UINT32 idle_time;
  24579. /** maximum time in msec allowed for scan */
  24580. A_UINT32 max_scan_time;
  24581. /** delay in msec before sending first probe request after switching to a channel */
  24582. A_UINT32 probe_delay;
  24583. /** Scan control flags */
  24584. A_UINT32 scan_ctrl_flags;
  24585. /** Burst duration time in msec*/
  24586. A_UINT32 burst_duration;
  24587. /** # if channels to scan. In the TLV channel_list[] */
  24588. A_UINT32 num_chan;
  24589. /** number of bssids. In the TLV bssid_list[] */
  24590. A_UINT32 num_bssid;
  24591. /** number of ssid. In the TLV ssid_list[] */
  24592. A_UINT32 num_ssids;
  24593. /** number of bytes in ie data. In the TLV ie_data[] */
  24594. A_UINT32 ie_len;
  24595. /** Scan control flags extended (see WMI_SCAN_FLAG_EXT_xxx) */
  24596. A_UINT32 scan_ctrl_flags_ext;
  24597. /**
  24598. * TLV (tag length value) parameters follow the scan_cmd
  24599. * structure. The TLV's are:
  24600. * A_UINT32 channel_list[]; // in MHz
  24601. * wmi_ssid ssid_list[];
  24602. * wmi_mac_addr bssid_list[];
  24603. * A_UINT8 ie_data[];
  24604. */
  24605. } wmi_lpi_start_scan_cmd_fixed_param;
  24606. typedef struct {
  24607. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  24608. /** Scan requestor ID */
  24609. A_UINT32 scan_req_id;
  24610. /** Scan ID */
  24611. A_UINT32 scan_id;
  24612. /**
  24613. * Req Type
  24614. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  24615. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  24616. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  24617. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  24618. */
  24619. A_UINT32 req_type;
  24620. /**
  24621. * vDev ID
  24622. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  24623. */
  24624. A_UINT32 vdev_id;
  24625. } wmi_lpi_stop_scan_cmd_fixed_param;
  24626. typedef enum {
  24627. WMI_LPI_DEVICE_TYPE_AP = 1,
  24628. WMI_LPI_DEVICE_TYPE_P2P = 2,
  24629. WMI_LPI_DEVICE_TYPE_NAN = 3,
  24630. } wmi_lpi_device_type;
  24631. typedef struct
  24632. {
  24633. A_UINT32 tlv_header;
  24634. /** Scan requestor ID */
  24635. A_UINT32 scan_req_id;
  24636. A_UINT32 ie_bitmap;
  24637. A_UINT32 data_len;
  24638. } wmi_lpi_result_event_fixed_param;
  24639. typedef enum {
  24640. /** User scan Request completed */
  24641. WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
  24642. /** User Request was never serviced */
  24643. WMI_LPI_STATUS_DROPPED_REQ = 1,
  24644. /** Illegal channel Req */
  24645. WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
  24646. /** Illegal Operation Req */
  24647. WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
  24648. /** Request Aborted */
  24649. WMI_LPI_STATUS_REQ_ABORTED = 4,
  24650. /** Request Timed Out */
  24651. WMI_LPI_STATUS_REQ_TIME_OUT = 5,
  24652. /** Medium Busy, already there
  24653. * is a scan is going on */
  24654. WMI_LPI_STATUS_MEDIUM_BUSY = 6,
  24655. /** Extscan is the scan client whose scan complete event is triggered */
  24656. WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
  24657. } wmi_lpi_staus;
  24658. typedef struct
  24659. {
  24660. A_UINT32 tlv_header;
  24661. wmi_lpi_staus status;
  24662. /** Scan requestor ID */
  24663. A_UINT32 scan_req_id;
  24664. } wmi_lpi_status_event_fixed_param;
  24665. typedef struct
  24666. {
  24667. A_UINT32 tlv_header;
  24668. wmi_mac_addr bssid;
  24669. wmi_ssid ssid;
  24670. A_UINT32 freq;
  24671. A_UINT32 rssi;
  24672. A_UINT32 vdev_id;
  24673. } wmi_lpi_handoff_event_fixed_param;
  24674. typedef struct
  24675. {
  24676. A_UINT32 tlv_header;
  24677. A_UINT32 timestamp; /*timestamp of batch scan event*/
  24678. A_UINT32 numScanLists; /*number of scan in this event*/
  24679. A_UINT32 isLastResult; /*is this event a last event of the whole batch scan*/
  24680. } wmi_batch_scan_result_event_fixed_param;
  24681. typedef enum {
  24682. /** beacons not received from P2P GO */
  24683. WMI_P2P_GO_BMISS = 0,
  24684. /** beacons not received from P2 GO's STA's connected AP */
  24685. WMI_DFS_AP_BMISS = 1,
  24686. } wmi_dfs_ap_bmiss_reason;
  24687. typedef struct {
  24688. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_cli_dfs_ap_bmiss_fixed_param*/
  24689. A_UINT32 vdev_id;
  24690. A_UINT32 reason_code; /* contains a wmi_dfs_ap_bmiss_reason value */
  24691. } wmi_p2p_cli_dfs_ap_bmiss_fixed_param;
  24692. typedef struct {
  24693. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
  24694. A_UINT32 vdev_id;
  24695. /* This TLV is followed by p2p_noa_info for vdev :
  24696. * wmi_p2p_noa_info p2p_noa_info;
  24697. */
  24698. } wmi_p2p_noa_event_fixed_param;
  24699. #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
  24700. #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
  24701. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
  24702. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
  24703. #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
  24704. #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
  24705. typedef struct {
  24706. /** TLV tag and len; tag equals
  24707. * */
  24708. A_UINT32 tlv_header;
  24709. /** gpip pin number */
  24710. A_UINT32 gpio_pin_num;
  24711. /** gpio interrupt type */
  24712. A_UINT32 int_type;
  24713. /** RF radio status */
  24714. A_UINT32 radio_state;
  24715. } wmi_rfkill_mode_param;
  24716. typedef enum {
  24717. WMI_SET_LED_SYS_POWEROFF,
  24718. WMI_SET_LED_SYS_S3_SUSPEND,
  24719. WMI_SET_LED_SYS_S4_S5,
  24720. WMI_SET_LED_SYS_DRIVER_DISABLE,
  24721. WMI_SET_LED_SYS_WAKEUP,
  24722. WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
  24723. WMI_SET_LED_SYS_POWERON,
  24724. } wmi_led_sys_state_param;
  24725. typedef enum {
  24726. WMI_CONFIG_LED_TO_VDD = 0,
  24727. WMI_CONFIG_LED_TO_GND = 1,
  24728. } wmi_config_led_connect_type;
  24729. typedef enum {
  24730. WMI_CONFIG_LED_NOT_WITH_BT = 0,
  24731. WMI_CONFIG_LED_WITH_BT = 1,
  24732. } wmi_config_led_with_bt_flag;
  24733. typedef enum {
  24734. WMI_CONFIG_LED_DISABLE = 0,
  24735. WMI_CONFIG_LED_ENABLE = 1,
  24736. } wmi_config_led_enable_flag;
  24737. typedef enum {
  24738. WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
  24739. WMI_CONFIG_LED_HIGH_OFF = 1,
  24740. WMI_CONFIG_LED_HIGH_ON = 2,
  24741. } wmi_config_led_on_flag;
  24742. typedef enum {
  24743. WMI_CONFIG_LED_UNSPECIFIED = 0,
  24744. WMI_CONFIG_LED_ON = 1,
  24745. WMI_CONFIG_LED_OFF = 2,
  24746. WMI_CONFIG_LED_DIM = 3,
  24747. WMI_CONFIG_LED_BLINK = 4,
  24748. WMI_CONFIG_LED_TXRX = 5,
  24749. } wmi_config_led_operation_type;
  24750. typedef struct {
  24751. /** TLV tag and len; tag equals
  24752. * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
  24753. A_UINT32 tlv_header;
  24754. /* Set GPIO pin */
  24755. A_UINT32 led_gpio_pin;
  24756. /* Set connect type defined in wmi_config_led_connect_type */
  24757. A_UINT32 connect_type;
  24758. /* Set flag defined in wmi_config_led_with_bt_flag*/
  24759. A_UINT32 with_bt;
  24760. /* Set LED enablement defined in wmi_config_led_enable_flag */
  24761. A_UINT32 led_enable;
  24762. /** pdev_id for identifying the MAC
  24763. * See macros starting with WMI_PDEV_ID_ for values.
  24764. */
  24765. A_UINT32 pdev_id;
  24766. /* see wmi_config_led_operation_type enum */
  24767. A_UINT32 led_operation_type;
  24768. /* see wmi_config_led_on_flag enum */
  24769. A_UINT32 led_on_flag; /* configure high/low on/off sense */
  24770. A_UINT32 led_on_interval; /* for blink function; unit: ms */
  24771. A_UINT32 led_off_interval; /* for blink function; unit: ms */
  24772. A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
  24773. } wmi_pdev_set_led_config_cmd_fixed_param;
  24774. #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
  24775. #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
  24776. /** WMI_SMARTANT_STATE_CHANGE_EVENTIDWMI_SMARTANT_STATE_CHANGE_EVENTID
  24777. * report Smart Antenna status to host */
  24778. typedef struct {
  24779. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_smartant_event_fixed_param */
  24780. A_UINT32 tlv_header;
  24781. /** whether Antenna Controller is still alive or offline. */
  24782. A_UINT32 smart_ant_AC_alive;
  24783. } wmi_smartant_state_param;
  24784. /** WMI_PEER_INFO_REQ_CMDID
  24785. * Request FW to provide peer info */
  24786. typedef struct {
  24787. /** TLV tag and len; tag equals
  24788. * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
  24789. A_UINT32 tlv_header;
  24790. /** In order to get the peer info for a single peer, host shall
  24791. * issue the peer_mac_address of that peer. For getting the
  24792. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  24793. * address. The firmware will return the peer info for all the
  24794. * peers on the specified vdev_id */
  24795. wmi_mac_addr peer_mac_address;
  24796. /** vdev id */
  24797. A_UINT32 vdev_id;
  24798. } wmi_peer_info_req_cmd_fixed_param;
  24799. typedef struct {
  24800. /** TLV tag and len; tag equals
  24801. * WMITLV_TAG_STRUC_wmi_peer_info */
  24802. A_UINT32 tlv_header;
  24803. /** mac addr of the peer */
  24804. wmi_mac_addr peer_mac_address;
  24805. /** data_rate of the peer */
  24806. A_UINT32 data_rate;
  24807. /** RSSI of the peer */
  24808. A_UINT32 rssi;
  24809. /** tx fail count */
  24810. A_UINT32 tx_fail_cnt;
  24811. } wmi_peer_info;
  24812. /** FW response with the peer info */
  24813. typedef struct {
  24814. /** TLV tag and len; tag equals
  24815. * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
  24816. A_UINT32 tlv_header;
  24817. /** number of peers in peer_info */
  24818. A_UINT32 num_peers;
  24819. /* Set to 1 only if vdev_id field is valid */
  24820. A_UINT32 valid_vdev_id;
  24821. /* VDEV to which the peer belongs to */
  24822. A_UINT32 vdev_id;
  24823. /* This TLV is followed by another TLV of array of structs
  24824. * wmi_peer_info peer_info[];
  24825. */
  24826. } wmi_peer_info_event_fixed_param;
  24827. /** WMI_PEER_ANTDIV_INFO_REQ_CMDID
  24828. * Request FW to provide peer info */
  24829. typedef struct {
  24830. /** TLV tag and len; tag equals
  24831. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param */
  24832. A_UINT32 tlv_header;
  24833. /** In order to get the peer antdiv info for a single peer, host shall
  24834. * issue the peer_mac_address of that peer. For getting the
  24835. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  24836. * address. The firmware will return the peer info for all the
  24837. * peers on the specified vdev_id */
  24838. wmi_mac_addr peer_mac_address;
  24839. /** vdev id */
  24840. A_UINT32 vdev_id;
  24841. } wmi_peer_antdiv_info_req_cmd_fixed_param;
  24842. /** FW response with the peer antdiv info */
  24843. typedef struct {
  24844. /** TLV tag and len; tag equals
  24845. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param */
  24846. A_UINT32 tlv_header;
  24847. /** number of peers in peer_info */
  24848. A_UINT32 num_peers;
  24849. /* VDEV to which the peer belongs to */
  24850. A_UINT32 vdev_id;
  24851. /* This TLV is followed by another TLV of array of structs
  24852. * wmi_peer_antdiv_info peer_antdiv_info[];
  24853. */
  24854. } wmi_peer_antdiv_info_event_fixed_param;
  24855. typedef struct {
  24856. /** TLV tag and len; tag equals
  24857. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info */
  24858. A_UINT32 tlv_header;
  24859. /** mac addr of the peer */
  24860. wmi_mac_addr peer_mac_address;
  24861. /** per chain RSSI of the peer, for up to 8 chains.
  24862. * Each chain's entry reports the RSSI for different bandwidths:
  24863. * bits 7:0 -> primary 20 MHz
  24864. * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
  24865. * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
  24866. * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
  24867. * Each of these 8-bit RSSI reports is in dB units, with respect to
  24868. * the noise floor.
  24869. * 0x80 means invalid.
  24870. * All unused bytes within used chain_rssi indices shall be set to 0x80.
  24871. * All unused chain_rssi indices shall be set to 0x80808080.
  24872. */
  24873. A_INT32 chain_rssi[8];
  24874. } wmi_peer_antdiv_info;
  24875. typedef struct {
  24876. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_msduq_qdepth_thresh_update */
  24877. /** tid_number */
  24878. A_UINT32 tid_num;
  24879. /** msduq_mask to set the value
  24880. * bit 0 - HI-PRI msdu flowq qdepth threshold need to update if set
  24881. * bit 1 - LOW-PRI msdu flowq qdepth threshold need to update if set
  24882. * bit 2 - UDP msdu flowq qdepth threshold need to update if set
  24883. * bit 3 - NON-UDP msdu flowq qdepth threshold need to update if set
  24884. * rest of bits are reserved and set to 0.
  24885. */
  24886. A_UINT32 msduq_update_mask;
  24887. /** Qdepth threshold value
  24888. * If number of msdus in a queue excess over qdepth_thresh_value value
  24889. * while queuing msdu's then we drop new msdus.
  24890. * (Though dropping older (stale) data rather than newer data might be
  24891. * preferable, the dropping is performed by MAC HW, and there's no option
  24892. * to configure the HW to do head dropping rather than tail dropping.)
  24893. */
  24894. A_UINT32 qdepth_thresh_value;
  24895. } wmi_msduq_qdepth_thresh_update;
  24896. /** WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID
  24897. * Request FW to update msduq qdepth threshold per TID per peer */
  24898. typedef struct {
  24899. /** TLV tag and len; tag equals
  24900. * WMITLV_TAG_STRUC_wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param
  24901. */
  24902. A_UINT32 tlv_header;
  24903. /** pdev id
  24904. * The pdev_id can be determined from the vdev_id, but the pdev_id
  24905. * is explicitly provided so it can be used for sanity checking.
  24906. */
  24907. A_UINT32 pdev_id;
  24908. /** vdev id */
  24909. A_UINT32 vdev_id;
  24910. /**
  24911. * To set the peer msduq qdepth threshold update for a single peer,
  24912. * the host shall send mac address for which peer need to be updated.
  24913. */
  24914. wmi_mac_addr peer_mac_address;
  24915. /** number of payload update tlvs */
  24916. A_UINT32 num_of_msduq_updates;
  24917. /** Followed by the variable length TLV msduq_qdepth_updates:
  24918. * wmi_msduq_qdepth_th_update msduq_qdepth_thshd_update_list[]
  24919. */
  24920. } wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param;
  24921. /**
  24922. * ACK policy to be followed for the TID
  24923. */
  24924. typedef enum {
  24925. /** Used when the host does not want to configure the ACK policy */
  24926. WMI_PEER_TID_CONFIG_ACK_POLICY_IGNORE,
  24927. /** Allow ACK for the TID */
  24928. WMI_PEER_TID_CONFIG_ACK,
  24929. /** Do not expect ACK for the TID */
  24930. WMI_PEER_TID_CONFIG_NOACK,
  24931. } WMI_PEER_TID_CONFIG_ACK_POLICY;
  24932. /**
  24933. * Aggregation control policy for the TID
  24934. */
  24935. typedef enum {
  24936. /** Used when the host does not want to configure the aggregation policy */
  24937. WMI_PEER_TID_CONFIG_AGGR_CONTROL_IGNORE,
  24938. /** Enable aggregation for the TID */
  24939. WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE,
  24940. /** Disable aggregation for the TID */
  24941. WMI_PEER_TID_CONFIG_AGGR_CONTROL_DISABLE,
  24942. } WMI_PEER_TID_CONFIG_AGGR_CONTROL;
  24943. /**
  24944. * Rate control policy for the TID
  24945. */
  24946. typedef enum {
  24947. /** Used when the host does not want to configure the rate control policy */
  24948. WMI_PEER_TID_CONFIG_RATE_CONTROL_IGNORE,
  24949. /** Auto rate control */
  24950. WMI_PEER_TID_CONFIG_RATE_CONTROL_AUTO,
  24951. /** Fixed rate control */
  24952. WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE,
  24953. /** Set the Default lowest rate (6Mbps in 5GHZ and 1Mbps in 2GHZ) */
  24954. WMI_PEER_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE,
  24955. /**
  24956. * Set the highest rate cap allowed for this TID.
  24957. * Rate cap is specified in rate code format,
  24958. * i.e. NSS and MCS combined as shown below:
  24959. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  24960. * b'3-b'0 indicate the MCS
  24961. */
  24962. WMI_PEER_TID_CONFIG_RATE_UPPER_CAP,
  24963. } WMI_PEER_TID_CONFIG_RATE_CONTROL;
  24964. /**
  24965. * SW retry threshold for the TID
  24966. */
  24967. typedef enum {
  24968. /** Used when the host does not want to configure the SW retry threshold */
  24969. WMI_PEER_TID_SW_RETRY_IGNORE = 0,
  24970. WMI_PEER_TID_SW_RETRY_MIN = 1,
  24971. WMI_PEER_TID_SW_RETRY_MAX = 30,
  24972. /** No SW retry for the TID */
  24973. WMI_PEER_TID_SW_RETRY_NO_RETRY = 0xFFFFFFFF,
  24974. } WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD;
  24975. /*
  24976. * values for tid_config_supported_bitmap field,
  24977. * in wmi_peer_tid_configurations_cmd structure.
  24978. */
  24979. typedef enum {
  24980. /* Used to indicate that disable_rts_cts field is valid */
  24981. WMI_PEER_TID_DISABLE_RTS_CTS_VALID = 0x00000001,
  24982. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_VALID = 0x00000002,
  24983. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_VALID = 0x00000004,
  24984. } WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP;
  24985. /*
  24986. * Per TID level enable/disable of RTS/CTS for that peer.
  24987. * Currently applicable only for "data tids" within targets which set
  24988. * the RTSCTS_FOR_UNICAST_MGMT WMI service bit.
  24989. *
  24990. * Enum values/Expected values for disable_rts_cts of
  24991. * WMI_PEER_TID_DISABLE_RTS_CTS_VALID as below:
  24992. *
  24993. * 0 (WMI_RTSCTS_RESET) - Use default RTS/CTS
  24994. * 1 (WMI_RTSCTS_DISABLE) - Disable RTS/CTS for every ppdu for that
  24995. * configured data TID
  24996. * 2 (WMI_RTSCTS_ENABLE) - Enable RTS/CTS for every ppdu for that
  24997. * configured data TID
  24998. */
  24999. typedef enum {
  25000. WMI_RTSCTS_RESET = 0,
  25001. WMI_RTSCTS_DISABLE = 1,
  25002. WMI_RTSCTS_ENABLE = 2,
  25003. } WMI_PEER_TID_CONFIG_RTSCTS_CONTROL;
  25004. /**
  25005. * MPDU Aggregate value for the TID
  25006. */
  25007. typedef enum {
  25008. /** Set the default Aggregation value configured in FW */
  25009. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_DEFAULT,
  25010. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MIN = 1,
  25011. WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MAX = 1024,
  25012. } WMI_PEER_TID_CONFIG_MAX_NUM_MPDU_IN_PPDU;
  25013. /**
  25014. * MSDU Aggregate value for the TID
  25015. */
  25016. typedef enum {
  25017. /** Set the default Aggregation value configured in FW */
  25018. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_DEFAULT,
  25019. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MIN = 1,
  25020. WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MAX = 7,
  25021. } WMI_PEER_TID_CONFIG_MAX_NUM_MSDU_IN_MPDU;
  25022. /**
  25023. * Command format for the TID configuration
  25024. */
  25025. typedef struct {
  25026. /** TLV tag and len; tag equals
  25027. * WMITLV_TAG_STRUC_wmi_peer_tid_configurations_cmd_fixed_param
  25028. */
  25029. A_UINT32 tlv_header;
  25030. /** vdev id */
  25031. A_UINT32 vdev_id;
  25032. /** peer MAC address */
  25033. wmi_mac_addr peer_mac_address;
  25034. /** TID number, generated by the caller.
  25035. * Valid range for QoS TID : 0-15
  25036. * Valid range for non QOS/Mgmt TID: 16-19
  25037. * Any other TID number is invalid.
  25038. */
  25039. A_UINT32 tid_num;
  25040. /** ACK policy - of type WMI_PEER_TID_CONFIG_ACK_POLICY */
  25041. A_UINT32 ack_policy;
  25042. /** Aggregation control - of type WMI_PEER_TID_CONFIG_AGGR_CONTROL */
  25043. A_UINT32 aggr_control;
  25044. /** Rate control - of type WMI_PEER_TID_CONFIG_RATE_CONTROL */
  25045. A_UINT32 rate_control;
  25046. /** Fixed rate control parameters - of type WMI_PEER_PARAM_FIXED_RATE.
  25047. * This is applicable only when rate_control is
  25048. * WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE
  25049. */
  25050. A_UINT32 rcode_rcflags;
  25051. /** MPDU SW retry threshold - of type WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD
  25052. * This SW retry threshold limits the total number of retransmits of
  25053. * nacked or unacked MPDUs, but it is up to the FW to decide what
  25054. * tx rate to use during each retransmission.
  25055. */
  25056. A_UINT32 sw_retry_threshold;
  25057. /*--- Start of extended structure ---*/
  25058. /* Bitmap to indicate which fields in the extended structure are valid.
  25059. * Bitmap values correspond to enum WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP
  25060. */
  25061. A_UINT32 tid_config_supported_bitmap;
  25062. /* Knob to enable/disable RTS/CTS per TID
  25063. * Enum values/Expected values:
  25064. *
  25065. * 0 (WMI_RTSCTS_RESET) - Use default RTS/CTS
  25066. * 1 (WMI_RTSCTS_DISABLE) - Disable RTS/CTS for every ppdu for
  25067. * that configured data TID
  25068. * 2 (WMI_RTSCTS_ENABLE) - Enable RTS/CTS for every ppdu for
  25069. * that configured data TID
  25070. */
  25071. A_UINT32 disable_rts_cts;
  25072. /** Size for mpdu aggregation
  25073. * (max MPDUs per PPDU)
  25074. * Valid range : 1-1024 (refer to WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MIN,MAX)
  25075. * When this field is set to 0, default aggregation value configured
  25076. * in the fw will be used.
  25077. * This is applicable only when aggr_control is
  25078. * WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE
  25079. */
  25080. A_UINT32 max_num_mpdu_in_ppdu;
  25081. /** Size for msdu aggregation
  25082. * (max MSDUs per MPDU)
  25083. * Valid range : 1-7 (refer to WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MIN,MAX)
  25084. * When this field is set to 0, default aggregation value configured
  25085. * in the fw will be used.
  25086. * This is applicable only when aggr_control is
  25087. * WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE
  25088. */
  25089. A_UINT32 max_num_msdu_in_mpdu;
  25090. } wmi_peer_tid_configurations_cmd_fixed_param;
  25091. /* The below enable/disable macros are used for both per peer CFR capture
  25092. * control (as in wmi_peer_cfr_capture_cmd) and control of the entire periodic
  25093. * CFR capture feature (as in WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE)
  25094. */
  25095. #define WMI_PEER_CFR_CAPTURE_ENABLE 1
  25096. #define WMI_PEER_CFR_CAPTURE_DISABLE 0
  25097. #define WMI_PEER_CFR_ONE_SHOT_REQUEST 0
  25098. #define WMI_PEER_CFR_PERIODICITY_MIN 10 /* 10ms */
  25099. #define WMI_PEER_CFR_PERIODICITY_MAX 10*60*1000 /* 10 minutes */
  25100. /* Bandwidth of peer CFR captures */
  25101. typedef enum {
  25102. WMI_PEER_CFR_CAPTURE_BW_20MHZ = 0,
  25103. WMI_PEER_CFR_CAPTURE_BW_40MHZ = 1,
  25104. WMI_PEER_CFR_CAPTURE_BW_80MHZ = 2,
  25105. WMI_PEER_CFR_CAPTURE_BW_160MHZ = 3,
  25106. WMI_PEER_CFR_CAPTURE_BW_80_80MHZ = 4,
  25107. WMI_PEER_CFR_CAPTURE_BW_MAX,
  25108. } WMI_PEER_CFR_CAPTURE_BW;
  25109. /* Peer CFR capture method */
  25110. typedef enum {
  25111. /* Send null frame on the requested bw and capture CFR on ACK */
  25112. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME = 0,
  25113. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME_WITH_PHASE = 1,
  25114. WMI_PEER_CFR_CAPTURE_METHOD_PROBE_RESP = 2,
  25115. /* New methods to be added here */
  25116. WMI_PEER_CFR_CAPTURE_METHOD_MAX,
  25117. } WMI_PEER_CFR_CAPTURE_METHOD;
  25118. /*
  25119. * Peer command structure to configure the CFR capture
  25120. */
  25121. typedef struct {
  25122. /** TLV tag and len; tag equals
  25123. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_cmd_fixed_param
  25124. */
  25125. A_UINT32 tlv_header;
  25126. /* WMI_PEER_CFR_CAPTURE_ENABLE: Enable CFR capture for the peer
  25127. * WMI_PEER_CFR_CAPTURE_DISABLE: Disable CFR capture for the peer
  25128. */
  25129. A_UINT32 request;
  25130. /* Peer MAC address. In AP mode, this is the address of the connected peer
  25131. * for which CFR capture is needed. In case of STA mode, this is the address
  25132. * of the AP to which the STA is connected
  25133. */
  25134. wmi_mac_addr mac_addr;
  25135. /* vdev id */
  25136. A_UINT32 vdev_id;
  25137. /* Periodicity of measurement in ms.
  25138. * WMI_PEER_CFR_ONE_SHOT_REQUEST: One-shot request i.e., Only one CFR
  25139. * capture for the request and no periodic CFR captures.
  25140. * The min value is WMI_PEER_CFR_PERIODICITY_MIN
  25141. * The max value is WMI_PEER_CFR_PERIODICITY_MAX
  25142. */
  25143. A_UINT32 periodicity;
  25144. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  25145. A_UINT32 bandwidth;
  25146. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  25147. A_UINT32 capture_method;
  25148. } wmi_peer_cfr_capture_cmd_fixed_param;
  25149. typedef enum {
  25150. WMI_PEER_IND_SMPS = 0x0, /* spatial multiplexing power save */
  25151. WMI_PEER_IND_OMN, /* operating mode notification */
  25152. WMI_PEER_IND_OMI, /* operating mode indication */
  25153. } WMI_PEER_OPER_MODE_IND;
  25154. typedef struct {
  25155. /** TLV tag and len; tag equals
  25156. * WMITLV_TAG_STRUC_wmi_peer_oper_mode_change */
  25157. A_UINT32 tlv_header;
  25158. /** mac addr of the peer */
  25159. wmi_mac_addr peer_mac_address;
  25160. /** Peer type indication WMI_PEER_OPER_MODE_IND. */
  25161. A_UINT32 ind_type;
  25162. /** new_rxnss valid for all peer_operating mode ind. */
  25163. A_UINT32 new_rxnss;
  25164. /** new_bw valid for peer_operating mode ind. OMN/OMI
  25165. * value of this bw is as per 11ax/ac standard:
  25166. * 0 = 20MHz,1 = 40MHz, 2= 80MHz, 3 = 160MHz
  25167. */
  25168. A_UINT32 new_bw;
  25169. /** new_txnss valid for peer_operating mode ind. OMI */
  25170. A_UINT32 new_txnss;
  25171. /** new_disablemu: disable mu mode
  25172. * valid for peer_operating mode ind. OMI
  25173. */
  25174. A_UINT32 new_disablemu;
  25175. } wmi_peer_oper_mode_change_event_fixed_param;
  25176. /** FW response when tx failure count has reached threshold
  25177. * for a peer */
  25178. typedef struct {
  25179. /** TLV tag and len; tag equals
  25180. * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
  25181. A_UINT32 tlv_header;
  25182. /** vdev id*/
  25183. A_UINT32 vdev_id;
  25184. /** mac address */
  25185. wmi_mac_addr peer_mac_address;
  25186. /** tx failure count - will eventually be removed and not used */
  25187. A_UINT32 tx_fail_cnt;
  25188. /** seq number of the nth tx_fail_event */
  25189. A_UINT32 seq_no;
  25190. } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
  25191. enum wmi_rmc_mode {
  25192. /** Disable RMC */
  25193. WMI_RMC_MODE_DISABLED = 0,
  25194. /** Enable RMC */
  25195. WMI_RMC_MODE_ENABLED = 1,
  25196. };
  25197. /** Enable RMC transmitter functionality. Upon
  25198. * receiving this, the FW shall mutlicast frames with
  25199. * reliability. This is a vendor
  25200. * proprietary feature. */
  25201. typedef struct {
  25202. /** TLV tag and len; tag equals
  25203. * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
  25204. A_UINT32 tlv_header;
  25205. /** vdev id*/
  25206. A_UINT32 vdev_id;
  25207. /** enable_rmc contains values from enum wmi_rmc_mode;
  25208. * Default value: 0 (disabled) */
  25209. A_UINT32 enable_rmc;
  25210. } wmi_rmc_set_mode_cmd_fixed_param;
  25211. /** Configure transmission periodicity of action frames in a
  25212. * RMC network for the multicast transmitter */
  25213. typedef struct {
  25214. /** TLV tag and len; tag equals
  25215. * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
  25216. A_UINT32 tlv_header;
  25217. /** vdev id */
  25218. A_UINT32 vdev_id;
  25219. /** time period in milliseconds. Default: 300 ms.
  25220. An action frame indicating the current leader is transmitted by the
  25221. RMC transmitter once every 'periodity_msec' */
  25222. A_UINT32 periodicity_msec;
  25223. } wmi_rmc_set_action_period_cmd_fixed_param;
  25224. /** Optimise Leader selection process in RMC functionality. For
  25225. * Enhancement/Debug purposes only */
  25226. typedef struct {
  25227. /** TLV tag and len; tag equals
  25228. * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
  25229. A_UINT32 tlv_header;
  25230. /** vdev id */
  25231. A_UINT32 vdev_id;
  25232. /** flags ::
  25233. * 0x0001 - Enable beacon averaging
  25234. * 0x0002 - Force leader selection
  25235. * 0x0004 - Enable Timer based leader switch
  25236. * 0x0008 - Use qos/NULL based for multicast reliability */
  25237. A_UINT32 flags;
  25238. /** control leader change timeperiod (in seconds) */
  25239. A_UINT32 peridocity_leader_switch;
  25240. /** control activity timeout value for data rx (in seconds) */
  25241. A_UINT32 data_activity_timeout;
  25242. /** mac address of leader */
  25243. wmi_mac_addr forced_leader_mac_addr;
  25244. } wmi_rmc_config_cmd_fixed_param;
  25245. /** MHF is generally implemented in
  25246. * the kernel. To decrease system power consumption, the
  25247. * driver can enable offloading this to the chipset. In
  25248. * order for the offload, the firmware needs the routing table.
  25249. * The host shall plumb the routing table into FW. The firmware
  25250. * shall perform an IP address lookup and forward the packet to
  25251. * the next hop using next hop's mac address. This is a vendor
  25252. * proprietary feature. */
  25253. enum wmi_mhf_ofl_mode {
  25254. /** Disable MHF offload */
  25255. WMI_MHF_OFL_MODE_DISABLED = 0,
  25256. /** Enable MHF offload */
  25257. WMI_MHF_OFL_MODE_ENABLED = 1,
  25258. };
  25259. typedef struct {
  25260. /** TLV tag and len; tag equals
  25261. * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
  25262. A_UINT32 tlv_header;
  25263. /** vdev id*/
  25264. A_UINT32 vdev_id;
  25265. /** enable_mhf_ofl contains values from enum
  25266. * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
  25267. A_UINT32 enable_mhf_ofl;
  25268. } wmi_mhf_offload_set_mode_cmd_fixed_param;
  25269. enum wmi_mhf_ofl_table_action {
  25270. /** Create MHF offload table in FW */
  25271. WMI_MHF_OFL_TBL_CREATE = 0,
  25272. /** Append to existing MHF offload table */
  25273. WMI_MHF_OFL_TBL_APPEND = 1,
  25274. /** Flush entire MHF offload table in FW */
  25275. WMI_MHF_OFL_TBL_FLUSH = 2,
  25276. };
  25277. typedef struct {
  25278. /** TLV tag and len; tag equals
  25279. * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
  25280. A_UINT32 tlv_header;
  25281. /** vdev id*/
  25282. A_UINT32 vdev_id;
  25283. /** action corresponds to values from enum
  25284. * wmi_mhf_ofl_table_action */
  25285. A_UINT32 action;
  25286. /** number of entries in the table */
  25287. A_UINT32 num_entries;
  25288. /** Followed by the variable length TLV
  25289. * wmi_mhf_offload_routing_table_entry entries[] */
  25290. } wmi_mhf_offload_plumb_routing_table_cmd;
  25291. typedef struct {
  25292. /** TLV tag and len; tag equals
  25293. * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
  25294. A_UINT32 tlv_header;
  25295. /** Destination node's IP address */
  25296. WMI_IPV4_ADDR dest_ipv4_addr;
  25297. /** Next hop node's MAC address */
  25298. wmi_mac_addr next_hop_mac_addr;
  25299. } wmi_mhf_offload_routing_table_entry;
  25300. enum {
  25301. WMI_DFS_RADAR_PULSE_FLAG_MASK_PSIDX_DIFF_VALID = 0x00000001,
  25302. };
  25303. typedef struct {
  25304. /** tlv tag and len, tag equals
  25305. * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
  25306. A_UINT32 tlv_header;
  25307. /** full 64 tsf timestamp get from MAC tsf timer indicates
  25308. * the time that the radar event uploading to host, split
  25309. * it to high 32 bit and lower 32 bit in fulltsf_high and
  25310. * full_tsf_low
  25311. */
  25312. A_UINT32 upload_fullts_low;
  25313. A_UINT32 upload_fullts_high;
  25314. /** timestamp indicates the time when DFS pulse is detected
  25315. * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
  25316. */
  25317. A_UINT32 pulse_detect_ts;
  25318. /** the duaration of the pulse in us */
  25319. A_UINT32 pulse_duration;
  25320. /** the center frequency of the radar pulse detected, KHz */
  25321. A_UINT32 pulse_center_freq;
  25322. /** bandwidth of current DFS channel, MHz */
  25323. A_UINT32 ch_bandwidth;
  25324. /** center channel frequency1 of current DFS channel, MHz */
  25325. A_UINT16 ch_center_freq1;
  25326. /** center channel frequency2 of current DFS channel, MHz,
  25327. * reserved for 160 BW mode
  25328. */
  25329. A_UINT16 ch_center_freq2;
  25330. /** flag to indicate if this pulse is chirp */
  25331. A_UINT8 pulse_is_chirp;
  25332. /** RSSI recorded in the ppdu */
  25333. A_UINT8 rssi;
  25334. /** extended RSSI info */
  25335. A_UINT8 rssi_ext;
  25336. union {
  25337. A_UINT8 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  25338. /** pdev_id for identifying the MAC
  25339. * See macros starting with WMI_PDEV_ID_ for values.
  25340. */
  25341. A_UINT8 pdev_id;
  25342. };
  25343. /** index of peak magnitude bin (signed) */
  25344. A_INT32 peak_sidx;
  25345. /** Max pulse chirp velocity in delta bins over chirp FFT interval */
  25346. A_INT32 pulse_delta_peak;
  25347. /** Max pulse chirp velocity variance in delta bins */
  25348. A_INT32 pulse_delta_diff;
  25349. /** the difference in the FFT peak index between short FFT and the first long FFT
  25350. * psidx_diff = (first_long_fft_psidx - 4*first_short_fft_psidx),
  25351. */
  25352. A_INT32 psidx_diff;
  25353. /** pulse_flags: see WMI_DFS_RADAR_PULSE_FLAG_MASK enum values
  25354. * 0x0001 - set if psidx_diff is valid
  25355. */
  25356. A_UINT32 pulse_flags;
  25357. } wmi_dfs_radar_event_fixed_param;
  25358. enum {
  25359. /* DEFAULT - target chooses what action to take, based on its thermal
  25360. * management policy
  25361. * Targets which throttle tx (and potentially rx) based on thermal
  25362. * management thresholds specified by the host will shut down tx
  25363. * if the temperature exceeds upper_thresh_degreeC.
  25364. * Targets which simply inform the host about threshold breaches will
  25365. * send a notification message to the host if the temperature exceeds
  25366. * upper_thresh_degreeC.
  25367. * Conversely, if the temperature was above upper_thresh_degreeC but
  25368. * then drops to below lower_threshold_degreeC, the target will either
  25369. * resume tx, or notify the host.
  25370. */
  25371. WMI_THERMAL_MGMT_ACTION_DEFAULT = 0,
  25372. /* HALT_TRAFFIC -
  25373. * If the temperature rises above upper_thresh_degreeC, the target will
  25374. * halt tx.
  25375. * If the temperature falls back below lower_thresh_degreeC, the target
  25376. * will resume tx.
  25377. */
  25378. WMI_THERMAL_MGMT_ACTION_HALT_TRAFFIC = 1,
  25379. /* NOTIFY_HOST - the target will notify the host if the temperature
  25380. * either rises above upper_thresh_degreeC or falls below
  25381. * lower_thresh_degreeC.
  25382. */
  25383. WMI_THERMAL_MGMT_ACTION_NOTIFY_HOST = 2,
  25384. /* CHAIN SCALING -
  25385. * The target will switch tx chain mask from multi chains to single chain
  25386. * if the temperature rises above upper_thresh_degreeC.
  25387. * The target will switch tx chainmask back to multi chains if the
  25388. * temperature drops below upper_thresh_degreeC.
  25389. */
  25390. WMI_THERMAL_MGMT_ACTION_CHAINSCALING = 3,
  25391. };
  25392. typedef struct {
  25393. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
  25394. /*Thermal thresholds*/
  25395. A_UINT32 lower_thresh_degreeC; /* in degree C*/
  25396. A_UINT32 upper_thresh_degreeC; /* in degree C*/
  25397. /*Enable/Disable Thermal Monitoring for Mitigation*/
  25398. A_UINT32 enable;
  25399. /* action: what the target should do when a thermal upper/lower threshold
  25400. * is crossed.
  25401. * Refer to the WMI_THERMAL_MGMT_ACTION enum.
  25402. */
  25403. A_UINT32 action;
  25404. A_UINT32 threshold_warning_degreeC;
  25405. A_UINT32 sample_rate_ms;
  25406. } wmi_thermal_mgmt_cmd_fixed_param;
  25407. typedef struct {
  25408. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
  25409. A_UINT32 temperature_degreeC;/* temperature in degree C*/
  25410. } wmi_thermal_mgmt_event_fixed_param;
  25411. /**
  25412. * This command is sent from WLAN host driver to firmware to
  25413. * request firmware to configure auto shutdown timer in fw
  25414. * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
  25415. */
  25416. typedef struct {
  25417. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
  25418. A_UINT32 timer_value; /** timer value; 0=disable */
  25419. } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
  25420. enum wmi_host_auto_shutdown_reason {
  25421. WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
  25422. WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
  25423. WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
  25424. };
  25425. /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
  25426. typedef struct {
  25427. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
  25428. A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
  25429. } wmi_host_auto_shutdown_event_fixed_param;
  25430. /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
  25431. * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
  25432. * This command is only used by some customer for verification test. It is not for end-user.
  25433. *
  25434. * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
  25435. *
  25436. * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
  25437. * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condition only. When multiple
  25438. * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
  25439. * <channel, ack_offset> pair is unique.
  25440. *
  25441. * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
  25442. * called basic_config_info by bitmap
  25443. * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
  25444. *
  25445. * '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
  25446. * is ignored.
  25447. * disable will remove preious conditions from FW.
  25448. * conditions from the later command will over write conditions stored from a previous command.
  25449. *
  25450. */
  25451. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
  25452. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
  25453. #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
  25454. #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
  25455. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
  25456. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
  25457. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
  25458. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
  25459. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
  25460. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
  25461. #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
  25462. #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
  25463. #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
  25464. #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
  25465. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
  25466. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
  25467. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
  25468. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
  25469. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
  25470. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
  25471. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
  25472. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
  25473. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
  25474. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
  25475. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
  25476. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
  25477. #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
  25478. #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
  25479. /** Bit map definition for basic_config_info starts */
  25480. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
  25481. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
  25482. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  25483. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z) WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  25484. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
  25485. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
  25486. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  25487. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  25488. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
  25489. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
  25490. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  25491. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  25492. #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
  25493. #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
  25494. #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT)
  25495. #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
  25496. #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
  25497. #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
  25498. #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC)
  25499. #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
  25500. #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
  25501. #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
  25502. #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND)
  25503. #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
  25504. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
  25505. #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
  25506. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM)
  25507. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
  25508. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
  25509. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
  25510. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  25511. #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z) WMI_F_RMW(x, (z) & 0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  25512. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
  25513. /*
  25514. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
  25515. * is temporarily maintained as an alias for the correct name
  25516. * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  25517. */
  25518. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
  25519. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
  25520. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  25521. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  25522. #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
  25523. /*
  25524. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
  25525. * is temporarily maintained as an alias for the correct name
  25526. * (WMI_TPC_CHAINMASK_CONFIG_RATE)
  25527. */
  25528. #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
  25529. #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
  25530. #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
  25531. #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
  25532. /** Bit map definition for basic_config_info ends */
  25533. typedef struct {
  25534. A_UINT32 tlv_header;
  25535. /** Basic condition defined as bit map above, bitmap is chosen to save memory.
  25536. * Bit0 ~ Bit4: tpc offset which will be adjusted if condition matches, the unit is 0.5dB. bit4 indicates signed
  25537. * Bit5 ~ Bit9: ack offset which will be adjusted if condition matches, the unit is 0.5dB. bit9 indicates signed
  25538. * 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
  25539. * 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
  25540. * 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
  25541. * Bit16 : band condition b'0: 2G, b'1: 5G
  25542. * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
  25543. * 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
  25544. * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
  25545. * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
  25546. * Bit23 ~ Bit31: reserved
  25547. */
  25548. A_UINT32 basic_config_info;
  25549. /** channel mapping bit rule: The lower bit corresponds with smaller channel.
  25550. * it depends on Bit14 of basic_config_info
  25551. * Total 24 channels for 5G
  25552. * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
  25553. * Total 14 channels for 2G
  25554. * 1 ~ 14
  25555. */
  25556. A_UINT32 channel;
  25557. /** rate mapping bit rule: The lower bit corresponds with lower rate.
  25558. * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
  25559. * Legacy rates , 11b, 11g, 11A
  25560. * 11n one stream (ht20, ht40) 8+8
  25561. * 11n two streams (ht20, ht40) 8+8
  25562. * 11ac one stream (vht20, vht40, vht80) 10+10+10
  25563. * 11ac two streams (vht20, vht40, vht80) 10+10+10
  25564. */
  25565. A_UINT32 rate0;
  25566. /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
  25567. * 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
  25568. */
  25569. /** 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
  25570. */
  25571. A_UINT32 rate1;
  25572. } wmi_tpc_chainmask_config;
  25573. #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
  25574. #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
  25575. typedef struct {
  25576. A_UINT32 tlv_header;
  25577. A_UINT32 enable; /** enable to set tpc & chainmask when conditions meet, 0: disabled, 1: enabled. */
  25578. A_UINT32 num_tpc_chainmask_configs;
  25579. /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
  25580. } wmi_tpc_chainmask_config_cmd_fixed_param;
  25581. typedef struct {
  25582. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_req_fixed_param */
  25583. A_UINT32 pdev_id;
  25584. /**
  25585. * Bits 31:0: base address of ring [31:0]
  25586. */
  25587. A_UINT32 base_addr_lo;
  25588. /**
  25589. * Bits 3:0: base address of ring [35:32]
  25590. * Bits 31:4: reserved
  25591. */
  25592. A_UINT32 base_addr_hi;
  25593. /**
  25594. * Bits 31:0: address of head index [31:0]
  25595. */
  25596. A_UINT32 head_idx_addr_lo;
  25597. /**
  25598. * Bits 3:0: address of head index [35:32]
  25599. * Bits 31:4: reserved
  25600. */
  25601. A_UINT32 head_idx_addr_hi;
  25602. /**
  25603. * Bits 31:0: address of tail index [31:0]
  25604. */
  25605. A_UINT32 tail_idx_addr_lo;
  25606. /**
  25607. * Bits 3:0: address of tail index [35:32]
  25608. * Bits 31:4: reserved
  25609. */
  25610. A_UINT32 tail_idx_addr_hi;
  25611. A_UINT32 num_ptr; /** Number of pointers in the ring */
  25612. } wmi_oem_dma_ring_cfg_req_fixed_param;
  25613. #define WMI_OEM_DMA_RING_ADDR_LO_S 0
  25614. #define WMI_OEM_DMA_RING_ADDR_LO 0xffffffff
  25615. #define WMI_OEM_DMA_RING_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_LO)
  25616. #define WMI_OEM_DMA_RING_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_LO)
  25617. #define WMI_OEM_DMA_RING_ADDR_HI_S 0
  25618. #define WMI_OEM_DMA_RING_ADDR_HI 0xf
  25619. #define WMI_OEM_DMA_RING_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_HI)
  25620. #define WMI_OEM_DMA_RING_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_HI)
  25621. typedef struct {
  25622. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_rsp_fixed_param */
  25623. A_UINT32 pdev_id;
  25624. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  25625. } wmi_oem_dma_ring_cfg_rsp_fixed_param;
  25626. typedef struct {
  25627. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_indirect_data */
  25628. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  25629. /**
  25630. * Bits 31:0: address of data [31:0]
  25631. */
  25632. A_UINT32 addr_lo;
  25633. /**
  25634. * Bits 3:0: address of data [35:32]
  25635. * Bits 11:4: reserved
  25636. * Bits 31:12: opaque host context data [19:0]
  25637. */
  25638. A_UINT32 addr_hi;
  25639. A_UINT32 len; /** Length of data in bytes */
  25640. } wmi_oem_indirect_data;
  25641. #define WMI_OEM_DMA_DATA_ADDR_LO_S 0
  25642. #define WMI_OEM_DMA_DATA_ADDR_LO 0xffffffff
  25643. #define WMI_OEM_DMA_DATA_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_LO)
  25644. #define WMI_OEM_DMA_DATA_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_LO)
  25645. #define WMI_OEM_DMA_DATA_ADDR_HI_S 0
  25646. #define WMI_OEM_DMA_DATA_ADDR_HI 0xf
  25647. #define WMI_OEM_DMA_DATA_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI)
  25648. #define WMI_OEM_DMA_DATA_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI)
  25649. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_S 12
  25650. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA 0xfffff
  25651. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
  25652. #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)
  25653. typedef struct {
  25654. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_buf_release_hdr */
  25655. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  25656. } wmi_oem_dma_buf_release_fixed_param;
  25657. typedef struct {
  25658. /**
  25659. * Bits 31:0: address of data [31:0]
  25660. */
  25661. A_UINT32 addr_lo;
  25662. /**
  25663. * Bits 3:0: address of data [35:32]
  25664. * Bits 11:4: reserved
  25665. * Bits 31:12: host context data [19:0]
  25666. */
  25667. A_UINT32 addr_hi;
  25668. } wmi_oem_dma_buf_release_entry;
  25669. typedef struct {
  25670. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_cmd_fixed_param */
  25671. A_UINT32 tlv_header;
  25672. /** Unique id identifying the VDEV */
  25673. A_UINT32 vdev_id;
  25674. /** Actual length in byte of data[]. */
  25675. A_UINT32 data_len;
  25676. /**
  25677. * pdev_vdev_flag - 0 follow old method (vdev_id is valid, ignore pdev_id)
  25678. * pdev_vdev_flag - 1 pdev_id is valid
  25679. */
  25680. A_UINT32 pdev_vdev_flag;
  25681. /** Unique id identifying the PDEV */
  25682. A_UINT32 pdev_id;
  25683. /** This structure is used to send OEM DATA binary blobs from
  25684. * application/service to firmware where Host driver is pass through.
  25685. * The OEM-specific commands from OEM-specific userspace applications
  25686. * are passed to OEM-specific feature handlers in firmware as OEM DATA
  25687. * binary blobs. The format of the data is per agreement between FW and
  25688. * userspace applications, with the binary blob beginning with a header
  25689. * that identifies to the FW the nature of the remaining data within the
  25690. * blob.
  25691. *
  25692. * Following this structure is the TLV:
  25693. * A_UINT8 data[]; <-- actual length in byte given by field data_len.
  25694. */
  25695. } wmi_oem_data_cmd_fixed_param;
  25696. typedef struct {
  25697. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
  25698. A_UINT32 data_len; /** length in byte of data[]. */
  25699. /* This structure is used to send REQ binary blobs
  25700. * from application/service to firmware where Host drv is pass through .
  25701. * Following this structure is the TLV:
  25702. * A_UINT8 data[]; <-- length in byte given by field data_len.
  25703. */
  25704. } wmi_nan_cmd_param;
  25705. typedef enum {
  25706. WMI_NAN_VENDOR1_REQ1 = 1,
  25707. } WMI_NAN_OEM_DATA_TYPE;
  25708. typedef struct {
  25709. /** oem_data_type:
  25710. * Indicate what kind of OEM-specific data is present in the
  25711. * oem_data_buffer[].
  25712. * Possible values are listed in the enum WMI_NAN_OEM_DATA_TYPE.
  25713. */
  25714. A_UINT32 oem_data_type;
  25715. /** oem_data_len:
  25716. * Actual length in bytes of the OEM-specific data within the
  25717. * oem_data_buffer[].
  25718. * Note that it is possible for a single message to contain multiple
  25719. * OEM opaque data blobs. In such cases, the oem_data_len field of
  25720. * nan_oem_data_hdr[0] not only specifies the size of the first such
  25721. * opaque blob, but furthermore specifies the offset in oem_data_buffer[]
  25722. * where the second opaque blob begins.
  25723. */
  25724. A_UINT32 oem_data_len;
  25725. } wmi_nan_oem_data_hdr;
  25726. typedef struct {
  25727. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_oem_data_cmd_fixed_param */
  25728. /* Following this structure are the below TLVs:
  25729. * - wmi_nan_oem_data_hdr nan_oem_data_hdr[];
  25730. * This TLV explains the type and size of the one or more OEM NAN
  25731. * opaque data blobs carried in this message.
  25732. * - A_UINT8 nan_oem_data_buffer[];
  25733. * This TLV holds the contents of the one or more OEM NAN opaque data
  25734. * blobs carried in this message.
  25735. */
  25736. } wmi_nan_oem_data_cmd_fixed_param;
  25737. #define WMI_NAN_GET_RANGING_INITIATOR_ROLE(flag) WMI_GET_BITS(flag, 0, 1)
  25738. #define WMI_NAN_SET_RANGING_INITIATOR_ROLE(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  25739. #define WMI_NAN_GET_RANGING_RESPONDER_ROLE(flag) WMI_GET_BITS(flag, 1, 1)
  25740. #define WMI_NAN_SET_RANGING_RESPONDER_ROLE(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  25741. #define WMI_NAN_GET_NAN_6G_DISABLE(flag) WMI_GET_BITS(flag, 2, 1)
  25742. #define WMI_NAN_SET_NAN_6G_DISABLE(flag, val) WMI_SET_BITS(flag, 2, 1, val)
  25743. typedef struct {
  25744. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_host_config_param */
  25745. A_UINT32 nan_2g_disc_disable:1; /** This bit when set to 1 indicate NAN 2G discovery should be disabled */
  25746. A_UINT32 nan_5g_disc_disable:1; /** This bit when set to 1 indicate NAN 5G discovery should be disabled */
  25747. A_UINT32 reserved:30;
  25748. /** Flags: refer to WMI_NAN_GET/SET macros
  25749. * Bit 0 -> Nan ranging initiator role (0 - Disable, 1 - Enable)
  25750. * Bit 1 -> Nan ranging responder role (0 - Disable, 1 - Enable)
  25751. * Bit 2 -> Nan 6 GHz support (1 - Disable, 0 - Enable)
  25752. * Bits 3-31 -> Reserved
  25753. */
  25754. A_UINT32 flags;
  25755. } wmi_nan_host_config_param_PROTOTYPE;
  25756. #define wmi_nan_host_config_param wmi_nan_host_config_param_PROTOTYPE
  25757. typedef struct {
  25758. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
  25759. A_UINT32 data_len; /** length in byte of data[]. */
  25760. /* This structure is used to send REQ binary blobs
  25761. * from firmware to application/service where Host drv is pass through .
  25762. * Following this structure is the TLV:
  25763. * A_UINT8 data[]; <-- length in byte given by field data_len.
  25764. */
  25765. } wmi_nan_event_hdr;
  25766. typedef struct {
  25767. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_oem_data_event_fixed_param */
  25768. /* Following this structure are the below TLVs:
  25769. * - wmi_nan_oem_data_hdr nan_oem_data_hdr[];
  25770. * This TLV explains the type and size of the one or more OEM NAN
  25771. * opaque data blobs carried in this message.
  25772. * - A_UINT8 nan_oem_data_buffer[];
  25773. * This TLV holds the contents of the one or more OEM NAN opaque data
  25774. * blobs carried in this message.
  25775. */
  25776. } wmi_nan_oem_data_event_fixed_param;
  25777. typedef struct {
  25778. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_info */
  25779. 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 */
  25780. 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 */
  25781. A_UINT32 reserved:31;
  25782. 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 */
  25783. } wmi_nan_event_info_PROTOTYPE;
  25784. #define wmi_nan_event_info wmi_nan_event_info_PROTOTYPE
  25785. /**
  25786. * Event to indicate NAN discovery interface created
  25787. */
  25788. typedef struct {
  25789. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param */
  25790. A_UINT32 tlv_header;
  25791. /** Unique id identifying the VDEV */
  25792. A_UINT32 vdev_id;
  25793. /** NAN interface MAC address */
  25794. wmi_mac_addr nan_interface_macaddr;
  25795. } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
  25796. #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
  25797. /**
  25798. * Event to indicate NAN discovery interface deleted
  25799. */
  25800. typedef struct {
  25801. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param */
  25802. A_UINT32 tlv_header;
  25803. /** Unique id identifying the VDEV */
  25804. A_UINT32 vdev_id;
  25805. } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
  25806. #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
  25807. /**
  25808. * Event to indicate NAN device started new cluster
  25809. */
  25810. typedef struct {
  25811. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param */
  25812. A_UINT32 tlv_header;
  25813. /** Unique id identifying the VDEV */
  25814. A_UINT32 vdev_id;
  25815. /** NAN Cluster ID */
  25816. A_UINT32 nan_cluster_id;
  25817. } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
  25818. #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
  25819. /**
  25820. * Event to indicate NAN device joined to cluster
  25821. */
  25822. typedef struct {
  25823. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param */
  25824. A_UINT32 tlv_header;
  25825. /** Unique id identifying the VDEV */
  25826. A_UINT32 vdev_id;
  25827. /** NAN Cluster ID */
  25828. A_UINT32 nan_cluster_id;
  25829. } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
  25830. #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
  25831. typedef struct {
  25832. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_dmesg_event_fixed_param */
  25833. A_UINT32 tlv_header;
  25834. /** length in byte of msg[]. */
  25835. A_UINT32 msg_len;
  25836. /* Following this structure is the TLV:
  25837. * A_UINT8 msg[]; <-- length in byte given by field data_len.
  25838. * This data contains the string message which will be given to Host to dump it to kernel logs.
  25839. */
  25840. } wmi_nan_dmesg_event_fixed_param;
  25841. typedef struct {
  25842. /** TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_nan_capabilities */
  25843. A_UINT32 tlv_header;
  25844. /** Maximum number of ndp sessions supported by the Firmware */
  25845. A_UINT32 max_ndp_sessions;
  25846. /** Maximum number of nan pairing sessions supported by the Firmware */
  25847. A_UINT32 max_pairing_sessions;
  25848. } wmi_nan_capabilities;
  25849. /** NAN DATA CMD's */
  25850. /**
  25851. * NAN Data get capabilities req
  25852. */
  25853. typedef struct {
  25854. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param */
  25855. A_UINT32 tlv_header;
  25856. /** unique id generated in upper layer for the transaction */
  25857. A_UINT32 transaction_id;
  25858. } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
  25859. #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
  25860. /**
  25861. * NDP Response code
  25862. */
  25863. typedef enum {
  25864. NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
  25865. NDP_RSP_CODE_REQUEST_REJECT = 0x01,
  25866. NDP_RSP_CODE_REQUEST_DEFER = 0x02,
  25867. } wmi_ndp_rsp_code_PROTOTYPE;
  25868. #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
  25869. /**
  25870. * NDP Channel configuration type
  25871. */
  25872. typedef enum {
  25873. WMI_NDP_CHANNEL_NOT_REQUESTED = 0, /* Channel will not configured */
  25874. WMI_NDP_REQUEST_CHANNEL_SETUP = 1, /* Channel will be provided and is optional/hint */
  25875. WMI_NDP_FORCE_CHANNEL_SETUP = 2/* NDP must start on the provided channel */
  25876. } wmi_ndp_channel_cfg_PROTOTYPE;
  25877. /*
  25878. * The WMI_NDP_IPV6_INTF_ADDR_LEN macro cannot be changed without breaking
  25879. * WMI compatibility.
  25880. */
  25881. #define WMI_NDP_IPV6_INTF_ADDR_LEN 16
  25882. typedef struct {
  25883. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_transport_ip_param */
  25884. /* Presence of ipv6_intf_addr */
  25885. A_UINT32 ipv6_addr_present;
  25886. /* Presence of transport Port */
  25887. A_UINT32 trans_port_present;
  25888. /* Presence of transport Protocol */
  25889. A_UINT32 trans_proto_present;
  25890. /* ipv6 Interface address */
  25891. A_UINT8 ipv6_intf_addr[WMI_NDP_IPV6_INTF_ADDR_LEN];
  25892. /* Transport Port */
  25893. A_UINT32 transport_port;
  25894. /* Transport Protocol */
  25895. A_UINT32 transport_protocol;
  25896. } wmi_ndp_transport_ip_param;
  25897. #define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
  25898. typedef struct {
  25899. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_channel_info */
  25900. A_UINT32 mac_id; /* mac_id associated with ndp channel at same index */
  25901. } wmi_ndp_channel_info_PROTOTYPE;
  25902. #define wmi_ndp_channel_info wmi_ndp_channel_info_PROTOTYPE
  25903. typedef struct {
  25904. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_event_param */
  25905. A_UINT32 vdev_id; /* NDI VDEV ID */
  25906. 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 */
  25907. A_UINT32 reserved:31;
  25908. } wmi_ndp_event_param_PROTOTYPE;
  25909. #define wmi_ndp_event_param wmi_ndp_event_param_PROTOTYPE
  25910. /**
  25911. * NDP Initiator requesting a data session
  25912. */
  25913. typedef struct {
  25914. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param */
  25915. A_UINT32 tlv_header;
  25916. /** Unique id identifying the VDEV */
  25917. A_UINT32 vdev_id;
  25918. /** unique id generated in upper layer for the transaction */
  25919. A_UINT32 transaction_id;
  25920. /** Unique Instance Id identifying the Responder's service */
  25921. A_UINT32 service_instance_id;
  25922. /** Discovery MAC addr of the publisher/peer */
  25923. wmi_mac_addr peer_discovery_mac_addr;
  25924. /** Actual number of bytes in TLV ndp_cfg */
  25925. A_UINT32 ndp_cfg_len;
  25926. /** Actual number of bytes in TLV ndp_app_info */
  25927. A_UINT32 ndp_app_info_len;
  25928. /** NDP channel configuration type defined in wmi_ndp_channel_cfg */
  25929. A_UINT32 ndp_channel_cfg;
  25930. /** NAN Cipher Suite Shared Key */
  25931. A_UINT32 nan_csid;
  25932. /** Actual number of bytes in TLV ndp_pmk */
  25933. A_UINT32 nan_pmk_len;
  25934. /** Actual number of bytes in TLV ndp_passphrase */
  25935. A_UINT32 nan_passphrase_len;
  25936. /** Actual number of bytes in TLV nan_servicename */
  25937. A_UINT32 nan_servicename_len;
  25938. /** NAN Cipher Suite Capability field */
  25939. A_UINT32 nan_csid_cap;
  25940. /** GTK protection is required for the NDP */
  25941. A_UINT32 nan_gtk_required;
  25942. /**
  25943. * TLV (tag length value) parameters follow the ndp_initiator_req
  25944. * structure. The TLV's are:
  25945. * wmi_channel channel;
  25946. * A_UINT8 ndp_cfg[];
  25947. * A_UINT8 ndp_app_info[];
  25948. * A_UINT8 ndp_pmk[];
  25949. * A_INT8 ndp_passphrase[];
  25950. * A_INT8 nan_servicename[];
  25951. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  25952. */
  25953. } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
  25954. #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
  25955. /**
  25956. * Initiate a data response on the responder side
  25957. * for data request indication from the peer
  25958. */
  25959. typedef struct {
  25960. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param */
  25961. A_UINT32 tlv_header;
  25962. /** Unique id identifying the VDEV */
  25963. A_UINT32 vdev_id;
  25964. /** unique id generated in upper layer for the transaction */
  25965. A_UINT32 transaction_id;
  25966. /**
  25967. * Unique token Id generated on the initiator/responder
  25968. * side used for a NDP session between two NAN devices
  25969. */
  25970. A_UINT32 ndp_instance_id;
  25971. /** Response Code defined in wmi_ndp_rsp_code */
  25972. A_UINT32 rsp_code;
  25973. /** Number of bytes in TLV ndp_cfg */
  25974. A_UINT32 ndp_cfg_len;
  25975. /** Number of bytes in TLV ndp_app_info */
  25976. A_UINT32 ndp_app_info_len;
  25977. /** NAN Cipher Suite Shared Key */
  25978. A_UINT32 nan_csid;
  25979. /** Actual number of bytes in TLV ndp_pmk */
  25980. A_UINT32 nan_pmk_len;
  25981. /** Actual number of bytes in TLV ndp_passphrase */
  25982. A_UINT32 nan_passphrase_len;
  25983. /** Actual number of bytes in TLV nan_servicename */
  25984. A_UINT32 nan_servicename_len;
  25985. /** NAN Cipher Suite Capability field */
  25986. A_UINT32 nan_csid_cap;
  25987. /** GTK protection is required for the NDP */
  25988. A_UINT32 nan_gtk_required;
  25989. /**
  25990. * TLV (tag length value) parameters follow the ndp_responder_req
  25991. * structure. The TLV's are:
  25992. * A_UINT8 ndp_cfg[];
  25993. * A_UINT8 ndp_app_info[];
  25994. * A_UINT8 ndp_pmk[];
  25995. * A_INT8 ndp_passphrase[];
  25996. * A_INT8 nan_servicename[];
  25997. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  25998. */
  25999. } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
  26000. #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
  26001. /**
  26002. * NDP end type
  26003. */
  26004. typedef enum {
  26005. WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
  26006. WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
  26007. WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
  26008. WMI_NDP_END_TYPE_DATA_INACTIVITY = 0x03,
  26009. } wmi_ndp_end_type_PROTOTYPE;
  26010. #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
  26011. /**
  26012. * NDP end reason code
  26013. */
  26014. typedef enum {
  26015. WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
  26016. WMI_NDP_END_REASON_INACTIVITY = 0x01,
  26017. WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
  26018. WMI_NDP_END_REASON_DATA_INACTIVITY = 0x03,
  26019. } wmi_ndp_end_reason_code_PROTOTYPE;
  26020. #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
  26021. /**
  26022. * NDP end request
  26023. */
  26024. typedef struct {
  26025. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
  26026. A_UINT32 tlv_header;
  26027. /** NDP instance id */
  26028. A_UINT32 ndp_instance_id;
  26029. /** vdev_id valid flag */
  26030. A_UINT32 vdev_id_valid;
  26031. /** vdev id */
  26032. A_UINT32 vdev_id;
  26033. } wmi_ndp_end_req_PROTOTYPE;
  26034. #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
  26035. typedef struct {
  26036. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_cmd_param */
  26037. A_UINT32 vdev_id; /* NDI VDEV ID */
  26038. A_UINT32 ndp_disable:1; /** This bit when set to 1 indicates to terminate all NDPs associated with NDI vdev ID */
  26039. A_UINT32 reserved:31;
  26040. } wmi_ndp_cmd_param_PROTOTYPE;
  26041. #define wmi_ndp_cmd_param wmi_ndp_cmd_param_PROTOTYPE
  26042. /**
  26043. * NDP End request
  26044. */
  26045. typedef struct {
  26046. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param */
  26047. A_UINT32 tlv_header;
  26048. /** unique id generated in upper layer for the transaction */
  26049. A_UINT32 transaction_id;
  26050. /**
  26051. * TLV (tag length value) parameters follow the ndp_end_req
  26052. * structure. The TLV's are:
  26053. * wmi_ndp_end_req ndp_end_req_list[];
  26054. */
  26055. } wmi_ndp_end_req_fixed_param_PROTOTYPE;
  26056. #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
  26057. /* NAN DATA RSP EVENTS */
  26058. /**
  26059. * Event to indicate NAN Data Interface capabilities cmd
  26060. */
  26061. typedef struct {
  26062. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param */
  26063. A_UINT32 tlv_header;
  26064. /** Copy of transaction_id received in wmi_ndi_get_cap_req */
  26065. A_UINT32 transaction_id;
  26066. /** Max ndi interface support */
  26067. A_UINT32 max_ndi_interfaces;
  26068. /** Max ndp sessions can support */
  26069. A_UINT32 max_ndp_sessions;
  26070. /** Max number of peer's per ndi */
  26071. A_UINT32 max_peers_per_ndi;
  26072. /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
  26073. A_UINT32 nan_data_supported_bands;
  26074. } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
  26075. #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
  26076. /**
  26077. * NDP command response code
  26078. */
  26079. typedef enum {
  26080. NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
  26081. NDP_CMD_RSP_STATUS_ERROR = 0x01,
  26082. } wmi_ndp_cmd_rsp_status_PROTOTYPE;
  26083. #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
  26084. /**
  26085. * Event response for wmi_ndp_initiator_req
  26086. */
  26087. typedef struct {
  26088. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param */
  26089. A_UINT32 tlv_header;
  26090. /** Unique id identifying the VDEV */
  26091. A_UINT32 vdev_id;
  26092. /** Copy of transaction_id received in wmi_ndp_initiator_req */
  26093. A_UINT32 transaction_id;
  26094. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  26095. A_UINT32 rsp_status;
  26096. A_UINT32 reason_code;
  26097. /**
  26098. * Unique token Id generated on the initiator/responder
  26099. * side used for a NDP session between two NAN devices
  26100. */
  26101. A_UINT32 ndp_instance_id;
  26102. } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
  26103. #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
  26104. /**
  26105. * Event response for wmi_ndp_responder_req cmd
  26106. */
  26107. typedef struct {
  26108. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param */
  26109. A_UINT32 tlv_header;
  26110. /** Unique id identifying the VDEV */
  26111. A_UINT32 vdev_id;
  26112. /** Copy of transaction_id received in wmi_ndp_responder_req */
  26113. A_UINT32 transaction_id;
  26114. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  26115. A_UINT32 rsp_status;
  26116. A_UINT32 reason_code;
  26117. /**
  26118. * Unique token Id generated on the initiator/responder
  26119. * side used for a NDP session between two NAN devices
  26120. */
  26121. A_UINT32 ndp_instance_id;
  26122. /** NDI mac address of the peer */
  26123. wmi_mac_addr peer_ndi_mac_addr;
  26124. /** Host can create peer if this entry is TRUE */
  26125. A_UINT32 create_peer;
  26126. } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
  26127. #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
  26128. /**
  26129. * Active ndp instance id
  26130. */
  26131. typedef struct {
  26132. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_active_ndp_instance_id */
  26133. A_UINT32 tlv_header;
  26134. /** NDP instance id */
  26135. A_UINT32 ndp_instance_id;
  26136. } wmi_active_ndp_instance_id_PROTOTYPE;
  26137. #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
  26138. /**
  26139. * NDP end response per ndi
  26140. */
  26141. typedef struct {
  26142. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi */
  26143. A_UINT32 tlv_header;
  26144. /** Unique id identifying the VDEV */
  26145. A_UINT32 vdev_id;
  26146. /** Peer MAC addr */
  26147. wmi_mac_addr peer_mac_addr;
  26148. /** Number of active ndps on this ndi */
  26149. A_UINT32 num_active_ndps_on_ndi;
  26150. } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
  26151. #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
  26152. /**
  26153. * Event response for wmi_ndp_end_req cmd
  26154. */
  26155. typedef struct {
  26156. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param */
  26157. A_UINT32 tlv_header;
  26158. /** Copy of transaction_id received in wmi_ndp_end_req */
  26159. A_UINT32 transaction_id;
  26160. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  26161. A_UINT32 rsp_status;
  26162. A_UINT32 reason_code;
  26163. /**
  26164. * TLV (tag length value) parameters follow the ndp_end_rsp
  26165. * structure. The TLV's are:
  26166. * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
  26167. * wmi_active_ndp_instance_id active_ndp_instances_id[];
  26168. */
  26169. } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
  26170. #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
  26171. /** NAN DATA EVENTS */
  26172. /**
  26173. * NDP self role
  26174. */
  26175. typedef enum {
  26176. WMI_NDP_INITIATOR_ROLE,
  26177. WMI_NDP_RESPONDER_ROLE,
  26178. } wmi_ndp_self_role_PROTOTYPE;
  26179. #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
  26180. /**
  26181. * NDP accept policy
  26182. */
  26183. typedef enum {
  26184. WMI_NDP_ACCEPT_POLICY_NONE,
  26185. WMI_NDP_ACCEPT_POLICY_ALL,
  26186. } wmi_ndp_accept_policy_PROTOTYPE;
  26187. #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
  26188. /**
  26189. * Event indication received on the responder side when a NDP Initiator request/
  26190. * NDP session is initiated on the Initiator side (self role will be NDP_RESPONDER_ROLE)
  26191. *
  26192. * Event indication received on the initiator side when a
  26193. * NDP responder request on the Initiator side (self role will be NDP_INITIATOR_ROLE)
  26194. */
  26195. typedef struct {
  26196. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param */
  26197. A_UINT32 tlv_header;
  26198. /** Unique id identifying the VDEV */
  26199. A_UINT32 vdev_id;
  26200. /** Self NDP Role defined in wmi_ndp_self_role */
  26201. A_UINT32 self_ndp_role;
  26202. /** Accept policy defined in wmi_ndp_accept_policy */
  26203. A_UINT32 accept_policy;
  26204. /** Unique Instance Id corresponding to a service/session. */
  26205. A_UINT32 service_instance_id;
  26206. /** Discovery MAC addr of the peer/initiator */
  26207. wmi_mac_addr peer_discovery_mac_addr;
  26208. /** NDI mac address of the peer */
  26209. wmi_mac_addr peer_ndi_mac_addr;
  26210. /**
  26211. * Unique token Id generated on the initiator/responder
  26212. * side used for a NDP session between two NAN devices
  26213. */
  26214. A_UINT32 ndp_instance_id;
  26215. /** Number of bytes in TLV wmi_ndp_cfg */
  26216. A_UINT32 ndp_cfg_len;
  26217. /** Number of bytes in TLV wmi_ndp_app_info */
  26218. A_UINT32 ndp_app_info_len;
  26219. /** Peer NAN Cipher Suite Shared Key */
  26220. A_UINT32 nan_csid;
  26221. /** Actual number of bytes in TLV nan_scid */
  26222. A_UINT32 nan_scid_len;
  26223. /** Self NDI mac address */
  26224. wmi_mac_addr self_ndi_mac_addr;
  26225. /** Number of bytes in TLV service_id */
  26226. A_UINT32 service_id_len;
  26227. /** NAN Cipher Suite Capability field */
  26228. A_UINT32 nan_csid_cap;
  26229. /** GTK protection is required for the NDP */
  26230. A_UINT32 nan_gtk_required;
  26231. /**
  26232. * TLV (tag length value) parameters follow the ndp_indication
  26233. * structure. The TLV's are:
  26234. * A_UINT8 ndp_cfg[];
  26235. * A_UINT8 ndp_app_info[];
  26236. * A_UINT8 nan_scid[];
  26237. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  26238. * A_UINT8 service_id[service_id_len]; <- holds a single service ID of an
  26239. * indeterminate number of bytes (most likely 6 bytes)
  26240. */
  26241. } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
  26242. #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
  26243. /**
  26244. * Event indication of data confirm is received on both
  26245. * initiator and responder side confirming a NDP session
  26246. */
  26247. typedef struct {
  26248. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param */
  26249. A_UINT32 tlv_header;
  26250. /** Unique id identifying the VDEV */
  26251. A_UINT32 vdev_id;
  26252. /**
  26253. * Unique token Id generated on the initiator/responder
  26254. * side used for a NDP session between two NAN devices
  26255. */
  26256. A_UINT32 ndp_instance_id;
  26257. /** NDI mac address of the peer (required to derive target ipv6 address) */
  26258. wmi_mac_addr peer_ndi_mac_addr;
  26259. /** Response Code defined in wmi_ndp_rsp_code */
  26260. A_UINT32 rsp_code;
  26261. /** Number of bytes in TLV wmi_ndp_cfg */
  26262. A_UINT32 ndp_cfg_len;
  26263. /** Number of bytes in TLV wmi_ndp_app_info */
  26264. A_UINT32 ndp_app_info_len;
  26265. /** Reason Code */
  26266. A_UINT32 reason_code;
  26267. /** Number of active ndps on this peer */
  26268. A_UINT32 num_active_ndps_on_peer;
  26269. /** Number of channels on this peer */
  26270. A_UINT32 num_ndp_channels;
  26271. /**
  26272. * TLV (tag length value) parameters follow the ndp_confirm
  26273. * structure. The TLV's are:
  26274. * A_UINT8 ndp_cfg[];
  26275. * A_UINT8 ndp_app_info[];
  26276. * wmi_channel ndp_channel_list[];
  26277. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  26278. * // since Nss is associated with the channel
  26279. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  26280. */
  26281. } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
  26282. #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
  26283. /**
  26284. * Event indication received on the initiator/responder side terminating a NDP session
  26285. */
  26286. typedef struct {
  26287. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_indication */
  26288. A_UINT32 tlv_header;
  26289. /** type defined in wmi_ndp_end_type */
  26290. A_UINT32 type;
  26291. /** Unique id identifying the VDEV */
  26292. A_UINT32 vdev_id;
  26293. /** reason_code defined in wmi_ndp_end_reason_code */
  26294. A_UINT32 reason_code;
  26295. /** NDP instance id */
  26296. A_UINT32 ndp_instance_id;
  26297. /** NDI MAC addr of the peer */
  26298. wmi_mac_addr peer_ndi_mac_addr;
  26299. /** Number of active ndps on this peer */
  26300. A_UINT32 num_active_ndps_on_peer;
  26301. } wmi_ndp_end_indication_PROTOTYPE;
  26302. #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
  26303. typedef struct
  26304. {
  26305. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndl_schedule_update_fixed_param */
  26306. /** Unique id identifying the VDEV */
  26307. A_UINT32 vdev_id;
  26308. /** peer MAC address */
  26309. wmi_mac_addr peer_macaddr;
  26310. /** Flags:
  26311. * Bit 0 -> Nss updated
  26312. * Bit 1 -> channel list updated
  26313. * Bits 2-31 -> Reserved
  26314. */
  26315. A_UINT32 flags;
  26316. /** num of channels */
  26317. A_UINT32 num_channels;
  26318. /** num of ndp instances */
  26319. A_UINT32 num_ndp_instances;
  26320. /**
  26321. * TLV (tag length value) parameters follow the ndl_schedule_update
  26322. * structure. The TLV's are:
  26323. * A_UINT32 ndp_instance_list[];
  26324. * wmi_channel ndl_channel_list[];
  26325. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  26326. * // since Nss is associate with a channel
  26327. */
  26328. } wmi_ndl_schedule_update_fixed_param_PROTOTYPE;
  26329. #define wmi_ndl_schedule_update_fixed_param wmi_ndl_schedule_update_fixed_param_PROTOTYPE
  26330. typedef struct {
  26331. A_UINT32 tlv_header;
  26332. A_UINT32 num_data;
  26333. /* followed by WMITLV_TAG_ARRAY_BYTE */
  26334. } wmi_diag_data_container_event_fixed_param;
  26335. enum {
  26336. WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
  26337. WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
  26338. WMI_PDEV_PARAM_TXPOWER_REASON_MAX
  26339. };
  26340. #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
  26341. #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
  26342. #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
  26343. #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
  26344. #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
  26345. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
  26346. #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
  26347. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
  26348. #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
  26349. (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
  26350. #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
  26351. (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
  26352. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK 0x00000001
  26353. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT 0
  26354. #define SET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param, value) \
  26355. do { \
  26356. (param) &= ~PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK; \
  26357. (param) |= (value) << PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT; \
  26358. } while (0)
  26359. #define GET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param) \
  26360. (((param) & PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK) >> PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT)
  26361. /**
  26362. * This command is sent from WLAN host driver to firmware to
  26363. * notify the current modem power state. Host would receive a
  26364. * message from modem when modem is powered on. Host driver
  26365. * would then send this command to firmware. Firmware would then
  26366. * power on WCI-2 (UART) interface for LTE/MWS Coex.
  26367. *
  26368. * This command is only applicable for APQ platform which has
  26369. * modem on the platform. If firmware doesn't support MWS Coex,
  26370. * this command can be dropped by firmware.
  26371. *
  26372. * This is a requirement from modem team that WCN can't toggle
  26373. * UART before modem is powered on.
  26374. */
  26375. typedef struct {
  26376. /** TLV tag and len; tag equals
  26377. * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
  26378. A_UINT32 tlv_header;
  26379. /** Modem power state parameter */
  26380. A_UINT32 modem_power_state;
  26381. } wmi_modem_power_state_cmd_param;
  26382. enum {
  26383. WMI_MODEM_STATE_OFF = 0,
  26384. WMI_MODEM_STATE_ON
  26385. };
  26386. /**
  26387. * This command is sent from WLAN host driver to firmware to
  26388. * notify the updated Specific Absorption Rate (SAR) limits.
  26389. * A critical regulation for FCC compliance, OEMs require methods to set
  26390. * limits on TX power of WLAN/WWAN.
  26391. * Host would receive instructions on what to set the limits per
  26392. * band/chain/modulation to, it would then interpret and send the limits
  26393. * to FW using this WMI message.
  26394. * Since it is possible to have too many commands to fit into one message,
  26395. * FW will keep receiving the messages, until it finds one with
  26396. * commit_limits = 1, at which point it will apply all the received
  26397. * specifications.
  26398. */
  26399. typedef struct {
  26400. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
  26401. A_UINT32 tlv_header;
  26402. /** when set to WMI_SAR_FEATURE_ON_*, enable SAR feature
  26403. * with BDF (SET_0 to 4) or WMI
  26404. * if set to WMI_SAR_FEATURE_OFF, disable feature;
  26405. * if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
  26406. */
  26407. A_UINT32 sar_enable;
  26408. /** number of items in sar_limits[] */
  26409. A_UINT32 num_limit_rows;
  26410. /** once received and is set to 1, FW will calculate the power limits
  26411. * and send set_power command to apply them.
  26412. * Otherwise just update local values stored in FW until a future msg
  26413. * with commit_limits=1 arrives.
  26414. */
  26415. A_UINT32 commit_limits;
  26416. /**
  26417. * TLV (tag length value) parameters follow the sar_limit_cmd_row
  26418. * structure. The TLV's are:
  26419. * wmi_sar_limit_cmd_row sar_limits[];
  26420. */
  26421. } wmi_sar_limits_cmd_fixed_param;
  26422. enum wmi_sar_feature_state_flags {
  26423. WMI_SAR_FEATURE_OFF = 0,
  26424. WMI_SAR_FEATURE_ON_SET_0,
  26425. WMI_SAR_FEATURE_ON_SET_1,
  26426. WMI_SAR_FEATURE_ON_SET_2,
  26427. WMI_SAR_FEATURE_ON_SET_3,
  26428. WMI_SAR_FEATURE_ON_SET_4,
  26429. WMI_SAR_FEATURE_NO_CHANGE,
  26430. WMI_SAR_FEATURE_ON_USER_DEFINED,
  26431. WMI_SAR_FEATURE_ON_SAR_V2_0,
  26432. WMI_SAR_FEATURE_ON_SAR_V3,
  26433. };
  26434. typedef struct {
  26435. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
  26436. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  26437. * new band_id values .
  26438. */
  26439. A_UINT32 band_id;
  26440. A_UINT32 chain_id;
  26441. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  26442. A_UINT32 mod_id;
  26443. /**
  26444. * To be backwards-compatible with older code use a union with
  26445. * limit_value & limit_index as alternate names / interpretations
  26446. * of the same message information element.
  26447. * The older code still uses limit_value, while the new code will
  26448. * use limit_index.
  26449. * The interpretation of the field as value or index depends on
  26450. * WMI_SAR_FEATURE_ON_*
  26451. * WMI_SAR_FEATURE_ON_SAR_V2_0 will use it as index, other case
  26452. * still use it as value.
  26453. */
  26454. union {
  26455. /** actual power limit value, in steps of 0.5 dBm */
  26456. A_UINT32 limit_value;
  26457. A_UINT32 limit_index;
  26458. };
  26459. /** in case the OEM doesn't care about one of the qualifiers from above,
  26460. * the bit for that qualifier within the validity_bitmap can be set to 0
  26461. * so that limit is applied to all possible cases of this qualifier
  26462. * (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
  26463. * treated as a wildcard).
  26464. * Current masks:
  26465. * WMI_SAR_BAND_ID_VALID_MASK
  26466. * WMI_SAR_CHAIN_ID_VALID_MASK
  26467. * WMI_SAR_MOD_ID_VALID_MASK
  26468. * Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
  26469. * it means apply same limit_value to both WMI_SAR_MOD_CCK and
  26470. * WMI_SAR_MOD_OFDM cases.
  26471. */
  26472. A_UINT32 validity_bitmap;
  26473. } wmi_sar_limit_cmd_row;
  26474. enum wmi_sar_band_id_flags {
  26475. WMI_SAR_2G_ID = 0,
  26476. WMI_SAR_5G_ID
  26477. };
  26478. enum wmi_sar_mod_id_flags {
  26479. WMI_SAR_MOD_CCK = 0,
  26480. WMI_SAR_MOD_OFDM
  26481. };
  26482. /**
  26483. * This message is sent from FW to WLAN host to inform the host of the
  26484. * updated Specific Absorption Rate (SAR) limits currently in use.
  26485. */
  26486. typedef struct {
  26487. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_event_param */
  26488. A_UINT32 tlv_header;
  26489. /** when set to WMI_SAR_FEATURE_ON_*, SAR feature is enabled
  26490. * with BDF (SET_0 to 4) or WMI
  26491. * if set to WMI_SAR_FEATURE_OFF, feature is disabled;
  26492. */
  26493. A_UINT32 sar_enable;
  26494. /**
  26495. * number of items in sar_limits[].
  26496. * used when sar_enable == WMI_SAR_FEATURE_ON_USER_DEFINED.
  26497. * Should be zero if any of the BDF sets is activated.
  26498. */
  26499. A_UINT32 num_limit_rows;
  26500. /**
  26501. * TLV (tag length value) parameters follow the sar_get_limit_event_row
  26502. * structure. The TLV's are:
  26503. * wmi_sar_get_limit_event_row sar_limits[num_limit_rows];
  26504. */
  26505. } wmi_sar_get_limits_event_fixed_param;
  26506. typedef struct {
  26507. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limit_event_row */
  26508. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  26509. * new band_id values .
  26510. */
  26511. A_UINT32 band_id;
  26512. A_UINT32 chain_id;
  26513. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  26514. A_UINT32 mod_id;
  26515. /** actual power limit value, in steps of 0.5 dBm */
  26516. A_UINT32 limit_value;
  26517. } wmi_sar_get_limit_event_row;
  26518. #define WMI_SAR_BAND_ID_VALID_MASK (0x1)
  26519. #define WMI_SAR_CHAIN_ID_VALID_MASK (0x2)
  26520. #define WMI_SAR_MOD_ID_VALID_MASK (0x4)
  26521. #define WMI_SET_SAR_BAND_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
  26522. #define WMI_SET_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
  26523. #define WMI_SET_SAR_MOD_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
  26524. #define WMI_IS_SAR_BAND_ID_VALID(bitmap) ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
  26525. #define WMI_IS_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
  26526. #define WMI_IS_SAR_MOD_ID_VALID(bitmap) ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
  26527. /**
  26528. * This command is sent from WLAN host driver to firmware to
  26529. * get current Specific Absorption Rate (SAR) limits status from firmware.
  26530. * The command does not require any parameters as of now.
  26531. */
  26532. typedef struct {
  26533. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_cmd_param */
  26534. A_UINT32 tlv_header;
  26535. /** currently no parameters are required. Reserved bit field for future use added */
  26536. /* All bits need to be set to 0 while it is a reserved field. */
  26537. A_UINT32 reserved;
  26538. } wmi_sar_get_limits_cmd_fixed_param;
  26539. #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
  26540. #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
  26541. /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
  26542. generated whenever firmware roamed to new AP silently and
  26543. (a) If the host is awake, FW sends the event to the host immediately .
  26544. (b) If host is in sleep then either
  26545. (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
  26546. command to FW (part of host wake up sequence from low power mode) before sending the event host.
  26547. (2) data/mgmt frame is received from roamed AP, which needs to return to host
  26548. */
  26549. #define GTK_OFFLOAD_KCK_EXTENDED_BYTES 32
  26550. typedef struct {
  26551. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
  26552. A_UINT32 tlv_header;
  26553. A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
  26554. A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
  26555. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
  26556. } wmi_key_material;
  26557. typedef struct {
  26558. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material_ext */
  26559. A_UINT32 tlv_header;
  26560. /*
  26561. * key_buffer contains kck,kck2,kek,kek2,replay counter, in order.
  26562. * If both the below kck_len and kek_len fields are 0x0, the split
  26563. * between kck vs. kek should be inferred based on akmp.
  26564. */
  26565. A_UINT8 key_buffer[GTK_OFFLOAD_KEK_EXTENDED_BYTES+GTK_OFFLOAD_KCK_EXTENDED_BYTES+GTK_REPLAY_COUNTER_BYTES];
  26566. /* length of kck in key_buffer */
  26567. A_UINT32 kck_len;
  26568. /* length of kek in key_buffer */
  26569. A_UINT32 kek_len;
  26570. } wmi_key_material_ext;
  26571. typedef struct {
  26572. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
  26573. /** Unique id identifying the VDEV on which roaming is done by firmware */
  26574. A_UINT32 vdev_id;
  26575. /** auth_status: connected or authorized */
  26576. A_UINT32 auth_status;
  26577. /** roam_reason:
  26578. * bits 0-3 roam trigger reason LSbs - see WMI_ROAM_TRIGGER_REASON_XXX
  26579. * bits 4-5 subnet status - see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
  26580. * bit 6 HW mode status, set 1 to indicate host to schedule
  26581. * HW mode change, see WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE.
  26582. * bit 7 0x1 to show bits 8-15 are valid
  26583. * bits 8-15 full WMI_ROAM_TRIGGER_REASON_ID/WMI_ROAM_TRIGGER_EXT_REASON_ID
  26584. * since 4 bits are not enough.
  26585. */
  26586. A_UINT32 roam_reason;
  26587. /** associated AP's RSSI calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
  26588. A_UINT32 rssi;
  26589. /** MAC address of roamed AP */
  26590. wmi_mac_addr bssid; /* BSSID */
  26591. /** whether the frame is beacon or probe rsp */
  26592. A_UINT32 is_beacon;
  26593. /** the length of beacon/probe rsp */
  26594. A_UINT32 bcn_probe_rsp_len;
  26595. /** the length of reassoc rsp */
  26596. A_UINT32 reassoc_rsp_len;
  26597. /** the length of reassoc req */
  26598. A_UINT32 reassoc_req_len;
  26599. /**
  26600. * maximum allowed Tx power (in dBm) for this connection.
  26601. * max_allowed_tx_power = 0 dBm means value is not specified.
  26602. */
  26603. A_INT32 max_allowed_tx_power;
  26604. /** unique id to identify mac's TSF register */
  26605. A_UINT32 mac_tsf_id;
  26606. /** ignore mac_tsf_id unless mac_tsf_id_valid is set */
  26607. A_UINT32 mac_tsf_id_valid;
  26608. /**
  26609. * TLV (tag length value) parameters follows roam_synch_event
  26610. * The TLV's are:
  26611. * A_UINT8 bcn_probe_rsp_frame[bcn_probe_resp_len];
  26612. * A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
  26613. * wmi_channel chan;
  26614. * wmi_key_material key[];
  26615. * A_UINT32 status[]; subnet changed status not being used currently.
  26616. * Will pass the information using roam_status.
  26617. * A_UINT8 reassoc_req_frame[reassoc_req_len];
  26618. * wmi_pdev_hw_mode_transition_event_fixed_param
  26619. * hw_mode_transition_fixed_param[];
  26620. * wmi_pdev_set_hw_mode_response_vdev_mac_entry
  26621. * wmi_pdev_set_hw_mode_response_vdev_mac_mapping[];
  26622. * wmi_roam_fils_synch_tlv_param roam_fils_synch_info[];
  26623. * wmi_key_material_ext key_ext[];
  26624. * wmi_roam_pmk_cache_synch_tlv_param roam_pmk_cache_synch_info[];
  26625. * wmi_pdev_band_to_mac mac_freq_mapping[];
  26626. */
  26627. } wmi_roam_synch_event_fixed_param;
  26628. /**
  26629. * The WMI_ROAM_SYNCH_FRAME_EVENTID message is used in conjunction with the
  26630. * WMI_ROAM_SYNCH_EVENTID message. The former will be sent 1st followed by
  26631. * the latter for cases where the WMI_ROAM_SYNCH_EVENTID message size would
  26632. * exceed 2K. The more_frag field in the WMI_ROAM_SYNCH_FRAME_EVENTID informs
  26633. * the host whether more WMI_ROAM_SYNCH_FRAME_EVENTID messages would follow;
  26634. * after the WMI_ROAM_SYNCH_FRAME_EVENTID messages the target sends the
  26635. * WMI_ROAM_SYNCH_EVENTID with bcn_probe_rsp_len, reassoc_rsp_len, and
  26636. * reassoc_rsp_len set to 0.
  26637. */
  26638. typedef struct {
  26639. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_frame_event_fixed_param */
  26640. /** Unique id identifying the VDEV on which roaming is done by firmware */
  26641. A_UINT32 vdev_id;
  26642. /** More frags to follow? */
  26643. A_UINT32 more_frag;
  26644. /** whether the frame is beacon or probe rsp */
  26645. A_UINT32 is_beacon;
  26646. /** the length of beacon/probe rsp */
  26647. A_UINT32 bcn_probe_rsp_len;
  26648. /** the length of reassoc rsp */
  26649. A_UINT32 reassoc_rsp_len;
  26650. /** the length of reassoc req */
  26651. A_UINT32 reassoc_req_len;
  26652. A_INT32 bcn_probe_resp_rssi; /* RSSI units dBm */
  26653. /**
  26654. * TLV (tag length value) parameters follows roam_synch_event
  26655. * The TLV's are:
  26656. * A_UINT8 bcn_probe_rsp_frame[bcn_probe_rsp_len];
  26657. * A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
  26658. * A_UINT8 reassoc_req_frame[reassoc_req_len];
  26659. */
  26660. } wmi_roam_synch_frame_event_fixed_param;
  26661. typedef struct {
  26662. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_frame_event_fixed_param */
  26663. /** Unique id identifying the VDEV on which roaming is done by firmware */
  26664. A_UINT32 vdev_id;
  26665. /* Exact frame length without considering 4 byte alignment */
  26666. A_UINT32 frame_length;
  26667. A_INT32 rssi; /* Units in dBm */
  26668. /* The frequency on which to transmit. */
  26669. A_UINT32 primary_channel_freq; /* MHz units */
  26670. /**
  26671. * TLV (tag length value) parameters follows roam_frame_event
  26672. * The TLV's are:
  26673. * A_UINT8 frame[frame_length];
  26674. */
  26675. } wmi_roam_frame_event_fixed_param;
  26676. #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
  26677. typedef struct {
  26678. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
  26679. A_UINT32 tlv_header;
  26680. /** MAC address of the peer for which the estimated link speed is required. */
  26681. wmi_mac_addr peer_macaddr;
  26682. /* Set to 1 only if vdev_id field is valid */
  26683. A_UINT32 valid_vdev_id;
  26684. /* VDEV to which the peer belongs to */
  26685. A_UINT32 vdev_id;
  26686. } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
  26687. typedef struct {
  26688. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
  26689. A_UINT32 tlv_header;
  26690. /** MAC address of the peer for which the estimated link speed is required.
  26691. */
  26692. wmi_mac_addr peer_macaddr;
  26693. /* Estimated link speed in kbps.
  26694. * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
  26695. */
  26696. A_UINT32 est_linkspeed_kbps;
  26697. /* Set to 1 only if vdev_id field is valid */
  26698. A_UINT32 valid_vdev_id;
  26699. /* VDEV to which the peer belongs to */
  26700. A_UINT32 vdev_id;
  26701. } wmi_peer_estimated_linkspeed_event_fixed_param;
  26702. typedef struct {
  26703. A_UINT32 tlv_header; /* TLV tag and len; tag equals */
  26704. /* vdev ID */
  26705. A_UINT32 vdev_id;
  26706. A_UINT32 data_len; /** length in byte of data[]. */
  26707. /* This structure is used to send REQ binary blobs
  26708. * from application/service to firmware where Host drv is pass through .
  26709. * Following this structure is the TLV:
  26710. * A_UINT8 data[]; <-- length in byte given by field data_len.
  26711. * A_UINT32 vdev_id_bitmap[];
  26712. * This array is present and non-zero length in MLO case, stats should
  26713. * only be provided from the vdev_id_bitmap in the bitmap when it is
  26714. * present.
  26715. */
  26716. } wmi_req_stats_ext_cmd_fixed_param;
  26717. typedef struct {
  26718. /** TLV tag and len; tag equals
  26719. * WMITLV_TAG_STRUC_wmi_partner_link_stats */
  26720. A_UINT32 tlv_header;
  26721. A_UINT32 vdev_id;
  26722. A_UINT32 data_length; /* length of the stats for this vdev */
  26723. A_UINT32 offset; /* offset of the stats from partner_link_data for this vdev */
  26724. } wmi_partner_link_stats;
  26725. typedef struct {
  26726. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
  26727. A_UINT32 vdev_id; /** vdev ID */
  26728. A_UINT32 data_len; /** length in byte of data[]. */
  26729. /* This structure is used to send REQ binary blobs
  26730. * from firmware to application/service where Host drv is pass through .
  26731. * Following this structure is the TLV:
  26732. * A_UINT8 data[]; <-- length in byte given by field data_len.
  26733. */
  26734. /* This structure is used to send information of partner links.
  26735. * Following this structure is the TLV:
  26736. * wmi_partner_link_stats partner_link_stats[];
  26737. */
  26738. /* This structure is used to send REQ binary blobs of stats of partner
  26739. * links from firmware to application/service where Host drv is pass
  26740. * through.
  26741. * Following this structure is the TLV partner_link_stats:
  26742. * A_UINT8 partner_link_stats_data[]; <-- length and offset in byte
  26743. * units given by TLV
  26744. * wmi_partner_link_stats.
  26745. */
  26746. } wmi_stats_ext_event_fixed_param;
  26747. typedef enum {
  26748. /** Default: no replay required. */
  26749. WMI_PEER_DELETE_NO_REPLAY = 0,
  26750. /**
  26751. * Replay requested due to UMAC hang during Peer delete.
  26752. * Replay done by Host SW after MLO UMAC SSR recovered the UMAC.
  26753. */
  26754. WMI_PEER_DELETE_REPLAY_FOR_UMAC,
  26755. } WMI_PEER_DELETE_REPLAY_T;
  26756. typedef struct {
  26757. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
  26758. /** unique id identifying the VDEV, generated by the caller */
  26759. A_UINT32 vdev_id;
  26760. /** peer MAC address */
  26761. wmi_mac_addr peer_macaddr;
  26762. /** WMI_PEER_DELETE_REPLAY_T */
  26763. A_UINT32 replay_type;
  26764. } wmi_peer_delete_resp_event_fixed_param;
  26765. typedef struct {
  26766. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_all_peer_resp_event_fixed_param */
  26767. /** unique id identifying the VDEV, generated by the caller */
  26768. A_UINT32 vdev_id;
  26769. /* Status of peer delete all command */
  26770. /*
  26771. * Values for Status:
  26772. * 0 - OK; command successful
  26773. * 1 - EINVAL; Requested invalid vdev_id
  26774. * 2 - EFAILED; Delete all peer failed
  26775. */
  26776. A_UINT32 status;
  26777. /** WMI_PEER_DELETE_REPLAY_T */
  26778. A_UINT32 replay_type;
  26779. } wmi_vdev_delete_all_peer_resp_event_fixed_param;
  26780. typedef struct {
  26781. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
  26782. A_UINT32 tlv_header;
  26783. A_UINT32 vdev_id; /* vdev ID */
  26784. /* MAC address of the peer for which the estimated link speed is required.*/
  26785. wmi_mac_addr peer_macaddr;
  26786. A_UINT32 state; /* peer state */
  26787. } wmi_peer_state_event_fixed_param;
  26788. typedef struct {
  26789. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param */
  26790. A_UINT32 tlv_header;
  26791. /* unique id identifying the VDEV, generated by the caller */
  26792. A_UINT32 vdev_id;
  26793. /* peer MAC address */
  26794. wmi_mac_addr peer_macaddr;
  26795. /* status
  26796. * 0: ok
  26797. * 1: fail - peer not present
  26798. */
  26799. A_UINT32 status;
  26800. } wmi_peer_assoc_conf_event_fixed_param;
  26801. typedef struct {
  26802. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_conf_event_fixed_param */
  26803. A_UINT32 tlv_header;
  26804. /* unique id identifying the VDEV, generated by the caller */
  26805. A_UINT32 vdev_id;
  26806. /* peer MAC address */
  26807. wmi_mac_addr peer_macaddr;
  26808. /* 0: OK.
  26809. * 1: FAIL - same bss peer exist already. */
  26810. A_UINT32 status;
  26811. } wmi_peer_create_conf_event_fixed_param;
  26812. enum {
  26813. WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, /** scan_type: passive */
  26814. WMI_2G4_HT40_OBSS_SCAN_ACTIVE, /** scan_type: active */
  26815. };
  26816. typedef struct {
  26817. /**
  26818. * TLV tag and len;
  26819. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enable_cmd_fixed_param
  26820. */
  26821. A_UINT32 tlv_header;
  26822. A_UINT32 vdev_id;
  26823. /**
  26824. * active or passive. if active all the channels are actively scanned.
  26825. * if passive then all the channels are passively scanned
  26826. */
  26827. A_UINT32 scan_type;
  26828. /**
  26829. * FW can perform multiple scans with in a OBSS scan interval.
  26830. * For each scan,
  26831. * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
  26832. * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
  26833. * The unit for these 2 parameters is TUs.
  26834. */
  26835. A_UINT32 obss_scan_passive_dwell;
  26836. A_UINT32 obss_scan_active_dwell;
  26837. /**
  26838. * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
  26839. * both min and total per channel dwell time requirement
  26840. */
  26841. A_UINT32 bss_channel_width_trigger_scan_interval;
  26842. /**
  26843. * FW can perform multiple scans with in a OBSS scan interval.
  26844. * For each scan,
  26845. * the total per channel dwell time across all scans with in OBSS scan interval should be
  26846. * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
  26847. * for active scans and ,
  26848. * The unit for these 2 parameters is TUs.
  26849. */
  26850. A_UINT32 obss_scan_passive_total_per_channel;
  26851. A_UINT32 obss_scan_active_total_per_channel;
  26852. A_UINT32 bss_width_channel_transition_delay_factor; /** parameter to check exemption from scan */
  26853. A_UINT32 obss_scan_activity_threshold; /** parameter to check exemption from scan */
  26854. /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
  26855. A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */
  26856. A_UINT32 current_operating_class; /** STA current operating class */
  26857. /** length of 2.4GHz channel list to scan at, channel number list in tlv->channels[] */
  26858. A_UINT32 channel_len;
  26859. /** length of optional ie data to append to probe request when active scan, ie data in tlv->ie_field[] */
  26860. A_UINT32 ie_len;
  26861. /**
  26862. * TLV (tag length value) parameters following the fixed param structure
  26863. * A_UINT8 channels[channel_len]; // channel numbers
  26864. * A_UINT8 ie_field[ie_len];
  26865. * A_UINT32 chan_freqs[channel_len] // in MHz
  26866. */
  26867. } wmi_obss_scan_enable_cmd_fixed_param;
  26868. typedef struct {
  26869. /**
  26870. * TLV tag and len;
  26871. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
  26872. */
  26873. A_UINT32 tlv_header;
  26874. A_UINT32 vdev_id;
  26875. } wmi_obss_scan_disable_cmd_fixed_param;
  26876. typedef struct {
  26877. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
  26878. A_UINT32 tlv_header;
  26879. /** unique id identifying the VDEV */
  26880. A_UINT32 vdev_id;
  26881. /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
  26882. A_UINT32 tx_status;
  26883. } wmi_offload_prb_rsp_tx_status_event_fixed_param;
  26884. typedef enum {
  26885. WMI_FRAME_TX_OK, /* frame tx ok */
  26886. WMI_FRAME_TX_XRETRY, /* excessivley retried */
  26887. WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
  26888. WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
  26889. } WMI_FRAME_TX_STATUS;
  26890. /**
  26891. * This command is sent from WLAN host driver to firmware to
  26892. * request firmware to send the latest channel avoidance range
  26893. * to host.
  26894. *
  26895. * This command is only applicable for APQ platform which has
  26896. * modem on the platform. If firmware doesn't support MWS Coex,
  26897. * this command can be dropped by firmware.
  26898. *
  26899. * Host would send this command to firmware to request a channel
  26900. * avoidance information update.
  26901. */
  26902. typedef struct {
  26903. /** TLV tag and len; tag equals
  26904. * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
  26905. A_UINT32 tlv_header;
  26906. } wmi_chan_avoid_update_cmd_param;
  26907. /* ExtScan operation mode */
  26908. typedef enum {
  26909. WMI_EXTSCAN_MODE_NONE = 0x0000,
  26910. WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
  26911. WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
  26912. WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
  26913. } wmi_extscan_operation_mode;
  26914. /* Channel Mask */
  26915. typedef enum {
  26916. WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
  26917. WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
  26918. WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
  26919. WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
  26920. } wmi_channel_band_mask;
  26921. typedef enum {
  26922. WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
  26923. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
  26924. WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
  26925. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
  26926. WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
  26927. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
  26928. WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
  26929. WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
  26930. WMI_EXTSCAN_EVENT_MAX = 0x8000
  26931. } wmi_extscan_event_type;
  26932. #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
  26933. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
  26934. #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
  26935. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
  26936. WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
  26937. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
  26938. typedef enum {
  26939. WMI_EXTSCAN_NO_FORWARDING = 0x0000,
  26940. WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
  26941. } wmi_extscan_forwarding_flags;
  26942. typedef enum {
  26943. WMI_EXTSCAN_USE_MSD = 0x0001, /* Use Motion Sensor Detection */
  26944. WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, /* Extscan LPASS extended batching feature is supported and enabled */
  26945. } wmi_extscan_configuration_flags;
  26946. typedef enum {
  26947. WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, /* Cache the results of bucket whose configuration flags has this bit set */
  26948. WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002, /* Report ext scan results to context hub or not. */
  26949. } wmi_extscan_bucket_configuration_flags;
  26950. typedef enum {
  26951. WMI_EXTSCAN_STATUS_OK = 0,
  26952. WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
  26953. WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
  26954. WMI_EXTSCAN_STATUS_INTERNAL_ERROR
  26955. } wmi_extscan_start_stop_status;
  26956. typedef struct {
  26957. /** Request ID - to identify command. Cannot be 0 */
  26958. A_UINT32 request_id;
  26959. /** Requestor ID - client requesting ExtScan */
  26960. A_UINT32 requestor_id;
  26961. /** VDEV id(interface) that is requesting scan */
  26962. A_UINT32 vdev_id;
  26963. } wmi_extscan_command_id;
  26964. typedef struct {
  26965. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  26966. /** channel in MHz */
  26967. A_UINT32 channel;
  26968. /** dwell time in msec - use defaults if 0 */
  26969. A_UINT32 min_dwell_time;
  26970. A_UINT32 max_dwell_time;
  26971. /** passive/active channel and other flags */
  26972. A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
  26973. } wmi_extscan_bucket_channel;
  26974. /* Scan Bucket specification */
  26975. typedef struct {
  26976. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  26977. /** Bucket ID - 0-based */
  26978. A_UINT32 bucket_id;
  26979. /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
  26980. A_UINT32 notify_extscan_events;
  26981. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  26982. A_UINT32 forwarding_flags;
  26983. /** ExtScan configuration flags - wmi_extscan_bucket_configuration_flags */
  26984. A_UINT32 configuration_flags;
  26985. /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
  26986. A_UINT32 base_period_multiplier;
  26987. /** dwell time in msec on active channels - use defaults if 0 */
  26988. A_UINT32 min_dwell_time_active;
  26989. A_UINT32 max_dwell_time_active;
  26990. /** dwell time in msec on passive channels - use defaults if 0 */
  26991. A_UINT32 min_dwell_time_passive;
  26992. A_UINT32 max_dwell_time_passive;
  26993. /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
  26994. A_UINT32 channel_band;
  26995. /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
  26996. A_UINT32 num_channels;
  26997. /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
  26998. A_UINT32 min_period;
  26999. /** period above which exponent is not applied anymore */
  27000. A_UINT32 max_period;
  27001. /** back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
  27002. * new_bucket_period = last_bucket_period + last_exponent_period * exp_backoff
  27003. */
  27004. A_UINT32 exp_backoff;
  27005. /** number of scans performed at a given periodicity after which exponential back off value is
  27006. * applied to current periodicity to obtain a newer one
  27007. */
  27008. A_UINT32 exp_max_step_count;
  27009. /** Followed by the variable length TLV chan_list:
  27010. * wmi_extscan_bucket_channel chan_list[] */
  27011. } wmi_extscan_bucket;
  27012. typedef struct {
  27013. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
  27014. /** Request ID - to identify command. Cannot be 0 */
  27015. A_UINT32 request_id;
  27016. /** Requestor ID - client requesting ExtScan */
  27017. A_UINT32 requestor_id;
  27018. /** VDEV id(interface) that is requesting scan */
  27019. A_UINT32 vdev_id;
  27020. /** table ID - to allow support for multiple simultaneous requests */
  27021. A_UINT32 table_id;
  27022. /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
  27023. A_UINT32 base_period;
  27024. /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
  27025. A_UINT32 max_iterations;
  27026. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  27027. A_UINT32 forwarding_flags;
  27028. /** ExtScan configuration flags - wmi_extscan_configuration_flags */
  27029. A_UINT32 configuration_flags;
  27030. /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
  27031. A_UINT32 notify_extscan_events;
  27032. /** Scan Priority, input to scan scheduler */
  27033. A_UINT32 scan_priority;
  27034. /** Maximum number of BSSIDs to cache on each scan cycle */
  27035. A_UINT32 max_bssids_per_scan_cycle;
  27036. /** Minimum RSSI value to report */
  27037. A_UINT32 min_rssi;
  27038. /** Maximum table usage in percentage */
  27039. A_UINT32 max_table_usage;
  27040. /** default dwell time in msec on active channels */
  27041. A_UINT32 min_dwell_time_active;
  27042. A_UINT32 max_dwell_time_active;
  27043. /** default dwell time in msec on passive channels */
  27044. A_UINT32 min_dwell_time_passive;
  27045. A_UINT32 max_dwell_time_passive;
  27046. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  27047. A_UINT32 min_rest_time;
  27048. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  27049. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  27050. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  27051. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  27052. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  27053. * irrespective of activity. activity is determined by the idle_time parameter.
  27054. */
  27055. A_UINT32 max_rest_time;
  27056. /** time before sending next set of probe requests.
  27057. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  27058. * The number of probe requests specified depends on the ssid_list and bssid_list
  27059. */
  27060. /** Max number of probes to be sent */
  27061. A_UINT32 n_probes;
  27062. /** time in msec between 2 sets of probe requests. */
  27063. A_UINT32 repeat_probe_time;
  27064. /** time in msec between 2 consecutive probe requests with in a set. */
  27065. A_UINT32 probe_spacing_time;
  27066. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  27067. A_UINT32 idle_time;
  27068. /** maximum time in msec allowed for scan */
  27069. A_UINT32 max_scan_time;
  27070. /** delay in msec before sending first probe request after switching to a channel */
  27071. A_UINT32 probe_delay;
  27072. /** Scan control flags */
  27073. A_UINT32 scan_ctrl_flags;
  27074. /** Burst duration time in msec*/
  27075. A_UINT32 burst_duration;
  27076. /** number of bssids in the TLV bssid_list[] */
  27077. A_UINT32 num_bssid;
  27078. /** number of ssid in the TLV ssid_list[] */
  27079. A_UINT32 num_ssids;
  27080. /** number of bytes in TLV ie_data[] */
  27081. A_UINT32 ie_len;
  27082. /** number of buckets in the TLV bucket_list[] */
  27083. A_UINT32 num_buckets;
  27084. /** in number of scans, send notifications to host after these many scans */
  27085. A_UINT32 report_threshold_num_scans;
  27086. /** number of channels in channel_list[] determined by the
  27087. sum of wmi_extscan_bucket.num_channels in array */
  27088. /**
  27089. * TLV (tag length value) parameters follow the extscan_cmd
  27090. * structure. The TLV's are:
  27091. * wmi_ssid ssid_list[];
  27092. * wmi_mac_addr bssid_list[];
  27093. * A_UINT8 ie_data[];
  27094. * wmi_extscan_bucket bucket_list[];
  27095. * wmi_extscan_bucket_channel channel_list[];
  27096. */
  27097. } wmi_extscan_start_cmd_fixed_param;
  27098. typedef struct {
  27099. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
  27100. /** Request ID - to match running command. 0 matches any request */
  27101. A_UINT32 request_id;
  27102. /** Requestor ID - client requesting stop */
  27103. A_UINT32 requestor_id;
  27104. /** VDEV id(interface) that is requesting scan */
  27105. A_UINT32 vdev_id;
  27106. /** table ID - to allow support for multiple simultaneous requests */
  27107. A_UINT32 table_id;
  27108. } wmi_extscan_stop_cmd_fixed_param;
  27109. enum wmi_extscan_get_cached_results_flags {
  27110. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
  27111. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
  27112. };
  27113. typedef struct {
  27114. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
  27115. /** request ID - used to correlate command with events */
  27116. A_UINT32 request_id;
  27117. /** Requestor ID - client that requested results */
  27118. A_UINT32 requestor_id;
  27119. /** VDEV id(interface) that is requesting scan */
  27120. A_UINT32 vdev_id;
  27121. /** table ID - to allow support for multiple simultaneous requests */
  27122. A_UINT32 table_id;
  27123. /** maximum number of results to be returned */
  27124. A_UINT32 max_results;
  27125. /** flush BSSID list - wmi_extscan_get_cached_results_flags */
  27126. A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
  27127. } wmi_extscan_get_cached_results_cmd_fixed_param;
  27128. typedef struct {
  27129. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
  27130. /** request ID - used to correlate command with events */
  27131. A_UINT32 request_id;
  27132. /** Requestor ID - client that requested results */
  27133. A_UINT32 requestor_id;
  27134. /** VDEV id(interface) that is requesting scan */
  27135. A_UINT32 vdev_id;
  27136. /** table ID - to allow support for multiple simultaneous requests */
  27137. A_UINT32 table_id;
  27138. } wmi_extscan_get_wlan_change_results_cmd_fixed_param;
  27139. typedef struct {
  27140. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27141. /** bssid */
  27142. wmi_mac_addr bssid;
  27143. /** channel in MHz */
  27144. A_UINT32 channel;
  27145. /** upper RSSI limit */
  27146. A_UINT32 upper_rssi_limit;
  27147. /** lower RSSI limit */
  27148. A_UINT32 lower_rssi_limit;
  27149. } wmi_extscan_wlan_change_bssid_param;
  27150. typedef struct {
  27151. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
  27152. /** Request ID - to identify command. Cannot be 0 */
  27153. A_UINT32 request_id;
  27154. /** Requestor ID - client requesting wlan change monitoring */
  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 tables */
  27159. A_UINT32 table_id;
  27160. /** operation mode: start/stop */
  27161. A_UINT32 mode; /* wmi_extscan_operation_mode */
  27162. /** number of RSSI samples to store */
  27163. A_UINT32 max_rssi_samples;
  27164. /** number of samples to use to calculate RSSI average */
  27165. A_UINT32 rssi_averaging_samples;
  27166. /** number of scans to confirm loss of contact with RSSI */
  27167. A_UINT32 lost_ap_scan_count;
  27168. /** number of out-of-range BSSIDs necessary to send event */
  27169. A_UINT32 max_out_of_range_count;
  27170. /** total number of bssid signal descriptors (in all pages) */
  27171. A_UINT32 total_entries;
  27172. /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
  27173. A_UINT32 first_entry_index;
  27174. /** number of bssid signal descriptors in this page */
  27175. A_UINT32 num_entries_in_page;
  27176. /* Following this structure is the TLV:
  27177. * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[];
  27178. * (number of elements given by field num_page_entries)
  27179. */
  27180. } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
  27181. typedef struct {
  27182. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27183. /** bssid */
  27184. wmi_mac_addr bssid;
  27185. /** RSSI min threshold for reporting */
  27186. A_UINT32 min_rssi;
  27187. /** Deprecated entry - channel in MHz */
  27188. A_UINT32 channel;
  27189. /** RSSI max threshold for reporting */
  27190. A_UINT32 max_rssi;
  27191. } wmi_extscan_hotlist_entry;
  27192. typedef struct {
  27193. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
  27194. /** Request ID - to identify command. Cannot be 0 */
  27195. A_UINT32 request_id;
  27196. /** Requestor ID - client requesting hotlist monitoring */
  27197. A_UINT32 requestor_id;
  27198. /** VDEV id(interface) that is requesting scan */
  27199. A_UINT32 vdev_id;
  27200. /** table ID - to allow support for multiple simultaneous tables */
  27201. A_UINT32 table_id;
  27202. /** operation mode: start/stop */
  27203. A_UINT32 mode; /* wmi_extscan_operation_mode */
  27204. /** total number of bssids (in all pages) */
  27205. A_UINT32 total_entries;
  27206. /** index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry */
  27207. A_UINT32 first_entry_index;
  27208. /** number of bssids in this page */
  27209. A_UINT32 num_entries_in_page;
  27210. /** number of consecutive scans to confirm loss of contact with AP */
  27211. A_UINT32 lost_ap_scan_count;
  27212. /* Following this structure is the TLV:
  27213. * wmi_extscan_hotlist_entry hotlist[]; <-- number of elements given by field num_page_entries.
  27214. */
  27215. } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
  27216. typedef struct {
  27217. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27218. /**ssid */
  27219. wmi_ssid ssid;
  27220. /**band */
  27221. A_UINT32 band;
  27222. /**RSSI threshold for reporting */
  27223. A_UINT32 min_rssi;
  27224. A_UINT32 max_rssi;
  27225. } wmi_extscan_hotlist_ssid_entry;
  27226. typedef struct {
  27227. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param */
  27228. /** Request ID - to identify command. Cannot be 0 */
  27229. A_UINT32 request_id;
  27230. /** Requestor ID - client requesting hotlist ssid monitoring */
  27231. A_UINT32 requestor_id;
  27232. /** VDEV id(interface) that is requesting scan */
  27233. A_UINT32 vdev_id;
  27234. /** table ID - to allow support for multiple simultaneous tables */
  27235. A_UINT32 table_id;
  27236. /** operation mode: start/stop */
  27237. A_UINT32 mode; /* wmi_extscan_operation_mode */
  27238. /**total number of ssids (in all pages) */
  27239. A_UINT32 total_entries;
  27240. /**index of the first ssid entry found in the TLV wmi_extscan_hotlist_ssid_entry*/
  27241. A_UINT32 first_entry_index;
  27242. /**number of ssids in this page */
  27243. A_UINT32 num_entries_in_page;
  27244. /** number of consecutive scans to confirm loss of an ssid **/
  27245. A_UINT32 lost_ap_scan_count;
  27246. /* Following this structure is the TLV:
  27247. * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; <-- number of elements given by field num_page_entries.
  27248. */
  27249. } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
  27250. typedef struct {
  27251. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27252. /** table ID - to allow support for multiple simultaneous tables */
  27253. A_UINT32 table_id;
  27254. /** size in bytes of scan cache entry */
  27255. A_UINT32 scan_cache_entry_size;
  27256. /** maximum number of scan cache entries */
  27257. A_UINT32 max_scan_cache_entries;
  27258. /** maximum number of buckets per extscan request */
  27259. A_UINT32 max_buckets;
  27260. /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
  27261. A_UINT32 max_bssid_per_scan;
  27262. /** table usage level at which indication must be sent to host */
  27263. A_UINT32 max_table_usage_threshold;
  27264. } wmi_extscan_cache_capabilities;
  27265. typedef struct {
  27266. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27267. /** table ID - to allow support for multiple simultaneous tables */
  27268. A_UINT32 table_id;
  27269. /** size in bytes of wlan change entry */
  27270. A_UINT32 wlan_change_entry_size;
  27271. /** maximum number of entries in wlan change table */
  27272. A_UINT32 max_wlan_change_entries;
  27273. /** number of RSSI samples used for averaging RSSI */
  27274. A_UINT32 max_rssi_averaging_samples;
  27275. /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
  27276. A_UINT32 max_rssi_history_entries;
  27277. } wmi_extscan_wlan_change_monitor_capabilities;
  27278. typedef struct {
  27279. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27280. /** table ID - to allow support for multiple simultaneous tables */
  27281. A_UINT32 table_id;
  27282. /** size in bytes of hotlist entry */
  27283. A_UINT32 wlan_hotlist_entry_size;
  27284. /** maximum number of entries in wlan change table */
  27285. A_UINT32 max_hotlist_entries;
  27286. } wmi_extscan_hotlist_monitor_capabilities;
  27287. typedef struct {
  27288. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
  27289. /** Request ID - matches request ID used to start hot list monitoring */
  27290. A_UINT32 request_id;
  27291. /** Requestor ID - client requesting stop */
  27292. A_UINT32 requestor_id;
  27293. /** number of extscan caches */
  27294. A_UINT32 num_extscan_cache_tables;
  27295. /** number of wlan change lists */
  27296. A_UINT32 num_wlan_change_monitor_tables;
  27297. /** number of hotlists */
  27298. A_UINT32 num_hotlist_monitor_tables;
  27299. /** if one sided rtt data collection is supported */
  27300. A_UINT32 rtt_one_sided_supported;
  27301. /** if 11v data collection is supported */
  27302. A_UINT32 rtt_11v_supported;
  27303. /** if 11mc data collection is supported */
  27304. A_UINT32 rtt_ftm_supported;
  27305. /** number of extscan cache capabilities (one per table) */
  27306. A_UINT32 num_extscan_cache_capabilities;
  27307. /** number of wlan change capabilities (one per table) */
  27308. A_UINT32 num_extscan_wlan_change_capabilities;
  27309. /** number of extscan hotlist capabilities (one per table) */
  27310. A_UINT32 num_extscan_hotlist_capabilities;
  27311. /* Following this structure is the TLV:
  27312. * wmi_extscan_cache_capabilities extscan_cache_capabilities; <-- number of capabilities given by num_extscan_caches
  27313. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; <-- number of capabilities given by num_wlan_change_monitor_tables
  27314. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; <-- number of capabilities given by num_hotlist_monitor_tables
  27315. */
  27316. } wmi_extscan_set_capabilities_cmd_fixed_param;
  27317. typedef struct {
  27318. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
  27319. /** Request ID - matches request ID used to start hot list monitoring */
  27320. A_UINT32 request_id;
  27321. /** Requestor ID - client requesting capabilities */
  27322. A_UINT32 requestor_id;
  27323. } wmi_extscan_get_capabilities_cmd_fixed_param;
  27324. typedef struct {
  27325. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
  27326. /** Request ID of the operation that was started/stopped */
  27327. A_UINT32 request_id;
  27328. /** Requestor ID of the operation that was started/stopped */
  27329. A_UINT32 requestor_id;
  27330. /** VDEV id(interface) of the operation that was started/stopped */
  27331. A_UINT32 vdev_id;
  27332. /** extscan WMI command */
  27333. A_UINT32 command;
  27334. /** operation mode: start/stop */
  27335. A_UINT32 mode; /* wmi_extscan_operation_mode */
  27336. /**success/failure */
  27337. A_UINT32 status; /* enum wmi_extscan_start_stop_status */
  27338. /** table ID - to allow support for multiple simultaneous requests */
  27339. A_UINT32 table_id;
  27340. } wmi_extscan_start_stop_event_fixed_param;
  27341. typedef struct {
  27342. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
  27343. /** Request ID of the extscan operation that is currently running */
  27344. A_UINT32 request_id;
  27345. /** Requestor ID of the extscan operation that is currently running */
  27346. A_UINT32 requestor_id;
  27347. /** VDEV id(interface) of the extscan operation that is currently running */
  27348. A_UINT32 vdev_id;
  27349. /** scan event (wmi_scan_event_type) */
  27350. A_UINT32 event; /* wmi_extscan_event_type */
  27351. /** table ID - to allow support for multiple simultaneous requests */
  27352. A_UINT32 table_id;
  27353. /**number of buckets */
  27354. A_UINT32 num_buckets;
  27355. /* Following this structure is the TLV:
  27356. * A_UINT32 bucket_id[]; <-- number of elements given by field num_buckets.
  27357. */
  27358. } wmi_extscan_operation_event_fixed_param;
  27359. /* Types of extscan tables */
  27360. typedef enum {
  27361. EXTSCAN_TABLE_NONE = 0,
  27362. EXTSCAN_TABLE_BSSID = 1,
  27363. EXTSCAN_TABLE_RSSI = 2,
  27364. } wmi_extscan_table_type;
  27365. typedef struct {
  27366. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
  27367. /** Request ID of the extscan operation that is currently running */
  27368. A_UINT32 request_id;
  27369. /** Requestor ID of the extscan operation that is currently running */
  27370. A_UINT32 requestor_id;
  27371. /** VDEV id(interface) of the extscan operation that is currently running */
  27372. A_UINT32 vdev_id;
  27373. /** table ID - to allow support for multiple simultaneous tables */
  27374. A_UINT32 table_id;
  27375. /**see wmi_extscan_table_type for table reporting usage */
  27376. A_UINT32 table_type;
  27377. /**number of entries in use */
  27378. A_UINT32 entries_in_use;
  27379. /**maximum number of entries in table */
  27380. A_UINT32 maximum_entries;
  27381. } wmi_extscan_table_usage_event_fixed_param;
  27382. typedef enum {
  27383. WMI_SCAN_STATUS_INTERRUPTED = 1 /* Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
  27384. this can be used to discard scan results */
  27385. } wmi_scan_status_flags;
  27386. typedef struct {
  27387. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27388. /** RSSI */
  27389. A_UINT32 rssi;
  27390. /** time stamp in milliseconds */
  27391. A_UINT32 tstamp;
  27392. /** Extscan cycle during which this entry was scanned */
  27393. A_UINT32 scan_cycle_id;
  27394. /** flag to indicate if the given result was obtained as part of interrupted (aborted/large time gap preempted) scan */
  27395. A_UINT32 flags;
  27396. /** Bitmask of buckets (i.e. sets of channels) scanned */
  27397. A_UINT32 buckets_scanned;
  27398. } wmi_extscan_rssi_info;
  27399. typedef struct {
  27400. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27401. /** bssid */
  27402. wmi_mac_addr bssid;
  27403. /** ssid */
  27404. wmi_ssid ssid;
  27405. /** channel in MHz */
  27406. A_UINT32 channel;
  27407. /** capabilities */
  27408. A_UINT32 capabilities;
  27409. /** beacon interval in TUs */
  27410. A_UINT32 beacon_interval;
  27411. /** time stamp in milliseconds - time last seen */
  27412. A_UINT32 tstamp;
  27413. /** flags - _tExtScanEntryFlags */
  27414. A_UINT32 flags;
  27415. /** RTT in ns */
  27416. A_UINT32 rtt;
  27417. /** RTT standard deviation */
  27418. A_UINT32 rtt_sd;
  27419. /** RSSI information */
  27420. A_UINT32 number_rssi_samples;
  27421. /** IE length */
  27422. A_UINT32 ie_length; /* length of IE data */
  27423. } wmi_extscan_wlan_descriptor;
  27424. typedef struct {
  27425. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
  27426. /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  27427. A_UINT32 request_id;
  27428. /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  27429. A_UINT32 requestor_id;
  27430. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  27431. A_UINT32 vdev_id;
  27432. /** Request ID of the extscan operation that is currently running */
  27433. A_UINT32 extscan_request_id;
  27434. /** Requestor ID of the extscan operation that is currently running */
  27435. A_UINT32 extscan_requestor_id;
  27436. /** VDEV id(interface) of the extscan operation that is currently running */
  27437. A_UINT32 extscan_vdev_id;
  27438. /** table ID - to allow support for multiple simultaneous tables */
  27439. A_UINT32 table_id;
  27440. /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
  27441. A_UINT32 current_tstamp;
  27442. /**total number of bssids (in all pages) */
  27443. A_UINT32 total_entries;
  27444. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  27445. A_UINT32 first_entry_index;
  27446. /**number of bssids in this page */
  27447. A_UINT32 num_entries_in_page;
  27448. /** number of buckets scanned**/
  27449. A_UINT32 buckets_scanned;
  27450. /* Followed by the variable length TLVs
  27451. * wmi_extscan_wlan_descriptor bssid_list[]
  27452. * wmi_extscan_rssi_info rssi_list[]
  27453. * A_UINT8 ie_list[]
  27454. */
  27455. } wmi_extscan_cached_results_event_fixed_param;
  27456. typedef enum {
  27457. EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
  27458. EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
  27459. EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
  27460. } wmi_extscan_wlan_change_flags;
  27461. typedef struct {
  27462. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  27463. /** bssid */
  27464. wmi_mac_addr bssid;
  27465. /** time stamp in milliseconds */
  27466. A_UINT32 tstamp;
  27467. /** upper RSSI limit */
  27468. A_UINT32 upper_rssi_limit;
  27469. /** lower RSSI limit */
  27470. A_UINT32 lower_rssi_limit;
  27471. /** channel */
  27472. A_UINT32 channel; /* in MHz */
  27473. /** current RSSI average */
  27474. A_UINT32 rssi_average;
  27475. /** flags - wmi_extscan_wlan_change_flags */
  27476. A_UINT32 flags;
  27477. /** length of RSSI history to follow (number of values) */
  27478. A_UINT32 num_rssi_samples;
  27479. } wmi_extscan_wlan_change_result_bssid;
  27480. typedef struct {
  27481. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
  27482. /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  27483. A_UINT32 request_id;
  27484. /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  27485. A_UINT32 requestor_id;
  27486. /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  27487. A_UINT32 vdev_id;
  27488. /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  27489. A_UINT32 config_request_id;
  27490. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  27491. A_UINT32 config_requestor_id;
  27492. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  27493. A_UINT32 config_vdev_id;
  27494. /** table ID - to allow support for multiple simultaneous tables */
  27495. A_UINT32 table_id;
  27496. /**number of entries with RSSI out of range or BSSID not detected */
  27497. A_UINT32 change_count;
  27498. /**total number of bssid signal descriptors (in all pages) */
  27499. A_UINT32 total_entries;
  27500. /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
  27501. A_UINT32 first_entry_index;
  27502. /**number of bssids signal descriptors in this page */
  27503. A_UINT32 num_entries_in_page;
  27504. /* Following this structure is the TLV:
  27505. * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[];
  27506. * (number of descriptors given by field num_entries_in_page)
  27507. * Following this structure is the list of RSSI values (each is an A_UINT8):
  27508. * A_UINT8 rssi_list[]; <-- last N RSSI values.
  27509. */
  27510. } wmi_extscan_wlan_change_results_event_fixed_param;
  27511. enum _tExtScanEntryFlags
  27512. {
  27513. WMI_HOTLIST_FLAG_NONE = 0x00,
  27514. WMI_HOTLIST_FLAG_PRESENCE = 0x01,
  27515. WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
  27516. };
  27517. typedef struct {
  27518. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  27519. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  27520. A_UINT32 config_request_id;
  27521. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  27522. A_UINT32 config_requestor_id;
  27523. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  27524. A_UINT32 config_vdev_id;
  27525. /** table ID - to allow support for multiple simultaneous tables */
  27526. A_UINT32 table_id;
  27527. /**total number of bssids (in all pages) */
  27528. A_UINT32 total_entries;
  27529. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  27530. A_UINT32 first_entry_index;
  27531. /**number of bssids in this page */
  27532. A_UINT32 num_entries_in_page;
  27533. /* Following this structure is the TLV:
  27534. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  27535. */
  27536. } wmi_extscan_hotlist_match_event_fixed_param;
  27537. typedef struct {
  27538. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  27539. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  27540. A_UINT32 config_request_id;
  27541. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  27542. A_UINT32 config_requestor_id;
  27543. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  27544. A_UINT32 config_vdev_id;
  27545. /** table ID - to allow support for multiple simultaneous tables */
  27546. A_UINT32 table_id;
  27547. /**total number of ssids (in all pages) */
  27548. A_UINT32 total_entries;
  27549. /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  27550. A_UINT32 first_entry_index;
  27551. /**number of ssids in this page */
  27552. A_UINT32 num_entries_in_page;
  27553. /* Following this structure is the TLV:
  27554. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  27555. */
  27556. } wmi_extscan_hotlist_ssid_match_event_fixed_param;
  27557. typedef struct {
  27558. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
  27559. /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  27560. A_UINT32 request_id;
  27561. /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  27562. A_UINT32 requestor_id;
  27563. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  27564. A_UINT32 vdev_id;
  27565. /** number of extscan caches */
  27566. A_UINT32 num_extscan_cache_tables;
  27567. /** number of wlan change lists */
  27568. A_UINT32 num_wlan_change_monitor_tables;
  27569. /** number of hotlists */
  27570. A_UINT32 num_hotlist_monitor_tables;
  27571. /** if one sided rtt data collection is supported */
  27572. A_UINT32 rtt_one_sided_supported;
  27573. /** if 11v data collection is supported */
  27574. A_UINT32 rtt_11v_supported;
  27575. /** if 11mc data collection is supported */
  27576. A_UINT32 rtt_ftm_supported;
  27577. /** number of extscan cache capabilities (one per table) */
  27578. A_UINT32 num_extscan_cache_capabilities;
  27579. /** number of wlan change capabilities (one per table) */
  27580. A_UINT32 num_extscan_wlan_change_capabilities;
  27581. /** number of extscan hotlist capabilities (one per table) */
  27582. A_UINT32 num_extscan_hotlist_capabilities;
  27583. /* max number of roaming ssid whitelist firmware can support */
  27584. A_UINT32 num_roam_ssid_whitelist;
  27585. /* max number of blacklist bssid firmware can support */
  27586. A_UINT32 num_roam_bssid_blacklist;
  27587. /* max number of preferred list firmware can support */
  27588. A_UINT32 num_roam_bssid_preferred_list;
  27589. /* max number of hotlist ssids firmware can support */
  27590. A_UINT32 num_extscan_hotlist_ssid;
  27591. /* max number of epno networks firmware can support */
  27592. A_UINT32 num_epno_networks;
  27593. /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
  27594. * supports multiple lists of each type.
  27595. *
  27596. * wmi_extscan_cache_capabilities extscan_cache_capabilities[] <-- capabilities of extscan cache (BSSID/RSSI lists)
  27597. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] <-- capabilities of wlan_change_monitor_tables
  27598. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] <-- capabilities of hotlist_monitor_tables
  27599. */
  27600. } wmi_extscan_capabilities_event_fixed_param;
  27601. /* WMI_D0_WOW_DISABLE_ACK_EVENTID */
  27602. typedef struct {
  27603. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
  27604. A_UINT32 reserved0; /* for future need */
  27605. } wmi_d0_wow_disable_ack_event_fixed_param;
  27606. /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
  27607. typedef struct {
  27608. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */
  27609. /** pdev_id for identifying the MAC
  27610. * See macros starting with WMI_PDEV_ID_ for values.
  27611. */
  27612. A_UINT32 pdev_id;
  27613. } wmi_pdev_resume_event_fixed_param;
  27614. /** value representing all modules */
  27615. #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
  27616. /* param definitions */
  27617. /**
  27618. * Log level for a given module. Value contains both module id and log level.
  27619. * here is the bitmap definition for value.
  27620. * module Id : 16
  27621. * Flags : reserved
  27622. * Level : 8
  27623. * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
  27624. * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
  27625. */
  27626. #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
  27627. #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \
  27628. (val) |= (lvl & 0xff); \
  27629. } while (0)
  27630. #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
  27631. #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \
  27632. (val) |= ((mid & 0xffff) << 16); \
  27633. } while (0)
  27634. #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
  27635. /**
  27636. * Enable the debug log for a given vdev. Value is vdev id
  27637. */
  27638. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
  27639. /**
  27640. * Disable the debug log for a given vdev. Value is vdev id
  27641. * All the log level for a given VDEV is disabled except the ERROR log messages
  27642. */
  27643. #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
  27644. /**
  27645. * set vdev enable bitmap. value is the vden enable bitmap
  27646. */
  27647. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
  27648. /**
  27649. * set a given log level to all the modules specified in the module bitmap.
  27650. * and set the log level for all other modules to DBGLOG_ERR.
  27651. * value: log levelt to be set.
  27652. * module_id_bitmap : identifies the modules for which the log level should be set and
  27653. * modules for which the log level should be reset to DBGLOG_ERR.
  27654. */
  27655. #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
  27656. /**
  27657. * Wow mode specific logging enablement
  27658. * Wow mode module_id_bitmap : identifies the modules for which the log level
  27659. * should be set in WOW and modules for which the log level
  27660. * should be reset to DBGLOG_MAX_LVL.
  27661. */
  27662. #define WMI_DEBUG_LOG_PARAM_WOW_MOD_ENABLE_BITMAP 0x6
  27663. #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
  27664. #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \
  27665. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
  27666. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
  27667. #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id) \
  27668. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
  27669. (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
  27670. #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \
  27671. (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
  27672. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
  27673. #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
  27674. typedef struct {
  27675. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
  27676. A_UINT32 dbg_log_param; /** param types are defined above */
  27677. A_UINT32 value;
  27678. /* The below array will follow this tlv ->fixed length module_id_bitmap[]
  27679. A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
  27680. */
  27681. } wmi_debug_log_config_cmd_fixed_param;
  27682. typedef struct {
  27683. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
  27684. A_UINT32 param; /* Reserved for future use */
  27685. /** pdev_id for identifying the MAC
  27686. * See macros starting with WMI_PDEV_ID_ for values.
  27687. */
  27688. A_UINT32 pdev_id;
  27689. } wmi_pdev_get_temperature_cmd_fixed_param;
  27690. typedef struct {
  27691. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
  27692. A_INT32 value; /* temperature value in Celcius degree */
  27693. /** pdev_id for identifying the MAC
  27694. * See macros starting with WMI_PDEV_ID_ for values.
  27695. */
  27696. A_UINT32 pdev_id;
  27697. } wmi_pdev_temperature_event_fixed_param;
  27698. typedef enum {
  27699. ANTDIV_HW_CFG_STATUS,
  27700. ANTDIV_SW_CFG_STATUS,
  27701. ANTDIV_MAX_STATUS_TYPE_NUM
  27702. } ANTDIV_STATUS_TYPE;
  27703. typedef struct {
  27704. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param */
  27705. A_UINT32 status_event_id; /* Status event ID - see ANTDIV_STATUS_TYPE */
  27706. /** pdev_id for identifying the MAC
  27707. * See macros starting with WMI_PDEV_ID_ for values.
  27708. */
  27709. A_UINT32 pdev_id;
  27710. } wmi_pdev_get_antdiv_status_cmd_fixed_param;
  27711. typedef struct {
  27712. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param */
  27713. A_UINT32 support; /* ANT DIV feature enabled or not */
  27714. A_UINT32 chain_num; /* how many chain supported */
  27715. A_UINT32 ant_num; /* how many ANT supported, 32 max */
  27716. /*
  27717. * Each entry is for a tx/rx chain, and contains a bitmap identifying
  27718. * the antennas attached to that tx/rx chain.
  27719. */
  27720. A_UINT32 selectable_ant_mask[8];
  27721. /** pdev_id for identifying the MAC
  27722. * See macros starting with WMI_PDEV_ID_ for values.
  27723. */
  27724. A_UINT32 pdev_id;
  27725. } wmi_pdev_antdiv_status_event_fixed_param;
  27726. typedef struct {
  27727. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
  27728. A_UINT32 vdev_id;
  27729. A_UINT32 enable;
  27730. A_UINT32 srv_ipv4; /* server IP */
  27731. A_UINT32 start_lsb; /* starting address assigned to client */
  27732. A_UINT32 num_client; /* number of clients we support */
  27733. } wmi_set_dhcp_server_offload_cmd_fixed_param;
  27734. typedef enum {
  27735. AP_RX_DATA_OFFLOAD = 0x00,
  27736. STA_RX_DATA_OFFLOAD = 0x01,
  27737. } wmi_ipa_offload_types;
  27738. /**
  27739. * This command is sent from WLAN host driver to firmware for
  27740. * enabling/disabling IPA data-path offload features.
  27741. *
  27742. *
  27743. * Enabling data path offload to IPA(based on host INI configuration), example:
  27744. * when STA interface comes up,
  27745. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  27746. * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  27747. *
  27748. * Disabling data path offload to IPA, example:
  27749. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  27750. * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  27751. *
  27752. *
  27753. * This command is applicable only on the PCIE LL systems
  27754. *
  27755. */
  27756. typedef struct {
  27757. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
  27758. A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
  27759. A_UINT32 vdev_id;
  27760. A_UINT32 enable; /* 1 == enable, 0 == disable */
  27761. } wmi_ipa_offload_enable_disable_cmd_fixed_param;
  27762. typedef enum {
  27763. WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
  27764. WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
  27765. WMI_LED_FLASHING_PATTERN_RESERVED = 2,
  27766. } wmi_set_led_flashing_type;
  27767. /**
  27768. 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.
  27769. Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
  27770. remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
  27771. 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
  27772. pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
  27773. High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
  27774. Zero is reached, it is skipped and moves on to the next interval.
  27775. */
  27776. typedef struct {
  27777. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
  27778. A_UINT32 pattern_id; /* pattern identifier */
  27779. A_UINT32 led_x0; /* led flashing parameter0 */
  27780. A_UINT32 led_x1; /* led flashing parameter1 */
  27781. A_UINT32 gpio_num; /* GPIO number */
  27782. } wmi_set_led_flashing_cmd_fixed_param;
  27783. /**
  27784. * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
  27785. * within small networks that do not include a local name server.
  27786. * It utilizes essentially the same programming interfaces, packet formats and operating semantics
  27787. * as the unicast DNS, and the advantage is zero configuration service while no need for central or
  27788. * global server.
  27789. * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
  27790. * by type in a specified domain using standard DNS queries.
  27791. * Here, we provide the ability to advertise the available services by responding to mDNS queries.
  27792. */
  27793. typedef struct {
  27794. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
  27795. A_UINT32 vdev_id;
  27796. A_UINT32 enable;
  27797. } wmi_mdns_offload_cmd_fixed_param;
  27798. #define WMI_MAX_MDNS_FQDN_LEN 64
  27799. #define WMI_MAX_MDNS_RESP_LEN 512
  27800. #define WMI_MDNS_FQDN_TYPE_GENERAL 0
  27801. #define WMI_MDNS_FQDN_TYPE_UNIQUE 1
  27802. typedef struct {
  27803. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
  27804. A_UINT32 vdev_id;
  27805. /** type of fqdn, general or unique */
  27806. A_UINT32 type;
  27807. /** length of fqdn */
  27808. A_UINT32 fqdn_len;
  27809. /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
  27810. * A_UINT8 fqdn_data[]; <-- fully-qualified domain name to check if match with the received queries
  27811. */
  27812. } wmi_mdns_set_fqdn_cmd_fixed_param;
  27813. typedef struct {
  27814. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
  27815. A_UINT32 vdev_id;
  27816. /** Answer Resource Record count */
  27817. A_UINT32 AR_count;
  27818. /** length of response */
  27819. A_UINT32 resp_len;
  27820. /* Following this structure is the TLV byte stream of resp data of length resp_len
  27821. * A_UINT8 resp_data[]; <-- responses consisits of Resource Records
  27822. */
  27823. } wmi_mdns_set_resp_cmd_fixed_param;
  27824. typedef struct {
  27825. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_staIP_cmd_fixed_param */
  27826. A_UINT32 vdev_id;
  27827. A_UINT32 staIP; /* IPv4 address for STA mode */
  27828. } wmi_mdns_set_staIP_cmd_fixed_param;
  27829. typedef struct {
  27830. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
  27831. A_UINT32 vdev_id;
  27832. } wmi_mdns_get_stats_cmd_fixed_param;
  27833. typedef struct {
  27834. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
  27835. A_UINT32 vdev_id;
  27836. /** curTimestamp in milliseconds */
  27837. A_UINT32 curTimestamp;
  27838. /** last received Query in milliseconds */
  27839. A_UINT32 lastQueryTimestamp;
  27840. /** last sent Response in milliseconds */
  27841. A_UINT32 lastResponseTimestamp;
  27842. /** stats of received queries */
  27843. A_UINT32 totalQueries;
  27844. /** stats of macth queries */
  27845. A_UINT32 totalMatches;
  27846. /** stats of responses */
  27847. A_UINT32 totalResponses;
  27848. /** indicate the current status of mDNS offload */
  27849. A_UINT32 status;
  27850. } wmi_mdns_stats_event_fixed_param;
  27851. /**
  27852. * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
  27853. * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
  27854. * request and create/remove connection even host is suspended.
  27855. * 3 major components are offloaded:
  27856. * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
  27857. * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
  27858. * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
  27859. * Current implementation only supports WPA2 CCMP.
  27860. */
  27861. typedef struct {
  27862. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
  27863. /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
  27864. A_UINT32 vdev_id;
  27865. /** enable/disable sap auth offload */
  27866. A_UINT32 enable;
  27867. /** sap ssid */
  27868. wmi_ssid ap_ssid;
  27869. /** authentication mode (defined above) */
  27870. A_UINT32 rsn_authmode;
  27871. /** unicast cipher set */
  27872. A_UINT32 rsn_ucastcipherset;
  27873. /** mcast/group cipher set */
  27874. A_UINT32 rsn_mcastcipherset;
  27875. /** mcast/group management frames cipher set */
  27876. A_UINT32 rsn_mcastmgmtcipherset;
  27877. /** sap channel */
  27878. A_UINT32 channel;
  27879. /** length of psk */
  27880. A_UINT32 psk_len;
  27881. /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
  27882. * A_UINT8 psk[];
  27883. */
  27884. } wmi_sap_ofl_enable_cmd_fixed_param;
  27885. typedef struct {
  27886. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
  27887. /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
  27888. A_UINT32 vdev_id;
  27889. /** aid (association id) of this station */
  27890. A_UINT32 assoc_id;
  27891. /** peer station's mac addr */
  27892. wmi_mac_addr peer_macaddr;
  27893. /** length of association request frame */
  27894. A_UINT32 data_len;
  27895. /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
  27896. * A_UINT8 bufp[];
  27897. */
  27898. } wmi_sap_ofl_add_sta_event_fixed_param;
  27899. typedef enum {
  27900. SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
  27901. SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
  27902. } wmi_sap_ofl_del_sta_flags;
  27903. typedef struct {
  27904. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
  27905. /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
  27906. A_UINT32 vdev_id;
  27907. /** aid (association id) of this station */
  27908. A_UINT32 assoc_id;
  27909. /** peer station's mac addr */
  27910. wmi_mac_addr peer_macaddr;
  27911. /** disassociation reason */
  27912. A_UINT32 reason;
  27913. /** flags - wmi_sap_ofl_del_sta_flags */
  27914. A_UINT32 flags;
  27915. } wmi_sap_ofl_del_sta_event_fixed_param;
  27916. typedef struct {
  27917. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param */
  27918. A_UINT32 vdev_id;
  27919. /* Number of client failure connection attempt */
  27920. A_UINT32 num_retry;
  27921. /* Time in milliseconds to record the client's failure connection attempts */
  27922. A_UINT32 retry_allow_time_ms;
  27923. /* Time in milliseconds to drop the connection request if client is blacklisted */
  27924. A_UINT32 blackout_time_ms;
  27925. } wmi_sap_set_blacklist_param_cmd_fixed_param;
  27926. typedef struct {
  27927. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
  27928. A_UINT32 data_len; /** length in byte of data[]. */
  27929. /** This structure is used to send REQ binary blobs
  27930. * from application/service to firmware where Host drv is pass through .
  27931. * Following this structure is the TLV:
  27932. * A_UINT8 data[]; <-- length in byte given by field data_len.
  27933. */
  27934. } wmi_apfind_cmd_param;
  27935. typedef enum apfind_event_type_e {
  27936. APFIND_MATCH_EVENT = 0,
  27937. APFIND_WAKEUP_EVENT,
  27938. } APFIND_EVENT_TYPE;
  27939. typedef struct {
  27940. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
  27941. A_UINT32 event_type; /** APFIND_EVENT_TYPE */
  27942. A_UINT32 data_len; /** length in byte of data[]. */
  27943. /** This structure is used to send event binary blobs
  27944. * from firmware to application/service and Host drv.
  27945. * Following this structure is the TLV:
  27946. * A_UINT8 data[]; <-- length in byte given by field data_len.
  27947. */
  27948. } wmi_apfind_event_hdr;
  27949. /* SAP obss detection offload types */
  27950. typedef enum {
  27951. WMI_SAP_OBSS_DETECTION_MODE_DISABLED = 0, /* fw to disable the detection */
  27952. WMI_SAP_OBSS_DETECTION_MODE_PRESENT_NOTIFY = 1, /* if the matching beacon is present, notify host immediately */
  27953. WMI_SAP_OBSS_DETECTION_MODE_ABSENT_TIMEOUT_NOTIFY = 2,/* if the matching beacon is absent for the timeout period, notify host */
  27954. } WMI_SAP_OBSS_DETECTION_MODE;
  27955. typedef struct wmi_sap_obss_detection_cfg_cmd_s {
  27956. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_cfg_cmd_fixed_param */
  27957. A_UINT32 vdev_id;
  27958. A_UINT32 detect_period_ms;
  27959. /* detect whether there is 11b ap/ibss */
  27960. A_UINT32 b_ap_detect_mode; /* refer WMI_SAP_OBSS_DETECTION_MODE */
  27961. /* detect whether there is 11b sta connected with other APs */
  27962. A_UINT32 b_sta_detect_mode;
  27963. /* detect whether there is 11g AP */
  27964. A_UINT32 g_ap_detect_mode;
  27965. /* detect whether there is legacy 11a traffic */
  27966. A_UINT32 a_detect_mode;
  27967. /* detect whether there is ap which is ht legacy mode */
  27968. A_UINT32 ht_legacy_detect_mode;
  27969. /* detect whether there is ap which is ht mixed mode : has 11b/11g sta */
  27970. A_UINT32 ht_mixed_detect_mode;
  27971. /* detect whether there is ap which has 20M only station */
  27972. A_UINT32 ht_20mhz_detect_mode;
  27973. } wmi_sap_obss_detection_cfg_cmd_fixed_param;
  27974. typedef enum {
  27975. WMI_SAP_OBSS_DETECTION_EVENT_REASON_NOT_SUPPORT = 0,
  27976. WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY,
  27977. WMI_SAP_OBSS_DETECTION_EVENT_REASON_ABSENT_TIMEOUT,
  27978. } WMI_SAP_OBSS_DETECTION_EVENT_REASON;
  27979. /* WMI_SAP_OBSS_DETECTION_MATCH_MASK is one or more of the following shift bits */
  27980. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_AP_S 0
  27981. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_STA_S 1
  27982. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11G_AP_S 2
  27983. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11A_S 3
  27984. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_LEGACY_S 4
  27985. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_MIXED_S 5
  27986. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_20MHZ_S 6
  27987. typedef struct wmi_sap_obss_detection_info_evt_s {
  27988. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_info_evt_fixed_param */
  27989. A_UINT32 vdev_id;
  27990. A_UINT32 reason; /* refer WMI_SAP_OBSS_DETECTION_EVENT_REASON */
  27991. A_UINT32 matched_detection_masks; /* bit(s) from WMI_SAP_OBSS_DETECTION_MATCH_MASK */
  27992. wmi_mac_addr matched_bssid_addr; /* valid when reason is WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY */
  27993. } wmi_sap_obss_detection_info_evt_fixed_param;
  27994. /** WMI command to enable STA FW handle bss color change notification from AP */
  27995. typedef struct {
  27996. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_bss_color_change_enable_fixed_param */
  27997. A_UINT32 vdev_id;
  27998. A_UINT32 enable;
  27999. } wmi_bss_color_change_enable_fixed_param;
  28000. typedef enum {
  28001. WMI_BSS_COLOR_COLLISION_DISABLE = 0,
  28002. WMI_BSS_COLOR_COLLISION_DETECTION,
  28003. WMI_BSS_COLOR_FREE_SLOT_TIMER_EXPIRY,
  28004. WMI_BSS_COLOR_FREE_SLOT_AVAILABLE,
  28005. } WMI_BSS_COLOR_COLLISION_EVT_TYPE;
  28006. /** Command to enable OBSS Color collision detection for both STA and AP mode */
  28007. typedef struct {
  28008. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_det_config_fixed_param */
  28009. A_UINT32 vdev_id;
  28010. A_UINT32 flags; /* proposed for future use cases */
  28011. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  28012. A_UINT32 current_bss_color;
  28013. A_UINT32 detection_period_ms; /* scan interval for both AP and STA mode */
  28014. A_UINT32 scan_period_ms; /* scan period for passive scan to detect collision */
  28015. A_UINT32 free_slot_expiry_time_ms; /* FW to notify host at timer expiry after which Host disables bss color */
  28016. } wmi_obss_color_collision_det_config_fixed_param;
  28017. /** WMI event to notify host on OBSS Color collision detection, free slot available for AP mode */
  28018. typedef struct {
  28019. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_evt_fixed_param */
  28020. A_UINT32 vdev_id;
  28021. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  28022. A_UINT32 bss_color_bitmap_bit0to31; /* Bit set indicating BSS color present */
  28023. A_UINT32 bss_color_bitmap_bit32to63; /* Bit set indicating BSS color present */
  28024. } wmi_obss_color_collision_evt_fixed_param;
  28025. /*
  28026. * WMI event to notify host if latency_flags/latency_level got changed
  28027. * or if latency got enabled/disabled.
  28028. * When latency disable is received in the beacon vendor IE and wlm
  28029. * parameters are restored, latency_enable will be zero.
  28030. * latency level and latency flags will be those of wlm params.
  28031. * Lay out of latency flags is as follows. The field is same as flags
  28032. * in wmi_wlm_config_cmd_fixed_param.
  28033. *
  28034. * |31 19| 18 | 17|16 14| 13 | 12| 11 | 10 | 9 | 8 |7 6|5 4|3 2| 1 | 0 |
  28035. * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
  28036. * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
  28037. * +------------------------------+---------------+---------+-----------------+
  28038. * | WAL | PS | Roam | Scan |
  28039. */
  28040. typedef struct {
  28041. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_latency_fixed_param */
  28042. A_UINT32 vdev_id;
  28043. A_UINT32 latency_enable;
  28044. A_UINT32 latency_level;
  28045. A_UINT32 latency_flags;
  28046. } wmi_vdev_bcn_latency_fixed_param;
  28047. /**
  28048. * OCB DCC types and structures.
  28049. */
  28050. /**
  28051. * DCC types as described in ETSI TS 102 687
  28052. * Type Format stepSize referenceValue numBits
  28053. * -------------------------------------------------------------------------
  28054. * ndlType_acPrio INTEGER (0...7) 1 number 3
  28055. * ndlType_controlLoop INTEGER (0...7) 1 0 3
  28056. * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
  28057. * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
  28058. * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
  28059. * ndlType_datarate INTEGER (0..7) Table 8 3
  28060. * ndlType_distance INTEGER (0..4095) 1 m 0 12
  28061. * ndlType_numberElements INTEGER (0..63) number 6
  28062. * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
  28063. * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
  28064. * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
  28065. * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
  28066. * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
  28067. * ndlType_timing INTEGER (0..4095) 10 ms 0 12
  28068. * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
  28069. * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
  28070. * ndlType_exponent INTEGER (0..100) 0.1 0 7
  28071. * ndlType_queueStatus Enumeration Table A.2 1
  28072. * ndlType_dccMechanism Bitset Table A.2 6
  28073. *
  28074. * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
  28075. * cannot be changed without breaking WMI compatibility.
  28076. *
  28077. * NOTE: For each of the types, one additional bit is allocated. This
  28078. * leftmost bit is used to indicate that the value is invalid. */
  28079. #define SIZE_NDLTYPE_ACPRIO (1 + 3)
  28080. #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
  28081. #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
  28082. #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
  28083. #define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
  28084. #define SIZE_NDLTYPE_DATARATE (1 + 3)
  28085. #define SIZE_NDLTYPE_DISTANCE (1 + 12)
  28086. #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
  28087. #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
  28088. #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
  28089. #define SIZE_NDLTYPE_PATHLOSS (1 + 5)
  28090. #define SIZE_NDLTYPE_RXPOWER (1 + 7)
  28091. #define SIZE_NDLTYPE_SNR (1 + 7)
  28092. #define SIZE_NDLTYPE_TIMING (1 + 12)
  28093. #define SIZE_NDLTYPE_TXPOWER (1 + 7)
  28094. #define SIZE_NDLTYPE_RATIO (1 + 7)
  28095. #define SIZE_NDLTYPE_EXPONENT (1 + 7)
  28096. #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
  28097. #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
  28098. #define SIZE_BYTE (8)
  28099. #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
  28100. #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
  28101. #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
  28102. #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
  28103. #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
  28104. #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
  28105. #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
  28106. #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
  28107. #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
  28108. #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
  28109. #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
  28110. #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
  28111. #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
  28112. #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
  28113. #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
  28114. #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
  28115. #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
  28116. #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
  28117. #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
  28118. /** The MCS_COUNT macro cannot be modified without breaking
  28119. * WMI compatibility. */
  28120. #define MCS_COUNT (8)
  28121. /** Flags for ndlType_dccMechanism. */
  28122. typedef enum {
  28123. DCC_MECHANISM_TPC = 1,
  28124. DCC_MECHANISM_TRC = 2,
  28125. DCC_MECHANISM_TDC = 4,
  28126. DCC_MECHANISM_DSC = 8,
  28127. DCC_MECHANISM_TAC = 16,
  28128. DCC_MECHANISM_RESERVED = 32,
  28129. DCC_MECHANISM_ALL = 0x3f,
  28130. } wmi_dcc_ndl_type_dcc_mechanism;
  28131. /** Values for ndlType_queueStatus. */
  28132. typedef enum {
  28133. DCC_QUEUE_CLOSED = 0,
  28134. DCC_QUEUE_OPEN = 1,
  28135. } wmi_dcc_ndl_type_queue_status;
  28136. /** For ndlType_acPrio, use the values in wmi_traffic_ac. */
  28137. /** Values for ndlType_datarate */
  28138. typedef enum {
  28139. DCC_DATARATE_3_MBPS = 0,
  28140. DCC_DATARATE_4_5_MBPS = 1,
  28141. DCC_DATARATE_6_MBPS = 2,
  28142. DCC_DATARATE_9_MBPS = 3,
  28143. DCC_DATARATE_12_MBPS = 4,
  28144. DCC_DATARATE_18_MBPS = 5,
  28145. DCC_DATARATE_24_MBPS = 6,
  28146. DCC_DATARATE_27_MBPS = 7,
  28147. } wmi_dcc_ndl_type_datarate;
  28148. /** Data structure for active state configuration. */
  28149. typedef struct {
  28150. /** TLV tag and len; tag equals
  28151. * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config */
  28152. A_UINT32 tlv_header;
  28153. /**
  28154. * NDL_asStateId, ndlType_numberElements, 1+6 bits.
  28155. * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
  28156. */
  28157. A_UINT32 state_info;
  28158. /**
  28159. * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
  28160. * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
  28161. * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
  28162. * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
  28163. */
  28164. A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
  28165. /**
  28166. * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  28167. * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  28168. * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  28169. * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  28170. */
  28171. A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  28172. /**
  28173. * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  28174. * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  28175. * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  28176. * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  28177. */
  28178. A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
  28179. /**
  28180. * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  28181. * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  28182. * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  28183. * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  28184. */
  28185. A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
  28186. /**
  28187. * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
  28188. * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
  28189. * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
  28190. * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
  28191. */
  28192. A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
  28193. } wmi_dcc_ndl_active_state_config;
  28194. #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
  28195. #define WMI_NDL_AS_STATE_ID_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
  28196. #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
  28197. #define WMI_NDL_AS_CHAN_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
  28198. #define WMI_NDL_AS_DCC_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
  28199. #define WMI_NDL_AS_DCC_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
  28200. #define WMI_NDL_AS_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  28201. #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)
  28202. #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  28203. #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)
  28204. #define WMI_NDL_AS_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  28205. #define WMI_NDL_AS_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  28206. #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
  28207. #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)
  28208. /** Data structure for EDCA/QOS parameters. */
  28209. typedef struct
  28210. {
  28211. /** TLV tag and len; tag equals
  28212. * WMITLV_TAG_STRUC_wmi_qos_parameter */
  28213. A_UINT32 tlv_header;
  28214. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  28215. A_UINT32 aifsn;
  28216. /** Contention Window minimum. Range: 1 - 10 */
  28217. A_UINT32 cwmin;
  28218. /** Contention Window maximum. Range: 1 - 10 */
  28219. A_UINT32 cwmax;
  28220. } wmi_qos_parameter;
  28221. /** Data structure for information specific to a channel. */
  28222. typedef struct {
  28223. /** TLV tag and len; tag equals
  28224. * WMITLV_TAG_STRUC_wmi_ocb_channel */
  28225. A_UINT32 tlv_header;
  28226. A_UINT32 bandwidth; /* MHz units */
  28227. wmi_mac_addr mac_address;
  28228. } wmi_ocb_channel;
  28229. /** Data structure for an element of the schedule array. */
  28230. typedef struct {
  28231. /** TLV tag and len; tag equals
  28232. * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
  28233. A_UINT32 tlv_header;
  28234. A_UINT32 channel_freq; /* MHz units */
  28235. A_UINT32 total_duration; /* ms units */
  28236. A_UINT32 guard_interval; /* ms units */
  28237. } wmi_ocb_schedule_element;
  28238. /** Data structure for OCB configuration. */
  28239. typedef struct {
  28240. /** TLV tag and len; tag equals
  28241. * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
  28242. A_UINT32 tlv_header;
  28243. /** VDEV id(interface) that is being configured */
  28244. A_UINT32 vdev_id;
  28245. A_UINT32 channel_count;
  28246. A_UINT32 schedule_size;
  28247. A_UINT32 flags;
  28248. A_UINT32 ta_max_duration; /* Max duration of continuing multichannel operation without receiving a TA frame (units = seconds) */
  28249. /** This is followed by a TLV array of wmi_channel. */
  28250. /** This is followed by a TLV array of wmi_ocb_channel. */
  28251. /** This is followed by a TLV array of wmi_qos_parameter. */
  28252. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  28253. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  28254. /** This is followed by a TLV array of wmi_ocb_schedule_element. */
  28255. } wmi_ocb_set_config_cmd_fixed_param;
  28256. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
  28257. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
  28258. #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
  28259. /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
  28260. typedef struct {
  28261. /** TLV tag and len; tag equals
  28262. * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param */
  28263. A_UINT32 tlv_header;
  28264. /* VDEV identifier */
  28265. A_UINT32 vdev_id;
  28266. A_UINT32 status;
  28267. } wmi_ocb_set_config_resp_event_fixed_param;
  28268. /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
  28269. WMI compatibility. */
  28270. #define SIZE_UTC_TIME (10) /* The size of the utc time in bytes. */
  28271. #define SIZE_UTC_TIME_ERROR (5) /* The size of the utc time error in bytes. */
  28272. /** Data structure to set the UTC time. */
  28273. typedef struct {
  28274. /** TLV tag and len; tag equals
  28275. * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
  28276. A_UINT32 tlv_header;
  28277. /* VDEV identifier */
  28278. A_UINT32 vdev_id;
  28279. /** 10 bytes of the utc time. */
  28280. A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME,SIZE_BYTE)];
  28281. /** 5 bytes of the time error. */
  28282. A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR,SIZE_BYTE)];
  28283. } wmi_ocb_set_utc_time_cmd_fixed_param;
  28284. #define WMI_UTC_TIME_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
  28285. #define WMI_UTC_TIME_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
  28286. #define WMI_TIME_ERROR_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
  28287. #define WMI_TIME_ERROR_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
  28288. /** Data structure start the timing advertisement. The template for the
  28289. * timing advertisement frame follows this structure in the WMI command.
  28290. */
  28291. typedef struct {
  28292. /** TLV tag and len; tag equals
  28293. * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
  28294. A_UINT32 tlv_header;
  28295. /* VDEV identifier */
  28296. A_UINT32 vdev_id;
  28297. /** Number of times the TA is sent every 5 seconds. */
  28298. A_UINT32 repeat_rate;
  28299. /** The frequency on which to transmit. */
  28300. A_UINT32 channel_freq; /* MHz units */
  28301. /** The offset into the template of the timestamp. */
  28302. A_UINT32 timestamp_offset;
  28303. /** The offset into the template of the time value. */
  28304. A_UINT32 time_value_offset;
  28305. /** The length of the timing advertisement template. The
  28306. * template is in the TLV data. */
  28307. A_UINT32 timing_advert_template_length;
  28308. /** This is followed by a binary array containing the TA template. */
  28309. } wmi_ocb_start_timing_advert_cmd_fixed_param;
  28310. /** Data structure to stop the timing advertisement. */
  28311. typedef struct {
  28312. /** TLV tag and len; tag equals
  28313. * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
  28314. A_UINT32 tlv_header;
  28315. /* VDEV identifier */
  28316. A_UINT32 vdev_id;
  28317. A_UINT32 channel_freq; /* MHz units */
  28318. } wmi_ocb_stop_timing_advert_cmd_fixed_param;
  28319. /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
  28320. typedef struct {
  28321. /** TLV tag and len; tag equals
  28322. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
  28323. A_UINT32 tlv_header;
  28324. /* VDEV identifier */
  28325. A_UINT32 vdev_id;
  28326. A_UINT32 reserved;
  28327. } wmi_ocb_get_tsf_timer_cmd_fixed_param;
  28328. /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
  28329. typedef struct {
  28330. /** TLV tag and len; tag equals
  28331. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
  28332. A_UINT32 tlv_header;
  28333. /* VDEV identifier */
  28334. A_UINT32 vdev_id;
  28335. A_UINT32 tsf_timer_high;
  28336. A_UINT32 tsf_timer_low;
  28337. } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
  28338. /** Data structure for DCC stats configuration per channel. */
  28339. typedef struct {
  28340. /** TLV tag and len; tag equals
  28341. * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
  28342. A_UINT32 tlv_header;
  28343. /** The channel for which this applies, 16 bits. */
  28344. /** The dcc_stats_bitmap, 8 bits. */
  28345. A_UINT32 chan_info;
  28346. /** Demodulation model parameters. */
  28347. /**
  28348. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  28349. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  28350. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  28351. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  28352. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  28353. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  28354. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  28355. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  28356. */
  28357. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  28358. /** Communication ranges. */
  28359. /**
  28360. * tx_power, ndlType_txPower, 1+7 bits.
  28361. * datarate, ndlType_datarate, 1+3 bits.
  28362. */
  28363. A_UINT32 tx_power_datarate;
  28364. /**
  28365. * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
  28366. * NDL_estCommRange, ndlType_distance, 1+12 bits.
  28367. */
  28368. A_UINT32 carrier_sense_est_comm_range;
  28369. /** Channel load measures. */
  28370. /**
  28371. * dccSensitivity, ndlType_rxPower, 1+7 bits.
  28372. * carrierSense, ndlType_rxPower, 1+7 bits.
  28373. * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
  28374. */
  28375. A_UINT32 dcc_stats;
  28376. /**
  28377. * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
  28378. * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
  28379. */
  28380. A_UINT32 packet_stats;
  28381. /**
  28382. * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
  28383. */
  28384. A_UINT32 channel_busy_time;
  28385. /** Transmit packet statistics. */
  28386. /**
  28387. * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  28388. * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  28389. * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  28390. * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  28391. */
  28392. A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_ARRIVALRATE)];
  28393. /**
  28394. * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  28395. * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  28396. * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  28397. * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  28398. */
  28399. A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  28400. /**
  28401. * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  28402. * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  28403. * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  28404. * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  28405. */
  28406. A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_CHANNELUSE)];
  28407. /**
  28408. * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  28409. * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  28410. * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  28411. * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  28412. */
  28413. A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  28414. } wmi_dcc_ndl_stats_per_channel;
  28415. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  28416. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  28417. #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  28418. #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  28419. #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
  28420. #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
  28421. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  28422. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  28423. #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
  28424. #define WMI_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
  28425. #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
  28426. #define WMI_TX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
  28427. #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
  28428. #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
  28429. #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
  28430. #define WMI_NDL_EST_COMM_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
  28431. #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
  28432. #define WMI_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
  28433. #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
  28434. #define WMI_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
  28435. #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
  28436. #define WMI_NDL_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
  28437. #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
  28438. #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
  28439. #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
  28440. #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
  28441. #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
  28442. #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr,val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
  28443. #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)
  28444. #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)
  28445. #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)
  28446. #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)
  28447. #define WMI_NDL_TX_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  28448. #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)
  28449. #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)
  28450. #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)
  28451. /** Bitmap for DCC stats. */
  28452. typedef enum {
  28453. DCC_STATS_DEMODULATION_MODEL = 1,
  28454. DCC_STATS_COMMUNICATION_RANGES = 2,
  28455. DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
  28456. DCC_STATS_TRANSMIT_PACKET_STATS = 8,
  28457. DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
  28458. DCC_STATS_ALL = 0xff,
  28459. } wmi_dcc_stats_bitmap;
  28460. /** Data structure for getting the DCC stats. */
  28461. typedef struct {
  28462. /** TLV tag and len; tag equals
  28463. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param */
  28464. A_UINT32 tlv_header;
  28465. /* VDEV identifier */
  28466. A_UINT32 vdev_id;
  28467. /** The number of channels for which stats are being requested. */
  28468. A_UINT32 num_channels;
  28469. /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
  28470. } wmi_dcc_get_stats_cmd_fixed_param;
  28471. typedef struct {
  28472. /** TLV tag and len; tag equals
  28473. * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request */
  28474. A_UINT32 tlv_header;
  28475. /** The channel for which this applies. */
  28476. A_UINT32 chan_freq; /* MHz units */
  28477. /** The DCC stats being requested. */
  28478. A_UINT32 dcc_stats_bitmap;
  28479. } wmi_dcc_channel_stats_request;
  28480. /** Data structure for the response with the DCC stats. */
  28481. typedef struct {
  28482. /** TLV tag and len; tag equals
  28483. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param */
  28484. A_UINT32 tlv_header;
  28485. /* VDEV identifier */
  28486. A_UINT32 vdev_id;
  28487. /** Number of channels in the response. */
  28488. A_UINT32 num_channels;
  28489. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  28490. } wmi_dcc_get_stats_resp_event_fixed_param;
  28491. /** Data structure for clearing the DCC stats. */
  28492. typedef struct {
  28493. /** TLV tag and len; tag equals
  28494. * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param */
  28495. A_UINT32 tlv_header;
  28496. /* VDEV identifier */
  28497. A_UINT32 vdev_id;
  28498. A_UINT32 dcc_stats_bitmap;
  28499. } wmi_dcc_clear_stats_cmd_fixed_param;
  28500. /** Data structure for the pushed DCC stats */
  28501. typedef struct {
  28502. /** TLV tag and len; tag equals
  28503. * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param */
  28504. A_UINT32 tlv_header;
  28505. /* VDEV identifier */
  28506. A_UINT32 vdev_id;
  28507. /** The number of channels in the response. */
  28508. A_UINT32 num_channels;
  28509. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  28510. } wmi_dcc_stats_event_fixed_param;
  28511. /** Data structure for updating NDL per channel. */
  28512. typedef struct {
  28513. /** TLV tag and len; tag equals
  28514. * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan */
  28515. A_UINT32 tlv_header;
  28516. /**
  28517. * Channel frequency, 16 bits
  28518. * NDL_numActiveState, ndlType_numberElements, 1+6 bits
  28519. */
  28520. A_UINT32 chan_info;
  28521. /**
  28522. * NDL_minDccSampling, 10 bits.
  28523. * Maximum time interval between subsequent checks of the DCC rules.
  28524. */
  28525. A_UINT32 ndl_min_dcc_sampling;
  28526. /**
  28527. * dcc_enable, 1 bit.
  28528. * dcc_stats_enable, 1 bit.
  28529. * dcc_stats_interval, 16 bits.
  28530. */
  28531. A_UINT32 dcc_flags;
  28532. /** General DCC configuration. */
  28533. /**
  28534. * NDL_timeUp, ndlType_timing, 1+12 bits.
  28535. * NDL_timeDown, ndlType_timing, 1+12 bits.
  28536. */
  28537. A_UINT32 general_config;
  28538. /** Transmit power thresholds. */
  28539. /**
  28540. * NDL_minTxPower, ndlType_txPower, 1+7 bits.
  28541. * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
  28542. */
  28543. A_UINT32 min_max_tx_power; /* see "ETSI TS 102 687" table above for units */
  28544. /**
  28545. * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  28546. * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  28547. * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  28548. * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  28549. */
  28550. /* see "ETSI TS 102 687" table above for units */
  28551. A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  28552. /** Packet timing thresholds. */
  28553. /**
  28554. * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  28555. * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  28556. * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  28557. * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  28558. */
  28559. A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  28560. /**
  28561. * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
  28562. * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
  28563. */
  28564. A_UINT32 min_max_packet_interval;
  28565. /**
  28566. * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  28567. * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  28568. * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  28569. * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  28570. */
  28571. A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETINTERVAL)];
  28572. /** Packet datarate thresholds. */
  28573. /**
  28574. * NDL_minDatarate, ndlType_datarate, 1+3 bits.
  28575. * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
  28576. */
  28577. A_UINT32 min_max_datarate;
  28578. /**
  28579. * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  28580. * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  28581. * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  28582. * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  28583. */
  28584. A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_DATARATE)];
  28585. /** Receive signal thresholds. */
  28586. /**
  28587. * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
  28588. * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
  28589. * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
  28590. */
  28591. A_UINT32 min_max_def_carrier_sense;
  28592. /** Receive model parameter. */
  28593. /**
  28594. * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
  28595. * NDL_maxCsRange, ndlType_distance, 1+12 bits.
  28596. * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
  28597. */
  28598. A_UINT32 receive_model_parameter;
  28599. /**
  28600. * NDL_minSNR, ndlType_snr, 1+7 bits.
  28601. */
  28602. A_UINT32 receive_model_parameter_2;
  28603. /** Demodulation model parameters. */
  28604. /**
  28605. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  28606. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  28607. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  28608. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  28609. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  28610. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  28611. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  28612. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  28613. */
  28614. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  28615. /** Transmit model parameters. */
  28616. /**
  28617. * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  28618. * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  28619. * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  28620. * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  28621. */
  28622. A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
  28623. /**
  28624. * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  28625. * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  28626. * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  28627. * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  28628. */
  28629. A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  28630. /**
  28631. * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  28632. * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  28633. * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  28634. * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  28635. */
  28636. A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  28637. /**
  28638. * NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits.
  28639. */
  28640. A_UINT32 tm_max_channel_use;
  28641. /**
  28642. * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  28643. * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  28644. * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  28645. * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  28646. */
  28647. A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
  28648. /** Channel load thresholds. */
  28649. /**
  28650. * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
  28651. * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
  28652. */
  28653. A_UINT32 min_max_channel_load;
  28654. /** Transmit queue parameters. */
  28655. /**
  28656. * NDL_numQueue, ndlType_acPrio, 1+3 bits.
  28657. * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
  28658. * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
  28659. * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
  28660. * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
  28661. */
  28662. A_UINT32 transmit_queue_parameters;
  28663. /**
  28664. * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
  28665. * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
  28666. * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
  28667. * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
  28668. */
  28669. A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
  28670. } wmi_dcc_ndl_chan;
  28671. #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  28672. #define WMI_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  28673. #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
  28674. #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
  28675. #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
  28676. #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
  28677. #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
  28678. #define WMI_NDL_MEASURE_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
  28679. #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
  28680. #define WMI_NDL_DCC_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
  28681. #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
  28682. #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
  28683. #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
  28684. #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
  28685. #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
  28686. #define WMI_NDL_TIME_UP_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
  28687. #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
  28688. #define WMI_NDL_TIME_DOWN_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
  28689. #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
  28690. #define WMI_NDL_MIN_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
  28691. #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
  28692. #define WMI_NDL_MAX_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
  28693. #define WMI_NDL_DEF_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  28694. #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)
  28695. #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  28696. #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)
  28697. #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
  28698. #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
  28699. #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
  28700. #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
  28701. #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  28702. #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)
  28703. #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
  28704. #define WMI_NDL_MIN_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
  28705. #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
  28706. #define WMI_NDL_MAX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
  28707. #define WMI_NDL_DEF_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  28708. #define WMI_NDL_DEF_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  28709. #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
  28710. #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
  28711. #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
  28712. #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
  28713. #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
  28714. #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
  28715. #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
  28716. #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
  28717. #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
  28718. #define WMI_NDL_MAX_CS_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
  28719. #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
  28720. #define WMI_NDL_REF_PATH_LOSS_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
  28721. #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
  28722. #define WMI_NDL_MIN_SNR_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
  28723. #define WMI_NDL_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  28724. #define WMI_NDL_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  28725. #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)
  28726. #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)
  28727. #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)
  28728. #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)
  28729. #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)
  28730. #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)
  28731. #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
  28732. #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr,val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
  28733. #define WMI_NDL_TM_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  28734. #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)
  28735. #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
  28736. #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
  28737. #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
  28738. #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
  28739. #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
  28740. #define WMI_NDL_NUM_QUEUE_SET(ptr,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
  28741. #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr,acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
  28742. #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr,acprio,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
  28743. #define WMI_NDL_REF_QUEUE_LEN_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
  28744. #define WMI_NDL_REF_QUEUE_LEN_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
  28745. /** Data structure for updating the NDL. */
  28746. typedef struct {
  28747. /** TLV tag and len; tag equals
  28748. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
  28749. A_UINT32 tlv_header;
  28750. /* VDEV identifier */
  28751. A_UINT32 vdev_id;
  28752. /** The number of channels in the request. */
  28753. A_UINT32 num_channel;
  28754. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  28755. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  28756. } wmi_dcc_update_ndl_cmd_fixed_param;
  28757. typedef struct {
  28758. /** TLV tag and len; tag equals
  28759. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param */
  28760. A_UINT32 tlv_header;
  28761. /* VDEV identifier */
  28762. A_UINT32 vdev_id;
  28763. A_UINT32 status;
  28764. } wmi_dcc_update_ndl_resp_event_fixed_param;
  28765. /* Actions for TSF timestamp */
  28766. typedef enum {
  28767. TSF_TSTAMP_CAPTURE_REQ = 1,
  28768. TSF_TSTAMP_CAPTURE_RESET = 2,
  28769. TSF_TSTAMP_READ_VALUE = 3,
  28770. TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
  28771. TSF_TSTAMP_AUTO_REPORT_ENABLE = 5,
  28772. TSF_TSTAMP_AUTO_REPORT_DISABLE = 6,
  28773. TSF_TSTAMP_PERIODIC_REPORT_REQ = 5,
  28774. } wmi_tsf_tstamp_action;
  28775. typedef enum {
  28776. TSF_TSTAMP_REPORT_TTIMER = 0x1, /* bit 0: TSF Timer */
  28777. TSF_TSTAMP_REPORT_QTIMER = 0x2, /* bit 1: H/T common Timer */
  28778. } wmi_tsf_tstamp_report_flags;
  28779. #define TSF_TSTAMP_REPORT_PERIOD_MIN 1000 /* ms units */
  28780. typedef struct {
  28781. /** TLV tag and len; tag equals
  28782. * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
  28783. A_UINT32 tlv_header;
  28784. /** unique id identifying the VDEV, generated by the caller */
  28785. A_UINT32 vdev_id;
  28786. /* action type, refer to wmi_tsf_tstamp_action */
  28787. A_UINT32 tsf_action;
  28788. /*
  28789. * The below fields are valid only when tsf_action is
  28790. * TSF_TSTAMP_PERIODIC_REPORT_REQ.
  28791. */
  28792. A_UINT32 period; /* the period of report timestamp, ms units */
  28793. A_UINT32 flags; /* wmi_tsf_tstamp_report_flags */
  28794. } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
  28795. typedef struct {
  28796. /* TLV tag and len; tag equals
  28797. * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
  28798. A_UINT32 tlv_header;
  28799. /* VDEV identifier */
  28800. A_UINT32 vdev_id;
  28801. /* low 32bit of tsf */
  28802. A_UINT32 tsf_low;
  28803. /* high 32 bit of tsf */
  28804. A_UINT32 tsf_high;
  28805. /* low 32 bits of qtimer */
  28806. A_UINT32 qtimer_low;
  28807. /* high 32 bits of qtimer */
  28808. A_UINT32 qtimer_high;
  28809. /*
  28810. * tsf_id: TSF ID for the current vdev
  28811. * This field should be ignored unless the tsf_id_valid flag is set.
  28812. */
  28813. A_UINT32 tsf_id;
  28814. /*
  28815. * The mac_id and tsf_id fields should be ignored unless the
  28816. * tsf_id_valid flag is set.
  28817. */
  28818. A_UINT32 tsf_id_valid;
  28819. /*
  28820. * mac_id: MAC identifier
  28821. * This field should be ignored unless the tsf_id_valid flag is set.
  28822. */
  28823. A_UINT32 mac_id;
  28824. /*
  28825. * The original mac_id_valid field that was originally used to specify
  28826. * whether the mac_id field is valid has been repurposed to instead
  28827. * specify whether this message is a TSF report or a UL delay report.
  28828. */
  28829. union {
  28830. A_UINT32 mac_id_valid; /* original name */
  28831. /* ul_delay_or_tsf_report:
  28832. * New name for the field, reflecting its new purpose.
  28833. * ul_delay_or_tsf_report = 1 -> UL delay
  28834. * ul_delay_or_tsf_report = 0 -> TSF report
  28835. */
  28836. A_UINT32 ul_delay_or_tsf_report;
  28837. };
  28838. /* low 32 bits of wlan global tsf */
  28839. A_UINT32 wlan_global_tsf_low;
  28840. /* high 32 bits of wlan global tsf */
  28841. A_UINT32 wlan_global_tsf_high;
  28842. /* low 32 bits of tqm timer */
  28843. A_UINT32 tqm_timer_low;
  28844. /* high 32 bits of tqm timer */
  28845. A_UINT32 tqm_timer_high;
  28846. /* use tqm timer flag */
  28847. A_UINT32 use_tqm_timer;
  28848. } wmi_vdev_tsf_report_event_fixed_param;
  28849. /* ie_id values:
  28850. * 0 to 255 are used for individual IEEE802.11 Information Element types
  28851. */
  28852. #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
  28853. /* source values: */
  28854. #define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
  28855. /* band values: */
  28856. typedef enum {
  28857. WMI_SET_VDEV_IE_BAND_ALL = 0,
  28858. WMI_SET_VDEV_IE_BAND_2_4GHZ,
  28859. WMI_SET_VDEV_IE_BAND_5GHZ,
  28860. } wmi_set_vdev_ie_band;
  28861. typedef struct {
  28862. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
  28863. A_UINT32 tlv_header;
  28864. /** unique id identifying the VDEV, generated by the caller */
  28865. A_UINT32 vdev_id;
  28866. /** unique id to identify the ie_data as defined by ieee 802.11 spec */
  28867. A_UINT32 ie_id;
  28868. /** ie_len corresponds to num of bytes in ie_data[] */
  28869. A_UINT32 ie_len;
  28870. /** source of this command */
  28871. A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
  28872. /** band for this IE - se wmi_set_vdev_ie_band enum */
  28873. A_UINT32 band;
  28874. /**
  28875. * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  28876. * A_UINT8 ie_data[];
  28877. *
  28878. */
  28879. } wmi_vdev_set_ie_cmd_fixed_param;
  28880. /* DISA feature related data structures */
  28881. #define MAX_MAC_HEADER_LEN 32
  28882. typedef enum {
  28883. WMI_ENCRYPT_DECRYPT_FLAG_INVALID,
  28884. WMI_ENCRYPT = 1,
  28885. WMI_DECRYPT = 2,
  28886. } WMI_ENCRYPT_DECRYPT_FLAG;
  28887. typedef struct {
  28888. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param */
  28889. /** unique id identifying the VDEV, generated by the caller */
  28890. A_UINT32 vdev_id;
  28891. A_UINT32 key_flag; /* WMI_ENCRYPT_DECRYPT_FLAG */
  28892. A_UINT32 key_idx;
  28893. A_UINT32 key_cipher;
  28894. A_UINT32 key_len; /* units = bytes */
  28895. A_UINT32 key_txmic_len; /* units = bytes */
  28896. A_UINT32 key_rxmic_len; /* units = bytes */
  28897. /** Key: This array needs to be provided in little-endian order */
  28898. A_UINT8 key_data[WMI_MAX_KEY_LEN];
  28899. /** Packet number: This array needs to be provided in little-endian order.
  28900. * If the PN is less than 8 bytes, the PN data shall be placed into this
  28901. * pn[] array starting at byte 0, leaving the MSBs empty.
  28902. */
  28903. A_UINT8 pn[8];
  28904. /** 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
  28905. * This array needs to be provided in little-endian order.
  28906. */
  28907. A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
  28908. A_UINT32 data_len; /** Payload length, units = bytes */
  28909. /*
  28910. * Following this struct are this TLV:
  28911. * A_UINT8 data[]; <-- actual data to be encrypted,
  28912. * needs to be provided in little-endian order
  28913. */
  28914. } wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
  28915. /* This event is generated in response to WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
  28916. * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
  28917. * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
  28918. * then on receiving the tx completion for the DISA frame this WMI event
  28919. * will be delivered to HOST with the encrypted frame.
  28920. */
  28921. typedef struct {
  28922. /** TLV tag and len; tag equals
  28923. * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param */
  28924. A_UINT32 tlv_header;
  28925. /* VDEV identifier */
  28926. A_UINT32 vdev_id;
  28927. A_INT32 status; /* 0: success, -1: Failure, */
  28928. /* 802.11 header length + encrypted payload length (units = bytes) */
  28929. A_UINT32 data_length;
  28930. /*
  28931. * Following this struct is this TLV:
  28932. * A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
  28933. * 802.11 header + encrypted payload,
  28934. * provided in little-endian order
  28935. */
  28936. } wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
  28937. /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
  28938. typedef struct {
  28939. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
  28940. /** Set Preferred Channel List **/
  28941. /** # of channels to scan */
  28942. A_UINT32 num_chan;
  28943. /**
  28944. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  28945. * structure. The TLV's are:
  28946. * A_UINT32 channel_list[];
  28947. **/
  28948. } wmi_soc_set_pcl_cmd_fixed_param;
  28949. /* Values for channel_weight */
  28950. typedef enum {
  28951. WMI_PCL_WEIGHT_DISALLOW = 0,
  28952. WMI_PCL_WEIGHT_LOW = 1,
  28953. WMI_PCL_WEIGHT_MEDIUM = 2,
  28954. WMI_PCL_WEIGHT_HIGH = 3,
  28955. WMI_PCL_WEIGHT_VERY_HIGH = 4,
  28956. } wmi_pcl_chan_weight;
  28957. typedef struct {
  28958. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param */
  28959. /** Set Preferred Channel List **/
  28960. /** pdev_id for identifying the MAC
  28961. * See macros starting with WMI_PDEV_ID_ for values.
  28962. */
  28963. A_UINT32 pdev_id;
  28964. /** # of channels to scan */
  28965. A_UINT32 num_chan;
  28966. /**
  28967. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  28968. * structure. The TLV's are:
  28969. * A_UINT32 channel_weight[]; channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  28970. **/
  28971. } wmi_pdev_set_pcl_cmd_fixed_param;
  28972. /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
  28973. typedef struct {
  28974. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
  28975. /** Set Hardware Mode **/
  28976. /* Hardware Mode Index */
  28977. A_UINT32 hw_mode_index;
  28978. } wmi_soc_set_hw_mode_cmd_fixed_param;
  28979. typedef struct {
  28980. A_UINT32 tlv_header; /* TLV tag and len tag equals WMITLV_TAG_STRUC_wmi_pdev_band_to_mac */
  28981. /** pdev_id for identifying the MAC
  28982. * See macros starting with WMI_PDEV_ID_ for values.
  28983. */
  28984. A_UINT32 pdev_id;
  28985. /* start frequency in MHz */
  28986. A_UINT32 start_freq;
  28987. /* end frequency in MHz */
  28988. A_UINT32 end_freq;
  28989. } wmi_pdev_band_to_mac;
  28990. typedef struct {
  28991. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param */
  28992. /** Set Hardware Mode **/
  28993. /** pdev_id for identifying the MAC
  28994. * See macros starting with WMI_PDEV_ID_ for values.
  28995. */
  28996. A_UINT32 pdev_id;
  28997. /* Hardware Mode Index */
  28998. A_UINT32 hw_mode_index;
  28999. /* Number of band to mac TLVs */
  29000. A_UINT32 num_band_to_mac;
  29001. /* Followed by TLVs of type
  29002. * num_band_to_mac * wmi_pdev_band_to_mac.
  29003. */
  29004. } wmi_pdev_set_hw_mode_cmd_fixed_param;
  29005. /* DEPRECATED - use wmi_pdev_set_dual_mac_config_cmd_fixed_param instead */
  29006. typedef struct {
  29007. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param */
  29008. /** Set Dual MAC Firmware Configuration **/
  29009. /* Concurrent scan configuration bits */
  29010. A_UINT32 concurrent_scan_config_bits;
  29011. /* Firmware mode configuration bits */
  29012. A_UINT32 fw_mode_config_bits;
  29013. } wmi_soc_set_dual_mac_config_cmd_fixed_param;
  29014. typedef struct {
  29015. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param */
  29016. /** Set Dual MAC Firmware Configuration **/
  29017. /** pdev_id for identifying the MAC
  29018. * See macros starting with WMI_PDEV_ID_ for values.
  29019. */
  29020. A_UINT32 pdev_id;
  29021. /* Concurrent scan configuration bits */
  29022. A_UINT32 concurrent_scan_config_bits;
  29023. /* Firmware mode configuration bits */
  29024. A_UINT32 fw_mode_config_bits;
  29025. } wmi_pdev_set_mac_config_cmd_fixed_param;
  29026. typedef struct { /* DEPRECATED */
  29027. A_UINT32 num_tx_chains;
  29028. A_UINT32 num_rx_chains;
  29029. A_UINT32 reserved[2];
  29030. } soc_num_tx_rx_chains;
  29031. typedef struct {
  29032. A_UINT32 num_tx_chains_2g;
  29033. A_UINT32 num_rx_chains_2g;
  29034. A_UINT32 num_tx_chains_5g;
  29035. A_UINT32 num_rx_chains_5g;
  29036. } band_num_tx_rx_chains;
  29037. typedef union { /* DEPRECATED */
  29038. soc_num_tx_rx_chains soc_txrx_chain_setting;
  29039. band_num_tx_rx_chains band_txrx_chain_setting;
  29040. } antenna_num_tx_rx_chains;
  29041. typedef enum {
  29042. ANTENNA_MODE_DISABLED = 0x0,
  29043. ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
  29044. /* reserved */
  29045. } antenna_mode_reason;
  29046. /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
  29047. typedef struct {
  29048. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param */
  29049. /* the reason for setting antenna mode, refer antenna_mode_reason */
  29050. A_UINT32 reason;
  29051. /*
  29052. * The above reason parameter will select whether the following union
  29053. * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
  29054. */
  29055. antenna_num_tx_rx_chains num_txrx_chains_setting;
  29056. } wmi_soc_set_antenna_mode_cmd_fixed_param;
  29057. typedef struct {
  29058. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param */
  29059. /** pdev_id for identifying the MAC
  29060. * See macros starting with WMI_PDEV_ID_ for values.
  29061. */
  29062. A_UINT32 pdev_id;
  29063. /* Bits 0-15 is the number of RX chains and 16-31 is the number of TX chains */
  29064. A_UINT32 num_txrx_chains;
  29065. } wmi_pdev_set_antenna_mode_cmd_fixed_param;
  29066. /** Data structure for information specific to a VDEV to MAC mapping. */
  29067. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
  29068. typedef struct {
  29069. /** TLV tag and len; tag equals
  29070. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
  29071. A_UINT32 tlv_header;
  29072. A_UINT32 vdev_id; /* VDEV ID */
  29073. A_UINT32 mac_id; /* MAC ID */
  29074. } wmi_soc_set_hw_mode_response_vdev_mac_entry;
  29075. /** Data structure for information specific to a VDEV to MAC mapping. */
  29076. typedef struct {
  29077. /** TLV tag and len; tag equals
  29078. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
  29079. A_UINT32 tlv_header;
  29080. /** pdev_id for identifying the MAC
  29081. * See macros starting with WMI_PDEV_ID_ for values.
  29082. */
  29083. A_UINT32 pdev_id;
  29084. A_UINT32 vdev_id;
  29085. } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
  29086. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
  29087. typedef struct {
  29088. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
  29089. /** Set Hardware Mode Response Event **/
  29090. /* Status of set_hw_mode command */
  29091. /*
  29092. * Values for Status:
  29093. * 0 - OK; command successful
  29094. * 1 - EINVAL; Requested invalid hw_mode
  29095. * 2 - ECANCELED; HW mode change canceled
  29096. * 3 - ENOTSUP; HW mode not supported
  29097. * 4 - EHARDWARE; HW mode change prevented by hardware
  29098. * 5 - EPENDING; HW mode change is pending
  29099. * 6 - ECOEX; HW mode change conflict with Coex
  29100. */
  29101. A_UINT32 status;
  29102. /* Configured Hardware Mode */
  29103. A_UINT32 cfgd_hw_mode_index;
  29104. /* Number of Vdev to Mac entries */
  29105. A_UINT32 num_vdev_mac_entries;
  29106. /**
  29107. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  29108. * structure. The TLV's are:
  29109. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  29110. */
  29111. } wmi_soc_set_hw_mode_response_event_fixed_param;
  29112. typedef struct {
  29113. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param */
  29114. /** Set Hardware Mode Response Event **/
  29115. /** pdev_id for identifying the MAC
  29116. * See macros starting with WMI_PDEV_ID_ for values.
  29117. */
  29118. A_UINT32 pdev_id;
  29119. /* Status of set_hw_mode command */
  29120. /*
  29121. * Values for Status:
  29122. * 0 - OK; command successful
  29123. * 1 - EINVAL; Requested invalid hw_mode
  29124. * 2 - ECANCELED; HW mode change canceled
  29125. * 3 - ENOTSUP; HW mode not supported
  29126. * 4 - EHARDWARE; HW mode change prevented by hardware
  29127. * 5 - EPENDING; HW mode change is pending
  29128. * 6 - ECOEX; HW mode change conflict with Coex
  29129. */
  29130. A_UINT32 status;
  29131. /* Configured Hardware Mode */
  29132. A_UINT32 cfgd_hw_mode_index;
  29133. /* Number of Vdev to Mac entries */
  29134. A_UINT32 num_vdev_mac_entries;
  29135. /**
  29136. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  29137. * structure. The TLV's are:
  29138. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  29139. */
  29140. } wmi_pdev_set_hw_mode_response_event_fixed_param;
  29141. /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
  29142. typedef struct {
  29143. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
  29144. /** Hardware Mode Transition Event **/
  29145. /* Original or old Hardware mode */
  29146. A_UINT32 old_hw_mode_index;
  29147. /* New Hardware Mode */
  29148. A_UINT32 new_hw_mode_index;
  29149. /* Number of Vdev to Mac entries */
  29150. A_UINT32 num_vdev_mac_entries;
  29151. /**
  29152. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  29153. * structure. The TLV's are:
  29154. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  29155. */
  29156. } wmi_soc_hw_mode_transition_event_fixed_param;
  29157. typedef struct {
  29158. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param */
  29159. /** Hardware Mode Transition Event **/
  29160. /** pdev_id for identifying the MAC
  29161. * See macros starting with WMI_PDEV_ID_ for values.
  29162. */
  29163. A_UINT32 pdev_id;
  29164. /* Original or old Hardware mode */
  29165. A_UINT32 old_hw_mode_index;
  29166. /* New Hardware Mode */
  29167. A_UINT32 new_hw_mode_index;
  29168. /* Number of Vdev to Mac entries */
  29169. A_UINT32 num_vdev_mac_entries;
  29170. /**
  29171. * TLV (tag length value) parameters follow the pdev_set_hw_mode_response_event
  29172. * structure. The TLV's are:
  29173. * wmi_pdev_set_hw_mode_response_vdev_mac_entry
  29174. * wmi_pdev_set_hw_mode_response_vdev_mac_mapping[];
  29175. * wmi_pdev_band_to_mac mac_freq_mapping[];
  29176. */
  29177. } wmi_pdev_hw_mode_transition_event_fixed_param;
  29178. /**
  29179. * This command is sent from WLAN host driver to firmware for
  29180. * plugging in reorder queue desc to lithium hw.
  29181. *
  29182. * Example: plug-in queue desc for TID 5
  29183. * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  29184. * (vdev_id = PEER vdev id,
  29185. * peer_macaddr = PEER mac addr,
  29186. * tid = 5,
  29187. * queue_ptr_lo = queue desc addr lower 32 bits,
  29188. * queue_ptr_hi = queue desc addr higher 32 bits,
  29189. * queue_no = 16-bit number assigned by host for queue,
  29190. * stored in bits 15:0 of queue_no field)
  29191. */
  29192. typedef struct {
  29193. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param */
  29194. A_UINT32 vdev_id;
  29195. wmi_mac_addr peer_macaddr; /* peer mac address */
  29196. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  29197. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc address */
  29198. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc address */
  29199. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  29200. stored in bits 15:0 of queue_no field */
  29201. A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
  29202. * 0 = Invalid, 1 = Valid */
  29203. A_UINT32 ba_window_size; /* Valid values: 0 to 256
  29204. * Host sends the message when BA session is
  29205. * established or terminated for the TID. */
  29206. } wmi_peer_reorder_queue_setup_cmd_fixed_param;
  29207. typedef struct {
  29208. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_per_reorder_q_setup_params_t */
  29209. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  29210. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc address */
  29211. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc address */
  29212. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  29213. * stored in bits 15:0 of queue_no field */
  29214. A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
  29215. * 0 = Invalid, 1 = Valid */
  29216. A_UINT32 ba_window_size; /* Valid values: 0 to 256
  29217. * Host sends the message when BA session is
  29218. * established or terminated for the TID. */
  29219. } wmi_peer_per_reorder_q_setup_params_t;
  29220. /**
  29221. * This command is sent from WLAN host driver to firmware for
  29222. * plugging in reorder queue desc to hw for multiple TIDs in one shot.
  29223. *
  29224. * Example: plug-in queue desc
  29225. * host->target: WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID,
  29226. * (vdev_id = PEER vdev id,
  29227. * peer_macaddr = PEER mac addr)
  29228. */
  29229. typedef struct {
  29230. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param */
  29231. A_UINT32 vdev_id;
  29232. wmi_mac_addr peer_macaddr; /* peer mac address */
  29233. /*
  29234. * This struct is followed by other TLVs:
  29235. * wmi_peer_per_reorder_q_setup_params_t q_setup_params[num_queues];
  29236. */
  29237. } wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param;
  29238. /**
  29239. * This command is sent from WLAN host driver to firmware for
  29240. * removing one or more reorder queue desc to lithium hw.
  29241. *
  29242. * Example: remove queue desc for all TIDs
  29243. * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
  29244. * (vdev_id = PEER vdev id,
  29245. * peer_macaddr = PEER mac addr,
  29246. * tid = 0x1FFFF,
  29247. */
  29248. typedef struct {
  29249. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param */
  29250. A_UINT32 vdev_id;
  29251. wmi_mac_addr peer_macaddr; /* peer mac address */
  29252. A_UINT32 tid_mask; /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
  29253. } wmi_peer_reorder_queue_remove_cmd_fixed_param;
  29254. /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param instead */
  29255. typedef struct {
  29256. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param */
  29257. /** Set Dual MAC Config Response Event **/
  29258. /* Status for set_dual_mac_config command */
  29259. /*
  29260. * Values for Status:
  29261. * 0 - OK; command successful
  29262. * 1 - EINVAL; Requested invalid hw_mode
  29263. * 3 - ENOTSUP; HW mode not supported
  29264. * 4 - EHARDWARE; HW mode change prevented by hardware
  29265. * 6 - ECOEX; HW mode change conflict with Coex
  29266. */
  29267. A_UINT32 status;
  29268. } wmi_soc_set_dual_mac_config_response_event_fixed_param;
  29269. typedef struct {
  29270. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param */
  29271. /** Set Dual MAC Config Response Event **/
  29272. /** pdev_id for identifying the MAC
  29273. * See macros starting with WMI_PDEV_ID_ for values.
  29274. */
  29275. A_UINT32 pdev_id;
  29276. /* Status for set_dual_mac_config command */
  29277. /*
  29278. * Values for Status:
  29279. * 0 - OK; command successful
  29280. * 1 - EINVAL; Requested invalid hw_mode
  29281. * 3 - ENOTSUP; HW mode not supported
  29282. * 4 - EHARDWARE; HW mode change prevented by hardware
  29283. * 6 - ECOEX; HW mode change conflict with Coex
  29284. */
  29285. A_UINT32 status;
  29286. } wmi_pdev_set_mac_config_response_event_fixed_param;
  29287. typedef enum {
  29288. MAWC_MOTION_STATE_UNKNOWN,
  29289. MAWC_MOTION_STATE_STATIONARY,
  29290. MAWC_MOTION_STATE_WALK,
  29291. MAWC_MOTION_STATE_TRANSIT,
  29292. } MAWC_MOTION_STATE;
  29293. typedef enum {
  29294. MAWC_SENSOR_STATUS_OK,
  29295. MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
  29296. MAWC_SENSOR_STATUS_SHUTDOWN,
  29297. } MAWC_SENSOR_STATUS;
  29298. typedef struct {
  29299. /* TLV tag and len; tag equals
  29300. * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
  29301. A_UINT32 tlv_header;
  29302. /** new motion state, MAWC_MOTION_STATE */
  29303. A_UINT32 motion_state;
  29304. /** status code of sensor, MAWC_SENSOR_STATUS */
  29305. A_UINT32 sensor_status;
  29306. } wmi_mawc_sensor_report_ind_cmd_fixed_param;
  29307. /* MBO flag field definition */
  29308. /* Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
  29309. * 1 - Allow to connect to MBO AP only
  29310. * Bit 1-31 : reserved.
  29311. */
  29312. #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
  29313. typedef struct {
  29314. /* TLV tag and len; tag equals
  29315. * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param */
  29316. A_UINT32 tlv_header;
  29317. /** vdev id */
  29318. A_UINT32 vdev_id;
  29319. /** enable or disable MBO */
  29320. A_UINT32 enable;
  29321. /** MBO flags, refer to definition of MBO flags*/
  29322. A_UINT32 flags;
  29323. } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
  29324. typedef struct {
  29325. /* TLV tag and len; tag equals
  29326. * WMITLV_TAG_ARRAY_STRUC */
  29327. A_UINT32 tlv_header;
  29328. /** Current operating class number */
  29329. A_UINT32 cur_op_class;
  29330. /** Country string of current reg domain,
  29331. * the expected value should be same as country str defined
  29332. * in country IE.
  29333. * 3 octets (COUNTRY_STR) + 1 octet (always 0)
  29334. * The ordering of this array must be maintained,
  29335. * even when a big-endian host's WMI messages undergo
  29336. * automatic byte reordering for conversion to the
  29337. * little-endian ordering required by the target.
  29338. * On big-endian hosts, this array may need to be byte-swapped
  29339. * by the host, so the subsequent automatic byte-swap
  29340. * will result in the correct final byte order.
  29341. * global operating class: set country_str[0]=0
  29342. */
  29343. A_UINT8 country_str[4];
  29344. /** Supported operating class number in current regdomain */
  29345. A_UINT32 supp_op_class_num;
  29346. /* The TLVs will follow. */
  29347. /* A_UINT32 supp_op_class_list[] */
  29348. } wmi_supported_operating_class_param;
  29349. typedef struct {
  29350. /* TLV tag and len; tag equals
  29351. * WMITLV_TAG_ARRAY_STRUC */
  29352. A_UINT32 tlv_header;
  29353. /** non preferred channel attribute length */
  29354. A_UINT32 non_prefer_ch_attr_len;
  29355. /* The TLVs will follow. */
  29356. /** A_UINT8 non_prefer_ch_attr[];*/
  29357. } wmi_mbo_non_preferred_channel_report_param;
  29358. typedef struct {
  29359. /* TLV tag and len; tag equals
  29360. * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
  29361. A_UINT32 tlv_header;
  29362. /* enable(1) or disable(0) */
  29363. A_UINT32 enable;
  29364. } wmi_mawc_enable_sensor_event_fixed_param;
  29365. typedef struct {
  29366. /* TLV tag and len; tag equals
  29367. * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
  29368. A_UINT32 tlv_header;
  29369. /* Unique id identifying the VDEV */
  29370. A_UINT32 vdev_id;
  29371. /* enable(1) or disable(0) MAWC */
  29372. A_UINT32 enable;
  29373. /* ratio of skipping suppressing scan, skip one out of x */
  29374. A_UINT32 suppress_ratio;
  29375. } wmi_extscan_configure_mawc_cmd_fixed_param;
  29376. typedef struct {
  29377. /* TLV tag and len; tag equals
  29378. * WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param */
  29379. A_UINT32 tlv_header;
  29380. /* Unique id identifying the VDEV */
  29381. A_UINT32 vdev_id;
  29382. /* enable(1) or disable(0) packet error rate trigger for roaming */
  29383. A_UINT32 enable;
  29384. /* high_rate_thresh, low_rate_thresh, pkt_err_rate_thresh_pct:
  29385. * If PER monitoring as a trigger for roaming is enabled,
  29386. * it is controlled by high_rate_thresh, low_rate_thresh, and
  29387. * pkt_err_rate_thresh_pct.
  29388. * PER monitoring is performed only when the time-averaged throughput
  29389. * is less than high_rate_thresh.
  29390. * During PER monitoring, the target keeps track of the PHY rate for
  29391. * each of the first N PPDUs within a time window.
  29392. * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
  29393. * N * pkt_err_rate_thresh_pct / 100, roaming will be triggered.
  29394. *
  29395. * This PER monitoring as a trigger for roaming is performed
  29396. * concurrently but independently for rx and tx.
  29397. */
  29398. A_UINT32 high_rate_thresh; /* units = Kbps */
  29399. A_UINT32 low_rate_thresh; /* units = Kbps */
  29400. A_UINT32 pkt_err_rate_thresh_pct;
  29401. /*
  29402. * rest time after associating to a new AP before
  29403. * starting to monitor PER as a roaming trigger,
  29404. * (units are seconds)
  29405. */
  29406. A_UINT32 per_rest_time;
  29407. /* This is the total time for which PER monitoring will be run.
  29408. * After completion of time windows, the average PER over the window
  29409. * will be computed.
  29410. * The parameter value stores specifications for both TX and RX
  29411. * monitor times.
  29412. * The two least-significant bytes (0 & 1) hold the RX monitor time;
  29413. * the two most-significant bytes (2 & 3) hold the TX monitor time.
  29414. */
  29415. A_UINT32 pkt_err_rate_mon_time; /* units = seconds */
  29416. /* Minimum roamable AP RSSI for candidate selection for PER based roam */
  29417. A_INT32 min_candidate_rssi; /* units = dBm */
  29418. } wmi_roam_per_config_fixed_param;
  29419. typedef struct {
  29420. /* TLV tag and len; tag equals
  29421. * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
  29422. A_UINT32 tlv_header;
  29423. /* Unique id identifying the VDEV */
  29424. A_UINT32 vdev_id;
  29425. /* enable(1) or disable(0) MAWC */
  29426. A_UINT32 enable;
  29427. /* ratio of exponential backoff, next = current + current*ratio/100 */
  29428. A_UINT32 exp_backoff_ratio;
  29429. /* initial scan interval(msec) */
  29430. A_UINT32 init_scan_interval;
  29431. /* max scan interval(msec) */
  29432. A_UINT32 max_scan_interval;
  29433. } wmi_nlo_configure_mawc_cmd_fixed_param;
  29434. typedef struct {
  29435. /* TLV tag and len; tag equals
  29436. * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
  29437. A_UINT32 tlv_header;
  29438. /* Unique id identifying the VDEV */
  29439. A_UINT32 vdev_id;
  29440. /* enable(1) or disable(0) MAWC */
  29441. A_UINT32 enable;
  29442. /* data traffic load (kBps) to register CMC */
  29443. A_UINT32 traffic_load_threshold;
  29444. /* RSSI threshold (dBm) to scan for Best AP */
  29445. A_UINT32 best_ap_rssi_threshold;
  29446. /* high RSSI threshold adjustment in Stationary to suppress scan */
  29447. A_UINT32 rssi_stationary_high_adjust;
  29448. /* low RSSI threshold adjustment in Stationary to suppress scan */
  29449. A_UINT32 rssi_stationary_low_adjust;
  29450. } wmi_roam_configure_mawc_cmd_fixed_param;
  29451. #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
  29452. #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
  29453. typedef enum {
  29454. PACKET_FILTER_TYPE_INVALID = 0,
  29455. PACKET_FILTER_TYPE_FILTER_PKT,
  29456. PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
  29457. PACKET_FILTER_TYPE_MAX_ENUM_SIZE
  29458. } WMI_PACKET_FILTER_FILTER_TYPE;
  29459. typedef enum {
  29460. PACKET_FILTER_PROTO_TYPE_INVALID = 0,
  29461. /* L2 header */
  29462. PACKET_FILTER_PROTO_TYPE_MAC,
  29463. PACKET_FILTER_PROTO_TYPE_SNAP,
  29464. /* L3 header (EtherType) */
  29465. PACKET_FILTER_PROTO_TYPE_IPV4,
  29466. PACKET_FILTER_PROTO_TYPE_IPV6,
  29467. /* L4 header (IP protocol) */
  29468. PACKET_FILTER_PROTO_TYPE_UDP,
  29469. PACKET_FILTER_PROTO_TYPE_TCP,
  29470. PACKET_FILTER_PROTO_TYPE_ICMPV6,
  29471. PACKET_FILTER_PROTO_TYPE_MAX
  29472. } WMI_PACKET_FILTER_PROTO_TYPE;
  29473. typedef enum {
  29474. PACKET_FILTER_CMP_TYPE_INVALID = 0,
  29475. PACKET_FILTER_CMP_TYPE_EQUAL,
  29476. PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
  29477. PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
  29478. PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  29479. PACKET_FILTER_CMP_TYPE_ADDRTYPE,
  29480. PACKET_FILTER_CMP_TYPE_MAX
  29481. } WMI_PACKET_FILTER_CMP_TYPE;
  29482. typedef enum {
  29483. PACKET_FILTER_SET_INACTIVE = 0,
  29484. PACKET_FILTER_SET_ACTIVE
  29485. } WMI_PACKET_FILTER_ACTION;
  29486. typedef enum {
  29487. PACKET_FILTER_SET_DISABLE = 0,
  29488. PACKET_FILTER_SET_ENABLE
  29489. } WMI_PACKET_FILTER_RUNTIME_ENABLE;
  29490. typedef struct {
  29491. A_UINT32 proto_type;
  29492. A_UINT32 cmp_type;
  29493. A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
  29494. A_UINT32 data_offset; /* from start of the respective frame header (units = bytes) */
  29495. A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
  29496. A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
  29497. } WMI_PACKET_FILTER_PARAMS_TYPE;
  29498. typedef struct {
  29499. A_UINT32 tlv_header;
  29500. A_UINT32 vdev_id;
  29501. A_UINT32 filter_id;
  29502. A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
  29503. A_UINT32 filter_type;
  29504. A_UINT32 num_params; /* how many entries in paramsData are valid */
  29505. A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
  29506. WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
  29507. /* deprecated0:
  29508. * This field simply provides filler space to retain the original message
  29509. * format while reducing WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER
  29510. * from 10 to 5.
  29511. */
  29512. WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
  29513. } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
  29514. /* enable / disable all filters within the specified vdev */
  29515. typedef struct {
  29516. A_UINT32 tlv_header;
  29517. A_UINT32 vdev_id;
  29518. A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
  29519. } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
  29520. #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
  29521. #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
  29522. #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
  29523. WMI_SET_BITS(tcp_flag_u32, \
  29524. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  29525. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
  29526. tcp_flag_values)
  29527. #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
  29528. WMI_GET_BITS(tcp_flag_u32, \
  29529. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  29530. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
  29531. #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
  29532. #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
  29533. #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
  29534. WMI_SET_BITS(tcp_flag_u32, \
  29535. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  29536. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
  29537. tcp_flags_mask)
  29538. #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
  29539. WMI_GET_BITS(tcp_flag_u32, \
  29540. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  29541. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
  29542. typedef struct {
  29543. A_UINT32 tlv_header;
  29544. /**
  29545. * @brief lro_enable - indicates whether lro is enabled
  29546. * [0] LRO Enable
  29547. */
  29548. A_UINT32 lro_enable;
  29549. /**
  29550. * @brief tcp_flag_u32 - mask of which TCP flags to check and
  29551. * values to check for
  29552. * [8:0] TCP flag values - If the TCP flags from the packet do not match
  29553. * the values in this field after masking with TCP flags mask below,
  29554. * LRO eligible will not be set
  29555. * [17:9] TCP flags mask - Mask field for comparing the TCP values
  29556. * provided above with the TCP flags field in the received packet
  29557. * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
  29558. * macros to isolate the mask field and values field that are packed
  29559. * into this u32 "word".
  29560. */
  29561. A_UINT32 tcp_flag_u32;
  29562. /**
  29563. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29564. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29565. * bytes 0 to 3
  29566. *
  29567. * In this and all the below toeplitz_hash fields, the bytes are
  29568. * specified in little-endian order. For example:
  29569. * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
  29570. * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
  29571. * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
  29572. * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
  29573. */
  29574. A_UINT32 toeplitz_hash_ipv4_0_3;
  29575. /**
  29576. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29577. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29578. * bytes 4 to 7
  29579. */
  29580. A_UINT32 toeplitz_hash_ipv4_4_7;
  29581. /**
  29582. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29583. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29584. * bytes 8 to 11
  29585. */
  29586. A_UINT32 toeplitz_hash_ipv4_8_11;
  29587. /**
  29588. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29589. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29590. * bytes 12 to 15
  29591. */
  29592. A_UINT32 toeplitz_hash_ipv4_12_15;
  29593. /**
  29594. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  29595. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  29596. * byte 16
  29597. */
  29598. A_UINT32 toeplitz_hash_ipv4_16;
  29599. /**
  29600. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29601. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29602. * bytes 0 to 3
  29603. */
  29604. A_UINT32 toeplitz_hash_ipv6_0_3;
  29605. /**
  29606. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29607. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29608. * bytes 4 to 7
  29609. */
  29610. A_UINT32 toeplitz_hash_ipv6_4_7;
  29611. /**
  29612. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29613. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29614. * bytes 8 to 11
  29615. */
  29616. A_UINT32 toeplitz_hash_ipv6_8_11;
  29617. /**
  29618. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29619. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29620. * bytes 12 to 15
  29621. */
  29622. A_UINT32 toeplitz_hash_ipv6_12_15;
  29623. /**
  29624. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29625. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29626. * bytes 16 to 19
  29627. */
  29628. A_UINT32 toeplitz_hash_ipv6_16_19;
  29629. /**
  29630. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29631. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29632. * bytes 20 to 22
  29633. */
  29634. A_UINT32 toeplitz_hash_ipv6_20_23;
  29635. /**
  29636. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29637. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29638. * bytes 24 to 27
  29639. */
  29640. A_UINT32 toeplitz_hash_ipv6_24_27;
  29641. /**
  29642. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29643. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29644. * bytes 28 to 31
  29645. */
  29646. A_UINT32 toeplitz_hash_ipv6_28_31;
  29647. /**
  29648. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29649. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29650. * bytes 32 to 35
  29651. */
  29652. A_UINT32 toeplitz_hash_ipv6_32_35;
  29653. /**
  29654. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29655. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29656. * bytes 36 to 39
  29657. */
  29658. A_UINT32 toeplitz_hash_ipv6_36_39;
  29659. /**
  29660. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  29661. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  29662. * byte 40
  29663. */
  29664. A_UINT32 toeplitz_hash_ipv6_40;
  29665. /**
  29666. * @brief pdev_id - identifies the MAC
  29667. * See macros starting with WMI_PDEV_ID_ for values.
  29668. */
  29669. A_UINT32 pdev_id;
  29670. } wmi_lro_info_cmd_fixed_param;
  29671. typedef struct {
  29672. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param */
  29673. A_UINT32 offset; /* flash offset to write, starting from 0 */
  29674. A_UINT32 length; /* valid data length in buffer, unit: byte */
  29675. } wmi_transfer_data_to_flash_cmd_fixed_param;
  29676. typedef struct {
  29677. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param */
  29678. /** Return status. 0 for success, non-zero otherwise */
  29679. A_UINT32 status;
  29680. } wmi_transfer_data_to_flash_complete_event_fixed_param;
  29681. typedef struct {
  29682. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param */
  29683. A_UINT32 offset; /* flash offset to read, starting from 0 */
  29684. A_UINT32 length; /* data length to read, unit: byte */
  29685. } wmi_read_data_from_flash_cmd_fixed_param;
  29686. typedef struct {
  29687. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param */
  29688. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  29689. A_UINT32 offset; /* flash offset reading from, starting from 0 */
  29690. A_UINT32 length; /* length of data being reported, unit: byte */
  29691. } wmi_read_data_from_flash_event_fixed_param;
  29692. typedef enum {
  29693. ENHANCED_MCAST_FILTER_DISABLED,
  29694. ENHANCED_MCAST_FILTER_ENABLED
  29695. } ENHANCED_MCAST_FILTER_CONFIG;
  29696. /*
  29697. * Command to enable/disable filtering of multicast IP with unicast mac
  29698. */
  29699. typedef struct {
  29700. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param */
  29701. /* Unique id identifying the VDEV */
  29702. A_UINT32 vdev_id;
  29703. /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
  29704. A_UINT32 enable;
  29705. } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
  29706. typedef struct {
  29707. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param */
  29708. A_UINT32 tlv_header;
  29709. /** unique id identifying the VDEV, generated by the caller */
  29710. A_UINT32 vdev_id;
  29711. /** WISA enable / disable mode */
  29712. A_UINT32 wisa_mode;
  29713. } wmi_vdev_wisa_cmd_fixed_param;
  29714. /*
  29715. * This structure is used to report SMPS force mode set complete to host.
  29716. */
  29717. typedef struct {
  29718. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param */
  29719. /* Unique id identifying the VDEV */
  29720. A_UINT32 vdev_id;
  29721. /* Return status. 0 for success, non-zero otherwise */
  29722. A_UINT32 status;
  29723. } wmi_sta_smps_force_mode_complete_event_fixed_param;
  29724. /*
  29725. * This structure is used to report SCPC calibrated data to host.
  29726. */
  29727. typedef struct {
  29728. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param */
  29729. /** number of BDF patches. Each patch contains offset, length and data */
  29730. A_UINT32 num_patch;
  29731. /* This TLV is followed by another TLV of array of bytes
  29732. * A_UINT8 data[];
  29733. * This data array contains, for example
  29734. * patch1 offset(byte3~0), patch1 data length(byte7~4), patch1 data(byte11~8)
  29735. * patch2 offset(byte15~12), patch2 data length(byte19~16), patch2 data(byte47~20)
  29736. *
  29737. */
  29738. } wmi_scpc_event_fixed_param;
  29739. typedef enum {
  29740. FW_ACTIVE_BPF_MODE_DISABLE = (1 << 1),
  29741. FW_ACTIVE_BPF_MODE_FORCE_ENABLE = (1 << 2),
  29742. FW_ACTIVE_BPF_MODE_ADAPTIVE_ENABLE = (1 << 3),
  29743. } FW_ACTIVE_BPF_MODE;
  29744. /* bpf interface structure */
  29745. typedef struct wmi_bpf_get_capability_cmd_s {
  29746. A_UINT32 tlv_header;
  29747. A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
  29748. } wmi_bpf_get_capability_cmd_fixed_param;
  29749. typedef struct wmi_bpf_capability_info_evt_s {
  29750. A_UINT32 tlv_header;
  29751. A_UINT32 bpf_version; /* fw's implement version */
  29752. A_UINT32 max_bpf_filters; /* max filters that fw supports */
  29753. A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
  29754. A_UINT32 fw_active_bpf_support_mcbc_modes; /* multicast/broadcast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  29755. A_UINT32 fw_active_bpf_support_uc_modes; /* unicast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  29756. } wmi_bpf_capability_info_evt_fixed_param;
  29757. /* bit 0 of flags: report counters */
  29758. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
  29759. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
  29760. typedef struct wmi_bpf_get_vdev_stats_cmd_s {
  29761. A_UINT32 tlv_header;
  29762. A_UINT32 flags;
  29763. A_UINT32 vdev_id;
  29764. } wmi_bpf_get_vdev_stats_cmd_fixed_param;
  29765. typedef struct wmi_bpf_vdev_stats_info_evt_s {
  29766. A_UINT32 tlv_header;
  29767. A_UINT32 vdev_id;
  29768. A_UINT32 num_filters;
  29769. A_UINT32 num_checked_pkts;
  29770. A_UINT32 num_dropped_pkts;
  29771. } wmi_bpf_vdev_stats_info_evt_fixed_param;
  29772. typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
  29773. A_UINT32 tlv_header;
  29774. A_UINT32 vdev_id;
  29775. A_UINT32 filter_id;
  29776. A_UINT32 bpf_version; /* host bpf version */
  29777. A_UINT32 total_length;
  29778. A_UINT32 current_offset;
  29779. A_UINT32 current_length;
  29780. /*
  29781. * The TLV follows:
  29782. * A_UINT8 buf_inst[]; <-- Variable length buffer for the instuctions
  29783. */
  29784. } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
  29785. #define BPF_FILTER_ID_ALL 0xFFFFFFFF
  29786. typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
  29787. A_UINT32 tlv_header;
  29788. A_UINT32 vdev_id;
  29789. A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
  29790. } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
  29791. typedef struct wmi_bpf_set_vdev_active_mode_cmd_s {
  29792. A_UINT32 tlv_header;
  29793. A_UINT32 vdev_id;
  29794. A_UINT32 mcbc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  29795. A_UINT32 uc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  29796. } wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
  29797. typedef struct wmi_bpf_set_vdev_enable_cmd_s {
  29798. A_UINT32 tlv_header;
  29799. A_UINT32 vdev_id;
  29800. A_UINT32 is_enabled; /* fw assume host default enables */
  29801. } wmi_bpf_set_vdev_enable_cmd_fixed_param;
  29802. typedef struct wmi_bpf_set_vdev_work_memory_cmd_s {
  29803. A_UINT32 tlv_header;
  29804. A_UINT32 vdev_id;
  29805. A_UINT32 bpf_version; /* bpf instruction version */
  29806. A_UINT32 program_len; /* the program length may be changed by this command */
  29807. A_UINT32 addr_offset; /* start writing addr in the working memory */
  29808. A_UINT32 length; /* the writing size of this command (byte units) */
  29809. /*
  29810. * The TLV follows:
  29811. * A_UINT8 buf_inst[]; <-- Variable length buffer with the data to write
  29812. */
  29813. } wmi_bpf_set_vdev_work_memory_cmd_fixed_param;
  29814. typedef struct wmi_bpf_get_vdev_work_memory_cmd_s {
  29815. A_UINT32 tlv_header;
  29816. A_UINT32 vdev_id;
  29817. A_UINT32 addr_offset; /* start reading addr in the working memory */
  29818. A_UINT32 length; /* reading size from addr (byte units) */
  29819. } wmi_bpf_get_vdev_work_memory_cmd_fixed_param;
  29820. typedef struct wmi_bpf_get_vdev_work_memory_resp_evt_s {
  29821. A_UINT32 tlv_header;
  29822. A_UINT32 vdev_id;
  29823. A_UINT32 offset; /* read memory offset from start_addr */
  29824. A_UINT32 length; /* read memory length of this command */
  29825. A_UINT32 fragment; /* 1 means more data will come, 0 means last fragment */
  29826. /*
  29827. * The TLV follows:
  29828. * A_UINT8 buf_inst[]; <-- Variable length buffer containing the read data
  29829. */
  29830. } wmi_bpf_get_vdev_work_memory_resp_evt_fixed_param;
  29831. #define AES_BLOCK_LEN 16 /* in bytes */
  29832. #define FIPS_KEY_LENGTH_128 16 /* in bytes */
  29833. #define FIPS_KEY_LENGTH_256 32 /* in bytes */
  29834. #define FIPS_ENCRYPT_CMD 0
  29835. #define FIPS_DECRYPT_CMD 1
  29836. #define FIPS_ENGINE_AES_CTR 0
  29837. #define FIPS_ENGINE_AES_MIC 1
  29838. #define FIPS_ERROR_OPER_TIMEOUT 1
  29839. typedef enum {
  29840. WMI_FIPS_KEY_CIPHER_CCM,
  29841. WMI_FIPS_KEY_CIPHER_GCM
  29842. } wmi_fips_key_cipher;
  29843. typedef enum {
  29844. WMI_FIPS_DISABLE,
  29845. WMI_FIPS_ENABLE
  29846. } wmi_fips_mode_set;
  29847. /* WMI_PDEV_FIPS_CMDID */
  29848. typedef struct {
  29849. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param */
  29850. union {
  29851. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  29852. /** pdev_id for identifying the MAC
  29853. * See macros starting with WMI_PDEV_ID_ for values.
  29854. */
  29855. A_UINT32 pdev_id;
  29856. };
  29857. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  29858. A_UINT32 mode; /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
  29859. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
  29860. A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
  29861. A_UINT32 data_len; /* data length */
  29862. /*
  29863. * Following this structure is the TLV:
  29864. * A_UINT32 data[1]; <-- In Data (keep this in the end)
  29865. */
  29866. } wmi_pdev_fips_cmd_fixed_param;
  29867. #define MAX_IVNONCE_LEN_FIPS_EXTEND 16
  29868. typedef struct {
  29869. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_init_params */
  29870. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  29871. A_UINT32 key_cipher; /* CCM or GCM */
  29872. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256: 16/32 bytes */
  29873. 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). */
  29874. A_UINT32 nonce_iv_len;
  29875. 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).*/
  29876. A_UINT32 tag_len; /* 8 or 16 */
  29877. A_UINT32 aad_len;
  29878. A_UINT32 payload_len;/* Plaintext length */
  29879. } wmi_fips_extend_cmd_init_params;
  29880. typedef struct {
  29881. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_fixed_param */
  29882. A_UINT32 pdev_id;
  29883. A_UINT32 fips_cookie; /* Cookie value to identify test vector */
  29884. A_UINT32 frag_idx; /* Fragment Number */
  29885. A_UINT32 more_bit; /* Set to 0 for last fragment number */
  29886. A_UINT32 data_len; /* data length ()*/
  29887. /*
  29888. * Following this structure are the TLVs:
  29889. * wmi_fips_extend_cmd_init_params cmd_params
  29890. * A_UINT32 data[1]; <-- In Data ((aad, payload in order))
  29891. */
  29892. } wmi_pdev_fips_extend_cmd_fixed_param;
  29893. typedef struct {
  29894. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_fixed_param */
  29895. A_UINT32 pdev_id;
  29896. A_UINT32 fips_mode_set; /*FIPS_MODE_ENABLE -Enable, FIPS_MODE_DISABLE -disable */
  29897. } wmi_pdev_fips_mode_set_cmd_fixed_param;
  29898. typedef struct {
  29899. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_featureset_cmd_fixed_param */
  29900. /*
  29901. * Following this structure are the TLVs:
  29902. * A_UINT32 feature_set_bitmap[]; <-- Host supported feature info,
  29903. * array length is equal to
  29904. * WMI_FEATURE_SET_BITMAP_ARRAY_LEN32.
  29905. */
  29906. } wmi_pdev_featureset_cmd_fixed_param;
  29907. typedef struct {
  29908. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param */
  29909. union {
  29910. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  29911. /** pdev_id for identifying the MAC
  29912. * See macros starting with WMI_PDEV_ID_ for values.
  29913. */
  29914. A_UINT32 pdev_id;
  29915. };
  29916. A_UINT32 enable; /* 1:enable, 0:disable */
  29917. A_UINT32 mode; /* 1:GPIO parallel mode, 0:GPIO serial mode */
  29918. A_UINT32 rx_antenna; /* rx antenna */
  29919. A_UINT32 tx_default_antenna; /* tx default antenna */
  29920. /*
  29921. * Following this structure is the TLV:
  29922. * wmi_pdev_smart_ant_gpio_handle
  29923. */
  29924. } wmi_pdev_smart_ant_enable_cmd_fixed_param;
  29925. /** GPIO pins/function values to control antennas */
  29926. typedef struct {
  29927. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle */
  29928. A_UINT32 gpio_pin; /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
  29929. A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
  29930. /** pdev_id for identifying the MAC
  29931. * See macros starting with WMI_PDEV_ID_ for values.
  29932. */
  29933. A_UINT32 pdev_id;
  29934. } wmi_pdev_smart_ant_gpio_handle;
  29935. typedef struct {
  29936. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param */
  29937. union {
  29938. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  29939. /** pdev_id for identifying the MAC
  29940. * See macros starting with WMI_PDEV_ID_ for values.
  29941. */
  29942. A_UINT32 pdev_id;
  29943. };
  29944. A_UINT32 rx_antenna;
  29945. } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
  29946. typedef struct {
  29947. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param */
  29948. /** unique id identifying the vdev, generated by the caller */
  29949. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  29950. /** peer MAC address */
  29951. wmi_mac_addr peer_macaddr;
  29952. /*
  29953. * Following this structure is the TLV:
  29954. * wmi_peer_smart_ant_set_tx_antenna_series
  29955. */
  29956. } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
  29957. typedef struct {
  29958. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series */
  29959. /* antenna array */
  29960. A_UINT32 antenna_series;
  29961. } wmi_peer_smart_ant_set_tx_antenna_series;
  29962. #define WMI_PER_VALID_BIT_POS 0
  29963. #define WMI_PER_VALID_NUM_BITS 1
  29964. #define WMI_GET_PER_VALID(per_threshold) \
  29965. WMI_GET_BITS(per_threshold, WMI_PER_VALID_BIT_POS, WMI_PER_VALID_NUM_BITS)
  29966. #define WMI_PER_VALID_SET(per_threshold, value) \
  29967. WMI_SET_BITS(per_threshold, WMI_PER_VALID_BIT_POS, WMI_PER_VALID_NUM_BITS, value)
  29968. #define WMI_PER_THRESHOLD_BIT_POS 1
  29969. #define WMI_PER_THRESHOLD_NUM_BITS 8
  29970. #define WMI_GET_PER_THRESHOLD(per_threshold) \
  29971. WMI_GET_BITS(per_threshold, WMI_PER_THRESHOLD_BIT_POS, WMI_PER_THRESHOLD_NUM_BITS)
  29972. #define WMI_PER_THRESHOLD_SET(per_threshold, value) \
  29973. WMI_SET_BITS(per_threshold, WMI_PER_THRESHOLD_BIT_POS, WMI_PER_THRESHOLD_NUM_BITS, value)
  29974. #define WMI_PER_MIN_TX_PKTS_BIT_POS 9
  29975. #define WMI_PER_MIN_TX_PKTS_NUM_BITS 16
  29976. #define WMI_GET_PER_MIN_TX_PKTS(per_threshold) \
  29977. WMI_GET_BITS(per_threshold, WMI_PER_MIN_TX_PKTS_BIT_POS, WMI_PER_MIN_TX_PKTS_NUM_BITS)
  29978. #define WMI_PER_MIN_TX_PKTS_SET(per_threshold, value) \
  29979. WMI_SET_BITS(per_threshold, WMI_PER_MIN_TX_PKTS_BIT_POS, WMI_PER_MIN_TX_PKTS_NUM_BITS, value)
  29980. #define WMI_RATE_SERIES_320_BIT_POS 0
  29981. #define WMI_RATE_SERIES_320_NUM_BITS 16
  29982. #define WMI_GET_RATE_SERIES_320(train_rate_series_ext) \
  29983. WMI_GET_BITS(train_rate_series_ext, WMI_RATE_SERIES_320_BIT_POS, WMI_RATE_SERIES_320_NUM_BITS)
  29984. #define WMI_SET_RATE_SERIES_320(train_rate_series_ext) \
  29985. WMI_SET_BITS(train_rate_series_ext, WMI_RATE_SERIES_320_BIT_POS, WMI_RATE_SERIES_320_NUM_BITS, value)
  29986. typedef struct {
  29987. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */
  29988. /* rate array */
  29989. union {
  29990. /* train_rate_series:
  29991. * original name, used for 8-bit rate-code implementations
  29992. */
  29993. A_UINT32 train_rate_series;
  29994. /* train_rate_series_lo:
  29995. * Contains the lower 32 bits of rate array, for larger rate-code
  29996. * implementations. This field is paired with train_rate_series_hi.
  29997. */
  29998. A_UINT32 train_rate_series_lo;
  29999. };
  30000. /* antenna array */
  30001. A_UINT32 train_antenna_series;
  30002. /* Rate flags */
  30003. /* TODO: For future use? */
  30004. A_UINT32 rc_flags;
  30005. /* rate array -- continued */
  30006. A_UINT32 train_rate_series_hi; /* Higher 32 bits of rate array */
  30007. /* train_rate_series_ext:
  30008. * 15:0 - 320Mhz rate
  30009. * 31:16 - Reserved
  30010. */
  30011. A_UINT32 train_rate_series_ext; /* For 320Mhz and Reserved for other */
  30012. } wmi_peer_smart_ant_set_train_antenna_param;
  30013. typedef struct {
  30014. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param */
  30015. /** unique id identifying the VDEV, generated by the caller */
  30016. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  30017. /** peer MAC address */
  30018. wmi_mac_addr peer_macaddr;
  30019. /* num packets; 0-stop training */
  30020. A_UINT32 num_pkts;
  30021. /* per_threshold:
  30022. * bits | interpretation
  30023. * ------+--------------------------
  30024. * 0 | PER Threshold is valid
  30025. * 1:8 | Per Threshold
  30026. * 9:24 | min_tx_pkts Minimum number of pkts need to be checked
  30027. * 25:31 | Reserved
  30028. */
  30029. A_UINT32 per_threshold;
  30030. /*
  30031. * Following this structure is the TLV:
  30032. * wmi_peer_smart_ant_set_train_antenna_param
  30033. */
  30034. } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
  30035. typedef struct {
  30036. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param */
  30037. /** unique id identifying the vdev, generated by the caller */
  30038. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  30039. /** peer MAC address */
  30040. wmi_mac_addr peer_macaddr;
  30041. /* command id*/
  30042. A_UINT32 cmd_id;
  30043. /* number of arguments passed */
  30044. A_UINT32 args_count;
  30045. /*
  30046. * Following this structure is the TLV:
  30047. * A_UINT32 args[]; <-- argument list
  30048. */
  30049. } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
  30050. typedef struct {
  30051. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain */
  30052. A_UINT32 antCtrlChain;
  30053. /** pdev_id for identifying the MAC
  30054. * See macros starting with WMI_PDEV_ID_ for values.
  30055. */
  30056. A_UINT32 pdev_id;
  30057. } wmi_pdev_set_ant_ctrl_chain;
  30058. typedef struct {
  30059. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param */
  30060. A_UINT32 mac_id; /* MAC ID */
  30061. A_UINT32 antCtrlCommon1;
  30062. A_UINT32 antCtrlCommon2;
  30063. /*
  30064. * Following this structure is the TLV:
  30065. * wmi_pdev_set_ant_ctrl_chain
  30066. */
  30067. } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
  30068. typedef struct {
  30069. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param */
  30070. union {
  30071. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  30072. /** pdev_id for identifying the MAC
  30073. * See macros starting with WMI_PDEV_ID_ for values.
  30074. */
  30075. A_UINT32 pdev_id;
  30076. };
  30077. /** len of CTL info */
  30078. A_UINT32 ctl_len;
  30079. /* ctl array (len adjusted to number of words).
  30080. * Following this structure is the TLV:
  30081. * A_UINT32 ctl_info[1];
  30082. */
  30083. } wmi_pdev_set_ctl_table_cmd_fixed_param;
  30084. typedef struct {
  30085. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_sar_cmd_fixed_param */
  30086. A_UINT32 pdev_id; /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  30087. A_UINT32 sar_len;
  30088. /* sar power array are stored in TLV, which follow this structure;
  30089. * sar_len is the number of valid bytes in the sar power array;
  30090. * sar power array contains 22 elements.
  30091. * Each element stores the maximum SAR power on certain band.
  30092. * Its type is A_UINT8 and its unit is 0.25 dBm.
  30093. * sar_power[0] for chain0 2g
  30094. * sar_power[1] for chain0 5g unii-1
  30095. * ...
  30096. * sar_power[4] for chain0 5g unii-4
  30097. * sar_power[5] for chain0 6g unii-5
  30098. * ...
  30099. * sar_power[10] for chain0 6g unii-10
  30100. * sar_power[11] for chain1 2g
  30101. * ...
  30102. * sar_power[21] for chain1 6g unii-10
  30103. */
  30104. A_UINT32 dbs_backoff_len;
  30105. /* dbs_backoff follow sar array, its type is A_UINT8;
  30106. * dbs_backoff[0] ~ dbs_backoff[5], these six elements are based on
  30107. * maximum SAR power, and make some offset adjustment in DBS mode.
  30108. * Their unit is 0.25 dB.
  30109. * dbs_backoff[0] for chain 0 2G
  30110. * dbs_backoff[1] for chain 0 5G
  30111. * dbs_backoff[2] for chain 0 6G
  30112. * dbs_backoff[3] for chain 1 2G
  30113. * dbs_backoff[4] for chain 1 5G
  30114. * dbs_backoff[5] for chain 1 6G
  30115. */
  30116. } wmi_pdev_set_bios_sar_table_cmd_fixed_param;
  30117. typedef struct {
  30118. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_sar_cmd_fixed_param */
  30119. A_UINT32 pdev_id; /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  30120. A_UINT32 geo_len;
  30121. /* geo offset array is in TLV, followed this structure:
  30122. * A_UINT8 Geo_offset[];
  30123. * Geo_offset array has 18 elements. The meaning of each element is to
  30124. * adjust offset based on maximum SAR power according to different regions.
  30125. * Its unit is 0.25 dB.
  30126. * Geo_offset[0] chain 0 FCC_Offset on 2G
  30127. * Geo_offset[1] chain 0 FCC_Offset on 5G
  30128. * Geo_offset[2] chain 0 FCC_Offset on 6G
  30129. * Geo_offset[3] chain 0 CE_Offset on 2G
  30130. * Geo_offset[4] chain 0 CE_Offset on 5G
  30131. * Geo_offset[5] chain 0 CE_Offset on 6G
  30132. * Geo_offset[6] chain 0 ROW_Offset on 2G
  30133. * Geo_offset[7] chain 0 ROW_Offset on 5G
  30134. * Geo_offset[8] chain 0 ROW_Offset on 6G
  30135. * Geo_offset[9] chain 1 FCC_Offset on 2G
  30136. * ...
  30137. * Geo_offset[17] chain 1 ROW_Offset on 6G
  30138. * In actual use, FW will subtract an offset value according to the region;
  30139. */
  30140. } wmi_pdev_set_bios_geo_table_cmd_fixed_param;
  30141. typedef struct {
  30142. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_interface_cmd_fixed_param */
  30143. A_UINT32 pdev_id; /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  30144. A_UINT32 param_type_id; /* BIOS parameters type, see bios_param_type_e */
  30145. /* length:
  30146. * Number of valid bytes in A_UINT8 TLV array that follows this
  30147. * fixed_param TLV.
  30148. * The number of bytes allocated in the A_UINT8 TLV array will be a
  30149. * multiple of 4. The "length" field indicates how many of these
  30150. * byte elements contain valid data; the remainder are only for
  30151. * alignment padding and should be ignored.
  30152. */
  30153. A_UINT32 length;
  30154. /* Following this structure is TLV, bios data array */
  30155. } wmi_pdev_set_bios_interface_cmd_fixed_param;
  30156. typedef enum {
  30157. BIOS_PARAM_CCA_THRESHOLD_TYPE,
  30158. /* CCA THR structure has 29 bytes, it includes control flag and
  30159. * CCA THR parameters;
  30160. *
  30161. * If CCA_THR_Control is set 0, FW will still use
  30162. * AGC_ENERGY_DETECT_THRESHOLD.agcEnergyDetThr in BDF, and detailed
  30163. * CCA threshold do not need to be transported.
  30164. * If CCA_THR_Control is set 1, FW needs to use CCA threshold parameters
  30165. * in BIOS, and CCA THR parameters are provided in the subsequent A_UINT8
  30166. * TLV array.
  30167. *
  30168. * In CCA THR parameters, ETSI / MKK / CHN use same CCA threshold,
  30169. * and FCC / KOR use same CCA threshold. Its unit is in 1db,
  30170. * which is relative to HW NF value.
  30171. *
  30172. * //control flag
  30173. * A_UINT8 CCA_THR_Control
  30174. *
  30175. * //5G
  30176. * A_UINT8 agcEnergyDetThr5G_thrCcaPri20dB_ETSI_MKK_CHN
  30177. * A_UINT8 agcEnergyDetThr5G_thrCcaExt20dB_ETSI_MKK_CHN
  30178. * A_UINT8 agcEnergyDetThr5G_thrCcaExt40dB_ETSI_MKK_CHN
  30179. * A_UINT8 agcEnergyDetThr5G_thrCcaExt80dB_ETSI_MKK_CHN
  30180. * A_UINT8 agcEnergyDetThr5G_thrCcaPri20dB_FCC_KOR
  30181. * A_UINT8 agcEnergyDetThr5G_thrCcaExt20dB_FCC_KOR
  30182. * A_UINT8 agcEnergyDetThr5G_thrCcaExt40dB_FCC_KOR
  30183. * A_UINT8 agcEnergyDetThr5G_thrCcaExt80dB_FCC_KOR
  30184. *
  30185. * //2G
  30186. * A_UINT8 agcEnergyDetThr2G_thrCcaPri20dB_ETSI_MKK_CHN
  30187. * A_UINT8 agcEnergyDetThr2G_thrCcaExt20dB_ETSI_MKK_CHN
  30188. * A_UINT8 agcEnergyDetThr2G_thrCcaExt40dB_ETSI_MKK_CHN
  30189. * A_UINT8 agcEnergyDetThr2G_thrCcaExt80dB_ETSI_MKK_CHN
  30190. * A_UINT8 agcEnergyDetThr2G_thrCcaPri20dB_FCC_KOR
  30191. * A_UINT8 agcEnergyDetThr2G_thrCcaExt20dB_FCC_KOR
  30192. * A_UINT8 agcEnergyDetThr2G_hrCcaExt40dB_FCC_KOR
  30193. * A_UINT8 agcEnergyDetThr2G_hrCcaExt80dB_FCC_KOR
  30194. *
  30195. * //6G
  30196. * A_UINT8 agcEnergyDetThr6G_thrCcaPri20dB_FCC_KOR
  30197. * A_UINT8 agcEnergyDetThr6G_thrCcaExt20dB_FCC_KOR
  30198. * A_UINT8 agcEnergyDetThr6G_thrCcaExt40dB_FCC_KOR
  30199. * A_UINT8 agcEnergyDetThr6G_thrCcaExt80dB_FCC_KOR
  30200. *
  30201. * //6G-LPI/VLP
  30202. * A_UINT8 agcEnergyDetThr6GLPI.thrCcaPri20dB_ETSI_MKK_CHN
  30203. * A_UINT8 agcEnergyDetThr6GLPI thrCcaExt20dB_ETSI_MKK_CHN
  30204. * A_UINT8 agcEnergyDetThr6GLPI thrCcaExt40dB_ETSI_MKK_CHN
  30205. * A_UINT8 agcEnergyDetThr6GLPI.thrCcaExt80dB_ETSI_MKK_CHN
  30206. * A_UINT8 agcEnergyDetThr6GVLP.thrCcaPri20dB_ETSI_MKK_CHN
  30207. * A_UINT8 agcEnergyDetThr6GVLP thrCcaExt20dB_ETSI_MKK_CHN
  30208. * A_UINT8 agcEnergyDetThr6GVLP thrCcaExt40dB_ETSI_MKK_CHN
  30209. * A_UINT8 agcEnergyDetThr6GVLP.thrCcaExt80dB_ETSI_MKK_CHN
  30210. */
  30211. BIOS_PARAM_TAS_CONFIG_TYPE,
  30212. /*
  30213. * BIOS_PARAM_TAS_CONFIG_TYPE Structure has 108 bytes. Please Note these fields of A_UINT32 or A_INT32.
  30214. * 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.
  30215. * PowerLimitIndicator points out which region(FCC OR ICNIRP) power limit value should be used.
  30216. * A bit of PowerLimitIndicator maps a country. bit value 0: ICNIRP 1: FCC
  30217. *
  30218. * A_UINT8 Version
  30219. * A_UINT8 TASIsPairWith3rdPartyWwan
  30220. * A_UINT8 SARAntennaGroupingExt[6] (6 Bytes)
  30221. * A_UINT32 TASPeakModeIndicator[8] (32 Bytes)
  30222. * A_UINT32 TAS_FCC_ICNIRP_Indicator[8] (32 Bytes)
  30223. * A_UINT32 PowerLimitIndicator[8] (32 Bytes)
  30224. * A_UINT8 reserveMarginDb (1 Bytes)
  30225. * A_UINT8 reserved[3] (3 Bytes)
  30226. */
  30227. BIOS_PARAM_TAS_DATA_TYPE,
  30228. /*
  30229. * BIOS_PARAM_TAS_DATA_TYPE Structure has 69 bytes as below, power limit value unit is 0.25 dBm.
  30230. * If Enable flag is 0, FW will not use power limit value of bios.
  30231. *
  30232. * A_UINT8 Version
  30233. * A_UINT8 Enable Flag
  30234. * A_UINT8 Power Table Index
  30235. * ====================FCC POWER LIMIT VALUE======================
  30236. * A_INT8 FCC 2 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm)
  30237. * A_INT8 FCC 2 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm)
  30238. * A_INT8 FCC 2 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm)
  30239. * A_INT8 FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30240. * A_INT8 FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30241. * A_INT8 FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30242. * A_INT8 FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30243. * A_INT8 FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30244. * A_INT8 FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30245. * A_INT8 FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30246. * A_INT8 FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30247. * A_INT8 FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30248. * A_INT8 FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30249. * A_INT8 FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30250. * A_INT8 FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30251. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30252. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30253. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30254. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30255. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30256. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30257. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30258. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30259. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30260. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30261. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30262. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30263. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30264. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30265. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30266. * A_INT8 FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30267. * A_INT8 FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30268. * A_INT8 FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30269. * ====================ICNIRP POWER LIMIT VALUE======================
  30270. * A_INT8 ICNIRP 2 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm)
  30271. * A_INT8 ICNIRP 2 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm)
  30272. * A_INT8 ICNIRP 2 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm)
  30273. * A_INT8 ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30274. * A_INT8 ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30275. * A_INT8 ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
  30276. * A_INT8 ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30277. * A_INT8 ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30278. * A_INT8 ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
  30279. * A_INT8 ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30280. * A_INT8 ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30281. * A_INT8 ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
  30282. * A_INT8 ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30283. * A_INT8 ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30284. * A_INT8 ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
  30285. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30286. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30287. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
  30288. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30289. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30290. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
  30291. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30292. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30293. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
  30294. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30295. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30296. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30297. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30298. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30299. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
  30300. * A_INT8 ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30301. * A_INT8 ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30302. * A_INT8 ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
  30303. */
  30304. BIOS_PARAM_TYPE_BANDEDGE_CTL_POWER,
  30305. /*
  30306. * BIOS_PARAM_TYPE_BANDEDGE_CTL_POWER Structure has 100 bytes as below, CTL limit power unit is 0.25 dBm.
  30307. * If Enable flag is 0, FW will not use power limit value of bios.
  30308. *
  30309. * A_UINT8 version
  30310. * A_UINT8 enableFlag (always 1)
  30311. * A_UINT8 reserved[2] for 4 byte alignment,
  30312. * ====================2G CTL POWER LIMIT ======================
  30313. * A_INT8 2G 20M Channel Center Freq 2412 CTL Limit Power SU
  30314. * A_INT8 2G 20M Channel Center Freq 2412 CTL Limit Power OFDMA
  30315. * A_INT8 2G 20M Channel Center Freq 2417 CTL Limit Power SU
  30316. * A_INT8 2G 20M Channel Center Freq 2417 CTL Limit Power OFDMA
  30317. * A_INT8 2G 20M Channel Center Freq 2462 CTL Limit Power SU
  30318. * A_INT8 2G 20M Channel Center Freq 2462 CTL Limit Power OFDMA
  30319. * A_INT8 2G 20M Channel Center Freq 2467 CTL Limit Power SU
  30320. * A_INT8 2G 20M Channel Center Freq 2467 CTL Limit Power OFDMA
  30321. * A_INT8 2G 20M Channel Center Freq 2472 CTL Limit Power SU
  30322. * A_INT8 2G 20M Channel Center Freq 2472 CTL Limit Power OFDMA
  30323. * A_INT8 2G 40M Channel Center Freq 2422 CTL Limit Power SU
  30324. * A_INT8 2G 40M Channel Center Freq 2422 CTL Limit Power OFDMA
  30325. * A_INT8 2G 40M Channel Center Freq 2427 CTL Limit Power SU
  30326. * A_INT8 2G 40M Channel Center Freq 2427 CTL Limit Power OFDMA
  30327. * A_INT8 2G 40M Channel Center Freq 2452 CTL Limit Power SU
  30328. * A_INT8 2G 40M Channel Center Freq 2452 CTL Limit Power OFDMA
  30329. * A_INT8 2G 40M Channel Center Freq 2457 CTL Limit Power SU
  30330. * A_INT8 2G 40M Channel Center Freq 2457 CTL Limit Power OFDMA
  30331. * A_INT8 2G 40M Channel Center Freq 2462 CTL Limit Power SU
  30332. * A_INT8 2G 40M Channel Center Freq 2462 CTL Limit Power OFDMA
  30333. * ====================5G CTL POWER LIMIT ======================
  30334. * A_INT8 5G 20M Channel Center Freq 5180 CTL Limit Power SU
  30335. * A_INT8 5G 20M Channel Center Freq 5180 CTL Limit Power OFDMA
  30336. * A_INT8 5G 20M Channel Center Freq 5320 CTL Limit Power SU
  30337. * A_INT8 5G 20M Channel Center Freq 5320 CTL Limit Power OFDMA
  30338. * A_INT8 5G 20M Channel Center Freq 5500 CTL Limit Power SU
  30339. * A_INT8 5G 20M Channel Center Freq 5500 CTL Limit Power OFDMA
  30340. * A_INT8 5G 20M Channel Center Freq 5700 CTL Limit Power SU
  30341. * A_INT8 5G 20M Channel Center Freq 5700 CTL Limit Power OFDMA
  30342. * A_INT8 5G 20M Channel Center Freq 5745 CTL Limit Power SU
  30343. * A_INT8 5G 20M Channel Center Freq 5745 CTL Limit Power OFDMA
  30344. * A_INT8 5G 20M Channel Center Freq 5825 CTL Limit Power SU
  30345. * A_INT8 5G 20M Channel Center Freq 5825 CTL Limit Power OFDMA
  30346. * A_INT8 5G 20M Channel Center Freq 5845 CTL Limit Power SU
  30347. * A_INT8 5G 20M Channel Center Freq 5845 CTL Limit Power OFDMA
  30348. * A_INT8 5G 20M Channel Center Freq 5885 CTL Limit Power SU
  30349. * A_INT8 5G 20M Channel Center Freq 5885 CTL Limit Power OFDMA
  30350. * A_INT8 5G 40M Channel Center Freq 5190 CTL Limit Power SU
  30351. * A_INT8 5G 40M Channel Center Freq 5190 CTL Limit Power OFDMA
  30352. * A_INT8 5G 40M Channel Center Freq 5310 CTL Limit Power SU
  30353. * A_INT8 5G 40M Channel Center Freq 5310 CTL Limit Power OFDMA
  30354. * A_INT8 5G 40M Channel Center Freq 5510 CTL Limit Power SU
  30355. * A_INT8 5G 40M Channel Center Freq 5510 CTL Limit Power OFDMA
  30356. * A_INT8 5G 40M Channel Center Freq 5670 CTL Limit Power SU
  30357. * A_INT8 5G 40M Channel Center Freq 5670 CTL Limit Power OFDMA
  30358. * A_INT8 5G 40M Channel Center Freq 5755 CTL Limit Power SU
  30359. * A_INT8 5G 40M Channel Center Freq 5755 CTL Limit Power OFDMA
  30360. * A_INT8 5G 40M Channel Center Freq 5795 CTL Limit Power SU
  30361. * A_INT8 5G 40M Channel Center Freq 5795 CTL Limit Power OFDMA
  30362. * A_INT8 5G 40M Channel Center Freq 5835 CTL Limit Power SU
  30363. * A_INT8 5G 40M Channel Center Freq 5835 CTL Limit Power OFDMA
  30364. * A_INT8 5G 40M Channel Center Freq 5875 CTL Limit Power SU
  30365. * A_INT8 5G 40M Channel Center Freq 5875 CTL Limit Power OFDMA
  30366. * A_INT8 5G 80M Channel Center Freq 5210 CTL Limit Power SU
  30367. * A_INT8 5G 80M Channel Center Freq 5210 CTL Limit Power OFDMA
  30368. * A_INT8 5G 80M Channel Center Freq 5290 CTL Limit Power SU
  30369. * A_INT8 5G 80M Channel Center Freq 5290 CTL Limit Power OFDMA
  30370. * A_INT8 5G 80M Channel Center Freq 5530 CTL Limit Power SU
  30371. * A_INT8 5G 80M Channel Center Freq 5530 CTL Limit Power OFDMA
  30372. * A_INT8 5G 80M Channel Center Freq 5610 CTL Limit Power SU
  30373. * A_INT8 5G 80M Channel Center Freq 5610 CTL Limit Power OFDMA
  30374. * A_INT8 5G 80M Channel Center Freq 5775 CTL Limit Power SU
  30375. * A_INT8 5G 80M Channel Center Freq 5775 CTL Limit Power OFDMA
  30376. * A_INT8 5G 80M Channel Center Freq 5855 CTL Limit Power SU
  30377. * A_INT8 5G 80M Channel Center Freq 5855 CTL Limit Power OFDMA
  30378. * A_INT8 5G 160M Channel Center Freq 5250 CTL Limit Power SU
  30379. * A_INT8 5G 160M Channel Center Freq 5250 CTL Limit Power OFDMA
  30380. * A_INT8 5G 160M Channel Center Freq 5570 CTL Limit Power SU
  30381. * A_INT8 5G 160M Channel Center Freq 5570 CTL Limit Power OFDMA
  30382. * A_INT8 5G 160M Channel Center Freq 5815 CTL Limit Power SU
  30383. * A_INT8 5G 160M Channel Center Freq 5815 CTL Limit Power OFDMA
  30384. * A_INT8 5G 320M Channel Center Freq 5650 CTL Limit Power SU (5650 Punctured 1111_1111_1111_0000)
  30385. * A_INT8 5G 320M Channel Center Freq 5650 CTL Limit Power OFDMA (5650 Punctured 1111_1111_1111_0000)
  30386. * ====================6G CTL POWER LIMIT ======================
  30387. * A_INT8 6G 20M Channel Center Freq 5935 CTL Limit Power SU
  30388. * A_INT8 6G 20M Channel Center Freq 5935 CTL Limit Power OFDMA
  30389. * A_INT8 6G 20M Channel Center Freq 5955 CTL Limit Power SU
  30390. * A_INT8 6G 20M Channel Center Freq 5955 CTL Limit Power OFDMA
  30391. * A_INT8 6G 20M Channel Center Freq 6415 CTL Limit Power SU
  30392. * A_INT8 6G 20M Channel Center Freq 6415 CTL Limit Power OFDMA
  30393. * A_INT8 6G 20M Channel Center Freq 7115 CTL Limit Power SU
  30394. * A_INT8 6G 20M Channel Center Freq 7115 CTL Limit Power OFDMA
  30395. * A_INT8 6G 40M Channel Center Freq 5965 CTL Limit Power SU
  30396. * A_INT8 6G 40M Channel Center Freq 5965 CTL Limit Power OFDMA
  30397. * A_INT8 6G 40M Channel Center Freq 6405 CTL Limit Power SU
  30398. * A_INT8 6G 40M Channel Center Freq 6405 CTL Limit Power OFDMA
  30399. * A_INT8 6G 80M Channel Center Freq 5985 CTL Limit Power SU
  30400. * A_INT8 6G 80M Channel Center Freq 5985 CTL Limit Power OFDMA
  30401. * A_INT8 6G 80M Channel Center Freq 6385 CTL Limit Power SU
  30402. * A_INT8 6G 80M Channel Center Freq 6385 CTL Limit Power OFDMA
  30403. * A_INT8 6G 160M Channel Center Freq 6025 CTL Limit Power SU
  30404. * A_INT8 6G 160M Channel Center Freq 6025 CTL Limit Power OFDMA
  30405. * A_INT8 6G 160M Channel Center Freq 6345 CTL Limit Power SU
  30406. * A_INT8 6G 160M Channel Center Freq 6345 CTL Limit Power OFDMA
  30407. * A_INT8 6G 320M Channel Center Freq 6105 CTL Limit Power SU
  30408. * A_INT8 6G 320M Channel Center Freq 6105 CTL Limit Power OFDMA
  30409. * A_INT8 6G 320M Channel Center Freq 6265 CTL Limit Power SU
  30410. * A_INT8 6G 320M Channel Center Freq 6265 CTL Limit Power OFDMA
  30411. */
  30412. BIOS_PARAM_TYPE_MAX,
  30413. } bios_param_type_e;
  30414. typedef struct {
  30415. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param */
  30416. union {
  30417. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  30418. /** pdev_id for identifying the MAC
  30419. * See macros starting with WMI_PDEV_ID_ for values.
  30420. */
  30421. A_UINT32 pdev_id;
  30422. };
  30423. A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
  30424. /*
  30425. * Bit 7:0 len of array gain table
  30426. * Bit 8 bypass multi chain gain or not
  30427. */
  30428. /* array gain table(s) (len adjusted to number of words).
  30429. * Following this structure is the TLV:
  30430. * A_UINT32 arraygain_tbl[1];
  30431. */
  30432. } wmi_pdev_set_mimogain_table_cmd_fixed_param;
  30433. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
  30434. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
  30435. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  30436. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  30437. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
  30438. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
  30439. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  30440. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  30441. typedef struct {
  30442. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param */
  30443. /** parameter id */
  30444. A_UINT32 param_id;
  30445. /** parameter value */
  30446. A_UINT32 param_value;
  30447. } wmi_fwtest_set_param_cmd_fixed_param;
  30448. #define WMI_ATF_DENOMINATION 1000 /* Expressed in 1 part in 1000 (permille) */
  30449. #define WMI_ATF_SSID_FAIR_SCHED 0 /** fair ATF scheduling for vdev */
  30450. #define WMI_ATF_SSID_STRICT_SCHED 1 /** strict ATF scheduling for vdev */
  30451. #define WMI_ATF_SSID_FAIR_SCHED_WITH_UB 2 /** fair ATF scheduling with upper bound for VDEV */
  30452. typedef struct {
  30453. /** TLV tag and len; tag equals
  30454. * WMITLV_TAG_STRUC_wmi_atf_peer_info */
  30455. A_UINT32 tlv_header;
  30456. wmi_mac_addr peer_macaddr;
  30457. A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
  30458. A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
  30459. A_UINT32 atf_units_reserved; /* Peer congestion threshold for future use */
  30460. A_UINT32 vdev_id;
  30461. A_UINT32 pdev_id;
  30462. } wmi_atf_peer_info;
  30463. #define WMI_ATF_PEER_UNITS_BIT_POS 0
  30464. #define WMI_ATF_PEER_UNITS_NUM_BITS 16
  30465. #define WMI_ATF_GET_PEER_UNITS(atf_peer_info) \
  30466. WMI_GET_BITS(atf_peer_info,WMI_ATF_PEER_UNITS_BIT_POS,WMI_ATF_PEER_UNITS_NUM_BITS)
  30467. #define WMI_ATF_SET_PEER_UNITS(atf_peer_info,val) \
  30468. WMI_SET_BITS(atf_peer_info,WMI_ATF_PEER_UNITS_BIT_POS,WMI_ATF_PEER_UNITS_NUM_BITS, val)
  30469. #define WMI_ATF_GROUP_ID_BIT_POS 16
  30470. #define WMI_ATF_GROUP_ID_NUM_BITS 8
  30471. #define WMI_ATF_GET_GROUP_ID(atf_peer_info) \
  30472. WMI_GET_BITS(atf_peer_info,WMI_ATF_GROUP_ID_BIT_POS,WMI_ATF_GROUP_ID_NUM_BITS)
  30473. #define WMI_ATF_SET_GROUP_ID(atf_peer_info,val) \
  30474. WMI_SET_BITS(atf_peer_info,WMI_ATF_GROUP_ID_BIT_POS,WMI_ATF_GROUP_ID_NUM_BITS, val)
  30475. #define WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS 24
  30476. #define WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS 1
  30477. #define WMI_ATF_GET_EXPLICIT_PEER_FLAG(atf_peer_info) \
  30478. WMI_GET_BITS(atf_peer_info,WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS,WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS)
  30479. #define WMI_ATF_SET_EXPLICIT_PEER_FLAG(atf_peer_info,val) \
  30480. WMI_SET_BITS(atf_peer_info,WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS,WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS, val)
  30481. typedef struct {
  30482. /* The new structure is an optimized version of wmi_atf_peer_info & wmi_atf_peer_ext_info combined */
  30483. A_UINT32 tlv_header;
  30484. wmi_mac_addr peer_macaddr;
  30485. /* atf_peer_info
  30486. * Bits 0-15 - atf_units (based on 1 part in 1000 (per mille))
  30487. * Bits 16-23 - atf_groupid
  30488. * Bit 24 - Configured Peer Indication (0/1), this bit would be set by
  30489. * host to indicate that the peer has airtime % configured
  30490. * explicitly by user
  30491. * Bits 25-31 - Reserved (Shall be zero)
  30492. */
  30493. A_UINT32 atf_peer_info;
  30494. } wmi_atf_peer_info_v2;
  30495. #define WMI_ATF_PEER_FULL_UPDATE_BIT_POS 0
  30496. #define WMI_ATF_PEER_FULL_UPDATE_NUM_BITS 1
  30497. #define WMI_ATF_GET_PEER_FULL_UPDATE(atf_flags) \
  30498. WMI_GET_BITS(atf_flags,WMI_ATF_PEER_FULL_UPDATE_BIT_POS,WMI_ATF_PEER_FULL_UPDATE_NUM_BITS)
  30499. #define WMI_ATF_SET_PEER_FULL_UPDATE(atf_flags,val) \
  30500. WMI_SET_BITS(atf_flags,WMI_ATF_PEER_FULL_UPDATE_BIT_POS,WMI_ATF_PEER_FULL_UPDATE_NUM_BITS,val)
  30501. #define WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS 1
  30502. #define WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS 1
  30503. #define WMI_ATF_GET_PEER_PENDING_WMI_CMDS(atf_flags) \
  30504. WMI_GET_BITS(atf_flags,WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS, WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS)
  30505. #define WMI_ATF_SET_PEER_PENDING_WMI_CMDS(atf_flags,val) \
  30506. WMI_SET_BITS(atf_flags,WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS, WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS, val)
  30507. #define WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS 2
  30508. #define WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS 1
  30509. #define WMI_ATF_GET_PEER_PDEV_ID_VALID(atf_flags) \
  30510. WMI_GET_BITS(atf_flags,WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS, WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS)
  30511. #define WMI_ATF_SET_PEER_PDEV_ID_VALID(atf_flags,val) \
  30512. WMI_SET_BITS(atf_flags,WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS, WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS, val)
  30513. typedef struct {
  30514. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */
  30515. A_UINT32 num_peers;
  30516. A_UINT32 pdev_id;
  30517. /* atf_flags
  30518. * Bit 0 - full or partial update;
  30519. * full update -
  30520. * indicates that this is done for all the connected peers
  30521. * partial update -
  30522. * indicates update for only the newly connected peers
  30523. * (whenever some peers gets connected/disconnected)
  30524. * Bit 1 - indicates whether there are more iterations of WMI command
  30525. * incoming after the current set of cmds
  30526. * Example : If there are 500 peers present and tlv can accomodate
  30527. * only 50 peers at a time, then this will be set for all the
  30528. * instances of the WMI commands except the last one.
  30529. * Bit 2 - indicates if pdev_id is valid or not
  30530. * Bits 3-31 - Reserved (Shall be zero)
  30531. */
  30532. A_UINT32 atf_flags;
  30533. /*
  30534. * Following this structure is one of the following TLVs
  30535. * (only one of them will have valid data in a particular message)
  30536. * - struct wmi_atf_peer_info peer_info[num_peers];
  30537. * - struct wmi_atf_peer_info_v2 peer_info_v2[num_peers];
  30538. */
  30539. } wmi_peer_atf_request_fixed_param;
  30540. #define WMI_ATF_GROUP_SCHED_POLICY_BIT_POS 0
  30541. #define WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS 4
  30542. #define WMI_ATF_GROUP_GET_GROUP_SCHED_POLICY(atf_group_flags) \
  30543. WMI_GET_BITS(atf_group_flags,WMI_ATF_GROUP_SCHED_POLICY_BIT_POS,WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS)
  30544. #define WMI_ATF_GROUP_SET_GROUP_SCHED_POLICY(atf_group_flags,val) \
  30545. WMI_SET_BITS(atf_group_flags,WMI_ATF_GROUP_SCHED_POLICY_BIT_POS,WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS,val)
  30546. typedef struct {
  30547. /** TLV tag and len; tag equals
  30548. * WMITLV_TAG_STRUC_wmi_atf_group_info */
  30549. A_UINT32 tlv_header;
  30550. A_UINT32 atf_group_id; /* ID of the Air Time Management group */
  30551. /* atf_group_units
  30552. * Fraction of air time allowed for the group, in per mille units
  30553. * (from 0-1000).
  30554. * For example, to indicate that the group can use 12.3% of the air time,
  30555. * the atf_group_units setting would be 123.
  30556. */
  30557. A_UINT32 atf_group_units;
  30558. /* atf_group_flags
  30559. * Bits 4-31 - Reserved (Shall be zero)
  30560. * Bits 0-3 - Group Schedule Policy (Fair/Strict/Fair with upper bound)
  30561. * Refer to WMI_ATF_SSID_ definitions
  30562. */
  30563. A_UINT32 atf_group_flags;
  30564. } wmi_atf_group_info;
  30565. #define WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS 0
  30566. #define WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS 16
  30567. #define WMI_ATF_GROUP_GET_NUM_EXPLICIT_PEERS(atf_total_num_peers) \
  30568. WMI_GET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS)
  30569. #define WMI_ATF_GROUP_SET_NUM_EXPLICIT_PEERS(atf_total_num_peers, val) \
  30570. WMI_SET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS, val)
  30571. #define WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS 16
  30572. #define WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS 16
  30573. #define WMI_ATF_GROUP_GET_NUM_IMPLICIT_PEERS(atf_total_num_peers) \
  30574. WMI_GET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS)
  30575. #define WMI_ATF_GROUP_SET_NUM_IMPLICIT_PEERS(atf_total_num_peers, val) \
  30576. WMI_SET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS, val)
  30577. typedef struct {
  30578. /** TLV tag and len; tag equals
  30579. * WMITLV_TAG_STRUC_wmi_atf_group_info_v2 */
  30580. A_UINT32 tlv_header;
  30581. A_UINT32 atf_group_id; /* ID of the Air Time Management group */
  30582. /* atf_group_units
  30583. * Fraction of air time allowed for the group, in per mille units
  30584. * (from 0-1000).
  30585. * For example, to indicate that the group can use 12.3% of the air time,
  30586. * the atf_group_units setting would be 123.
  30587. */
  30588. A_UINT32 atf_group_units;
  30589. /* atf_group_flags
  30590. * Bits 0-3 - Group Schedule Policy (Fair/Strict/Fair with upper bound)
  30591. * Refer to WMI_ATF_SSID_ definitions
  30592. * Bit 4-31 - Reserved (Shall be zero)
  30593. */
  30594. A_UINT32 atf_group_flags;
  30595. /* atf_total_num_peers
  30596. *
  30597. * Bits 0-15 - total number of explicit peers
  30598. * Bits 16-31 - total number of implicit peers
  30599. * An explicit peer has an ATF % configured by the user.
  30600. * An implicit peer has an ATF % =
  30601. * (Group_ATF_percent - Total_Explicit_Peers_ATF_Percent) /
  30602. * number of implicit peers
  30603. * This computation can be done in FW based on atf_total_num_peers.
  30604. */
  30605. A_UINT32 atf_total_num_peers;
  30606. /* atf_total_implicit_peer_units
  30607. *
  30608. * Air time allocated for all the implicit peers
  30609. * (from 0-1000, in per mille units)
  30610. */
  30611. A_UINT32 atf_total_implicit_peer_units;
  30612. } wmi_atf_group_info_v2;
  30613. typedef struct {
  30614. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_atf_ssid_grp_request_fixed_param */
  30615. A_UINT32 pdev_id;
  30616. /*
  30617. * Following this structure is the one of the following TLVs
  30618. * (only one of them will have valid data in a particular message)
  30619. * - struct wmi_atf_group_info group_info[];
  30620. * - struct wmi_atf_group_info_v2 group_info[];
  30621. */
  30622. } wmi_atf_ssid_grp_request_fixed_param;
  30623. /* ATF Configurations for WMM ACs of a group, value for each AC shall be in
  30624. * percentage (0-100).
  30625. * This perecentage is relative to the residual airtime (derived by FW)
  30626. * configured for the group.
  30627. * When WMM ATF is not configured for a peer all values shall be 0.
  30628. */
  30629. typedef struct {
  30630. /** TLV tag and len; tag equals
  30631. * WMITLV_TAG_STRUC_wmi_atf_group_wmm_ac_info
  30632. */
  30633. A_UINT32 tlv_header;
  30634. A_UINT32 atf_group_id; /* ID of the Air Time Management group */
  30635. A_UINT32 atf_units_be;
  30636. A_UINT32 atf_units_bk;
  30637. A_UINT32 atf_units_vi;
  30638. A_UINT32 atf_units_vo;
  30639. } wmi_atf_group_wmm_ac_info;
  30640. typedef struct {
  30641. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_atf_grp_wmm_ac_cfg_request_fixed_param */
  30642. A_UINT32 pdev_id;
  30643. /*
  30644. * Following this structure is the TLV:
  30645. * struct wmi_atf_group_wmm_ac_info group_info[];
  30646. */
  30647. } wmi_atf_grp_wmm_ac_cfg_request_fixed_param;
  30648. #define WMI_VDEV_LATENCY_TIDNUM_BIT_POS 0
  30649. #define WMI_VDEV_LATENCY_TIDNUM_NUM_BITS 8
  30650. #define WMI_VDEV_LATENCY_GET_TIDNUM(vdev_latency_info) \
  30651. WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_TIDNUM_BIT_POS, WMI_VDEV_LATENCY_TIDNUM_NUM_BITS)
  30652. #define WMI_VDEV_LATENCY_SET_TIDNUM(vdev_latency_info,val) \
  30653. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_TIDNUM_BIT_POS, WMI_VDEV_LATENCY_TIDNUM_NUM_BITS, val)
  30654. #define WMI_VDEV_LATENCY_AC_BIT_POS 8
  30655. #define WMI_VDEV_LATENCY_AC_NUM_BITS 2
  30656. #define WMI_VDEV_LATENCY_GET_AC(vdev_latency_info) \
  30657. WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_AC_BIT_POS, WMI_VDEV_LATENCY_AC_NUM_BITS)
  30658. #define WMI_VDEV_LATENCY_SET_AC(vdev_latency_info,val) \
  30659. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_AC_BIT_POS, WMI_VDEV_LATENCY_AC_NUM_BITS, val)
  30660. #define WMI_VDEV_LATENCY_DL_VALID_BIT_POS 10
  30661. #define WMI_VDEV_LATENCY_DL_VALID_NUM_BITS 1
  30662. #define WMI_VDEV_LATENCY_GET_DL_VALID(vdev_latency_info) \
  30663. WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_DL_VALID_BIT_POS, WMI_VDEV_LATENCY_DL_VALID_NUM_BITS)
  30664. #define WMI_VDEV_LATENCY_SET_DL_VALID(vdev_latency_info,val) \
  30665. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_DL_VALID_BIT_POS, WMI_VDEV_LATENCY_DL_VALID_NUM_BITS, val)
  30666. #define WMI_VDEV_LATENCY_UL_VALID_BIT_POS 11
  30667. #define WMI_VDEV_LATENCY_UL_VALID_NUM_BITS 1
  30668. #define WMI_VDEV_LATENCY_GET_UL_VALID(vdev_latency_info) \
  30669. WMI_GET_BITS(vdev_latency_info,WMI_VDEV_LATENCY_UL_VALID_BIT_POS, WMI_VDEV_LATENCY_UL_VALID_NUM_BITS)
  30670. #define WMI_VDEV_LATENCY_SET_UL_VALID(vdev_latency_info,val) \
  30671. WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_UL_VALID_BIT_POS, WMI_VDEV_LATENCY_UL_VALID_NUM_BITS, val)
  30672. typedef struct {
  30673. /** TLV tag and len; tag equals
  30674. * WMITLV_TAG_STRUC_wmi_vdev_latency_info
  30675. */
  30676. A_UINT32 tlv_header;
  30677. /*
  30678. * Maximum expected average delay between 2 schedules in milliseconds
  30679. * of given TID type when it has active traffic.
  30680. * 0x0 is considered as invalid service interval.
  30681. */
  30682. A_UINT32 service_interval;
  30683. /* burst_size:
  30684. * The number of bytes transmitted (in DL TIDs) / received (in UL ACs)
  30685. * in service interval.
  30686. */
  30687. A_UINT32 burst_size;
  30688. /* max_latency:
  30689. * The maximum end to end latency expectation, in milliseconds.
  30690. * If this value is 0x0, it shall be ignored.
  30691. */
  30692. A_UINT32 max_latency;
  30693. /* max_per:
  30694. * The maximum PER (as a percent) for the peer-TID, in range 1 - 100.
  30695. * If this value is 0x0, it shall be ignored.
  30696. */
  30697. A_UINT32 max_per;
  30698. /* min_tput:
  30699. * The minimum guaranteed throughput to the peer-TID, in Kbps.
  30700. * If this value is 0x0, it shall be ignored.
  30701. */
  30702. A_UINT32 min_tput;
  30703. /* vdev_latency_info
  30704. * Bits 12 - 31 - Reserved (Shall be zero)
  30705. * Bit 11 - UL latency config indication.
  30706. * If this bit is set then this latency info will
  30707. * be used when triggering UL traffic. Until the
  30708. * AC specified in bits 8-9 has transferred at least
  30709. * burst_size amount of UL data within the service
  30710. * period, the AP will continue sending UL triggers
  30711. * when the STA has data of the specified access
  30712. * category ready to transmit.
  30713. * Note that the TID specified in bits 0-7 does not
  30714. * apply to UL; the TID-to-AC mapping applied to DL
  30715. * data that can be adjusted by the TID specified
  30716. * in bits 0-7 and the AC specified in bits 8-9 is
  30717. * distinct from the TID-to-AC mapping applied to
  30718. * UL data.
  30719. * Bit 10 - DL latency config indication. If the bit is set
  30720. * then DL TID will use this latency config.
  30721. * Bits 8 - 9 - This bit has info on the custom AC of DL TID.
  30722. * Also if bit 11 is set, the AP will apply some
  30723. * of these latency specs (in particular, burst_size)
  30724. * to UL traffic for this AC, by sending UL triggers
  30725. * until the desired amount of data has been received
  30726. * within the service period.
  30727. * Bits 0 - 7 - Specifies the TID of interest that corresponds
  30728. * to the AC specified in bits 8-9. This can be
  30729. * used to adjust the TID-to-AC mapping applied to
  30730. * DL data (if bit 10 is set).
  30731. */
  30732. A_UINT32 vdev_latency_info;
  30733. } wmi_vdev_latency_info;
  30734. /*
  30735. * Currently wmi_vdev_tid_latency_config_fixed_param will be sent per
  30736. * data tid to map the AC.
  30737. * Also to configure VDEV level latency config to be used by all TIDs
  30738. * based on the mapping.
  30739. * VDEV restart is expected during this command
  30740. */
  30741. typedef struct {
  30742. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tid_latency_config_fixed_param */
  30743. A_UINT32 pdev_id;
  30744. A_UINT32 vdev_id;
  30745. /*
  30746. * Following this structure is the TLV:
  30747. * struct wmi_vdev_latency_info vdev_latency_info[];
  30748. */
  30749. } wmi_vdev_tid_latency_config_fixed_param;
  30750. #define WMI_TID_LATENCY_TIDNUM_BIT_POS 0
  30751. #define WMI_TID_LATENCY_TIDNUM_NUM_BITS 8
  30752. #define WMI_TID_LATENCY_GET_TIDNUM(latency_tid_info) \
  30753. WMI_GET_BITS(latency_tid_info, WMI_TID_LATENCY_TIDNUM_BIT_POS, WMI_TID_LATENCY_TIDNUM_NUM_BITS)
  30754. #define WMI_TID_LATENCY_SET_TIDNUM(latency_tid_info,val) \
  30755. WMI_SET_BITS(latency_tid_info, WMI_TID_LATENCY_TIDNUM_BIT_POS, WMI_TID_LATENCY_TIDNUM_NUM_BITS, val)
  30756. #define WMI_TID_LATENCY_AC_BIT_POS 8
  30757. #define WMI_TID_LATENCY_AC_NUM_BITS 2
  30758. #define WMI_TID_LATENCY_GET_AC(latency_tid_info) \
  30759. WMI_GET_BITS(latency_tid_info, WMI_TID_LATENCY_AC_BIT_POS , WMI_TID_LATENCY_AC_NUM_BITS)
  30760. #define WMI_TID_LATENCY_SET_AC(latency_tid_info,val) \
  30761. WMI_SET_BITS(latency_tid_info, WMI_TID_LATENCY_AC_BIT_POS , WMI_TID_LATENCY_AC_NUM_BITS, val)
  30762. #define WMI_TID_LATENCY_DL_ENABLE_BIT_POS 10
  30763. #define WMI_TID_LATENCY_DL_ENABLE_NUM_BITS 1
  30764. #define WMI_TID_LATENCY_GET_DL_ENABLE(latency_tid_info) \
  30765. WMI_GET_BITS(latency_tid_info,WMI_TID_LATENCY_DL_ENABLE_BIT_POS, WMI_TID_LATENCY_DL_ENABLE_NUM_BITS)
  30766. #define WMI_TID_LATENCY_SET_DL_ENABLE(latency_tid_info,val) \
  30767. WMI_SET_BITS(latency_tid_info,WMI_TID_LATENCY_DL_ENABLE_BIT_POS, WMI_TID_LATENCY_DL_ENABLE_NUM_BITS, val)
  30768. #define WMI_TID_LATENCY_UL_ENABLE_BIT_POS 11
  30769. #define WMI_TID_LATENCY_UL_ENABLE_NUM_BITS 1
  30770. #define WMI_TID_LATENCY_GET_UL_ENABLE(latency_tid_info) \
  30771. WMI_GET_BITS(latency_tid_info,WMI_TID_LATENCY_UL_ENABLE_BIT_POS, WMI_TID_LATENCY_UL_ENABLE_NUM_BITS)
  30772. #define WMI_TID_LATENCY_SET_UL_ENABLE(latency_tid_info,val) \
  30773. WMI_SET_BITS(latency_tid_info,WMI_TID_LATENCY_UL_ENABLE_BIT_POS, WMI_TID_LATENCY_UL_ENABLE_NUM_BITS, val)
  30774. #define WMI_LATENCY_BURST_SIZE_SUM_BIT_POS 12
  30775. #define WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS 2
  30776. #define WMI_LATENCY_GET_BURST_SIZE_SUM(latency_tid_info) \
  30777. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_BURST_SIZE_SUM_BIT_POS, WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS)
  30778. #define WMI_LATENCY_SET_BURST_SIZE_SUM(latency_tid_info,val) \
  30779. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_BURST_SIZE_SUM_BIT_POS, WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS, val)
  30780. #define WMI_LATENCY_MSDUQ_ID_BIT_POS 14
  30781. #define WMI_LATENCY_MSDUQ_ID_NUM_BITS 4
  30782. #define WMI_LATENCY_GET_MSDUQ_ID(latency_tid_info) \
  30783. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_MSDUQ_ID_BIT_POS, WMI_LATENCY_MSDUQ_ID_NUM_BITS)
  30784. #define WMI_LATENCY_SET_MSDUQ_ID(latency_tid_info,val) \
  30785. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_MSDUQ_ID_BIT_POS, WMI_LATENCY_MSDUQ_ID_NUM_BITS, val)
  30786. #define WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS 18
  30787. #define WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS 1
  30788. #define WMI_LATENCY_GET_DISABLE_UL_OFDMA(latency_tid_info) \
  30789. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS, WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS)
  30790. #define WMI_LATENCY_SET_DISABLE_UL_OFDMA(latency_tid_info,val) \
  30791. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS, WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS, val)
  30792. #define WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS 19
  30793. #define WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS 1
  30794. #define WMI_LATENCY_GET_DISABLE_UL_MU_MIMO(latency_tid_info) \
  30795. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS, WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS)
  30796. #define WMI_LATENCY_SET_DISABLE_UL_MU_MIMO(latency_tid_info,val) \
  30797. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS, WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS, val)
  30798. #define WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS 20
  30799. #define WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS 1
  30800. #define WMI_LATENCY_GET_SAWF_UL_PARAMS_BIT(latency_tid_info) \
  30801. WMI_GET_BITS(latency_tid_info, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS)
  30802. #define WMI_LATENCY_SET_SAWF_UL_PARAMS_BIT(latency_tid_info, val) \
  30803. WMI_SET_BITS(latency_tid_info, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS, val)
  30804. typedef struct {
  30805. /** TLV tag and len; tag equals
  30806. * WMITLV_TAG_STRUC_wmi_tid_latency_info
  30807. */
  30808. A_UINT32 tlv_header;
  30809. wmi_mac_addr dest_macaddr; /* Mac address of end client */
  30810. /*
  30811. * Maximum expected average delay between 2 schedules in milliseconds
  30812. * of given TID type when it has active traffic.
  30813. * 0x0 is considered as invalid service interval.
  30814. */
  30815. A_UINT32 service_interval;
  30816. /*
  30817. * Cumulative number of bytes are expected to be transmitted or
  30818. * received in the service interval when this specific Peer-TID
  30819. * has active traffic.
  30820. * If cumulative number of bytes is 0x0, it is considered as
  30821. * invalid burst size. In that case, firmware would try to transmit
  30822. * and receive as many bytes as it can for this specific Peer-TID.
  30823. * This burst size will be added or subtracted from vdev burst size
  30824. * based on burst size sum bit in latency tid info.
  30825. * The VDEV burst size will be considered to be 0 when no VDEV latency
  30826. * command is received.
  30827. * If host needs to set burst size for a peer then they can use the
  30828. * peer cmd and set burst size sum bit to 1.
  30829. */
  30830. A_UINT32 burst_size_diff;
  30831. /* max_latency:
  30832. * The maximum end to end latency expectation, in milliseconds.
  30833. * If this value is 0x0, it shall be ignored.
  30834. */
  30835. A_UINT32 max_latency;
  30836. /* max_per:
  30837. * The maximum PER (as a percent) for the peer-TID, in range 1 - 100
  30838. * If this value is 0x0, it shall be ignored.
  30839. */
  30840. A_UINT32 max_per;
  30841. /* min_tput:
  30842. * The minimum guaranteed throughput to the peer-TID, in Kbps.
  30843. * If this value is 0x0, it shall be ignored.
  30844. */
  30845. A_UINT32 min_tput;
  30846. /* latency_tid_info
  30847. * Bits 21-31 - Reserved (Shall be zero)
  30848. * Bit 20 - Flag to indicate SAWF UL params (and not mesh latency)
  30849. * Bit 19 - Disable UL MU-MIMO. If set, UL MU-MIMO is disabled
  30850. * for the specified AC. Note that TID level control is
  30851. * not possible for UL MU-MIMO (the granularity is AC).
  30852. * Bit 18 - Disable UL OFDMA. If set, UL OFDMA is disabled for
  30853. * the specified AC. Note that TID level control is not
  30854. * possible for UL OFDMA (the granularity is AC).
  30855. * Bits 14-17 - MSDU queue flow id within the TID for configuring
  30856. * latency info per MSDU flow queue
  30857. * Bit 12-13 - burst size sum. Bit to indicate whether to add or
  30858. * subtract burst_size_diff from vdev cmd burst size:
  30859. * 1 -> addition
  30860. * 2 -> subtraction
  30861. * Bit 11 - UL latency config indication.
  30862. * If this bit is set then this latency info will
  30863. * be used when triggering UL traffic. Until the
  30864. * AC specified in bits 8-9 has transferred at least
  30865. * burst_size amount of UL data within the service
  30866. * period, the AP will continue sending UL triggers
  30867. * when the STA has data of the specified access
  30868. * category ready to transmit.
  30869. * Note that the TID specified in bits 0-7 does not
  30870. * apply to UL; the TID-to-AC mapping applied to DL
  30871. * data that can be adjusted by the TID specified
  30872. * in bits 0-7 and the AC specified in bits 8-9 is
  30873. * distinct from the TID-to-AC mapping applied to
  30874. * UL data.
  30875. * Bit 10 - DL latency config indication. If the bit is set
  30876. * then DL TID will use this latency config.
  30877. * Bits 8 - 9 - This bit has info on the custom AC of DL TID.
  30878. * Also if bit 11 is set, the AP will apply some
  30879. * of these latency specs (in particular, burst_size)
  30880. * to UL traffic for this AC, by sending UL triggers
  30881. * until the desired amount of data has been received
  30882. * within the service period.
  30883. * Bits 0 - 7 - Specifies the TID of interest that corresponds
  30884. * to the AC specified in bits 8-9. This can be
  30885. * used to adjust the TID-to-AC mapping applied to
  30886. * DL data (if bit 10 is set).
  30887. */
  30888. A_UINT32 latency_tid_info;
  30889. } wmi_tid_latency_info;
  30890. /*
  30891. * Currently wmi_peer_tid_set_latency_request_fixed_param will be sent
  30892. * per TID per latency configured client.
  30893. * In future this command might come for multiple latency configured
  30894. * clients together.
  30895. * The clients are expected to be associated while receiving this command.
  30896. */
  30897. typedef struct {
  30898. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_latency_config_fixed_param */
  30899. A_UINT32 pdev_id;
  30900. /*
  30901. * Following this structure is the TLV:
  30902. * struct wmi_tid_latency_info latency_info[];
  30903. */
  30904. } wmi_peer_tid_latency_config_fixed_param;
  30905. #define WMI_ATF_GROUP_CFG_PEER_BIT_POS 0
  30906. #define WMI_ATF_GROUP_CFG_PEER_NUM_BITS 1
  30907. #define WMI_ATF_GROUP_GET_CFG_PEER_BIT(atf_peer_flags) \
  30908. WMI_GET_BITS(atf_peer_flags,WMI_ATF_GROUP_CFG_PEER_BIT_POS,WMI_ATF_GROUP_CFG_PEER_NUM_BITS)
  30909. #define WMI_ATF_GROUP_SET_CFG_PEER_BIT(atf_peer_flags,val) \
  30910. WMI_SET_BITS(atf_peer_flags,WMI_ATF_GROUP_CFG_PEER_BIT_POS,WMI_ATF_GROUP_CFG_PEER_NUM_BITS,val)
  30911. typedef struct {
  30912. /** TLV tag and len; tag equals
  30913. * WMITLV_TAG_STRUC_wmi_peer_atf_ext_info */
  30914. A_UINT32 tlv_header;
  30915. wmi_mac_addr peer_macaddr;
  30916. A_UINT32 atf_group_id; /* Group Id of the peers for ATF SSID grouping */
  30917. /* atf_peer_flags
  30918. * Bits 1-31 - Reserved (Shall be zero)
  30919. * Bit 0 - Configured Peer Indication (0/1), this bit would be set by
  30920. * host to indicate that the peer has airtime % configured
  30921. * explicitly by user.
  30922. */
  30923. A_UINT32 atf_peer_flags;
  30924. } wmi_peer_atf_ext_info;
  30925. typedef struct {
  30926. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_ext_request_fixed_param */
  30927. A_UINT32 pdev_id;
  30928. /*
  30929. * Following this structure is the TLV:
  30930. * struct wmi_peer_atf_ext_info peer_ext_info[];
  30931. */
  30932. } wmi_peer_atf_ext_request_fixed_param;
  30933. /* Structure for Bandwidth Fairness peer information */
  30934. typedef struct {
  30935. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bwf_peer_info */
  30936. A_UINT32 tlv_header;
  30937. wmi_mac_addr peer_macaddr;
  30938. A_UINT32 bwf_guaranteed_bandwidth; /* BWF guaranteed_bandwidth for the peers in mbps */
  30939. A_UINT32 bwf_max_airtime; /* BWF Maximum airtime percentage that can be allocated to the peer to meet the guaranteed_bandwidth */
  30940. A_UINT32 bwf_peer_priority; /* BWF priority of the peer to allocate the tokens dynamically */
  30941. A_UINT32 vdev_id;
  30942. A_UINT32 pdev_id;
  30943. } wmi_bwf_peer_info;
  30944. /* Structure for Bandwidth Fairness peer request */
  30945. typedef struct {
  30946. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param */
  30947. A_UINT32 num_peers;
  30948. /*
  30949. * Following this structure is the TLV:
  30950. * struct wmi_bwf_peer_info peer_info[num_peers];
  30951. */
  30952. } wmi_peer_bwf_request_fixed_param;
  30953. /* Equal distribution of ATF air time within an VDEV. */
  30954. typedef struct {
  30955. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param */
  30956. A_UINT32 vdev_id;
  30957. A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
  30958. A_UINT32 pdev_id;
  30959. } wmi_vdev_atf_request_fixed_param;
  30960. typedef struct {
  30961. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param */
  30962. /** pdev_id for identifying the MAC
  30963. * See macros starting with WMI_PDEV_ID_ for values.
  30964. */
  30965. A_UINT32 pdev_id;
  30966. /** parameter */
  30967. A_UINT32 param;
  30968. } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
  30969. typedef struct {
  30970. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param */
  30971. /** pdev_id for identifying the MAC
  30972. * See macros starting with WMI_PDEV_ID_ for values.
  30973. */
  30974. A_UINT32 pdev_id;
  30975. /** parameter */
  30976. A_UINT32 param;
  30977. } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
  30978. typedef struct {
  30979. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param */
  30980. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  30981. A_UINT32 qb_enable;
  30982. wmi_mac_addr peer_macaddr;
  30983. } WMI_QBOOST_CFG_CMD_fixed_param;
  30984. #define WMI_INST_STATS_INVALID_RSSI 0
  30985. typedef struct {
  30986. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */
  30987. A_UINT32 iRSSI; /* dB above the noise floor */
  30988. /* peer MAC address */
  30989. wmi_mac_addr peer_macaddr;
  30990. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  30991. } wmi_inst_rssi_stats_resp_fixed_param;
  30992. typedef struct {
  30993. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info */
  30994. A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
  30995. } wmi_peer_cck_ofdm_rate_info;
  30996. typedef struct {
  30997. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info */
  30998. A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
  30999. A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
  31000. A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
  31001. A_UINT32 ratecode_160; /* Rate code for 160MHz BW */
  31002. A_UINT32 ratecode_320; /* Rate code for 320MHz BW */
  31003. } wmi_peer_mcs_rate_info;
  31004. typedef struct {
  31005. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param */
  31006. wmi_mac_addr peer_macaddr;
  31007. A_UINT32 ratecount; /* Max Rate count for each mode */
  31008. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  31009. A_UINT32 pdev_id; /* ID of the pdev this peer belongs to */
  31010. A_UINT32 ratecount_ext; /* Max Rate count for 160, 320MHz */
  31011. /*
  31012. * Following this structure are the TLV:
  31013. * struct wmi_peer_cck_ofdm_rate_info;
  31014. * struct wmi_peer_mcs_rate_info;
  31015. */
  31016. } wmi_peer_ratecode_list_event_fixed_param;
  31017. typedef struct wmi_wds_addr_event {
  31018. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param */
  31019. A_UINT32 event_type[4];
  31020. wmi_mac_addr peer_mac;
  31021. wmi_mac_addr dest_mac;
  31022. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  31023. } wmi_wds_addr_event_fixed_param;
  31024. /*
  31025. * Enum values for WMI_PEER_PS_SUPPORTED_BITMAP field,
  31026. * in wmi_peer_sta_ps_statechange_event structure.
  31027. */
  31028. typedef enum {
  31029. /* Used to indicate that peer_ps_valid is valid */
  31030. WMI_PEER_PS_VALID_SUPPORTED = 0x00000001,
  31031. /* Used to indicate that peer_ps_timestamp field is valid */
  31032. WMI_PEER_PS_TIMESTAMP_SUPPORTED = 0x00000002,
  31033. } WMI_PEER_PS_SUPPORTED_BITMAP;
  31034. typedef struct {
  31035. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param */
  31036. wmi_mac_addr peer_macaddr;
  31037. A_UINT32 peer_ps_state;
  31038. /* Start of extended structure */
  31039. /* Bitmap to indicate which fields in the extended structure are valid.
  31040. * Bitmap values correspond to enum WMI_PEER_PS_SUPPORTED_BITMAP
  31041. */
  31042. A_UINT32 peer_ps_supported_bitmap;
  31043. /* This field is used to indicate host of a valid PS state change.
  31044. * 1 - indicates a valid PS state change.
  31045. * 0 - indicates an invalid PS state change.
  31046. * Host to ignore the power save duration calculation when peer_ps_valid = 0
  31047. */
  31048. A_UINT32 peer_ps_valid;
  31049. /* This field indicates the time since target boot-up in MilliSeconds. */
  31050. A_UINT32 peer_ps_timestamp;
  31051. /* Indicates the vdev id for MLO case */
  31052. wmi_vdev_id_info vdev_id_info;
  31053. } wmi_peer_sta_ps_statechange_event_fixed_param;
  31054. /* WMI_PDEV_FIPS_EVENTID */
  31055. typedef struct {
  31056. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  31057. union {
  31058. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  31059. /** pdev_id for identifying the MAC
  31060. * See macros starting with WMI_PDEV_ID_ for values.
  31061. */
  31062. A_UINT32 pdev_id;
  31063. };
  31064. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  31065. A_UINT32 data_len; /* Data length */
  31066. /*
  31067. * Following this structure is the TLV:
  31068. * A_UINT32 data[1]; <-- Out Data (keep this in the end)
  31069. */
  31070. } wmi_pdev_fips_event_fixed_param;
  31071. typedef struct {
  31072. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  31073. A_UINT32 pdev_id;
  31074. A_UINT32 fips_cookie; /* Cookie value to identify test vector */
  31075. A_UINT32 cmd_frag_idx; /* Fragment Number */
  31076. A_UINT32 more_bit;
  31077. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  31078. A_UINT32 data_len; /* Data length CTlen+ TAGlen*/
  31079. /*
  31080. * Following this structure is the TLV:
  31081. * A_UINT32 data[1]; <-- Out Data (ciphertext+tag)
  31082. */
  31083. } wmi_pdev_fips_extend_event_fixed_param;
  31084. typedef struct {
  31085. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param */
  31086. union {
  31087. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  31088. /** pdev_id for identifying the MAC
  31089. * See macros starting with WMI_PDEV_ID_ for values.
  31090. */
  31091. A_UINT32 pdev_id;
  31092. };
  31093. /* Noise threshold iterations with high values */
  31094. A_UINT32 noise_floor_report_iter;
  31095. /* Total noise threshold iterations */
  31096. A_UINT32 noise_floor_total_iter;
  31097. } wmi_pdev_channel_hopping_event_fixed_param;
  31098. enum {
  31099. WMI_PDEV_RESERVE_AST_ENTRY_OK,
  31100. WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
  31101. WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
  31102. };
  31103. typedef struct {
  31104. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param */
  31105. union {
  31106. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  31107. /** pdev_id for identifying the MAC
  31108. * See macros starting with WMI_PDEV_ID_ for values.
  31109. */
  31110. A_UINT32 pdev_id;
  31111. };
  31112. A_UINT32 rate_flags;
  31113. /**
  31114. * FLAG_ONE_CHAIN 0x00000001 - one chain mask
  31115. * FLAG_TWO_CHAIN 0x00000003 - two chain mask
  31116. * FLAG_THREE_CHAIN 0x00000007 - three chain mask
  31117. * FLAG_FOUR_CHAIN 0x0000000F - four chain mask
  31118. * FLAG_FIVE_CHAIN 0x0000001F - five chain mask
  31119. * FLAG_SIX_CHAIN 0x0000003F - six chain mask
  31120. * FLAG_SEVEN_CHAIN 0x0000007F - seven chain mask
  31121. * FLAG_EIGHT_CHAIN 0x000000FF - eight chain mask
  31122. * FLAG_STBC 0x00000100 - STBC is set
  31123. * FLAG_40MHZ 0x00000200 - bits 9-10 used for BW:
  31124. * FLAG_80MHZ 0x00000400 (bw >> 9) & 3 will give
  31125. * FLAG_160MHZ 0x00000600 1 -> 40 MHz, 2 -> 80 MHz, 3 -> 160 MHz
  31126. * FLAG_TXBF 0x00000800 - Tx Bf enabled
  31127. * FLAG_RTSENA 0x00001000 - RTS enabled
  31128. * FLAG_CTSENA 0x00002000 - CTS enabled
  31129. * FLAG_LDPC 0x00004000 - LDPC set
  31130. * FLAG_SGI 0x00008000 - Short guard interval
  31131. * (0x00010000-0x00080000 unused)
  31132. *------------------
  31133. * 0x00100000-0x00700000 used for SU/MU/OFDMA tx mode
  31134. * FLAG_SU 0x00100000 - SU Data
  31135. * FLAG_DL_MU_MIMO_AC 0x00200000 - DL AC MU data
  31136. * FLAG_DL_MU_MIMO_AX 0x00300000 - DL AX MU data
  31137. * FLAG_DL_OFDMA 0x00400000 - DL OFDMA data
  31138. * FLAG_UL_OFDMA 0x00500000 - UL OFDMA data
  31139. * FLAG_UL_MU_MIMO 0x00600000 - UL MU data
  31140. *------------------
  31141. * */
  31142. A_UINT32 nss;
  31143. /**
  31144. * NSS 0x0 - 0x7
  31145. * */
  31146. A_UINT32 preamble;
  31147. /**
  31148. * PREAM_OFDM - 0x0
  31149. * PREAM_CCK - 0x1
  31150. * PREAM_HT - 0x2
  31151. * PREAM_VHT - 0x3
  31152. * PREAM_HE - 0x4
  31153. * */
  31154. A_UINT32 hw_rate;
  31155. /**
  31156. * *** HW_OFDM_RATE ***
  31157. * OFDM_48_MBPS - 0x0
  31158. * OFDM_24_MBPS - 0x1
  31159. * OFDM_12_MBPS - 0x2
  31160. * OFDM_6_MBPS - 0x3
  31161. * OFDM_54_MBPS - 0x4
  31162. * OFDM_36_MBPS - 0x5
  31163. * OFDM_18_MBPS - 0x6
  31164. * OFDM_9_MBPS - 0x7
  31165. *
  31166. * *** HW_CCK_RATE ***
  31167. * CCK_11_LONG_MBPS - 0x0
  31168. * CCK_5_5_LONG_MBPS - 0x1
  31169. * CCK_2_LONG_MBPS - 0x2
  31170. * CCK_1_LONG_MBPS - 0x3
  31171. * CCK_11_SHORT_MBPS - 0x4
  31172. * CCK_5_5_SHORT_MBPS - 0x5
  31173. * CCK_2_SHORT_MBPS - 0x6
  31174. *
  31175. * *** HW_HT / VHT_RATE ***
  31176. * MCS 0x0 - 0xb
  31177. * */
  31178. } wmi_pdev_get_tpc_cmd_fixed_param;
  31179. typedef struct {
  31180. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
  31181. /** pdev_id for identifying the MAC
  31182. * See macros starting with WMI_PDEV_ID_ for values.
  31183. */
  31184. A_UINT32 pdev_id;
  31185. } wmi_pdev_get_chip_power_stats_cmd_fixed_param;
  31186. typedef struct {
  31187. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_bcn_recv_stats_cmd_fixed_param */
  31188. /** VDEV identifier */
  31189. A_UINT32 vdev_id;
  31190. } wmi_vdev_get_bcn_recv_stats_cmd_fixed_param;
  31191. typedef struct {
  31192. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_xgap_enable_cmd_fixed_param */
  31193. A_UINT32 beacon_interval; /* in TU */
  31194. A_UINT32 sap_lp_flag; /* bit 0 : set/unset for enter/exit XGAP */
  31195. A_UINT32 dialog_token;
  31196. A_UINT32 duration; /* in us : sap LP enter/exit duration, 0 for permanent exit */
  31197. } wmi_xgap_enable_cmd_fixed_param;
  31198. typedef struct {
  31199. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_xgap_enable_complete_event_fixed_param */
  31200. A_UINT32 dialog_token;
  31201. A_UINT32 next_tsf_low32;
  31202. A_UINT32 next_tsf_high32;
  31203. } wmi_xgap_enable_complete_event_fixed_param;
  31204. /*
  31205. * wmi mws-coex command IDs
  31206. */
  31207. typedef enum {
  31208. WMI_MWS_COEX_STATE = 0x01,
  31209. WMI_MWS_COEX_DPWB_STATE,
  31210. WMI_MWS_COEX_TDM_STATE,
  31211. WMI_MWS_COEX_IDRX_STATE,
  31212. WMI_MWS_COEX_ANTENNA_SHARING_STATE,
  31213. } wmi_mws_coex_cmd_id;
  31214. typedef struct {
  31215. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_cmd_fixed_param */
  31216. /** VDEV identifier */
  31217. A_UINT32 vdev_id;
  31218. /** Command ID (type: wmi_mws_coex_cmd_id) */
  31219. A_UINT32 cmd_id;
  31220. } wmi_vdev_get_mws_coex_info_cmd_fixed_param;
  31221. typedef struct {
  31222. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
  31223. /** pdev_id for identifying the MAC
  31224. * See macros starting with WMI_PDEV_ID_ for values.
  31225. */
  31226. A_UINT32 pdev_id;
  31227. /*
  31228. * Following this structure is the TLV:
  31229. * A_UINT32 tpc[2];
  31230. * tpc[0] - maximum power per rate
  31231. * tpc[1] - minimum power per rate
  31232. * Currently this event only provides max and min power limits
  31233. * for a single rate. In the future this event may be expanded
  31234. * to provide the information for multiple rates.
  31235. * At that time, the format of the data will be provided.
  31236. */
  31237. } wmi_pdev_tpc_event_fixed_param;
  31238. typedef struct {
  31239. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param */
  31240. union {
  31241. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  31242. /** pdev_id for identifying the MAC
  31243. * See macros starting with WMI_PDEV_ID_ for values.
  31244. */
  31245. A_UINT32 pdev_id;
  31246. };
  31247. A_UINT32 nfdBr_len;
  31248. A_UINT32 nfdBm_len;
  31249. A_UINT32 freqNum_len;
  31250. /*
  31251. * Following this structure is the TLV:
  31252. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
  31253. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
  31254. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
  31255. */
  31256. } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
  31257. typedef struct {
  31258. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr */
  31259. A_UINT32 nfdBr;
  31260. } wmi_pdev_nfcal_power_all_channels_nfdBr;
  31261. typedef struct {
  31262. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm */
  31263. A_UINT32 nfdBm;
  31264. } wmi_pdev_nfcal_power_all_channels_nfdBm;
  31265. typedef struct {
  31266. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum */
  31267. A_UINT32 freqNum;
  31268. } wmi_pdev_nfcal_power_all_channels_freqNum;
  31269. /* Bit set/unset definitions for valid_bitmap field in ani_cck_event */
  31270. #define WMI_ANI_CCK_EVENT_PDEV_ID_SET(bitmap, val) \
  31271. WMI_SET_BITS(bitmap, 0, 8, val)
  31272. #define WMI_ANI_CCK_EVENT_PDEV_ID_GET(bitmap) \
  31273. WMI_GET_BITS(bitmap, 0, 8)
  31274. #define WMI_ANI_CCK_EVENT_PDEV_ID_VALID_BIT_SET(bitmap, val) \
  31275. WMI_SET_BITS(bitmap, 31, 1, val)
  31276. #define WMI_ANI_CCK_EVENT_PDEV_ID_VALID_BIT_GET(bitmap) \
  31277. WMI_GET_BITS(bitmap, 31, 1)
  31278. typedef struct {
  31279. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param */
  31280. A_UINT32 cck_level;
  31281. union {
  31282. A_UINT32 pdev_id_valid__pdev_id__word;
  31283. struct {
  31284. /**
  31285. * word containng the pdev_id for identifying the MAC
  31286. * Contents:
  31287. * bits 7:0 - pdev ID
  31288. * bits 30:8 - reserved
  31289. * bit 31 - pdev ID valid flag
  31290. * See macros starting with WMI_ANI_CCK_EVENT_PDEV_ID_ for values.
  31291. * pdev_id is valid when pdev_id_valid is set.
  31292. */
  31293. A_UINT32 pdev_id: 8,
  31294. reserved: 23,
  31295. pdev_id_valid: 1;
  31296. };
  31297. };
  31298. } wmi_ani_cck_event_fixed_param;
  31299. typedef enum wmi_power_debug_reg_fmt_type {
  31300. /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
  31301. * SOC_SYSTEM_SLEEP
  31302. * WLAN_SYSTEM_SLEEP
  31303. * RTC_SYNC_FORCE_WAKE
  31304. * MAC_DMA_ISR
  31305. * MAC_DMA_TXRX_ISR
  31306. * MAC_DMA_ISR_S1
  31307. * MAC_DMA_ISR_S2
  31308. * MAC_DMA_ISR_S3
  31309. * MAC_DMA_ISR_S4
  31310. * MAC_DMA_ISR_S5
  31311. * MAC_DMA_ISR_S6
  31312. * MAC_DMA_ISR_S7
  31313. */
  31314. WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
  31315. WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
  31316. } WMI_POWER_DEBUG_REG_FMT_TYPE;
  31317. typedef struct {
  31318. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
  31319. A_UINT32 cumulative_sleep_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  31320. A_UINT32 cumulative_total_on_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  31321. A_UINT32 deep_sleep_enter_counter; /* count of number of times chip enterred deep sleep */
  31322. A_UINT32 last_deep_sleep_enter_tstamp_ms; /* Last Timestamp when Chip went to deep sleep */
  31323. A_UINT32 debug_register_fmt; /* WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers being dumped as part of the event */
  31324. A_UINT32 num_debug_register; /* number of debug registers being sent to host */
  31325. /*
  31326. * Following this structure is the TLV:
  31327. * A_UINT32 debug_registers[num_debug_registers];
  31328. */
  31329. } wmi_pdev_chip_power_stats_event_fixed_param;
  31330. typedef struct {
  31331. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_bcn_recv_stats_fixed_param */
  31332. A_UINT32 vdev_id;
  31333. /* total_bcn_cnt
  31334. * total beacon count (tbtt instances)
  31335. * After this value reaches 255 it saturates and stays at 255.
  31336. * This field is used to determine which of the 256 bits in the
  31337. * bmiss_bitmap field are valid.
  31338. */
  31339. A_UINT32 total_bcn_cnt;
  31340. /* total_bmiss_cnt
  31341. * Total beacon miss count in last 255 beacons, max value is 255.
  31342. * This value is the number of bits set within bmiss_bitmap.
  31343. */
  31344. A_UINT32 total_bmiss_cnt;
  31345. /* bmiss_bitmap
  31346. * This bitmap indicates the status of the last 255 beacons.
  31347. * If a bit is set, that means the corresponding beacon was missed.
  31348. * Bit 0 of bmiss_bitmap[0] represents the most recent beacon.
  31349. * The total_bcn_cnt field indicates how many bits within bmiss_bitmap
  31350. * are valid.
  31351. */
  31352. A_UINT32 bmiss_bitmap[8];
  31353. } wmi_vdev_bcn_recv_stats_fixed_param;
  31354. typedef struct {
  31355. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param */
  31356. A_UINT32 vdev_id;
  31357. /* LTE-WLAN coexistence scheme bitmap
  31358. * Indicates the final schemes applied for the current Coex scenario.
  31359. * Bit 0 - TDM policy
  31360. * Bit 1 - Forced TDM policy
  31361. * Bit 2 - Dynamic Power Back-off policy
  31362. * Bit 3 - Channel Avoidance policy
  31363. * Bit 4 - Static Power Back-off policy
  31364. */
  31365. A_UINT32 coex_scheme_bitmap;
  31366. /* Active conflict count
  31367. * Indicates the number of Active conflicts for the current WLAN and LTE frequency combinations.
  31368. */
  31369. A_UINT32 active_conflict_count;
  31370. /* Potential conflict count
  31371. * Indicates the number of Potential conflicts for the current WLAN and LTE frequency combinations.
  31372. */
  31373. A_UINT32 potential_conflict_count;
  31374. /* Bitmap of the group-0 WLAN channels to be avoided during LTE-WLAN coex operation.
  31375. * Indicates the WLAN channels to be avoided in b/w WLAN CH-1 and WLAN CH-14.
  31376. */
  31377. A_UINT32 chavd_group0_bitmap;
  31378. /* Bitmap of the group-1 WLAN channels to be avoided during LTE-WLAN coex operation.
  31379. * Indicates the WLAN channels to be avoided in b/w WLAN CH-36 and WLAN CH-64.
  31380. */
  31381. A_UINT32 chavd_group1_bitmap;
  31382. /* Bitmap of the group-2 WLAN channels to be avoided during LTE-WLAN coex operation.
  31383. * Indicates the WLAN channels to be avoided in b/w WLAN CH-100 and WLAN CH-140.
  31384. */
  31385. A_UINT32 chavd_group2_bitmap;
  31386. /* Bitmap of the group-3 WLAN channels to be avoided during LTE-WLAN coex operation.
  31387. * Indicates the WLAN channels to be avoided in b/w WLAN CH-149 and WLAN CH-165.
  31388. */
  31389. A_UINT32 chavd_group3_bitmap;
  31390. } wmi_vdev_get_mws_coex_state_fixed_param;
  31391. typedef struct {
  31392. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param */
  31393. A_UINT32 vdev_id;
  31394. /* Current state of the Dynamic Power Back-off state machine
  31395. * MWSCOEX_PWB_UNINIT_STATE = 0, PWB state machine is in un-intialized state.
  31396. * MWSCOEX_PWB_WLAN_ON_SINR_START_STATE = 1, SINR measurement starts when WLAN is on
  31397. * MWSCOEX_PWB_WLAN_ON_WAIT_RESP_STATE = 2, Waiting for SINR response when WLAN is on
  31398. * MWSCOEX_PWB_WLAN_OFF_AWAIT_STATE = 3, WLAN off state for buffer between SINR on/off measurement.
  31399. * MWSCOEX_PWB_WLAN_OFF_SINR_START_STATE = 4, SINR measurement starts when WLAN is off
  31400. * MWSCOEX_PWB_WLAN_OFF_WAIT_RESP_STATE = 5, Waiting for SINR response when WLAN is off
  31401. * MWSCOEX_PWB_WLAN_OFF_SINR_STOP_STATE = 6, SINR measurement stops when WLAN is off
  31402. * MWSCOEX_PWB_FORCED_TDM_STATE = 7, Entered Forced TDM state.
  31403. * MWSCOEX_PWB_HALTED_STATE = 8, Power back-off algorithm halted.
  31404. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_START_STATE = 9, SINR measurement starts in WLAN always on state.
  31405. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_STOP_STATE = 10, SINR measurement stops in WLAN always on state.
  31406. */
  31407. A_UINT32 current_dpwb_state;
  31408. /* P(N+1) value in dBm i.e. Tx power to be applied in the next Dynamic Power Back-off cycle,
  31409. * where P(N) is the power applied during current cycle.
  31410. * ranges from 3dBm to 21 dBM
  31411. */
  31412. A_INT32 pnp1_value;
  31413. /* Indicates the duty cycle of current LTE frame.
  31414. * Duty cycle: Number of UL slots with uplink data and allocated RBs.
  31415. */
  31416. A_UINT32 lte_dutycycle;
  31417. /* LTE SINR value in dB, when WLAN is ON. */
  31418. A_INT32 sinr_wlan_on;
  31419. /* LTE SINR value in dB, when WLAN is OFF. */
  31420. A_INT32 sinr_wlan_off;
  31421. /* LTE blocks with error for the current bler report.
  31422. * Number of LTE blocks with error for a given number (block_count) of LTE blocks.
  31423. */
  31424. A_UINT32 bler_count;
  31425. /* Number of LTE blocks considered for bler count report.
  31426. * Bler repot will be generated after the reception of every "block_count" number of blocks.
  31427. */
  31428. A_UINT32 block_count;
  31429. /* WLAN RSSI level
  31430. * WLAN RSSI is divided in to 3 levels i.e. Good/Moderate/Low (configurable inside f/w)
  31431. * 0-Good, 1-Moderate, 2-Low
  31432. */
  31433. A_UINT32 wlan_rssi_level;
  31434. /* WLAN RSSI value in dBm considered in Dynamic Power back-off algorithm
  31435. * Dynamic power back-off algorithm considers either Rx data frame RSSI/Beacon RSSI based on some constraints.
  31436. */
  31437. A_INT32 wlan_rssi;
  31438. /* Indicates whether any TDM policy triggered from Dynamic power back-off policy.
  31439. * 1 - TDM triggered.
  31440. * 0 - TDM not triggered.
  31441. */
  31442. A_UINT32 is_tdm_running;
  31443. } wmi_vdev_get_mws_coex_dpwb_state_fixed_param;
  31444. typedef struct {
  31445. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param */
  31446. A_UINT32 vdev_id;
  31447. /* Time Division Multiplexing (TDM) LTE-Coex Policy type.
  31448. * There are totally 4 types of TDM policies(1-SINR TDM, 2-RSSI TDM, 3-LOW RX RATE TDM, 4-STICKY TDM)
  31449. * Bit 0 - SINR TDM policy.
  31450. * Bit 1 - RSSI TDM policy.
  31451. * Bit 2 - Low Rx rate TDM policy
  31452. * Bit 3 - Sticky TDM policy
  31453. */
  31454. A_UINT32 tdm_policy_bitmap;
  31455. /* TDM LTE/WLAN sub-frame bitmap
  31456. * Indicates the bitmap of LTE/WLAN sub-frames.
  31457. * value 0: WLAN slot.
  31458. * value 1: LTE slot.
  31459. */
  31460. A_UINT32 tdm_sf_bitmap;
  31461. } wmi_vdev_get_mws_coex_tdm_state_fixed_param;
  31462. typedef struct {
  31463. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param */
  31464. A_UINT32 vdev_id;
  31465. /* SUB0 LTE-coex tech.
  31466. *------------------------
  31467. * TECH TECH_ID
  31468. *------------------------
  31469. * LTE 0
  31470. * TDSCDMA 1
  31471. * GSM1 2
  31472. * ONEX 3
  31473. * HDR 4
  31474. * WCDMA 5
  31475. * GSM2 6
  31476. * GSM3 7
  31477. * WCDMA2 8
  31478. * LTE2 9
  31479. * Indicates the type of WWAN technology used as SUB0 i.e. SIM slot 1
  31480. */
  31481. A_UINT32 sub0_techid;
  31482. /* SUB0 mitigation policy.
  31483. * Indicates the mitigation policy used to coexist with WLAN.
  31484. * 1 - Tx blanking
  31485. * 2 - Static power back-off
  31486. */
  31487. A_UINT32 sub0_policy;
  31488. /* Set if SUB0 is in link critical state.
  31489. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  31490. */
  31491. A_UINT32 sub0_is_link_critical;
  31492. /* LTE SUB0 imposed static power applied to WLAN due to LTE-WLAN coex.
  31493. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  31494. */
  31495. A_INT32 sub0_static_power;
  31496. /* LTE SUB0 RSSI value in dBm */
  31497. A_INT32 sub0_rssi;
  31498. /* SUB1 LTE-coex tech.
  31499. *------------------------
  31500. * TECH TECH_ID
  31501. *------------------------
  31502. * LTE 0
  31503. * TDSCDMA 1
  31504. * GSM1 2
  31505. * ONEX 3
  31506. * HDR 4
  31507. * WCDMA 5
  31508. * GSM2 6
  31509. * GSM3 7
  31510. * WCDMA2 8
  31511. * LTE2 9
  31512. * Indicates the type of WWAN technology used as SUB1 i.e. SIM slot 2
  31513. */
  31514. A_UINT32 sub1_techid;
  31515. /* SUB1 mitigation policy.
  31516. * Indicates the mitigation policy used to coexist with WLAN.
  31517. * 1 - Tx blanking
  31518. * 2 - Static power back-off
  31519. */
  31520. A_UINT32 sub1_policy;
  31521. /* Set if SUB1 is in link critical state.
  31522. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  31523. */
  31524. A_UINT32 sub1_is_link_critical;
  31525. /* LTE SUB1 imposed static power applied to WLAN due to LTE-WLAN coex.
  31526. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  31527. */
  31528. A_INT32 sub1_static_power;
  31529. /* LTE SUB1 RSSI value in dBm */
  31530. A_INT32 sub1_rssi;
  31531. } wmi_vdev_get_mws_coex_idrx_state_fixed_param;
  31532. typedef struct {
  31533. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param */
  31534. A_UINT32 vdev_id;
  31535. /* BDF values of Coex flags.
  31536. * coexflag 0x1 = MWS Coex enabled
  31537. * coexflag 0x3 = MWS Coex enabled + Antenna sharing enabled for WLAN operating in 2.4GHz band.
  31538. */
  31539. A_UINT32 coex_flags;
  31540. /* BDF values of Coex Antenna sharing config
  31541. * coex_config 0x0 = no Antenna sharing
  31542. * coexconfig 0x1 = switched based Antenna sharing
  31543. * coexconfig 0x2 = splitter based Antenna sharing
  31544. */
  31545. A_UINT32 coex_config;
  31546. /* Tx Chain mask value
  31547. * Bit 0: Tx chain-0
  31548. * Bit 1: Tx Chain-1
  31549. * value: 0x1 - Operating in 1X1
  31550. * value: 0x3 - Operating in 2X2
  31551. */
  31552. A_UINT32 tx_chain_mask;
  31553. /* Rx Chain mask value
  31554. * Bit 0: Rx chain-0
  31555. * Bit 1: Rx Chain-1
  31556. * value: 0x1 - Operating in 1X1
  31557. * value: 0x3 - Operating in 2X2
  31558. */
  31559. A_UINT32 rx_chain_mask;
  31560. /* Currently active Rx Spatial streams
  31561. * Bit 0: Rx Spatial Stream-0
  31562. * Bit 1: Rx Spatial Stream-1
  31563. */
  31564. A_UINT32 rx_nss;
  31565. /* Forced MRC policy type
  31566. * BTC_FORCED (0x01)
  31567. * RSSI_FORCED (0x02)
  31568. * MODEM_ACQ_FORCED (0x04)
  31569. */
  31570. A_UINT32 force_mrc;
  31571. /* RSSI value considered for MRC
  31572. * 1: Data RSSI
  31573. * 2: Beacon RSSI
  31574. */
  31575. A_UINT32 rssi_type;
  31576. /* RSSI value measured at Chain-0 in dBm */
  31577. A_INT32 chain0_rssi;
  31578. /* RSSI value measured at Chain-1 in dBm */
  31579. A_INT32 chain1_rssi;
  31580. /* RSSI value of two chains combined in dBm */
  31581. A_INT32 combined_rssi;
  31582. /* Absolute imbalance between two Rx chains in dB */
  31583. A_UINT32 imbalance;
  31584. /* RSSI threshold defined for the above imbalance value in dBm.
  31585. * Based on the degree of imbalance between the rx chains, different
  31586. * RSSI thresholds are used to determine whether MRC (Maximum-Ratio
  31587. * Combining) use of multiple rx chains is suitable.
  31588. * This field shows the RSSI threshold below which MRC is used.
  31589. */
  31590. A_INT32 mrc_threshold;
  31591. /* Antenna grant duration to WLAN, in milliseconds */
  31592. A_UINT32 grant_duration;
  31593. } wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param;
  31594. typedef enum wmi_chip_power_save_failure_reason_code_type {
  31595. WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON,
  31596. WMI_HW_POWER_SAVE_FAILURE_REASON,
  31597. WMI_CSS_LOCKED_POWER_FAILURE_REASON,
  31598. WMI_MAC0_LOCKED_POWER_FAILURE_REASON,
  31599. WMI_MAC1_LOCKED_POWER_FAILURE_REASON,
  31600. WMI_POWER_SAVE_FAILURE_REASON_MAX = 0xf,
  31601. } WMI_POWER_SAVE_FAILURE_REASON_TYPE;
  31602. typedef struct {
  31603. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_save_failure_detected_fixed_param */
  31604. A_UINT32 power_save_failure_reason_code; /* Chip power save failuire reason as defined in WMI_POWER_SAVE_FAILURE_REASON_TYPE */
  31605. A_UINT32 protocol_wake_lock_bitmap[4]; /* bitmap with bits set for modules (from WLAN_MODULE_ID enum) voting against sleep for prolonged duration */
  31606. } wmi_chip_power_save_failure_detected_fixed_param;
  31607. /* Bit set/unset definitions for valid_bitmap field in ani_ofdm_event */
  31608. #define WMI_ANI_OFDM_EVENT_PDEV_ID_BIT_SET(bitmap, val) \
  31609. WMI_SET_BITS(bitmap, 0, 8, val)
  31610. #define WMI_ANI_OFDM_EVENT_PDEV_ID_BIT_GET(bitmap) \
  31611. WMI_GET_BITS(bitmap, 0, 8)
  31612. #define WMI_ANI_OFDM_EVENT_PDEV_ID_VALID_BIT_SET(bitmap, val) \
  31613. WMI_SET_BITS(bitmap, 31, 1, val)
  31614. #define WMI_ANI_OFDM_EVENT_PDEV_ID_VALID_BIT_GET(bitmap) \
  31615. WMI_GET_BITS(bitmap, 31, 1)
  31616. typedef struct {
  31617. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param */
  31618. A_UINT32 ofdm_level;
  31619. union {
  31620. A_UINT32 pdev_id_valid__pdev_id__word;
  31621. struct {
  31622. /**
  31623. * word containng the pdev_id for identifying the MAC
  31624. * Contents:
  31625. * bits 7:0 - pdev ID
  31626. * bits 30:8 - reserved
  31627. * bit 31 - pdev ID valid flag
  31628. * See macros starting with WMI_ANI_OFDM_EVENT_PDEV_ID_ for values.
  31629. * pdev_id is valid when pdev_id_valid is set.
  31630. */
  31631. A_UINT32 pdev_id: 8,
  31632. reserved: 23,
  31633. pdev_id_valid: 1;
  31634. };
  31635. };
  31636. } wmi_ani_ofdm_event_fixed_param;
  31637. /* When a bit is set it specifies the particular WLAN traffic type is high priority.
  31638. * BT low priority traffic has higher priority than WLAN low priority traffic and has
  31639. * lower priority when compared to WLAN high priority traffic.
  31640. * BT high priority traffic has higher priority than WLAN low/high priority traffic.
  31641. */
  31642. #define WMI_PDEV_BE_PRIORITY_BIT (1<<0)
  31643. #define WMI_PDEV_BK_PRIORITY_BIT (1<<1)
  31644. #define WMI_PDEV_VI_PRIORITY_BIT (1<<2)
  31645. #define WMI_PDEV_VO_PRIORITY_BIT (1<<3)
  31646. #define WMI_PDEV_BEACON_PRIORITY_BIT (1<<4)
  31647. #define WMI_PDEV_MGMT_PRIORITY_BIT (1<<5)
  31648. #define WMI_PDEV_IS_BE_PRIORITY_SET(val) ((val) & WMI_PDEV_BE_PRIORITY_BIT)
  31649. #define WMI_PDEV_IS_BK_PRIORITY_SET(val) ((val) & WMI_PDEV_BK_PRIORITY_BIT)
  31650. #define WMI_PDEV_IS_VI_PRIORITY_SET(val) ((val) & WMI_PDEV_VI_PRIORITY_BIT)
  31651. #define WMI_PDEV_IS_VO_PRIORITY_SET(val) ((val) & WMI_PDEV_VO_PRIORITY_BIT)
  31652. #define WMI_PDEV_IS_BEACON_PRIORITY_SET(val) ((val) & WMI_PDEV_BEACON_PRIORITY_BIT)
  31653. #define WMI_PDEV_IS_MGMT_PRIORITY_SET(val) ((val) & WMI_PDEV_MGMT_PRIORITY_BIT)
  31654. /*
  31655. * For Maple 3-way coex, The interface will have following configurable
  31656. * priority bits to set relative priorities of WLAN/BT/3-radio PTA.
  31657. * To send below config host will use WMI_COEX_CONFIG_CMD command with
  31658. * config type WMI_COEX_CONFIG_THREE_WAY_COEX_START
  31659. * WMI_COEX_CONFIG_THREE_WAY_COEX_RESET
  31660. *
  31661. ** Bits 0 to 7 corresponds to Wifi
  31662. * Bit - 0: QCA_WIFI_BE
  31663. * Bit - 1: QCA_WIFI_BK
  31664. * Bit - 2: QCA_WIFI_VI
  31665. * Bit - 3: QCA_WIFI_VO
  31666. * Bit - 4: QCA_WIFI_BEACON
  31667. * Bit - 5: QCA_WIFI_MGMT
  31668. * Bits 6 - 7: Reserved
  31669. *
  31670. ** Bits 8 to 15 corresponds to BT
  31671. * Bit - 8: QCA_BT_ADVERTISER
  31672. * Bit - 9: QCA_BT_SCANNER
  31673. * Bit - 10: QCA_BT_BLE_CONNECTION
  31674. * Bits 11 to 15: Reserved
  31675. *
  31676. ** Bits 16 to 24 corresponds to 3-radio PTA,
  31677. * It can be anything BT/ZigBee connected to 802.15.4 radio
  31678. * Bit - 16: QCA_PTA_THIRD_RADIO_LOW
  31679. * Bit - 17: QCA_PTA_THIRD_RADIO_HIGH
  31680. * Bits 18 to 24: Reserved
  31681. *
  31682. ** Bits 25 to 31 Reserved for future use
  31683. */
  31684. #define WMI_PDEV_BT_ADVERTISER_PRIORITY_BIT (1 << 8)
  31685. #define WMI_PDEV_BT_SCANNER_PRIORITY_BIT (1 << 9)
  31686. #define WMI_PDEV_BT_BLE_CONNECTION_PRIORITY_BIT (1 << 10)
  31687. #define WMI_PDEV_IS_BT_ADVERTISER_PRIORITY_SET(val) \
  31688. ((val) & WMI_PDEV_BT_ADVERTISER_PRIORITY_BIT)
  31689. #define WMI_PDEV_IS_BT_SCANNER_PRIORITY_SET(val) \
  31690. ((val) & WMI_PDEV_BT_SCANNER_PRIORITY_BIT)
  31691. #define WMI_PDEV_IS_BT_BLE_CONNECTION_PRIORITY_SET(val) \
  31692. ((val) & WMI_PDEV_BT_BLE_CONNECTION_PRIORITY_BIT)
  31693. #define WMI_PDEV_PTA_THIRD_RADIO_LOW_PRIORITY_BIT (1 << 16)
  31694. #define WMI_PDEV_PTA_THIRD_RADIO_HIGH_PRIORITY_BIT (1 << 17)
  31695. #define WMI_PDEV_IS_PTA_THIRD_RADIO_LOW_PRIORITY_SET(val) \
  31696. ((val) & WMI_PDEV_PTA_THIRD_RADIO_LOW_PRIORITY_BIT)
  31697. #define WMI_PDEV_IS_PTA_THIRD_RADIO_HIGH_PRIORITY_SET(val) \
  31698. ((val) & WMI_PDEV_PTA_THIRD_RADIO_HIGH_PRIORITY_BIT)
  31699. typedef enum wmi_coex_algo_type {
  31700. WMI_COEX_ALGO_UNCONS_FREERUN = 0,
  31701. WMI_COEX_ALGO_FREERUN = 1,
  31702. WMI_COEX_ALGO_OCS = 2,
  31703. } WMI_COEX_ALGO_TYPE;
  31704. typedef enum wmi_coex_config_type {
  31705. WMI_COEX_CONFIG_PAGE_P2P_TDM = 1, /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
  31706. WMI_COEX_CONFIG_PAGE_STA_TDM = 2, /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
  31707. WMI_COEX_CONFIG_PAGE_SAP_TDM = 3, /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
  31708. WMI_COEX_CONFIG_DURING_WLAN_CONN = 4, /* config during WLAN connection */
  31709. WMI_COEX_CONFIG_BTC_ENABLE = 5, /* config to enable/disable BTC */
  31710. WMI_COEX_CONFIG_COEX_DBG = 6, /* config of COEX debug setting */
  31711. WMI_COEX_CONFIG_PAGE_P2P_STA_TDM = 7, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + PAGE */
  31712. WMI_COEX_CONFIG_INQUIRY_P2P_TDM = 8, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + INQUIRY */
  31713. WMI_COEX_CONFIG_INQUIRY_STA_TDM = 9, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + INQUIRY */
  31714. WMI_COEX_CONFIG_INQUIRY_SAP_TDM = 10, /* config interval (ms units) (arg1 BT, arg2 WLAN) for SAP + INQUIRY */
  31715. WMI_COEX_CONFIG_INQUIRY_P2P_STA_TDM = 11, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + INQUIRY */
  31716. 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) */
  31717. 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) */
  31718. WMI_COEX_CONFIG_AP_TDM = 14, /* config interval (arg1 duty cycle in ms, arg2 WLAN duration in ms) for AP */
  31719. WMI_COEX_CONFIG_WLAN_SCAN_PRIORITY = 15, /* config to set WLAN priority during Off Channel Scan */
  31720. WMI_COEX_CONFIG_WLAN_PKT_PRIORITY = 16, /* config to set WLAN priority for BE/BK/VO/VI/Beacon/Management frame */
  31721. WMI_COEX_CONFIG_PTA_INTERFACE = 17, /* config PTA interface,
  31722. arg1 PTA num,
  31723. arg2 mode (2-wire/3-wire/PTA),
  31724. arg3 first slot time in microsec,
  31725. arg4 BT priority time in microsec,
  31726. arg5 PTA algorithm (WMI_COEX_ALGO_TYPE),
  31727. arg6 PTA priority */
  31728. WMI_COEX_CONFIG_BTC_DUTYCYCLE = 18, /* config interval (ms units) (arg1 WLAN pause duration, arg2 WLAN unpause duration) for WLAN UL + BT Rx */
  31729. WMI_COEX_CONFIG_HANDOVER_RSSI = 19, /* config to set WLAN RSSI (dBm units) at which device switches from Hybrid to TDD coex mode */
  31730. WMI_COEX_CONFIG_PTA_BT_INFO = 20, /* get BT information,
  31731. arg1 BT info type: WMI_COEX_PTA_BT_INFO_TYPE_T, scan/advertise/connection info,
  31732. arg2-arg5: BT information parameters */
  31733. WMI_COEX_CONFIG_SINK_WLAN_TDM = 21, /* config interval (ms units) (arg1 BT, arg2 WLAN) for A2DP SINK + WLAN */
  31734. WMI_COEX_CONFIG_COEX_ENABLE_MCC_TDM = 22, /* config disable/enable COEX TDM for MCC */
  31735. WMI_COEX_CONFIG_LOWRSSI_A2DPOPP_TDM = 23, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + A2dp + OPP + LOWRSSI */
  31736. WMI_COEX_CONFIG_BTC_MODE = 24, /* config BTC mode, arg1 mode: 0 TDD/1 FDD/2 Hybrid*/
  31737. WMI_COEX_CONFIG_ANTENNA_ISOLATION = 25, /* config isolation between BT and WLAN chains
  31738. * The arguments are interpreted differently
  31739. * depending on whether the target supports
  31740. * WMI_SERVICE_COEX_SUPPORT_UNEQUAL_ISOLATION
  31741. * If (not COEX_SUPPORT_UNEQUAL_ISOLATION) or arg2 == 0:
  31742. * arg1 => isolation between BT and WLAN chains,
  31743. * dB units,
  31744. * same isolation for all chains
  31745. * Else:
  31746. * arg1 bits 7:0 - chain 0 isolation, in dB
  31747. * arg1 bits 15:8 - chain 1 isolation, in dB
  31748. * arg1 bits 23:16 - chain 2 isolation, in dB
  31749. * arg1 bits 31:24 - chain 3 isolation, in dB
  31750. * arg2 - 0 => Equal isolation b/w BT and each WLAN chain (default)
  31751. * 1 => Different isolation b/w BT and each WLAN chain
  31752. */
  31753. WMI_COEX_CONFIG_BT_LOW_RSSI_THRESHOLD = 26, /* config BT low RSSI threshold (dBm units) */
  31754. WMI_COEX_CONFIG_BT_INTERFERENCE_LEVEL = 27, /* config BT interference level (dBm units)
  31755. arg1 low - lower limit
  31756. arg2 low - upper limit
  31757. arg3 medium - lower limit
  31758. arg4 medium - upper limit
  31759. arg5 high - lower limit
  31760. arg6 high - upper limit */
  31761. WMI_COEX_CONFIG_WLAN_OVER_ZBLOW = 28, /* config to boost WiFi traffic over 15.4 Low prio traffic */
  31762. 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 */
  31763. WMI_COEX_CONFIG_WLAN_CONN_OVER_LE = 30, /* config to elevate Wifi priority over BLE during WLAN association */
  31764. WMI_COEX_CONFIG_LE_OVER_WLAN_TRAFFIC = 31, /* config to elevate BLE traffic over WiFi traffic */
  31765. WMI_COEX_CONFIG_THREE_WAY_COEX_RESET = 32, /* config to reset the weights to default */
  31766. /* WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA
  31767. * config to T_PRIO T_DELAY parameter for each case
  31768. * arg1 - wlan/bt state
  31769. * 0: beacon tx
  31770. * 1: wlan connecting
  31771. * 2: wlan in dhcp
  31772. * 3: a2dp critical
  31773. * 4: eSCO
  31774. * arg2 - t_prio for low priority traffic (microsecond units)
  31775. * arg3 - t_delay for low priority traffic (microsecond units)
  31776. * arg4 - t_prio for high priority traffic (microsecond units)
  31777. * arg5 - t_delay for high priority traffic (microsecond units)
  31778. */
  31779. WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA = 33,
  31780. /* WMI_COEX_CONFIG_THREE_WAY_COEX_START
  31781. * config to set coex parameters from WLAN host to adjust priorities
  31782. * among wlan/bt/zb
  31783. * arg1 - priority level 1, the serialized coex scenorio ID will be put here
  31784. * arg2 - priority level 2, same parameters rules as arg1
  31785. * arg3 - priority level 3, same parameters rules as arg1
  31786. * arg4 - priority level 4, same parameters rules as arg1
  31787. */
  31788. WMI_COEX_CONFIG_THREE_WAY_COEX_START = 34,
  31789. /* WMI_COEX_CONFIG_MPTA_HELPER_ENABLE
  31790. * config to enable(1)/disable(0) mpta-helper function
  31791. */
  31792. WMI_COEX_CONFIG_MPTA_HELPER_ENABLE = 35,
  31793. /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE
  31794. * config zigbee state
  31795. * arg1: zigbee state
  31796. * (idle form-network wait-join join-network network-up HMI)
  31797. */
  31798. WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE = 36,
  31799. /* WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS
  31800. * config ocs wlan/nonwlan params after MPTA interrupt fired
  31801. * arg1: wlan duration (ms units) in Shape-OCS
  31802. * arg2: nonwlan duration (ms units) in Shape-OCS
  31803. */
  31804. WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS = 37,
  31805. /* WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS
  31806. * config ocs wlan/nonwlan params during monitor period after
  31807. * interrupt period finished
  31808. * arg1: wlan duration (ms units) in Shape-OCS
  31809. * arg2: nonwlan duration (ms units) in Shape-OCS
  31810. */
  31811. WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS = 38,
  31812. /* WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION
  31813. * config ocs duration in interrupt period and monitor period
  31814. * arg1: duration (ms units) in interrupt period
  31815. * arg2: duration (ms units) in monitor period
  31816. */
  31817. WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION = 39,
  31818. /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL
  31819. * config zigbee channel 11 - 26
  31820. */
  31821. WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL = 40,
  31822. /* WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION
  31823. * config msw mute duration (ms units) after MPTA interrupt fired
  31824. */
  31825. WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION = 41,
  31826. /* WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN
  31827. * allow WLAN scan on 2.4G channel when BT SCO connectivity is alive
  31828. */
  31829. WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN = 42,
  31830. /* WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR
  31831. * config to enable(1)/disable(0) WAR of BT 2nd harmonic issue function
  31832. */
  31833. WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR = 43,
  31834. /* WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE
  31835. * config BTC separate chain mode or shared mode
  31836. */
  31837. WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE = 44,
  31838. /* WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING
  31839. * enable WLAN throughput shaping while BT scanning
  31840. */
  31841. WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING = 45,
  31842. /* WMI_COEX_CONFIG_ENABLE_TXBF
  31843. * enable WLAN tx beamforming during coex case
  31844. */
  31845. WMI_COEX_CONFIG_ENABLE_TXBF = 46,
  31846. /* WMI_COEX_CONFIG_FORCED_ALGO
  31847. * config to select coex algorithm
  31848. * arg1: select fixed coex algorithm
  31849. */
  31850. WMI_COEX_CONFIG_FORCED_ALGO = 47,
  31851. /* WMI_COEX_CONFIG_LE_SCAN_POLICY
  31852. * BLE scan Coex policy hint
  31853. * 0 to place more emphasis on BLE Scan results
  31854. * 1 to place more emphasis on WLAN performance
  31855. */
  31856. WMI_COEX_CONFIG_LE_SCAN_POLICY = 48,
  31857. /* WMI_COEX_CONFIG_BT_RX_PER_THRESHOLD
  31858. * config BT RX PER threshold
  31859. */
  31860. WMI_COEX_CONFIG_BT_RX_PER_THRESHOLD = 49,
  31861. /* WMI_COEX_SET_TRAFFIC_SHAPING_MODE
  31862. * arg1: 0 (WMI_COEX_TRAFFIC_SHAPING_MODE_DISABLED)
  31863. * Disable coex policies and set fixed arbitration config.
  31864. * 1 (WMI_COEX_TRAFFIC_SHAPING_MODE_ENABLED)
  31865. * Enable all coex policies.
  31866. */
  31867. WMI_COEX_SET_TRAFFIC_SHAPING_MODE = 50,
  31868. /* WMI_COEX_CONFIG_ENABLE_CONT_INFO
  31869. * enable contention info log
  31870. * arg1:
  31871. * 0: disable both cont/sched log
  31872. * 1: enable cont log
  31873. * 2: enable sched log
  31874. * 3: enable both cont and sched log
  31875. */
  31876. WMI_COEX_CONFIG_ENABLE_CONT_INFO = 51,
  31877. } WMI_COEX_CONFIG_TYPE;
  31878. typedef struct {
  31879. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_COEX_CONFIG_CMD_fixed_param */
  31880. A_UINT32 vdev_id;
  31881. A_UINT32 config_type; /* wmi_coex_config_type enum */
  31882. A_UINT32 config_arg1;
  31883. A_UINT32 config_arg2;
  31884. A_UINT32 config_arg3;
  31885. A_UINT32 config_arg4;
  31886. A_UINT32 config_arg5;
  31887. A_UINT32 config_arg6;
  31888. } WMI_COEX_CONFIG_CMD_fixed_param;
  31889. typedef struct {
  31890. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_coex_multiple_config_cmd_fixed_param */
  31891. /*
  31892. * This struct is followed by other TLVs:
  31893. * WMI_COEX_CONFIG_CMD_fixed_param config_list[num_config];
  31894. */
  31895. } wmi_coex_multiple_config_cmd_fixed_param;
  31896. typedef enum wmi_coex_dbam_mode_type {
  31897. WMI_COEX_DBAM_DISABLE = 0,
  31898. WMI_COEX_DBAM_ENABLE = 1,
  31899. WMI_COEX_DBAM_FORCED = 2,
  31900. } WMI_COEX_DBAM_MODE_TYPE;
  31901. typedef enum {
  31902. WMI_COEX_TRAFFIC_SHAPING_MODE_DISABLED = 0,
  31903. WMI_COEX_TRAFFIC_SHAPING_MODE_ENABLED = 1,
  31904. } WMI_COEX_TRAFFIC_SHAPING_MODE;
  31905. typedef struct {
  31906. A_UINT32 tlv_header;
  31907. A_UINT32 vdev_id;
  31908. A_UINT32 dbam_mode; /* wmi_coex_dbam_mode_type enum */
  31909. } wmi_coex_dbam_cmd_fixed_param;
  31910. /**
  31911. * Host get current TAS buffer from FW or set last TAS buffer to FW
  31912. */
  31913. typedef enum wmi_tas_power_history_cmd_type {
  31914. WMI_TAS_POWER_HISTORY_CMD_GET = 0, /* before WLAN off, host trigger this cmd to get power history */
  31915. WMI_TAS_POWER_HISTORY_CMD_SET = 1, /* after WLAN reboot, host trigger this cmd to set power history of last life cycle */
  31916. } WMI_TAS_POWER_HISTORY_CMD_TYPE;
  31917. typedef struct {
  31918. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tas_power_history_cmd_fixed_param */
  31919. A_UINT32 sub_type; /* refer to WMI_TAS_POWER_HISTORY_TYPE */
  31920. A_UINT32 time_diff; /* time of wlan on - time of wlan off after wlan reboot. unit: millisecond*/
  31921. } wmi_tas_power_history_cmd_fixed_param;
  31922. /**
  31923. * This command is sent from WLAN host driver to firmware to
  31924. * request firmware to enable/disable channel avoidance report
  31925. * to host.
  31926. *
  31927. */
  31928. enum {
  31929. WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
  31930. WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
  31931. };
  31932. typedef struct {
  31933. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param */
  31934. /** Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
  31935. A_UINT32 rpt_allow;
  31936. } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
  31937. /*
  31938. * Periodic channel stats WMI command structure
  31939. * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
  31940. */
  31941. typedef struct {
  31942. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param */
  31943. /** 1 = enable, 0 = disable */
  31944. A_UINT32 enable;
  31945. /** periodic stats duration (units are milliseconds) */
  31946. A_UINT32 stats_period;
  31947. /** pdev_id for identifying the MAC
  31948. * See macros starting with WMI_PDEV_ID_ for values.
  31949. */
  31950. A_UINT32 pdev_id;
  31951. } wmi_set_periodic_channel_stats_config_fixed_param;
  31952. typedef struct {
  31953. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param */
  31954. /** pdev_id for identifying the MAC
  31955. * See macros starting with WMI_PDEV_ID_ for values.
  31956. */
  31957. A_UINT32 pdev_id;
  31958. /* Identify the wlan module */
  31959. A_UINT32 module_id;
  31960. /* Num of elements in the following args[] array */
  31961. A_UINT32 num_args;
  31962. /**
  31963. * Following this structure are the TLVs:
  31964. * A_UINT32 args[];
  31965. **/
  31966. } wmi_pdev_wal_power_debug_cmd_fixed_param;
  31967. typedef struct {
  31968. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param */
  31969. /**
  31970. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  31971. * @details
  31972. * Each WMM access category (voice, video, best-effort, background)
  31973. * will have its own timeout value to dictate how long to wait for
  31974. * missing rx MPDUs to arrive before releasing subsequent MPDUs that
  31975. * have already been received.
  31976. * This parameter specifies the timeout in milliseconds for each
  31977. * access category.
  31978. * The array elements are indexed by the WMI_AC enum to identify
  31979. * which array element corresponds to which AC / traffic type.
  31980. */
  31981. A_UINT32 rx_timeout_pri[WMI_AC_MAX];
  31982. } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
  31983. /**
  31984. * wlan stats shall be understood as per period.
  31985. * Generally, it is reported periodically based on the period specified by host.
  31986. * But if the variation of one stats of compared to the
  31987. * previous notification exceeds a threshold,
  31988. * FW will report the wlan stats immediately.
  31989. * The values of the stats becomes the new reference to compute variations.
  31990. * This threshold can be a global setting or per category.
  31991. * Host can enable/disable the mechanism for any stats per bitmap.
  31992. * TX/RX thresholds (percentage value) are shared across ACs,
  31993. * and TX/RX stats comprisons are processed per AC of each peer.
  31994. * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
  31995. * and the detailed tx_mpdus threshold value is set to 10%,
  31996. * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
  31997. * and it reaches 110 during the second period,
  31998. * FW will generate and send out a wlan stats event immediately.
  31999. */
  32000. typedef struct {
  32001. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
  32002. /** Indicate if threshold mechanism is enabled or disabled.
  32003. * It is disabled by default.
  32004. * Host can enable and disable it dynamically.
  32005. */
  32006. A_UINT32 enable_thresh;
  32007. /** use_thresh_bitmap equals 0 means gbl_thresh is used.
  32008. * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
  32009. */
  32010. A_UINT32 use_thresh_bitmap;
  32011. /** global threshold, valid when use_thresh_bitmap equals 0.
  32012. * It takes effect for all counters.
  32013. * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
  32014. */
  32015. A_UINT32 gbl_thresh;
  32016. /** Enable/disable bitmap for threshold mechanism of CCA stats */
  32017. A_UINT32 cca_thresh_enable_bitmap;
  32018. /** Enable/disable bitmap for threshold mechanism of signal stats */
  32019. A_UINT32 signal_thresh_enable_bitmap;
  32020. /** Enable/disable bitmap for threshold mechanism of TX stats */
  32021. A_UINT32 tx_thresh_enable_bitmap;
  32022. /** Enable/disable bitmap for threshold mechanism of RX stats */
  32023. A_UINT32 rx_thresh_enable_bitmap;
  32024. /* This TLV is followed by TLVs below:
  32025. * wmi_chan_cca_stats_thresh cca_thresh;
  32026. * wmi_peer_signal_stats_thresh signal_thresh;
  32027. * wmi_tx_stats_thresh tx_thresh;
  32028. * wmi_rx_stats_thresh rx_thresh;
  32029. */
  32030. } wmi_pdev_set_stats_threshold_cmd_fixed_param;
  32031. typedef enum {
  32032. WMI_REQUEST_WLAN_TX_STAT = 0x01,
  32033. WMI_REQUEST_WLAN_RX_STAT = 0x02,
  32034. WMI_REQUEST_WLAN_CCA_STAT = 0x04,
  32035. WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
  32036. } wmi_wlan_stats_id;
  32037. typedef struct {
  32038. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
  32039. wmi_wlan_stats_id stats_id;
  32040. } wmi_request_wlan_stats_cmd_fixed_param;
  32041. typedef enum {
  32042. WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01, /* request stats of one specified peer */
  32043. WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02, /* request stats of all peers belong to specified VDEV */
  32044. } wmi_peer_stats_info_request_type;
  32045. /** It is required to issue WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE
  32046. * (with a non-zero value) before issuing the first REQUEST_PEER_STATS_INFO.
  32047. */
  32048. typedef struct {
  32049. /** TLV tag and len; tag equals
  32050. * WMITLV_TAG_STRUC_wmi_request_peer_stats_info_cmd_fixed_param */
  32051. A_UINT32 tlv_header;
  32052. /** request_type to indicate if only stats of
  32053. * one peer or all peers of the VDEV are requested,
  32054. * see wmi_peer_stats_info_request_type.
  32055. */
  32056. A_UINT32 request_type;
  32057. /** VDEV identifier */
  32058. A_UINT32 vdev_id;
  32059. /** this peer_macaddr is only used if request_type == ONE_PEER_STATS_INFO */
  32060. wmi_mac_addr peer_macaddr;
  32061. /** flag to indicate if FW needs to reset requested peers stats */
  32062. A_UINT32 reset_after_request;
  32063. } wmi_request_peer_stats_info_cmd_fixed_param;
  32064. typedef enum {
  32065. /*
  32066. * Multiple stats type can be requested together, so each value
  32067. * within this enum represents a bit position within a stats bitmap.
  32068. */
  32069. /* bit 0 is currently unused / reserved */
  32070. WMI_REQUEST_CTRL_PATH_PDEV_TX_STAT = 1,
  32071. WMI_REQUEST_CTRL_PATH_VDEV_EXTD_STAT = 2,
  32072. WMI_REQUEST_CTRL_PATH_MEM_STAT = 3,
  32073. WMI_REQUEST_CTRL_PATH_TWT_STAT = 4,
  32074. WMI_REQUEST_CTRL_PATH_CALIBRATION_STAT = 5,
  32075. WMI_REQUEST_CTRL_PATH_DFS_CHANNEL_STAT = 6,
  32076. WMI_REQUEST_CTRL_PATH_AWGN_STAT = 7,
  32077. WMI_REQUEST_CTRL_PATH_BTCOEX_STAT = 8,
  32078. WMI_REQUEST_CTRL_PATH_BMISS_STAT = 9,
  32079. WMI_REQUEST_CTRL_PATH_ODD_ADDR_READ = 10,
  32080. WMI_REQUEST_CTRL_PATH_AFC_STAT = 11,
  32081. WMI_REQUEST_CTRL_PATH_PMLO_STAT = 12,
  32082. WMI_REQUEST_CTRL_PATH_CFR_STAT = 13,
  32083. WMI_REQUEST_CTRL_PATH_T2LM_STAT = 14,
  32084. WMI_REQUEST_CTRL_PATH_BLANKING_STAT = 15,
  32085. WMI_REQUEST_CTRL_PATH_PEER_STAT = 16,
  32086. WMI_REQUEST_CTRL_PATH_VDEV_DEBUG_STAT = 17,
  32087. WMI_REQUEST_CTRL_STA_RRM_STAT = 18,
  32088. WMI_REQUEST_CTRL_PATH_VDEV_BCN_TX_STAT = 19,
  32089. WMI_REQUEST_CTRL_PATH_PDEV_BCN_TX_STAT = 20,
  32090. } wmi_ctrl_path_stats_id;
  32091. typedef enum {
  32092. /* bit 0 is currently unused / reserved */
  32093. WMI_HALPHY_CTRL_PATH_PDEV_TX_STAT = 1,
  32094. } wmi_halphy_ctrl_path_stats_id;
  32095. typedef enum {
  32096. /*
  32097. * The following stats actions are mutually exclusive.
  32098. * A single stats request message can only specify one action.
  32099. */
  32100. WMI_REQUEST_CTRL_PATH_STAT_GET = 1,
  32101. WMI_REQUEST_CTRL_PATH_STAT_RESET = 2,
  32102. WMI_REQUEST_CTRL_PATH_STAT_START = 3,
  32103. WMI_REQUEST_CTRL_PATH_STAT_STOP = 4,
  32104. WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH = 5,
  32105. } wmi_ctrl_path_stats_action;
  32106. typedef enum {
  32107. WMI_HALPHY_CTRL_PATH_SU_STATS = 0,
  32108. WMI_HALPHY_CTRL_PATH_SUTXBF_STATS,
  32109. WMI_HALPHY_CTRL_PATH_MU_STATS,
  32110. WMI_HALPHY_CTRL_PATH_MUTXBF_STATS,
  32111. } wmi_halphy_ctrl_path_subid;
  32112. typedef struct {
  32113. /** TLV tag and len; tag equals
  32114. * WMITLV_TAG_STRUC_wmi_request_ctrl_path_stats_cmd_fixed_param */
  32115. A_UINT32 tlv_header;
  32116. /** Bitmask showing which of stats IDs 0-31 have been requested.
  32117. * These stats ids are defined in enum wmi_ctrl_path_stats_id.
  32118. */
  32119. A_UINT32 stats_id_mask;
  32120. /** request ID to store the cookies in wifistats */
  32121. A_UINT32 request_id;
  32122. /** action
  32123. * get/reset/start/stop based on stats id
  32124. * defined as a part of wmi_ctrl_path_stats_action
  32125. **/
  32126. A_UINT32 action; /* refer to wmi_ctrl_path_stats_action */
  32127. /**
  32128. * The stat_periodicity field is relevant only when action is set to
  32129. * WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH.
  32130. * The units of this periodicity are milliseconds.
  32131. * Periodically send WMI ctrl-path stats event with the specified stats
  32132. * periodicity for the stats whose IDs are set in stats_id_mask.
  32133. * Periodic WMI ctrl-path stats events are enabled by setting value > 0,
  32134. * Previously onngoing periodic WMI ctrl-path stats events become
  32135. * disabled when action is WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH
  32136. * and stat_periodicity = 0.
  32137. */
  32138. A_UINT32 stat_periodicity;
  32139. /** The below TLV arrays optionally follow this fixed_param TLV structure:
  32140. * 1. A_UINT32 pdev_ids[];
  32141. * If this array is present and non-zero length, stats should only
  32142. * be provided from the pdevs identified in the array.
  32143. * 2. A_UINT32 vdev_ids[];
  32144. * If this array is present and non-zero length, stats should only
  32145. * be provided from the vdevs identified in the array.
  32146. * 3. wmi_mac_addr peer_macaddr[];
  32147. * If this array is present and non-zero length, stats should only
  32148. * be provided from the peers with the MAC addresses specified
  32149. * in the array.
  32150. */
  32151. } wmi_request_ctrl_path_stats_cmd_fixed_param;
  32152. typedef struct {
  32153. /** TLV tag and len; tag equals
  32154. * WMITLV_TAG_STRUC_wmi_request_halphy_ctrl_path_stats_cmd_fixed_param */
  32155. A_UINT32 tlv_header;
  32156. /** Bitmask showing which of stats IDs 0-31 have been requested.
  32157. * These stats ids are defined in enum wmi_halphy_ctrl_path_stats_id.
  32158. */
  32159. A_UINT32 stats_id_mask;
  32160. /** process id requested */
  32161. A_UINT32 request_id;
  32162. /** action
  32163. * get/reset based on stats id
  32164. * defined as a part of wmi_ctrl_path_stats_action
  32165. **/
  32166. A_UINT32 action; /* refer to wmi_ctrl_path_stats_action */
  32167. /** Request Halphy subid stats
  32168. * According to the requested stats_id_mask this halphy_subid varies
  32169. * For stats_id = 1, the possible values could be enum
  32170. * wmi_halphy_ctrl_path_halphyid
  32171. */
  32172. A_UINT32 halphy_subid;
  32173. /** The below TLV arrays optionally follow this fixed_param TLV structure:
  32174. * 1. A_UINT32 pdev_ids[];
  32175. * If this array is present and non-zero length, stats should only
  32176. * be provided from the pdevs identified in the array.
  32177. * 2. A_UINT32 vdev_ids[];
  32178. * If this array is present and non-zero length, stats should only
  32179. * be provided from the vdevs identified in the array.
  32180. * 3. wmi_mac_addr peer_macaddr[];
  32181. * If this array is present and non-zero length, stats should only
  32182. * be provided from the peers with the MAC addresses specified
  32183. * in the array.
  32184. */
  32185. } wmi_request_halphy_ctrl_path_stats_cmd_fixed_param;
  32186. typedef enum {
  32187. WMI_REQUEST_ONE_RADIO_CHAN_STATS = 0x01, /* request stats of one specified channel */
  32188. WMI_REQUEST_ALL_RADIO_CHAN_STATS = 0x02, /* request stats of all channels */
  32189. } wmi_radio_chan_stats_request_type;
  32190. /** It is required to issue WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE
  32191. * (with a non-zero value) before issuing the first REQUEST_RADIO_CHAN_STATS.
  32192. */
  32193. typedef struct {
  32194. /** TLV tag and len; tag equals
  32195. * WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param */
  32196. A_UINT32 tlv_header;
  32197. /** request_type to indicate if only stats of
  32198. * one channel or all channels are requested,
  32199. * see wmi_radio_chan_stats_request_type.
  32200. */
  32201. A_UINT32 request_type;
  32202. /** Frequency of channel whose stats is requested,
  32203. * only used when request_type == WMI_REQUEST_ONE_RADIO_CHAN_STATS
  32204. */
  32205. A_UINT32 chan_mhz;
  32206. /** flag to indicate if FW needs to reset requested stats of specified channel/channels */
  32207. A_UINT32 reset_after_request;
  32208. } wmi_request_radio_chan_stats_cmd_fixed_param;
  32209. typedef struct {
  32210. /** TLV tag and len; tag equals
  32211. * WMITLV_TAG_STRUC_wmi_rmc_set_leader_cmd_fixed_param */
  32212. A_UINT32 tlv_header;
  32213. /* VDEV identifier */
  32214. A_UINT32 vdev_id;
  32215. /* Leader's mac address */
  32216. wmi_mac_addr leader_mac_addr;
  32217. } wmi_rmc_set_leader_cmd_fixed_param;
  32218. typedef struct {
  32219. /** TLV tag and len; tag equals
  32220. * WMITLV_TAG_STRUC_wmi_rmc_manual_leader_event_fixed_param */
  32221. A_UINT32 tlv_header;
  32222. /* VDEV identifier */
  32223. A_UINT32 vdev_id;
  32224. /* 0: success
  32225. * 1: selected leader not found in network, able to find using auto selection
  32226. * -1: error
  32227. * non zero value should be return to userspace in case of failure */
  32228. A_INT32 status;
  32229. /* bssid of new leader */
  32230. wmi_mac_addr leader_mac_addr;
  32231. } wmi_rmc_manual_leader_event_fixed_param;
  32232. typedef struct {
  32233. /** TLV tag and len; tag equals
  32234. * WMITLV_TAG_STRUC_wmi_audio_sync_start_event_fixed_param
  32235. */
  32236. A_UINT32 tlv_header;
  32237. /* VDEV identifier */
  32238. A_UINT32 vdev_id;
  32239. /* periodicity:
  32240. * How frequently (in msec) FW wants host to capture the Q_TIMER.
  32241. * periodicity = 0 indicates to the host to stop capturing the QTIMERs.
  32242. */
  32243. A_UINT32 periodicity;
  32244. /* No of Qtimer captures FW wants */
  32245. A_UINT32 reads_needed;
  32246. /* Lower 32 bits of the mac timer. Value is valid only if periodicity = 0 */
  32247. A_UINT32 mac_timer_l32;
  32248. /* Upper 32 bits of the mac timer. Value is valid only if periodicity = 0 */
  32249. A_UINT32 mac_timer_u32;
  32250. /* Lower 32 bits of the Qtimer. Value is valid only if periodicity = 0 */
  32251. A_UINT32 qtimer_l32;
  32252. /* Upper 32 bits of the Qtimer. Value is valid only if periodicity = 0 */
  32253. A_UINT32 qtimer_u32;
  32254. } wmi_audio_sync_start_stop_event_fixed_param;
  32255. typedef struct {
  32256. /** TLV tag and len; tag equals
  32257. * WMITLV_TAG_STRUC_wmi_audio_sync_q_mac_relation_event_fixed_param */
  32258. A_UINT32 tlv_header;
  32259. /* VDEV identifier */
  32260. A_UINT32 vdev_id;
  32261. /* Lower 32 bits of the offset between Qmaster and Qslave */
  32262. A_UINT32 offset_l32;
  32263. /* Upper 32 bits of the offset between Qmaster and Qslave */
  32264. A_UINT32 offset_u32;
  32265. } wmi_audio_sync_q_master_slave_offset_event_fixed_param;
  32266. typedef struct {
  32267. /** TLV tag and len; tag equals
  32268. * WMITLV_TAG_STRUC_wmi_audio_sync_q_mac_relation_event_fixed_param */
  32269. A_UINT32 tlv_header;
  32270. /* Lower 32 bits of the Qtimer of master */
  32271. A_UINT32 qmaster_l32;
  32272. /* Upper 32 bits of the Qtimer of master */
  32273. A_UINT32 qmaster_u32;
  32274. /* Lower 32 bits of the Qtimer of slave*/
  32275. A_UINT32 qslave_l32;
  32276. /* Upper 32 bits of the Qtimer of slave*/
  32277. A_UINT32 qslave_u32;
  32278. } wmi_audio_sync_q_master_slave_times;
  32279. /** Set Preferred Channel List **/
  32280. typedef struct {
  32281. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_pcl_cmd_fixed_param */
  32282. /** vdev_id */
  32283. A_UINT32 vdev_id;
  32284. /**
  32285. * TLV (tag length value) parameters follow the wmi_vdev_set_pcl_cmd
  32286. * structure. The TLV's are:
  32287. *
  32288. * A_UINT32 channel_weight[];
  32289. * values defined by enum 'wmi_pcl_chan_weight'
  32290. * channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  32291. **/
  32292. } wmi_vdev_set_pcl_cmd_fixed_param;
  32293. /** command type for WMI_PDEV_TBTT_OFFSET_SYNC_CMDID */
  32294. enum pdev_tbtt_offset_cmd_type
  32295. {
  32296. WMI_PDEV_GET_TBTT_OFFSET,
  32297. WMI_PDEV_SET_TBTT_OFFSET,
  32298. };
  32299. /** Per neighbour TBTT offset information */
  32300. typedef struct
  32301. {
  32302. /** TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_pdev_tbtt_offset_info */
  32303. A_UINT32 tlv_header;
  32304. /* neighbour bss mac address */
  32305. wmi_mac_addr bss_mac;
  32306. /* neighbour bss beacon interval in TU */
  32307. A_UINT32 beacon_intval;
  32308. /* neighbour bss operating class as defined in Annex E, IEEE80211 standard */
  32309. A_UINT32 opclass;
  32310. /* neighbour bss operating channel index */
  32311. A_UINT32 chan_idx;
  32312. /* neighbour bss next QTIME TBTT high 32 bit value */
  32313. A_UINT32 next_qtime_tbtt_high;
  32314. /* neighbour bss next QTIME TBTT low 32 bit value */
  32315. A_UINT32 next_qtime_tbtt_low;
  32316. } wmi_pdev_rnr_bss_tbtt_info;
  32317. typedef struct {
  32318. /** TLV tag and len; tag equals
  32319. * WMITLV_TAG_STRUC_wmi_pdev_tbtt_offset_sync_cmd_fixed_param */
  32320. A_UINT32 tlv_header;
  32321. /*
  32322. * PDEV identifier. Value WMI_PDEV_ID_SOC implies applicable to all pdevs
  32323. * on SoC else applicable only to specified pdev
  32324. */
  32325. A_UINT32 pdev_id;
  32326. /* command_type from enum pdev_tbtt_offset_cmd_type */
  32327. A_UINT32 cmd_type;
  32328. /*
  32329. * Following this structure is the TLV:
  32330. * struct wmi_pdev_rnr_bss_tbtt_info rnr_tbtt_info[num_rnr_tbtt_info];
  32331. */
  32332. } wmi_pdev_tbtt_offset_sync_cmd_fixed_param;
  32333. typedef enum {
  32334. WLAN_2G_CAPABILITY = 0x1,
  32335. WLAN_5G_CAPABILITY = 0x2,
  32336. } WLAN_BAND_CAPABILITY;
  32337. typedef enum wmi_hw_mode_config_type {
  32338. WMI_HW_MODE_SINGLE = 0, /* Only one PHY is active. */
  32339. WMI_HW_MODE_DBS = 1, /* Both PHYs are active in different bands, PHYB in 2G and PHYA in 5G. */
  32340. WMI_HW_MODE_SBS_PASSIVE = 2, /* Both PHYs are in passive mode (only rx) in same band; no tx allowed. */
  32341. WMI_HW_MODE_SBS = 3, /* Both PHYs are active in the same band.
  32342. * Support for both PHYs within one band is planned for 5G only
  32343. * (as indicated in WMI_MAC_PHY_CAPABILITIES),
  32344. * but could be extended to other bands in the future.
  32345. * The separation of the band between the two PHYs needs to be communicated separately.
  32346. */
  32347. WMI_HW_MODE_DBS_SBS = 4, /* 3 PHYs, with 2 on the same band doing SBS
  32348. * as in WMI_HW_MODE_SBS, and 3rd on the other band
  32349. */
  32350. WMI_HW_MODE_DBS_OR_SBS = 5, /* One PHY is on 5G and the other PHY can be in 2G or 5G. */
  32351. WMI_HW_MODE_DBS_2G_5G = 6, /* Both PHYs are active in different bands. PhyA 2G and PhyB 5G */
  32352. WMI_HW_MODE_2G_PHYB = 7, /* Only PhyB 2G active */
  32353. WMI_HW_MODE_EMLSR = 8, /* Both PHYs are active in listen mode in 1x1
  32354. * and Tx/Rx trigger on any PHY will switch
  32355. * from 1x1 to 2x2 on that Phy
  32356. */
  32357. WMI_HW_MODE_AUX_EMLSR_SINGLE = 9, /* PHYA0 and AUX are active in listen mode
  32358. * in 1x1 and Tx/Rx trigger on any.
  32359. * PHY will switch from 1x1 to 2x2
  32360. * on that Phy.
  32361. */
  32362. WMI_HW_MODE_AUX_EMLSR_SPLIT = 10, /* PHYA1 and AUX are active in listen mode
  32363. * in 1x1 and Tx/Rx trigger on any.
  32364. * PHY will switch from 1x1 to 2x2
  32365. * on that Phy.
  32366. */
  32367. } WMI_HW_MODE_CONFIG_TYPE;
  32368. /*
  32369. * Per HW mode MLO capability flags
  32370. * use bits 31:27 of A_UINT32 hw_mode_config_type for Per HW mode MLO
  32371. * capability flags...
  32372. * WMI_MLO_CAP_FLAG_NONE: Do not support MLO for the specific HW mode
  32373. * WMI_MLO_CAP_FLAG_NON_STR_IN_DBS: Support STR MLO when DBS for the specific
  32374. * HW mode
  32375. * WMI_MLO_CAP_FLAG_STR_IN_DBS: Support Non-STR MLO when DBS for the
  32376. * specific HW mode
  32377. * WMI_MLO_CAP_FLAG_NON_STR_IN_SBS: Support STR MLO when SBS for the specific
  32378. * HW mode
  32379. * WMI_MLO_CAP_FLAG_STR_IN_SBS: Support Non-STR MLO when SBS for the
  32380. * specific HW mode
  32381. * WMI_MLO_CAP_FLAG_STR: Support STR for the specific HW mode.
  32382. *
  32383. * WMI_MLO_CAP_FLAG_EMLSR: Support eMLSR mode.
  32384. */
  32385. #define WMI_MLO_CAP_FLAG_NONE 0x00
  32386. #define WMI_MLO_CAP_FLAG_NON_STR_IN_DBS 0x01
  32387. #define WMI_MLO_CAP_FLAG_STR_IN_DBS 0x02
  32388. #define WMI_MLO_CAP_FLAG_NON_STR_IN_SBS 0x04
  32389. #define WMI_MLO_CAP_FLAG_STR_IN_SBS 0x08
  32390. #define WMI_MLO_CAP_FLAG_STR 0x10
  32391. #define WMI_MLO_CAP_FLAG_EMLSR 0x20
  32392. /*
  32393. * hw_mode_config_type sub-fields for chips that support 802.11BE/MLO:
  32394. * bits 26:0 - hw_mode_config
  32395. * bits 31:27 - per HW mode MLO capability flags
  32396. */
  32397. #define WMI_BECAP_PHY_GET_HW_MODE_CFG(hw_mode_config_type) WMI_GET_BITS(hw_mode_config_type, 0, 27)
  32398. #define WMI_BECAP_PHY_SET_HW_MODE_CFG(hw_mode_config_type, value) WMI_SET_BITS(hw_mode_config_type, 0, 27, value)
  32399. #define WMI_BECAP_PHY_GET_MLO_CAP(hw_mode_config_type) WMI_GET_BITS(hw_mode_config_type, 27, 5)
  32400. #define WMI_BECAP_PHY_SET_MLO_CAP(hw_mode_config_type, value) WMI_SET_BITS(hw_mode_config_type, 27, 5, value)
  32401. /*
  32402. * pdev_id sub-fields for chips that support 802.11BE/MLO
  32403. * as part of WMI_MAC_PHY_CAPABILITIES and WMI_MAC_PHY_CAPABILITIES_EXT:
  32404. * bits 16:0 - pdev_id
  32405. * bits 32:16 - Unique link id across SOCs, got as part of QMI handshake.
  32406. */
  32407. #define WMI_PHY_GET_PDEV_ID(pdev_id) WMI_GET_BITS(pdev_id, 0, 16)
  32408. #define WMI_PHY_SET_PDEV_ID(pdev_id, value) WMI_SET_BITS(pdev_id, 0, 16, value)
  32409. #define WMI_PHY_GET_HW_LINK_ID(pdev_id) WMI_GET_BITS(pdev_id, 16, 16)
  32410. #define WMI_PHY_SET_HW_LINK_ID(pdev_id, value) WMI_SET_BITS(pdev_id, 16, 16, value)
  32411. #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
  32412. #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  32413. #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
  32414. #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  32415. #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
  32416. #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  32417. #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
  32418. #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  32419. #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
  32420. #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  32421. #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
  32422. #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  32423. #define WMI_SUPPORT_11BE_GET(flags) WMI_GET_BITS(flags, 6, 1)
  32424. #define WMI_SUPPORT_11BE_SET(flags, value) WMI_SET_BITS(flags, 6, 1, value)
  32425. #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
  32426. #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
  32427. /*
  32428. * +-----------------------------+------------------------------------+
  32429. * | Transmitted VHT Capabilities| NSS Support of STA |
  32430. * | Information Field | transmitted VHT Capabilites |
  32431. * +---------------+-------------+------+------+------+------+--------+
  32432. * | Supported | Extended | | | | | |
  32433. * | Channel | NSS BW | | | | | |
  32434. * | WidthSet | Support |20 Mhz|40 Mhz|80 Mhz|160Mhz|80+80Mhz|
  32435. * +---------------+-------------+------+------+------+------+--------+
  32436. * | 0 | 0 | 1 | 1 | 1 | | |
  32437. * +---------------+-------------+------+------+------+------+--------+
  32438. * | 0 | 1 | 1 | 1 | 1 | 1/2 | |
  32439. * +---------------+-------------+------+------+------+------+--------+
  32440. * | 0 | 2 | 1 | 1 | 1 | 1/2 | 1/2 |
  32441. * +---------------+-------------+------+------+------+------+--------+
  32442. * | 0 | 3 | 1 | 1 | 1 | 3/4 | 3/4 |
  32443. * +---------------+-------------+------+------+------+------+--------+
  32444. * | 1 | 0 | 1 | 1 | 1 | 1 | |
  32445. * +---------------+-------------+------+------+------+------+--------+
  32446. * | 1 | 1 | 1 | 1 | 1 | 1 | 1/2 |
  32447. * +---------------+-------------+------+------+------+------+--------+
  32448. * | 1 | 2 | 1 | 1 | 1 | 1 | 3/4 |
  32449. * +---------------+-------------+------+------+------+------+--------+
  32450. * | 1 | 3 | 2 | 2 | 2 | 2 | 1 |
  32451. * +---------------+-------------+------+------+------+------+--------+
  32452. * | 2 | 0 | 1 | 1 | 1 | 1 | 1 |
  32453. * +---------------+-------------+------+------+------+------+--------+
  32454. * | 2 | 3 | 2 | 2 | 2 | 1 | 1 |
  32455. * +---------------+-------------+------+------+------+------+--------+
  32456. */
  32457. /*
  32458. * [0] : WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS
  32459. * [4:1] : WMI_NSS_RATIO_INFO_BITPOS
  32460. */
  32461. #define WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS 0x0
  32462. #define WMI_NSS_RATIO_INFO_BITPOS 0x1
  32463. /*
  32464. * WMI_NSS_RATIO_ENABLE_DISABLE values:
  32465. * [0] : 0 - WMI_NSS_RATIO_DISABLE
  32466. * [0] : 1 - WMI_NSS_RATIO_ENABLE
  32467. */
  32468. #define WMI_NSS_RATIO_DISABLE 0x0
  32469. #define WMI_NSS_RATIO_ENABLE 0x1
  32470. /*
  32471. * WMI_NSS_RATIO_INFO values:
  32472. * [4:1] : 0000 - WMI_NSS_RATIO_1BY2_NSS
  32473. * [4:1] : 0001 - WMI_NSS_RATIO_3BY4_NSS
  32474. * [4:1] : 0010 - WMI_NSS_RATIO_1_NSS
  32475. * [4:1] : 0011 - WMI_NSS_RATIO_2_NSS
  32476. */
  32477. #define WMI_NSS_RATIO_1BY2_NSS 0x0
  32478. #define WMI_NSS_RATIO_3BY4_NSS 0x1
  32479. #define WMI_NSS_RATIO_1_NSS 0x2
  32480. #define WMI_NSS_RATIO_2_NSS 0x3
  32481. #define WMI_NSS_RATIO_ENABLE_DISABLE_SET(param, value) \
  32482. WMI_SET_BITS(param, WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS, 1, value)
  32483. #define WMI_NSS_RATIO_ENABLE_DISABLE_GET(dword) \
  32484. WMI_GET_BITS(dword, WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS, 1)
  32485. #define WMI_NSS_RATIO_INFO_SET(param, value) \
  32486. WMI_SET_BITS(param, WMI_NSS_RATIO_INFO_BITPOS, 4, value)
  32487. #define WMI_NSS_RATIO_INFO_GET(dword) \
  32488. WMI_GET_BITS(dword, WMI_NSS_RATIO_INFO_BITPOS, 4)
  32489. /*
  32490. * 11BE EML Capability Set and Get macros
  32491. */
  32492. #define WMI_SUPPORT_EMLSR_GET(eml_capability) WMI_GET_BITS(eml_capability, 0, 1)
  32493. #define WMI_SUPPORT_EMLSR_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 0, 1, value)
  32494. #define WMI_EMLSR_PADDING_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 1, 3)
  32495. #define WMI_EMLSR_PADDING_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 1, 3, value)
  32496. #define WMI_EMLSR_TRANSITION_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 4, 3)
  32497. #define WMI_EMLSR_TRANSITION_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 4, 3, value)
  32498. #define WMI_SUPPORT_EMLMR_GET(eml_capability) WMI_GET_BITS(eml_capability, 7, 1)
  32499. #define WMI_SUPPORT_EMLMR_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 7, 1, value)
  32500. #define WMI_EMLMR_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 8, 3)
  32501. #define WMI_EMLMR_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 8, 3, value)
  32502. #define WMI_TRANSITION_TIMEOUT_GET(eml_capability) WMI_GET_BITS(eml_capability, 11, 4)
  32503. #define WMI_TRANSITION_TIMEOUT_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 11, 4, value)
  32504. /*
  32505. * 11BE MLD Capability Set and Get macros
  32506. */
  32507. #define WMI_MAX_NUM_SIMULTANEOUS_LINKS_GET(mld_capability) WMI_GET_BITS(mld_capability, 0, 4)
  32508. #define WMI_MAX_NUM_SIMULTANEOUS_LINKS_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 0, 4, value)
  32509. #define WMI_SUPPORT_SRS_GET(mld_capability) WMI_GET_BITS(mld_capability, 4, 1)
  32510. #define WMI_SUPPORT_SRS_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 4, 1, value)
  32511. #define WMI_TID_TO_LINK_NEGOTIATION_GET(mld_capability) WMI_GET_BITS(mld_capability, 5, 2)
  32512. #define WMI_TID_TO_LINK_NEGOTIATION_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 5, 2, value)
  32513. #define WMI_FREQ_SEPERATION_STR_GET(mld_capability) WMI_GET_BITS(mld_capability, 7, 5)
  32514. #define WMI_FREQ_SEPERATION_STR_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 7, 5, value)
  32515. #define WMI_SUPPORT_AAR_GET(mld_capability) WMI_GET_BITS(mld_capability, 12, 1)
  32516. #define WMI_SUPPORT_AAR_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 12, 1, value)
  32517. /*
  32518. * 11BE Ext MLD Capability Set and Get macros
  32519. */
  32520. #define WMI_EXT_MLD_OPERATION_PARAMETER_UPDATE_SUPP_GET(ext_mld_capability) WMI_GET_BITS(ext_mld_capability, 0, 1)
  32521. #define WMI_EXT_MLD_OPERATION_PARAMETER_UPDATE_SUPP_SET(ext_mld_capability, value) WMI_SET_BITS(ext_mld_capability, 0, 1, value)
  32522. /*
  32523. * 11BE MSD Capability Set and Get macros
  32524. */
  32525. #define WMI_MEDIUM_SYNC_DURATION_GET(msd_capability) WMI_GET_BITS(msd_capability, 0, 8)
  32526. #define WMI_MEDIUM_SYNC_DURATION_SET(msd_capability,value) WMI_SET_BITS(msd_capability, 0, 8, value)
  32527. #define WMI_MEDIUM_SYNC_OFDM_ED_THRESHOLD_GET(msd_capability) WMI_GET_BITS(msd_capability, 8, 4)
  32528. #define WMI_MEDIUM_SYNC_OFDM_ED_THRESHOLD_SET(msd_capability, value) WMI_SET_BITS(msd_capability, 8, 4, value)
  32529. #define WMI_MEDIUM_SYNC_MAX_NO_TXOPS_GET(msd_capability) WMI_GET_BITS(msd_capability, 12, 4)
  32530. #define WMI_MEDIUM_SYNC_MAX_NO_TXOPS_SET(msd_capability, value) WMI_SET_BITS(msd_capability, 12, 4, value)
  32531. typedef struct {
  32532. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES */
  32533. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  32534. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  32535. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  32536. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  32537. * though in practice the elements may always be ordered by hw_mode_id */
  32538. A_UINT32 hw_mode_id;
  32539. /*
  32540. * pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
  32541. * hw_link_id: Unique link id across SOCs, got as part of QMI handshake.
  32542. * For legacy chips which do not support MLO, these top bits will always
  32543. * be set to 0, so it won't impact the legacy chips which treat pdev_id
  32544. * as 32 bits.
  32545. */
  32546. union {
  32547. struct {
  32548. A_UINT32 pdev_id:16,
  32549. hw_link_id:16;
  32550. } wmi_pdev_to_link_map;
  32551. A_UINT32 pdev_id;
  32552. };
  32553. /* phy id. Starts with 0 */
  32554. A_UINT32 phy_id;
  32555. /* supported modulations and number of MU beamformees */
  32556. union {
  32557. struct {
  32558. A_UINT32 supports_11b:1,
  32559. supports_11g:1,
  32560. supports_11a:1,
  32561. supports_11n:1,
  32562. supports_11ac:1,
  32563. supports_11ax:1,
  32564. supports_11be:1,
  32565. unused: 21,
  32566. max_mubfee: 4; /* max MU beamformees supported per MAC */
  32567. };
  32568. A_UINT32 supported_flags;
  32569. };
  32570. /* supported bands, enum WLAN_BAND_CAPABILITY */
  32571. A_UINT32 supported_bands;
  32572. /* ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
  32573. * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us */
  32574. A_UINT32 ampdu_density;
  32575. /* max bw supported 2G, enum wmi_channel_width */
  32576. A_UINT32 max_bw_supported_2G;
  32577. /* WMI HT Capability, WMI_HT_CAP defines */
  32578. A_UINT32 ht_cap_info_2G;
  32579. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  32580. A_UINT32 vht_cap_info_2G;
  32581. /* VHT Supported MCS Set field Rx/Tx same
  32582. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  32583. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  32584. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  32585. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  32586. * - 3 indicates that n spatial streams is not supported
  32587. * - bit [15:0] Each NSS takes 2 bit.
  32588. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  32589. * n spatial streams
  32590. * - bit 16 - for NSS 1
  32591. * - bit 17 - for NSS 2
  32592. * - .
  32593. * - .
  32594. * - bit 23 - for NSS 8
  32595. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  32596. * are valid
  32597. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  32598. */
  32599. A_UINT32 vht_supp_mcs_2G;
  32600. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  32601. A_UINT32 he_cap_info_2G;
  32602. /* HE Supported MCS Set field Rx/Tx same
  32603. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  32604. * bit 2-0 indicating max HE MCS of NSS1
  32605. * bit 5-3 indicating max HE MCS of NSS2 and so on
  32606. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  32607. * HE BW less than or equal to 80MHZ is encoded as follows
  32608. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  32609. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  32610. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  32611. * - 3 indicates that n spatial streams is not supported
  32612. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  32613. */
  32614. A_UINT32 he_supp_mcs_2G;
  32615. /* Valid Transmit chain mask */
  32616. A_UINT32 tx_chain_mask_2G;
  32617. /* Valid Receive chain mask */
  32618. A_UINT32 rx_chain_mask_2G;
  32619. /* max bw supported 5G, enum wmi_channel_width */
  32620. A_UINT32 max_bw_supported_5G;
  32621. /* WMI HT Capability, WMI_HT_CAP defines */
  32622. A_UINT32 ht_cap_info_5G;
  32623. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  32624. A_UINT32 vht_cap_info_5G;
  32625. /* VHT Supported MCS Set field Rx/Tx same
  32626. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  32627. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  32628. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  32629. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  32630. * - 3 indicates that n spatial streams is not supported
  32631. * - bit [15:0] Each NSS takes 2 bit.
  32632. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  32633. * n spatial streams
  32634. * - bit 16 - for NSS 1
  32635. * - bit 17 - for NSS 2
  32636. * - .
  32637. * - .
  32638. * - bit 23 - for NSS 8
  32639. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  32640. * are valid
  32641. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  32642. */
  32643. A_UINT32 vht_supp_mcs_5G;
  32644. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  32645. A_UINT32 he_cap_info_5G;
  32646. /* HE Supported MCS Set field Rx/Tx same
  32647. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  32648. * bit 2-0 indicating max HE MCS of NSS1
  32649. * bit 5-3 indicating max HE MCS of NSS2 and so on
  32650. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  32651. * HE BW less than or equal to 80MHZ is encoded as follows
  32652. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  32653. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  32654. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  32655. * - 3 indicates that n spatial streams is not supported
  32656. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  32657. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  32658. * HE BW equal to 80+80 or 160 MHZ encoding is same as above just the
  32659. * lower 16 bits are used for lower 80MHz NSS-MCS supported combo and
  32660. * upper 16 bits are used for upper 80MHz NSS-MCS supported combo
  32661. */
  32662. A_UINT32 he_supp_mcs_5G;
  32663. /* Valid Transmit chain mask */
  32664. A_UINT32 tx_chain_mask_5G;
  32665. /* Valid Receive chain mask */
  32666. A_UINT32 rx_chain_mask_5G;
  32667. /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
  32668. A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
  32669. A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
  32670. wmi_ppe_threshold he_ppet2G;
  32671. wmi_ppe_threshold he_ppet5G;
  32672. /* chainmask table to be used for the MAC */
  32673. A_UINT32 chainmask_table_id;
  32674. /* PDEV ID to LMAC ID mapping */
  32675. A_UINT32 lmac_id;
  32676. /* 2nd DWORD of HE capability info field of 802.11ax, support Draft 3+ */
  32677. A_UINT32 he_cap_info_2G_ext;
  32678. A_UINT32 he_cap_info_5G_ext;
  32679. /*
  32680. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  32681. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  32682. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  32683. * bit[31:3] : Reserved
  32684. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  32685. */
  32686. A_UINT32 he_cap_info_internal;
  32687. A_UINT32 wireless_modes; /* REGDMN MODE, see REGDMN_MODE_ enum */
  32688. A_UINT32 low_2ghz_chan_freq; /* units = MHz */
  32689. A_UINT32 high_2ghz_chan_freq; /* units = MHz */
  32690. A_UINT32 low_5ghz_chan_freq; /* units = MHz */
  32691. A_UINT32 high_5ghz_chan_freq; /* units = MHz */
  32692. /*
  32693. * NSS ratio to be sent to Host during boot-up capabilities negotiation
  32694. *
  32695. * Bit 0 - refer to WMI_NSS_RATIO_ENABLE_DISABLE_ definitions
  32696. * [0] : 0 - WMI_NSS_RATIO_DISABLE
  32697. * [0] : 1 - WMI_NSS_RATIO_ENABLE
  32698. *
  32699. * Bits 4:1 - refer to WMI_NSS_RATIO_INFO_ definitions
  32700. * [4:1] : 0000 - WMI_NSS_RATIO_1BY2_NSS
  32701. * [4:1] : 0001 - WMI_NSS_RATIO_3BY4_NSS
  32702. * [4:1] : 0010 - WMI_NSS_RATIO_1_NSS
  32703. * [4:1] : 0011 - WMI_NSS_RATIO_2_NSS
  32704. *
  32705. * [31:5] : Reserved
  32706. */
  32707. A_UINT32 nss_ratio;
  32708. /**************************************************************************
  32709. * DON'T ADD ANY FURTHER FIELDS HERE -
  32710. * It would cause the size of the READY_EXT message within some targets
  32711. * to exceed the size of the buffer used for the message.
  32712. **************************************************************************/
  32713. } WMI_MAC_PHY_CAPABILITIES;
  32714. typedef struct {
  32715. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES_EXT */
  32716. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  32717. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  32718. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  32719. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  32720. * though in practice the elements may always be ordered by hw_mode_id */
  32721. A_UINT32 hw_mode_id;
  32722. /*
  32723. * pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
  32724. * hw_link_id: Unique link id across SOCs, got as part of QMI handshake.
  32725. * For legacy chips which do not support MLO, these top bits will always
  32726. * be set to 0, so it won't impact the legacy chips which treat pdev_id
  32727. * as 32 bits.
  32728. */
  32729. union {
  32730. struct {
  32731. A_UINT32 pdev_id:16,
  32732. hw_link_id:16;
  32733. } wmi_pdev_to_link_map;
  32734. A_UINT32 pdev_id;
  32735. };
  32736. /* phy id. Starts with 0 */
  32737. A_UINT32 phy_id;
  32738. A_UINT32 wireless_modes_ext; /* REGDMN MODE EXT, see REGDMN_MODE_ enum */
  32739. /**************************************************************************
  32740. * following new params for 802.11be, but under development
  32741. **************************************************************************/
  32742. /* EHT capability mac info field of 802.11be */
  32743. A_UINT32 eht_cap_mac_info_2G[WMI_MAX_EHTCAP_MAC_SIZE];
  32744. A_UINT32 eht_cap_mac_info_5G[WMI_MAX_EHTCAP_MAC_SIZE];
  32745. A_UINT32 eht_supp_mcs_2G; /* deprecated (c.f. eht_supp_mcs_ext_2G) */
  32746. A_UINT32 eht_supp_mcs_5G; /* deprecated (c.f. eht_supp_mcs_ext_5G) */
  32747. /* EHT capability phy field of 802.11be, WMI_EHT_CAP defines */
  32748. A_UINT32 eht_cap_phy_info_2G[WMI_MAX_EHTCAP_PHY_SIZE];
  32749. A_UINT32 eht_cap_phy_info_5G[WMI_MAX_EHTCAP_PHY_SIZE];
  32750. wmi_ppe_threshold eht_ppet2G;
  32751. wmi_ppe_threshold eht_ppet5G;
  32752. A_UINT32 eht_cap_info_internal;
  32753. /* eht_supp_mcs_ext_2G, eht_supp_mcs_ext_5G:
  32754. * array index interpretation:
  32755. * 0 – index indicated EHT-MCS map for 20Mhz only sta (4 bytes valid)
  32756. * 1 – index for <= 80MHz bw (only 3 bytes are valid and other is reserved)
  32757. * 2 – index for 160Mhz bw (only 3 bytes are valid and other is reserved)
  32758. * 3 – index for 320Mhz bw (only 3 bytes are valid and other is reserved)
  32759. *
  32760. * The format of the data stored in each array index element is defined
  32761. * by IEEE802.11 9.4.2.295c.4
  32762. * For example, for the 20 MHz / index 0 element:
  32763. * B0 -- B3: Rx Max Nss that Supports EHT-MCS 0–7
  32764. * B4 -- B7: Tx Max Nss that Supports EHT-MCS 0–7
  32765. * B8 -- B11: Rx Max Nss that Supports EHT-MCS 8–9
  32766. * B12 -- B15: Tx Max Nss that Supports EHT-MCS 8–9
  32767. * B16 -- B19: Rx Max Nss that Supports EHT-MCS 10–11
  32768. * B20 -- B23: Tx Max Nss that Supports EHT-MCS 10–11
  32769. * B24 -- B27: Rx Max Nss that Supports EHT-MCS 12–13
  32770. * B28 -- B31: Tx Max Nss that Supports EHT-MCS 12–13
  32771. */
  32772. A_UINT32 eht_supp_mcs_ext_2G[WMI_MAX_EHT_SUPP_MCS_2G_SIZE];
  32773. A_UINT32 eht_supp_mcs_ext_5G[WMI_MAX_EHT_SUPP_MCS_5G_SIZE];
  32774. union {
  32775. struct {
  32776. A_UINT32 emlsr_support:1,
  32777. emlsr_padding_delay:3,
  32778. emlsr_transition_delay:3,
  32779. emlmr_support:1,
  32780. emlmr_delay:3,
  32781. transition_timeout:4,
  32782. reserved: 17;
  32783. };
  32784. A_UINT32 eml_capability;
  32785. };
  32786. union {
  32787. struct {
  32788. A_UINT32 max_num_simultaneous_links:4,
  32789. srs_support:1,
  32790. tid_to_link_negotiation_support:2, /* Set to 0 if TID-to-link mapping is not supported by the MLD.
  32791. * Set to 1 if MLD supports the mapping of each TID to the same or different link set.
  32792. * Set to 2 if MLD only supports the mapping of all TIDs to the same link set.
  32793. * Value 3 is reserved */
  32794. freq_separation_str:5,
  32795. aar_support:1,
  32796. reserved2: 19;
  32797. };
  32798. A_UINT32 mld_capability;
  32799. };
  32800. union {
  32801. struct {
  32802. A_UINT32
  32803. op_update_para_support:1, /* Indicates support of operation parameter update negotiation */
  32804. reserved3: 31;
  32805. };
  32806. A_UINT32 ext_mld_capability;
  32807. };
  32808. union {
  32809. struct {
  32810. A_UINT32 medium_sync_duration:8,
  32811. medium_sync_ofdm_ed_threshold:4,
  32812. medium_sync_max_no_txops:4,
  32813. reserved4: 16;
  32814. };
  32815. A_UINT32 msd_capability;
  32816. };
  32817. } WMI_MAC_PHY_CAPABILITIES_EXT;
  32818. typedef struct {
  32819. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES */
  32820. /* hw_mode_id - identify a particular set of HW characteristics,
  32821. * as specified by the subsequent fields */
  32822. A_UINT32 hw_mode_id;
  32823. /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
  32824. * number of bits set in phy_id_map represents number of WMI_MAC_PHY_CAPABILITIES TLV's
  32825. * one for each active PHY for current HW mode identified by hw_mode_id. For example for
  32826. * DBS/SBS mode there will be 2 WMI_MAC_PHY_CAPABILITIES TLVs and for single MAC modes it
  32827. * will be 1 WMI_MAC_PHY_CAPABILITIES TLVs */
  32828. A_UINT32 phy_id_map;
  32829. /* hw_mode_config_type
  32830. * Identify a particular type of HW mode such as SBS, DBS etc.
  32831. * Refer to WMI_HW_MODE_CONFIG_TYPE values.
  32832. *
  32833. * Use bits 31:27 of hw_mode_config_type for Per HW mode MLO capability
  32834. * flags.
  32835. * Refer to WMI_MLO_CAP_FLAG_XXX. For legacy chips which do not support
  32836. * MLO, these top bits will always be set to 0, so it won't impact the
  32837. * legacy chips which treat hw_mode_config_type as 32 bits.
  32838. */
  32839. union {
  32840. struct {
  32841. A_UINT32 hw_mode_config :27,
  32842. mlo_cap_flag :5; /* see WMI_MLO_CAP_FLAG_ defs */
  32843. };
  32844. A_UINT32 hw_mode_config_type;
  32845. };
  32846. /**************************************************************************
  32847. * DON'T ADD ANY FURTHER FIELDS HERE -
  32848. * It would cause the size of the READY_EXT message within some targets
  32849. * to exceed the size of the buffer used for the message.
  32850. **************************************************************************/
  32851. } WMI_HW_MODE_CAPABILITIES;
  32852. /*
  32853. * The following macros are for the bitfields witihin the supported flags field
  32854. * of WMI_MAC_PHY_CHAINMASK_CAPABILITY:
  32855. * Capabilities for the chainmask
  32856. */
  32857. #define WMI_SUPPORT_CHAN_WIDTH_20_GET(flags) WMI_GET_BITS(flags, 0, 1)
  32858. #define WMI_SUPPORT_CHAN_WIDTH_20_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  32859. #define WMI_SUPPORT_CHAN_WIDTH_40_GET(flags) WMI_GET_BITS(flags, 1, 1)
  32860. #define WMI_SUPPORT_CHAN_WIDTH_40_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  32861. #define WMI_SUPPORT_CHAN_WIDTH_80_GET(flags) WMI_GET_BITS(flags, 2, 1)
  32862. #define WMI_SUPPORT_CHAN_WIDTH_80_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  32863. #define WMI_SUPPORT_CHAN_WIDTH_160_GET(flags) WMI_GET_BITS(flags, 3, 1)
  32864. #define WMI_SUPPORT_CHAN_WIDTH_160_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  32865. #define WMI_SUPPORT_CHAN_WIDTH_80P80_GET(flags) WMI_GET_BITS(flags, 4, 1)
  32866. #define WMI_SUPPORT_CHAN_WIDTH_80P80_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  32867. #define WMI_SUPPORT_AGILE_SPECTRAL_GET(flags) WMI_GET_BITS(flags, 5, 1)
  32868. #define WMI_SUPPORT_AGILE_SPECTRAL_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  32869. #define WMI_SUPPORT_AGILE_SPECTRAL_160_GET(flags) WMI_GET_BITS(flags, 6, 1)
  32870. #define WMI_SUPPORT_AGILE_SPECTRAL_160_SET(flags, value) WMI_SET_BITS(flags, 6, 1, value)
  32871. #define WMI_SUPPORT_ADFS_160_GET(flags) WMI_GET_BITS(flags, 7, 1)
  32872. #define WMI_SUPPORT_ADFS_160_SET(flags, value) WMI_SET_BITS(flags, 7, 1, value)
  32873. #define WMI_SUPPORT_CHAN_WIDTH_320_GET(flags) WMI_GET_BITS(flags, 8, 1)
  32874. #define WMI_SUPPORT_CHAN_WIDTH_320_SET(flags, value) WMI_SET_BITS(flags, 8, 1, value)
  32875. #define WMI_SUPPORT_ADFS_320_GET(flags) WMI_GET_BITS(flags, 9, 1)
  32876. #define WMI_SUPPORT_ADFS_320_SET(flags, value) WMI_SET_BITS(flags, 9, 1, value)
  32877. #define WMI_SUPPORT_AGILE_SPECTRAL_320_GET(flags) WMI_GET_BITS(flags, 10, 1)
  32878. #define WMI_SUPPORT_AGILE_SPECTRAL_320_SET(flags, value) WMI_SET_BITS(flags, 10, 1, value)
  32879. #define WMI_SUPPORT_CHAIN_MASK_2G_GET(flags) WMI_GET_BITS(flags, 27, 1)
  32880. #define WMI_SUPPORT_CHAIN_MASK_2G_SET(flags, value) WMI_SET_BITS(flags, 27, 1, value)
  32881. #define WMI_SUPPORT_CHAIN_MASK_5G_GET(flags) WMI_GET_BITS(flags, 28, 1)
  32882. #define WMI_SUPPORT_CHAIN_MASK_5G_SET(flags, value) WMI_SET_BITS(flags, 28, 1, value)
  32883. #define WMI_SUPPORT_CHAIN_MASK_TX_GET(flags) WMI_GET_BITS(flags, 29, 1)
  32884. #define WMI_SUPPORT_CHAIN_MASK_TX_SET(flags, value) WMI_SET_BITS(flags, 29, 1, value)
  32885. #define WMI_SUPPORT_CHAIN_MASK_RX_GET(flags) WMI_GET_BITS(flags, 30, 1)
  32886. #define WMI_SUPPORT_CHAIN_MASK_RX_SET(flags, value) WMI_SET_BITS(flags, 30, 1, value)
  32887. #define WMI_SUPPORT_CHAIN_MASK_ADFS_GET(flags) WMI_GET_BITS(flags, 31, 1)
  32888. #define WMI_SUPPORT_CHAIN_MASK_ADFS_SET(flags, value) WMI_SET_BITS(flags, 31, 1, value)
  32889. /** Definition of valid chainmask and associated capabilities */
  32890. typedef struct {
  32891. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_CAPABILITY */
  32892. /* supported flags: Capabilities for this chianmask*/
  32893. union {
  32894. struct {
  32895. A_UINT32 supports_chan_width_20:1,
  32896. supports_chan_width_40:1,
  32897. supports_chan_width_80:1,
  32898. supports_chan_width_160:1,
  32899. supports_chan_width_80P80:1,
  32900. supports_agile_spectral:1,
  32901. supports_agile_spectral_160:1,
  32902. supports_aDFS_160:1,
  32903. supports_chan_width_320:1,
  32904. supports_aDFS_320:1,
  32905. supports_agile_spectral_320:1,
  32906. reserved:16, /* bits 26:11 */
  32907. chain_mask_2G:1,
  32908. chain_mask_5G:1,
  32909. chain_mask_tx:1,
  32910. chain_mask_rx:1,
  32911. supports_aDFS:1; /* agile DFS */
  32912. };
  32913. A_UINT32 supported_flags;
  32914. };
  32915. A_UINT32 chainmask;
  32916. /**************************************************************************
  32917. * DON'T ADD ANY FURTHER FIELDS HERE -
  32918. * It would cause the size of the READY_EXT message within some targets
  32919. * to exceed the size of the buffer used for the message.
  32920. **************************************************************************/
  32921. } WMI_MAC_PHY_CHAINMASK_CAPABILITY;
  32922. typedef struct {
  32923. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_COMBO */
  32924. A_UINT32 chainmask_table_id;
  32925. /* Number of valid Chainmask in the table */
  32926. A_UINT32 num_valid_chainmask;
  32927. /**************************************************************************
  32928. * DON'T ADD ANY FURTHER FIELDS HERE -
  32929. * It would cause the size of the READY_EXT message within some targets
  32930. * to exceed the size of the buffer used for the message.
  32931. **************************************************************************/
  32932. /*
  32933. * This TLV is followed by the below TLVs:
  32934. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask]
  32935. */
  32936. } WMI_MAC_PHY_CHAINMASK_COMBO;
  32937. typedef struct {
  32938. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS */
  32939. /* num HW modes */
  32940. A_UINT32 num_hw_modes;
  32941. /* number of unique chainmask combo tables */
  32942. A_UINT32 num_chainmask_tables;
  32943. /**************************************************************************
  32944. * DON'T ADD ANY FURTHER FIELDS HERE -
  32945. * It would cause the size of the READY_EXT message within some targets
  32946. * to exceed the size of the buffer used for the message.
  32947. **************************************************************************/
  32948. /*
  32949. * This TLV is followed by the below TLVs:
  32950. *
  32951. * WMI_HW_MODE_CAPABILITIES soc_hw_mode_caps[num_hw_modes]
  32952. *
  32953. * (intervening TLVs, e.g. HW_MODE_CAPS, MAC_PHY_CAPS, HAL_REG_CAPS)
  32954. *
  32955. * WMI_MAC_PHY_CHAINMASK_COMBO mac_phy_chainmask_combo[num_chainmask_tables]
  32956. * // number of chainmasks specified in mac_phy_chainmask_combo[0]
  32957. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask0]
  32958. * // number of chainmasks specified in mac_phy_chainmask_combo[1]
  32959. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask1]
  32960. * // number of chainmasks specified in mac_phy_chainmask_combo[2]
  32961. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask2]
  32962. * etc.
  32963. */
  32964. } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
  32965. /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
  32966. typedef struct {
  32967. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT */
  32968. /* phy id */
  32969. A_UINT32 phy_id;
  32970. /* regdomain value specified in EEPROM */
  32971. A_UINT32 eeprom_reg_domain;
  32972. /* regdomain */
  32973. A_UINT32 eeprom_reg_domain_ext;
  32974. /* CAP1 capabilities bit map, see REGDMN_CAP1_ defines */
  32975. A_UINT32 regcap1;
  32976. /* REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines */
  32977. A_UINT32 regcap2;
  32978. /* REGDMN MODE, see REGDMN_MODE_ enum */
  32979. A_UINT32 wireless_modes;
  32980. A_UINT32 low_2ghz_chan; /* freq in MHz */
  32981. A_UINT32 high_2ghz_chan; /* freq in MHz */
  32982. A_UINT32 low_5ghz_chan; /* freq in MHz */
  32983. A_UINT32 high_5ghz_chan; /* freq in MHz */
  32984. /**************************************************************************
  32985. * DON'T ADD ANY FURTHER FIELDS HERE -
  32986. * It would cause the size of the READY_EXT message within some targets
  32987. * to exceed the size of the buffer used for the message.
  32988. **************************************************************************/
  32989. } WMI_HAL_REG_CAPABILITIES_EXT;
  32990. typedef struct {
  32991. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT2 */
  32992. /* phy id */
  32993. A_UINT32 phy_id;
  32994. /* regdomain value specified in EEPROM */
  32995. A_UINT32 wireless_modes_ext;
  32996. A_UINT32 low_2ghz_chan_ext; /* freq in MHz */
  32997. A_UINT32 high_2ghz_chan_ext; /* freq in MHz */
  32998. A_UINT32 low_5ghz_chan_ext; /* freq in MHz */
  32999. A_UINT32 high_5ghz_chan_ext; /* freq in MHz */
  33000. } WMI_HAL_REG_CAPABILITIES_EXT2;
  33001. /*
  33002. * TWT service capability bitmap in wmi_twt_caps_params TLV
  33003. * within WMI_SERVICE_READY_EXT2_EVENTID message
  33004. */
  33005. typedef enum {
  33006. WMI_TWT_STA_SYNC_EVENT_CAP = 1, /* STA TWT: FW internal errors reported using sync WMI_TWT_ACK_EVENTID */
  33007. /* Add new TWT Caps above */
  33008. WMI_TWT_MAX_CAP = 32,
  33009. } WMI_TWT_CAPS_BITMAP;
  33010. typedef struct {
  33011. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_caps_param */
  33012. /* twt_capability_bitmap
  33013. * TWT Capabilities - refer to WMI_TWT_CAPS_BITMAP for the meaning of
  33014. * the bits within the bitmap
  33015. */
  33016. A_UINT32 twt_capability_bitmap;
  33017. } wmi_twt_caps_params;
  33018. /*
  33019. * This TLV used for Scan Radio RDP
  33020. * We have an RDP which supports Multiband-Frequency (2 GHz, 5 GHz and 6 GHz)
  33021. * on a single radio.
  33022. * The AP acts as a special VAP. There will not be WMI_VDEV_UP_CMD.
  33023. * This radio is used only for scanning purpose and to send few MGMT frames.
  33024. * The DFS feature is disabled on this scan radio, since there will not be
  33025. * much TX traffic.
  33026. * The Host has to disable CAC timer because DFS feature not supported here.
  33027. * In order to know about the scan radio RDP, DFS disabled case and
  33028. * SCAN BLANKING support, the target has to send this information to Host
  33029. * per pdev via WMI_SERVICE_READY_EXT2_EVENT.
  33030. * The target is notified of the special scan VAP by the flags variable
  33031. * in the WMI_CREATE_CMD.
  33032. */
  33033. typedef struct {
  33034. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SCAN_RADIO_CAPABILITIES_EXT2 */
  33035. A_UINT32 phy_id;
  33036. /*
  33037. * Bit 0:
  33038. * 1 - SCAN_RADIO supported 0 - SCAN_RADIO not supported
  33039. * Refer to WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_SET, GET macros
  33040. * Bit 1:
  33041. * 1 - DFS enabled 0 - DFS disabled
  33042. * Refer to WMI_SCAN_RADIO_CAP_DFS_FLAG_SET, GET macros
  33043. * Bit 2:
  33044. * 1 - SCAN RADIO blanking supported
  33045. * 0 - SCAN RADIO blanking not supported
  33046. * Refer to WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_SET, GET macros
  33047. * [3:31] reserved
  33048. */
  33049. A_UINT32 flags;
  33050. } WMI_SCAN_RADIO_CAPABILITIES_EXT2;
  33051. #define WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_GET(flag) WMI_GET_BITS(flag, 0, 1)
  33052. #define WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_SET(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  33053. #define WMI_SCAN_RADIO_CAP_DFS_FLAG_GET(flag) WMI_GET_BITS(flag, 1, 1)
  33054. #define WMI_SCAN_RADIO_CAP_DFS_FLAG_SET(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  33055. #define WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_GET(flag) WMI_GET_BITS(flag, 2, 1)
  33056. #define WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_SET(flag, val) WMI_SET_BITS(flag, 2, 1, val)
  33057. typedef struct {
  33058. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES */
  33059. A_UINT32 num_phy;
  33060. /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
  33061. /**************************************************************************
  33062. * DON'T ADD ANY FURTHER FIELDS HERE -
  33063. * It would cause the size of the READY_EXT message within some targets
  33064. * to exceed the size of the buffer used for the message.
  33065. **************************************************************************/
  33066. } WMI_SOC_HAL_REG_CAPABILITIES;
  33067. typedef struct {
  33068. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_OEM_DMA_RING_CAPABILITIES */
  33069. A_UINT32 pdev_id;
  33070. A_UINT32 min_num_ptr;
  33071. /* Minimum number of pointers in the OEM DMA ring for this pdev */
  33072. A_UINT32 min_buf_size;
  33073. /* Minimum size in bytes of each buffer in the OEM DMA ring */
  33074. A_UINT32 min_buf_align;
  33075. /* Minimum alignment in bytes of each buffer in the OEM DMA ring */
  33076. /**************************************************************************
  33077. * DON'T ADD ANY FURTHER FIELDS HERE -
  33078. * It would cause the size of the READY_EXT message within some targets
  33079. * to exceed the size of the buffer used for the message.
  33080. **************************************************************************/
  33081. } WMI_OEM_DMA_RING_CAPABILITIES;
  33082. typedef enum {
  33083. WMI_SAR_VERSION_0_ORIGINAL = 0x00,
  33084. WMI_SAR_VERSION_1_FULL_TABLE = 0x01,
  33085. WMI_SAR_VERSION_2_DBS_SAR = 0x02,
  33086. WMI_SAR_VERSION_3_SBS_SAR = 0x03,
  33087. WMI_SAR_VERSION_SMART_TX = 0x04,
  33088. WMI_SAR_VERSION_TAS = 0x05,
  33089. WMI_SAR_VERSION_INVALID = 0x80
  33090. } wmi_sar_version_t;
  33091. typedef struct {
  33092. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES*/
  33093. /* sar version in bdf */
  33094. A_UINT32 active_version; /* contains a wmi_sar_version_t value */
  33095. /**************************************************************************
  33096. * DON'T ADD ANY FURTHER FIELDS HERE -
  33097. * It would cause the size of the READY_EXT message within some targets
  33098. * to exceed the size of the buffer used for the message.
  33099. **************************************************************************/
  33100. } WMI_SAR_CAPABILITIES;
  33101. typedef enum {
  33102. WMI_SAR_FLAG_NONE = 0,
  33103. WMI_SAR_SET_CTL_GROUPING_DISABLE,
  33104. WMI_SAR_DBS_WITH_BT_DISABLE,
  33105. WMI_SAR_FLAG_MAX,
  33106. } wmi_sar_flags;
  33107. typedef struct {
  33108. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_flags*/
  33109. /* sar flags in bdf */
  33110. A_UINT32 sar_flags; /* refer to enum wmi_sar_flags */
  33111. } wmi_sar_flag_tlv_param;
  33112. typedef struct {
  33113. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */
  33114. /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */
  33115. A_UINT32 default_adaptive_dwell_mode;
  33116. /** the weight to calculate the average low pass filter for channel congestion. 0-100 */
  33117. A_UINT32 adapative_lpf_weight;
  33118. /** interval to monitor passive scan in msec */
  33119. A_UINT32 passive_monitor_interval_ms;
  33120. /** % of wifi activity to switch from passive to active 0-100 */
  33121. A_UINT32 wifi_activity_threshold_pct;
  33122. } wmi_scan_adaptive_dwell_parameters_tlv;
  33123. typedef struct {
  33124. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param */
  33125. /* globally enable/disable adaptive dwell */
  33126. A_UINT32 enable;
  33127. /** pdev_id for identifying the MAC
  33128. * See macros starting with WMI_PDEV_ID_ for values.
  33129. * In non-DBDC case host should set it to 0
  33130. */
  33131. A_UINT32 pdev_id;
  33132. /**
  33133. * followed by TLV (tag length value) parameters array
  33134. * The TLV's are:
  33135. * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
  33136. */
  33137. } wmi_scan_adaptive_dwell_config_fixed_param;
  33138. typedef struct {
  33139. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_param_tlv */
  33140. /** module_id **/
  33141. A_UINT32 module_id;
  33142. /** number of dbs scans */
  33143. A_UINT32 num_dbs_scans;
  33144. /** number of non-dbs scans */
  33145. A_UINT32 num_non_dbs_scans;
  33146. } wmi_scan_dbs_duty_cycle_tlv_param;
  33147. typedef struct {
  33148. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_fixed_param */
  33149. /* number of scan client dutycycle param elements */
  33150. A_UINT32 num_clients;
  33151. /** pdev_id for identifying the MAC
  33152. * See macros starting with WMI_PDEV_ID_ for values.
  33153. * In non-DBDC case host should set it to 0
  33154. */
  33155. A_UINT32 pdev_id;
  33156. /**
  33157. * followed by TLV (tag length value) parameters array
  33158. * The TLV's are:
  33159. * wmi_scan_selection_duty_cycle_tlv_param[num_clients];
  33160. */
  33161. } wmi_scan_dbs_duty_cycle_fixed_param;
  33162. typedef struct {
  33163. /** TLV tag and len; tag equals
  33164. * WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info */
  33165. A_UINT32 tlv_header;
  33166. /** temp_lwm:
  33167. * temperature sensor value in celsius when to exit to lower zone,
  33168. * this value can be lower than HWM of lower zone as zone overlapping
  33169. * is permitted by design to provide hysteresis
  33170. */
  33171. A_UINT32 temp_lwm;
  33172. /** temp_hwm:
  33173. * temperature sensor value in celsius when to exit to higher zone,
  33174. * this value can be higher than LWM of higher zone as zone overlapping
  33175. * is permitted by design to provide hysteresis
  33176. */
  33177. A_UINT32 temp_hwm;
  33178. /** dc_off_percent:
  33179. * duty cycle off percent 0-100.
  33180. * 0 means no off, 100 means no on (shutdown the phy).
  33181. */
  33182. A_UINT32 dc_off_percent;
  33183. /** prio:
  33184. * Disable only the transmit queues in firmware that have lower priority
  33185. * than value defined by prio.
  33186. * Prioritization:
  33187. * 0 = disable all data tx queues, No Prioritization defined
  33188. * 1 = disable BK tx queue
  33189. * 2 = disable BK+BE tx queues
  33190. * 3 = disable BK+BE+VI tx queues
  33191. */
  33192. A_UINT32 prio;
  33193. /**
  33194. * Pout power reduction in 0.25 dB units.
  33195. * For example, a value of 5 causes a power reduction of 1.25 dB.
  33196. */
  33197. A_UINT32 pout_reduction_25db;
  33198. /* tx chain mask: Chain mask to apply based on the temp level */
  33199. A_UINT32 tx_chain_mask;
  33200. } wmi_therm_throt_level_config_info;
  33201. typedef enum {
  33202. WMI_THERMAL_TEMP_RANGE_STATS_NONE = 0,
  33203. WMI_THERMAL_TEMP_RANGE_STATS_INIT,
  33204. WMI_THERMAL_TEMP_RANGE_STATS_REQUEST,
  33205. WMI_THERMAL_TEMP_RANGE_STATS_CLEAR,
  33206. WMI_THERMAL_STATS_CURRENT_ALL_SENSORS_TEMP,
  33207. } wmi_thermal_stats_action;
  33208. typedef struct {
  33209. /** TLV tag and len; tag equals
  33210. * WMITLV_TAG_STRUC_wmi_thermal_stats_cmd_fixed_param
  33211. */
  33212. A_UINT32 tlv_header;
  33213. /*
  33214. * Configure thermal temperature offset value for capturing
  33215. * thermal stats in thermal range.
  33216. * FW already has thermal throttling threshold temperature in BDF.
  33217. * Thermal STATS start capturing from temperature threshold to
  33218. * temperature threshold + offset.
  33219. * If thermal offset is 0 then thermal STATS capture is disabled.
  33220. *
  33221. * Units of thermal_offset are degrees Celsius.
  33222. */
  33223. A_UINT32 thermal_offset;
  33224. A_UINT32 thermal_action; /* refer to enum wmi_thermal_stats_action */
  33225. } wmi_thermal_stats_cmd_fixed_param;
  33226. typedef enum {
  33227. WMI_THERMAL_CLIENT_UNSPECIFIED = 0,
  33228. WMI_THERMAL_CLIENT_APPS = 1,
  33229. WMI_THERMAL_CLIENT_WPSS = 2,
  33230. WMI_THERMAL_CLIENT_FW = 3,
  33231. WMI_THERMAL_CLIENT_MAX
  33232. } WMI_THERMAL_MITIGATION_CLIENTS;
  33233. #define WMI_THERMAL_CLIENT_MAX_PRIORITY 10
  33234. typedef struct {
  33235. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param */
  33236. A_UINT32 pdev_id; /* config for each pdev */
  33237. A_UINT32 enable; /* 0:disable, 1:enable */
  33238. A_UINT32 dc; /* duty cycle in ms */
  33239. A_UINT32 dc_per_event; /* how often (after how many duty cycles) the FW sends stats to host */
  33240. A_UINT32 therm_throt_levels; /* Indicates the number of thermal zone configuration */
  33241. A_UINT32 client_id; /* Indicates the client from whom the request is being forwarded to FW. Refer to WMI_THERMAL_MITIGATION_CLIENTS. */
  33242. A_UINT32 priority; /* Indicates the priority, higher the value, higher the priority. Varies from 1 to WMI_THERMAL_CLIENT_MAX_PRIORITY. */
  33243. /*
  33244. * Following this structure is the TLV:
  33245. * struct wmi_therm_throt_level_config_info therm_throt_level_config_info[therm_throt_levels];
  33246. */
  33247. } wmi_therm_throt_config_request_fixed_param;
  33248. typedef enum {
  33249. /* no throttling */
  33250. WMI_THERMAL_FULLPERF = 0,
  33251. /* throttling tx to do thermal mitigation */
  33252. WMI_THERMAL_MITIGATION = 1,
  33253. /* shut down the tx completely */
  33254. WMI_THERMAL_SHUTOFF = 2,
  33255. /* THERMAL_SHUTDOWN_TGT
  33256. * The target is over the temperature limit even with tx shut off.
  33257. * The target will be shut down entirely to control the temperature.
  33258. */
  33259. WMI_THERMAL_SHUTDOWN_TGT = 3,
  33260. } WMI_THERMAL_THROT_LEVEL;
  33261. #define WMI_THERMAL_STATS_TEMP_THRESH_LEVEL_MAX 5
  33262. /** FW response with the stats event id for every pdev and zones */
  33263. typedef struct {
  33264. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param */
  33265. A_UINT32 tlv_header;
  33266. A_UINT32 pdev_id; /* stats for corresponding pdev*/
  33267. A_UINT32 temp; /* Temperature reading in celsius */
  33268. A_UINT32 level; /* Current thermal throttling level -
  33269. * contains a WMI_THERMAL_THROT_LEVEL value. */
  33270. A_UINT32 therm_throt_levels; /* number of levels in therm_throt_level_stats_info */
  33271. /* This TLV is followed by another TLV of array of structs
  33272. * wmi_therm_throt_level_stats_info therm_throt_level_stats_info[therm_throt_levels];
  33273. * wmi_thermal_throt_temp_range_stats temp_range_stats[therm_throt_levels];
  33274. */
  33275. } wmi_therm_throt_stats_event_fixed_param;
  33276. typedef struct {
  33277. /** TLV tag and len; tag equals
  33278. * WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info */
  33279. A_UINT32 tlv_header;
  33280. A_UINT32 level_count; /* count of each time thermal throttling entered this state */
  33281. A_UINT32 dc_count; /* total number of duty cycles spent in this state. */
  33282. /* this number increments by one each time we are in this state and we finish one full duty cycle. */
  33283. } wmi_therm_throt_level_stats_info;
  33284. typedef struct {
  33285. /** TLV tag and len; tag equals
  33286. * WMITLV_TAG_STRUC_wmi_thermal_throt_temp_range_stats
  33287. */
  33288. A_UINT32 tlv_header;
  33289. /**
  33290. * Temperature range to capture thermal stats between start to end
  33291. * temperature level.
  33292. */
  33293. A_UINT32 start_temp_level; /* unit in degC */
  33294. A_UINT32 end_temp_level; /* unit in degC */
  33295. /** Total time spent on each thermal stats level, units are milliseconds. */
  33296. A_UINT32 total_time_ms_lo;
  33297. A_UINT32 total_time_ms_hi;
  33298. /**
  33299. * Thermal stats counter for every time thermal stats level enters
  33300. * this temperature range.
  33301. */
  33302. A_UINT32 num_entry;
  33303. } wmi_thermal_throt_temp_range_stats;
  33304. typedef enum {
  33305. WMI_REG_EXT_FCC_MIDBAND = 0,
  33306. WMI_REG_EXT_JAPAN_MIDBAND = 1,
  33307. WMI_REG_EXT_FCC_DFS_HT40 = 2,
  33308. WMI_REG_EXT_JAPAN_NONDFS_HT40 = 3,
  33309. WMI_REG_EXT_JAPAN_DFS_HT40 = 4,
  33310. WMI_REG_EXT_FCC_CH_144 = 5,
  33311. } WMI_REG_EXT_BITMAP;
  33312. #ifdef WMI_CMD_STRINGS
  33313. static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
  33314. {
  33315. switch (wmi_command) {
  33316. /* initialize the wlan sub system */
  33317. WMI_RETURN_STRING(WMI_INIT_CMDID);
  33318. /* Scan specific commands */
  33319. /* start scan request to FW */
  33320. WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
  33321. /* stop scan request to FW */
  33322. WMI_RETURN_STRING(WMI_STOP_SCAN_CMDID);
  33323. /* full list of channels as defined by the regulatory
  33324. * that will be used by scanner */
  33325. WMI_RETURN_STRING(WMI_SCAN_CHAN_LIST_CMDID);
  33326. /* overwrite default priority table in scan scheduler */
  33327. WMI_RETURN_STRING(WMI_SCAN_SCH_PRIO_TBL_CMDID);
  33328. /* This command to adjust the priority and min.max_rest_time
  33329. * of an on ongoing scan request.
  33330. */
  33331. WMI_RETURN_STRING(WMI_SCAN_UPDATE_REQUEST_CMDID);
  33332. /* PDEV(physical device) specific commands */
  33333. /* set regulatorty ctl id used by FW to determine the exact
  33334. * ctl power limits */
  33335. WMI_RETURN_STRING(WMI_PDEV_SET_REGDOMAIN_CMDID);
  33336. /* set channel. mainly used for supporting monitor mode */
  33337. WMI_RETURN_STRING(WMI_PDEV_SET_CHANNEL_CMDID);
  33338. /* set pdev specific parameters */
  33339. WMI_RETURN_STRING(WMI_PDEV_SET_PARAM_CMDID);
  33340. /* enable packet log */
  33341. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_ENABLE_CMDID);
  33342. /* disable packet log*/
  33343. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_DISABLE_CMDID);
  33344. /* set wmm parameters */
  33345. WMI_RETURN_STRING(WMI_PDEV_SET_WMM_PARAMS_CMDID);
  33346. /* set HT cap ie that needs to be carried probe requests
  33347. * HT/VHT channels */
  33348. WMI_RETURN_STRING(WMI_PDEV_SET_HT_CAP_IE_CMDID);
  33349. /* set VHT cap ie that needs to be carried on probe
  33350. * requests on VHT channels */
  33351. WMI_RETURN_STRING(WMI_PDEV_SET_VHT_CAP_IE_CMDID);
  33352. /* Command to send the DSCP-to-TID map to the target */
  33353. WMI_RETURN_STRING(WMI_PDEV_SET_DSCP_TID_MAP_CMDID);
  33354. /* set quiet ie parameters. primarily used in AP mode */
  33355. WMI_RETURN_STRING(WMI_PDEV_SET_QUIET_MODE_CMDID);
  33356. /* Enable/Disable Green AP Power Save */
  33357. WMI_RETURN_STRING(WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID);
  33358. /* get TPC config for the current operating channel */
  33359. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CONFIG_CMDID);
  33360. /* set the base MAC address for the physical device before
  33361. * a VDEV is created. For firmware that does not support
  33362. * this feature and this command, the pdev MAC address will
  33363. * not be changed. */
  33364. WMI_RETURN_STRING(WMI_PDEV_SET_BASE_MACADDR_CMDID);
  33365. /* eeprom content dump , the same to bdboard data */
  33366. WMI_RETURN_STRING(WMI_PDEV_DUMP_CMDID);
  33367. /* VDEV(virtual device) specific commands */
  33368. /* vdev create */
  33369. WMI_RETURN_STRING(WMI_VDEV_CREATE_CMDID);
  33370. /* vdev delete */
  33371. WMI_RETURN_STRING(WMI_VDEV_DELETE_CMDID);
  33372. /* vdev start request */
  33373. WMI_RETURN_STRING(WMI_VDEV_START_REQUEST_CMDID);
  33374. /* vdev restart request (RX only, NO TX, used for CAC period)*/
  33375. WMI_RETURN_STRING(WMI_VDEV_RESTART_REQUEST_CMDID);
  33376. /* vdev up request */
  33377. WMI_RETURN_STRING(WMI_VDEV_UP_CMDID);
  33378. /* vdev stop request */
  33379. WMI_RETURN_STRING(WMI_VDEV_STOP_CMDID);
  33380. /* vdev down request */
  33381. WMI_RETURN_STRING(WMI_VDEV_DOWN_CMDID);
  33382. /* set a vdev param */
  33383. WMI_RETURN_STRING(WMI_VDEV_SET_PARAM_CMDID);
  33384. /* set a key (used for setting per peer unicast
  33385. * and per vdev multicast) */
  33386. WMI_RETURN_STRING(WMI_VDEV_INSTALL_KEY_CMDID);
  33387. /* Set bss max idle time */
  33388. WMI_RETURN_STRING(WMI_VDEV_BSS_MAX_IDLE_TIME_CMDID);
  33389. /* wnm sleep mode command */
  33390. WMI_RETURN_STRING(WMI_VDEV_WNM_SLEEPMODE_CMDID);
  33391. WMI_RETURN_STRING(WMI_VDEV_WMM_ADDTS_CMDID);
  33392. WMI_RETURN_STRING(WMI_VDEV_WMM_DELTS_CMDID);
  33393. WMI_RETURN_STRING(WMI_VDEV_SET_WMM_PARAMS_CMDID);
  33394. WMI_RETURN_STRING(WMI_VDEV_SET_GTX_PARAMS_CMDID);
  33395. WMI_RETURN_STRING(WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID);
  33396. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_START_CMDID);
  33397. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_STOP_CMDID);
  33398. WMI_RETURN_STRING(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
  33399. WMI_RETURN_STRING(WMI_VDEV_SET_IE_CMDID);
  33400. WMI_RETURN_STRING(WMI_VDEV_REPORT_AP_OPER_BW_CMDID);
  33401. /* peer specific commands */
  33402. /** create a peer */
  33403. WMI_RETURN_STRING(WMI_PEER_CREATE_CMDID);
  33404. /** delete a peer */
  33405. WMI_RETURN_STRING(WMI_PEER_DELETE_CMDID);
  33406. /** delete all peer (excluding bss peer) */
  33407. WMI_RETURN_STRING(WMI_VDEV_DELETE_ALL_PEER_CMDID);
  33408. /** flush specific tid queues of a peer */
  33409. WMI_RETURN_STRING(WMI_PEER_FLUSH_TIDS_CMDID);
  33410. /** set a parameter of a peer */
  33411. WMI_RETURN_STRING(WMI_PEER_SET_PARAM_CMDID);
  33412. /* set peer to associated state. will cary all parameters
  33413. * determined during assocication time */
  33414. WMI_RETURN_STRING(WMI_PEER_ASSOC_CMDID);
  33415. /* add a wds (4 address ) entry. used only for testing
  33416. * WDS feature on AP products */
  33417. WMI_RETURN_STRING(WMI_PEER_ADD_WDS_ENTRY_CMDID);
  33418. /* remove wds (4 address ) entry. used only for testing WDS
  33419. * feature on AP products */
  33420. WMI_RETURN_STRING(WMI_PEER_REMOVE_WDS_ENTRY_CMDID);
  33421. /* set up mcast info for multicast to unicast conversion */
  33422. WMI_RETURN_STRING(WMI_PEER_MCAST_GROUP_CMDID);
  33423. /* request peer info from FW to get PEER_INFO_EVENTID */
  33424. WMI_RETURN_STRING(WMI_PEER_INFO_REQ_CMDID);
  33425. /* unmap response for a peer */
  33426. WMI_RETURN_STRING(WMI_PEER_UNMAP_RESPONSE_CMDID);
  33427. /* beacon/management specific commands */
  33428. /* transmit beacon by reference. used for transmitting beacon
  33429. * on low latency interface like pcie */
  33430. WMI_RETURN_STRING(WMI_BCN_TX_CMDID);
  33431. /* transmit beacon by value */
  33432. WMI_RETURN_STRING(WMI_PDEV_SEND_BCN_CMDID);
  33433. /* set the beacon template. used in beacon offload mode to setup
  33434. * the common beacon template with the FW to be used by FW to
  33435. * generate beacons */
  33436. WMI_RETURN_STRING(WMI_BCN_TMPL_CMDID);
  33437. /* set beacon filter with FW */
  33438. WMI_RETURN_STRING(WMI_BCN_FILTER_RX_CMDID);
  33439. /* enable/disable filtering of probe requests in the firmware */
  33440. WMI_RETURN_STRING(WMI_PRB_REQ_FILTER_RX_CMDID);
  33441. /* transmit management frame by value. will be deprecated */
  33442. WMI_RETURN_STRING(WMI_MGMT_TX_CMDID);
  33443. /* set the probe response template. used in beacon offload mode
  33444. * to setup the common probe response template with the FW to
  33445. * be used by FW to generate probe responses */
  33446. WMI_RETURN_STRING(WMI_PRB_TMPL_CMDID);
  33447. /** set FILS Discovery frame template for FW to generate FD frames */
  33448. WMI_RETURN_STRING(WMI_FD_TMPL_CMDID);
  33449. /* commands to directly control ba negotiation directly from
  33450. * host. only used in test mode */
  33451. /* turn off FW Auto addba mode and let host control addba */
  33452. WMI_RETURN_STRING(WMI_ADDBA_CLEAR_RESP_CMDID);
  33453. /* send add ba request */
  33454. WMI_RETURN_STRING(WMI_ADDBA_SEND_CMDID);
  33455. WMI_RETURN_STRING(WMI_ADDBA_STATUS_CMDID);
  33456. /* send del ba */
  33457. WMI_RETURN_STRING(WMI_DELBA_SEND_CMDID);
  33458. /* set add ba response will be used by FW to generate
  33459. * addba response*/
  33460. WMI_RETURN_STRING(WMI_ADDBA_SET_RESP_CMDID);
  33461. /* send single VHT MPDU with AMSDU */
  33462. WMI_RETURN_STRING(WMI_SEND_SINGLEAMSDU_CMDID);
  33463. /* Station power save specific config */
  33464. /* enable/disable station powersave */
  33465. WMI_RETURN_STRING(WMI_STA_POWERSAVE_MODE_CMDID);
  33466. /* set station power save specific parameter */
  33467. WMI_RETURN_STRING(WMI_STA_POWERSAVE_PARAM_CMDID);
  33468. /* set station mimo powersave mode */
  33469. WMI_RETURN_STRING(WMI_STA_MIMO_PS_MODE_CMDID);
  33470. /* DFS-specific commands */
  33471. /* enable DFS (radar detection)*/
  33472. WMI_RETURN_STRING(WMI_PDEV_DFS_ENABLE_CMDID);
  33473. /* disable DFS (radar detection)*/
  33474. WMI_RETURN_STRING(WMI_PDEV_DFS_DISABLE_CMDID);
  33475. /* enable DFS phyerr/parse filter offload */
  33476. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_ENA_CMDID);
  33477. /* enable DFS phyerr/parse filter offload */
  33478. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_DIS_CMDID);
  33479. /* Roaming specific commands */
  33480. /* set roam scan mode */
  33481. WMI_RETURN_STRING(WMI_ROAM_SCAN_MODE);
  33482. /* set roam scan RSSI threshold below which roam
  33483. * scan is enabled */
  33484. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_THRESHOLD);
  33485. /* set roam scan period for periodic roam scan mode */
  33486. WMI_RETURN_STRING(WMI_ROAM_SCAN_PERIOD);
  33487. /* set roam scan trigger RSSI change threshold */
  33488. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
  33489. /* set roam AP profile */
  33490. WMI_RETURN_STRING(WMI_ROAM_AP_PROFILE);
  33491. /* set channel list for roam scans */
  33492. WMI_RETURN_STRING(WMI_ROAM_CHAN_LIST);
  33493. /* offload scan specific commands */
  33494. /* set offload scan AP profile */
  33495. WMI_RETURN_STRING(WMI_OFL_SCAN_ADD_AP_PROFILE);
  33496. /* remove offload scan AP profile */
  33497. WMI_RETURN_STRING(WMI_OFL_SCAN_REMOVE_AP_PROFILE);
  33498. /* set offload scan period */
  33499. WMI_RETURN_STRING(WMI_OFL_SCAN_PERIOD);
  33500. /* P2P specific commands */
  33501. /* set P2P device info. FW will used by FW to create P2P IE
  33502. * to be carried in probe response generated during p2p listen
  33503. * and for p2p discoverability */
  33504. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DEVICE_INFO);
  33505. /* enable/disable p2p discoverability on STA/AP VDEVs */
  33506. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DISCOVERABILITY);
  33507. /* set p2p ie to be carried in beacons generated by FW for GO */
  33508. WMI_RETURN_STRING(WMI_P2P_GO_SET_BEACON_IE);
  33509. /* set p2p ie to be carried in probe response frames generated
  33510. * by FW for GO */
  33511. WMI_RETURN_STRING(WMI_P2P_GO_SET_PROBE_RESP_IE);
  33512. /* set the vendor specific p2p ie data.
  33513. * FW will use this to parse the P2P NoA
  33514. * attribute in the beacons/probe responses received.
  33515. */
  33516. WMI_RETURN_STRING(WMI_P2P_SET_VENDOR_IE_DATA_CMDID);
  33517. /* set the configure of p2p find offload */
  33518. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID);
  33519. /* set the vendor specific p2p ie data for p2p find offload */
  33520. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_APPIE_CMDID);
  33521. /* set the BSSID/device name pattern of p2p find offload */
  33522. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID);
  33523. /* set OppPS related parameters **/
  33524. WMI_RETURN_STRING(WMI_P2P_SET_OPPPS_PARAM_CMDID);
  33525. /* AP power save specific config
  33526. * set AP power save specific param */
  33527. WMI_RETURN_STRING(WMI_AP_PS_PEER_PARAM_CMDID);
  33528. /* set AP UAPSD coex specific param */
  33529. WMI_RETURN_STRING(WMI_AP_PS_PEER_UAPSD_COEX_CMDID);
  33530. /* Rate-control specific commands */
  33531. WMI_RETURN_STRING(WMI_PEER_RATE_RETRY_SCHED_CMDID);
  33532. /* WLAN Profiling commands. */
  33533. WMI_RETURN_STRING(WMI_WLAN_PROFILE_TRIGGER_CMDID);
  33534. WMI_RETURN_STRING(WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID);
  33535. WMI_RETURN_STRING(WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID);
  33536. WMI_RETURN_STRING(WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID);
  33537. WMI_RETURN_STRING(WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID);
  33538. /* Suspend resume command Ids */
  33539. WMI_RETURN_STRING(WMI_PDEV_SUSPEND_CMDID);
  33540. WMI_RETURN_STRING(WMI_PDEV_RESUME_CMDID);
  33541. /* Beacon filter commands */
  33542. /* add a beacon filter */
  33543. WMI_RETURN_STRING(WMI_ADD_BCN_FILTER_CMDID);
  33544. /* remove a beacon filter */
  33545. WMI_RETURN_STRING(WMI_RMV_BCN_FILTER_CMDID);
  33546. /* WOW Specific WMI commands */
  33547. /* add pattern for awake */
  33548. WMI_RETURN_STRING(WMI_WOW_ADD_WAKE_PATTERN_CMDID);
  33549. /* deleta a wake pattern */
  33550. WMI_RETURN_STRING(WMI_WOW_DEL_WAKE_PATTERN_CMDID);
  33551. /* enable/deisable wake event */
  33552. WMI_RETURN_STRING(WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID);
  33553. /* enable WOW */
  33554. WMI_RETURN_STRING(WMI_WOW_ENABLE_CMDID);
  33555. /* host woke up from sleep event to FW. Generated in response
  33556. * to WOW Hardware event */
  33557. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
  33558. /* RTT measurement related cmd */
  33559. /* request to make an RTT measurement */
  33560. WMI_RETURN_STRING(WMI_RTT_MEASREQ_CMDID);
  33561. /* request to report a tsf measurement */
  33562. WMI_RETURN_STRING(WMI_RTT_TSF_CMDID);
  33563. /* spectral scan command */
  33564. /* configure spectral scan */
  33565. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID);
  33566. /* enable/disable spectral scan and trigger */
  33567. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
  33568. /* F/W stats */
  33569. /* one time request for stats */
  33570. WMI_RETURN_STRING(WMI_REQUEST_STATS_CMDID);
  33571. /* Push MCC Adaptive Scheduler Stats to Firmware */
  33572. WMI_RETURN_STRING(WMI_MCC_SCHED_TRAFFIC_STATS_CMDID);
  33573. /* ARP OFFLOAD REQUEST*/
  33574. WMI_RETURN_STRING(WMI_SET_ARP_NS_OFFLOAD_CMDID);
  33575. /* Proactive ARP Response Add Pattern Command*/
  33576. WMI_RETURN_STRING(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  33577. /* Proactive ARP Response Del Pattern Command*/
  33578. WMI_RETURN_STRING(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  33579. /* NS offload confid*/
  33580. WMI_RETURN_STRING(WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID);
  33581. /* GTK offload Specific WMI commands */
  33582. WMI_RETURN_STRING(WMI_GTK_OFFLOAD_CMDID);
  33583. /* CSA offload Specific WMI commands */
  33584. /* csa offload enable */
  33585. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_ENABLE_CMDID);
  33586. /* chan switch command */
  33587. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_CHANSWITCH_CMDID);
  33588. /* Chatter commands */
  33589. /* Change chatter mode of operation */
  33590. WMI_RETURN_STRING(WMI_CHATTER_SET_MODE_CMDID);
  33591. /* chatter add coalescing filter command */
  33592. WMI_RETURN_STRING(WMI_CHATTER_ADD_COALESCING_FILTER_CMDID);
  33593. /* chatter delete coalescing filter command */
  33594. WMI_RETURN_STRING(WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID);
  33595. /* chatter coalecing query command */
  33596. WMI_RETURN_STRING(WMI_CHATTER_COALESCING_QUERY_CMDID);
  33597. /* addba specific commands */
  33598. /* start the aggregation on this TID */
  33599. WMI_RETURN_STRING(WMI_PEER_TID_ADDBA_CMDID);
  33600. /* stop the aggregation on this TID */
  33601. WMI_RETURN_STRING(WMI_PEER_TID_DELBA_CMDID);
  33602. /* set station mimo powersave method */
  33603. WMI_RETURN_STRING(WMI_STA_DTIM_PS_METHOD_CMDID);
  33604. /* Configure the Station UAPSD AC Auto Trigger Parameters */
  33605. WMI_RETURN_STRING(WMI_STA_UAPSD_AUTO_TRIG_CMDID);
  33606. /* Configure the Keep Alive Parameters */
  33607. WMI_RETURN_STRING(WMI_STA_KEEPALIVE_CMDID);
  33608. /* Request ssn from target for a sta/tid pair */
  33609. WMI_RETURN_STRING(WMI_BA_REQ_SSN_CMDID);
  33610. /* misc command group */
  33611. /* echo command mainly used for testing */
  33612. WMI_RETURN_STRING(WMI_ECHO_CMDID);
  33613. /* !!IMPORTANT!!
  33614. * If you need to add a new WMI command to the
  33615. * WMI_RETURN_STRING(WMI_GRP_MISC) sub-group,
  33616. * please make sure you add it BEHIND
  33617. * WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  33618. * as we MUST have a fixed value here to maintain compatibility between
  33619. * UTF and the ART2 driver
  33620. */
  33621. /* UTF WMI commands */
  33622. WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  33623. /* set debug log config */
  33624. WMI_RETURN_STRING(WMI_DBGLOG_CFG_CMDID);
  33625. /* QVIT specific command id */
  33626. WMI_RETURN_STRING(WMI_PDEV_QVIT_CMDID);
  33627. /* Factory Testing Mode request command
  33628. * used for integrated chipsets */
  33629. WMI_RETURN_STRING(WMI_PDEV_FTM_INTG_CMDID);
  33630. /* set and get keepalive parameters command */
  33631. WMI_RETURN_STRING(WMI_VDEV_SET_KEEPALIVE_CMDID);
  33632. WMI_RETURN_STRING(WMI_VDEV_GET_KEEPALIVE_CMDID);
  33633. /* For fw recovery test command */
  33634. WMI_RETURN_STRING(WMI_FORCE_FW_HANG_CMDID);
  33635. /* Set Mcast/Bdcast filter */
  33636. WMI_RETURN_STRING(WMI_SET_MCASTBCAST_FILTER_CMDID);
  33637. /* set thermal management params */
  33638. WMI_RETURN_STRING(WMI_THERMAL_MGMT_CMDID);
  33639. WMI_RETURN_STRING(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
  33640. WMI_RETURN_STRING(WMI_LRO_CONFIG_CMDID);
  33641. WMI_RETURN_STRING(WMI_TRANSFER_DATA_TO_FLASH_CMDID);
  33642. WMI_RETURN_STRING(WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID);
  33643. WMI_RETURN_STRING(WMI_VDEV_WISA_CMDID);
  33644. WMI_RETURN_STRING(WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID);
  33645. WMI_RETURN_STRING(WMI_WOW_SET_ACTION_WAKE_UP_CMDID);
  33646. WMI_RETURN_STRING(WMI_MAWC_SENSOR_REPORT_IND_CMDID);
  33647. WMI_RETURN_STRING(WMI_ROAM_CONFIGURE_MAWC_CMDID);
  33648. WMI_RETURN_STRING(WMI_NLO_CONFIGURE_MAWC_CMDID);
  33649. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_MAWC_CMDID);
  33650. /* GPIO Configuration */
  33651. WMI_RETURN_STRING(WMI_GPIO_CONFIG_CMDID);
  33652. WMI_RETURN_STRING(WMI_GPIO_OUTPUT_CMDID);
  33653. /* Txbf configuration command */
  33654. WMI_RETURN_STRING(WMI_TXBF_CMDID);
  33655. /* FWTEST Commands */
  33656. WMI_RETURN_STRING(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
  33657. /* set NoA descs */
  33658. WMI_RETURN_STRING(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
  33659. /* TDLS Configuration */
  33660. /* enable/disable TDLS */
  33661. WMI_RETURN_STRING(WMI_TDLS_SET_STATE_CMDID);
  33662. /* set tdls peer state */
  33663. WMI_RETURN_STRING(WMI_TDLS_PEER_UPDATE_CMDID);
  33664. /* Resmgr Configuration */
  33665. /* Adaptive OCS is enabled by default in the FW.
  33666. * This command is used to disable FW based adaptive OCS.
  33667. */
  33668. WMI_RETURN_STRING
  33669. (WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
  33670. /* set the requested channel time quota for the home channels */
  33671. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
  33672. /* set the requested latency for the home channels */
  33673. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
  33674. /* STA SMPS Configuration */
  33675. /* force SMPS mode */
  33676. WMI_RETURN_STRING(WMI_STA_SMPS_FORCE_MODE_CMDID);
  33677. /* set SMPS parameters */
  33678. WMI_RETURN_STRING(WMI_STA_SMPS_PARAM_CMDID);
  33679. /* Wlan HB commands */
  33680. /* enable/disable wlan HB */
  33681. WMI_RETURN_STRING(WMI_HB_SET_ENABLE_CMDID);
  33682. /* set tcp parameters for wlan HB */
  33683. WMI_RETURN_STRING(WMI_HB_SET_TCP_PARAMS_CMDID);
  33684. /* set tcp pkt filter for wlan HB */
  33685. WMI_RETURN_STRING(WMI_HB_SET_TCP_PKT_FILTER_CMDID);
  33686. /* set udp parameters for wlan HB */
  33687. WMI_RETURN_STRING(WMI_HB_SET_UDP_PARAMS_CMDID);
  33688. /* set udp pkt filter for wlan HB */
  33689. WMI_RETURN_STRING(WMI_HB_SET_UDP_PKT_FILTER_CMDID);
  33690. /* Wlan RMC commands*/
  33691. /* enable/disable RMC */
  33692. WMI_RETURN_STRING(WMI_RMC_SET_MODE_CMDID);
  33693. /* configure action frame period */
  33694. WMI_RETURN_STRING(WMI_RMC_SET_ACTION_PERIOD_CMDID);
  33695. /* For debug/future enhancement purposes only,
  33696. * configures/finetunes RMC algorithms */
  33697. WMI_RETURN_STRING(WMI_RMC_CONFIG_CMDID);
  33698. /* WLAN MHF offload commands */
  33699. /* enable/disable MHF offload */
  33700. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_SET_MODE_CMDID);
  33701. /* Plumb routing table for MHF offload */
  33702. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID);
  33703. /* location scan commands */
  33704. /* start batch scan */
  33705. WMI_RETURN_STRING(WMI_BATCH_SCAN_ENABLE_CMDID);
  33706. /* stop batch scan */
  33707. WMI_RETURN_STRING(WMI_BATCH_SCAN_DISABLE_CMDID);
  33708. /* get batch scan result */
  33709. WMI_RETURN_STRING(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID);
  33710. /* OEM related cmd */
  33711. WMI_RETURN_STRING(WMI_OEM_REQ_CMDID);
  33712. WMI_RETURN_STRING(WMI_OEM_REQUEST_CMDID);
  33713. /* NAN request cmd */
  33714. WMI_RETURN_STRING(WMI_NAN_CMDID);
  33715. /* Modem power state cmd */
  33716. WMI_RETURN_STRING(WMI_MODEM_POWER_STATE_CMDID);
  33717. WMI_RETURN_STRING(WMI_REQUEST_STATS_EXT_CMDID);
  33718. WMI_RETURN_STRING(WMI_OBSS_SCAN_ENABLE_CMDID);
  33719. WMI_RETURN_STRING(WMI_OBSS_SCAN_DISABLE_CMDID);
  33720. WMI_RETURN_STRING(WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID);
  33721. WMI_RETURN_STRING(WMI_ROAM_SCAN_CMD);
  33722. WMI_RETURN_STRING(WMI_PDEV_SET_LED_CONFIG_CMDID);
  33723. WMI_RETURN_STRING(WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID);
  33724. WMI_RETURN_STRING(WMI_CHAN_AVOID_UPDATE_CMDID);
  33725. WMI_RETURN_STRING(WMI_COEX_CONFIG_CMDID);
  33726. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID);
  33727. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID);
  33728. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID);
  33729. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID);
  33730. WMI_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID);
  33731. WMI_RETURN_STRING(WMI_START_LINK_STATS_CMDID);
  33732. WMI_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID);
  33733. WMI_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID);
  33734. WMI_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID);
  33735. WMI_RETURN_STRING(WMI_LPI_START_SCAN_CMDID);
  33736. WMI_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID);
  33737. WMI_RETURN_STRING(WMI_EXTSCAN_START_CMDID);
  33738. WMI_RETURN_STRING(WMI_EXTSCAN_STOP_CMDID);
  33739. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID);
  33740. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID);
  33741. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID);
  33742. WMI_RETURN_STRING(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID);
  33743. WMI_RETURN_STRING(WMI_EXTSCAN_SET_CAPABILITIES_CMDID);
  33744. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CAPABILITIES_CMDID);
  33745. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID);
  33746. WMI_RETURN_STRING(WMI_ROAM_SYNCH_COMPLETE);
  33747. WMI_RETURN_STRING(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
  33748. WMI_RETURN_STRING(WMI_EXTWOW_ENABLE_CMDID);
  33749. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
  33750. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
  33751. WMI_RETURN_STRING(WMI_UNIT_TEST_CMDID);
  33752. WMI_RETURN_STRING(WMI_ROAM_SET_RIC_REQUEST_CMDID);
  33753. WMI_RETURN_STRING(WMI_PDEV_GET_TEMPERATURE_CMDID);
  33754. WMI_RETURN_STRING(WMI_SET_DHCP_SERVER_OFFLOAD_CMDID);
  33755. WMI_RETURN_STRING(WMI_TPC_CHAINMASK_CONFIG_CMDID);
  33756. WMI_RETURN_STRING(WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID);
  33757. WMI_RETURN_STRING(WMI_SCAN_PROB_REQ_OUI_CMDID);
  33758. WMI_RETURN_STRING(WMI_TDLS_SET_OFFCHAN_MODE_CMDID);
  33759. WMI_RETURN_STRING(WMI_PDEV_SET_LED_FLASHING_CMDID);
  33760. WMI_RETURN_STRING(WMI_MDNS_OFFLOAD_ENABLE_CMDID);
  33761. WMI_RETURN_STRING(WMI_MDNS_SET_FQDN_CMDID);
  33762. WMI_RETURN_STRING(WMI_MDNS_SET_RESPONSE_CMDID);
  33763. WMI_RETURN_STRING(WMI_MDNS_GET_STATS_CMDID);
  33764. WMI_RETURN_STRING(WMI_MDNS_SET_STAIP_CMDID);
  33765. WMI_RETURN_STRING(WMI_ROAM_INVOKE_CMDID);
  33766. WMI_RETURN_STRING(WMI_SET_ANTENNA_DIVERSITY_CMDID);
  33767. WMI_RETURN_STRING(WMI_SAP_OFL_ENABLE_CMDID);
  33768. WMI_RETURN_STRING(WMI_APFIND_CMDID);
  33769. WMI_RETURN_STRING(WMI_PASSPOINT_LIST_CONFIG_CMDID);
  33770. WMI_RETURN_STRING(WMI_OCB_SET_SCHED_CMDID);
  33771. WMI_RETURN_STRING(WMI_OCB_SET_CONFIG_CMDID);
  33772. WMI_RETURN_STRING(WMI_OCB_SET_UTC_TIME_CMDID);
  33773. WMI_RETURN_STRING(WMI_OCB_START_TIMING_ADVERT_CMDID);
  33774. WMI_RETURN_STRING(WMI_OCB_STOP_TIMING_ADVERT_CMDID);
  33775. WMI_RETURN_STRING(WMI_OCB_GET_TSF_TIMER_CMDID);
  33776. WMI_RETURN_STRING(WMI_DCC_GET_STATS_CMDID);
  33777. WMI_RETURN_STRING(WMI_DCC_CLEAR_STATS_CMDID);
  33778. WMI_RETURN_STRING(WMI_DCC_UPDATE_NDL_CMDID);
  33779. WMI_RETURN_STRING(WMI_ROAM_FILTER_CMDID);
  33780. WMI_RETURN_STRING(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
  33781. WMI_RETURN_STRING(WMI_DEBUG_MESG_FLUSH_CMDID);
  33782. WMI_RETURN_STRING(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
  33783. WMI_RETURN_STRING(WMI_SOC_SET_PCL_CMDID);
  33784. WMI_RETURN_STRING(WMI_SOC_SET_HW_MODE_CMDID);
  33785. WMI_RETURN_STRING(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID);
  33786. WMI_RETURN_STRING(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID);
  33787. WMI_RETURN_STRING(WMI_DIAG_EVENT_LOG_CONFIG_CMDID);
  33788. WMI_RETURN_STRING(WMI_PACKET_FILTER_CONFIG_CMDID);
  33789. WMI_RETURN_STRING(WMI_PACKET_FILTER_ENABLE_CMDID);
  33790. WMI_RETURN_STRING(WMI_SAP_SET_BLACKLIST_PARAM_CMDID);
  33791. WMI_RETURN_STRING(WMI_WOW_UDP_SVC_OFLD_CMDID);
  33792. WMI_RETURN_STRING(WMI_MGMT_TX_SEND_CMDID);
  33793. WMI_RETURN_STRING(WMI_SOC_SET_ANTENNA_MODE_CMDID);
  33794. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID);
  33795. WMI_RETURN_STRING(WMI_AP_PS_EGAP_PARAM_CMDID);
  33796. WMI_RETURN_STRING(WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID);
  33797. WMI_RETURN_STRING(WMI_BPF_GET_CAPABILITY_CMDID);
  33798. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_STATS_CMDID);
  33799. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID);
  33800. WMI_RETURN_STRING(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID);
  33801. WMI_RETURN_STRING(WMI_NDI_GET_CAP_REQ_CMDID);
  33802. WMI_RETURN_STRING(WMI_NDP_INITIATOR_REQ_CMDID);
  33803. WMI_RETURN_STRING(WMI_NDP_RESPONDER_REQ_CMDID);
  33804. WMI_RETURN_STRING(WMI_NDP_END_REQ_CMDID);
  33805. WMI_RETURN_STRING(WMI_PEER_UPDATE_WDS_ENTRY_CMDID);
  33806. WMI_RETURN_STRING(WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID);
  33807. WMI_RETURN_STRING(WMI_PDEV_FIPS_CMDID);
  33808. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_ENABLE_CMDID);
  33809. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID);
  33810. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID);
  33811. WMI_RETURN_STRING(WMI_PDEV_SET_CTL_TABLE_CMDID);
  33812. WMI_RETURN_STRING(WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID);
  33813. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CMDID);
  33814. WMI_RETURN_STRING(WMI_MIB_STATS_ENABLE_CMDID);
  33815. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID);
  33816. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID);
  33817. WMI_RETURN_STRING(WMI_VDEV_RATEMASK_CMDID);
  33818. WMI_RETURN_STRING(WMI_VDEV_ATF_REQUEST_CMDID);
  33819. WMI_RETURN_STRING(WMI_VDEV_SET_DSCP_TID_MAP_CMDID);
  33820. WMI_RETURN_STRING(WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID);
  33821. WMI_RETURN_STRING(WMI_VDEV_SET_QUIET_MODE_CMDID);
  33822. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID);
  33823. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID);
  33824. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID);
  33825. WMI_RETURN_STRING(WMI_PEER_ATF_REQUEST_CMDID);
  33826. WMI_RETURN_STRING(WMI_FWTEST_CMDID);
  33827. WMI_RETURN_STRING(WMI_QBOOST_CFG_CMDID);
  33828. WMI_RETURN_STRING(WMI_PDEV_GET_NFCAL_POWER_CMDID);
  33829. WMI_RETURN_STRING(WMI_PDEV_SET_PCL_CMDID);
  33830. WMI_RETURN_STRING(WMI_PDEV_SET_HW_MODE_CMDID);
  33831. WMI_RETURN_STRING(WMI_PDEV_SET_MAC_CONFIG_CMDID);
  33832. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_MODE_CMDID);
  33833. WMI_RETURN_STRING(WMI_ROAM_SET_MBO_PARAM_CMDID);
  33834. WMI_RETURN_STRING(WMI_CHAN_AVOID_RPT_ALLOW_CMDID);
  33835. WMI_RETURN_STRING(WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID);
  33836. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID);
  33837. WMI_RETURN_STRING(WMI_PDEV_WAL_POWER_DEBUG_CMDID);
  33838. WMI_RETURN_STRING(WMI_PEER_BWF_REQUEST_CMDID);
  33839. WMI_RETURN_STRING(WMI_DBGLOG_TIME_STAMP_SYNC_CMDID);
  33840. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_START_CMDID);
  33841. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID);
  33842. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_SETUP_CMDID);
  33843. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_REMOVE_CMDID);
  33844. WMI_RETURN_STRING(WMI_SET_MULTIPLE_MCAST_FILTER_CMDID);
  33845. WMI_RETURN_STRING(WMI_READ_DATA_FROM_FLASH_CMDID);
  33846. WMI_RETURN_STRING(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID);
  33847. WMI_RETURN_STRING(WMI_PEER_SET_RX_BLOCKSIZE_CMDID);
  33848. WMI_RETURN_STRING(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID);
  33849. WMI_RETURN_STRING(WMI_PDEV_GET_ANTDIV_STATUS_CMDID);
  33850. WMI_RETURN_STRING(WMI_PEER_ANTDIV_INFO_REQ_CMDID);
  33851. WMI_RETURN_STRING(WMI_MNT_FILTER_CMDID);
  33852. WMI_RETURN_STRING(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID);
  33853. WMI_RETURN_STRING(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID);
  33854. WMI_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID);
  33855. WMI_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID);
  33856. WMI_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
  33857. WMI_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID);
  33858. WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
  33859. WMI_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID);
  33860. WMI_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
  33861. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
  33862. WMI_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID);
  33863. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID);
  33864. WMI_RETURN_STRING(WMI_LPI_OEM_REQ_CMDID);
  33865. WMI_RETURN_STRING(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID);
  33866. WMI_RETURN_STRING(WMI_PDEV_CHECK_CAL_VERSION_CMDID);
  33867. WMI_RETURN_STRING(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID);
  33868. WMI_RETURN_STRING(WMI_VDEV_SET_ARP_STAT_CMDID);
  33869. WMI_RETURN_STRING(WMI_VDEV_GET_ARP_STAT_CMDID);
  33870. WMI_RETURN_STRING(WMI_VDEV_GET_TX_POWER_CMDID);
  33871. WMI_RETURN_STRING(WMI_OFFCHAN_DATA_TX_SEND_CMDID);
  33872. WMI_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID);
  33873. WMI_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID);
  33874. WMI_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID);
  33875. WMI_RETURN_STRING(WMI_OEM_DMA_RING_CFG_REQ_CMDID);
  33876. WMI_RETURN_STRING(WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID);
  33877. WMI_RETURN_STRING(WMI_VDEV_LIMIT_OFFCHAN_CMDID);
  33878. WMI_RETURN_STRING(WMI_ROAM_BTM_CONFIG_CMDID);
  33879. WMI_RETURN_STRING(WMI_WLM_CONFIG_CMDID);
  33880. WMI_RETURN_STRING(WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID);
  33881. WMI_RETURN_STRING(WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID);
  33882. WMI_RETURN_STRING(WMI_PDEV_SEND_FD_CMDID);
  33883. WMI_RETURN_STRING(WMI_ENABLE_FILS_CMDID);
  33884. WMI_RETURN_STRING(WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID);
  33885. WMI_RETURN_STRING(WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID);
  33886. WMI_RETURN_STRING(WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID);
  33887. WMI_RETURN_STRING(WMI_SAP_OBSS_DETECTION_CFG_CMDID);
  33888. WMI_RETURN_STRING(WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
  33889. WMI_RETURN_STRING(WMI_11K_OFFLOAD_REPORT_CMDID);
  33890. WMI_RETURN_STRING(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
  33891. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ENABLE_CMDID);
  33892. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID);
  33893. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID);
  33894. WMI_RETURN_STRING(WMI_BSS_COLOR_CHANGE_ENABLE_CMDID);
  33895. WMI_RETURN_STRING(WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID);
  33896. WMI_RETURN_STRING(WMI_RUNTIME_DPD_RECAL_CMDID);
  33897. WMI_RETURN_STRING(WMI_TWT_ENABLE_CMDID);
  33898. WMI_RETURN_STRING(WMI_TWT_DISABLE_CMDID);
  33899. WMI_RETURN_STRING(WMI_TWT_ADD_DIALOG_CMDID);
  33900. WMI_RETURN_STRING(WMI_TWT_DEL_DIALOG_CMDID);
  33901. WMI_RETURN_STRING(WMI_TWT_PAUSE_DIALOG_CMDID);
  33902. WMI_RETURN_STRING(WMI_TWT_RESUME_DIALOG_CMDID);
  33903. WMI_RETURN_STRING(WMI_TWT_VDEV_CONFIG_CMDID);
  33904. WMI_RETURN_STRING(WMI_REQUEST_ROAM_SCAN_STATS_CMDID);
  33905. WMI_RETURN_STRING(WMI_PEER_TID_CONFIGURATIONS_CMDID);
  33906. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID);
  33907. WMI_RETURN_STRING(WMI_GET_TPC_POWER_CMDID);
  33908. WMI_RETURN_STRING(WMI_MOTION_DET_CONFIG_PARAM_CMDID);
  33909. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID);
  33910. WMI_RETURN_STRING(WMI_MOTION_DET_START_STOP_CMDID);
  33911. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID);
  33912. WMI_RETURN_STRING(WMI_SAR_LIMITS_CMDID);
  33913. WMI_RETURN_STRING(WMI_SAR_GET_LIMITS_CMDID);
  33914. WMI_RETURN_STRING(WMI_PEER_CHAN_WIDTH_SWITCH_CMDID);
  33915. WMI_RETURN_STRING(WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID);
  33916. WMI_RETURN_STRING(WMI_PDEV_HE_TB_ACTION_FRM_CMDID);
  33917. WMI_RETURN_STRING(WMI_HPCS_PULSE_START_CMDID);
  33918. WMI_RETURN_STRING(WMI_VDEV_CHAINMASK_CONFIG_CMDID);
  33919. WMI_RETURN_STRING(WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID);
  33920. WMI_RETURN_STRING(WMI_NDP_CMDID);
  33921. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_FILTER_CMDID);
  33922. WMI_RETURN_STRING(WMI_SET_CURRENT_COUNTRY_CMDID);
  33923. WMI_RETURN_STRING(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID);
  33924. WMI_RETURN_STRING(WMI_PEER_TX_PN_REQUEST_CMDID);
  33925. WMI_RETURN_STRING(WMI_ROAM_BSS_LOAD_CONFIG_CMDID);
  33926. WMI_RETURN_STRING(WMI_VDEV_GET_MWS_COEX_INFO_CMDID);
  33927. WMI_RETURN_STRING(WMI_REQUEST_WLM_STATS_CMDID);
  33928. WMI_RETURN_STRING(WMI_PDEV_SET_RAP_CONFIG_CMDID);
  33929. WMI_RETURN_STRING(WMI_STA_TDCC_CONFIG_CMDID);
  33930. WMI_RETURN_STRING(WMI_ROAM_DEAUTH_CONFIG_CMDID);
  33931. WMI_RETURN_STRING(WMI_ROAM_IDLE_CONFIG_CMDID);
  33932. WMI_RETURN_STRING(WMI_IDLE_TRIGGER_MONITOR_CMDID);
  33933. WMI_RETURN_STRING(WMI_PDEV_DSM_FILTER_CMDID);
  33934. WMI_RETURN_STRING(WMI_TWT_BTWT_INVITE_STA_CMDID);
  33935. WMI_RETURN_STRING(WMI_TWT_BTWT_REMOVE_STA_CMDID);
  33936. WMI_RETURN_STRING(WMI_OEM_DATA_CMDID);
  33937. WMI_RETURN_STRING(WMI_ROAM_PREAUTH_STATUS_CMDID);
  33938. WMI_RETURN_STRING(WMI_SET_ELNA_BYPASS_CMDID);
  33939. WMI_RETURN_STRING(WMI_GET_ELNA_BYPASS_CMDID);
  33940. WMI_RETURN_STRING(WMI_AUDIO_AGGR_ENABLE_CMDID);
  33941. WMI_RETURN_STRING(WMI_AUDIO_AGGR_ADD_GROUP_CMDID);
  33942. WMI_RETURN_STRING(WMI_AUDIO_AGGR_DEL_GROUP_CMDID);
  33943. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID);
  33944. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID);
  33945. WMI_RETURN_STRING(WMI_AUDIO_AGGR_UPDATE_STA_GROUP_INFO_CMDID);
  33946. WMI_RETURN_STRING(WMI_CFR_CAPTURE_FILTER_CMDID);
  33947. WMI_RETURN_STRING(WMI_ATF_SSID_GROUPING_REQUEST_CMDID);
  33948. WMI_RETURN_STRING(WMI_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID);
  33949. WMI_RETURN_STRING(WMI_PEER_ATF_EXT_REQUEST_CMDID);
  33950. WMI_RETURN_STRING(WMI_GET_CHANNEL_ANI_CMDID);
  33951. WMI_RETURN_STRING(WMI_SET_OCL_CMDID);
  33952. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_AUTO_RATE_CMDID);
  33953. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_PROBE_CMDID);
  33954. WMI_RETURN_STRING(WMI_VDEV_AUDIO_SYNC_TRIGGER_CMDID);
  33955. WMI_RETURN_STRING(WMI_VDEV_AUDIO_SYNC_QTIMER_CMDID);
  33956. WMI_RETURN_STRING(WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID);
  33957. WMI_RETURN_STRING(WMI_VDEV_GET_BIG_DATA_CMDID);
  33958. WMI_RETURN_STRING(WMI_PDEV_FRAME_INJECT_CMDID);
  33959. WMI_RETURN_STRING(WMI_PDEV_TBTT_OFFSET_SYNC_CMDID);
  33960. WMI_RETURN_STRING(WMI_VDEV_GET_BIG_DATA_P2_CMDID);
  33961. WMI_RETURN_STRING(WMI_AUDIO_AGGR_GET_STATISTICS_CMDID);
  33962. WMI_RETURN_STRING(WMI_AUDIO_AGGR_RESET_STATISTICS_CMDID);
  33963. WMI_RETURN_STRING(WMI_ANT_CONTROLLER_CMDID);
  33964. WMI_RETURN_STRING(WMI_SIMULATION_TEST_CMDID);
  33965. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_RTSCTS_CONFIG_CMDID);
  33966. WMI_RETURN_STRING(WMI_REQUEST_CTRL_PATH_STATS_CMDID);
  33967. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_STATS_CMDID);
  33968. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_SCHED_METHOD_CMDID);
  33969. WMI_RETURN_STRING(WMI_AUDIO_AGGR_GET_SCHED_METHOD_CMDID);
  33970. WMI_RETURN_STRING(WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID);
  33971. WMI_RETURN_STRING(WMI_QOS_NULL_FRAME_TX_SEND_CMDID);
  33972. WMI_RETURN_STRING(WMI_PDEV_ENABLE_DURATION_BASED_TX_MODE_SELECTION_CMDID);
  33973. WMI_RETURN_STRING(WMI_TWT_NUDGE_DIALOG_CMDID);
  33974. WMI_RETURN_STRING(WMI_VDEV_SET_TPC_POWER_CMDID);
  33975. WMI_RETURN_STRING(WMI_VDEV_TID_LATENCY_CONFIG_CMDID);
  33976. WMI_RETURN_STRING(WMI_PEER_TID_LATENCY_CONFIG_CMDID);
  33977. WMI_RETURN_STRING(WMI_MLO_LINK_SET_ACTIVE_CMDID);
  33978. WMI_RETURN_STRING(WMI_PDEV_GET_DPD_STATUS_CMDID);
  33979. WMI_RETURN_STRING(WMI_MLO_SETUP_CMDID);
  33980. WMI_RETURN_STRING(WMI_MLO_READY_CMDID);
  33981. WMI_RETURN_STRING(WMI_MLO_TEARDOWN_CMDID);
  33982. WMI_RETURN_STRING(WMI_VDEV_IGMP_OFFLOAD_CMDID);
  33983. WMI_RETURN_STRING(WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID);
  33984. WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_SAR_TABLE_CMDID);
  33985. WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_GEO_TABLE_CMDID);
  33986. WMI_RETURN_STRING(WMI_PDEV_GET_HALPHY_CAL_STATUS_CMDID);
  33987. WMI_RETURN_STRING(WMI_PDEV_SET_HALPHY_CAL_BMAP_CMDID);
  33988. WMI_RETURN_STRING(WMI_AFC_CMDID);
  33989. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_SET_PARAM_CMDID);
  33990. WMI_RETURN_STRING(WMI_PDEV_MEC_AGING_TIMER_CONFIG_CMDID);
  33991. WMI_RETURN_STRING(WMI_PEER_CONFIG_PPE_DS_CMDID);
  33992. WMI_RETURN_STRING(WMI_VDEV_ENABLE_DISABLE_INTRA_BSS_CMDID);
  33993. WMI_RETURN_STRING(WMI_PEER_ENABLE_DISABLE_INTRA_BSS_CMDID);
  33994. WMI_RETURN_STRING(WMI_ROAM_MLO_CONFIG_CMDID);
  33995. WMI_RETURN_STRING(WMI_REQUEST_THERMAL_STATS_CMDID);
  33996. WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_INTERFACE_CMDID);
  33997. WMI_RETURN_STRING(WMI_VDEV_SET_MU_SNIF_CMDID);
  33998. WMI_RETURN_STRING(WMI_VDEV_ICMP_OFFLOAD_CMDID);
  33999. WMI_RETURN_STRING(WMI_ROAM_SET_PARAM_CMDID);
  34000. WMI_RETURN_STRING(WMI_PDEV_FIPS_EXTEND_CMDID);
  34001. WMI_RETURN_STRING(WMI_PDEV_FIPS_MODE_SET_CMDID);
  34002. WMI_RETURN_STRING(WMI_SAWF_SVC_CLASS_CFG_CMDID);
  34003. WMI_RETURN_STRING(WMI_SAWF_SVC_CLASS_DISABLE_CMDID);
  34004. WMI_RETURN_STRING(WMI_VDEV_UPDATE_MAC_ADDR_CMDID);
  34005. WMI_RETURN_STRING(WMI_SOC_TQM_RESET_ENABLE_DISABLE_CMDID);
  34006. WMI_RETURN_STRING(WMI_VDEV_MULTIPLE_PEER_GROUP_CMDID);
  34007. WMI_RETURN_STRING(WMI_VDEV_SET_LTF_KEY_SEED_CMDID);
  34008. WMI_RETURN_STRING(WMI_RTT_PASN_AUTH_STATUS_CMD);
  34009. WMI_RETURN_STRING(WMI_RTT_PASN_DEAUTH_CMD);
  34010. WMI_RETURN_STRING(WMI_VDEV_PN_MGMT_RX_FILTER_CMDID);
  34011. WMI_RETURN_STRING(WMI_PEER_RX_PN_REQUEST_CMDID);
  34012. WMI_RETURN_STRING(WMI_SET_MULTIPLE_PDEV_VDEV_PARAM_CMDID);
  34013. WMI_RETURN_STRING(WMI_PMM_SCRATCH_REG_ALLOCATION_CMDID);
  34014. WMI_RETURN_STRING(WMI_MLO_PEER_TID_TO_LINK_MAP_CMDID);
  34015. WMI_RETURN_STRING(WMI_ROAM_ENABLE_VENDOR_CONTROL_CMDID);
  34016. WMI_RETURN_STRING(WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID);
  34017. WMI_RETURN_STRING(WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID);
  34018. WMI_RETURN_STRING(WMI_PEER_FLUSH_POLICY_CMDID);
  34019. WMI_RETURN_STRING(WMI_WOW_COAP_ADD_PATTERN_CMDID);
  34020. WMI_RETURN_STRING(WMI_WOW_COAP_DEL_PATTERN_CMDID);
  34021. WMI_RETURN_STRING(WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID);
  34022. WMI_RETURN_STRING(WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID);
  34023. WMI_RETURN_STRING(WMI_WOW_COAP_GET_BUF_INFO_CMDID);
  34024. WMI_RETURN_STRING(WMI_COEX_DBAM_CMDID);
  34025. WMI_RETURN_STRING(WMI_PDEV_FEATURESET_CMDID);
  34026. WMI_RETURN_STRING(WMI_VDEV_PARAM_ENABLE_SR_PROHIBIT_CMDID);
  34027. WMI_RETURN_STRING(WMI_XGAP_ENABLE_CMDID);
  34028. WMI_RETURN_STRING(WMI_PDEV_MESH_RX_FILTER_ENABLE_CMDID);
  34029. WMI_RETURN_STRING(WMI_MLO_LINK_REMOVAL_CMDID);
  34030. WMI_RETURN_STRING(WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID);
  34031. WMI_RETURN_STRING(WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID);
  34032. WMI_RETURN_STRING(WMI_PDEV_UPDATE_PMK_CACHE_CMDID);
  34033. WMI_RETURN_STRING(WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID);
  34034. WMI_RETURN_STRING(WMI_PDEV_SET_SRG_BSS_COLOR_BITMAP_CMDID);
  34035. WMI_RETURN_STRING(WMI_PDEV_SET_SRG_PARTIAL_BSSID_BITMAP_CMDID);
  34036. WMI_RETURN_STRING(WMI_PDEV_SET_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID);
  34037. WMI_RETURN_STRING(WMI_PDEV_SET_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID);
  34038. WMI_RETURN_STRING(WMI_PDEV_SET_NON_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID);
  34039. WMI_RETURN_STRING(WMI_PDEV_SET_NON_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID);
  34040. WMI_RETURN_STRING(WMI_VDEV_SET_PCL_CMDID);
  34041. WMI_RETURN_STRING(WMI_PEER_RESERVED0_CMDID);
  34042. WMI_RETURN_STRING(WMI_PEER_CFR_CAPTURE_CMDID);
  34043. WMI_RETURN_STRING(WMI_PEER_CONFIG_VLAN_CMDID);
  34044. WMI_RETURN_STRING(WMI_PEER_TX_FILTER_CMDID);
  34045. WMI_RETURN_STRING(WMI_BCN_OFFLOAD_CTRL_CMDID);
  34046. WMI_RETURN_STRING(WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID);
  34047. WMI_RETURN_STRING(WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID);
  34048. WMI_RETURN_STRING(WMI_VDEV_ADFS_CH_CFG_CMDID);
  34049. WMI_RETURN_STRING(WMI_VDEV_ADFS_OCAC_ABORT_CMDID);
  34050. WMI_RETURN_STRING(WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID);
  34051. WMI_RETURN_STRING(WMI_REQUEST_RCPI_CMDID);
  34052. WMI_RETURN_STRING(WMI_WFA_CONFIG_CMDID);
  34053. WMI_RETURN_STRING(WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID);
  34054. WMI_RETURN_STRING(WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID);
  34055. WMI_RETURN_STRING(WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID);
  34056. WMI_RETURN_STRING(WMI_RMC_SET_MANUAL_LEADER_CMDID);
  34057. WMI_RETURN_STRING(WMI_11D_SCAN_START_CMDID);
  34058. WMI_RETURN_STRING(WMI_11D_SCAN_STOP_CMDID);
  34059. WMI_RETURN_STRING(WMI_VENDOR_PDEV_CMDID);
  34060. WMI_RETURN_STRING(WMI_VENDOR_VDEV_CMDID);
  34061. WMI_RETURN_STRING(WMI_VENDOR_PEER_CMDID);
  34062. WMI_RETURN_STRING(WMI_VDEV_SET_TWT_EDCA_PARAMS_CMDID); /* XPAN TWT */
  34063. WMI_RETURN_STRING(WMI_ESL_EGID_CMDID);
  34064. WMI_RETURN_STRING(WMI_TDMA_SCHEDULE_REQUEST_CMDID);
  34065. WMI_RETURN_STRING(WMI_HPA_CMDID);
  34066. WMI_RETURN_STRING(WMI_PDEV_SET_TGTR2P_TABLE_CMDID); /* To set target rate to power table */
  34067. WMI_RETURN_STRING(WMI_MLO_VDEV_GET_LINK_INFO_CMDID);
  34068. WMI_RETURN_STRING(WMI_VDEV_SET_ULOFDMA_MANUAL_SU_TRIG_CMDID);
  34069. WMI_RETURN_STRING(WMI_VDEV_SET_ULOFDMA_MANUAL_MU_TRIG_CMDID);
  34070. WMI_RETURN_STRING(WMI_VDEV_STANDALONE_SOUND_CMDID);
  34071. WMI_RETURN_STRING(WMI_PDEV_SET_RF_PATH_CMDID); /* set RF path of PHY */
  34072. WMI_RETURN_STRING(WMI_VDEV_PAUSE_CMDID);
  34073. WMI_RETURN_STRING(WMI_GPIO_STATE_REQ_CMDID);
  34074. WMI_RETURN_STRING(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID);
  34075. WMI_RETURN_STRING(WMI_MLO_LINK_RECOMMENDATION_CMDID);
  34076. WMI_RETURN_STRING(WMI_NAN_OEM_DATA_CMDID);
  34077. WMI_RETURN_STRING(WMI_PDEV_WSI_STATS_INFO_CMDID);
  34078. WMI_RETURN_STRING(WMI_CSA_EVENT_STATUS_INDICATION_CMDID);
  34079. WMI_RETURN_STRING(WMI_VDEV_SCHED_MODE_PROBE_REQ_CMDID);
  34080. WMI_RETURN_STRING(WMI_VDEV_OOB_CONNECTION_REQ_CMDID);
  34081. WMI_RETURN_STRING(WMI_AUDIO_TRANSPORT_SWITCH_RESP_STATUS_CMDID);
  34082. WMI_RETURN_STRING(WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID);
  34083. WMI_RETURN_STRING(WMI_COEX_MULTIPLE_CONFIG_CMDID);
  34084. WMI_RETURN_STRING(WMI_PDEV_ENABLE_LED_BLINK_DOWNLOAD_TABLE_CMDID);
  34085. WMI_RETURN_STRING(WMI_PDEV_ENABLE_WIFI_RADAR_CMDID);
  34086. WMI_RETURN_STRING(WMI_VDEV_GET_TWT_SESSION_STATS_INFO_CMDID);
  34087. WMI_RETURN_STRING(WMI_PDEV_ENABLE_XLNA_CMDID);
  34088. WMI_RETURN_STRING(WMI_PDEV_SET_CUSTOM_TX_POWER_PER_MCS_CMDID);
  34089. WMI_RETURN_STRING(WMI_PEER_ACTIVE_TRAFFIC_MAP_CMDID);
  34090. WMI_RETURN_STRING(WMI_REQUEST_OPM_STATS_CMDID);
  34091. WMI_RETURN_STRING(WMI_SOC_TX_PACKET_CUSTOM_CLASSIFY_CMDID);
  34092. WMI_RETURN_STRING(WMI_SET_AP_SUSPEND_RESUME_CMDID);
  34093. WMI_RETURN_STRING(WMI_P2P_GO_DFS_AP_CONFIG_CMDID);
  34094. }
  34095. return (A_UINT8 *) "Invalid WMI cmd";
  34096. }
  34097. #endif /* WMI_CMD_STRINGS */
  34098. /** WMI commands/events for the regulatory offload */
  34099. /** Host indicating current country code to FW */
  34100. typedef struct {
  34101. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param */
  34102. A_UINT32 pdev_id;
  34103. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  34104. } wmi_set_current_country_cmd_fixed_param;
  34105. typedef enum {
  34106. WMI_COUNTRYCODE_ALPHA2,
  34107. WMI_COUNTRYCODE_COUNTRY_ID,
  34108. WMI_COUNTRYCODE_DOMAIN_CODE,
  34109. } WMI_COUNTRYCODE_TYPE;
  34110. typedef struct {
  34111. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_init_country_cmd_fixed_param */
  34112. A_UINT32 pdev_id;
  34113. A_UINT32 countrycode_type; /* WMI_COUNTRYCODE_TYPE */
  34114. union {
  34115. struct {
  34116. /* Three character for alpha2. The first two is ISO name for country the last one
  34117. present if it is indoor and out door. First char in bits 7:0 and second char in bits 15:8 ... */
  34118. A_UINT32 alpha2:24,
  34119. unused:8;
  34120. };
  34121. A_UINT32 country_id; /* Country ID */
  34122. A_UINT32 domain_code; /* Domain code */
  34123. } country_code;
  34124. } wmi_set_init_country_cmd_fixed_param;
  34125. typedef enum {
  34126. /**
  34127. * serv_resp_format_type will indicate the format in which afc_serv data
  34128. * is written into host/target shared memory
  34129. * This type can be expanded in future as per requirements.
  34130. */
  34131. AFC_SERV_RESP_FORMAT_JSON = 0,
  34132. AFC_SERV_RESP_FORMAT_BINARY = 1,
  34133. AFC_SERV_RESP_FORMAT_IGNORE = 2, /* When cmd type is reset,server response is set to FORMAT_IGNORE */
  34134. } WMI_AFC_SERV_RESP_FORMAT_TYPE;
  34135. typedef enum {
  34136. /**
  34137. * wmi_afc_cmd_type will indicate type of AFC command sent to FW.
  34138. * Once AFC server writes data at TZ memory location SERV_RESP_READY
  34139. * type command is sent to FW.
  34140. * This type can be expanded in future as per requirements.
  34141. */
  34142. WMI_AFC_CMD_SERV_RESP_READY = 1,
  34143. WMI_AFC_CMD_RESET = 2, /* Added cmd type to handle AFC reset */
  34144. WMI_AFC_CMD_CLEAR_PAYLOAD = 3, /* Added cmd type to clear AFC response payload in proxy mode */
  34145. } WMI_AFC_CMD_TYPE;
  34146. /** Host indicating AFC info availability to FW */
  34147. typedef struct {
  34148. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_afc_cmd_fixed_param */
  34149. A_UINT32 pdev_id;
  34150. A_UINT32 cmd_type; /* refer WMI_AFC_CMD_TYPE */
  34151. A_UINT32 serv_resp_format; /* refer WMI_AFC_SERV_RESP_FORMAT_TYPE */
  34152. } wmi_afc_cmd_fixed_param;
  34153. /** Host indicates AFC info availability to FW using WMI_AFC_CMD
  34154. * This AFC info is written by AFC application/ server in host/target
  34155. * shared memory reserved during bootup.
  34156. * The structure is placeholder, indicating way afc_serv_resp is written in FW.
  34157. * This structure will not be attach as input to WMI command.
  34158. * This structure will be common to both host and FW.
  34159. * The structure of this WMI AFC info is as follows.
  34160. */
  34161. typedef struct {
  34162. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_afc_serv_resp_struct */
  34163. A_UINT32 status; /* validity flag to be updated by TZ/ PF stub layer,
  34164. * to indicate if payload is valid or not.
  34165. * status = 1 will indicate payload is valid. */
  34166. A_UINT32 time_to_live; /* Total time for which this AFC info is valid in seconds */
  34167. A_UINT32 length; /* length of the payload, in bytes */
  34168. A_UINT32 payload_format; /* The format of payload written in FW memory:
  34169. * 0 -> JSON format
  34170. * 1 -> Binary format
  34171. * Refer to WMI_AFC_SERV_RESP_FORMAT_TYPE.
  34172. */
  34173. /*
  34174. * The structure above is followed by array of char which will have
  34175. * JSON string or binary data, as specified by the payload_format field.
  34176. * A_CHAR bufp[]; AFC payload (JSON string or binary data)
  34177. */
  34178. } wmi_afc_serv_resp_struct;
  34179. /*
  34180. * The following structures define the format used for AFC binary data objects
  34181. * shared by the host SW and target FW.
  34182. * FW expects these structures to be written in shared memory in little-endian
  34183. * format. If the host/AFC app uses big endian format, Host/APP needs to
  34184. * byteswap the data, so FW will get data in the expected little-endian format.
  34185. */
  34186. typedef struct {
  34187. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  34188. * bits 31:16 = u16 end_freq
  34189. * both in MHz units
  34190. */
  34191. A_INT32 max_psd; /* Maximum PSD in dBm/MHz, value is stored in 0.01 dBm/MHz steps */
  34192. } afc_freq_info;
  34193. typedef struct {
  34194. A_UINT32 channel_cfi; /* channel center frequency index */
  34195. /*
  34196. * maximum permissible EIRP available for above CFI in dBm,
  34197. * value is stored in 0.01 dBm steps.
  34198. * Note: This A_UINT32 field can receive negative EIRP value from AFC
  34199. * server. These negative EIRP value cases are handled internally.
  34200. */
  34201. A_UINT32 max_eirp_pwr;
  34202. } afc_eirp_info;
  34203. typedef struct {
  34204. A_UINT32 global_operating_class;
  34205. A_UINT32 num_channels; /* num of valid channels for above global operating class */
  34206. /* This structure is followed by (num_channels*sizeof(afc_eirp_info))
  34207. * bytes array:
  34208. * afc_eirp_info eirp_info[num_channels];
  34209. * List of channel cfi and eirp power values,
  34210. * Total size will be num_channels * sizeof(afc_eirp_info)
  34211. */
  34212. } afc_channel_info;
  34213. /*
  34214. * For case of afc_server_resp containing binary payload, the buf pointer
  34215. * in wmi_afc_serv_resp_struct will be poiniting to binary format payload
  34216. * which is in the format defined below.
  34217. */
  34218. typedef struct {
  34219. A_UINT32 local_error_code; /* Internal error code between AFC app and target success = 0, General failure = 1 */
  34220. A_UINT32 version; /* Internal version between AFC app and Target for structure pattern */
  34221. A_UINT32 afc_wfa_version; /* Version defined in AFC spec document. bits 15:0 -- minor version & bits 31:16 -- major version */
  34222. A_UINT32 request_id; /* AFC unique request ID */
  34223. A_UINT32 avail_exp_time_d; /* avail_exp_time_d and avail_exp_time_t are in UTC
  34224. * Availability expiry time date format: YYYY-MM-DD,
  34225. * bits 7:0 -DD - Day (expected values 1-31)
  34226. * bits 15:8 -MM - Month (expected values 1-12)
  34227. * bits 31:16 -YYYY - Year
  34228. */
  34229. A_UINT32 avail_exp_time_t; /* Availability expiry time format HH-MM-SS
  34230. * bits 7:0 -SS - Time in Sec (expected values 0-59)
  34231. * bits 15:8 -MM - Minute (expected values 0-59)
  34232. * bits 23:16 -HH - Hour (expected values 0-23)
  34233. * bits 31:24 -reserved
  34234. */
  34235. A_INT32 afc_serv_resp_code; /* response code defined in afc wfa document, refer WMI_AFC_SERV_RESP_CODE */
  34236. A_UINT32 num_frequency_obj; /* Total number of frequency objects */
  34237. A_UINT32 num_channel_obj; /* Total number of frequency objects */
  34238. char shortdesc[64]; /* This field represents a short description related to the result indicated by the response_code
  34239. * field. End of description will be indicated by 0 */
  34240. A_UINT32 reserved[2]; /* reserve space for future fields - needs to be set to 0x0 */
  34241. /*
  34242. * This structure is followed by an array of frequency info and
  34243. * channel info array:
  34244. * - afc_freq_info freq_info[num_frequency_obj];
  34245. * List of frequency power values, total size will be
  34246. * num_frequency_obj * sizeof(afc_freq_info)
  34247. * - afc_channel_info chan_info[num_channel_obj];
  34248. * List of channel power values, total size will be
  34249. * num_channel_obj * sizeof(afc_channel_info)
  34250. */
  34251. } afc_spectrum_inquiry_resp_bin_type;
  34252. typedef struct {
  34253. /** TLV tag and len; tag equals
  34254. * WMITLV_TAG_STRUC_wmi_vdev_enable_disable_intra_bss_cmd_fixed_param
  34255. */
  34256. A_UINT32 tlv_header;
  34257. /** The corresponding vdev_id.
  34258. */
  34259. A_UINT32 vdev_id;
  34260. /* Enable/Disable intra_bss.
  34261. */
  34262. A_UINT32 enable;
  34263. } wmi_vdev_enable_disable_intra_bss_cmd_fixed_param;
  34264. typedef struct {
  34265. /** TLV tag and len; tag equals
  34266. * WMITLV_TAG_STRUC_wmi_peer_enable_disable_intra_bss_cmd_fixed_param
  34267. */
  34268. A_UINT32 tlv_header;
  34269. /** Mac Address of the peer.
  34270. */
  34271. wmi_mac_addr mac_addr;
  34272. /** The corresponding vdev_id.
  34273. */
  34274. A_UINT32 vdev_id;
  34275. /* Enable/Disable intra_bss.
  34276. */
  34277. A_UINT32 enable;
  34278. } wmi_peer_enable_disable_intra_bss_cmd_fixed_param;
  34279. /* Freq units in MHz */
  34280. #define WMI_REG_RULE_START_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  34281. #define WMI_REG_RULE_START_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  34282. #define WMI_REG_RULE_END_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 16, 16)
  34283. #define WMI_REG_RULE_END_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 16, value)
  34284. /* BW in MHz */
  34285. #define WMI_REG_RULE_MAX_BW_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 0, 16)
  34286. #define WMI_REG_RULE_MAX_BW_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 0, 16, value)
  34287. /* regpower in dBm */
  34288. #define WMI_REG_RULE_REG_POWER_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 16, 8)
  34289. #define WMI_REG_RULE_REG_POWER_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 16, 8, value)
  34290. /* antenna gain */
  34291. #define WMI_REG_RULE_ANTENNA_GAIN_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 24, 8)
  34292. #define WMI_REG_RULE_ANTENNA_GAIN_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 24, 8, value)
  34293. typedef enum {
  34294. WMI_REG_FLAG_CHAN_NO_IR = 0x0001, /* passive channel */
  34295. WMI_REG_FLAG_CHAN_RADAR = 0x0002, /* dfs channel */
  34296. WMI_REG_FLAG_CHAN_NO_OFDM = 0x0004, /* no ofdm channel */
  34297. WMI_REG_FLAG_CHAN_INDOOR_ONLY = 0x0008, /* indoor only channel */
  34298. } WMI_REGULATORY_FLAGS;
  34299. #define WMI_REG_RULE_FLAGS_GET(flag_info) WMI_GET_BITS(flag_info, 0, 16)
  34300. #define WMI_REG_RULE_FLAGS_SET(flag_info, value) WMI_SET_BITS(flag_info, 0, 16, value)
  34301. typedef struct {
  34302. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_struct */
  34303. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  34304. * bits 31:16 = u16 end_freq
  34305. * (both in MHz units) */
  34306. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  34307. bits 23:16 = u8 reg_power (dBm units),
  34308. bits 31:24 = u8 ant_gain (dB units) */
  34309. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  34310. bits 31:16 reserved */
  34311. } wmi_regulatory_rule_struct;
  34312. #define WMI_REG_RULE_PSD_FLAG_GET(psd_power_info) \
  34313. WMI_GET_BITS(psd_power_info, 0, 1)
  34314. #define WMI_REG_RULE_PSD_FLAG_SET(psd_power_info, value) \
  34315. WMI_SET_BITS(psd_power_info, 0, 1, value)
  34316. #define WMI_REG_RULE_PSD_EIRP_GET(psd_power_info) \
  34317. WMI_GET_BITS(psd_power_info, 16, 16)
  34318. #define WMI_REG_RULE_PSD_EIRP_SET(psd_power_info, value) \
  34319. WMI_SET_BITS(psd_power_info, 16, 16, value)
  34320. typedef struct {
  34321. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_ext_struct */
  34322. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  34323. bits 31:16 = u16 end_freq
  34324. (both in MHz units)
  34325. use same MACRO as wmi_regulatory_rule_struct
  34326. */
  34327. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  34328. bits 23:16 = u8 reg_power (dBm units),
  34329. bits 31:24 = u8 ant_gain (dB units)
  34330. use same MACRO as wmi_regulatory_rule_struct
  34331. */
  34332. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  34333. bits 31:16 reserved
  34334. use same MACRO as wmi_regulatory_rule_struct
  34335. */
  34336. A_UINT32 psd_power_info; /* bits 0 - whether PSD power,
  34337. bits 15:1 - reserved
  34338. bits 31:16 - maximum PSD EIRP (dB/MHz)
  34339. */
  34340. /*
  34341. * NOTE: no further fields can be added into this struct, due to
  34342. * message buffer size limitations in certain targets for the
  34343. * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
  34344. */
  34345. } wmi_regulatory_rule_ext_struct;
  34346. #define WMI_REG_CHAN_PRIORITY_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  34347. #define WMI_REG_CHAN_PRIORITY_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  34348. typedef struct {
  34349. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_chan_priority_struct */
  34350. A_UINT32 freq_info;
  34351. /* freq_info:
  34352. * bits 15:0 = u16 Cutoff Frequency value for Prioritization (in MHz units)
  34353. * The frequencies above this value will be prioritized and
  34354. * the frequencies below this value will be de-prioritized.
  34355. * bits 31:16 = reserved for future
  34356. */
  34357. /*
  34358. * NOTE: no further fields can be added into this struct, due to
  34359. * message buffer size limitations in certain targets for the
  34360. * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
  34361. */
  34362. } wmi_regulatory_chan_priority_struct;
  34363. #define WMI_REG_FCC_RULE_CHAN_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  34364. #define WMI_REG_FCC_RULE_CHAN_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  34365. #define WMI_REG_FCC_RULE_FCC_TX_POWER_GET(freq_info) WMI_GET_BITS(freq_info, 16, 8)
  34366. #define WMI_REG_FCC_RULE_FCC_TX_POWER_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 8, value)
  34367. typedef struct {
  34368. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_fcc_rule_struct */
  34369. A_UINT32 freq_info;
  34370. /* freq_info:
  34371. * bits 15:0 = u16 channel frequency (in MHz units)
  34372. * bits 23:16 = u8 FCC_Tx_power (dBm units)
  34373. * bits 31:24 = u8 reserved for future
  34374. */
  34375. /*
  34376. * NOTE: no further fields can be added into this struct, due to
  34377. * message buffer size limitations in certain targets for the
  34378. * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
  34379. */
  34380. } wmi_regulatory_fcc_rule_struct;
  34381. typedef enum {
  34382. WMI_REG_DFS_UNINIT_REGION = 0,
  34383. WMI_REG_DFS_FCC_REGION = 1,
  34384. WMI_REG_DFS_ETSI_REGION = 2,
  34385. WMI_REG_DFS_MKK_REGION = 3,
  34386. WMI_REG_DFS_CN_REGION = 4,
  34387. WMI_REG_DFS_KR_REGION = 5,
  34388. /* Add new items above */
  34389. WMI_REG_DFS_UNDEF_REGION = 0xFFFF,
  34390. } WMI_REG_DFS_REGION;
  34391. typedef enum {
  34392. WMI_REGULATORY_PHYMODE_NO11A = 0x0001, /* NO 11A */
  34393. WMI_REGULATORY_PHYMODE_NO11B = 0x0002, /* NO 11B */
  34394. WMI_REGULATORY_PHYMODE_NO11G = 0x0004, /* NO 11G */
  34395. WMI_REGULATORY_PHYMODE_NO11N = 0x0008, /* NO 11N */
  34396. WMI_REGULATORY_PHYMODE_NO11AC = 0x0010, /* NO 11AC */
  34397. WMI_REGULATORY_PHYMODE_NO11AX = 0x0020, /* NO 11AX */
  34398. WMI_REGULATORY_PHYMODE_NO11BE = 0x0040, /* NO 11BE */
  34399. } WMI_REGULATORY_PHYBITMAP;
  34400. typedef enum {
  34401. WMI_REG_SET_CC_STATUS_PASS = 0,
  34402. WMI_REG_CURRENT_ALPHA2_NOT_FOUND = 1,
  34403. WMI_REG_INIT_ALPHA2_NOT_FOUND = 2,
  34404. WMI_REG_SET_CC_CHANGE_NOT_ALLOWED = 3,
  34405. WMI_REG_SET_CC_STATUS_NO_MEMORY = 4,
  34406. WMI_REG_SET_CC_STATUS_FAIL = 5,
  34407. } WMI_REG_SET_CC_STATUS_CODE;
  34408. typedef struct {
  34409. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param */
  34410. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  34411. A_UINT32 phy_id;
  34412. A_UINT32 alpha2;
  34413. A_UINT32 num_phy;
  34414. A_UINT32 country_id;
  34415. A_UINT32 domain_code;
  34416. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  34417. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  34418. A_UINT32 min_bw_2g; /* BW in MHz */
  34419. A_UINT32 max_bw_2g; /* BW in MHz */
  34420. A_UINT32 min_bw_5g; /* BW in MHz */
  34421. A_UINT32 max_bw_5g; /* BW in MHz */
  34422. A_UINT32 num_2g_reg_rules;
  34423. A_UINT32 num_5g_reg_rules;
  34424. /*
  34425. * followed by wmi_regulatory_rule_struct TLV array. First 2G and then 5G
  34426. * - wmi_regulatory_fcc_rule_struct reg_fcc_rule[]
  34427. */
  34428. } wmi_reg_chan_list_cc_event_fixed_param;
  34429. typedef enum {
  34430. WMI_REG_CLIENT_REGULAR = 0,
  34431. WMI_REG_CLIENT_SUBORDINATE = 1,
  34432. /* 2 and 3 are reserved for future growth */
  34433. WMI_REG_CLIENT_MAX = 4, /* can't expand, b/c used as array length below */
  34434. } wmi_reg_client_type;
  34435. typedef struct {
  34436. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_ext_fixed_param */
  34437. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  34438. A_UINT32 phy_id;
  34439. A_UINT32 alpha2;
  34440. A_UINT32 num_phy;
  34441. A_UINT32 country_id; /* uses CountryCode enum values */
  34442. A_UINT32 domain_code; /* used EnumRd enum values */
  34443. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  34444. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  34445. A_UINT32 min_bw_2g; /* BW in MHz */
  34446. A_UINT32 max_bw_2g; /* BW in MHz */
  34447. A_UINT32 min_bw_5g; /* BW in MHz */
  34448. A_UINT32 max_bw_5g; /* BW in MHz */
  34449. A_UINT32 num_2g_reg_rules;
  34450. A_UINT32 num_5g_reg_rules;
  34451. A_UINT32 client_type; /* populated if device can function as client */
  34452. A_UINT32 rnr_tpe_usable; /* If RNR TPE Octet usable for that country */
  34453. A_UINT32 unspecified_ap_usable; /* If unspecified AP usable for that country */
  34454. A_UINT32 domain_code_6g_ap_lpi;
  34455. A_UINT32 domain_code_6g_ap_sp;
  34456. A_UINT32 domain_code_6g_ap_vlp;
  34457. A_UINT32 domain_code_6g_client_lpi[WMI_REG_CLIENT_MAX];
  34458. A_UINT32 domain_code_6g_client_sp[WMI_REG_CLIENT_MAX];
  34459. A_UINT32 domain_code_6g_client_vlp[WMI_REG_CLIENT_MAX];
  34460. A_UINT32 domain_code_6g_super_id;
  34461. A_UINT32 min_bw_6g_ap_sp; /* MHz */
  34462. A_UINT32 max_bw_6g_ap_sp;
  34463. A_UINT32 min_bw_6g_ap_lpi;
  34464. A_UINT32 max_bw_6g_ap_lpi;
  34465. A_UINT32 min_bw_6g_ap_vlp;
  34466. A_UINT32 max_bw_6g_ap_vlp;
  34467. A_UINT32 min_bw_6g_client_sp[WMI_REG_CLIENT_MAX];
  34468. A_UINT32 max_bw_6g_client_sp[WMI_REG_CLIENT_MAX];
  34469. A_UINT32 min_bw_6g_client_lpi[WMI_REG_CLIENT_MAX];
  34470. A_UINT32 max_bw_6g_client_lpi[WMI_REG_CLIENT_MAX];
  34471. A_UINT32 min_bw_6g_client_vlp[WMI_REG_CLIENT_MAX];
  34472. A_UINT32 max_bw_6g_client_vlp[WMI_REG_CLIENT_MAX];
  34473. A_UINT32 num_6g_reg_rules_ap_sp;
  34474. A_UINT32 num_6g_reg_rules_ap_lpi;
  34475. A_UINT32 num_6g_reg_rules_ap_vlp;
  34476. A_UINT32 num_6g_reg_rules_client_sp[WMI_REG_CLIENT_MAX];
  34477. A_UINT32 num_6g_reg_rules_client_lpi[WMI_REG_CLIENT_MAX];
  34478. A_UINT32 num_6g_reg_rules_client_vlp[WMI_REG_CLIENT_MAX];
  34479. /*
  34480. * NOTE: no further fields can be added into this struct, due to
  34481. * message buffer size limitations in certain targets for the
  34482. * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
  34483. */
  34484. /*
  34485. * This fixed_param TLV is followed by the following TLVs:
  34486. * - wmi_regulatory_rule_ext reg_rule_array[] struct TLV array.
  34487. * Within the reg rule ext TLV array, the 2G elements occur first,
  34488. * then the 5G elements, then the 6G elements (AP LPI, AP SP, AP VLP,
  34489. * client LPI x4, client SP x4, client VLP x4).
  34490. * - wmi_regulatory_chan_priority_struct reg_chan_priority[]
  34491. * - wmi_regulatory_fcc_rule_struct reg_fcc_rule[]
  34492. * - wmi_reg_chan_list_cc_ext_additional_params reg_more_data[]
  34493. * struct used to fill more fixed additional data, as existing
  34494. * fixed_param TLV struct can't be extended.
  34495. * - wmi_regulatory_rule_meta_data reg_meta_data[]
  34496. * struct used to fill meta information specific to new reg rules
  34497. * getting added(i.e. from C2C onwards).
  34498. */
  34499. } wmi_reg_chan_list_cc_event_ext_fixed_param;
  34500. #define WMI_REG_CAPS_C2C_SUPPORT_GET(additional_regulatory_capabilities) \
  34501. WMI_GET_BITS(additional_regulatory_capabilities, 0, 1)
  34502. #define WMI_REG_CAPS_C2C_SUPPORT_SET(additional_regulatory_capabilities, value) \
  34503. WMI_SET_BITS(additional_regulatory_capabilities, 0, 1, value)
  34504. typedef struct {
  34505. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_ext_additional_params */
  34506. /* additional_regulatory_capabilities:
  34507. * bit 0 - whether C2C supported
  34508. * bits 31:1 - reserved
  34509. */
  34510. A_UINT32 additional_regulatory_capabilities;
  34511. } wmi_reg_chan_list_cc_ext_additional_params;
  34512. typedef enum {
  34513. WMI_REG_RULE_TYPE_indoor_enabled_ap,
  34514. WMI_REG_RULE_TYPE_indoor_enabled_def_cli,
  34515. WMI_REG_RULE_TYPE_indoor_enabled_sub_cli,
  34516. WMI_REG_RULE_TYPE_MAX,
  34517. } WMI_REG_RULE_TYPE;
  34518. typedef struct {
  34519. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_meta_data */
  34520. A_UINT32 reg_rule_type; /* Refer enum WMI_REG_RULE_TYPE */
  34521. A_UINT32 domain_code_6ghz;
  34522. A_UINT32 min_bw_6ghz; /* units = MHz */
  34523. A_UINT32 max_bw_6ghz; /* units = MHz */
  34524. A_UINT32 num_6ghz_reg_rules;
  34525. } wmi_regulatory_rule_meta_data;
  34526. /* WFA AFC Version */
  34527. #define WMI_AFC_WFA_MINOR_VERSION_GET(afc_wfa_version) WMI_GET_BITS(afc_wfa_version, 0, 16)
  34528. #define WMI_AFC_WFA_MINOR_VERSION_SET(afc_wfa_version, value) WMI_SET_BITS(afc_wfa_version, 0, 16, value)
  34529. #define WMI_AFC_WFA_MAJOR_VERSION_GET(afc_wfa_version) WMI_GET_BITS(afc_wfa_version, 16, 16)
  34530. #define WMI_AFC_WFA_MAJOR_VERSION_SET(afc_wfa_version, value) WMI_SET_BITS(afc_wfa_version, 16, 16, value)
  34531. /* avail_exp_time_d time is expected as YYYY-MM-DD */
  34532. #define WMI_AVAIL_EXPIRY_TIME_DAY_GET(avail_exp_time_d) WMI_GET_BITS(avail_exp_time_d, 0, 8)
  34533. #define WMI_AVAIL_EXPIRY_TIME_DAY_SET(avail_exp_time_d, value) WMI_SET_BITS(avail_exp_time_d, 0, 8, value)
  34534. #define WMI_AVAIL_EXPIRY_TIME_MONTH_GET(avail_exp_time_d) WMI_GET_BITS(avail_exp_time_d, 8, 8)
  34535. #define WMI_AVAIL_EXPIRY_TIME_MONTH_SET(avail_exp_time_d, value) WMI_SET_BITS(avail_exp_time_d, 8, 8, value)
  34536. #define WMI_AVAIL_EXPIRY_TIME_YEAR_GET(avail_exp_time_d) WMI_GET_BITS(avail_exp_time_d, 16, 16)
  34537. #define WMI_AVAIL_EXPIRY_TIME_YEAR_SET(avail_exp_time_d, value) WMI_SET_BITS(avail_exp_time_d, 16, 16, value)
  34538. /* avail_exp_time_t time is expected as HH-MM-SS */
  34539. #define WMI_AVAIL_EXPIRY_TIME_SEC_GET(avail_exp_time_t) WMI_GET_BITS(avail_exp_time_t, 0, 8)
  34540. #define WMI_AVAIL_EXPIRY_TIME_SEC_SET(avail_exp_time_t, value) WMI_SET_BITS(avail_exp_time_t, 0, 8, value)
  34541. #define WMI_AVAIL_EXPIRY_TIME_MINUTE_GET(avail_exp_time_t) WMI_GET_BITS(avail_exp_time_t, 8, 8)
  34542. #define WMI_AVAIL_EXPIRY_TIME_MINUTE_SET(avail_exp_time_t, value) WMI_SET_BITS(avail_exp_time_t, 8, 8, value)
  34543. #define WMI_AVAIL_EXPIRY_TIME_HOUR_GET(avail_exp_time_t) WMI_GET_BITS(avail_exp_time_t, 16, 8)
  34544. #define WMI_AVAIL_EXPIRY_TIME_HOUR_SET(avail_exp_time_t, value) WMI_SET_BITS(avail_exp_time_t, 16, 8, value)
  34545. typedef enum {
  34546. /**
  34547. * The following event type is mutually exclusive.
  34548. * afc_event_type will indicate type of AFC event sent from FW to host.
  34549. * 1. For sending Power Info WMI_AFC_EVENT_POWER_INFO event is used.
  34550. * 2. For sending AFC expiry use WMI_AFC_EVENT_TIMER_EXPIRY
  34551. * This type can be expanded in future as per requirements.
  34552. */
  34553. WMI_AFC_EVENT_POWER_INFO = 1,
  34554. WMI_AFC_EVENT_TIMER_EXPIRY = 2,
  34555. } WMI_AFC_EVENT_TYPE;
  34556. typedef enum {
  34557. /**
  34558. * The following afc_expiry_event_subtype is mutually exclusive
  34559. * and is a part of expiry event.
  34560. * 1. At boot up AFC expiry will contain AFC start.
  34561. * 2. If AFC timer expires AFC_RENEW status code will be sent to host
  34562. * with expiry event.
  34563. * 3. If AFC server is not responding to FW in specified time, FW will
  34564. * indicate host to switch to LPI.
  34565. * 4. In SP mode, if AFC server is not responding to FW in
  34566. * specified time then FW will indicate host to stop TX since
  34567. * there are no lower power mode available.
  34568. */
  34569. WMI_AFC_EXPIRY_EVENT_START = 1,
  34570. WMI_AFC_EXPIRY_EVENT_RENEW = 2,
  34571. WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LOW_POWER_MODE = 3,
  34572. /* retain the deprecated old name as an alias for the new name */
  34573. WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LPI =
  34574. WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LOW_POWER_MODE,
  34575. WMI_AFC_EXPIRY_EVENT_STOP_TX = 4,
  34576. } WMI_AFC_EXPIRY_EVENT_SUBTYPE;
  34577. typedef enum {
  34578. /**
  34579. * The following fw_status_code is mutually exclusive
  34580. * and is used in power event.
  34581. * 0. AFC power event is success.
  34582. * 1. If Host does not indicate AFC indication cmd within certain time
  34583. * of AFC expiry FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED will be used.
  34584. * 2. If FW is not able to parse afc_info, parsing_failure will be
  34585. * indicated using WMI_FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED.
  34586. * 3. If due to some local reason AFC event is failed, AFC event failure
  34587. * is indicated using WMI_FW_AFC_POWER_EVENT_FAILURE.
  34588. */
  34589. WMI_FW_AFC_POWER_EVENT_SUCCESS = 0,
  34590. WMI_FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED = 1,
  34591. WMI_FW_AFC_POWER_EVENT_RESP_PARSING_FAILURE = 2,
  34592. WMI_FW_AFC_POWER_EVENT_FAILURE = 3,
  34593. } WMI_FW_AFC_POWER_EVENT_STATUS_CODE;
  34594. typedef enum {
  34595. /**
  34596. * The following afc_server_resp_code is mutually exclusive.
  34597. * This response code will be indicated to AFC server.
  34598. * These codes are defined in WIFI spec doc for AFC as follows
  34599. * -1: General Failure
  34600. * 0: Success
  34601. * 100 - 199: General errors related to the protocol
  34602. * 300 - 399: Error events specific to message exchange for the
  34603. * Available Spectrum Inquiry
  34604. */
  34605. WMI_AFC_SERV_RESP_GENERAL_FAILURE = -1,
  34606. WMI_AFC_SERV_RESP_SUCCESS = 0,
  34607. WMI_AFC_SERV_RESP_VERSION_NOT_SUPPORTED = 100,
  34608. WMI_AFC_SERV_RESP_DEVICE_UNALLOWED = 101,
  34609. WMI_AFC_SERV_RESP_MISSING_PARAM = 102,
  34610. WMI_AFC_SERV_RESP_INVALID_VALUE = 103,
  34611. WMI_AFC_SERV_RESP_UNEXPECTED_PARAM = 106,
  34612. WMI_AFC_SERV_RESP_UNSUPPORTED_SPECTRUM = 300,
  34613. } WMI_AFC_SERV_RESP_CODE;
  34614. typedef struct {
  34615. /** TLV tag and len;
  34616. * tag equals WMITLV_TAG_STRUC_wmi_afc_event_fixed_param */
  34617. A_UINT32 tlv_header;
  34618. A_UINT32 phy_id;
  34619. A_UINT32 event_type; /* refer to WMI_AFC_EVENT_TYPE */
  34620. /** This TLV is (optionally) followed by TLV and TLV arrays containing
  34621. * different afc_event:
  34622. * 1. wmi_afc_expiry_event_param expiry_evt;
  34623. * This TLV contains afc_expiry_event_param of fixed size.
  34624. * 2. wmi_reg_afc_power_event_param afc_power_event;
  34625. * This TLV contains afc_power_info_param of fixed size.
  34626. * 3. wmi_6g_afc_frequency_info freq_info[]
  34627. * This TLV array contains zero or more TLVs of freq_info,
  34628. * which contain freq range and PSD.
  34629. * 4. wmi_6g_afc_channel_info channel_info[]
  34630. * This TLV array contains zero or more TLVs of global_operating
  34631. * class and number of channel
  34632. * in each global operating class
  34633. * 5. wmi_afc_chan_eirp_power_info chan_eirp_power_info[]
  34634. * This TLV array contains zero or more TLVs of channel CFI and
  34635. * EIRP power values for each of the total number of channels
  34636. * per global operating class.
  34637. */
  34638. } wmi_afc_event_fixed_param;
  34639. typedef struct {
  34640. /** TLV tag and len;
  34641. * tag equals WMITLV_TAG_STRUC_wmi_afc_expiry_event_param.
  34642. */
  34643. A_UINT32 tlv_header;
  34644. A_UINT32 request_id; /* AFC unique Request ID for AFC expiry event, This is Nonce generated by FW for freshness */
  34645. A_UINT32 event_subtype; /* refer to WMI_AFC_EXPIRY_EVENT_SUBTYPE */
  34646. A_UINT32 afc_wfa_version; /* bits 15:0 -- minor version
  34647. * bits 31:16 -- major version
  34648. * WMI_AFC_WFA_MINOR_VERSION_GET &
  34649. * WMI_AFC_WFA_MAJOR_VERSION_GET
  34650. */
  34651. } wmi_afc_expiry_event_param;
  34652. typedef struct {
  34653. /** TLV tag and len;
  34654. *tag equals WMITLV_TAG_STRUC_wmi_afc_power_event_param */
  34655. A_UINT32 tlv_header;
  34656. A_UINT32 fw_status_code; /* refer WMI_FW_AFC_POWER_EVENT_STATUS_CODE */
  34657. 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. */
  34658. 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. */
  34659. A_UINT32 afc_wfa_version; /* bits 15:0 -- minor version
  34660. * bits 31:16 -- major version
  34661. * WMI_AFC_WFA_MINOR_VERSION_GET &
  34662. * WMI_AFC_WFA_MAJOR_VERSION_GET
  34663. */
  34664. A_UINT32 avail_exp_time_d; /* avail_exp_time_d and avail_exp_time_t are
  34665. * in UTC
  34666. * Availability expiry time date format:
  34667. * YYYY-MM-DD,
  34668. * bits 7:0 -DD - Day (expected values 1-31)
  34669. * bits 15:8 -MM - Month (expected values 1-12)
  34670. * bits 31:16 -YYYY - Year
  34671. */
  34672. A_UINT32 avail_exp_time_t; /* Availability expiry time format HH-MM-SS
  34673. * bits 7:0 -SS - Time in Sec (expected values 0-59)
  34674. * bits 15:8 -MM - Minute (expected values 0-59)
  34675. * bits 23:16 -HH - Hour (expected values 0-23)
  34676. * bits 31:24 -reserved
  34677. */
  34678. } wmi_afc_power_event_param;
  34679. typedef struct {
  34680. /** TLV tag and len;
  34681. * tag equals WMITLV_TAG_STRUC_wmi_6g_afc_frequency_info */
  34682. A_UINT32 tlv_header;
  34683. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  34684. * bits 31:16 = u16 end_freq
  34685. * (both in MHz units)
  34686. * use MACRO as WMI_REG_RULE_START_FREQ_GET &
  34687. * WMI_REG_RULE_START_FREQ_SET
  34688. */
  34689. A_INT32 psd_power_info; /* Maximum PSD in dBm/MHz, value is stored in 0.01 dBm/MHz steps */
  34690. } wmi_6g_afc_frequency_info;
  34691. typedef struct {
  34692. /** TLV tag and len;
  34693. * tag equals WMITLV_TAG_STRUC_wmi_6g_afc_channel_info */
  34694. A_UINT32 tlv_header;
  34695. A_UINT32 global_operating_class;
  34696. A_UINT32 num_channels; /* num of valid channels for above global operating class */
  34697. /* This TLV will be followed by array of
  34698. * num_channels times wmi_afc_chan_eirp_power_info
  34699. * wmi_afc_chan_eirp_power_info power_info[]
  34700. * EIRP power array has chunks of elements corresponding to each channel
  34701. * in the channel array.
  34702. * i.e. the EIRP power array will contain
  34703. * (suppose N1 and N2 are number of valid channels from channel_info[0]
  34704. * and channel_info[1] respectively)
  34705. * eirp_power[0] power for channel 0 from channel_info[0]
  34706. * eirp_power[1] power for channel 1 from channel_info[0]
  34707. * ...
  34708. * eirp_power[N1-1] power for channel N1-1 from channel_info[0]
  34709. * eirp_power[N1] power for channel 0 from channel_info[1]
  34710. * eirp_power[N1+1] power for channel 1 from channel_info[1]
  34711. * ...
  34712. * eirp_power[N1+N2-1] power for channel N2-1 channel_info[1]
  34713. * ...
  34714. */
  34715. } wmi_6g_afc_channel_info;
  34716. typedef struct {
  34717. /** TLV tag and len;
  34718. * tag equals WMITLV_TAG_STRUC_wmi_afc_chan_eirp_power_info */
  34719. A_UINT32 tlv_header ;
  34720. A_UINT32 channel_cfi; /* channel center frequency indices */
  34721. A_UINT32 eirp_pwr; /* maximum permissible EIRP available for above CFI in dBm, value is stored in 0.01 dBm steps */
  34722. } wmi_afc_chan_eirp_power_info;
  34723. typedef struct {
  34724. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param */
  34725. A_UINT32 vdev_id;
  34726. A_UINT32 scan_period_msec; /** scan duration in milli-seconds */
  34727. A_UINT32 start_interval_msec; /** offset duration to start the scan in milli-seconds */
  34728. } wmi_11d_scan_start_cmd_fixed_param;
  34729. typedef struct {
  34730. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param */
  34731. A_UINT32 vdev_id;
  34732. } wmi_11d_scan_stop_cmd_fixed_param;
  34733. /** FW indicating new current country code to Host */
  34734. typedef struct {
  34735. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param */
  34736. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  34737. } wmi_11d_new_country_event_fixed_param;
  34738. typedef struct {
  34739. /** TLV tag and len; tag equals
  34740. * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
  34741. A_UINT32 tlv_header;
  34742. /* Currently there are no parameters for this message. */
  34743. } wmi_coex_get_antenna_isolation_cmd_fixed_param;
  34744. typedef struct {
  34745. /** TLV tag and len; tag equals
  34746. * WMITLV_TAG_STRUC_wmi_pdev_get_nfcal_power_fixed_param */
  34747. A_UINT32 tlv_header;
  34748. /** pdev_id for identifying the MAC
  34749. * See macros starting with WMI_PDEV_ID_ for values.
  34750. */
  34751. A_UINT32 pdev_id;
  34752. } wmi_pdev_get_nfcal_power_fixed_param;
  34753. typedef struct {
  34754. /** TLV tag and len; tag equals
  34755. * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
  34756. A_UINT32 tlv_header;
  34757. /** 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.
  34758. * Currently the HW descriptor only supports 4 chains at most.
  34759. * Further isolation_chainX elements can be added in the future
  34760. * for additional chains, if needed.
  34761. */
  34762. A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
  34763. isolation_chain1:8, /* [15:8], isolation value for chain 1 */
  34764. isolation_chain2:8, /* [23:16], isolation value for chain 2 */
  34765. isolation_chain3:8; /* [31:24], isolation value for chain 3 */
  34766. } wmi_coex_report_isolation_event_fixed_param;
  34767. typedef enum {
  34768. WMI_COEX_DBAM_COMP_SUCCESS = 0, /* success, mode is applied */
  34769. WMI_COEX_DBAM_COMP_ONGOING = 1, /* success, mode is applied */
  34770. WMI_COEX_DBAM_COMP_DELAYED = 2, /* DBAM is delayed and TDD is selected temporarily */
  34771. WMI_COEX_DBAM_COMP_NOT_SUPPORT = 3, /* DBAM is not supported */
  34772. WMI_COEX_DBAM_COMP_TEST_MODE = 4, /* ignore due to test mode */
  34773. WMI_COEX_DBAM_COMP_INVALID_PARAM = 5, /* invalid parameter is received */
  34774. WMI_COEX_DBAM_COMP_FAIL = 6, /* command failed */
  34775. } wmi_coex_dbam_comp_status;
  34776. typedef struct {
  34777. /** TLV tag and len; tag equals
  34778. * WMITLV_TAG_STRUC_wmi_coex_dbam_complete_event_fixed_param */
  34779. A_UINT32 tlv_header;
  34780. A_UINT32 comp_status; /* wmi_coex_dbam_comp_status */
  34781. } wmi_coex_dbam_complete_event_fixed_param;
  34782. typedef enum wmi_tas_power_history_event_type {
  34783. 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 */
  34784. WMI_TAS_POWER_HISTORY_EVENT_SAVE_COMPLETE = 1, /* Power history save complete */
  34785. } WMI_TAS_POWER_HISTORY_EVENT_TYPE;
  34786. typedef struct {
  34787. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tas_power_history_event_fixed_param */
  34788. A_UINT32 tlv_header;
  34789. A_UINT32 sub_type; /* refer to WMI_TAS_POWER_HISTORY_EVENT_TYPE */
  34790. } wmi_tas_power_history_event_fixed_param;
  34791. typedef enum {
  34792. WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT = 1,
  34793. WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA = 2,
  34794. WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT = 3,
  34795. WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA = 4,
  34796. } wmi_rcpi_measurement_type;
  34797. typedef struct {
  34798. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param */
  34799. A_UINT32 tlv_header;
  34800. /* VDEV identifier */
  34801. A_UINT32 vdev_id;
  34802. /* peer MAC address */
  34803. wmi_mac_addr peer_macaddr;
  34804. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  34805. A_UINT32 measurement_type;
  34806. } wmi_request_rcpi_cmd_fixed_param;
  34807. typedef struct {
  34808. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_rcpi_event_fixed_param */
  34809. A_UINT32 tlv_header;
  34810. /* VDEV identifier */
  34811. A_UINT32 vdev_id;
  34812. /* peer MAC address */
  34813. wmi_mac_addr peer_macaddr;
  34814. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  34815. A_UINT32 measurement_type;
  34816. /* Measured RCPI in dBm of the peer requested by host */
  34817. A_INT32 rcpi;
  34818. /** status
  34819. * 0 - Requested peer RCPI available
  34820. * 1 - Requested peer RCPI not available
  34821. */
  34822. A_UINT32 status;
  34823. } wmi_update_rcpi_event_fixed_param;
  34824. /* Definition of mask for various package id */
  34825. #define WMI_PKGID_MASK_AUTO 0x00000080
  34826. typedef struct {
  34827. /** TLV tag and len; tag equals*/
  34828. A_UINT32 tlv_header;
  34829. /**
  34830. * The value field is filled with WMI_PKGID_MASK values.
  34831. * Currently, the only flag used within values is
  34832. * WMI_PKGID_MASK_AUTO, where bit7=1 for automotive systems.
  34833. */
  34834. A_UINT32 value;
  34835. } wmi_pkgid_event_fixed_param;
  34836. typedef struct {
  34837. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_params */
  34838. A_UINT32 vdev_id; /* vdev id whose mac to be randomized */
  34839. /* enable is set to 1 if mac randomization to be enabled */
  34840. A_UINT32 enable;
  34841. /* randomization mac address if randomization is enabled */
  34842. wmi_mac_addr mac_addr;
  34843. /* To get the PMAC from freq param */
  34844. A_UINT32 freq; /* units in MHz */
  34845. } wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param;
  34846. typedef struct {
  34847. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_event_fixed_params */
  34848. A_UINT32 vdev_id; /* vdev of id whose mac address was randomized */
  34849. A_UINT32 status; /* status is 1 if success and 0 if failed */
  34850. } wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param;
  34851. /* Definition of HW data filtering */
  34852. typedef enum {
  34853. WMI_HW_DATA_FILTER_DROP_NON_ARP_BC = 0x01,
  34854. WMI_HW_DATA_FILTER_DROP_NON_ICMPV6_MC = 0x02,
  34855. } WMI_HW_DATA_FILTER_BITMAP_TYPE;
  34856. typedef struct {
  34857. A_UINT32 tlv_header;
  34858. A_UINT32 vdev_id;
  34859. A_UINT32 enable; /* 1 . enable, 0- disable */
  34860. A_UINT32 hw_filter_bitmap; /* see WMI_HW_DATA_FILTER_BITMAP_TYPE */
  34861. } wmi_hw_data_filter_cmd_fixed_param;
  34862. /** values for multiple_vdev_restart_request flags */
  34863. /* Host is expecting consolidated Multiple Vdev Restart Response(MVRR) event. */
  34864. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_IS_MVRR_EVENT_SUPPORT(flag) WMI_GET_BITS(flag, 0, 1)
  34865. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_MVRR_EVENT_SUPPORT(flag,val) WMI_SET_BITS(flag, 0, 1, val)
  34866. /* Host is sending phymode_list for each vdev. */
  34867. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_IS_PHYMODE_PRESENT(flag) WMI_GET_BITS(flag, 1, 1)
  34868. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_PHYMODE_PRESENT(flag,val) WMI_SET_BITS(flag, 1, 1, val)
  34869. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_GET_PHYMODE(phymode) WMI_GET_BITS(phymode, 0, 6)
  34870. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_PHYMODE(phymode, val) WMI_SET_BITS(phymode, 0, 6, val)
  34871. /** Indicates that VDEV ID is in bit-map format
  34872. * If this flag is set, FW will determine the vdev IDs from the positions
  34873. * of the bits that are set, and use these vdev IDs for vdev restart.
  34874. *
  34875. * This flag should not be set from host unless FW has set the service bit
  34876. * WMI_SERVICE_MULTIPLE_VDEV_RESTART_BITMAP_SUPPORT to indicate it supports
  34877. * this interpretation of the vdev IDs as a bitmap.
  34878. *
  34879. * If this flag is set then below is the way it will be parsed
  34880. * vdev_ids[0] = 53 (0011 0101) -> indicates vdev 0,2,4,5 is set
  34881. * vdev_ids[1] = 53 (0000 0101) -> indicates vdev 32,34 is set
  34882. * similar to this the value can be extended in feature for more vdev's
  34883. *
  34884. * If flag is not se then default parsing will be as below
  34885. * vdev_ids[0] = 0
  34886. * vdev_ids[1] = 2
  34887. * vdev_ids[2] = 4
  34888. * .
  34889. * .
  34890. * vdev_ids[5] = 34
  34891. */
  34892. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_BITMAP_SUPPORT(flag) WMI_GET_BITS(flag, 2, 1)
  34893. #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_BITMAP_SUPPORT(flag,val) WMI_SET_BITS(flag, 2, 1, val)
  34894. /* This command is used whenever host wants to restart multiple
  34895. * VDEVs using single command and the VDEV that are restarted will
  34896. * need to have same properties they had before restart except for the
  34897. * operating channel
  34898. */
  34899. typedef struct {
  34900. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param */
  34901. /** pdev_id for identifying the MAC
  34902. * See macros starting with WMI_PDEV_ID_ for values.
  34903. * In non-DBDC case host should set it to 0
  34904. */
  34905. A_UINT32 pdev_id;
  34906. /** unique id identifying the module, generated by the caller */
  34907. A_UINT32 requestor_id;
  34908. /** Disable H/W ack.
  34909. * During CAC, Our HW shouldn't ack directed frames
  34910. */
  34911. A_UINT32 disable_hw_ack;
  34912. /* Determine the duration of CAC on the given channel 'chan' */
  34913. A_UINT32 cac_duration_ms;
  34914. A_UINT32 num_vdevs;
  34915. /*
  34916. * Flags to indicate which parameters are sent as part of the request.
  34917. * This field is filled with the bitwise combination of the flag values
  34918. * defined by WMI_MULTIPLE_VDEV_RESTART_FLAG_xxx
  34919. */
  34920. A_UINT32 flags;
  34921. A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20 MHz BW punctured */
  34922. /* The TLVs follows this structure:
  34923. * A_UINT32 vdev_ids[]; <--- Array of vdev IDs, or bitmap of vdev IDs
  34924. * In flags if WMI_MULTIPLE_VDEV_RESTART_FLAG_BITMAP_SUPPORT is set
  34925. * FW will interpret the vdev_ids values as a bitmap, and will use the
  34926. * position of all the bits set within the bitmap to determine the
  34927. * vdev IDs to use for vdev restart.
  34928. * If this flag is set then below is the way it will be parsed
  34929. * vdev_ids[0] = 53 (0011 0101) -> indicates vdev 0,2,4,5 is set
  34930. * vdev_ids[1] = 53 (0000 0101) -> indicates vdev 32,34 is set
  34931. * The array can be extended in feature for more vdevs.
  34932. * If this flag is not se then default parsing will be as below
  34933. * vdev_ids[0] = 0
  34934. * vdev_ids[1] = 2
  34935. * vdev_ids[2] = 4
  34936. * .
  34937. * .
  34938. * vdev_ids[5] = 34
  34939. * wmi_channel chan; <------ WMI channel
  34940. * A_UINT32 phymode_list[]; <-- Array of Phymode list, with
  34941. * each phymode value stored in bits 5:0 of the A_UINT32.
  34942. * Use the WMI_MULTIPLE_VDEV_RESTART_FLAG_GET/SET_PHYMODE macros
  34943. * to access the phymode value from within each A_UINT32 element.
  34944. * A_UINT32 preferred_tx_streams[]; <-- Array of preferred_tx_streams
  34945. * with vdev ID as index.
  34946. * A_UINT32 preferred_rx_streams[]; <-- Array of preferred_rx_streams
  34947. * with vdev ID as index.
  34948. * wmi_channel dbw_chan; <-- WMI channel
  34949. * optional TLV for dbw_chan
  34950. * wmi_dbw_chan_info dbw_chan_info
  34951. * optional TLV used for dbw_chan_info
  34952. */
  34953. } wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param;
  34954. typedef struct {
  34955. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csa_switch_count_status_event_fixed_param */
  34956. A_UINT32 tlv_header;
  34957. /** pdev_id for identifying the MAC
  34958. * See macros starting with WMI_PDEV_ID_ for values.
  34959. * In non-DBDC case host should set it to 0
  34960. */
  34961. A_UINT32 pdev_id;
  34962. /** CSA switch count value in the last transmitted beacon */
  34963. A_UINT32 current_switch_count;
  34964. A_UINT32 num_vdevs;
  34965. /* The TLVs follows this structure:
  34966. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  34967. */
  34968. } wmi_pdev_csa_switch_count_status_event_fixed_param;
  34969. typedef struct {
  34970. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csc_vdev_list */
  34971. A_UINT32 vdev_id;
  34972. A_UINT32 current_switch_count; /** CSC switch count value in the last transmitted beacon */
  34973. } wmi_csc_vdev_list;
  34974. typedef struct {
  34975. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param */
  34976. A_UINT32 tlv_header;
  34977. /** pdev_id for identifying the MAC
  34978. * See macros starting with WMI_PDEV_ID_ for values.
  34979. * In non-DBDC case host should set it to 0
  34980. */
  34981. A_UINT32 pdev_id;
  34982. /** CSC switch count value in the last transmitted beacon */
  34983. A_UINT32 current_switch_count;
  34984. /* The TLVs follows this structure:
  34985. * struct wmi_csc_vdev_list vdev_info[]; // IDs of vdevs and their current switch countdown values
  34986. */
  34987. } wmi_pdev_csc_switch_count_status_event_fixed_param;
  34988. /* Operation types for packet routing command */
  34989. typedef enum {
  34990. WMI_PDEV_ADD_PKT_ROUTING,
  34991. WMI_PDEV_DEL_PKT_ROUTING,
  34992. } wmi_pdev_pkt_routing_op_code;
  34993. /* Packet routing types based on specific data types */
  34994. typedef enum {
  34995. WMI_PDEV_ROUTING_TYPE_ARP_IPV4,
  34996. WMI_PDEV_ROUTING_TYPE_NS_IPV6,
  34997. WMI_PDEV_ROUTING_TYPE_IGMP_IPV4,
  34998. WMI_PDEV_ROUTING_TYPE_MLD_IPV6,
  34999. WMI_PDEV_ROUTING_TYPE_DHCP_IPV4,
  35000. WMI_PDEV_ROUTING_TYPE_DHCP_IPV6,
  35001. WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV4,
  35002. WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV6,
  35003. WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV4,
  35004. WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV6,
  35005. WMI_PDEV_ROUTING_TYPE_ICMP_IPV4,
  35006. WMI_PDEV_ROUTING_TYPE_ICMP_IPV6,
  35007. WMI_PDEV_ROUTING_TYPE_TCP_IPV4,
  35008. WMI_PDEV_ROUTING_TYPE_TCP_IPV6,
  35009. WMI_PDEV_ROUTING_TYPE_UDP_IPV4,
  35010. WMI_PDEV_ROUTING_TYPE_UDP_IPV6,
  35011. WMI_PDEV_ROUTING_TYPE_IPV4,
  35012. WMI_PDEV_ROUTING_TYPE_IPV6,
  35013. WMI_PDEV_ROUTING_TYPE_EAP,
  35014. WMI_PDEV_ROUTING_TYPE_VLAN,
  35015. } wmi_pdev_pkt_routing_type;
  35016. typedef enum {
  35017. WMI_PDEV_WIFIRXCCE_USE_CCE_E = 0,
  35018. WMI_PDEV_WIFIRXCCE_USE_ASPT_E = 1,
  35019. WMI_PDEV_WIFIRXCCE_USE_FT_E = 2,
  35020. WMI_PDEV_WIFIRXCCE_USE_CCE2_E = 3,
  35021. } wmi_pdev_dest_ring_handler_type;
  35022. typedef enum {
  35023. WMI_SOC_TX_PACKET_TYPE_ARP = 1,
  35024. WMI_SOC_TX_PACKET_TYPE_EAPOL = 2,
  35025. WMI_SOC_TX_PACKET_TYPE_DHCP = 3,
  35026. WMI_SOC_TX_PACKET_TYPE_DNS = 4,
  35027. WMI_SOC_TX_PACKET_TYPE_ICMP = 5,
  35028. } wmi_soc_tx_packet_type;
  35029. /*
  35030. * This command shall be sent only when no VDEV is up.
  35031. * If the command is sent after any VDEV is up, target will ignore the command.
  35032. */
  35033. typedef struct {
  35034. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_tx_packet_custom_classify_cmd_fixed_param */
  35035. A_UINT32 tlv_header;
  35036. /** packet_bitmap:
  35037. * bitmap of the packets to be classified,
  35038. * Refer to wmi_soc_tx_packet_type for the interpretation of the bits
  35039. * within the bitmap.
  35040. */
  35041. A_UINT32 packet_bitmap;
  35042. } wmi_soc_tx_packet_custom_classify_cmd_fixed_param;
  35043. /*
  35044. * This command shall be sent only when no VDEV is up.
  35045. * If the command is sent after any VDEV is up, target will ignore the command.
  35046. */
  35047. typedef struct {
  35048. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pkt_routing_cmd_fixed_param */
  35049. A_UINT32 tlv_header;
  35050. /** Identifies pdev on which routing needs to be applied */
  35051. A_UINT32 pdev_id;
  35052. /** Indicates the routing operation type: add/delete */
  35053. A_UINT32 op_code; /* wmi_pdev_pkt_routing_op_code */
  35054. /** Bitmap of multiple pkt routing types for a given destination ring and meta data */
  35055. A_UINT32 routing_type_bitmap; /* see wmi_pdev_pkt_routing_type */
  35056. /** 5 bits [4:0] are used to specify the destination ring where the CCE matched
  35057. * packet needs to be routed.
  35058. */
  35059. A_UINT32 dest_ring;
  35060. /** 16 bits [15:0] meta data can be passed to CCE. When the superrule matches,
  35061. * CCE copies this back in RX_MSDU_END_TLV.
  35062. */
  35063. A_UINT32 meta_data;
  35064. /**
  35065. * Indicates the dest ring handler type: CCE, APST, FT, CCE2
  35066. * Refer to wmi_pdev_dest_ring_handler_type / WMI_PDEV_WIFIRXCCE_USE_xxx
  35067. */
  35068. A_UINT32 dest_ring_handler;
  35069. } wmi_pdev_update_pkt_routing_cmd_fixed_param;
  35070. typedef enum {
  35071. WMI_CALIBRATION_NO_FEATURE = 0, /* The board was calibrated with a meta which did not have this feature */
  35072. WMI_CALIBRATION_OK, /* The calibration status is OK */
  35073. WMI_CALIBRATION_NOT_OK, /* The calibration status is NOT OK */
  35074. } WMI_CALIBRATION_STATUS;
  35075. #define WMI_BOARD_MCN_STRING_MAX_SIZE 19
  35076. /**
  35077. * WMI_BOARD_MCN_STRING_BUF_SIZE : represents the number of elements in board_mcn_detail.
  35078. * Since board_mcn_detail is of type A_UINT8, the value of WMI_BOARD_MCN_STRING_BUF_SIZE
  35079. * should be multiple of 4 for alignment reason. And the last byte byte is reserved for
  35080. * null-terminator
  35081. */
  35082. #define WMI_BOARD_MCN_STRING_BUF_SIZE (WMI_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
  35083. typedef struct {
  35084. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param */
  35085. A_UINT32 software_cal_version; /* Current software level calibration data version */
  35086. A_UINT32 board_cal_version; /* Calibration data version programmed on chip */
  35087. A_UINT32 cal_status; /* filled with WMI_CALIBRATION_STATUS enum value */
  35088. /* board_mcn_detail:
  35089. * Provides board's MCN (Material Control Number) information for the host
  35090. * to display. This is used to track the Hardware level revisions/versions.
  35091. * This array carries the ASCII values of the MCN to the host. And host
  35092. * would just print this in a string format whenever user requests.
  35093. * Note: On a big-endian host, the 4 bytes within each A_UINT32 portion
  35094. * of a WMI message will be automatically byteswapped by the copy engine
  35095. * as the messages are transferred between host and target, to convert
  35096. * between the target's little-endianness and the host's big-endianness.
  35097. * Consequently, a big-endian host will have to manually unswap the bytes
  35098. * within the board_mcn_detail string buffer to get the bytes back into
  35099. * the desired natural order.
  35100. */
  35101. A_UINT8 board_mcn_detail[WMI_BOARD_MCN_STRING_BUF_SIZE];
  35102. /** pdev_id for identifying the MAC
  35103. * See macros starting with WMI_PDEV_ID_ for values.
  35104. */
  35105. A_UINT32 pdev_id;
  35106. } wmi_pdev_check_cal_version_event_fixed_param;
  35107. typedef struct {
  35108. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_cmd_fixed_param */
  35109. /** pdev_id for identifying the MAC
  35110. * See macros starting with WMI_PDEV_ID_ for values.
  35111. */
  35112. A_UINT32 pdev_id;
  35113. } wmi_pdev_check_cal_version_cmd_fixed_param;
  35114. typedef struct {
  35115. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_diversity_gain_cmd_fixed_param */
  35116. /** Identifies pdev on which diversity gain to be applied */
  35117. A_UINT32 pdev_id;
  35118. /** The number of spatial stream */
  35119. A_UINT32 nss;
  35120. /** The number of gains */
  35121. A_UINT32 num_gains;
  35122. /*
  35123. * This fixed_param TLV is followed by other TLVs:
  35124. * A_UINT8 diversity_gains[num_gains]; (gain is in dB units)
  35125. */
  35126. } wmi_pdev_set_diversity_gain_cmd_fixed_param;
  35127. /* flags for unit_test_event */
  35128. #define WMI_UNIT_TEST_EVENT_FLAG_STATUS 0 /* 0 = success, 1 = fail */
  35129. #define WMI_UNIT_TEST_EVENT_FLAG_DONE 1 /* 0 = not done, 1 = done */
  35130. /* from bit 2 to bit 31 are reserved */
  35131. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_SUCCESS(flag) do { \
  35132. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  35133. } while (0)
  35134. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_FAIL(flag) do { \
  35135. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  35136. } while (0)
  35137. #define WMI_GET_UNIT_TEST_EVENT_FLAG_STSTUS(flag) \
  35138. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS))
  35139. #define WMI_SET_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  35140. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  35141. } while (0)
  35142. #define WMI_CLR_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  35143. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  35144. } while (0)
  35145. #define WMI_GET_UNIT_TEST_EVENT_FLAG_DONE(flag) \
  35146. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE))
  35147. typedef struct {
  35148. /* TLV tag and len; tag equals WMI_UNIT_TEST_EVENTID */
  35149. A_UINT32 tlv_header;
  35150. /* unique id identifying the VDEV, generated by the caller */
  35151. A_UINT32 vdev_id;
  35152. /* Identify the wlan module */
  35153. A_UINT32 module_id;
  35154. /* unique id identifying the unit test cmd, generated by the caller */
  35155. A_UINT32 diag_token;
  35156. /* flag for the status of the unit_test_cmd */
  35157. A_UINT32 flag;
  35158. /* data length number of bytes for current dump */
  35159. A_UINT32 payload_len;
  35160. /* TLV/Payload after this structure is sent in little endian
  35161. * format for the length mentioned in this structure.
  35162. * A_UINT8 payload[1];
  35163. */
  35164. } wmi_unit_test_event_fixed_param;
  35165. /* Definition of latency levels */
  35166. typedef enum {
  35167. WMI_WLM_LL_NORMAL = 0x0,
  35168. /* DEPRECATED */ WMI_WLM_LL_MODERATE = 0x1,
  35169. WMI_WLM_LL_XR = 0x1,
  35170. WMI_WLM_LL_LOW = 0x2,
  35171. WMI_WLM_LL_ULTRA_LOW = 0x3,
  35172. } WMI_WLM_LATENCY_LEVEL;
  35173. typedef struct {
  35174. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_latency_event_fixed_param */
  35175. /** The latency level for specified vdev_id */
  35176. A_UINT32 vdev_id;
  35177. /** latency level enum WMI_WLM_LATENCY_LEVEL honored by FW */
  35178. A_UINT32 latency_level;
  35179. } wmi_vdev_latency_event_fixed_param;
  35180. /*
  35181. * Lay out of flags in wmi_wlm_config_cmd_fixed_param
  35182. *
  35183. * |31 19| 18 | 17|16 14| 13 | 12| 11 | 10 | 9 | 8 |7 6|5 4|3 2| 1 | 0 |
  35184. * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
  35185. * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
  35186. * +------------------------------+---------------+---------+-----------------+
  35187. * | WAL | PS | Roam | Scan |
  35188. *
  35189. * Flag values:
  35190. * TRY: (1) enable short limit for retrying unacked tx, where the limit is
  35191. * based on the traffic's latency level
  35192. * (0) default tx retry behavior
  35193. * EDCA: (1) Apply VO parameters on BE
  35194. * (0) default behavior
  35195. * NSS: (0) no Nss limits, other than those negotiatied during association
  35196. * (1) during 2-chain operation, tx only a single spatial stream
  35197. * (2) - (7) reserved / invalid
  35198. * RTS: (0) default protection
  35199. * (1) always enable RTS/CTS protection
  35200. * SRATE: (0) default secondary rate policy
  35201. * (1) disable secondary rate
  35202. */
  35203. /* bit 0-3 of flags is used for scan operation */
  35204. /* bit 0: Avoid scan request from HLOS if bit is set */
  35205. #define WLM_FLAGS_SCAN_SUPPRESS 1 /* suppress all scan request */
  35206. /* bit 1: WLM_FLAGS_SCAN_SKIP_DFS, skip dfs channel if bit is set */
  35207. #define WLM_FLAGS_SCAN_SKIP_DFS 1 /* skip dfs channel operation */
  35208. /* bit 2-3: define policy of dwell time/duration of each foreign channel
  35209. (b3 b2)
  35210. (0 0 ): Default dwell time
  35211. (0 1 ): WLM_FLAGS_STICK_SCAN_DWELL_TIME : Stick to original active/passive dwell time, but split
  35212. foreign channel dwell times into fitting into min (dl_latency, ul_latency). Note it can increase
  35213. overall scan duration.
  35214. (1 0 ): WLM_FLAGS_SHRINK_SCAN_DWELL_TIME: Shrink active/passive dwell time to
  35215. min(dl_latency, ul_latency, dwell_time). It may reduce overall scan duration, but it may decrease
  35216. the accuracy of scan result.
  35217. (1 1 ): reserved
  35218. */
  35219. #define WLM_FLAGS_DEFAULT_SCAN_DWELL_TIME 0 /* Default scan dwell time */
  35220. #define WLM_FLAGS_STICK_SCAN_DWELL_TIME 1 /* Shrink off channel time but extend overall scan duration */
  35221. #define WLM_FLAGS_SHRINK_SCAN_DWELL_TIME 2 /* Shrink scan off channel time */
  35222. /* bit 4-5: reserved for scan */
  35223. /* bit 6-7 of flags is used for roaming operation */
  35224. /* bit 6-7: define roaming policy:
  35225. (b7 b6)
  35226. (0 0 ): WLM_FLAGS_ROAM_ALLOW: Default behavior, allow roaming in all scenarios
  35227. (0 1 ): WLM_FLAGS_ROAM_SUPPRESS: Disallow all roaming
  35228. (1 0 ): WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM: Allow final bmiss roaming only
  35229. (1 1 ): reserved
  35230. */
  35231. #define WLM_FLAGS_ROAM_ALLOW 0
  35232. #define WLM_FLAGS_ROAM_SUPPRESS 1
  35233. #define WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM 2
  35234. /* bit 8: reserved for roaming */
  35235. /* bit 9-11 of flags is used for powersave operation */
  35236. /* bit 9: WLM_FLAGS_PS_DISABLE_BMPS, disable BMPS if bit is set */
  35237. #define WLM_FLAGS_PS_DISABLE_BMPS 1 /* disable BMPS */
  35238. /* bit 10: WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE, disable css power collapse if bit is set */
  35239. #define WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE 1 /* disable css power collapse */
  35240. /* bit 11: WLM_FLAGS_PS_DISABLE_SYS_SLEEP, disable sys sleep if bit is set */
  35241. #define WLM_FLAGS_PS_DISABLE_SYS_SLEEP 1 /* disable sys sleep */
  35242. /* bit 17-31 of flags is reserved for powersave and WAL */
  35243. /* bit 23: WLM_FLAGS_PS_DISABLE_MLO_PROBE_SCAN,
  35244. * disable MLO probe scan if bit is set
  35245. */
  35246. #define WLM_FLAGS_PS_DISABLE_MLO_PROBE_SCAN 1 /* disable MLO probe scan */
  35247. /* bit 24: WLM_FLAGS_PS_DISABLE_ULL_FORCED_MLMR,
  35248. * Disable forced MLMR on ULL if bit is set.
  35249. * (MLMR may still happen due to other reasons.)
  35250. */
  35251. #define WLM_FLAGS_PS_DISABLE_ULL_FORCED_MLMR 1 /* disable forced MLMR on ULL */
  35252. /* bit 25: WLM_FLAGS_PS_DISABLE_ULL_FORCED_EMLSR,
  35253. * Disable forced EMLSR on ULL if bit is set.
  35254. * (eMLSR may still happen due to other reasons.)
  35255. */
  35256. #define WLM_FLAGS_PS_DISABLE_ULL_FORCED_EMLSR 1 /* disable forced EMLSR on ULL */
  35257. #define WLM_FLAGS_SCAN_IS_SUPPRESS(flag) WMI_GET_BITS(flag, 0, 1)
  35258. #define WLM_FLAGS_SCAN_SET_SUPPRESS(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  35259. #define WLM_FLAGS_SCAN_IS_SKIP_DFS(flag) WMI_GET_BITS(flag, 1, 1)
  35260. #define WLM_FLAGS_SCAN_SET_SKIP_DFS(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  35261. #define WLM_FLAGS_SCAN_GET_DWELL_TIME_POLICY(flag) WMI_GET_BITS(flag, 2, 2)
  35262. #define WLM_FLAGS_SCAN_SET_DWELL_TIME_POLICY(flag, val) WMI_SET_BITS(flag, 2, 2, val)
  35263. #define WLM_FLAGS_TSF_LATENCY_COMPENSATE_ENABLED_GET(flag) WMI_GET_BITS(flag, 4, 1)
  35264. #define WLM_FLAGS_TSF_LATENCY_COMPENSATE_ENABLED_SET(flag) WMI_SET_BITS(flag, 4, 1, val)
  35265. #define WLM_FLAGS_ROAM_GET_POLICY(flag) WMI_GET_BITS(flag, 6, 2)
  35266. #define WLM_FLAGS_ROAM_SET_POLICY(flag, val) WMI_SET_BITS(flag, 6, 2, val)
  35267. #define WLM_FLAGS_PS_IS_BMPS_DISABLED(flag) WMI_GET_BITS(flag, 9, 1)
  35268. #define WLM_FLAGS_PS_IS_CSS_CLPS_DISABLED(flag) WMI_GET_BITS(flag, 10, 1)
  35269. #define WLM_FLAGS_PS_SET_CSS_CLPS_DISABLE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  35270. #define WLM_FLAGS_PS_IS_SYS_SLP_DISABLED(flag) WMI_GET_BITS(flag, 11, 1)
  35271. #define WLM_FLAGS_PS_SET_SYS_SLP_DISABLE(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  35272. #define WLM_FLAGS_WAL_LIMIT_TRY_ENABLED(flag) WMI_GET_BITS(flag, 12, 1)
  35273. #define WLM_FLAGS_WAL_LIMIT_TRY_SET(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  35274. #define WLM_FLAGS_WAL_ADJUST_EDCA_ENABLED(flag) WMI_GET_BITS(flag, 13, 1)
  35275. #define WLM_FLAGS_WAL_ADJUST_EDCA_SET(flag, val) WMI_SET_BITS(flag, 13, 1, val)
  35276. #define WLM_FLAGS_WAL_1NSS_ENABLED(flag) (WMI_GET_BITS(flag, 14, 3) & 0x1)
  35277. #define WLM_FLAGS_WAL_NSS_SET(flag, val) WMI_SET_BITS(flag, 14, 3, val)
  35278. #define WLM_FLAGS_WAL_ALWAYS_RTS_PROTECTION(flag) WMI_GET_BITS(flag, 17, 1)
  35279. #define WLM_FLAGS_WAL_RTS_PROTECTION_SET(flag, val) WMI_SET_BITS(flag, 17, 1, val)
  35280. #define WLM_FLAGS_WAL_DISABLE_SECONDARY_RATE(flag) WMI_GET_BITS(flag, 18, 1)
  35281. #define WLM_FLAGS_WAL_SECONDARY_RATE_SET(flag, val) WMI_SET_BITS(flag, 18, 1, val)
  35282. #define WLM_FLAGS_PS_IS_PCIE_L11_ENABLED(flag) WMI_GET_BITS(flag, 19, 1)
  35283. #define WLM_FLAGS_PS_SET_PCIE_L11_ENABLE(flag, val) WMI_SET_BITS(flag, 19, 1, val)
  35284. #define WLM_FLAGS_PS_IS_PHYRF_PS_ENABLED(flag) WMI_GET_BITS(flag, 20, 1)
  35285. #define WLM_FLAGS_PS_SET_PHYRF_PS_ENABLE(flag, val) WMI_SET_BITS(flag, 20, 1, val)
  35286. #define WLM_FLAGS_SCAN_IS_SPLIT_PAS_CH_ENABLED(flag) WMI_GET_BITS(flag, 21, 1)
  35287. #define WLM_FLAGS_SCAN_SET_SPLIT_PAS_CH_ENABLE(flag, val) WMI_SET_BITS(flag, 21, 1, val)
  35288. #define WLM_FLAGS_SCAN_IS_ADAPT_SCAN_ENABLED(flag) WMI_GET_BITS(flag, 22, 1)
  35289. #define WLM_FLAGS_SCAN_SET_ADAPT_SCAN_ENABLE(flag, val) WMI_SET_BITS(flag, 22, 1, val)
  35290. #define WLM_FLAGS_PS_IS_MLO_PROBE_SCAN_DISABLED(flag) WMI_GET_BITS(flag, 23, 1)
  35291. #define WLM_FLAGS_PS_SET_MLO_PROBE_SCAN_DISABLE(flag, val) WMI_SET_BITS(flag, 23, 1, val)
  35292. #define WLM_FLAGS_PS_IS_ULL_FORCED_MLMR_DISABLED(flag) WMI_GET_BITS(flag, 24, 1)
  35293. #define WLM_FLAGS_PS_SET_ULL_FORCED_MLMR_DISABLE(flag, val) WMI_SET_BITS(flag, 24, 1, val)
  35294. #define WLM_FLAGS_PS_IS_ULL_FORCED_EMLSR_DISABLED(flag) WMI_GET_BITS(flag, 25, 1)
  35295. #define WLM_FLAGS_PS_SET_ULL_FORCED_EMLSR_DISABLE(flag, val) WMI_SET_BITS(flag, 25, 1, val)
  35296. #define WLM_FLAGS_SET_FORCE_DEFAULT_LATENCY(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  35297. #define WLM_FLAGS_GET_FORCE_DEFAULT_LATENCY(flag) WMI_GET_BITS(flag, 0, 1)
  35298. #define WLM_MAX_HOST_CLIENTS 5
  35299. typedef struct {
  35300. /** TLV tag and len; tag equals WMI_WLM_CONFIG_CMD_fixed_param */
  35301. A_UINT32 tlv_header;
  35302. /* VDEV identifier */
  35303. A_UINT32 vdev_id;
  35304. /*
  35305. * Refer to WMI_WLM_LATENCY_LEVEL
  35306. * Once latency change detected, WLM will notify modules e.g. STAPS or SCAN/ROAM,
  35307. * who subscribed this event. And subscribers, like SCAN, may disable/cutoff offchan
  35308. * operation to support lower latency of WLAN.
  35309. */
  35310. A_UINT32 latency_level;
  35311. /*
  35312. * represent uplink latency in ms
  35313. * This parameter will be used by STAPS module to decide timing parameters, like
  35314. * ITO or SPEC wakeup interval. For SCAN/ROAM, it may used to calculate offchan
  35315. * durations.
  35316. * For host and FW with multi client LL feature enabled, this field is obsolete.
  35317. */
  35318. A_UINT32 ul_latency;
  35319. /*
  35320. * represent downlink latency in ms
  35321. * Similar usage as ul_latency
  35322. * For host and FW with multi client LL feature enabled, this field is obsolete.
  35323. */
  35324. A_UINT32 dl_latency;
  35325. /*
  35326. * flags for each client of WLM, refer to WLM_FLAGS_ definitions above.
  35327. * For host and FW with multi client LL feature enabled, this field is obsolete.
  35328. */
  35329. A_UINT32 flags;
  35330. /*
  35331. * bit 0 used as force reset:
  35332. * to override the latency level as default
  35333. * for all the wlm clients
  35334. */
  35335. A_UINT32 flags_ext;
  35336. /*
  35337. * clients of WLM Arbiter
  35338. * WLM_MAX_HOST_CLIENTS 5
  35339. */
  35340. A_UINT32 client_id_bitmask;
  35341. } wmi_wlm_config_cmd_fixed_param;
  35342. /* Broadcast TWT enable/disable for both REQUESTER and RESPONDER */
  35343. #define TWT_EN_DIS_FLAGS_GET_BTWT(flag) WMI_GET_BITS(flag, 0, 1)
  35344. #define TWT_EN_DIS_FLAGS_SET_BTWT(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  35345. /* legacy MBSSID enable/disable */
  35346. #define TWT_EN_DIS_FLAGS_GET_L_MBSSID(flag) WMI_GET_BITS(flag, 1, 1)
  35347. #define TWT_EN_DIS_FLAGS_SET_L_MBSSID(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  35348. /* 11ax MBSSID enable/disable */
  35349. #define TWT_EN_DIS_FLAGS_GET_AX_MBSSID(flag) WMI_GET_BITS(flag, 2, 1)
  35350. #define TWT_EN_DIS_FLAGS_SET_AX_MBSSID(flag, val) WMI_SET_BITS(flag, 2, 1, val)
  35351. /* Configuration of TWT Modes,
  35352. * If this BIT is set BIT4/5 will be used in FW, else BIT4/5 will be ignored.
  35353. * Which means when we receive WMI_TWT_ENABLE_CMDID command from host,
  35354. * without BIT3 set we will enable both REQUESTER/RESPONDER.
  35355. *
  35356. * Same interpretation is used in WMI_TWT_DISABLE_CMDID, if BIT3 is not set
  35357. * we will disable both REQUESTER and RESPONDER.
  35358. */
  35359. #define TWT_EN_DIS_FLAGS_GET_SPLIT_CONFIG(flag) WMI_GET_BITS(flag, 3, 1)
  35360. #define TWT_EN_DIS_FLAGS_SET_SPLIT_CONFIG(flag, val) WMI_SET_BITS(flag, 3, 1, val)
  35361. /*
  35362. * The flags are used both in WMI_TWT_ENABLE_CMDID and WMI_TWT_DISABLE_CMDID.
  35363. *
  35364. * BIT4 represents whether the it is for REQUESTER or RESPONDER.
  35365. * BIT5 represents whether it is individual or broadcast mode.
  35366. *
  35367. * For instance, in WMI_TWT_ENABLE_CMDID if BIT4=0 and BIT5=0, then we will
  35368. * enable only Requester, we will not change any configuration of RESPONDER.
  35369. *
  35370. * Same way in WMI_TWT_DISABLE_CMDID if BIT4=0 and BIT5=0, then we will only
  35371. * disable Individual and Broadcast REQUESTER, we will not alter any RESPONDER
  35372. * configuration.
  35373. *
  35374. * If host is enabling or disabling both REQUESTER and RESPONDER host will
  35375. * send two WMI commands, one for REQUESTER and one for RESPONDER.
  35376. *
  35377. * WMI_TWT_ENABLE_CMDID command flags description,
  35378. * |----------------------------------------------------------------------|
  35379. * |BIT4=0, BIT5=0 | Enable Individual TWT requester |
  35380. * |----------------------------------------------------------------------|
  35381. * |BIT4=0, BIT5=1 | Enable both Individual and Broadcast TWT requester |
  35382. * |----------------------------------------------------------------------|
  35383. * |BIT4=1, BIT5=0 | Enable Individual TWT responder |
  35384. * |----------------------------------------------------------------------|
  35385. * |BIT4=1, BIT5=1 | Enable both Individual and Broadcast TWT responder |
  35386. * |----------------------------------------------------------------------|
  35387. *
  35388. *
  35389. * WMI_TWT_DISABLE_CMDID command flags description,
  35390. * |----------------------------------------------------------------------|
  35391. * |BIT4=0, BIT5=0 | Disable both Individual and Broadcast TWT requester |
  35392. * |----------------------------------------------------------------------|
  35393. * |BIT4=0, BIT5=1 | Disable Broadcast TWT requester |
  35394. * |----------------------------------------------------------------------|
  35395. * |BIT4=1, BIT5=0 | Disable both Individual and broadcast TWT responder |
  35396. * |----------------------------------------------------------------------|
  35397. * |BIT4=1, BIT5=1 | Disable Broadcast TWT responder |
  35398. * |----------------------------------------------------------------------|
  35399. *
  35400. * If user has enabled only individual requester at any point and after
  35401. * sometime if user wants to enable broadcast requester then user cannot
  35402. * directly send another WMI_TWT_ENABLE_CMDID with broadcast configuration,
  35403. * user has to disable TWT requester first and then enable both individual
  35404. * requester and broadcast requester. Same way for RESPONDER.
  35405. *
  35406. */
  35407. /* 0: requester; 1: responder */
  35408. #define TWT_EN_DIS_FLAGS_GET_REQ_RESP(flag) WMI_GET_BITS(flag, 4, 1)
  35409. #define TWT_EN_DIS_FLAGS_SET_REQ_RESP(flag, val) WMI_SET_BITS(flag, 4, 1, val)
  35410. /* 0: iTWT; 1: bTWT */
  35411. #define TWT_EN_DIS_FLAGS_GET_I_B_TWT(flag) WMI_GET_BITS(flag, 5, 1)
  35412. #define TWT_EN_DIS_FLAGS_SET_I_B_TWT(flag, val) WMI_SET_BITS(flag, 5, 1, val)
  35413. /* 0: bTWT; 1: rTWT */
  35414. #define TWT_EN_DIS_FLAGS_GET_B_R_TWT(flag) WMI_GET_BITS(flag, 6, 1)
  35415. #define TWT_EN_DIS_FLAGS_SET_B_R_TWT(flag, val) WMI_SET_BITS(flag, 6, 1, val)
  35416. /*
  35417. * disable autonomous bTWT session delete feature
  35418. * This feature will delete client triggered session when number of clients
  35419. * joined decreases to 0.
  35420. */
  35421. #define TWT_EN_DIS_FLAGS_GET_DIS_BTWT_AUTO_DELETE(flag) \
  35422. WMI_GET_BITS(flag, 7, 1)
  35423. #define TWT_EN_DIS_FLAGS_SET_DIS_BTWT_AUTO_DELETE(flag, val) \
  35424. WMI_SET_BITS(flag, 7, 1, val)
  35425. typedef struct {
  35426. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_cmd_fixed_param */
  35427. /** 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
  35428. */
  35429. A_UINT32 pdev_id;
  35430. A_UINT32 sta_cong_timer_ms; /* STA TWT congestion timer TO value in terms of ms */
  35431. A_UINT32 mbss_support; /* Reserved */
  35432. A_UINT32 default_slot_size; /* This is the default value for the TWT slot setup by AP (units = microseconds) */
  35433. A_UINT32 congestion_thresh_setup; /* Minimum congestion required to start setting up TWT sessions */
  35434. /*
  35435. * The congestion parameters below are in percent of occupied airtime.
  35436. */
  35437. A_UINT32 congestion_thresh_teardown; /* Minimum congestion below which TWT will be torn down */
  35438. A_UINT32 congestion_thresh_critical; /* Threshold above which TWT will not be active */
  35439. /*
  35440. * The interference parameters below use an abstract method of evaluating
  35441. * interference. The parameters are in percent, ranging from 0 for no
  35442. * interference, to 100 for interference extreme enough to completely
  35443. * block the signal of interest.
  35444. */
  35445. A_UINT32 interference_thresh_teardown; /* Minimum interference above that TWT will not be active */
  35446. A_UINT32 interference_thresh_setup; /* Minimum interference below that TWT session can be setup */
  35447. A_UINT32 min_no_sta_setup; /* Minimum no of STA required to start TWT setup */
  35448. A_UINT32 min_no_sta_teardown; /* Minimum no of STA below which TWT will be torn down */
  35449. A_UINT32 no_of_bcast_mcast_slots; /* Number of default slot sizes reserved for BCAST/MCAST delivery */
  35450. A_UINT32 min_no_twt_slots; /* Minimum no of available slots for TWT to be operational */
  35451. 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) */
  35452. /*
  35453. * The below interval parameters have units of milliseconds.
  35454. */
  35455. A_UINT32 mode_check_interval; /* Interval between two successive check to decide the mode of TWT */
  35456. A_UINT32 add_sta_slot_interval; /* Interval between decisions making to create TWT slots for STAs */
  35457. A_UINT32 remove_sta_slot_interval; /* Interval between decisions making to remove TWT slot of STAs */
  35458. A_UINT32 flags; /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
  35459. } wmi_twt_enable_cmd_fixed_param;
  35460. /* status code of enabling TWT */
  35461. typedef enum _WMI_ENABLE_TWT_STATUS_T {
  35462. WMI_ENABLE_TWT_STATUS_OK, /* enabling TWT successfully completed */
  35463. WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED, /* TWT already enabled */
  35464. WMI_ENABLE_TWT_STATUS_NOT_READY, /* FW not ready for enabling TWT */
  35465. WMI_ENABLE_TWT_INVALID_PARAM, /* invalid parameters */
  35466. WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR, /* enabling TWT failed with an unknown reason */
  35467. } WMI_ENABLE_TWT_STATUS_T;
  35468. typedef struct {
  35469. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_complete_event_fixed_param */
  35470. /** 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 */
  35471. A_UINT32 pdev_id;
  35472. A_UINT32 status; /* WMI_ENABLE_TWT_STATUS_T */
  35473. } wmi_twt_enable_complete_event_fixed_param;
  35474. typedef struct {
  35475. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_cmd_fixed_param */
  35476. /** 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 */
  35477. A_UINT32 pdev_id; /* host should never set it to WMI_PDEV_ID_SOC */
  35478. A_UINT32 flags; /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
  35479. A_UINT32 reason_code; /* refer to WMI_DISABLE_TWT_REASON_T */
  35480. } wmi_twt_disable_cmd_fixed_param;
  35481. typedef struct {
  35482. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_complete_event_fixed_param */
  35483. A_UINT32 pdev_id;
  35484. A_UINT32 status; /* refer to WMI_DISABLE_TWT_STATUS_T enum */
  35485. } wmi_twt_disable_complete_event_fixed_param;
  35486. typedef struct {
  35487. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_vdev_config_cmd_fixed_param */
  35488. /** pdev_id for identifying the MAC.
  35489. * See macros starting with WMI_PDEV_ID_ for values.
  35490. */
  35491. A_UINT32 pdev_id;
  35492. A_UINT32 vdev_id;
  35493. /* TWT support flag to be applied to the vdev
  35494. * 0 = ITWT, BTWT and RTWT are disabled.
  35495. * 1 = ITWT is enabled
  35496. * 2 = ITWT and BTWT are enabled
  35497. * 3 = ITWT, BTWT and RTWT are enabled
  35498. */
  35499. A_UINT32 twt_support;
  35500. } wmi_twt_vdev_config_cmd_fixed_param;
  35501. /* status code of TWT Disable */
  35502. typedef enum _WMI_DISABLE_TWT_STATUS_T {
  35503. WMI_DISABLE_TWT_STATUS_OK, /* Disabling TWT successfully completed */
  35504. WMI_DISABLE_TWT_STATUS_ROAM_IN_PROGRESS, /* Roaming in progress */
  35505. WMI_DISABLE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35506. WMI_DISABLE_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35507. } WMI_DISABLE_TWT_STATUS_T;
  35508. /* Host reason code of TWT Disable command : Set by Host */
  35509. typedef enum _WMI_DISABLE_TWT_REASON_T {
  35510. /* Host will set one of below reason code while disabling TWT */
  35511. WMI_DISABLE_TWT_REASON_NONE, /* Normal case */
  35512. WMI_DISABLE_TWT_REASON_CONCURRENCY_SCC, /* Concurrency case SCC */
  35513. WMI_DISABLE_TWT_REASON_CONCURRENCY_MCC, /* Concurrency case MCC */
  35514. WMI_DISABLE_TWT_REASON_CHANGE_CONGESTION_TIMEOUT, /* To change congestion time */
  35515. WMI_DISABLE_TWT_REASON_P2P_GO_NOA, /* P2P GO NOA reason */
  35516. } WMI_DISABLE_TWT_REASON_T;
  35517. /* Notification event ID to Host */
  35518. typedef enum _WMI_TWT_NOTIFICATION_ID_T {
  35519. WMI_TWT_NOTIFY_EVENT_READY = 1,
  35520. WMI_TWT_NOTIFY_EVENT_AP_TWT_REQ_BIT_SET = 2,
  35521. WMI_TWT_NOTIFY_EVENT_AP_TWT_REQ_BIT_CLEAR = 3,
  35522. } WMI_TWT_NOTIFICATION_ID_T;
  35523. typedef struct {
  35524. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_notify_event_fixed_param */
  35525. A_UINT32 vdev_id; /* vdev id of TWT notify event */
  35526. A_UINT32 event_id; /* refer to WMI_TWT_NOTIFICATION_ID_T */
  35527. } wmi_twt_notify_event_fixed_param;
  35528. /* from IEEE 802.11ah section 9.4.2.200 */
  35529. typedef enum _WMI_TWT_COMMAND_T {
  35530. WMI_TWT_COMMAND_REQUEST_TWT = 0,
  35531. WMI_TWT_COMMAND_SUGGEST_TWT = 1,
  35532. WMI_TWT_COMMAND_DEMAND_TWT = 2,
  35533. WMI_TWT_COMMAND_TWT_GROUPING = 3,
  35534. WMI_TWT_COMMAND_ACCEPT_TWT = 4,
  35535. WMI_TWT_COMMAND_ALTERNATE_TWT = 5,
  35536. WMI_TWT_COMMAND_DICTATE_TWT = 6,
  35537. WMI_TWT_COMMAND_REJECT_TWT = 7,
  35538. } WMI_TWT_COMMAND_T;
  35539. /* TWT command, refer to WMI_TWT_COMMAND_T */
  35540. #define TWT_FLAGS_GET_CMD(flag) WMI_GET_BITS(flag, 0, 8)
  35541. #define TWT_FLAGS_SET_CMD(flag, val) WMI_SET_BITS(flag, 0, 8, val)
  35542. /* 0 means Individual TWT, 1 means Broadcast TWT */
  35543. #define TWT_FLAGS_GET_BROADCAST(flag) WMI_GET_BITS(flag, 8, 1)
  35544. #define TWT_FLAGS_SET_BROADCAST(flag, val) WMI_SET_BITS(flag, 8, 1, val)
  35545. /* 0 means non-Trigger-enabled TWT, 1 means means Trigger-enabled TWT */
  35546. #define TWT_FLAGS_GET_TRIGGER(flag) WMI_GET_BITS(flag, 9, 1)
  35547. #define TWT_FLAGS_SET_TRIGGER(flag, val) WMI_SET_BITS(flag, 9, 1, val)
  35548. /* flow type 0 means announced TWT, 1 means un-announced TWT */
  35549. #define TWT_FLAGS_GET_FLOW_TYPE(flag) WMI_GET_BITS(flag, 10, 1)
  35550. #define TWT_FLAGS_SET_FLOW_TYPE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  35551. /* 0 means TWT protection is required, 1 means TWT protection is not required */
  35552. #define TWT_FLAGS_GET_PROTECTION(flag) WMI_GET_BITS(flag, 11, 1)
  35553. #define TWT_FLAGS_SET_PROTECTION(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  35554. /* B-TWT ID 0: 0 means non-0 B-TWT ID or I-TWT, 1 means B-TWT ID 0 */
  35555. #define TWT_FLAGS_GET_BTWT_ID0(flag) WMI_GET_BITS(flag, 12, 1)
  35556. #define TWT_FLAGS_SET_BTWT_ID0(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  35557. /* 0 means TWT Information frame is enabled, 1 means TWT Information frame is disabled */
  35558. #define TWT_FLAGS_GET_TWT_INFO_FRAME_DISABLED(flag) WMI_GET_BITS(flag, 13, 1)
  35559. #define TWT_FLAGS_SET_TWT_INFO_FRAME_DISABLED(flag, val) WMI_SET_BITS(flag, 13, 1, val)
  35560. /*
  35561. * 1 means PM_RESPONDER_MODE information sent in BIT15 is valid, 0 means it is not valid.
  35562. * Will be used for backward compatibility if host uses older FW versions
  35563. * then value will be 0 so host will not consider the BIT15 value.
  35564. */
  35565. #define TWT_FLAGS_GET_PM_RESPONDER_MODE_VALID(flag) WMI_GET_BITS(flag, 14, 1)
  35566. #define TWT_FLAGS_SET_PM_RESPONDER_MODE_VALID(flag, val) WMI_SET_BITS(flag, 14, 1, val)
  35567. /* 1 means PM_RESPONDER_MODE supported, 0 means not supported */
  35568. #define TWT_FLAGS_GET_PM_RESPONDER_MODE(flag) WMI_GET_BITS(flag, 15, 1)
  35569. #define TWT_FLAGS_SET_PM_RESPONDER_MODE(flag, val) WMI_SET_BITS(flag, 15, 1, val)
  35570. typedef struct {
  35571. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_ack_event_fixed_param */
  35572. A_UINT32 vdev_id; /* VDEV identifier */
  35573. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35574. A_UINT32 dialog_id; /* TWT dialog ID */
  35575. A_UINT32 twt_cmd; /* TWT command for which this ack is sent */
  35576. A_UINT32 status; /* Status code corresponding to twt_cmd.
  35577. * This status field contains a value from the
  35578. * status enum corresponding to the twt_cmd type
  35579. * (WMI_ADD_TWT_STATUS_T, WMI_DEL_TWT_STATUS_T,
  35580. * WMI_PAUSE_TWT_STATUS_T, etc.)
  35581. */
  35582. } wmi_twt_ack_event_fixed_param;
  35583. typedef struct {
  35584. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_cmd_fixed_param */
  35585. A_UINT32 vdev_id; /* VDEV identifier */
  35586. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35587. A_UINT32 dialog_id; /* TWT dialog_id (< 0xFF) is per peer, I-TWT & B-TWT use different diaglog ID */
  35588. /* 1. wake_intvl_mantis must be <= 0xFFFF
  35589. * 2. wake_intvl_us must be divided evenly by wake_intvl_mantis,
  35590. * i.e., wake_intvl_us % wake_intvl_mantis == 0
  35591. * 3. the quotient of wake_intvl_us/wake_intvl_mantis must be 2 to N-th(0<=N<=31) power,
  35592. * i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
  35593. */
  35594. A_UINT32 wake_intvl_us; /* TWT Wake Interval in units of us */
  35595. A_UINT32 wake_intvl_mantis; /* TWT Wake Interval Mantissa */
  35596. /* wake_dura_us must be divided evenly by 256, i.e., wake_dura_us % 256 == 0 */
  35597. A_UINT32 wake_dura_us; /* TWT Wake Duration in units of us, must be <= 65280 (0xFF00) */
  35598. A_UINT32 sp_offset_us; /* this long time after TWT setup the 1st SP will start */
  35599. A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
  35600. /* Broadcast TWT(B-TWT) Persistence, when used in Add/update Dialog,
  35601. * indicates for how long(in units of TBTTs) current B-TWT session
  35602. * parameters will not be changed.
  35603. * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
  35604. */
  35605. A_UINT32 b_twt_persistence;
  35606. /* Broadcast TWT(B-TWT) Recommendation, refer to section
  35607. * "9.4.2.199 TWT element" of latest 11ax draft
  35608. */
  35609. A_UINT32 b_twt_recommendation;
  35610. /* Min tolerance limit of wake interval.
  35611. * If this variable is set to 0 by host, FW will ignore it.
  35612. */
  35613. A_UINT32 min_wake_intvl_us;
  35614. /* Max tolerance limit of wake interval.
  35615. * If this variable is set to 0 by host, FW will ignore it.
  35616. */
  35617. A_UINT32 max_wake_intvl_us;
  35618. /* Min tolerance limit of wake duration.
  35619. * If this variable is set to 0 by host, FW will ignore it.
  35620. */
  35621. A_UINT32 min_wake_dura_us;
  35622. /* Max tolerance limit of wake duration.
  35623. * If this variable is set to 0 by host, FW will ignore it.
  35624. */
  35625. A_UINT32 max_wake_dura_us;
  35626. /*
  35627. * Service period start TSF (absolute)
  35628. * If sp_start_tsf_lo == sp_start_tsf_hi == 0, the specification
  35629. * is invalid, and shall be ignored.
  35630. */
  35631. A_UINT32 sp_start_tsf_lo; /* bits 31:0 */
  35632. A_UINT32 sp_start_tsf_hi; /* bits 63:32 */
  35633. /*
  35634. * In announced mode, wait for announce timeout before explicit announce
  35635. * using QoS NULL.
  35636. * If set to 0, FW will send QoS NULL immediately.
  35637. */
  35638. A_UINT32 announce_timeout_us;
  35639. A_UINT32 link_id_bitmap;
  35640. /* parameters required for R-TWT feature */
  35641. A_UINT32 r_twt_dl_tid_bitmap;
  35642. A_UINT32 r_twt_ul_tid_bitmap;
  35643. } wmi_twt_add_dialog_cmd_fixed_param;
  35644. /* status code of adding TWT dialog */
  35645. typedef enum _WMI_ADD_TWT_STATUS_T {
  35646. WMI_ADD_TWT_STATUS_OK, /* adding TWT dialog successfully completed */
  35647. WMI_ADD_TWT_STATUS_TWT_NOT_ENABLED, /* TWT not enabled */
  35648. WMI_ADD_TWT_STATUS_USED_DIALOG_ID, /* TWT dialog ID is already used */
  35649. WMI_ADD_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35650. WMI_ADD_TWT_STATUS_NOT_READY, /* FW not ready */
  35651. WMI_ADD_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35652. WMI_ADD_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35653. WMI_ADD_TWT_STATUS_NO_RESPONSE, /* peer AP did not send the response frame */
  35654. WMI_ADD_TWT_STATUS_DENIED, /* AP did not accept the request */
  35655. WMI_ADD_TWT_STATUS_UNKNOWN_ERROR, /* adding TWT dialog failed with an unknown reason */
  35656. WMI_ADD_TWT_STATUS_AP_PARAMS_NOT_IN_RANGE, /* peer AP wake interval, duration not in range */
  35657. WMI_ADD_TWT_STATUS_AP_IE_VALIDATION_FAILED, /* peer AP IE Validation Failed */
  35658. WMI_ADD_TWT_STATUS_ROAM_IN_PROGRESS, /* Roaming in progress */
  35659. WMI_ADD_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35660. WMI_ADD_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35661. WMI_ADD_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35662. WMI_ADD_TWT_STATUS_BTWT_NOT_ENBABLED, /* Broadcast TWT is not enabled */
  35663. WMI_ADD_TWT_STATUS_RTWT_NOT_ENBABLED, /* Restricted TWT is not enabled */
  35664. WMI_ADD_TWT_STATUS_LINK_SWITCH_IN_PROGRESS, /* Link switch is ongoing */
  35665. WMI_ADD_TWT_STATUS_UNSUPPORTED_MODE_MLMR, /* Unsupported in MLMR mode */
  35666. } WMI_ADD_TWT_STATUS_T;
  35667. typedef struct {
  35668. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_additional_params */
  35669. A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
  35670. A_UINT32 wake_dur_us; /* Wake duration in uS */
  35671. A_UINT32 wake_intvl_us; /* Wake Interval in uS */
  35672. A_UINT32 sp_offset_us; /* SP Starting Offset */
  35673. A_UINT32 sp_tsf_us_lo; /* SP start TSF bits 31:0 */
  35674. A_UINT32 sp_tsf_us_hi; /* SP start TSF bits 63:32 */
  35675. } wmi_twt_add_dialog_additional_params;
  35676. typedef struct {
  35677. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_complete_event_fixed_param */
  35678. A_UINT32 vdev_id; /* VDEV identifier */
  35679. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35680. A_UINT32 dialog_id; /* TWT dialog ID */
  35681. A_UINT32 status; /* refer to WMI_ADD_TWT_STATUS_T */
  35682. /*
  35683. * This fixed_param TLV is followed by the below TLVs:
  35684. * wmi_twt_add_dialog_additional_params twt_params[]; // TWT params received
  35685. * // from peer
  35686. */
  35687. } wmi_twt_add_dialog_complete_event_fixed_param;
  35688. typedef struct {
  35689. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_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 */
  35693. /* Broadcast TWT(B-TWT) Persistence, when used in Del Dialog,
  35694. * indicates for how long(in units of TBTTs) current B-TWT session
  35695. * parameters will be present.
  35696. * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
  35697. */
  35698. A_UINT32 b_twt_persistence;
  35699. A_UINT32 is_bcast_twt;
  35700. } wmi_twt_del_dialog_cmd_fixed_param;
  35701. /* status code of deleting TWT dialog */
  35702. typedef enum _WMI_DEL_TWT_STATUS_T {
  35703. WMI_DEL_TWT_STATUS_OK, /* deleting TWT dialog successfully completed */
  35704. WMI_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35705. WMI_DEL_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35706. WMI_DEL_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35707. WMI_DEL_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35708. WMI_DEL_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35709. WMI_DEL_TWT_STATUS_UNKNOWN_ERROR, /* deleting TWT dialog failed with an unknown reason */
  35710. WMI_DEL_TWT_STATUS_PEER_INIT_TEARDOWN, /* Peer Initiated Teardown */
  35711. WMI_DEL_TWT_STATUS_ROAMING, /* Reason Roaming Start*/
  35712. WMI_DEL_TWT_STATUS_CONCURRENCY, /* Teardown due to concurrency */
  35713. WMI_DEL_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35714. WMI_DEL_TWT_STATUS_SCAN_IN_PROGRESS, /* Reason Scan in progress */
  35715. WMI_DEL_TWT_STATUS_CHANGE_CONGESTION_TIMEOUT, /* Congestion timeout changed */
  35716. WMI_DEL_TWT_STATUS_P2P_GO_NOA, /* P2P GO NOA */
  35717. } WMI_DEL_TWT_STATUS_T;
  35718. typedef struct {
  35719. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_complete_event_fixed_param */
  35720. A_UINT32 vdev_id; /* VDEV identifier */
  35721. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35722. A_UINT32 dialog_id; /* TWT dialog ID */
  35723. A_UINT32 status; /* refer to WMI_DEL_TWT_STATUS_T */
  35724. } wmi_twt_del_dialog_complete_event_fixed_param;
  35725. typedef struct {
  35726. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_cmd_fixed_param */
  35727. A_UINT32 vdev_id; /* VDEV identifier */
  35728. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35729. A_UINT32 dialog_id; /* TWT dialog ID */
  35730. } wmi_twt_pause_dialog_cmd_fixed_param;
  35731. /* status code of pausing TWT dialog */
  35732. typedef enum _WMI_PAUSE_TWT_STATUS_T {
  35733. WMI_PAUSE_TWT_STATUS_OK, /* pausing TWT dialog successfully completed */
  35734. WMI_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35735. WMI_PAUSE_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35736. WMI_PAUSE_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35737. WMI_PAUSE_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35738. WMI_PAUSE_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35739. WMI_PAUSE_TWT_STATUS_UNKNOWN_ERROR, /* pausing TWT dialog failed with an unknown reason */
  35740. WMI_PAUSE_TWT_STATUS_ALREADY_PAUSED, /* The TWT dialog is already paused */
  35741. WMI_PAUSE_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
  35742. WMI_PAUSE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35743. WMI_PAUSE_TWT_STATUS_ROAM_IN_PROGRESS, /* Roam in progress */
  35744. WMI_PAUSE_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35745. } WMI_PAUSE_TWT_STATUS_T;
  35746. typedef struct {
  35747. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_complete_event_fixed_param */
  35748. A_UINT32 vdev_id; /* VDEV identifier */
  35749. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35750. A_UINT32 dialog_id; /* TWT dialog ID */
  35751. A_UINT32 status; /* refer to WMI_PAUSE_TWT_STATUS_T */
  35752. } wmi_twt_pause_dialog_complete_event_fixed_param;
  35753. typedef struct {
  35754. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_cmd_fixed_param */
  35755. A_UINT32 vdev_id; /* VDEV identifier */
  35756. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35757. A_UINT32 dialog_id; /* TWT dialog ID */
  35758. A_UINT32 sp_offset_us; /* this long time after TWT resumed the 1st SP will start */
  35759. A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax section "9.4.1.60 TWT Information field" */
  35760. } wmi_twt_resume_dialog_cmd_fixed_param;
  35761. /* status code of resuming TWT dialog */
  35762. typedef enum _WMI_RESUME_TWT_STATUS_T {
  35763. WMI_RESUME_TWT_STATUS_OK, /* resuming TWT dialog successfully completed */
  35764. WMI_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35765. WMI_RESUME_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35766. WMI_RESUME_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35767. WMI_RESUME_TWT_STATUS_NOT_PAUSED, /* dialog not paused currently */
  35768. WMI_RESUME_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35769. WMI_RESUME_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35770. WMI_RESUME_TWT_STATUS_UNKNOWN_ERROR, /* resuming TWT dialog failed with an unknown reason */
  35771. WMI_RESUME_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
  35772. WMI_RESUME_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35773. WMI_RESUME_TWT_STATUS_ROAM_IN_PROGRESS, /* Roam in progress */
  35774. WMI_RESUME_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35775. } WMI_RESUME_TWT_STATUS_T;
  35776. typedef struct {
  35777. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param */
  35778. A_UINT32 vdev_id; /* VDEV identifier */
  35779. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35780. A_UINT32 dialog_id; /* TWT dialog ID */
  35781. A_UINT32 status; /* refer to WMI_RESUME_TWT_STATUS_T */
  35782. } wmi_twt_resume_dialog_complete_event_fixed_param;
  35783. typedef struct {
  35784. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_nudge_dialog_cmd_fixed_param */
  35785. A_UINT32 vdev_id; /* VDEV identifier */
  35786. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35787. A_UINT32 dialog_id; /* TWT dialog ID */
  35788. A_UINT32 suspend_duration_ms; /* this long time after TWT paused the 1st SP will start (millisecond) */
  35789. A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax section "9.4.1.60 TWT Information field" */
  35790. A_INT32 sp_start_offset; /* Next TWT service period will be offset by this time (microsecond) */
  35791. } wmi_twt_nudge_dialog_cmd_fixed_param;
  35792. /* status code of nudging TWT dialog */
  35793. typedef enum _WMI_TWT_NUDGE_STATUS_T {
  35794. WMI_NUDGE_TWT_STATUS_OK, /* nudging TWT dialog successfully completed */
  35795. WMI_NUDGE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID doesn't exist */
  35796. WMI_NUDGE_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  35797. WMI_NUDGE_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35798. WMI_NUDGE_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35799. WMI_NUDGE_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  35800. WMI_NUDGE_TWT_STATUS_UNKNOWN_ERROR, /* nudging TWT dialog failed with an unknown reason */
  35801. WMI_NUDGE_TWT_STATUS_ALREADY_PAUSED, /* The TWT dialog is already paused */
  35802. WMI_NUDGE_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
  35803. WMI_NUDGE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
  35804. WMI_NUDGE_TWT_STATUS_ROAM_IN_PROGRESS, /* Roam in progress */
  35805. WMI_NUDGE_TWT_STATUS_SCAN_IN_PROGRESS, /* Scan in progress */
  35806. } WMI_TWT_NUDGE_STATUS_T;
  35807. typedef struct {
  35808. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_nudge_dialog_complete_event_fixed_param */
  35809. A_UINT32 vdev_id; /* VDEV identifier */
  35810. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35811. A_UINT32 dialog_id; /* TWT dialog ID */
  35812. A_UINT32 status; /* refer to WMI_NUDGE_TWT_STATUS_T */
  35813. A_UINT32 sp_tsf_us_lo; /* SP resume TSF bits 31:0 */
  35814. A_UINT32 sp_tsf_us_hi; /* SP resume TSF bits 63:32 */
  35815. } wmi_twt_nudge_dialog_complete_event_fixed_param;
  35816. typedef struct {
  35817. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_btwt_invite_sta_cmd_fixed_param */
  35818. A_UINT32 vdev_id; /* VDEV identifier */
  35819. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35820. A_UINT32 dialog_id; /* TWT dialog ID */
  35821. /* parameters required for R-TWT feature */
  35822. A_UINT32 r_twt_dl_tid_bitmap;
  35823. A_UINT32 r_twt_ul_tid_bitmap;
  35824. } wmi_twt_btwt_invite_sta_cmd_fixed_param;
  35825. /* status code of inviting STA to B-TWT dialog */
  35826. typedef enum _WMI_TWT_BTWT_INVITE_STA_STATUS_T {
  35827. WMI_TWT_BTWT_INVITE_STA_STATUS_OK, /* inviting STA to B-TWT successfully completed */
  35828. WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35829. WMI_TWT_BTWT_INVITE_STA_STATUS_INVALID_PARAM, /* invalid parameters */
  35830. WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35831. WMI_TWT_BTWT_INVITE_STA_STATUS_ALREADY_JOINED, /* peer STA already joined the session */
  35832. WMI_TWT_BTWT_INVITE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35833. WMI_TWT_BTWT_INVITE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */
  35834. WMI_TWT_BTWT_INVITE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */
  35835. } WMI_TWT_BTWT_INVITE_STA_STATUS_T;
  35836. typedef struct {
  35837. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_invite_sta_complete_event_fixed_param */
  35838. A_UINT32 vdev_id; /* VDEV identifier */
  35839. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35840. A_UINT32 dialog_id; /* TWT dialog ID */
  35841. A_UINT32 status; /* refer to WMI_TWT_BTWT_INVITE_STA_STATUS_T */
  35842. } wmi_twt_btwt_invite_sta_complete_event_fixed_param;
  35843. typedef struct {
  35844. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_cmd_fixed_param */
  35845. A_UINT32 vdev_id; /* VDEV identifier */
  35846. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35847. A_UINT32 dialog_id; /* TWT dialog ID */
  35848. /* parameters required for R-TWT feature */
  35849. A_UINT32 r_twt_dl_tid_bitmap;
  35850. A_UINT32 r_twt_ul_tid_bitmap;
  35851. } wmi_twt_btwt_remove_sta_cmd_fixed_param;
  35852. /* status code of removing STA from B-TWT dialog */
  35853. typedef enum _WMI_TWT_BTWT_REMOVE_STA_STATUS_T {
  35854. WMI_TWT_BTWT_REMOVE_STA_STATUS_OK, /* removing STA from B-TWT successfully completed */
  35855. WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  35856. WMI_TWT_BTWT_REMOVE_STA_STATUS_INVALID_PARAM, /* invalid parameters */
  35857. WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  35858. WMI_TWT_BTWT_REMOVE_STA_STATUS_NOT_JOINED, /* peer STA not joined yet */
  35859. WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */
  35860. WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */
  35861. WMI_TWT_BTWT_REMOVE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */
  35862. } WMI_TWT_BTWT_REMOVE_STA_STATUS_T;
  35863. typedef struct {
  35864. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_complete_event_fixed_param */
  35865. A_UINT32 vdev_id; /* VDEV identifier */
  35866. wmi_mac_addr peer_macaddr; /* peer MAC address */
  35867. A_UINT32 dialog_id; /* TWT dialog ID */
  35868. A_UINT32 status; /* refer to WMI_TWT_BTWT_REMOVE_STA_STATUS_T */
  35869. } wmi_twt_btwt_remove_sta_complete_event_fixed_param;
  35870. typedef enum {
  35871. WMI_DMA_RING_CONFIG_MODULE_SPECTRAL,
  35872. WMI_DMA_RING_CONFIG_MODULE_RTT,
  35873. WMI_DMA_RING_CONFIG_MODULE_CV_UPLOAD,
  35874. WMI_DMA_RING_CONFIG_MODULE_WIFI_RADAR,
  35875. } WMI_DMA_RING_SUPPORTED_MODULE;
  35876. typedef struct {
  35877. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_DMA_RING_CAPABILITIES */
  35878. A_UINT32 pdev_id;
  35879. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  35880. A_UINT32 ring_elems_min; /* minimum spaces in the DMA ring for this pdev */
  35881. A_UINT32 min_buf_size; /* minimum size in bytes of each buffer in the DMA ring */
  35882. A_UINT32 min_buf_align; /* minimum alignment in bytes of each buffer in the DMA ring */
  35883. /**************************************************************************
  35884. * DON'T ADD ANY FURTHER FIELDS HERE -
  35885. * It would cause the size of the READY_EXT message within some targets
  35886. * to exceed the size of the buffer used for the message.
  35887. **************************************************************************/
  35888. } WMI_DMA_RING_CAPABILITIES;
  35889. typedef struct {
  35890. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_ wmi_chan_rf_characterization_info */
  35891. /**
  35892. * [7:0] : channel metric - 0 = unusable, 1 = worst, 100 = best
  35893. * [11:8] : channel BW - This bit-field uses values compatible with
  35894. * enum definitions used internally within the target's
  35895. * halphy code. This bit field uses wmi_channel_width.
  35896. * [15:12]: Reserved
  35897. * [31:16]: Frequency - Center frequency of the channel for which
  35898. * the RF characterisation info applies (MHz)
  35899. */
  35900. A_UINT32 freq_info;
  35901. /**************************************************************************
  35902. * DON'T ADD ANY FURTHER FIELDS HERE -
  35903. * It would cause the size of the READY_EXT message within some targets
  35904. * to exceed the size of the buffer used for the message.
  35905. **************************************************************************/
  35906. } WMI_CHAN_RF_CHARACTERIZATION_INFO;
  35907. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC 0x000000ff
  35908. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC_S 0
  35909. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW 0x00000f00
  35910. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S 8
  35911. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ 0xffff0000
  35912. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ_S 16
  35913. #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_SET(dword,val) \
  35914. WMI_F_RMW((dword)->freq_info,(val), \
  35915. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
  35916. #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_GET(dword) \
  35917. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
  35918. #define WMI_CHAN_RF_CHARACTERIZATION_BW_SET(dword, val) \
  35919. WMI_F_RMW((dword)->freq_info,(val), \
  35920. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
  35921. #define WMI_CHAN_RF_CHARACTERIZATION_BW_GET(dword) \
  35922. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
  35923. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_SET(dword, val) \
  35924. WMI_F_RMW((dword)->freq_info,(val), \
  35925. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
  35926. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_GET(dword) \
  35927. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
  35928. typedef struct {
  35929. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_COEX_FIX_CHANNEL_CAPABILITIES */
  35930. /**************************************************************************
  35931. * 1: SAP fix channel has higher priority than ACS
  35932. * 0: SAP fix channel has lower priority than ACS
  35933. **************************************************************************/
  35934. A_UINT32 fix_channel_priority;
  35935. } WMI_COEX_FIX_CHANNEL_CAPABILITIES;
  35936. #define WMI_DMA_RING_PADDR_LO_S 0
  35937. #define WMI_DMA_RING_PADDR_LO 0xffffffff
  35938. #define WMI_DMA_RING_BASE_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  35939. #define WMI_DMA_RING_BASE_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  35940. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  35941. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  35942. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  35943. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  35944. #define WMI_DMA_RING_PADDR_HI_S 0
  35945. #define WMI_DMA_RING_PADDR_HI 0xffff
  35946. #define WMI_DMA_RING_BASE_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  35947. #define WMI_DMA_RING_BASE_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  35948. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  35949. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  35950. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  35951. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  35952. typedef struct {
  35953. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_req_fixed_param */
  35954. A_UINT32 pdev_id;
  35955. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  35956. /**
  35957. * Bits 31:0: base address of ring [31:0]
  35958. */
  35959. A_UINT32 base_paddr_lo;
  35960. /**
  35961. * Bits 15:0: base address of ring [47:32]
  35962. * Bits 31:16: reserved (set to 0x0)
  35963. */
  35964. A_UINT32 base_paddr_hi;
  35965. /**
  35966. * Bits 31:0: address of head index [31:0]
  35967. */
  35968. A_UINT32 head_idx_paddr_lo;
  35969. /**
  35970. * Bits 15:0: address of head index [47:32]
  35971. * Bits 31:16: reserved (set to 0x0)
  35972. */
  35973. A_UINT32 head_idx_paddr_hi;
  35974. /**
  35975. * Bits 31:0: address of tail index [31:0]
  35976. */
  35977. A_UINT32 tail_idx_paddr_lo;
  35978. /**
  35979. * Bits 15:0: address of tail index [47:32]
  35980. * Bits 31:16: reserved (set to 0x0)
  35981. */
  35982. A_UINT32 tail_idx_paddr_hi;
  35983. A_UINT32 num_elems; /** Number of elems in the ring */
  35984. A_UINT32 buf_size; /** size of allocated buffer in bytes */
  35985. A_UINT32 num_resp_per_event; /** Number of wmi_dma_buf_release_entry packed together */
  35986. /**
  35987. * This parameter specifies the timeout in milliseconds.
  35988. * Target should timeout and send whatever resp it has if this time expires.
  35989. */
  35990. A_UINT32 event_timeout_ms;
  35991. } wmi_dma_ring_cfg_req_fixed_param;
  35992. typedef struct {
  35993. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_rsp_fixed_param */
  35994. A_UINT32 pdev_id;
  35995. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  35996. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  35997. } wmi_dma_ring_cfg_rsp_fixed_param;
  35998. typedef struct {
  35999. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_fixed_param */
  36000. A_UINT32 pdev_id; /** ID of pdev whose DMA ring produced the data */
  36001. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  36002. A_UINT32 num_buf_release_entry;
  36003. A_UINT32 num_meta_data_entry;
  36004. /* This TLV is followed by another TLV of array of structs.
  36005. * wmi_dma_buf_release_entry entries[num_buf_release_entry];
  36006. * wmi_dma_buf_release_spectral_meta_data meta_datat[num_meta_data_entry];
  36007. * wmi_dma_buf_release_cv_upload_meta_data cv_meta_data[num_meta_data_entry]
  36008. * wmi_dma_buf_release_cqi_upload_meta_data
  36009. * cqi_meta_data[num_meta_data_entry]
  36010. * wmi_dma_buf_release_wifi_radar_meta_data
  36011. * wifi_radar_meta_data[num_meta_data_entry]
  36012. */
  36013. } wmi_dma_buf_release_fixed_param;
  36014. typedef struct {
  36015. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_entry */
  36016. /**
  36017. * Bits 31:0: address of data [31:0]
  36018. */
  36019. A_UINT32 paddr_lo;
  36020. /**
  36021. * Bits 11:0: address of data [43:32]
  36022. * Bits 31:12: host context data [19:0]
  36023. */
  36024. A_UINT32 paddr_hi;
  36025. } wmi_dma_buf_release_entry;
  36026. typedef struct {
  36027. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_spectral_meta_data */
  36028. /**
  36029. * meta data information.
  36030. * Host uses the noise floor values as one of the major parameter
  36031. * to classify the spectral data.
  36032. * This information will not be provided by ucode unlike the fft reports
  36033. * which gets DMAed to DDR buffer.
  36034. * Hence sending the NF values in dBm units as meta data information.
  36035. */
  36036. A_INT32 noise_floor[WMI_MAX_CHAINS];
  36037. /**
  36038. * The time taken by target in micro seconds to complete the reset routine
  36039. * and re-initiate the spectral scan.
  36040. * If the delay is 0, the WAR to bookkeep the timestamp won't be exercised
  36041. * in HOST.
  36042. */
  36043. A_UINT32 reset_delay;
  36044. /**
  36045. * Current center freq1 (MHz units)
  36046. */
  36047. A_UINT32 freq1;
  36048. /**
  36049. * Current center freq2 (MHz units)
  36050. */
  36051. A_UINT32 freq2;
  36052. /**
  36053. * Channel Width (MHz units)
  36054. */
  36055. A_UINT32 ch_width;
  36056. } wmi_dma_buf_release_spectral_meta_data;
  36057. typedef enum {
  36058. NO_SCALING = 0, /* No bin scaling*/
  36059. /**
  36060. * scaled_bin_mag = bin_mag *
  36061. * sqrt(10^(max(legacy_max_gain - default_agc_max_gain + low_level_offset - RSSI_corr,
  36062. * (agc_total_gain_db < default_agc_max_gain) * high_level_offset)/10)) *
  36063. * 2^(DET{0,1,2}_SPECTRAL_SCAN_BIN_SCALE - legacy_spectral_scan_bin_scale)
  36064. */
  36065. AGC_GAIN_RSSI_CORR_BASED = 1,
  36066. } WMI_SPECTRAL_SCALING_FORMULA_ID;
  36067. typedef struct {
  36068. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_bin_scaling_params */
  36069. A_UINT32 pdev_id; /* ID of pdev to which the scaling parameters are to be applied */
  36070. WMI_SPECTRAL_SCALING_FORMULA_ID formula_id; /* Represets the formula to be used */
  36071. A_UINT32 low_level_offset; /* low level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  36072. A_UINT32 high_level_offset; /* high level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  36073. A_UINT32 rssi_thr; /* RSSI threshold to be used to adjust the inband power of the given spectral report */
  36074. A_UINT32 default_agc_max_gain;/* DEFAULT AGC MAX GAIN used. Fetched from register RXTD_RADAR_SBS_CTRL_1_L bits20:13 */
  36075. /**************************************************************************
  36076. * DON'T ADD ANY FURTHER FIELDS HERE -
  36077. * It would cause the size of the READY_EXT message within some targets
  36078. * to exceed the size of the buffer used for the message.
  36079. **************************************************************************/
  36080. } wmi_spectral_bin_scaling_params;
  36081. #define WMI_SPECTRAL_BW_CAPS_GET(bw_caps, index) WMI_GET_BITS(bw_caps, index, 1)
  36082. #define WMI_SPECTRAL_BW_CAPS_SET(bw_caps, index, value) WMI_SET_BITS(bw_caps, index, 1, value)
  36083. #define WMI_SPECTRAL_FFT_SIZE_CAPS_GET(fft_size_caps, index) WMI_GET_BITS(ft_size_caps, index, 1)
  36084. #define WMI_SPECTRAL_FFT_SIZE_CAPS_SET(fft_size_caps, index, value) WMI_SET_BITS(fft_size_caps, index, 1, value)
  36085. typedef struct {
  36086. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_scan_bw_capabilities */
  36087. A_UINT32 pdev_id; /* ID of pdev for which the bandwidth capabilities are advertised */
  36088. A_UINT32 sscan_mode; /* scan mode to denote whether this is a normal/agile scan (refer to wmi_spectral_scan_mode) */
  36089. A_UINT32 operating_bw; /* Operating bandwidth which supports the bandwidth capabilities, as per enum wmi_channel_width */
  36090. union {
  36091. struct { /* To indicate the scan bandwidths support for the operating bandwidth and scan mode */
  36092. A_UINT32 supports_sscan_bw_20:1,
  36093. supports_sscan_bw_40:1,
  36094. supports_sscan_bw_80:1,
  36095. supports_sscan_bw_160:1,
  36096. supports_sscan_bw_80p80:1,
  36097. supports_sscan_bw_320:1,
  36098. reserved:26;
  36099. };
  36100. A_UINT32 supported_flags;
  36101. };
  36102. } wmi_spectral_scan_bw_capabilities;
  36103. typedef struct {
  36104. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_fft_size_capabilities */
  36105. A_UINT32 pdev_id; /* ID of pdev for which the bandwidth capabilities are advertised */
  36106. A_UINT32 sscan_bw; /* sscan bandwidth, as per enum wmi_channel_width */
  36107. union {
  36108. struct { /* To indicate the scan FFT sizes supported in the sscan bandwidth */
  36109. A_UINT32 supports_fft_size_1:1,
  36110. supports_fft_size_2:1,
  36111. supports_fft_size_3:1,
  36112. supports_fft_size_4:1,
  36113. supports_fft_size_5:1,
  36114. supports_fft_size_6:1,
  36115. supports_fft_size_7:1,
  36116. supports_fft_size_8:1,
  36117. supports_fft_size_9:1,
  36118. supports_fft_size_10:1,
  36119. supports_fft_size_11:1,
  36120. reserved:21;
  36121. };
  36122. A_UINT32 supported_flags;
  36123. };
  36124. } wmi_spectral_fft_size_capabilities;
  36125. typedef struct {
  36126. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_ctl_failsafe_event_params */
  36127. A_UINT32 pdev_id; /* ID of pdev to which ctl failsafe status is sent */
  36128. A_UINT32 ctl_FailsafeStatus; /* To indicate if Failsafe value is imposed on CTL. 0- Success, 1- Failsafe imposed */
  36129. } wmi_pdev_ctl_failsafe_check_fixed_param;
  36130. typedef struct {
  36131. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_runtime_dpd_recal_cmd_fixed_param */
  36132. A_UINT32 enable; /* Enable/disable */
  36133. /* Thermal Thresholds,
  36134. * DPD recalibration will be triggered, when current temperature is
  36135. * either greater than (tmpt_base_c + dlt_tmpt_c_h),
  36136. * or less than (tmpt_base_c + dlt_tmpt_c_l).
  36137. * Here tmpt_base_c is the temperature in centigrade when first run dpd calibration.
  36138. */
  36139. A_UINT32 dlt_tmpt_c_h;
  36140. A_UINT32 dlt_tmpt_c_l;
  36141. /* cooling_time_ms
  36142. * The time (in milliseconds) expected to be needed for the unit
  36143. * to cool from dlt_tmpt_c_h to dlt_tmpt_c_l.
  36144. */
  36145. A_UINT32 cooling_time_ms;
  36146. /* Max duration for dpd re-cal. Unit: ms */
  36147. A_UINT32 dpd_dur_max_ms;
  36148. } wmi_runtime_dpd_recal_cmd_fixed_param;
  36149. typedef enum {
  36150. WMI_ROAM_TRIGGER_REASON_NONE = 0,
  36151. WMI_ROAM_TRIGGER_REASON_PER,
  36152. WMI_ROAM_TRIGGER_REASON_BMISS,
  36153. WMI_ROAM_TRIGGER_REASON_LOW_RSSI,
  36154. WMI_ROAM_TRIGGER_REASON_HIGH_RSSI,
  36155. WMI_ROAM_TRIGGER_REASON_PERIODIC,
  36156. WMI_ROAM_TRIGGER_REASON_MAWC,
  36157. WMI_ROAM_TRIGGER_REASON_DENSE,
  36158. WMI_ROAM_TRIGGER_REASON_BACKGROUND,
  36159. WMI_ROAM_TRIGGER_REASON_FORCED,
  36160. WMI_ROAM_TRIGGER_REASON_BTM,
  36161. WMI_ROAM_TRIGGER_REASON_UNIT_TEST,
  36162. WMI_ROAM_TRIGGER_REASON_BSS_LOAD,
  36163. WMI_ROAM_TRIGGER_REASON_DEAUTH,
  36164. WMI_ROAM_TRIGGER_REASON_IDLE,
  36165. /*
  36166. * NOTE: don't add any more ROAM_TRIGGER_REASON values here.
  36167. * There are checks in the FW that require the value of
  36168. * WMI_ROAM_TRIGGER_REASON_MAX to be < 16.
  36169. * Add new ROAM_TRIGGER_REASON values below, inside the
  36170. * WMI_ROAM_TRIGGER_EXT_REASON_ID enum.
  36171. */
  36172. WMI_ROAM_TRIGGER_REASON_MAX,
  36173. } WMI_ROAM_TRIGGER_REASON_ID;
  36174. /*
  36175. * The WMI_ROAM_TRIGGER_REASON_ID enum cannot be expanded with new values,
  36176. * due to checks in the FW that require WMI_ROAM_TRIGGER_REASON_MAX to be
  36177. * less than 16.
  36178. * The WMI_ROAM_TRIGGER_EXT_REASON_ID enum is used to hold further roam
  36179. * trigger reasons.
  36180. */
  36181. typedef enum {
  36182. WMI_ROAM_TRIGGER_REASON_STA_KICKOUT = WMI_ROAM_TRIGGER_REASON_MAX,
  36183. WMI_ROAM_TRIGGER_REASON_ESS_RSSI,
  36184. WMI_ROAM_TRIGGER_REASON_WTC_BTM,
  36185. WMI_ROAM_TRIGGER_REASON_PMK_TIMEOUT,
  36186. WMI_ROAM_TRIGGER_REASON_BTC,
  36187. WMI_ROAM_TRIGGER_EXT_REASON_MAX
  36188. } WMI_ROAM_TRIGGER_EXT_REASON_ID;
  36189. /* value for DENSE roam trigger */
  36190. #define WMI_RX_TRAFFIC_ABOVE_THRESHOLD 0x1
  36191. #define WMI_TX_TRAFFIC_ABOVE_THRESHOLD 0x2
  36192. typedef struct {
  36193. A_UINT32 trigger_id; /* id from WMI_ROAM_TRIGGER_REASON_ID */
  36194. /* interpretation of trigger value is as follows, for different trigger IDs
  36195. * ID = PER -> value = PER percentage
  36196. * ID = LOW_RSSI -> value = RSSI in dB wrt noise floor,
  36197. * ID = HIGH_RSSI -> value = RSSI in dB wrt to noise floor,
  36198. * ID = DENSE -> value = specification if it is tx or rx traffic threshold,
  36199. * (see WMI_[RX,TX]_TRAFFIC_ABOVE_THRESHOLD)
  36200. * ID = PERIODIC -> value = periodicity in ms
  36201. *
  36202. * for other IDs trigger_value would be 0 (invalid)
  36203. */
  36204. A_UINT32 trigger_value;
  36205. } wmi_roam_scan_trigger_reason;
  36206. typedef struct {
  36207. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param */
  36208. A_UINT32 vdev_id;
  36209. } wmi_request_roam_scan_stats_cmd_fixed_param;
  36210. /** BSS load configuration parameters for roam trigger */
  36211. typedef struct {
  36212. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_load_cmd_fixed_param */
  36213. A_UINT32 vdev_id;
  36214. /** Minimum number of beacons to be consider for calculating average AP BSS load within time monitor_time_window */
  36215. A_UINT32 beacons_min_count;
  36216. /** Monitor time window in seconds */
  36217. A_UINT32 monitor_time_window;
  36218. /** BSS load threshold after which roam scan should trigger */
  36219. A_UINT32 bss_load_threshold;
  36220. /** rssi_2g_threshold
  36221. * If connected AP is in 2.4 GHz, then consider bss load roam triggered
  36222. * only if load % > bss_load_threshold && connected AP RSSI is worse
  36223. * than rssi_2g_threshold.
  36224. */
  36225. A_INT32 rssi_2g_threshold; /* units = dBm */
  36226. /** rssi_5g_threshold
  36227. * If connected AP is in 5 GHz, then consider bss load roam triggered
  36228. * only if load % > bss_load_threshold && connected AP RSSI is worse
  36229. * than rssi_5g_threshold.
  36230. */
  36231. A_INT32 rssi_5g_threshold; /* units = dBm */
  36232. /** rssi_6g_threshold
  36233. * If connected AP is in 6 GHz, then consider bss load roam triggered
  36234. * only if load % > bss_load_threshold && connected AP RSSI is worse
  36235. * than rssi_6g_threshold. If rssi_6g_threshold is 0, it should be ignored.
  36236. */
  36237. A_INT32 rssi_6g_threshold; /* units = dBm */
  36238. } wmi_roam_bss_load_config_cmd_fixed_param;
  36239. /** Deauth roam trigger parameters */
  36240. typedef struct {
  36241. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_deauth_config_cmd_fixed_param */
  36242. A_UINT32 vdev_id;
  36243. /* 1-Enable, 0-Disable */
  36244. A_UINT32 enable;
  36245. } wmi_roam_deauth_config_cmd_fixed_param;
  36246. /** IDLE roam trigger parameters */
  36247. typedef struct {
  36248. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_idle_config_cmd_fixed_param */
  36249. A_UINT32 vdev_id;
  36250. /* 1: Enable, 0: Disable */
  36251. A_UINT32 enable;
  36252. /* Connected AP band. 0: Any Band, 1: 2.4 GHz Band, 2: 5 GHz Band */
  36253. A_UINT32 band;
  36254. /* Trigger Idle roaming only if RSSI change of connected AP is within rssi_delta during idle time */
  36255. A_UINT32 rssi_delta; /* units = dB */
  36256. /* Trigger idle roam only if connected RSSI is better than min_rssi */
  36257. A_INT32 min_rssi; /* units = dBm */
  36258. /* Inactive/Idle time duration
  36259. * After screen is OFF (or whatever condition is suitable in a given
  36260. * system as an indication that the system is likely idle)
  36261. * and if below conditions are met then idle roaming will be triggered.
  36262. * 1. Connected AP band is matching with band value configured
  36263. * 2. No TX/RX data for more than idle_time configured
  36264. * or TX/RX data packets count is less than data_packet_count
  36265. * during idle_time
  36266. * 3. Connected AP RSSI change is not more than rssi_delta
  36267. * 4. Connected AP RSSI is better than min_rssi.
  36268. * The purpose of this trigger for idle scan is to issue the scan
  36269. * even if (moreover, particularly if) the connection to the
  36270. * existing AP is still good, to keep the STA from getting locked
  36271. * onto the current good AP and thus missing out on an available
  36272. * even better AP. This min_rssi threshold can be used to adjust
  36273. * the connection quality level at which the STA considers doing an
  36274. * idle scan.
  36275. */
  36276. A_UINT32 idle_time; /* units = seconds */
  36277. /* Maximum allowed data packets count during idle time */
  36278. A_UINT32 data_packet_count;
  36279. } wmi_roam_idle_config_cmd_fixed_param;
  36280. /** trigger to start/stop monitoring if system is idle command parameters */
  36281. typedef struct {
  36282. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_idle_trigger_monitor_cmd_fixed_param */
  36283. /* idle_trigger_monitor values are from WMI_IDLE_TRIGGER_MONITOR_ID */
  36284. A_UINT32 idle_trigger_monitor;
  36285. } wmi_idle_trigger_monitor_cmd_fixed_param;
  36286. typedef enum {
  36287. WMI_IDLE_TRIGGER_MONITOR_NONE = 0, /* no-op */
  36288. /* IDLE_TRIGGER_MONITOR_ON
  36289. * The host's screen has turned off (or some other event indicating that
  36290. * the system is likely idle) -
  36291. * start monitoring to check if the system is idle.
  36292. */
  36293. WMI_IDLE_TRIGGER_MONITOR_ON,
  36294. /* IDLE_TRIGGER_MONITOR_OFF
  36295. * The host's screen has turned on (or some other event indicating that
  36296. * the system is not idle)
  36297. */
  36298. WMI_IDLE_TRIGGER_MONITOR_OFF,
  36299. } WMI_SCREEN_STATUS_NOTIFY_ID;
  36300. typedef struct {
  36301. /** TLV tag and len; tag equals wmi_pdev_dsm_filter_fixed_param */
  36302. A_UINT32 tlv_header;
  36303. /**
  36304. * TLV (tag length value) parameter's following pdev_dsm_filter_cmd are,
  36305. *
  36306. * wmi_pdev_bssid_disallow_list_config_param bssid_disallow_list[];
  36307. * i.e array containing all disallow AP filter lists including
  36308. * the new DSM lists (avoidlist / driver_blacklist) and existing
  36309. * lists (supplicant_blacklist / rssi_rejectlist etc.)
  36310. */
  36311. } wmi_pdev_dsm_filter_fixed_param;
  36312. typedef struct {
  36313. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_bssid_disallow_list_config_param */
  36314. A_UINT32 tlv_header;
  36315. /** bssid type i.e whether bssid falls in avoid list or driver_blacklist etc.
  36316. see WMI_BSSID_DISALLOW_LIST_TYPE **/
  36317. A_UINT32 bssid_type;
  36318. /** mac address of disallow BSSID */
  36319. wmi_mac_addr bssid;
  36320. /** Disallow AP for certain duration, in units of milliseconds */
  36321. A_UINT32 remaining_disallow_duration;
  36322. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  36323. A_INT32 expected_rssi;
  36324. /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
  36325. A_UINT32 reason;
  36326. /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
  36327. A_UINT32 source;
  36328. /*
  36329. * timestamp is the absolute time w.r.t host timer which is synchronized
  36330. * between the host and target.
  36331. * This timestamp indicates the time when AP added to blacklist.
  36332. */
  36333. A_UINT32 timestamp;
  36334. /* Original timeout value in milli seconds when AP added to BL */
  36335. A_UINT32 original_timeout;
  36336. /*
  36337. * The disallow link ID bitmap indicates links which should not be allowed
  36338. * for any assoc or partner link combination.
  36339. * If all links for MLD AP are disallowed, then the value shall be
  36340. * 0xffffffff.
  36341. */
  36342. A_UINT32 disallow_linkid_bitmap;
  36343. /* MLD address of AP */
  36344. wmi_mac_addr mld;
  36345. /* List of link combinations for which association is failed */
  36346. A_UINT32 ml_failed_links_combo_bitmap[WMI_MAX_FAILED_LINK_COMBO_COUNT];
  36347. /* Failed link combo count filled in ml_failed_links_combo_bitmap[] */
  36348. A_UINT32 ml_failed_link_combo_count;
  36349. } wmi_pdev_bssid_disallow_list_config_param;
  36350. typedef enum {
  36351. /* USER_SPACE_BLACK_LIST
  36352. * Black Listed AP's by host's user space
  36353. */
  36354. WMI_BSSID_DISALLOW_USER_SPACE_BLACK_LIST = 1,
  36355. /* DRIVER_BLACK_LIST
  36356. * Black Listed AP's by host driver
  36357. * used for data stall migitation
  36358. */
  36359. WMI_BSSID_DISALLOW_DRIVER_BLACK_LIST,
  36360. /* USER_SPACE_AVOID_LIST
  36361. * Avoid List AP's by host's user space
  36362. * used for data stall migitation
  36363. */
  36364. WMI_BSSID_DISALLOW_USER_SPACE_AVOID_LIST,
  36365. /* DRIVER_AVOID_LIST
  36366. * Avoid List AP's by host driver
  36367. * used for data stall migitation
  36368. */
  36369. WMI_BSSID_DISALLOW_DRIVER_AVOID_LIST,
  36370. /* RSSI_REJECT_LIST
  36371. * OCE AP's
  36372. */
  36373. WMI_BSSID_DISALLOW_RSSI_REJECT_LIST,
  36374. } WMI_BSSID_DISALLOW_LIST_TYPE;
  36375. /* WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST:
  36376. * Maximum number of BSSID disallow entries which host is allowed to send
  36377. * to firmware within the WMI_PDEV_DSM_FILTER_CMDID message.
  36378. */
  36379. #define WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST 28
  36380. /** Roam Pre-Authentication completion status */
  36381. typedef struct {
  36382. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_status_cmd_fixed_param */
  36383. A_UINT32 vdev_id;
  36384. /* preauth_status, 0 - Success, Non Zero - Failure
  36385. * Refer to IEEE Std 802.11-2016 Table 9-46 for meaning of status values.
  36386. */
  36387. A_UINT32 preauth_status;
  36388. /* AP BSSID for which pre-authentication is completed */
  36389. wmi_mac_addr candidate_ap_bssid;
  36390. /**
  36391. * This fixed_param TLV is followed by the below TLVs:
  36392. *
  36393. * PMKID computed after successful pre-authentication. This is valid only if preauth_status is success
  36394. * A_UINT8 pmkid[];
  36395. *
  36396. * PMK computed after successful pre-authentication. This is valid only if preauth_status is success
  36397. * A_UINT8 pmk[];
  36398. */
  36399. } wmi_roam_preauth_status_cmd_fixed_param;
  36400. /** Roam Pre-Authentication start event */
  36401. typedef struct {
  36402. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_start_event_fixed_param */
  36403. A_UINT32 vdev_id;
  36404. /* AP BSSID for which host needs to start pre-authentication */
  36405. wmi_mac_addr candidate_ap_bssid;
  36406. /*
  36407. * Transmit address for which host needs to start pre-authentication
  36408. * in MLO case. In non MLO cases, transmit_addr will be filled with 0x0.
  36409. */
  36410. wmi_mac_addr transmit_addr;
  36411. /* AKM suite type (as defined in the IEEE 802.11 spec) */
  36412. A_UINT32 akm_suite_type;
  36413. } wmi_roam_preauth_start_event_fixed_param;
  36414. typedef struct {
  36415. /*
  36416. * The timestamp is in units of ticks of a 19.2MHz clock.
  36417. * The timestamp is taken at roam scan start.
  36418. */
  36419. A_UINT32 lower32bit;
  36420. A_UINT32 upper32bit;
  36421. } wmi_roaming_timestamp;
  36422. typedef struct {
  36423. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param */
  36424. A_UINT32 vdev_id;
  36425. /* number of roam scans */
  36426. A_UINT32 num_roam_scans;
  36427. /* This TLV is followed by TLV's:
  36428. * A_UINT32 client_id[num_roam_scans]; based on WMI_SCAN_CLIENT_ID
  36429. * wmi_roaming_timestamp timestamp[num_roam_scans]; clock ticks at the time of scan start
  36430. * A_UINT32 num_channels[num_roam_scans]; number of channels that are scanned
  36431. * A_UINT32 chan_info[]; channel frequencies (MHz) in each scan
  36432. * The num_channels[] elements specify how many elements there are
  36433. * within chan_info[] for each scan.
  36434. * For example, if num_channels = [2, 3] then chan_info will have 5
  36435. * elements, with the first 2 elements from the first scan, and
  36436. * the last 3 elements from the second scan.
  36437. * wmi_mac_addr old_bssid[num_roam_scans]; bssid we are connected to at the time of roaming
  36438. * A_UINT32 is_roaming_success[num_roam_scans]; value is 1 if roaming is successful, 0 if roaming failed
  36439. * wmi_mac_addr new_bssid[num_roam_scans]; bssid after roaming
  36440. * A_UINT32 num_of_roam_candidates[num_roam_scans]; number of candidates found in each roam scan
  36441. * roam_scan_trigger_reason roam_reason[num_roam_scans]; reason for each roam scan
  36442. * wmi_mac_addr bssid[]; bssids of candidates in each roam scan
  36443. * The num_of_roam_candidates[] elements specify how many elements
  36444. * there are within bssid[] for each scan.
  36445. * For example, if num_of_roam_candidates = [2, 3] then bssid will
  36446. * have 5 elements, with the first 2 elements from the first scan,
  36447. * and the last 3 elements from the second scan.
  36448. * A_UINT32 score[]; score of candidates in each roam scan
  36449. * The num_of_roam_candidates[] elements specify how many elements
  36450. * there are within score[] for each scan.
  36451. * For example, if num_of_roam_candidates = [2, 3] then score will
  36452. * have 5 elements, with the first 2 elements from the first scan,
  36453. * and the last 3 elements from the second scan.
  36454. * A_UINT32 channel[]; channel frequency (MHz) of candidates in each roam scan
  36455. * The num_of_roam_candidates[] elements specify how many elements
  36456. * there are within channel[] for each scan.
  36457. * For example, if num_of_roam_candidates = [2, 3] then channel will
  36458. * have 5 elements, with the first 2 elements from the first scan,
  36459. * and the last 3 elements from the second scan.
  36460. * A_UINT32 rssi[]; RSSI in dB w.r.t. noise floor of candidates
  36461. * in each roam scan.
  36462. * The num_of_roam_candidates[] elements specify how many elements
  36463. * there are within rssi[] for each scan.
  36464. * For example, if num_of_roam_candidates = [2, 3] then rssi will
  36465. * have 5 elements, with the first 2 elements from the first scan,
  36466. * and the last 3 elements from the second scan.
  36467. */
  36468. } wmi_roam_scan_stats_event_fixed_param;
  36469. typedef enum {
  36470. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER = 1, /* Roam scan triggered due to periodic timer expiry */
  36471. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER, /* Roam scan triggered due to inactivity detection */
  36472. /* INACTIVITY_TIMER_LOW_RSSI - alias for INACTIVITY_TIMER */
  36473. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER_LOW_RSSI =
  36474. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER,
  36475. WMI_ROAM_TRIGGER_SUB_REASON_BTM_DI_TIMER, /* Roam scan triggered due to BTM Disassoc Imminent timeout */
  36476. WMI_ROAM_TRIGGER_SUB_REASON_FULL_SCAN, /* Roam scan triggered due to partial scan failure */
  36477. WMI_ROAM_TRIGGER_SUB_REASON_LOW_RSSI_PERIODIC, /* Roam scan triggered due to Low RSSI periodic timer */
  36478. WMI_ROAM_TRIGGER_SUB_REASON_CU_PERIODIC, /* Roam scan triggered due to CU periodic timer */
  36479. /* PERIODIC_TIMER_AFTER_INACTIVITY:
  36480. * Roam scan triggered due to periodic timer after device in
  36481. * inactivity state.
  36482. * This timer is enabled/used for roaming in a vendor-specific manner.
  36483. */
  36484. WMI_ROAM_TRIGGER_SUB_REASCON_PERIODIC_TIMER_AFTER_INACTIVITY,
  36485. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY =
  36486. WMI_ROAM_TRIGGER_SUB_REASCON_PERIODIC_TIMER_AFTER_INACTIVITY,
  36487. /*
  36488. * PERIODIC_TIMER_AFTER_INACTIVITY_LOW_RSSI - alias for
  36489. * PERIODIC_TIMER_AFTER_INACTIVITY
  36490. */
  36491. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY_LOW_RSSI =
  36492. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY,
  36493. WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY_CU,
  36494. WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER_CU,
  36495. } WMI_ROAM_TRIGGER_SUB_REASON_ID;
  36496. typedef enum wmi_roam_invoke_status_error {
  36497. WMI_ROAM_INVOKE_STATUS_SUCCESS = 0,
  36498. WMI_ROAM_INVOKE_STATUS_VDEV_INVALID = 0x11, /* Invalid VDEV */
  36499. WMI_ROAM_INVOKE_STATUS_BSS_INVALID, /* Invalid VDEV BSS */
  36500. WMI_ROAM_INVOKE_STATUS_VDEV_DOWN, /* VDEV is not UP */
  36501. WMI_ROAM_INVOKE_STATUS_ROAM_HANDLE_INVALID, /* VDEV ROAM handle is invalid */
  36502. WMI_ROAM_INVOKE_STATUS_OFFLOAD_DISABLE, /* Roam offload is not enabled */
  36503. WMI_ROAM_INVOKE_STATUS_AP_SSID_LENGTH_INVALID, /* Connected AP profile SSID length is zero */
  36504. WMI_ROAM_INVOKE_STATUS_HO_DISALLOW, /* Already FW internal roaming is in progress */
  36505. WMI_ROAM_INVOKE_STATUS_ALREADY_RUNNING, /* Roam Invoke already in progress either from internal FW BTM request or from host*/
  36506. WMI_ROAM_INVOKE_STATUS_NON_ROAMABLE_AP, /* Roam HO is not triggered due to non roamable AP */
  36507. WMI_ROAM_INVOKE_STATUS_HO_INTERNAL_FAIL, /* Candidate AP save failed */
  36508. WMI_ROAM_INVOKE_STATUS_DISALLOW, /* Roam invoke trigger is not enabled */
  36509. WMI_ROAM_INVOKE_STATUS_SCAN_FAIL, /* Scan start fail */
  36510. WMI_ROAM_INVOKE_STATUS_START_HO_FAIL, /* Roam HO start fail */
  36511. WMI_ROAM_INVOKE_STATUS_INVALID_PARAMS, /* Roam invoke params are invalid */
  36512. WMI_ROAM_INVOKE_STATUS_INVALID_SCAN_MODE, /* Roam scan mode is invalid */
  36513. WMI_ROAM_INVOKE_STATUS_NO_CAND_AP, /* No candidate AP found to roam to */
  36514. WMI_ROAM_INVOKE_STATUS_HO_FAIL, /* handoff failed */
  36515. } wmi_roam_invoke_status_error_t;
  36516. typedef struct {
  36517. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_reason_tlv_param */
  36518. /*
  36519. * timestamp is the absolute time w.r.t host timer which is synchronized
  36520. * between the host and target.
  36521. * This timestamp indicates the time when roam trigger happened.
  36522. */
  36523. A_UINT32 timestamp; /* Timestamp in milli seconds */
  36524. /* trigger_reason:
  36525. * Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID
  36526. */
  36527. A_UINT32 trigger_reason;
  36528. /* trigger_sub_reason:
  36529. * Reason for each roam scan from WMI_ROAM_TRIGGER_SUB_REASON_ID,
  36530. * if multiple scans are triggered for a single roam trigger.
  36531. */
  36532. A_UINT32 trigger_sub_reason;
  36533. A_UINT32 current_rssi; /* Connected AP RSSI in dBm */
  36534. /* roam_rssi_threshold:
  36535. * RSSI threshold value in dBm for low RSSI roam trigger.
  36536. */
  36537. A_UINT32 roam_rssi_threshold;
  36538. A_UINT32 cu_load; /* Connected AP CU load percentage (0-100) */
  36539. /* deauth_type:
  36540. * 1 -> De-authentication
  36541. * 2 -> Disassociation
  36542. */
  36543. A_UINT32 deauth_type;
  36544. /* deauth_reason:
  36545. * De-authentication or disassociation reason.
  36546. * De-authentication / disassociation Values are enumerated in the
  36547. * 802.11 spec.
  36548. */
  36549. A_UINT32 deauth_reason;
  36550. /* btm_request_mode:
  36551. * Mode Values are enumerated in the 802.11 spec.
  36552. */
  36553. A_UINT32 btm_request_mode;
  36554. A_UINT32 disassoc_imminent_timer; /* in Milli seconds */
  36555. /* validity_internal:
  36556. * Preferred candidate list validity interval in Milli seconds.
  36557. */
  36558. A_UINT32 validity_internal;
  36559. /* candidate_list_count:
  36560. * Number of preferred candidates from BTM request.
  36561. */
  36562. A_UINT32 candidate_list_count;
  36563. /* btm_response_status_code:
  36564. * Response status Values are enumerated in the 802.11 spec.
  36565. */
  36566. A_UINT32 btm_response_status_code;
  36567. union {
  36568. /*
  36569. * If a definition of these vendor-specific files has been provided,
  36570. * use the vendor-specific names for these fields as an alias for
  36571. */
  36572. #ifdef WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC1
  36573. WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC1;
  36574. #endif
  36575. struct {
  36576. /* opaque space reservation for vendor-specific fields */
  36577. A_UINT32 vendor_specific1[7];
  36578. };
  36579. };
  36580. /* BTM BSS termination timeout value in milli seconds */
  36581. A_UINT32 btm_bss_termination_timeout;
  36582. /* BTM MBO assoc retry timeout value in milli seconds */
  36583. A_UINT32 btm_mbo_assoc_retry_timeout;
  36584. union {
  36585. /*
  36586. * If a definition of these vendor-specific files has been provided,
  36587. * use the vendor-specific names for these fields as an alias for
  36588. */
  36589. #ifdef WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC2
  36590. WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC2;
  36591. #endif
  36592. struct {
  36593. /* opaque space reservation for vendor-specific fields */
  36594. A_UINT32 vendor_specific2[4];
  36595. };
  36596. };
  36597. /* btm_req_dialog_token: dialog token number in BTM request frame */
  36598. A_UINT32 btm_req_dialog_token;
  36599. /* data RSSI in dBm when abort to roam scan */
  36600. A_INT32 data_rssi;
  36601. /* data RSSI threshold in dBm */
  36602. A_INT32 data_rssi_threshold;
  36603. /* rx linkspeed status, 0:good linkspeed, 1:bad */
  36604. A_UINT32 rx_linkspeed_status;
  36605. } wmi_roam_trigger_reason;
  36606. #define WMI_GET_BTCONNECT_STATUS(flags) WMI_GET_BITS(flags, 0, 1)
  36607. #define WMI_SET_BTCONNECT_STATUS(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  36608. #define WMI_GET_MLO_BAND(flags) WMI_GET_BITS(flags, 1, 3)
  36609. #define WMI_SET_MLO_BAND(flags, val) WMI_SET_BITS(flags, 1, 3, val)
  36610. typedef enum wmi_mlo_band_info {
  36611. WMI_MLO_BAND_NO_MLO = 0,
  36612. WMI_MLO_BAND_2GHZ_MLO,
  36613. WMI_MLO_BAND_5GHZ_MLO,
  36614. WMI_MLO_BAND_6GHZ_MLO,
  36615. } wmi_mlo_band_info_t;
  36616. typedef struct {
  36617. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_info_tlv_param */
  36618. /* roam_scan_type:
  36619. * 0 -> Partial roam scan
  36620. * 1 -> Full roam scan
  36621. */
  36622. A_UINT32 roam_scan_type;
  36623. /* next_rssi_trigger_threshold:
  36624. * Updated RSSI threshold value in dBm for next roam trigger.
  36625. */
  36626. A_UINT32 next_rssi_trigger_threshold;
  36627. A_UINT32 roam_scan_channel_count; /* Number of channels scanned during roam scan */
  36628. A_UINT32 roam_ap_count; /* Number of roamable APs */
  36629. A_UINT32 frame_info_count; /* Number of frame info */
  36630. /*
  36631. * scan_complete_timestamp is the absolute time w.r.t host timer
  36632. * which is synchronized between the host and target.
  36633. * This timestamp indicates the time when roam scan finished.
  36634. */
  36635. A_UINT32 scan_complete_timestamp; /* milli second units */
  36636. /*
  36637. * Flags capturing factors involved during roam scan:
  36638. * Bit 0 : Bluetooth connect status, 0(not connected) or 1(connected).
  36639. * Bit 1-3 : Indicates which link triggered roaming in MLD cases.
  36640. * The value is one of the wmi_mlo_band_info_t enum constants.
  36641. * Refer to WMI_[GET,SET]_MLO_BAND macros.
  36642. * Bit 4-31 : reserved for future use.
  36643. */
  36644. A_UINT32 flags;
  36645. } wmi_roam_scan_info;
  36646. typedef struct {
  36647. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_channel_info_tlv_param */
  36648. A_UINT32 channel; /* Channel frequency in MHz */
  36649. A_UINT32 ch_dwell_type; /* indicates channel dwell type:
  36650. * 0 -> unspecified
  36651. * 1 -> active
  36652. * 2 -> passive
  36653. */
  36654. } wmi_roam_scan_channel_info;
  36655. #define WMI_GET_AP_INFO_MLO_STATUS(flags) WMI_GET_BITS(flags, 0, 1)
  36656. #define WMI_SET_AP_INFO_MLO_STATUS(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  36657. typedef struct {
  36658. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_info_tlv_param */
  36659. /*
  36660. * timestamp is the absolute time w.r.t host timer which is synchronized
  36661. * between the host and target.
  36662. * This timestamp indicates the time when candidate AP is found
  36663. * during roam scan.
  36664. */
  36665. A_UINT32 timestamp; /* Timestamp in milli seconds */
  36666. A_UINT32 candidate_type; /* 0 - Candidate AP, 1 - Connected AP */
  36667. wmi_mac_addr bssid; /* AP MAC address */
  36668. A_UINT32 channel; /* AP channel frequency in MHz */
  36669. A_UINT32 rssi; /* AP current RSSI in dBm */
  36670. A_UINT32 cu_load; /* AP current cu load percentage (0-100) */
  36671. /*
  36672. * The score fields below don't have a pre-determined range,
  36673. * but use the sense that a higher score indicates a better
  36674. * roam candidate.
  36675. */
  36676. A_UINT32 rssi_score; /* AP current RSSI score */
  36677. A_UINT32 cu_score; /* AP current cu score */
  36678. A_UINT32 total_score; /* AP total score */
  36679. A_UINT32 etp; /* AP Estimated Throughput (ETP) value in mbps */
  36680. /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
  36681. A_UINT32 bl_reason;
  36682. /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
  36683. A_UINT32 bl_source;
  36684. /*
  36685. * timestamp is the absolute time w.r.t host timer which is synchronized
  36686. * between the host and target.
  36687. * This timestamp indicates the time when AP added to blacklist.
  36688. */
  36689. A_UINT32 bl_timestamp;
  36690. /* Original timeout value in milli seconds when AP added to BL */
  36691. A_UINT32 bl_original_timeout;
  36692. /* flags:
  36693. * bit 0: MLD AP FLAG -> 1: MLD AP, 0: non-MLD AP
  36694. * Refer to WMI_[GET,SET]_AP_INFO_MLO_STATUS macros.
  36695. * bit 1-31: reserved.
  36696. */
  36697. A_UINT32 flags;
  36698. wmi_mac_addr mld_addr;
  36699. } wmi_roam_ap_info;
  36700. typedef enum {
  36701. /* Failures reasons for not triggering roaming */
  36702. WMI_ROAM_FAIL_REASON_NO_SCAN_START = 1, /* Roam scan not started */
  36703. WMI_ROAM_FAIL_REASON_SCAN_NOT_ALLOWED = WMI_ROAM_FAIL_REASON_NO_SCAN_START, /* Roam scan is not allowed to start */
  36704. WMI_ROAM_FAIL_REASON_NO_AP_FOUND, /* No roamable APs found during roam scan */
  36705. WMI_ROAM_FAIL_REASON_NO_CAND_AP_FOUND, /* No candidate APs found during roam scan */
  36706. /* Failure reasons after roaming is triggered */
  36707. WMI_ROAM_FAIL_REASON_HOST, /* Roam fail due to VDEV STOP issued from Host */
  36708. WMI_ROAM_FAIL_REASON_AUTH_SEND, /* Unable to send auth request frame */
  36709. WMI_ROAM_FAIL_REASON_AUTH_RECV, /* Received auth response with error status code */
  36710. WMI_ROAM_FAIL_REASON_NO_AUTH_RESP, /* Not receiving auth response frame */
  36711. WMI_ROAM_FAIL_REASON_REASSOC_SEND, /* Unable to send reassoc request frame */
  36712. WMI_ROAM_FAIL_REASON_REASSOC_RECV, /* Received reassoc response with error status code */
  36713. WMI_ROAM_FAIL_REASON_NO_REASSOC_RESP, /* Not receiving reassoc response frame */
  36714. WMI_ROAM_FAIL_REASON_EAPOL_TIMEOUT, /* EAPOL TIMEOUT */
  36715. WMI_ROAM_FAIL_REASON_EAPOL_M1_TIMEOUT = WMI_ROAM_FAIL_REASON_EAPOL_TIMEOUT, /* EAPOL M1 is not received */
  36716. WMI_ROAM_FAIL_REASON_MLME, /* MLME internal error */
  36717. WMI_ROAM_FAIL_REASON_INTERNAL_ABORT, /* Internal abort */
  36718. WMI_ROAM_FAIL_REASON_SCAN_START, /* Unable to start roam scan */
  36719. WMI_ROAM_FAIL_REASON_AUTH_NO_ACK, /* No ACK is received for Auth request */
  36720. WMI_ROAM_FAIL_REASON_AUTH_INTERNAL_DROP, /* Auth request is dropped internally */
  36721. WMI_ROAM_FAIL_REASON_REASSOC_NO_ACK, /* No ACK is received for Reassoc request */
  36722. WMI_ROAM_FAIL_REASON_REASSOC_INTERNAL_DROP, /* Reassoc request is dropped internally */
  36723. WMI_ROAM_FAIL_REASON_EAPOL_M2_SEND, /* Unable to send EAPOL M2 frame */
  36724. WMI_ROAM_FAIL_REASON_EAPOL_M2_INTERNAL_DROP, /* EAPOL M2 frame dropped internally */
  36725. WMI_ROAM_FAIL_REASON_EAPOL_M2_NO_ACK, /* No Ack is received for EAPOL M2 frame */
  36726. WMI_ROAM_FAIL_REASON_EAPOL_M3_TIMEOUT, /* M3 is not received */
  36727. WMI_ROAM_FAIL_REASON_EAPOL_M4_SEND, /* Unable to send EAPOL M4 frame */
  36728. WMI_ROAM_FAIL_REASON_EAPOL_M4_INTERNAL_DROP, /* EAPOL M4 frame dropped internally */
  36729. WMI_ROAM_FAIL_REASON_EAPOL_M4_NO_ACK, /* No Ack is received for EAPOL M4 frame */
  36730. WMI_ROAM_FAIL_REASON_NO_SCAN_FOR_FINAL_BMISS, /* Roam scan is not started for Final Bmiss case */
  36731. WMI_ROAM_FAIL_REASON_DISCONNECT, /* Deauth or Disassoc received from AP during roaming handoff */
  36732. WMI_ROAM_FAIL_REASON_SYNC, /* when host wakes-up during roaming in-progress, abort current roaming if previous sync is pending */
  36733. WMI_ROAM_FAIL_REASON_SAE_INVALID_PMKID, /* WPA3-SAE invalid PMKID */
  36734. WMI_ROAM_FAIL_REASON_SAE_PREAUTH_TIMEOUT, /* WPA3-SAE pre-authentication timeout */
  36735. WMI_ROAM_FAIL_REASON_SAE_PREAUTH_FAIL, /* WPA3-SAE pre-authentication failed */
  36736. WMI_ROAM_FAIL_REASON_UNABLE_TO_START_ROAM_HO, /* Roam HO is not started due to FW internal issue */
  36737. /* Failure reasons to indicate no candidate and final bmiss event sent */
  36738. WMI_ROAM_FAIL_REASON_NO_AP_FOUND_AND_FINAL_BMISS_SENT, /* No roamable APs found during roam scan and final bmiss event sent */
  36739. WMI_ROAM_FAIL_REASON_NO_CAND_AP_FOUND_AND_FINAL_BMISS_SENT, /* No candidate APs found during roam scan and final bmiss event sent */
  36740. WMI_ROAM_FAIL_REASON_CURR_AP_STILL_OK, /* Roam scan not happen due to current network condition is fine */
  36741. WMI_ROAM_FAIL_REASON_SCAN_CANCEL, /* Roam scan canceled */
  36742. 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 */
  36743. WMI_ROAM_FAIL_REASON_UNKNOWN = 255,
  36744. } WMI_ROAM_FAIL_REASON_ID;
  36745. typedef enum {
  36746. WMI_ROAM_ABORT_UNSPECIFIED = 0, /* Target did not specify detailed reason for roam scan being aborted */
  36747. WMI_ROAM_ABORT_LOWRSSI_DATA_RSSI_HIGH = 1, /* Roam scan is not started due to high data RSSI during low-RSSI roaming */
  36748. WMI_ROAM_ABORT_LOWRSSI_LINK_SPEED_GOOD, /* Roam scan is not started due to good link speed during low-RSSI roaming */
  36749. WMI_ROAM_ABORT_BG_DATA_RSSI_HIGH, /* Roam scan is not started due to high data RSSI during background roaming */
  36750. WMI_ROAM_ABORT_BG_RSSI_ABOVE_THRESHOLD, /* Roam scan is not started due to high beacon RSSI during background roaming */
  36751. WMI_ROAM_SCAN_CANCEL_IDLE_SCREEN_ON, /* Idle roam scan is canceled due to screen on */
  36752. WMI_ROAM_SCAN_CANCEL_OTHER_PRIORITY_ROAM_SCAN, /* Roam scan is canceled due to other high priority roam scan */
  36753. } WMI_ROAM_FAIL_SUB_REASON_ID;
  36754. typedef struct {
  36755. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_result_tlv_param */
  36756. /*
  36757. * timestamp is the absolute time w.r.t host timer which is synchronized
  36758. * between the host and target.
  36759. * This timestamp indicates the time when roaming is completed.
  36760. */
  36761. A_UINT32 timestamp; /* Timestamp in milli seconds */
  36762. A_UINT32 roam_status; /* 0 - Roaming is success, 1 - Roaming is failed */
  36763. A_UINT32 roam_fail_reason; /* from WMI_ROAM_FAIL_REASON_ID */
  36764. wmi_mac_addr bssid; /* bssid corresponds to roam_fail_reason */
  36765. A_UINT32 roam_abort_reason; /* Detail reason for roam scan not start, from WMI_ROAM_FAIL_SUB_REASON_ID */
  36766. } wmi_roam_result;
  36767. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_REQUEST_TOKEN_GET(detail) WMI_GET_BITS(detail, 0, 8)
  36768. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_REQUEST_TOKEN_SET(detail,val) WMI_SET_BITS(detail, 0, 8, val)
  36769. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_RESPONSE_TOKEN_GET(detail) WMI_GET_BITS(detail, 8, 8)
  36770. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_RESPONSE_TOKEN_SET(detail,val) WMI_SET_BITS(detail, 8, 8, val)
  36771. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_NUM_OF_NRIE_GET(detail) WMI_GET_BITS(detail, 16, 8)
  36772. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_NUM_OF_NRIE_SET(detail,val) WMI_SET_BITS(detail, 16, 8, val)
  36773. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_GET(detail) WMI_GET_BITS(detail, 24, 3)
  36774. #define WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_SET(detail,val) WMI_SET_BITS(detail, 24, 3, val)
  36775. typedef struct {
  36776. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_neighbor_report_info_tlv_param */
  36777. /* request_type:
  36778. * 1 -> BTM query
  36779. * 2 -> 11K neighbor report request
  36780. */
  36781. A_UINT32 request_type;
  36782. /* neighbor_report_request_timestamp:
  36783. * timestamp is the absolute time w.r.t host timer which is synchronized
  36784. * between the host and target.
  36785. * This timestamp indicates the time when neighbor report request
  36786. * is received.
  36787. */
  36788. A_UINT32 neighbor_report_request_timestamp; /* in milli seconds */
  36789. /* neighbor_report_response_timestamp:
  36790. * This timestamp indicates the time when neighbor report response is sent.
  36791. */
  36792. A_UINT32 neighbor_report_response_timestamp; /* in milli seconds */
  36793. A_UINT32 neighbor_report_channel_count; /* Number of channels received in neighbor report response */
  36794. A_UINT32 btm_query_token; /* btm query dialog token */
  36795. /* btm_query_reason_code:
  36796. * Transition Query Reasons are enumerated in table 7-43x
  36797. * of the 802.11v spec.
  36798. */
  36799. A_UINT32 btm_query_reason_code;
  36800. /* neighbor_report_detail:
  36801. * [7:0] : neighbor report request token
  36802. * [15:8] : neighbor report response token
  36803. * [23:16] : the number of neighbor report elements in response frame
  36804. * [26:24] : band on which frame is sent; the value will be one of the
  36805. * wmi_mlo_band_info enum constants
  36806. * Refer to WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_GET,SET
  36807. * macros.
  36808. * [31:27] : reserved
  36809. * Refer to the above WMI_ROAM_NEIGHBOR_REPORT_INFO_*_GET,_SET macros for
  36810. * reading and writing these bitfields.
  36811. */
  36812. A_UINT32 neighbor_report_detail;
  36813. } wmi_roam_neighbor_report_info;
  36814. #define WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET(detail) WMI_GET_BITS(detail, 0, 3)
  36815. #define WMI_ROAM_BTM_RESP_MLO_BAND_INFO_SET(detail,val) WMI_SET_BITS(detail, 0, 3, val)
  36816. typedef struct {
  36817. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_btm_response_info_tlv_param */
  36818. /*enum STATUS_CODE_WNM_BTM defined in ieee80211_defs.h*/
  36819. A_UINT32 btm_status;
  36820. /* AP MAC address */
  36821. wmi_mac_addr target_bssid;
  36822. /* vsie_reason value:
  36823. * 0x00 Will move to Cellular
  36824. * 0x01 Unspecified
  36825. * 0x02 Not supported
  36826. * 0x03 No Cellular Network
  36827. * 0x04 Controlled by framework
  36828. * 0x05 Roam to better AP
  36829. * 0x06 Suspend mode
  36830. * 0x07 RSSI is strong enough
  36831. * 0x08-0xFF TBD
  36832. */
  36833. A_UINT32 vsie_reason;
  36834. /*
  36835. * timestamp is the absolute time w.r.t host timer which is synchronized
  36836. * between the host and target.
  36837. * This timestamp indicates the time when btm response is sent.
  36838. */
  36839. A_UINT32 timestamp; /* milli second units */
  36840. A_UINT32 btm_resp_dialog_token; /* dialog_token in btm response frame */
  36841. /* btm_resp_bss_termination_delay:
  36842. * bss_termination_delay in btm response frame is the number of minutes
  36843. * that the responding STA requests the BSS to delay termination.
  36844. */
  36845. A_UINT32 btm_resp_bss_termination_delay;
  36846. /* info:
  36847. * Bit[0:2] - band on which frame is sent, band value will be one of the
  36848. * wmi_mlo_band_info_t enum constants
  36849. * Refer to WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET,SET macros.
  36850. * Bit[3:31] - reserved.
  36851. */
  36852. A_UINT32 info;
  36853. } wmi_roam_btm_response_info;
  36854. typedef struct {
  36855. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_btm_request_candidate_info_tlv_param */
  36856. wmi_mac_addr btm_candidate_bssid; /* BTM candidate MAC address */
  36857. A_UINT32 preference; /* preference in Preference IE */
  36858. } wmi_roam_btm_request_candidate_info;
  36859. typedef struct {
  36860. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_neighbor_report_channel_info_tlv_param */
  36861. A_UINT32 channel; /* Channel frequency in MHz */
  36862. } wmi_roam_neighbor_report_channel_info;
  36863. #define WMI_GET_ASSOC_ID(frame_info_ext) WMI_GET_BITS(frame_info_ext, 0, 16)
  36864. #define WMI_SET_ASSOC_ID(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 0, 16, val)
  36865. #define WMI_GET_MLO_BITMAP_BAND_INFO(frame_info_ext) WMI_GET_BITS(frame_info_ext, 16, 5)
  36866. #define WMI_SET_MLO_BITMAP_BAND_INFO(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 16, 5, val)
  36867. #define WMI_GET_RX_INDICATE(frame_info_ext) WMI_GET_BITS(frame_info_ext, 21, 1)
  36868. #define WMI_SET_RX_INDICATE(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 21, 1, val)
  36869. #define WMI_GET_TX_FAILED_REASON(frame_info_ext) WMI_GET_BITS(frame_info_ext, 22, 4)
  36870. #define WMI_SET_TX_FAILED_REASON(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 22, 4, val)
  36871. #define WMI_GET_MAP_ID(frame_info_ext) WMI_GET_BITS(frame_info_ext, 26, 6)
  36872. #define WMI_SET_MAP_ID(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 26, 6, val)
  36873. typedef struct {
  36874. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_frame_info_tlv_param */
  36875. /* timestamp is the absolute time w.r.t host timer which is synchronized between the host and target */
  36876. A_UINT32 timestamp; /* Timestamp when frame is sent or received */
  36877. /*
  36878. * frame_info = frame_type | (frame_subtype << 2) | (request_or_response << 6) | (auth_algo_num << 7) | (seq_num << 16)
  36879. * frame_type(2 bits), frame_subtype(4 bits) are from 802.11 spec.
  36880. * If frame_type is WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT, frame_subtype
  36881. * should be one of value in WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE.
  36882. * request_or_response(1 bit) - Valid if frame_subtype is authentication.
  36883. * 0 - Authentication request 1 - Authentication response
  36884. * auth_algo_num(5bits) : Lower 5 bits of 9.4.1.1 Authentication Algorithm
  36885. * Number field
  36886. * The auth_algo_num bits shall be ignored unless
  36887. * WMI_SERVICE_ROAM_STAT_PER_CANDIDATE_FRAME_INFO_SUPPORT is set and
  36888. * frame_subtype is auth frame.
  36889. * seq_num(16 bits) - frame sequence number
  36890. */
  36891. A_UINT32 frame_info;
  36892. /* status_code:
  36893. * For Rx frames : Status code from 802.11 spec, section 9.4.1.9
  36894. * For Rx frames (deauth / disassoc) : Reason code from 802.11 spec,
  36895. * section 9.4.1.7
  36896. * For Tx frames : Status_code should be one of value in
  36897. * WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS
  36898. */
  36899. A_UINT32 status_code;
  36900. /*
  36901. * rssi_dbm_abs
  36902. * Last known RSSI of the current BSSID at the moment when the frame
  36903. * was sent and received.
  36904. * This RSSI value is valid for deauth / disassoc frame only.
  36905. * The rssi_dbm_abs value is the absolute value of the RSSI in dBm units.
  36906. * For example, if the RSSI is -40 dBm, rssi_dbm_abs will be 40.
  36907. */
  36908. A_UINT32 rssi_dbm_abs;
  36909. /* retry_count
  36910. * To show how many times the same frame (but with different
  36911. * sequence number) is retransmitted, in protocol level.
  36912. */
  36913. A_UINT32 retry_count;
  36914. wmi_mac_addr bssid; /* AP MAC address */
  36915. /*
  36916. * frame_info_ext captures below fields:
  36917. * Bit 0-15 : (re)assoc id of (re)association response frame,
  36918. * section 9.4.1.8 AID field.
  36919. * Bit 16-20 : MLO bitmap band info,
  36920. * bit0: 2GHz, bit1: 5GHz, bit2: 6GHz, bits 3-4: reserved
  36921. * Refer to WMI_[GET,SET]_MLO_BITMAP_BAND_INFO macros.
  36922. * Bit 21 : indicate whether this frame is rx :0-not rx; 1-rx
  36923. * Refer to WMI_[GET,SET]_RX_INDICATE macros.
  36924. * Bit 22-25 : opaque tx failure reason
  36925. * Refer to WMI_[GET,SET]_TX_FAILED_REASON macros.
  36926. * Bit 26-31 : Indicate the map id, used to identify the all the
  36927. * ML link info corresponding to current roaming candidate.
  36928. */
  36929. A_UINT32 frame_info_ext;
  36930. } wmi_roam_frame_info;
  36931. typedef enum {
  36932. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT = 3,
  36933. } WMI_ROAM_FRAME_INFO_FRAME_TYPE;
  36934. typedef enum {
  36935. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M1 = 1,
  36936. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M2,
  36937. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M3,
  36938. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M4,
  36939. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_GTK_M1,
  36940. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_GTK_M2,
  36941. } WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE;
  36942. typedef enum {
  36943. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_ACK = 0,
  36944. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_NO_ACK,
  36945. WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_TX_FAIL,
  36946. } WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS;
  36947. typedef struct {
  36948. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_initial_info_tlv_param */
  36949. /* count of full scan */
  36950. A_UINT32 roam_full_scan_count;
  36951. A_INT32 rssi_th; /* unit: dBm */
  36952. A_UINT32 cu_th; /* channel utilization threshold: uses units of percent */
  36953. /* timer_canceled:
  36954. * bit0: timer1 canceled
  36955. * bit1: timer2 canceled
  36956. * bit2: inactive timer canceled
  36957. */
  36958. A_UINT32 timer_canceled;
  36959. } wmi_roam_initial_info;
  36960. typedef enum {
  36961. WMI_ROAM_MSG_RSSI_RECOVERED = 1, /* Connected AP RSSI is recovered to good region */
  36962. WMI_ROAM_MSG_CONNECTED_IN_POOR_RSSI = 2, /* DUT connected to AP whose RSSI is below low RSSI threshold */
  36963. } WMI_ROAM_MSG_ID;
  36964. typedef struct {
  36965. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_msg_info_tlv_param */
  36966. /*
  36967. * timestamp is the absolute time (in milliseconds) w.r.t host timer
  36968. * which is synchronized between the host and target
  36969. */
  36970. A_UINT32 timestamp;
  36971. A_UINT32 msg_id; /* Message ID from WMI_ROAM_MSG_ID */
  36972. /* msg_param values are interpreted differently for different msg_id values.
  36973. * if msg_id == WMI_ROAM_MSG_RSSI_RECOVERED:
  36974. * msg_param1 contains current AP RSSI in dBm
  36975. * (unsigned -> signed conversion is required)
  36976. * msg_param2 contains next trigger RSSI threshold in dBm
  36977. * (unsigned -> signed conversion is required)
  36978. */
  36979. A_UINT32 msg_param1;
  36980. A_UINT32 msg_param2;
  36981. } wmi_roam_msg_info;
  36982. typedef struct {
  36983. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_stats_event_fixed_param */
  36984. A_UINT32 vdev_id;
  36985. A_UINT32 roam_scan_trigger_count; /* Number of roam scans triggered */
  36986. } wmi_roam_stats_event_fixed_param;
  36987. typedef struct {
  36988. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_reason_cmm_tlv_param */
  36989. /*
  36990. * timestamp is the absolute time w.r.t host timer which is synchronized
  36991. * between the host and target.
  36992. * This timestamp indicates the time when roam trigger happened.
  36993. */
  36994. A_UINT32 timestamp; /* Timestamp in milli seconds */
  36995. /* trigger_reason:
  36996. * Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID
  36997. */
  36998. A_UINT32 trigger_reason;
  36999. /* trigger_sub_reason:
  37000. * Reason for each roam scan from WMI_ROAM_TRIGGER_SUB_REASON_ID,
  37001. * if multiple scans are triggered for a single roam trigger.
  37002. */
  37003. A_UINT32 trigger_sub_reason;
  37004. A_UINT32 current_rssi; /* Connected AP RSSI in dBm */
  37005. } wmi_roam_trigger_reason_cmm;
  37006. typedef struct {
  37007. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_rssi_tlv_param */
  37008. /* roam_rssi_threshold:
  37009. * RSSI threshold value in dBm for low RSSI roam trigger.
  37010. */
  37011. A_UINT32 roam_rssi_threshold;
  37012. /* data RSSI in dBm */
  37013. A_UINT32 data_rssi;
  37014. /* data RSSI threshold in dBm */
  37015. A_UINT32 data_rssi_threshold;
  37016. /* rx linkspeed status, 0:good linkspeed, 1:bad */
  37017. A_UINT32 rx_linkspeed_status;
  37018. } wmi_roam_trigger_rssi;
  37019. typedef struct {
  37020. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_bss_load_tlv_param */
  37021. A_UINT32 cu_load; /* Connected AP CU load percentage (0-100) */
  37022. } wmi_roam_trigger_bss_load;
  37023. typedef struct {
  37024. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_deauth_tlv_param */
  37025. /* deauth_type:
  37026. * 1 -> De-authentication
  37027. * 2 -> Disassociation
  37028. */
  37029. A_UINT32 deauth_type;
  37030. /* deauth_reason:
  37031. * De-authentication or disassociation reason.
  37032. * De-authentication / disassociation Values are enumerated in the
  37033. * 802.11 spec.
  37034. */
  37035. A_UINT32 deauth_reason;
  37036. } wmi_roam_trigger_deauth;
  37037. typedef struct {
  37038. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_btm_tlv_param */
  37039. /* btm_request_mode:
  37040. * Mode Values are enumerated in the 802.11 spec.
  37041. */
  37042. A_UINT32 btm_request_mode;
  37043. A_UINT32 disassoc_imminent_timer; /* in Milli seconds */
  37044. /* validity_internal:
  37045. * Preferred candidate list validity interval in Milli seconds.
  37046. */
  37047. A_UINT32 validity_internal;
  37048. /* candidate_list_count:
  37049. * Number of preferred candidates from BTM request.
  37050. */
  37051. A_UINT32 candidate_list_count;
  37052. /* btm_response_status_code:
  37053. * Response status Values are enumerated in the 802.11 spec.
  37054. */
  37055. A_UINT32 btm_response_status_code;
  37056. /* BTM BSS termination timeout value in milli seconds */
  37057. A_UINT32 btm_bss_termination_timeout;
  37058. /* BTM MBO assoc retry timeout value in milli seconds */
  37059. A_UINT32 btm_mbo_assoc_retry_timeout;
  37060. /* btm_req_dialog_token: dialog token number in BTM request frame */
  37061. A_UINT32 btm_req_dialog_token;
  37062. } wmi_roam_trigger_btm;
  37063. typedef struct {
  37064. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_bmiss_tlv_param */
  37065. /* B[0-6]: final bmiss cnt.
  37066. * B[7-23]: consecutive bmiss cnt
  37067. * B[24]: isQosNullSuccess: 0: success, 1:fail
  37068. */
  37069. A_UINT32 bmiss_status;
  37070. } wmi_roam_trigger_bmiss;
  37071. typedef struct {
  37072. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_dense_tlv_param */
  37073. /* RX Throughput in bytes per second in dense env */
  37074. A_UINT32 rx_tput;
  37075. /* TX Throughput in bytes per second in dense env */
  37076. A_UINT32 tx_tput;
  37077. /* dense_status: b[0-7]: roamable AP count info in dense env */
  37078. A_UINT32 dense_status;
  37079. } wmi_roam_trigger_dense;
  37080. typedef struct {
  37081. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_force_tlv_param */
  37082. A_UINT32 invoke_reason; /* from wlan_roam_invoke_reason */
  37083. } wmi_roam_trigger_force;
  37084. typedef struct {
  37085. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_kickout_tlv_param */
  37086. /* consecutive tx failure threshold */
  37087. A_UINT32 kickout_th;
  37088. A_UINT32 kickout_reason; /* from PEER_KICKOUT_REASON */
  37089. } wmi_roam_trigger_kickout;
  37090. typedef struct {
  37091. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_per_tlv_param */
  37092. /* For PER roam,
  37093. * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
  37094. * N * tx/rx_rate_thresh_percnt / 100, roaming will be triggered.
  37095. * b[0-7]: tx_rate_thresh_percnt
  37096. * b[16-23]:rx_rate_thresh_percnt
  37097. */
  37098. A_UINT32 rate_thresh_percnt;
  37099. } wmi_roam_trigger_per;
  37100. typedef struct {
  37101. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_periodic_tlv_param */
  37102. /* roam scan periodic : units = milliseconds*/
  37103. A_UINT32 periodic_timer_ms;
  37104. } wmi_roam_trigger_periodic;
  37105. typedef struct {
  37106. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_hi_rssi_tlv_param */
  37107. /* roam High RSSI threshold */
  37108. A_UINT32 hi_rssi_threshold;
  37109. } wmi_roam_trigger_hi_rssi;
  37110. #define WMI_MLO_LINK_INFO_GET_MAP_ID(link_info) WMI_GET_BITS(link_info, 0, 6)
  37111. #define WMI_MLO_LINK_INFO_SET_MAP_ID(link_info, val) WMI_SET_BITS(link_info, 0, 6, val)
  37112. #define WMI_MLO_LINK_INFO_GET_STATUS(link_info) WMI_GET_BITS(link_info, 6, 1)
  37113. #define WMI_MLO_LINK_INFO_SET_STATUS(link_info, val) WMI_SET_BITS(link_info, 6, 1, val)
  37114. #define WMI_MLO_LINK_INFO_GET_BAND(link_info) WMI_GET_BITS(link_info, 7, 3)
  37115. #define WMI_MLO_LINK_INFO_SET_BAND(link_info, val) WMI_SET_BITS(link_info, 7, 3, val)
  37116. #define WMI_MLO_LINK_INFO_GET_IEEE_LINK_ID(link_info) WMI_GET_BITS(link_info, 10, 4)
  37117. #define WMI_MLO_LINK_INFO_SET_IEEE_LINK_ID(link_info, val) WMI_SET_BITS(link_info, 10, 4, val)
  37118. typedef struct {
  37119. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_info_tlv_param */
  37120. wmi_mac_addr link_addr;
  37121. A_UINT32 link_info;
  37122. /*
  37123. * b[0-5] : Map Id - maps the corresponding candidate AP for which
  37124. * re-assoc resp received.
  37125. * b[6] : Status - link status, AP accepted/rejected this link
  37126. * 0 - accepted
  37127. * 1 - rejected
  37128. * b[7-9] : Band - link band info (band value is from wmi_mlo_band_info)
  37129. * b[10-13] : IEEE link id - Link id associated with AP
  37130. */
  37131. } wmi_mlo_link_info;
  37132. typedef struct {
  37133. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_get_scan_channel_list_cmd_fixed_param */
  37134. A_UINT32 vdev_id;
  37135. } wmi_roam_get_scan_channel_list_cmd_fixed_param;
  37136. typedef struct {
  37137. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_channel_list_event_fixed_param */
  37138. A_UINT32 vdev_id;
  37139. wmi_ssid ssid; /* SSID of connected AP */
  37140. /*
  37141. * This event can be sent as a response to
  37142. * WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID or
  37143. * can be sent asynchronously during disconnection.
  37144. * command_response = 1, when it is sent as a response to
  37145. * WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID
  37146. * = 0, for other cases
  37147. */
  37148. A_UINT32 command_response;
  37149. /*
  37150. * This fixed_param TLV is followed by the below TLVs:
  37151. *
  37152. * List of roam scan channel frequencies in MHz
  37153. * A_UINT32 channel_list[];
  37154. */
  37155. } wmi_roam_scan_channel_list_event_fixed_param;
  37156. typedef enum {
  37157. WMI_ROAM_CND_RSSI_SCORING = 0x00000001, /* FW considers RSSI scoring */
  37158. WMI_ROAM_CND_HT_SCORING = 0x00000002, /* FW considers HT scoring */
  37159. WMI_ROAM_CND_VHT_SCORING = 0x00000004, /* FW considers VHT scoring */
  37160. WMI_ROAM_CND_HE_SCORING = 0x00000008, /* FW considers 11ax scoring */
  37161. WMI_ROAM_CND_BW_SCORING = 0x00000010, /* FW considers Bandwidth scoring */
  37162. WMI_ROAM_CND_BAND_SCORING = 0x00000020, /* FW considers Band(2G/5G) scoring */
  37163. WMI_ROAM_CND_NSS_SCORING = 0x00000040, /* FW considers NSS(1x1 / 2x2) scoring */
  37164. WMI_ROAM_CND_CHAN_CONGESTION_SCORING = 0x00000080, /* FW considers ESP/QBSS scoring */
  37165. WMI_ROAM_CND_BEAMFORMING_SCORING = 0x00000100, /* FW considers Beamforming scoring */
  37166. WMI_ROAM_CND_PCL_SCORING = 0x00000200, /* FW considers PCL scoring */
  37167. WMI_ROAM_CND_OCE_WAN_SCORING = 0x00000400, /* FW considers OCE WAN metrics scoring */
  37168. WMI_ROAM_CND_OCE_AP_TX_PWR_SCORING = 0x00000800, /* FW considers OCE AP Tx power scoring */
  37169. WMI_ROAM_CND_OCE_AP_SUBNET_ID_SCORING = 0x00001000, /* FW considers OCE AP subnet id scoring */
  37170. WMI_ROAM_CND_SAE_PK_AP_SCORING = 0x00002000, /* FW considers SAE-PK enabled AP scoring */
  37171. WMI_ROAM_CND_SECURITY_SCORING = 0x00004000, /* FW considers security scoring */
  37172. } WMI_ROAM_CND_SCORING_PARAMS;
  37173. typedef struct {
  37174. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_capability_report_event_fixed_param */
  37175. /*
  37176. * This event is sent asynchronously during FW init.
  37177. * It indicates FW roam related capabilities to host.
  37178. *
  37179. * scoring_capability_bitmap = Indicates firmware candidate scoring
  37180. * capabilities. It's a bitmap of values
  37181. * from enum WMI_ROAM_CND_SCORING_PARAMS.
  37182. */
  37183. A_UINT32 scoring_capability_bitmap;
  37184. } wmi_roam_capability_report_event_fixed_param;
  37185. /*
  37186. * Definition of disallow connection modes.
  37187. */
  37188. typedef enum {
  37189. /* Bit 0: roam to 5GL+5GH MLSR is not allowed if the bit is set. */
  37190. WMI_ROAM_MLO_CONNECTION_MODE_5GL_5GH_MLSR = 0x1,
  37191. } WMI_ROAM_MLO_CONNECTION_MODES;
  37192. typedef struct {
  37193. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_mlo_config_cmd_fixed_param */
  37194. wmi_mac_addr partner_link_addr; /* Assigned link address which can be used as self link addr when vdev is not created */
  37195. A_UINT32 vdev_id;
  37196. /*
  37197. * Configure max number of link mlo connection supports.
  37198. * Invalid value or 0 will use max supported value by fw.
  37199. */
  37200. A_UINT32 support_link_num;
  37201. /*
  37202. * Bit 0: 2G band support if 1
  37203. * Bit 1: 5G band support if 1
  37204. * Bit 2: 6G band support if 1
  37205. */
  37206. A_UINT32 support_link_band; /* Configure the band bitmap of mlo connection supports. */
  37207. A_UINT32 max_active_links; /* Max active links supported for STA */
  37208. /*
  37209. * Disallow the specified connection mode(s) when roaming to MLD AP.
  37210. * Refer to the WMI_ROAM_MLO_CONNECTION_MODES enum for the connection mode
  37211. * each bit represents.
  37212. */
  37213. A_UINT32 disallow_connect_modes;
  37214. /*
  37215. * If max_link_combo_count is non-zero, STA should try to roam to next
  37216. * candidate once max allowed link combinations is reached with current
  37217. * candidate AP.
  37218. */
  37219. A_UINT32 max_link_combo_count;
  37220. } wmi_roam_mlo_config_cmd_fixed_param;
  37221. typedef struct {
  37222. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  37223. /** unique id identifying the VDEV, generated by the caller */
  37224. A_UINT32 vdev_id;
  37225. /** parameter id - see WMI_ROAM_PARAM */
  37226. A_UINT32 param_id;
  37227. /** parameter value */
  37228. A_UINT32 param_value;
  37229. } wmi_roam_set_param_cmd_fixed_param;
  37230. typedef struct {
  37231. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_enable_vendor_cmd_fixed_param */
  37232. /** unique id identifying the VDEV, generated by the caller */
  37233. A_UINT32 vdev_id;
  37234. /** abstract mechanism for differentiating vendors */
  37235. A_UINT32 vendor_id;
  37236. /** 1 - Enable, 0 - Disable */
  37237. A_UINT32 enable;
  37238. } wmi_roam_enable_vendor_control_cmd_fixed_param;
  37239. typedef enum {
  37240. ROAM_VENDOR_CONTROL_PARAM_TRIGGER = 1,
  37241. ROAM_VENDOR_CONTROL_PARAM_DELTA,
  37242. ROAM_VENDOR_CONTROL_PARAM_FULL_SCANPERIOD,
  37243. ROAM_VENDOR_CONTROL_PARAM_PARTIAL_SCANPERIOD,
  37244. ROAM_VENDOR_CONTROL_PARAM_ACTIVE_CH_DWELLTIME,
  37245. ROAM_VENDOR_CONTROL_PARAM_PASSIVE_CH_DWELLTIME,
  37246. ROAM_VENDOR_CONTROL_PARAM_HOME_CH_TIME,
  37247. ROAM_VENDOR_CONTROL_PARAM_AWAY_TIME,
  37248. /* Sending query for all roam_vendor_control_param */
  37249. ROAM_VENDOR_CONTROL_PARAM_ALL = 0xFFFFFFFF,
  37250. } WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID;
  37251. typedef struct {
  37252. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_vendor_param_cmd_fixed_param */
  37253. /** unique id identifying the VDEV, generated by the caller */
  37254. A_UINT32 vdev_id;
  37255. /** Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID */
  37256. A_UINT32 param_id;
  37257. } wmi_roam_get_vendor_control_param_cmd_fixed_param;
  37258. /* WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID - No need to make this event as wakeable event
  37259. * Host ensures to take wakelock after sending WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID command */
  37260. typedef struct {
  37261. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_get_vendor_control_param_event_fixed_param */
  37262. /** unique id identifying the VDEV, generated by the caller */
  37263. A_UINT32 vdev_id;
  37264. /**
  37265. * Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID
  37266. * If param_id is ROAM_VENDOR_CONTROL_PARAM_ALL, send all vendor control
  37267. * param value defined in enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID
  37268. * using wmi_vendor_control_param tlv
  37269. */
  37270. A_UINT32 param_id;
  37271. /** Vendor control param value */
  37272. A_UINT32 param_value;
  37273. } wmi_roam_get_vendor_control_param_event_fixed_param;
  37274. typedef struct {
  37275. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_control_param */
  37276. /** Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID */
  37277. A_UINT32 param_id;
  37278. /** Vendor control param value */
  37279. A_UINT32 param_value;
  37280. } wmi_vendor_control_param;
  37281. /** the definition of different ROAM parameters */
  37282. typedef enum {
  37283. /*
  37284. * roam param to configure below roam events
  37285. * Bit : 0 disabled - do not send WMI_ROAM_NOTIF_SCAN_END in WMI_ROAM_EVENTID
  37286. * Bit : 0 enabled - send WMI_ROAM_NOTIF_SCAN_END in WMI_ROAM_EVENTID
  37287. * 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
  37288. * 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
  37289. * Bit : 2-31 - reserved
  37290. */
  37291. WMI_ROAM_PARAM_ROAM_EVENTS_CONFIG = 1,
  37292. /*
  37293. * Bit : 0 if unset, POOR_LINKSPEED
  37294. * Bit : 0 if set, GOOD_LINKSPEED
  37295. */
  37296. WMI_ROAM_PARAM_LINKSPEED_STATE = 2,
  37297. /*
  37298. * roam param to configure roam scan params for DFS jitter reduction
  37299. * Bit : 0 enabled - DFS channel jitter reduction is enabled.
  37300. * Bit : 0 disabled - DFS channel jitter reduction is disabled.
  37301. *
  37302. * Bit : 1-7 - To indicate the passive-to-active conversion timeout
  37303. * with range 40 to 70 in ms, default value is 50ms.
  37304. * If an invalid (out of range) value is provided, the
  37305. * default value will be used.
  37306. * Bit : 8-13 - To indicate the DFS RSSI threshold for current AP
  37307. * with range 0 to 58, default value is 0 dB
  37308. * (DFS RSSI threshold = -70 dBm + 0 dB = -70 dBm).
  37309. * The specified value (in dB) is added to the -70 dBm
  37310. * baseline value to get the RSSI threshold in dBm.
  37311. * If an invalid (out of range) value is provided, the
  37312. * default value will be used.
  37313. * Bit : 14-19 - To indicate the DFS RSSI threshold for candidate AP
  37314. * with range 0 to 58, default value is 0 dB
  37315. * (DFS RSSI threshold = -70 - 0 = -70 dBm).
  37316. * The specified value (in dB) is added to the -70 dBm
  37317. * baseline value to get the RSSI threshold in dBm.
  37318. * If an invalid (out of range) value is provided, the
  37319. * default value will be used.
  37320. * Bit : 20 disabled - To indicate DFS roam scan policy is AGILE
  37321. * Bit : 20 enabled - To indicate DFS roam scan policy is Legacy
  37322. *
  37323. * Bit : 21-31 are reserved
  37324. */
  37325. WMI_ROAM_PARAM_ROAM_SCAN_DFS_CONFIG_BITMAP = 3,
  37326. /*
  37327. * roam param to configure HO_DELAY_RX value at runtime
  37328. * The configured value of ho_delay_rx will be in milliseconds
  37329. * Maximum value which user can configure using this Param ID is 1000 msec.
  37330. *
  37331. * If any value beyond this Maximum value is provided by user, FW will
  37332. * configure the ho_delay_rx value to Maximum allowed value i.e. 1000 msec.
  37333. */
  37334. WMI_ROAM_PARAM_ROAM_HO_DELAY_RUNTIME_CONFIG = 4,
  37335. /*
  37336. * Roam param to enable/disable full scan channel optimization
  37337. * As per current implementation of roam scan, if there are no APs found
  37338. * during partial scan, immediately a full scan will be initiated as a
  37339. * fallback. This includes all channels that were already scanned as part
  37340. * of partial scan.
  37341. * This flag controls the optimization, to exclude all channels, which are
  37342. * already scanned as part of partial scan.
  37343. */
  37344. WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_CHANNEL_OPTIMIZATION = 5,
  37345. /*
  37346. * Roam param to enable/disable scanning of 6 GHz PSC channels
  37347. * As per current implementation, Wi-Fi STA scans on all 6 GHz PSC channels
  37348. * as part of full scan during a roam scan irrespective of whether APs are
  37349. * present in 6 GHz or not.
  37350. * This flag controls the optimization to do the scan in 6 GHz PSC channels
  37351. * only if channel map or newly received RNR indicates 6 GHz APs during
  37352. * current 2.4 GHz or 5 GHz scanning of Roam Full scan.
  37353. */
  37354. WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_6GHZ_PSC_ONLY_WITH_RNR = 6,
  37355. /*
  37356. * Flag to tell whether MCC is disallowed or not in sta + sta currrent case.
  37357. * If flag is unset, then no limitation for channels which sta can roam to.
  37358. * If flag is set, then the channels which one of STA roam to cause MCC with other STA, it will be disallowed.
  37359. */
  37360. WMI_ROAM_PARAM_ROAM_MCC_DISALLOW = 7,
  37361. /*
  37362. * Roam param to provide additional RSSI Boost for 6 GHz Candidate AP
  37363. * during Roam Scan in case any 6 GHz candidate has better Roam score
  37364. * but fails RSSI Delta Check.
  37365. * This configurable RSSI Boost value for 6GHz Candidate AP will be
  37366. * configured via ini RoamRssiDiff6GHz
  37367. * This configured RSSI boost value will only be applicable for 6GHz
  37368. * Candidate AP when the STA is connected to 2.4/5 GHz Band AP and will
  37369. * not impact if STA is connected to 6GHz Band AP
  37370. */
  37371. WMI_ROAM_PARAM_ROAM_RSSI_BOOST_FOR_6GHZ_CAND_AP = 8,
  37372. /*
  37373. * Roam param to indicate unsupported Power Type for 6 GHz Candidate AP
  37374. * found during Roam Scan. If AP operates on the power type disabled by
  37375. * the host, then that candidate should not be selected.
  37376. * This unsupported Power Type will be configured based
  37377. * on disabled 6GHz Power Types in Regdomain
  37378. *
  37379. * If below bits in the obtianed Bitmap is set then any AP
  37380. * broadcasting these Power Types should not be selected
  37381. * BIT 0 - Indoor Access Point
  37382. * BIT 1 - Standard Power (SP) Access Point
  37383. * BIT 2 - Very Low Power (VLP) Access Point
  37384. * BIT 3-7 - Reserved
  37385. */
  37386. WMI_ROAM_PARAM_ROAM_UNSUPPORTED_6GHZ_POWERTYPE = 9,
  37387. /*
  37388. * crypto params to allow EHT/MLO in WPA2/WPA3 security.
  37389. * BITMAP of wlan_crypto_roam_eht_config
  37390. */
  37391. WMI_ROAM_PARAM_CRYPTO_EHT_CONFIG = 10,
  37392. /*
  37393. * Roam Param for enabling/disabling Roam Latency Optimization via below
  37394. * BITMAP of wlan_roam_latency_optimization_t
  37395. */
  37396. WMI_ROAM_PARAM_ROAM_LATENCY_OPTIMIZATION_BITMAP = 11,
  37397. /*=== END ROAM_PARAM_PROTOTYPE SECTION ===*/
  37398. } WMI_ROAM_PARAM;
  37399. typedef enum {
  37400. /*
  37401. * BIT 0 - WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT:
  37402. * Connect to non-MLO/MLO WPA2 EHT APs in EHT without PMF support.
  37403. *
  37404. * BIT 1 - WLAN_CRYPTO_WPA2_ALLOW_MLO:
  37405. * Connect to MLO WPA2 EHT APs in MLO without PMF support.
  37406. *
  37407. * BIT 2 - WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT_MFPC_SET:
  37408. * Connect to non-MLO/MLO WPA2 EHT APs in EHT.
  37409. * (PMF capable is mandatory).
  37410. *
  37411. * BIT 3 - WLAN_CRYPTO_WPA2_ALLOW_MLO_MFPC_SET:
  37412. * Connect to MLO WPA2 EHT APs in MLO
  37413. * (PMF capable is mandatory).
  37414. *
  37415. * BIT 4 - 15 - reserved for future WPA2 security configs
  37416. *
  37417. * BIT 16 - WLAN_CRYPTO_WPA3_SAE_ALLOW_NON_MLO_EHT_HNP:
  37418. * Connect to non-MLO/MLO WPA3-SAE without support for H2E
  37419. * (or no RSNXE IE in beacon) in non-MLO EHT.
  37420. *
  37421. * BIT 17 - WLAN_CRYPTO_WPA3_SAE_ALLOW_MLO_HNP:
  37422. * Connect to MLO WPA3-SAE without support for H2E
  37423. * (or no RSNXE IE in beacon).
  37424. */
  37425. WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT = 0x00000001,
  37426. WLAN_CRYPTO_WPA2_ALLOW_MLO = 0x00000002,
  37427. WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT_MFPC_SET = 0x00000004,
  37428. WLAN_CRYPTO_WPA2_ALLOW_MLO_MFPC_SET = 0x00000008,
  37429. WLAN_CRYPTO_WPA3_SAE_ALLOW_NON_MLO_EHT_HNP = 0x00010000,
  37430. WLAN_CRYPTO_WPA3_SAE_ALLOW_MLO_HNP = 0x00020000,
  37431. } wlan_crypto_roam_eht_config;
  37432. typedef struct {
  37433. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_big_data_cmd_fixed_param */
  37434. A_UINT32 vdev_id;
  37435. } wmi_vdev_get_big_data_cmd_fixed_param;
  37436. typedef struct {
  37437. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_send_big_data_event_fixed_param */
  37438. A_UINT32 vdev_id;
  37439. /** param list **/
  37440. /* Target power (dBm units) - 2.4G/5G */
  37441. A_UINT32 target_power_2g_dsss;
  37442. A_UINT32 target_power_2g_ofdm;
  37443. A_UINT32 target_power_2g_mcs0;
  37444. A_UINT32 target_power_5g_ofdm;
  37445. A_UINT32 target_power_5g_mcs0;
  37446. /* ANI level from hal-phy */
  37447. A_UINT32 ani_level;
  37448. /* Number of probe requests sent while roaming after BMISS */
  37449. A_UINT32 tx_probe_req;
  37450. /* Number of probe responses received while roaming after BMISS */
  37451. A_UINT32 rx_probe_response;
  37452. /*
  37453. * Number of retries (both by HW and FW) for tx data MPDUs sent by this vdev
  37454. */
  37455. A_UINT32 num_data_retries;
  37456. /* Number of tx data MPDUs dropped from this vdev due to tx retry limit */
  37457. A_UINT32 num_tx_data_fail;
  37458. /* Number of aggregated unicast tx expecting response ppdu */
  37459. A_UINT32 data_tx_ppdu_count;
  37460. /* Number of aggregated unicast tx expecting response mpdu */
  37461. A_UINT32 data_tx_mpdu_count;
  37462. /* number of rx frames with good PCLP */
  37463. A_UINT32 rx_frame_good_pclp_count;
  37464. /* Number of occasions that no valid delimiter is detected by ampdu parser */
  37465. A_UINT32 invalid_delimiter_count;
  37466. /* Number of frames for which the CRC check failed in the MAC */
  37467. A_UINT32 rx_crc_check_fail_count;
  37468. /* tx fifo overflows count for transmissions by this vdev */
  37469. A_UINT32 txpcu_fifo_overflows_count;
  37470. /* Number of ucast ACKS received good FCS (doesn't include block acks) */
  37471. A_UINT32 successful_acks_count;
  37472. /*
  37473. * RX BlockACK Counts
  37474. * Note that this counts the number of block acks received by this vdev,
  37475. * not the number of MPDUs acked by block acks.
  37476. */
  37477. A_UINT32 rx_block_ack_count;
  37478. /* Beacons received from member of BSS */
  37479. A_UINT32 member_bss_beacon_count;
  37480. /* Beacons received from other BSS */
  37481. A_UINT32 non_bss_beacon_count;
  37482. /* Number of RX Data multicast frames dropped by the HW */
  37483. A_UINT32 rx_data_mc_frame_filtered_count;
  37484. } wmi_vdev_send_big_data_event_fixed_param;
  37485. typedef struct {
  37486. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_big_data_p2_cmd_fixed_param */
  37487. A_UINT32 vdev_id;
  37488. } wmi_vdev_get_big_data_p2_cmd_fixed_param;
  37489. typedef struct {
  37490. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_send_big_data_p2_event_fixed_param */
  37491. A_UINT32 vdev_id;
  37492. /** param list **/
  37493. /* total number of TSF out of sync */
  37494. A_UINT32 tsf_out_of_sync;
  37495. /**
  37496. * ANI (noise interference) level corresponding to the channel.
  37497. * The range of values is different for chips of different target
  37498. * architectures. Helium values range from 0 to 9, while Lithium
  37499. * and Beryllium values range from -5 to 15.
  37500. * In all cases, higher values indicate more noise interference.
  37501. */
  37502. A_INT32 ani_level;
  37503. /*
  37504. * This fixed_param TLV is followed by the below TLVs:
  37505. * List of datapath big data stats. This stat is not interpreted by
  37506. * host. This gets directly updated on big data server and later FW
  37507. * team will analyze this data.
  37508. *
  37509. * A_UINT32 bd_datapath_stats[]; // DEPRECATED
  37510. * wmi_big_data_dp_stats_tlv_param big_data_dp_stats[];
  37511. */
  37512. } wmi_vdev_send_big_data_p2_event_fixed_param;
  37513. typedef struct {
  37514. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bd_datapath_stats_tlv_param */
  37515. A_UINT32 tlv_header;
  37516. /* Tx power before disconnection.
  37517. * The units of the following tx power fields are 0.5 dBm for Helium
  37518. * architecture target (e.g. a value of 1 means tx power = 0.5 dBm),
  37519. * and are 0.25 dBm for subsequent target architectures.
  37520. */
  37521. A_UINT32 last_data_tx_pwr;
  37522. A_UINT32 target_power_dsss;
  37523. A_UINT32 target_power_ofdm;
  37524. /* Rate index of last data frame before disconnection */
  37525. A_UINT32 last_tx_data_rix;
  37526. /* Tx rate (in kbps) of last data frame before disconnection */
  37527. A_UINT32 last_tx_data_rate_kbps;
  37528. } wmi_big_data_dp_stats_tlv_param;
  37529. typedef enum {
  37530. WMI_6GHZ_REG_PWRMODE_LPI = 0, /* LPI mode for AP and client products */
  37531. WMI_6GHZ_REG_PWRMODE_SP = 1, /* SP mode for AP and client products */
  37532. WMI_6GHZ_REG_PWRMODE_VLP = 2, /* VLP mode for AP and client products */
  37533. WMI_6GHZ_REG_PWRMODE_SP_STA = 3, /* SP client mode for AP products */
  37534. WMI_6GHZ_REG_PWRMODE_MAX = 5
  37535. } WMI_6GHZ_REG_PWRMODE_TYPE;
  37536. typedef struct {
  37537. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_tpc_power_fixed_param */
  37538. A_UINT32 vdev_id;
  37539. A_UINT32 psd_power; /* Value: 0 or 1, is PSD power or not */
  37540. A_UINT32 eirp_power; /* Maximum EIRP power (dDm units), valid only if power is PSD */
  37541. A_UINT32 power_type_6ghz; /* Type: WMI_6GHZ_REG_TYPE, used for halphy CTL lookup */
  37542. /*
  37543. * This fixed_param TLV is followed by the below TLVs:
  37544. *
  37545. * Based on power_type_6ghz sent in fixed param, the array TLVs
  37546. * will be interpreted as described below:
  37547. *
  37548. * For power_type_6ghz - LPI and VLP power mode:
  37549. * num_pwr_levels of wmi_vdev_ch_power_info
  37550. * This array TLV will be filled based on psd_power field in
  37551. * fixed param.
  37552. * If psd_power = 1, TLV carries 20MHz sub-channel center frequency
  37553. * and PSD-power values.
  37554. * If psd_power = 0, TLV carries Cfreq and EIRP for all BWs
  37555. * (<= current channel BSS BW).
  37556. * wmi_vdev_ch_power_psd_info & wmi_vdev_ch_power_eirp_info are not used
  37557. * for LPI and VLP power mode.
  37558. *
  37559. * For power_type_6ghz SP and SP_CLIENT power mode:
  37560. * num_pwr_levels of wmi_vdev_ch_power_psd_info is filled as below
  37561. * Holds BSS sub-channel center frequency and OOBE PSD-power values.
  37562. * OOBE PSD values for AP and STA are filled in below manner:
  37563. * AP case:
  37564. * For example, DUT is operating in 160 MHz and pri20
  37565. * lies in first sub-channel,
  37566. * OOBE_PSD_20 | MIN_OOBE_PSD_40 | MIN_OOBE_PSD_80 |
  37567. * MIN_OOBE_PSD_80 | MIN_OOBE_PSD_160 | MIN_OOBE__PSD_160 |
  37568. * MIN_OOBE_PSD_160 | MIN_OOBE_PSD_160
  37569. * STA case:
  37570. * For example,STA is operating in 160 MHz
  37571. * OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 |
  37572. * OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20
  37573. *
  37574. * num_pwr_levels of wmi_vdev_ch_power_eirp_info
  37575. * Carries Cfreq and EIRP for all BWs (<= current channel BSS BW).
  37576. * For both AP and STA, EIRP are filled in below manner:
  37577. * Example: If operating BW is 160 MHz
  37578. * EIRP_20 | EIRP_40 | EIRP_80 | EIRP_160
  37579. *
  37580. * If the wmi_vdev_ch_power_psd_info or wmi_vdev_ch_power_eirp_info TLV
  37581. * arrays are not both present, check for older TLV
  37582. * (wmi_vdev_ch_power_info) as explained for LPI and VLP.
  37583. */
  37584. } wmi_vdev_set_tpc_power_fixed_param;
  37585. typedef struct {
  37586. A_UINT32 tlv_header;
  37587. A_UINT32 chan_cfreq; /* Channel center frequency (MHz) */
  37588. A_UINT32 tx_power; /* Unit: dBm, either PSD/EIRP power for this frequency or incremental for non-PSD BW */
  37589. } wmi_vdev_ch_power_info;
  37590. typedef struct {
  37591. A_UINT32 tlv_header;
  37592. A_UINT32 chan_cfreq; /* Channel center frequency (MHz) of all BSS Sub-channel */
  37593. /* psd_power:
  37594. * Unit: 0.25dBm/MHz, OOBE PSD power of sub-channel
  37595. * Example: a power spectral density of 1 dBm / MHz will be reported
  37596. * as the value 4.
  37597. */
  37598. A_INT32 psd_power;
  37599. } wmi_vdev_ch_power_psd_info;
  37600. typedef struct {
  37601. A_UINT32 tlv_header;
  37602. A_UINT32 chan_cfreq; /* Channel center frequency (MHz) for all BWs (<= current channel BSS BW) */
  37603. /* eirp_power:
  37604. * Unit: 0.25dBm, EIRP power for all BWs (<= current channel BSS BW)
  37605. * Example: a power of 1 dBm will be reported as the value 4.
  37606. */
  37607. A_INT32 eirp_power;
  37608. } wmi_vdev_ch_power_eirp_info;
  37609. typedef struct {
  37610. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_txpower_query_cmd_fixed_param */
  37611. A_UINT32 request_id; /* unique request ID to distinguish the command / event set */
  37612. /* The mode value has the following meaning :
  37613. * 0 : 11a
  37614. * 1 : 11bg
  37615. * 2 : 11b
  37616. * 3 : 11g only
  37617. * 4 : 11a HT20
  37618. * 5 : 11g HT20
  37619. * 6 : 11a HT40
  37620. * 7 : 11g HT40
  37621. * 8 : 11a VHT20
  37622. * 9 : 11a VHT40
  37623. * 10 : 11a VHT80
  37624. * 11 : 11g VHT20
  37625. * 12 : 11g VHT40
  37626. * 13 : 11g VHT80
  37627. * 14 : unknown
  37628. */
  37629. A_UINT32 mode;
  37630. A_UINT32 rate; /* rate index */
  37631. A_UINT32 nss; /* number of spatial stream */
  37632. A_UINT32 beamforming; /* beamforming parameter 0:disabled, 1:enabled */
  37633. A_UINT32 chain_mask; /* mask for the antenna set to get power */
  37634. A_UINT32 chain_index; /* index for the antenna */
  37635. } wmi_get_tpc_power_cmd_fixed_param;
  37636. typedef struct {
  37637. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_tpc_power_evt_fixed_param */
  37638. A_UINT32 request_id; /* request ID set by the command */
  37639. A_INT32 tx_power; /* TX power for the specified HALPHY parameters in half dBm unit */
  37640. } wmi_get_tpc_power_evt_fixed_param;
  37641. typedef struct {
  37642. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_dpd_status_cmd_fixed_param */
  37643. A_UINT32 pdev_id; /* PDEV ID set by the command */
  37644. } wmi_pdev_get_dpd_status_cmd_fixed_param;
  37645. typedef enum {
  37646. WMI_DPD_STATUS_DISABLE = 0,
  37647. WMI_DPD_STATUS_ENABLE = 1,
  37648. WMI_DPD_STATUS_INVALID = 2,
  37649. } WMI_DPD_STATUS;
  37650. typedef struct {
  37651. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_dpd_status_evt_fixed_param */
  37652. A_UINT32 pdev_id; /* PDEV Id set by the command */
  37653. A_UINT32 dpd_status; /* DPD status obtained from HALPHY, refer to WMI_DPD_STATUS */
  37654. } wmi_pdev_get_dpd_status_evt_fixed_param;
  37655. typedef struct {
  37656. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_halphy_cal_status_cmd_fixed_param */
  37657. A_UINT32 pdev_id; /* PDEV ID set by the command */
  37658. } wmi_pdev_get_halphy_cal_status_cmd_fixed_param;
  37659. typedef struct {
  37660. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_aoa_phasedelta_evt_fixed_param */
  37661. A_UINT32 pdev_id; /* PDEV Id set by the command */
  37662. A_UINT32 freq; /* Current channel in MHz */
  37663. /*
  37664. * Chain Info
  37665. * LSB 16 bits - Max chain supported,
  37666. * MSB 16 bits - Chain pair which has phase values:
  37667. * 0x0003 - chain 0 and 1
  37668. * 0x000c - chain 2 and 3
  37669. * 0x0030 - chain 4 and 5
  37670. * 0x00c0 - chain 6 and 7
  37671. */
  37672. A_UINT32 chainInfo;
  37673. /*
  37674. * Phase Delta values:
  37675. * Two phase delta values are packed into each A_UINT32 word
  37676. * LSB 16-bit is 1st value and MSB 16-bit is 2nd value
  37677. * Phasedelta values will be 0-1023 (mapped to 0-360 degree)
  37678. * Each gain from 0 to 61 has a phasedelta value, e.g.
  37679. * gain 0's phase delta occupies bits 15:0 of phasedelta[chain][0],
  37680. * gain 1's phase delta occupies bits 31:16 of phasedelta[chain][0],
  37681. * gain 2's phase delta occupies bits 15:0 of phasedelta[chain][1], etc.
  37682. */
  37683. A_UINT32 phasedelta[WMI_MAX_CHAINS_FOR_AOA_RCC][MAX_AOA_PHASEDELTA];
  37684. /*
  37685. * IBF cal values:
  37686. * Used for final AoA calculation
  37687. * [AoAPhase = ( PhaseDeltaValue + IBFcalValue ) % 1024]
  37688. */
  37689. A_UINT32 perChainIbfCalVal[WMI_MAX_CHAINS_FOR_AOA_RCC];
  37690. } wmi_pdev_aoa_phasedelta_evt_fixed_param;
  37691. #define WMI_AOA_MAX_SUPPORTED_CHAINS_GET(chain_data) \
  37692. WMI_GET_BITS(chain_data, 0, 16)
  37693. #define WMI_AOA_MAX_SUPPORTED_CHAINS_SET(chain_data, value) \
  37694. WMI_SET_BITS(chain_data, 0, 16, value)
  37695. #define WMI_AOA_SUPPORTED_CHAINMASK_GET(chain_data) \
  37696. WMI_GET_BITS(chain_data, 16, 16)
  37697. #define WMI_AOA_SUPPORTED_CHAINMASK_SET(chain_data, value) \
  37698. WMI_SET_BITS(chain_data, 16, 16, value)
  37699. typedef struct {
  37700. /** TLV tag and len; tag equals
  37701. * WMITLV_TAG_STRUC_wmi_pdev_enhanced_aoa_phasedelta_eventid */
  37702. A_UINT32 tlv_header;
  37703. /* Current Operating Channel Frequency in MHz */
  37704. A_UINT32 freq;
  37705. /** pdev_id:
  37706. * Identify the MAC.
  37707. * See macros starting with WMI_PDEV_ID_ for values.
  37708. * In non-DBDC case host should set it to 0.
  37709. */
  37710. A_UINT32 pdev_id;
  37711. /** chain_info:
  37712. * B0 -- B15 : Max number of chains supported
  37713. * B16 --B31 : Data shared for chainmask -
  37714. * indicates the chains to which the data shared.
  37715. */
  37716. union {
  37717. struct {
  37718. A_UINT32 max_supported_chains:16,
  37719. data_for_chainmask:16;
  37720. };
  37721. A_UINT32 chain_info;
  37722. };
  37723. /** XBAR configuration to get RF2BB/BB2RF chain mapping
  37724. * Samples of xbar_config,
  37725. * If xbar_config is 0xFAC688(hex):
  37726. * RF chains 0-7 are connected to BB chains 0-7
  37727. * here,
  37728. * bits 0 to 2 = 0, maps BB chain 0 for RF chain 0
  37729. * bits 3 to 5 = 1, maps BB chain 1 for RF chain 1
  37730. * bits 6 to 8 = 2, maps BB chain 2 for RF chain 2
  37731. * bits 9 to 11 = 3, maps BB chain 3 for RF chain 3
  37732. * bits 12 to 14 = 4, maps BB chain 4 for RF chain 4
  37733. * bits 15 to 17 = 5, maps BB chain 5 for RF chain 5
  37734. * bits 18 to 20 = 6, maps BB chain 6 for RF chain 6
  37735. * bits 21 to 23 = 7, maps BB chain 7 for RF chain 7
  37736. *
  37737. * If xbar_config is 0x688FAC(hex):
  37738. * RF chains 0-3 are connected to BB chains 4-7
  37739. * RF chains 4-7 are connected to BB chains 0-3
  37740. * here,
  37741. * bits 0 to 2 = 4, maps BB chain 4 for RF chain 0
  37742. * bits 3 to 5 = 5, maps BB chain 5 for RF chain 1
  37743. * bits 6 to 8 = 6, maps BB chain 6 for RF chain 2
  37744. * bits 9 to 11 = 7, maps BB chain 7 for RF chain 3
  37745. * bits 12 to 14 = 0, maps BB chain 0 for RF chain 4
  37746. * bits 15 to 17 = 1, maps BB chain 1 for RF chain 5
  37747. * bits 18 to 20 = 2, maps BB chain 2 for RF chain 6
  37748. * bits 21 to 23 = 3, maps BB chain 3 for RF chain 7
  37749. */
  37750. A_UINT32 xbar_config;
  37751. /**
  37752. * IBF cal values:
  37753. * Used for final AoA calculation
  37754. * [AoAPhase = ( PhaseDeltaValue + IBFcalValue ) % 1024]
  37755. */
  37756. A_UINT32 per_chain_ibf_cal_val[WMI_MAX_CHAINS];
  37757. /**
  37758. * This TLV is followed by TLV arrays containing
  37759. * different types of data header and data buffer TLVs:
  37760. * 1. wmi_enhanced_aoa_gain_phase_data_hdr.
  37761. * This TLV contains the array of structure fields which indicate
  37762. * the type and format of data carried in the following data buffer
  37763. * TLV.
  37764. * 2. aoa_data_buf[] - Data buffer TLV.
  37765. * TLV header contains the total buffer size.
  37766. * Data buffer contains the phase_delta_array[Chains][GainEntries]
  37767. * in absolute phase values ranging 0-1024 and
  37768. * gain_delta_array[Chains][GainEntries] are gain index values.
  37769. */
  37770. } wmi_pdev_enhanced_aoa_phasedelta_evt_fixed_param;
  37771. #define WMI_AOA_DATA_TYPE_GET(data_info) \
  37772. WMI_GET_BITS(data_info, 0, 8)
  37773. #define WMI_AOA_DATA_TYPE_SET(data_info,value) \
  37774. WMI_SET_BITS(data_info, 0, 8, value)
  37775. #define WMI_AOA_NUM_ENTIRES_GET(data_info) \
  37776. WMI_GET_BITS(data_info, 8, 8)
  37777. #define WMI_AOA_NUM_DATA_ENTRIES_SET(data_info,value) \
  37778. WMI_SET_BITS(data_info, 8, 8, value)
  37779. typedef enum _WMI_AOA_EVENT_DATA_TYPE {
  37780. WMI_PHASE_DELTA_ARRAY = 0x0,
  37781. WMI_GAIN_GROUP_STOP_ARRAY = 0x1,
  37782. /* add new types here */
  37783. WMI_MAX_DATA_TYPE_ARRAY,
  37784. } WMI_AOA_EVENT_DATA_TYPE;
  37785. typedef struct {
  37786. /** TLV tag and len; tag equals
  37787. * WMITLV_TAG_STRUC_wmi_pdev_enhanced_aoa_phasedelta_eventid */
  37788. A_UINT32 tlv_header;
  37789. /** data_info:
  37790. * Data follows the LSB first and MSB second order in a 32bit word
  37791. * bit mapping:
  37792. * B0 -- B7 : Data type
  37793. * B8 -- B15 : Number of entries to be parsed in terms of 32bit word
  37794. *
  37795. * If data is Phase delta values - Data type is 0x0
  37796. * group stop gain index values - Data type is 0x1
  37797. *
  37798. * num_entries - Total number of data entries in uint32
  37799. */
  37800. union {
  37801. struct {
  37802. A_UINT32 data_type:8,
  37803. num_entries:8,
  37804. reserved:16;
  37805. };
  37806. A_UINT32 data_info;
  37807. };
  37808. } wmi_enhanced_aoa_gain_phase_data_hdr;
  37809. typedef enum _WMI_AGC_GAIN_TABLE_IDX {
  37810. WMI_AGC_DG_TABLE_IDX = 0,
  37811. WMI_AGC_LG_TABLE_IDX,
  37812. WMI_AGC_VLG_TABLE_IDX,
  37813. WMI_AGC_MAX_GAIN_TABLE_IDX = 8,
  37814. } WMI_AGC_GAIN_TABLE_IDX;
  37815. #define WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD 4
  37816. #define WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD 2
  37817. #define WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM 1
  37818. #define WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM 2
  37819. /* 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)) */
  37820. /* 2 bytes (at most)used to store each gain table elements */
  37821. #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)
  37822. /* 1 byte (at most) used to store each gain table elements obtained from BDF */
  37823. #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)
  37824. typedef enum {
  37825. WMI_AOA_2G = 0,
  37826. WMI_AOA_5G,
  37827. WMI_AOA_6G,
  37828. WMI_AOA_MAX_BAND,
  37829. } WMI_AOA_SUPPORTED_BANDS;
  37830. #define WMI_AOA_MAX_AGC_GAIN_GET(pcap_var, tbl_idx, output) \
  37831. do { \
  37832. A_UINT8 word_idx = 0; \
  37833. A_UINT8 bit_index = 0; \
  37834. A_UINT8 nth_byte = 0; \
  37835. word_idx = tbl_idx >> 1; \
  37836. nth_byte = (tbl_idx % WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD); \
  37837. bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM; \
  37838. output = WMI_GET_BITS(*(pcap_var + word_idx), bit_index, 16); \
  37839. } while (0)
  37840. #define WMI_AOA_MAX_AGC_GAIN_SET(pcap_var, tbl_idx, value) \
  37841. do { \
  37842. A_UINT8 word_idx = 0; \
  37843. A_UINT8 bit_index = 0; \
  37844. A_UINT8 nth_byte = 0; \
  37845. word_idx = tbl_idx >> 1; \
  37846. nth_byte = (tbl_idx % WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD); \
  37847. bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM; \
  37848. WMI_SET_BITS(*(pcap_var+word_idx), bit_index, 16, value); \
  37849. } while (0)
  37850. #define WMI_AOA_MAX_BDF_ENTRIES_GET(pcap_var, tbl_idx, output) \
  37851. do { \
  37852. A_UINT8 word_idx = 0; \
  37853. A_UINT8 bit_index = 0; \
  37854. A_UINT8 nth_byte = 0; \
  37855. word_idx = tbl_idx >> 2; \
  37856. nth_byte = (tbl_idx % WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD); \
  37857. bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM; \
  37858. output = WMI_GET_BITS(*(pcap_var+word_idx), bit_index, 8); \
  37859. } while (0)
  37860. #define WMI_AOA_MAX_BDF_ENTRIES_SET(pcap_var, tbl_idx, value) \
  37861. do { \
  37862. A_UINT8 word_idx = 0; \
  37863. A_UINT8 nth_byte = 0; \
  37864. A_UINT8 bit_index = 0; \
  37865. word_idx = tbl_idx >> 2; \
  37866. nth_byte = (tbl_idx % WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD); \
  37867. bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM; \
  37868. WMI_SET_BITS(*(pcap_var+word_idx), bit_index, 8, value); \
  37869. } while (0)
  37870. typedef struct {
  37871. /** TLV tag and len; tag equals
  37872. * WMITLV_TAG_STRUC_wmi_enhanced_aoa_caps_param */
  37873. A_UINT32 tlv_header;
  37874. /* Maximum number of Rx AGC gain tables supported */
  37875. A_UINT32 max_agc_gain_tbls;
  37876. /* 1 byte is used to store bdf max number of elements in each gain tables */
  37877. A_UINT32 max_bdf_gain_entries[WMI_AOA_BDF_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS];
  37878. /** This TLV is followed by TLV array - wmi_enhanced_aoa_per_band_caps_param
  37879. * containing band specifc agc gain table information.
  37880. */
  37881. } wmi_enhanced_aoa_caps_param;
  37882. typedef struct {
  37883. /** TLV tag and len; tag equals
  37884. * WMITLV_TAG_STRUC_wmi_enhanced_aoa_per_band_caps_param */
  37885. A_UINT32 tlv_header;
  37886. /* Band information - WMI_AOA_SUPPORTED_BANDS */
  37887. A_UINT32 band_info;
  37888. /* 2 bytes are used to store agc max number of elements in each gain tables */
  37889. A_UINT32 max_agc_gain[WMI_AOA_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS];
  37890. } wmi_enhanced_aoa_per_band_caps_param;
  37891. /* WMI_HALPHY_CAL_LIST:
  37892. *
  37893. * Below is the list of HALPHY online CAL currently enabled in
  37894. * WIN chipsets
  37895. */
  37896. typedef enum {
  37897. WMI_HALPHY_CAL_ADC = 0,
  37898. WMI_HALPHY_CAL_BWFILTER,
  37899. WMI_HALPHY_CAL_PDET_AND_PAL,
  37900. WMI_HALPHY_CAL_RXDCO,
  37901. WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ,
  37902. WMI_HALPHY_CAL_IBF,
  37903. WMI_HALPHY_CAL_PA_DROOP,
  37904. WMI_HALPHY_CAL_DAC,
  37905. WMI_HALPHY_CAL_ANI,
  37906. WMI_HALPHY_CAL_NOISE_FLOOR,
  37907. WMI_HALPHY_CAL_MAX_CAL_LIST
  37908. } WMI_HALPHY_CAL_LIST;
  37909. /* WMI_HALPHY_CAL_VALID_BITMAP_STATUS
  37910. *
  37911. * In WMI wmi_pdev_get_halphy_cal_status_evt_fixed_param
  37912. * (halphy_cal_valid_bmap member), below enum list must be used
  37913. * to get which calibration status indication is sent by FW to HOST.
  37914. * Only if that particular bit it set, corresponding bit of the
  37915. * halphy_cal_status variable will be valid.
  37916. */
  37917. typedef enum {
  37918. WMI_HALPHY_CAL_ADC_BMAP = (1 << WMI_HALPHY_CAL_ADC),
  37919. WMI_HALPHY_CAL_BWFILTER_BMAP = (1 << WMI_HALPHY_CAL_BWFILTER),
  37920. WMI_HALPHY_CAL_PDET_AND_PAL_BMAP = (1 << WMI_HALPHY_CAL_PDET_AND_PAL),
  37921. WMI_HALPHY_CAL_RXDCO_BMAP = (1 << WMI_HALPHY_CAL_RXDCO),
  37922. WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ_BMAP = (1 << WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ),
  37923. WMI_HALPHY_CAL_IBF_BMAP = (1 << WMI_HALPHY_CAL_IBF),
  37924. WMI_HALPHY_CAL_PA_DROOP_BMAP = (1 << WMI_HALPHY_CAL_PA_DROOP),
  37925. WMI_HALPHY_CAL_DAC_BMAP = (1 << WMI_HALPHY_CAL_DAC),
  37926. WMI_HALPHY_CAL_ANI_BMAP = (1 << WMI_HALPHY_CAL_ANI),
  37927. WMI_HALPHY_CAL_NOISE_FLOOR_BMAP = (1 << WMI_HALPHY_CAL_NOISE_FLOOR),
  37928. } WMI_HALPHY_CAL_VALID_BITMAP_STATUS;
  37929. typedef struct {
  37930. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_halphy_cal_status_evt_fixed_param */
  37931. A_UINT32 pdev_id; /* PDEV Id set by the command */
  37932. /*
  37933. * Calibration valid bitmap from HALPHY, refer to
  37934. * WMI_HALPHY_CAL_VALID_BITMAP_STATUS.
  37935. * Only if this particular bit it set, corresponding bit of the
  37936. * halphy_cal_status variable will be valid.
  37937. */
  37938. A_UINT32 halphy_cal_valid_bmap;
  37939. /* Calibration result status bitmap from HALPHY.
  37940. * The WMI_HALPHY_CAL_VALID_BITMAP_STATUS enum identifies which bit
  37941. * in the bitmap corresponds to which cal type.
  37942. * Each valid bit uses the following settings:
  37943. * 1 - SUCCESS
  37944. * 0 - FAILURE
  37945. */
  37946. A_UINT32 halphy_cal_status;
  37947. } wmi_pdev_get_halphy_cal_status_evt_fixed_param;
  37948. typedef struct {
  37949. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_halphy_cal_bmap_cmd_fixed_param */
  37950. A_UINT32 pdev_id; /* PDEV ID set by the command */
  37951. /*
  37952. * Calibration valid bitmap from HOST, refer to
  37953. * WMI_HALPHY_CAL_VALID_BITMAP_STATUS.
  37954. * Based on the bitmap value, HALPHY will set corresponding mask values
  37955. * to each of the online calibrations
  37956. */
  37957. A_UINT32 online_halphy_cals_bmap;
  37958. /* Calibration enable/disable support for home/scan channel
  37959. * 0 - home channel
  37960. * 1 - scan channel
  37961. * 2 - both home and scan channel
  37962. */
  37963. A_UINT32 home_scan_channel;
  37964. } wmi_pdev_set_halphy_cal_bmap_cmd_fixed_param;
  37965. typedef struct {
  37966. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_halphy_cal_bmap_evt_fixed_param */
  37967. A_UINT32 pdev_id; /* PDEV Id set by the command */
  37968. /* Status indication for calibration
  37969. * 0 - SUCCESS
  37970. * 1 - FAIL
  37971. * This WMI command will by sent from HOST dynamically but only one
  37972. * at a time. So no need of cookie/request handshake.
  37973. */
  37974. A_UINT32 status;
  37975. } wmi_pdev_set_halphy_cal_bmap_evt_fixed_param;
  37976. /* below structures are related to Motion Detection. */
  37977. typedef struct {
  37978. /** TLV tag and len; tag equals
  37979. * WMITLV_TAG_STRUC_wmi_motion_det_config_params_cmd_fixed_param */
  37980. A_UINT32 tlv_header; /** TLV Header */
  37981. A_UINT32 vdev_id; /** Vdev ID */
  37982. A_UINT32 time_t1; /** Time gap of successive bursts of
  37983. * measurement frames during coarse
  37984. * motion detection (in ms) */
  37985. A_UINT32 time_t2; /** Time gap of successive bursts of
  37986. * measurement frames during fine
  37987. * motion detection (in ms) */
  37988. A_UINT32 n1; /** number of measurement frames in one
  37989. * burst, for coarse detection */
  37990. A_UINT32 n2; /** number of measurement frames in one
  37991. * burst, for fine detection */
  37992. A_UINT32 time_t1_gap; /** gap between measurement frames in
  37993. * course detection (in ms) */
  37994. A_UINT32 time_t2_gap; /** gap between measurement frames in
  37995. * fine detection (in ms) */
  37996. A_UINT32 coarse_K; /** number of times motion detection has to
  37997. * be performed for coarse detection */
  37998. A_UINT32 fine_K; /** number of times motion detection has to
  37999. * be performed for fine detection */
  38000. A_UINT32 coarse_Q; /** number of times motion is expected
  38001. * to be detected for success case in
  38002. * coarse detection */
  38003. A_UINT32 fine_Q; /** number of times motion is expected
  38004. * to be detected for success case in
  38005. * fine detection */
  38006. A_UINT32 md_coarse_thr_high; /** higher threshold value (in percent)
  38007. * from host to FW, which will be used in
  38008. * coarse detection phase of motion detection.
  38009. * This is the threshold for the correlation
  38010. * of the old RF local-scattering environment
  38011. * with the current RF local-scattering
  38012. * environment. A value of 100(%) indicates
  38013. * that neither the transceiver nor any
  38014. * nearby objects have changed position. */
  38015. A_UINT32 md_fine_thr_high; /** higher threshold value (in percent)
  38016. * from host to FW, which will be used in
  38017. * fine detection phase of motion detection.
  38018. * This is the threshold for correlation
  38019. * between the old and current RF environments,
  38020. * as explained above. */
  38021. A_UINT32 md_coarse_thr_low; /** lower threshold value (in percent)
  38022. * for immediate detection of motion in
  38023. * coarse detection phase.
  38024. * This is the threshold for correlation
  38025. * between the old and current RF environments,
  38026. * as explained above. */
  38027. A_UINT32 md_fine_thr_low; /** lower threshold value (in percent)
  38028. * for immediate detection of motion in
  38029. * fine detection phase.
  38030. * This is the threshold for correlation
  38031. * between the old and current RF environments,
  38032. * as explained above. */
  38033. } wmi_motion_det_config_params_cmd_fixed_param;
  38034. typedef struct {
  38035. /** TLV tag and len; tag equals
  38036. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_config_params_cmd_fixed_param */
  38037. A_UINT32 tlv_header; /** TLV Header */
  38038. A_UINT32 vdev_id; /** Vdev ID */
  38039. A_UINT32 bl_time_t; /** time T for baseline (in ms)
  38040. * Every bl_time_t, bl_n packets are sent */
  38041. A_UINT32 bl_packet_gap; /** gap between measurement frames for baseline
  38042. * (in ms) */
  38043. A_UINT32 bl_n; /** number of measurement frames to be sent
  38044. * during one baseline */
  38045. A_UINT32 bl_num_meas; /** number of times the baseline measurement
  38046. * to be done */
  38047. } wmi_motion_det_base_line_config_params_cmd_fixed_param;
  38048. typedef struct {
  38049. /** TLV tag and len; tag equals
  38050. * WMITLV_TAG_STRUC_wmi_motion_det_start_stop_cmd_fixed_param */
  38051. A_UINT32 tlv_header; /** TLV Header */
  38052. A_UINT32 vdev_id; /** Vdev ID */
  38053. A_UINT32 enable; /** start = 1, stop =0 */
  38054. } wmi_motion_det_start_stop_cmd_fixed_param;
  38055. typedef struct {
  38056. /** TLV tag and len; tag equals
  38057. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_start_stop_cmd_fixed_param */
  38058. A_UINT32 tlv_header; /** TLV Header */
  38059. A_UINT32 vdev_id; /** Vdev ID */
  38060. A_UINT32 enable; /** start = 1, stop =0 */
  38061. } wmi_motion_det_base_line_start_stop_cmd_fixed_param;
  38062. typedef struct {
  38063. /** TLV tag and len; tag equals
  38064. * WMITLV_TAG_STRUC_wmi_motion_det_event */
  38065. A_UINT32 tlv_header; /** TLV Header */
  38066. A_UINT32 vdev_id; /** Vdev ID */
  38067. A_UINT32 status; /** status = 1 -> motion detected */
  38068. } wmi_motion_det_event;
  38069. typedef struct {
  38070. /** TLV tag and len; tag equals
  38071. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_event */
  38072. A_UINT32 tlv_header; /** TLV Header */
  38073. A_UINT32 vdev_id; /** Vdev ID */
  38074. A_UINT32 bl_baseline_value; /** baseline correlation value calculated
  38075. * during baselining phase (in %) */
  38076. A_UINT32 bl_max_corr_reserved; /** max corr value obtained during baselining
  38077. * phase (in %); reserved for future */
  38078. A_UINT32 bl_min_corr_reserved; /** min corr value obtained during baselining
  38079. * phase (in %); reserved for future */
  38080. } wmi_motion_det_base_line_event;
  38081. /* Below structures are related to OBSS_PD_SPATIAL Reuse */
  38082. typedef struct {
  38083. /** TLV tag and len; tag equals
  38084. * WMITLV_TAG_STRUC_wmi_obss_set_cmd_fixed_param */
  38085. A_UINT32 tlv_header;
  38086. /** Enable/Disable Spatial Reuse */
  38087. A_UINT32 enable;
  38088. /*
  38089. * In the below fields, "OBSS level" refers to the power of the
  38090. * signals received from "Other BSS".
  38091. * Spatial reuse will only be permitted if the Other BSS's signal power
  38092. * is within the min to max range specified by the below fields.
  38093. */
  38094. /** Minimum OBSS level to use */
  38095. A_INT32 obss_min; /* RSSI in dBm */
  38096. /** Maximum OBSS level to use */
  38097. A_INT32 obss_max; /* RSSI in dBm */
  38098. /** Vdev id*/
  38099. A_UINT32 vdev_id;
  38100. } wmi_obss_spatial_reuse_set_cmd_fixed_param;
  38101. /*
  38102. * Below structure is related to WMI CMD that configures the default
  38103. * minimum (OBSS_MIN) and maximum (OBSS_MAX) Other BSS levels (RSSI in dBm)
  38104. * for VDEV of a give type (STA or AP). These thresholds are configured
  38105. * within the Host and passed down to the FW. FW will use these
  38106. * default OBSS_MIN and OBSS_MAX values during roaming if the assoc response
  38107. * from the AP does not include spatial reuse parameter set Info Element.
  38108. */
  38109. typedef struct {
  38110. /** TLV tag and len; tag equals
  38111. * WMITLV_TAG_STRUC_wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param
  38112. */
  38113. A_UINT32 tlv_header;
  38114. /*
  38115. * In the below fields, "OBSS level" refers to the power of the
  38116. * signals received from "Other BSS".
  38117. * Spatial reuse will only be permitted if the Other BSS's signal power
  38118. * is within the min to max range specified by the below fields.
  38119. */
  38120. /** Minimum OBSS level to use */
  38121. A_INT32 obss_min; /* RSSI in dBm */
  38122. /** Maximum OBSS level to use */
  38123. A_INT32 obss_max; /* RSSI in dBm */
  38124. /** Type of VDEV for which these threshold are applicable.
  38125. * vdev_type should be one of WMI_VDEV_TYPE_STA or WMI_VDEV_TYPE_AP
  38126. */
  38127. A_UINT32 vdev_type;
  38128. } wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param;
  38129. typedef struct {
  38130. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_chan_width_peer_list */
  38131. wmi_mac_addr peer_macaddr;
  38132. A_UINT32 chan_width; /* wmi_channel_width */
  38133. A_UINT32 puncture_20mhz_bitmap; /* per peer wmi puncture_bitmap,
  38134. * each bit indicates one 20 MHz BW
  38135. * punctured.
  38136. * This variable should be read from left,
  38137. * LSb will point to the lowest-frequency
  38138. * 20 MHz frequency slice.
  38139. * bit value:
  38140. * 0 - 20 MHz BW is punctured
  38141. * 1 - not punctured
  38142. */
  38143. } wmi_chan_width_peer_list;
  38144. #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VALID_VDEV_ID(comp) WMI_SET_BITS(comp, 31,1, 1)
  38145. #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VALID_VDEV_ID(comp) WMI_GET_BITS(comp, 31, 1)
  38146. #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VALID_PUNCTURE_BITMAP(comp) WMI_SET_BITS(comp, 30, 1, 1)
  38147. #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VALID_PUNCTURE_BITMAP(comp) WMI_GET_BITS(comp, 30, 1)
  38148. /* bits 29:8 currently unused */
  38149. #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VDEV_ID(comp, value) WMI_SET_BITS(comp, 0, 8, value)
  38150. #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VDEV_ID(comp) WMI_GET_BITS(comp, 0, 8)
  38151. typedef struct {
  38152. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_chan_width_switch_cmd_fixed_param */
  38153. A_UINT32 num_peers;
  38154. /* vdev_var:
  38155. * The MSb (bit 31) indicates that the vdev_id is valid.
  38156. * Bit 30 indicates that the puncture bitmap is valid.
  38157. * The LSB (bits 0-7) is used to infer the actual vdev_id.
  38158. * The other bits can be used for future enhancements.
  38159. */
  38160. A_UINT32 vdev_var;
  38161. /*
  38162. * Following this structure is the TLV:
  38163. * struct wmi_chan_width_peer_list chan_width_peer_info[num_peers];
  38164. */
  38165. } wmi_peer_chan_width_switch_cmd_fixed_param;
  38166. #define WMI_PEER_BULK_SET_VDEV_ID(comp, value) WMI_SET_BITS(comp, 0, 8, value)
  38167. #define WMI_PEER_BULK_GET_VDEV_ID(comp) WMI_GET_BITS(comp, 0, 8)
  38168. /* bits 30:8 currently unused */
  38169. #define WMI_PEER_BULK_SET_VALID_VDEV_ID(comp) WMI_SET_BITS(comp, 31, 1, 1)
  38170. #define WMI_PEER_BULK_GET_VALID_VDEV_ID(comp) WMI_GET_BITS(comp, 31, 1)
  38171. typedef struct {
  38172. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_peer_list */
  38173. wmi_mac_addr peer_macaddr;
  38174. /** parameter id */
  38175. A_UINT32 param_id;
  38176. A_UINT32 param_value;
  38177. } wmi_peer_list;
  38178. /* WMI_PEER_BULK_SET_CMDID */
  38179. typedef struct {
  38180. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bulk_set_cmd_fixed_param */
  38181. /* vdev_var:
  38182. * The MSb (bit 31) indicates that the vdev_id is valid.
  38183. * The LSB (bits 0-7) is used to infer the actual vdev_id.
  38184. * The other bits can be used for future enhancements.
  38185. */
  38186. A_UINT32 vdev_var;
  38187. /*
  38188. * Following this structure is the TLV array:
  38189. * struct wmi_peer_list peer_info[];
  38190. */
  38191. } wmi_peer_bulk_set_cmd_fixed_param;
  38192. typedef struct {
  38193. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_he_tb_action_frm_cmd_fixed_param */
  38194. A_UINT32 tlv_header;
  38195. /* enable or disable HE TB Action frame */
  38196. A_UINT32 enable;
  38197. /* length of action frame body in bytes */
  38198. A_UINT32 data_len;
  38199. /* This TLV is followed by another TLV of array of bytes
  38200. * A_UINT8 data[];
  38201. * This data array contains the action frame raw data
  38202. */
  38203. } wmi_pdev_he_tb_action_frm_cmd_fixed_param;
  38204. typedef struct {
  38205. /** TLV tag and len; tag equals
  38206. * WMITLV_TAG_STRUC_wmi_hpcs_pulse_start_cmd_fixed_param */
  38207. A_UINT32 tlv_header; /** TLV Header */
  38208. A_UINT32 vdev_id; /** Vdev ID */
  38209. A_UINT32 start; /** Start/Stop */
  38210. A_UINT32 sync_time; /** Lower 32-bit of the TSF at which the
  38211. * pulse should be synced. */
  38212. A_UINT32 pulse_interval; /** Periodicity of pulses in micro seconds */
  38213. A_UINT32 active_sync_period; /** Number of beacons to sync before generating
  38214. * pulse in units of beacon interval.
  38215. * Valid for clock slaves only. */
  38216. A_UINT32 gpio_pin; /** GPIO Pin number to be used */
  38217. A_UINT32 pulse_width; /** Duration of pulse in micro seconds */
  38218. } wmi_hpcs_pulse_start_cmd_fixed_param;
  38219. typedef struct {
  38220. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_muedca_params_config_event_fixed_param */
  38221. A_UINT32 tlv_header; /** TLV Header */
  38222. A_UINT32 pdev_id;
  38223. /*
  38224. * The following per-AC arrays are indexed using the
  38225. * WMI_AC_xxx / wmi_traffic_ac enum values.
  38226. */
  38227. /* aifsn
  38228. * Arbitration inter frame spacing number (AIFSN)
  38229. * Values are integers used for back off computation.
  38230. */
  38231. A_UINT32 aifsn[WMI_AC_MAX];
  38232. /* ecwmin
  38233. * Exponent form of ContentionWindow min (ECWmin)
  38234. * Values are integers used for back off computation.
  38235. */
  38236. A_UINT32 ecwmin[WMI_AC_MAX];
  38237. /* ecwmax
  38238. * Exponent form of ContentionWindow max (ECWmax)
  38239. * Values are integers used for back off computation.
  38240. */
  38241. A_UINT32 ecwmax[WMI_AC_MAX];
  38242. /* muedca_expiration_time
  38243. * MU EDCA Expiration time refers to the length of time after the most
  38244. * recent UL trigger time. The MU EDCA Timer field indicates the time
  38245. * limit, in units of 8 TUs
  38246. */
  38247. A_UINT32 muedca_expiration_time[WMI_AC_MAX];
  38248. } wmi_muedca_params_config_event_fixed_param;
  38249. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  38250. #define WMI_HEOPS_DEFPE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 0, 3)
  38251. #define WMI_HEOPS_DEFPE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 0, 3, value)
  38252. /* TWT required */
  38253. #define WMI_HEOPS_TWT_REQUIRED_GET_D3(he_ops) WMI_GET_BITS(he_ops, 3, 1)
  38254. #define WMI_HEOPS_TWT_REQUIRED_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 3, 1, value)
  38255. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  38256. #define WMI_HEOPS_RTSTHLD_GET_D3(he_ops) WMI_GET_BITS(he_ops, 4, 10)
  38257. #define WMI_HEOPS_RTSTHLD_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 4, 10, value)
  38258. /* VHT Operation Information Present */
  38259. #define WMI_HEOPS_VHTOPSPRSNT_GET_D3(he_ops) WMI_GET_BITS(he_ops, 14, 1)
  38260. #define WMI_HEOPS_VHTOPSPRSNT_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 14, 1, value)
  38261. /* Co-Located BSS */
  38262. #define WMI_HEOPS_COLOCBSS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 15, 1)
  38263. #define WMI_HEOPS_COLOCBSS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 15, 1, value)
  38264. /* ER SU Disable */
  38265. #define WMI_HEOPS_ERSUDIS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 16, 1)
  38266. #define WMI_HEOPS_ERSUDIS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 16, 1, value)
  38267. /* bit17 - bit23 are reserved */
  38268. /* BSS color */
  38269. #define WMI_HEOPS_COLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 24, 6)
  38270. #define WMI_HEOPS_COLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 24, 6, value)
  38271. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  38272. #define WMI_HEOPS_PARTBSSCOLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  38273. #define WMI_HEOPS_PARTBSSCOLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  38274. /* when set to 1 disables use of BSS color */
  38275. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 31, 1)
  38276. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 31, 1, value)
  38277. /* PHY Capabilities Information field */
  38278. /* bit 0 reserved */
  38279. /*
  38280. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  38281. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  38282. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  38283. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  38284. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  38285. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  38286. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  38287. * 242-tone RU mapping in 40 MHz and 80
  38288. * MHz channel width in 5 GHz. Otherwise Reserved.
  38289. * B6: Reserved
  38290. */
  38291. #define WMI_HECAP_PHY_CBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  38292. #define WMI_HECAP_PHY_CBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  38293. /*
  38294. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  38295. * where in the preamble only the secondary 20 MHz is punctured
  38296. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  38297. * where in the preamble only one of the two 20 MHz sub-channels in the
  38298. * secondary 40 MHz is punctured
  38299. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  38300. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  38301. * secondary 20 MHz is punctured
  38302. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  38303. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  38304. * primary 40 MHz is present
  38305. */
  38306. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  38307. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  38308. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  38309. #define WMI_HECAP_PHY_COD_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  38310. #define WMI_HECAP_PHY_COD_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  38311. /* Indicates support of transmission and reception of LDPC encoded packets */
  38312. #define WMI_HECAP_PHY_LDPC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  38313. #define WMI_HECAP_PHY_LDPC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  38314. /*
  38315. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  38316. */
  38317. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  38318. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  38319. /*
  38320. * If the Doppler Rx subfield is 1, indicates the maximum number of space-time streams supported for reception
  38321. * when a midamble is present in the Data field.
  38322. * If the Doppler Tx subfield is 1, indicates the maximum number of space-time streams supported for transmission
  38323. * when a midamble is present in the Data field.
  38324. * If both Doppler Rx and Doppler Tx subfields are 1, indicates the maximum number of space-time streams
  38325. * supported for transmission and reception when a midamble is present in the Data field.
  38326. */
  38327. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  38328. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  38329. /*
  38330. * B0: For a transmitting STA acting as beamformee, it indicates support of
  38331. * NDP reception using 4x LTF and 3.2 us guard interval duration
  38332. */
  38333. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  38334. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  38335. /*
  38336. * indicates support for the transmission of an HE TB PPDU that has a
  38337. * bandwidth less than or equal to 80 MHz and is using STBC and with
  38338. * one spatial stream
  38339. */
  38340. #define WMI_HECAP_PHY_TXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  38341. #define WMI_HECAP_PHY_TXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  38342. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx */
  38343. #define WMI_HECAP_PHY_RXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  38344. #define WMI_HECAP_PHY_RXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  38345. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  38346. #define WMI_HECAP_PHY_TXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  38347. #define WMI_HECAP_PHY_TXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  38348. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  38349. #define WMI_HECAP_PHY_RXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  38350. #define WMI_HECAP_PHY_RXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  38351. /*
  38352. * If the transmitting STA is an AP:
  38353. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  38354. * transmission.
  38355. * If the transmitting STA is a non-AP STA:
  38356. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  38357. * transmission.
  38358. */
  38359. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  38360. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  38361. /*
  38362. * If the transmitting STA is an AP:
  38363. * indicates STA supports of reception of UL MUMIMO transmission on an
  38364. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  38365. * If the transmitting STA is a non-AP STA:
  38366. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  38367. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  38368. */
  38369. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  38370. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  38371. /* Tx DCM
  38372. * B0:B1
  38373. * 00: Does not support DCM
  38374. * 01: BPSK
  38375. * 10: QPSK
  38376. * 11: 16-QAM
  38377. * B2 signals maximum number of spatial streams with DCM
  38378. * 0: 1 spatial stream
  38379. * 1: 2 spatial streams
  38380. */
  38381. #define WMI_HECAP_PHY_DCMTX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  38382. #define WMI_HECAP_PHY_DCMTX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  38383. /* Rx DCM
  38384. * B0:B1
  38385. * 00: Does not support DCM
  38386. * 01: BPSK
  38387. * 10: QPSK
  38388. * 11: 16-QAM
  38389. * B2 signals maximum number of spatial streams with DCM
  38390. * 0: 1 spatial stream
  38391. * 1: 2 spatial streams
  38392. */
  38393. #define WMI_HECAP_PHY_DCMRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  38394. #define WMI_HECAP_PHY_DCMRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  38395. /*
  38396. * Indicates that the STA supports the reception of an HE MU PPDU payload
  38397. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  38398. */
  38399. #define WMI_HECAP_PHY_ULHEMU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  38400. #define WMI_HECAP_PHY_ULHEMU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  38401. /* Indicates support for operation as an SU beamformer */
  38402. #define WMI_HECAP_PHY_SUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  38403. #define WMI_HECAP_PHY_SUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  38404. /* Indicates support for operation as an SU beamformee */
  38405. #define WMI_HECAP_PHY_SUBFME_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  38406. #define WMI_HECAP_PHY_SUBFME_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  38407. /* Indicates support for operation as an MU Beamformer */
  38408. #define WMI_HECAP_PHY_MUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  38409. #define WMI_HECAP_PHY_MUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  38410. /*
  38411. * Num STS -1 for <= 80MHz (min val 3)
  38412. * The maximum number of space-time streams minus 1 that the STA can
  38413. * receive in an HE NDP
  38414. */
  38415. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  38416. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  38417. /*
  38418. * Num STS -1 for > 80MHz (min val 3)
  38419. * The maximum number of space-time streams minus 1 that the STA can
  38420. * receive in an HE NDP
  38421. */
  38422. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  38423. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  38424. /*
  38425. * Number Of Sounding Dimensions For <= 80 MHz
  38426. * If SU beamformer capable, set to the maximum supported value of the
  38427. * TXVECTOR parameter NUM_STS minus 1.
  38428. * Otherwise, reserved.
  38429. */
  38430. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  38431. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  38432. /*
  38433. * Number Of Sounding Dimensions For > 80 MHz
  38434. * If SU beamformer capable, set to the maximum supported value of the
  38435. * TXVECTOR parameter NUM_STS minus 1.
  38436. * Otherwise, reserved.
  38437. */
  38438. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  38439. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  38440. /*
  38441. * Indicates if the HE beamformee is capable of feedback with tone
  38442. * grouping of 16 in the HE Compressed Beamforming Report field for
  38443. * a SU-type feedback.
  38444. */
  38445. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  38446. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  38447. /*
  38448. * Indicates if the HE beamformee is capable of feedback with tone
  38449. * grouping of 16 in the HE Compressed Beamforming Report field for
  38450. * a MU-type feedback.
  38451. */
  38452. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  38453. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  38454. /*
  38455. * Indicates if HE beamformee is capable of feedback with codebook
  38456. * size {4, 2} in the HECompressed Beamforming Report field for
  38457. * a SU-type feedback.
  38458. */
  38459. #define WMI_HECAP_PHY_CODBK42SU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  38460. #define WMI_HECAP_PHY_CODBK42SU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  38461. /*
  38462. * Indicates if HE beamformee is capable of feedback with codebook
  38463. * size {7, 5} in the HE Compressed Beamforming Report field for
  38464. * a MU-type feedback.
  38465. */
  38466. #define WMI_HECAP_PHY_CODBK75MU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  38467. #define WMI_HECAP_PHY_CODBK75MU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  38468. /*
  38469. * Beamforming Feedback With Trigger Frame
  38470. * If the transmitting STA is an AP STA:
  38471. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  38472. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  38473. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  38474. * If the transmitting STA is a non-AP STA:
  38475. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  38476. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  38477. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  38478. */
  38479. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  38480. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  38481. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  38482. * over the right 106-tone RU or partial BW ER
  38483. */
  38484. #define WMI_HECAP_PHY_HEERSU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  38485. #define WMI_HECAP_PHY_HEERSU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  38486. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  38487. * where the RU does not span the entire PPDU bandwidth.
  38488. */
  38489. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  38490. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  38491. /* Indicates whether or not the PPE Threshold field is present */
  38492. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  38493. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  38494. /* Indicates that the STA supports SRP-based SR operation */
  38495. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  38496. #define WMI_HECAP_PHY_SRPPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  38497. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  38498. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  38499. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  38500. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  38501. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  38502. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  38503. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  38504. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  38505. * minus 1. Otherwise, reserved.
  38506. */
  38507. #define WMI_HECAP_PHY_MAXNC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  38508. #define WMI_HECAP_PHY_MAXNC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  38509. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  38510. * STBC with one spatial stream
  38511. */
  38512. #define WMI_HECAP_PHY_STBCTXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  38513. #define WMI_HECAP_PHY_STBCTXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  38514. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  38515. * STBC with one spatial stream
  38516. */
  38517. #define WMI_HECAP_PHY_STBCRXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  38518. #define WMI_HECAP_PHY_STBCRXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  38519. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  38520. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  38521. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  38522. /*
  38523. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  38524. * 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.
  38525. */
  38526. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  38527. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  38528. /*
  38529. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  38530. * 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.
  38531. */
  38532. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  38533. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  38534. /*
  38535. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  38536. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  38537. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  38538. * 160 MHz HE TB PPDU.
  38539. */
  38540. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  38541. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  38542. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  38543. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  38544. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  38545. /*
  38546. * If the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF in
  38547. * 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
  38548. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  38549. *
  38550. * If the Doppler Tx subfield is 1, indicates support for transmitting midambles with 2x HE-LTF, 1x HE-LTF
  38551. * in HE TB PPDU when allowed.
  38552. * If both the Doppler Rx and Doppler Tx subfields are 1, indicates support for receiving midambles with 2x HELTF,
  38553. * 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
  38554. * 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
  38555. * to 1; and also support for transmitting midambles with 2x HE-LTF, 1x HE-LTF in HE TB PPDU when allowed.
  38556. */
  38557. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  38558. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  38559. /*
  38560. * If the DCM Max Constellation Tx subfield is greater than 0, then the DCM Max BW subfield indicates the
  38561. * maximum bandwidth of a PPDU that the STA might transmit with DCM applied.
  38562. *
  38563. * If the DCM Max Constellation Rx subfield is greater than 0, then the DCM Max BW subfield indicates the
  38564. * maximum bandwidth of a PPDU with DCM applied that the STA can receive.
  38565. *
  38566. * If both the DCM Max Constellation Tx subfield and DCM Max Constellation Rx subfield are 0, then this
  38567. * subfield is reserved.
  38568. *
  38569. * 0=20MHz, 1=40Mhz, 2=80Mhz, 3=160Mhz or 80+80Mhz
  38570. */
  38571. #define WMI_HECAP_PHY_DCMMAXBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 6, 2)
  38572. #define WMI_HECAP_PHY_DCMMAXBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 6, 2, value)
  38573. /*
  38574. * For a non-AP STA, indicates support for receiving a DL HE MU PPDU where the number of OFDM symbols
  38575. * in the HE SIG-B field is greater than 16.
  38576. */
  38577. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 8, 1)
  38578. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 8, 1, value)
  38579. /*
  38580. * For an AP, indicates support for the reception of full bandwidth non-triggered CQI-only feedback.
  38581. * For a non-AP STA, indicates support for the transmission of full bandwidth non-triggered CQI-only feedback.
  38582. */
  38583. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 9, 1)
  38584. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 9, 1, value)
  38585. /*
  38586. * For a non-AP STA, indicates support for the transmission of 1024-QAM on a 26-, 52-, and 106-tone RU.
  38587. * Reserved for an AP.
  38588. */
  38589. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 10, 1)
  38590. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 10, 1, value)
  38591. /*
  38592. * Indicates support for the reception of 1024-QAM on a 26-, 52-, and 106-tone RU.
  38593. */
  38594. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 11, 1)
  38595. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 11, 1, value)
  38596. /*
  38597. * Indicates support for reception of an HE MU PPDU with an RU spanning the entire PPDU bandwidth and a
  38598. * compressed HE-SIG-B format.
  38599. */
  38600. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 12, 1)
  38601. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 12, 1, value)
  38602. /*
  38603. * Indicates support for reception of an HE MU PPDU with a bandwidth less than or equal to 80 MHz, an RU
  38604. * spanning the entire PPDU bandwidth and a non-compressed HE-SIG-B format.
  38605. */
  38606. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 13, 1)
  38607. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 13, 1, value)
  38608. /* HE MAC Capabilities Information field format */
  38609. /* HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field */
  38610. #define WMI_HECAP_MAC_HECTRL_GET_D3(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  38611. #define WMI_HECAP_MAC_HECTRL_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  38612. /* set to 1 to for TWT Requestor support */
  38613. #define WMI_HECAP_MAC_TWTREQ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  38614. #define WMI_HECAP_MAC_TWTREQ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  38615. /* set to 1 to for TWT Responder support */
  38616. #define WMI_HECAP_MAC_TWTRSP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  38617. #define WMI_HECAP_MAC_TWTRSP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  38618. /* Level of frag support
  38619. Set to 0 for no support for dynamic fragmentation.
  38620. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  38621. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  38622. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  38623. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  38624. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  38625. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  38626. */
  38627. #define WMI_HECAP_MAC_HEFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  38628. #define WMI_HECAP_MAC_HEFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  38629. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs */
  38630. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  38631. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  38632. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  38633. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  38634. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  38635. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  38636. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  38637. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  38638. /* Indicates the number of TIDs of QoS Data frames that an HE STA can receive in a multi-TID AMPDU */
  38639. #define WMI_HECAP_MAC_MTID_RX_GET_D3(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  38640. #define WMI_HECAP_MAC_MTID_RX_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  38641. /* Indicates support for link adaptation using the HLA Control subfield. */
  38642. #define WMI_HECAP_MAC_HELINK_ADPT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 15, 2)
  38643. #define WMI_HECAP_MAC_HELINK_ADPT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 15, 2, value)
  38644. /* Set to 1 for reception of AllAck support */
  38645. #define WMI_HECAP_MAC_AACK_GET_D3(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  38646. #define WMI_HECAP_MAC_AACK_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  38647. /* Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field */
  38648. #define WMI_HECAP_MAC_TRS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  38649. #define WMI_HECAP_MAC_TRS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  38650. /* Set to 1 if the STA supports the BSR A-Control field functionality.*/
  38651. #define WMI_HECAP_MAC_BSR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  38652. #define WMI_HECAP_MAC_BSR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  38653. /* Set to 1 when the STA supports broadcast TWT functionality.*/
  38654. #define WMI_HECAP_MAC_BCSTTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  38655. #define WMI_HECAP_MAC_BCSTTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  38656. /* Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap */
  38657. #define WMI_HECAP_MAC_32BITBA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  38658. #define WMI_HECAP_MAC_32BITBA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  38659. /* Set to 1 if the STA supports MU cascading operation */
  38660. #define WMI_HECAP_MAC_MUCASCADE_GET_D3(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  38661. #define WMI_HECAP_MAC_MUCASCADE_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  38662. /* Set to 1 when the STA supports reception of this multi-TID A-MPDU format */
  38663. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  38664. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  38665. /* bit 24 - reserved */
  38666. /* Set to 1 if the STA supports reception of the OMI A-Control field */
  38667. #define WMI_HECAP_MAC_OMI_GET_D3(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  38668. #define WMI_HECAP_MAC_OMI_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  38669. /*1 if OFDMA Random Access Supported */
  38670. #define WMI_HECAP_MAC_OFDMARA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  38671. #define WMI_HECAP_MAC_OFDMARA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  38672. /* Maximum AMPDU Length Exponent.
  38673. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  38674. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  38675. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  38676. * padding is not included in this limit.
  38677. */
  38678. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  38679. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  38680. /* A-MSDU Fragmentation Support */
  38681. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  38682. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  38683. /* Flexible TWT Schedule Support */
  38684. #define WMI_HECAP_MAC_FLEXTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  38685. #define WMI_HECAP_MAC_FLEXTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  38686. /* Rx Control Frame to MultiBSS */
  38687. #define WMI_HECAP_MAC_MBSS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  38688. #define WMI_HECAP_MAC_MBSS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  38689. /* 2nd DWORD of HE MAC Capabilities */
  38690. /* BSRP A-MPDU Aggregation
  38691. * maintaining compatibility since we don't support this now so not wasting memory
  38692. */
  38693. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 0, 1)
  38694. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 0, 1, value)
  38695. /* Quiet Time Period (QTP) operation
  38696. * maintaining compatibility since we don't support this now so not wasting memory
  38697. */
  38698. #define WMI_HECAP_MAC_QTP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 1, 1)
  38699. #define WMI_HECAP_MAC_QTP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 1, 1, value)
  38700. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  38701. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  38702. * that contains a BQR in the A-Control subfield
  38703. * maintaining compatibility since we don't support this now so not wasting memory
  38704. */
  38705. #define WMI_HECAP_MAC_ABQR_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 2, 1)
  38706. #define WMI_HECAP_MAC_ABQR_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 2, 1, value)
  38707. /* Indicates support by the STA for the role of SRP Responder.*/
  38708. #define WMI_HECAP_MAC_SRPRESP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 3, 1)
  38709. #define WMI_HECAP_MAC_SRPRESP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 3, 1, value)
  38710. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  38711. * the NDP Feedback Report Poll Trigger frame.
  38712. */
  38713. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 4, 1)
  38714. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 4, 1, value)
  38715. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  38716. * frames or TIM frames as described in AP operation for opportunistic power save.
  38717. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  38718. */
  38719. #define WMI_HECAP_MAC_OPS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 5, 1)
  38720. #define WMI_HECAP_MAC_OPS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 5, 1, value)
  38721. /* Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  38722. * a QoS Data frame for which no block ack agreement exists.
  38723. */
  38724. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 6, 1)
  38725. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 6, 1, value)
  38726. /* Indicates the number of TIDs of QoS Data frames that an HE STA can transmit in a multi-TID AMPDU */
  38727. #define WMI_HECAP_MAC_MTID_TX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 7, 3)
  38728. #define WMI_HECAP_MAC_MTID_TX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 7, 3, value)
  38729. /* Indicates whether an HE STA supports an HE subchannel selective transmission operation */
  38730. #define WMI_HECAP_MAC_SUBCHANSELTX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 10, 1)
  38731. #define WMI_HECAP_MAC_SUBCHANSELTX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 10, 1, value)
  38732. /* Indicates support by a STA to receive a TRS Control subfield or a Trigger frame with a User Info
  38733. * field addressed to the STA with the RU Allocation subfield of the TRS Control subfield or the User
  38734. * Info field indicating 2x996-tone.
  38735. */
  38736. #define WMI_HECAP_MAC_UL2X996RU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 11, 1)
  38737. #define WMI_HECAP_MAC_UL2X996RU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 11, 1, value)
  38738. /* Indicates whether an AP supports interpretation of the UL MU Data Disable subfield of the OM Control subfield */
  38739. #define WMI_HECAP_MAC_OMCULMUDDIS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 12, 1)
  38740. #define WMI_HECAP_MAC_OMCULMUDDIS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 12, 1, value)
  38741. /* Indicates the spatial multiplexing power save mode after receiving a
  38742. * Trigger frame that is in operation immediately after (re)association.
  38743. */
  38744. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 13, 1)
  38745. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 13, 1, value)
  38746. /* Indicates support for Punctured Sounding */
  38747. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 14, 1)
  38748. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 14, 1, value)
  38749. /* Indicates support for receiving a Trigger frame in an HT PPDU and
  38750. * receiving a Trigger frame in a VHT PPDU
  38751. */
  38752. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 15, 1)
  38753. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 15, 1, value)
  38754. /*
  38755. * The following conditionally-defined macros can be used in systems
  38756. * which only support either 802.11ax draft 2 or 802.11ax draft 3,
  38757. * but not both, and which make this D2 vs. D3 selection at build time.
  38758. */
  38759. #ifdef SUPPORT_11AX_D3
  38760. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D3
  38761. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D3
  38762. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D3
  38763. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D3
  38764. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D3
  38765. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D3
  38766. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_REQUIRED_GET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET */
  38767. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_REQUIRED_SET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET */
  38768. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D3
  38769. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D3
  38770. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D3
  38771. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D3
  38772. #define WMI_HEOPS_COLOCBSS_GET WMI_HEOPS_COLOCBSS_GET_D3
  38773. #define WMI_HEOPS_COLOCBSS_SET WMI_HEOPS_COLOCBSS_SET_D3
  38774. #define WMI_HEOPS_VHTOPSPRSNT_GET WMI_HEOPS_VHTOPSPRSNT_GET_D3
  38775. #define WMI_HEOPS_VHTOPSPRSNT_SET WMI_HEOPS_VHTOPSPRSNT_SET_D3
  38776. #define WMI_HEOPS_ERSUDIS_GET WMI_HEOPS_ERSUDIS_GET_D3
  38777. #define WMI_HEOPS_ERSUDIS_SET WMI_HEOPS_ERSUDIS_SET_D3
  38778. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D3
  38779. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D3
  38780. #define WMI_HEOPS_TXBSSID_GET(he_ops) (0) /* DEPRECATED - DO NOT USE */
  38781. #define WMI_HEOPS_TXBSSID_SET(he_ops, value) /* DEPRECATED - DO NOT USE */
  38782. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D3
  38783. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D3
  38784. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3
  38785. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3
  38786. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D3
  38787. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D3
  38788. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D3
  38789. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D3
  38790. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  38791. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  38792. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  38793. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  38794. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D3
  38795. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D3
  38796. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3
  38797. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3
  38798. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D3
  38799. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D3
  38800. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D3
  38801. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D3
  38802. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D3
  38803. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D3
  38804. #define WMI_HECAP_PHY_TXDOPPLER WMI_HECAP_PHY_TXDOPPLER_GET_D3
  38805. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D3
  38806. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D3
  38807. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D3
  38808. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D3
  38809. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D3
  38810. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3
  38811. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3
  38812. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D3
  38813. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D3
  38814. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D3
  38815. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D3
  38816. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  38817. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCMRX_GET_D3
  38818. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCMRX_SET_D3
  38819. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D3
  38820. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D3
  38821. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D3
  38822. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D3
  38823. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D3
  38824. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D3
  38825. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D3
  38826. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D3
  38827. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  38828. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  38829. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  38830. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  38831. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  38832. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  38833. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  38834. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  38835. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3
  38836. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3
  38837. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3
  38838. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3
  38839. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3
  38840. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3
  38841. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3
  38842. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3
  38843. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D3
  38844. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D3
  38845. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D3
  38846. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D3
  38847. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3
  38848. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3
  38849. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D3
  38850. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D3
  38851. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3
  38852. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3
  38853. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D3
  38854. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D3
  38855. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D3
  38856. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D3
  38857. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D3
  38858. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D3
  38859. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3
  38860. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3
  38861. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D3
  38862. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D3
  38863. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D3
  38864. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D3
  38865. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D3
  38866. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D3
  38867. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3
  38868. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3
  38869. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3
  38870. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3
  38871. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3
  38872. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3
  38873. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3
  38874. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3
  38875. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3
  38876. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3
  38877. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3
  38878. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3
  38879. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET /* DEPRECATED */
  38880. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET /* DEPRECATED */
  38881. #define WMI_HECAP_PHY_DCMMAXBW_GET WMI_HECAP_PHY_DCMMAXBW_GET_D3
  38882. #define WMI_HECAP_PHY_DCMMAXBW_SET WMI_HECAP_PHY_DCMMAXBW_SET_D3
  38883. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3
  38884. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3
  38885. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3
  38886. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3
  38887. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3
  38888. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3
  38889. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3
  38890. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3
  38891. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3
  38892. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3
  38893. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3
  38894. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3
  38895. #define WMI_HECAP_PHY_DB_GET(he_phy_cap) (0) /* DEPRECATED - DO NOT USE */
  38896. #define WMI_HECAP_PHY_DB_SET(he_phy_cap, value) /* DEPRECATED - DO NOT USE */
  38897. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D3
  38898. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D3
  38899. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D3
  38900. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D3
  38901. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D3
  38902. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D3
  38903. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D3
  38904. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D3
  38905. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3
  38906. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3
  38907. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D3
  38908. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D3
  38909. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D3
  38910. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D3
  38911. #define WMI_HECAP_MAC_MTID_RX_GET WMI_HECAP_MAC_MTID_RX_GET_D3
  38912. #define WMI_HECAP_MAC_MTID_RX_SET WMI_HECAP_MAC_MTID_RX_SET_D3
  38913. #define WMI_HECAP_MAC_HELINK_ADPT_GET WMI_HECAP_MAC_HELINK_ADPT_GET_D3
  38914. #define WMI_HECAP_MAC_HELINK_ADPT_SET WMI_HECAP_MAC_HELINK_ADPT_SET_D3
  38915. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D3
  38916. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D3
  38917. #define WMI_HECAP_MAC_TRS_GET WMI_HECAP_MAC_TRS_GET_D3
  38918. #define WMI_HECAP_MAC_TRS_SET WMI_HECAP_MAC_TRS_SET_D3
  38919. #define WMI_HECAP_MAC_ULMURSP_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  38920. #define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  38921. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D3
  38922. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D3
  38923. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D3
  38924. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D3
  38925. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D3
  38926. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D3
  38927. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D3
  38928. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D3
  38929. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3
  38930. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3
  38931. #define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  38932. #define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  38933. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D3
  38934. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D3
  38935. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D3
  38936. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D3
  38937. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3
  38938. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3
  38939. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D3
  38940. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D3
  38941. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D3
  38942. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D3
  38943. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D3
  38944. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D3
  38945. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D3
  38946. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D3
  38947. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D3
  38948. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D3
  38949. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D3
  38950. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D3
  38951. #define WMI_HECAP_MAC_SRPRESP_GET WMI_HECAP_MAC_SRPRESP_GET_D3
  38952. #define WMI_HECAP_MAC_SRPRESP_SET WMI_HECAP_MAC_SRPRESP_SET_D3
  38953. #define WMI_HECAP_MAC_SRRESP_GET(he_cap2) (0) /* DEPRECATED, DO NOT USE */
  38954. #define WMI_HECAP_MAC_SRRESP_SET(he_cap2, value) /* DEPRECATED, DO NOT USE */
  38955. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D3
  38956. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D3
  38957. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D3
  38958. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D3
  38959. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3
  38960. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3
  38961. #define WMI_HECAP_MAC_MTID_TX_GET WMI_HECAP_MAC_MTID_TX_GET_D3
  38962. #define WMI_HECAP_MAC_MTID_TX_SET WMI_HECAP_MAC_MTID_TX_SET_D3
  38963. #define WMI_HECAP_MAC_SUBCHANSELTX_GET WMI_HECAP_MAC_SUBCHANSELTX_GET_D3
  38964. #define WMI_HECAP_MAC_SUBCHANSELTX_SET WMI_HECAP_MAC_SUBCHANSELTX_SET_D3
  38965. #define WMI_HECAP_MAC_UL2X996RU_GET WMI_HECAP_MAC_UL2X996RU_GET_D3
  38966. #define WMI_HECAP_MAC_UL2X996RU_SET WMI_HECAP_MAC_UL2X996RU_SET_D3
  38967. #define WMI_HECAP_MAC_OMCULMUDDIS_GET WMI_HECAP_MAC_OMCULMUDDIS_GET_D3
  38968. #define WMI_HECAP_MAC_OMCULMUDDIS_SET WMI_HECAP_MAC_OMCULMUDDIS_SET_D3
  38969. #define WMI_HECAP_MAC_HELKAD_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  38970. #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  38971. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3 /* DEPRECATED - DO NOT USE */
  38972. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3 /* DEPRECATED - DO NOT USE */
  38973. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3
  38974. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3
  38975. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D3
  38976. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D3
  38977. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3
  38978. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3
  38979. #else /* SUPPORT_11AX_D3 vs. D2 */
  38980. /* D2 and D2- */
  38981. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D2
  38982. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D2
  38983. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D2
  38984. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D2
  38985. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D2
  38986. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D2
  38987. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_GET_D2 /* Deprecated */
  38988. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_SET_D2 /* Deprecated */
  38989. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D2
  38990. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D2
  38991. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D2
  38992. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D2
  38993. #define WMI_HEOPS_MAXBSSID_GET WMI_HEOPS_MAXBSSID_GET_D2
  38994. #define WMI_HEOPS_MAXBSSID_SET WMI_HEOPS_MAXBSSID_SET_D2
  38995. #define WMI_HEOPS_TXBSSID_GET WMI_HEOPS_TXBSSID_GET_D2
  38996. #define WMI_HEOPS_TXBSSID_SET WMI_HEOPS_TXBSSID_SET_D2
  38997. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D2
  38998. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D2
  38999. #define WMI_HEOPS_DUALBEACON_GET WMI_HEOPS_DUALBEACON_GET_D2
  39000. #define WMI_HEOPS_DUALBEACON_SET WMI_HEOPS_DUALBEACON_SET_D2
  39001. #define WMI_HECAP_PHY_DB_GET WMI_HECAP_PHY_DB_GET_D2
  39002. #define WMI_HECAP_PHY_DB_SET WMI_HECAP_PHY_DB_SET_D2
  39003. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D2
  39004. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D2
  39005. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2
  39006. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2
  39007. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D2
  39008. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D2
  39009. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D2
  39010. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D2
  39011. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_TXLDPC_GET_D2
  39012. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_TXLDPC_SET_D2
  39013. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_RXLDPC_GET_D2
  39014. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_RXLDPC_SET_D2
  39015. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D2
  39016. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D2
  39017. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2
  39018. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2
  39019. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D2
  39020. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D2
  39021. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D2
  39022. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D2
  39023. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D2
  39024. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D2
  39025. #define WMI_HECAP_PHY_TXDOPPLER_GET WMI_HECAP_PHY_TXDOPPLER_GET_D2
  39026. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D2
  39027. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D2
  39028. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D2
  39029. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D2
  39030. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D2
  39031. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  39032. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  39033. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D2
  39034. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D2
  39035. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D2
  39036. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D2
  39037. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D2
  39038. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D2
  39039. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D2
  39040. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D2
  39041. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D2
  39042. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D2
  39043. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D2
  39044. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D2
  39045. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2
  39046. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2
  39047. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2
  39048. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2
  39049. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2
  39050. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2
  39051. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2
  39052. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2
  39053. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2
  39054. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2
  39055. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2
  39056. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2
  39057. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D2
  39058. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D2
  39059. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D2
  39060. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D2
  39061. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2
  39062. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2
  39063. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D2
  39064. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D2
  39065. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2
  39066. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2
  39067. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D2
  39068. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D2
  39069. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D2
  39070. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D2
  39071. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D2
  39072. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D2
  39073. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2
  39074. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2
  39075. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D2
  39076. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D2
  39077. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D2
  39078. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D2
  39079. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D2
  39080. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D2
  39081. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2
  39082. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2
  39083. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2
  39084. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2
  39085. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2
  39086. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2
  39087. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2
  39088. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2
  39089. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2
  39090. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2
  39091. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2
  39092. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2
  39093. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D2
  39094. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D2
  39095. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D2
  39096. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D2
  39097. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D2
  39098. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D2
  39099. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D2
  39100. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D2
  39101. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2
  39102. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2
  39103. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D2
  39104. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D2
  39105. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D2
  39106. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D2
  39107. #define WMI_HECAP_MAC_MTID_GET WMI_HECAP_MAC_MTID_GET_D2
  39108. #define WMI_HECAP_MAC_MTID_SET WMI_HECAP_MAC_MTID_SET_D2
  39109. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2
  39110. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2
  39111. #define WMI_HECAP_MAC_HELKAD_GET WMI_HECAP_MAC_HELKAD_GET_D2
  39112. #define WMI_HECAP_MAC_HELKAD_SET WMI_HECAP_MAC_HELKAD_SET_D2
  39113. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D2
  39114. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D2
  39115. #define WMI_HECAP_MAC_ULMURSP_GET WMI_HECAP_MAC_ULMURSP_GET_D2
  39116. #define WMI_HECAP_MAC_ULMURSP_SET WMI_HECAP_MAC_ULMURSP_SET_D2
  39117. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D2
  39118. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D2
  39119. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D2
  39120. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D2
  39121. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D2
  39122. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D2
  39123. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D2
  39124. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D2
  39125. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2
  39126. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2
  39127. #define WMI_HECAP_MAC_GROUPMSTABA_GET WMI_HECAP_MAC_GROUPMSTABA_GET_D2
  39128. #define WMI_HECAP_MAC_GROUPMSTABA_SET WMI_HECAP_MAC_GROUPMSTABA_SET_D2
  39129. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D2
  39130. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D2
  39131. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D2
  39132. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D2
  39133. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2
  39134. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2
  39135. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D2
  39136. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D2
  39137. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D2
  39138. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D2
  39139. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D2
  39140. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D2
  39141. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D2
  39142. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D2
  39143. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D2
  39144. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D2
  39145. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D2
  39146. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D2
  39147. #define WMI_HECAP_MAC_SRRESP_GET WMI_HECAP_MAC_SRRESP_GET_D2
  39148. #define WMI_HECAP_MAC_SRRESP_SET WMI_HECAP_MAC_SRRESP_SET_D2
  39149. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D2
  39150. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D2
  39151. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D2
  39152. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D2
  39153. #define WMI_HECAP_MAC_MBAHECTRL_GET WMI_HECAP_MAC_MBAHECTRL_GET_D2
  39154. #define WMI_HECAP_MAC_MBAHECTRL_SET WMI_HECAP_MAC_MBAHECTRL_SET_D2
  39155. #define WMI_HECAP_MAC_MURTS_GET WMI_HECAP_MAC_MURTS_GET_D2
  39156. #define WMI_HECAP_MAC_MURTS_SET WMI_HECAP_MAC_MURTS_SET_D2
  39157. #define WMI_HECAP_PHY_CBMODE_GET WMI_HECAP_PHY_CBMODE_GET_D2
  39158. #define WMI_HECAP_PHY_CBMODE_SET WMI_HECAP_PHY_CBMODE_SET_D2
  39159. #define WMI_HECAP_PHY_OLTF_GET WMI_HECAP_PHY_OLTF_GET_D2
  39160. #define WMI_HECAP_PHY_OLTF_SET WMI_HECAP_PHY_OLTF_SET_D2
  39161. #define WMI_HECAP_PHY_SUBFMESTS_GET WMI_HECAP_PHY_SUBFMESTS_GET_D2
  39162. #define WMI_HECAP_PHY_SUBFMESTS_SET WMI_HECAP_PHY_SUBFMESTS_SET_D2
  39163. #define WMI_HECAP_PHY_PADDING_GET WMI_HECAP_PHY_PADDING_GET_D2
  39164. #define WMI_HECAP_PHY_PADDING_SET WMI_HECAP_PHY_PADDING_SET_D2
  39165. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2
  39166. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2
  39167. #define WMI_HECAP_PHY_32GI_GET WMI_HECAP_PHY_32GI_GET_D2
  39168. #define WMI_HECAP_PHY_32GI_SET WMI_HECAP_PHY_32GI_SET_D2
  39169. #define WMI_HECAP_PHY_NOSUNDIMENS_GET WMI_HECAP_PHY_NOSUNDIMENS_GET_D2
  39170. #define WMI_HECAP_PHY_NOSUNDIMENS_SET WMI_HECAP_PHY_NOSUNDIMENS_SET_D2
  39171. #define WMI_HECAP_PHY_40MHZNSS_GET WMI_HECAP_PHY_40MHZNSS_GET_D2
  39172. #define WMI_HECAP_PHY_40MHZNSS_SET WMI_HECAP_PHY_40MHZNSS_SET_D2
  39173. #define WMI_HECAP_PHY_ULOFDMA_GET WMI_HECAP_PHY_ULOFDMA_GET_D2
  39174. #define WMI_HECAP_PHY_ULOFDMA_SET WMI_HECAP_PHY_ULOFDMA_SET_D2
  39175. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCM_GET_D2
  39176. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCM_SET_D2
  39177. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2
  39178. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2
  39179. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2
  39180. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2
  39181. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2
  39182. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2
  39183. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D2
  39184. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D2
  39185. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2
  39186. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2
  39187. #endif /* SUPPORT_11AX_D3 */
  39188. /****** 11BE EHT PHY Capabilities Information field ******/
  39189. /* Bit 0: reserved */
  39190. /* Bit 1: support for 320Mhz in 6 GHz */
  39191. #define WMI_EHTCAP_PHY_320MHZIN6GHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 1, 1)
  39192. #define WMI_EHTCAP_PHY_320MHZIN6GHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 1, 1, value)
  39193. /* Bit 2: support for 242-tone RU in BW wider than 20Mhz */
  39194. #define WMI_EHTCAP_PHY_242TONERUBWLT20MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 2, 1)
  39195. #define WMI_EHTCAP_PHY_242TONERUBWLT20MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 2, 1, value)
  39196. /* Bit 3: NDP with 4x EHT-LTF and 3.2us GI */
  39197. #define WMI_EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 3, 1)
  39198. #define WMI_EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 3, 1, value)
  39199. /* Bit 4: partial bandwidth UL MU-MIMO */
  39200. #define WMI_EHTCAP_PHY_PARTIALBWULMU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 4, 1)
  39201. #define WMI_EHTCAP_PHY_PARTIALBWULMU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 4, 1, value)
  39202. /* Bit 5: SU beamformer */
  39203. #define WMI_EHTCAP_PHY_SUBFMR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 5, 1)
  39204. #define WMI_EHTCAP_PHY_SUBFMR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 5, 1, value)
  39205. /* Bit 6: SU beamformee */
  39206. #define WMI_EHTCAP_PHY_SUBFME_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 6, 1)
  39207. #define WMI_EHTCAP_PHY_SUBFME_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 6, 1, value)
  39208. /* Bit 7-9: beamformee SS (<=80Mhz) */
  39209. #define WMI_EHTCAP_PHY_BFMESSLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 7, 3)
  39210. #define WMI_EHTCAP_PHY_BFMESSLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 7, 3, value)
  39211. /* Bit 10-12: beamformee SS (=160Mhz) */
  39212. #define WMI_EHTCAP_PHY_BFMESS160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 10, 3)
  39213. #define WMI_EHTCAP_PHY_BFMESS160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 10, 3, value)
  39214. /* Bit 13-15: beamformee SS (=320Mhz) */
  39215. #define WMI_EHTCAP_PHY_BFMESS320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 13, 3)
  39216. #define WMI_EHTCAP_PHY_BFMESS320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 13, 3, value)
  39217. /* Bit 16-18: number of sounding dimensions (<=80Mhz) */
  39218. #define WMI_EHTCAP_PHY_NUMSOUNDLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 16, 3)
  39219. #define WMI_EHTCAP_PHY_NUMSOUNDLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 16, 3, value)
  39220. /* Bit 19-21: number of sounding dimensions (=160Mhz) */
  39221. #define WMI_EHTCAP_PHY_NUMSOUND160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 19, 3)
  39222. #define WMI_EHTCAP_PHY_NUMSOUND160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 19, 3, value)
  39223. /* Bit 22-24: number of sounding dimensions (=320Mhz) */
  39224. #define WMI_EHTCAP_PHY_NUMSOUND320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 22, 3)
  39225. #define WMI_EHTCAP_PHY_NUMSOUND320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 22, 3, value)
  39226. /* Bit 25: ng = 16 SU feedback */
  39227. #define WMI_EHTCAP_PHY_NG16SUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 25, 1)
  39228. #define WMI_EHTCAP_PHY_NG16SUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 25, 1, value)
  39229. /* Bit 26: ng = 16 MU feedback */
  39230. #define WMI_EHTCAP_PHY_NG16MUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 26, 1)
  39231. #define WMI_EHTCAP_PHY_NG16MUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 26, 1, value)
  39232. /* Bit 27: codebook size {4,2} SU feedback */
  39233. #define WMI_EHTCAP_PHY_CODBK42SUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 27, 1)
  39234. #define WMI_EHTCAP_PHY_CODBK42SUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 27, 1, value)
  39235. /* Bit 28: codebook size {7,5} MU feedback */
  39236. #define WMI_EHTCAP_PHY_CODBK75MUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 28, 1)
  39237. #define WMI_EHTCAP_PHY_CODBK75MUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 28, 1, value)
  39238. /* Bit 29: triggered SU beamforming feedback */
  39239. #define WMI_EHTCAP_PHY_TRIGSUBFFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 29, 1)
  39240. #define WMI_EHTCAP_PHY_TRIGSUBFFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 29, 1, value)
  39241. /* Bit 30: triggered MU beamforming partial BW feedback */
  39242. #define WMI_EHTCAP_PHY_TRIGMUBFPARTBWFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 30, 1)
  39243. #define WMI_EHTCAP_PHY_TRIGMUBFPARTBWFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 30, 1, value)
  39244. /* Bit 31: triggered CQI feedback */
  39245. #define WMI_EHTCAP_PHY_TRIGCQIFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 31, 1)
  39246. #define WMI_EHTCAP_PHY_TRIGCQIFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 31, 1, value)
  39247. /* Bit 32: partial bandwidth DL MU-MIMO */
  39248. #define WMI_EHTCAP_PHY_PARTBWDLMUMIMO_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 0, 1)
  39249. #define WMI_EHTCAP_PHY_PARTBWDLMUMIMO_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 0, 1, value)
  39250. /* Bit 33: PSR-based SR support */
  39251. #define WMI_EHTCAP_PHY_PSRSR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 1, 1)
  39252. #define WMI_EHTCAP_PHY_PSRSR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 1, 1, value)
  39253. /* Bit 34: power boost factor support */
  39254. #define WMI_EHTCAP_PHY_PWRBSTFACTOR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 2, 1)
  39255. #define WMI_EHTCAP_PHY_PWRBSTFACTOR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 2, 1, value)
  39256. /* Bit 35: EHT MU PPDU with 4xEHT-LTF and 0.8us GI */
  39257. #define WMI_EHTCAP_PHY_4XEHTLTFAND800NSGI_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 3, 1)
  39258. #define WMI_EHTCAP_PHY_4XEHTLTFAND800NSGI_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 3, 1, value)
  39259. /* Bit 36-39: max NC */
  39260. #define WMI_EHTCAP_PHY_MAXNC_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 4, 4)
  39261. #define WMI_EHTCAP_PHY_MAXNC_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 4, 4, value)
  39262. /* Bit 40: non-triggered CQI feedback */
  39263. #define WMI_EHTCAP_PHY_NONTRIGCQIFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 8, 1)
  39264. #define WMI_EHTCAP_PHY_NONTRIGCQIFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 8, 1, value)
  39265. /* Bit 41: Tx 1024-QAM and 4096-QAM < 242-tone RU support */
  39266. #define WMI_EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 9, 1)
  39267. #define WMI_EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 9, 1, value)
  39268. /* Bit 42: Rx 1024-QAM and 4096-QAM < 242-tone RU support */
  39269. #define WMI_EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 10, 1)
  39270. #define WMI_EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 10, 1, value)
  39271. /* Bit 43: PPE thresholds present */
  39272. #define WMI_EHTCAP_PHY_PPETHRESPRESENT_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 11, 1)
  39273. #define WMI_EHTCAP_PHY_PPETHRESPRESENT_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 11, 1, value)
  39274. /* Bit 44-45: common nominal packet padding */
  39275. #define WMI_EHTCAP_PHY_CMNNOMPKTPAD_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 12, 2)
  39276. #define WMI_EHTCAP_PHY_CMNNOMPKTPAD_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 12, 2, value)
  39277. /* Bit 46-50: max number of supported EHT-LTFs */
  39278. #define WMI_EHTCAP_PHY_MAXNUMEHTLTF_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 14, 5)
  39279. #define WMI_EHTCAP_PHY_MAXNUMEHTLTF_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 14, 5, value)
  39280. /* Bit 51-54: support of MCS 15 */
  39281. #define WMI_EHTCAP_PHY_SUPMCS15_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 19, 4)
  39282. #define WMI_EHTCAP_PHY_SUPMCS15_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 19, 4, value)
  39283. /* Bit 55: support of EHT DUP in 6 GHz */
  39284. #define WMI_EHTCAP_PHY_EHTDUPIN6GHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 23, 1)
  39285. #define WMI_EHTCAP_PHY_EHTDUPIN6GHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 23, 1, value)
  39286. /* Bit 56: support for 20Mhz operating STA receiving NDP with wider bandwidth */
  39287. #define WMI_EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 24, 1)
  39288. #define WMI_EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 24, 1, value)
  39289. /* Bit 57: non-OFDMA UL MU-MIMO (bw <= 80Mhz) */
  39290. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 25, 1)
  39291. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 25, 1, value)
  39292. /* Bit 58: non-OFDMA UL MU-MIMO (bw = 160Mhz) */
  39293. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 26, 1)
  39294. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 26, 1, value)
  39295. /* Bit 59: non-OFDMA UL MU-MIMO (bw = 320Mhz) */
  39296. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 27, 1)
  39297. #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 27, 1, value)
  39298. /* Bit 60: MU beamformer (bw <= 80Mhz) */
  39299. #define WMI_EHTCAP_PHY_MUBFMRLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 28, 1)
  39300. #define WMI_EHTCAP_PHY_MUBFMRLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 28, 1, value)
  39301. /* Bit 61: MU beamformer (bw = 160Mhz) */
  39302. #define WMI_EHTCAP_PHY_MUBFMR160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 29, 1)
  39303. #define WMI_EHTCAP_PHY_MUBFMR160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 29, 1, value)
  39304. /* Bit 62: MU beamformer (bw = 320Mhz) */
  39305. #define WMI_EHTCAP_PHY_MUBFMR320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 30, 1)
  39306. #define WMI_EHTCAP_PHY_MUBFMR320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 30, 1, value)
  39307. /* Bit 63: TB sounding feedback rate limit */
  39308. #define WMI_EHTCAP_PHY_TBSUNDFBRATELIMIT_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 31, 1)
  39309. #define WMI_EHTCAP_PHY_TBSUNDFBRATELIMIT_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 31, 1, value)
  39310. /* Bit 64: Rx 1024-QAM in wider bandwidth DL OFDMA support */
  39311. #define WMI_EHTCAP_PHY_RX1024QAMWIDERBWDLOFDMA_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 0, 1)
  39312. #define WMI_EHTCAP_PHY_RX1024QAMWIDERBWDLOFDMA_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 0, 1, value)
  39313. /* Bit 65: Rx 4096-QAM in wider bandwidth DL OFDMA support */
  39314. #define WMI_EHTCAP_PHY_RX4096QAMWIDERBWDLOFDMA_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 1, 1)
  39315. #define WMI_EHTCAP_PHY_RX4096QAMWIDERBWDLOFDMA_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 1, 1, value)
  39316. /* Bit 66: 20Mhz-only limited capabilities support */
  39317. #define WMI_EHTCAP_PHY_20MHZ_ONLY_CAPS_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 2, 1)
  39318. #define WMI_EHTCAP_PHY_20MHZ_ONLY_CAPS_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 2, 1, value)
  39319. /* Bit 67: 20Mhz-only triggered MU beamforming full BW feedback and DL MU-MIMO */
  39320. #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)
  39321. #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)
  39322. /* Bit 68: 20Mhz-only M-RU support */
  39323. #define WMI_EHTCAP_PHY_20MHZ_ONLY_MRU_SUPP_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 4, 1)
  39324. #define WMI_EHTCAP_PHY_20MHZ_ONLY_MRU_SUPP_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 4, 1, value)
  39325. /* Bits 69-71: reserved */
  39326. /****** End of 11BE EHT PHY Capabilities Information field ******/
  39327. /****** 11BE EHT MAC Capabilities Information field ******/
  39328. /* Bit 0: NSEP/EPCS priority access supported: draft1.4 change the name from NSEP to EPCS
  39329. * To compatible with <= draft 1.4 ver, we keep 2 define there, but same bit.
  39330. */
  39331. #define WMI_EHTCAP_MAC_NSEPPRIACCESS_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 0, 1)
  39332. #define WMI_EHTCAP_MAC_NSEPPRIACCESS_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 0, 1, value)
  39333. #define WMI_EHTCAP_MAC_EPCSPRIACCESS_GET(eht_cap_mac) WMI_EHTCAP_MAC_NSEPPRIACCESS_GET(eht_cap_mac)
  39334. #define WMI_EHTCAP_MAC_EPCSPRIACCESS_SET(eht_cap_mac, value) WMI_EHTCAP_MAC_NSEPPRIACCESS_SET(eht_cap_mac, value)
  39335. /* Bit 1: EHT OM control support */
  39336. #define WMI_EHTCAP_MAC_EHTOMCTRL_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 1, 1)
  39337. #define WMI_EHTCAP_MAC_EHTOMCTRL_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 1, 1, value)
  39338. /* Bit 2: triggered TXOP mode 1 support
  39339. * As in draft 1.4, we define mode2 and to compatible with old version, we keep 2 define there, but same bit.
  39340. */
  39341. #define WMI_EHTCAP_MAC_TRIGTXOP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 2, 1)
  39342. #define WMI_EHTCAP_MAC_TRIGTXOP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 2, 1, value)
  39343. #define WMI_EHTCAP_MAC_TRIGTXOPMODE1_GET(eht_cap_mac) WMI_EHTCAP_MAC_TRIGTXOP_GET(eht_cap_mac)
  39344. #define WMI_EHTCAP_MAC_TRIGTXOPMODE1_SET(eht_cap_mac, value) WMI_EHTCAP_MAC_TRIGTXOP_SET(eht_cap_mac, value)
  39345. /* Bit 3: triggered TXOP mode 2 support */
  39346. #define WMI_EHTCAP_MAC_TRIGTXOPMODE2_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 3, 1)
  39347. #define WMI_EHTCAP_MAC_TRIGTXOPMODE2_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 3, 1, value)
  39348. /* Bit 4: restricted TWT support */
  39349. #define WMI_EHTCAP_MAC_RESTRICTTWT_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 4, 1)
  39350. #define WMI_EHTCAP_MAC_RESTRICTTWT_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 4, 1, value)
  39351. /* Bit 5: SCS traffic description support */
  39352. #define WMI_EHTCAP_MAC_SCSTRAFFICDESC_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 5, 1)
  39353. #define WMI_EHTCAP_MAC_SCSTRAFFICDESC_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 5, 1, value)
  39354. /* Bit 6-7: maximum MPDU length */
  39355. #define WMI_EHTCAP_MAC_MAXMPDULEN_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 6, 2)
  39356. #define WMI_EHTCAP_MAC_MAXMPDULEN_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 6, 2, value)
  39357. /* Bit 8: Maximum A-MPDU Length Exponent Extension */
  39358. #define WMI_EHTCAP_MAC_MAXAMPDULEN_EXP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 8, 1)
  39359. #define WMI_EHTCAP_MAC_MAXAMPDULEN_EXP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 8, 1, value)
  39360. /* Bit 9: EHT TRS support */
  39361. #define WMI_EHTCAP_MAC_TRS_SUPPORT_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 9, 1)
  39362. #define WMI_EHTCAP_MAC_TRS_SUPPORT_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 9, 1, value)
  39363. /* Bit 10: TXOP return support in txop sharing mode 2 */
  39364. #define WMI_EHTCAP_MAC_TXOP_RETURN_SUPP_IN_SHARINGMODE2_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 10, 1)
  39365. #define WMI_EHTCAP_MAC_TXOP_RETURN_SUPP_IN_SHARINGMODE2_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 10, 1, value)
  39366. /* Bit 11: two BQRs support */
  39367. #define WMI_EHTCAP_MAC_TWO_BQRS_SUPP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 11, 1)
  39368. #define WMI_EHTCAP_MAC_TWO_BQRS_SUPP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 11, 1, value)
  39369. /* Bit 12-13: EHT link adaptation support */
  39370. #define WMI_EHTCAP_MAC_EHT_LINK_ADAPTATION_SUPP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 12, 2)
  39371. #define WMI_EHTCAP_MAC_EHT_LINK_ADAPTATION_SUPP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 12, 2, value)
  39372. /* Bit 14-15: reserved */
  39373. /****** End of 11BE EHT MAC Capabilities Information field ******/
  39374. typedef struct {
  39375. /** TLV tag and len; tag equals
  39376. * WMITLV_TAG_STRUC_wmi_cfr_capture_event_fixed_param */
  39377. A_UINT32 tlv_header;
  39378. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  39379. A_UINT32 capture_method;
  39380. /* VDEV identifier */
  39381. A_UINT32 vdev_id;
  39382. /* Peer MAC address. In AP mode, this is the address of the connected peer
  39383. * for which CFR capture is needed. In case of STA mode, this is the address
  39384. * of the AP to which the STA is connected
  39385. */
  39386. wmi_mac_addr mac_addr;
  39387. /* primary 20 MHz channel frequency in mhz */
  39388. A_UINT32 chan_mhz;
  39389. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  39390. A_UINT32 bandwidth;
  39391. /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h*/
  39392. A_UINT32 phy_mode;
  39393. /* Center frequency 1 in MHz*/
  39394. A_UINT32 band_center_freq1;
  39395. /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  39396. A_UINT32 band_center_freq2;
  39397. /* Number of spatial streams */
  39398. A_UINT32 sts_count;
  39399. /* Bits 31:0: address of data from wmi_dma_buf_release_entry [31:0] */
  39400. A_UINT32 correlation_info_1;
  39401. /* Bits 11:0: address of data from wmi_dma_buf_release_entry [43:32]
  39402. * Bits 15:12: reserved (set to 0x0)
  39403. * Bits 31:16: hardware PPDU ID [15:0]
  39404. */
  39405. A_UINT32 correlation_info_2;
  39406. /* Bits 1:0: TX status (if any); values defined in enum
  39407. * WMI_FRAME_TX_STATUS
  39408. * Bits 30:2: reserved (set to 0x0)
  39409. * Bit 31: Status of the CFR capture of the peer
  39410. * 1 (True) - Successful; 0 (False) - Not successful
  39411. */
  39412. A_UINT32 status;
  39413. /* Timestamp in microseconds at which the CFR was captured in the hardware.
  39414. * The clock used for this timestamp is private to the target and
  39415. * is not visible to the host i.e., Host can interpret only the
  39416. * relative timestamp deltas from one message to the next,
  39417. * but can't interpret the absolute timestamp from a single message.
  39418. */
  39419. A_UINT32 timestamp_us;
  39420. /*
  39421. * Count of the current CFR capture from FW.
  39422. * This is helpful to identify any drops in FW.
  39423. */
  39424. A_UINT32 counter;
  39425. /* Per chain RSSI of the peer, for up to WMI_MAX_CHAINS.
  39426. * Each chain's entry reports the RSSI for different bands in dBm units.
  39427. * Use WMI_UNIFIED_CHAIN_RSSI_GET to extract the value for a particular
  39428. * band.
  39429. * A band value of 0x80 (-128) is invalid.
  39430. */
  39431. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  39432. /* Carrier frequency offset
  39433. It is Difference between down conversion oscillator frequency at the receiver
  39434. versus carrier frequency of the received signal. To convert to ppm, below
  39435. equation needs to be used. Here, Fc is carrier frequency (primary 20 channel frequency) in Hz:
  39436. PPM = cfo_measurement(13 bits)/((2^13)/(800e-9)/2/Fc*1e6)
  39437. PPM ranges from -40 to +40
  39438. Bits 0 : 0 Set to 1 to indicate cfo measurement value is valid
  39439. Bits 1 : 14 14 bits cfo measurement raw data. 14 bit is signed bit.
  39440. For the above ppm equation , use the first 13 bits to calculate.
  39441. */
  39442. A_UINT32 cfo_measurement_valid :1,
  39443. cfo_measurement :14,
  39444. reserved :17;
  39445. /* RX packet start timestamp.
  39446. * It reports the time the first L-STF ADC sample arrived at RX antenna
  39447. * It is in units of 480 MHz clock, i.e. number of clock cycles at 480 MHz.
  39448. */
  39449. A_UINT32 rx_start_ts;
  39450. /*
  39451. * The rx_ts_reset flag will be set to 1 upon every reset of rx_start_ts.
  39452. */
  39453. A_UINT32 rx_ts_reset;
  39454. /*
  39455. * MCS and Guard Interval.
  39456. * MCS: For legacy mode only
  39457. * 0: 48 Mbps
  39458. * 1: 24 Mbps
  39459. * 2: 12 Mbps
  39460. * 3: 6 Mbps
  39461. * 4: 54 Mbps
  39462. * 5: 36 Mbps
  39463. * 6: 18 Mbps
  39464. * 7: 9 Mbps
  39465. * 8-254: reserved
  39466. * 255: invalid entry
  39467. *
  39468. * GI: For Legacy mode only
  39469. * 0: 0.8 us
  39470. * 1: 0.4 us
  39471. * 2: 1.6 us
  39472. * 3: 3.2 us
  39473. * 4-254: reserved
  39474. * 255: invalid entry
  39475. *
  39476. * Bits 0:7 mcs
  39477. * Bits 8:15 gi_type
  39478. * Bits 16:31 reserved
  39479. */
  39480. A_UINT32 mcs_gi_info;
  39481. } wmi_peer_cfr_capture_event_fixed_param;
  39482. #define WMI_CFR_MCS_GET(mcs_gi_info) \
  39483. WMI_GET_BITS(mcs_gi_info, 0, 8)
  39484. #define WMI_CFR_MCS_SET(mcs_gi_info, value) \
  39485. WMI_SET_BITS(mcs_gi_info, 0, 8, value)
  39486. #define WMI_CFR_GI_TYPE_GET(mcs_gi_info) \
  39487. WMI_GET_BITS(mcs_gi_info, 8, 8)
  39488. #define WMI_CFR_GI_TYPE_SET(mcs_gi_info, value) \
  39489. WMI_SET_BITS(mcs_gi_info, 8, 8, value)
  39490. #define WMI_UNIFIED_CHAIN_PHASE_MASK 0x0000ffff
  39491. #define WMI_UNIFIED_CHAIN_PHASE_GET(tlv, chain_idx) \
  39492. ((A_UINT16) ((tlv)->chain_phase[chain_idx] & WMI_UNIFIED_CHAIN_PHASE_MASK))
  39493. #define WMI_UNIFIED_CHAIN_PHASE_SET(tlv, chain_idx, value) \
  39494. (tlv)->chain_phase[chain_idx] = (WMI_UNIFIED_CHAIN_PHASE_MASK & (value))
  39495. #define WMI_CFR_AGC_GAIN_CHAINS_PER_U32 4
  39496. #define WMI_UNIFIED_AGC_GAIN_MASK 0x000000ff
  39497. #define WMI_UNIFIED_AGC_GAIN_GET(tlv, chain_idx) \
  39498. ((A_UINT8) ((tlv)->agc_gain_index[(chain_idx)/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] >> \
  39499. ((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8) & WMI_UNIFIED_AGC_GAIN_MASK)
  39500. #define WMI_UNIFIED_AGC_GAIN_SET(tlv, chain_idx, value) \
  39501. (tlv)->agc_gain_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] = \
  39502. (tlv)->agc_gain_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] & \
  39503. ~(0xff << (((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8)) | \
  39504. (((value)<<((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8))
  39505. #define WMI_UNIFIED_AGC_GAIN_TBL_IDX_GET(tlv, chain_idx) \
  39506. ((A_UINT8) ((tlv)->agc_gain_tbl_index[(chain_idx)/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] >> \
  39507. ((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8) & WMI_UNIFIED_AGC_GAIN_MASK)
  39508. #define WMI_UNIFIED_AGC_GAIN_TBL_IDX_SET(tlv, chain_idx, value) \
  39509. (tlv)->agc_gain_tbl_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] = \
  39510. (tlv)->agc_gain_tbl_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] & \
  39511. ~(0xff << (((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8)) | \
  39512. (((value)<<((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8))
  39513. typedef struct {
  39514. /** TLV tag and len; tag equals
  39515. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param */
  39516. A_UINT32 tlv_header;
  39517. /* Per chain AoA phase data of the Peer, for up to WMI_MAX_CHAINS.
  39518. * USE WMI_UNIFIED_CHAIN_PHASE_GET to extract the phase value for
  39519. * a particular chain.
  39520. * Only lower 2 bytes will contain phase data for a particular chain.
  39521. * The values in phase data will be from 0 1023 as mapping of
  39522. * 0-359 degrees using the formula -
  39523. * phase data = phase in degrees * 1024 / 360
  39524. *
  39525. * Target will set 0xFFFF for all invalid chains.
  39526. *
  39527. * The WMI_UNIFIED_CHAIN_PHASE_GET/SET macros can be used to access
  39528. * the valid portion of the 4-byte word containing the chain phase data.
  39529. */
  39530. A_UINT32 chain_phase[WMI_MAX_CHAINS];
  39531. /* agc_gain_index
  39532. * It shows an index in the AGC gain LUT.
  39533. * agc gain should be in range between 0 to 62.
  39534. * 4 AGC gain index values are packed into each A_UINT32 word;
  39535. * use the WMI_UNITIFED_AGC_GAIN_GET/SET macros to read/write
  39536. * the AGC gain indices for individual chains.
  39537. */
  39538. A_UINT32 agc_gain_index[WMI_MAX_CHAINS/WMI_CFR_AGC_GAIN_CHAINS_PER_U32];
  39539. /*
  39540. * Each chain is provided with 8 bits within agc_gain_tbl_index.
  39541. * The value for each of these 8-bit portions is between 0 to 2:
  39542. * 0 : Default Gain Table
  39543. * 1 : Low RF Gain Table.
  39544. * Low gain applied at RF as compared to gains applied when
  39545. * gain_table _idx = 0 is selected.
  39546. * 2 : Very Low RF Gain Table.
  39547. * It's similar to above with even lower gains applied.
  39548. *
  39549. * AoA should use the normal/regular GLUT, thus GAIN_TABLE_IDX
  39550. * should always be 0. If it is not 0, it means that there was
  39551. * out-of-band blocker causing the hardware to pick a different
  39552. * gain table. In that case, AoA result will not be reliable.
  39553. * Therefore, the recommendation is to stop doing AoA if
  39554. * GAIN_TABLE_IDX != 0 and indicate error.
  39555. */
  39556. A_UINT32 agc_gain_tbl_index[WMI_MAX_CHAINS/WMI_CFR_AGC_GAIN_CHAINS_PER_U32];
  39557. } wmi_peer_cfr_capture_event_phase_fixed_param;
  39558. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK 0x80000000
  39559. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK_S 31
  39560. /* Failed to capture CFR as peer is in power save mode */
  39561. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED 0x40000000
  39562. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED_S 30
  39563. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX 0x00000003
  39564. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX_S 0
  39565. /**
  39566. * wmi_cold_boot_cal_data config flags
  39567. * BIT 0 : 1 means more data will come, 0 means last event
  39568. * BIT 1-31 : Reserved
  39569. */
  39570. #define WMI_COLD_BOOT_CAL_DATA_SET_IS_MORE_DATA(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  39571. #define WMI_COLD_BOOT_CAL_DATA_GET_IS_MORE_DATA(flags) WMI_GET_BITS(flags, 0, 1)
  39572. typedef struct {
  39573. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_cold_boot_cal_data_fixed_param */
  39574. A_UINT32 data_len; /** length in byte of data[]. */
  39575. A_UINT32 flags; /** config flags : Only 0th bit is used, bit 1-31 are reserved */
  39576. /* Following this structure is the TLV:
  39577. * A_UINT8 data[]; <-- length in byte given by field data_len.
  39578. * This data array contains cold boot data calibration raw data.
  39579. */
  39580. } wmi_cold_boot_cal_data_fixed_param;
  39581. typedef struct {
  39582. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_rap_info_event_fixed_param */
  39583. /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
  39584. * See macros starting with WMI_PDEV_ID_ for values.
  39585. */
  39586. A_UINT32 pdev_id;
  39587. A_UINT32 type; /** type of the rogue ap, see WMI_ROGUE_AP_TYPE */
  39588. wmi_mac_addr bssid; /** bssid of the rogue ap */
  39589. } wmi_pdev_rap_info_event_fixed_param;
  39590. typedef struct {
  39591. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sched_tidq_susp_info_event_fixed_param */
  39592. A_UINT32 pdev_id; /** pdev id */
  39593. A_UINT32 tid_num; /** tid_num that is suspended */
  39594. A_UINT32 suspended_time_ms; /** time for which tid has been suspended in ms */
  39595. } wmi_pdev_sched_tidq_susp_info_event_fixed_param;
  39596. /*
  39597. * WMI API for Firmware to indicate iface combinations which Firmware
  39598. * support to Host
  39599. */
  39600. typedef struct {
  39601. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_cmb_ind_event_fixed_param */
  39602. /* common part */
  39603. /* Consider DBS/DBDC for this new implementation */
  39604. A_UINT32 pdev_n;
  39605. /* iface combinations part -
  39606. * Use subsequent TLV arrays to list supported combinations of interfaces.
  39607. */
  39608. /*
  39609. * The TLVs listing interface combinations, will follow this TLV.
  39610. * The number of combinations can be calculated by dividing the
  39611. * TLV array length by the TLV array element length.
  39612. *
  39613. * The fixed_param TLV is directly followed by a list of
  39614. * wlanfw_iface_combination elements:
  39615. * wlanfw_iface_combination combinations[0];
  39616. * wlanfw_iface_combination combinations[1];
  39617. * ...
  39618. * wlanfw_iface_combination combinations[N];
  39619. *
  39620. * After the list of wlanfw_iface_combinations is a list of interface limits.
  39621. * The cmb_limits field of each wlanfw_iface_combination show which of the
  39622. * limits within the "wlanfw_ifact_limit limits" list belong to that
  39623. * iface_combination:
  39624. * limits[0] <- cmb 0, limit 0
  39625. * ...
  39626. * limits[cmb[0].cmb_limits-1] <- cmb 0, limit N
  39627. * limits[cmb[0].cmb_limits] <- cmb 1, limit 0
  39628. * ...
  39629. * limits[cmb[0].cmb_limits+cmb[1].cmb_limits-1] <- cmb 1, limit N
  39630. * limits[cmb[0].cmb_limits+cmb[1].cmb_limits] <- cmb 2, limit 0
  39631. * ...
  39632. */
  39633. } wmi_wlanfw_iface_cmb_ind_event_fixed_param;
  39634. typedef struct {
  39635. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_limit_param */
  39636. /*
  39637. * How many vdevs can work as below vdev_type/vdev_subtype
  39638. * in one combination.
  39639. */
  39640. A_UINT32 vdev_limit_n;
  39641. /*
  39642. * Indicate what role above vdevs can work as.
  39643. * Refer to "WMI_VDEV_TYPE_xx, WMI_UNIFIED_VDEV_SUBTYPE_xx"
  39644. * for roles definition.
  39645. */
  39646. A_UINT32 vdev_type;
  39647. A_UINT32 vdev_subtype;
  39648. } wlanfw_iface_limit;
  39649. /**
  39650. * @brief specific configuration of valid_fields for host.
  39651. * These flags are used for indicating which fields in wlanfw_iface_combination
  39652. * contains valid value for Host Driver.
  39653. * 0: Host can ignore this field
  39654. * 1: field contains valid value for Host Driver
  39655. */
  39656. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_S 0
  39657. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_M 0x1
  39658. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_S 1
  39659. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_M 0x2
  39660. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_S 2
  39661. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_M 0x4
  39662. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_S 3
  39663. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_M 0x8
  39664. #define WMI_CMB_VALID_FIELDS_FLAG_SET(word32, flag, value) \
  39665. do { \
  39666. (word32) &= ~WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
  39667. (word32) |= ((value) << WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S) & \
  39668. WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
  39669. } while (0)
  39670. #define WMI_CMB_VALID_FIELDS_FLAG_GET(word32, flag) \
  39671. (((word32) & WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M) >> \
  39672. WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S)
  39673. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_SET(word32, value) \
  39674. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), PEER_MAX, (value))
  39675. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_GET(word32) \
  39676. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), PEER_MAX)
  39677. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_SET(word32, value) \
  39678. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), STA_AP_BCN_INT_MATCH, (value))
  39679. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_GET(word32) \
  39680. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), STA_AP_BCN_INT_MATCH)
  39681. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_SET(word32, value) \
  39682. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_MIN, (value))
  39683. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_GET(word32) \
  39684. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_MIN)
  39685. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_SET(word32, value) \
  39686. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_N, (value))
  39687. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_GET(word32) \
  39688. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_N)
  39689. typedef struct {
  39690. A_UINT32 tlv_header;
  39691. /*
  39692. * Max num Peers can be supported in this combination.
  39693. * It excludes the self-peers associated with each vdev.
  39694. * It's the number of real remote peers.
  39695. * eg: when working as AP mode, indicating how many clients can be
  39696. * supported to connect with this AP.
  39697. */
  39698. A_UINT32 peer_max;
  39699. /* Home Channels supported on one single phy concurrently */
  39700. A_UINT32 channel_n;
  39701. /*
  39702. * The number of "wlanfw_iface_limit" for a specified combination.
  39703. * eg: there is 2 vdev, including 1 AP vdev and 1 STA vdev, then this
  39704. * cmb_limits will be 2 for this combination.
  39705. */
  39706. A_UINT32 cmb_limits;
  39707. /*
  39708. * Beacon intervals for STA and AP types need to be match or not.
  39709. * 1: need to be match
  39710. * 0: not need
  39711. */
  39712. A_UINT32 sta_ap_bcn_int_match;
  39713. /*
  39714. * This combination supports different beacon intervals or not.
  39715. * 0: Beacon interval is same for all interface
  39716. * !0: STA Beacon interval AND GCD of AP Beacon intervals
  39717. * should be greater or equal to this value.
  39718. */
  39719. A_UINT32 bcn_int_min;
  39720. /*
  39721. * Number of different Beacon intervals
  39722. */
  39723. A_UINT32 bcn_int_n;
  39724. /*
  39725. * This indicates which field in this struct
  39726. * contains valid value for Host Driver.
  39727. * Refer to definitions for "WMI_CMB_VALID_FIELDS_FLAG_xx".
  39728. */
  39729. A_UINT32 valid_fields;
  39730. } wlanfw_iface_combination;
  39731. typedef struct {
  39732. /** TLV tag and len; tag equals
  39733. * WMITLV_TAG_STRUC_wmi_set_elna_bypass_cmd_fixed_param */
  39734. A_UINT32 tlv_header;
  39735. /* VDEV identifier */
  39736. A_UINT32 vdev_id;
  39737. /** 1-Enable, 0-Disable */
  39738. A_UINT32 en_dis;
  39739. } wmi_set_elna_bypass_cmd_fixed_param;
  39740. typedef struct {
  39741. /** TLV tag and len; tag equals
  39742. * WMITLV_TAG_STRUC_wmi_get_elna_bypass_cmd_fixed_param */
  39743. A_UINT32 tlv_header;
  39744. /* VDEV identifier */
  39745. A_UINT32 vdev_id;
  39746. } wmi_get_elna_bypass_cmd_fixed_param;
  39747. typedef struct {
  39748. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_elna_bypass_event_fixed_param */
  39749. /* VDEV identifier */
  39750. A_UINT32 vdev_id;
  39751. /** 1-Enable, 0-Disable */
  39752. A_UINT32 en_dis;
  39753. } wmi_get_elna_bypass_event_fixed_param;
  39754. typedef struct {
  39755. /** TLV tag and len; tag equals
  39756. * WMITLV_TAG_STRUC_wmi_get_channel_ani_cmd_fixed_param
  39757. */
  39758. A_UINT32 tlv_header;
  39759. /**
  39760. * TLV (tag length value) parameters follow the
  39761. * structure. The TLV's are:
  39762. * list of channels (center freq of primary 20 MHz of the channel, in MHz)
  39763. * A_UINT32 channel_list[];
  39764. */
  39765. } wmi_get_channel_ani_cmd_fixed_param;
  39766. typedef struct {
  39767. /** TLV tag and len; tag equals
  39768. * WMITLV_TAG_STRUC_wmi_get_channel_ani_event_fixed_param
  39769. */
  39770. A_UINT32 tlv_header;
  39771. /**
  39772. * TLV (tag length value) parameters follow the
  39773. * structure. The TLV's are:
  39774. * wmi_channel_ani_info_tlv_param ani_info[];
  39775. */
  39776. } wmi_get_channel_ani_event_fixed_param;
  39777. typedef struct {
  39778. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_ani_info_tlv_param */
  39779. A_UINT32 tlv_header;
  39780. /** channel freq (center of 20 MHz primary channel) in MHz */
  39781. A_UINT32 chan_freq;
  39782. /**
  39783. * ANI (noise interference) level corresponding to the channel.
  39784. * Values range from [0-9], with higher values indicating more
  39785. * noise interference.
  39786. */
  39787. A_UINT32 ani_level;
  39788. } wmi_channel_ani_info_tlv_param;
  39789. /* This command is to specify to enable/disable audio frame aggr */
  39790. typedef struct {
  39791. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_enable_cmd_fixed_param */
  39792. A_UINT32 aggr_enable; /* enable aggregation for audio frame */
  39793. A_UINT32 tbd_enable; /* enable time_based discarding for audio frame */
  39794. A_UINT32 vdev_id;
  39795. } wmi_audio_aggr_enable_cmd_fixed_param;
  39796. typedef struct wmi_audio_aggr_rate_set_s {
  39797. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_audio_aggr_rate_set */
  39798. A_UINT32 mcs;
  39799. A_UINT32 bandwidth; /* 0 for 20M, 1 for 40M and 2 for 80M, etc. */
  39800. A_UINT32 vdev_id;
  39801. } WMI_AUDIO_AGGR_RATE_SET_T;
  39802. typedef struct {
  39803. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_add_group */
  39804. A_UINT32 group_id; /* id of audio group */
  39805. wmi_mac_addr multicast_addr; /* multicast address of audio group */
  39806. A_UINT32 vdev_id;
  39807. } wmi_audio_aggr_add_group_cmd_fixed_param;
  39808. typedef struct {
  39809. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_del_group */
  39810. A_UINT32 group_id;
  39811. A_UINT32 vdev_id;
  39812. } wmi_audio_aggr_del_group_cmd_fixed_param;
  39813. typedef struct {
  39814. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_rate */
  39815. A_UINT32 group_id;
  39816. A_UINT32 vdev_id;
  39817. /**
  39818. * TLV (tag length value) parameters follow the
  39819. * structure. The TLV's are:
  39820. * WMI_AUDIO_AGGR_RATE_SET_T rate_set[];
  39821. **/
  39822. } wmi_audio_aggr_set_group_rate_cmd_fixed_param;
  39823. typedef struct {
  39824. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_retry */
  39825. A_UINT32 group_id;
  39826. A_UINT32 retry_thresh;
  39827. A_UINT32 vdev_id;
  39828. } wmi_audio_aggr_set_group_retry_cmd_fixed_param;
  39829. typedef struct {
  39830. A_UINT32 tlv_header;
  39831. A_UINT32 vdev_id;
  39832. A_UINT32 group_id;
  39833. /*
  39834. * bit0: if set, Enable HT20
  39835. * bit1: if set, Enable HT40
  39836. * bit2, bit3: Reserved
  39837. * bit4: if set, Enable VHT20
  39838. * bit5: if set, Enable VHT40
  39839. * bit6: if set, Enable VHT80
  39840. * bit7 ~ bit31: Reserved
  39841. */
  39842. A_UINT32 bw;
  39843. A_UINT32 mcs_min;
  39844. A_UINT32 mcs_max;
  39845. A_UINT32 mcs_offset;
  39846. A_UINT32 nss;
  39847. } wmi_audio_aggr_set_group_auto_rate_cmd_fixed_param;
  39848. typedef struct {
  39849. A_UINT32 tlv_header;
  39850. A_UINT32 vdev_id;
  39851. A_UINT32 group_id;
  39852. A_UINT32 interval;
  39853. } wmi_audio_aggr_set_group_probe_cmd_fixed_param;
  39854. typedef struct {
  39855. /**
  39856. * TLV tag and len;
  39857. * tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_update_sta_group_info */
  39858. A_UINT32 tlv_header;
  39859. /* vdev id */
  39860. A_UINT32 vdev_id; /* which STA/vdev's group membership is being specified */
  39861. /* bitmap that indicates which groups this sta belongs to */
  39862. A_UINT32 group_bmap;
  39863. /*
  39864. * This fixed_param struct is followed by a TLV array of wmi_mac_addr,
  39865. * which specifies the multi-cast MAC address used for each group.
  39866. * The number of elements within the TLV array matches the number of bits
  39867. * set within group_bmap.
  39868. */
  39869. } wmi_audio_aggr_update_sta_group_info_cmd_fixed_param;
  39870. typedef struct {
  39871. /** TLV tag and len **/
  39872. A_UINT32 tlv_header;
  39873. /* VDEV identifier */
  39874. A_UINT32 vdev_id;
  39875. /*
  39876. * Identifier from Host to indicate how many this cmd been sent to FW.
  39877. * This value will be echoed back in the response_id field
  39878. * of the WMI_AUDIO_AGGR_REPORT_STATISTICS_EVENTID.
  39879. */
  39880. A_UINT32 request_id;
  39881. } wmi_audio_aggr_get_statistics_cmd_fixed_param;
  39882. typedef struct {
  39883. /** TLV tag and len **/
  39884. A_UINT32 tlv_header;
  39885. /* VDEV identifier */
  39886. A_UINT32 vdev_id;
  39887. } wmi_audio_aggr_reset_statistics_cmd_fixed_param;
  39888. typedef struct {
  39889. /** TLV tag and len **/
  39890. A_UINT32 tlv_header;
  39891. /* VDEV identifier */
  39892. A_UINT32 vdev_id;
  39893. /*
  39894. * The user_mode and user_profile fields are passed through
  39895. * the host driver to the target FW, but are never interpreted
  39896. * by the host driver. The values for these fields are opaque
  39897. * to the host, and are only interpreted by the FW.
  39898. */
  39899. A_UINT32 user_mode;
  39900. A_UINT32 user_profile;
  39901. } wmi_audio_aggr_set_rtscts_config_cmd_fixed_param;
  39902. typedef enum {
  39903. /* audio aggr scheduler method list */
  39904. WMI_AUDIO_AGGR_SCHED_METHOD_HOST_CONTROL = 1,
  39905. WMI_AUDIO_AGGR_SCHED_METHOD_HOST_CONTROL_PER_CYCLE = 2,
  39906. WMI_AUDIO_AGGR_SCHED_METHOD_MAX,
  39907. } WMI_AUDIO_AGGR_SCHED_METHOD_TYPE;
  39908. typedef enum {
  39909. /* audio aggr RTS-CTS Config */
  39910. WMI_AUDIO_AGGR_RTS_CTS_CONFIG_DISABLED = 0,
  39911. WMI_AUDIO_AGGR_RTS_CTS_CONFIG_PPDU = 1,
  39912. WMI_AUDIO_AGGR_RTS_CTS_CONFIG_CYCLE = 2,
  39913. WMI_AUDIO_AGGR_RTS_CTS_MAX,
  39914. } WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE;
  39915. typedef struct {
  39916. /* TLV tag and len */
  39917. A_UINT32 tlv_header;
  39918. /* VDEV identifier */
  39919. A_UINT32 vdev_id;
  39920. /* selected audio aggr scheduler method
  39921. * valid methods can be found in WMI_AUDIO_AGGR_SCHED_METHOD_TYPE
  39922. */
  39923. A_UINT32 sched_method;
  39924. /* rts-cts config
  39925. * valid config can be found in WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE
  39926. */
  39927. A_UINT32 rtscts_config;
  39928. } wmi_audio_aggr_set_sched_method_cmd_fixed_param;
  39929. typedef struct {
  39930. /* TLV tag and len */
  39931. A_UINT32 tlv_header;
  39932. /* VDEV identifier */
  39933. A_UINT32 vdev_id;
  39934. } wmi_audio_aggr_get_sched_method_cmd_fixed_param;
  39935. typedef struct {
  39936. /** TLV tag and len; tag equals
  39937. * WMITLV_TAG_STRUC_wmi_set_ocl_cmd_fixed_param */
  39938. A_UINT32 tlv_header;
  39939. /* VDEV identifier */
  39940. A_UINT32 vdev_id;
  39941. /** enable/disable OCL, 1 - enable, 0 - disable*/
  39942. A_UINT32 en_dis_chain;
  39943. } wmi_set_ocl_cmd_fixed_param;
  39944. typedef enum {
  39945. /* HPA Handshake Stages */
  39946. WMI_HPA_SMCK_REQUEST = 0,
  39947. WMI_HPA_SMCK_RESPONSE = 1,
  39948. WMI_HPA_SIGN_REQUEST = 2,
  39949. WMI_HPA_SIGN_RESPONSE = 3,
  39950. WMI_HPA_HANDSHAKE_STAGE_MAX,
  39951. } WMI_HPA_STAGE_TYPE;
  39952. typedef struct {
  39953. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hpa_cmd_fixed_param */
  39954. /* stage:
  39955. * HPA Handshake Stage, filled with a WMI_HPA_STAGE_TYPE enum value
  39956. */
  39957. A_UINT32 stage;
  39958. /* the base address and length of data on host memory */
  39959. A_UINT32 base_paddr_low; /* bits 31:0 */
  39960. A_UINT32 base_paddr_high; /* bits 63:32 */
  39961. A_UINT32 len; /* units = bytes */
  39962. } wmi_hpa_cmd_fixed_param;
  39963. typedef struct {
  39964. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hpa_evt_fixed_param */
  39965. /* stage:
  39966. * HPA Handshake Stage, filled with a WMI_HPA_STAGE_TYPE enum value
  39967. */
  39968. A_UINT32 stage;
  39969. A_UINT32 nonce;
  39970. } wmi_hpa_evt_fixed_param;
  39971. typedef struct {
  39972. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_sync_qtimer */
  39973. A_UINT32 vdev_id;
  39974. A_UINT32 qtimer_l32;
  39975. A_UINT32 qtimer_u32;
  39976. } wmi_audio_sync_qtimer_cmd_fixed_param;
  39977. typedef struct {
  39978. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_sync_trigger */
  39979. A_UINT32 vdev_id;
  39980. /* agg_relation:
  39981. * indicates whether host needs only one pair of Qmaster and Qslave,
  39982. * or Qmaster and Qslave pairs derived for each FTM frame exchange.
  39983. * 0 indicates one pair for each FTM frame exchanged
  39984. * 1 indicates only one pair of Qmaster and Qslave times.
  39985. */
  39986. A_UINT32 agg_relation;
  39987. } wmi_audio_sync_trigger_cmd_fixed_param;
  39988. typedef struct {
  39989. /** TLV tag and len; tag equals
  39990. * WMITLV_TAG_STRUC_wmi_pdev_mec_aging_timer_config_cmd_fixed_param
  39991. */
  39992. A_UINT32 tlv_header;
  39993. /** SOC level Command. pdev_id - WMI_PDEV_ID_SOC is used.
  39994. */
  39995. A_UINT32 pdev_id;
  39996. /* The Threshold for mec aging timer in ms
  39997. */
  39998. A_UINT32 mec_aging_timer_threshold;
  39999. } wmi_pdev_mec_aging_timer_config_cmd_fixed_param;
  40000. #define WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS 0
  40001. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS 1
  40002. #define WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS 2
  40003. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS 3
  40004. #define WMI_CFR_GROUP_BW_VALID_BIT_POS 4
  40005. #define WMI_CFR_GROUP_NSS_VALID_BIT_POS 5
  40006. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS 6
  40007. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS 7
  40008. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS 8
  40009. /* The bits in this mask mapped to WMI_PEER_CFR_CAPTURE_BW enum */
  40010. #define WMI_CFR_GROUP_BW_MASK_NUM_BITS 6
  40011. #define WMI_CFR_GROUP_BW_BIT_POS 0
  40012. /* The bits in this mask correspond to the values as below
  40013. * bit 0 -> Nss 1
  40014. * bit 1 -> Nss 2
  40015. * ...
  40016. * bit 7 -> Nss 8
  40017. */
  40018. #define WMI_CFR_GROUP_NSS_MASK_NUM_BITS 8
  40019. #define WMI_CFR_GROUP_NSS_BIT_POS 16
  40020. #define WMI_CFR_GROUP_TA_ADDR_VALID_SET(param, value) \
  40021. WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1, value)
  40022. #define WMI_CFR_GROUP_TA_ADDR_VALID_GET(param) \
  40023. WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1)
  40024. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_SET(param, value) \
  40025. WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1, value)
  40026. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_GET(param) \
  40027. WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1)
  40028. #define WMI_CFR_GROUP_RA_ADDR_VALID_SET(param, value) \
  40029. WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1, value)
  40030. #define WMI_CFR_GROUP_RA_ADDR_VALID_GET(param) \
  40031. WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1)
  40032. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_SET(param, value) \
  40033. WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1, value)
  40034. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_GET(param) \
  40035. WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1)
  40036. #define WMI_CFR_GROUP_BW_VALID_SET(param, value) \
  40037. WMI_SET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1, value)
  40038. #define WMI_CFR_GROUP_BW_VALID_GET(param) \
  40039. WMI_GET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1)
  40040. #define WMI_CFR_GROUP_NSS_VALID_SET(param, value) \
  40041. WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1, value)
  40042. #define WMI_CFR_GROUP_NSS_VALID_GET(param) \
  40043. WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1)
  40044. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_SET(param, value) \
  40045. WMI_SET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1, value)
  40046. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_GET(param) \
  40047. WMI_GET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1)
  40048. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_SET(param, value) \
  40049. WMI_SET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1, value)
  40050. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_GET(param) \
  40051. WMI_GET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1)
  40052. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_SET(param, value) \
  40053. WMI_SET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1, value)
  40054. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_GET(param) \
  40055. WMI_GET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1)
  40056. #define WMI_CFR_GROUP_BW_SET(param, value) \
  40057. WMI_SET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS, value)
  40058. #define WMI_CFR_GROUP_BW_GET(param) \
  40059. WMI_GET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS)
  40060. #define WMI_CFR_GROUP_NSS_SET(param, value) \
  40061. WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS, value)
  40062. #define WMI_CFR_GROUP_NSS_GET(param) \
  40063. WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS)
  40064. typedef struct {
  40065. /** TLV tag and len; tag equals
  40066. * WMITLV_TAG_STRUC_wmi_cfr_filter_group_config */
  40067. A_UINT32 tlv_header;
  40068. /* Filter group number for which the below filters needs to be applied */
  40069. A_UINT32 filter_group_id;
  40070. /* Indicates which of the below filter's value is valid
  40071. * Bit 0: Ta_addr is valid if set
  40072. * Bit 1: Ta_addr_mask is valid if set
  40073. * Bit 2: Ra_addr is valid if set
  40074. * Bit 3: Ra_addr_mask is valid if set
  40075. * Bit 4: Bandwidth is valid if set
  40076. * Bit 5: NSS is valid if set
  40077. * Bit 6: Mgmt_subtype is valid if set
  40078. * Bit 7: Ctrl_subtype is valid if set
  40079. * Bit 8: Data_subtype is valid if set
  40080. * Bits 31:9 Reserved for future use
  40081. */
  40082. A_UINT32 filter_set_valid_mask;
  40083. /* ta_addr:
  40084. * Packets matching the TA_mac addr will be filtered in by MAC
  40085. * for CFR capture.
  40086. */
  40087. wmi_mac_addr ta_addr;
  40088. /* ta_addr_mask:
  40089. * Packets matching the TA_mac addr Mask will be filtered in by MAC
  40090. * for CFR capture.
  40091. */
  40092. wmi_mac_addr ta_addr_mask;
  40093. /* ra_addr:
  40094. * Packets matching the RA_mac addr will be filtered in by MAC
  40095. * for CFR capture.
  40096. */
  40097. wmi_mac_addr ra_addr;
  40098. /* ra_addr_mask:
  40099. * Packets matching the RA_mac addr Mask will be filtered in by MAC
  40100. * for CFR capture.
  40101. */
  40102. wmi_mac_addr ra_addr_mask;
  40103. /* bw_nss_filter:
  40104. * Indicates which bw and nss packets will be filtered for CFR capture
  40105. * Bits 4:0 CFR capture will be done for packets matching the bandwidths
  40106. * specified within this bitmask
  40107. * Bits 15:5 Reserved for future
  40108. * Bits 23:16 CFR capture will be done for packets matching the Nss
  40109. * specified within this bitmask
  40110. * Bits 31:24 Reserved for future
  40111. */
  40112. A_UINT32 bw_nss_filter;
  40113. /* mgmt_subtype_filter:
  40114. * Managments Packets matching the subtype filter categories will be
  40115. * filtered in by MAC for CFR capture.
  40116. * This is a bitmask, in which each bit represents the corresponding
  40117. * mgmt subtype value as per ieee80211_defs.h
  40118. */
  40119. A_UINT32 mgmt_subtype_filter;
  40120. /* ctrl_subtype_filter:
  40121. * Control Packets matching the subtype filter category will be
  40122. * filtered in by MAC for CFR capture.
  40123. * This is a bitmask, in which each bit represents the corresponding
  40124. * ctrl subtype value as per ieee80211_defs.h
  40125. */
  40126. A_UINT32 ctrl_subtype_filter;
  40127. /* data_subtype_filter:
  40128. * Data Packets matching the subtype filter category will be
  40129. * filtered in by MAC for CFR capture.
  40130. * This is a bitmask, in which each bit represents the corresponding
  40131. * data subtype value as per ieee80211_defs.h
  40132. */
  40133. A_UINT32 data_subtype_filter;
  40134. } wmi_cfr_filter_group_config;
  40135. #define WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS 0
  40136. #define WMI_CFR_ALL_FTM_ACK_EN_BIT_POS 1
  40137. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS 2
  40138. #define WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS 3
  40139. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS 4
  40140. #define WMI_CFR_ALL_PACKET_EN_BIT_POS 5
  40141. #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS 6
  40142. #define WMI_CFR_CAPTURE_INTERVAL_NUM_BITS 24
  40143. #define WMI_CFR_CAPTURE_INTERVAL_BIT_POS 0
  40144. #define WMI_CFR_CAPTURE_DURATION_NUM_BITS 24
  40145. #define WMI_CFR_CAPTURE_DURATION_BIT_POS 0
  40146. #define WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS 16
  40147. #define WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS 0
  40148. #define WMI_CFR_UL_MU_USER_UPPER_NUM_BITS 5
  40149. #define WMI_CFR_UL_MU_USER_UPPER_BIT_POS 0
  40150. #define WMI_CFR_FREEZE_DELAY_CNT_EN_MASK 1
  40151. #define WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS 0
  40152. #define WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS 8
  40153. #define WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS 1
  40154. #define WMI_CFR_CAPTURE_COUNT_NUM_BITS 16
  40155. #define WMI_CFR_CAPTURE_COUNT_BIT_POS 0
  40156. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS 1
  40157. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS 16
  40158. #define WMI_CFR_DIRECTED_FTM_ACK_EN_SET(param, value) \
  40159. WMI_SET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1, value)
  40160. #define WMI_CFR_DIRECTED_FTM_ACK_EN_GET(param) \
  40161. WMI_GET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1)
  40162. #define WMI_CFR_ALL_FTM_ACK_EN_SET(param, value) \
  40163. WMI_SET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1, value)
  40164. #define WMI_CFR_ALL_FTM_ACK_EN_GET(param) \
  40165. WMI_GET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1)
  40166. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_SET(param, value) \
  40167. WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1, value)
  40168. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_GET(param) \
  40169. WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1)
  40170. #define WMI_CFR_NDPA_NDP_ALL_EN_SET(param, value) \
  40171. WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1, value)
  40172. #define WWMI_CFR_NDPA_NDP_ALL_EN_GET WMI_CFR_NDPA_NDP_ALL_EN_GET
  40173. #define WMI_CFR_NDPA_NDP_ALL_EN_GET(param) \
  40174. WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1)
  40175. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_SET(param, value) \
  40176. WMI_SET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1, value)
  40177. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_GET(param) \
  40178. WMI_GET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1)
  40179. #define WWMI_CFR_ALL_PACKET_EN_SET WMI_CFR_ALL_PACKET_EN_SET
  40180. #define WMI_CFR_ALL_PACKET_EN_SET(param, value) \
  40181. WMI_SET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1, value)
  40182. #define WMI_CFR_ALL_PACKET_EN_GET(param) \
  40183. WMI_GET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1)
  40184. #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_SET(param, value) \
  40185. WMI_SET_BITS(param, WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS, 1, value)
  40186. #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_GET(param) \
  40187. WMI_GET_BITS(param, WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS, 1)
  40188. #define WMI_CFR_CAPTURE_INTERVAL_SET(param, value) \
  40189. WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS, value)
  40190. #define WMI_CFR_CAPTURE_INTERVAL_GET(param) \
  40191. WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS)
  40192. #define WMI_CFR_CAPTURE_DURATION_SET(param, value) \
  40193. WMI_SET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS, value)
  40194. #define WMI_CFR_CAPTURE_DURATION_GET(param) \
  40195. WMI_GET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS)
  40196. #define WMI_CFR_FILTER_GROUP_BITMAP_SET(param, value) \
  40197. WMI_SET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS, value)
  40198. #define WMI_CFR_FILTER_GROUP_BITMAP_GET(param) \
  40199. WMI_GET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS)
  40200. #define WMI_CFR_UL_MU_USER_UPPER_SET(param, value) \
  40201. WMI_SET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS, value)
  40202. #define WMI_CFR_UL_MU_USER_UPPER_GET(param) \
  40203. WMI_GET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS)
  40204. #define WMI_CFR_FREEZE_DELAY_CNT_EN_SET(param, value) \
  40205. WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK, value)
  40206. #define WMI_CFR_FREEZE_DELAY_CNT_EN_GET(param) \
  40207. WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK)
  40208. #define WMI_CFR_FREEZE_DELAY_CNT_THR_SET(param, value) \
  40209. WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS, value)
  40210. #define WMI_CFR_FREEZE_DELAY_CNT_THR_GET(param) \
  40211. WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS)
  40212. #define WMI_CFR_CAPTURE_COUNT_SET(param, value) \
  40213. WMI_SET_BITS(param, WMI_CFR_CAPTURE_COUNT_BIT_POS, WMI_CFR_CAPTURE_COUNT_NUM_BITS, value)
  40214. #define WMI_CFR_CAPTURE_COUNT_GET(param) \
  40215. WMI_GET_BITS(param, WMI_CFR_CAPTURE_COUNT_BIT_POS, WMI_CFR_CAPTURE_COUNT_NUM_BITS)
  40216. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_SET(param, value) \
  40217. WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS, value)
  40218. #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_GET(param) \
  40219. WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS)
  40220. typedef struct {
  40221. /** TLV tag and len; tag equals
  40222. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_filter_cmd_fixed_param */
  40223. A_UINT32 tlv_header;
  40224. /** pdev_id for identifying the MAC
  40225. * See macros starting with WMI_PDEV_ID_ for values.
  40226. * In non-DBDC case host should set it to 0
  40227. */
  40228. A_UINT32 pdev_id;
  40229. /* filter_type:
  40230. * Indicates the type of filter to be enabled
  40231. * Bit 0: Filter Directed FTM ACK frames for CFR capture
  40232. * Bit 1: Filter All FTM ACK frames for CFR capture
  40233. * Bit 2: Filter NDPA NDP Directed Frames for CFR capture
  40234. * Bit 3: Filter NDPA NDP All Frames for CFR capture
  40235. * Bit 4: Filter Frames based on TA/RA/Subtype as provided
  40236. * in CFR Group config
  40237. * Bit 5: Filter in All packets for CFR Capture
  40238. * Bit 6: Filter in TA/RA frames as FP if this bit is set else as MO
  40239. * Bits 31:7 Reserved for future use
  40240. */
  40241. A_UINT32 filter_type;
  40242. /* capture_interval:
  40243. * Capture interval field which is time in between consecutive
  40244. * CFR capture, in microsecond units
  40245. * Bits 23:0 Capture interval
  40246. * Bits 31:24 Reserved for future use
  40247. */
  40248. A_UINT32 capture_interval;
  40249. /* capture_duration:
  40250. * Capture Duration field for which CFR capture has to happen,
  40251. * in microsecond units
  40252. * Bits 23:0 Capture Duration
  40253. * Bits 31:24 Reserved for future use
  40254. */
  40255. A_UINT32 capture_duration;
  40256. /* Bitfields set indicates which of the CFR group config is enabled
  40257. * Bits 15:0 Filter Group enable Bits
  40258. * Bits 31:16 Reserved for future use
  40259. * If Bit 0 is set, then CFR filter group 0 alone is enabled and so on
  40260. */
  40261. A_UINT32 filter_group_bitmap;
  40262. /* ul_mu_user_mask_lower:
  40263. * Bitfields indicates which of the users in the current UL MU
  40264. * transmission are enabled for CFR capture.
  40265. * Bits 31 to 0 indicates user indexes for 32 users in a UL MU transmission.
  40266. * If bit 0 is set, then the CFR capture will happen for user index 0
  40267. * in the current UL MU Transmission.
  40268. * If bits 0,2 are set, then CFR capture for UL MU TX corresponds to
  40269. * user indices 0 and 2.
  40270. */
  40271. A_UINT32 ul_mu_user_mask_lower;
  40272. /* ul_mu_user_mask_upper:
  40273. * This is continuation of the above lower mask.
  40274. * Bits 4:0 Bitfields indicates user indices from 33 to 37 users.
  40275. * Bits 31:5 Reserved for future use
  40276. * If bit 0 is set, then CFR capture is enabled for user index 33
  40277. * in a UL MU transmission.
  40278. */
  40279. A_UINT32 ul_mu_user_mask_upper;
  40280. /* freeze_tlv_delay_cnt
  40281. * Indicates the number of consecutive Rx packets to be skipped
  40282. * before CFR capture is enabled again.
  40283. * Bits 8:0 Freeze Delay Count value
  40284. * Bits 31:9 Reserved for future use
  40285. */
  40286. A_UINT32 freeze_tlv_delay_cnt;
  40287. /* capture_count:
  40288. * Indicates the number of consecutive packets for which CFR capture
  40289. * is to be enabled.
  40290. * Interpretation of capture_interval_mode_select (bit 16):
  40291. * Value 0: capture_interval + capture_duration fields are used
  40292. * to capture CFR for capture_duration after every
  40293. * capture_interval.
  40294. * Value 1: capture_interval + capture_count fields are used to
  40295. * capture CFR for capture_count+1 number of packets
  40296. * after every capture interval
  40297. * Bit 15:0 : capture_count
  40298. * Refer to WMI_CFR_CAPTURE_COUNT_GET/SET macros.
  40299. * Bit 16 : capture_interval_mode_select
  40300. * Refer to WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_GET/SET macros.
  40301. * Bits 31:17 : Reserved
  40302. */
  40303. A_UINT32 capture_count;
  40304. /*
  40305. * A variable-length TLV array of wmi_cfr_filter_group_config will
  40306. * follow this fixed_param TLV
  40307. * wmi_cfr_filter_group_config filter_group_config[];
  40308. */
  40309. } wmi_cfr_capture_filter_cmd_fixed_param;
  40310. enum wmi_oem_data_evt_cause {
  40311. WMI_OEM_DATA_EVT_CAUSE_UNSPECIFIED = 0,
  40312. WMI_OEM_DATA_EVT_CAUSE_CMD_REQ = 1,
  40313. WMI_OEM_DATA_EVT_CAUSE_ASYNC = 2,
  40314. WMI_OEM_DATA_EVT_CAUSE_QMS = 3, /* DEPRECATED */
  40315. WMI_OEM_DATA_EVT_CAUSE_SMEM_MAILBOX = 3,
  40316. };
  40317. typedef struct {
  40318. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_event_fixed_param */
  40319. A_UINT32 data_len; /** length in byte of data[]. */
  40320. /* Event Cause reason from enum wmi_oem_data_evt_cause */
  40321. A_UINT32 event_cause;
  40322. /* Following this structure is the TLV:
  40323. * A_UINT8 data[]; <-- length in byte given by field data_len.
  40324. * This data array contains OEM data, the payload begins with a field to tell the HOST regarding the kind of the OEM data.
  40325. * A_UINT8 file_name[]; <-- Name of the file to which HOST needs to write this OEM specific data.
  40326. */
  40327. } wmi_oem_data_event_fixed_param;
  40328. #define WMI_VLAN_TX_BIT_POS 0
  40329. #define WMI_VLAN_RX_BIT_POS 1
  40330. #define WMI_TX_INSERT_OR_STRIP_BIT_POS 2
  40331. #define WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS 3
  40332. #define WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS 4
  40333. #define WMI_RX_STRIP_VLAN_C_TAG_BIT_POS 5
  40334. #define WMI_RX_STRIP_VLAN_S_TAG_BIT_POS 6
  40335. #define WMI_RX_INSERT_VLAN_C_TAG_BIT_POS 7
  40336. #define WMI_RX_INSERT_VLAN_S_TAG_BIT_POS 8
  40337. #define WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS 16
  40338. #define WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS 0
  40339. #define WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS 16
  40340. #define WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS 16
  40341. #define WMI_VLAN_TX_SET(param, value) \
  40342. WMI_SET_BITS(param, WMI_VLAN_TX_BIT_POS, 1, value)
  40343. #define WMI_VLAN_TX_GET(param) \
  40344. WMI_GET_BITS(param, WMI_VLAN_TX_BIT_POS, 1)
  40345. #define WMI_VLAN_RX_SET(param, value) \
  40346. WMI_SET_BITS(param, WMI_VLAN_RX_BIT_POS, 1, value)
  40347. #define WMI_VLAN_RX_GET(param) \
  40348. WMI_GET_BITS(param, WMI_VLAN_RX_BIT_POS, 1)
  40349. #define WMI_TX_INSERT_OR_STRIP_SET(param, value) \
  40350. WMI_SET_BITS(param, WMI_TX_INSERT_OR_STRIP_BIT_POS, 1, value)
  40351. #define WMI_TX_INSERT_OR_STRIP_GET(param) \
  40352. WMI_GET_BITS(param, WMI_TX_INSERT_OR_STRIP_BIT_POS, 1)
  40353. #define WMI_TX_STRIP_INSERT_VLAN_INNER_SET(param, value) \
  40354. WMI_SET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS, 1, value)
  40355. #define WMI_TX_STRIP_INSERT_VLAN_INNER_GET(param) \
  40356. WMI_GET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS, 1)
  40357. #define WMI_TX_STRIP_INSERT_VLAN_OUTER_SET(param, value) \
  40358. WMI_SET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS, 1, value)
  40359. #define WMI_TX_STRIP_INSERT_VLAN_OUTER_GET(param) \
  40360. WMI_GET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS, 1)
  40361. #define WMI_RX_STRIP_VLAN_C_TAG_SET(param, value) \
  40362. WMI_SET_BITS(param, WMI_RX_STRIP_VLAN_C_TAG_BIT_POS, 1, value)
  40363. #define WMI_RX_STRIP_VLAN_C_TAG_GET(param) \
  40364. WMI_GET_BITS(param, WMI_RX_STRIP_VLAN_C_TAG_BIT_POS, 1)
  40365. #define WMI_RX_STRIP_VLAN_S_TAG_SET(param, value) \
  40366. WMI_SET_BITS(param, WMI_RX_STRIP_VLAN_S_TAG_BIT_POS, 1, value)
  40367. #define WMI_RX_STRIP_VLAN_S_TAG_GET(param) \
  40368. WMI_GET_BITS(param, WMI_RX_STRIP_VLAN_S_TAG_BIT_POS, 1)
  40369. #define WMI_RX_INSERT_VLAN_C_TAG_SET(param, value) \
  40370. WMI_SET_BITS(param, WMI_RX_INSERT_VLAN_C_TAG_BIT_POS, 1, value)
  40371. #define WMI_RX_INSERT_VLAN_C_TAG_GET(param) \
  40372. WMI_GET_BITS(param, WMI_RX_INSERT_VLAN_C_TAG_BIT_POS, 1)
  40373. #define WMI_RX_INSERT_VLAN_S_TAG_SET(param, value) \
  40374. WMI_SET_BITS(param, WMI_RX_INSERT_VLAN_S_TAG_BIT_POS, 1, value)
  40375. #define WMI_RX_INSERT_VLAN_S_TAG_GET(param) \
  40376. WMI_GET_BITS(param, WMI_RX_INSERT_VLAN_S_TAG_BIT_POS, 1)
  40377. #define WMI_TX_INSERT_VLAN_INNER_TCI_SET(param, value) \
  40378. WMI_SET_BITS(param, WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS, value)
  40379. #define WMI_TX_INSERT_VLAN_INNER_TCI_GET(param) \
  40380. WMI_GET_BITS(param, WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS)
  40381. #define WMI_TX_INSERT_VLAN_OUTER_TCI_SET(param, value) \
  40382. WMI_SET_BITS(param, WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS, value)
  40383. #define WMI_TX_INSERT_VLAN_OUTER_TCI_GET(param) \
  40384. WMI_GET_BITS(param, WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS)
  40385. typedef struct {
  40386. /** TLV tag and len; tag equals
  40387. * WMITLV_TAG_STRUC_wmi_peer_config_vlan_cmd_fixed_param */
  40388. A_UINT32 tlv_header;
  40389. /** peer MAC address */
  40390. wmi_mac_addr peer_macaddr;
  40391. /* peer_vlan_config_mask:
  40392. * Field indicates VLAN settings that need to set in RX and TX peer
  40393. * Bit 0: Indicates if the settings are present for TX peer
  40394. * [1 - present for TX peer]
  40395. * Bit 1: Indicates if the settings are present for RX peer
  40396. * [1 - present for RX peer]
  40397. * Bit 2: Setting the insert_or_strip bit in TX peer
  40398. * [0 - Strip, 1 - Insert]
  40399. * Bit 3: Setting the strip_insert_vlan_inner bit in TX peer
  40400. * [0 - Strip, 1 - Insert]
  40401. * Bit 4: Setting the strip_insert_vlan_outer bit in TX peer
  40402. * [0 - Strip, 1 - Insert]
  40403. * Bit 5: Setting the strip_vlan_c_tag_decap bit in RX peer [1 - Strip]
  40404. * Bit 6: Setting the strip_vlan_s_tag_decap bit in RX peer [1 - Strip]
  40405. * Bit 7: Setting the rx_insert_vlan_c_tag_padding bit in RX peer
  40406. * [1 - Insert]
  40407. * Bit 8: Setting the rx_insert_vlan_s_tag_padding bit in RX peer
  40408. * [1 - Insert]
  40409. */
  40410. A_UINT32 peer_vlan_config_mask;
  40411. /* insert_vlan_tci:
  40412. * Field indicates the word that needs to be inserted in the
  40413. * inner or outer tag, if insertion is enabled by the
  40414. * TX peer strip_insert_vlan_{inner,outer} fields along with
  40415. * insert_or_strip field
  40416. * Bits 0:15 insert_vlan_inner_tci
  40417. * Bits 16:31 insert_vlan_outer_tci
  40418. */
  40419. A_UINT32 insert_vlan_tci;
  40420. /* VDEV identifier */
  40421. A_UINT32 vdev_id;
  40422. } wmi_peer_config_vlan_cmd_fixed_param;
  40423. typedef struct {
  40424. /** TLV tag and len; tag equals
  40425. * WMITLV_TAG_STRUC_wmi_peer_config_ppe_ds_cmd_fixed_param */
  40426. A_UINT32 tlv_header;
  40427. wmi_mac_addr peer_macaddr;
  40428. A_UINT32 ppe_routing_enable; /* enum WMI_PPE_ROUTING_TYPE */
  40429. /* The processing stages in PPE that this packet buffer need to go through
  40430. * and on to which PPE queues these buffers should be mapped to.
  40431. * Refer pkg/ppe/src/ppe_sc.h for service code types
  40432. */
  40433. A_UINT32 service_code;
  40434. A_UINT32 priority_valid;
  40435. /* Unique number that represents a VAP's vdev_id in PPE domain */
  40436. A_UINT32 src_info;
  40437. /* VDEV identifier */
  40438. A_UINT32 vdev_id;
  40439. } wmi_peer_config_ppe_ds_cmd_fixed_param;
  40440. typedef enum {
  40441. WMI_PPE_ROUTING_DISABLED = 0,
  40442. WMI_AST_USE_PPE_ENABLED = 1,
  40443. WMI_AST_USE_PPE_DISABLED = 2,
  40444. WMI_PPE_ROUTING_TYPE_MAX,
  40445. } WMI_PPE_ROUTING_TYPE;
  40446. typedef struct {
  40447. /** TLV tag and len; tag equals
  40448. * WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_resp_event_fixed_param */
  40449. A_UINT32 tlv_header;
  40450. A_UINT32 pdev_id; /* ID of the pdev this response belongs to */
  40451. A_UINT32 requestor_id;
  40452. /** Return status. As per WMI_VDEV_START_RESPONSE_XXXXX */
  40453. A_UINT32 status;
  40454. /* The TLVs follows this structure:
  40455. * A_UINT32 vdev_ids_bitmap[]; <--- Array of VDEV id bitmap.
  40456. */
  40457. } wmi_pdev_multiple_vdev_restart_resp_event_fixed_param;
  40458. /** WMI event for Firmware to report soundbar audio frame statistics to Host **/
  40459. typedef struct {
  40460. /** TLV tag and len **/
  40461. A_UINT32 tlv_header;
  40462. A_UINT32 vdev_id; /* ID of the vdev this response belongs to */
  40463. /** identify which request this responds to **/
  40464. A_UINT32 response_id;
  40465. /* audio frame statistics part -
  40466. * Use subsequent TLV arrays to list group_stats and peer_stats.
  40467. */
  40468. /*
  40469. * The TLVs listing group_stats, will follow this TLV.
  40470. * The number of group_stats can be calculated by dividing the
  40471. * TLV array length by the TLV array element length.
  40472. *
  40473. * The fixed_param TLV is directly followed by a list of
  40474. * wmi_audio_aggr_group_stats elements:
  40475. * wmi_audio_aggr_group_stats group_stats[0];
  40476. * wmi_audio_aggr_group_stats group_stats[1];
  40477. * ...
  40478. * wmi_audio_aggr_group_stats group_stats[N];
  40479. *
  40480. * After the list of wmi_audio_aggr_group_stats is a list of peer_stats.
  40481. * wmi_audio_aggr_peer_stats peer_stats[0];
  40482. * wmi_audio_aggr_peer_stats peer_stats[1];
  40483. * ...
  40484. * wmi_audio_aggr_peer_stats peer_stats[N];
  40485. *
  40486. */
  40487. } wmi_audio_aggr_statistics_event_fixed_param;
  40488. typedef struct {
  40489. /** TLV tag and len **/
  40490. A_UINT32 tlv_header;
  40491. /* Group mac_address */
  40492. wmi_mac_addr group_addr;
  40493. /* Group identity */
  40494. A_UINT32 group_id;
  40495. /* Multicast MSDU Data Packets received from Host for this Group */
  40496. A_UINT32 mcast_tx;
  40497. /*
  40498. * Multicast MSDU Data Packets sent to OTA.
  40499. * Customer defined SW Retry Packets not included, as these
  40500. * SW Retry packets generated in FW locally, but not from Host.
  40501. */
  40502. A_UINT32 mcast_tx_ok;
  40503. /*
  40504. * Multicast MSDU Data Packets sent to OTA.
  40505. * Only include Customer defined SW Retry Packets.
  40506. */
  40507. A_UINT32 mcast_tx_ok_retry;
  40508. /*
  40509. * Multicast MSDU Data Packets not sent to OTA,
  40510. * discarded by tbd function due to timeout.
  40511. * Customer defined SW Retry Packets not included.
  40512. */
  40513. A_UINT32 mcast_tx_tbd_lost;
  40514. /*
  40515. * Multicast MSDU Data Packets not sent to OTA,
  40516. * discarded by tbd function due to timeout.
  40517. * Only include Customer defined SW Retry Packets.
  40518. */
  40519. A_UINT32 mcast_tx_tbd_lost_retry;
  40520. } wmi_audio_aggr_group_stats;
  40521. typedef struct {
  40522. /** TLV tag and len **/
  40523. A_UINT32 tlv_header;
  40524. /* STA mac_address */
  40525. wmi_mac_addr peer_addr;
  40526. /* Unicast MSDU Data Packets received from peer STA */
  40527. A_UINT32 ucast_rx;
  40528. /* Unicast MSDU Data Packets received from Host for Peer STA */
  40529. A_UINT32 ucast_tx;
  40530. /*
  40531. * Unicast MSDU Data Packets received from Host,
  40532. * and SW retry times for these packets.
  40533. */
  40534. A_UINT32 ucast_tx_retry;
  40535. /*
  40536. * Unicast MSDU Data Packets received from Host,
  40537. * and sent to Peer STA successfully.
  40538. */
  40539. A_UINT32 ucast_tx_ok;
  40540. /*
  40541. * Unicast MSDU Data Packets received from Host,
  40542. * but sent to Peer STA fail. not OTA, or no ACK from Peer.
  40543. */
  40544. A_UINT32 ucast_tx_lost;
  40545. /*
  40546. * Periodic NULL Data frames for multicast tx rate auto control.
  40547. * Generated by FW locally, and sent to Peer STA successfully.
  40548. */
  40549. A_UINT32 null_frame_tx;
  40550. /*
  40551. * Periodic NULL Data frames for multicast tx rate auto control.
  40552. * Generated by FW locally, but sent to Peer STA fail.
  40553. */
  40554. A_UINT32 null_frame_tx_lost;
  40555. } wmi_audio_aggr_peer_stats;
  40556. typedef struct {
  40557. /** TLV tag and len **/
  40558. A_UINT32 tlv_header;
  40559. /* ID of the vdev this response belongs to */
  40560. A_UINT32 vdev_id;
  40561. /* selected audio aggr scheduler method
  40562. * valid methods can be found in WMI_AUDIO_AGGR_SCHED_METHOD_TYPE
  40563. */
  40564. A_UINT32 sched_method;
  40565. /* rts-cts config
  40566. * valid config can be found in WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE
  40567. */
  40568. A_UINT32 rtscts_config;
  40569. } wmi_audio_aggr_sched_method_event_fixed_param;
  40570. typedef struct {
  40571. /** TLV tag and len; tag equals
  40572. *WMITLV_TAG_STRUC_wmi_pdev_srg_bss_color_bitmap_cmd_fixed_param */
  40573. A_UINT32 tlv_header;
  40574. /** pdev_id for identifying the MAC
  40575. * See macros starting with WMI_PDEV_ID_ for values.
  40576. * In non-DBDC case host should set it to 0
  40577. */
  40578. A_UINT32 pdev_id;
  40579. /* 64 bit bss color bitmap used by SRG based spatial reuse feature
  40580. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40581. * upper 32 bits.
  40582. */
  40583. A_UINT32 srg_bss_color_bitmap[2];
  40584. } wmi_pdev_srg_bss_color_bitmap_cmd_fixed_param;
  40585. typedef struct {
  40586. /** TLV tag and len; tag equals
  40587. *WMITLV_TAG_STRUC_wmi_pdev_srg_partial_bssid_bitmap_cmd_fixed_param */
  40588. A_UINT32 tlv_header;
  40589. /** pdev_id for identifying the MAC
  40590. * See macros starting with WMI_PDEV_ID_ for values.
  40591. * In non-DBDC case host should set it to 0
  40592. */
  40593. A_UINT32 pdev_id;
  40594. /* 64 bit partial bssid bitmap used by SRG based spatial reuse feature
  40595. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40596. * upper 32 bits.
  40597. */
  40598. A_UINT32 srg_partial_bssid_bitmap[2];
  40599. } wmi_pdev_srg_partial_bssid_bitmap_cmd_fixed_param;
  40600. typedef struct {
  40601. /** TLV tag and len; tag equals
  40602. * WMITLV_TAG_STRUC_wmi_pdev_srg_obss_color_enable_bitmap_cmd_fixed_param */
  40603. A_UINT32 tlv_header;
  40604. /** pdev_id for identifying the MAC
  40605. * See macros starting with WMI_PDEV_ID_ for values.
  40606. * In non-DBDC case host should set it to 0
  40607. */
  40608. A_UINT32 pdev_id;
  40609. /* 64 bit SRG obss color enable bitmap used by SRG based spatial reuse feature
  40610. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40611. * upper 32 bits.
  40612. */
  40613. A_UINT32 srg_obss_en_color_bitmap[2];
  40614. } wmi_pdev_srg_obss_color_enable_bitmap_cmd_fixed_param;
  40615. typedef struct {
  40616. /** TLV tag and len; tag equals
  40617. * WMITLV_TAG_STRUC_wmi_pdev_srg_obss_bssid_enable_bitmap_cmd_fixed_param */
  40618. A_UINT32 tlv_header;
  40619. /** pdev_id for identifying the MAC
  40620. * See macros starting with WMI_PDEV_ID_ for values.
  40621. * In non-DBDC case host should set it to 0
  40622. */
  40623. A_UINT32 pdev_id;
  40624. /* 64 bit obss bssid enable bitmap used by SRG based spatial reuse feature
  40625. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40626. * upper 32 bits.
  40627. */
  40628. A_UINT32 srg_obss_en_bssid_bitmap[2];
  40629. } wmi_pdev_srg_obss_bssid_enable_bitmap_cmd_fixed_param;
  40630. typedef struct {
  40631. /** TLV tag and len; tag equals
  40632. * WMITLV_TAG_STRUC_wmi_pdev_non_srg_obss_color_enable_bitmap_cmd_fixed_param */
  40633. A_UINT32 tlv_header;
  40634. /** pdev_id for identifying the MAC
  40635. * See macros starting with WMI_PDEV_ID_ for values.
  40636. * In non-DBDC case host should set it to 0
  40637. */
  40638. A_UINT32 pdev_id;
  40639. /* 64 bit Non_SRG obss color enable bitmap used by Non_SRG based spatial reuse feature
  40640. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40641. * upper 32 bits.
  40642. */
  40643. A_UINT32 non_srg_obss_en_color_bitmap[2];
  40644. } wmi_pdev_non_srg_obss_color_enable_bitmap_cmd_fixed_param;
  40645. typedef struct {
  40646. /** TLV tag and len; tag equals
  40647. * WMITLV_TAG_STRUC_wmi_pdev_non_srg_obss_bssid_enable_bitmap_cmd_fixed_param */
  40648. A_UINT32 tlv_header;
  40649. /** pdev_id for identifying the MAC
  40650. * See macros starting with WMI_PDEV_ID_ for values.
  40651. * In non-DBDC case host should set it to 0
  40652. */
  40653. A_UINT32 pdev_id;
  40654. /* 64 bit obss bssid enable bitmap used by Non_SRG based spatial reuse feature
  40655. * bitmap[0] contains lower 32 bits and bitmap[1] contains
  40656. * upper 32 bits.
  40657. */
  40658. A_UINT32 non_srg_obss_en_bssid_bitmap[2];
  40659. } wmi_pdev_non_srg_obss_bssid_enable_bitmap_cmd_fixed_param;
  40660. typedef struct {
  40661. /** TLV tag and len; tag equals
  40662. * WMITLV_TAG_STRUC_wmi_pdev_enable_duration_based_tx_mode_selection_cmd_fixed_param
  40663. */
  40664. A_UINT32 tlv_header;
  40665. /** pdev_id for identifying the MAC
  40666. * See macros starting with WMI_PDEV_ID_ for values.
  40667. * In non-DBDC case host should set it to 0
  40668. */
  40669. A_UINT32 pdev_id;
  40670. /* enable/disable Duration based Tx Mode selection */
  40671. A_UINT32 duration_based_tx_mode_selection;
  40672. } wmi_pdev_enable_duration_based_tx_mode_selection_cmd_fixed_param;
  40673. typedef enum {
  40674. /* Simulation test command types */
  40675. WMI_SIM_TEST_FRAME_CONTENT_CHANGE_CMD,
  40676. WMI_SIM_TEST_DROP_FRAME_CMD,
  40677. WMI_SIM_TEST_DELAY_FRAME_CMD,
  40678. WMI_SIM_TEST_CONFIGURATION_CMD,
  40679. WMI_SIM_TEST_CMD_UNKNOWN = 255,
  40680. } WMI_SIMULATION_TEST_CMD_TYPE;
  40681. typedef enum {
  40682. /* Simulation test sub-command types */
  40683. WMI_SIM_TEST_SUB_CMD_UNKNOWN = 255,
  40684. } WMI_SIMULATION_TEST_SUB_CMD_TYPE;
  40685. #define WMI_SIM_FRAME_TYPE_BIT_POS 0
  40686. #define WMI_SIM_FRAME_SUBTYPE_BIT_POS 8
  40687. #define WMI_SIM_FRAME_SEQ_BIT_POS 16
  40688. #define WMI_SIM_FRAME_OFFSET_BIT_POS 0
  40689. #define WMI_SIM_FRAME_LENGTH_BIT_POS 16
  40690. #define WMI_SIM_FRAME_TYPE_SET(param, value) \
  40691. WMI_SET_BITS(param, WMI_SIM_FRAME_TYPE_BIT_POS, 8, value)
  40692. #define WMI_SIM_FRAME_TYPE_GET(param) \
  40693. WMI_GET_BITS(param, WMI_SIM_FRAME_TYPE_BIT_POS, 8)
  40694. #define WMI_SIM_FRAME_SUBTYPE_SET(param, value) \
  40695. WMI_SET_BITS(param, WMI_SIM_FRAME_SUBTYPE_BIT_POS, 8, value)
  40696. #define WMI_SIM_FRAME_SUBTYPE_GET(param) \
  40697. WMI_GET_BITS(param, WMI_SIM_FRAME_SUBTYPE_BIT_POS, 8)
  40698. #define WMI_SIM_FRAME_SEQ_SET(param, value) \
  40699. WMI_SET_BITS(param, WMI_SIM_FRAME_SEQ_BIT_POS, 8, value)
  40700. #define WMI_SIM_FRAME_SEQ_GET(param) \
  40701. WMI_GET_BITS(param, WMI_SIM_FRAME_SEQ_BIT_POS, 8)
  40702. #define WMI_SIM_FRAME_OFFSET_SET(param, value) \
  40703. WMI_SET_BITS(param, WMI_SIM_FRAME_OFFSET_BIT_POS, 16, value)
  40704. #define WMI_SIM_FRAME_OFFSET_GET(param) \
  40705. WMI_GET_BITS(param, WMI_SIM_FRAME_OFFSET_BIT_POS, 16)
  40706. #define WMI_SIM_FRAME_LENGTH_SET(param, value) \
  40707. WMI_SET_BITS(param, WMI_SIM_FRAME_LENGTH_BIT_POS, 16, value)
  40708. #define WMI_SIM_FRAME_LENGTH_GET(param) \
  40709. WMI_GET_BITS(param, WMI_SIM_FRAME_LENGTH_BIT_POS, 16)
  40710. typedef struct {
  40711. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_simulation_test_cmd_fixed_param */
  40712. A_UINT32 tlv_header;
  40713. /** pdev_id for identifying the MAC.
  40714. * See macros starting with WMI_PDEV_ID_ for values.
  40715. * In non-DBDC case host should set it to 0.
  40716. */
  40717. A_UINT32 pdev_id;
  40718. /** vdev_id for identifying the vap simulation command needs to be applied.
  40719. * This is for future purpose, currently only 1 vap is supported for
  40720. * simulation test mode.
  40721. * Host will always set it to 0 for now.
  40722. */
  40723. A_UINT32 vdev_id;
  40724. /** peer MAC address for identifying the peer for which the simulation
  40725. * command needs to be applied.
  40726. * peer_macaddr needs to be set to '0' for simulation commands which
  40727. * needs to be applied at pdev or vdev level.
  40728. */
  40729. wmi_mac_addr peer_macaddr;
  40730. /** test command type, as per WMI_SIMULATION_TEST_CMD_TYPE */
  40731. A_UINT32 test_cmd_type;
  40732. /** test command type, as per WMI_SIMULATION_TEST_SUB_CMD_TYPE */
  40733. A_UINT32 test_subcmd_type;
  40734. /**
  40735. * The frame type, frame subtype, and frame sequence number
  40736. * are stored as bitfields within the below A_UINT32 "word".
  40737. * Use the WMI_SIM_xxx_GET/SET macros to read and
  40738. * write these bitfields.
  40739. **/
  40740. A_UINT32 frame_type_subtype_seq;
  40741. /**
  40742. * The frame offset and frame length,
  40743. * are stored as bitfields within the below A_UINT32 "word".
  40744. * Use the WMI_SIM_xxx_GET/SET macros to read and
  40745. * write these bitfields.
  40746. **/
  40747. A_UINT32 frame_offset_length;
  40748. /** buf_len: Buffer length in bytes
  40749. * In some cases buf_len == frame_length, but not always.
  40750. * For example, a DELAY_FRAME command will not involve any frame
  40751. * contents, so frame_length will be zero, but buf_len will be
  40752. * non-zero because it will contain command-specific parameters.
  40753. */
  40754. A_UINT32 buf_len;
  40755. /* This TLV is followed by array of bytes:
  40756. * A_UINT8 bufp[];
  40757. * For FRAME_CONTENT_CHANGE commands, bufp contains the first 64 bytes
  40758. * of the frame.
  40759. */
  40760. } wmi_simulation_test_cmd_fixed_param;
  40761. typedef struct {
  40762. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_rsnxe */
  40763. A_UINT32 tlv_header;
  40764. /* rsnxe_param
  40765. * Override RSNXE Used bit in FT reassoc request.
  40766. * Possible values from host are:
  40767. * 0 use default value based on capability
  40768. * 1 override with 1
  40769. * 2 override with 0
  40770. */
  40771. A_UINT32 rsnxe_param;
  40772. } wmi_wfa_config_rsnxe;
  40773. typedef struct {
  40774. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_csa */
  40775. A_UINT32 tlv_header;
  40776. /* ignore_csa
  40777. * Ignore CSA from AP and keep STA in current channel and don't deauth AP.
  40778. * Possible values from host are:
  40779. * 0 default behavior
  40780. * 1 ignore CSA
  40781. */
  40782. A_UINT32 ignore_csa;
  40783. } wmi_wfa_config_csa;
  40784. typedef enum {
  40785. WMI_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_REQ = 0x00000001,
  40786. WMI_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_RSP = 0x00000002,
  40787. WMI_WFA_CONFIG_OCV_FRMTYPE_FT_REASSOC_REQ = 0x00000004,
  40788. WMI_WFA_CONFIG_OCV_FRMTYPE_FILS_REASSOC_REQ = 0x00000008,
  40789. } WMI_WFA_CONFIG_OCV_FRMTYPE;
  40790. typedef struct {
  40791. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_ocv */
  40792. A_UINT32 tlv_header;
  40793. /* frame_types
  40794. * Override OCI channel number in specified frames.
  40795. * Possible frame types from host are enum WMI_WFA_CONFIG_OCV_FRMTYPE.
  40796. */
  40797. A_UINT32 frame_types;
  40798. /* Frequency value in mhz to override in specified frame type */
  40799. A_UINT32 chan_freq;
  40800. } wmi_wfa_config_ocv;
  40801. typedef struct {
  40802. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_saquery */
  40803. A_UINT32 tlv_header;
  40804. /* remain_connect_on_saquery_timeout
  40805. * Don't send deauth on SA Query response timeout.
  40806. * Possible values from host are:
  40807. * 0 default behavior
  40808. * 1 don't send deauth on SA Query response timeout
  40809. */
  40810. A_UINT32 remain_connect_on_saquery_timeout;
  40811. } wmi_wfa_config_saquery;
  40812. typedef struct {
  40813. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_ofdma */
  40814. A_UINT32 tlv_header;
  40815. /* force_he_trigger_to_eht_sta
  40816. * Possible values from host are:
  40817. * 0 default behavior
  40818. * 1 instead of sending EHT triggers to EHT stations, send HE triggers
  40819. */
  40820. A_UINT32 force_he_trigger_to_eht_sta;
  40821. } wmi_wfa_config_ofdma;
  40822. typedef struct {
  40823. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_cmd_fixed_param */
  40824. A_UINT32 tlv_header;
  40825. /** VDEV identifier */
  40826. A_UINT32 vdev_id;
  40827. /* The below TLV arrays follow this structure:
  40828. * wmi_wfa_config_rsnxe wfa_config_rsnxe[]; (0 or 1 elements)
  40829. * wmi_wfa_config_csa wfa_config_csa[]; (0 or 1 elements)
  40830. * wmi_wfa_config_ocv wfa_config_ocv[]; (0 or 1 elements)
  40831. * wmi_wfa_config_saquery wfa_config_saquery[]; (0 or 1 elements)
  40832. * wmi_wfa_config_ofdma wfa_config_ofdma[]; (0 or 1 elements)
  40833. */
  40834. } wmi_wfa_config_cmd_fixed_param;
  40835. #define WMI_TWT_SESSION_FLAG_FLOW_ID_GET(_var) WMI_GET_BITS(_var, 0, 16)
  40836. #define WMI_TWT_SESSION_FLAG_FLOW_ID_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  40837. #define WMI_TWT_SESSION_FLAG_BCAST_TWT_GET(_var) WMI_GET_BITS(_var, 16, 1)
  40838. #define WMI_TWT_SESSION_FLAG_BCAST_TWT_SET(_var, _val) WMI_SET_BITS(_var, 16, 1, _val)
  40839. #define WMI_TWT_SESSION_FLAG_TRIGGER_TWT_GET(_var) WMI_GET_BITS(_var, 17, 1)
  40840. #define WMI_TWT_SESSION_FLAG_TRIGGER_TWT_SET(_var, _val) WMI_SET_BITS(_var, 17, 1, _val)
  40841. #define WMI_TWT_SESSION_FLAG_ANNOUN_TWT_GET(_var) WMI_GET_BITS(_var, 18, 1)
  40842. #define WMI_TWT_SESSION_FLAG_ANNOUN_TWT_SET(_var, _val) WMI_SET_BITS(_var, 18, 1, _val)
  40843. #define WMI_TWT_SESSION_FLAG_TWT_PROTECTION_GET(_var) WMI_GET_BITS(_var, 19, 1)
  40844. #define WMI_TWT_SESSION_FLAG_TWT_PROTECTION_SET(_var, _val) WMI_SET_BITS(_var, 19, 1, _val)
  40845. #define WMI_TWT_SESSION_FLAG_TWT_INFO_FRAME_DISABLED_GET(_var) WMI_GET_BITS(_var, 20, 1)
  40846. #define WMI_TWT_SESSION_FLAG_TWT_INFO_FRAME_DISABLED_SET(_var, _val) WMI_SET_BITS(_var, 20, 1, _val)
  40847. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_VALID_GET(_var) WMI_GET_BITS(_var, 21, 1)
  40848. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_VALID_SET(_var, _val) WMI_SET_BITS(_var, 21, 1, _val)
  40849. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_GET(_var) WMI_GET_BITS(_var, 22, 1)
  40850. #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_SET(_var, _val) WMI_SET_BITS(_var, 22, 1, _val)
  40851. #define WMI_TWT_SESSION_FLAG_RESTRICTED_TWT_GET(_var) WMI_GET_BITS(_var, 23, 1)
  40852. #define WMI_TWT_SESSION_FLAG_RESTRICTED_TWT_SET(_var, _val) WMI_SET_BITS(_var, 23, 1, _val)
  40853. typedef struct {
  40854. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_session_stats_info */
  40855. A_UINT32 tlv_hdr;
  40856. A_UINT32 vdev_id;
  40857. wmi_mac_addr peer_mac;
  40858. A_UINT32 event_type; /* event type - defined in enum wmi_twt_session_stats_type */
  40859. /*
  40860. * Flags to provide information on TWT session and session types.
  40861. * This field is filled with the bitwise combination of the flag values
  40862. * defined by WMI_TWT_SESSION_FLAG_xxx
  40863. */
  40864. A_UINT32 flow_id_flags;
  40865. A_UINT32 dialog_id;
  40866. A_UINT32 wake_dura_us;
  40867. A_UINT32 wake_intvl_us;
  40868. /* this long time after TWT resumed the 1st Service Period will start */
  40869. A_UINT32 sp_offset_us;
  40870. /* service period start TSF */
  40871. A_UINT32 sp_tsf_us_lo; /* bits 31:0 */
  40872. A_UINT32 sp_tsf_us_hi; /* bits 63:32 */
  40873. /* Current TSF */
  40874. A_UINT32 curr_tsf_us_lo; /* bits 31:0 */
  40875. A_UINT32 curr_tsf_us_hi; /* bits 63:32 */
  40876. } wmi_twt_session_stats_info;
  40877. enum wmi_twt_session_stats_type {
  40878. WMI_TWT_SESSION_SETUP = 1,
  40879. WMI_TWT_SESSION_TEARDOWN = 2,
  40880. WMI_TWT_SESSION_UPDATE = 3,
  40881. WMI_TWT_SESSION_QUERY_RSP = 4,
  40882. };
  40883. typedef struct {
  40884. /** TLV tag and len; tag equals
  40885. * WMITLV_TAG_STRUC_wmi_pdev_twt_session_stats_event_fixed_param */
  40886. A_UINT32 tlv_header;
  40887. A_UINT32 pdev_id; /* ID of the pdev this response belongs to */
  40888. /* The TLVs follows this structure:
  40889. * wmi_twt_session_stats_info twt_sessions[]; <--- Array of twt_session.
  40890. */
  40891. } wmi_pdev_twt_session_stats_event_fixed_param;
  40892. typedef struct wmi_pdev_vendor_event
  40893. {
  40894. /* type is WMITLV_TAG_STRUC_wmi_vendor_pdev_event_fixed_param */
  40895. A_UINT32 tlv_header;
  40896. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  40897. A_UINT32 pdev_id;
  40898. /* Any vendor specialization cases will need to add sub_type enum defs. */
  40899. A_UINT32 sub_type;
  40900. wmi_pdev_vendor_event_val evt;
  40901. /* NOTE:
  40902. * Future changes may increase the size of pdev_vendor_event.
  40903. * Consequently, no fields can be added here after pdev_vendor_event,
  40904. * because their offsets within wmi_pdev_vendor_event_fixed_param
  40905. * would change, causing backwards incompatibilities.
  40906. */
  40907. /*
  40908. * This fixed_param TLV may be followed by the below TLVs:
  40909. * - A_UINT32 opaque_vendor_var_len_data[]:
  40910. * Variable-length array of opaque data.
  40911. * The _fixed_param.sub_type value clarifies how to interpret the
  40912. * contents of this opaque data.
  40913. */
  40914. } wmi_pdev_vendor_event_fixed_param;
  40915. typedef wmi_pdev_vendor_event_fixed_param wmi_vendor_pdev_event_fixed_param;
  40916. typedef struct wmi_vdev_vendor_event
  40917. {
  40918. /* type is WMITLV_TAG_STRUC_wmi_vendor_vdev_event_fixed_param */
  40919. A_UINT32 tlv_header;
  40920. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  40921. A_UINT32 pdev_id;
  40922. /* unique id identifying the VDEV, generated by the caller */
  40923. A_UINT32 vdev_id;
  40924. /* Any vendor specialization cases will need to add sub_type enum defs. */
  40925. A_UINT32 sub_type;
  40926. wmi_vdev_vendor_event_val evt;
  40927. /* NOTE:
  40928. * Future changes may increase the size of vdev_vendor_event.
  40929. * Consequently, no fields can be added here after vdev_vendor_event,
  40930. * because their offsets within wmi_vdev_vendor_event_fixed_param
  40931. * would change, causing backwards incompatibilities.
  40932. */
  40933. /*
  40934. * This fixed_param TLV may be followed by the below TLVs:
  40935. * - A_UINT32 opaque_vendor_var_len_data[]:
  40936. * Variable-length array of opaque data.
  40937. * The _fixed_param.sub_type value clarifies how to interpret the
  40938. * contents of this opaque data.
  40939. */
  40940. } wmi_vdev_vendor_event_fixed_param;
  40941. typedef wmi_vdev_vendor_event_fixed_param wmi_vendor_vdev_event_fixed_param;
  40942. typedef struct wmi_peer_vendor_event
  40943. {
  40944. /* type is WMITLV_TAG_STRUC_wmi_vendor_peer_event_fixed_param */
  40945. A_UINT32 tlv_header;
  40946. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  40947. A_UINT32 pdev_id;
  40948. /* unique id identifying the VDEV, generated by the caller */
  40949. A_UINT32 vdev_id;
  40950. /* peer MAC address */
  40951. wmi_mac_addr peer_macaddr;
  40952. /* Any vendor specialization cases will need to add sub_type enum defs. */
  40953. A_UINT32 sub_type;
  40954. wmi_peer_vendor_event_val evt;
  40955. /* NOTE:
  40956. * Future changes may increase the size of peer_vendor_event.
  40957. * Consequently, no fields can be added here after peer_vendor_event,
  40958. * because their offsets within wmi_peer_vendor_event_fixed_param
  40959. * would change, causing backwards incompatibilities.
  40960. */
  40961. /*
  40962. * This fixed_param TLV may be followed by the below TLVs:
  40963. * - A_UINT32 opaque_vendor_var_len_data[]:
  40964. * Variable-length array of opaque data.
  40965. * The _fixed_param.sub_type value clarifies how to interpret the
  40966. * contents of this opaque data.
  40967. */
  40968. } wmi_peer_vendor_event_fixed_param;
  40969. typedef wmi_peer_vendor_event_fixed_param wmi_vendor_peer_event_fixed_param;
  40970. typedef struct wmi_pdev_vendor_cmd
  40971. {
  40972. /* type is WMITLV_TAG_STRUC_wmi_vendor_pdev_cmd_fixed_param */
  40973. A_UINT32 tlv_header;
  40974. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  40975. A_UINT32 pdev_id;
  40976. /* Any vendor specialization cases will need to add sub_type enum defs. */
  40977. A_UINT32 sub_type;
  40978. wmi_pdev_vendor_cmd_val cmd;
  40979. /* NOTE:
  40980. * Future changes may increase the size of pdev_vendor_cmd.
  40981. * Consequently, no fields can be added here after pdev_vendor_cmd,
  40982. * because their offsets within wmi_pdev_vendor_cmd_fixed_param
  40983. * would change, causing backwards incompatibilities.
  40984. */
  40985. /*
  40986. * This fixed_param TLV may be followed by the below TLVs:
  40987. * - A_UINT32 opaque_vendor_var_len_data[]:
  40988. * Variable-length array of opaque data.
  40989. * The _fixed_param.sub_type value clarifies how to interpret the
  40990. * contents of this opaque data.
  40991. */
  40992. } wmi_pdev_vendor_cmd_fixed_param;
  40993. typedef wmi_pdev_vendor_cmd_fixed_param wmi_vendor_pdev_cmd_fixed_param;
  40994. typedef struct wmi_vdev_vendor_cmd
  40995. {
  40996. /* type is WMITLV_TAG_STRUC_wmi_vendor_vdev_cmd_fixed_param */
  40997. A_UINT32 tlv_header;
  40998. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  40999. A_UINT32 pdev_id;
  41000. /* unique id identifying the VDEV, generated by the caller */
  41001. A_UINT32 vdev_id;
  41002. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41003. A_UINT32 sub_type;
  41004. wmi_vdev_vendor_cmd_val cmd;
  41005. /* NOTE:
  41006. * Future changes may increase the size of vdev_vendor_cmd.
  41007. * Consequently, no fields can be added here after vdev_vendor_cmd,
  41008. * because their offsets within wmi_vdev_vendor_cmd_fixed_param
  41009. * would change, causing backwards incompatibilities.
  41010. */
  41011. /*
  41012. * This fixed_param TLV may be followed by the below TLVs:
  41013. * - A_UINT32 opaque_vendor_var_len_data[]:
  41014. * Variable-length array of opaque data.
  41015. * The _fixed_param.sub_type value clarifies how to interpret the
  41016. * contents of this opaque data.
  41017. */
  41018. } wmi_vdev_vendor_cmd_fixed_param;
  41019. typedef wmi_vdev_vendor_cmd_fixed_param wmi_vendor_vdev_cmd_fixed_param;
  41020. typedef struct wmi_peer_vendor_cmd
  41021. {
  41022. /* type is WMITLV_TAG_STRUC_wmi_vendor_peer_cmd_fixed_param */
  41023. A_UINT32 tlv_header;
  41024. /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. */
  41025. A_UINT32 pdev_id;
  41026. /* unique id identifying the VDEV, generated by the caller */
  41027. A_UINT32 vdev_id;
  41028. /* peer MAC address */
  41029. wmi_mac_addr peer_macaddr;
  41030. /* Any vendor specialization cases will need to add sub_type enum defs. */
  41031. A_UINT32 sub_type;
  41032. wmi_peer_vendor_cmd_val cmd;
  41033. /* NOTE:
  41034. * Future changes may increase the size of peer_vendor_cmd.
  41035. * Consequently, no fields can be added here after peer_vendor_cmd,
  41036. * because their offsets within wmi_peer_vendor_cmd_fixed_param
  41037. * would change, causing backwards incompatibilities.
  41038. */
  41039. /*
  41040. * This fixed_param TLV may be followed by the below TLVs:
  41041. * - A_UINT32 opaque_vendor_var_len_data[]:
  41042. * Variable-length array of opaque data.
  41043. * The _fixed_param.sub_type value clarifies how to interpret the
  41044. * contents of this opaque data.
  41045. */
  41046. } wmi_peer_vendor_cmd_fixed_param;
  41047. typedef wmi_peer_vendor_cmd_fixed_param wmi_vendor_peer_cmd_fixed_param;
  41048. typedef enum {
  41049. WMI_MLO_LINK_FORCE_ACTIVE = 1, /* Force specific links active */
  41050. WMI_MLO_LINK_FORCE_INACTIVE = 2, /* Force specific links inactive */
  41051. WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM = 3, /* Force active a number of links, firmware to decide which links to inactive */
  41052. WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM = 4, /* Force inactive a number of links, firmware to decide which links to inactive */
  41053. WMI_MLO_LINK_NO_FORCE = 5, /* Cancel the force operation of specific links, allow firmware to decide */
  41054. WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE = 6, /* combination of force specific links active & force specific links inactive */
  41055. WMI_MLO_LINK_NON_FORCE_UPDATE = 7, /* Used when host wants to update other fields like disallow_mlo_mode_bmap */
  41056. } WMI_MLO_LINK_FORCE_MODE;
  41057. typedef enum {
  41058. WMI_MLO_LINK_FORCE_REASON_NEW_CONNECT = 1, /* Set force specific links because of new connection */
  41059. WMI_MLO_LINK_FORCE_REASON_NEW_DISCONNECT = 2, /* Set force specific links because of new dis-connection */
  41060. WMI_MLO_LINK_FORCE_REASON_LINK_REMOVAL = 3, /* Set force specific links because of AP-side link removal */
  41061. WMI_MLO_LINK_FORCE_REASON_TDLS = 4, /* Set force specific links because of 11BE MLO TDLS setup/teardown */
  41062. WMI_MLO_LINK_FORCE_REASON_REVERT_FAILURE = 5, /* Set force specific links for revert previous failed due to host reject */
  41063. } WMI_MLO_LINK_FORCE_REASON;
  41064. #define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_ACTIVE(mlo_flags) \
  41065. WMI_GET_BITS(control_flags, 0, 1)
  41066. #define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_ACTIVE(mlo_flags, value) \
  41067. WMI_SET_BITS(control_flags, 0, 1, value)
  41068. #define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_INACTIVE(mlo_flags) \
  41069. WMI_GET_BITS(control_flags, 1, 1)
  41070. #define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_INACTIVE(mlo_flags, value) \
  41071. WMI_SET_BITS(control_flags, 1, 1, value)
  41072. #define WMI_MLO_CONTROL_FLAGS_GET_DYNAMIC_FORCE_LINK_NUM(mlo_flags) \
  41073. WMI_GET_BITS(control_flags, 2, 1)
  41074. #define WMI_MLO_CONTROL_FLAGS_SET_DYNAMIC_FORCE_LINK_NUM(mlo_flags, value) \
  41075. WMI_SET_BITS(control_flags, 2, 1, value)
  41076. /*
  41077. * This structure is used for passing wmi_mlo_control_flags.
  41078. *
  41079. * - When force_mode is WMI_MLO_LINK_FORCE_ACTIVE or
  41080. * WMI_MLO_LINK_FORCE_INACTIVE host can pass below control flags,
  41081. * to indicate if FW need to clear earlier force bitmap config.
  41082. *
  41083. * - When force mode is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  41084. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM, host can pass below control flags,
  41085. * to indicate if FW need to use force link number instead of force link
  41086. * bitmap.
  41087. */
  41088. typedef struct {
  41089. union {
  41090. struct {
  41091. A_UINT32 overwrite_force_active_bitmap:1, /* indicate overwrite all earlier force_active bitmaps */
  41092. overwrite_force_inactive_bitmap:1, /* indicate overwrite all earlier force_inactive bitmaps */
  41093. dynamic_force_link_num:1, /* indicate fw to use force link number instead of force link bitmap */
  41094. unused: 29;
  41095. };
  41096. A_UINT32 control_flags;
  41097. };
  41098. } wmi_mlo_control_flags;
  41099. typedef struct wmi_mlo_link_set_active_cmd
  41100. {
  41101. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_set_active_cmd_fixed_param; */
  41102. A_UINT32 tlv_header;
  41103. /** enum WMI_MLO_LINK_FORCE_MODE */
  41104. A_UINT32 force_mode;
  41105. /** reason of force link active / inactive, enum WMI_MLO_LINK_FORCE_REASON */
  41106. A_UINT32 reason;
  41107. /* indicate use vdev_id bitmap or link_id_bitmap */
  41108. A_UINT32 use_ieee_link_id_bitmap;
  41109. wmi_mac_addr ap_mld_mac_addr;
  41110. wmi_mlo_control_flags ctrl_flags;
  41111. /* The TLVs follows this structure:
  41112. * wmi_mlo_set_active_link_number_param link_number_param[];
  41113. * Link number parameters, optional TLV.
  41114. * Present when force type is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  41115. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM.
  41116. * In other cases the length of array should be 0.
  41117. *---
  41118. * If use_ieee_link_id_bitmap equals 0 vdev_id_bitmap[] & vdev_id_bitmap2[]
  41119. * are valid.
  41120. * A_UINT32 vdev_id_bitmap[];
  41121. * Optional TLV, present when force type is WMI_MLO_LINK_FORCE_ACTIVE
  41122. * or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE,
  41123. * to specific the vdevs to configure.
  41124. * For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE vdev_id_bitmap[]
  41125. * carry the active vdev bitmap.
  41126. * In other cases the length of the array should be 0.
  41127. * A_UINT32 vdev_id_bitmap2[];
  41128. * For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE vdev_id_bitmap2[]
  41129. * carry the inactive vdev bitmap.
  41130. * In other cases the length of the array should be 0.
  41131. *---
  41132. * If use_ieee_link_id_bitmap equals 1 ieee_link_id_bitmap[] &
  41133. * ieee_link_id_bitmap2[] are valid.
  41134. * A_UINT32 ieee_link_id_bitmap[];
  41135. * present for WMI_MLO_LINK_FORCE_ACTIVE
  41136. * or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE
  41137. * or WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  41138. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM
  41139. * A_UINT32 ieee_link_id_bitmap2[];
  41140. * For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE ieee_link_id_bitmap2[]
  41141. * carry the inactive linkid bitmap.
  41142. * In other cases the length of the array should be 0.
  41143. *---
  41144. * wmi_disallowed_mlo_mode_bitmap_param_t disallow_mlo_mode_bmap[];
  41145. */
  41146. } wmi_mlo_link_set_active_cmd_fixed_param;
  41147. typedef struct wmi_mlo_set_active_link_number_param
  41148. {
  41149. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_set_active_link_number_param */
  41150. A_UINT32 tlv_header;
  41151. /** number of link to be config */
  41152. A_UINT32 num_of_link;
  41153. /** VDEV type, see values for vdev_type (WMI_VDEV_TYPE_AP,WMI_VDEV_TYPE_STA,
  41154. * WMI_VDEV_TYPE_IBSS, WMI_VDEV_TYPE_MONITOR,WMI_VDEV_TYPE_NAN,WMI_VDEV_TYPE_NDI ...)
  41155. */
  41156. A_UINT32 vdev_type;
  41157. /** VDEV subtype, see values for vdev_subtype (WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE,
  41158. * WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT, WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO ...)*/
  41159. A_UINT32 vdev_subtype;
  41160. /** home channel frequency in MHz of the vdev*/
  41161. A_UINT32 home_freq;
  41162. } wmi_mlo_set_active_link_number_param;
  41163. #define WMI_MLO_MODE_MLMR 0x1
  41164. #define WMI_MLO_MODE_EMLSR 0x2
  41165. #define WMI_MLO_IEEE_LINK_ID_INVALID 0xFF
  41166. #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID1(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 0, 8)
  41167. #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)
  41168. #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID2(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 8, 8)
  41169. #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)
  41170. #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID3(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 16, 8)
  41171. #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)
  41172. #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID4(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 24, 8)
  41173. #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)
  41174. typedef struct wmi_disallowed_mlo_mode_bitmap_param
  41175. {
  41176. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_disallowed_mlo_mode_bitmap_param */
  41177. A_UINT32 tlv_header;
  41178. /** disallowed_mode_bitmap:
  41179. * Bitmap of MLO Modes like MLMR, eMLSR which are not allowed.
  41180. * Refer to WMI_MLO_MODE_*
  41181. * disallowed_mode_bitmap Meaning
  41182. * ====================== =================
  41183. * 0x0 No restriction
  41184. * 0x1 MLMR is not allowed
  41185. * 0x2 EMLSR is not allowed
  41186. * 0x3 MLMR and EMLSR are not allowed
  41187. */
  41188. A_UINT32 disallowed_mode_bitmap;
  41189. /** ieee_link_id_comb:
  41190. * Give combination of IEEE link IDs for which above disallowed_mode_bitmap
  41191. * is applicable.
  41192. * Each 8-bits in ieee_link_id_comb represents one link ID.
  41193. * A link ID is an integer value between 0 and 14.
  41194. * Please set WMI_MLO_IEEE_LINK_ID_INVALID (0xff) if 8-bits is not used.
  41195. * Use WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID* and _SET_LINK_ID* to get/set
  41196. * link IDs in this field.
  41197. */
  41198. A_UINT32 ieee_link_id_comb;
  41199. /** Example:
  41200. * Say there are 3 MLO links with ieee link IDs as 1,2 and 10.
  41201. * Say host wants to disallow MLMR between links with IDs 1 and 2,
  41202. * disallow eMLSR between links with IDs 1 and 10,
  41203. * disallow MLMR and eMLSR for links with IDs 2 and 10.
  41204. * There will be 3 TLVs of type wmi_disallowed_mlo_mode_bitmap_param
  41205. * like below.
  41206. *
  41207. * wmi_disallowed_mlo_mode_bitmap_param[0]:
  41208. * disallowed_mode_bitmap = 0x1,
  41209. * ieee_link_id_comb = 0xFFFF0201
  41210. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x01)
  41211. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x02)
  41212. *
  41213. * wmi_disallowed_mlo_mode_bitmap_param[1]
  41214. * disallowed_mode_bitmap = 0x2,
  41215. * ieee_link_id_comb = 0xFFFF0A01
  41216. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x01)
  41217. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x0a)
  41218. *
  41219. * wmi_disallowed_mlo_mode_bitmap_param[2]
  41220. * disallowed_mode_bitmap = 0x3,
  41221. * ieee_link_id_comb = 0xFFFF0A02
  41222. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x02)
  41223. * WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x0a)
  41224. */
  41225. } wmi_disallowed_mlo_mode_bitmap_param;
  41226. typedef enum {
  41227. WMI_MLO_LINK_SET_ACTIVE_STATUS_SUCCESS = 0,
  41228. WMI_MLO_LINK_SET_ACTIVE_STATUS_HOST_REJECT = 1,
  41229. } WMI_MLO_LINK_SET_ACTIVE_STATUS;
  41230. typedef struct wmi_mlo_link_set_active_resp_event
  41231. {
  41232. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_set_active_resp_event_fixed_param; */
  41233. A_UINT32 tlv_header;
  41234. /** Return status. 0 for success, non-zero otherwise */
  41235. A_UINT32 status;
  41236. /* indicate use vdev_id bitmap or link_id_bitmap */
  41237. A_UINT32 use_ieee_link_id_bitmap;
  41238. wmi_mac_addr ap_mld_mac_addr;
  41239. /* The TLVs follows this structure:
  41240. *---
  41241. * If use_ieee_link_id_bitmap equals 0, vdev_bitmap[] are valid.
  41242. * A_UINT32 force_active_vdev_bitmap[]; <-- current force active vdev.
  41243. * A_UINT32 force_inactive_vdev_bitmap[]; <-- current force inactive vdevs
  41244. *---
  41245. * If use_ieee_link_id_bitmap equals 1, ieee_link_id_bitmap[] are valid.
  41246. * A_UINT32 force_active_ieee_link_id_bitmap[];
  41247. * A_UINT32 force_inactive_ieee_link_id_bitmap[];
  41248. *---
  41249. * current active ieee link id bitmap & inactive ieee link id bitmap
  41250. * A_UINT32 current_active_ieee_link_id_bitmap[];
  41251. * A_UINT32 current_inactive_ieee_link_id_bitmap[];
  41252. */
  41253. } wmi_mlo_link_set_active_resp_event_fixed_param;
  41254. typedef struct {
  41255. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_setup_cmd_fixed_param; */
  41256. A_UINT32 tlv_header;
  41257. /** Unique ID representing the hw_links part of the MLD */
  41258. A_UINT32 mld_group_id;
  41259. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41260. A_UINT32 pdev_id;
  41261. /*
  41262. * Followed by TLVs:
  41263. * A_UINT32 hw_link_ids[];
  41264. */
  41265. } wmi_mlo_setup_cmd_fixed_param;
  41266. typedef struct {
  41267. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_setup_complete_event_fixed_param; */
  41268. A_UINT32 tlv_header;
  41269. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41270. A_UINT32 pdev_id;
  41271. /** Return status. 0 for success, non-zero otherwise */
  41272. A_UINT32 status;
  41273. /** max_ml_peer_ids:
  41274. * Max number of ml_peerids across the SOC, Derived as
  41275. * max_mlo_peer * num chips.
  41276. * (Max_mlo_peer and num_chips are provided by Host Platform
  41277. * in QMI exchange).
  41278. */
  41279. A_UINT32 max_ml_peer_ids;
  41280. } wmi_mlo_setup_complete_event_fixed_param;
  41281. typedef struct {
  41282. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ready_cmd_fixed_param; */
  41283. A_UINT32 tlv_header;
  41284. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41285. A_UINT32 pdev_id;
  41286. } wmi_mlo_ready_cmd_fixed_param;
  41287. typedef enum wmi_mlo_tear_down_reason_code_type {
  41288. WMI_MLO_TEARDOWN_REASON_SSR,
  41289. /* keep old name as alias for new name */
  41290. WMI_MLO_TEARDOWN_SSR_REASON = WMI_MLO_TEARDOWN_REASON_SSR,
  41291. WMI_MLO_TEARDOWN_REASON_HOST_INITIATED,
  41292. /* keep old name as alias for new name */
  41293. WMI_MLO_TEARDOWN_HOST_INITIATED_REASON =
  41294. WMI_MLO_TEARDOWN_REASON_HOST_INITIATED,
  41295. WMI_MLO_TEARDOWN_REASON_STANDBY_DOWN,
  41296. WMI_MLO_TEARDOWN_REASON_DYNAMIC_WSI_REMAP,
  41297. } WMI_MLO_TEARDOWN_REASON_TYPE;
  41298. typedef struct {
  41299. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_teardown_fixed_param; */
  41300. A_UINT32 tlv_header;
  41301. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41302. A_UINT32 pdev_id;
  41303. /** reason_code: of type WMI_TEARDOWN_REASON_TYPE */
  41304. A_UINT32 reason_code;
  41305. /* trigger_umac_reset : of type A_BOOL to indicate the umac reset for the partner chip. */
  41306. A_UINT32 trigger_umac_reset;
  41307. /* erp_standby_mode : of type A_BOOL to indicate the chip is going to be active in ERP */
  41308. A_UINT32 erp_standby_mode;
  41309. } wmi_mlo_teardown_fixed_param;
  41310. typedef struct {
  41311. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_teardown_complete_fixed_param; */
  41312. A_UINT32 tlv_header;
  41313. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41314. A_UINT32 pdev_id;
  41315. /** Return status. 0 for success, non-zero otherwise */
  41316. A_UINT32 status;
  41317. } wmi_mlo_teardown_complete_fixed_param;
  41318. typedef struct {
  41319. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_peer_recommended_links; */
  41320. A_UINT32 tlv_header;
  41321. /** AID (association id) of this station */
  41322. A_UINT32 assoc_id;
  41323. /** Request link id set to disable */
  41324. A_UINT32 linkid_bitmap;
  41325. } wmi_mlo_peer_recommended_links;
  41326. typedef struct {
  41327. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_recommendation_fixed_param */
  41328. A_UINT32 tlv_header;
  41329. /* unique id identifying the VDEV, generated by the caller */
  41330. A_UINT32 vdev_id;
  41331. /* DTIM specified in units of num beacon intervals */
  41332. A_UINT32 dtim_period;
  41333. /* The TLVs follows this structure:
  41334. * wmi_mlo_peer_recommended_links recommended_links[];
  41335. */
  41336. } wmi_mlo_link_recommendation_fixed_param;
  41337. #define WMI_TID_TO_LINK_MAP_TID_NUM_GET(_var) WMI_GET_BITS(_var, 0, 5)
  41338. #define WMI_TID_TO_LINK_MAP_TID_NUM_SET(_var, _val) WMI_SET_BITS(_var, 0, 5, _val)
  41339. #define WMI_TID_TO_LINK_MAP_DIR_GET(_var) WMI_GET_BITS(_var, 5, 2)
  41340. #define WMI_TID_TO_LINK_MAP_DIR_SET(_var, _val) WMI_SET_BITS(_var, 5, 2, _val)
  41341. #define WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET(_var) WMI_GET_BITS(_var, 7, 1)
  41342. #define WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET(_var, _val) WMI_SET_BITS(_var, 7, 1, _val)
  41343. #define WMI_TID_TO_LINK_MAP_LINK_MASK_GET(_var) WMI_GET_BITS(_var, 8, 16)
  41344. #define WMI_TID_TO_LINK_MAP_LINK_MASK_SET(_var, _val) WMI_SET_BITS(_var, 8, 16, _val)
  41345. enum {
  41346. WMI_TID_TO_LINK_MAP_DIR_DL,
  41347. WMI_TID_TO_LINK_MAP_DIR_UL,
  41348. WMI_TID_TO_LINK_MAP_DIR_BIDI,
  41349. };
  41350. typedef struct {
  41351. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tid_to_link_map */
  41352. A_UINT32 tlv_header;
  41353. /**
  41354. * A_UINT32
  41355. * WMI_TID_TO_LINK_MAP_TID_NUM_GET / WMI_TID_TO_LINK_MAP_TID_NUM_SET
  41356. * tid_num:5,
  41357. *
  41358. * WMI_TID_TO_LINK_MAP_DIR_GET / WMI_TID_TO_LINK_MAP_DIR_SET
  41359. * dir:2, // 0 - DL, 1 - UL, 2 - BiDi
  41360. *
  41361. * WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET /
  41362. * WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET
  41363. * default_link_mapping:1, // If this is set to 1, ignore
  41364. * // link_mapping_mask for the specific tid
  41365. *
  41366. * WMI_TID_TO_LINK_MAP_LINK_MASK_GET / WMI_TID_TO_LINK_MAP_LINK_MASK_SET
  41367. * link_mapping_mask:16,
  41368. *
  41369. * rsvd:8;
  41370. */
  41371. A_UINT32 tid_to_link_map_info;
  41372. } wmi_tid_to_link_map;
  41373. #define WMI_MAX_NUM_PREFERRED_LINKS 4
  41374. /* NOTE:
  41375. * wmi_peer_preferred_link_map will be deprecated and replaced
  41376. * by wmi_mlo_peer_link_control_param.
  41377. */
  41378. typedef struct {
  41379. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_preferred_link_map */
  41380. A_UINT32 tlv_header;
  41381. /* num_preferred_links:
  41382. * If it is 0, all links are equally preferred and which link to be used
  41383. * in each schedule is decided by FW.
  41384. */
  41385. A_UINT32 num_preferred_links;
  41386. /* [0] - highest preferred link, [1] - 2nd preferred link, etc. */
  41387. A_UINT32 preferred_link_order[WMI_MAX_NUM_PREFERRED_LINKS];
  41388. /* expected_max_latency_ms:
  41389. * 0 - Expected Max Latency to be estimated in Firmware
  41390. * Non 0 - Firmware should try to achieve given max latency
  41391. * in first preferred link.
  41392. * If unable to meet in first preferred link, start scheduling
  41393. * in next preferred link and so on.
  41394. */
  41395. A_UINT32 expected_max_latency_ms[WLAN_MAX_AC];
  41396. } wmi_peer_preferred_link_map;
  41397. #define WMI_MLO_PEER_LINK_CONTROL_PARAM_SET_TX_LINK_TUPLE_CONFIG(comp, value) \
  41398. WMI_SET_BITS(comp, 0, 1, value)
  41399. #define WMI_MLO_PEER_LINK_CONTROL_PARAM_GET_TX_LINK_TUPLE_CONFIG(comp) \
  41400. WMI_GET_BITS(comp, 0, 1)
  41401. #define WMI_MLO_PEER_LINK_CONTROL_PARAM_SET_PREFERRED_LINK_CONFIG(comp, value) \
  41402. WMI_SET_BITS(comp, 1, 1, value)
  41403. #define WMI_MLO_PEER_LINK_CONTROL_PARAM_GET_PREFERRED_LINK_CONFIG(comp) \
  41404. WMI_GET_BITS(comp, 1, 1)
  41405. #define WMI_MAX_NUM_MLO_LINKS 5
  41406. typedef struct {
  41407. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_preferred_link_map */
  41408. A_UINT32 tlv_header;
  41409. /** flags:
  41410. * Bit0 : tx_link_tuple enable/disable.
  41411. * When enabled, f/w picks the links in tx_link_tuple_bitmap
  41412. * for TX scheduling.
  41413. * Bit1 : preferred_link enable/disable.
  41414. * When enabled, f/w schedules the data on preferred link first.
  41415. * If it fails to deliver within a timeout, it additionally
  41416. * starts attempting TX on non-preferred links.
  41417. * Bit2-31 : reserved
  41418. */
  41419. A_UINT32 flags;
  41420. /* num_links: number of links present in link_priority_order array below.
  41421. * 0 - we dont have sorted list of link priority
  41422. * non zero - this should be the max number of links that the peer supports.
  41423. */
  41424. A_UINT32 num_links;
  41425. /* link_priority_order:
  41426. * [0] - ID of highest priority link,
  41427. * [1] - ID of 2nd highest priority link, etc.
  41428. */
  41429. A_UINT32 link_priority_order[WMI_MAX_NUM_MLO_LINKS];
  41430. /* tx_link_tuple_bitmap:
  41431. * bitmap of indices within link_priority_order array that needs to be
  41432. * selected in the TX link tuple.
  41433. * FW will not attempt scheduling on a link if it is not part of the
  41434. * tx_link_tuple.
  41435. */
  41436. A_UINT32 tx_link_tuple_bitmap;
  41437. /* max_timeout_ms: applicable only when preferred_link is enabled
  41438. * 0 - max_timeout_ms to be estimated in Firmware
  41439. * Non 0 - value beyond which, firmware should additionally start
  41440. * scheduling on non preferred links
  41441. */
  41442. A_UINT32 max_timeout_ms[WLAN_MAX_AC];
  41443. } wmi_mlo_peer_link_control_param;
  41444. typedef struct {
  41445. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_to_link_map_fixed_param */
  41446. A_UINT32 tlv_header;
  41447. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41448. A_UINT32 pdev_id;
  41449. /** MLO Peer's current link MAC address */
  41450. wmi_mac_addr link_macaddr;
  41451. /** mapping_switch_time from the T2LM IE */
  41452. A_UINT32 mapping_switch_time;
  41453. /** expected_duration from the T2LM IE, in units of TUs */
  41454. A_UINT32 expected_duration;
  41455. /**
  41456. * Following this structure is the TLV:
  41457. * - struct wmi_tid_to_link_map tid_to_link_map[];
  41458. * - struct wmi_peer_preferred_link_map peer_preferred_link_map[];
  41459. * Note - TLV array of peer_preferred_link_map has either 0 or 1
  41460. * entries, not multiple entries.
  41461. * - struct wmi_mlo_peer_link_control_param[];
  41462. * Note: can have 0 or 1 entry.
  41463. */
  41464. } wmi_peer_tid_to_link_map_fixed_param;
  41465. typedef struct{
  41466. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ap_vdev_tid_to_link_map_cmd_fixed_param */
  41467. A_UINT32 tlv_header;
  41468. /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  41469. A_UINT32 pdev_id;
  41470. /** vdev_id for identifying the MLO Vap */
  41471. A_UINT32 vdev_id;
  41472. /** DEPRECATED: disabled link bits */
  41473. A_UINT32 disabled_link_bitmap; /* DEPRECATED */
  41474. /**
  41475. * Following this structure is the TLV:
  41476. * struct wmi_mlo_ap_vdev_tid_to_link_map_ie_info[];
  41477. */
  41478. } wmi_mlo_ap_vdev_tid_to_link_map_cmd_fixed_param;
  41479. typedef enum {
  41480. /* Mapping Switch TSF */
  41481. WMI_MAP_SWITCH_TIMER_TSF,
  41482. /* Mapping Switch Timer Expired */
  41483. WMI_MAP_SWITCH_TIMER_EXPIRED,
  41484. /* Expected Duration Expired */
  41485. WMI_EXPECTED_DUR_EXPIRED,
  41486. } WMI_MLO_TID_TO_LINK_MAP_STATUS;
  41487. #define WMI_BCAST_T2LM_MAX 16 /* max number of vdevs covered by T2LM stats */
  41488. typedef struct {
  41489. /* TLV tag and len; tag equals
  41490. * WMITLV_TAG_STRUC_wmi_ctrl_path_t2lm_stats_struct
  41491. */
  41492. A_UINT32 tlv_header;
  41493. /*
  41494. * The below arrays store per-vdev counters, and are indexed by vdev ID.
  41495. * The number of valid elements is min(WMI_BCAST_T2LM_MAX, num vdevs).
  41496. */
  41497. A_UINT32 bcast_t2lm_wmi_cmd[WMI_BCAST_T2LM_MAX];
  41498. A_UINT32 bcast_t2lm_wmi_evt_map_swt_tme_tsf[WMI_BCAST_T2LM_MAX];
  41499. A_UINT32 bcast_t2lm_wmi_evt_map_swt_tme_exp[WMI_BCAST_T2LM_MAX];
  41500. A_UINT32 bcast_t2lm_wmi_evt_exp_dur_exp[WMI_BCAST_T2LM_MAX];
  41501. } wmi_ctrl_path_t2lm_stats_struct;
  41502. typedef struct{
  41503. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ap_vdev_tid_to_link_map_evt_fixed_param */
  41504. A_UINT32 tlv_header;
  41505. /* vdev_id of AP MLO vap */
  41506. A_UINT32 vdev_id;
  41507. /* containts mapping status of WMI_MLO_TID_TO_LINK_MAP_STATUS */
  41508. A_UINT32 status_type;
  41509. /* Mapping switch time of current TSF value */
  41510. A_UINT32 mapping_switch_tsf;
  41511. } wmi_mlo_ap_vdev_tid_to_link_map_evt_fixed_param;
  41512. /* CTRL Field bit-5-7 reserved */
  41513. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_GET(_var) WMI_GET_BITS(_var, 0, 2)
  41514. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_SET(_var, _val) WMI_SET_BITS(_var, 0, 2, _val)
  41515. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_GET(_var) WMI_GET_BITS(_var, 2, 1)
  41516. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_SET(_var, _val) WMI_SET_BITS(_var, 2, 1, _val)
  41517. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_GET(_var) WMI_GET_BITS(_var, 3, 1)
  41518. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_SET(_var, _val) WMI_SET_BITS(_var, 3, 1, _val)
  41519. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_GET(_var) WMI_GET_BITS(_var, 4, 1)
  41520. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_SET(_var, _val) WMI_SET_BITS(_var, 4, 1, _val)
  41521. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_GET(_var) WMI_GET_BITS(_var, 5, 1)
  41522. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_SET(_var, _val) WMI_SET_BITS(_var, 5, 1, _val)
  41523. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_GET(_var) WMI_GET_BITS(_var, 8, 8)
  41524. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_SET(_var, _val) WMI_SET_BITS(_var, 8, 8, _val)
  41525. /* IEEE Link ID 15 bits on each link id 1 bit is reserved */
  41526. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_GET(_var) WMI_GET_BITS(_var, 0, 15)
  41527. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_SET(_var, _val) WMI_SET_BITS(_var, 0, 15, _val)
  41528. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_GET(_var) WMI_GET_BITS(_var, 16, 15)
  41529. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_SET(_var, _val) WMI_SET_BITS(_var, 16, 15, _val)
  41530. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_GET(_var) WMI_GET_BITS(_var, 0, 15)
  41531. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_SET(_var, _val) WMI_SET_BITS(_var, 0, 15, _val)
  41532. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_GET(_var) WMI_GET_BITS(_var, 16, 15)
  41533. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_SET(_var, _val) WMI_SET_BITS(_var, 16, 15, _val)
  41534. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_GET(_var) WMI_GET_BITS(_var, 0, 15)
  41535. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_SET(_var, _val) WMI_SET_BITS(_var, 0, 15, _val)
  41536. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_GET(_var) WMI_GET_BITS(_var, 16, 15)
  41537. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_SET(_var, _val) WMI_SET_BITS(_var, 16, 15, _val)
  41538. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_GET(_var) WMI_GET_BITS(_var, 0, 15)
  41539. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_SET(_var, _val) WMI_SET_BITS(_var, 0, 15, _val)
  41540. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_GET(_var) WMI_GET_BITS(_var, 16, 15)
  41541. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_SET(_var, _val) WMI_SET_BITS(_var, 16, 15, _val)
  41542. /* HW Link ID each hw link with 16-bit */
  41543. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_GET(_var) WMI_GET_BITS(_var, 0, 16)
  41544. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  41545. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_GET(_var) WMI_GET_BITS(_var, 16, 16)
  41546. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_SET(_var, _val) WMI_SET_BITS(_var, 16, 16, _val)
  41547. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_GET(_var) WMI_GET_BITS(_var, 0, 16)
  41548. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  41549. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_GET(_var) WMI_GET_BITS(_var, 16, 16)
  41550. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_SET(_var, _val) WMI_SET_BITS(_var, 16, 16, _val)
  41551. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_GET(_var) WMI_GET_BITS(_var, 0, 16)
  41552. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  41553. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_GET(_var) WMI_GET_BITS(_var, 16, 16)
  41554. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_SET(_var, _val) WMI_SET_BITS(_var, 16, 16, _val)
  41555. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_GET(_var) WMI_GET_BITS(_var, 0, 16)
  41556. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
  41557. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_GET(_var) WMI_GET_BITS(_var, 16, 16)
  41558. #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_SET(_var, _val) WMI_SET_BITS(_var, 16, 16, _val)
  41559. typedef struct {
  41560. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tid_to_link_map */
  41561. A_UINT32 tlv_header;
  41562. /*
  41563. * A_UINT32
  41564. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_GET /
  41565. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_SET
  41566. * direction: 2 // 0 - DL, 1 - UL, 2 - BiDi
  41567. *
  41568. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_GET /
  41569. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_SET
  41570. * default_link_mapping:1 // 1 - Default Link Mapping Present
  41571. * // 0 - Default Link Mapping not present
  41572. *
  41573. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_GET /
  41574. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_SET
  41575. * mapping_switch_time_present:1 // 1 - Mapping Switch Time
  41576. * // Field Present
  41577. * // 0 - Mapping Switch Time
  41578. * // Field not Present
  41579. *
  41580. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_GET /
  41581. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_SET
  41582. * expected_duration_present:1 // 1 - Expected Duration Field Present
  41583. * // 0 - Expected Duration Field
  41584. * // not Present
  41585. *
  41586. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_GET
  41587. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_SET
  41588. * link_mapping_size:1 // 1 - Link Mapping Size 1 Octets
  41589. * // 0 - Link Mapping Size 2 Octets
  41590. *
  41591. * reserved:2
  41592. *
  41593. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_GET /
  41594. * WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_SET
  41595. * link_mapping_presence_indicator:8 // Link mapping presence indicator
  41596. *
  41597. * reserved2:16 // upper 16 bits are unused
  41598. */
  41599. A_UINT32 tid_to_link_map_ctrl;
  41600. /*
  41601. * Mapping Switch time represents TSF time for the New TID_TO_LINK Mapping
  41602. * will be established
  41603. * 16 bit of TSF time ( from bits 10 to 25)
  41604. *
  41605. * Default to Non-Default: One TID_TO_LINK Mapping IE
  41606. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41607. * Mapping switch time present for New Non-Default Mapping
  41608. *
  41609. * Non-Default to Non-Default: Two TID_TO_LINK Mapping IE
  41610. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41611. * Mapping switch time not present for 1st TID_TO_LINK Mapping
  41612. * (Current Non-Default Mapping) value would be zero
  41613. * Mapping switch time present for 2nd TID_TO_LINK Mapping
  41614. * (New Non-Default Mapping)
  41615. *
  41616. * Non_Default to Default: One TID_TO_LINK Mapping IE
  41617. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41618. * Mapping switch time not present value would be zero
  41619. */
  41620. A_UINT32 map_switch_time;
  41621. /*
  41622. * Expected duration would be either duration/remaining duration of Mapping
  41623. *
  41624. * Default to Non-Default: One TID_TO_LINK Mapping IE
  41625. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41626. * Expected duration represents duration of New Non-Default Mapping
  41627. * will be effective
  41628. *
  41629. * Non-Default to Non-Default: Two TID_TO_LINK Mapping IE
  41630. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41631. * Expected duration represents remaing duration of 1st TID_TO_LINK
  41632. * Mapping (Current Non-Default Mapping)
  41633. * Expected duration represents duration of the 2nd TID_TO_LINK
  41634. * Mapping (New Non-Default Mapping ) will be effective
  41635. *
  41636. * Non_Default to Default: One TID_TO_LINK Mapping IE
  41637. * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
  41638. * Expected duration represents remaing duration of Current Non-Default
  41639. * Mapping
  41640. */
  41641. A_UINT32 expected_duration;
  41642. /*
  41643. * for default_link_mapping ieee_tid_0_1_link_map value would be zero
  41644. * which means IE should not include this param
  41645. * A_UINT32
  41646. *
  41647. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_GET /
  41648. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_SET
  41649. * tid_0_link_id:15 // TID_0 Link IDs (0 to 14)
  41650. * // Non-Zero value represents links mapped
  41651. * // to this TID.
  41652. * // Zero value represents links are not mapped
  41653. * // to this TID.
  41654. *
  41655. * reserved:1
  41656. *
  41657. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_GET /
  41658. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_SET
  41659. * tid_1_link_id:15 // TID_1 Link IDs (0 to 14)
  41660. * // Non-Zero value represents links mapped
  41661. * // to this TID.
  41662. * // Zero value represents links are not mapped
  41663. * // to this TID.
  41664. *
  41665. * reserved:1
  41666. */
  41667. A_UINT32 ieee_tid_0_1_link_map;
  41668. /*
  41669. * for default_link_mapping ieee_tid_2_3_link_map value would be zero
  41670. * which means IE should not include this param
  41671. * A_UINT32
  41672. *
  41673. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_GET /
  41674. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_SET
  41675. * tid_2_link_id:15 // TID_2 Link IDs (0 to 14)
  41676. * // Non-Zero value represents links mapped
  41677. * // to this TID.
  41678. * // Zero value represents links are not mapped
  41679. * // to this TID.
  41680. *
  41681. * reserved:1
  41682. *
  41683. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_GET /
  41684. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_SET
  41685. * tid_3_link_id:15 // TID_3 Link IDs (0 to 14)
  41686. * // Non-Zero value represents links mapped
  41687. * // to this TID.
  41688. * // Zero value represents links are not mapped
  41689. * // to this TID.
  41690. *
  41691. * reserved:1
  41692. */
  41693. A_UINT32 ieee_tid_2_3_link_map;
  41694. /*
  41695. * for default_link_mapping ieee_tid_4_5_link_map value would be zero
  41696. * which means IE should not include this param
  41697. * A_UINT32
  41698. *
  41699. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_GET /
  41700. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_SET
  41701. * tid_4_link_id:15 // TID_4 Link IDs (0 to 14)
  41702. * // Non-Zero value represents links mapped
  41703. * // to this TID.
  41704. * // Zero value represents links are not mapped
  41705. * // to this TID.
  41706. *
  41707. * reserved:1
  41708. *
  41709. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_GET /
  41710. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_SET
  41711. * tid_5_link_id:15 // TID_5 Link IDs (0 to 14)
  41712. * // Non-Zero value represents links mapped
  41713. * // to this TID.
  41714. * // Zero value represents links are not mapped
  41715. * // to this TID.
  41716. *
  41717. * reserved:1
  41718. */
  41719. A_UINT32 ieee_tid_4_5_link_map;
  41720. /*
  41721. * for default_link_mapping ieee_tid_6_7_link_map value would be zero
  41722. * which means IE should not include this param
  41723. * A_UINT32
  41724. *
  41725. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_GET /
  41726. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_SET
  41727. * tid_6_link_id:15 // TID_6 Link IDs (0 to 14)
  41728. * // Non-Zero value represents links mapped
  41729. * // to this TID.
  41730. * // Zero value represents links are not mapped
  41731. * // to this TID.
  41732. *
  41733. * reserved:1
  41734. *
  41735. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_GET /
  41736. * WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_SET
  41737. * tid_7_link_id:15 // TID_7 Link IDs (0 to 14)
  41738. * // Non-Zero value represents links mapped
  41739. * // to this TID.
  41740. * // Zero value represents links are not mapped
  41741. * // to this TID.
  41742. *
  41743. * reserved:1
  41744. */
  41745. A_UINT32 ieee_tid_6_7_link_map;
  41746. /*
  41747. * hw_link_map will be used by the FW to pause or unpause the TIDs
  41748. * in all the associated MLD STAs in the corresponsing MLD VAP
  41749. * A_UINT32
  41750. *
  41751. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_GET /
  41752. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_SET
  41753. * hw_tid_0_link_map:16
  41754. *
  41755. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_GET /
  41756. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_SET
  41757. * hw_tid_1_link_map:16
  41758. */
  41759. A_UINT32 hw_tid_0_1_link_map;
  41760. /*
  41761. * hw_link_map will be used by the FW to pause or unpause the TIDs
  41762. * in all the associated MLD STAs in the corresponsing MLD VAP
  41763. * A_UINT32
  41764. *
  41765. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_GET /
  41766. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_SET
  41767. * hw_tid_2_link_map:16
  41768. *
  41769. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_GET /
  41770. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_SET
  41771. * hw_tid_3_link_map:16
  41772. */
  41773. A_UINT32 hw_tid_2_3_link_map;
  41774. /*
  41775. * hw_link_map will be used by the FW to pause or unpause the TIDs
  41776. * in all the associated MLD STAs in the corresponsing MLD VAP
  41777. * A_UINT32
  41778. *
  41779. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_GET /
  41780. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_SET
  41781. * hw_tid_4_link_map:16
  41782. *
  41783. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_GET /
  41784. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_SET
  41785. * hw_tid_5_link_map:16
  41786. */
  41787. A_UINT32 hw_tid_4_5_link_map;
  41788. /*
  41789. * hw_link_map will be used by the FW to pause or unpause the TIDs
  41790. * in all the associated MLD STAs in the corresponsing MLD VAP
  41791. * A_UINT32
  41792. *
  41793. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_GET /
  41794. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_SET
  41795. * hw_tid_6_link_map:16
  41796. *
  41797. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_GET /
  41798. * WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_SET
  41799. * hw_tid_7_link_map:16
  41800. */
  41801. A_UINT32 hw_tid_6_7_link_map;
  41802. /* Indicates the disabled link map for 802.11be T2LM */
  41803. A_UINT32 disabled_link_bitmap;
  41804. } wmi_mlo_ap_vdev_tid_to_link_map_ie_info;
  41805. #define WMI_NUM_TID_PER_AC 2
  41806. typedef struct {
  41807. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_evt_fixed_param */
  41808. A_UINT32 tlv_header;
  41809. wmi_mac_addr mld_mac;
  41810. /* hwlink_priority:
  41811. * Based on capacity, hw chip is ordered here.
  41812. * hwlink_priority[0] holds the HW chip ID which is the top priority,
  41813. * hwlink_priority[1] holds the HW chip ID which is the 2nd priority,
  41814. * etc.
  41815. */
  41816. A_UINT32 hwlink_priority[WMI_MAX_NUM_MLO_LINKS];
  41817. /* link_bmap:
  41818. * Bitmap segments for the primary TIDs (0/1/4/6)
  41819. * are provided in link_bmap[0].
  41820. * Bitmap segments for the secondary TIDs (3/2/5/7)
  41821. * are provided in link_bmap[1].
  41822. * link_bmap[0]:
  41823. * bits 4:0 are used to indicate which links are used for TID 0
  41824. * bits 9:5 are used to indicate which links are used for TID 1
  41825. * bits 14:10 are used to indicate which links are used for TID 4
  41826. * bits 19:15 are used to indicate which links are used for TID 6
  41827. * bits 31:20 are unused
  41828. * link_bmap[0]:
  41829. * bits 4:0 are used to indicate which links are used for TID 3
  41830. * bits 9:5 are used to indicate which links are used for TID 2
  41831. * bits 14:10 are used to indicate which links are used for TID 5
  41832. * bits 19:15 are used to indicate which links are used for TID 7
  41833. * bits 31:20 are unused
  41834. */
  41835. A_UINT32 link_bmap[WMI_NUM_TID_PER_AC];
  41836. } wmi_mlo_tlt_selection_for_tid_spray_event_fixed_param;
  41837. #define WMI_IGMP_OFFLOAD_SUPPORT_DISABLE_BITMASK 0x0
  41838. #define WMI_IGMP_V1_OFFLOAD_SUPPORT_BITMASK 0x1
  41839. #define WMI_IGMP_V2_OFFLOAD_SUPPORT_BITMASK 0x2
  41840. #define WMI_IGMP_V3_OFFLOAD_SUPPORT_BITMASK 0x4
  41841. #define WMI_IGMP_OFFLOAD_SUPPORT_ALL_VERSION 0x7
  41842. typedef struct {
  41843. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_igmp_offload_fixed_param */
  41844. A_UINT32 vdev_id; /** VDEV identifier */
  41845. A_UINT32 enable; /** IGMP offload support enable/disable */
  41846. A_UINT32 version_support_bitmask; /** IGMP version support v1, v2 and/or v3*/
  41847. /* Following this structure are the TLVs:
  41848. * WMI_IPV4_ADDR grp_ip_address[num_mcast_ipv4_addr];
  41849. */
  41850. } wmi_igmp_offload_fixed_param;
  41851. /* flags for ICMP Offload IP4,IP6 */
  41852. #define WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT 0
  41853. #define WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT 1
  41854. /* set IPv4 enabled/disabled flag and get the flag */
  41855. #define WMI_SET_ICMP_OFFLOAD_IPV4_ENABLED_BIT(valid_bitmask) \
  41856. WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1, 1)
  41857. #define WMI_SET_ICMP_OFFLOAD_IPV4_DISABLED_BIT(valid_bitmask) \
  41858. WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1, 0)
  41859. #define WMI_GET_ICMP_OFFLOAD_IPV4_ENABLED(valid_bitmask) \
  41860. WMI_GET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1)
  41861. /* set IPv6 enabled flag, disabled and get the flag */
  41862. #define WMI_SET_ICMP_OFFLOAD_IPV6_ENABLED_BIT(valid_bitmask) \
  41863. WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1, 1)
  41864. #define WMI_SET_ICMP_OFFLOAD_IPV6_DISABLED_BIT(valid_bitmask) \
  41865. WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1, 0)
  41866. #define WMI_GET_ICMP_OFFLOAD_IPV6_ENABLED(valid_bitmask) \
  41867. WMI_GET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1)
  41868. typedef struct {
  41869. /** TLV tag and len; tag equals
  41870. * WMITLV_TAG_STRUC_wmi_vdev_icmp_offload_cmd_fixed_param
  41871. */
  41872. A_UINT32 tlv_header;
  41873. A_UINT32 vdev_id;
  41874. A_UINT32 enable;
  41875. /* bitmask for valid ipv4/ipv6 address */
  41876. A_UINT32 valid_bitmask;
  41877. WMI_IPV4_ADDR ipv4_addr;
  41878. /* Following this structure are the TLVs:
  41879. * WMI_IPV6_ADDR ipv6_addr[num_ipv6_addr];
  41880. */
  41881. } wmi_icmp_offload_fixed_param;
  41882. typedef struct {
  41883. /** TLV tag and len; tag equals
  41884. * WMITLV_TAG_STRUC_wmi_vdev_smart_monitor_event_fixed_param */
  41885. A_UINT32 tlv_header;
  41886. /* VDEV identifier */
  41887. A_UINT32 vdev_id;
  41888. /** Average RSSI value of Data Frames */
  41889. A_INT32 avg_rssi_data_dbm;
  41890. /** rx_vht_sgi:
  41891. * Short guard interval state of Data frames obtaining from rx PPDU TLV
  41892. * of VHTSIGA buf.
  41893. * 0: Default (No sgi set)
  41894. * 1: sgi set
  41895. */
  41896. A_UINT32 rx_vht_sgi;
  41897. } wmi_vdev_smart_monitor_event_fixed_param;
  41898. typedef struct {
  41899. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_set_param_cmd_fixed_param */
  41900. A_UINT32 pdev_id;
  41901. /** parameter id */
  41902. A_UINT32 param_id;
  41903. /** parameter value */
  41904. A_UINT32 param_value;
  41905. /* The TLVs follows this structure:
  41906. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  41907. */
  41908. } wmi_pdev_multiple_vdev_set_param_cmd_fixed_param;
  41909. typedef struct {
  41910. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_param_info */
  41911. /** ID of the parameter being set */
  41912. A_UINT32 param_id;
  41913. /** value of the parameter being set */
  41914. A_UINT32 param_value;
  41915. } wmi_set_param_info;
  41916. typedef struct {
  41917. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_multiple_pdev_vdev_param_cmd_fixed_param */
  41918. /** Command is for vdev or pdev: 0 = pdev, 1 = vdev */
  41919. A_UINT32 is_vdev;
  41920. /** unique dev_id identifying the VDEV/PDEV */
  41921. A_UINT32 dev_id;
  41922. /*
  41923. * Following this structure is the TLV:
  41924. * wmi_set_param_info param_info[];
  41925. */
  41926. } wmi_set_multiple_pdev_vdev_param_cmd_fixed_param;
  41927. typedef enum {
  41928. WMI_MU_SNIF_DISABLE,
  41929. WMI_MU_SNIF_USER_INPUT,
  41930. WMI_MU_SNIF_WILDCARD,
  41931. } WMI_MU_SNIF_MODE;
  41932. typedef struct {
  41933. /** TLV tag and len; tag equals
  41934. * WMITLV_TAG_STRUC_wmi_vdev_set_mu_snif_cmd_param */
  41935. A_UINT32 tlv_header;
  41936. /* VDEV identifier */
  41937. A_UINT32 vdev_id;
  41938. /* MU sniffer mode - refer to WMI_MU_SNIF_MODE enum */
  41939. A_UINT32 mode;
  41940. /* max num of user to decode */
  41941. A_UINT32 max_num_user;
  41942. /**
  41943. * TLV (tag length value) parameters follow setting MU sniffer command
  41944. * structure. The TLV's are:
  41945. * A_UINT32 aids[];
  41946. */
  41947. } wmi_vdev_set_mu_snif_cmd_param;
  41948. typedef struct {
  41949. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbs_or_sbs_cap_ext*/
  41950. A_UINT32 tlv_header;
  41951. /* hw_mode_id: refer to WMI_HW_MODE_CAPABILITIES */
  41952. A_UINT32 hw_mode_id;
  41953. /*
  41954. * If sbs_lower_band_end_freq is set to non-zero, it indicates
  41955. * async SBS mode is supported, and lower-band/higher band to MAC
  41956. * mapping is switch-able. unit: MHz. examples 5180, 5320
  41957. * If sbs_mid_band_end_freq is set to non-zero, it indicates
  41958. * async flexible SBS mode is supported, lower/higher band cutoff frequency
  41959. * can be selected from sbs_lower_band_end_freq or sbs_mid_band_end_freq.
  41960. * unit: MHz, examples 5900.
  41961. */
  41962. A_UINT32 sbs_lower_band_end_freq;
  41963. A_UINT32 sbs_mid_band_end_freq;
  41964. } wmi_dbs_or_sbs_cap_ext;
  41965. typedef struct {
  41966. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_cust_bdf_version_capabilities*/
  41967. /* Cust bdf Major version in bdf */
  41968. A_UINT32 cust_bdf_ver_major;
  41969. /* Cust bdf Minor version in bdf */
  41970. A_UINT32 cust_bdf_ver_minor;
  41971. } wmi_cust_bdf_version_capabilities;
  41972. enum WMI_CODEL_ENABLE_VALUES {
  41973. WMI_CODEL_DISABLED,
  41974. WMI_CODEL_ENABLED,
  41975. /* WMI_CODEL_DEBUG:
  41976. * partly enabled – track interval and check target, but don’t drop
  41977. */
  41978. WMI_CODEL_DEBUG,
  41979. };
  41980. typedef enum {
  41981. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MIN_THRUPUT = 0,
  41982. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MAX_THRUPUT = 0xffffffff,
  41983. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_BURST_SIZE = 0,
  41984. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_SVC_INTERVAL = 0xffffffff,
  41985. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_DELAY_BOUND = 0xffffffff,
  41986. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_TIME_TO_LIVE = 0xffffffff,
  41987. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_PRIORITY = 0,
  41988. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_TID = 0xffffffff,
  41989. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MSDU_LOSS_RATE = 0,
  41990. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_DISABLED_SCHED_MODE = 0,
  41991. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_ENABLED = WMI_CODEL_DISABLED,
  41992. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_LATENCY_TARGET_MS = 0xffffffff,
  41993. WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_INTERVAL_MS = 0xffffffff,
  41994. } WMI_SAWF_SVC_CLASS_PARAM_DEFAULTS;
  41995. #define WMI_CODEL_INTERVAL_MAX_MS 0x0000ffff
  41996. #define WMI_CODEL_LATENCY_TARGET_MAX_MS 0x00003fff
  41997. typedef struct {
  41998. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sawf_svc_class_cfg_cmd_fixed_param */
  41999. A_UINT32 svc_class_id; /* which service class is being configured */
  42000. /*-----
  42001. * The below fields specify the values for the parameters of the
  42002. * service class being configured.
  42003. * Each such service class parameter has a default value specified in the
  42004. * above WMI_SAWF_SVC_CLASS_PARAM_DEFAULTS enum.
  42005. * This default value shall be specified for service classes where
  42006. * the parameter in question is not applicable.
  42007. * For example, for service classes that have no minimum throughput
  42008. * requirement, the min_thruput_kbps field should be set to
  42009. * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MIN_THRUPUT, i.e. 0.
  42010. *-----*/
  42011. /* min_thruput_kbps:
  42012. * How much throughput should be "guaranteed" for each MSDU queue
  42013. * belonging to this service class.
  42014. * Units are kilobits per second.
  42015. */
  42016. A_UINT32 min_thruput_kbps;
  42017. /* max_thruput_kbps:
  42018. * What upper limit on throughput shall be applied to MSDU queues belonging
  42019. * to this service class, if other peer-TIDs are not meeting their QoS
  42020. * service goals.
  42021. * Units are kilobits per second.
  42022. */
  42023. A_UINT32 max_thruput_kbps;
  42024. /* burst_size_bytes:
  42025. * How much data (i.e. how many MSDUs) should be pulled from a
  42026. * MSDU queue belonging to this service class to be formed into MPDUs
  42027. * and enqueued for transmission.
  42028. * Similarly, how long should a tx op be for MPDUs containing MSDUs from
  42029. * this service class, to ensure that the necessary amount of data gets
  42030. * delivered to the peer.
  42031. * Units are bytes.
  42032. */
  42033. A_UINT32 burst_size_bytes;
  42034. /* svc_interval_ms:
  42035. * How frequently MSDUs belonging to this service class should be
  42036. * formed into MPDUs and enqueued for transmission.
  42037. * The svc_interval_ms parameter is expected to be <= the delay_bound_ms
  42038. * parameter.
  42039. * Units are milliseconds.
  42040. */
  42041. A_UINT32 svc_interval_ms;
  42042. /* delay_bound_ms:
  42043. * How promptly the MSDUs belonging to this service class need to be
  42044. * delivered to the recipient peer.
  42045. * Units are milliseconds.
  42046. */
  42047. A_UINT32 delay_bound_ms;
  42048. /* time_to_live_ms:
  42049. * How long MSDUs belonging to this service class remain valid.
  42050. * If the MSDU has not been successfully transmitted before this
  42051. * time-to-live time has elapsed, the MSDU should be discarded.
  42052. * The time_to_live_ms parameter is expected to be >= the delay_bound_ms
  42053. * parameter.
  42054. * Units are milliseconds.
  42055. */
  42056. A_UINT32 time_to_live_ms;
  42057. /* priority:
  42058. * What degree of precedence shall the WLAN FW's tx scheduler use
  42059. * when considering whether to transmit MPDUs generated from MSDUs
  42060. * belonging to this service class.
  42061. */
  42062. A_UINT32 priority;
  42063. /* tid:
  42064. * Which WLAN TID shall be used for delivering traffic of this
  42065. * service class.
  42066. */
  42067. A_UINT32 tid;
  42068. /* msdu_loss_rate_ppm:
  42069. * This parameter indicates the acceptable rate of MSDU loss.
  42070. * Units are parts per million.
  42071. * E.g. if it is acceptable for 1 MSDU of every 10000 to be lost,
  42072. * the msdu_loss_rate_ppm value would be 100,
  42073. * since 100 / 1000000 = 1 / 10000.
  42074. */
  42075. A_UINT32 msdu_loss_rate_ppm;
  42076. /*
  42077. * The disabled DL and UL scheduler modes bitmap.
  42078. *
  42079. * Each bit in the "disabled_sched_modes" bitmap indicates whether a
  42080. * specific scheduler mode may be selected by the fast loop scheduler. A
  42081. * "1" bit indicates that mode is disabled, and a "0" bit indicates the
  42082. * mode is enabled.
  42083. *
  42084. * The WMI_SCHED_MODE_FLAGS enum defines the bit positions for each mode.
  42085. */
  42086. A_UINT32 disabled_sched_modes;
  42087. A_UINT32 codel_enabled; /* contains a WMI_CODEL_ENABLE_VALUES enum value */
  42088. /* codel_latency_target_ms:
  42089. * The codel_latency_target_ms field specifies the latency target for
  42090. * MSDU queues belonging to this service class.
  42091. * The latency of each such MSDU queue will periodically be checked
  42092. * (with the periodicity controlled by the code_interval_ms parameter).
  42093. * If the MSDU queue's latency is above this target latency, a MSDU will
  42094. * be dropped from the head of the queue, to attempt to get the flow's
  42095. * producer to scale down its rate of MSDU production.
  42096. * This value should be roughly 10% to 30% of the codel_interval_ms value.
  42097. * This value must be <= WMI_CODEL_LATENCY_TARGET_MAX_MS (or must equal
  42098. * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_LATENCY_TARGET_MS).
  42099. */
  42100. A_UINT32 codel_latency_target_ms;
  42101. /* codel_interval_ms:
  42102. * The codel_interval_ms field specifies the baseline interval between
  42103. * successive checks that a given MSDU queue's latency is under the
  42104. * CoDel target latency.
  42105. * If in a given interval a MSDU queue has a latency exceeding the target,
  42106. * the duration of the subsequent interval for that MSDU queue will be
  42107. * reduced. The interval will get reset to the baseline interval when
  42108. * the MSDU queue's latency is again under the CoDel target latency.
  42109. * This value must be <= WMI_CODEL_INTERVAL_MAX_MS (or must equal
  42110. * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_INTERVAL_MS).
  42111. */
  42112. A_UINT32 codel_interval_ms;
  42113. } wmi_sawf_svc_class_cfg_cmd_fixed_param;
  42114. typedef struct {
  42115. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sawf_svc_class_disable_cmd_fixed_param */
  42116. A_UINT32 svc_class_id; /* which service class is being disabled */
  42117. } wmi_sawf_svc_class_disable_cmd_fixed_param;
  42118. typedef struct {
  42119. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sw_cal_ver_cap */
  42120. A_UINT32 bdf_cal_ver; /* SW cal version in BDF */
  42121. A_UINT32 ftm_cal_ver; /* SW cal version in factory data */
  42122. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  42123. } wmi_sw_cal_ver_cap;
  42124. typedef struct {
  42125. /** TLV tag and len; tag equals
  42126. * WMITLV_TAG_STRUC_wmi_soc_tqm_reset_enable_disable_cmd_fixed_param
  42127. */
  42128. A_UINT32 tlv_header;
  42129. /** 0 - disable TQM-reset feature, 1 - enable TQM-reset feature */
  42130. A_UINT32 enable;
  42131. } wmi_soc_tqm_reset_enable_disable_cmd_fixed_param;
  42132. typedef struct {
  42133. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_multiple_peer_group_cmd_fixed_param */
  42134. A_UINT32 vdev_id;
  42135. A_UINT32 pdev_id;
  42136. /** Sub command id - populated with a WMI_CMD_ID value.
  42137. * Currently supported command ids are WMI_PEER_REMOVE_WDS_ENTRY_CMDID.
  42138. */
  42139. A_UINT32 sub_cmd_id;
  42140. /* The TLVs follows this structure:
  42141. * wmi_mac_addr wds_macaddr[]; <--- Array of wds mac addresses.
  42142. */
  42143. } wmi_vdev_multiple_peer_group_cmd_fixed_param;
  42144. /* WMI_VDEV_PN_MGMT_RX_FILTER_CMDID */
  42145. typedef struct {
  42146. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_pn_mgmt_rx_filter_cmd_fixed_param */
  42147. A_UINT32 vdev_id;
  42148. /* RX Filter - MGMT/Action frame type is specified in each bit as per 802.11 spec
  42149. * PN check will be done for all MGMT frames irrespective of RX Filter.
  42150. * Rx filter is only used to decide whether PN failed frames should be forwarded to host
  42151. * Example for forwarding beacon and de-auth pkt alone to host then bit 8(Beacon) and 12(De-auth) must be set */
  42152. A_UINT32 pn_rx_filter;
  42153. } wmi_vdev_pn_mgmt_rx_filter_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  42154. typedef struct {
  42155. A_UINT32 tlv_header;
  42156. /* egid_info:
  42157. * Identify which ESL group is active and the duty cycle configured
  42158. * for each group.
  42159. * This is a 128-bit bitmap to represent 16 ESL sets, with each set
  42160. * having 8 members.
  42161. * For a given set, the 1-values within the 8-bit bitmap identify
  42162. * which groups are active. The number of active groups within each
  42163. * set of 8 indirectly determines the WLAN/BT duty cycle:
  42164. * number of 1-bits |
  42165. * within 8-bit bitmap | WLAN / BT duty cycle
  42166. * --------------------+----------------
  42167. * 0 | 100 ms WLAN
  42168. * 1 | 87.5 ms WLAN, 12.5 ms BT
  42169. * 2 | 75 ms WLAN, 25 ms BT
  42170. * 3 | 62.5 ms WLAN, 37.5 ms BT
  42171. * 4 | 50 ms WLAN, 50 ms BT
  42172. * 5 | 37.5 ms WLAN, 62.5 ms BT
  42173. * 6 | 25 ms WLAN, 75 ms BT
  42174. * 7 | 12.5 ms WLAN, 87.5 ms BT
  42175. * 8 | 100 ms BT
  42176. * The lowest bits in the bitmap represent the highest ESL groups,
  42177. * E.g. bitmap bit 0 corresponds to ESL group 127, bit 1 corresponds
  42178. * to ESL group 126, bit 7 corresponds to ESL group 120, bit 8
  42179. * corresponds to ESL group 119, etc.
  42180. *
  42181. * So for example, if the lowest 8 bits of egid_info are 0x07, this
  42182. * indicates that groups 125-127 are active and 120-124 are inactive,
  42183. * and that the duty cycle is 62.5 ms WLAN + 37.5 ms BT.
  42184. */
  42185. A_UINT32 egid_info[4];
  42186. } wmi_esl_egid_cmd_fixed_param;
  42187. #define WMI_RTT_PASN_PEER_CREATE_SECURITY_MODE_GET(flag) WMI_GET_BITS(flag, 0, 2)
  42188. #define WMI_RTT_PASN_PEER_CREATE_SECURITY_MODE_SET(flag,val) WMI_SET_BITS(flag, 0, 2, val)
  42189. #define WMI_RTT_PASN_PEER_CREATE_FORCE_SELF_MAC_USE_GET(flag) WMI_GET_BITS(flag, 2, 1)
  42190. #define WMI_RTT_PASN_PEER_CREATE_FORCE_SELF_MAC_USE_SET(flag,val) WMI_SET_BITS(flag, 2, 1, val)
  42191. typedef struct {
  42192. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_create_req_event_fixed_param */
  42193. /** unique id identifying the VDEV, generated by the caller */
  42194. A_UINT32 vdev_id;
  42195. /**
  42196. * The following TLV will follow this fixed_param TLV:
  42197. *
  42198. * wmi_rtt_pasn_peer_create_req_param rtt_pasn_peer_param[]
  42199. */
  42200. } wmi_rtt_pasn_peer_create_req_event_fixed_param;
  42201. typedef struct {
  42202. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_create_req_param */
  42203. wmi_mac_addr self_mac_addr; /* self MAC address (can be vdev address or random mac address) */
  42204. wmi_mac_addr dest_mac_addr; /* MAC address of the peer */
  42205. A_UINT32 control_flag; /* some control information here */
  42206. /*********************************************************************************
  42207. * Bits 1:0: Security mode, check wmi_rtt_security_mode for detail.
  42208. * Host driver to request supplicant to derive and install PASN keys if security mode is set.
  42209. * Bit 2: Force_self_mac_addr_use, To indicate supplicant/hostapd to use this self mac addr to (re)generate PASN keys,
  42210. * and flush old cache( if it exists) for dest_mac_addr with old self_mac_addr.
  42211. * Bits 31:3: Reserved
  42212. */
  42213. } wmi_rtt_pasn_peer_create_req_param;
  42214. typedef struct {
  42215. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_auth_status_cmd_fixed_param */
  42216. /**
  42217. * The following TLV will follow this fixed_param TLV:
  42218. *
  42219. * wmi_rtt_pasn_auth_status_param pasn_auth_status_param[]
  42220. */
  42221. } wmi_rtt_pasn_auth_status_cmd_fixed_param;
  42222. typedef struct {
  42223. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_auth_status_param */
  42224. /* MAC address of the peer */
  42225. wmi_mac_addr peer_mac_addr;
  42226. /* Return status. 0 for success, non-zero otherwise */
  42227. A_UINT32 status;
  42228. /* Source address used for doing PASN authentication */
  42229. wmi_mac_addr source_mac_addr;
  42230. } wmi_rtt_pasn_auth_status_param;
  42231. #define WMI_RTT_PASN_PEER_DELETE_DELETED_BIT_GET(flag) WMI_GET_BITS(flag, 0, 1)
  42232. #define WMI_RTT_PASN_PEER_DELETE_DELETED_BIT_SET(flag,val) WMI_SET_BITS(flag, 0, 1, val)
  42233. #define WMI_RTT_PASN_PEER_DELETE_FLUSH_KEYS_GET(flag) WMI_GET_BITS(flag, 1, 1)
  42234. #define WMI_RTT_PASN_PEER_DELETE_FLUSH_KEYS_SET(flag,val) WMI_SET_BITS(flag, 1, 1, val)
  42235. typedef struct {
  42236. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_delete_event_fixed_param */
  42237. /** unique id identifying the VDEV, generated by the caller */
  42238. A_UINT32 vdev_id;
  42239. /**
  42240. * The following TLV will follow this fixed_param TLV:
  42241. *
  42242. * wmi_rtt_pasn_peer_delete_param rtt_pasn_peer_param[]
  42243. */
  42244. } wmi_rtt_pasn_peer_delete_event_fixed_param;
  42245. typedef struct {
  42246. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_delete_param */
  42247. /* MAC address of the peer */
  42248. wmi_mac_addr peer_mac_addr;
  42249. /* some control information here */
  42250. A_UINT32 control_flag;
  42251. /**********************************************************************************
  42252. * Bit 0: peer_deleted (This is set to 1 if peer has already been deleted by the target)
  42253. * Bit 1: flush keys (This is set to 1 if target wants the cached PASN keys to be flushed)
  42254. * Bits 31:2: reserved
  42255. */
  42256. } wmi_rtt_pasn_peer_delete_param;
  42257. typedef struct {
  42258. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_deauth_cmd_fixed_param */
  42259. /* MAC address of the peer */
  42260. wmi_mac_addr peer_mac_addr;
  42261. } wmi_rtt_pasn_deauth_cmd_fixed_param;
  42262. typedef struct {
  42263. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_info */
  42264. /** what the register is used for - see WFSS_PMM_SCRATCH_REG_PURPOSE enum */
  42265. A_UINT32 pmm_scratch_reg_purpose;
  42266. /** Address of scratch register */
  42267. A_UINT32 pmm_scratch_reg_address;
  42268. } wmi_pmm_scratch_reg_info;
  42269. typedef struct {
  42270. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_allocation_cmd_fixed_param */
  42271. /** pdev_id for identifying the MAC */
  42272. A_UINT32 pdev_id;
  42273. /*
  42274. * Following this structure is the TLV:
  42275. * wmi_pmm_scratch_reg_info scratch_reg_info[];
  42276. */
  42277. } wmi_pmm_scratch_reg_allocation_cmd_fixed_param;
  42278. typedef struct {
  42279. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_available_scratch_reg_info */
  42280. /** Scratch register address */
  42281. A_UINT32 pmm_scratch_reg_address;
  42282. } wmi_pmm_available_scratch_reg_info;
  42283. typedef struct {
  42284. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_available_scratch_reg_event_fixed_param */
  42285. /** pdev_id for identifying the MAC */
  42286. A_UINT32 pdev_id;
  42287. /*
  42288. * Following this structure is the TLV:
  42289. * wmi_pmm_available_scratch_reg_info pmm_available_scratch_reg_info[];
  42290. */
  42291. } wmi_pmm_available_scratch_reg_event_fixed_param;
  42292. typedef struct {
  42293. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_allocation_complete_event_fixed_param */
  42294. /** pdev_id for identifying the MAC */
  42295. A_UINT32 pdev_id;
  42296. /** 1 - success, 0 - failed */
  42297. A_UINT32 is_allocated;
  42298. } wmi_pmm_scratch_reg_allocation_complete_event_fixed_param;
  42299. typedef enum {
  42300. WMI_NO_FLUSH,
  42301. WMI_TWT_FLUSH,
  42302. /* Add new flush policies above */
  42303. WMI_MAX_FLUSH_POLICY
  42304. } wmi_peer_flush_policy;
  42305. typedef struct {
  42306. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_policy_cmd_fixed_param */
  42307. A_UINT32 vdev_id;
  42308. /** peer MAC address */
  42309. wmi_mac_addr peer_macaddr;
  42310. /** The tids to flush */
  42311. A_UINT32 peer_tid_bitmap;
  42312. /* wmi_peer_flush_policy */
  42313. A_UINT32 flush_policy;
  42314. /* n_TWT_SPs_to_expire:
  42315. * Expire / drop packets whose age is greater than this specified number
  42316. * of TWT service periods.
  42317. */
  42318. A_UINT32 n_TWT_SPs_to_expire;
  42319. } wmi_peer_flush_policy_cmd_fixed_param;
  42320. /* health monitor infra Def */
  42321. typedef struct {
  42322. /** TLV tag and len */
  42323. A_UINT32 tlv_header;
  42324. A_UINT32 ring_buf_paddr_low;
  42325. A_UINT32 ring_buf_paddr_high;
  42326. A_UINT32 initial_upload_period_ms;
  42327. } wmi_health_mon_init_done_fixed_param;
  42328. /** ODD **/
  42329. /* Livedump Data structures */
  42330. #define WMI_ODD_LIVEDUMP_RESP_SET_STATUS(status, val) \
  42331. WMI_SET_BITS(status, 0, 4, val)
  42332. #define WMI_ODD_LIVEDUMP_RESP_GET_STATUS(status) \
  42333. WMI_GET_BITS(status, 0, 4)
  42334. typedef enum {
  42335. ODD_LIVEDUMP_STATUS_SUCCESS = 0,
  42336. ODD_LIVEDUMP_STATUS_FAILURE,
  42337. ODD_MAX_LIVEDUMP_STATUS,
  42338. } odd_livedump_resp_status;
  42339. typedef struct {
  42340. A_UINT32 tlv_header;
  42341. A_UINT32 odd_livedump_request_id;
  42342. /* Following this structure is the TLV:
  42343. * A_UINT32 odd_livedump_id_list[]; <-- array livedump_id list
  42344. */
  42345. } wmi_livedump_request_cmd_fixed_param;
  42346. typedef struct {
  42347. A_UINT32 tlv_header;
  42348. /* odd_livedump_request_id:
  42349. * this echoes the request id that was sent in the wmi_livedump_cmd_param
  42350. */
  42351. A_UINT32 odd_livedump_request_id;
  42352. /*
  42353. * 4 LSB's to indicate status of the odd_livedump_request_id processed
  42354. * by the FW, the other 28bits to kept for future enhancements.
  42355. * The status will be defined in the enum odd_livedump_resp_status
  42356. * 0 - SUCCESS
  42357. * 1 - FAILURE
  42358. * Refer to the WMI_ODD_LIVEDUMP_RESP_SET,_GET_STATUS macros.
  42359. */
  42360. A_UINT32 status;
  42361. } wmi_livedump_response_event_fixed_param;
  42362. #define WMI_MLO_LINK_REMOVAL_GET_VDEVID(tbtt_info) WMI_GET_BITS(tbtt_info, 0, 8)
  42363. #define WMI_MLO_LINK_REMOVAL_SET_VDEVID(tbtt_info, value) WMI_SET_BITS(tbtt_info, 0, 8, value)
  42364. #define WMI_MLO_LINK_REMOVAL_GET_LINKID(tbtt_info) WMI_GET_BITS(tbtt_info, 8, 8)
  42365. #define WMI_MLO_LINK_REMOVAL_SET_LINKID(tbtt_info, value) WMI_SET_BITS(tbtt_info, 8, 8, value)
  42366. #define WMI_MLO_LINK_REMOVAL_GET_TBTT_COUNT(tbtt_info) WMI_GET_BITS(tbtt_info, 16, 16)
  42367. #define WMI_MLO_LINK_REMOVAL_SET_TBTT_COUNT(tbtt_info, value) WMI_SET_BITS(tbtt_info, 16, 16, value)
  42368. typedef struct {
  42369. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_tbtt_count; */
  42370. A_UINT32 tlv_header;
  42371. union {
  42372. struct {
  42373. A_UINT32 vdev_id:8,
  42374. link_id:8,
  42375. tbtt_count:16;
  42376. };
  42377. A_UINT32 tbtt_info;
  42378. };
  42379. } wmi_mlo_link_removal_tbtt_count;
  42380. typedef struct {
  42381. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_tbtt_update; */
  42382. A_UINT32 tlv_header;
  42383. A_UINT32 tbtt_count;
  42384. A_UINT32 qtimer_ts_low; /* lower-32 bits */
  42385. A_UINT32 qtimer_ts_high; /* higher-32 bits */
  42386. A_UINT32 tsf_low; /* lower-32 bits */
  42387. A_UINT32 tsf_high; /* higher-32 bits */
  42388. } wmi_mlo_link_removal_tbtt_update;
  42389. typedef struct {
  42390. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_evt_fixed_param; */
  42391. A_UINT32 tlv_header;
  42392. A_UINT32 vdev_id;
  42393. /*
  42394. * Followed by TLVs:
  42395. * wmi_mlo_link_removal_tbtt_update
  42396. */
  42397. } wmi_mlo_link_removal_evt_fixed_param;
  42398. typedef struct {
  42399. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_cmd_fixed_param */
  42400. A_UINT32 tlv_header;
  42401. A_UINT32 vdev_id;
  42402. A_UINT32 reconfig_ml_ie_num_bytes_valid;
  42403. /* This TLV is followed by array of bytes:
  42404. * A_UINT8 reconfig_ml_ie[]; <-- Entire reconfiguration element (multi-link control + common-info + 1 per-sta profile)
  42405. */
  42406. } wmi_mlo_link_removal_cmd_fixed_param;
  42407. typedef struct {
  42408. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_peer_sched_mode_disable */
  42409. /* Peer MAC Address */
  42410. wmi_mac_addr peer_macaddr;
  42411. /*
  42412. * The disabled DL and UL scheduler modes bitmap.
  42413. *
  42414. * This command is not supported in STA mode.
  42415. *
  42416. * A value of 1 in a given bit position disables the corresponding mode,
  42417. * and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS enum defines
  42418. * the bit positions for each mode.
  42419. *
  42420. * A single 32 bit value is used to store the following configuration
  42421. * bitmap.
  42422. *
  42423. * bit | sched mode
  42424. * ---------------
  42425. * 0 | DL MU-MIMO
  42426. * 1 | UL MU-MIMO
  42427. * 2 | DL OFDMA
  42428. * 3 | UL OFDMA
  42429. * 4..31 | RESERVED
  42430. */
  42431. A_UINT32 disabled_sched_modes;
  42432. } wmi_per_peer_sched_mode_disable;
  42433. typedef struct {
  42434. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sched_mode_disable_fixed_param */
  42435. A_UINT32 pdev_id;
  42436. /* The TLVs for each peer follows:
  42437. * wmi_per_peer_sched_mode_disable per_peer_sched_mode_disable[];
  42438. */
  42439. } wmi_peer_sched_mode_disable_fixed_param;
  42440. typedef enum {
  42441. /*
  42442. * No timestamp source is used, and the start_timestamp field should be
  42443. * ignored. FW will start the probing of the requested mode ASAP after
  42444. * receiving this message.
  42445. */
  42446. WMI_SCHED_MODE_PROBE_TSTAMP_SRC_NONE = 0,
  42447. } WMI_SCHED_MODE_PROBE_TSTAMP_SRC;
  42448. typedef struct {
  42449. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_sched_mode_probe_req_fixed_param */
  42450. A_UINT32 vdev_id;
  42451. /*
  42452. * The scheduler mode to probe. Only a single mode may currently be
  42453. * specified in this WMI command (separate commands must be sent to probe
  42454. * multiple modes). This limitation may be removed in a future version of
  42455. * FW.
  42456. *
  42457. * This command is not supported in STA mode.
  42458. *
  42459. * The WMI_SCHED_MODE_FLAGS enum defines the scheduler mode values.
  42460. */
  42461. A_UINT32 sched_mode_to_probe;
  42462. /*
  42463. * 32-bit cookie that will be sent back in the probing completion / stats
  42464. * WMI message. FW does not interpret any bits in this field, and simply
  42465. * replays it back to the host.
  42466. */
  42467. A_UINT32 cookie;
  42468. /*
  42469. * The clock reference to use for the start_timestamp field. The enum
  42470. * WMI_SCHED_MODE_PROBE_TSTAMP_SRC defines the valid timestamp sources.
  42471. */
  42472. A_UINT32 timestamp_source;
  42473. /*
  42474. * The start timestamp indicating when the FW scheduler should start the
  42475. * probing period. Note that although the FW tries to honor this start
  42476. * time, it may not always be possible to. For instance, if the command
  42477. * arrives after the indicated start timestamp, or if channel congestion
  42478. * delays the APs ability to transmit over the air.
  42479. *
  42480. * If the timestamp_source field is set to
  42481. * WMI_SCHED_MODE_PROBE_TSTAMP_SRC_NONE, then the value of this field is
  42482. * ignored by FW.
  42483. */
  42484. A_UINT32 start_timestamp_lo;
  42485. A_UINT32 start_timestamp_hi;
  42486. /*
  42487. * The on and off duration of the probing mode.
  42488. *
  42489. * The scheduler will turn the mode on first for the specified
  42490. * "on_duration_ms", and then turn it off for the specified
  42491. * "off_duration_ms".
  42492. *
  42493. * During the on and off duration, FW will collect delivered bytes
  42494. * statistics to estimate the vdev level throughput achieved for both the
  42495. * on and off region. These statistics will be delivered in the
  42496. * wmi_vdev_sched_mode_probe_resp WMI message after both the "on" and "off"
  42497. * durations have elapsed.
  42498. */
  42499. A_UINT32 on_duration_ms;
  42500. A_UINT32 off_duration_ms;
  42501. } wmi_vdev_sched_mode_probe_req_fixed_param;
  42502. typedef struct {
  42503. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_sched_mode_probe_resp_fixed_param */
  42504. A_UINT32 vdev_id;
  42505. /*
  42506. * The 32-bit cookie copied from the wmi_vdev_sched_mode_probe_req
  42507. * message.
  42508. */
  42509. A_UINT32 cookie;
  42510. /*
  42511. * The observed throughput at the vdev level during the mode-enabled
  42512. * portion of the mode probe.
  42513. */
  42514. A_UINT32 tput_mbps_on;
  42515. /*
  42516. * The observed throughput at the vdev level during the mode-disabled
  42517. * portion of the mode probe.
  42518. */
  42519. A_UINT32 tput_mbps_off;
  42520. } wmi_vdev_sched_mode_probe_resp_fixed_param;
  42521. /** Coordinated-AP TDMA **/
  42522. #define WMI_TDMA_MAX_ACTIVE_SCHEDULES 10
  42523. typedef struct {
  42524. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdma_schedule_request_cmd_fixed_param **/
  42525. /** pdev_id
  42526. * PDEV ID for identifying the MAC for which this schedule
  42527. * is being requested.
  42528. */
  42529. A_UINT32 pdev_id;
  42530. /** schedule_type
  42531. * 0 = Reserved
  42532. * 1 = Restricted
  42533. * UINT32_MAX = Cancel all TDMA schedules and ignore other parameters below.
  42534. */
  42535. A_UINT32 schedule_type;
  42536. /** schedule_handle_id
  42537. * Unique ID to identify this TDMA schedule
  42538. */
  42539. A_UINT32 schedule_handle_id;
  42540. /** owner_bssid
  42541. * The BSSID this TDMA schedule is reserved for
  42542. */
  42543. wmi_mac_addr owner_bssid;
  42544. /** start_time_tsf_low
  42545. * Lower 32-bits of Synchronized Start time for the first busy slot
  42546. * in this TDMA schedule.
  42547. * It should be a PMM global FW TSF reference
  42548. */
  42549. A_UINT32 start_time_tsf_low;
  42550. /** start_time_tsf_high
  42551. * Higher 32-bits of Synchronized Start time for the first busy slot
  42552. * in this TDMA schedule.
  42553. * It should be a PMM global FW TSF reference
  42554. */
  42555. A_UINT32 start_time_tsf_high;
  42556. /** num_busy_slots
  42557. * Number of busy periods in this schedule
  42558. */
  42559. A_UINT32 num_busy_slots;
  42560. /** busy_slot_dur_ms
  42561. * The fixed duration of each busy slot in milliseconds
  42562. */
  42563. A_UINT32 busy_slot_dur_ms;
  42564. /** busy_slot_intvl_ms
  42565. * The fixed interval between the start of two consecutive busy slots
  42566. * in milliseconds.
  42567. */
  42568. A_UINT32 busy_slot_intvl_ms;
  42569. /** edca_params_valid
  42570. * Indicates whether the following EDCA fields aifsn, ecwmin, ecwmax
  42571. * are valid or not
  42572. * 1 = Valid. 0 = Not Valid.
  42573. */
  42574. A_UINT32 edca_params_valid;
  42575. /** aifsn
  42576. * Arbitration inter frame spacing number for this schedule type.
  42577. * Range: 2-15.
  42578. * For voice, video, best-effort, background ACs
  42579. */
  42580. A_UINT32 aifsn[WMI_AC_MAX];
  42581. /** ecwmin
  42582. * Exponent form of Contention Window minimum value for this schedule type.
  42583. * Range: 2 - 1024.
  42584. * For voice, video, best-effort, background ACs
  42585. */
  42586. A_UINT32 ecwmin[WMI_AC_MAX];
  42587. /** ecwmax
  42588. * Exponent form of Contention Window maximum value for this schedule type.
  42589. * Range: 2 - 1024.
  42590. * For voice, video, best-effort, background ACs
  42591. */
  42592. A_UINT32 ecwmax[WMI_AC_MAX];
  42593. } wmi_tdma_schedule_request_cmd_fixed_param;
  42594. typedef struct {
  42595. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table _fixed_param */
  42596. A_UINT32 pdev_id;
  42597. /* freq_band:
  42598. * Indicates the intended FreqBand for updating targetPowerR2PTable.
  42599. * 0: 5G
  42600. * 1: 2G
  42601. * 2: 6G
  42602. */
  42603. A_UINT32 freq_band;
  42604. /* sub_band:
  42605. * Denotes band defined in targetPowerR2PFreqRangexG BDF fields.
  42606. * Valid values for each target is listed below
  42607. * For 11AX targets,
  42608. * 2G - 0
  42609. * 5G/6G - 0/1/2
  42610. *
  42611. * For 11BE targets,
  42612. * 2G - 0
  42613. * 5G/6G - 0/1
  42614. */
  42615. A_UINT32 sub_band;
  42616. /* is_ext:
  42617. * Applicable only for 11BE targets
  42618. * 0 - Default targetPowerR2PTable
  42619. * 1 - To update targetPowerR2PTable in extension fields
  42620. * For 11AX targets, value is expected to be 0.
  42621. */
  42622. A_UINT32 is_ext;
  42623. A_UINT32 target_type; /* 0 - IPQ95xx, 1 - QCN90xx, 0x10 - QCN92xx */
  42624. A_UINT32 r2p_array_len; /* length of targetPowerR2PTable */
  42625. /* end_of_r2ptable_update:
  42626. * This field can be used to indicate FW to trigger update of SW structures
  42627. * once user has updated for all the sub-bands of the Frequency band.
  42628. * This would be used when there are multiple sub-bands.
  42629. */
  42630. A_UINT32 end_of_r2ptable_update;
  42631. /*
  42632. * Following this structure is the TLV containing targetPowerR2PTablexG
  42633. * of type INT8 and with a unit of 0.25dBm.
  42634. */
  42635. } wmi_pdev_set_tgtr2p_table_cmd_fixed_param;
  42636. typedef enum {
  42637. WMI_PDEV_TGTR2P_SUCCESS = 0,
  42638. WMI_PDEV_TGTR2P_SUCCESS_WAITING_FOR_END_OF_UPDATE,
  42639. WMI_PDEV_TGTR2P_ERROR_INVALID_FREQ_BAND,
  42640. WMI_PDEV_TGTR2P_ERROR_INVALID_SUB_BAND,
  42641. WMI_PDEV_TGTR2P_ERROR_EXTENSION_FIELDS_NOT_ENABLED_IN_BDF,
  42642. WMI_PDEV_TGTR2P_ERROR_INVALID_TARGET_TPYE,
  42643. WMI_PDEV_TGTR2P_ERROR_R2P_ARRAY_LEN_MISMATCH,
  42644. } wmi_pdev_set_tgtr2p_event_status_type;
  42645. typedef struct {
  42646. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_event_fixed_param */
  42647. /* status:
  42648. * enum wmi_pdev_set_tgtr2p_event_status_type to indicate the status
  42649. * code/result
  42650. */
  42651. A_UINT32 status;
  42652. A_UINT32 pdev_id; /* to identify for which pdev the response is received */
  42653. } wmi_pdev_set_tgtr2p_table_event_fixed_param;
  42654. #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM 4
  42655. #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_2G_RATE_NUM 18
  42656. #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_5G_6G_RATE_NUM 24
  42657. typedef struct {
  42658. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_custom_tx_power_per_mcs_cmd_fixed_param */
  42659. A_UINT32 pdev_id;
  42660. /* Every band's bitmap is per chain per mcs, the bit set indicate the txpower value existed
  42661. * in txpower_array, otherwise, it means no setting from up-layer and need treat the setting
  42662. * txpower as zero
  42663. */
  42664. /* currently 2GHz band has 2 chains (though space is allocated for up
  42665. * to 4 chains) and each chain has 18 rates.
  42666. * bitmap_of_2GHz_band[0] -> chain 0 bitmap:
  42667. * |bit 0|bit 1|......|bit 17|
  42668. * |rate 0|rate 1|......|rate 17|
  42669. *
  42670. * bitmap_of_2GHz_band[1] -> chain 1 bitmap:
  42671. * |bit 0|bit 1|......|bit 17|
  42672. * |rate 0|rate 1|......|rate 17|
  42673. *
  42674. * bitmap_of_2GHz_band[2] -> reserved
  42675. * bitmap_of_2GHz_band[3] -> reserved
  42676. */
  42677. A_UINT32 bitmap_of_2GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
  42678. /* 5GHz band has 4 chains and each chain has 24 rates.
  42679. * bitmap_of_5GHz_band[0] -> chain 0 bitmap:
  42680. * |bit 0|bit 1|......|bit 23|
  42681. * |rate 0|rate 1|......|rate 23|
  42682. *
  42683. * bitmap_of_5GHz_band[1] -> chain 1 bitmap:
  42684. * |bit 0|bit 1|......|bit 23|
  42685. * |rate 0|rate 1|......|rate 23|
  42686. *
  42687. * bitmap_of_5GHz_band[2] -> chain 2 bitmap:
  42688. * |bit 0|bit 1|......|bit 23|
  42689. * |rate 0|rate 1|......|rate 23|
  42690. *
  42691. * bitmap_of_5GHz_band[3] -> chain 3 bitmap:
  42692. * |bit 0|bit 1|......|bit 23|
  42693. * |rate 0|rate 1|......|rate 23|
  42694. */
  42695. A_UINT32 bitmap_of_5GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
  42696. /* 6GHz band has 4 chains and each chain has 24 rates.
  42697. * bitmap_of_6GHz_band[0] -> chain 0 bitmap:
  42698. * |bit 0|bit 1|......|bit 23|
  42699. * |rate 0|rate 1|......|rate 23|
  42700. *
  42701. * bitmap_of_6GHz_band[1] -> chain 1 bitmap:
  42702. * |bit 0|bit 1|......|bit 23|
  42703. * |rate 0|rate 1|......|rate 23|
  42704. *
  42705. * bitmap_of_6GHz_band[2] -> chain 2 bitmap:
  42706. * |bit 0|bit 1|......|bit 23|
  42707. * |rate 0|rate 1|......|rate 23|
  42708. *
  42709. * bitmap_of_6GHz_band[3] -> chain 3 bitmap:
  42710. * |bit 0|bit 1|......|bit 23|
  42711. * |rate 0|rate 1|......|rate 23|
  42712. */
  42713. A_UINT32 bitmap_of_6GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
  42714. A_UINT32 txpower_array_len;
  42715. /* This TLV is followed by array of bytes:
  42716. * A_UINT8 txpower_bkoff_array[]:
  42717. * The txpower backoff value for each bit set within the per-band bitmaps
  42718. * above, in dB units.
  42719. * The elements from the 2GHz band occur first, then the elements from the
  42720. * 5GHz band, then the elements from the 6GHz band.
  42721. * Within each band, the elements from the lower chain numbers (i.e. the
  42722. * lower words within the bitmap array) occur first.
  42723. * Within each chain of each band, the element from the lower rate indices
  42724. * (i.e. the least significant bits within the bitmap word) occur first.
  42725. */
  42726. } wmi_pdev_set_custom_tx_power_per_mcs_cmd_fixed_param;
  42727. typedef struct {
  42728. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_get_link_info_cmd_fixed_param */
  42729. A_UINT32 vdev_id;
  42730. wmi_mac_addr mld_macaddr; /* MLD MAC address */
  42731. } wmi_mlo_vdev_get_link_info_cmd_fixed_param;
  42732. typedef enum {
  42733. WMI_LINK_INFO_EVENT_SUCCESS = 0,
  42734. /* reject due to common failure reason */
  42735. WMI_LINK_INFO_EVENT_REJECT_FAILURE,
  42736. /* reject as vdev is not up */
  42737. WMI_LINK_INFO_EVENT_REJECT_VDEV_NOT_UP,
  42738. /* reject as roaming is in progress */
  42739. WMI_LINK_INFO_EVENT_REJECT_ROAMING_IN_PROGRESS,
  42740. /* reject as it's not MLO connection */
  42741. WMI_LINK_INFO_EVENT_REJECT_NON_MLO_CONNECTION,
  42742. } wmi_mlo_vdev_link_info_event_status_type;
  42743. typedef struct {
  42744. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_link_info_event_fixed_param */
  42745. /* status:
  42746. * enum wmi_mlo_vdev_link_info_event_status_type to indicate the status
  42747. */
  42748. A_UINT32 status;
  42749. /* vdev_id:
  42750. * unique id identifying the VDEV, generated by the caller
  42751. */
  42752. A_UINT32 vdev_id;
  42753. wmi_mac_addr mld_macaddr; /* MLD MAC address */
  42754. /* hw_mode_index:
  42755. * current hardware mode index, see soc_hw_mode_t for values
  42756. */
  42757. A_UINT32 hw_mode_index;
  42758. } wmi_mlo_vdev_link_info_event_fixed_param;
  42759. #define WMI_MLO_VDEV_LINK_INFO_GET_VDEVID(link_info) WMI_GET_BITS(link_info, 0, 8)
  42760. #define WMI_MLO_VDEV_LINK_INFO_SET_VDEVID(link_info, value) WMI_SET_BITS(link_info, 0, 8, value)
  42761. #define WMI_MLO_VDEV_LINK_INFO_GET_LINKID(link_info) WMI_GET_BITS(link_info, 8, 8)
  42762. #define WMI_MLO_VDEV_LINK_INFO_SET_LINKID(link_info, value) WMI_SET_BITS(link_info, 8, 8, value)
  42763. #define WMI_MLO_VDEV_LINK_INFO_GET_LINK_STATUS(link_info) WMI_GET_BITS(link_info, 16, 2)
  42764. #define WMI_MLO_VDEV_LINK_INFO_SET_LINK_STATUS(link_info, value) WMI_SET_BITS(link_info, 16, 2, value)
  42765. typedef struct {
  42766. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_link_info */
  42767. union {
  42768. struct {
  42769. A_UINT32 vdev_id:8, /* vdev id for this link */
  42770. link_id:8, /* link id defined as in 802.11 BE spec. */
  42771. link_status:2, /* link_status - 0: inactive, 1: active */
  42772. reserved:14;
  42773. };
  42774. A_UINT32 link_info;
  42775. };
  42776. A_UINT32 chan_freq; /* Channel frequency in MHz */
  42777. } wmi_mlo_vdev_link_info;
  42778. /* Manual UL OFDMA trigger frame data structures */
  42779. typedef enum {
  42780. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_NONE,
  42781. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_RESP, /* response timeout, mismatch,
  42782. * BW mismatch, mimo ctrl mismatch,
  42783. * CRC error.. */
  42784. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_FILT, /* blocked by tx filtering */
  42785. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_FIFO, /* fifo, misc errors in HW */
  42786. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_SWABORT, /* software initiated abort
  42787. * (TX_ABORT) */
  42788. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_MAX = 0xff,
  42789. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_INVALID =
  42790. WMI_UL_OFDMA_MANUAL_TRIG_TXERR_MAX
  42791. } wmi_ul_ofdma_manual_trig_txerr_t;
  42792. typedef struct {
  42793. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_feedback_evt_fixed_param */
  42794. A_UINT32 tlv_header;
  42795. /* VDEV identifier */
  42796. A_UINT32 vdev_id;
  42797. /* To indicate whether feedback event is for SU (0) or MU trigger (1) */
  42798. A_UINT32 feedback_trig_type;
  42799. /* Feedback Params */
  42800. A_UINT32 curr_su_manual_trig_count;
  42801. A_UINT32 remaining_su_manual_trig;
  42802. A_UINT32 remaining_mu_trig_peers;
  42803. A_UINT32 manual_trig_status; /* holds a wmi_ul_ofdma_manual_trig_txerr_t */
  42804. /**
  42805. * This TLV is followed by TLVs below:
  42806. * wmi_mac_addr peer_macaddr[];
  42807. * Array length corresponds to the number of triggered peers
  42808. */
  42809. } wmi_manual_ul_ofdma_trig_feedback_evt_fixed_param;
  42810. typedef struct {
  42811. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_manual_mu_trig_cmd_fixed_param */
  42812. A_UINT32 tlv_header;
  42813. /* VDEV identifier */
  42814. A_UINT32 vdev_id;
  42815. /* Configurable Parameters for manual UL OFDMA Multi-User Trigger frame */
  42816. A_UINT32 manual_trig_preferred_ac;
  42817. /**
  42818. * This TLV is followed by TLVs below:
  42819. * wmi_mac_addr peer_macaddr[];
  42820. * The array has one element for each peer to be included in the
  42821. * manually-triggered UL MU transmission.
  42822. */
  42823. } wmi_vdev_set_manual_mu_trig_cmd_fixed_param;
  42824. typedef struct {
  42825. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_manual_su_trig_cmd_fixed_param */
  42826. A_UINT32 tlv_header;
  42827. /* VDEV identifier */
  42828. A_UINT32 vdev_id;
  42829. /* Configurable Parameters for manual UL OFDMA Single-User Trigger frame */
  42830. wmi_mac_addr peer_macaddr;
  42831. A_UINT32 manual_trig_preferred_ac;
  42832. A_UINT32 num_su_manual_trig;
  42833. A_UINT32 manual_trig_length;
  42834. A_UINT32 manual_trig_mcs;
  42835. A_UINT32 manual_trig_nss;
  42836. A_INT32 manual_trig_target_rssi; /* units = dBm */
  42837. } wmi_vdev_set_manual_su_trig_cmd_fixed_param;
  42838. #define CQI_UPLOAD_META_DATA_NC_IDX(idx) \
  42839. (MAX_NUM_CQI_USERS_IN_STANDALONE_SND + (idx * 2))
  42840. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_ASNR_LENGTH(asnr_params, value) \
  42841. WMI_SET_BITS(asnr_params, 0, 16, value)
  42842. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_ASNR_LENGTH(asnr_params) \
  42843. WMI_GET_BITS(asnr_params, 0, 16)
  42844. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_ASNR_OFFSET(asnr_params, value) \
  42845. WMI_SET_BITS(asnr_params, 16, 16, value)
  42846. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_ASNR_OFFSET(asnr_params) \
  42847. WMI_GET_BITS(asnr_params, 16, 16)
  42848. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DSNR_LENGTH(dsnr_params, value) \
  42849. WMI_SET_BITS(dsnr_params, 0, 16, value)
  42850. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DSNR_LENGTH(dsnr_params) \
  42851. WMI_GET_BITS(dsnr_params, 0, 16)
  42852. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DSNR_OFFSET(dsnr_params, value) \
  42853. WMI_SET_BITS(dsnr_params, 16, 16, value)
  42854. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DSNR_OFFSET(dsnr_params) \
  42855. WMI_GET_BITS(dsnr_params, 16, 16)
  42856. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_FB_PARAMS_NC(fb_params, value) \
  42857. WMI_SET_BITS(fb_params, 0, 2, value)
  42858. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_FB_PARAMS_NC(fb_params) \
  42859. WMI_GET_BITS(fb_params, 0, 2)
  42860. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_FB_PARAMS_NSS_NUM(fb_params, value) \
  42861. WMI_SET_BITS(fb_params, 2, 2, value)
  42862. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_FB_PARAMS_NSS_NUM(fb_params) \
  42863. WMI_GET_BITS(fb_params, 2, 2)
  42864. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DDR_BUF_IDX(ddr_buffer_idx, value) \
  42865. WMI_SET_BITS(ddr_buffer_idx, 4, 2, value)
  42866. #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DDR_BUF_IDX(ddr_buffer_idx) \
  42867. WMI_GET_BITS(ddr_buffer_idx, 4, 2)
  42868. #define WMI_SET_STANDALONE_SOUND_PARAMS_FB_TYPE(snd_params, value) \
  42869. WMI_SET_BITS(snd_params, 0, 2, value)
  42870. #define WMI_GET_STANDALONE_SOUND_PARAMS_FB_TYPE(snd_params) \
  42871. WMI_GET_BITS(snd_params, 0, 2)
  42872. #define WMI_SET_STANDALONE_SOUND_PARAMS_NG(snd_params, value) \
  42873. WMI_SET_BITS(snd_params, 2, 2, value)
  42874. #define WMI_GET_STANDALONE_SOUND_PARAMS_NG(snd_params) \
  42875. WMI_GET_BITS(snd_params, 2, 2)
  42876. #define WMI_SET_STANDALONE_SOUND_PARAMS_CB(snd_params, value) \
  42877. WMI_SET_BITS(snd_params, 4, 1, value)
  42878. #define WMI_GET_STANDALONE_SOUND_PARAMS_CB(snd_params) \
  42879. WMI_GET_BITS(snd_params, 4, 1)
  42880. #define WMI_SET_STANDALONE_SOUND_PARAMS_BW(snd_params, value) \
  42881. WMI_SET_BITS(snd_params, 5, 3, value)
  42882. #define WMI_GET_STANDALONE_SOUND_PARAMS_BW(snd_params) \
  42883. WMI_GET_BITS(snd_params, 5, 3)
  42884. #define WMI_SET_STANDALONE_SOUND_PARAMS_CQI_TYPE(snd_params, value) \
  42885. WMI_SET_BITS(snd_params, 8, 1, value)
  42886. #define WMI_GET_STANDALONE_SOUND_PARAMS_CQI_TYPE(snd_params) \
  42887. WMI_GET_BITS(snd_params, 8, 1)
  42888. #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_SET_FB_PARAMS_IS_VALID(fb_params_cqi, value, idx) \
  42889. WMI_SET_BITS(fb_params_cqi, idx, 1, value)
  42890. #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_GET_FB_PARAMS_IS_VALID(fb_params_cqi, idx) \
  42891. WMI_GET_BITS(fb_params_cqi, idx, 1)
  42892. #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_SET_FB_PARAMS_NC(fb_params_cqi, value, idx) \
  42893. WMI_SET_BITS(fb_params_cqi, CQI_UPLOAD_META_DATA_NC_IDX(idx), 2, value)
  42894. #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_GET_FB_PARAMS_NC(fb_params_cqi, idx) \
  42895. WMI_GET_BITS(fb_params_cqi, CQI_UPLOAD_META_DATA_NC_IDX(idx), 2)
  42896. typedef enum _WMI_STANDALONE_SOUND_STATUS_T {
  42897. WMI_STANDALONE_SOUND_STATUS_OK,
  42898. WMI_STANDALONE_SOUND_STATUS_ERR_NUM_PEERS_EXCEEDED,
  42899. WMI_STANDALONE_SOUND_STATUS_ERR_NG_INVALID,
  42900. WMI_STANDALONE_SOUND_STATUS_ERR_NUM_REPEAT_EXCEEDED,
  42901. WMI_STANDALONE_SOUND_STATUS_ERR_PEER_DOESNOT_SUPPORT_BW,
  42902. WMI_STANDALONE_SOUND_STATUS_ERR_INVALID_PEER,
  42903. WMI_STANDALONE_SOUND_STATUS_ERR_INVALID_VDEV,
  42904. WMI_STANDALONE_SOUND_STATUS_ERR_PEER_DOES_NOT_SUPPORT_MU_FB,
  42905. WMI_STANDALONE_SOUND_STATUS_ERR_DMA_NOT_CONFIGURED,
  42906. WMI_STANDALONE_SOUND_STATUS_ERR_COMPLETE_FAILURE,
  42907. } WMI_STANDALONE_SOUND_STATUS_T;
  42908. typedef struct {
  42909. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_cv_upload_meta_data */
  42910. /** Set if the CV is valid */
  42911. A_UINT32 is_valid;
  42912. /** Feedback type */
  42913. A_UINT32 fb_type;
  42914. /**
  42915. * [15:0] ASNR length
  42916. * [31:16] ASNR offset
  42917. */
  42918. A_UINT32 asnr_params;
  42919. /**
  42920. * [15:0] DSNR length
  42921. * [31:16] DSNR offset
  42922. */
  42923. A_UINT32 dsnr_params;
  42924. /** Peer mac address */
  42925. wmi_mac_addr peer_mac_address;
  42926. /** fb_params:
  42927. * [1:0] Nc
  42928. * Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_FB_PARAMS_NC
  42929. * [3:2] nss_num
  42930. * Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_FB_PARAMS_NSS_NUM
  42931. * [5:4] ddr_buffer_idx
  42932. * Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_DDR_BUF_IDX
  42933. */
  42934. A_UINT32 fb_params;
  42935. } wmi_dma_buf_release_cv_upload_meta_data;
  42936. typedef struct {
  42937. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_radar_meta_data */
  42938. /* timestamp at the time of the capture */
  42939. A_UINT32 timestamp_us;
  42940. /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h */
  42941. A_UINT32 phy_mode;
  42942. /* frequency (in MHz) of the primary 20 MHz channel */
  42943. A_UINT32 chan_mhz;
  42944. /* Center frequency 1 in MHz */
  42945. A_UINT32 band_center_freq1;
  42946. /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode */
  42947. A_UINT32 band_center_freq2;
  42948. /* tx chain mask */
  42949. A_UINT32 tx_chain_mask;
  42950. /* rx chain mask */
  42951. A_UINT32 rx_chain_mask;
  42952. /* number of LTFs sent for capture */
  42953. A_UINT32 num_ltf_tx;
  42954. /* number of LTFs skipped in rx */
  42955. A_UINT32 num_skip_ltf_rx;
  42956. /* number of LTFs used for accumulation */
  42957. A_UINT32 num_ltf_accumulation;
  42958. } wmi_dma_buf_release_wifi_radar_meta_data;
  42959. typedef struct {
  42960. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_cqi_upload_meta_data */
  42961. A_UINT32 tlv_header;
  42962. /**
  42963. * [15:0] ASNR length
  42964. * [31:16] ASNR offset
  42965. */
  42966. A_UINT32 asnr_params;
  42967. /** Peer mac address */
  42968. wmi_mac_addr peer_mac_address[MAX_NUM_CQI_USERS_IN_STANDALONE_SND];
  42969. /**
  42970. * [0] is_user0_valid
  42971. * [1] is_user1_valid
  42972. * [2] is_user2_valid
  42973. * [4:3] User0_Nc
  42974. * [6:5] User1_Nc
  42975. * [8:7] User2_Nc
  42976. */
  42977. A_UINT32 fb_params_cqi : 9,
  42978. reserved : 23;
  42979. } wmi_dma_buf_release_cqi_upload_meta_data;
  42980. typedef struct {
  42981. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_standalone_sounding_cmd_fixed_param */
  42982. /** vdev identifier */
  42983. A_UINT32 vdev_id;
  42984. /** sounding_params:
  42985. * [1:0] Feedback type
  42986. * [3:2] Ng
  42987. * [4] Codebook
  42988. * [7:5] BW
  42989. * 0 = 20 MHz
  42990. * 1 = 40 MHz
  42991. * 2 = 80 MHz
  42992. * 3 = 160 MHz
  42993. * 4 = 320 MHz
  42994. * [8] Triggered/Non-Triggered CQI
  42995. * [31:9] Reserved
  42996. */
  42997. A_UINT32 sounding_params;
  42998. /** The number of sounding repeats */
  42999. A_UINT32 num_sounding_repeats;
  43000. /**
  43001. * TLV (tag length value) parameters follow the
  43002. * structure. The TLV's are:
  43003. * wmi_mac_addr peer_list[num_peers];
  43004. */
  43005. } wmi_standalone_sounding_cmd_fixed_param;
  43006. typedef struct {
  43007. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_standalone_sounding_evt_fixed_param */
  43008. /** vdev identifier */
  43009. A_UINT32 vdev_id;
  43010. /** status:
  43011. * standalone sounding command status -
  43012. * refer to WMI_STANDALONE_SOUND_STATUS_T
  43013. */
  43014. A_UINT32 status;
  43015. /** number of CV buffers uploaded */
  43016. A_UINT32 buffer_uploaded;
  43017. /** TLV (tag length value) parameters follow the
  43018. * structure. The TLV's are:
  43019. * A_UINT32 snd_failed[num_sounding_repeats];
  43020. * snd_failed[] array's elements hold the number of failures
  43021. * for each sounding.
  43022. */
  43023. } wmi_standalone_sounding_evt_fixed_param;
  43024. typedef struct {
  43025. /*
  43026. * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rf_path_cmd_fixed_param
  43027. */
  43028. A_UINT32 tlv_header;
  43029. /* pdev_id for identifying the MAC */
  43030. A_UINT32 pdev_id;
  43031. /*
  43032. * rf_path :
  43033. * 0 - primary RF path
  43034. * 1 - secondary RF path
  43035. */
  43036. A_UINT32 rf_path;
  43037. } wmi_pdev_set_rf_path_cmd_fixed_param;
  43038. typedef struct {
  43039. /*
  43040. * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rf_path_event_fixed_param
  43041. */
  43042. A_UINT32 tlv_header;
  43043. /* pdev_id for identifying the MAC */
  43044. A_UINT32 pdev_id;
  43045. /*
  43046. * rf_path :
  43047. * 0 - primary RF path
  43048. * 1 - secondary RF path
  43049. */
  43050. A_UINT32 rf_path;
  43051. /*
  43052. * status :
  43053. * TRUE (0) - for recieved and cache the value in FW
  43054. * FALSE (1) :
  43055. * a. pdev_id for which secondary RF path is not available
  43056. * b. caching of the rf_path got failed in FW
  43057. */
  43058. A_UINT32 status;
  43059. } wmi_pdev_set_rf_path_event_fixed_param;
  43060. #define WMI_SET_RX_PEER_STATS_RESP_TYPE(rx_params, value) \
  43061. WMI_SET_BITS(rx_params, 0, 1, value)
  43062. #define WMI_GET_RX_PEER_STATS_RESP_TYPE(rx_params) \
  43063. WMI_GET_BITS(rx_params, 0, 1)
  43064. #define WMI_SET_RX_PEER_STATS_MCS(rx_params, value) \
  43065. WMI_SET_BITS(rx_params, 1, 5, value)
  43066. #define WMI_GET_RX_PEER_STATS_MCS(rx_params) \
  43067. WMI_GET_BITS(rx_params, 1, 5)
  43068. #define WMI_SET_RX_PEER_STATS_NSS(rx_params, value) \
  43069. WMI_SET_BITS(rx_params, 6, 4, value)
  43070. #define WMI_GET_RX_PEER_STATS_NSS(rx_params) \
  43071. WMI_GET_BITS(rx_params, 6, 4)
  43072. #define WMI_SET_RX_PEER_STATS_GI_LTF_TYPE(rx_params, value) \
  43073. WMI_SET_BITS(rx_params, 10, 4, value)
  43074. #define WMI_GET_RX_PEER_STATS_GI_LTF_TYPE(rx_params) \
  43075. WMI_GET_BITS(rx_params, 10, 4)
  43076. typedef enum {
  43077. WMI_PEER_RX_RESP_SU = 0,
  43078. WMI_PEER_RX_RESP_MIMO = 1,
  43079. WMI_PEER_RX_RESP_OFDMA = 2,
  43080. } WMI_PEER_RX_RESP_TYPE;
  43081. typedef struct {
  43082. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_rx_peer_userinfo */
  43083. A_UINT32 tlv_header;
  43084. /* Peer mac address */
  43085. wmi_mac_addr peer_macaddr;
  43086. /* Per peer RX parameters */
  43087. /* [0] - Flag to indicate if peer responded with QoS Data or QoS NULL.
  43088. * 0 -> indicates QoS NULL, 1-> indicates QoS Data response
  43089. * [5:1] - MCS - Peer response MCS
  43090. * [9:6] - NSS - Peer response NSS
  43091. * [13:10] - GI LTF Type - Peer response GI/LTF type
  43092. * 0 => gi == GI_1600 && ltf == 1x LTF
  43093. * 1 => gi == GI_1600 && ltf == 2x LTF
  43094. * 2 => gi == GI_3200 && ltf == 4x LTF
  43095. * [31:14] - Reserved
  43096. */
  43097. A_UINT32 rx_peer_stats;
  43098. /* Peer response per chain RSSI */
  43099. A_INT32 peer_per_chain_rssi[WMI_MAX_CHAINS];
  43100. } wmi_manual_ul_ofdma_trig_rx_peer_userinfo;
  43101. typedef struct {
  43102. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_rx_peer_userinfo_evt_fixed_param */
  43103. A_UINT32 tlv_header;
  43104. A_UINT32 vdev_id; /* VDEV identifier */
  43105. /* combined_rssi:
  43106. * RX Combined RSSI in dBm
  43107. * Value indicates the average RSSI per 20MHz by averaging the total RSSI
  43108. * across entire BW for each OFDMA STA
  43109. */
  43110. A_INT32 combined_rssi;
  43111. /* rx_ppdu_resp_type:
  43112. * RX PPDU Response Type
  43113. * Refer WMI_PEER_RX_RESP_TYPE for possible values
  43114. */
  43115. A_UINT32 rx_ppdu_resp_type;
  43116. /* rx_resp_bw:
  43117. * RX response bandwidth
  43118. * 0 = 20 MHz
  43119. * 1 = 40 MHz
  43120. * 2 = 80 MHz
  43121. * 3 = 160 MHz
  43122. * 4 = 320 MHz
  43123. */
  43124. A_UINT32 rx_resp_bw;
  43125. /**
  43126. * This TLV is followed by TLVs below:
  43127. * wmi_manual_ul_ofdma_trig_rx_peer_userinfo rx_peer_userinfo[]
  43128. * TLV length specified by number of peer responses for manual
  43129. * UL OFDMA trigger
  43130. */
  43131. } wmi_manual_ul_ofdma_trig_rx_peer_userinfo_evt_fixed_param;
  43132. typedef enum _WMI_VDEV_PAUSE_TYPE
  43133. {
  43134. WMI_VDEV_PAUSE_TYPE_UNKNOWN = 0,
  43135. WMI_VDEV_PAUSE_TYPE_MLO_LINK = 1,
  43136. WMI_VDEV_PAUSE_TYPE_TX = 2,
  43137. } WMI_VDEV_PAUSE_TYPE;
  43138. typedef struct {
  43139. /** TLV tag and len; tag equals
  43140. * WMITLV_TAG_STRUC_wmi_vdev_pause_cmd_fixed_param */
  43141. A_UINT32 tlv_header;
  43142. /* VDEV identifier */
  43143. A_UINT32 vdev_id;
  43144. /** type of pause, refer to WMI_VDEV_PAUSE_TYPE */
  43145. A_UINT32 pause_type;
  43146. /** duration of pause, in unit of ms */
  43147. A_UINT32 pause_dur_ms;
  43148. } wmi_vdev_pause_cmd_fixed_param;
  43149. typedef struct {
  43150. A_UINT32 tlv_header;
  43151. A_UINT32 ieee_link_id; /* key to identify a link */
  43152. wmi_channel wmi_chan;
  43153. } wmi_mlo_link_bss_param;
  43154. typedef struct {
  43155. A_UINT32 tlv_header;
  43156. wmi_mac_addr ap_mld_macaddr;
  43157. /* max num of active links recommended by AP or applications */
  43158. A_UINT32 recommended_max_num_simultaneous_links;
  43159. /*
  43160. * The TLVs listed below follow this fixed_param TLV:
  43161. * wmi_mlo_link_bss_param link_bss_params[]:
  43162. * an array of links to be updated
  43163. */
  43164. } wmi_mlo_set_link_bss_params_cmd_fixed_param;
  43165. typedef enum _WMI_LINK_SWITCH_REASON {
  43166. WMI_MLO_LINK_SWITCH_REASON_RSSI_CHANGE = 1,
  43167. WMI_MLO_LINK_SWITCH_REASON_LOW_QUALITY = 2,
  43168. WMI_MLO_LINK_SWITCH_REASON_C2_CHANGE = 3,
  43169. WMI_MLO_LINK_SWITCH_REASON_HOST_FORCE = 4,
  43170. WMI_MLO_LINK_SWITCH_REASON_T2LM = 5,
  43171. WMI_MLO_LINK_SWITCH_REASON_WLM = 6,
  43172. WMI_MLO_LINK_SWITCH_REASON_HOST_FORCE_FOLLOWUP = 7,
  43173. WMI_MLO_LINK_SWITCH_REASON_MAX,
  43174. } WMI_LINK_SWITCH_REASON;
  43175. typedef struct {
  43176. A_UINT32 tlv_header;
  43177. A_UINT32 vdev_id; /*the vdev id assigned to curr_ieee_link_id*/
  43178. A_UINT32 curr_ieee_link_id; /*current link id on above vdev_id*/
  43179. A_UINT32 new_ieee_link_id; /*new link id on above vdev_id*/
  43180. A_UINT32 new_primary_freq; /*primay_freq for the new link on the vdev, in units of MHZ*/
  43181. A_UINT32 new_phymode; /*phymode for the new link on the vdev, see WLAN_PHY_MODE for definitions*/
  43182. A_UINT32 reason; /*see WMI_LINK_SWITCH_REASON for definition*/
  43183. } wmi_mlo_link_switch_req_evt_fixed_param;
  43184. typedef enum _WMI_LINK_SWITCH_CNF_REASON{
  43185. WMI_MLO_LINK_SWITCH_CNF_REASON_BSS_PARAMS_CHANGED = 1,
  43186. WMI_MLO_LINK_SWITCH_CNF_REASON_CONCURRECNY_CONFLICT = 2,
  43187. WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_INTERNAL_ERROR = 3,
  43188. WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_RESTORE_FORCE = 4,
  43189. WMI_MLO_LINK_SWITCH_CNF_REASON_MAX,
  43190. } WMI_LINK_SWITCH_CNF_REASON;
  43191. typedef enum _WMI_LINK_SWITCH_CNF_STATUS{
  43192. WMI_MLO_LINK_SWITCH_CNF_STATUS_ACCEPT = 0,
  43193. WMI_MLO_LINK_SWITCH_CNF_STATUS_REJECT = 1,
  43194. } WMI_LINK_SWITCH_CNF_STATUS;
  43195. typedef struct {
  43196. A_UINT32 tlv_header;
  43197. A_UINT32 vdev_id;
  43198. A_UINT32 status; /* see definition of WMI_LINK_SWITCH_CNF_STATUS */
  43199. A_UINT32 reason; /* see definition of WMI_LINK_SWITCH_CNF_REASON */
  43200. /*
  43201. * The following optional TLVs may follow this fixed_praam TLV,
  43202. * depending on the value of the reason field.
  43203. *
  43204. * wmi_mlo_link_set_active_cmd_fixed_param set_link_params[];
  43205. * The set_link_params array has one element when reason is
  43206. * WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_RESTORE_FORCE and
  43207. * use_ieee_link_id_bitmap should always be filled with 1.
  43208. * In other cases the length of the set_link_params array shall be 0.
  43209. *
  43210. * wmi_mlo_set_active_link_number_param link_number_param[];
  43211. * Link number parameters, optional TLV.
  43212. * Present when force type is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  43213. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM.
  43214. * In other cases the length of array shall be 0.
  43215. *
  43216. * A_UINT32 ieee_link_id_bitmap[];
  43217. * present for WMI_MLO_LINK_FORCE_ACTIVE
  43218. * or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE
  43219. * or WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
  43220. * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM
  43221. * In other cases the length of array shall be 0.
  43222. *
  43223. * A_UINT32 ieee_link_id_bitmap2[];
  43224. * For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE ieee_link_id_bitmap2[]
  43225. * carries the inactive linkid bitmap.
  43226. * In other cases the length of the array shall be 0.
  43227. */
  43228. } wmi_mlo_link_switch_cnf_fixed_param;
  43229. typedef struct {
  43230. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_state_switch_req_evt_fixed_param */
  43231. A_UINT32 link_state_switch_count; /* Number of link state switch event pending, MAX 5 iteration */
  43232. } wmi_mlo_link_state_switch_req_evt_fixed_param;
  43233. typedef struct {
  43234. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_state_switch_trigger_reason_tlv_param */
  43235. A_UINT32 cur_active_ieee_bitmap; /* current active ieee linkbitmap */
  43236. A_UINT32 prev_active_ieee_bitmap; /* previous active iee linkbitmap */
  43237. A_UINT32 host_ref_fw_timestamp_ms; /* fw time stamp on refrence of TIME_STAMP_SYNC_CMD */
  43238. A_UINT32 reason_code; /* reason for link state switch trigger -
  43239. * refer to WMI_LINK_STATE_SWITCH_REASON
  43240. */
  43241. wmi_mac_addr ml_bssid; /* mac address of mld device */
  43242. } wmi_mlo_link_state_switch_trigger_reason;
  43243. typedef enum _WMI_LINK_STATE_SWITCH_REASON {
  43244. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_VDEV_READY = 0,
  43245. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_ULL_MODE = 1,
  43246. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_T2LM_ENABLED = 2,
  43247. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_T2LM_DISABLED = 3,
  43248. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_FORCE_ENABLED = 4,
  43249. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_FORCE_DISABLED = 5,
  43250. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_LINK_QUALITY = 6,
  43251. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_LINK_CAPACITY = 7,
  43252. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_RSSI = 8,
  43253. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_BMISS = 9,
  43254. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_BT_STATUS = 10,
  43255. WMI_MLO_PS_LINK_STATE_SWITCH_REASON_MAX,
  43256. } WMI_LINK_STATE_SWITCH_REASON;
  43257. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_ML_PEER_ID_GET(new_link_info) WMI_GET_BITS(new_link_info, 0, 16)
  43258. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_ML_PEER_ID_SET(new_link_info, value) WMI_SET_BITS(new_link_info, 0, 16, value)
  43259. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_HW_LINK_ID_GET(new_link_info) WMI_GET_BITS(new_link_info, 16, 16)
  43260. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_HW_LINK_ID_SET(new_link_info, value) WMI_SET_BITS(new_link_info, 16, 16, value)
  43261. typedef struct {
  43262. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_new_primary_link_peer_info */
  43263. A_UINT32 tlv_header;
  43264. union {
  43265. A_UINT32 new_link_info;
  43266. struct {
  43267. A_UINT32 ml_peer_id :16,
  43268. hw_link_id :16;
  43269. };
  43270. };
  43271. } wmi_mlo_new_primary_link_peer_info;
  43272. typedef struct {
  43273. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_fixed_param */
  43274. A_UINT32 tlv_header;
  43275. A_UINT32 vdev_id;
  43276. /**
  43277. * Following this structure is
  43278. * the array of "wmi_mlo_new_primary_link_peer_info" TLVs.
  43279. */
  43280. } wmi_mlo_primary_link_peer_migration_fixed_param;
  43281. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_ML_PEER_ID_GET(status_info) WMI_GET_BITS(status_info, 0, 16)
  43282. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_ML_PEER_ID_SET(status_info, value) WMI_SET_BITS(status_info, 0, 16, value)
  43283. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_STATUS_GET(status_info) WMI_GET_BITS(status_info, 16, 8)
  43284. #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_STATUS_SET(status_info, value) WMI_SET_BITS(status_info, 16, 8, value)
  43285. typedef enum {
  43286. WMI_PRIMARY_LINK_PEER_MIGRATION_SUCCESS,
  43287. WMI_PRIMARY_LINK_PEER_MIGRATION_IN_PROGRESS,
  43288. WMI_PRIMARY_LINK_PEER_MIGRATION_DELETE_IN_PROGRESS,
  43289. WMI_PRIMARY_LINK_PEER_MIGRATION_DELETED,
  43290. WMI_PRIMARY_LINK_PEER_MIGRATION_TX_PIPES_FAILED,
  43291. WMI_PRIMARY_LINK_PEER_MIGRATION_RX_PIPES_FAILED,
  43292. /* Add any new status above this line */
  43293. WMI_PRIMARY_LINK_PEER_MIGRATION_FAIL = 255,
  43294. } WMI_PRIMARY_LINK_PEER_MIGRATION_STATUS;
  43295. typedef struct {
  43296. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_status */
  43297. A_UINT32 tlv_header;
  43298. union {
  43299. A_UINT32 status_info;
  43300. struct {
  43301. A_UINT32 ml_peer_id :16,
  43302. status :8, /* WMI_PRIMARY_LINK_PEER_MIGRATION_STATUS */
  43303. reserved :8;
  43304. };
  43305. };
  43306. } wmi_mlo_primary_link_peer_migration_status;
  43307. typedef struct {
  43308. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_compl_fixed_param */
  43309. A_UINT32 tlv_header;
  43310. A_UINT32 vdev_id;
  43311. /**
  43312. * Following the fixed param is
  43313. * the array of TLVs "wmi_mlo_primary_link_peer_migration_status".
  43314. */
  43315. } wmi_mlo_primary_link_peer_migration_compl_fixed_param;
  43316. /* WMI_AUX_DEV_CAPS_SUPPORTED_MODE:
  43317. * How many bits to shift for each supported mode.
  43318. * This works just like Linux file permission bits
  43319. * (i.e. user|group|other values for each rwx perms).
  43320. */
  43321. typedef enum _WMI_AUX_DEV_CAPS_SUPPORTED_MODE {
  43322. WMI_AUX_DEV_SUPPORTED_MODE_SCAN = 0,
  43323. WMI_AUX_DEV_SUPPORTED_MODE_LISTEN = 1,
  43324. WMI_AUX_DEV_SUPPORTED_MODE_EMLSR = 2,
  43325. } WMI_AUX_DEV_CAPS_SUPPORTED_MODE;
  43326. /* wmi_aux_dev_capabilities:
  43327. * TLV representing AUX mode capabilities
  43328. * A one-dimensional "flattened" array of these structs shall represent
  43329. * all AUX capabilities regardless of the actual AUX count.
  43330. *
  43331. * For example, if 2x AUX are present, then the array is expected to look
  43332. * something like this:
  43333. * wmi_aux_dev_capabilities caps[] = {
  43334. * // 4 elements for AUX_0 - one element for each HW mode:
  43335. * AUX_0_single_mac,
  43336. * AUX_0_dual_mac,
  43337. * AUX_0_single_mac_emlsr,
  43338. * AUX_0_split_emlsr,
  43339. * // 4 elements for AUX_1:
  43340. * AUX_1_single_mac,
  43341. * AUX_1_dual_mac,
  43342. * AUX_1_single_mac_emlsr,
  43343. * AUX_1_split_emlsr,
  43344. * };
  43345. * In effect, indexes 0 to 3 (inclusive) represent the first AUX,
  43346. * 4 to 7 (inclusive) represent the second, and so on.
  43347. * Note that each element explicitly identifies which AUX and HW mode it
  43348. * corresponds to, via the aux_index and hw_mode_id fields respectively.
  43349. * So the receiver should not assume the ordering will be as shown above
  43350. * (AUX0 single, AUX0 dual, AUX0 single emlsr, AUX0 split emlsr,
  43351. * AUX1 single, AUX1 dual, AUX1 single emlsr, AUX1 split emlsr)
  43352. * but instead should directly check each element's aux_index and hw_mode_id
  43353. * fields.
  43354. */
  43355. typedef struct {
  43356. /* tlv_header -- WMITLV_TAG_STRUC_wmi_aux_dev_capabilities */
  43357. A_UINT32 tlv_header;
  43358. /* aux_index -- Which AUX this TLV applies to.
  43359. Ex: aux_index=0 is first AUX, aux_index=1 is second AUX, etc */
  43360. A_UINT32 aux_index;
  43361. /*
  43362. * This TLV represents which AUX capabilities are supported by
  43363. * which MAC for the given HW mode.
  43364. * pdev ID value of 0x0 denotes that the AUX mode is not applicable
  43365. * for the given HW mode.
  43366. *
  43367. * hw_mode_id | Single DBS_OR_SBS AUX eMLSR AUX eMLSR
  43368. * | Phy single split
  43369. * --------------------------------------------------------------
  43370. * supported_modes | SCAN/ SCAN/ EMLSR EMLSR
  43371. * | LISTEN LISTEN
  43372. * listen_pdev_id_map | 0x1 0x2 0x0 0x0
  43373. * emlsr_pdev_id_map | 0x0 0x0 0x1 0x2
  43374. */
  43375. /* hw_mode_id:
  43376. * Which HW mode this TLV applies to.
  43377. * HW mode values are defined in WMI_HW_MODE_CONFIG_TYPE.
  43378. */
  43379. A_UINT32 hw_mode_id;
  43380. /* supported_modes:
  43381. * Which mode this AUX supports for the HW mode defined in hw_mode_id.
  43382. * Shift amounts are defined in WMI_AUX_DEV_CAPS_SUPPORTED_MODE.
  43383. * This works just like user|group|other bits for Linux file permissions:
  43384. * 0x1 = SCAN (0 0 1)
  43385. * 0x2 = LISTEN (0 1 0)
  43386. * 0x3 = SCAN+LISTEN (0 1 1)
  43387. * 0x4 = EMLSR (1 0 0)
  43388. */
  43389. A_UINT32 supported_modes_bitmap;
  43390. /* listen_pdev_id_map:
  43391. * Which AUX MAC can listen/scan for the HW mode described in hw_mode_id.
  43392. * 0x0 - AUX cannot be used for listen mode.
  43393. * 0x1 - AUX can be attached to MAC-0 in AUX listen mode.
  43394. * 0x2 - AUX can be attached to MAC-1 in AUX listen mode.
  43395. */
  43396. A_UINT32 listen_pdev_id_map;
  43397. /* emlsr_pdev_id_map:
  43398. * Which AUX MAC can perform eMLSR for the HW mode described in hw_mode_id.
  43399. * 0x0 - AUX cannot be used for eMLSR mode.
  43400. * 0x1 - AUX can be attached to MAC-0 in AUX eMLSR mode.
  43401. * 0x2 - AUX can be attached to MAC-1 in AUX eMLSR mode.
  43402. */
  43403. A_UINT32 emlsr_pdev_id_map;
  43404. } wmi_aux_dev_capabilities;
  43405. typedef struct {
  43406. /** TLV tag and len; tag equals
  43407. * WMITLV_TAG_STRUC_wmi_pdev_wsi_stats_info_cmd_fixed_param
  43408. */
  43409. A_UINT32 tlv_header;
  43410. A_UINT32 pdev_id; /* for identifying the MAC */
  43411. A_UINT32 wsi_ingress_load_info;
  43412. A_UINT32 wsi_egress_load_info;
  43413. } wmi_pdev_wsi_stats_info_cmd_fixed_param;
  43414. typedef struct {
  43415. /** TLV tag and len; tag equals
  43416. * WMITLV_TAG_STRUC_wmi_csa_event_status_ind_fixed_param
  43417. */
  43418. A_UINT32 tlv_header;
  43419. A_UINT32 vdev_id;
  43420. A_UINT32 status; /* accept: 1 reject : 0 */
  43421. } wmi_csa_event_status_ind_fixed_param;
  43422. typedef struct {
  43423. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_utf_cmd_fixed_param */
  43424. A_UINT32 tlv_header;
  43425. A_UINT32 pdev_id;
  43426. } wmi_pdev_utf_cmd_fixed_param;
  43427. typedef struct {
  43428. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_utf_event_fixed_param */
  43429. A_UINT32 tlv_header;
  43430. A_UINT32 pdev_id;
  43431. } wmi_pdev_utf_event_fixed_param;
  43432. typedef struct {
  43433. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_led_blink_rate_table */
  43434. A_UINT32 tlv_header;
  43435. A_UINT32 on_time; /* units = milliseconds */
  43436. A_UINT32 off_time; /* units = milliseconds */
  43437. } wmi_led_blink_rate_table;
  43438. typedef struct {
  43439. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_led_blink_download_rate_table_fixed_param */
  43440. A_UINT32 tlv_header;
  43441. /* Pdev Id 0 or 1 based on split phy */
  43442. A_UINT32 pdev_id;
  43443. /* Feature enable or disable flag 0-disable 1-enable */
  43444. A_UINT32 blink_enable_flag;
  43445. /* Bandwidth (Mbps) of each index in the blink rate table.
  43446. * This quantum specification tells the FW which of the blink rate table
  43447. * elements to use; the FW will divide the data rate by this bw_per_index
  43448. * and round down, to obtain the index into the rate table for the blink
  43449. * rate corresponding to the data rate.
  43450. */
  43451. A_UINT32 bw_per_index;
  43452. /**
  43453. * Following this fixed_param TLV are the following additional TLVs:
  43454. * - wmi_led_blink_rate_table led_blink_rate_table[]
  43455. * The led_blink_rate_table[] elements need to be ordered by
  43456. * increasing data rate, so that by dividing the data rate by
  43457. * bw_per_index, the FW can find which index/element of the
  43458. * led_blink_rate_table[] array to use.
  43459. */
  43460. } wmi_enable_led_blink_download_rate_table_fixed_param;
  43461. typedef enum {
  43462. /* Used when peer attempts connection with vdev */
  43463. VDEV_OOB_CONNECT_REQUEST = 0,
  43464. /* Used when upper layers wanted to cancel the connect request */
  43465. VDEV_OOB_CONNECT_CANCEL = 1,
  43466. /* Used as a response from FW that start request is accepted */
  43467. VDEV_OOB_CONNECT_STARTED = 2,
  43468. /*
  43469. * Used as a response when connection is complete, or as a response
  43470. * to cancel command.
  43471. */
  43472. VDEV_OOB_CONNECT_COMPLETED = 3,
  43473. /* Used as a response if connect request can not be honored in FW */
  43474. VDEV_OOB_CONNECT_CANCELLED = 4,
  43475. VDEV_OOB_CONNECT_INVALID = 255,
  43476. } VDEV_OOB_CONNECT_REQ_RESP_TYPE;
  43477. typedef struct {
  43478. /** TLV tag and len; tag equals
  43479. * WMITLV_TAG_STRUC_wmi_vdev_oob_connection_req_cmd_fixed_param */
  43480. A_UINT32 tlv_header;
  43481. /* VDEV identifier */
  43482. A_UINT32 vdev_id;
  43483. /* OOB connection request type based on VDEV_OOB_CONNECT_REQ_RESP_TYPE */
  43484. A_UINT32 connect_req_type;
  43485. /* vdev_available_duration:
  43486. * specifies duration in msecs for which device needs to be available
  43487. * on vdev chan
  43488. */
  43489. A_UINT32 vdev_available_duration;
  43490. } wmi_vdev_oob_connection_req_cmd_fixed_param;
  43491. typedef struct {
  43492. /** TLV tag and len; tag equals
  43493. * WMITLV_TAG_STRUC_wmi_vdev_oob_connection_resp_event_fixed_param */
  43494. A_UINT32 tlv_header;
  43495. /* VDEV identifier */
  43496. A_UINT32 vdev_id;
  43497. /* OOB connection response type based on VDEV_OOB_CONNECT_REQ_RESP_TYPE */
  43498. A_UINT32 connect_resp_type;
  43499. } wmi_vdev_oob_connection_resp_event_fixed_param;
  43500. typedef enum {
  43501. WMI_AUDIO_TRANSPORT_SWITCH_STATUS_FAIL = 0,
  43502. WMI_AUDIO_TRANSPORT_SWITCH_STATUS_SUCCESS,
  43503. WMI_AUDIO_TRANSPORT_SWITCH_STATUS_TIMEOUT,
  43504. } WMI_AUDIO_TRANSPORT_SWITCH_RESPONSE_STATUS;
  43505. typedef enum {
  43506. WMI_AUDIO_TRANSPORT_SWITCH_TYPE_NON_WLAN = 0,
  43507. WMI_AUDIO_TRANSPORT_SWITCH_TYPE_WLAN = 1,
  43508. } WMI_AUDIO_TRANSPORT_SWITCH_TYPE;
  43509. typedef struct {
  43510. /** TLV tag and len; tag equals
  43511. * WMITLV_TAG_STRUC_wmi_audio_transport_switch_type_event_fixed_param */
  43512. A_UINT32 tlv_header;
  43513. /** This indicates whether FW is requesting for switch to WLAN(XPAN) or non-WLAN(BLE) */
  43514. A_UINT32 switch_type; /*see definition of WMI_AUDIO_TRANSPORT_SWITCH_TYPE */
  43515. } wmi_audio_transport_switch_type_event_fixed_param;
  43516. typedef struct {
  43517. /** TLV tag and len; tag equals
  43518. * WMITLV_TAG_STRUC_wmi_audio_transport_switch_resp_status_cmd_fixed_param */
  43519. A_UINT32 tlv_header;
  43520. /** This indicates whether switch response status is success, fail, timeout */
  43521. A_UINT32 switch_response_status; /* see definition of WMI_AUDIO_TRANSPORT_SWITCH_RESPONSE_STATUS */
  43522. /** This indicates for which switch type (WLAN(XPAN) or non-WLAN(BLE)) the switch response status is intended to */
  43523. A_UINT32 switch_type; /* see definition of WMI_AUDIO_TRANSPORT_SWITCH_TYPE */
  43524. } wmi_audio_transport_switch_resp_status_cmd_fixed_param;
  43525. enum wmi_wifi_radar_cmd {
  43526. wmi_wifi_radar_capture_disable,
  43527. wmi_wifi_radar_capture_enable,
  43528. wmi_wifi_radar_rx_cal,
  43529. wmi_wifi_radar_tx_cal,
  43530. wmi_wifi_radar_cmd_max = 0xff
  43531. };
  43532. typedef struct {
  43533. /** TLV tag and len; tag equals
  43534. * WMITLV_TAG_STRUC_wmi_pdev_enable_wifi_radar_cmd_fixed_param
  43535. */
  43536. A_UINT32 tlv_header;
  43537. /* host pdev id */
  43538. A_UINT32 pdev_id;
  43539. /* tx_chain_mask:
  43540. * tx chain mask to use for wifi radar tx.
  43541. * Only one chain is supposed to be set.
  43542. */
  43543. A_UINT32 tx_chain_mask;
  43544. /* rx chain mask for wifi radar capture. Can have multiple bits set. */
  43545. A_UINT32 rx_chain_mask;
  43546. /* number of LTFs to send for capture */
  43547. A_UINT32 num_ltf_tx;
  43548. /* number of extra LTFs that are to be skipped for accumulation */
  43549. A_UINT32 num_skip_ltf_rx;
  43550. /* number of LTFs to use for accumulation. Must be power of 2. */
  43551. A_UINT32 num_ltf_accumulation;
  43552. /* bandwidth to use for capture
  43553. * 0 = 20 MHz
  43554. * 1 = 40 MHz
  43555. * 2 = 80 MHz
  43556. * 3 = 160 MHz
  43557. * 4 = 320 MHz
  43558. */
  43559. A_UINT32 bw;
  43560. /* enum wmi_wifi_radar_cmd */
  43561. A_UINT32 capture_calibrate;
  43562. /* periodicity of capture in milliseconds */
  43563. A_UINT32 capture_interval_ms;
  43564. } wmi_pdev_enable_wifi_radar_cmd_fixed_param;
  43565. #define WMI_PDEV_WIFI_RADAR_CAL_COMPLETION_STATUS_GET(cal_status_array, txchnIdx, rxchnIdx) WMI_GET_BITS(*(cal_status_array + txchnIdx), rxchnIdx, 1)
  43566. #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)
  43567. typedef struct {
  43568. /** TLV tag and len; tag equals
  43569. * WMITLV_TAG_STRUC_wmi_wifi_radar_cal_configuration
  43570. */
  43571. A_UINT32 tlv_header;
  43572. /* ID of pdev for which the calibration is completed */
  43573. A_UINT32 pdev_id;
  43574. /* Packet bandwidth of WiFi Radar packet used for calibration
  43575. * 0 = 20 MHz
  43576. * 1 = 40 MHz
  43577. * 2 = 80 MHz
  43578. * 3 = 160 MHz
  43579. * 4 = 320 MHz
  43580. */
  43581. A_UINT32 wifi_radar_pkt_bw;
  43582. /* Channel bandwidth
  43583. * 0 = 20 MHz
  43584. * 1 = 40 MHz
  43585. * 2 = 80 MHz
  43586. * 3 = 160 MHz
  43587. * 4 = 320 MHz
  43588. */
  43589. A_UINT32 channel_bw;
  43590. /* Channel Center frequency in MHz */
  43591. A_UINT32 band_center_freq;
  43592. /* Number of LTF configured in the WiFi Radar Tx packet during calibration */
  43593. A_UINT32 num_ltf_tx;
  43594. /* Number of LTF skipped during Rx of the calibration packet */
  43595. A_UINT32 num_skip_ltf_rx;
  43596. /* Number of LTF accumulated during Rx of the calibration packet */
  43597. A_UINT32 num_ltf_accumulation;
  43598. /* Calibration status for each chain combination
  43599. * Word 0: tx chain 0 cal statuses:
  43600. * Bit 0: rx chain 0 cal status
  43601. * Bit 1: rx chain 1 cal status
  43602. * etc.
  43603. * Word 1: tx chain 1 cal statuses:
  43604. * Bit 0: rx chain 0 cal status
  43605. * Bit 1: rx chain 1 cal status
  43606. * etc.
  43607. * etc.
  43608. * Cal status values: success = 1, Failure = 0
  43609. */
  43610. A_UINT32 per_chain_cal_status[WMI_MAX_CHAINS];
  43611. } wmi_pdev_wifi_radar_cal_completion_status_event_param;
  43612. typedef struct {
  43613. /* WMITLV_TAG_STRUC_wmi_pdev_enable_xlna_cmd_fixed_param */
  43614. A_UINT32 tlv_header;
  43615. /* ID of pdev for which the xLNA needs to be configured */
  43616. A_UINT32 pdev_id;
  43617. /* 1 - Enable, 0 - Disable */
  43618. A_UINT32 xLNA_enable;
  43619. } wmi_pdev_enable_xlna_cmd_fixed_param;
  43620. typedef struct {
  43621. /* WMITLV_TAG_STRUC_wmi_pdev_enable_xlna_event_fixed_param */
  43622. A_UINT32 tlv_header;
  43623. /* to identify for which pdev the response is received */
  43624. A_UINT32 pdev_id;
  43625. /* Return status: 0 - Success, else - Failure */
  43626. A_UINT32 status;
  43627. } wmi_pdev_enable_xlna_event_fixed_param;
  43628. /**
  43629. * bits 0-15 are used for non interative traffic types like video streaming,
  43630. * or ping
  43631. * bit 16-31 are reserved for interactive traffic types like gaming, VoIP,
  43632. * or video conferencing
  43633. */
  43634. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_STREAMING_M 0x00000001
  43635. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_STREAMING_S 0
  43636. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_PING_M 0x00000002
  43637. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_PING_S 1
  43638. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_BACKGROUND_M 0x00000004
  43639. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_BACKGROUND_S 2
  43640. /* bits 3-15 are reserved for new non-interactive traffic types */
  43641. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_GAMING_M 0x00010000
  43642. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_GAMING_S 16
  43643. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VOIP_M 0x00020000
  43644. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VOIP_S 17
  43645. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VIDEO_CONF_M 0x00040000
  43646. #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VIDEO_CONF_S 18
  43647. /* bits 19-31 are reserved for new interactive traffic types */
  43648. typedef struct {
  43649. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_active_traffic_map_cmd_fixed_param */
  43650. A_UINT32 vdev_id;
  43651. wmi_mac_addr peer_macaddr; /* peer MAC address */
  43652. /* active_traffic_map:
  43653. * This field is a bitmap showing traffic types known to be currently
  43654. * present within the vdev.
  43655. * Refer to the WMI_PEER_ACTIVE_TRAFFIC_ definitions that specify which
  43656. * bits within the bitmap correspond to which traffic types.
  43657. */
  43658. A_UINT32 active_traffic_map;
  43659. } wmi_peer_active_traffic_map_cmd_fixed_param;
  43660. /*
  43661. * WMI_REQUEST_OPM_STATS_CMDID triggered by host to collect OPM stats for trafic types identified by STC
  43662. * in respose this FW will send OEM_respose_event_id WMI_OEM_DATA_CMD_OPM_STATS
  43663. *
  43664. */
  43665. typedef struct {
  43666. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_opm_stats_cmd_fixed_param */
  43667. A_UINT32 pdev_id; /** pdev_id for identifying the MAC */
  43668. } wmi_request_opm_stats_cmd_fixed_param;
  43669. /* wmi command to suspend SAP vdev */
  43670. typedef struct {
  43671. /** TLV tag and len; tag equals
  43672. * WMITLV_TAG_STRUC_wmi_set_ap_suspend_resume_cmd_fixed_param */
  43673. A_UINT32 tlv_header;
  43674. /* VDEV identifier */
  43675. A_UINT32 vdev_id; /* If 0xFF, find vdevs corresponding to MLD MAC address */
  43676. wmi_mac_addr mld_mac_address; /* MLD MAC address */
  43677. A_UINT32 is_ap_suspend; /* 1 = suspend, 0 = resume */
  43678. } wmi_set_ap_suspend_resume_fixed_param;
  43679. typedef struct {
  43680. /** TLV tag and len; tag equals
  43681. * WMITLV_TAG_STRUC_wmi_mgmt_srng_reap_event_fixed_param */
  43682. A_UINT32 tlv_header;
  43683. /** timestamp_tp_update_ms:
  43684. * This indicates the last time the tail pointer was updated by FW
  43685. * after filling MGMT SRNG entry.
  43686. * The timestamp is from the FW CPU's internal clock, in milliseconds units.
  43687. */
  43688. A_UINT32 timestamp_tp_update_ms;
  43689. /** This indicates the position of the tail pointer as last updated by FW */
  43690. A_UINT32 tail_pointer;
  43691. } wmi_mgmt_srng_reap_event_fixed_param;
  43692. typedef struct {
  43693. /** TLV tag and len; tag equals
  43694. * WMITLV_TAG_STRUC_wmi_mlo_peer_tid_to_link_map_event_fixed_param */
  43695. A_UINT32 tlv_header;
  43696. /* status takes values from WMI_MLO_TID_TO_LINK_MAP_STATUS */
  43697. A_UINT32 status;
  43698. } wmi_mlo_peer_tid_to_link_map_event_fixed_param;
  43699. /* ADD NEW DEFS HERE */
  43700. // {
  43701. /*****************************************************************************
  43702. * The following structures are deprecated. DO NOT USE THEM!
  43703. */
  43704. /** Max number of channels in the schedule. */
  43705. #define OCB_CHANNEL_MAX (5)
  43706. /* NOTE: Make sure these data structures are identical to those
  43707. * defined in sirApi.h */
  43708. typedef struct
  43709. {
  43710. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  43711. A_UINT32 aifsn;
  43712. /** Contention Window minimum. Range: 1 - 10 */
  43713. A_UINT32 cwmin;
  43714. /** Contention Window maximum. Range: 1 - 10 */
  43715. A_UINT32 cwmax;
  43716. } wmi_qos_params_t;
  43717. typedef struct {
  43718. A_UINT32 tlv_header;
  43719. A_UINT32 vdev_id;
  43720. A_UINT32 tidmap; /* Bitmap specifying the TIDs for which prohibit would be set/unset */
  43721. A_UINT32 prohibit_enable; /* 0 for Disable, 1 for Enable */
  43722. } wmi_vdev_param_enable_sr_prohibit_fixed_param;
  43723. typedef struct
  43724. {
  43725. /** Channel frequency in MHz */
  43726. A_UINT32 chan_freq;
  43727. /** Channel duration in ms */
  43728. A_UINT32 duration;
  43729. /** Start guard interval in ms */
  43730. A_UINT32 start_guard_interval;
  43731. /** End guard interval in ms */
  43732. A_UINT32 end_guard_interval;
  43733. /** Transmit power in dBm, range 0 - 23 */
  43734. A_UINT32 tx_power;
  43735. /** Transmit datarate in Mbps */
  43736. A_UINT32 tx_rate;
  43737. /** QoS parameters for each AC */
  43738. wmi_qos_params_t qos_params[WLAN_MAX_AC];
  43739. /** 1 to enable RX stats for this channel, 0 otherwise */
  43740. A_UINT32 rx_stats;
  43741. } wmi_ocb_channel_t;
  43742. typedef struct {
  43743. /** TLV tag and len; tag equals
  43744. * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
  43745. A_UINT32 tlv_header;
  43746. /* VDEV identifier */
  43747. A_UINT32 vdev_id;
  43748. /** Number of valid channels in the channels array */
  43749. A_UINT32 num_channels;
  43750. /** The array of channels */
  43751. wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
  43752. /** 1 to allow off-channel tx, 0 otherwise */
  43753. A_UINT32 off_channel_tx; /* Not supported */
  43754. } wmi_ocb_set_sched_cmd_fixed_param;
  43755. typedef struct {
  43756. /** Return status. 0 for success, non-zero otherwise */
  43757. A_UINT32 status;
  43758. } wmi_ocb_set_sched_event_fixed_param;
  43759. /*****************************************************************************
  43760. * END DEPRECATED
  43761. */
  43762. // }
  43763. /* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
  43764. #ifdef __cplusplus
  43765. }
  43766. #endif
  43767. #endif /*_WMI_UNIFIED_H_*/
  43768. /**@}*/